@eui/tools 6.13.16 → 6.14.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 +9 -0
- package/bin/eui-scripts.js +3 -1
- package/bin/scripts/release-app-group.js +5 -0
- package/package.json +1 -1
- package/scripts/csdr/cli/package-prompt.js +94 -93
- package/scripts/csdr/config/global.js +38 -27
- package/scripts/csdr/config/init.js +31 -23
- package/scripts/csdr/config/projects.js +51 -50
- package/scripts/csdr/init/init-projects-group.js +64 -0
- package/scripts/csdr/init/init.js +9 -3
- package/scripts/csdr/init/prompt.js +106 -108
- package/scripts/csdr/init/repos.js +3 -3
- package/scripts/csdr/install/common.js +65 -67
- package/scripts/csdr/install/projects.js +41 -64
- package/scripts/csdr/metadata/app.js +100 -108
- package/scripts/csdr/release/app/release-app-group.js +350 -0
- package/scripts/csdr/release/app/release-app.js +284 -319
- package/scripts/csdr/version/app.js +2 -4
- package/scripts/index.js +9 -0
- package/scripts/utils/build/app/build-app-utils.js +62 -37
|
@@ -4,9 +4,7 @@ const appDefault = require('./app-default');
|
|
|
4
4
|
const appEnvTarget = require('./app-env-target');
|
|
5
5
|
const appCommon = require('./app-common');
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
module.exports.getNewVersion = (project, isSnapshot, isSupportBranch, envTarget) => {
|
|
9
|
-
|
|
10
8
|
return Promise.resolve()
|
|
11
9
|
.then(() => {
|
|
12
10
|
if (envTarget) {
|
|
@@ -17,8 +15,8 @@ module.exports.getNewVersion = (project, isSnapshot, isSupportBranch, envTarget)
|
|
|
17
15
|
})
|
|
18
16
|
.catch((e) => {
|
|
19
17
|
throw e;
|
|
20
|
-
})
|
|
21
|
-
}
|
|
18
|
+
});
|
|
19
|
+
};
|
|
22
20
|
|
|
23
21
|
module.exports.updatePackageVersion = appCommon.updatePackageVersion;
|
|
24
22
|
|
package/scripts/index.js
CHANGED
|
@@ -105,10 +105,18 @@ module.exports.initGlobal = require('./csdr/init/global');
|
|
|
105
105
|
module.exports.initUtils = require('./csdr/init/init-utils');
|
|
106
106
|
module.exports.initMeta = require('./csdr/init/meta');
|
|
107
107
|
module.exports.initPackages = require('./csdr/init/packages');
|
|
108
|
+
module.exports.initPackage = require('./csdr/init/init-package');
|
|
108
109
|
module.exports.initProjects = require('./csdr/init/projects');
|
|
110
|
+
module.exports.initProject = require('./csdr/init/init-project');
|
|
111
|
+
module.exports.initProjectsGroup = require('./csdr/init/init-projects-group');
|
|
109
112
|
module.exports.initPrompt = require('./csdr/init/prompt');
|
|
110
113
|
module.exports.initRemotes = require('./csdr/init/remotes');
|
|
114
|
+
module.exports.initRemote = require('./csdr/init/init-remote');
|
|
111
115
|
module.exports.initRepos = require('./csdr/init/repos');
|
|
116
|
+
module.exports.initCustom = require('./csdr/init/init-custom');
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
112
120
|
|
|
113
121
|
// csdr - install
|
|
114
122
|
module.exports.installBuildApp = require('./csdr/install/build-app');
|
|
@@ -137,6 +145,7 @@ module.exports.metadataStats = require('./csdr/metadata/stats');
|
|
|
137
145
|
|
|
138
146
|
// csdr - release
|
|
139
147
|
module.exports.realeaseApp = require('./csdr/release/app/release-app');
|
|
148
|
+
module.exports.realeaseAppGroup = require('./csdr/release/app/release-app-group');
|
|
140
149
|
module.exports.releasePackageCommon = require('./csdr/release/package/common');
|
|
141
150
|
module.exports.releasePackage = require('./csdr/release/package/release-package');
|
|
142
151
|
module.exports.releaseBackend = require('./csdr/release/package/release-backend');
|
|
@@ -11,12 +11,22 @@ const versionUtils = require('../../../csdr/version/version-utils');
|
|
|
11
11
|
const preBuildUtils = require('../../pre-build/pre-build-utils');
|
|
12
12
|
|
|
13
13
|
let {
|
|
14
|
-
skipLint,
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
skipLint,
|
|
15
|
+
skipTest,
|
|
16
|
+
skipCompile,
|
|
17
|
+
configuration,
|
|
18
|
+
baseHref,
|
|
19
|
+
watch,
|
|
20
|
+
dryRun,
|
|
21
|
+
maxSpaceSize,
|
|
22
|
+
statsJson,
|
|
23
|
+
extraWebpackConfig,
|
|
24
|
+
ci,
|
|
25
|
+
deployUrl,
|
|
26
|
+
sourceMap,
|
|
27
|
+
configEnvTarget,
|
|
17
28
|
} = tools.getArgs();
|
|
18
29
|
|
|
19
|
-
|
|
20
30
|
const getProjectInfos = () => {
|
|
21
31
|
// getting the project from installed config
|
|
22
32
|
const prj = configUtils.projects.getProject();
|
|
@@ -31,13 +41,29 @@ const getProjectInfos = () => {
|
|
|
31
41
|
return prj;
|
|
32
42
|
};
|
|
33
43
|
|
|
44
|
+
module.exports.angular = (
|
|
45
|
+
args = {
|
|
46
|
+
project: null,
|
|
47
|
+
envTarget: null,
|
|
48
|
+
isSnapshot: false,
|
|
49
|
+
version: null,
|
|
50
|
+
configEnvTargetIn: null,
|
|
51
|
+
}
|
|
52
|
+
) => {
|
|
53
|
+
let currentProject;
|
|
34
54
|
|
|
55
|
+
if (args.project) {
|
|
56
|
+
currentProject = args.project;
|
|
57
|
+
} else {
|
|
58
|
+
currentProject = getProjectInfos();
|
|
59
|
+
}
|
|
35
60
|
|
|
36
|
-
|
|
37
|
-
const
|
|
61
|
+
const envTarget = args.envTarget;
|
|
62
|
+
const isSnapshot = args.isSnapshot;
|
|
63
|
+
const version = args.version;
|
|
64
|
+
const configEnvTargetIn = args.configEnvTargetIn;
|
|
38
65
|
|
|
39
66
|
tools.logTitle(`Building application : ${currentProject.name}...`);
|
|
40
|
-
console.log(currentProject);
|
|
41
67
|
|
|
42
68
|
tools.logInfo('With build params : ');
|
|
43
69
|
console.log(envTarget, isSnapshot, version, configEnvTargetIn);
|
|
@@ -49,9 +75,8 @@ module.exports.angular = (envTarget, isSnapshot, version, configEnvTargetIn) =>
|
|
|
49
75
|
if (configEnvTargetIn) {
|
|
50
76
|
configEnvTarget = configEnvTargetIn;
|
|
51
77
|
tools.logInfo(`ConfigEnvTarget known : ${configEnvTarget}`);
|
|
52
|
-
|
|
53
78
|
} else {
|
|
54
|
-
if (configEnvTarget && typeof
|
|
79
|
+
if (configEnvTarget && typeof configEnvTarget === 'boolean') {
|
|
55
80
|
configEnvTarget = null;
|
|
56
81
|
tools.logInfo(`ConfigEnvTarget unknown`);
|
|
57
82
|
|
|
@@ -99,10 +124,10 @@ module.exports.angular = (envTarget, isSnapshot, version, configEnvTargetIn) =>
|
|
|
99
124
|
let esLintPath = currentProject.paths.eslintPath;
|
|
100
125
|
|
|
101
126
|
// TODO: remove TSLint since it's deprecated and should not be used by projects in the future
|
|
102
|
-
if(tsLintPath) {
|
|
127
|
+
if (tsLintPath) {
|
|
103
128
|
tsLintPath = path.join(tsLintPath);
|
|
104
129
|
let tsConfigPath = path.join(currentProject.paths.angularPath, 'tsconfig.app.json');
|
|
105
|
-
tools.logWarning('TSLint is deprecated and will be removed in the future. Consider migrating to ESLint')
|
|
130
|
+
tools.logWarning('TSLint is deprecated and will be removed in the future. Consider migrating to ESLint');
|
|
106
131
|
if (!tools.isFileExists(tsConfigPath)) {
|
|
107
132
|
tsConfigPath = path.join(currentProject.paths.angularPath, 'src', 'tsconfig.app.json');
|
|
108
133
|
}
|
|
@@ -117,7 +142,6 @@ module.exports.angular = (envTarget, isSnapshot, version, configEnvTargetIn) =>
|
|
|
117
142
|
} else {
|
|
118
143
|
tools.logError(`No ESLint or TSLint configuration found for the project`);
|
|
119
144
|
}
|
|
120
|
-
|
|
121
145
|
}
|
|
122
146
|
})
|
|
123
147
|
|
|
@@ -127,7 +151,6 @@ module.exports.angular = (envTarget, isSnapshot, version, configEnvTargetIn) =>
|
|
|
127
151
|
}
|
|
128
152
|
})
|
|
129
153
|
|
|
130
|
-
|
|
131
154
|
.then(() => {
|
|
132
155
|
if (!skipLint) {
|
|
133
156
|
tools.logSuccess();
|
|
@@ -162,7 +185,6 @@ module.exports.angular = (envTarget, isSnapshot, version, configEnvTargetIn) =>
|
|
|
162
185
|
}
|
|
163
186
|
})
|
|
164
187
|
|
|
165
|
-
|
|
166
188
|
.then(() => {
|
|
167
189
|
if (!skipTest) {
|
|
168
190
|
tools.logSuccess();
|
|
@@ -183,9 +205,7 @@ module.exports.angular = (envTarget, isSnapshot, version, configEnvTargetIn) =>
|
|
|
183
205
|
|
|
184
206
|
if (configuration) {
|
|
185
207
|
args.push(`--configuration=${configuration}`);
|
|
186
|
-
|
|
187
208
|
} else {
|
|
188
|
-
|
|
189
209
|
let isOptimizedBuild = false;
|
|
190
210
|
if (envTarget && (envTarget === 'ACC' || envTarget === 'DLT' || envTarget === 'TRN' || envTarget === 'PROD')) {
|
|
191
211
|
isOptimizedBuild = true;
|
|
@@ -263,13 +283,9 @@ module.exports.angular = (envTarget, isSnapshot, version, configEnvTargetIn) =>
|
|
|
263
283
|
.catch((e) => {
|
|
264
284
|
throw e;
|
|
265
285
|
});
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
286
|
+
};
|
|
270
287
|
|
|
271
288
|
module.exports.maven = () => {
|
|
272
|
-
|
|
273
289
|
const currentProject = getProjectInfos();
|
|
274
290
|
|
|
275
291
|
return Promise.resolve()
|
|
@@ -280,9 +296,8 @@ module.exports.maven = () => {
|
|
|
280
296
|
|
|
281
297
|
.catch((e) => {
|
|
282
298
|
throw e;
|
|
283
|
-
})
|
|
284
|
-
}
|
|
285
|
-
|
|
299
|
+
});
|
|
300
|
+
};
|
|
286
301
|
|
|
287
302
|
module.exports.postBuild = (project) => {
|
|
288
303
|
tools.logTitle('Executing project post-build script');
|
|
@@ -294,7 +309,6 @@ module.exports.postBuild = (project) => {
|
|
|
294
309
|
|
|
295
310
|
if (!dryRun && tools.isFileExists(postbuildScript)) {
|
|
296
311
|
return tools.runScript(`node ${postbuildScript}`);
|
|
297
|
-
|
|
298
312
|
} else {
|
|
299
313
|
tools.logInfo('DRY-RUN OR post-build.js script not found in app root --- SKIPPING');
|
|
300
314
|
}
|
|
@@ -302,13 +316,11 @@ module.exports.postBuild = (project) => {
|
|
|
302
316
|
|
|
303
317
|
.catch((e) => {
|
|
304
318
|
throw e;
|
|
305
|
-
})
|
|
306
|
-
}
|
|
307
|
-
|
|
319
|
+
});
|
|
320
|
+
};
|
|
308
321
|
|
|
309
|
-
module.exports.generateProjectDistributionFile = (project, isSnapshot, envTarget) => {
|
|
310
|
-
tools.logTitle('Generating distribution file');
|
|
311
322
|
|
|
323
|
+
const generateProjectDistributionList = module.exports.generateProjectDistributionList = (project, isSnapshot, envTarget) => {
|
|
312
324
|
let projectVersion;
|
|
313
325
|
|
|
314
326
|
return Promise.resolve()
|
|
@@ -357,9 +369,8 @@ module.exports.generateProjectDistributionFile = (project, isSnapshot, envTarget
|
|
|
357
369
|
// returning app distribution folder and bucket info
|
|
358
370
|
return {
|
|
359
371
|
bucketName: bucketName || '',
|
|
360
|
-
folder: outputFolder
|
|
372
|
+
folder: outputFolder,
|
|
361
373
|
};
|
|
362
|
-
|
|
363
374
|
})
|
|
364
375
|
|
|
365
376
|
// adding packages doc information if defined in config
|
|
@@ -372,23 +383,37 @@ module.exports.generateProjectDistributionFile = (project, isSnapshot, envTarget
|
|
|
372
383
|
}
|
|
373
384
|
|
|
374
385
|
project.build.distribution.docPackages.forEach((docPkg, i) => {
|
|
375
|
-
tools.logInfo(`copying package doc to assets for : ${docPkg.name}...`)
|
|
386
|
+
tools.logInfo(`copying package doc to assets for : ${docPkg.name}...`);
|
|
376
387
|
|
|
377
388
|
const nmDocsPath = path.join(process.cwd(), 'node_modules', docPkg.name, 'docs');
|
|
378
389
|
const distDocPkgFolder = 'assets/docs/' + docPkg.folder;
|
|
379
390
|
const destDocPath = path.join(project.paths.angularPath, 'dist', distDocPkgFolder);
|
|
380
391
|
tools.copydir(nmDocsPath, destDocPath);
|
|
381
392
|
|
|
382
|
-
finalOutput[`docFolder${i+1}`] = distDocPkgFolder;
|
|
393
|
+
finalOutput[`docFolder${i + 1}`] = distDocPkgFolder;
|
|
383
394
|
const projectMajorVersion = projectVersion.split('.')[0];
|
|
384
|
-
finalOutput[`docS3Folder${i+1}`] = `${output.bucketName}/${docPkg.folder}-${projectMajorVersion}.x
|
|
385
|
-
})
|
|
395
|
+
finalOutput[`docS3Folder${i + 1}`] = `${output.bucketName}/${docPkg.folder}-${projectMajorVersion}.x`;
|
|
396
|
+
});
|
|
386
397
|
|
|
387
398
|
tools.logSuccess();
|
|
388
399
|
|
|
389
400
|
return finalOutput;
|
|
390
401
|
})
|
|
391
402
|
|
|
403
|
+
.catch((e) => {
|
|
404
|
+
throw e;
|
|
405
|
+
})
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
module.exports.generateProjectDistributionFile = (project, isSnapshot, envTarget) => {
|
|
411
|
+
tools.logTitle('Generating distribution file');
|
|
412
|
+
|
|
413
|
+
return Promise.resolve()
|
|
414
|
+
.then(() => {
|
|
415
|
+
return generateProjectDistributionList(project, isSnapshot, envTarget);
|
|
416
|
+
})
|
|
392
417
|
|
|
393
418
|
// write final distribution file
|
|
394
419
|
.then((distFileJson) => {
|
|
@@ -400,4 +425,4 @@ module.exports.generateProjectDistributionFile = (project, isSnapshot, envTarget
|
|
|
400
425
|
.catch((e) => {
|
|
401
426
|
throw e;
|
|
402
427
|
})
|
|
403
|
-
}
|
|
428
|
+
};
|