@eui/tools 6.12.21 → 6.12.22
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.
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.12.
|
|
1
|
+
6.12.22
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 6.12.22 (2023-06-26)
|
|
2
|
+
|
|
3
|
+
##### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* 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))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
1
10
|
## 6.12.21 (2023-06-26)
|
|
2
11
|
|
|
3
12
|
##### Chores
|
package/package.json
CHANGED
|
@@ -196,6 +196,30 @@ 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
|
+
throw 'NO_LICENSE_FILE_FOUND';
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
const licenseJSON = tools.getJsonFileContent(rootPkgLicensePath);
|
|
211
|
+
const license = licenseJSON.license;
|
|
212
|
+
tools.logInfo(`license key found : ${license}`);
|
|
213
|
+
|
|
214
|
+
const mainTsPath = path.join(remote.paths.src, 'main.ts');
|
|
215
|
+
console.log(`replacing in ${mainTsPath}`);
|
|
216
|
+
tools.replaceInFileSync(mainTsPath, 'LICENSE_KEY_VALUE', license);
|
|
217
|
+
|
|
218
|
+
tools.logInfo('main.ts content after replacement : ');
|
|
219
|
+
const mainTsContent = tools.getFileContent(mainTsPath);
|
|
220
|
+
console.log(mainTsContent);
|
|
221
|
+
|
|
222
|
+
tools.logSuccess('OK => main.ts replaced');
|
|
199
223
|
}
|
|
200
224
|
|
|
201
225
|
// if options, all options are checked and default modules defs are injected following certain conditions
|
|
@@ -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
|
-
}
|