@eui/tools 4.16.5 → 4.17.2

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.
Files changed (42) hide show
  1. package/.version.properties +1 -1
  2. package/CHANGELOG.md +50 -0
  3. package/global.test.js +0 -2
  4. package/package.json +1 -2
  5. package/sandbox.js +23 -1
  6. package/scripts/csdr/cli/package.js +55 -7
  7. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/module.ts +12 -9
  8. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/app/routing.module.ts +4 -2
  9. package/scripts/csdr/cli/skeletons/package/frontend-remote/src/config/global.ts +2 -4
  10. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/package.json_TO_REPLACE +1 -1
  11. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/module.ts +16 -12
  12. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/app/routing.module.ts +4 -2
  13. package/scripts/csdr/cli/skeletons/package/frontend-remote-eui10/src/config/global.ts +2 -2
  14. package/scripts/csdr/config/angular.js +2 -24
  15. package/scripts/csdr/config/global.js +10 -6
  16. package/scripts/csdr/config/packages.js +6 -0
  17. package/scripts/csdr/config/sync.js +6 -3
  18. package/scripts/csdr/init/init-utils.js +14 -0
  19. package/scripts/csdr/init/resources/13.x/browserslistrc +6 -0
  20. package/scripts/csdr/init/resources/13.x/yarn.lock +14907 -0
  21. package/scripts/csdr/install/build-package.js +11 -3
  22. package/scripts/csdr/install/common.js +2 -0
  23. package/scripts/csdr/install/composite-utils.js +2 -0
  24. package/scripts/csdr/install/local-dev.js +2 -0
  25. package/scripts/csdr/install/remote.js +13 -9
  26. package/scripts/csdr/metadata/app.js +44 -4
  27. package/scripts/csdr/metadata/common.js +0 -48
  28. package/scripts/csdr/metadata/package.js +23 -0
  29. package/scripts/csdr/release/app/release-app.js +0 -13
  30. package/scripts/csdr/release/package/common.js +20 -0
  31. package/scripts/csdr/release/package/release-package.js +10 -1
  32. package/scripts/csdr/release/package/remote.js +2 -17
  33. package/scripts/csdr/version/package.js +1 -1
  34. package/scripts/utils/build/package/angular.js +4 -30
  35. package/scripts/utils/git-utils.js +13 -5
  36. package/scripts/utils/index.js +0 -2
  37. package/scripts/utils/pre-build/elements.js +7 -3
  38. package/scripts/utils/pre-build/injection/externals.js +59 -2
  39. package/scripts/utils/pre-build/projects.js +0 -7
  40. package/scripts/utils/pre-build/translations/elements.js +0 -6
  41. package/scripts/utils/confluence-utils.js +0 -126
  42. package/scripts/utils/pre-build/translations/common.js +0 -0
