@eui/cli 21.0.0-alpha.9 → 21.0.0-next.10
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/README.md +1 -1
- package/bin/eui-cli.js +61 -41
- package/bin/scripts/build-app.js +12 -0
- package/bin/scripts/lint-app.js +22 -0
- package/bin/scripts/new.js +39 -0
- package/bin/scripts/serve-app.js +12 -0
- package/lib/app-utils/build.js +176 -0
- package/lib/app-utils/projects.js +41 -0
- package/lib/app-utils/serve.js +78 -0
- package/lib/build.js +14 -39
- package/lib/cli.js +22 -5
- package/lib/config.js +1 -0
- package/lib/generators.js +5 -8
- package/lib/install.js +7 -7
- package/lib/post-build.js +1 -3
- package/lib/skeletons/_angular/base/angular.json +12 -25
- package/lib/skeletons/_angular/base/eslint.config.js +43 -0
- package/lib/skeletons/_angular/base/package.json +29 -23
- package/lib/skeletons/_angular/base/src/app/app-starter.service.spec.ts +8 -6
- package/lib/skeletons/_angular/base/src/app/app.component.html +3 -3
- package/lib/skeletons/_angular/base/src/app/app.component.spec.ts +15 -13
- package/lib/skeletons/_angular/base/src/app/app.component.ts +2 -2
- package/lib/skeletons/_angular/base/src/app/features/home/home.component.html +1 -1
- package/lib/skeletons/_angular/base/src/app/features/home/home.component.ts +5 -3
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page1/page1.component.html +1 -1
- package/lib/skeletons/_angular/base/src/app/features/module1/components/page2/page2.component.html +1 -1
- package/lib/skeletons/_angular/base/src/app/features/module1/module1.component.html +2 -4
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.component.html +1 -1
- package/lib/skeletons/_angular/base/src/app/features/module2/module2.component.ts +1 -1
- package/lib/skeletons/_angular/base/src/dummy.spec.ts +2 -0
- package/lib/skeletons/_angular/base/src/karma.conf.js +42 -2
- package/lib/skeletons/_angular/base/src/tsconfig.app.json +3 -0
- package/lib/skeletons/_angular/base/src/tsconfig.spec.json +1 -5
- package/lib/skeletons/_angular/base/tsconfig.json +28 -24
- package/lib/skeletons/_angular/base-mobile/package.json +4 -4
- package/lib/skeletons/_angular/base-mobile/tsconfig.json +27 -0
- package/lib/skeletons/_angular/options/ecl-ec/src/app/app.component.ts +16 -16
- package/lib/skeletons/_angular/options/ecl-ec/src/app/features/home/home.component.ts +4 -4
- package/lib/skeletons/_angular/options/ecl-eu/src/app/app.component.ts +16 -16
- package/lib/skeletons/_angular/options/ecl-eu/src/app/features/home/home.component.ts +4 -4
- package/lib/skeletons/_angular/options/ecl-eu/src/app/shared/shared.module.ts +1 -5
- package/lib/skeletons/_angular/options/pnpm/package.json +72 -0
- package/lib/utils.js +204 -0
- package/package.json +10 -13
- package/.version.properties +0 -1
- package/lib/skeletons/_angular/base/.euirc.json +0 -8
- package/lib/skeletons/_angular/base/src/.eslintrc.json +0 -121
- package/lib/skeletons/web-symfony/myapp-web/angular.json +0 -169
- package/lib/skeletons/web-symfony/myapp-web/package.json +0 -23
- package/lib/skeletons/web-symfony/myapp-web/src/app/app-routing.module.ts +0 -18
- package/lib/skeletons/web-symfony/myapp-web/src/app/app.component.ts +0 -77
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/components/products.component.html +0 -160
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/components/products.component.scss +0 -0
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/components/products.component.ts +0 -104
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/models/product.model.ts +0 -6
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/products-routing.module.ts +0 -16
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/products.module.ts +0 -16
- package/lib/skeletons/web-symfony/myapp-web/src/app/features/products/services/products.service.ts +0 -29
- package/lib/skeletons/web-symfony/myapp-web/src/environments/environment.ts +0 -17
- package/lib/skeletons/web-symfony/myapp-web-rest/.env +0 -28
- package/lib/skeletons/web-symfony/myapp-web-rest/bin/console +0 -42
- package/lib/skeletons/web-symfony/myapp-web-rest/composer.json +0 -67
- package/lib/skeletons/web-symfony/myapp-web-rest/composer.lock +0 -3572
- package/lib/skeletons/web-symfony/myapp-web-rest/config/bootstrap.php +0 -21
- package/lib/skeletons/web-symfony/myapp-web-rest/config/bundles.php +0 -12
- package/lib/skeletons/web-symfony/myapp-web-rest/config/config.yml +0 -0
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/cache.yaml +0 -19
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/dev/routing.yaml +0 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/doctrine.yaml +0 -29
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/doctrine_migrations.yaml +0 -5
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/framework.yaml +0 -17
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/prod/doctrine.yaml +0 -32
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/routing.yaml +0 -4
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/sensio_framework_extra.yaml +0 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/test/framework.yaml +0 -4
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/test/routing.yaml +0 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/packages/twig.yaml +0 -4
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes/annotations.yaml +0 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes/dev/twig.yaml +0 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/routes.yaml +0 -3
- package/lib/skeletons/web-symfony/myapp-web-rest/config/services.yaml +0 -27
- package/lib/skeletons/web-symfony/myapp-web-rest/public/index.php +0 -27
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Controller/ProductController.php +0 -196
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Entity/Product.php +0 -99
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Kernel.php +0 -53
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Migrations/Version20190604101623.php +0 -31
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Migrations/Version20190604101638.php +0 -35
- package/lib/skeletons/web-symfony/myapp-web-rest/src/Repository/ProductRepository.php +0 -51
- package/lib/skeletons/web-symfony/myapp-web-rest/symfony.lock +0 -274
- package/lib/skeletons/web-symfony/myapp-web-rest/templates/base.html.twig +0 -12
- package/lib/skeletons/web-symfony/myapp-web-rest/templates/lucky/number.html.twig +0 -1
- package/lib/skeletons/web-symfony/myapp-web-rest/templates/product/index.html.twig +0 -20
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compileOnSave": false,
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"baseUrl": "./",
|
|
5
|
+
"outDir": "./dist/out-tsc",
|
|
6
|
+
"target": "ES2022",
|
|
7
|
+
"module": "ES2022",
|
|
8
|
+
"useDefineForClassFields": false,
|
|
9
|
+
"lib": [
|
|
10
|
+
"ES2022",
|
|
11
|
+
"dom"
|
|
12
|
+
],
|
|
13
|
+
"sourceMap": true,
|
|
14
|
+
"declaration": false,
|
|
15
|
+
"moduleResolution": "node",
|
|
16
|
+
"emitDecoratorMetadata": false,
|
|
17
|
+
"experimentalDecorators": true,
|
|
18
|
+
"allowSyntheticDefaultImports": true,
|
|
19
|
+
"importHelpers": true,
|
|
20
|
+
"typeRoots": [
|
|
21
|
+
"node_modules/@types"
|
|
22
|
+
],
|
|
23
|
+
"paths": {
|
|
24
|
+
"@shared/*": ["src/app/shared/*"],
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
UserService,
|
|
5
5
|
UserState,
|
|
6
6
|
} from '@eui/core';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { EclSiteHeaderLoginEvent,
|
|
7
|
+
import { EUI_ECL_APP } from '@eui/ecl/components/ecl-app';
|
|
8
|
+
import { EUI_ECL_BREADCRUMB } from '@eui/ecl/components/ecl-breadcrumb';
|
|
9
|
+
import { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';
|
|
10
|
+
import { EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';
|
|
11
|
+
import { EclMenuItemSelectEvent, EUI_ECL_MENU } from '@eui/ecl/components/ecl-menu';
|
|
12
|
+
import { EUI_ECL_PAGE_HEADER } from '@eui/ecl/components/ecl-page-header';
|
|
13
|
+
import { EUI_ECL_SITE_FOOTER } from '@eui/ecl/components/ecl-site-footer';
|
|
14
|
+
import { EclSiteHeaderLoginEvent, EclSiteHeaderSearchEvent, EUI_ECL_SITE_HEADER } from '@eui/ecl/components/ecl-site-header';
|
|
15
15
|
import { TranslateModule } from '@ngx-translate/core';
|
|
16
16
|
|
|
17
17
|
@Component({
|
|
@@ -19,14 +19,14 @@ import { TranslateModule } from '@ngx-translate/core';
|
|
|
19
19
|
templateUrl: './app.component.html',
|
|
20
20
|
standalone: true,
|
|
21
21
|
imports: [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
...EUI_ECL_APP,
|
|
23
|
+
...EUI_ECL_BREADCRUMB,
|
|
24
|
+
...EUI_ECL_ICON,
|
|
25
|
+
...EUI_ECL_LINK,
|
|
26
|
+
...EUI_ECL_MENU,
|
|
27
|
+
...EUI_ECL_PAGE_HEADER,
|
|
28
|
+
...EUI_ECL_SITE_HEADER,
|
|
29
|
+
...EUI_ECL_SITE_FOOTER,
|
|
30
30
|
RouterOutlet,
|
|
31
31
|
TranslateModule,
|
|
32
32
|
]
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Component, Inject } from '@angular/core';
|
|
2
2
|
import { CONFIG_TOKEN, EuiAppConfig } from '@eui/core';
|
|
3
|
+
import { EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';
|
|
4
|
+
import { EUI_ECL_LIST } from '@eui/ecl/components/ecl-list';
|
|
3
5
|
import { TranslateModule } from '@ngx-translate/core';
|
|
4
|
-
import { EclListModule } from '@eui/ecl/components/ecl-list';
|
|
5
|
-
import { EclLinkModule } from '@eui/ecl/components/ecl-link';
|
|
6
6
|
|
|
7
7
|
@Component({
|
|
8
8
|
templateUrl: './home.component.html',
|
|
9
9
|
standalone: true,
|
|
10
10
|
imports: [
|
|
11
11
|
TranslateModule,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
...EUI_ECL_LINK,
|
|
13
|
+
...EUI_ECL_LIST,
|
|
14
14
|
],
|
|
15
15
|
})
|
|
16
16
|
export class HomeComponent {
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
UserService,
|
|
5
5
|
UserState,
|
|
6
6
|
} from '@eui/core';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { EclSiteHeaderLoginEvent,
|
|
7
|
+
import { EUI_ECL_APP } from '@eui/ecl/components/ecl-app';
|
|
8
|
+
import { EUI_ECL_BREADCRUMB } from '@eui/ecl/components/ecl-breadcrumb';
|
|
9
|
+
import { EUI_ECL_ICON } from '@eui/ecl/components/ecl-icon';
|
|
10
|
+
import { EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';
|
|
11
|
+
import { EclMenuItemSelectEvent, EUI_ECL_MENU } from '@eui/ecl/components/ecl-menu';
|
|
12
|
+
import { EUI_ECL_PAGE_HEADER } from '@eui/ecl/components/ecl-page-header';
|
|
13
|
+
import { EUI_ECL_SITE_FOOTER } from '@eui/ecl/components/ecl-site-footer';
|
|
14
|
+
import { EclSiteHeaderLoginEvent, EclSiteHeaderSearchEvent, EUI_ECL_SITE_HEADER } from '@eui/ecl/components/ecl-site-header';
|
|
15
15
|
import { TranslateModule } from '@ngx-translate/core';
|
|
16
16
|
|
|
17
17
|
@Component({
|
|
@@ -19,14 +19,14 @@ import { TranslateModule } from '@ngx-translate/core';
|
|
|
19
19
|
templateUrl: './app.component.html',
|
|
20
20
|
standalone: true,
|
|
21
21
|
imports: [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
...EUI_ECL_APP,
|
|
23
|
+
...EUI_ECL_BREADCRUMB,
|
|
24
|
+
...EUI_ECL_ICON,
|
|
25
|
+
...EUI_ECL_LINK,
|
|
26
|
+
...EUI_ECL_MENU,
|
|
27
|
+
...EUI_ECL_PAGE_HEADER,
|
|
28
|
+
...EUI_ECL_SITE_HEADER,
|
|
29
|
+
...EUI_ECL_SITE_FOOTER,
|
|
30
30
|
RouterOutlet,
|
|
31
31
|
TranslateModule,
|
|
32
32
|
]
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Component, Inject } from '@angular/core';
|
|
2
2
|
import { CONFIG_TOKEN, EuiAppConfig } from '@eui/core';
|
|
3
|
+
import { EUI_ECL_LINK } from '@eui/ecl/components/ecl-link';
|
|
4
|
+
import { EUI_ECL_LIST } from '@eui/ecl/components/ecl-list';
|
|
3
5
|
import { TranslateModule } from '@ngx-translate/core';
|
|
4
|
-
import { EclListModule } from '@eui/ecl/components/ecl-list';
|
|
5
|
-
import { EclLinkModule } from '@eui/ecl/components/ecl-link';
|
|
6
6
|
|
|
7
7
|
@Component({
|
|
8
8
|
templateUrl: './home.component.html',
|
|
9
9
|
standalone: true,
|
|
10
10
|
imports: [
|
|
11
11
|
TranslateModule,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
...EUI_ECL_LINK,
|
|
13
|
+
...EUI_ECL_LIST,
|
|
14
14
|
],
|
|
15
15
|
})
|
|
16
16
|
export class HomeComponent {
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
1
2
|
import { NgModule } from '@angular/core';
|
|
2
3
|
import { RouterModule } from '@angular/router';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { TranslateModule } from '@ngx-translate/core';
|
|
5
5
|
|
|
6
|
-
import { EclAllModule } from '@eui/ecl';
|
|
7
|
-
|
|
8
6
|
const MODULES = [
|
|
9
7
|
RouterModule,
|
|
10
|
-
EclAllModule,
|
|
11
8
|
TranslateModule,
|
|
12
9
|
CommonModule,
|
|
13
10
|
];
|
|
14
11
|
@NgModule({
|
|
15
12
|
imports: [...MODULES],
|
|
16
|
-
declarations: [],
|
|
17
13
|
exports: [...MODULES],
|
|
18
14
|
})
|
|
19
15
|
export class SharedModule {}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "eui-angular-app",
|
|
3
|
+
"version": "21.0.0-next.10",
|
|
4
|
+
"license": "EUPL-1.1",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"ng": "ng",
|
|
7
|
+
"start-mock-server": "nodemon --watch ./mock ./mock/server.js",
|
|
8
|
+
"start-serve": "eui-cli serve-app --configuration=proxy-mock",
|
|
9
|
+
"start": "npm-run-all --parallel start-mock-server start-serve",
|
|
10
|
+
"start-proxy": "eui-cli serve-app --configuration=proxy",
|
|
11
|
+
"start-local": "eui-cli serve-app",
|
|
12
|
+
"build": "eui-cli build-app",
|
|
13
|
+
"build-dev": "eui-cli build-app --configuration=development --configEnvTarget=dev",
|
|
14
|
+
"build-prod": "eui-cli build-app --configuration=production-optimized --configEnvTarget=prod --skipLint --skipTest",
|
|
15
|
+
"app:inject-config": "eui-cli inject-config-app",
|
|
16
|
+
"generate-changelog": "eui-cli generate-changelog",
|
|
17
|
+
"generate-sprite": "eui-cli generate-sprite"
|
|
18
|
+
},
|
|
19
|
+
"private": true,
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@angular/animations": "21.0.0",
|
|
22
|
+
"@angular/common": "21.0.0",
|
|
23
|
+
"@angular/compiler": "21.0.0",
|
|
24
|
+
"@angular/core": "21.0.0",
|
|
25
|
+
"@angular/forms": "21.0.0",
|
|
26
|
+
"@angular/platform-browser": "21.0.0",
|
|
27
|
+
"@angular/platform-browser-dynamic": "21.0.0",
|
|
28
|
+
"@angular/router": "21.0.0",
|
|
29
|
+
"@angular/elements": "21.0.0",
|
|
30
|
+
"@angular/language-service": "21.0.0",
|
|
31
|
+
"@angular/service-worker": "21.0.0",
|
|
32
|
+
"@angular/cdk": "21.0.0",
|
|
33
|
+
"@angular/material": "21.0.0",
|
|
34
|
+
"@angular/material-moment-adapter": "21.0.0",
|
|
35
|
+
"@angular-devkit/build-angular": "21.0.0",
|
|
36
|
+
"rxjs": "7.8.2",
|
|
37
|
+
"tslib": "2.8.1",
|
|
38
|
+
"zone.js": "0.15.1",
|
|
39
|
+
"@types/lodash": "4.17.20",
|
|
40
|
+
"intl": "1.2.5",
|
|
41
|
+
"deepmerge-ts": "7.1.5",
|
|
42
|
+
"@ngx-translate/core": "15.0.0",
|
|
43
|
+
"@ngx-translate/http-loader": "8.0.0",
|
|
44
|
+
"reselect": "5.1.1",
|
|
45
|
+
"ngx-mask": "20.0.3",
|
|
46
|
+
"cleave.js": "1.6.0",
|
|
47
|
+
"hammerjs": "2.0.8",
|
|
48
|
+
"pikaday": "1.8.2",
|
|
49
|
+
"lodash-es": "4.17.21",
|
|
50
|
+
"localforage": "1.10.0",
|
|
51
|
+
"@eui/base": "21.0.0-next.10",
|
|
52
|
+
"@eui/core": "21.0.0-next.10",
|
|
53
|
+
"@eui/styles": "21.0.0-next.10",
|
|
54
|
+
"@eui/components": "21.0.0-next.10",
|
|
55
|
+
"@eui/ecl": "21.0.0-next.10"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@angular/build": "21.0.0",
|
|
59
|
+
"@angular/compiler-cli": "21.0.0",
|
|
60
|
+
"@angular/cli": "21.0.0",
|
|
61
|
+
"@eui/cli": "21.0.0-next.10",
|
|
62
|
+
"ng-packagr": "21.0.0",
|
|
63
|
+
"typescript": "5.9.2",
|
|
64
|
+
"npm-run-all": "4.1.5",
|
|
65
|
+
"json-server": "1.0.0-beta.3",
|
|
66
|
+
"nodemon": "3.1.10",
|
|
67
|
+
"lowdb": "1.0.0",
|
|
68
|
+
"body-parser": "2.2.0",
|
|
69
|
+
"express": "5.1.0",
|
|
70
|
+
"uuid": "13.0.0"
|
|
71
|
+
}
|
|
72
|
+
}
|
package/lib/utils.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
const childProcess = require('child_process');
|
|
2
|
+
const execSync = childProcess.execSync;
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const fse = require('fs-extra');
|
|
5
|
+
const glob = require('glob');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const figlet = require('figlet');
|
|
8
|
+
|
|
1
9
|
module.exports.getAngularPath = (targetPath, appName, appType, artifactId) => {
|
|
2
10
|
switch(appType) {
|
|
3
11
|
case 'angular':
|
|
@@ -11,3 +19,199 @@ module.exports.getAngularPath = (targetPath, appName, appType, artifactId) => {
|
|
|
11
19
|
return `${targetPath}/client`;
|
|
12
20
|
}
|
|
13
21
|
}
|
|
22
|
+
|
|
23
|
+
module.exports.getArgs = () => {
|
|
24
|
+
const argv = require('yargs').argv;
|
|
25
|
+
|
|
26
|
+
const processArgs = process.env._CSDR_ARGS;
|
|
27
|
+
|
|
28
|
+
let args = {};
|
|
29
|
+
|
|
30
|
+
if (processArgs) {
|
|
31
|
+
processArgs.split(',').forEach((item) => {
|
|
32
|
+
// check if it's defined as array - example format : someArray:test1=test1|test2=test2
|
|
33
|
+
if (item.indexOf('Array') > 0) {
|
|
34
|
+
const arrayItems = item.split(':')[1];
|
|
35
|
+
const subItems = arrayItems.split('|');
|
|
36
|
+
const array = [];
|
|
37
|
+
subItems.forEach((sub) => {
|
|
38
|
+
const subItemSplit = sub.split('=');
|
|
39
|
+
const newItem = {};
|
|
40
|
+
newItem[subItemSplit[0].trim()] = subItemSplit[1].trim();
|
|
41
|
+
array.push(newItem);
|
|
42
|
+
})
|
|
43
|
+
args[item.split(':')[0]] = array;
|
|
44
|
+
|
|
45
|
+
// otherwise normal key/value pairs - example format : test1:test1,test2:test2
|
|
46
|
+
} else {
|
|
47
|
+
const itemSplit = item.split(':');
|
|
48
|
+
args[itemSplit[0].trim()] = itemSplit[1].trim();
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
root: argv._[0],
|
|
55
|
+
...argv,
|
|
56
|
+
...args
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
module.exports.logBigTitle = (text) => {
|
|
62
|
+
console.log('\n\n');
|
|
63
|
+
console.log('\x1b[33m', figlet.textSync(text, { horizontalLayout: 'full' }) ,'\x1b[0m');
|
|
64
|
+
console.log('\n');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
module.exports.logTitle = (msg) => {
|
|
68
|
+
log(msg, 0);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const logInfo = module.exports.logInfo = (msg) => {
|
|
72
|
+
log(msg, 1);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
module.exports.logSuccess = (msg) => {
|
|
76
|
+
if (!msg) msg = 'OK';
|
|
77
|
+
log(msg, 2);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
module.exports.logError = (msg) => {
|
|
81
|
+
log(msg, 3);
|
|
82
|
+
}
|
|
83
|
+
module.exports.logErrorTrace = (filename, method, e) => {
|
|
84
|
+
log(`ERROR in ${filename}`, 3);
|
|
85
|
+
log(`...method : ${method}`, 3);
|
|
86
|
+
log(`...message : ${e.message}`, 3);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
module.exports.logWarning = (msg) => {
|
|
90
|
+
log(msg, 4);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
module.exports.logAccent = (msg) => {
|
|
94
|
+
log(msg, 5);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
module.exports.logBanner = (msg) => {
|
|
98
|
+
log(msg, 6);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
module.exports.logDebug = (msg) => {
|
|
102
|
+
if (getArgs().debug) {
|
|
103
|
+
log(msg, 7);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
module.exports.logDebugTrace = (filename, method, e) => {
|
|
107
|
+
if (getArgs().debug) {
|
|
108
|
+
log(`ERROR in ${filename}`, 7);
|
|
109
|
+
log(`...method : ${method}`, 7);
|
|
110
|
+
log(`...message : ${e.message}`, 7);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
module.exports.logDebugResponse = (response) => {
|
|
114
|
+
if (getArgs().debug) {
|
|
115
|
+
console.log(response);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
module.exports.isDirEmpty = (path) => {
|
|
120
|
+
try {
|
|
121
|
+
var files = fse.readdirSync(path);
|
|
122
|
+
|
|
123
|
+
if (files.length === 0) {
|
|
124
|
+
return true;
|
|
125
|
+
} else {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
} catch (err) {
|
|
130
|
+
return false;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const isFileExists = module.exports.isFileExists = (path) => {
|
|
135
|
+
try {
|
|
136
|
+
return fs.statSync(path);
|
|
137
|
+
} catch (err) {
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
module.exports.mkdir = (path) => {
|
|
144
|
+
if (!fs.existsSync(path)) {
|
|
145
|
+
fs.mkdirSync(path);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
module.exports.copydir = (from, to, overwrite = true, globPattern = '**/*') => {
|
|
150
|
+
function _recursiveMkDir(dir) {
|
|
151
|
+
if (!fs.existsSync(dir)) {
|
|
152
|
+
_recursiveMkDir(path.dirname(dir));
|
|
153
|
+
fs.mkdirSync(dir);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
logInfo('----->copydir from : ' + from + ' ====> to : ' + to );
|
|
158
|
+
var files = glob.sync(globPattern, { cwd: from, nodir: true, follow: true, dot: true });
|
|
159
|
+
files.forEach(file => {
|
|
160
|
+
const origin = path.join(from, file);
|
|
161
|
+
const dest = path.join(to, file);
|
|
162
|
+
_recursiveMkDir(path.dirname(dest));
|
|
163
|
+
fse.copySync(origin, dest, { overwrite: overwrite });
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
module.exports.move = (from, to) => {
|
|
168
|
+
fse.removeSync(to);
|
|
169
|
+
fse.moveSync(from, to, );
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
module.exports.remove = (path) => {
|
|
173
|
+
fse.removeSync(path);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
module.exports.copy = (origin, dest) => {
|
|
177
|
+
fse.copySync(origin, dest);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const log = (msg, type) => {
|
|
181
|
+
var msgContent;
|
|
182
|
+
|
|
183
|
+
if (type === 0 || !type) {
|
|
184
|
+
msgContent = `\n${msg.toUpperCase()}`;
|
|
185
|
+
console.info('\x1b[33m', msgContent ,'\x1b[0m');
|
|
186
|
+
}
|
|
187
|
+
if (type === 1) {
|
|
188
|
+
msgContent = `${msg}`;
|
|
189
|
+
console.info('\x1b[34m\x1b[1m', msgContent ,'\x1b[0m');
|
|
190
|
+
}
|
|
191
|
+
if (type === 2) {
|
|
192
|
+
msgContent = `${msg}\n`;
|
|
193
|
+
console.info('\x1b[32m\x1b[1m', msgContent ,'\x1b[0m');
|
|
194
|
+
}
|
|
195
|
+
if (type === 3) {
|
|
196
|
+
msgContent = `\n${msg}`;
|
|
197
|
+
console.info('\x1b[31m\x1b[1m', msgContent ,'\x1b[0m');
|
|
198
|
+
}
|
|
199
|
+
if (type === 4) {
|
|
200
|
+
msgContent = `\n${msg}\n`;
|
|
201
|
+
console.info('\x1b[33m', msgContent ,'\x1b[0m');
|
|
202
|
+
}
|
|
203
|
+
if (type === 5) {
|
|
204
|
+
msgContent = `${msg}\n`;
|
|
205
|
+
console.info(msgContent);
|
|
206
|
+
}
|
|
207
|
+
if (type === 6) {
|
|
208
|
+
msgContent = msg
|
|
209
|
+
console.info('\n\n');
|
|
210
|
+
console.info(msgContent);
|
|
211
|
+
console.info('\n');
|
|
212
|
+
}
|
|
213
|
+
if (type === 7) {
|
|
214
|
+
msgContent = `${msg}`;
|
|
215
|
+
console.info(msgContent);
|
|
216
|
+
}
|
|
217
|
+
}
|
package/package.json
CHANGED
|
@@ -1,33 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eui/cli",
|
|
3
|
-
"version": "21.0.0-
|
|
3
|
+
"version": "21.0.0-next.10",
|
|
4
4
|
"tag": "next",
|
|
5
5
|
"license": "EUPL-1.1",
|
|
6
|
-
"description": "eUI CLI app generator",
|
|
6
|
+
"description": "eUI CLI app generator & tools",
|
|
7
7
|
"bin": {
|
|
8
8
|
"eui-cli": "bin/eui-cli.js"
|
|
9
9
|
},
|
|
10
10
|
"main": "./lib/cli.js",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "https://
|
|
13
|
+
"url": "https://sdlc.webcloud.ec.europa.eu/csdr/eui/eui.git"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"replace-in-file": "^7.1.0",
|
|
23
|
-
"execa": "^5.1.1",
|
|
24
|
-
"inquirer": "^8.1.0"
|
|
16
|
+
"figlet": "1.9.3",
|
|
17
|
+
"inquirer": "6.5.0",
|
|
18
|
+
"yargs": "17.7.2",
|
|
19
|
+
"fs-extra": "9.0.0",
|
|
20
|
+
"glob": "7.2.3",
|
|
21
|
+
"cross-spawn": "7.0.6"
|
|
25
22
|
},
|
|
26
23
|
"preferGlobal": true,
|
|
27
24
|
"homepage": "https://eui.ecdevops.eu",
|
|
28
25
|
"author": "ec.europa.eui@gmail.com",
|
|
29
26
|
"engines": {
|
|
30
|
-
"node": "^
|
|
27
|
+
"node": "^20.19.0 || ^22.12.0 || >=24.0.0",
|
|
31
28
|
"yarn": ">=1.22.4 <2"
|
|
32
29
|
}
|
|
33
30
|
}
|
package/.version.properties
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
19.3.2
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"root": true,
|
|
3
|
-
"ignorePatterns": [
|
|
4
|
-
"**/node_modules/**",
|
|
5
|
-
"**/dist/**",
|
|
6
|
-
"**/coverage/**",
|
|
7
|
-
"**/e2e/**",
|
|
8
|
-
"**/test/**",
|
|
9
|
-
"**/testing/**"
|
|
10
|
-
],
|
|
11
|
-
"overrides": [
|
|
12
|
-
{
|
|
13
|
-
"files": [
|
|
14
|
-
"*.ts"
|
|
15
|
-
],
|
|
16
|
-
"parserOptions": {
|
|
17
|
-
"project": [
|
|
18
|
-
"tsconfig.json",
|
|
19
|
-
"e2e/tsconfig.json"
|
|
20
|
-
],
|
|
21
|
-
"createDefaultProgram": true
|
|
22
|
-
},
|
|
23
|
-
"extends": [
|
|
24
|
-
"eslint:recommended",
|
|
25
|
-
"plugin:@typescript-eslint/recommended",
|
|
26
|
-
"plugin:@angular-eslint/recommended",
|
|
27
|
-
"plugin:@angular-eslint/template/process-inline-templates"
|
|
28
|
-
],
|
|
29
|
-
"rules": {
|
|
30
|
-
"@angular-eslint/component-selector": [
|
|
31
|
-
"error",
|
|
32
|
-
{
|
|
33
|
-
"type": "element",
|
|
34
|
-
"prefix": ["app", "app"],
|
|
35
|
-
"style": "kebab-case"
|
|
36
|
-
}
|
|
37
|
-
],
|
|
38
|
-
"@angular-eslint/directive-selector": [
|
|
39
|
-
"error",
|
|
40
|
-
{
|
|
41
|
-
"type": "attribute",
|
|
42
|
-
"prefix": ["app", "eui"],
|
|
43
|
-
"style": "camelCase"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"@typescript-eslint/ban-ts-comment": "off",
|
|
47
|
-
"@typescript-eslint/no-empty-object-type": "error",
|
|
48
|
-
"@typescript-eslint/no-unsafe-function-type": "error",
|
|
49
|
-
"@typescript-eslint/consistent-type-definitions": "off",
|
|
50
|
-
"@typescript-eslint/dot-notation": "off",
|
|
51
|
-
"@typescript-eslint/explicit-member-accessibility": [
|
|
52
|
-
"off",
|
|
53
|
-
{
|
|
54
|
-
"accessibility": "explicit"
|
|
55
|
-
}
|
|
56
|
-
],
|
|
57
|
-
"@typescript-eslint/no-require-imports": "error",
|
|
58
|
-
"@typescript-eslint/no-unused-vars": "off",
|
|
59
|
-
"@typescript-eslint/no-var-requires": "error",
|
|
60
|
-
"@typescript-eslint/require-await": "error",
|
|
61
|
-
"brace-style": [
|
|
62
|
-
"error",
|
|
63
|
-
"1tbs"
|
|
64
|
-
],
|
|
65
|
-
"id-blacklist": "off",
|
|
66
|
-
"id-match": "off",
|
|
67
|
-
"no-duplicate-case": "error",
|
|
68
|
-
"no-duplicate-imports": "off",
|
|
69
|
-
"no-invalid-this": "error",
|
|
70
|
-
"no-multiple-empty-lines": [
|
|
71
|
-
"error",
|
|
72
|
-
{
|
|
73
|
-
"max": 1
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
"no-new-func": "error",
|
|
77
|
-
"no-redeclare": "off",
|
|
78
|
-
"@typescript-eslint/no-redeclare": [
|
|
79
|
-
"error"
|
|
80
|
-
],
|
|
81
|
-
"no-template-curly-in-string": "error",
|
|
82
|
-
"no-underscore-dangle": "off",
|
|
83
|
-
"@typescript-eslint/naming-convention": [
|
|
84
|
-
"error",
|
|
85
|
-
{
|
|
86
|
-
"selector": "enum",
|
|
87
|
-
"format": [
|
|
88
|
-
"PascalCase",
|
|
89
|
-
"UPPER_CASE"
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
],
|
|
93
|
-
"@typescript-eslint/member-ordering": [
|
|
94
|
-
"error",
|
|
95
|
-
{
|
|
96
|
-
"default": [
|
|
97
|
-
"public-static-field",
|
|
98
|
-
"public-instance-field",
|
|
99
|
-
"private-static-field",
|
|
100
|
-
"private-instance-field",
|
|
101
|
-
"public-constructor",
|
|
102
|
-
"private-constructor",
|
|
103
|
-
"public-instance-method",
|
|
104
|
-
"protected-instance-method",
|
|
105
|
-
"private-instance-method"
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
]
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"files": [
|
|
113
|
-
"*.html"
|
|
114
|
-
],
|
|
115
|
-
"extends": [
|
|
116
|
-
"plugin:@angular-eslint/template/recommended"
|
|
117
|
-
],
|
|
118
|
-
"rules": {}
|
|
119
|
-
}
|
|
120
|
-
]
|
|
121
|
-
}
|