@eui/tools 4.15.8 → 4.15.12
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 +41 -0
- package/bin/eui-scripts.js +2 -0
- package/bin/scripts/build-package-sub.js +20 -0
- package/global.test.js +3 -3
- package/package.json +12 -16
- package/sandbox.js +3 -2
- package/scripts/csdr/cli/app.js +30 -3
- package/scripts/csdr/cli/package.js +41 -5
- 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/cli/skeletons/package/frontend-eui10/assets/i18n/en.json +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/assets/i18n/fr.json +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/gitignore_TO_REPLACE +46 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/karma.conf.js +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/ng-package.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/package.json +4 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/index.ts +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/lib/module.ts +11 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/src/test.ts.TO_REPLACE +21 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/tsconfig.lib.json +32 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/tsconfig.spec.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend-eui10/tslint.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/angular.json +3 -3
- package/scripts/csdr/cli/skeletons/package/frontend-remote/dependencies-composite.json +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/dummy.scss +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/dummy.spec.ts +6 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.component.ts +62 -28
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.ts +33 -33
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/routing.module.ts +22 -10
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/assets/i18n-compiled/en.json +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/assets/i18n-compiled/fr.json +1 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/config/global.ts +8 -5
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/index.html +1 -1
- package/scripts/csdr/cli/skeletons/package/frontend-remote/tsconfig.app.json +3 -1
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/angular.json +90 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/browserslist +10 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-base.json +2 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/dependencies-composite.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/gitignore_TO_REPLACE +64 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/karma.conf.js +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/package.json_TO_REPLACE +8 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/dummy.scss +3 -0
- package/scripts/csdr/cli/skeletons/package/{frontend-remote/src/app/dummy.spec.ts.TO_REPLACE → frontend-remote-eui10/src/app/dummy.spec.ts} +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.component.ts +71 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.ts +165 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/reducers/custom-route-serializer.ts +28 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/reducers/index.ts +42 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/routing.module.ts +51 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/assets/.gitkeep +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/global.ts +31 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/index.ts +20 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/modules.ts +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/environments/environment.prod.ts +3 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/environments/environment.ts +15 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/favicon.ico +0 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/index.html +10 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/main.ts +12 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/polyfills.ts +86 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/test.ts.TO_REPLACE +20 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tsconfig.app.json +20 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tsconfig.spec.json +18 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tslint-remote.json +7 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/tslint.json +17 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/webpack.extra.js +15 -0
- package/scripts/csdr/config/angular.js +220 -10
- package/scripts/csdr/config/global.js +16 -0
- package/scripts/csdr/install/common.js +26 -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/common.js +44 -41
- package/scripts/csdr/metadata/package-history.js +0 -1
- package/scripts/csdr/release/package/remote.js +3 -3
- package/scripts/csdr/release/package/ui.js +3 -3
- package/scripts/csdr/sync/sync-utils.js +6 -2
- package/scripts/utils/build/package/build-package-utils.js +45 -0
- package/scripts/utils/build/package/styles.js +106 -7
- package/scripts/utils/confluence-utils.js +126 -126
- package/scripts/utils/index.js +2 -2
- 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/skeletons.js +6 -2
- package/scripts/utils/pre-build/projects.js +5 -1
- package/scripts/utils/tools.js +13 -0
- package/scripts/csdr/cli/skeletons/package/frontend-remote/webpack.extra.js +0 -7
|
@@ -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;
|
|
@@ -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();
|
|
@@ -145,45 +145,48 @@ module.exports.isSonarEnabled = () => {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
module.exports.publishMetadata = (project) => {
|
|
148
|
-
var envsTableContent;
|
|
149
|
-
var historyTableContent;
|
|
150
148
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
149
|
+
tools.logInfo(`publishMetadata...skipping`);
|
|
150
|
+
|
|
151
|
+
// var envsTableContent;
|
|
152
|
+
// var historyTableContent;
|
|
153
|
+
|
|
154
|
+
// if (!project.confluencePageId) {
|
|
155
|
+
// tools.logWarning(`WARNING - project ${project.name} has NO Confluence page id defined`);
|
|
156
|
+
|
|
157
|
+
// } else {
|
|
158
|
+
|
|
159
|
+
// return Promise.resolve()
|
|
160
|
+
|
|
161
|
+
// // generate history metadata table
|
|
162
|
+
// .then(() => {
|
|
163
|
+
// return innerAppHistory.getMetadata(project);
|
|
164
|
+
// })
|
|
165
|
+
// .then((historyMetadata) => {
|
|
166
|
+
// return innerAppHistory.historyMetadataToTable(historyMetadata);
|
|
167
|
+
// })
|
|
168
|
+
// .then((tableContent) => {
|
|
169
|
+
// historyTableContent = tableContent;
|
|
170
|
+
// })
|
|
171
|
+
|
|
172
|
+
// // generate envs metadata table
|
|
173
|
+
// .then(() => {
|
|
174
|
+
// return innerAppEnvs.getMetadata(project);
|
|
175
|
+
// })
|
|
176
|
+
// .then((envsMetadata) => {
|
|
177
|
+
// return innerAppEnvs.envsMetadataToTable(envsMetadata);
|
|
178
|
+
// })
|
|
179
|
+
// .then((tableContent) => {
|
|
180
|
+
// envsTableContent = tableContent;
|
|
181
|
+
// })
|
|
182
|
+
|
|
183
|
+
// .then(() => {
|
|
184
|
+
// if (envsTableContent !== '' || historyTableContent !== '') {
|
|
185
|
+
// return confluenceUtils.updatePageContent(project.confluencePageId, envsTableContent + '\n' + historyTableContent);
|
|
186
|
+
// }
|
|
187
|
+
// })
|
|
188
|
+
// .catch((e) => {
|
|
189
|
+
// throw e;
|
|
190
|
+
// })
|
|
191
|
+
// }
|
|
189
192
|
}
|
|
@@ -8,6 +8,8 @@ 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(() => {
|
|
@@ -22,8 +24,10 @@ module.exports.sync = () => {
|
|
|
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();
|
|
@@ -188,3 +188,48 @@ 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
|
+
|
|
227
|
+
})
|
|
228
|
+
|
|
229
|
+
.then(() => {
|
|
230
|
+
tools.logSuccess();
|
|
231
|
+
})
|
|
232
|
+
.catch((e) => {
|
|
233
|
+
throw e;
|
|
234
|
+
})
|
|
235
|
+
}
|
|
@@ -10,10 +10,11 @@ const tools = require('../../tools');
|
|
|
10
10
|
const notificationUtils = require('../../notification/notification-utils');
|
|
11
11
|
|
|
12
12
|
// FETCH ARGS
|
|
13
|
-
let {
|
|
13
|
+
let { skipCompile } = tools.getArgs();
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
const
|
|
16
|
+
const compileSassFileNodeSass = (folder, filename, isNodeSassTildeImporterActive) => {
|
|
17
|
+
|
|
17
18
|
const filePath = path.join(folder, 'styles', filename);
|
|
18
19
|
|
|
19
20
|
tools.logInfo(`Compiling ${filePath}.scss...`);
|
|
@@ -92,6 +93,102 @@ const compileSassFile = (folder, filename, isNodeSassTildeImporterActive) => {
|
|
|
92
93
|
|
|
93
94
|
|
|
94
95
|
|
|
96
|
+
const compileSassFileDartSass = (folder, filename) => {
|
|
97
|
+
const filePath = path.join(folder, 'styles', filename);
|
|
98
|
+
|
|
99
|
+
tools.logInfo(`Compiling ${filePath}.scss...`);
|
|
100
|
+
|
|
101
|
+
return Promise.resolve()
|
|
102
|
+
.then(() => {
|
|
103
|
+
tools.logInfo('Compiling SCSS...');
|
|
104
|
+
|
|
105
|
+
const sass = require('sass');
|
|
106
|
+
|
|
107
|
+
return sass.renderSync({
|
|
108
|
+
file: filePath + '.scss',
|
|
109
|
+
outFile: filePath + '.temp.css',
|
|
110
|
+
sourceMap: true,
|
|
111
|
+
sourceMapContents: true,
|
|
112
|
+
sourceMapEmbed: true,
|
|
113
|
+
includePaths: [
|
|
114
|
+
path.resolve(process.cwd(), 'node_modules'),
|
|
115
|
+
],
|
|
116
|
+
});
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
.then((sassResult) => {
|
|
120
|
+
const finalDest = filePath + '.css';
|
|
121
|
+
|
|
122
|
+
const cssnano = require('cssnano');
|
|
123
|
+
const autoprefixer = require('autoprefixer');
|
|
124
|
+
const postcss = require('postcss');
|
|
125
|
+
|
|
126
|
+
const plugins = [];
|
|
127
|
+
|
|
128
|
+
plugins.push(autoprefixer({
|
|
129
|
+
grid: 'no-autoplace',
|
|
130
|
+
// browsers: [
|
|
131
|
+
// "> 0.5% in alt-eu",
|
|
132
|
+
// "last 2 version",
|
|
133
|
+
// "not dead",
|
|
134
|
+
// "not op_mini all"
|
|
135
|
+
// ]
|
|
136
|
+
}));
|
|
137
|
+
plugins.push(cssnano({ safe: true }));
|
|
138
|
+
|
|
139
|
+
return postcss(plugins)
|
|
140
|
+
.process(sassResult.css, {
|
|
141
|
+
map: { inline: false, prev: sassResult.map.toString() },
|
|
142
|
+
from: filePath + '.scss',
|
|
143
|
+
to: finalDest,
|
|
144
|
+
})
|
|
145
|
+
.then((postcssResult) => {
|
|
146
|
+
// fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
147
|
+
fs.writeFileSync(finalDest, postcssResult.css);
|
|
148
|
+
|
|
149
|
+
if (postcssResult.map) {
|
|
150
|
+
fs.writeFileSync(`${finalDest}.map`, postcssResult.map);
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
.then((output) => {
|
|
156
|
+
// console.log(output);
|
|
157
|
+
console.log('Size ::: ' + fs.statSync(filePath + '.css').size);
|
|
158
|
+
|
|
159
|
+
tools.logSuccess(`OK ==> generated ${filePath}.css`);
|
|
160
|
+
})
|
|
161
|
+
|
|
162
|
+
.then(() => {
|
|
163
|
+
tools.remove(filePath + '.temp.css');
|
|
164
|
+
tools.remove(filePath + '.temp.css.map');
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
.catch((e) => {
|
|
168
|
+
console.log(e);
|
|
169
|
+
throw e;
|
|
170
|
+
})
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
const compileSassFile = (pkg, folder, filename, isNodeSassTildeImporterActive) => {
|
|
176
|
+
return Promise.resolve()
|
|
177
|
+
.then(() => {
|
|
178
|
+
if (pkg.build && pkg.build.euiVersion === '13.x') {
|
|
179
|
+
return compileSassFileDartSass(folder, filename);
|
|
180
|
+
} else {
|
|
181
|
+
return compileSassFileNodeSass(folder, filename, isNodeSassTildeImporterActive);
|
|
182
|
+
}
|
|
183
|
+
})
|
|
184
|
+
|
|
185
|
+
.catch((e) => {
|
|
186
|
+
console.log(e);
|
|
187
|
+
throw e;
|
|
188
|
+
})
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
|
|
95
192
|
|
|
96
193
|
module.exports.build = (pkg) => {
|
|
97
194
|
tools.logInfo('Building STYLES package...');
|
|
@@ -123,9 +220,12 @@ module.exports.build = (pkg) => {
|
|
|
123
220
|
console.log('Sources copy succeeded.')
|
|
124
221
|
})
|
|
125
222
|
.then(() => Promise.resolve().then(() => {
|
|
223
|
+
tools.logInfo('Processing stylesheets entries : ');
|
|
224
|
+
console.log(pkg.stylesheets);
|
|
225
|
+
|
|
126
226
|
return pkg.stylesheets.reduce((promise, file) => {
|
|
127
227
|
return promise.then(() => (
|
|
128
|
-
compileSassFile(tmpFolder, file, pkg.build && pkg.build.isNodeSassTildeImporterActive)
|
|
228
|
+
compileSassFile(pkg, tmpFolder, file, pkg.build && pkg.build.isNodeSassTildeImporterActive)
|
|
129
229
|
)).catch((e) => {
|
|
130
230
|
console.log(e);
|
|
131
231
|
throw e;
|
|
@@ -150,6 +250,9 @@ module.exports.build = (pkg) => {
|
|
|
150
250
|
tools.copy(path.join(pkg.paths.pkgRootDirectory, 'README.md'), path.join(pkg.paths.pkgBuild, 'README.md'));
|
|
151
251
|
tools.copy(path.join(pkg.paths.pkgRootDirectory, 'LICENSE'), path.join(pkg.paths.pkgBuild, 'LICENSE'));
|
|
152
252
|
})
|
|
253
|
+
.then(() => {
|
|
254
|
+
return tools.rimraf(tmpFolder);
|
|
255
|
+
})
|
|
153
256
|
.then(() => {
|
|
154
257
|
return notificationUtils.package.sendPackageMessage({
|
|
155
258
|
package: pkg
|
|
@@ -162,7 +265,3 @@ module.exports.build = (pkg) => {
|
|
|
162
265
|
}
|
|
163
266
|
}
|
|
164
267
|
|
|
165
|
-
// EXPORTS
|
|
166
|
-
module.exports.compileSassFile = compileSassFile;
|
|
167
|
-
|
|
168
|
-
|