@@ -1 +1 @@
1
- 4.16.5
1
+ 4.17.2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,53 @@
1
+ ## 4.17.2 (2021-11-23)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * 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))
7
+
8
+ * * *
9
+ * * *
10
+ ## 4.17.1 (2021-11-19)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * **other:**
15
+ * 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))
16
+
17
+ * * *
18
+ * * *
19
+ ## 4.17.0 (2021-11-19)
20
+
21
+ ##### Chores
22
+
23
+ * **other:**
24
+ * remove confluence-api dep ([ac6aa1ed](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/ac6aa1eda7b0458c8dfc022d62fe302f3930ffdb))
25
+ * 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))
26
+ * update assets metadata to handle remotes array ([228328cd](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/228328cd6d973843b2bd9b64475dd3a94e67fb0e))
27
+ * adapted remote cli script for package injection ([935f691d](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/935f691db992cdace1bcb5b9779eacfda7ed83f9))
28
+ * adapted remote v7 skeleton ([6c94f676](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/6c94f67694b38455cd5abf5619843dc739deaf14))
29
+ ##### New Features
30
+
31
+ * **other:**
32
+ * 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))
33
+ ##### Bug Fixes
34
+
35
+ * **other:**
36
+ * tests ([367395e6](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/367395e6e2b8248af402b1bbdf151c9b95fc817c))
37
+ * eui10 remote package skeleton ([68998b13](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/68998b138cc7e79895891508e4105dc3eccedfe1))
38
+ * 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))
39
+
40
+ * * *
41
+ * * *
42
+ ## 4.16.6 (2021-11-08)
43
+
44
+ ##### Chores
45
+
46
+ * **other:**
47
+ * 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))
48
+
49
+ * * *
50
+ * * *
1
51
  ## 4.16.5 (2021-11-08)
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.16.5",
3
+ "version": "4.17.2",
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
- initUtils.processLocalEuiVersions();
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
- npmPkgScope: scope,
156
- npmPkgName: name
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(answers.pkgName, answers.pkgScope, answers.pkgFrontendType, answers.pkgFrontendVersion, answers.isRouteModule);
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(answers.pkgName, answers.pkgScope, answers.pkgGroupId);
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
- import { TRACE_LOCAL_SERVICE_NAME, ZipkinHttpInterceptor, ZipkinTraceManager } from '@csdr/zipkin-tracing';
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
- provide: HTTP_INTERCEPTORS,
113
- useClass: ZipkinHttpInterceptor,
114
- deps: [TRACE_LOCAL_SERVICE_NAME, ZipkinTraceManager],
115
- multi: true,
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
- { provide: TRACE_LOCAL_SERVICE_NAME, useFactory: () => window['PROVIDERS']['TRACE_LOCAL_SERVICE_NAME'], deps: [] },
146
- { provide: ZipkinTraceManager, useFactory: () => window['PROVIDERS']['ZipkinTraceManager'], deps: [] },
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
- // import { routes } from '@cc/task-manager'; // TODO import from package
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
- // children: routes, // TODO import from package
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@-@module.name@-v7',
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@ @module.name@',
7
+ storeName: '@module.scope-name@'
10
8
  };
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "@module.scope@/@module.name@-remote-el",
2
+ "name": "@module.scope@/@module.name@-eui10-remote-el",
3
3
  "version": "1.0.0",
4
4
  "files": [
5
5
  "bundles"
@@ -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
- import { TRACE_LOCAL_SERVICE_NAME, ZipkinHttpInterceptor, ZipkinTraceManager } from '@csdr/zipkin-tracing';
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
- // import { TaskMgrCommonModule } from '@cc/task-manager'; // TODO adapt to central package import
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
- // TaskMgrCommonModule, // TODO adapt to central package import
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
- provide: HTTP_INTERCEPTORS,
115
- useClass: ZipkinHttpInterceptor,
116
- deps: [TRACE_LOCAL_SERVICE_NAME, ZipkinTraceManager],
117
- multi: true,
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
- { provide: TRACE_LOCAL_SERVICE_NAME, useFactory: () => window['PROVIDERS']['TRACE_LOCAL_SERVICE_NAME'], deps: [] },
149
- { provide: ZipkinTraceManager, useFactory: () => window['PROVIDERS']['ZipkinTraceManager'], deps: [] },
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
- // import { routes } from '@cc/task-manager'; // TODO adapt to central package import
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
- // children: routes, // TODO adapt to central package routes
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@-@module.name@-v10',
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@ @module.name@',
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.scope@/@module.name@",
447
+ "npmPkg": "@module.npmPkg.name@",
448
448
  "deps": [
449
449
  ],
450
- "repository": "@module.full.name@.git",
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.scope@/@module.name@-remote-el",
458
+ "npmPkg": "@module.npmPkg.name@",
459
459
  "deps": [
460
460
  ],
461
- "repository": "@module.full.name@.git",
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.scope@', pkg.npmPkgScope);
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
  }
@@ -210,6 +210,20 @@ module.exports.processLocalEuiVersions = () => {
210
210
 
211
211
  tools.logInfo('Updating root package.json');
212
212
  tools.writeJsonFileSync(rootPackageJsonFile, rootPackageJson);
213
+
214
+ tools.logInfo(`Processing .browserlistrc replacement for eUI version found : ${euiVersion}`);
215
+
216
+ const blResourcesFile = path.join(__dirname, 'resources', euiVersion, 'browserslistrc');
217
+ const blDestFile = path.join(process.cwd(), '.browserslistrc');
218
+
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);
213
227
  }
214
228
  })
215
229
  .catch((e) => {
@@ -0,0 +1,6 @@
1
+ last 1 Chrome version
2
+ last 1 Firefox version
3
+ last 2 Edge major versions
4
+ last 2 Safari major versions
5
+ last 2 iOS major versions
6
+ Firefox ESR