@rxap/plugin-library 16.0.1-dev.0 → 16.1.0-dev.1
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 +17 -0
- package/README.md +29 -1
- package/generators.json +20 -0
- package/package.json +11 -11
- package/src/generators/bundle-json-schema/generator.d.ts +4 -0
- package/src/generators/bundle-json-schema/generator.js +141 -0
- package/src/generators/bundle-json-schema/generator.js.map +1 -0
- package/src/generators/bundle-json-schema/index.d.ts +2 -0
- package/src/generators/bundle-json-schema/index.js +8 -0
- package/src/generators/bundle-json-schema/index.js.map +1 -0
- package/src/generators/bundle-json-schema/schema.d.ts +3 -0
- package/src/generators/bundle-json-schema/schema.json +13 -0
- package/src/generators/index-json-schema/generator.d.ts +10 -0
- package/src/generators/index-json-schema/generator.js +125 -0
- package/src/generators/index-json-schema/generator.js.map +1 -0
- package/src/generators/index-json-schema/index.d.ts +2 -0
- package/src/generators/index-json-schema/index.js +8 -0
- package/src/generators/index-json-schema/index.js.map +1 -0
- package/src/generators/index-json-schema/schema.d.ts +3 -0
- package/src/generators/index-json-schema/schema.json +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,23 @@
|
|
|
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.0-dev.1](https://gitlab.com/rxap/packages/compare/@rxap/plugin-library@16.1.0-dev.0...@rxap/plugin-library@16.1.0-dev.1) (2024-02-28)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- add bundle json schema ([07ff6b5](https://gitlab.com/rxap/packages/commit/07ff6b5ee90aa20912ece6ae4237faa037fe5088))
|
|
11
|
+
|
|
12
|
+
# [16.1.0-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/plugin-library@16.0.1-dev.0...@rxap/plugin-library@16.1.0-dev.0) (2024-02-25)
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
- add nested definition cleanup ([f9c5637](https://gitlab.com/rxap/packages/commit/f9c5637fdba8ba458443c923c584564761e077ca))
|
|
17
|
+
- cleanup bundled schema ([4af344f](https://gitlab.com/rxap/packages/commit/4af344fa89837f228f04f96166f5b21932b50018))
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
- add bundle-json-schema generator ([8c4b9d9](https://gitlab.com/rxap/packages/commit/8c4b9d93730290c9b40ecf20490e87de34e6b1d2))
|
|
22
|
+
|
|
6
23
|
## [16.0.1-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/plugin-library@16.0.0...@rxap/plugin-library@16.0.1-dev.0) (2024-02-09)
|
|
7
24
|
|
|
8
25
|
### 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 @rxap/generator-utilities@^1.1.0 @rxap/node-utilities@^1.1.0 @rxap/plugin-angular@^16.1.
|
|
22
|
+
yarn add @nx/devkit@^16.5.0 @rxap/generator-ts-morph@^1.0.1 @rxap/generator-utilities@^1.1.0 @rxap/node-utilities@^1.1.0 @rxap/plugin-angular@^16.1.1-dev.1 @rxap/plugin-nestjs@^16.1.1-dev.0 @rxap/plugin-utilities@^16.1.0 @rxap/ts-morph@^1.1.0-dev.2 @rxap/utilities@^16.1.0-dev.1 @rxap/workspace-utilities@^16.0.1 handlebars@^4.7.7 nx@^16.5.0 semver@^7.5.3 ts-morph@^18.0.0 tslib@2.6.2
|
|
23
23
|
```
|
|
24
24
|
**Execute the init generator:**
|
|
25
25
|
```bash
|
|
@@ -76,6 +76,20 @@ yarn nx g @rxap/plugin-library:init-publishable
|
|
|
76
76
|
yarn nx g @rxap/plugin-library:expose-as-schematic
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
## bundle-json-schema
|
|
80
|
+
> bundle-json-schema generator
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
yarn nx g @rxap/plugin-library:bundle-json-schema
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## index-json-schema
|
|
87
|
+
> index-json-schema generator
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
yarn nx g @rxap/plugin-library:index-json-schema
|
|
91
|
+
```
|
|
92
|
+
|
|
79
93
|
## init
|
|
80
94
|
> Create and update configurations to use rxap package publish concept
|
|
81
95
|
|
|
@@ -124,6 +138,20 @@ yarn nx g @rxap/plugin-library:init-publishable
|
|
|
124
138
|
```bash
|
|
125
139
|
yarn nx g @rxap/plugin-library:expose-as-schematic
|
|
126
140
|
```
|
|
141
|
+
|
|
142
|
+
## bundle-json-schema
|
|
143
|
+
> bundle-json-schema generator
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
yarn nx g @rxap/plugin-library:bundle-json-schema
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## index-json-schema
|
|
150
|
+
> index-json-schema generator
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
yarn nx g @rxap/plugin-library:index-json-schema
|
|
154
|
+
```
|
|
127
155
|
# Executors
|
|
128
156
|
|
|
129
157
|
## update-dependencies
|
package/generators.json
CHANGED
|
@@ -34,6 +34,16 @@
|
|
|
34
34
|
"factory": "./src/generators/expose-as-schematic/generator",
|
|
35
35
|
"schema": "./src/generators/expose-as-schematic/schema.json",
|
|
36
36
|
"description": "expose-as-schematic generator"
|
|
37
|
+
},
|
|
38
|
+
"bundle-json-schema": {
|
|
39
|
+
"factory": "./src/generators/bundle-json-schema/generator",
|
|
40
|
+
"schema": "./src/generators/bundle-json-schema/schema.json",
|
|
41
|
+
"description": "bundle-json-schema generator"
|
|
42
|
+
},
|
|
43
|
+
"index-json-schema": {
|
|
44
|
+
"factory": "./src/generators/index-json-schema/generator",
|
|
45
|
+
"schema": "./src/generators/index-json-schema/schema.json",
|
|
46
|
+
"description": "index-json-schema generator"
|
|
37
47
|
}
|
|
38
48
|
},
|
|
39
49
|
"schematics": {
|
|
@@ -71,6 +81,16 @@
|
|
|
71
81
|
"factory": "./src/generators/expose-as-schematic/index",
|
|
72
82
|
"schema": "./src/generators/expose-as-schematic/schema.json",
|
|
73
83
|
"description": "expose-as-schematic generator"
|
|
84
|
+
},
|
|
85
|
+
"bundle-json-schema": {
|
|
86
|
+
"factory": "./src/generators/bundle-json-schema/index",
|
|
87
|
+
"schema": "./src/generators/bundle-json-schema/schema.json",
|
|
88
|
+
"description": "bundle-json-schema generator"
|
|
89
|
+
},
|
|
90
|
+
"index-json-schema": {
|
|
91
|
+
"factory": "./src/generators/index-json-schema/index",
|
|
92
|
+
"schema": "./src/generators/index-json-schema/schema.json",
|
|
93
|
+
"description": "index-json-schema generator"
|
|
74
94
|
}
|
|
75
95
|
}
|
|
76
96
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "16.0
|
|
2
|
+
"version": "16.1.0-dev.1",
|
|
3
3
|
"name": "@rxap/plugin-library",
|
|
4
4
|
"license": "GPL-3.0-or-later",
|
|
5
5
|
"dependencies": {
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"@rxap/generator-ts-morph": "^1.0.1",
|
|
15
15
|
"@rxap/generator-utilities": "^1.1.0",
|
|
16
16
|
"@rxap/node-utilities": "^1.1.0",
|
|
17
|
-
"@rxap/plugin-angular": "^16.1.
|
|
18
|
-
"@rxap/plugin-nestjs": "^16.1.0",
|
|
17
|
+
"@rxap/plugin-angular": "^16.1.1-dev.1",
|
|
18
|
+
"@rxap/plugin-nestjs": "^16.1.1-dev.0",
|
|
19
19
|
"@rxap/plugin-utilities": "^16.1.0",
|
|
20
|
-
"@rxap/ts-morph": "^1.0.
|
|
21
|
-
"@rxap/utilities": "^16.0.
|
|
20
|
+
"@rxap/ts-morph": "^1.1.0-dev.2",
|
|
21
|
+
"@rxap/utilities": "^16.1.0-dev.1",
|
|
22
22
|
"@rxap/workspace-utilities": "^16.0.1",
|
|
23
23
|
"handlebars": "^4.7.7",
|
|
24
24
|
"nx": "^16.5.0",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"ts-morph": "^18.0.0",
|
|
27
27
|
"tslib": "2.6.2",
|
|
28
28
|
"@rxap/plugin-localazy": "16.1.0",
|
|
29
|
-
"@rxap/workspace-ts-morph": "16.0.
|
|
29
|
+
"@rxap/workspace-ts-morph": "16.0.2-dev.0"
|
|
30
30
|
},
|
|
31
31
|
"author": {
|
|
32
32
|
"name": "Merzough Münker",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
"package": "@rxap/plugin-angular",
|
|
65
|
-
"version": "16.1.
|
|
65
|
+
"version": "16.1.1-dev.1"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"package": "@rxap/plugin-nestjs",
|
|
69
|
-
"version": "16.1.0"
|
|
69
|
+
"version": "16.1.1-dev.0"
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
"package": "@rxap/plugin-utilities",
|
|
@@ -78,11 +78,11 @@
|
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
"package": "@rxap/ts-morph",
|
|
81
|
-
"version": "1.0.
|
|
81
|
+
"version": "1.1.0-dev.2"
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
"package": "@rxap/utilities",
|
|
85
|
-
"version": "16.0.
|
|
85
|
+
"version": "16.1.0-dev.1"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"package": "@rxap/workspace-utilities",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
},
|
|
102
102
|
"schematics": "./generators.json",
|
|
103
103
|
"type": "commonjs",
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "521407940b1ca095124b5699b7341f391ccd681f",
|
|
105
105
|
"main": "./src/index.js",
|
|
106
106
|
"types": "./src/index.d.ts"
|
|
107
107
|
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bundleJsonSchemaGenerator = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const json_schema_ref_parser_1 = tslib_1.__importDefault(require("@apidevtools/json-schema-ref-parser"));
|
|
6
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
const generator_1 = require("../index-json-schema/generator");
|
|
10
|
+
function resolveDefinition(tree, projectSourceRoot, { $ref }) {
|
|
11
|
+
const filePath = (0, path_1.join)(projectSourceRoot, $ref);
|
|
12
|
+
if (!tree.exists(filePath)) {
|
|
13
|
+
throw new Error(`The file '${filePath}' does not exist!`);
|
|
14
|
+
}
|
|
15
|
+
const schema = JSON.parse(tree.read(filePath).toString());
|
|
16
|
+
if (schema['definitions']) {
|
|
17
|
+
delete schema['definitions'];
|
|
18
|
+
}
|
|
19
|
+
if (schema['$schema']) {
|
|
20
|
+
delete schema['$schema'];
|
|
21
|
+
}
|
|
22
|
+
if (schema['$id']) {
|
|
23
|
+
delete schema['$id'];
|
|
24
|
+
}
|
|
25
|
+
for (const { key, value, propertyPath, parent } of (0, utilities_1.EachProperty)(schema)) {
|
|
26
|
+
if (key === '$ref') {
|
|
27
|
+
if (typeof value === 'string') {
|
|
28
|
+
parent[key] = value.replace(/^#\/definitions\//, '#/definitions/');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
// removeProperty(schema, 'definitions');
|
|
33
|
+
// removeProperty(schema, '$id');
|
|
34
|
+
// removeProperty(schema, '$schema');
|
|
35
|
+
return schema;
|
|
36
|
+
}
|
|
37
|
+
function resolveDefinitionMap(tree, projectSourceRoot, definitions) {
|
|
38
|
+
const resolvedDefinitions = {};
|
|
39
|
+
for (const [key, definition] of Object.entries(definitions)) {
|
|
40
|
+
resolvedDefinitions[key] = resolveDefinition(tree, projectSourceRoot, definition);
|
|
41
|
+
}
|
|
42
|
+
return resolvedDefinitions;
|
|
43
|
+
}
|
|
44
|
+
function bundleJsonSchemaGenerator(tree, options) {
|
|
45
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
const projectSourceRoot = (0, workspace_utilities_1.GetProjectSourceRoot)(tree, options.project);
|
|
47
|
+
const workspaceRoot = tree.root;
|
|
48
|
+
const definitions = resolveDefinitionMap(tree, projectSourceRoot, (0, generator_1.GenerateDefinitionsMap)(tree, options));
|
|
49
|
+
for (const file of (0, workspace_utilities_1.SearchFile)(tree, projectSourceRoot)) {
|
|
50
|
+
if (file.path.endsWith('template.schema.json')) {
|
|
51
|
+
const relativePathFromProjectSourceRoot = (0, path_1.dirname)((0, path_1.relative)(projectSourceRoot, file.path));
|
|
52
|
+
const schema = JSON.parse(file.content.toString());
|
|
53
|
+
const bundledSchema = yield json_schema_ref_parser_1.default.bundle(schema, {
|
|
54
|
+
resolve: {
|
|
55
|
+
file: {
|
|
56
|
+
canRead: ({ url }) => {
|
|
57
|
+
if (url.startsWith('http')) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
const relativeFromSchemaJsonFile = (0, path_1.relative)(workspaceRoot, url);
|
|
61
|
+
const absoluteFromSourceRoot = (0, path_1.join)(relativePathFromProjectSourceRoot, relativeFromSchemaJsonFile);
|
|
62
|
+
const absoluteFromWorkspaceRoot = (0, path_1.join)(projectSourceRoot, absoluteFromSourceRoot);
|
|
63
|
+
return tree.isFile(absoluteFromWorkspaceRoot);
|
|
64
|
+
},
|
|
65
|
+
read: ({ url }) => {
|
|
66
|
+
const relativeFromSchemaJsonFile = (0, path_1.relative)(workspaceRoot, url);
|
|
67
|
+
const absoluteFromSourceRoot = (0, path_1.join)(relativePathFromProjectSourceRoot, relativeFromSchemaJsonFile);
|
|
68
|
+
const absoluteFromWorkspaceRoot = (0, path_1.join)(projectSourceRoot, absoluteFromSourceRoot);
|
|
69
|
+
return tree.read(absoluteFromWorkspaceRoot).toString();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
// removeProperty(bundledSchema, 'definitions');
|
|
75
|
+
// removeProperty(bundledSchema, '$id');
|
|
76
|
+
// removeProperty(bundledSchema, '$schema');
|
|
77
|
+
bundledSchema['definitions'] = Object.assign(Object.assign({}, bundledSchema['definitions']), definitions);
|
|
78
|
+
fixNestaedDefinitions(bundledSchema);
|
|
79
|
+
tree.write(file.path.replace('template.schema.json', 'schema.json'), JSON.stringify(bundledSchema, null, 2));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
exports.bundleJsonSchemaGenerator = bundleJsonSchemaGenerator;
|
|
85
|
+
function removeProperty(obj, propertyName) {
|
|
86
|
+
const propertyPaths = [];
|
|
87
|
+
for (const { key, propertyPath } of (0, utilities_1.EachProperty)(obj)) {
|
|
88
|
+
if (key === propertyName) {
|
|
89
|
+
propertyPaths.push(propertyPath);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
for (const propertyPath of propertyPaths) {
|
|
93
|
+
if (propertyPath === propertyName) {
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
(0, utilities_1.RemoveFromObject)(obj, propertyPath);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function getUsedDefinitions(item) {
|
|
100
|
+
const usedDefinitions = [];
|
|
101
|
+
for (const { key, value, parent } of (0, utilities_1.EachProperty)(item)) {
|
|
102
|
+
if (key === '$ref') {
|
|
103
|
+
if (typeof value !== 'string') {
|
|
104
|
+
throw new Error(`The value of the key '$ref' in definition '${key}' is not a string!`);
|
|
105
|
+
}
|
|
106
|
+
usedDefinitions.push(value.replace(/^#\/definitions\//, ''));
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
return usedDefinitions;
|
|
110
|
+
}
|
|
111
|
+
function fixNestaedDefinitions(schema) {
|
|
112
|
+
var _a;
|
|
113
|
+
const usedDefinitions = [];
|
|
114
|
+
// create a list of used refs excluding the definitions
|
|
115
|
+
for (const [key, item] of Object.entries(schema !== null && schema !== void 0 ? schema : {})) {
|
|
116
|
+
if (key === 'definitions') {
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
if (typeof item !== 'object') {
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
(0, utilities_1.CoerceArrayItems)(usedDefinitions, getUsedDefinitions(item));
|
|
123
|
+
}
|
|
124
|
+
let removeList = Object.keys(schema.definitions).filter((key) => !usedDefinitions.includes(key));
|
|
125
|
+
for (let i = 0; i < removeList.length; i++) {
|
|
126
|
+
// check for each definition that will not be removed if it is using another definition that should be removed
|
|
127
|
+
// if yes remove this from the list of definitions to remove
|
|
128
|
+
for (const [key, item] of Object.entries((_a = schema.definitions) !== null && _a !== void 0 ? _a : {})) {
|
|
129
|
+
if (removeList.includes(key)) {
|
|
130
|
+
continue;
|
|
131
|
+
}
|
|
132
|
+
(0, utilities_1.CoerceArrayItems)(usedDefinitions, getUsedDefinitions(item));
|
|
133
|
+
}
|
|
134
|
+
removeList = removeList.filter((key) => !usedDefinitions.includes(key));
|
|
135
|
+
}
|
|
136
|
+
for (const key of removeList) {
|
|
137
|
+
delete schema.definitions[key];
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
exports.default = bundleJsonSchemaGenerator;
|
|
141
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/bundle-json-schema/generator.ts"],"names":[],"mappings":";;;;AAAA,yGAA6D;AAE7D,+CAKyB;AACzB,mEAGmC;AACnC,+BA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G,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC1C,8GAA8G;QAC9G,4DAA4D;QAC5D,KAAK,MAAM,CAAE,GAAG,EAAE,IAAI,CAAE,IAAI,MAAM,CAAC,OAAO,CAAC,MAAA,MAAM,CAAC,WAAW,mCAAI,EAAE,CAAC,EAAE;YACpE,IAAI,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;gBAC5B,SAAS;aACV;YACD,IAAA,4BAAgB,EAAC,eAAe,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;SAC7D;QACD,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;KACzE;IACD,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;QAC5B,OAAO,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;KAChC;AACH,CAAC;AAED,kBAAe,yBAAyB,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/bundle-json-schema/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,10 @@
|
|
|
1
|
+
import { Tree } from '@nx/devkit';
|
|
2
|
+
import { IndexJsonSchemaGeneratorSchema } from './schema';
|
|
3
|
+
export declare function GenerateSchematicDefinitionsMap(tree: Tree, options: IndexJsonSchemaGeneratorSchema, basePath?: string): Record<string, {
|
|
4
|
+
$ref: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function GenerateDefinitionsMap(tree: Tree, options: IndexJsonSchemaGeneratorSchema, basePath?: string): Record<string, {
|
|
7
|
+
$ref: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function indexJsonSchemaGenerator(tree: Tree, options: IndexJsonSchemaGeneratorSchema): Promise<void>;
|
|
10
|
+
export default indexJsonSchemaGenerator;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.indexJsonSchemaGenerator = exports.GenerateDefinitionsMap = exports.GenerateSchematicDefinitionsMap = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const plugin_utilities_1 = require("@rxap/plugin-utilities");
|
|
6
|
+
const utilities_1 = require("@rxap/utilities");
|
|
7
|
+
const workspace_utilities_1 = require("@rxap/workspace-utilities");
|
|
8
|
+
const path_1 = require("path");
|
|
9
|
+
function getSchematicMap(tree, options) {
|
|
10
|
+
const { generators, schematics } = (0, plugin_utilities_1.GetGenerators)(tree, options.project);
|
|
11
|
+
const generatorMapList = Object.entries(generators !== null && generators !== void 0 ? generators : {});
|
|
12
|
+
(0, utilities_1.CoerceArrayItems)(generatorMapList, Object.entries(schematics !== null && schematics !== void 0 ? schematics : {}), (a, b) => a[0] === b[0]);
|
|
13
|
+
return generatorMapList;
|
|
14
|
+
}
|
|
15
|
+
function generateSchematicInputSchema(tree, options) {
|
|
16
|
+
const schemaList = [];
|
|
17
|
+
const projectRoot = (0, workspace_utilities_1.GetProjectRoot)(tree, options.project);
|
|
18
|
+
const packageJsonName = (0, workspace_utilities_1.GetPackageJson)(tree, projectRoot).name;
|
|
19
|
+
const generatorMapList = getSchematicMap(tree, options);
|
|
20
|
+
for (const [name, { schema }] of generatorMapList) {
|
|
21
|
+
const schemaPath = (0, path_1.dirname)(schema);
|
|
22
|
+
const schemaTemplatePath = './' + (0, path_1.join)(schemaPath, 'template.schema.json');
|
|
23
|
+
let schemaRefPath;
|
|
24
|
+
if (tree.exists((0, path_1.join)(projectRoot, schemaTemplatePath))) {
|
|
25
|
+
schemaRefPath = schemaTemplatePath;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
schemaRefPath = schema;
|
|
29
|
+
}
|
|
30
|
+
const content = JSON.parse(tree.read((0, path_1.join)(projectRoot, schemaRefPath)).toString());
|
|
31
|
+
schemaRefPath = schemaRefPath.replace(/^\.\/[^/]+\//, './');
|
|
32
|
+
schemaList.push({
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
package: {
|
|
36
|
+
type: "string",
|
|
37
|
+
enum: [packageJsonName],
|
|
38
|
+
},
|
|
39
|
+
name: {
|
|
40
|
+
type: "string",
|
|
41
|
+
enum: [name],
|
|
42
|
+
},
|
|
43
|
+
options: {
|
|
44
|
+
$ref: `#/definitions/${(0, utilities_1.camelize)(content.$id)}`,
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
$schema: 'http://json-schema.org/schema',
|
|
51
|
+
$id: 'schematic-input',
|
|
52
|
+
type: 'object',
|
|
53
|
+
oneOf: schemaList,
|
|
54
|
+
definitions: GenerateSchematicDefinitionsMap(tree, options)
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
function GenerateSchematicDefinitionsMap(tree, options, basePath = './src') {
|
|
58
|
+
const projectRoot = (0, workspace_utilities_1.GetProjectRoot)(tree, options.project);
|
|
59
|
+
const generatorMapList = getSchematicMap(tree, options);
|
|
60
|
+
const definitions = {};
|
|
61
|
+
for (const [, { schema }] of generatorMapList) {
|
|
62
|
+
const schemaPath = (0, path_1.dirname)(schema);
|
|
63
|
+
const schemaTemplatePath = (0, path_1.join)(schemaPath, 'template.schema.json');
|
|
64
|
+
let schemaRefPath;
|
|
65
|
+
if (tree.exists((0, path_1.join)(projectRoot, schemaTemplatePath))) {
|
|
66
|
+
schemaRefPath = schemaTemplatePath;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
schemaRefPath = schema;
|
|
70
|
+
}
|
|
71
|
+
const content = JSON.parse(tree.read((0, path_1.join)(projectRoot, schemaRefPath)).toString());
|
|
72
|
+
definitions[(0, utilities_1.camelize)(content.$id)] = {
|
|
73
|
+
$ref: (0, path_1.relative)(basePath, schemaRefPath)
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
return definitions;
|
|
77
|
+
}
|
|
78
|
+
exports.GenerateSchematicDefinitionsMap = GenerateSchematicDefinitionsMap;
|
|
79
|
+
function GenerateDefinitionsMap(tree, options, basePath = './src') {
|
|
80
|
+
const projectSourceRoot = (0, workspace_utilities_1.GetProjectSourceRoot)(tree, options.project);
|
|
81
|
+
const schematicsFolder = (0, path_1.join)(projectSourceRoot, 'schematics');
|
|
82
|
+
const definitions = GenerateSchematicDefinitionsMap(tree, options, basePath);
|
|
83
|
+
for (const schematic of tree.children(schematicsFolder)) {
|
|
84
|
+
if (schematic.endsWith('schema.json')) {
|
|
85
|
+
const schema = JSON.parse(tree.read((0, path_1.join)(schematicsFolder, schematic)).toString());
|
|
86
|
+
definitions[(0, utilities_1.camelize)(schema.$id)] = {
|
|
87
|
+
$ref: (0, path_1.relative)(basePath, `./src/schematics/${schematic}`)
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return definitions;
|
|
92
|
+
}
|
|
93
|
+
exports.GenerateDefinitionsMap = GenerateDefinitionsMap;
|
|
94
|
+
function generateTemplateSchema(tree, options) {
|
|
95
|
+
const definitions = GenerateDefinitionsMap(tree, options);
|
|
96
|
+
definitions['schematicInput'] = {
|
|
97
|
+
$ref: './schematic-input.schema.json',
|
|
98
|
+
};
|
|
99
|
+
return {
|
|
100
|
+
$schema: 'http://json-schema.org/schema',
|
|
101
|
+
$id: 'schematic-angular',
|
|
102
|
+
oneOf: [
|
|
103
|
+
{
|
|
104
|
+
type: 'array',
|
|
105
|
+
items: {
|
|
106
|
+
$ref: '#/definitions/schematicInput'
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
$ref: '#/definitions/schematicInput'
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
definitions
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function indexJsonSchemaGenerator(tree, options) {
|
|
117
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
const projectSourceRoot = (0, workspace_utilities_1.GetProjectSourceRoot)(tree, options.project);
|
|
119
|
+
tree.write((0, path_1.join)(projectSourceRoot, 'schematic-input.schema.json'), JSON.stringify(generateSchematicInputSchema(tree, options), null, 2));
|
|
120
|
+
tree.write((0, path_1.join)(projectSourceRoot, 'template.schema.json'), JSON.stringify(generateTemplateSchema(tree, options), null, 2));
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
exports.indexJsonSchemaGenerator = indexJsonSchemaGenerator;
|
|
124
|
+
exports.default = indexJsonSchemaGenerator;
|
|
125
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/library/src/generators/index-json-schema/generator.ts"],"names":[],"mappings":";;;;AACA,6DAAuD;AACvD,+CAGyB;AACzB,mEAImC;AACnC,+BAIc;AAGd,SAAS,eAAe,CAAC,IAAU,EAAE,OAAuC;IAC1E,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,IAAA,gCAAa,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CA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_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-json-schema/index.ts"],"names":[],"mappings":";;;AAAA,uCAAgD;AAChD,oEAAoC;AAEpC,MAAM,SAAS,GAAG,IAAA,2BAAkB,EAAC,mBAAS,CAAC,CAAC;AAChD,kBAAe,SAAS,CAAC"}
|