@eui/tools 4.16.6 → 4.17.3
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 +54 -0
- package/global.test.js +0 -2
- package/package.json +1 -2
- package/sandbox.js +23 -1
- package/scripts/csdr/cli/package.js +55 -7
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.ts +16 -11
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/routing.module.ts +4 -2
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/config/global.ts +2 -4
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/package.json_TO_REPLACE +1 -1
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.ts +16 -12
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/routing.module.ts +4 -2
- package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/global.ts +2 -2
- package/scripts/csdr/config/angular.js +2 -24
- package/scripts/csdr/config/global.js +10 -6
- package/scripts/csdr/config/packages.js +6 -0
- package/scripts/csdr/config/sync.js +6 -3
- package/scripts/csdr/init/init-utils.js +7 -0
- package/scripts/csdr/init/resources/13.x/yarn.lock +14907 -0
- package/scripts/csdr/install/build-package.js +11 -3
- package/scripts/csdr/install/common.js +2 -0
- package/scripts/csdr/install/composite-utils.js +2 -0
- package/scripts/csdr/install/local-dev.js +2 -0
- package/scripts/csdr/install/remote.js +13 -9
- package/scripts/csdr/metadata/app.js +44 -4
- package/scripts/csdr/metadata/common.js +0 -48
- package/scripts/csdr/metadata/package.js +23 -0
- package/scripts/csdr/release/app/release-app.js +0 -13
- package/scripts/csdr/release/package/common.js +20 -0
- package/scripts/csdr/release/package/release-package.js +10 -1
- package/scripts/csdr/release/package/remote.js +2 -17
- package/scripts/csdr/version/package.js +1 -1
- package/scripts/utils/build/package/angular.js +4 -30
- package/scripts/utils/git-utils.js +24 -7
- package/scripts/utils/index.js +0 -2
- package/scripts/utils/pre-build/elements.js +7 -3
- package/scripts/utils/pre-build/injection/externals.js +59 -2
- package/scripts/utils/pre-build/projects.js +0 -7
- package/scripts/utils/pre-build/translations/elements.js +0 -6
- package/scripts/utils/confluence-utils.js +0 -126
- package/scripts/utils/pre-build/translations/common.js +0 -0
|
@@ -121,6 +121,64 @@ module.exports.injectExternalAppSources = (project) => {
|
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
|
|
124
|
+
module.exports.injectElementExternalSources = (pkg) => {
|
|
125
|
+
|
|
126
|
+
tools.logInfo(`Injecting package external sources for : ${pkg.name}`);
|
|
127
|
+
|
|
128
|
+
return Promise.resolve()
|
|
129
|
+
.then(() => {
|
|
130
|
+
if (!pkg.externalSources) {
|
|
131
|
+
tools.logInfo('No external sources setup...skipping');
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
if (!pkg.externalSources.npmPkg || !pkg.externalSources.folder) {
|
|
136
|
+
return tools.logWarning('External sources use requires a source [npmPkg] and a [folder] declared');
|
|
137
|
+
|
|
138
|
+
} else {
|
|
139
|
+
// check if package is locally cloned
|
|
140
|
+
const localPackage = configUtils.packages.getPackages().filter((p) => {
|
|
141
|
+
return p.npmPkg === pkg.externalSources.npmPkg
|
|
142
|
+
})[0];
|
|
143
|
+
|
|
144
|
+
let externalSourcesSrcPath;
|
|
145
|
+
const pkgSrcPath = path.join(process.cwd(), pkg.folder, 'src');
|
|
146
|
+
|
|
147
|
+
// if local package is found
|
|
148
|
+
if (localPackage) {
|
|
149
|
+
tools.logInfo('local pkg found, copying from local');
|
|
150
|
+
externalSourcesSrcPath = path.join(process.cwd(), 'packages', localPackage.name, pkg.externalSources.folder);
|
|
151
|
+
|
|
152
|
+
// if not sources are taken from the npm package def in node_modules
|
|
153
|
+
} else {
|
|
154
|
+
tools.logInfo('remote pkg found, copying from remote');
|
|
155
|
+
const npmPkgScope = pkg.externalSources.npmPkg.substr(0, pkg.externalSources.npmPkg.indexOf('/'));
|
|
156
|
+
const npmPkgName = pkg.externalSources.npmPkg.substr(pkg.externalSources.npmPkg.indexOf('/') + 1);
|
|
157
|
+
|
|
158
|
+
externalSourcesSrcPath = path.join(process.cwd(), 'node_modules', npmPkgScope, npmPkgName, pkg.externalSources.folder);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (!tools.isDirExists(externalSourcesSrcPath)) {
|
|
162
|
+
tools.logWarning(`External sources location : ${externalSourcesSrcPath} cannot be found in node_modules`);
|
|
163
|
+
throw new Error('External sources not found');
|
|
164
|
+
|
|
165
|
+
} else {
|
|
166
|
+
tools.logInfo(`Removing ${pkgSrcPath} content`);
|
|
167
|
+
tools.rmdirFull(pkgSrcPath, false);
|
|
168
|
+
|
|
169
|
+
tools.logInfo(`${externalSourcesSrcPath} injecting in ${pkgSrcPath}`);
|
|
170
|
+
return tools.copydir(externalSourcesSrcPath, pkgSrcPath, true);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
})
|
|
174
|
+
|
|
175
|
+
.catch((e) => {
|
|
176
|
+
throw e;
|
|
177
|
+
})
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
124
182
|
module.exports.injectExternalMock = (project) => {
|
|
125
183
|
|
|
126
184
|
tools.logInfo(`Injecting project external mock for : ${project.name}`);
|
|
@@ -183,7 +241,7 @@ module.exports.remapRoutesByEnvConfig = (project, envTarget, build) => {
|
|
|
183
241
|
|
|
184
242
|
// checking is routes path declared
|
|
185
243
|
if (!project.appSources.routesFilePath) {
|
|
186
|
-
tools.logError('project appSources.routesFilePath is not declared in
|
|
244
|
+
tools.logError('project appSources.routesFilePath is not declared in app config');
|
|
187
245
|
return;
|
|
188
246
|
}
|
|
189
247
|
|
|
@@ -198,7 +256,6 @@ module.exports.remapRoutesByEnvConfig = (project, envTarget, build) => {
|
|
|
198
256
|
let routesFileContent = tools.getFileContent(routesFilePath);
|
|
199
257
|
routesRemapping.forEach((route) => {
|
|
200
258
|
tools.logInfo(`checking replacement for : ${JSON.stringify(route)}`);
|
|
201
|
-
// const tokenToSearch = `@${route.featureModule}.routeModuleDef@`;
|
|
202
259
|
const tokenToSearch = `./features/${route.featureModule}-lib.module#Module`;
|
|
203
260
|
if (routesFileContent.indexOf(tokenToSearch) > -1) {
|
|
204
261
|
tools.logInfo(`token ${tokenToSearch} found...replacing`);
|
|
@@ -88,10 +88,6 @@ module.exports.preBuild = (project, envTarget, build) => {
|
|
|
88
88
|
tools.logInfo('Executing scripts files replacement for openId Connect');
|
|
89
89
|
|
|
90
90
|
let rootTargetFolder = 'src';
|
|
91
|
-
// if (build) {
|
|
92
|
-
// rootTargetFolder = 'dist';
|
|
93
|
-
// }
|
|
94
|
-
|
|
95
91
|
tools.logInfo(`Copying node_modules/oidc-client/dist/oidc-client.min.js to ${rootTargetFolder}/assets/oidc-client.min.js`);
|
|
96
92
|
tools.copy(
|
|
97
93
|
path.join(process.cwd(), 'node_modules/oidc-client/dist/oidc-client.min.js'),
|
|
@@ -140,9 +136,6 @@ module.exports.injectAppConfig = (project, configEnvTarget, build) => {
|
|
|
140
136
|
}
|
|
141
137
|
|
|
142
138
|
let rootTargetFolder = 'src';
|
|
143
|
-
// if (build) {
|
|
144
|
-
// rootTargetFolder = 'dist';
|
|
145
|
-
// }
|
|
146
139
|
tools.logInfo(`Replacing default ${rootTargetFolder}/assets/openid-login-config.json file by ${envFilePath} content`);
|
|
147
140
|
tools.copy(envFilePath, path.join(project.paths.angularPath, `${rootTargetFolder}/assets/openid-login-config.json`));
|
|
148
141
|
|
|
@@ -56,12 +56,6 @@ module.exports.generate = (inputScopes = '', inputPkg) => {
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
// configUtils.packages.getPackages().forEach((pkg) => {
|
|
60
|
-
// const localPath = configUtils.packages.getPackagePaths(pkg).pkgRootDirectory;
|
|
61
|
-
// console.log(localPath);
|
|
62
|
-
// packages.push(localPath);
|
|
63
|
-
// })
|
|
64
|
-
|
|
65
59
|
tools.logInfo(`langs: ${langs}`);
|
|
66
60
|
tools.logInfo(`dest folder: ${destFolder}`);
|
|
67
61
|
tools.logInfo(`total packages: ${packages.length}`);
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
// 'use strict';
|
|
2
|
-
|
|
3
|
-
// var Confluence = require("confluence-api");
|
|
4
|
-
|
|
5
|
-
// const tools = require('./tools');
|
|
6
|
-
// const configUtils = require('../csdr/config/config-utils');
|
|
7
|
-
|
|
8
|
-
// const { jiraUser, jiraPassword, dryRun } = tools.getArgs();
|
|
9
|
-
|
|
10
|
-
// const updatePageContent = (pageId, pageContent) => {
|
|
11
|
-
|
|
12
|
-
// const config = configUtils.global.getConfig();
|
|
13
|
-
|
|
14
|
-
// const confluenceHost = config.confluence && config.confluence.host;
|
|
15
|
-
// const confluenceProjectName = config.confluence && config.confluence.projectName;
|
|
16
|
-
|
|
17
|
-
// const confluenceConfig = {
|
|
18
|
-
// username: jiraUser,
|
|
19
|
-
// password: jiraPassword,
|
|
20
|
-
// baseUrl: confluenceHost,
|
|
21
|
-
// version: 6 // Confluence major version, optional
|
|
22
|
-
// };
|
|
23
|
-
|
|
24
|
-
// tools.logTitle('Update confluence DEVOPS page...');
|
|
25
|
-
|
|
26
|
-
// if (dryRun) {
|
|
27
|
-
// return Promise.resolve();
|
|
28
|
-
// }
|
|
29
|
-
|
|
30
|
-
// var confluence = new Confluence(confluenceConfig);
|
|
31
|
-
|
|
32
|
-
// return Promise.resolve()
|
|
33
|
-
// .then(() => {
|
|
34
|
-
// return new Promise((resolve, reject) => {
|
|
35
|
-
// confluence.getContentById(
|
|
36
|
-
// pageId
|
|
37
|
-
// , function (err, response) {
|
|
38
|
-
// if (err) {
|
|
39
|
-
// return reject(err);
|
|
40
|
-
// } else {
|
|
41
|
-
// return resolve(response);
|
|
42
|
-
// }
|
|
43
|
-
// })
|
|
44
|
-
// })
|
|
45
|
-
// })
|
|
46
|
-
// .then((content) => {
|
|
47
|
-
// const newVersion = content.version.number + 1;
|
|
48
|
-
|
|
49
|
-
// return new Promise((resolve, reject) => {
|
|
50
|
-
// confluence.putContent(
|
|
51
|
-
// confluenceProjectName,
|
|
52
|
-
// pageId,
|
|
53
|
-
// newVersion,
|
|
54
|
-
// content.title,
|
|
55
|
-
// pageContent
|
|
56
|
-
// , function (err, response) {
|
|
57
|
-
// if (err) {
|
|
58
|
-
// return reject(err);
|
|
59
|
-
// } else {
|
|
60
|
-
// return resolve(response);
|
|
61
|
-
// }
|
|
62
|
-
// })
|
|
63
|
-
// })
|
|
64
|
-
// })
|
|
65
|
-
// .then(() => {
|
|
66
|
-
// tools.logSuccess();
|
|
67
|
-
// })
|
|
68
|
-
// .catch((e) => {
|
|
69
|
-
// // error is not thrown as this failure to update is just a side-effect of the pipeline
|
|
70
|
-
// tools.logError('ERROR!!! error encountered while trying to publish on Confluence');
|
|
71
|
-
// console.log(e);
|
|
72
|
-
// })
|
|
73
|
-
// }
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
// const getContentByPageTitle = (pageTitle) => {
|
|
77
|
-
|
|
78
|
-
// const config = configUtils.global.getConfig();
|
|
79
|
-
|
|
80
|
-
// const confluenceHost = config.confluence && config.confluence.host;
|
|
81
|
-
// const confluenceProjectName = config.confluence && config.confluence.projectName;
|
|
82
|
-
|
|
83
|
-
// const confluenceConfig = {
|
|
84
|
-
// username: jiraUser,
|
|
85
|
-
// password: jiraPassword,
|
|
86
|
-
// baseUrl: confluenceHost,
|
|
87
|
-
// version: 6 // Confluence major version, optional
|
|
88
|
-
// };
|
|
89
|
-
|
|
90
|
-
// var confluence = new Confluence(confluenceConfig);
|
|
91
|
-
|
|
92
|
-
// return Promise.resolve()
|
|
93
|
-
// .then(() => {
|
|
94
|
-
// return new Promise((resolve, reject) => {
|
|
95
|
-
// confluence.getContentByPageTitle(
|
|
96
|
-
// confluenceProjectName,
|
|
97
|
-
// pageTitle
|
|
98
|
-
// , function (err, response) {
|
|
99
|
-
// if (err) {
|
|
100
|
-
// return reject(err);
|
|
101
|
-
// } else {
|
|
102
|
-
// return resolve(response);
|
|
103
|
-
// }
|
|
104
|
-
// })
|
|
105
|
-
// })
|
|
106
|
-
// })
|
|
107
|
-
// }
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
// const updatePackagesHistoryPageContent = (tableContent) => {
|
|
112
|
-
// const config = configUtils.global.getConfig();
|
|
113
|
-
// const confluencePackagesHistoryPageId = config.confluence && config.confluence.packagesHistoryPageId;
|
|
114
|
-
|
|
115
|
-
// return updatePageContent(confluencePackagesHistoryPageId, tableContent);
|
|
116
|
-
// }
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
// // EXPORTS
|
|
121
|
-
|
|
122
|
-
// module.exports = {
|
|
123
|
-
// getContentByPageTitle,
|
|
124
|
-
// updatePageContent,
|
|
125
|
-
// updatePackagesHistoryPageContent,
|
|
126
|
-
// }
|
|
File without changes
|