@rxap/plugin-library 16.0.0-dev.14 → 16.0.0-dev.15
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 +8 -0
- package/README.md +57 -1
- package/generators.json +42 -0
- package/package.json +10 -9
- package/src/generators/expose-as-schematic/generator.d.ts +4 -0
- package/src/generators/expose-as-schematic/generator.js +44 -0
- package/src/generators/expose-as-schematic/generator.js.map +1 -0
- package/src/generators/expose-as-schematic/index.d.ts +2 -0
- package/src/generators/expose-as-schematic/index.js +8 -0
- package/src/generators/expose-as-schematic/index.js.map +1 -0
- package/src/generators/expose-as-schematic/schema.d.ts +3 -0
- package/src/generators/expose-as-schematic/schema.json +16 -0
- package/src/generators/fix-dependencies/index.d.ts +2 -0
- package/src/generators/fix-dependencies/index.js +8 -0
- package/src/generators/fix-dependencies/index.js.map +1 -0
- package/src/generators/index-export/index.d.ts +2 -0
- package/src/generators/index-export/index.js +8 -0
- package/src/generators/index-export/index.js.map +1 -0
- package/src/generators/init/index.d.ts +2 -0
- package/src/generators/init/index.js +8 -0
- package/src/generators/init/index.js.map +1 -0
- package/src/generators/init-buildable/index.d.ts +2 -0
- package/src/generators/init-buildable/index.js +8 -0
- package/src/generators/init-buildable/index.js.map +1 -0
- package/src/generators/init-plugin/generator.js +16 -13
- package/src/generators/init-plugin/generator.js.map +1 -1
- package/src/generators/init-plugin/index.d.ts +2 -0
- package/src/generators/init-plugin/index.js +8 -0
- package/src/generators/init-plugin/index.js.map +1 -0
- package/src/generators/init-publishable/index.d.ts +2 -0
- package/src/generators/init-publishable/index.js +8 -0
- package/src/generators/init-publishable/index.js.map +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.0.0-dev.15](https://gitlab.com/rxap/packages/compare/@rxap/plugin-library@16.0.0-dev.14...@rxap/plugin-library@16.0.0-dev.15) (2023-08-06)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- add expose-as-schematic to plugin projects with generators ([6c9fac8](https://gitlab.com/rxap/packages/commit/6c9fac892950e2942e7994673c35987b9b1b6fe7))
|
|
11
|
+
- ensure new line ([2db00f1](https://gitlab.com/rxap/packages/commit/2db00f115cf59e0e89fa53c70426b3e7cb829461))
|
|
12
|
+
- expose generators as schematics ([679ca36](https://gitlab.com/rxap/packages/commit/679ca36d3712a11e4dc838762bca2f7c471e1e04))
|
|
13
|
+
|
|
6
14
|
# [16.0.0-dev.14](https://gitlab.com/rxap/packages/compare/@rxap/plugin-library@16.0.0-dev.13...@rxap/plugin-library@16.0.0-dev.14) (2023-08-05)
|
|
7
15
|
|
|
8
16
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ yarn add @rxap/plugin-library
|
|
|
19
19
|
```
|
|
20
20
|
**Install peer dependencies:**
|
|
21
21
|
```bash
|
|
22
|
-
yarn add @nx/devkit@^16.5.0 @rxap/generator-ts-morph@^1.0.1-dev.3 @rxap/generator-utilities@^1.1.0-dev.
|
|
22
|
+
yarn add @nx/devkit@^16.5.0 @rxap/generator-ts-morph@^1.0.1-dev.3 @rxap/generator-utilities@^1.1.0-dev.4 @rxap/node-utilities@^1.1.0-dev.1 @rxap/plugin-angular@^16.1.0-dev.6 @rxap/plugin-nestjs@^16.1.0-dev.5 @rxap/plugin-utilities@^16.1.0-dev.4 @rxap/workspace-utilities@^0.1.0-dev.2 nx@^16.5.0 semver@^7.3.5 ts-morph@^18.0.0
|
|
23
23
|
```
|
|
24
24
|
**Execute the init generator:**
|
|
25
25
|
```bash
|
|
@@ -68,6 +68,62 @@ yarn nx g @rxap/plugin-library:init-buildable
|
|
|
68
68
|
```bash
|
|
69
69
|
yarn nx g @rxap/plugin-library:init-publishable
|
|
70
70
|
```
|
|
71
|
+
|
|
72
|
+
## expose-as-schematic
|
|
73
|
+
> expose-as-schematic generator
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
yarn nx g @rxap/plugin-library:expose-as-schematic
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## init
|
|
80
|
+
> Create and update configurations to use rxap package publish concept
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
yarn nx g @rxap/plugin-library:init
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## fix-dependencies
|
|
87
|
+
> Adds missing dependencies and removes redudant dependencies of a project
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
yarn nx g @rxap/plugin-library:fix-dependencies
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## index-export
|
|
94
|
+
> Generate index exports for each directory and in the src root
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
yarn nx g @rxap/plugin-library:index-export
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## init-plugin
|
|
101
|
+
> init-plugin generator
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
yarn nx g @rxap/plugin-library:init-plugin
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## init-buildable
|
|
108
|
+
> init-buildable generator
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
yarn nx g @rxap/plugin-library:init-buildable
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## init-publishable
|
|
115
|
+
> init-publishable generator
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
yarn nx g @rxap/plugin-library:init-publishable
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## expose-as-schematic
|
|
122
|
+
> expose-as-schematic generator
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
yarn nx g @rxap/plugin-library:expose-as-schematic
|
|
126
|
+
```
|
|
71
127
|
# Executors
|
|
72
128
|
|
|
73
129
|
## update-dependencies
|
package/generators.json
CHANGED
|
@@ -29,6 +29,48 @@
|
|
|
29
29
|
"factory": "./src/generators/init-publishable/generator",
|
|
30
30
|
"schema": "./src/generators/init-publishable/schema.json",
|
|
31
31
|
"description": "init-publishable generator"
|
|
32
|
+
},
|
|
33
|
+
"expose-as-schematic": {
|
|
34
|
+
"factory": "./src/generators/expose-as-schematic/generator",
|
|
35
|
+
"schema": "./src/generators/expose-as-schematic/schema.json",
|
|
36
|
+
"description": "expose-as-schematic generator"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"schematics": {
|
|
40
|
+
"init": {
|
|
41
|
+
"factory": "./src/generators/init/index",
|
|
42
|
+
"schema": "./src/generators/init/schema.json",
|
|
43
|
+
"description": "Create and update configurations to use rxap package publish concept"
|
|
44
|
+
},
|
|
45
|
+
"fix-dependencies": {
|
|
46
|
+
"factory": "./src/generators/fix-dependencies/index",
|
|
47
|
+
"schema": "./src/generators/fix-dependencies/schema.json",
|
|
48
|
+
"description": "Adds missing dependencies and removes redudant dependencies of a project"
|
|
49
|
+
},
|
|
50
|
+
"index-export": {
|
|
51
|
+
"factory": "./src/generators/index-export/index",
|
|
52
|
+
"schema": "./src/generators/index-export/schema.json",
|
|
53
|
+
"description": "Generate index exports for each directory and in the src root"
|
|
54
|
+
},
|
|
55
|
+
"init-plugin": {
|
|
56
|
+
"factory": "./src/generators/init-plugin/index",
|
|
57
|
+
"schema": "./src/generators/init-plugin/schema.json",
|
|
58
|
+
"description": "init-plugin generator"
|
|
59
|
+
},
|
|
60
|
+
"init-buildable": {
|
|
61
|
+
"factory": "./src/generators/init-buildable/index",
|
|
62
|
+
"schema": "./src/generators/init-buildable/schema.json",
|
|
63
|
+
"description": "init-buildable generator"
|
|
64
|
+
},
|
|
65
|
+
"init-publishable": {
|
|
66
|
+
"factory": "./src/generators/init-publishable/index",
|
|
67
|
+
"schema": "./src/generators/init-publishable/schema.json",
|
|
68
|
+
"description": "init-publishable generator"
|
|
69
|
+
},
|
|
70
|
+
"expose-as-schematic": {
|
|
71
|
+
"factory": "./src/generators/expose-as-schematic/index",
|
|
72
|
+
"schema": "./src/generators/expose-as-schematic/schema.json",
|
|
73
|
+
"description": "expose-as-schematic generator"
|
|
32
74
|
}
|
|
33
75
|
}
|
|
34
76
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxap/plugin-library",
|
|
3
|
-
"version": "16.0.0-dev.
|
|
3
|
+
"version": "16.0.0-dev.15",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"executors": "./executors.json",
|
|
6
6
|
"generators": "./generators.json",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"package": "@rxap/generator-utilities",
|
|
19
|
-
"version": "1.1.0-dev.
|
|
19
|
+
"version": "1.1.0-dev.4"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"package": "@rxap/node-utilities",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"package": "@rxap/plugin-nestjs",
|
|
31
|
-
"version": "16.1.0-dev.
|
|
31
|
+
"version": "16.1.0-dev.5"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"package": "@rxap/plugin-utilities",
|
|
@@ -75,22 +75,23 @@
|
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"@nx/devkit": "^16.5.0",
|
|
77
77
|
"@rxap/generator-ts-morph": "^1.0.1-dev.3",
|
|
78
|
-
"@rxap/generator-utilities": "^1.1.0-dev.
|
|
78
|
+
"@rxap/generator-utilities": "^1.1.0-dev.4",
|
|
79
79
|
"@rxap/node-utilities": "^1.1.0-dev.1",
|
|
80
80
|
"@rxap/plugin-angular": "^16.1.0-dev.6",
|
|
81
|
-
"@rxap/plugin-nestjs": "^16.1.0-dev.
|
|
81
|
+
"@rxap/plugin-nestjs": "^16.1.0-dev.5",
|
|
82
82
|
"@rxap/plugin-utilities": "^16.1.0-dev.4",
|
|
83
83
|
"@rxap/workspace-utilities": "^0.1.0-dev.2",
|
|
84
84
|
"nx": "^16.5.0",
|
|
85
85
|
"semver": "^7.3.5",
|
|
86
86
|
"ts-morph": "^18.0.0",
|
|
87
|
-
"@rxap/plugin-localazy": "16.1.0-dev.
|
|
88
|
-
"@rxap/schematics-ts-morph": "16.0.0-dev.
|
|
87
|
+
"@rxap/plugin-localazy": "16.1.0-dev.3",
|
|
88
|
+
"@rxap/schematics-ts-morph": "16.0.0-dev.8",
|
|
89
89
|
"@rxap/schematics-utilities": "16.0.0-dev.7",
|
|
90
90
|
"@rxap/utilities": "16.0.0-dev.6",
|
|
91
|
-
"@rxap/workspace-ts-morph": "0.0
|
|
91
|
+
"@rxap/workspace-ts-morph": "0.1.0-dev.0"
|
|
92
92
|
},
|
|
93
|
-
"
|
|
93
|
+
"schematics": "./generators.json",
|
|
94
|
+
"gitHead": "8f010d8945a8bd56c8968c2af129b1e0b2f656cf",
|
|
94
95
|
"main": "./src/index.js",
|
|
95
96
|
"types": "./src/index.d.ts"
|
|
96
97
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.exposeAsSchematicGenerator = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const plugin_utilities_1 = require("@rxap/plugin-utilities");
|
|
7
|
+
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
function skipProject(tree, options, project, projectName) {
|
|
10
|
+
if ((0, plugin_utilities_1.SkipNonGeneratorsProject)(tree, options, project, projectName)) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
function exposeAsSchematicGenerator(tree, options) {
|
|
16
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
17
|
+
console.log('expose as schematic generator:', options);
|
|
18
|
+
for (const [projectName, project] of (0, devkit_1.getProjects)(tree).entries()) {
|
|
19
|
+
if (skipProject(tree, options, project, projectName)) {
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
console.log(`expose as schematic for project: ${projectName}`);
|
|
23
|
+
(0, plugin_utilities_1.UpdateGenerators)(tree, project, (generators) => {
|
|
24
|
+
var _a;
|
|
25
|
+
(_a = generators.schematics) !== null && _a !== void 0 ? _a : (generators.schematics = {});
|
|
26
|
+
for (const [name, generator] of Object.entries(generators.generators)) {
|
|
27
|
+
tree.write((0, path_1.join)(project.root, (0, path_1.dirname)(generator.schema), 'index.ts'), `import { convertNxGenerator } from '@nx/devkit';\nimport generator from './generator';\n\nconst schematic = convertNxGenerator(generator);\nexport default schematic;\n`);
|
|
28
|
+
generators.schematics[name] = {
|
|
29
|
+
factory: `${(0, path_1.dirname)(generator.schema)}/index`,
|
|
30
|
+
schema: generator.schema,
|
|
31
|
+
description: generator.description,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return generators;
|
|
35
|
+
});
|
|
36
|
+
yield (0, workspace_utilities_1.UpdateProjectPackageJson)(tree, (packageJson) => {
|
|
37
|
+
packageJson['schematics'] = packageJson['generators'];
|
|
38
|
+
}, { projectName });
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
exports.exposeAsSchematicGenerator = exposeAsSchematicGenerator;
|
|
43
|
+
exports.default = exposeAsSchematicGenerator;
|
|
44
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/expose-as-schematic/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAIoB;AACpB,6DAGgC;AAChC,mEAAqE;AACrE,+BAGc;AAGd,SAAS,WAAW,CAClB,IAAU,EACV,OAAyC,EACzC,OAA6B,EAC7B,WAAmB;IAGnB,IAAI,IAAA,2CAAwB,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE;QACjE,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AAEf,CAAC;AAED,SAAsB,0BAA0B,CAC9C,IAAU,EACV,OAAyC;;QAEzC,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;QAEvD,KAAK,MAAM,CAAE,WAAW,EAAE,OAAO,CAAE,IAAI,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;YAElE,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE;gBACpD,SAAS;aACV;YAED,OAAO,CAAC,GAAG,CAAC,oCAAqC,WAAY,EAAE,CAAC,CAAC;YAEjE,IAAA,mCAAgB,EAAC,IAAI,EAAE,OAAO,EAAE,CAAC,UAAU,EAAE,EAAE;;gBAE7C,MAAA,UAAU,CAAC,UAAU,oCAArB,UAAU,CAAC,UAAU,GAAK,EAAE,EAAC;gBAE7B,KAAK,MAAM,CAAE,IAAI,EAAE,SAAS,CAAE,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;oBACvE,IAAI,CAAC,KAAK,CACR,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,IAAA,cAAO,EAAC,SAAS,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EACzD,yKAAyK,CAC1K,CAAC;oBACF,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG;wBAC5B,OAAO,EAAE,GAAI,IAAA,cAAO,EAAC,SAAS,CAAC,MAAM,CAAE,QAAQ;wBAC/C,MAAM,EAAE,SAAS,CAAC,MAAM;wBACxB,WAAW,EAAE,SAAS,CAAC,WAAW;qBACnC,CAAC;iBACH;gBAED,OAAO,UAAU,CAAC;YAEpB,CAAC,CAAC,CAAC;YAEH,MAAM,IAAA,8CAAwB,EAAC,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE;gBACnD,WAAW,CAAC,YAAY,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;YACxD,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;SAErB;IACH,CAAC;CAAA;AAvCD,gEAuCC;AAED,kBAAe,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const generator_1 = tslib_1.__importDefault(require("./generator"));
|
|
6
|
+
const schematic = (0, devkit_1.convertNxGenerator)(generator_1.default);
|
|
7
|
+
exports.default = schematic;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/expose-as-schematic/index.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,oEAAoC;AAEpC,MAAM,SAAS,GAAG,IAAA,2BAAkB,EAAC,mBAAS,CAAC,CAAC;AAChD,kBAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "ExposeAsSchematic",
|
|
4
|
+
"title": "",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"projects": {
|
|
8
|
+
"alias": "project",
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"required": []
|
|
16
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const generator_1 = tslib_1.__importDefault(require("./generator"));
|
|
6
|
+
const schematic = (0, devkit_1.convertNxGenerator)(generator_1.default);
|
|
7
|
+
exports.default = schematic;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/fix-dependencies/index.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,oEAAoC;AAEpC,MAAM,SAAS,GAAG,IAAA,2BAAkB,EAAC,mBAAS,CAAC,CAAC;AAChD,kBAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const generator_1 = tslib_1.__importDefault(require("./generator"));
|
|
6
|
+
const schematic = (0, devkit_1.convertNxGenerator)(generator_1.default);
|
|
7
|
+
exports.default = schematic;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/index-export/index.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,oEAAoC;AAEpC,MAAM,SAAS,GAAG,IAAA,2BAAkB,EAAC,mBAAS,CAAC,CAAC;AAChD,kBAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const generator_1 = tslib_1.__importDefault(require("./generator"));
|
|
6
|
+
const schematic = (0, devkit_1.convertNxGenerator)(generator_1.default);
|
|
7
|
+
exports.default = schematic;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init/index.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,oEAAoC;AAEpC,MAAM,SAAS,GAAG,IAAA,2BAAkB,EAAC,mBAAS,CAAC,CAAC;AAChD,kBAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const generator_1 = tslib_1.__importDefault(require("./generator"));
|
|
6
|
+
const schematic = (0, devkit_1.convertNxGenerator)(generator_1.default);
|
|
7
|
+
exports.default = schematic;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-buildable/index.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,oEAAoC;AAEpC,MAAM,SAAS,GAAG,IAAA,2BAAkB,EAAC,mBAAS,CAAC,CAAC;AAChD,kBAAe,SAAS,CAAC"}
|
|
@@ -4,6 +4,8 @@ exports.initPluginGenerator = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const generator_utilities_1 = require("@rxap/generator-utilities");
|
|
7
|
+
const plugin_utilities_1 = require("@rxap/plugin-utilities");
|
|
8
|
+
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
7
9
|
function skipProject(tree, options, project, projectName) {
|
|
8
10
|
var _a;
|
|
9
11
|
if ((0, generator_utilities_1.SkipNonLibraryProject)(tree, options, project, projectName)) {
|
|
@@ -14,25 +16,26 @@ function skipProject(tree, options, project, projectName) {
|
|
|
14
16
|
}
|
|
15
17
|
return false;
|
|
16
18
|
}
|
|
17
|
-
function updateProjectTargets(project) {
|
|
18
|
-
|
|
19
|
-
(_a = project.targets) !== null && _a !== void 0 ? _a : (project.targets = {});
|
|
20
|
-
project.targets['check-version'] = {
|
|
19
|
+
function updateProjectTargets(tree, project) {
|
|
20
|
+
(0, workspace_utilities_1.CoerceTarget)(project, 'check-version', {
|
|
21
21
|
executor: '@rxap/plugin-library:check-version',
|
|
22
22
|
options: {
|
|
23
23
|
packageName: 'nx',
|
|
24
24
|
},
|
|
25
|
-
};
|
|
25
|
+
});
|
|
26
|
+
if ((0, plugin_utilities_1.HasGenerators)(tree, project)) {
|
|
27
|
+
(0, workspace_utilities_1.CoerceTarget)(project, 'expose-as-schematic', {
|
|
28
|
+
executor: '@rxap/plugin-library:run-generator',
|
|
29
|
+
options: {
|
|
30
|
+
generator: '@rxap/plugin-library:expose-as-schematic',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}
|
|
26
34
|
}
|
|
27
35
|
function setGeneralTargetDefaults(tree) {
|
|
28
|
-
var _a, _b, _c, _d;
|
|
29
|
-
var _e;
|
|
30
36
|
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
31
|
-
(
|
|
32
|
-
(
|
|
33
|
-
if (!((_d = (_c = nxJson.targetDefaults['build']) === null || _c === void 0 ? void 0 : _c.dependsOn) === null || _d === void 0 ? void 0 : _d.includes('check-version'))) {
|
|
34
|
-
nxJson.targetDefaults['build'].dependsOn.push('check-version');
|
|
35
|
-
}
|
|
37
|
+
(0, workspace_utilities_1.CoerceTargetDefaultsDependency)(nxJson, 'build', 'check-version');
|
|
38
|
+
(0, workspace_utilities_1.CoerceTargetDefaultsDependency)(nxJson, 'build', 'expose-as-schematic');
|
|
36
39
|
(0, devkit_1.updateNxJson)(tree, nxJson);
|
|
37
40
|
}
|
|
38
41
|
function initPluginGenerator(tree, options) {
|
|
@@ -44,7 +47,7 @@ function initPluginGenerator(tree, options) {
|
|
|
44
47
|
continue;
|
|
45
48
|
}
|
|
46
49
|
console.log(`init project: ${projectName}`);
|
|
47
|
-
updateProjectTargets(project);
|
|
50
|
+
updateProjectTargets(tree, project);
|
|
48
51
|
(0, devkit_1.updateProjectConfiguration)(tree, project.name, project);
|
|
49
52
|
}
|
|
50
53
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-plugin/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAOoB;AACpB,mEAAkE;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-plugin/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAOoB;AACpB,mEAAkE;AAClE,6DAAuD;AACvD,mEAGmC;AAGnC,SAAS,WAAW,CAClB,IAAU,EACV,OAAkC,EAClC,OAA6B,EAC7B,WAAmB;;IAGnB,IAAI,IAAA,2CAAqB,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE;QAC9D,OAAO,IAAI,CAAC;KACb;IAED,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,IAAI,0CAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA,EAAE;QACrC,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AAEf,CAAC;AAED,SAAS,oBAAoB,CAAC,IAAU,EAAE,OAA6B;IAErE,IAAA,kCAAY,EAAC,OAAO,EAAE,eAAe,EAAE;QACrC,QAAQ,EAAE,oCAAoC;QAC9C,OAAO,EAAE;YACP,WAAW,EAAE,IAAI;SAClB;KACF,CAAC,CAAC;IAEH,IAAI,IAAA,gCAAa,EAAC,IAAI,EAAE,OAAO,CAAC,EAAE;QAChC,IAAA,kCAAY,EAAC,OAAO,EAAE,qBAAqB,EAAE;YAC3C,QAAQ,EAAE,oCAAoC;YAC9C,OAAO,EAAE;gBACP,SAAS,EAAE,0CAA0C;aACtD;SACF,CAAC,CAAC;KACJ;AAEH,CAAC;AAED,SAAS,wBAAwB,CAAC,IAAU;IAC1C,MAAM,MAAM,GAAG,IAAA,mBAAU,EAAC,IAAI,CAAC,CAAC;IAEhC,IAAA,oDAA8B,EAAC,MAAM,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;IACjE,IAAA,oDAA8B,EAAC,MAAM,EAAE,OAAO,EAAE,qBAAqB,CAAC,CAAC;IAEvE,IAAA,qBAAY,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAC7B,CAAC;AAED,SAAsB,mBAAmB,CACvC,IAAU,EACV,OAAkC;;QAElC,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;QAEvD,wBAAwB,CAAC,IAAI,CAAC,CAAC;QAE/B,KAAK,MAAM,CAAE,WAAW,EAAE,OAAO,CAAE,IAAI,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;YAElE,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE;gBACpD,SAAS;aACV;YAED,OAAO,CAAC,GAAG,CAAC,iBAAkB,WAAY,EAAE,CAAC,CAAC;YAE9C,oBAAoB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAEpC,IAAA,mCAA0B,EAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;SAEzD;IAEH,CAAC;CAAA;AAtBD,kDAsBC;AAED,kBAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const generator_1 = tslib_1.__importDefault(require("./generator"));
|
|
6
|
+
const schematic = (0, devkit_1.convertNxGenerator)(generator_1.default);
|
|
7
|
+
exports.default = schematic;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-plugin/index.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,oEAAoC;AAEpC,MAAM,SAAS,GAAG,IAAA,2BAAkB,EAAC,mBAAS,CAAC,CAAC;AAChD,kBAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const generator_1 = tslib_1.__importDefault(require("./generator"));
|
|
6
|
+
const schematic = (0, devkit_1.convertNxGenerator)(generator_1.default);
|
|
7
|
+
exports.default = schematic;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-publishable/index.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,oEAAoC;AAEpC,MAAM,SAAS,GAAG,IAAA,2BAAkB,EAAC,mBAAS,CAAC,CAAC;AAChD,kBAAe,SAAS,CAAC"}
|