@eui/tools 6.12.21 → 6.12.23

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.12.21
1
+ 6.12.23
package/CHANGELOG.md CHANGED
@@ -1,3 +1,21 @@
1
+ ## 6.12.23 (2023-06-26)
2
+
3
+ ##### Bug Fixes
4
+
5
+ * **other:**
6
+ * license key injection - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([92ab18cd](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/92ab18cdd86d4b44637b60a4a728242506a0a6fe))
7
+
8
+ * * *
9
+ * * *
10
+ ## 6.12.22 (2023-06-26)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * ag-grid license injection race condition - EUI-7121 [EUI-7121](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-7121) ([7337d6ed](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/7337d6eddba6419f0aa6405abef3a2e03cd4ffdf))
16
+
17
+ * * *
18
+ * * *
1
19
  ## 6.12.21 (2023-06-26)
2
20
 
3
21
  ##### Chores
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.12.21",
3
+ "version": "6.12.23",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -196,6 +196,28 @@ module.exports.generateVirtualRemote = (remoteName, cloneRemote = true) => {
196
196
  // license token is replaced at post-install, we get it from the remote root UI pkg assets at specific location
197
197
  if (remote.skeletonConfig.aggridLicenseInjection) {
198
198
  tools.copy(optionAgGridPath, remoteSrcPath);
199
+
200
+ const rootPkgLicensePath = path.join(
201
+ remote.paths.repoNodeModules,
202
+ remote.skeletonConfig.rootNpmPkg,
203
+ 'assets', 'ag-grid-license', 'license.json'
204
+ );
205
+
206
+ if (tools.isFileExists(rootPkgLicensePath)) {
207
+ const licenseJSON = tools.getJsonFileContent(rootPkgLicensePath);
208
+ const license = licenseJSON.license;
209
+ tools.logInfo(`license key found : ${license}`);
210
+
211
+ const mainTsPath = path.join(remote.paths.src, 'main.ts');
212
+ console.log(`replacing in ${mainTsPath}`);
213
+ tools.replaceInFileSync(mainTsPath, 'LICENSE_KEY_VALUE', license);
214
+
215
+ tools.logInfo('main.ts content after replacement : ');
216
+ const mainTsContent = tools.getFileContent(mainTsPath);
217
+ console.log(mainTsContent);
218
+
219
+ tools.logSuccess('OK => main.ts replaced');
220
+ }
199
221
  }
200
222
 
201
223
  // if options, all options are checked and default modules defs are injected following certain conditions
@@ -39,10 +39,6 @@ module.exports.installRemote = (pkg, envTarget, compositeType) => {
39
39
  deps = outputDeps;
40
40
  })
41
41
 
42
- .then(() => {
43
- return innerRemotes.postInstall(pkg);
44
- })
45
-
46
42
  // returning metadata dependencies
47
43
  .then(() => {
48
44
  return deps;
@@ -171,49 +171,3 @@ module.exports.installDeps = (pkg, envTarget, compositeType) => {
171
171
  throw e;
172
172
  })
173
173
  }
174
-
175
-
176
- module.exports.postInstall = (pkg) => {
177
- tools.logTitle('Executing post-install for remote skeleton replacement fetched from root UI package');
178
-
179
- if (!pkg.fullSkeletonSources) {
180
- return;
181
- }
182
-
183
- if (!pkg.skeletonConfig) {
184
- return;
185
- }
186
-
187
- if (pkg.skeletonConfig.aggridLicenseInjection) {
188
- return Promise.resolve()
189
- .then(() => {
190
- const rootPkgLicensePath = path.join(
191
- pkg.paths.repoNodeModules,
192
- pkg.skeletonConfig.rootNpmPkg,
193
- 'assets', 'ag-grid-license', 'license.json'
194
- );
195
-
196
- if (!tools.isFileExists(rootPkgLicensePath)) {
197
- throw 'NO_LICENSE_FILE_FOUND';
198
- }
199
-
200
- const licenseJSON = tools.getJsonFileContent(rootPkgLicensePath);
201
- const license = licenseJSON.license;
202
- tools.logInfo(`license key found : ${license}`);
203
-
204
- const mainTsPath = path.join(pkg.paths.src, 'main.ts');
205
- console.log(`replacing in ${mainTsPath}`);
206
- tools.replaceInFileSync(mainTsPath, 'LICENSE_KEY_VALUE', license);
207
-
208
- tools.logInfo('main.ts content after replacement : ');
209
- const mainTsContent = tools.getFileContent(mainTsPath);
210
- console.log(mainTsContent);
211
-
212
- tools.logSuccess('OK => main.ts replaced');
213
- })
214
-
215
- .catch((e) => {
216
- throw e;
217
- })
218
- }
219
- }