@rxap/plugin-library 19.0.1 → 19.1.0-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 +7 -0
- package/README.md +29 -1
- package/generators.json +20 -0
- package/package.json +3 -2
- package/src/generators/add-migration/generator.d.ts +4 -0
- package/src/generators/add-migration/generator.js +32 -0
- package/src/generators/add-migration/generator.js.map +1 -0
- package/src/generators/add-migration/index.d.ts +2 -0
- package/src/generators/add-migration/index.js +8 -0
- package/src/generators/add-migration/index.js.map +1 -0
- package/src/generators/add-migration/schema.d.ts +7 -0
- package/src/generators/add-migration/schema.json +39 -0
- package/src/generators/init/init-project.js +5 -1
- package/src/generators/init/init-project.js.map +1 -1
- package/src/generators/init/init-workspace.js +2 -0
- package/src/generators/init/init-workspace.js.map +1 -1
- package/src/generators/init-plugin/generator.js +1 -1
- package/src/generators/init-plugin/generator.js.map +1 -1
- package/src/generators/init-plugin/init-project.d.ts +1 -1
- package/src/generators/init-plugin/init-project.js +3 -6
- package/src/generators/init-plugin/init-project.js.map +1 -1
- package/src/generators/init-plugin/update-package-json.d.ts +1 -1
- package/src/generators/init-plugin/update-package-json.js +7 -10
- package/src/generators/init-plugin/update-package-json.js.map +1 -1
- package/src/generators/init-with-migrations/generator.d.ts +4 -0
- package/src/generators/init-with-migrations/generator.js +45 -0
- package/src/generators/init-with-migrations/generator.js.map +1 -0
- package/src/generators/init-with-migrations/index.d.ts +2 -0
- package/src/generators/init-with-migrations/index.js +8 -0
- package/src/generators/init-with-migrations/index.js.map +1 -0
- package/src/generators/init-with-migrations/init-project.d.ts +3 -0
- package/src/generators/init-with-migrations/init-project.js +20 -0
- package/src/generators/init-with-migrations/init-project.js.map +1 -0
- package/src/generators/init-with-migrations/init-workspace.d.ts +3 -0
- package/src/generators/init-with-migrations/init-workspace.js +8 -0
- package/src/generators/init-with-migrations/init-workspace.js.map +1 -0
- package/src/generators/init-with-migrations/schema.d.ts +7 -0
- package/src/generators/init-with-migrations/schema.json +32 -0
- package/src/generators/init-with-migrations/update-package-json.d.ts +2 -0
- package/src/generators/init-with-migrations/update-package-json.js +13 -0
- package/src/generators/init-with-migrations/update-package-json.js.map +1 -0
- package/src/generators/init-with-migrations/update-project-targets.d.ts +2 -0
- package/src/generators/init-with-migrations/update-project-targets.js +27 -0
- package/src/generators/init-with-migrations/update-project-targets.js.map +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
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
|
+
# [19.1.0-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/plugin-library@19.0.1...@rxap/plugin-library@19.1.0-dev.0) (2024-05-31)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- add generator to add a migration to a library ([368f672](https://gitlab.com/rxap/packages/commit/368f67284f97649b20be6f27e3476a49c6c9e973))
|
|
11
|
+
- add generator to init a library with migrations ([ca4ad16](https://gitlab.com/rxap/packages/commit/ca4ad16d4a674f89f40924979a70004867b9a7df))
|
|
12
|
+
|
|
6
13
|
## [19.0.1](https://gitlab.com/rxap/packages/compare/@rxap/plugin-library@19.0.1-dev.0...@rxap/plugin-library@19.0.1) (2024-05-30)
|
|
7
14
|
|
|
8
15
|
**Note:** Version bump only for package @rxap/plugin-library
|
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@^19.1.1 @rxap/generator-ts-morph@^1.0.7 @rxap/node-utilities@^1.2.2 @rxap/plugin-utilities@^19.0.1 @rxap/ts-morph@^1.2.2 @rxap/utilities@^16.2.2 @rxap/workspace-utilities@^19.0.1 nx@^19.1.1 ts-morph@^18.0.0
|
|
22
|
+
yarn add @nx/devkit@^19.1.1 @nx/plugin@^19.1.1 @rxap/generator-ts-morph@^1.0.7 @rxap/node-utilities@^1.2.2 @rxap/plugin-utilities@^19.0.1 @rxap/ts-morph@^1.2.2 @rxap/utilities@^16.2.2 @rxap/workspace-utilities@^19.0.1 nx@^19.1.1 ts-morph@^18.0.0
|
|
23
23
|
```
|
|
24
24
|
**Execute the init generator:**
|
|
25
25
|
```bash
|
|
@@ -90,6 +90,20 @@ yarn nx g @rxap/plugin-library:bundle-json-schema
|
|
|
90
90
|
yarn nx g @rxap/plugin-library:index-json-schema
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
+
## init-with-migrations
|
|
94
|
+
> init-with-migrations generator
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
yarn nx g @rxap/plugin-library:init-with-migrations
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## add-migration
|
|
101
|
+
> add-migration generator
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
yarn nx g @rxap/plugin-library:add-migration
|
|
105
|
+
```
|
|
106
|
+
|
|
93
107
|
## init
|
|
94
108
|
> Create and update configurations to use rxap package publish concept
|
|
95
109
|
|
|
@@ -152,6 +166,20 @@ yarn nx g @rxap/plugin-library:bundle-json-schema
|
|
|
152
166
|
```bash
|
|
153
167
|
yarn nx g @rxap/plugin-library:index-json-schema
|
|
154
168
|
```
|
|
169
|
+
|
|
170
|
+
## init-with-migrations
|
|
171
|
+
> init-with-migrations generator
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
yarn nx g @rxap/plugin-library:init-with-migrations
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## add-migration
|
|
178
|
+
> add-migration generator
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
yarn nx g @rxap/plugin-library:add-migration
|
|
182
|
+
```
|
|
155
183
|
# Executors
|
|
156
184
|
|
|
157
185
|
## update-dependencies
|
package/generators.json
CHANGED
|
@@ -44,6 +44,16 @@
|
|
|
44
44
|
"factory": "./src/generators/index-json-schema/generator",
|
|
45
45
|
"schema": "./src/generators/index-json-schema/schema.json",
|
|
46
46
|
"description": "index-json-schema generator"
|
|
47
|
+
},
|
|
48
|
+
"init-with-migrations": {
|
|
49
|
+
"factory": "./src/generators/init-with-migrations/generator",
|
|
50
|
+
"schema": "./src/generators/init-with-migrations/schema.json",
|
|
51
|
+
"description": "init-with-migrations generator"
|
|
52
|
+
},
|
|
53
|
+
"add-migration": {
|
|
54
|
+
"factory": "./src/generators/add-migration/generator",
|
|
55
|
+
"schema": "./src/generators/add-migration/schema.json",
|
|
56
|
+
"description": "add-migration generator"
|
|
47
57
|
}
|
|
48
58
|
},
|
|
49
59
|
"schematics": {
|
|
@@ -91,6 +101,16 @@
|
|
|
91
101
|
"factory": "./src/generators/index-json-schema/index",
|
|
92
102
|
"schema": "./src/generators/index-json-schema/schema.json",
|
|
93
103
|
"description": "index-json-schema generator"
|
|
104
|
+
},
|
|
105
|
+
"init-with-migrations": {
|
|
106
|
+
"factory": "./src/generators/init-with-migrations/index",
|
|
107
|
+
"schema": "./src/generators/init-with-migrations/schema.json",
|
|
108
|
+
"description": "init-with-migrations generator"
|
|
109
|
+
},
|
|
110
|
+
"add-migration": {
|
|
111
|
+
"factory": "./src/generators/add-migration/index",
|
|
112
|
+
"schema": "./src/generators/add-migration/schema.json",
|
|
113
|
+
"description": "add-migration generator"
|
|
94
114
|
}
|
|
95
115
|
}
|
|
96
116
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "19.0.
|
|
2
|
+
"version": "19.1.0-dev.0",
|
|
3
3
|
"name": "@rxap/plugin-library",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"dependencies": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
13
|
"@nx/devkit": "^19.1.1",
|
|
14
|
+
"@nx/plugin": "^19.1.1",
|
|
14
15
|
"@rxap/generator-ts-morph": "^1.0.7",
|
|
15
16
|
"@rxap/node-utilities": "^1.2.2",
|
|
16
17
|
"@rxap/plugin-utilities": "^19.0.1",
|
|
@@ -85,6 +86,6 @@
|
|
|
85
86
|
},
|
|
86
87
|
"schematics": "./generators.json",
|
|
87
88
|
"type": "commonjs",
|
|
88
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "41ec24b8d91caeefbf6ad32f39d813cb114a62cc",
|
|
89
90
|
"main": "./src/index.js"
|
|
90
91
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addMigrationGenerator = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const generators_1 = require("@nx/plugin/generators");
|
|
7
|
+
const utilities_1 = require("@rxap/utilities");
|
|
8
|
+
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
9
|
+
const path_1 = require("path");
|
|
10
|
+
const init_project_1 = require("../init-with-migrations/init-project");
|
|
11
|
+
const init_workspace_1 = require("../init-with-migrations/init-workspace");
|
|
12
|
+
function addMigrationGenerator(tree, options) {
|
|
13
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
const projectRoot = (0, workspace_utilities_1.GetProjectRoot)(tree, options.project);
|
|
15
|
+
const majorVersion = options.packageVersion.split('.')[0];
|
|
16
|
+
const migrationRoot = (0, path_1.join)(projectRoot, 'src', 'migrations', `${majorVersion}.0.0`, (0, utilities_1.dasherize)(options.name));
|
|
17
|
+
const generatorOptions = { project: options.project, projects: [options.project] };
|
|
18
|
+
(0, init_workspace_1.initWorkspace)(tree, generatorOptions);
|
|
19
|
+
yield (0, generators_1.migrationGenerator)(tree, {
|
|
20
|
+
name: options.name,
|
|
21
|
+
packageVersion: options.packageVersion,
|
|
22
|
+
packageJsonUpdates: options.packageJsonUpdates,
|
|
23
|
+
description: options.description,
|
|
24
|
+
directory: migrationRoot,
|
|
25
|
+
nameAndDirectoryFormat: 'as-provided'
|
|
26
|
+
});
|
|
27
|
+
(0, init_project_1.initProject)(tree, options.project, (0, devkit_1.readProjectConfiguration)(tree, options.project), generatorOptions);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
exports.addMigrationGenerator = addMigrationGenerator;
|
|
31
|
+
exports.default = addMigrationGenerator;
|
|
32
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/add-migration/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAMoB;AACpB,sDAA2D;AAC3D,+CAA4C;AAC5C,mEAA2D;AAC3D,+BAA4B;AAE5B,uEAAmE;AACnE,2EAAuE;AAGvE,SAAsB,qBAAqB,CACzC,IAAU,EACV,OAAoC;;QAGpC,MAAM,WAAW,GAAG,IAAA,oCAAc,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1D,MAAM,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1D,MAAM,aAAa,GAAG,IAAA,WAAI,EAAC,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,GAAG,YAAY,MAAM,EAAE,IAAA,qBAAS,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;QAE7G,MAAM,gBAAgB,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACnF,IAAA,8BAAa,EAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;QAEtC,MAAM,IAAA,+BAAkB,EAAC,IAAI,EAAE;YAC7B,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;YAC9C,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,SAAS,EAAE,aAAa;YACxB,sBAAsB,EAAE,aAAa;SACtC,CAAC,CAAC;QAEH,IAAA,0BAAW,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC,CAAC;IAExG,CAAC;CAAA;AAvBD,sDAuBC;AAED,kBAAe,qBAAqB,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/add-migration/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,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "AddMigration",
|
|
4
|
+
"title": "",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"project": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Name of the project",
|
|
10
|
+
"x-prompt": "For which project should the migration be created?"
|
|
11
|
+
},
|
|
12
|
+
"name": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Name of the migration",
|
|
15
|
+
"x-prompt": "What name would you like to use?"
|
|
16
|
+
},
|
|
17
|
+
"description": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Description of the migration",
|
|
20
|
+
"x-prompt": "What description would you like to use?"
|
|
21
|
+
},
|
|
22
|
+
"packageVersion": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Version to use for the migration.",
|
|
25
|
+
"x-prompt": "What version would you like to use for the migration?",
|
|
26
|
+
"x-priority": "important"
|
|
27
|
+
},
|
|
28
|
+
"packageJsonUpdates": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"description": "Whether or not to include `package.json` updates.",
|
|
31
|
+
"default": false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"required": [
|
|
35
|
+
"project",
|
|
36
|
+
"name",
|
|
37
|
+
"packageVersion"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -6,6 +6,7 @@ const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
|
6
6
|
const init_project_1 = require("../init-buildable/init-project");
|
|
7
7
|
const init_project_2 = require("../init-plugin/init-project");
|
|
8
8
|
const init_project_3 = require("../init-publishable/init-project");
|
|
9
|
+
const init_project_4 = require("../init-with-migrations/init-project");
|
|
9
10
|
const update_project_tags_1 = require("./update-project-tags");
|
|
10
11
|
const update_project_targets_1 = require("./update-project-targets");
|
|
11
12
|
function initProject(tree, projectName, project, options) {
|
|
@@ -20,7 +21,10 @@ function initProject(tree, projectName, project, options) {
|
|
|
20
21
|
(0, init_project_3.initProject)(tree, projectName, project, options);
|
|
21
22
|
}
|
|
22
23
|
if ((0, workspace_utilities_1.IsPluginProject)(project)) {
|
|
23
|
-
|
|
24
|
+
(0, init_project_2.initProject)(tree, projectName, project, options);
|
|
25
|
+
}
|
|
26
|
+
if ((0, workspace_utilities_1.HasMigrations)(tree, { name: projectName })) {
|
|
27
|
+
(0, init_project_4.initProject)(tree, projectName, project, options);
|
|
24
28
|
}
|
|
25
29
|
});
|
|
26
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-project.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init/init-project.ts"],"names":[],"mappings":";;;;AAIA,
|
|
1
|
+
{"version":3,"file":"init-project.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init/init-project.ts"],"names":[],"mappings":";;;;AAIA,mEAKmC;AACnC,iEAAqF;AACrF,8DAA+E;AAC/E,mEAAyF;AACzF,uEAA+F;AAE/F,+DAA0D;AAC1D,qEAAgE;AAEhE,SAAsB,WAAW,CAAC,IAAU,EAAE,WAAmB,EAAE,OAA6B,EAAE,OAA4B;;QAC5H,OAAO,CAAC,GAAG,CAAC,yBAA0B,WAAY,EAAE,CAAC,CAAC;QAEtD,IAAA,uCAAiB,EAAC,OAAO,CAAC,CAAC;QAE3B,IAAA,6CAAoB,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAEvC,IAAI,IAAA,iCAAW,EAAC,OAAO,CAAC,EAAE,CAAC;YACzB,IAAA,0BAAoB,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5D,CAAC;QAED,IAAI,IAAA,mCAAa,EAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC;YACjC,IAAA,0BAAsB,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC9D,CAAC;QAED,IAAI,IAAA,qCAAe,EAAC,OAAO,CAAC,EAAE,CAAC;YAC7B,IAAA,0BAAiB,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACzD,CAAC;QAED,IAAI,IAAA,mCAAa,EAAC,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC;YAC/C,IAAA,0BAAwB,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAChE,CAAC;IAEH,CAAC;CAAA;AAvBD,kCAuBC"}
|
|
@@ -4,6 +4,7 @@ exports.initWorkspace = void 0;
|
|
|
4
4
|
const init_workspace_1 = require("../init-buildable/init-workspace");
|
|
5
5
|
const init_workspace_2 = require("../init-plugin/init-workspace");
|
|
6
6
|
const init_workspace_3 = require("../init-publishable/init-workspace");
|
|
7
|
+
const init_workspace_4 = require("../init-with-migrations/init-workspace");
|
|
7
8
|
const update_default_project_targets_1 = require("./update-default-project-targets");
|
|
8
9
|
function initWorkspace(tree, options) {
|
|
9
10
|
console.log('init library workspace');
|
|
@@ -11,6 +12,7 @@ function initWorkspace(tree, options) {
|
|
|
11
12
|
(0, init_workspace_1.initWorkspace)(tree, options);
|
|
12
13
|
(0, init_workspace_3.initWorkspace)(tree, options);
|
|
13
14
|
(0, init_workspace_2.initWorkspace)(tree, options);
|
|
15
|
+
(0, init_workspace_4.initWorkspace)(tree, options);
|
|
14
16
|
}
|
|
15
17
|
exports.initWorkspace = initWorkspace;
|
|
16
18
|
//# sourceMappingURL=init-workspace.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-workspace.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init/init-workspace.ts"],"names":[],"mappings":";;;AACA,qEAA2F;AAC3F,kEAAqF;AACrF,uEAA+F;
|
|
1
|
+
{"version":3,"file":"init-workspace.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init/init-workspace.ts"],"names":[],"mappings":";;;AACA,qEAA2F;AAC3F,kEAAqF;AACrF,uEAA+F;AAC/F,2EAAqG;AAErG,qFAA+E;AAE/E,SAAgB,aAAa,CAAC,IAAU,EAAE,OAA4B;IACpE,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IAEtC,IAAA,4DAA2B,EAAC,IAAI,CAAC,CAAC;IAElC,IAAA,8BAAsB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtC,IAAA,8BAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACxC,IAAA,8BAAmB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnC,IAAA,8BAA0B,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC5C,CAAC;AATD,sCASC"}
|
|
@@ -31,7 +31,7 @@ function initPluginGenerator(tree, options) {
|
|
|
31
31
|
if (skipProject(tree, options, project, projectName)) {
|
|
32
32
|
continue;
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
(0, init_project_1.initProject)(tree, projectName, project, options);
|
|
35
35
|
(0, devkit_1.updateProjectConfiguration)(tree, projectName, project);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-plugin/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAMoB;AACpB,+CAAmD;AACnD,mEAGmC;AACnC,iDAA6C;AAC7C,qDAAiD;AAGjD,SAAS,WAAW,CAClB,IAAU,EACV,OAAkC,EAClC,OAA6B,EAC7B,WAAmB;IAGnB,IAAI,IAAA,2CAAqB,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,CAAC;QAC/D,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,IAAA,qCAAe,EAAC,OAAO,CAAC,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AAEf,CAAC;AAED,SAAsB,mBAAmB,CACvC,IAAU,EACV,OAAkC;;;QAElC,MAAA,OAAO,CAAC,OAAO,oCAAf,OAAO,CAAC,OAAO,GAAK,SAAS,EAAC;QAC9B,MAAA,OAAO,CAAC,QAAQ,oCAAhB,OAAO,CAAC,QAAQ,GAAK,EAAE,EAAC;QACxB,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,IAAA,4BAAgB,EAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QACxD,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;QAEvD,IAAA,8BAAa,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE7B,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;YAE1B,KAAK,MAAM,CAAE,WAAW,EAAE,OAAO,CAAE,IAAI,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;gBAEnE,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,CAAC;oBACrD,SAAS;gBACX,CAAC;gBAED,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-plugin/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAMoB;AACpB,+CAAmD;AACnD,mEAGmC;AACnC,iDAA6C;AAC7C,qDAAiD;AAGjD,SAAS,WAAW,CAClB,IAAU,EACV,OAAkC,EAClC,OAA6B,EAC7B,WAAmB;IAGnB,IAAI,IAAA,2CAAqB,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,CAAC;QAC/D,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,IAAA,qCAAe,EAAC,OAAO,CAAC,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AAEf,CAAC;AAED,SAAsB,mBAAmB,CACvC,IAAU,EACV,OAAkC;;;QAElC,MAAA,OAAO,CAAC,OAAO,oCAAf,OAAO,CAAC,OAAO,GAAK,SAAS,EAAC;QAC9B,MAAA,OAAO,CAAC,QAAQ,oCAAhB,OAAO,CAAC,QAAQ,GAAK,EAAE,EAAC;QACxB,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,IAAA,4BAAgB,EAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QACxD,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,OAAO,CAAC,CAAC;QAEvD,IAAA,8BAAa,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE7B,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;YAE1B,KAAK,MAAM,CAAE,WAAW,EAAE,OAAO,CAAE,IAAI,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;gBAEnE,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,CAAC;oBACrD,SAAS;gBACX,CAAC;gBAED,IAAA,0BAAW,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;gBAEjD,IAAA,mCAA0B,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;YAEzD,CAAC;QAEH,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;YACxB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;IAEH,CAAC;CAAA;AAjCD,kDAiCC;AAED,kBAAe,mBAAmB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ProjectConfiguration, Tree } from '@nx/devkit';
|
|
2
2
|
import { InitPluginGeneratorSchema } from './schema';
|
|
3
|
-
export declare function initProject(tree: Tree, projectName: string, project: ProjectConfiguration, options: InitPluginGeneratorSchema):
|
|
3
|
+
export declare function initProject(tree: Tree, projectName: string, project: ProjectConfiguration, options: InitPluginGeneratorSchema): void;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initProject = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const update_package_json_1 = require("./update-package-json");
|
|
6
5
|
const update_project_targets_1 = require("./update-project-targets");
|
|
7
6
|
function initProject(tree, projectName, project, options) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
yield (0, update_package_json_1.updatePackageJson)(tree, projectName, project);
|
|
12
|
-
});
|
|
7
|
+
console.log(`init plugin library project: ${projectName}`);
|
|
8
|
+
(0, update_project_targets_1.updateProjectTargets)(tree, project);
|
|
9
|
+
(0, update_package_json_1.updatePackageJson)(tree, projectName, project);
|
|
13
10
|
}
|
|
14
11
|
exports.initProject = initProject;
|
|
15
12
|
//# sourceMappingURL=init-project.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-project.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-plugin/init-project.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"init-project.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-plugin/init-project.ts"],"names":[],"mappings":";;;AAKA,+DAA0D;AAC1D,qEAAgE;AAEhE,SAAgB,WAAW,CAAC,IAAU,EAAE,WAAmB,EAAE,OAA6B,EAAE,OAAkC;IAC5H,OAAO,CAAC,GAAG,CAAC,gCAAiC,WAAY,EAAE,CAAC,CAAC;IAE7D,IAAA,6CAAoB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAEpC,IAAA,uCAAiB,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;AAEhD,CAAC;AAPD,kCAOC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ProjectConfiguration, Tree } from '@nx/devkit';
|
|
2
|
-
export declare function updatePackageJson(tree: Tree, projectName: string, project: ProjectConfiguration):
|
|
2
|
+
export declare function updatePackageJson(tree: Tree, projectName: string, project: ProjectConfiguration): void;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updatePackageJson = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
6
5
|
function updatePackageJson(tree, projectName, project) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, { projectName });
|
|
15
|
-
});
|
|
6
|
+
(0, workspace_utilities_1.UpdateProjectPackageJson)(tree, packageJson => {
|
|
7
|
+
if (packageJson.version === '0.0.1') {
|
|
8
|
+
const nxVersion = (0, workspace_utilities_1.GetNxVersion)(tree);
|
|
9
|
+
const major = nxVersion.split('.')[0];
|
|
10
|
+
packageJson.version = `${major}.0.0`;
|
|
11
|
+
}
|
|
12
|
+
}, { projectName });
|
|
16
13
|
}
|
|
17
14
|
exports.updatePackageJson = updatePackageJson;
|
|
18
15
|
//# sourceMappingURL=update-package-json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-package-json.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-plugin/update-package-json.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-package-json.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-plugin/update-package-json.ts"],"names":[],"mappings":";;;AAIA,mEAGmC;AAEnC,SAAgB,iBAAiB,CAAC,IAAU,EAAE,WAAmB,EAAE,OAA6B;IAC9F,IAAA,8CAAwB,EAAC,IAAI,EAAE,WAAW,CAAC,EAAE;QAE3C,IAAI,WAAW,CAAC,OAAO,KAAK,OAAO,EAAE,CAAC;YACpC,MAAM,SAAS,GAAG,IAAA,kCAAY,EAAC,IAAI,CAAC,CAAC;YACrC,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACtC,WAAW,CAAC,OAAO,GAAG,GAAI,KAAM,MAAM,CAAC;QACzC,CAAC;IAEH,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;AACtB,CAAC;AAVD,8CAUC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initWithMigrationsGenerator = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
8
|
+
const init_project_1 = require("./init-project");
|
|
9
|
+
const init_workspace_1 = require("./init-workspace");
|
|
10
|
+
function skipProject(tree, options, project, projectName) {
|
|
11
|
+
if ((0, workspace_utilities_1.SkipNonLibraryProject)(tree, options, project, projectName)) {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
if (!(0, workspace_utilities_1.HasMigrations)(tree, { name: projectName })) {
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
function initWithMigrationsGenerator(tree, options) {
|
|
20
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
(_a = options.project) !== null && _a !== void 0 ? _a : (options.project = undefined);
|
|
23
|
+
(_b = options.projects) !== null && _b !== void 0 ? _b : (options.projects = []);
|
|
24
|
+
if (options.project) {
|
|
25
|
+
(0, utilities_1.CoerceArrayItems)(options.projects, [options.project]);
|
|
26
|
+
}
|
|
27
|
+
console.log('with migration library init generator:', options);
|
|
28
|
+
(0, init_workspace_1.initWorkspace)(tree, options);
|
|
29
|
+
if (!options.skipProjects) {
|
|
30
|
+
for (const [projectName, project] of (0, devkit_1.getProjects)(tree).entries()) {
|
|
31
|
+
if (skipProject(tree, options, project, projectName)) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
yield (0, init_project_1.initProject)(tree, projectName, project, options);
|
|
35
|
+
(0, devkit_1.updateProjectConfiguration)(tree, projectName, project);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (!options.skipFormat) {
|
|
39
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
exports.initWithMigrationsGenerator = initWithMigrationsGenerator;
|
|
44
|
+
exports.default = initWithMigrationsGenerator;
|
|
45
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-with-migrations/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAMoB;AACpB,+CAAmD;AACnD,mEAGmC;AACnC,iDAA6C;AAC7C,qDAAiD;AAGjD,SAAS,WAAW,CAClB,IAAU,EACV,OAA0C,EAC1C,OAA6B,EAC7B,WAAmB;IAGnB,IAAI,IAAA,2CAAqB,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,CAAC;QAC/D,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,IAAA,mCAAa,EAAC,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC;QAChD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AAEf,CAAC;AAED,SAAsB,2BAA2B,CAC/C,IAAU,EACV,OAA0C;;;QAE1C,MAAA,OAAO,CAAC,OAAO,oCAAf,OAAO,CAAC,OAAO,GAAK,SAAS,EAAC;QAC9B,MAAA,OAAO,CAAC,QAAQ,oCAAhB,OAAO,CAAC,QAAQ,GAAK,EAAE,EAAC;QACxB,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACpB,IAAA,4BAAgB,EAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QACxD,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,wCAAwC,EAAE,OAAO,CAAC,CAAC;QAE/D,IAAA,8BAAa,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE7B,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;YAE1B,KAAK,MAAM,CAAE,WAAW,EAAE,OAAO,CAAE,IAAI,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;gBAEnE,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE,CAAC;oBACrD,SAAS;gBACX,CAAC;gBAED,MAAM,IAAA,0BAAW,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;gBAEvD,IAAA,mCAA0B,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;YAEzD,CAAC;QAEH,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;YACxB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;CAAA;AAhCD,kEAgCC;AAED,kBAAe,2BAA2B,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-with-migrations/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,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initProject = void 0;
|
|
4
|
+
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
5
|
+
const path_1 = require("path");
|
|
6
|
+
const update_package_json_1 = require("./update-package-json");
|
|
7
|
+
const update_project_targets_1 = require("./update-project-targets");
|
|
8
|
+
function initProject(tree, projectName, project, options) {
|
|
9
|
+
console.log(`init library with migration project: ${projectName}`);
|
|
10
|
+
const projectRoot = (0, workspace_utilities_1.GetProjectRoot)(tree, projectName);
|
|
11
|
+
// ensure the migrations.json file exists and is configured correctly
|
|
12
|
+
(0, workspace_utilities_1.UpdateJsonFile)(tree, migrations => {
|
|
13
|
+
var _a;
|
|
14
|
+
(_a = migrations.generators) !== null && _a !== void 0 ? _a : (migrations.generators = {});
|
|
15
|
+
}, (0, path_1.join)(projectRoot, 'migrations.json'), { create: true });
|
|
16
|
+
(0, update_project_targets_1.updateProjectTargets)(tree, projectName, project);
|
|
17
|
+
(0, update_package_json_1.updatePackageJson)(tree, projectName, project);
|
|
18
|
+
}
|
|
19
|
+
exports.initProject = initProject;
|
|
20
|
+
//# sourceMappingURL=init-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-project.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-with-migrations/init-project.ts"],"names":[],"mappings":";;;AAIA,mEAGmC;AACnC,+BAA4B;AAE5B,+DAA0D;AAC1D,qEAAgE;AAEhE,SAAgB,WAAW,CAAC,IAAU,EAAE,WAAmB,EAAE,OAA6B,EAAE,OAA0C;IACpI,OAAO,CAAC,GAAG,CAAC,wCAAyC,WAAY,EAAE,CAAC,CAAC;IAErE,MAAM,WAAW,GAAG,IAAA,oCAAc,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAEtD,qEAAqE;IACrE,IAAA,oCAAc,EAAC,IAAI,EAAE,UAAU,CAAC,EAAE;;QAChC,MAAA,UAAU,CAAC,UAAU,oCAArB,UAAU,CAAC,UAAU,GAAK,EAAE,EAAC;IAC/B,CAAC,EAAE,IAAA,WAAI,EAAC,WAAW,EAAE,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAE3D,IAAA,6CAAoB,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IAEjD,IAAA,uCAAiB,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;AAEhD,CAAC;AAdD,kCAcC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initWorkspace = void 0;
|
|
4
|
+
function initWorkspace(tree, options) {
|
|
5
|
+
console.log('init library with migration workspace');
|
|
6
|
+
}
|
|
7
|
+
exports.initWorkspace = initWorkspace;
|
|
8
|
+
//# sourceMappingURL=init-workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-workspace.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-with-migrations/init-workspace.ts"],"names":[],"mappings":";;;AAGA,SAAgB,aAAa,CAAC,IAAU,EAAE,OAA0C;IAClF,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;AAEvD,CAAC;AAHD,sCAGC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "InitWithMigrations",
|
|
4
|
+
"title": "",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"project": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"projects": {
|
|
11
|
+
"type": "array",
|
|
12
|
+
"items": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"skipFormat": {
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"default": false
|
|
19
|
+
},
|
|
20
|
+
"overwrite": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"default": false,
|
|
23
|
+
"description": "Whether to overwrite existing files"
|
|
24
|
+
},
|
|
25
|
+
"skipProjects": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"default": false,
|
|
28
|
+
"description": "Whether to skip executing project specific initialization"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"required": []
|
|
32
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updatePackageJson = void 0;
|
|
4
|
+
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
5
|
+
function updatePackageJson(tree, projectName, project) {
|
|
6
|
+
(0, workspace_utilities_1.UpdateProjectPackageJson)(tree, packageJson => {
|
|
7
|
+
var _a;
|
|
8
|
+
(_a = packageJson['ng-update']) !== null && _a !== void 0 ? _a : (packageJson['ng-update'] = {});
|
|
9
|
+
packageJson['ng-update']['migrations'] = './migrations.json';
|
|
10
|
+
}, { projectName });
|
|
11
|
+
}
|
|
12
|
+
exports.updatePackageJson = updatePackageJson;
|
|
13
|
+
//# sourceMappingURL=update-package-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-package-json.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-with-migrations/update-package-json.ts"],"names":[],"mappings":";;;AAIA,mEAAqE;AAErE,SAAgB,iBAAiB,CAAC,IAAU,EAAE,WAAmB,EAAE,OAA6B;IAC9F,IAAA,8CAAwB,EAAC,IAAI,EAAE,WAAW,CAAC,EAAE;;QAE3C,MAAA,WAAW,CAAC,WAAW,qCAAvB,WAAW,CAAC,WAAW,IAAM,EAAE,EAAC;QAChC,WAAW,CAAC,WAAW,CAAC,CAAC,YAAY,CAAC,GAAG,mBAAmB,CAAC;IAE/D,CAAC,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;AACtB,CAAC;AAPD,8CAOC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateProjectTargets = void 0;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
6
|
+
function updateProjectTargets(tree, projectName, project) {
|
|
7
|
+
var _a;
|
|
8
|
+
const projectRoot = (0, workspace_utilities_1.GetProjectRoot)(tree, projectName);
|
|
9
|
+
const buildTarget = (0, workspace_utilities_1.GetTarget)(project, 'build');
|
|
10
|
+
const buildTargetOptions = (0, workspace_utilities_1.GetTargetOptions)(buildTarget);
|
|
11
|
+
(_a = buildTargetOptions.assets) !== null && _a !== void 0 ? _a : (buildTargetOptions.assets = []);
|
|
12
|
+
(0, workspace_utilities_1.CoerceAssets)(buildTargetOptions.assets, [
|
|
13
|
+
{
|
|
14
|
+
input: `./${projectRoot}`,
|
|
15
|
+
glob: "migrations.json",
|
|
16
|
+
output: "."
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
input: `./${projectRoot}/src/migrations`,
|
|
20
|
+
glob: "**/!(*.ts|*.js|*.json)",
|
|
21
|
+
output: "./src/migrations"
|
|
22
|
+
}
|
|
23
|
+
]);
|
|
24
|
+
(0, devkit_1.updateProjectConfiguration)(tree, projectName, project);
|
|
25
|
+
}
|
|
26
|
+
exports.updateProjectTargets = updateProjectTargets;
|
|
27
|
+
//# sourceMappingURL=update-project-targets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-project-targets.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/init-with-migrations/update-project-targets.ts"],"names":[],"mappings":";;;AAAA,uCAIoB;AACpB,mEAMmC;AAEnC,SAAgB,oBAAoB,CAAC,IAAU,EAAE,WAAmB,EAAE,OAA6B;;IAEjG,MAAM,WAAW,GAAG,IAAA,oCAAc,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAEtD,MAAM,WAAW,GAAG,IAAA,+BAAS,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAChD,MAAM,kBAAkB,GAAwB,IAAA,sCAAgB,EAAC,WAAW,CAAC,CAAC;IAC9E,MAAA,kBAAkB,CAAC,MAAM,oCAAzB,kBAAkB,CAAC,MAAM,GAAK,EAAE,EAAC;IACjC,IAAA,kCAAY,EAAC,kBAAkB,CAAC,MAAM,EAAE;QACtC;YACE,KAAK,EAAE,KAAK,WAAW,EAAE;YACzB,IAAI,EAAE,iBAAiB;YACvB,MAAM,EAAE,GAAG;SACZ;QACD;YACE,KAAK,EAAE,KAAK,WAAW,iBAAiB;YACxC,IAAI,EAAE,wBAAwB;YAC9B,MAAM,EAAE,kBAAkB;SAC3B;KACF,CAAC,CAAC;IACH,IAAA,mCAA0B,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;AAEzD,CAAC;AArBD,oDAqBC"}
|