@rxap/plugin-library 20.1.0-dev.11 → 20.1.0-dev.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +177 -214
  3. package/package.json +8 -7
  4. package/src/executors/bundle-json-schema/schema.d.ts +2 -1
  5. package/src/executors/check-version/schema.d.ts +1 -0
  6. package/src/executors/expose-as-schematic/schema.d.ts +2 -1
  7. package/src/executors/fix-dependencies/schema.d.ts +8 -5
  8. package/src/executors/generate-schema/executor.js +14 -3
  9. package/src/executors/generate-schema/executor.js.map +1 -1
  10. package/src/executors/generate-schema/schema.d.ts +3 -2
  11. package/src/executors/index-export/schema.d.ts +1 -0
  12. package/src/executors/index-json-schema/schema.d.ts +2 -1
  13. package/src/executors/node-modules-linking/schema.d.ts +3 -1
  14. package/src/executors/readme/executor.js +4 -3
  15. package/src/executors/readme/executor.js.map +1 -1
  16. package/src/executors/readme/schema.d.ts +3 -1
  17. package/src/executors/run-generator/executor.js +6 -6
  18. package/src/executors/run-generator/executor.js.map +1 -1
  19. package/src/executors/run-generator/schema.d.ts +7 -2
  20. package/src/executors/update-dependencies/schema.d.ts +3 -1
  21. package/src/executors/update-package-group/executor.js +4 -4
  22. package/src/executors/update-package-group/executor.js.map +1 -1
  23. package/src/executors/update-package-group/schema.d.ts +6 -2
  24. package/src/generators/add-migration/schema.d.ts +14 -2
  25. package/src/generators/bundle-json-schema/schema.d.ts +1 -0
  26. package/src/generators/expose-as-schematic/schema.d.ts +1 -1
  27. package/src/generators/expose-as-schematic/schema.json +3 -1
  28. package/src/generators/fix-dependencies/generator.js +0 -5
  29. package/src/generators/fix-dependencies/generator.js.map +1 -1
  30. package/src/generators/fix-dependencies/schema.d.ts +8 -5
  31. package/src/generators/index-export/schema.d.ts +3 -2
  32. package/src/generators/index-json-schema/schema.d.ts +1 -0
  33. package/src/generators/init/schema.d.ts +10 -8
  34. package/src/generators/init-buildable/schema.d.ts +4 -5
  35. package/src/generators/init-plugin/schema.d.ts +4 -5
  36. package/src/generators/init-preset/schema.d.ts +4 -5
  37. package/src/generators/init-publishable/coerce-init-generator.js +1 -1
  38. package/src/generators/init-publishable/coerce-init-generator.js.map +1 -1
  39. package/src/generators/init-publishable/files/README.md.handlebars +8 -16
  40. package/src/generators/init-publishable/schema.d.ts +7 -4
  41. package/src/generators/init-schematic/schema.d.ts +4 -5
  42. package/src/generators/init-with-migrations/schema.d.ts +4 -2
  43. package/src/plugin.js +1 -1
  44. package/src/plugin.js.map +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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
