@eui/tools 6.2.23 → 6.2.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 6.2.23
1
+ 6.2.24
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 6.2.24 (2022-11-14)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **other:**
6
+ * configuration injection issues for MWP localdev - wrong pkg declaration - MWP-9010 [MWP-9010](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9010) ([34f088f9](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/34f088f9aa8c9bc70138bfb0863b64614779f0e0))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 6.2.23 (2022-11-14)
2
11
 
3
12
  ##### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.2.23",
3
+ "version": "6.2.24",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -20,8 +20,10 @@ const {
20
20
  angularProjectDefFullSkeletonV13,
21
21
  angularProjectDefFullSkeletonV14,
22
22
  angularProjectDefConfiguration,
23
+ angularProjectDefConfigurationHost,
23
24
  angularProjectDefConfigurationLight,
24
25
  angularProjectDefConfigurationOptimized,
26
+ angularProjectDefConfigurationOptimizedHost,
25
27
  angularProjectDefConfigurationOptimizedLight,
26
28
  angularPackageDef,
27
29
  angularPackageSubEntryDef,
@@ -276,8 +278,13 @@ module.exports.registerAngularProjectDef = (project, build = false, element = fa
276
278
  configurationDefOptimized = JSON.stringify(angularProjectDefConfigurationOptimizedLight);
277
279
  } else {
278
280
  tools.logInfo('Injecting angular configuration file replacement');
279
- configurationDef = JSON.stringify(angularProjectDefConfiguration);
280
- configurationDefOptimized = JSON.stringify(angularProjectDefConfigurationOptimized);
281
+ if (project.host) {
282
+ configurationDef = JSON.stringify(angularProjectDefConfigurationHost);
283
+ configurationDefOptimized = JSON.stringify(angularProjectDefConfigurationOptimizedHost);
284
+ } else {
285
+ configurationDef = JSON.stringify(angularProjectDefConfiguration);
286
+ configurationDefOptimized = JSON.stringify(angularProjectDefConfigurationOptimized);
287
+ }
281
288
  }
282
289
 
283
290
  angularConfigFile.configurations.forEach((conf) => {
@@ -1032,6 +1032,38 @@ module.exports.angularProjectDefConfiguration = {
1032
1032
  };
1033
1033
 
1034
1034
 
1035
+ module.exports.angularProjectDefConfigurationHost = {
1036
+ "buildOptimizer": false,
1037
+ "optimization": false,
1038
+ "vendorChunk": true,
1039
+ "extractLicenses": false,
1040
+ "sourceMap": true,
1041
+ "namedChunks": true,
1042
+ "fileReplacements": [
1043
+ {
1044
+ "replace": "hosts/@project.name@/src/assets/openid-login-config.json",
1045
+ "with": "hosts/@project.name@/src/assets/@config.filename@"
1046
+ },
1047
+ {
1048
+ "replace": "hosts/@project.name@/src/environments/environment.ts",
1049
+ "with": "hosts/@project.name@/src/environments/environment.@config.key@.ts"
1050
+ },
1051
+ {
1052
+ "replace": "hosts/@project.name@/src/assets/oidc-client.min.js",
1053
+ "with": "node_modules/oidc-client/dist/oidc-client.min.js"
1054
+ },
1055
+ {
1056
+ "replace": "hosts/@project.name@/src/assets/jsrsasign-all-min.js",
1057
+ "with": "node_modules/jsrsasign/lib/jsrsasign-all-min.js"
1058
+ },
1059
+ {
1060
+ "replace": "hosts/@project.name@/src/assets/openid-login.js",
1061
+ "with": "node_modules/@eui/base/assets/openid/openid-login.js"
1062
+ }
1063
+ ]
1064
+ };
1065
+
1066
+
1035
1067
  module.exports.angularProjectDefConfigurationLight = {
1036
1068
  "buildOptimizer": false,
1037
1069
  "optimization": false,
@@ -1089,6 +1121,48 @@ module.exports.angularProjectDefConfigurationOptimized = {
1089
1121
  ]
1090
1122
  }
1091
1123
 
1124
+ module.exports.angularProjectDefConfigurationOptimizedHost = {
1125
+ "fileReplacements": [
1126
+ {
1127
+ "replace": "hosts/@project.name@/src/assets/openid-login-config.json",
1128
+ "with": "hosts/@project.name@/src/assets/@config.filename@"
1129
+ },
1130
+ {
1131
+ "replace": "hosts/@project.name@/src/environments/environment.ts",
1132
+ "with": "hosts/@project.name@/src/environments/environment.@config.key@.ts"
1133
+ },
1134
+ {
1135
+ "replace": "hosts/@project.name@/src/assets/oidc-client.min.js",
1136
+ "with": "node_modules/oidc-client/dist/oidc-client.min.js"
1137
+ },
1138
+ {
1139
+ "replace": "hosts/@project.name@/src/assets/jsrsasign-all-min.js",
1140
+ "with": "node_modules/jsrsasign/lib/jsrsasign-all-min.js"
1141
+ },
1142
+ {
1143
+ "replace": "hosts/@project.name@/src/assets/openid-login.js",
1144
+ "with": "node_modules/@eui/base/assets/openid/openid-login.js"
1145
+ }
1146
+ ],
1147
+ "optimization": true,
1148
+ "outputHashing": "all",
1149
+ "sourceMap": false,
1150
+ "extractCss": true,
1151
+ "namedChunks": true,
1152
+ "aot": true,
1153
+ "extractLicenses": true,
1154
+ "vendorChunk": false,
1155
+ "buildOptimizer": true,
1156
+ "budgets": [
1157
+ {
1158
+ "type": "initial",
1159
+ "maximumWarning": "2mb",
1160
+ "maximumError": "8mb"
1161
+ }
1162
+ ]
1163
+ }
1164
+
1165
+
1092
1166
 
1093
1167
  module.exports.angularProjectDefConfigurationOptimizedLight = {
1094
1168
  "fileReplacements": [
@@ -12,7 +12,7 @@ const innerProjects = require('./projects');
12
12
  const innerPackages = require('./packages');
13
13
 
14
14
  module.exports.installPackage = (pkgName) => {
15
- pkg = configUtils.packages.getPackage(pkgName, false, true);
15
+ const pkg = configUtils.packages.getPackage(pkgName, false, true);
16
16
 
17
17
  return Promise.resolve()
18
18
  .then(() => {
@@ -133,18 +133,6 @@ const injectExternalAppRootCore = (project, build = false, injectedNpmPkg, injec
133
133
  return tools.copydirFiles(appRootSrcPath, projectRootPath, true);
134
134
  })
135
135
 
136
- .then(() => {
137
- tools.logInfo('Check angular-config.json replacement of project');
138
-
139
- const angularConfigFile = path.join(projectRootPath, 'angular-config.json');
140
- let angularConfigJson = tools.getJsonFileContent(angularConfigFile);
141
- angularConfigJson = JSON.stringify(angularConfigJson, null, 2);
142
-
143
- angularConfigJson = tools.replaceAll(angularConfigJson, '@project.name@', project.name);
144
-
145
- return tools.writeFileContent(angularConfigFile, angularConfigJson);
146
- })
147
-
148
136
  .catch((e) => {
149
137
  throw e;
150
138
  })
@@ -252,6 +240,19 @@ module.exports.injectExternalAppSources = (project, build = false, init = false)
252
240
  })
253
241
  }
254
242
  })
243
+
244
+ .then(() => {
245
+ tools.logInfo('Check angular-config.json replacement of project');
246
+
247
+ const angularConfigFile = path.join(process.cwd(), project.folder, 'angular-config.json');
248
+ delete require.cache[angularConfigFile];
249
+ let angularConfigJson = tools.getJsonFileContent(angularConfigFile);
250
+ angularConfigJson = JSON.stringify(angularConfigJson, null, 2);
251
+ angularConfigJson = tools.replaceAll(angularConfigJson, '@project.name@', project.name);
252
+
253
+ return tools.writeFileContent(angularConfigFile, angularConfigJson);
254
+ })
255
+
255
256
  .catch((e) => {
256
257
  throw e;
257
258
  })