Commit c49a0a01 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

refactor: [DLCM-1906] clean and simplify start script

parent 9077511b
......@@ -132,34 +132,6 @@
],
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
},
"dlcmtest": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.dlcmtest.ts"
}
]
},
"dlcmtest-local": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.dlcmtest-local.ts"
}
]
}
},
"defaultConfiguration": ""
......@@ -182,16 +154,6 @@
},
"production-local": {
"browserTarget": "dlcm-frontend:build:production-local"
},
"dlcmtest": {
"browserTarget": "dlcm-frontend:build:dlcmtest"
},
"dlcmtest-local": {
"browserTarget": "dlcm-frontend:build:dlcmtest-local",
"proxyConfig": "proxy.conf.dlcmtest-local.js"
},
"standalone": {
"proxyConfig": "proxy.conf.standalone.js"
}
}
},
......
......@@ -12,12 +12,7 @@
"start": "npm run prepare && npm run generate-models && npm run serve",
"start:no-watch": "npm run prepare && npm run generate-models && npm run serve -- --watch=false",
"start:remote": "npm run prepare && npm run generate-models && npm run serve -- --host 0.0.0.0 --port 4200 --disable-host-check",
"start:remote:no-watch": "npm run prepare && npm run generate-models && npm run serve -- --host 0.0.0.0 --port 4200 --disable-host-check --watch=false",
"start:dlcmtest": "npm run prepare && npm run generate-models && npm run serve -- -c dlcmtest-local",
"start:dlcmtest:no-watch": "npm run start:dlcmtest -- --watch=false",
"start:noapigenerate": "npm run prepare && npm run serve",
"start:standalone": "npm run prepare && npm run generate-models && npm run serve -- -c standalone",
"start:standalone:no-watch": "npm run prepare && npm run generate-models && npm run serve -- -c standalone --watch=false",
"build": "npm run prepare && ng build --aot=true --configuration production --source-map=false",
"test": "npm run prepare && ng test --no-progress --code-coverage",
"test:ci": "npm run prepare && ng test --code-coverage --watch=false --no-progress --browsers=ChromeNoSandboxHeadless",
......
const proxyConfLocal = require("./proxy.conf.local.js")
const proxyConfVariable = require("./proxy.conf.variable.js")
module.exports = {
...proxyConfVariable.rss,
...proxyConfVariable.shortDoi,
...proxyConfLocal.obj,
}
const proxyConfLocal = require("./proxy.conf.local.js")
const proxyConfVariable = require("./proxy.conf.variable.js")
module.exports = {
...proxyConfVariable.rss,
...proxyConfVariable.shortDoi,
...proxyConfVariable.oauth(16120),
...proxyConfVariable.shiblogin(16120),
...proxyConfLocal.obj,
}
{
"theme": "dlcm",
"production": true,
"ADMIN_APPLICATION": "https://sandbox.dlcm.ch/administration/",
"ACCESS_APPLICATION": "https://sandbox.dlcm.ch/accession/",
"INGEST_APPLICATION": "https://sandbox.dlcm.ch/ingestion/",
"PREINGEST_APPLICATION": "https://sandbox.dlcm.ch/accession/",
"STORAGION_APPLICATION": "https://sandbox.dlcm.ch/storagion/",
"dummyClientSecret": "123abc",
"clientId": "dlcm-sandbox-angular",
"scope": "READ",
"allowedUrls": [
"https://sandbox.dlcm.ch/authorization/oauth/token",
"https://sandbox.dlcm.ch/authorization/oauth/authorize"
],
"requireHttps": false,
"showDebugInformation": false,
"redirectUrl": "https://sandbox.dlcm.ch/portal/"
}
const proxyConfVariable = require("./proxy.conf.variable.js")
exports.obj = {}
exports.obj = {
...proxyConfVariable.oauth(16100),
...proxyConfVariable.shiblogin(16100, "Marty", "McFly", "999999@unige.ch"),
}
import {defaultEnvironment} from "@environments/environment.defaults";
import {environmentLocal} from "@environments/environment.local";
import {ThemeEnum} from "@shared/enums/theme.enum";
import {DlcmEnvironment} from "./environment.defaults.model";
// This config is for developer using test.dlcm.ch as backend (rather than local backend)
export const environment: DlcmEnvironment = {
...defaultEnvironment,
theme: ThemeEnum.dlcm,
scope: "READ",
requireHttps: false,
showDebugInformation: false,
isDemoMode: false,
dummyClientSecret: "123abc",
clientId: "dlcm-test-local-angular",
redirectUrl: "http://localhost:4200/",
admin: "https://e-research-test.unige.ch/dlcm-test/administration/admin",
forceRuntimeOverrideSetting: true,
computeOAuthEndpoint: true,
...environmentLocal,
};
import {environment as environmentDlcmTest} from "@environments/environment.dlcmtest-local";
import {environment as environmentProd} from "@environments/environment.prod";
import {environmentLocal} from "@environments/environment.local";
import {DlcmEnvironment} from "./environment.defaults.model";
export const environment: DlcmEnvironment = {
...environmentProd,
...environmentDlcmTest,
...environmentLocal,
production: true,
dummyClientSecret: "123abc",
clientId: "dlcm-test-local-angular",
admin: "https://e-research-test.unige.ch/dlcm-test/administration/admin",
forceRuntimeOverrideSetting: true,
redirectUrl: "http://localhost:4200/",
};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment