@eui/tools 4.15.11 → 4.16.0
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 +1 -1
- package/CHANGELOG.md +45 -0
- package/bin/eui-scripts.js +6 -6
- package/bin/scripts/build-package-sub.js +20 -0
- package/bin/scripts/version.js +12 -0
- package/global.test.js +2 -5
- package/package.json +16 -20
- package/sandbox.js +10 -2
- package/scripts/csdr/cli/app.js +30 -3
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/angular-config.json +33 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/dependencies-composite.json +5 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/gitignore_TO_REPLACE +50 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/package.json +6 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/scripts.json +3 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app-routing.module.ts +21 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.html +26 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.component.ts +19 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/app.routes.ts +7 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home-routing.module.ts +15 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.html +7 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.component.ts +8 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/_home/home.module.ts +17 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/app/features/shared/shared.module.ts +15 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/app-metadata.json +8 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/assets/config/env-json-config.json +41 -0
- package/scripts/csdr/cli/skeletons/app-showcase-eui13/src/index.html +22 -0
- package/scripts/csdr/config/angular.js +213 -3
- package/scripts/csdr/config/global.js +16 -0
- package/scripts/csdr/config/packages.js +28 -0
- package/scripts/csdr/init/init-utils.js +37 -0
- package/scripts/csdr/init/init.js +6 -0
- package/scripts/csdr/init/resources/13.x/resolutions.json +15 -0
- package/scripts/csdr/install/build-package.js +0 -84
- package/scripts/csdr/install/common.js +10 -8
- package/scripts/csdr/jira/jira-utils.js +168 -168
- package/scripts/csdr/jira/update.js +150 -150
- package/scripts/csdr/metadata/app-envs.js +34 -33
- package/scripts/csdr/metadata/app-history.js +62 -61
- package/scripts/csdr/metadata/app.js +3 -3
- package/scripts/csdr/metadata/common.js +2 -2
- package/scripts/csdr/metadata/package-history.js +0 -1
- package/scripts/csdr/release/app/release-app.js +3 -0
- package/scripts/csdr/release/package/backend.js +26 -0
- package/scripts/csdr/release/package/common.js +1 -1
- package/scripts/csdr/release/package/release-package.js +8 -0
- package/scripts/csdr/release/package/ui.js +83 -1
- package/scripts/csdr/sync/sync-utils.js +13 -6
- package/scripts/csdr/version/package.js +2 -1
- package/scripts/utils/build/app/build-app-utils.js +2 -2
- package/scripts/utils/build/package/angular.js +4 -4
- package/scripts/utils/build/package/build-package-utils.js +50 -1
- package/scripts/utils/build/package/element.js +5 -16
- package/scripts/utils/build/package/styles.js +100 -7
- package/scripts/utils/confluence-utils.js +126 -126
- package/scripts/utils/index.js +2 -2
- package/scripts/utils/notification/common.js +5 -0
- package/scripts/utils/notification/mail-utils.js +3 -0
- package/scripts/utils/notification/mailstack.js +3 -5
- package/scripts/utils/notification/package.js +0 -2
- package/scripts/utils/notification/slack-utils.js +6 -7
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton/src/_generated/favicon.ico +0 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/app.module.ts +52 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/app/core/reducers/index.ts +40 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/global.ts +4 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/index.ts +8 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/config/modules.ts +4 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.dev.ts +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.prod.ts +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/environments/environment.ts +21 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/favicon.ico +0 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/karma.conf.js +7 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/main.ts +21 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/polyfills.ts +86 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/src/_generated/tst.ts +33 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.app.json +19 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tsconfig.spec.json +9 -0
- package/scripts/utils/pre-build/injection/app-sources-full-skeleton-eui13/tslint.json +17 -0
- package/scripts/utils/pre-build/injection/config.js +29 -30
- package/scripts/utils/pre-build/injection/externals.js +6 -0
- package/scripts/utils/pre-build/injection/skeletons.js +6 -2
- package/scripts/utils/pre-build/projects.js +5 -1
- package/scripts/utils/serve/app.js +6 -3
- package/scripts/utils/tools.js +370 -283
- package/bin/scripts/csdr-jira-update.js +0 -12
- package/bin/scripts/csdr-migrate-package.js +0 -17
- package/bin/scripts/e2e-app.js +0 -62
- package/scripts/migration/eui8-migration.js +0 -94
- package/scripts/migration/migrate-utils.js +0 -191
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// GLOBAL
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const moment = require('moment');
|
|
6
|
-
const sanitizeHtml = require('sanitize-html');
|
|
6
|
+
// const sanitizeHtml = require('sanitize-html');
|
|
7
7
|
|
|
8
8
|
// LOCAL
|
|
9
9
|
const tools = require('../../utils/tools');
|
|
@@ -73,45 +73,46 @@ const storeMetadata = (project, newVersion, metadata, envTarget) => {
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
const envsMetadataToTable = (metadata) => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
Object.entries(metadata).forEach((env) => {
|
|
89
|
-
content += '<tr>';
|
|
90
|
-
content += `<td>${env[0]}</td>`
|
|
91
|
-
content += `<td>${env[1].version}</td>`
|
|
92
|
-
content += `<td>${env[1].releaseDate}</td>`
|
|
93
|
-
content += '</tr>';
|
|
94
|
-
|
|
95
|
-
console.log(`ENVS status : ${env[0]} - ${env[1].version} --> ${env[1].releaseDate}`);
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
content += '</tbody>';
|
|
99
|
-
content += '</table>';
|
|
76
|
+
// const envsMetadataToTable = (metadata) => {
|
|
77
|
+
// return Promise.resolve()
|
|
78
|
+
// .then(() => {
|
|
79
|
+
// let content = '';
|
|
80
|
+
// content += '<h3>Environment status</h3>';
|
|
81
|
+
// content += '<table><thead><tr>';
|
|
82
|
+
// content += '<th>ENV</th>';
|
|
83
|
+
// content += '<th>VERSION</th>';
|
|
84
|
+
// content += '<th>Release date</th>';
|
|
85
|
+
// content += '</tr></thead>';
|
|
86
|
+
// content += '<tbody>';
|
|
100
87
|
|
|
101
|
-
|
|
88
|
+
// Object.entries(metadata).forEach((env) => {
|
|
89
|
+
// content += '<tr>';
|
|
90
|
+
// content += `<td>${env[0]}</td>`
|
|
91
|
+
// content += `<td>${env[1].version}</td>`
|
|
92
|
+
// content += `<td>${env[1].releaseDate}</td>`
|
|
93
|
+
// content += '</tr>';
|
|
102
94
|
|
|
103
|
-
|
|
104
|
-
|
|
95
|
+
// console.log(`ENVS status : ${env[0]} - ${env[1].version} --> ${env[1].releaseDate}`);
|
|
96
|
+
// });
|
|
105
97
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
98
|
+
// content += '</tbody>';
|
|
99
|
+
// content += '</table>';
|
|
100
|
+
|
|
101
|
+
// tools.logSuccess();
|
|
102
|
+
|
|
103
|
+
// // return sanitizeHtml(content);
|
|
104
|
+
// return content;
|
|
105
|
+
// })
|
|
106
|
+
|
|
107
|
+
// .catch((e) => {
|
|
108
|
+
// throw e;
|
|
109
|
+
// })
|
|
110
|
+
// }
|
|
110
111
|
|
|
111
112
|
|
|
112
113
|
|
|
113
114
|
module.exports = {
|
|
114
115
|
getMetadata,
|
|
115
116
|
storeMetadata,
|
|
116
|
-
envsMetadataToTable,
|
|
117
|
+
// envsMetadataToTable,
|
|
117
118
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// GLOBAL
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const execa = require('execa');
|
|
6
|
-
const sanitizeHtml = require('sanitize-html');
|
|
6
|
+
// const sanitizeHtml = require('sanitize-html');
|
|
7
7
|
const moment = require('moment');
|
|
8
8
|
const semver = require('semver');
|
|
9
9
|
|
|
@@ -338,65 +338,66 @@ const generateDiffReport = (project, newVersion, isSupportBranch, envTarget, fro
|
|
|
338
338
|
|
|
339
339
|
|
|
340
340
|
|
|
341
|
-
const historyMetadataToTable = (metadata) => {
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
341
|
+
// const historyMetadataToTable = (metadata) => {
|
|
342
|
+
// tools.logTitle('Generating table from metadata...');
|
|
343
|
+
|
|
344
|
+
// const iSSUES_MANAGER_HOST = configUtils.global.getConfigOptions().iSSUES_MANAGER_HOST;
|
|
345
|
+
|
|
346
|
+
// var content;
|
|
347
|
+
|
|
348
|
+
// if (!metadata.versions) {
|
|
349
|
+
// tools.logWarning('WARNING: no content found');
|
|
350
|
+
// return content;
|
|
351
|
+
// }
|
|
352
|
+
|
|
353
|
+
// content = '';
|
|
354
|
+
// content += '<h3>MyWorkplace MAJOR versions history</h3>';
|
|
355
|
+
// content += '<table><thead><tr>';
|
|
356
|
+
// content += '<th>ENV</th>';
|
|
357
|
+
// content += '<th>VERSION</th>';
|
|
358
|
+
// content += '<th>CONTENT</th>';
|
|
359
|
+
// content += '</tr></thead>';
|
|
360
|
+
// content += '<tbody>';
|
|
361
|
+
|
|
362
|
+
// metadata.versions.reverse().forEach((item) => {
|
|
363
|
+
// content += '<tr>';
|
|
364
|
+
// content += `<td><strong>${item.envTarget}</strong></td>`
|
|
365
|
+
// content += `<td><strong>${item.name}</strong></td>`
|
|
366
|
+
// content += '<td>';
|
|
367
|
+
// if (!item.diffs || item.diffs.length === 0) {
|
|
368
|
+
// content += 'N/A';
|
|
369
|
+
// } else {
|
|
370
|
+
// item.diffs.forEach((diffItem) => {
|
|
371
|
+
// content += `<strong>${diffItem.name}</strong> : from ${diffItem.old} to ${diffItem.new}`
|
|
372
|
+
// content += `<hr />`
|
|
373
|
+
// if (diffItem.gitMetadata.length === 0) {
|
|
374
|
+
// content += 'N/A';
|
|
375
|
+
// } else {
|
|
376
|
+
// diffItem.gitMetadata.forEach((gitCommits) => {
|
|
377
|
+
// gitCommits.forEach((gitCommit) => {
|
|
378
|
+
// if (gitCommit.issue === '') {
|
|
379
|
+
// content += `N/A - ${gitCommit.subject}`;
|
|
380
|
+
// } else {
|
|
381
|
+
// content += `<a href="${iSSUES_MANAGER_HOST}${gitCommit.issue}">${gitCommit.issue}</a> - ${gitCommit.subject}`;
|
|
382
|
+
// }
|
|
383
|
+
// content += `<br />`;
|
|
384
|
+
// })
|
|
385
|
+
// })
|
|
386
|
+
// }
|
|
387
|
+
// content += `<br />`;
|
|
388
|
+
// })
|
|
389
|
+
// }
|
|
390
|
+
// content += '</td>';
|
|
391
|
+
// content += '</tr>';
|
|
392
|
+
// })
|
|
393
|
+
// content += '</tbody>';
|
|
394
|
+
// content += '</table>';
|
|
395
|
+
|
|
396
|
+
// tools.logSuccess();
|
|
397
|
+
|
|
398
|
+
// // return sanitizeHtml(content);
|
|
399
|
+
// return content;
|
|
400
|
+
// }
|
|
400
401
|
|
|
401
402
|
|
|
402
403
|
|
|
@@ -436,7 +437,7 @@ module.exports.getMetadata = getMetadata;
|
|
|
436
437
|
module.exports.storeMetadata = storeMetadata;
|
|
437
438
|
module.exports.getDiffBetweenMajors = getDiffBetweenMajors;
|
|
438
439
|
module.exports.generateDiffReport = generateDiffReport;
|
|
439
|
-
module.exports.historyMetadataToTable = historyMetadataToTable;
|
|
440
|
+
// module.exports.historyMetadataToTable = historyMetadataToTable;
|
|
440
441
|
module.exports.flattenDiffMetadata = flattenDiffMetadata;
|
|
441
442
|
module.exports.flatDiffMetadataToMessage = flatDiffMetadataToMessage;
|
|
442
443
|
module.exports.getDiffBetweenBuildVersions = getDiffBetweenBuildVersions;
|
|
@@ -98,7 +98,7 @@ const storeMetadataAssets = (project, newVersion, packagesDeps, historyMetadata,
|
|
|
98
98
|
|
|
99
99
|
const metadataFile = path.join(project.folder, 'src', 'assets', 'app-metadata.json');
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
tools.logInfo(`Creating ${metadataFile}`);
|
|
102
102
|
console.log(appMetadata);
|
|
103
103
|
|
|
104
104
|
if (!dryRun) {
|
|
@@ -112,7 +112,7 @@ const storeMetadataAssets = (project, newVersion, packagesDeps, historyMetadata,
|
|
|
112
112
|
|
|
113
113
|
const metadataFile = path.join(project.folder, 'src', 'assets', 'app-metadata-history.json');
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
tools.logInfo(`Creating ${metadataFile}`);
|
|
116
116
|
|
|
117
117
|
if (!dryRun && envTarget && envTarget !== 'DEV') {
|
|
118
118
|
return tools.writeJsonFileSync(metadataFile, historyMetadata);
|
|
@@ -160,7 +160,7 @@ const storeMetadataAssetsStandAlone = () => {
|
|
|
160
160
|
|
|
161
161
|
const metadataFile = path.join(prj.folder, 'src', 'assets', 'app-metadata.json');
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
tools.logInfo(`Creating ${metadataFile}`);
|
|
164
164
|
console.log(appMetadata);
|
|
165
165
|
|
|
166
166
|
if (!dryRun) {
|
|
@@ -7,7 +7,7 @@ const path = require('path');
|
|
|
7
7
|
const tools = require('../../utils/tools');
|
|
8
8
|
const gitUtils = require('../../utils/git-utils');
|
|
9
9
|
const configUtils = require('../config/config-utils');
|
|
10
|
-
const confluenceUtils = require('../../utils/confluence-utils');
|
|
10
|
+
// const confluenceUtils = require('../../utils/confluence-utils');
|
|
11
11
|
|
|
12
12
|
// fetching command parameters
|
|
13
13
|
const { dryRun, skipClone } = tools.getArgs();
|
|
@@ -146,7 +146,7 @@ module.exports.isSonarEnabled = () => {
|
|
|
146
146
|
|
|
147
147
|
module.exports.publishMetadata = (project) => {
|
|
148
148
|
|
|
149
|
-
tools.logInfo(`publishMetadata...skipping`);
|
|
149
|
+
tools.logInfo(`publishMetadata...skipping`);
|
|
150
150
|
|
|
151
151
|
// var envsTableContent;
|
|
152
152
|
// var historyTableContent;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// GLOBAL
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
// LOCAL
|
|
7
|
+
const installUtils = require('../../install/install-utils');
|
|
8
|
+
const configUtils = require('../../config/config-utils');
|
|
9
|
+
|
|
10
|
+
module.exports.install = (pkg, isMaster) => {
|
|
11
|
+
return Promise.resolve()
|
|
12
|
+
|
|
13
|
+
// FETCHING CURRENT PACKAGES & INSTALL
|
|
14
|
+
.then(() => {
|
|
15
|
+
// fetch related project if passed as arguments
|
|
16
|
+
const prj = configUtils.projects.getProject();
|
|
17
|
+
|
|
18
|
+
// install the dependencies for current package build
|
|
19
|
+
return installUtils.buildPackage.install(prj, pkg, isMaster);
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
.catch((e) => {
|
|
23
|
+
throw e;
|
|
24
|
+
})
|
|
25
|
+
}
|
|
26
|
+
|
|
@@ -381,7 +381,7 @@ module.exports.sendSuccessNotification = (pkg, version, pkgMetadata) => {
|
|
|
381
381
|
|
|
382
382
|
|
|
383
383
|
module.exports.sendErrorNotification = (pkg, exception, pkgMetadata) => {
|
|
384
|
-
console.log(pkgMetadata);
|
|
384
|
+
// console.log(pkgMetadata);
|
|
385
385
|
|
|
386
386
|
return Promise.resolve()
|
|
387
387
|
.then(() => {
|
|
@@ -14,6 +14,7 @@ const metadataUtils = require('../../metadata/metadata-utils');
|
|
|
14
14
|
const innerCommon = require('./common');
|
|
15
15
|
const innerUi = require('./ui');
|
|
16
16
|
const innerRemote = require('./remote');
|
|
17
|
+
const innerBackend = require('./backend');
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
module.exports.run = () => {
|
|
@@ -36,6 +37,10 @@ module.exports.run = () => {
|
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
return Promise.resolve()
|
|
40
|
+
.then(() => {
|
|
41
|
+
utils.tools.logVersion();
|
|
42
|
+
})
|
|
43
|
+
|
|
39
44
|
|
|
40
45
|
// RELEASE PACKAGE START
|
|
41
46
|
.then(() => {
|
|
@@ -76,6 +81,9 @@ module.exports.run = () => {
|
|
|
76
81
|
if (pkg.remote) {
|
|
77
82
|
return innerRemote.install(pkg, branches.isMaster);
|
|
78
83
|
|
|
84
|
+
} else if (pkg.backend) {
|
|
85
|
+
return innerBackend.install(pkg, branches.isMaster);
|
|
86
|
+
|
|
79
87
|
} else {
|
|
80
88
|
return innerUi.install(pkg, branches.isMaster);
|
|
81
89
|
}
|
|
@@ -7,6 +7,8 @@ const path = require('path');
|
|
|
7
7
|
const installUtils = require('../../install/install-utils');
|
|
8
8
|
const configUtils = require('../../config/config-utils');
|
|
9
9
|
const auditUtils = require('../../audit/audit-utils');
|
|
10
|
+
const notificationUtils = require('../../../utils/notification/notification-utils');
|
|
11
|
+
const tools = require('../../../utils/tools');
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
module.exports.install = (pkg, isMaster) => {
|
|
@@ -24,7 +26,7 @@ module.exports.install = (pkg, isMaster) => {
|
|
|
24
26
|
|
|
25
27
|
// CHECK INTERNAL DEPENDENCIES
|
|
26
28
|
.then(() => {
|
|
27
|
-
return
|
|
29
|
+
return checkDeps(pkg);
|
|
28
30
|
})
|
|
29
31
|
|
|
30
32
|
|
|
@@ -38,3 +40,83 @@ module.exports.install = (pkg, isMaster) => {
|
|
|
38
40
|
throw e;
|
|
39
41
|
})
|
|
40
42
|
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
const checkDeps = (pkg) => {
|
|
46
|
+
tools.logTitle('Checking package internal dependencies');
|
|
47
|
+
|
|
48
|
+
return Promise.resolve()
|
|
49
|
+
.then(() => {
|
|
50
|
+
var depsFound = [];
|
|
51
|
+
var files = glob.sync('**/*.ts', { cwd: pkg.paths.pkgLibFolder, nodir: true, follow: true, dot: true });
|
|
52
|
+
files.forEach(file => {
|
|
53
|
+
const filePath = path.join(pkg.paths.pkgLibFolder, file);
|
|
54
|
+
const fileContent = tools.getFileContent(filePath);
|
|
55
|
+
var regex = /@cc\/|@mywp\/|@opsys\/|@sfc\//gi, result, indices = [];
|
|
56
|
+
while ( (result = regex.exec(fileContent)) ) {
|
|
57
|
+
indices.push(result.index);
|
|
58
|
+
}
|
|
59
|
+
if (indices.length !== 0) {
|
|
60
|
+
// tools.logInfo(`Number of occurences found : ${indices.length}`);
|
|
61
|
+
indices.forEach((i) => {
|
|
62
|
+
const endPos = fileContent.substr(i, 40).indexOf("'");
|
|
63
|
+
const dep = fileContent.substr(i, endPos);
|
|
64
|
+
if (endPos > -1) {
|
|
65
|
+
// tools.logInfo(`dep found on : ${dep}`);
|
|
66
|
+
depsFound.push(dep);
|
|
67
|
+
|
|
68
|
+
} else {
|
|
69
|
+
tools.logInfo(`Potential wrong import detected on file : ${file}`);
|
|
70
|
+
const subContent = fileContent.substr(i, 40);
|
|
71
|
+
const detectMultiSlashes = subContent.match(/\//g);
|
|
72
|
+
if (detectMultiSlashes.length > 0) {
|
|
73
|
+
tools.logError('Multislashes on import : ');
|
|
74
|
+
console.log(subContent);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
depsFound = tools.removeArrayDuplicates(depsFound);
|
|
81
|
+
tools.logWarning(`Dependencies found : ${depsFound.length}`);
|
|
82
|
+
console.log(depsFound);
|
|
83
|
+
|
|
84
|
+
return depsFound;
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
.then((depsFound) => {
|
|
88
|
+
var depsLevel;
|
|
89
|
+
|
|
90
|
+
switch(true) {
|
|
91
|
+
case (depsFound.length === 1):
|
|
92
|
+
depsLevel = 'LOW (1)';
|
|
93
|
+
break;
|
|
94
|
+
case (depsFound.length > 1 && depsFound.length <= 3):
|
|
95
|
+
depsLevel = 'MEDIUM (between 1 and 3)';
|
|
96
|
+
break;
|
|
97
|
+
case (depsFound.length > 3 && depsFound.length <= 5):
|
|
98
|
+
depsLevel = 'HIGH (between 3 and 5)';
|
|
99
|
+
break;
|
|
100
|
+
case (depsFound.length > 5):
|
|
101
|
+
depsLevel = 'VERY HIGH (>5)';
|
|
102
|
+
break;
|
|
103
|
+
default:
|
|
104
|
+
depsLevel = 'NONE';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
var message = `Internal dependencies detected : ${depsFound.length} - deps level: ${depsLevel}\n`;
|
|
108
|
+
message += depsFound.join('\n');
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
return notificationUtils.package.sendPackageMessage({
|
|
112
|
+
package: pkg,
|
|
113
|
+
text: message
|
|
114
|
+
});
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
.catch((e) => {
|
|
118
|
+
console.log(e);
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
}
|
|
122
|
+
|
|
@@ -8,22 +8,26 @@ const configUtils = require('../config/config-utils');
|
|
|
8
8
|
|
|
9
9
|
const tools = require('../../utils/tools');
|
|
10
10
|
|
|
11
|
+
const { skipPull } = tools.getArgs();
|
|
12
|
+
|
|
11
13
|
module.exports.sync = () => {
|
|
12
14
|
return Promise.resolve()
|
|
13
15
|
.then(() => {
|
|
14
16
|
tools.logInfo('Resetting package.json');
|
|
15
17
|
return tools.copy(path.join(process.cwd(), '.csdr', 'package.json.reset'), path.join(process.cwd(), 'package.json'));
|
|
16
18
|
})
|
|
17
|
-
.then(() => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})
|
|
19
|
+
// .then(() => {
|
|
20
|
+
// tools.logInfo('Removing yarn.lock');
|
|
21
|
+
// return tools.remove(path.join(process.cwd(), 'yarn.lock'));
|
|
22
|
+
// })
|
|
21
23
|
.then(() => {
|
|
22
24
|
tools.logSuccess();
|
|
23
25
|
})
|
|
24
26
|
.then(() => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
if (!skipPull) {
|
|
28
|
+
tools.logInfo(`Pulling root folder ...`);
|
|
29
|
+
return execa.shellSync(`git pull`, { cwd: path.join(process.cwd()), stdio: 'inherit' });
|
|
30
|
+
}
|
|
27
31
|
})
|
|
28
32
|
.then(() => {
|
|
29
33
|
tools.logSuccess();
|
|
@@ -49,6 +53,9 @@ module.exports.sync = () => {
|
|
|
49
53
|
.then(() => {
|
|
50
54
|
return initUtils.meta.init();
|
|
51
55
|
})
|
|
56
|
+
.then(() => {
|
|
57
|
+
return initUtils.processLocalEuiVersions();
|
|
58
|
+
})
|
|
52
59
|
.catch((e) => {
|
|
53
60
|
throw e;
|
|
54
61
|
})
|
|
@@ -37,8 +37,9 @@ const getCurrentVersion = (pkg) => {
|
|
|
37
37
|
// by default maven java backend is taken into account
|
|
38
38
|
} else {
|
|
39
39
|
tools.logInfo('Backend => extracting pom.xml');
|
|
40
|
-
|
|
41
40
|
const xmlContent = tools.getXMLJsContent(path.join(pkg.paths.pkgDirectory, 'pom.xml'));
|
|
41
|
+
|
|
42
|
+
tools.logInfo('Content found:');
|
|
42
43
|
console.log(xmlContent);
|
|
43
44
|
|
|
44
45
|
currentVersion = xmlContent.project.version.toString();
|
|
@@ -120,7 +120,7 @@ module.exports.angular = (envTarget, isSnapshot, version) => {
|
|
|
120
120
|
|
|
121
121
|
tools.logInfo(`ng test : watching = ${watch || false}`);
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
tools.logInfo(`running Angular TEST with args: ${args} on :`);
|
|
124
124
|
console.log(currentProject.paths.angularPath);
|
|
125
125
|
|
|
126
126
|
if (!dryRun) {
|
|
@@ -204,7 +204,7 @@ module.exports.angular = (envTarget, isSnapshot, version) => {
|
|
|
204
204
|
|
|
205
205
|
tools.logInfo(`ng build for configuration : ${configuration || 'production'}`);
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
tools.logInfo(`running Angular BUILD with args: ${args} on :`);
|
|
208
208
|
console.log(currentProject.paths.angularPath);
|
|
209
209
|
|
|
210
210
|
if (!dryRun && !skipCompile) {
|
|
@@ -65,11 +65,11 @@ module.exports.build = (pkg, isMaster) => {
|
|
|
65
65
|
tools.logInfo('Linting...');
|
|
66
66
|
|
|
67
67
|
let tsLintPath;
|
|
68
|
-
if (pkg.build && pkg.build.euiVersion && pkg.build.euiVersion === '
|
|
69
|
-
|
|
70
|
-
} else {
|
|
68
|
+
// if (pkg.build && pkg.build.euiVersion && pkg.build.euiVersion === '>7.x') {
|
|
69
|
+
// tsLintPath = path.join(pkg.paths.pkgRootDirectory, 'tslint-eui-next.json');
|
|
70
|
+
// } else {
|
|
71
71
|
tsLintPath = path.join(pkg.paths.pkgRootDirectory, 'tslint.json');
|
|
72
|
-
}
|
|
72
|
+
// }
|
|
73
73
|
const tsConfigPath = path.join(pkg.paths.pkgRootDirectory, 'tsconfig.lib.json');
|
|
74
74
|
tools.logInfo(`running tslint -c ${tsLintPath} -p ${tsConfigPath}`);
|
|
75
75
|
return tools.runScript(`tslint -c ${tsLintPath} -p ${tsConfigPath} -t verbose`);
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
// GLOBAL
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const glob = require('glob');
|
|
6
|
+
const execa = require('execa');
|
|
6
7
|
|
|
7
8
|
// LOCAL
|
|
8
9
|
const tools = require('../../tools');
|
|
9
10
|
const configUtils = require('../../../csdr/config/config-utils');
|
|
10
|
-
const notificationUtils = require('../../notification/notification-utils');
|
|
11
11
|
|
|
12
12
|
// INNER MODULES
|
|
13
13
|
const innerNodeJs = require('./nodeJs');
|
|
@@ -188,3 +188,52 @@ module.exports.postBuild = (pkg) => {
|
|
|
188
188
|
})
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
+
|
|
192
|
+
module.exports.buildSubEntry = (pkg, subEntry) => {
|
|
193
|
+
return Promise.resolve()
|
|
194
|
+
.then(() => {
|
|
195
|
+
tools.logInfo(`Building sub-entry : ${subEntry} of package : ${pkg.name}`);
|
|
196
|
+
// console.log(pkg);
|
|
197
|
+
return tools.getFilesGlob(pkg.paths.pkgRootDirectory, `**/package.json`);
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
.then((files) => {
|
|
201
|
+
// console.log(files);
|
|
202
|
+
|
|
203
|
+
if (files.length === 0) {
|
|
204
|
+
tools.logWarning(`no sub-entries found within package ${pkg.name}`);
|
|
205
|
+
return;
|
|
206
|
+
|
|
207
|
+
} else {
|
|
208
|
+
let subEntryPath = files.filter((f) => {
|
|
209
|
+
return f.indexOf(subEntry) > -1;
|
|
210
|
+
})[0];
|
|
211
|
+
|
|
212
|
+
if (!subEntryPath) {
|
|
213
|
+
tools.logWarning(`${subEntry} can't be found in sub-folders of package (must contains package.json file for sub-entry definition)`);
|
|
214
|
+
return;
|
|
215
|
+
|
|
216
|
+
} else {
|
|
217
|
+
subEntryPath = subEntryPath.replace('/package.json', '');
|
|
218
|
+
tools.logInfo(`${subEntryPath} found... injecting angular.json for sub entry`);
|
|
219
|
+
|
|
220
|
+
return configUtils.angular.registerAngularPackageSubEntry(subEntry, subEntryPath);
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
})
|
|
224
|
+
|
|
225
|
+
.then(() => {
|
|
226
|
+
const ng = path.resolve(process.cwd(), 'node_modules', '@angular', 'cli', 'bin', 'ng');
|
|
227
|
+
|
|
228
|
+
let args = ['--max_old_space_size=8096', ng, 'build', subEntry];
|
|
229
|
+
|
|
230
|
+
return execa('node', args, { cwd: pkg.paths.pkgRootDirectory, stdio: 'inherit' });
|
|
231
|
+
})
|
|
232
|
+
|
|
233
|
+
.then(() => {
|
|
234
|
+
tools.logSuccess();
|
|
235
|
+
})
|
|
236
|
+
.catch((e) => {
|
|
237
|
+
throw e;
|
|
238
|
+
})
|
|
239
|
+
}
|
|
@@ -24,20 +24,9 @@ module.exports.build = (pkg, isMaster) => {
|
|
|
24
24
|
.then(() => {
|
|
25
25
|
tools.logTitle(`Building element : ${pkg.name}...`);
|
|
26
26
|
|
|
27
|
-
//
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
skipLint = true;
|
|
31
|
-
}
|
|
32
|
-
if (pkg.build.skipTest) {
|
|
33
|
-
skipTest = true;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// if (isMaster) {
|
|
38
|
-
// skipLint = true;
|
|
39
|
-
// skipTest = true;
|
|
40
|
-
// }
|
|
27
|
+
// force skipLint and skipTest on element
|
|
28
|
+
skipLint = true;
|
|
29
|
+
skipTest = true;
|
|
41
30
|
})
|
|
42
31
|
|
|
43
32
|
.then(() => {
|
|
@@ -102,7 +91,7 @@ module.exports.build = (pkg, isMaster) => {
|
|
|
102
91
|
|
|
103
92
|
tools.logInfo(`ng test : watching = ${watch || false}`);
|
|
104
93
|
|
|
105
|
-
|
|
94
|
+
tools.logInfo(`running Angular TEST with args: ${args} on`);
|
|
106
95
|
console.log(pkg.paths.pkgRootDirectory);
|
|
107
96
|
|
|
108
97
|
if (!dryRun) {
|
|
@@ -151,7 +140,7 @@ module.exports.build = (pkg, isMaster) => {
|
|
|
151
140
|
|
|
152
141
|
tools.logInfo(`ng build for configuration : ${configuration || 'production'}`);
|
|
153
142
|
|
|
154
|
-
|
|
143
|
+
tools.logInfo(`running Angular BUILD with args: ${args} on`);
|
|
155
144
|
console.log(pkg.paths.pkgRootDirectory);
|
|
156
145
|
|
|
157
146
|
if (!dryRun) {
|