@eui/tools 4.16.3 → 4.17.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 +50 -0
- package/global.test.js +0 -2
- package/package.json +1 -2
- package/sandbox.js +20 -12
- package/scripts/csdr/cli/package.js +55 -7
- package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.ts +12 -9
- 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 -25
- package/scripts/csdr/config/global.js +10 -6
- package/scripts/csdr/config/packages.js +9 -4
- package/scripts/csdr/config/projects.js +24 -6
- package/scripts/csdr/config/sync.js +6 -3
- package/scripts/csdr/init/init-utils.js +14 -1
- package/scripts/csdr/init/resources/13.x/browserslistrc +6 -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/release/app/release-app.js +0 -13
- package/scripts/csdr/release/package/common.js +7 -0
- package/scripts/csdr/release/package/release-package.js +4 -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 +13 -5
- 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.0
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
|
+
## 4.17.0 (2021-11-19)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* remove confluence-api dep ([ac6aa1ed](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/ac6aa1eda7b0458c8dfc022d62fe302f3930ffdb))
|
|
7
|
+
* 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))
|
|
8
|
+
* update assets metadata to handle remotes array ([228328cd](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/228328cd6d973843b2bd9b64475dd3a94e67fb0e))
|
|
9
|
+
* adapted remote cli script for package injection ([935f691d](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/935f691db992cdace1bcb5b9779eacfda7ed83f9))
|
|
10
|
+
* adapted remote v7 skeleton ([6c94f676](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/6c94f67694b38455cd5abf5619843dc739deaf14))
|
|
11
|
+
##### New Features
|
|
12
|
+
|
|
13
|
+
* **other:**
|
|
14
|
+
* 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))
|
|
15
|
+
##### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **other:**
|
|
18
|
+
* tests ([367395e6](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/367395e6e2b8248af402b1bbdf151c9b95fc817c))
|
|
19
|
+
* eui10 remote package skeleton ([68998b13](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/68998b138cc7e79895891508e4105dc3eccedfe1))
|
|
20
|
+
* 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))
|
|
21
|
+
|
|
22
|
+
* * *
|
|
23
|
+
* * *
|
|
24
|
+
## 4.16.6 (2021-11-08)
|
|
25
|
+
|
|
26
|
+
##### Chores
|
|
27
|
+
|
|
28
|
+
* **other:**
|
|
29
|
+
* added browserslistrc resources patching for eui v13 csdr init - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([b9f8498f](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/b9f8498fa7eac879e4135f7c214925428ac81da0))
|
|
30
|
+
|
|
31
|
+
* * *
|
|
32
|
+
* * *
|
|
33
|
+
## 4.16.5 (2021-11-08)
|
|
34
|
+
|
|
35
|
+
##### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* **other:**
|
|
38
|
+
* enable eUI version scanning of local projects and packages - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([83112806](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/83112806b51969ed6672dbec1e2423b86983f45d))
|
|
39
|
+
|
|
40
|
+
* * *
|
|
41
|
+
* * *
|
|
42
|
+
## 4.16.4 (2021-11-08)
|
|
43
|
+
|
|
44
|
+
##### Chores
|
|
45
|
+
|
|
46
|
+
* **other:**
|
|
47
|
+
* generated spec files for non-src folder - issue with sub-entries eui-components - EUI-4107 [EUI-4107](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-4107) ([d72c570a](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/d72c570a42f268c6b8f8118af9988ffc18ea789a))
|
|
48
|
+
|
|
49
|
+
* * *
|
|
50
|
+
* * *
|
|
1
51
|
## 4.16.3 (2021-11-03)
|
|
2
52
|
|
|
3
53
|
##### Bug Fixes
|
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.0",
|
|
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
|
@@ -591,20 +591,28 @@ const notificationUtils = require('./scripts/utils/notification/notification-uti
|
|
|
591
591
|
|
|
592
592
|
// return Promise.resolve()
|
|
593
593
|
// .then(() => {
|
|
594
|
-
//
|
|
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'));
|
|
595
599
|
// })
|
|
596
|
-
|
|
597
600
|
return Promise.resolve()
|
|
598
601
|
.then(() => {
|
|
599
|
-
|
|
600
|
-
tools.logTitle('TITLE');
|
|
601
|
-
tools.logInfo('test log info');
|
|
602
|
-
tools.logInfo('test log info');
|
|
603
|
-
tools.logInfo('test log info');
|
|
604
|
-
tools.logSuccess('test log success');
|
|
605
|
-
tools.logError('test log error');
|
|
606
|
-
tools.logWarning('test log warning');
|
|
607
|
-
tools.logAccent('test log accent');
|
|
608
|
-
tools.logBanner('this is the content of the banner');
|
|
602
|
+
return metadataUtils.app.storeMetadataAssetsStandAlone();
|
|
609
603
|
})
|
|
610
604
|
|
|
605
|
+
// return Promise.resolve()
|
|
606
|
+
// .then(() => {
|
|
607
|
+
// tools.logBigTitle('BIG TITLE');
|
|
608
|
+
// tools.logTitle('TITLE');
|
|
609
|
+
// tools.logInfo('test log info');
|
|
610
|
+
// tools.logInfo('test log info');
|
|
611
|
+
// tools.logInfo('test log info');
|
|
612
|
+
// tools.logSuccess('test log success');
|
|
613
|
+
// tools.logError('test log error');
|
|
614
|
+
// tools.logWarning('test log warning');
|
|
615
|
+
// tools.logAccent('test log accent');
|
|
616
|
+
// tools.logBanner('this is the content of the banner');
|
|
617
|
+
// })
|
|
618
|
+
|
|
@@ -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,7 +35,8 @@ 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';
|
|
@@ -108,12 +109,13 @@ export function openidConnectInterceptorFactory(config) {
|
|
|
108
109
|
deps: [CONFIG_TOKEN],
|
|
109
110
|
multi: true,
|
|
110
111
|
},
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
// TODO[REMOTE-SETUP] uncomment if zipkin is used
|
|
113
|
+
// {
|
|
114
|
+
// provide: HTTP_INTERCEPTORS,
|
|
115
|
+
// useClass: ZipkinHttpInterceptor,
|
|
116
|
+
// deps: [TRACE_LOCAL_SERVICE_NAME, ZipkinTraceManager],
|
|
117
|
+
// multi: true,
|
|
118
|
+
// },
|
|
117
119
|
{ provide: CONFIG_TOKEN, useFactory: () => window['PROVIDERS']['CONFIG_TOKEN'], deps: [] },
|
|
118
120
|
{
|
|
119
121
|
provide: UxService,
|
|
@@ -142,8 +144,9 @@ export function openidConnectInterceptorFactory(config) {
|
|
|
142
144
|
},
|
|
143
145
|
{ provide: BreadcrumbsService, useFactory: () => window['PROVIDERS']['BreadcrumbsService'], deps: [] },
|
|
144
146
|
{ provide: ELEMENT_ROUTER_TOKEN, useFactory: () => window['PROVIDERS']['ELEMENT_ROUTER_TOKEN'], deps: [] },
|
|
145
|
-
|
|
146
|
-
{ provide:
|
|
147
|
+
// TODO[REMOTE-SETUP] uncomment if zipkin is used
|
|
148
|
+
// { provide: TRACE_LOCAL_SERVICE_NAME, useFactory: () => window['PROVIDERS']['TRACE_LOCAL_SERVICE_NAME'], deps: [] },
|
|
149
|
+
// { provide: ZipkinTraceManager, useFactory: () => window['PROVIDERS']['ZipkinTraceManager'], deps: [] },
|
|
147
150
|
],
|
|
148
151
|
})
|
|
149
152
|
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
|
};
|
|
@@ -775,30 +775,7 @@ module.exports.registerAngularPackageSubEntry = (subEntryName, subEntryPath) =>
|
|
|
775
775
|
}
|
|
776
776
|
|
|
777
777
|
|
|
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
778
|
|
|
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
|
-
|
|
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
779
|
|
|
803
780
|
|
|
804
781
|
module.exports.registerAngularProjectDef = (project, build = false) => {
|
|
@@ -975,8 +952,8 @@ module.exports.registerModulePaths = (pkg, isReset) => {
|
|
|
975
952
|
jsonFileDev['compilerOptions']['paths'][`${pkg.npmPkgScope}/${pkg.npmPkgName}/*`] = [`${pathBase}/${pkg.folder || pkg.name}/*`];
|
|
976
953
|
jsonFileBuild['compilerOptions']['paths'][`${pkg.npmPkgScope}/${pkg.npmPkgName}`] = [`${pathBase}/${pkg.folder || pkg.name}/dist`];
|
|
977
954
|
jsonFileBuild['compilerOptions']['paths'][`${pkg.npmPkgScope}/${pkg.npmPkgName}/*`] = [`${pathBase}/${pkg.folder || pkg.name}/dist/*`];
|
|
978
|
-
jsonFileBuildSpec['compilerOptions']['paths'][`${pkg.npmPkgScope}/${pkg.npmPkgName}`] = [`${pathBase}/${pkg.folder || pkg.name}
|
|
979
|
-
jsonFileBuildSpec['compilerOptions']['paths'][`${pkg.npmPkgScope}/${pkg.npmPkgName}/*`] = [`${pathBase}/${pkg.folder || pkg.name}
|
|
955
|
+
jsonFileBuildSpec['compilerOptions']['paths'][`${pkg.npmPkgScope}/${pkg.npmPkgName}`] = [`${pathBase}/${pkg.folder || pkg.name}`];
|
|
956
|
+
jsonFileBuildSpec['compilerOptions']['paths'][`${pkg.npmPkgScope}/${pkg.npmPkgName}/*`] = [`${pathBase}/${pkg.folder || pkg.name}/*`];
|
|
980
957
|
}
|
|
981
958
|
|
|
982
959
|
|
|
@@ -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);
|
|
@@ -6,7 +6,6 @@ const fs = require('fs');
|
|
|
6
6
|
|
|
7
7
|
// LOCAL
|
|
8
8
|
const tools = require('../../utils/tools');
|
|
9
|
-
const configUtils = require('./config-utils');
|
|
10
9
|
|
|
11
10
|
// INNER MODULES
|
|
12
11
|
const innerGlobal = require('./global');
|
|
@@ -32,7 +31,7 @@ module.exports.getCsdrPackagesFull = (flattenChildren = true) => {
|
|
|
32
31
|
return outputPackages;
|
|
33
32
|
}
|
|
34
33
|
|
|
35
|
-
module.exports.getPackages = () => {
|
|
34
|
+
const getPackages = module.exports.getPackages = () => {
|
|
36
35
|
const packages = innerGlobal.getConfig().packages;
|
|
37
36
|
const packagesKeys = Object.keys(packages);
|
|
38
37
|
|
|
@@ -203,6 +202,12 @@ module.exports.getRemotePackages = () => {
|
|
|
203
202
|
})
|
|
204
203
|
}
|
|
205
204
|
|
|
205
|
+
module.exports.getCsdrRemotePackages = () => {
|
|
206
|
+
return this.getCsdrPackagesFull().filter(pkg => {
|
|
207
|
+
return pkg.remote;
|
|
208
|
+
})
|
|
209
|
+
}
|
|
210
|
+
|
|
206
211
|
module.exports.getBuildablePackagesWithDeps = () => {
|
|
207
212
|
return this.getDepGraph().overallOrder().filter(pkg => {
|
|
208
213
|
if (!pkg.build) {
|
|
@@ -237,9 +242,9 @@ module.exports.getDepGraph = () => {
|
|
|
237
242
|
|
|
238
243
|
|
|
239
244
|
module.exports.getLocalPackagesEuiVersion = () => {
|
|
240
|
-
tools.logInfo('getting local installed eUI version...');
|
|
245
|
+
tools.logInfo('getting local packages installed eUI version...');
|
|
241
246
|
|
|
242
|
-
const pkgs =
|
|
247
|
+
const pkgs = getPackages();
|
|
243
248
|
let versionsFound = [];
|
|
244
249
|
|
|
245
250
|
pkgs.forEach((p) => {
|
|
@@ -5,7 +5,6 @@ const path = require('path');
|
|
|
5
5
|
|
|
6
6
|
// LOCAL
|
|
7
7
|
const tools = require('../../utils/tools');
|
|
8
|
-
const versionUtils = require('../version/version-utils');
|
|
9
8
|
|
|
10
9
|
// INNER MODULES
|
|
11
10
|
const innerGlobal = require('./global');
|
|
@@ -36,12 +35,8 @@ const getProjectOptions = (prj) => {
|
|
|
36
35
|
return { options: options };
|
|
37
36
|
}
|
|
38
37
|
|
|
39
|
-
const getProjectPaths = (prj) => {
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
module.exports.getProjects = () => {
|
|
39
|
+
const getProjects = module.exports.getProjects = () => {
|
|
45
40
|
const projects = innerGlobal.getConfig().projects;
|
|
46
41
|
return Object.keys(projects).map(p => this.getProject(p));
|
|
47
42
|
}
|
|
@@ -214,3 +209,26 @@ module.exports.getBaseHref = (prj, version, providedBaseHref) => {
|
|
|
214
209
|
return null;
|
|
215
210
|
}
|
|
216
211
|
|
|
212
|
+
|
|
213
|
+
module.exports.getLocalProjectsEuiVersion = () => {
|
|
214
|
+
tools.logInfo('getting local projects installed eUI version...');
|
|
215
|
+
|
|
216
|
+
const prjs = getProjects();
|
|
217
|
+
let versionsFound = [];
|
|
218
|
+
|
|
219
|
+
prjs.forEach((p) => {
|
|
220
|
+
let version = 'DEFAULT';
|
|
221
|
+
|
|
222
|
+
if (p.build) {
|
|
223
|
+
if (p.build.euiVersion) {
|
|
224
|
+
version = p.build.euiVersion;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
tools.logInfo(`checking ${p.name} - version found : ${version}`);
|
|
228
|
+
versionsFound.push(version);
|
|
229
|
+
})
|
|
230
|
+
|
|
231
|
+
versionsFound = tools.removeArrayDuplicates(versionsFound);
|
|
232
|
+
|
|
233
|
+
return versionsFound;
|
|
234
|
+
}
|
|
@@ -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
|
}
|