@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
package/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.
|
|
1
|
+
4.17.3
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,57 @@
|
|
|
1
|
+
## 4.17.3 (2021-11-24)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* update comments for setup on remote v7 ([00b827d7](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/00b827d72f0ce558e6b854ac9ebe9a8a2a9005fc))
|
|
7
|
+
##### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **other:**
|
|
10
|
+
* remote package metadata location - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([ca8e4e5a](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/ca8e4e5a8d94a98c42e8e14e2eb0a21f8010aa91))
|
|
11
|
+
|
|
12
|
+
* * *
|
|
13
|
+
* * *
|
|
14
|
+
## 4.17.2 (2021-11-23)
|
|
15
|
+
|
|
16
|
+
##### Chores
|
|
17
|
+
|
|
18
|
+
* **other:**
|
|
19
|
+
* adding yarn.lock forcing for eUI 13.x - added metadata assets storage for remote elements - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([5e940892](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/5e940892aa982ef9286553696a9c54ffddecfde1))
|
|
20
|
+
|
|
21
|
+
* * *
|
|
22
|
+
* * *
|
|
23
|
+
## 4.17.1 (2021-11-19)
|
|
24
|
+
|
|
25
|
+
##### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **other:**
|
|
28
|
+
* missing import for remote release - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([df800d74](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/df800d74dc16c7445c9aceff3d8e76ed052811bd))
|
|
29
|
+
|
|
30
|
+
* * *
|
|
31
|
+
* * *
|
|
32
|
+
## 4.17.0 (2021-11-19)
|
|
33
|
+
|
|
34
|
+
##### Chores
|
|
35
|
+
|
|
36
|
+
* **other:**
|
|
37
|
+
* remove confluence-api dep ([ac6aa1ed](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/ac6aa1eda7b0458c8dfc022d62fe302f3930ffdb))
|
|
38
|
+
* remove major bump on breaking change commit message - added hostAppName on remote cli skeleton creation - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([1e509b05](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/1e509b05d1a63bdc053df4c0502f497b8c45bea1))
|
|
39
|
+
* update assets metadata to handle remotes array ([228328cd](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/228328cd6d973843b2bd9b64475dd3a94e67fb0e))
|
|
40
|
+
* adapted remote cli script for package injection ([935f691d](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/935f691db992cdace1bcb5b9779eacfda7ed83f9))
|
|
41
|
+
* adapted remote v7 skeleton ([6c94f676](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/6c94f67694b38455cd5abf5619843dc739deaf14))
|
|
42
|
+
##### New Features
|
|
43
|
+
|
|
44
|
+
* **other:**
|
|
45
|
+
* element injection - refactoring - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([d0ddf7d3](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/d0ddf7d37273f06285ef8646b8d738196f10e8cc))
|
|
46
|
+
##### Bug Fixes
|
|
47
|
+
|
|
48
|
+
* **other:**
|
|
49
|
+
* tests ([367395e6](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/367395e6e2b8248af402b1bbdf151c9b95fc817c))
|
|
50
|
+
* eui10 remote package skeleton ([68998b13](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/68998b138cc7e79895891508e4105dc3eccedfe1))
|
|
51
|
+
* CSDR CLI for remote creation - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([746ed2ae](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/746ed2aea943a96123a553714ea15d683c9b8a6c))
|
|
52
|
+
|
|
53
|
+
* * *
|
|
54
|
+
* * *
|
|
1
55
|
## 4.16.6 (2021-11-08)
|
|
2
56
|
|
|
3
57
|
##### Chores
|
package/global.test.js
CHANGED
|
@@ -3,7 +3,6 @@ describe('eUI tools - test imports', () => {
|
|
|
3
3
|
|
|
4
4
|
// utils
|
|
5
5
|
const changelogUtils = require('./scripts/utils/changelog-utils');
|
|
6
|
-
// const confluenceUtils = require('./scripts/utils/confluence-utils');
|
|
7
6
|
const gitUtils = require('./scripts/utils/git-utils');
|
|
8
7
|
const mavenUtils = require('./scripts/utils/maven-utils');
|
|
9
8
|
const pipelineUtils = require('./scripts/utils/pipeline-utils');
|
|
@@ -32,7 +31,6 @@ describe('eUI tools - test imports', () => {
|
|
|
32
31
|
|
|
33
32
|
// utils -pre-build - translations
|
|
34
33
|
const prebuildTranslationUtils = require('./scripts/utils/pre-build/translations/translation-utils');
|
|
35
|
-
const prebuildTranslationsCommon = require('./scripts/utils/pre-build/translations/common');
|
|
36
34
|
const prebuildTranslationsElements = require('./scripts/utils/pre-build/translations/elements');
|
|
37
35
|
const prebuildTranslationsProjects = require('./scripts/utils/pre-build/translations/projects');
|
|
38
36
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eui/tools",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.17.3",
|
|
4
4
|
"tag": "latest",
|
|
5
5
|
"license": "EUPL-1.1",
|
|
6
6
|
"description": "eUI common tools and scripts",
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"eol": "0.9.1",
|
|
22
22
|
"rimraf": "3.0.2",
|
|
23
23
|
"ncp": "2.0.0",
|
|
24
|
-
"confluence-api": "1.4.0",
|
|
25
24
|
"moment": "2.29.1",
|
|
26
25
|
"moment-timezone": "0.5.33",
|
|
27
26
|
"npm-run-all": "4.1.5",
|
package/sandbox.js
CHANGED
|
@@ -589,9 +589,31 @@ const notificationUtils = require('./scripts/utils/notification/notification-uti
|
|
|
589
589
|
|
|
590
590
|
// })
|
|
591
591
|
|
|
592
|
+
// return Promise.resolve()
|
|
593
|
+
// .then(() => {
|
|
594
|
+
// const a = configUtils.packages.getCsdrRemotePackages()
|
|
595
|
+
// .map((p) => {
|
|
596
|
+
// return { name: p.name, npmPkg: p.npmPkg }
|
|
597
|
+
// });
|
|
598
|
+
// console.log(tools.sortArray(a, 'name'));
|
|
599
|
+
// })
|
|
592
600
|
return Promise.resolve()
|
|
593
601
|
.then(() => {
|
|
594
|
-
|
|
602
|
+
console.log('t1')
|
|
603
|
+
console.log(new Date());
|
|
604
|
+
|
|
605
|
+
return new Promise((resolve) => {
|
|
606
|
+
setTimeout(resolve, 8000);
|
|
607
|
+
});
|
|
608
|
+
})
|
|
609
|
+
|
|
610
|
+
.then(() => {
|
|
611
|
+
console.log('t2')
|
|
612
|
+
console.log(new Date());
|
|
613
|
+
})
|
|
614
|
+
|
|
615
|
+
.then(() => {
|
|
616
|
+
console.log('T3')
|
|
595
617
|
})
|
|
596
618
|
|
|
597
619
|
// return Promise.resolve()
|
|
@@ -35,6 +35,8 @@ const defaultConfig = {
|
|
|
35
35
|
EUI10: 'eui10'
|
|
36
36
|
},
|
|
37
37
|
isRouteModule: true,
|
|
38
|
+
isCsdrRepo: true,
|
|
39
|
+
externalRepoName: null,
|
|
38
40
|
pkgGroupId: 'eu.europa.ec.cc'
|
|
39
41
|
};
|
|
40
42
|
|
|
@@ -99,7 +101,7 @@ const prompt = () => {
|
|
|
99
101
|
return true;
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
|
-
},
|
|
104
|
+
},
|
|
103
105
|
{
|
|
104
106
|
name: 'pkgScope',
|
|
105
107
|
type: 'input',
|
|
@@ -123,7 +125,24 @@ const prompt = () => {
|
|
|
123
125
|
answers.pkgFrontendType !== defaultConfig.pkgFrontendType.REMOTE
|
|
124
126
|
);
|
|
125
127
|
}
|
|
126
|
-
}
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'isCsdrRepo',
|
|
131
|
+
type: 'confirm',
|
|
132
|
+
message: 'Is the repository within CSDR git project ?',
|
|
133
|
+
default: defaultConfig.isCsdrRepo
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'externalRepoName',
|
|
137
|
+
type: 'input',
|
|
138
|
+
message: 'Enter the project CITnet project name where the repository is located :',
|
|
139
|
+
default: defaultConfig.externalRepoName,
|
|
140
|
+
when: function (answers) {
|
|
141
|
+
return (
|
|
142
|
+
answers.isCsdrRepo === false
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
},
|
|
127
146
|
]);
|
|
128
147
|
})
|
|
129
148
|
|
|
@@ -134,26 +153,40 @@ const prompt = () => {
|
|
|
134
153
|
|
|
135
154
|
|
|
136
155
|
|
|
137
|
-
const buildFrontend = (name, scope, frontendType, frontendVersion, isRouteModule) => {
|
|
156
|
+
const buildFrontend = (name, scope, frontendType, frontendVersion, isRouteModule, isCsdrRepo, externalRepoName) => {
|
|
138
157
|
tools.logTitle('Generating package');
|
|
139
158
|
|
|
140
159
|
let fullName = scope.substr(1) + '-' + name;
|
|
160
|
+
let npmPkgName, repoName;
|
|
161
|
+
|
|
141
162
|
if (frontendType === defaultConfig.pkgFrontendType.DEFAULT) {
|
|
142
163
|
fullName += '-ui';
|
|
164
|
+
npmPkgName = `${scope}/${name}`;
|
|
165
|
+
|
|
143
166
|
} else if (frontendType === defaultConfig.pkgFrontendType.REMOTE) {
|
|
144
167
|
if (frontendVersion === defaultConfig.pkgFrontendVersion.EUI10) {
|
|
145
168
|
fullName += '-eui10-remote-el-ui';
|
|
169
|
+
npmPkgName = `${scope}/${name}-eui10-remote-el`;
|
|
170
|
+
|
|
146
171
|
} else {
|
|
147
172
|
fullName += '-remote-el-ui';
|
|
173
|
+
npmPkgName = `${scope}/${name}-remote-el`;
|
|
148
174
|
}
|
|
149
175
|
}
|
|
150
176
|
|
|
177
|
+
if (isCsdrRepo) {
|
|
178
|
+
repoName = `${fullName}.git`;
|
|
179
|
+
|
|
180
|
+
} else {
|
|
181
|
+
repoName = `${externalRepoName}/${fullName}.git`;
|
|
182
|
+
}
|
|
183
|
+
|
|
151
184
|
const targetPath = path.join(TARGET_ROOT_PATH, fullName);
|
|
152
185
|
|
|
153
186
|
const pkg = {
|
|
154
187
|
name: fullName,
|
|
155
|
-
|
|
156
|
-
npmPkgName:
|
|
188
|
+
repoName: repoName,
|
|
189
|
+
npmPkgName: npmPkgName
|
|
157
190
|
};
|
|
158
191
|
|
|
159
192
|
return Promise.resolve()
|
|
@@ -207,6 +240,9 @@ const buildFrontend = (name, scope, frontendType, frontendVersion, isRouteModule
|
|
|
207
240
|
.then(() => {
|
|
208
241
|
return tools.replaceInPath(targetPath, '@module.scope@', scope);
|
|
209
242
|
})
|
|
243
|
+
.then(() => {
|
|
244
|
+
return tools.replaceInPath(targetPath, '@module.scope-name@', `${scope.substr(1)}-${name}`);
|
|
245
|
+
})
|
|
210
246
|
.then(() => {
|
|
211
247
|
return tools.replaceInPath(targetPath, '@module.scope.string@', scope.substr(1));
|
|
212
248
|
})
|
|
@@ -338,10 +374,22 @@ module.exports.generate = () => {
|
|
|
338
374
|
console.log(answers);
|
|
339
375
|
|
|
340
376
|
if (answers.pkgType === defaultConfig.pkgType.FRONTEND) {
|
|
341
|
-
return buildFrontend(
|
|
377
|
+
return buildFrontend(
|
|
378
|
+
answers.pkgName,
|
|
379
|
+
answers.pkgScope,
|
|
380
|
+
answers.pkgFrontendType,
|
|
381
|
+
answers.pkgFrontendVersion,
|
|
382
|
+
answers.isRouteModule,
|
|
383
|
+
answers.isCsdrRepo,
|
|
384
|
+
answers.externalRepoName,
|
|
385
|
+
);
|
|
342
386
|
|
|
343
387
|
} else if (answers.pkgType === defaultConfig.pkgType.BACKEND) {
|
|
344
|
-
return buildBackend(
|
|
388
|
+
return buildBackend(
|
|
389
|
+
answers.pkgName,
|
|
390
|
+
answers.pkgScope,
|
|
391
|
+
answers.pkgGroupId,
|
|
392
|
+
);
|
|
345
393
|
}
|
|
346
394
|
})
|
|
347
395
|
|
|
@@ -35,14 +35,16 @@ import {
|
|
|
35
35
|
UxService,
|
|
36
36
|
} from '@eui/core';
|
|
37
37
|
import { LanguageInterceptor, PushNotificationsService, BreadcrumbsService } from '@csdr/core';
|
|
38
|
-
|
|
38
|
+
// TODO[REMOTE-SETUP] uncomment if zipkin is used
|
|
39
|
+
// import { TRACE_LOCAL_SERVICE_NAME, ZipkinHttpInterceptor, ZipkinTraceManager } from '@csdr/zipkin-tracing';
|
|
39
40
|
|
|
40
41
|
import { TOKEN, reducerProvider, metaReducers } from './reducers/index';
|
|
41
42
|
import { CustomSerializer } from './reducers/custom-route-serializer';
|
|
42
43
|
|
|
43
44
|
import { environment } from '../environments/environment';
|
|
44
45
|
|
|
45
|
-
//
|
|
46
|
+
// TODO[REMOTE-SETUP] - import from wrapped package
|
|
47
|
+
// import { TaskMgrCommonModule } from '@cc/task-manager';
|
|
46
48
|
import { ELEMENT_ROUTER_TOKEN, PushNotificationMapping, UxServiceMapping } from '@csdr/integration';
|
|
47
49
|
import { RoutingModule } from './routing.module';
|
|
48
50
|
|
|
@@ -65,7 +67,8 @@ export function openidConnectInterceptorFactory(config) {
|
|
|
65
67
|
TranslateModule,
|
|
66
68
|
|
|
67
69
|
UxAllModule,
|
|
68
|
-
|
|
70
|
+
// TODO import from package
|
|
71
|
+
// TaskMgrCommonModule,
|
|
69
72
|
RoutingModule,
|
|
70
73
|
],
|
|
71
74
|
declarations: [
|
|
@@ -108,12 +111,13 @@ export function openidConnectInterceptorFactory(config) {
|
|
|
108
111
|
deps: [CONFIG_TOKEN],
|
|
109
112
|
multi: true,
|
|
110
113
|
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
// TODO[REMOTE-SETUP] uncomment if zipkin is used
|
|
115
|
+
// {
|
|
116
|
+
// provide: HTTP_INTERCEPTORS,
|
|
117
|
+
// useClass: ZipkinHttpInterceptor,
|
|
118
|
+
// deps: [TRACE_LOCAL_SERVICE_NAME, ZipkinTraceManager],
|
|
119
|
+
// multi: true,
|
|
120
|
+
// },
|
|
117
121
|
{ provide: CONFIG_TOKEN, useFactory: () => window['PROVIDERS']['CONFIG_TOKEN'], deps: [] },
|
|
118
122
|
{
|
|
119
123
|
provide: UxService,
|
|
@@ -142,8 +146,9 @@ export function openidConnectInterceptorFactory(config) {
|
|
|
142
146
|
},
|
|
143
147
|
{ provide: BreadcrumbsService, useFactory: () => window['PROVIDERS']['BreadcrumbsService'], deps: [] },
|
|
144
148
|
{ provide: ELEMENT_ROUTER_TOKEN, useFactory: () => window['PROVIDERS']['ELEMENT_ROUTER_TOKEN'], deps: [] },
|
|
145
|
-
|
|
146
|
-
{ provide:
|
|
149
|
+
// TODO[REMOTE-SETUP] uncomment if zipkin is used
|
|
150
|
+
// { provide: TRACE_LOCAL_SERVICE_NAME, useFactory: () => window['PROVIDERS']['TRACE_LOCAL_SERVICE_NAME'], deps: [] },
|
|
151
|
+
// { provide: ZipkinTraceManager, useFactory: () => window['PROVIDERS']['ZipkinTraceManager'], deps: [] },
|
|
147
152
|
],
|
|
148
153
|
})
|
|
149
154
|
export class AppModule {
|
|
@@ -5,14 +5,16 @@ import { filter, distinctUntilChanged } from 'rxjs/operators';
|
|
|
5
5
|
|
|
6
6
|
import { CCRoute, ELEMENT_ROUTER_TOKEN, IRouterService } from '@csdr/integration';
|
|
7
7
|
|
|
8
|
-
//
|
|
8
|
+
// TODO[REMOTE-SETUP] adapt to wrapped package import
|
|
9
|
+
// import { routes } from '@cc/task-manager';
|
|
9
10
|
import { appConfig } from '../config/index';
|
|
10
11
|
import { ModuleComponent } from './module.component';
|
|
11
12
|
|
|
12
13
|
const prefixedRoutes: Routes = [
|
|
13
14
|
{
|
|
14
15
|
path: appConfig.global.baseUrl,
|
|
15
|
-
//
|
|
16
|
+
// TODO[REMOTE-SETUP] adapt to wrapped package import
|
|
17
|
+
// children: routes,
|
|
16
18
|
},
|
|
17
19
|
{ path: '**', component: ModuleComponent },
|
|
18
20
|
];
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export const GLOBAL = {
|
|
2
2
|
/* URL that needs to be used in the appRouting of the MWP */
|
|
3
3
|
baseUrl: '@module.name@',
|
|
4
|
-
/* the path/s where translation resources will be loaded */
|
|
5
|
-
i18nResources: ['elements/@module.full.name@/bundles/assets/i18n-compiled'],
|
|
6
4
|
/* Element tag name that needs to be unique - make sure it doesn't collide with any other MWP element */
|
|
7
|
-
elementName: '@module.scope
|
|
5
|
+
elementName: '@module.scope-name@-v7',
|
|
8
6
|
/* in case you are using NgRx give it a unique name (mostly for debugging) */
|
|
9
|
-
storeName: '@module.scope
|
|
7
|
+
storeName: '@module.scope-name@'
|
|
10
8
|
};
|
|
@@ -13,7 +13,6 @@ import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
|
|
13
13
|
|
|
14
14
|
import { TranslateModule } from '@ngx-translate/core';
|
|
15
15
|
|
|
16
|
-
// CSDR CORE - Babel defs & core reducers
|
|
17
16
|
import {
|
|
18
17
|
CachePreventionInterceptor,
|
|
19
18
|
CONFIG_TOKEN,
|
|
@@ -30,7 +29,8 @@ import {
|
|
|
30
29
|
UxAppShellService,
|
|
31
30
|
} from '@eui/core';
|
|
32
31
|
import { PushNotificationsService } from '@csdr/core';
|
|
33
|
-
|
|
32
|
+
// TODO[REMOTE-SETUP] uncomment if zipkin is used
|
|
33
|
+
// import { TRACE_LOCAL_SERVICE_NAME, ZipkinHttpInterceptor, ZipkinTraceManager } from '@csdr/zipkin-tracing';
|
|
34
34
|
|
|
35
35
|
import { TOKEN, reducerProvider, metaReducers } from './reducers/index';
|
|
36
36
|
import { CustomSerializer } from './reducers/custom-route-serializer';
|
|
@@ -38,7 +38,8 @@ import { CustomSerializer } from './reducers/custom-route-serializer';
|
|
|
38
38
|
import { environment } from '../environments/environment';
|
|
39
39
|
import { appConfig } from '../config';
|
|
40
40
|
|
|
41
|
-
//
|
|
41
|
+
// TODO[REMOTE-SETUP] adapt to wrapped package import
|
|
42
|
+
// import { TaskMgrCommonModule } from '@cc/task-manager';
|
|
42
43
|
import {
|
|
43
44
|
ELEMENT_ROUTER_TOKEN,
|
|
44
45
|
PushNotificationMapping,
|
|
@@ -68,7 +69,8 @@ export function openidConnectInterceptorFactory(config) {
|
|
|
68
69
|
|
|
69
70
|
CoreModule.forRoot(),
|
|
70
71
|
|
|
71
|
-
//
|
|
72
|
+
// TODO[REMOTE-SETUP] adapt to wrapped package import
|
|
73
|
+
// TaskMgrCommonModule,
|
|
72
74
|
RoutingModule,
|
|
73
75
|
],
|
|
74
76
|
declarations: [
|
|
@@ -110,12 +112,13 @@ export function openidConnectInterceptorFactory(config) {
|
|
|
110
112
|
deps: [CONFIG_TOKEN],
|
|
111
113
|
multi: true,
|
|
112
114
|
},
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
// TODO[REMOTE-SETUP] uncomment if zipkin is used
|
|
116
|
+
// {
|
|
117
|
+
// provide: HTTP_INTERCEPTORS,
|
|
118
|
+
// useClass: ZipkinHttpInterceptor,
|
|
119
|
+
// deps: [TRACE_LOCAL_SERVICE_NAME, ZipkinTraceManager],
|
|
120
|
+
// multi: true,
|
|
121
|
+
// },
|
|
119
122
|
|
|
120
123
|
// used in the el-mappers
|
|
121
124
|
{ provide: USER_SERVICE_HOST_TOKEN, useFactory: () => window['PROVIDERS']['UserService'] },
|
|
@@ -145,8 +148,9 @@ export function openidConnectInterceptorFactory(config) {
|
|
|
145
148
|
deps: [CONFIG_TOKEN, HttpClient, PLATFORM_ID, Router, StoreService, I18nService, UX_SERVICE_HOST_TOKEN],
|
|
146
149
|
},
|
|
147
150
|
{ provide: ELEMENT_ROUTER_TOKEN, useFactory: () => window['PROVIDERS']['ELEMENT_ROUTER_TOKEN'], deps: [] },
|
|
148
|
-
|
|
149
|
-
{ provide:
|
|
151
|
+
// TODO[REMOTE-SETUP] uncomment if zipkin is used
|
|
152
|
+
// { provide: TRACE_LOCAL_SERVICE_NAME, useFactory: () => window['PROVIDERS']['TRACE_LOCAL_SERVICE_NAME'], deps: [] },
|
|
153
|
+
// { provide: ZipkinTraceManager, useFactory: () => window['PROVIDERS']['ZipkinTraceManager'], deps: [] },
|
|
150
154
|
],
|
|
151
155
|
})
|
|
152
156
|
export class AppModule {
|
|
@@ -5,14 +5,16 @@ import { filter, distinctUntilChanged } from 'rxjs/operators';
|
|
|
5
5
|
|
|
6
6
|
import { CCRoute, ELEMENT_ROUTER_TOKEN, IRouterService } from '@csdr/integration';
|
|
7
7
|
|
|
8
|
-
//
|
|
8
|
+
// TODO[REMOTE-SETUP] adapt to wrapped package import
|
|
9
|
+
// import { routes } from '@cc/task-manager';
|
|
9
10
|
import { appConfig } from '../config/index';
|
|
10
11
|
import { ModuleComponent } from './module.component';
|
|
11
12
|
|
|
12
13
|
const prefixedRoutes: Routes = [
|
|
13
14
|
{
|
|
14
15
|
path: appConfig.global.baseUrl,
|
|
15
|
-
//
|
|
16
|
+
// TODO[REMOTE-SETUP] adapt to wrapped package import
|
|
17
|
+
// children: routes,
|
|
16
18
|
},
|
|
17
19
|
{ path: '**', component: ModuleComponent },
|
|
18
20
|
];
|
|
@@ -24,8 +24,8 @@ export const GLOBAL: GlobalConfig = {
|
|
|
24
24
|
/* URL that needs to be used in the appRouting of the MWP */
|
|
25
25
|
baseUrl: '@module.name@-v10',
|
|
26
26
|
/* Element tag name that needs to be unique - make sure it doesn't collide with any other MWP element */
|
|
27
|
-
elementName: '@module.scope
|
|
27
|
+
elementName: '@module.scope-name@-v10',
|
|
28
28
|
/* in case you are using NgRx give it a unique name (mostly for debugging) */
|
|
29
|
-
storeName: '@module.scope
|
|
29
|
+
storeName: '@module.scope-name@',
|
|
30
30
|
i18n: i18nConfig,
|
|
31
31
|
};
|
|
@@ -679,7 +679,8 @@ const tsConfigDef = {
|
|
|
679
679
|
],
|
|
680
680
|
"lib": [
|
|
681
681
|
"es2017",
|
|
682
|
-
"dom"
|
|
682
|
+
"dom",
|
|
683
|
+
"dom.iterable"
|
|
683
684
|
],
|
|
684
685
|
"paths": {}
|
|
685
686
|
}
|
|
@@ -775,30 +776,7 @@ module.exports.registerAngularPackageSubEntry = (subEntryName, subEntryPath) =>
|
|
|
775
776
|
}
|
|
776
777
|
|
|
777
778
|
|
|
778
|
-
module.exports.generateTsConfigLibProd = (pkg) => {
|
|
779
|
-
var pathBase = path.join('packages', pkg.name);
|
|
780
|
-
if (pkg.child) {
|
|
781
|
-
pathBase = path.join('packages', pkg.parentPkg, 'packages', pkg.folder);
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
const filePath = path.join(process.cwd(), pathBase, 'tsconfig.lib.prod.json');
|
|
785
|
-
tools.logInfo(`Generating ${filePath}`);
|
|
786
|
-
if (!tools.isFileExists(filePath)) {
|
|
787
|
-
tools.writeJsonFileSync(filePath, tsConfigProdDef);
|
|
788
|
-
tools.logSuccess();
|
|
789
779
|
|
|
790
|
-
} else {
|
|
791
|
-
tools.logSuccess('OK - file already exists');
|
|
792
|
-
// const fileContent = tools.getJsonFileContent(filePath);
|
|
793
|
-
// console.log(fileContent);
|
|
794
|
-
// if (JSON.stringify(fileContent) !== JSON.stringify(tsConfigProdDef)) {
|
|
795
|
-
// tools.writeJsonFileSync(filePath, tsConfigProdDef);
|
|
796
|
-
// tools.logSuccess('OK - file exists and updated');
|
|
797
|
-
// } else {
|
|
798
|
-
// tools.logSuccess('OK - file already exists and unchanged');
|
|
799
|
-
// }
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
780
|
|
|
803
781
|
|
|
804
782
|
module.exports.registerAngularProjectDef = (project, build = false) => {
|
|
@@ -444,10 +444,10 @@ module.exports.registerCsdrPackage = (pkg, isRemote) => {
|
|
|
444
444
|
|
|
445
445
|
const csdrConfigPackage = {
|
|
446
446
|
"name": "@module.full.name@",
|
|
447
|
-
"npmPkg": "@module.
|
|
447
|
+
"npmPkg": "@module.npmPkg.name@",
|
|
448
448
|
"deps": [
|
|
449
449
|
],
|
|
450
|
-
"repository": "@module.
|
|
450
|
+
"repository": "@module.repo.name@",
|
|
451
451
|
"teams": [
|
|
452
452
|
"all-frontend"
|
|
453
453
|
]
|
|
@@ -455,12 +455,13 @@ module.exports.registerCsdrPackage = (pkg, isRemote) => {
|
|
|
455
455
|
|
|
456
456
|
const csdrConfigRemotePackage = {
|
|
457
457
|
"name": "@module.full.name@",
|
|
458
|
-
"npmPkg": "@module.
|
|
458
|
+
"npmPkg": "@module.npmPkg.name@",
|
|
459
459
|
"deps": [
|
|
460
460
|
],
|
|
461
|
-
"repository": "@module.
|
|
461
|
+
"repository": "@module.repo.name@",
|
|
462
462
|
"element": true,
|
|
463
463
|
"remote": true,
|
|
464
|
+
"hostAppName": "my-workplace",
|
|
464
465
|
"teams": [
|
|
465
466
|
"all-frontend"
|
|
466
467
|
],
|
|
@@ -475,14 +476,17 @@ module.exports.registerCsdrPackage = (pkg, isRemote) => {
|
|
|
475
476
|
|
|
476
477
|
// inserting package in root config
|
|
477
478
|
let packageDef;
|
|
479
|
+
|
|
478
480
|
if (isRemote) {
|
|
479
481
|
packageDef = JSON.stringify(csdrConfigRemotePackage);
|
|
482
|
+
|
|
480
483
|
} else {
|
|
481
484
|
packageDef = JSON.stringify(csdrConfigPackage);
|
|
482
485
|
}
|
|
486
|
+
|
|
483
487
|
let replaceModule = tools.replaceAll(packageDef, '@module.full.name@', pkg.name);
|
|
484
|
-
replaceModule = tools.replaceAll(replaceModule, '@module.
|
|
485
|
-
replaceModule = tools.replaceAll(replaceModule, '@module.name@', pkg.npmPkgName);
|
|
488
|
+
replaceModule = tools.replaceAll(replaceModule, '@module.repo.name@', pkg.repoName);
|
|
489
|
+
replaceModule = tools.replaceAll(replaceModule, '@module.npmPkg.name@', pkg.npmPkgName);
|
|
486
490
|
|
|
487
491
|
let file = path.join(process.cwd(), '.csdr', '.euirc-csdr-packages.json');
|
|
488
492
|
let jsonFile = require(file);
|
|
@@ -202,6 +202,12 @@ module.exports.getRemotePackages = () => {
|
|
|
202
202
|
})
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
+
module.exports.getCsdrRemotePackages = () => {
|
|
206
|
+
return this.getCsdrPackagesFull().filter(pkg => {
|
|
207
|
+
return pkg.remote;
|
|
208
|
+
})
|
|
209
|
+
}
|
|
210
|
+
|
|
205
211
|
module.exports.getBuildablePackagesWithDeps = () => {
|
|
206
212
|
return this.getDepGraph().overallOrder().filter(pkg => {
|
|
207
213
|
if (!pkg.build) {
|
|
@@ -13,6 +13,12 @@ const innerPackages = require('./packages');
|
|
|
13
13
|
const innerProjects = require('./projects');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
// -------------------------------------------------------------------------------------
|
|
17
|
+
// Updates the .csdr/.euirc.json, storing locally installed projects and packages names
|
|
18
|
+
// --
|
|
19
|
+
// Called by "sync" - csdr/sync/sync-utils
|
|
20
|
+
// -------------------------------------------------------------------------------------
|
|
21
|
+
|
|
16
22
|
module.exports.run = () => {
|
|
17
23
|
tools.logInfo('Synching packages and local config');
|
|
18
24
|
|
|
@@ -52,7 +58,4 @@ module.exports.run = () => {
|
|
|
52
58
|
};
|
|
53
59
|
|
|
54
60
|
tools.writeJsonFileSync(path.join(process.cwd(), '.csdr', '.euirc.json'), config);
|
|
55
|
-
|
|
56
|
-
// update extra config files
|
|
57
|
-
|
|
58
61
|
}
|
|
@@ -217,6 +217,13 @@ module.exports.processLocalEuiVersions = () => {
|
|
|
217
217
|
const blDestFile = path.join(process.cwd(), '.browserslistrc');
|
|
218
218
|
|
|
219
219
|
tools.copy(blResourcesFile, blDestFile);
|
|
220
|
+
|
|
221
|
+
tools.logInfo(`Processing yarn.lock replacement for eUI version found : ${euiVersion}`);
|
|
222
|
+
|
|
223
|
+
const yResourcesFile = path.join(__dirname, 'resources', euiVersion, 'yarn.lock');
|
|
224
|
+
const yDestFile = path.join(process.cwd(), 'yarn.lock');
|
|
225
|
+
|
|
226
|
+
tools.copy(yResourcesFile, yDestFile);
|
|
220
227
|
}
|
|
221
228
|
})
|
|
222
229
|
.catch((e) => {
|