+ # [20.1.0-dev.13](https://gitlab.com/rxap/packages/compare/@rxap/plugin-library@20.1.0-dev.12...@rxap/plugin-library@20.1.0-dev.13) (2025-02-13)
7
+
8
+ ### Bug Fixes
9
+
10
+ - resolve readme generator issue ([09a5223](https://gitlab.com/rxap/packages/commit/09a5223c144d729cbd2c9fc6f6e6d06fe4e36fc3))
11
+ - use correct generator base path ([4ab73ce](https://gitlab.com/rxap/packages/commit/4ab73ceed62ab05e899f04762f396731589bcecd))
12
+
13
+ # [20.1.0-dev.12](https://gitlab.com/rxap/packages/compare/@rxap/plugin-library@20.1.0-dev.11...@rxap/plugin-library@20.1.0-dev.12) (2025-02-11)
14
+
15
+ **Note:** Version bump only for package @rxap/plugin-library
16
+
6
17
  # [20.1.0-dev.11](https://gitlab.com/rxap/packages/compare/@rxap/plugin-library@20.1.0-dev.10...@rxap/plugin-library@20.1.0-dev.11) (2025-02-11)
7
18
 
8
19
  **Note:** Version bump only for package @rxap/plugin-library
package/README.md CHANGED
@@ -1,4 +1,3 @@
1
- # @rxap/plugin-library
2
1
 
3
2
  [![npm version](https://img.shields.io/npm/v/@rxap/plugin-library?style=flat-square)](https://www.npmjs.com/package/@rxap/plugin-library)
4
3
  [![commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](https://commitizen.github.io/cz-cli/)
@@ -9,7 +8,32 @@
9
8
 
10
9
  - [Installation](#installation)
11
10
  - [Generators](#generators)
11
+ - [init](#init)
12
+ - [fix-dependencies](#fix-dependencies)
13
+ - [index-export](#index-export)
14
+ - [init-plugin](#init-plugin)
15
+ - [init-buildable](#init-buildable)
16
+ - [init-publishable](#init-publishable)
17
+ - [expose-as-schematic](#expose-as-schematic)
18
+ - [bundle-json-schema](#bundle-json-schema)
19
+ - [index-json-schema](#index-json-schema)
20
+ - [init-with-migrations](#init-with-migrations)
21
+ - [add-migration](#add-migration)
22
+ - [init-preset](#init-preset)
23
+ - [init-schematic](#init-schematic)
12
24
  - [Executors](#executors)
25
+ - [update-dependencies](#update-dependencies)
26
+ - [update-package-group](#update-package-group)
27
+ - [readme](#readme)
28
+ - [run-generator](#run-generator)
29
+ - [check-version](#check-version)
30
+ - [node-modules-linking](#node-modules-linking)
31
+ - [index-export](#index-export)
32
+ - [bundle-json-schema](#bundle-json-schema)
33
+ - [index-json-schema](#index-json-schema)
34
+ - [expose-as-schematic](#expose-as-schematic)
35
+ - [fix-dependencies](#fix-dependencies)
36
+ - [generate-schema](#generate-schema)
13
37
 
14
38
  # Installation
15
39
 
@@ -27,336 +51,275 @@ yarn nx g @rxap/plugin-library:init
27
51
  > Create and update configurations to use rxap package publish concept
28
52
 
29
53
  ```bash
30
- yarn nx g @rxap/plugin-library:init
31
- ```
32
-
33
- ## fix-dependencies
34
- > Adds missing dependencies and removes redudant dependencies of a project
35
-
36
- ```bash
37
- yarn nx g @rxap/plugin-library:fix-dependencies
38
- ```
39
-
40
- ## index-export
41
- > Generate index exports for each directory and in the src root
42
-
43
- ```bash
44
- yarn nx g @rxap/plugin-library:index-export
45
- ```
46
-
47
- ## init-plugin
48
- > init-plugin generator
49
-
50
- ```bash
51
- yarn nx g @rxap/plugin-library:init-plugin
52
- ```
53
-
54
- ## init-buildable
55
- > init-buildable generator
56
-
57
- ```bash
58
- yarn nx g @rxap/plugin-library:init-buildable
59
- ```
60
-
61
- ## init-publishable
62
- > init-publishable generator
63
-
64
- ```bash
65
- yarn nx g @rxap/plugin-library:init-publishable
66
- ```
67
-
68
- ## expose-as-schematic
69
- > expose-as-schematic generator
70
-
71
- ```bash
72
- yarn nx g @rxap/plugin-library:expose-as-schematic
73
- ```
74
-
75
- ## bundle-json-schema
76
- > bundle-json-schema generator
77
-
78
- ```bash
79
- yarn nx g @rxap/plugin-library:bundle-json-schema
80
- ```
81
-
82
- ## index-json-schema
83
- > index-json-schema generator
84
-
85
- ```bash
86
- yarn nx g @rxap/plugin-library:index-json-schema
87
- ```
88
-
89
- ## init-with-migrations
90
- > init-with-migrations generator
91
-
92
- ```bash
93
- yarn nx g @rxap/plugin-library:init-with-migrations
54
+ nx g @rxap/plugin-library:init
94
55
  ```
95
56
 
96
- ## add-migration
97
- > add-migration generator
98
-
99
- ```bash
100
- yarn nx g @rxap/plugin-library:add-migration
101
- ```
102
-
103
- ## init-preset
104
- > init-preset generator
105
-
106
- ```bash
107
- yarn nx g @rxap/plugin-library:init-preset
108
- ```
109
-
110
- ## init-schematic
111
- > init-schematic generator
112
-
113
- ```bash
114
- yarn nx g @rxap/plugin-library:init-schematic
115
- ```
116
-
117
- ## init
118
- > Create and update configurations to use rxap package publish concept
119
-
120
- ```bash
121
- yarn nx g @rxap/plugin-library:init
122
- ```
57
+ Option | Type | Default | Description
58
+ --- | --- | --- | ---
59
+ project | string | |
60
+ projects | array | |
61
+ skipFormat | boolean | false |
62
+ overwrite | boolean | false | Whether to overwrite existing files
63
+ skipProjects | boolean | false | Whether to skip executing project specific initialization
64
+ indexExport | boolean | | Whether to add the index-export target to the library
65
+ targets | object | |
123
66
 
124
67
  ## fix-dependencies
125
68
  > Adds missing dependencies and removes redudant dependencies of a project
126
69
 
127
70
  ```bash
128
- yarn nx g @rxap/plugin-library:fix-dependencies
71
+ nx g @rxap/plugin-library:fix-dependencies
129
72
  ```
130
73
 
74
+ Option | Type | Default | Description
75
+ --- | --- | --- | ---
76
+ projects | array | |
77
+ reset | boolean | |
78
+ resolve | boolean | |
79
+ resetAll | boolean | |
80
+ strict | boolean | false | If true, will fail if any dependency is not found
81
+ onlyDependencies | boolean | false | If true, will move all peer dependencies to dependencies
82
+ dependencies | array | | List of packages that should always be added as dependencies
83
+ peerDependencies | array | | List of packages that should always be added as peerDependencies
84
+
131
85
  ## index-export
132
86
  > Generate index exports for each directory and in the src root
133
87
 
134
88
  ```bash
135
- yarn nx g @rxap/plugin-library:index-export
89
+ nx g @rxap/plugin-library:index-export
136
90
  ```
137
91
 
92
+ Option | Type | Default | Description
93
+ --- | --- | --- | ---
94
+ projects | array | |
95
+ project | string | |
96
+ generateRootExport | boolean | true | Generate index.ts in the source root of the project
97
+ additionalEntryPoints | array | |
98
+
138
99
  ## init-plugin
139
100
  > init-plugin generator
140
101
 
141
102
  ```bash
142
- yarn nx g @rxap/plugin-library:init-plugin
103
+ nx g @rxap/plugin-library:init-plugin
143
104
  ```
144
105
 
106
+ Option | Type | Default | Description
107
+ --- | --- | --- | ---
108
+ project | string | |
109
+ projects | array | |
110
+ skipFormat | boolean | false |
111
+ overwrite | boolean | false | Whether to overwrite existing files
112
+ skipProjects | boolean | false | Whether to skip executing project specific initialization
113
+
145
114
  ## init-buildable
146
115
  > init-buildable generator
147
116
 
148
117
  ```bash
149
- yarn nx g @rxap/plugin-library:init-buildable
118
+ nx g @rxap/plugin-library:init-buildable
150
119
  ```
151
120
 
121
+ Option | Type | Default | Description
122
+ --- | --- | --- | ---
123
+ project | string | |
124
+ projects | array | |
125
+ skipFormat | boolean | false |
126
+ overwrite | boolean | false | Whether to overwrite existing files
127
+ skipProjects | boolean | false | Whether to skip executing project specific initialization
128
+
152
129
  ## init-publishable
153
130
  > init-publishable generator
154
131
 
155
132
  ```bash
156
- yarn nx g @rxap/plugin-library:init-publishable
133
+ nx g @rxap/plugin-library:init-publishable
157
134
  ```
158
135
 
136
+ Option | Type | Default | Description
137
+ --- | --- | --- | ---
138
+ project | string | |
139
+ projects | array | |
140
+ skipFormat | boolean | false |
141
+ overwrite | boolean | false | Whether to overwrite existing files
142
+ skipProjects | boolean | false | Whether to skip executing project specific initialization
143
+ targets | object | |
144
+
159
145
  ## expose-as-schematic
160
146
  > expose-as-schematic generator
161
147
 
162
148
  ```bash
163
- yarn nx g @rxap/plugin-library:expose-as-schematic
149
+ nx g @rxap/plugin-library:expose-as-schematic
164
150
  ```
165
151
 
152
+ Option | Type | Default | Description
153
+ --- | --- | --- | ---
154
+ projects | array | |
155
+
166
156
  ## bundle-json-schema
167
157
  > bundle-json-schema generator
168
158
 
169
159
  ```bash
170
- yarn nx g @rxap/plugin-library:bundle-json-schema
160
+ nx g @rxap/plugin-library:bundle-json-schema
171
161
  ```
172
162
 
163
+ Option | Type | Default | Description
164
+ --- | --- | --- | ---
165
+ project | string | | Name of the project
166
+
173
167
  ## index-json-schema
174
168
  > index-json-schema generator
175
169
 
176
170
  ```bash
177
- yarn nx g @rxap/plugin-library:index-json-schema
171
+ nx g @rxap/plugin-library:index-json-schema
178
172
  ```
179
173
 
174
+ Option | Type | Default | Description
175
+ --- | --- | --- | ---
176
+ project | string | | Name of the project
177
+
180
178
  ## init-with-migrations
181
179
  > init-with-migrations generator
182
180
 
183
181
  ```bash
184
- yarn nx g @rxap/plugin-library:init-with-migrations
182
+ nx g @rxap/plugin-library:init-with-migrations
185
183
  ```
186
184
 
185
+ Option | Type | Default | Description
186
+ --- | --- | --- | ---
187
+ project | string | |
188
+ projects | array | |
189
+ skipFormat | boolean | false |
190
+ overwrite | boolean | false | Whether to overwrite existing files
191
+ skipProjects | boolean | false | Whether to skip executing project specific initialization
192
+
187
193
  ## add-migration
188
194
  > add-migration generator
189
195
 
190
196
  ```bash
191
- yarn nx g @rxap/plugin-library:add-migration
197
+ nx g @rxap/plugin-library:add-migration
192
198
  ```
193
199
 
200
+ Option | Type | Default | Description
201
+ --- | --- | --- | ---
202
+ project | string | | Name of the project
203
+ name | string | | Name of the migration
204
+ description | string | | Description of the migration
205
+ packageVersion | string | | Version to use for the migration.
206
+ packageJsonUpdates | boolean | false | Whether or not to include `package.json` updates.
207
+ increment | string | | Increment the version of the package.json file
208
+
194
209
  ## init-preset
195
210
  > init-preset generator
196
211
 
197
212
  ```bash
198
- yarn nx g @rxap/plugin-library:init-preset
213
+ nx g @rxap/plugin-library:init-preset
199
214
  ```
200
215
 
216
+ Option | Type | Default | Description
217
+ --- | --- | --- | ---
218
+ project | string | |
219
+ projects | array | |
220
+ skipFormat | boolean | false |
221
+ overwrite | boolean | false | Whether to overwrite existing files
222
+ skipProjects | boolean | false | Whether to skip executing project specific initialization
223
+
201
224
  ## init-schematic
202
225
  > init-schematic generator
203
226
 
204
227
  ```bash
205
- yarn nx g @rxap/plugin-library:init-schematic
228
+ nx g @rxap/plugin-library:init-schematic
206
229
  ```
230
+
231
+ Option | Type | Default | Description
232
+ --- | --- | --- | ---
233
+ project | string | |
234
+ projects | array | |
235
+ skipFormat | boolean | false |
236
+ overwrite | boolean | false | Whether to overwrite existing files
237
+ skipProjects | boolean | false | Whether to skip executing project specific initialization
207
238
  # Executors
208
239
 
209
240
  ## update-dependencies
210
241
  > Update the local dependencies in the dist package.json. Replaces the atarix with the current package version of local dependency
211
242
 
212
- **project.json**
213
- ```json
214
- {
215
- "targets": {
216
- "update-dependencies": {
217
- "executor": "@rxap/plugin-library:update-dependencies"
218
- }
219
- }
220
- }
221
- ```
222
243
 
223
244
  ## update-package-group
224
245
  > Update the packageGroup array with all direct depedent projects
225
246
 
226
- **project.json**
227
- ```json
228
- {
229
- "targets": {
230
- "update-package-group": {
231
- "executor": "@rxap/plugin-library:update-package-group"
232
- }
233
- }
234
- }
235
- ```
247
+
248
+ Option | Type | Default | Description
249
+ --- | --- | --- | ---
250
+ packageGroupRegex | array | @rxap/,@angular/,@nx/,@nestjs/,@sentry/ | List of regexes to match package name that should be added to the package group
251
+ merge | boolean | false | If true, the package group will be merged with the existing package group. If false, the package group will be replaced.
252
+ include | array | | List of package names that should be added to the package group
253
+ includeDependencies | boolean | false | If true, the dependencies of the included packages will be added to the package group
236
254
 
237
255
  ## readme
238
256
  > Readme generator for libraries.
239
257
 
240
- **project.json**
241
- ```json
242
- {
243
- "targets": {
244
- "readme": {
245
- "executor": "@rxap/plugin-library:readme"
246
- }
247
- }
248
- }
249
- ```
250
258
 
251
259
  ## run-generator
252
260
  > Executes a generator for the project
253
261
 
254
- **project.json**
255
- ```json
256
- {
257
- "targets": {
258
- "run-generator": {
259
- "executor": "@rxap/plugin-library:run-generator"
260
- }
261
- }
262
- }
263
- ```
262
+
263
+ Option | Type | Default | Description
264
+ --- | --- | --- | ---
265
+ generator | string | | Name of the generate to execute
266
+ options | object | | Options to pass to the generator
267
+ withoutProjectArgument | boolean | | If true, the project argument will not be passed to the generator
268
+ dryRun | boolean | | If true, the generator will be executed in dry run mode
269
+ verbose | boolean | | If true, the generator will be executed in verbose mode
264
270
 
265
271
  ## check-version
266
272
  > check-version executor
267
273
 
268
- **project.json**
269
- ```json
270
- {
271
- "targets": {
272
- "check-version": {
273
- "executor": "@rxap/plugin-library:check-version"
274
- }
275
- }
276
- }
277
- ```
274
+
275
+ Option | Type | Default | Description
276
+ --- | --- | --- | ---
277
+ packageName | string | | The name of the package used as minimum version reference
278
278
 
279
279
  ## node-modules-linking
280
280
  > node-modules-linking executor
281
281
 
282
- **project.json**
283
- ```json
284
- {
285
- "targets": {
286
- "node-modules-linking": {
287
- "executor": "@rxap/plugin-library:node-modules-linking"
288
- }
289
- }
290
- }
291
- ```
292
282
 
293
283
  ## index-export
294
284
  > index-export executor
295
285
 
296
- **project.json**
297
- ```json
298
- {
299
- "targets": {
300
- "index-export": {
301
- "executor": "@rxap/plugin-library:index-export"
302
- }
303
- }
304
- }
305
- ```
286
+
287
+ Option | Type | Default | Description
288
+ --- | --- | --- | ---
289
+ generateRootExport | boolean | true | Generate index.ts in the source root of the project
306
290
 
307
291
  ## bundle-json-schema
308
292
  > bundle-json-schema executor
309
293
 
310
- **project.json**
311
- ```json
312
- {
313
- "targets": {
314
- "bundle-json-schema": {
315
- "executor": "@rxap/plugin-library:bundle-json-schema"
316
- }
317
- }
318
- }
319
- ```
320
294
 
321
295
  ## index-json-schema
322
296
  > index-json-schema executor
323
297
 
324
- **project.json**
325
- ```json
326
- {
327
- "targets": {
328
- "index-json-schema": {
329
- "executor": "@rxap/plugin-library:index-json-schema"
330
- }
331
- }
332
- }
333
- ```
334
298
 
335
299
  ## expose-as-schematic
336
300
  > expose-as-schematic executor
337
301
 
338
- **project.json**
339
- ```json
340
- {
341
- "targets": {
342
- "expose-as-schematic": {
343
- "executor": "@rxap/plugin-library:expose-as-schematic"
344
- }
345
- }
346
- }
347
- ```
348
302
 
349
303
  ## fix-dependencies
350
304
  > fix-dependencies executor
351
305
 
352
- **project.json**
353
- ```json
354
- {
355
- "targets": {
356
- "fix-dependencies": {
357
- "executor": "@rxap/plugin-library:fix-dependencies"
358
- }
359
- }
360
- }
361
- ```
306
+
307
+ Option | Type | Default | Description
308
+ --- | --- | --- | ---
309
+ projects | array | |
310
+ reset | boolean | |
311
+ resolve | boolean | |
312
+ resetAll | boolean | |
313
+ strict | boolean | false | If true, will fail if any dependency is not found
314
+ onlyDependencies | boolean | false | If true, will move all peer dependencies to dependencies
315
+ dependencies | array | | List of packages that should always be added as dependencies
316
+ peerDependencies | array | | List of packages that should always be added as peerDependencies
317
+
318
+ ## generate-schema
319
+ > Generates the schema.d.ts file for each schema.json file for the given project
320
+
321
+
322
+ Option | Type | Default | Description
323
+ --- | --- | --- | ---
324
+ excludes | array | | A list of glob patterns relative to the project that should be excluded
362
325
 
package/package.json CHANGED
@@ -1,17 +1,18 @@
1
1
  {
2
- "version": "20.1.0-dev.11",
2
+ "version": "20.1.0-dev.13",
3
3
  "name": "@rxap/plugin-library",
4
+ "description": "This package provides generators and executors for managing and maintaining Nx plugin libraries. It includes functionality for generating index exports, fixing dependencies, generating JSON schemas, and more. It helps streamline the development process for Nx plugins by automating common tasks and enforcing best practices.\n",
4
5
  "license": "GPL-3.0-or-later",
5
6
  "dependencies": {
6
7
  "@apidevtools/json-schema-ref-parser": "^9.0.9",
7
8
  "@nx/devkit": "20.4.2",
8
9
  "@nx/plugin": "20.4.2",
9
- "@rxap/node-utilities": "^1.3.8-dev.4",
10
- "@rxap/plugin-utilities": "^20.0.1-dev.10",
11
- "@rxap/ts-morph": "^1.5.3-dev.5",
10
+ "@rxap/node-utilities": "^1.3.8-dev.5",
11
+ "@rxap/plugin-utilities": "^20.0.1-dev.12",
12
+ "@rxap/ts-morph": "^1.5.3-dev.6",
12
13
  "@rxap/utilities": "^16.4.2-dev.4",
13
- "@rxap/workspace-ts-morph": "^19.1.9-dev.11",
14
- "@rxap/workspace-utilities": "^19.6.1-dev.10",
14
+ "@rxap/workspace-ts-morph": "^19.1.9-dev.13",
15
+ "@rxap/workspace-utilities": "^19.6.1-dev.12",
15
16
  "colors": "1.4.0",
16
17
  "handlebars": "4.7.8",
17
18
  "nx": "20.4.2",
@@ -48,7 +49,7 @@
48
49
  },
49
50
  "schematics": "./generators.json",
50
51
  "type": "commonjs",
51
- "gitHead": "d154f059843da9547b2cf8a851a1fa67ef976968",
52
+ "gitHead": "969f0867a1da05a157f626d5bdd316bd0a67494a",
52
53
  "exports": {
53
54
  "./package.json": "./package.json",
54
55
  ".": {
@@ -1,2 +1,3 @@
1
1
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
2
- export interface BundleJsonSchemaExecutorSchema {}
2
+ export interface BundleJsonSchemaExecutorSchema {
3
+ }
@@ -1,3 +1,4 @@
1
1
  export interface CheckVersionExecutorSchema {
2
+ /** The name of the package used as minimum version reference */
2
3
  packageName: string;
3
4
  }
@@ -1,2 +1,3 @@
1
1
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
2
- export interface ExposeAsSchematicExecutorSchema {}
2
+ export interface ExposeAsSchematicExecutorSchema {
3
+ }
@@ -1,11 +1,14 @@
1
1
  export interface FixDependenciesExecutorSchema {
2
- projects?: string[];
2
+ projects?: Array<string>;
3
3
  reset?: boolean;
4
- resetAll?: boolean;
5
- verbose?: boolean;
6
4
  resolve?: boolean;
5
+ resetAll?: boolean;
6
+ /** If true, will fail if any dependency is not found */
7
7
  strict?: boolean;
8
+ /** If true, will move all peer dependencies to dependencies */
8
9
  onlyDependencies?: boolean;
9
- dependencies?: string[];
10
- peerDependencies?: string[];
10
+ /** List of packages that should always be added as dependencies */
11
+ dependencies?: Array<string>;
12
+ /** List of packages that should always be added as peerDependencies */
13
+ peerDependencies?: Array<string>;
11
14
  }
@@ -28,17 +28,28 @@ function isExecutor(path) {
28
28
  function getSuffix(path) {
29
29
  let suffix = undefined;
30
30
  if (isExecutor(path)) {
31
- suffix = 'ExecutorSchema';
31
+ suffix = 'Executor';
32
32
  }
33
33
  if (isGenerator(path)) {
34
- suffix = 'GeneratorSchema';
34
+ suffix = 'Generator';
35
35
  }
36
36
  return suffix;
37
37
  }
38
38
  function generateSchema(schema, suffix) {
39
39
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
40
+ let name = (0, utilities_1.camelize)(schema.$id || schema.title || 'schema');
41
+ if (suffix) {
42
+ if (name.endsWith(suffix)) {
43
+ name = name.replace(new RegExp(`${suffix}$`), '');
44
+ }
45
+ if (name === 'schema') {
46
+ suffix = undefined;
47
+ }
48
+ else {
49
+ suffix = [suffix, 'Schema'].join('');
50
+ }
51
+ }
40
52
  const generator = new json_schema_to_typescript_1.TypescriptInterfaceGenerator(schema, { suffix });
41
- const name = (0, utilities_1.camelize)(schema.$id || schema.title || 'schema');
42
53
  const sourceFile = yield generator.build(name);
43
54
  return sourceFile.getFullText();
44
55
  });
@@ -1 +1 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/executors/generate-schema/executor.ts"],"names":[],"mappings":";;;AAEA,+EAA+E;AAC/E,6DAAwD;AACxD,+CAA2C;AAC3C,2BA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AO;QACL,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,kBAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/executors/generate-schema/executor.ts"],"names":[],"mappings":";;;AAEA,+EAA+E;AAC/E,6DAAwD;AACxD,+CAA2C;AAC3C,2BAIY;AACZ,+BAAgC;AAChC,+BAA4B;AAG5B,SAAS,kBAAkB,CAAC,QAAgB,EAAE,kBAA4B,EAAE;IAC1E,eAAe,CAAC,IAAI,CAAC,oBAAoB,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,CAAC,CAAC;IAEzF,yDAAyD;IACzD,MAAM,OAAO,GAAG,IAAA,eAAQ,EAAC,gBAAgB,EAAE;QACzC,GAAG,EAAE,QAAQ;QACb,MAAM,EAAE,eAAe;QACvB,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;IAEH,mDAAmD;IACnD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;AACvC,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AACtC,CAAC;AAED,SAAS,SAAS,CAAC,IAAY;IAC7B,IAAI,MAAM,GAAuB,SAAS,CAAC;IAC3C,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACrB,MAAM,GAAG,UAAU,CAAC;IACtB,CAAC;IACD,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;QACtB,MAAM,GAAG,WAAW,CAAC;IACvB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAe,cAAc,CAAC,MAAkB,EAAE,MAAe;;QAC/D,IAAI,IAAI,GAAG,IAAA,oBAAQ,EAAC,MAAM,CAA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iC,EAAE,OAAO,CAAC,CAAC;IAExD,MAAM,WAAW,GAAG,IAAA,iCAAc,EAAC,OAAO,CAAC,CAAC;IAE5C,MAAM,eAAe,GAAG,kBAAkB,CAAC,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE1E,KAAK,IAAI,cAAc,IAAI,eAAe,EAAE,CAAC;QAE3C,cAAc,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;QAEjE,MAAM,MAAM,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;QACzC,MAAM,MAAM,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;QAC1C,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACpD,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC9D,IAAA,kBAAa,EAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAEpC,CAAC;IAED,OAAO;QACL,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,kBAAe,WAAW,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export interface GenerateSchemaExecutorSchema {
2
- excludes: string[];
3
- } // eslint-disable-line
2
+ /** A list of glob patterns relative to the project that should be excluded */
3
+ excludes?: Array<string>;
4
+ }
@@ -1,3 +1,4 @@
1
1
  export interface IndexExportExecutorSchema {
2
+ /** Generate index.ts in the source root of the project */
2
3
  generateRootExport?: boolean;
3
4
  }
@@ -1,2 +1,3 @@
1
1
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
2
- export interface IndexJsonSchemaExecutorSchema {}
2
+ export interface IndexJsonSchemaExecutorSchema {
3
+ }