@eui/tools 5.2.11 → 5.3.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/package.json +1 -1
- package/sandbox.js +16 -8
- package/scripts/csdr/config/projects.js +29 -29
- package/scripts/csdr/install/build-app.js +5 -1
- package/scripts/csdr/install/projects.js +11 -0
- package/scripts/utils/build/app/build-app-utils.js +2 -2
- package/scripts/utils/tools.js +2 -0
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.
|
|
1
|
+
5.3.0
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 5.3.0 (2022-05-31)
|
|
2
|
+
|
|
3
|
+
##### New Features
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* add standalone projects build capability - EUI-5917 [EUI-5917](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-5917) ([05dfe5cb](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/05dfe5cbc8d5079b57d760f2d56945fb2d3490c0))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
1
10
|
## 5.2.11 (2022-05-21)
|
|
2
11
|
|
|
3
12
|
##### Chores
|
package/package.json
CHANGED
package/sandbox.js
CHANGED
|
@@ -842,22 +842,22 @@ const versionUtils = require('./scripts/csdr/version/version-utils');
|
|
|
842
842
|
|
|
843
843
|
// METADATA ESTING
|
|
844
844
|
// --------------------
|
|
845
|
-
const pkg = configUtils.packages.getPackage('cc-task-details-eui10-remote-el-ui');
|
|
846
|
-
const envTarget = 'INT';
|
|
845
|
+
// const pkg = configUtils.packages.getPackage('cc-task-details-eui10-remote-el-ui');
|
|
846
|
+
// const envTarget = 'INT';
|
|
847
847
|
|
|
848
|
-
let versionsMetadata, envsMetadata;
|
|
848
|
+
// let versionsMetadata, envsMetadata;
|
|
849
849
|
|
|
850
|
-
Promise.resolve()
|
|
850
|
+
// Promise.resolve()
|
|
851
851
|
// .then(() => {
|
|
852
852
|
// return installUtils.remotes.getDeps(pkg, envTarget, 'regio');
|
|
853
853
|
// })
|
|
854
854
|
// .then((deps) => {
|
|
855
855
|
// console.log(deps);
|
|
856
856
|
// })
|
|
857
|
-
.then(() => {
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
})
|
|
857
|
+
// .then(() => {
|
|
858
|
+
// // return versionUtils.packageRemote.getNewVersion(pkg, envTarget);
|
|
859
|
+
// return metadataUtils.packageHistory.generateDiffReport(pkg, envTarget);
|
|
860
|
+
// })
|
|
861
861
|
|
|
862
862
|
|
|
863
863
|
|
|
@@ -872,3 +872,11 @@ Promise.resolve()
|
|
|
872
872
|
// .then((versions) => {
|
|
873
873
|
// console.log(versions);
|
|
874
874
|
// })
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
Promise.resolve()
|
|
879
|
+
.then(() => {
|
|
880
|
+
const prj = configUtils.projects.getProject('rsp-starter-kit');
|
|
881
|
+
console.log(prj);
|
|
882
|
+
})
|
|
@@ -35,10 +35,30 @@ const getProjectOptions = (prj) => {
|
|
|
35
35
|
return { options: options };
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
const getProjectPaths = (prj) => {
|
|
39
|
+
const rootPath = path.join(process.cwd(), prj.folder);
|
|
40
|
+
let angularPath = rootPath;
|
|
41
|
+
if (prj.build && prj.build.maven) {
|
|
42
|
+
angularPath = path.join(rootPath, 'src/main/angular');
|
|
43
|
+
}
|
|
44
|
+
const elementsPath = path.join(angularPath, 'src', 'assets', 'elements');
|
|
38
45
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
let installPath = process.cwd();
|
|
47
|
+
let nodeModulesPath = path.join(process.cwd(), 'node_modules');
|
|
48
|
+
if (prj.standalone) {
|
|
49
|
+
installPath = path.join(rootPath);
|
|
50
|
+
nodeModulesPath = path.join(rootPath, 'node_modules');
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const paths = {
|
|
54
|
+
rootPath: rootPath,
|
|
55
|
+
angularPath: angularPath,
|
|
56
|
+
elementsPath: elementsPath,
|
|
57
|
+
installPath: installPath,
|
|
58
|
+
nodeModulesPath: nodeModulesPath,
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
return { paths: paths };
|
|
42
62
|
}
|
|
43
63
|
|
|
44
64
|
|
|
@@ -66,21 +86,10 @@ module.exports.getProject = (projectName) => {
|
|
|
66
86
|
|
|
67
87
|
if (prj) {
|
|
68
88
|
prj.rootName = projectName;
|
|
69
|
-
const rootPath = path.join(process.cwd(), prj.folder);
|
|
70
|
-
let angularPath = rootPath;
|
|
71
|
-
if (prj.build && prj.build.maven) {
|
|
72
|
-
angularPath = path.join(rootPath, 'src/main/angular');
|
|
73
|
-
}
|
|
74
|
-
const elementsPath = path.join(angularPath, 'src', 'assets', 'elements');
|
|
75
|
-
|
|
76
|
-
prj.paths = {
|
|
77
|
-
rootPath: rootPath,
|
|
78
|
-
angularPath: angularPath,
|
|
79
|
-
elementsPath: elementsPath
|
|
80
|
-
};
|
|
81
89
|
|
|
82
90
|
return {
|
|
83
91
|
...prj,
|
|
92
|
+
...getProjectPaths(prj),
|
|
84
93
|
...getProjectMetadataDefs(projectName),
|
|
85
94
|
...getProjectOptions(prj)
|
|
86
95
|
}
|
|
@@ -93,30 +102,21 @@ module.exports.getCsdrProject = (projectName) => {
|
|
|
93
102
|
const prj = innerGlobal.getCsdrConfig(false).projects[projectName];
|
|
94
103
|
|
|
95
104
|
if (prj) {
|
|
96
|
-
|
|
97
105
|
prj.rootName = projectName;
|
|
98
|
-
const rootPath = path.join(process.cwd(), prj.folder);
|
|
99
|
-
let angularPath = rootPath;
|
|
100
|
-
if (prj.build && prj.build.maven) {
|
|
101
|
-
angularPath = path.join(rootPath, 'src/main/angular');
|
|
102
|
-
}
|
|
103
|
-
const elementsPath = path.join(angularPath, 'src', 'assets', 'elements');
|
|
104
|
-
|
|
105
|
-
prj.paths = {
|
|
106
|
-
rootPath: rootPath,
|
|
107
|
-
angularPath: angularPath,
|
|
108
|
-
elementsPath: elementsPath
|
|
109
|
-
};
|
|
110
106
|
|
|
111
107
|
return {
|
|
112
108
|
...prj,
|
|
109
|
+
...getProjectPaths(prj),
|
|
113
110
|
...getProjectMetadataDefs(projectName),
|
|
114
111
|
...getProjectOptions(prj)
|
|
115
112
|
}
|
|
116
113
|
}
|
|
117
114
|
}
|
|
118
115
|
|
|
119
|
-
|
|
116
|
+
const getProjects = module.exports.getProjects = () => {
|
|
117
|
+
const projects = innerGlobal.getConfig().projects;
|
|
118
|
+
return Object.keys(projects).map(p => this.getProject(p));
|
|
119
|
+
}
|
|
120
120
|
|
|
121
121
|
module.exports.getCsdrProjects = () => {
|
|
122
122
|
|
|
@@ -11,7 +11,11 @@ module.exports.install = (prj, envTarget, compositeType) => {
|
|
|
11
11
|
return Promise.resolve()
|
|
12
12
|
// checking remotes
|
|
13
13
|
.then(() => {
|
|
14
|
-
|
|
14
|
+
if (prj.standAlone) {
|
|
15
|
+
return innerProjects.installDepsStandalone(prj);
|
|
16
|
+
} else {
|
|
17
|
+
return innerProjects.installDeps(prj, envTarget, compositeType);
|
|
18
|
+
}
|
|
15
19
|
})
|
|
16
20
|
|
|
17
21
|
// returning metadata dependencies
|
|
@@ -75,3 +75,14 @@ module.exports.installDeps = (prj, envTarget, compositeType) => {
|
|
|
75
75
|
throw e;
|
|
76
76
|
})
|
|
77
77
|
}
|
|
78
|
+
|
|
79
|
+
module.exports.installDepsStandalone = (prj) => {
|
|
80
|
+
return Promise.resolve()
|
|
81
|
+
.then(() => {
|
|
82
|
+
return innerCommon.executeInstall(prj.paths.installPath);
|
|
83
|
+
})
|
|
84
|
+
|
|
85
|
+
.catch((e) => {
|
|
86
|
+
throw e;
|
|
87
|
+
})
|
|
88
|
+
}
|
|
@@ -35,10 +35,10 @@ const getProjectInfos = () => {
|
|
|
35
35
|
|
|
36
36
|
module.exports.angular = (envTarget, isSnapshot, version, configEnvTargetIn) => {
|
|
37
37
|
|
|
38
|
-
const ng = path.resolve(process.cwd(), 'node_modules', '@angular', 'cli', 'bin', 'ng');
|
|
39
|
-
|
|
40
38
|
const currentProject = getProjectInfos();
|
|
41
39
|
|
|
40
|
+
const ng = path.resolve(currentProject.paths.nodeModulesPath, '@angular', 'cli', 'bin', 'ng');
|
|
41
|
+
|
|
42
42
|
// checking if configEnvTarget is passed as param, if not take the global script param
|
|
43
43
|
// as this angular build method can be called in stand-alone (outside of CSDR pipeline flow)
|
|
44
44
|
if (configEnvTargetIn) {
|
package/scripts/utils/tools.js
CHANGED
|
@@ -127,9 +127,11 @@ function relativeCopyEol(fileGlob, from, to) {
|
|
|
127
127
|
function copydir(from, to, overwrite = true, globPattern = '**/*') {
|
|
128
128
|
logInfo('----->copydir from : ' + from + ' ====> to : ' + to );
|
|
129
129
|
var files = glob.sync(globPattern, { cwd: from, nodir: true, follow: true, dot: true });
|
|
130
|
+
console.log(files);
|
|
130
131
|
files.forEach(file => {
|
|
131
132
|
const origin = path.join(from, file);
|
|
132
133
|
const dest = path.join(to, file);
|
|
134
|
+
console.logt(origin, dest);
|
|
133
135
|
_recursiveMkDir(path.dirname(dest));
|
|
134
136
|
fse.copySync(origin, dest, { overwrite: overwrite });
|
|
135
137
|
});
|