@rxap/plugin-utilities 16.1.0-dev.9 → 16.1.1-dev.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/CHANGELOG.md +115 -0
- package/README.md +1 -1
- package/package.json +40 -38
- package/src/index.d.ts +8 -7
- package/src/index.js +10 -7
- package/src/index.js.map +1 -1
- package/src/lib/generators.js +4 -3
- package/src/lib/generators.js.map +1 -1
- package/src/lib/guess-output-path.d.ts +4 -2
- package/src/lib/guess-output-path.js +40 -8
- package/src/lib/guess-output-path.js.map +1 -1
- package/src/lib/project-package-json.d.ts +1 -1
- package/src/lib/project-package-json.js +2 -1
- package/src/lib/project-package-json.js.map +1 -1
- package/src/lib/project-source-root-files.d.ts +3 -0
- package/src/lib/project-source-root-files.js +25 -0
- package/src/lib/project-source-root-files.js.map +1 -0
- package/src/lib/project-target.d.ts +2 -2
- package/src/lib/project-target.js +3 -3
- package/src/lib/project-target.js.map +1 -1
- package/src/lib/project.d.ts +1 -1
- package/src/lib/project.js +3 -1
- package/src/lib/project.js.map +1 -1
- package/src/lib/skip-non-generators-project.js +2 -2
- package/src/lib/skip-non-generators-project.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,121 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [16.1.1-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0...@rxap/plugin-utilities@16.1.1-dev.0) (2024-02-28)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- include schematics ([59e7541](https://gitlab.com/rxap/packages/commit/59e75410e8fa5ac0aee85934e8ed09938f7ebe94))
|
|
11
|
+
|
|
12
|
+
# [16.1.0](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.22...@rxap/plugin-utilities@16.1.0) (2024-02-07)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @rxap/plugin-utilities
|
|
15
|
+
|
|
16
|
+
# [16.1.0-dev.22](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.21...@rxap/plugin-utilities@16.1.0-dev.22) (2023-10-18)
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
- use default values for project name ([31dc7f1](https://gitlab.com/rxap/packages/commit/31dc7f167c871053461cf24e507e3c88ffb96580))
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
- add function GuessOutputPathFromTargetString ([d63890d](https://gitlab.com/rxap/packages/commit/d63890d51a6befac589b90a887ca1d57676b3062))
|
|
25
|
+
|
|
26
|
+
# [16.1.0-dev.21](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.20...@rxap/plugin-utilities@16.1.0-dev.21) (2023-10-11)
|
|
27
|
+
|
|
28
|
+
**Note:** Version bump only for package @rxap/plugin-utilities
|
|
29
|
+
|
|
30
|
+
# [16.1.0-dev.20](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.19...@rxap/plugin-utilities@16.1.0-dev.20) (2023-10-11)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @rxap/plugin-utilities
|
|
33
|
+
|
|
34
|
+
# [16.1.0-dev.19](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@1.1.0-dev.0...@rxap/plugin-utilities@16.1.0-dev.19) (2023-10-11)
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
- add licence file to publishable packages ([d7de1cb](https://gitlab.com/rxap/packages/commit/d7de1cb9db1bd1628f37084e3b0ffd1755aa75f6))
|
|
39
|
+
- change from commonjs to es2022 ([cf675a7](https://gitlab.com/rxap/packages/commit/cf675a7254de9ce4b269264df59794dd42fcbd8b))
|
|
40
|
+
- ensure deterministic package json file ([ff6a814](https://gitlab.com/rxap/packages/commit/ff6a814637954ff34f8de1b81b07dd3bf382be83))
|
|
41
|
+
- ensure new line ([68718c6](https://gitlab.com/rxap/packages/commit/68718c6aeefe25313434cdd9f3decebcc0674e00))
|
|
42
|
+
- ensure the project name is not included in the project tag list ([46d4479](https://gitlab.com/rxap/packages/commit/46d44798258ea1b20df9d4408b9c0809f55027b2))
|
|
43
|
+
- expose generators as schematics ([8a58d07](https://gitlab.com/rxap/packages/commit/8a58d07c2f1dcfff75e724a418d7c3bddb2d0bbc))
|
|
44
|
+
- generate readme with peer dependencies to install ([27c2cd7](https://gitlab.com/rxap/packages/commit/27c2cd7d98f0c8a499b8c30719f49d69e4970ae9))
|
|
45
|
+
- if project source root is not defined use the project joined with src ([dd09c0e](https://gitlab.com/rxap/packages/commit/dd09c0ec6d0f5bd5b9fc030108cdaf990b6ab5f2))
|
|
46
|
+
- introduce Is\*Project functions ([3c9f251](https://gitlab.com/rxap/packages/commit/3c9f251f1d7be46ca366171e79e86ef2764fa3b0))
|
|
47
|
+
- only include project with package.json file ([8dcf3a2](https://gitlab.com/rxap/packages/commit/8dcf3a2a576c782d64552e7d692bca2330f90894))
|
|
48
|
+
- peer dependency issue ([ee95415](https://gitlab.com/rxap/packages/commit/ee95415370d9ef2396916d6c25061a0df791034a))
|
|
49
|
+
- remove nx dependency ([b2b98b0](https://gitlab.com/rxap/packages/commit/b2b98b01438e9439f9743fb27629c7e96072df45))
|
|
50
|
+
- split GuessOutputPath function ([470b93a](https://gitlab.com/rxap/packages/commit/470b93a97a44b11435ff045c79896d712c9721a9))
|
|
51
|
+
- support output path guess from project root ([77e184f](https://gitlab.com/rxap/packages/commit/77e184fe8779c6efbc3e06cb3e71a8cf7c4f3e5f))
|
|
52
|
+
- throw error if project does not exists in project graph ([c33145e](https://gitlab.com/rxap/packages/commit/c33145e114f6ac3c64da1dd7baa7e7c517437a9c))
|
|
53
|
+
- use absolute path to access files ([063676e](https://gitlab.com/rxap/packages/commit/063676e3a1f6061c9f3284f79e6ca8091242c0c7))
|
|
54
|
+
|
|
55
|
+
### Features
|
|
56
|
+
|
|
57
|
+
- add CleanupPackageJson function ([08ad46c](https://gitlab.com/rxap/packages/commit/08ad46c1fe249aa3ab2ad349e856a5331d5b5d3f))
|
|
58
|
+
- add GetAllPackageDependenciesForProject function ([4059619](https://gitlab.com/rxap/packages/commit/405961962d45c0643037524956134bf7abd6bda5))
|
|
59
|
+
- add project to package name mapping utilities ([09aa733](https://gitlab.com/rxap/packages/commit/09aa7335b0caf599b61a41cfa8cb899a41f3d34a))
|
|
60
|
+
- add ProjectSourceRoot files utility functions ([66b9649](https://gitlab.com/rxap/packages/commit/66b9649fdbd90dcc59a4f8bd206a54c810246290))
|
|
61
|
+
|
|
62
|
+
### Reverts
|
|
63
|
+
|
|
64
|
+
- change from commonjs to es2022 ([50eca61](https://gitlab.com/rxap/packages/commit/50eca61e9a89388d1cfeefb8b1029b302b6f307e))
|
|
65
|
+
|
|
66
|
+
# [16.1.0-dev.18](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.17...@rxap/plugin-utilities@16.1.0-dev.18) (2023-10-02)
|
|
67
|
+
|
|
68
|
+
### Bug Fixes
|
|
69
|
+
|
|
70
|
+
- introduce Is\*Project functions ([0f4a53a](https://gitlab.com/rxap/packages/commit/0f4a53a2a68c7f854d819c005a30957d8b1cb3c6))
|
|
71
|
+
|
|
72
|
+
# [16.1.0-dev.17](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.16...@rxap/plugin-utilities@16.1.0-dev.17) (2023-10-02)
|
|
73
|
+
|
|
74
|
+
### Bug Fixes
|
|
75
|
+
|
|
76
|
+
- if project source root is not defined use the project joined with src ([198eef9](https://gitlab.com/rxap/packages/commit/198eef996f2c5c640da453417dadea338a13198b))
|
|
77
|
+
|
|
78
|
+
### Features
|
|
79
|
+
|
|
80
|
+
- add ProjectSourceRoot files utility functions ([49213ae](https://gitlab.com/rxap/packages/commit/49213aea481555b77536fe598987fb92a8754d76))
|
|
81
|
+
|
|
82
|
+
# [16.1.0-dev.16](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.15...@rxap/plugin-utilities@16.1.0-dev.16) (2023-09-27)
|
|
83
|
+
|
|
84
|
+
**Note:** Version bump only for package @rxap/plugin-utilities
|
|
85
|
+
|
|
86
|
+
# [16.1.0-dev.15](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.14...@rxap/plugin-utilities@16.1.0-dev.15) (2023-09-17)
|
|
87
|
+
|
|
88
|
+
### Bug Fixes
|
|
89
|
+
|
|
90
|
+
- split GuessOutputPath function ([5fc44e1](https://gitlab.com/rxap/packages/commit/5fc44e1470ca16b542e0b45049bfd9a83b8baab8))
|
|
91
|
+
|
|
92
|
+
# [16.1.0-dev.14](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.13...@rxap/plugin-utilities@16.1.0-dev.14) (2023-09-12)
|
|
93
|
+
|
|
94
|
+
### Bug Fixes
|
|
95
|
+
|
|
96
|
+
- peer dependency issue ([e67e2b8](https://gitlab.com/rxap/packages/commit/e67e2b8eb884b598536d16c2c544a9ad9be5b53e))
|
|
97
|
+
|
|
98
|
+
# [16.1.0-dev.13](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.12...@rxap/plugin-utilities@16.1.0-dev.13) (2023-09-12)
|
|
99
|
+
|
|
100
|
+
### Bug Fixes
|
|
101
|
+
|
|
102
|
+
- ensure deterministic package json file ([c1a9971](https://gitlab.com/rxap/packages/commit/c1a9971349bf01630b709bb8c46bd0397088f871))
|
|
103
|
+
- support output path guess from project root ([1757fdf](https://gitlab.com/rxap/packages/commit/1757fdf6e3f00fafa90d17e3ca24bf3cc711b33e))
|
|
104
|
+
|
|
105
|
+
### Features
|
|
106
|
+
|
|
107
|
+
- add CleanupPackageJson function ([0b5c0ce](https://gitlab.com/rxap/packages/commit/0b5c0cee7d080b9948953dc856af20e2516cf024))
|
|
108
|
+
|
|
109
|
+
# [16.1.0-dev.12](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.11...@rxap/plugin-utilities@16.1.0-dev.12) (2023-09-07)
|
|
110
|
+
|
|
111
|
+
**Note:** Version bump only for package @rxap/plugin-utilities
|
|
112
|
+
|
|
113
|
+
# [16.1.0-dev.11](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.10...@rxap/plugin-utilities@16.1.0-dev.11) (2023-09-03)
|
|
114
|
+
|
|
115
|
+
**Note:** Version bump only for package @rxap/plugin-utilities
|
|
116
|
+
|
|
117
|
+
# [16.1.0-dev.10](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.9...@rxap/plugin-utilities@16.1.0-dev.10) (2023-09-03)
|
|
118
|
+
|
|
119
|
+
**Note:** Version bump only for package @rxap/plugin-utilities
|
|
120
|
+
|
|
6
121
|
# [16.1.0-dev.9](https://gitlab.com/rxap/packages/compare/@rxap/plugin-utilities@16.1.0-dev.8...@rxap/plugin-utilities@16.1.0-dev.9) (2023-08-31)
|
|
7
122
|
|
|
8
123
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -17,5 +17,5 @@ yarn add @rxap/plugin-utilities
|
|
|
17
17
|
```
|
|
18
18
|
**Install peer dependencies:**
|
|
19
19
|
```bash
|
|
20
|
-
yarn add @nx/devkit@^16.5.0 @rxap/generator-utilities@^1.1.0
|
|
20
|
+
yarn add @nx/devkit@^16.5.0 @rxap/generator-utilities@^1.1.0 @rxap/node-utilities@^1.1.0 @rxap/workspace-utilities@^16.0.1 tslib@2.6.2
|
|
21
21
|
```
|
package/package.json
CHANGED
|
@@ -1,63 +1,65 @@
|
|
|
1
1
|
{
|
|
2
|
+
"version": "16.1.1-dev.0",
|
|
2
3
|
"name": "@rxap/plugin-utilities",
|
|
3
|
-
"version": "16.1.0-dev.9",
|
|
4
|
-
"type": "commonjs",
|
|
5
|
-
"publishConfig": {
|
|
6
|
-
"access": "public",
|
|
7
|
-
"directory": "../../../dist/packages/plugin/utilities"
|
|
8
|
-
},
|
|
9
|
-
"keywords": [
|
|
10
|
-
"rxap",
|
|
11
|
-
"packages",
|
|
12
|
-
"plugin",
|
|
13
|
-
"utilities",
|
|
14
|
-
"plugin-utilities"
|
|
15
|
-
],
|
|
16
|
-
"homepage": "https:/gitlab.com/rxap/packages/packages/plugin/utilities",
|
|
17
|
-
"bugs": {
|
|
18
|
-
"url": "https://gitlab.com/rxap/packages/-/issues",
|
|
19
|
-
"email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
|
|
20
|
-
},
|
|
21
4
|
"license": "GPL-3.0-or-later",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"ignore": "5.2.4",
|
|
7
|
+
"process": "0.11.10",
|
|
8
|
+
"semver": "7.5.3",
|
|
9
|
+
"tslib": "2.6.2",
|
|
10
|
+
"yaml": "2.3.1"
|
|
11
|
+
},
|
|
12
|
+
"peerDependencies": {
|
|
13
|
+
"@nx/devkit": "^16.5.0",
|
|
14
|
+
"@rxap/generator-utilities": "^1.1.0",
|
|
15
|
+
"@rxap/node-utilities": "^1.1.0",
|
|
16
|
+
"@rxap/workspace-utilities": "^16.0.1",
|
|
17
|
+
"tslib": "2.6.2",
|
|
18
|
+
"@rxap/utilities": "16.1.0-dev.3"
|
|
26
19
|
},
|
|
27
20
|
"author": {
|
|
28
21
|
"name": "Merzough Münker",
|
|
29
22
|
"email": "mmuenker@digitaix.com"
|
|
30
23
|
},
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"@rxap/node-utilities": "^1.1.0-dev.4",
|
|
35
|
-
"@rxap/workspace-utilities": "^0.1.0-dev.6",
|
|
36
|
-
"@rxap/utilities": "16.0.0-dev.13"
|
|
37
|
-
},
|
|
38
|
-
"dependencies": {
|
|
39
|
-
"ignore": "^5.2.4",
|
|
40
|
-
"process": "0.11.10",
|
|
41
|
-
"semver": "^7.3.5",
|
|
42
|
-
"tslib": "2.5.3"
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://gitlab.com/rxap/packages/-/issues",
|
|
26
|
+
"email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
|
|
43
27
|
},
|
|
28
|
+
"homepage": "https:/gitlab.com/rxap/packages/packages/plugin/utilities",
|
|
29
|
+
"keywords": [
|
|
30
|
+
"packages",
|
|
31
|
+
"plugin",
|
|
32
|
+
"plugin-utilities",
|
|
33
|
+
"rxap",
|
|
34
|
+
"utilities"
|
|
35
|
+
],
|
|
44
36
|
"nx-migrations": {
|
|
45
37
|
"packageGroup": [
|
|
46
38
|
{
|
|
47
39
|
"package": "@rxap/generator-utilities",
|
|
48
|
-
"version": "1.1.0
|
|
40
|
+
"version": "1.1.0"
|
|
49
41
|
},
|
|
50
42
|
{
|
|
51
43
|
"package": "@rxap/node-utilities",
|
|
52
|
-
"version": "1.1.0
|
|
44
|
+
"version": "1.1.0"
|
|
53
45
|
},
|
|
54
46
|
{
|
|
55
47
|
"package": "@rxap/workspace-utilities",
|
|
56
|
-
"version": "0.1
|
|
48
|
+
"version": "16.0.1"
|
|
57
49
|
}
|
|
58
50
|
]
|
|
59
51
|
},
|
|
60
|
-
"
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public",
|
|
54
|
+
"directory": "../../../dist/packages/plugin/utilities"
|
|
55
|
+
},
|
|
56
|
+
"repository": {
|
|
57
|
+
"type": "git",
|
|
58
|
+
"url": "https://gitlab.com/rxap/packages.git",
|
|
59
|
+
"directory": "packages/plugin/utilities"
|
|
60
|
+
},
|
|
61
|
+
"type": "commonjs",
|
|
62
|
+
"gitHead": "521407940b1ca095124b5699b7341f391ccd681f",
|
|
61
63
|
"main": "./src/index.js",
|
|
62
64
|
"types": "./src/index.d.ts"
|
|
63
65
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export * from './lib/
|
|
1
|
+
export * from './lib/generators';
|
|
2
2
|
export * from './lib/get-all-package-dependencies-for-project';
|
|
3
|
-
export * from './lib/
|
|
4
|
-
export * from './lib/project';
|
|
5
|
-
export * from './lib/project-root-files';
|
|
3
|
+
export * from './lib/get-direct-package-dependencies-for-project';
|
|
6
4
|
export * from './lib/get-target-configuration-name-list';
|
|
7
5
|
export * from './lib/guess-output-path';
|
|
8
|
-
export * from './lib/
|
|
9
|
-
export * from './lib/project-target';
|
|
6
|
+
export * from './lib/project-package-json';
|
|
10
7
|
export * from './lib/project-package-name-mapping';
|
|
8
|
+
export * from './lib/project-root-files';
|
|
9
|
+
export * from './lib/project-source-root-files';
|
|
10
|
+
export * from './lib/project-target';
|
|
11
|
+
export * from './lib/project';
|
|
11
12
|
export * from './lib/skip-non-generators-project';
|
|
12
|
-
export * from './lib/
|
|
13
|
+
export * from './lib/yarn-run';
|
package/src/index.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
4
|
+
// region
|
|
5
|
+
tslib_1.__exportStar(require("./lib/generators"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./lib/get-all-package-dependencies-for-project"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./lib/
|
|
7
|
-
tslib_1.__exportStar(require("./lib/project"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./lib/project-root-files"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./lib/get-direct-package-dependencies-for-project"), exports);
|
|
9
8
|
tslib_1.__exportStar(require("./lib/get-target-configuration-name-list"), exports);
|
|
10
9
|
tslib_1.__exportStar(require("./lib/guess-output-path"), exports);
|
|
11
|
-
tslib_1.__exportStar(require("./lib/
|
|
12
|
-
tslib_1.__exportStar(require("./lib/project-target"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./lib/project-package-json"), exports);
|
|
13
11
|
tslib_1.__exportStar(require("./lib/project-package-name-mapping"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./lib/project-root-files"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./lib/project-source-root-files"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./lib/project-target"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./lib/project"), exports);
|
|
14
16
|
tslib_1.__exportStar(require("./lib/skip-non-generators-project"), exports);
|
|
15
|
-
tslib_1.__exportStar(require("./lib/
|
|
17
|
+
tslib_1.__exportStar(require("./lib/yarn-run"), exports);
|
|
18
|
+
// endregion
|
|
16
19
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/plugin/utilities/src/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/plugin/utilities/src/index.ts"],"names":[],"mappings":";;;AAAA,UAAU;AACV,2DAAiC;AACjC,yFAA+D;AAC/D,4FAAkE;AAClE,mFAAyD;AACzD,kEAAwC;AACxC,qEAA2C;AAC3C,6EAAmD;AACnD,mEAAyC;AACzC,0EAAgD;AAChD,+DAAqC;AACrC,wDAA8B;AAC9B,4EAAkD;AAClD,yDAA+B;AAC/B,YAAY"}
|
package/src/lib/generators.js
CHANGED
|
@@ -4,14 +4,15 @@ exports.HasGenerators = exports.UpdateGenerators = exports.GetGenerators = expor
|
|
|
4
4
|
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
function HasGeneratorProperty(packageJson) {
|
|
7
|
-
return !!packageJson['generators'];
|
|
7
|
+
return !!packageJson['generators'] || !!packageJson['schematics'];
|
|
8
8
|
}
|
|
9
9
|
exports.HasGeneratorProperty = HasGeneratorProperty;
|
|
10
10
|
function GetGeneratorFilePath(projectRoot, packageJson) {
|
|
11
|
-
|
|
11
|
+
var _a;
|
|
12
|
+
if (!packageJson['generators'] && !packageJson['schematics']) {
|
|
12
13
|
throw new Error(`The package.json of the project ${projectRoot} does not contains a generators property!`);
|
|
13
14
|
}
|
|
14
|
-
return (0, path_1.join)(projectRoot, packageJson['generators']);
|
|
15
|
+
return (0, path_1.join)(projectRoot, (_a = packageJson['generators']) !== null && _a !== void 0 ? _a : packageJson['schematics']);
|
|
15
16
|
}
|
|
16
17
|
exports.GetGeneratorFilePath = GetGeneratorFilePath;
|
|
17
18
|
function ExistsGeneratorFile(tree, projectRoot, packageJson) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/generators.ts"],"names":[],"mappings":";;;AAIA,mEAImC;AACnC,+BAA4B;AAM5B,SAAgB,oBAAoB,CAAC,WAAwB;IAC3D,OAAO,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/generators.ts"],"names":[],"mappings":";;;AAIA,mEAImC;AACnC,+BAA4B;AAM5B,SAAgB,oBAAoB,CAAC,WAAwB;IAC3D,OAAO,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;AACpE,CAAC;AAFD,oDAEC;AAED,SAAgB,oBAAoB,CAAC,WAAmB,EAAE,WAAsC;;IAE9F,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,EAAE;QAC5D,MAAM,IAAI,KAAK,CAAC,mCAAoC,WAAY,2CAA2C,CAAC,CAAC;KAC9G;IAED,OAAO,IAAA,WAAI,EAAC,WAAW,EAAE,MAAA,WAAW,CAAC,YAAY,CAAC,mCAAI,W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IAEpE,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;AAEjH,CAAC;AAtBD,4CAsBC;AAED,SAAgB,aAAa,CAAC,IAAU,EAAE,gCAA+D;IAEvG,MAAM,WAAW,GAAG,6CAA6C,CAAC,IAAI,EAAE,gCAAgC,CAAC,CAAC;IAE1G,MAAM,WAAW,GAAG,IAAA,oCAAc,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAEtD,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,EAAE;QACtC,OAAO,KAAK,CAAC;KACd;IAED,IAAI,CAAC,mBAAmB,CAAC,IAAI,EAAE,WAAW,EAAE,WAAW,CAAC,EAAE;QACxD,OAAO,KAAK,CAAC;KACd;IAED,MAAM,UAAU,GAAG,gBAAgB,CAAC,IAAI,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;IAEpE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,MAAM,EAAE;QAC9C,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AAEd,CAAC;AAtBD,sCAsBC"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
-
export declare function
|
|
1
|
+
import { ExecutorContext, TargetConfiguration } from '@nx/devkit';
|
|
2
|
+
export declare function GuessOutputPathFromContext(context: ExecutorContext, projectName?: string | undefined, configurationName?: string | undefined, targetName?: string): string;
|
|
3
|
+
export declare function GuessOutputPathFromTargetString(context: ExecutorContext, targetString?: string): string;
|
|
4
|
+
export declare function GuessOutputPath(projectRoot: string, buildTarget: TargetConfiguration, configurationName?: string): string;
|
|
@@ -1,31 +1,63 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GuessOutputPath = void 0;
|
|
3
|
+
exports.GuessOutputPath = exports.GuessOutputPathFromTargetString = exports.GuessOutputPathFromContext = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
4
5
|
const get_target_configuration_name_list_1 = require("./get-target-configuration-name-list");
|
|
6
|
+
const project_1 = require("./project");
|
|
5
7
|
const project_target_1 = require("./project-target");
|
|
6
|
-
function
|
|
8
|
+
function GuessOutputPathFromContext(context, projectName = context.projectName, configurationName = context.configurationName, targetName = 'build') {
|
|
7
9
|
if (!projectName) {
|
|
8
10
|
throw new Error('The projectName is undefined. Ensure the projectName is passed into the executor context.');
|
|
9
11
|
}
|
|
10
|
-
const buildTarget = (0, project_target_1.GetProjectTarget)(context, projectName,
|
|
12
|
+
const buildTarget = (0, project_target_1.GetProjectTarget)(context, projectName, targetName);
|
|
11
13
|
if (!buildTarget) {
|
|
12
14
|
throw new Error(`Could not find target 'build' for project '${projectName}'`);
|
|
13
15
|
}
|
|
14
|
-
|
|
16
|
+
const projectRoot = (0, project_1.GetProjectRoot)(context, projectName);
|
|
17
|
+
return GuessOutputPath(projectRoot, buildTarget, configurationName);
|
|
18
|
+
}
|
|
19
|
+
exports.GuessOutputPathFromContext = GuessOutputPathFromContext;
|
|
20
|
+
function GuessOutputPathFromTargetString(context, targetString) {
|
|
21
|
+
let configurationName = context.configurationName;
|
|
22
|
+
let targetName = 'build';
|
|
23
|
+
let projectName = context.projectName;
|
|
24
|
+
if (targetString) {
|
|
25
|
+
const [name, target, configuration] = targetString.split(':');
|
|
26
|
+
if (!name) {
|
|
27
|
+
throw new Error(`Could not extract the project name from the build target '${targetString}'`);
|
|
28
|
+
}
|
|
29
|
+
if (!target) {
|
|
30
|
+
throw new Error(`Could not extract the target name from the build target '${targetString}'`);
|
|
31
|
+
}
|
|
32
|
+
projectName = name;
|
|
33
|
+
targetName = target;
|
|
34
|
+
configurationName = configuration;
|
|
35
|
+
}
|
|
36
|
+
return GuessOutputPathFromContext(context, projectName, configurationName, targetName);
|
|
37
|
+
}
|
|
38
|
+
exports.GuessOutputPathFromTargetString = GuessOutputPathFromTargetString;
|
|
39
|
+
function GuessOutputPath(projectRoot, buildTarget, configurationName) {
|
|
40
|
+
let outputPath = (0, get_target_configuration_name_list_1.GetTargetOptions)(buildTarget, configurationName)['outputPath'];
|
|
15
41
|
if (!outputPath) {
|
|
16
|
-
console.warn('Could not find outputPath in build target options.');
|
|
17
42
|
if (buildTarget.outputs && buildTarget.outputs.length) {
|
|
18
43
|
const [output] = buildTarget.outputs;
|
|
19
|
-
|
|
44
|
+
if (output.match(/\.[a-zA-Z]+$/)) {
|
|
45
|
+
outputPath = (0, path_1.dirname)(output);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
outputPath = output;
|
|
49
|
+
}
|
|
20
50
|
}
|
|
21
51
|
else {
|
|
22
|
-
|
|
52
|
+
outputPath = (0, path_1.join)('dist', projectRoot);
|
|
23
53
|
}
|
|
24
54
|
}
|
|
25
55
|
if (typeof outputPath !== 'string') {
|
|
26
56
|
throw new Error(`The outputPath is not a string. Found: ${outputPath}`);
|
|
27
57
|
}
|
|
28
|
-
return outputPath
|
|
58
|
+
return outputPath
|
|
59
|
+
.replace(/\{projectRoot}/, projectRoot)
|
|
60
|
+
.replace(/\{workspaceRoot}\//, '');
|
|
29
61
|
}
|
|
30
62
|
exports.GuessOutputPath = GuessOutputPath;
|
|
31
63
|
//# sourceMappingURL=guess-output-path.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guess-output-path.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/guess-output-path.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"guess-output-path.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/guess-output-path.ts"],"names":[],"mappings":";;;AAIA,+BAGc;AACd,6FAAwE;AACxE,uCAA2C;AAC3C,qDAAoD;AAGpD,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BAAiB,EAAE,UAAU,CAAC,CAAC;AACzF,CAAC;AArBD,0EAqBC;AAED,SAAgB,eAAe,CAAC,WAAmB,EAAE,WAAgC,EAAE,iBAA0B;IAE/G,IAAI,UAAU,GAAG,IAAA,qDAAgB,EAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,YAAY,CAAC,CAAC;IAEhF,IAAI,CAAC,UAAU,EAAE;QACf,IAAI,WAAW,CAAC,OAAO,IAAI,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE;YACrD,MAAM,CAAE,MAAM,CAAE,GAAG,WAAW,CAAC,OAAO,CAAC;YACvC,IAAI,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE;gBAChC,UAAU,GAAG,IAAA,cAAO,EAAC,MAAM,CAAC,CAAC;aAC9B;iBAAM;gBACL,UAAU,GAAG,MAAM,CAAC;aACrB;SACF;aAAM;YACL,UAAU,GAAG,IAAA,WAAI,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC;SACxC;KACF;IAED,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,0CAA2C,UAAW,EAAE,CAAC,CAAC;KAC3E;IAED,OAAO,UAAU;SACd,OAAO,CAAC,gBAAgB,EAAE,WAAW,CAAC;SACtC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;AAEvC,CAAC;AAzBD,0CAyBC"}
|
|
@@ -10,4 +10,4 @@ export interface ProjectPackageJson extends PackageJson {
|
|
|
10
10
|
}[];
|
|
11
11
|
}
|
|
12
12
|
export declare function readPackageJsonForProject(context: ExecutorContext, projectName?: string | undefined): ProjectPackageJson;
|
|
13
|
-
export declare function writePackageJsonFormProject<T = ProjectPackageJson>(context: ExecutorContext, content: T, projectName?: string | undefined): void;
|
|
13
|
+
export declare function writePackageJsonFormProject<T extends ProjectPackageJson = ProjectPackageJson>(context: ExecutorContext, content: T, projectName?: string | undefined): void;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.writePackageJsonFormProject = exports.readPackageJsonForProject = void 0;
|
|
4
4
|
const node_utilities_1 = require("@rxap/node-utilities");
|
|
5
|
+
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
5
6
|
const path_1 = require("path");
|
|
6
7
|
const project_1 = require("./project");
|
|
7
8
|
function readPackageJsonForProject(context, projectName = context.projectName) {
|
|
@@ -11,7 +12,7 @@ function readPackageJsonForProject(context, projectName = context.projectName) {
|
|
|
11
12
|
exports.readPackageJsonForProject = readPackageJsonForProject;
|
|
12
13
|
function writePackageJsonFormProject(context, content, projectName = context.projectName) {
|
|
13
14
|
const packageJsonPath = (0, path_1.join)(context.root, (0, project_1.GetProjectRoot)(context, projectName), 'package.json');
|
|
14
|
-
(0, node_utilities_1.writeJsonFile)(packageJsonPath, content);
|
|
15
|
+
(0, node_utilities_1.writeJsonFile)(packageJsonPath, (0, workspace_utilities_1.CleanupPackageJsonFile)(content));
|
|
15
16
|
}
|
|
16
17
|
exports.writePackageJsonFormProject = writePackageJsonFormProject;
|
|
17
18
|
//# sourceMappingURL=project-package-json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-package-json.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/project-package-json.ts"],"names":[],"mappings":";;;AACA,yDAG8B;
|
|
1
|
+
{"version":3,"file":"project-package-json.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/project-package-json.ts"],"names":[],"mappings":";;;AACA,yDAG8B;AAC9B,mEAGmC;AACnC,+BAA4B;AAC5B,uCAA2C;AAM3C,SAAgB,yBAAyB,CACvC,OAAwB,EACxB,WAAW,GAAG,OAAO,CAAC,WAAW;IAEjC,MAAM,eAAe,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,IAAA,wBAAc,EAAC,OAAO,EAAE,WAAW,CAAC,EAAE,cAAc,CAAC,CAAC;IACjG,OAAO,IAAA,yBAAQ,EAAC,eAAe,CAAC,CAAC;AACnC,CAAC;AAND,8DAMC;AAED,SAAgB,2BAA2B,CACzC,OAAwB,EACxB,OAAU,EACV,WAAW,GAAG,OAAO,CAAC,WAAW;IAEjC,MAAM,eAAe,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,IAAA,wBAAc,EAAC,OAAO,EAAE,WAAW,CAAC,EAAE,cAAc,CAAC,CAAC;IACjG,IAAA,8BAAa,EAAI,eAAe,EAAE,IAAA,4CAAsB,EAAC,OAAO,CAAC,CAAC,CAAC;AACrE,CAAC;AAPD,kEAOC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
export declare function ReadFileFromProjectSourceRoot(context: ExecutorContext, fileName: string, requiredOrDefaultContent?: string | true): string;
|
|
3
|
+
export declare function WriteFileToProjectSourceRoot(context: ExecutorContext, fileName: string, content: string): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WriteFileToProjectSourceRoot = exports.ReadFileFromProjectSourceRoot = void 0;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const project_1 = require("./project");
|
|
7
|
+
function ReadFileFromProjectSourceRoot(context, fileName, requiredOrDefaultContent = '') {
|
|
8
|
+
const projectSourceRoot = (0, project_1.GetProjectSourceRoot)(context);
|
|
9
|
+
const filePath = (0, path_1.join)(context.root, projectSourceRoot, fileName);
|
|
10
|
+
if (!(0, fs_1.existsSync)(filePath)) {
|
|
11
|
+
if (requiredOrDefaultContent === true) {
|
|
12
|
+
throw new Error(`The file ${filePath} not exists!`);
|
|
13
|
+
}
|
|
14
|
+
return requiredOrDefaultContent;
|
|
15
|
+
}
|
|
16
|
+
return (0, fs_1.readFileSync)(filePath, 'utf-8');
|
|
17
|
+
}
|
|
18
|
+
exports.ReadFileFromProjectSourceRoot = ReadFileFromProjectSourceRoot;
|
|
19
|
+
function WriteFileToProjectSourceRoot(context, fileName, content) {
|
|
20
|
+
const projectSourceRoot = (0, project_1.GetProjectSourceRoot)(context);
|
|
21
|
+
const filePath = (0, path_1.join)(context.root, projectSourceRoot, fileName);
|
|
22
|
+
(0, fs_1.writeFileSync)(filePath, content);
|
|
23
|
+
}
|
|
24
|
+
exports.WriteFileToProjectSourceRoot = WriteFileToProjectSourceRoot;
|
|
25
|
+
//# sourceMappingURL=project-source-root-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-source-root-files.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/project-source-root-files.ts"],"names":[],"mappings":";;;AACA,2BAIY;AACZ,+BAA4B;AAC5B,uCAAiD;AAEjD,SAAgB,6BAA6B,CAC3C,OAAwB,EACxB,QAAgB,EAChB,2BAA0C,EAAE;IAE5C,MAAM,iBAAiB,GAAG,IAAA,8BAAoB,EAAC,OAAO,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IACjE,IAAI,CAAC,IAAA,eAAU,EAAC,QAAQ,CAAC,EAAE;QACzB,IAAI,wBAAwB,KAAK,IAAI,EAAE;YACrC,MAAM,IAAI,KAAK,CAAC,YAAa,QAAS,cAAc,CAAC,CAAC;SACvD;QACD,OAAO,wBAAwB,CAAC;KACjC;IACD,OAAO,IAAA,iBAAY,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC;AAdD,sEAcC;AAED,SAAgB,4BAA4B,CAAC,OAAwB,EAAE,QAAgB,EAAE,OAAe;IACtG,MAAM,iBAAiB,GAAG,IAAA,8BAAoB,EAAC,OAAO,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,iBAAiB,EAAE,QAAQ,CAAC,CAAC;IACjE,IAAA,kBAAa,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACnC,CAAC;AAJD,oEAIC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ExecutorContext } from '@nx/devkit';
|
|
2
|
-
export declare function GetProjectTarget(context: ExecutorContext, projectName: string, targetName: string): import("@nx/devkit").TargetConfiguration<any>;
|
|
3
|
-
export declare function GetProjectTargetOptions(context: ExecutorContext, projectName: string, targetName: string, configurationName?: string | undefined): Record<string, unknown>;
|
|
2
|
+
export declare function GetProjectTarget(context: ExecutorContext, projectName: string | undefined, targetName: string): import("@nx/devkit").TargetConfiguration<any>;
|
|
3
|
+
export declare function GetProjectTargetOptions(context: ExecutorContext, projectName: string | undefined, targetName: string, configurationName?: string | undefined): Record<string, unknown>;
|
|
@@ -3,16 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GetProjectTargetOptions = exports.GetProjectTarget = void 0;
|
|
4
4
|
const get_target_configuration_name_list_1 = require("./get-target-configuration-name-list");
|
|
5
5
|
const project_1 = require("./project");
|
|
6
|
-
function GetProjectTarget(context, projectName, targetName) {
|
|
6
|
+
function GetProjectTarget(context, projectName = context.projectName, targetName) {
|
|
7
7
|
const projectConfiguration = (0, project_1.GetProjectConfiguration)(context, projectName);
|
|
8
8
|
const targetConfiguration = projectConfiguration.targets ? projectConfiguration.targets[targetName] : undefined;
|
|
9
9
|
if (!targetConfiguration) {
|
|
10
|
-
throw new Error(`The target configuration for target '${targetName}' not found!`);
|
|
10
|
+
throw new Error(`The target configuration for target '${targetName}' in project '${projectName}' not found!`);
|
|
11
11
|
}
|
|
12
12
|
return targetConfiguration;
|
|
13
13
|
}
|
|
14
14
|
exports.GetProjectTarget = GetProjectTarget;
|
|
15
|
-
function GetProjectTargetOptions(context, projectName, targetName, configurationName = context.configurationName) {
|
|
15
|
+
function GetProjectTargetOptions(context, projectName = context.projectName, targetName, configurationName = context.configurationName) {
|
|
16
16
|
const target = GetProjectTarget(context, projectName, targetName);
|
|
17
17
|
return (0, get_target_configuration_name_list_1.GetTargetOptions)(target, configurationName);
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-target.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/project-target.ts"],"names":[],"mappings":";;;AACA,6FAAwE;AACxE,uCAAoD;AAEpD,SAAgB,gBAAgB,CAAC,OAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"project-target.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/project-target.ts"],"names":[],"mappings":";;;AACA,6FAAwE;AACxE,uCAAoD;AAEpD,SAAgB,gBAAgB,CAAC,OAAwB,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,EAAE,UAAkB;IAC9G,MAAM,oBAAoB,GAAG,IAAA,iCAAuB,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAE3E,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAEhH,IAAI,CAAC,mBAAmB,EAAE;QACxB,MAAM,IAAI,KAAK,CAAC,wCAAyC,UAAW,iBAAkB,WAAY,cAAc,CAAC,CAAC;KACnH;IAED,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAVD,4CAUC;AAED,SAAgB,uBAAuB,CACrC,OAAwB,EACxB,WAAW,GAAG,OAAO,CAAC,WAAW,EACjC,UAAkB,EAClB,iBAAiB,GAAG,OAAO,CAAC,iBAAiB;IAE7C,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;IAClE,OAAO,IAAA,qDAAgB,EAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AACrD,CAAC;AARD,0DAQC"}
|
package/src/lib/project.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ExecutorContext } from '@nx/devkit';
|
|
2
2
|
export declare function GetProjectConfiguration(context: ExecutorContext, projectName?: string | undefined): import("@nx/devkit").ProjectConfiguration;
|
|
3
3
|
export declare function GetProjectRoot(context: ExecutorContext, projectName?: string | undefined): string;
|
|
4
|
-
export declare function GetProjectSourceRoot(context: ExecutorContext, projectName?: string | undefined): string
|
|
4
|
+
export declare function GetProjectSourceRoot(context: ExecutorContext, projectName?: string | undefined): string;
|
package/src/lib/project.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetProjectSourceRoot = exports.GetProjectRoot = exports.GetProjectConfiguration = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
4
5
|
function GetProjectConfiguration(context, projectName = context.projectName) {
|
|
5
6
|
const { projectsConfigurations } = context;
|
|
6
7
|
if (!projectsConfigurations) {
|
|
@@ -22,8 +23,9 @@ function GetProjectRoot(context, projectName = context.projectName) {
|
|
|
22
23
|
}
|
|
23
24
|
exports.GetProjectRoot = GetProjectRoot;
|
|
24
25
|
function GetProjectSourceRoot(context, projectName = context.projectName) {
|
|
26
|
+
var _a;
|
|
25
27
|
const projectConfiguration = GetProjectConfiguration(context, projectName);
|
|
26
|
-
return projectConfiguration.sourceRoot;
|
|
28
|
+
return (_a = projectConfiguration.sourceRoot) !== null && _a !== void 0 ? _a : (0, path_1.join)(projectConfiguration.root, 'src');
|
|
27
29
|
}
|
|
28
30
|
exports.GetProjectSourceRoot = GetProjectSourceRoot;
|
|
29
31
|
//# sourceMappingURL=project.js.map
|
package/src/lib/project.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/project.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/project.ts"],"names":[],"mappings":";;;AACA,+BAA4B;AAE5B,SAAgB,uBAAuB,CAAC,OAAwB,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW;IACjG,MAAM,EAAE,sBAAsB,EAAE,GAAG,OAAO,CAAC;IAE3C,IAAI,CAAC,sBAAsB,EAAE;QAC3B,MAAM,IAAI,KAAK,CACb,iHAAiH,CAAC,CAAC;KACtH;IAED,IAAI,CAAC,WAAW,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,2FAA2F,CAAC,CAAC;KAC9G;IAED,MAAM,oBAAoB,GAAG,sBAAsB,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAE1E,IAAI,CAAC,oBAAoB,EAAE;QACzB,MAAM,IAAI,KAAK,CAAC,0CAA2C,WAAY,cAAc,CAAC,CAAC;KACxF;IAED,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAnBD,0DAmBC;AAED,SAAgB,cAAc,CAAC,OAAwB,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW;IACxF,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3E,OAAO,oBAAoB,CAAC,IAAI,CAAC;AACnC,CAAC;AAHD,wCAGC;AAED,SAAgB,oBAAoB,CAAC,OAAwB,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW;;IAC9F,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAC3E,OAAO,MAAA,oBAAoB,CAAC,UAAU,mCAAI,IAAA,WAAI,EAAC,oBAAoB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACnF,CAAC;AAHD,oDAGC"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SkipNonGeneratorsProject = void 0;
|
|
4
4
|
const generator_utilities_1 = require("@rxap/generator-utilities");
|
|
5
|
+
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
5
6
|
const generators_1 = require("./generators");
|
|
6
7
|
function SkipNonGeneratorsProject(tree, options, project, projectName) {
|
|
7
|
-
var _a;
|
|
8
8
|
if ((0, generator_utilities_1.SkipProject)(tree, options, project, projectName)) {
|
|
9
9
|
return true;
|
|
10
10
|
}
|
|
11
|
-
if (!(
|
|
11
|
+
if (!(0, workspace_utilities_1.IsPluginProject)(project)) {
|
|
12
12
|
return true;
|
|
13
13
|
}
|
|
14
14
|
if (!(0, generators_1.HasGenerators)(tree, project)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skip-non-generators-project.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/skip-non-generators-project.ts"],"names":[],"mappings":";;;AAIA,mEAGmC;AACnC,6CAA6C;AAE7C,SAAgB,wBAAwB,CACtC,IAAU,EACV,OAA2B,EAC3B,OAA6B,EAC7B,WAAmB
|
|
1
|
+
{"version":3,"file":"skip-non-generators-project.js","sourceRoot":"","sources":["../../../../../../packages/plugin/utilities/src/lib/skip-non-generators-project.ts"],"names":[],"mappings":";;;AAIA,mEAGmC;AACnC,mEAA4D;AAC5D,6CAA6C;AAE7C,SAAgB,wBAAwB,CACtC,IAAU,EACV,OAA2B,EAC3B,OAA6B,EAC7B,WAAmB;IAEnB,IAAI,IAAA,iCAAW,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE;QACpD,OAAO,IAAI,CAAC;KACb;IACD,IAAI,CAAC,IAAA,qCAAe,EAAC,OAAO,CAAC,EAAE;QAC7B,OAAO,IAAI,CAAC;KACb;IACD,IAAI,CAAC,IAAA,0BAAa,EAAC,IAAI,EAAE,OAAO,CAAC,EAAE;QACjC,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAjBD,4DAiBC"}
|