@eui/tools 6.3.5 → 6.3.7
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 +19 -0
- package/bin/scripts/csdr-upgrade-deps.js +6 -2
- package/package.json +1 -1
- package/scripts/csdr/cli/package-build-frontend.js +9 -2
- package/scripts/csdr/cli/package-prompt.js +13 -0
- package/scripts/csdr/cli/skeletons/virtual-remote/10.x/angular-config.json +9 -0
- package/scripts/csdr/cli/skeletons/virtual-remote/10.x/dependencies.json +20 -0
- package/scripts/csdr/config/register.js +30 -4
- package/scripts/csdr/init/remotes/10.x/base/angular.json +90 -0
- package/scripts/csdr/init/remotes/10.x/base/browserslist +6 -0
- package/scripts/csdr/init/remotes/10.x/base/package.json_TO_REPLACE +10 -0
- package/scripts/csdr/init/remotes/10.x/base/tsconfig.app.json +20 -0
- package/scripts/csdr/init/remotes/15.x/base/angular.json +1 -1
- package/scripts/csdr/init/remotes.js +3 -2
- package/scripts/utils/remotes/remotes-utils.js +3 -0
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
6.3.
|
|
1
|
+
6.3.7
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## 6.3.7 (2023-02-01)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **cli:**
|
|
6
|
+
* adapted remote init for virtual setup - MWP-8812 [MWP-8812](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-8812) ([6090688e](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/6090688ef793d7efbe467b7a1bcbea2b50dfdefd))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
10
|
+
## 6.3.6 (2023-02-01)
|
|
11
|
+
|
|
12
|
+
##### Chores
|
|
13
|
+
|
|
14
|
+
* **other:**
|
|
15
|
+
* avoid source-map generation at remote serve time - MWP-9204 [MWP-9204](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9204) ([532dbd61](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/532dbd610126f7dcf498316e1869314ac8fb77c6))
|
|
16
|
+
* added vendor file to remote serve for local testing - MWP-9204 [MWP-9204](https://webgate.ec.europa.eu/CITnet/jira/browse/MWP-9204) ([79cd8b2a](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/79cd8b2abf0919b16b71a35de1f2dc1211f2308e))
|
|
17
|
+
|
|
18
|
+
* * *
|
|
19
|
+
* * *
|
|
1
20
|
## 6.3.5 (2023-02-01)
|
|
2
21
|
|
|
3
22
|
##### Bug Fixes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const installUtils = require('../../scripts/csdr/install/install-utils');
|
|
4
4
|
const tools = require('../../scripts/utils/tools');
|
|
5
5
|
|
|
6
|
-
const { pkg } = tools.getArgs();
|
|
6
|
+
const { pkg, remote } = tools.getArgs();
|
|
7
7
|
|
|
8
8
|
Promise.resolve()
|
|
9
9
|
.then(() => {
|
|
@@ -11,7 +11,11 @@ Promise.resolve()
|
|
|
11
11
|
if (pkg) {
|
|
12
12
|
return installUtils.localDev.installPackage(pkg);
|
|
13
13
|
} else {
|
|
14
|
-
|
|
14
|
+
if (remote) {
|
|
15
|
+
return installUtils.localDev.installRemote(remote);
|
|
16
|
+
} else {
|
|
17
|
+
return installUtils.localDev.install();
|
|
18
|
+
}
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
})
|
package/package.json
CHANGED
|
@@ -74,6 +74,10 @@ const replaceContent = (targetPath, name, scope, fullName) => {
|
|
|
74
74
|
const generateVirtualRemote = ({fullName, targetPath, rootPackagePath, pkg, args = constants.DEFAULT_CONFIG}) => {
|
|
75
75
|
|
|
76
76
|
tools.logInfo('Generate virtual remote');
|
|
77
|
+
console.log(fullName);
|
|
78
|
+
console.log(targetPath);
|
|
79
|
+
console.log(rootPackagePath);
|
|
80
|
+
console.log(pkg);
|
|
77
81
|
|
|
78
82
|
const remoteTargetPath = path.join(process.cwd(), 'packages', 'csdr-remotes-config', 'assets', fullName);
|
|
79
83
|
|
|
@@ -90,6 +94,8 @@ const generateVirtualRemote = ({fullName, targetPath, rootPackagePath, pkg, args
|
|
|
90
94
|
// for the moment the virtual remotes are only activated for v15+
|
|
91
95
|
if (args.pkgFrontendVersion == constants.CONFIG_OPTIONS.pkgFrontendVersion.EUI15) {
|
|
92
96
|
tools.copydir(constants.FRONTEND_SKELETON_REMOTE_EUI15_PATH, targetPath, true);
|
|
97
|
+
} else if (args.pkgFrontendVersion == constants.CONFIG_OPTIONS.pkgFrontendVersion.EUI10) {
|
|
98
|
+
tools.copydir(constants.FRONTEND_SKELETON_REMOTE_EUI10_PATH, targetPath, true);
|
|
93
99
|
}
|
|
94
100
|
|
|
95
101
|
// REPLACING PLACEHOLDERS
|
|
@@ -100,7 +106,8 @@ const generateVirtualRemote = ({fullName, targetPath, rootPackagePath, pkg, args
|
|
|
100
106
|
tools.logInfo('Adding CSDR config entry');
|
|
101
107
|
configUtils.register.registerCsdrPackage(
|
|
102
108
|
pkg, args.pkgFrontendType === constants.CONFIG_OPTIONS.pkgFrontendType.REMOTE,
|
|
103
|
-
args.pkgScope, args.pkgName, args.pkgFrontendVersion
|
|
109
|
+
args.pkgScope, args.pkgName, args.pkgFrontendVersion,
|
|
110
|
+
args.isVirtualRemote
|
|
104
111
|
);
|
|
105
112
|
|
|
106
113
|
// REPLACE EXTENSIONS (package.json, .gitignore as the interfere with build of tools if release without name changes)
|
|
@@ -294,7 +301,7 @@ module.exports.generate = (args = constants.DEFAULT_CONFIG) => {
|
|
|
294
301
|
|
|
295
302
|
return Promise.resolve()
|
|
296
303
|
.then(() => {
|
|
297
|
-
if (args.
|
|
304
|
+
if (args.isVirtualRemote) {
|
|
298
305
|
return generateVirtualRemote({fullName, targetPath, rootPackagePath, pkg, args});
|
|
299
306
|
} else {
|
|
300
307
|
return generateDefault({fullName, targetPath, rootPackagePath, pkg, args});
|
|
@@ -126,6 +126,19 @@ module.exports.prompt = () => {
|
|
|
126
126
|
);
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
|
+
{
|
|
130
|
+
name: 'isVirtualRemote',
|
|
131
|
+
type: 'confirm',
|
|
132
|
+
message: 'Is this a virtual remote ?',
|
|
133
|
+
default: constants.DEFAULT_CONFIG.isVirtualRemote,
|
|
134
|
+
when: function (answers) {
|
|
135
|
+
return (
|
|
136
|
+
answers.pkgType === constants.CONFIG_OPTIONS.pkgType.FRONTEND &&
|
|
137
|
+
answers.pkgFrontendType === constants.CONFIG_OPTIONS.pkgFrontendType.REMOTE &&
|
|
138
|
+
answers.pkgFrontendVersion === constants.CONFIG_OPTIONS.pkgFrontendVersion.EUI10
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
},
|
|
129
142
|
{
|
|
130
143
|
name: 'isCsdrRepo',
|
|
131
144
|
type: 'confirm',
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"styles": [
|
|
3
|
+
"./node_modules/@eui/styles/dist/styles/eui-primeng.css",
|
|
4
|
+
"./node_modules/@eui/styles/dist/styles/eui.css",
|
|
5
|
+
"./node_modules/@eui/styles/dist/styles/eui-next.css",
|
|
6
|
+
"./node_modules/@eui/styles/dist/styles/eui-components.css",
|
|
7
|
+
"./node_modules/@eui/styles/dist/assets/fonts/font-awesome/font-awesome.min.css"
|
|
8
|
+
]
|
|
9
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"base": {
|
|
3
|
+
},
|
|
4
|
+
"composite": {
|
|
5
|
+
"@eui/deps-base": "^10.0.0",
|
|
6
|
+
"@module.scope@/@module.name@": "^1.0.0",
|
|
7
|
+
"@csdr/core": "^2.0.0",
|
|
8
|
+
"@csdr/integration": "^2.0.0"
|
|
9
|
+
},
|
|
10
|
+
"INT": {
|
|
11
|
+
},
|
|
12
|
+
"ACC": {
|
|
13
|
+
},
|
|
14
|
+
"DLT": {
|
|
15
|
+
},
|
|
16
|
+
"TRN": {
|
|
17
|
+
},
|
|
18
|
+
"PROD": {
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -66,7 +66,7 @@ module.exports.registerCsdrProject = (name, isFullSkeleton) => {
|
|
|
66
66
|
|
|
67
67
|
// Register newly created package
|
|
68
68
|
|
|
69
|
-
module.exports.registerCsdrPackage = (pkg, isRemote, rootPkgScope, rootPkgName, euiVersionNumber) => {
|
|
69
|
+
module.exports.registerCsdrPackage = (pkg, isRemote, rootPkgScope, rootPkgName, euiVersionNumber, isVirtualRemote) => {
|
|
70
70
|
|
|
71
71
|
const csdrConfigPackage = {
|
|
72
72
|
"name": "@module.full.name@",
|
|
@@ -111,7 +111,31 @@ module.exports.registerCsdrPackage = (pkg, isRemote, rootPkgScope, rootPkgName,
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
|
|
115
|
+
const csdrConfigRemotePackageV10Virtual = {
|
|
116
|
+
"npmPkg": "@module.npmPkg.name@",
|
|
117
|
+
"euiVersion": "10.x",
|
|
118
|
+
"build": {
|
|
119
|
+
"compiledTranslations": true,
|
|
120
|
+
"translationScopes": "eui,csdr,cc,mywp",
|
|
121
|
+
"envTargetActive": true,
|
|
122
|
+
"skipLint": true,
|
|
123
|
+
"skipTest": true,
|
|
124
|
+
"sonarScanner": false
|
|
125
|
+
},
|
|
126
|
+
"release": {
|
|
127
|
+
"team": "cc-ui-rm"
|
|
128
|
+
},
|
|
129
|
+
"slack": {
|
|
130
|
+
"channel": "csdr-timeline-mwp-remotes-cc"
|
|
131
|
+
},
|
|
132
|
+
"externalSources": {
|
|
133
|
+
"npmPkg": "@module.rootPkg.scope@/@module.rootPkg.name@",
|
|
134
|
+
"folder": "assets/remote-sources"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const csdrConfigRemotePackageV15Virtual = {
|
|
115
139
|
"npmPkg": "@module.npmPkg.name@",
|
|
116
140
|
"euiVersion": "15.x",
|
|
117
141
|
"build": {
|
|
@@ -140,7 +164,9 @@ module.exports.registerCsdrPackage = (pkg, isRemote, rootPkgScope, rootPkgName,
|
|
|
140
164
|
|
|
141
165
|
if (isRemote) {
|
|
142
166
|
if (euiVersionNumber >= 15) {
|
|
143
|
-
packageDef = JSON.stringify(
|
|
167
|
+
packageDef = JSON.stringify(csdrConfigRemotePackageV15Virtual);
|
|
168
|
+
} else if (euiVersionNumber >= 10 && isVirtualRemote) {
|
|
169
|
+
packageDef = JSON.stringify(csdrConfigRemotePackageV10Virtual);
|
|
144
170
|
} else {
|
|
145
171
|
packageDef = JSON.stringify(csdrConfigRemotePackage);
|
|
146
172
|
}
|
|
@@ -155,7 +181,7 @@ module.exports.registerCsdrPackage = (pkg, isRemote, rootPkgScope, rootPkgName,
|
|
|
155
181
|
replaceModule = tools.replaceAll(replaceModule, '@module.rootPkg.name@', rootPkgName);
|
|
156
182
|
|
|
157
183
|
let file = path.join(process.cwd(), '.csdr', '.euirc-csdr-packages.json');
|
|
158
|
-
if (isRemote &&
|
|
184
|
+
if (isRemote && isVirtualRemote) {
|
|
159
185
|
file = path.join(process.cwd(), '.csdr', '.euirc-csdr-remotes.json');
|
|
160
186
|
}
|
|
161
187
|
let jsonFile = require(file);
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"newProjectRoot": "apps",
|
|
5
|
+
"projects": {
|
|
6
|
+
"@remote.name@": {
|
|
7
|
+
"root": ".",
|
|
8
|
+
"sourceRoot": "src",
|
|
9
|
+
"projectType": "application",
|
|
10
|
+
"prefix": "app",
|
|
11
|
+
"schematics": {},
|
|
12
|
+
"architect": {
|
|
13
|
+
"build": {
|
|
14
|
+
"builder": "ngx-build-plus:build",
|
|
15
|
+
"options": {
|
|
16
|
+
"deployUrl": "/mwp/assets/elements/@remote.name@/bundles/",
|
|
17
|
+
"outputPath": "dist",
|
|
18
|
+
"index": "src/index.html",
|
|
19
|
+
"main": "src/main.ts",
|
|
20
|
+
"polyfills": "src/polyfills.ts",
|
|
21
|
+
"tsConfig": "tsconfig.app.json",
|
|
22
|
+
"scripts": [
|
|
23
|
+
"./node_modules/@webcomponents/custom-elements/src/native-shim.js"
|
|
24
|
+
],
|
|
25
|
+
"assets": [
|
|
26
|
+
"src/assets"
|
|
27
|
+
],
|
|
28
|
+
"styles": [
|
|
29
|
+
"./node_modules/@eui/styles/dist/styles/eui-primeng.css",
|
|
30
|
+
"./node_modules/@eui/styles/dist/styles/eui.css",
|
|
31
|
+
"./node_modules/@eui/styles/dist/styles/eui-next.css",
|
|
32
|
+
"./node_modules/@eui/styles/dist/styles/eui-components.css",
|
|
33
|
+
"./node_modules/prismjs/plugins/line-numbers/prism-line-numbers.css",
|
|
34
|
+
"./node_modules/@eui/styles/dist/assets/fonts/font-awesome/font-awesome.min.css",
|
|
35
|
+
"./node_modules/@eui/styles/dist/assets/fonts/flag-icons/css/flag-icon.min.css"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"configurations": {
|
|
39
|
+
"production": {
|
|
40
|
+
"fileReplacements": [
|
|
41
|
+
{
|
|
42
|
+
"replace": "src/environments/environment.ts",
|
|
43
|
+
"with": "src/environments/environment.prod.ts"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"optimization": true,
|
|
47
|
+
"outputHashing": "all",
|
|
48
|
+
"sourceMap": false,
|
|
49
|
+
"extractCss": true,
|
|
50
|
+
"namedChunks": false,
|
|
51
|
+
"aot": true,
|
|
52
|
+
"extractLicenses": true,
|
|
53
|
+
"vendorChunk": false,
|
|
54
|
+
"buildOptimizer": true
|
|
55
|
+
},
|
|
56
|
+
"serve-dist": {
|
|
57
|
+
"outputPath": "serve-dist",
|
|
58
|
+
"wath": true
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"serve": {
|
|
63
|
+
"builder": "./node_modules/@angular-devkit/build-angular:dev-server",
|
|
64
|
+
"options": {
|
|
65
|
+
"deployUrl": "/assets/elements/@remote.name@/bundles/",
|
|
66
|
+
"browserTarget": "@remote.name@:build:serve-dist"
|
|
67
|
+
},
|
|
68
|
+
"configurations": {
|
|
69
|
+
"production": {
|
|
70
|
+
"browserTarget": "@remote.name@:build:production"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"test": {
|
|
75
|
+
"builder": "./node_modules/@angular-devkit/build-angular:karma",
|
|
76
|
+
"options": {
|
|
77
|
+
"main": "src/test.ts",
|
|
78
|
+
"polyfills": "src/polyfills.ts",
|
|
79
|
+
"tsConfig": "tsconfig.spec.json",
|
|
80
|
+
"karmaConfig": "karma.conf.js",
|
|
81
|
+
"scripts": []
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"cli": {
|
|
88
|
+
"analytics": false
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./out-tsc/app",
|
|
5
|
+
"module": "es2015",
|
|
6
|
+
"target": "es2015",
|
|
7
|
+
"types": [
|
|
8
|
+
"node"
|
|
9
|
+
],
|
|
10
|
+
"paths": {
|
|
11
|
+
"os": ["./node_modules/empty-module/index.js"],
|
|
12
|
+
"node-fetch": ["./node_modules/empty-module/index.js"],
|
|
13
|
+
"zipkin": ["./node_modules/zipkin/dist/zipkin.js"]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"exclude": [
|
|
17
|
+
"src/test.ts",
|
|
18
|
+
"**/*.spec.ts"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -61,8 +61,9 @@ module.exports.generateVirtualRemote = (remoteName, cloneRemote = true) => {
|
|
|
61
61
|
|
|
62
62
|
// constructing the remote folder
|
|
63
63
|
const remotePath = path.join(process.cwd(), 'remotes', remote.name);
|
|
64
|
-
const
|
|
65
|
-
const
|
|
64
|
+
const remoteSkeletonRootPath = path.join(__dirname, 'remotes', remote.euiVersion);
|
|
65
|
+
const remoteSkeletonPath = path.join(remoteSkeletonRootPath, 'base');
|
|
66
|
+
const remoteSkeletonFullPath = path.join(remoteSkeletonRootPath, 'full');
|
|
66
67
|
|
|
67
68
|
tools.logInfo(`Copying base sources => ${remoteSkeletonPath} ==> ${remotePath}`);
|
|
68
69
|
|
|
@@ -19,11 +19,14 @@ module.exports.concatFiles = (workingPath, euiVersionNumber = 10) => {
|
|
|
19
19
|
...(euiVersionNumber >= 15 ? ['runtime.js'] : []),
|
|
20
20
|
'polyfills.js',
|
|
21
21
|
'scripts.js',
|
|
22
|
+
...(tools.isFileExists(path.join(workingPath, 'vendor.js')) ? ['vendor.js'] : []),
|
|
22
23
|
'main-old.js'
|
|
23
24
|
].map(f => path.join(workingPath, f));
|
|
24
25
|
|
|
25
26
|
const outFilePath = path.join(workingPath, 'main.js');
|
|
26
27
|
|
|
28
|
+
console.log(files);
|
|
29
|
+
|
|
27
30
|
return concat(files, outFilePath);
|
|
28
31
|
})
|
|
29
32
|
|