@eui/tools 4.15.10 → 4.15.14
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 +6 -2
- package/bin/scripts/build-package-sub.js +20 -0
- package/bin/scripts/version.js +12 -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 +213 -3
- package/scripts/csdr/config/global.js +16 -0
- package/scripts/csdr/init/resources/yarn-eui13.lock +15857 -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/app/release-app.js +3 -0
- package/scripts/csdr/release/package/release-package.js +4 -0
- package/scripts/csdr/sync/sync-utils.js +6 -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 +3 -14
- 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/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 +30 -1
- package/scripts/csdr/cli/skeletons/package/frontend-remote/webpack.extra.js +0 -7
|
@@ -1,153 +1,153 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const jiraUtils = require('./jira-utils');
|
|
4
|
-
const metadataUtils = require('../metadata/metadata-utils');
|
|
5
|
-
|
|
6
|
-
const tools = require('../../utils/tools');
|
|
7
|
-
const configUtils = require('../config/config-utils');
|
|
8
|
-
|
|
9
|
-
const { project, appVersion } = tools.getArgs();
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
module.exports.update = () => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
3
|
+
// const jiraUtils = require('./jira-utils');
|
|
4
|
+
// const metadataUtils = require('../metadata/metadata-utils');
|
|
5
|
+
|
|
6
|
+
// const tools = require('../../utils/tools');
|
|
7
|
+
// const configUtils = require('../config/config-utils');
|
|
8
|
+
|
|
9
|
+
// const { project, appVersion } = tools.getArgs();
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
// module.exports.update = () => {
|
|
13
|
+
|
|
14
|
+
// tools.logTitle('Starting jira update');
|
|
15
|
+
|
|
16
|
+
// if (!appVersion || !project) {
|
|
17
|
+
// throw new Error('project and appVersion arguments expected');
|
|
18
|
+
// }
|
|
19
|
+
|
|
20
|
+
// var validIssues;
|
|
21
|
+
|
|
22
|
+
// return Promise.resolve()
|
|
23
|
+
// // cloning metadata repository
|
|
24
|
+
// .then(() => {
|
|
25
|
+
// return metadataUtils.common.cloneMetadataRepo();
|
|
26
|
+
// })
|
|
27
|
+
|
|
28
|
+
// // retrieving build history for version
|
|
29
|
+
// .then(() => {
|
|
30
|
+
// tools.logInfo(`Retrieving project infos for ${project}`);
|
|
31
|
+
|
|
32
|
+
// const prj = configUtils.projects.getCsdrProject(project);
|
|
33
|
+
// console.log(prj);
|
|
34
|
+
// return metadataUtils.appHistory.getMetadata(prj);
|
|
35
|
+
// })
|
|
36
|
+
|
|
37
|
+
// // getting specific version metadata history
|
|
38
|
+
// .then((metadata) => {
|
|
39
|
+
// if (!metadata) {
|
|
40
|
+
// tools.logInfo('No metadata found for project... skipping');
|
|
41
|
+
// process.exit(0);
|
|
42
|
+
// }
|
|
43
|
+
|
|
44
|
+
// tools.logInfo(`Fetching metadata history for version : ${appVersion}`);
|
|
45
|
+
|
|
46
|
+
// // getting the version history for the appVersion provided
|
|
47
|
+
// const versionHistory = metadata.versions.filter((v) => {
|
|
48
|
+
// return v.name === appVersion
|
|
49
|
+
// })[0];
|
|
50
|
+
|
|
51
|
+
// // checking if it contains diffs metadata
|
|
52
|
+
// if (!versionHistory || versionHistory.diffs.length === 0) {
|
|
53
|
+
// tools.logInfo('No history detected for this version ... skipping');
|
|
54
|
+
// process.exit(0);
|
|
55
|
+
|
|
56
|
+
// // proceed to extraction
|
|
57
|
+
// } else {
|
|
58
|
+
// var jiraIssues = [];
|
|
59
|
+
|
|
60
|
+
// versionHistory.diffs.forEach((diffSet) => {
|
|
61
|
+
// diffSet.gitMetadata.forEach((commits) => {
|
|
62
|
+
// commits.forEach((commit) => {
|
|
63
|
+
// if (commit.issue !== '') {
|
|
64
|
+
// jiraIssues.push(commit.issue);
|
|
65
|
+
// }
|
|
66
|
+
// })
|
|
67
|
+
// })
|
|
68
|
+
// })
|
|
69
|
+
|
|
70
|
+
// // remove duplicates
|
|
71
|
+
// jiraIssues = jiraIssues.filter((elem, pos, arr) => {
|
|
72
|
+
// return arr.indexOf(elem) == pos;
|
|
73
|
+
// });
|
|
74
|
+
|
|
75
|
+
// return jiraIssues
|
|
76
|
+
// }
|
|
77
|
+
// })
|
|
78
|
+
|
|
79
|
+
// .then((issues) => {
|
|
80
|
+
// tools.logSuccess('Issues found : ');
|
|
81
|
+
// console.log(issues);
|
|
82
|
+
|
|
83
|
+
// var checkedIssues = [];
|
|
84
|
+
|
|
85
|
+
// return Promise.resolve()
|
|
86
|
+
// .then(() => {
|
|
87
|
+
// return issues.reduce((promise, issue) => {
|
|
88
|
+
// return promise
|
|
89
|
+
// .then(() => jiraUtils.getIssue(issue))
|
|
90
|
+
// .then((response) => {
|
|
91
|
+
// checkedIssues.push({ key: issue, status: 'OK' });
|
|
92
|
+
// tools.logSuccess(`Issue: ${issue} / status OK`);
|
|
93
|
+
// })
|
|
94
|
+
// .catch((e) => {
|
|
95
|
+
// checkedIssues.push({ key: issue, status: e.response.status === 404 ? 'NOT_FOUND' : e.response.status.toString() });
|
|
96
|
+
// tools.logWarning(`Issue: ${issue} / status ${e.response.status}`);
|
|
97
|
+
// console.log(e.response);
|
|
98
|
+
// });
|
|
99
|
+
// }, Promise.resolve());
|
|
100
|
+
// })
|
|
101
|
+
|
|
102
|
+
// // filter existing issues only
|
|
103
|
+
// .then(() => {
|
|
104
|
+
// return checkedIssues.filter((i) => {
|
|
105
|
+
// return i.status === 'OK';
|
|
106
|
+
// });
|
|
107
|
+
// })
|
|
108
|
+
|
|
109
|
+
// .catch((e) => {
|
|
110
|
+
// throw e;
|
|
111
|
+
// })
|
|
112
|
+
// })
|
|
113
|
+
|
|
114
|
+
// // storing for later use
|
|
115
|
+
// .then((issues) => {
|
|
116
|
+
// tools.logInfo('Valid issues found : ');
|
|
117
|
+
|
|
118
|
+
// if (issues.length > 0) {
|
|
119
|
+
// validIssues = issues
|
|
120
|
+
// console.log(validIssues);
|
|
121
|
+
|
|
122
|
+
// } else {
|
|
123
|
+
// console.log('NO valid issues found...skipping');
|
|
124
|
+
// process.exit(0);
|
|
125
|
+
// }
|
|
126
|
+
// })
|
|
127
|
+
|
|
128
|
+
// // create / fetch version
|
|
129
|
+
// // .then(() => {
|
|
130
|
+
// // return jiraUtils.createVersion('MWP', appVersion);
|
|
131
|
+
// // })
|
|
132
|
+
|
|
133
|
+
// // // update issues version
|
|
134
|
+
// // .then(() => {
|
|
135
|
+
// // return validIssues.reduce((promise, issue) => {
|
|
136
|
+
// // return promise
|
|
137
|
+
// // .then(() => jiraUtils.updateIssueVersion(issue.key, appVersion))
|
|
138
|
+
// // .then((response) => {
|
|
139
|
+
// // tools.logSuccess(`${issue} updated with version ${appVersion} => ${response.status}`);
|
|
140
|
+
// // })
|
|
141
|
+
// // .catch((e) => {
|
|
142
|
+
// // tools.logError(`Error updating issue ${issue.key} => ${e.response.status}`);
|
|
143
|
+
// // console.log(e);
|
|
144
|
+
// // });
|
|
145
|
+
// // }, Promise.resolve());
|
|
146
|
+
// // })
|
|
147
|
+
|
|
148
|
+
// .catch((e) => {
|
|
149
|
+
// console.log(e);
|
|
150
|
+
// process.exit(1);
|
|
151
|
+
// })
|
|
152
|
+
// }
|
|
153
153
|
|
|
@@ -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
|
}
|