@rxap/schematics-xml-parser 16.0.0-dev.8 → 16.0.0-dev.9
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 +6 -0
- package/README.md +1 -1
- package/package.json +15 -15
- package/src/index.js +6 -3
- package/src/index.js.map +1 -1
- package/src/lib/elements/index.js +5 -2
- package/src/lib/elements/index.js.map +1 -1
- package/src/lib/elements/methods/index.js +6 -3
- package/src/lib/elements/methods/index.js.map +1 -1
- package/src/lib/elements/methods/method.element.js +32 -29
- package/src/lib/elements/methods/method.element.js.map +1 -1
- package/src/lib/elements/methods/methods.js +8 -5
- package/src/lib/elements/methods/methods.js.map +1 -1
- package/src/lib/elements/methods/open-api-remote-method.element.js +21 -18
- package/src/lib/elements/methods/open-api-remote-method.element.js.map +1 -1
- package/src/lib/elements/module.element.js +19 -16
- package/src/lib/elements/module.element.js.map +1 -1
- package/src/lib/elements/type.element.js +24 -21
- package/src/lib/elements/type.element.js.map +1 -1
- package/src/lib/index.js +4 -1
- package/src/lib/index.js.map +1 -1
- package/src/lib/parse-template.js +15 -10
- package/src/lib/parse-template.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.9](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@16.0.0-dev.8...@rxap/schematics-xml-parser@16.0.0-dev.9) (2023-08-17)
|
|
7
|
+
|
|
8
|
+
### Reverts
|
|
9
|
+
|
|
10
|
+
- change from commonjs to es2022 ([747a381](https://gitlab.com/rxap/packages/commit/747a381a090f0a276cf363da61bb19ed0c9cb5b7))
|
|
11
|
+
|
|
6
12
|
# [16.0.0-dev.8](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@16.0.0-dev.7...@rxap/schematics-xml-parser@16.0.0-dev.8) (2023-08-16)
|
|
7
13
|
|
|
8
14
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -17,5 +17,5 @@ yarn add @rxap/schematics-xml-parser
|
|
|
17
17
|
```
|
|
18
18
|
**Install peer dependencies:**
|
|
19
19
|
```bash
|
|
20
|
-
yarn add @angular-devkit/core@^16.1.4 @angular-devkit/schematics@^16.1.4 @rxap/schematics-ts-morph@^16.0.0-dev.
|
|
20
|
+
yarn add @angular-devkit/core@^16.1.4 @angular-devkit/schematics@^16.1.4 @rxap/schematics-ts-morph@^16.0.0-dev.11 @rxap/schematics-utilities@^16.0.0-dev.8 @rxap/xml-parser@^16.0.0-dev.7 ts-morph@^18.0.0
|
|
21
21
|
```
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxap/schematics-xml-parser",
|
|
3
|
-
"version": "16.0.0-dev.
|
|
4
|
-
"type": "
|
|
3
|
+
"version": "16.0.0-dev.9",
|
|
4
|
+
"type": "commonjs",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular-devkit/core": "^16.1.4",
|
|
7
7
|
"@angular-devkit/schematics": "^16.1.4",
|
|
8
|
-
"@rxap/schematics-ts-morph": "^16.0.0-dev.
|
|
9
|
-
"@rxap/schematics-utilities": "^16.0.0-dev.
|
|
10
|
-
"@rxap/xml-parser": "^16.0.0-dev.
|
|
8
|
+
"@rxap/schematics-ts-morph": "^16.0.0-dev.11",
|
|
9
|
+
"@rxap/schematics-utilities": "^16.0.0-dev.8",
|
|
10
|
+
"@rxap/xml-parser": "^16.0.0-dev.7",
|
|
11
11
|
"ts-morph": "^18.0.0",
|
|
12
|
-
"@rxap/mixin": "16.0.0-dev.
|
|
13
|
-
"@rxap/node-utilities": "1.1.0-dev.
|
|
14
|
-
"@rxap/reflect-metadata": "1.0.1-dev.
|
|
15
|
-
"@rxap/utilities": "16.0.0-dev.
|
|
16
|
-
"@rxap/workspace-ts-morph": "0.1.0-dev.
|
|
17
|
-
"@rxap/workspace-utilities": "0.1.0-dev.
|
|
12
|
+
"@rxap/mixin": "16.0.0-dev.8",
|
|
13
|
+
"@rxap/node-utilities": "1.1.0-dev.3",
|
|
14
|
+
"@rxap/reflect-metadata": "1.0.1-dev.4",
|
|
15
|
+
"@rxap/utilities": "16.0.0-dev.11",
|
|
16
|
+
"@rxap/workspace-ts-morph": "0.1.0-dev.2",
|
|
17
|
+
"@rxap/workspace-utilities": "0.1.0-dev.5",
|
|
18
18
|
"@types/xmldom": "0.1.31",
|
|
19
19
|
"handlebars": "4.7.7"
|
|
20
20
|
},
|
|
@@ -55,19 +55,19 @@
|
|
|
55
55
|
"packageGroup": [
|
|
56
56
|
{
|
|
57
57
|
"package": "@rxap/schematics-ts-morph",
|
|
58
|
-
"version": "16.0.0-dev.
|
|
58
|
+
"version": "16.0.0-dev.11"
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"package": "@rxap/schematics-utilities",
|
|
62
|
-
"version": "16.0.0-dev.
|
|
62
|
+
"version": "16.0.0-dev.8"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"package": "@rxap/xml-parser",
|
|
66
|
-
"version": "16.0.0-dev.
|
|
66
|
+
"version": "16.0.0-dev.7"
|
|
67
67
|
}
|
|
68
68
|
]
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "bdda345932cb56c4034526de42761d15700fc56d",
|
|
71
71
|
"main": "./src/index.js",
|
|
72
72
|
"types": "./src/index.d.ts"
|
|
73
73
|
}
|
package/src/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./lib"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./lib/elements"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./lib/elements/methods"), exports);
|
|
4
7
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/schematic/xml-parser/src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/schematic/xml-parser/src/index.ts"],"names":[],"mappings":";;;AAAA,gDAAsB;AACtB,yDAA+B;AAC/B,iEAAuC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./module.element"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./type.element"), exports);
|
|
3
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/xml-parser/src/lib/elements/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/xml-parser/src/lib/elements/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,yDAA+B"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./method.element"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./methods"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./open-api-remote-method.element"), exports);
|
|
4
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/xml-parser/src/lib/elements/methods/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/xml-parser/src/lib/elements/methods/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC;AACjC,oDAA0B;AAC1B,2EAAiD"}
|
|
@@ -1,53 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MethodElement = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const xml_parser_1 = require("@rxap/xml-parser");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
const core_1 = require("@angular-devkit/core");
|
|
8
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
9
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
10
|
+
const type_element_1 = require("../type.element");
|
|
11
|
+
const { dasherize, classify, camelize, } = core_1.strings;
|
|
12
|
+
let MethodElement = exports.MethodElement = class MethodElement {
|
|
10
13
|
toValue({ sourceFile, project, }) {
|
|
11
14
|
if (this.from) {
|
|
12
|
-
CoerceImports(sourceFile, {
|
|
15
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
13
16
|
namedImports: [this.name],
|
|
14
17
|
moduleSpecifier: this.from,
|
|
15
18
|
});
|
|
16
19
|
return this.name;
|
|
17
20
|
}
|
|
18
21
|
else {
|
|
19
|
-
const methodName = CoerceSuffix(classify(this.name), 'Method');
|
|
20
|
-
const methodFilePath = join('/methods', `${dasherize(this.name.replace(/[-_\s]?[m|M]ethod$/, ''))}.method.ts`);
|
|
21
|
-
const methodSourceFile = CoerceSourceFile(project, methodFilePath);
|
|
22
|
+
const methodName = (0, schematics_utilities_1.CoerceSuffix)(classify(this.name), 'Method');
|
|
23
|
+
const methodFilePath = (0, path_1.join)('/methods', `${dasherize(this.name.replace(/[-_\s]?[m|M]ethod$/, ''))}.method.ts`);
|
|
24
|
+
const methodSourceFile = (0, schematics_ts_morph_1.CoerceSourceFile)(project, methodFilePath);
|
|
22
25
|
const methodOptions = {
|
|
23
26
|
statements: [`console.log('${dasherize(methodName)}', parameters);`],
|
|
24
27
|
};
|
|
25
28
|
if (this.parameterType) {
|
|
26
29
|
methodOptions.parameterType = this.parameterType.toValue({ sourceFile: methodSourceFile });
|
|
27
30
|
}
|
|
28
|
-
CoerceMethodClassLegacy(methodSourceFile, methodName, methodOptions);
|
|
31
|
+
(0, schematics_ts_morph_1.CoerceMethodClassLegacy)(methodSourceFile, methodName, methodOptions);
|
|
29
32
|
return methodName;
|
|
30
33
|
}
|
|
31
34
|
}
|
|
32
35
|
};
|
|
33
|
-
__decorate([
|
|
34
|
-
ElementTextContent(),
|
|
35
|
-
ElementRequired(),
|
|
36
|
-
__metadata("design:type", String)
|
|
36
|
+
tslib_1.__decorate([
|
|
37
|
+
(0, xml_parser_1.ElementTextContent)(),
|
|
38
|
+
(0, xml_parser_1.ElementRequired)(),
|
|
39
|
+
tslib_1.__metadata("design:type", String)
|
|
37
40
|
], MethodElement.prototype, "name", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
ElementAttribute(),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
+
tslib_1.__decorate([
|
|
42
|
+
(0, xml_parser_1.ElementAttribute)(),
|
|
43
|
+
tslib_1.__metadata("design:type", String)
|
|
41
44
|
], MethodElement.prototype, "from", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
ElementAttribute(),
|
|
44
|
-
__metadata("design:type", Boolean)
|
|
45
|
+
tslib_1.__decorate([
|
|
46
|
+
(0, xml_parser_1.ElementAttribute)(),
|
|
47
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
45
48
|
], MethodElement.prototype, "mock", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
ElementChild(TypeElement),
|
|
48
|
-
__metadata("design:type", TypeElement)
|
|
49
|
+
tslib_1.__decorate([
|
|
50
|
+
(0, xml_parser_1.ElementChild)(type_element_1.TypeElement),
|
|
51
|
+
tslib_1.__metadata("design:type", type_element_1.TypeElement)
|
|
49
52
|
], MethodElement.prototype, "parameterType", void 0);
|
|
50
|
-
MethodElement = __decorate([
|
|
51
|
-
ElementDef('method')
|
|
53
|
+
exports.MethodElement = MethodElement = tslib_1.__decorate([
|
|
54
|
+
(0, xml_parser_1.ElementDef)('method')
|
|
52
55
|
], MethodElement);
|
|
53
56
|
//# sourceMappingURL=method.element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method.element.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/xml-parser/src/lib/elements/methods/method.element.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"method.element.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/xml-parser/src/lib/elements/methods/method.element.ts"],"names":[],"mappings":";;;;AAAA,iDAO0B;AAE1B,+BAA4B;AAC5B,+CAA+C;AAC/C,qEAA0D;AAC1D,mEAMmC;AACnC,kDAA8C;AAE9C,MAAM,EACJ,SAAS,EACT,QAAQ,EACR,QAAQ,GACT,GAAG,cAAO,CAAC;AAOL,IAAM,aAAa,2BAAnB,MAAM,aAAa;IAejB,OAAO,CAAC,EACE,UAAU,EACV,OAAO,GACqC;QAC3D,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAA,mCAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,IAAI,CAAC,IAAI,CAAE;gBAC3B,eAAe,EAAE,IAAI,CAAC,IAAI;aAC3B,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,IAAI,CAAC;SAClB;aAAM;YACL,MAAM,UAAU,GAAG,IAAA,mCAAY,EAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;YAC/D,MAAM,cAAc,GAAG,IAAA,WAAI,EAAC,UAAU,EAAE,GAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAE,YAAY,CAAC,CAAC;YACjH,MAAM,gBAAgB,GAAG,IAAA,sCAAgB,EAAC,OAAO,EAAE,cAAc,CAAC,CAAC;YACnE,MAAM,aAAa,GAA0B;gBAC3C,UAAU,EAAE,CAAE,gBAAiB,SAAS,CAAC,UAAU,CAAE,iBAAiB,CAAE;aACzE,CAAC;YACF,IAAI,IAAI,CAAC,aAAa,EAAE;gBACtB,aAAa,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC,CAAC;aAC5F;YACD,IAAA,6CAAuB,EAAC,gBAAgB,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;YACrE,OAAO,UAAU,CAAC;SACnB;IACH,CAAC;CAEF,CAAA;AApCQ;IAFN,IAAA,+BAAkB,GAAE;IACpB,IAAA,4BAAe,GAAE;;2CACG;AAGd;IADN,IAAA,6BAAgB,GAAE;;2CACE;AAGd;IADN,IAAA,6BAAgB,GAAE;;2CACG;AAGf;IADN,IAAA,yBAAY,EAAC,0BAAW,CAAC;sCACH,0BAAW;oDAAC;wBAbxB,aAAa;IADzB,IAAA,uBAAU,EAAC,QAAQ,CAAC;GACR,aAAa,CAwCzB"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Methods = void 0;
|
|
4
|
+
const method_element_1 = require("./method.element");
|
|
5
|
+
const open_api_remote_method_element_1 = require("./open-api-remote-method.element");
|
|
6
|
+
exports.Methods = [
|
|
7
|
+
method_element_1.MethodElement,
|
|
8
|
+
open_api_remote_method_element_1.OpenApiRemoteMethodElement,
|
|
6
9
|
];
|
|
7
10
|
//# sourceMappingURL=methods.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/xml-parser/src/lib/elements/methods/methods.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/xml-parser/src/lib/elements/methods/methods.ts"],"names":[],"mappings":";;;AAEA,qDAAiD;AACjD,qFAA8E;AAEjE,QAAA,OAAO,GAAsC;IACxD,8BAAa;IACb,2DAA0B;CAC3B,CAAC"}
|
|
@@ -1,33 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpenApiRemoteMethodElement = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const xml_parser_1 = require("@rxap/xml-parser");
|
|
6
|
+
const core_1 = require("@angular-devkit/core");
|
|
7
|
+
const method_element_1 = require("./method.element");
|
|
8
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
9
|
+
const { dasherize, classify, camelize, } = core_1.strings;
|
|
10
|
+
let OpenApiRemoteMethodElement = exports.OpenApiRemoteMethodElement = class OpenApiRemoteMethodElement {
|
|
8
11
|
toValue({ sourceFile, options, }) {
|
|
9
12
|
const openApiRemoteMethodName = classify(this.name) + 'RemoteMethod';
|
|
10
13
|
if (!options.openApiModule) {
|
|
11
14
|
throw new Error('The open api module is not defined!');
|
|
12
15
|
}
|
|
13
|
-
CoerceImports(sourceFile, {
|
|
16
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
14
17
|
namedImports: [openApiRemoteMethodName],
|
|
15
18
|
moduleSpecifier: `${options.openApiModule}/remote-methods/${dasherize(this.name)}.remote-method`,
|
|
16
19
|
});
|
|
17
20
|
return openApiRemoteMethodName;
|
|
18
21
|
}
|
|
19
22
|
};
|
|
20
|
-
__decorate([
|
|
21
|
-
ElementTextContent(),
|
|
22
|
-
ElementRequired(),
|
|
23
|
-
__metadata("design:type", String)
|
|
23
|
+
tslib_1.__decorate([
|
|
24
|
+
(0, xml_parser_1.ElementTextContent)(),
|
|
25
|
+
(0, xml_parser_1.ElementRequired)(),
|
|
26
|
+
tslib_1.__metadata("design:type", String)
|
|
24
27
|
], OpenApiRemoteMethodElement.prototype, "name", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
ElementAttribute(),
|
|
27
|
-
__metadata("design:type", Boolean)
|
|
28
|
+
tslib_1.__decorate([
|
|
29
|
+
(0, xml_parser_1.ElementAttribute)(),
|
|
30
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
28
31
|
], OpenApiRemoteMethodElement.prototype, "mock", void 0);
|
|
29
|
-
OpenApiRemoteMethodElement = __decorate([
|
|
30
|
-
ElementExtends(MethodElement),
|
|
31
|
-
ElementDef('open-api-remote-method')
|
|
32
|
+
exports.OpenApiRemoteMethodElement = OpenApiRemoteMethodElement = tslib_1.__decorate([
|
|
33
|
+
(0, xml_parser_1.ElementExtends)(method_element_1.MethodElement),
|
|
34
|
+
(0, xml_parser_1.ElementDef)('open-api-remote-method')
|
|
32
35
|
], OpenApiRemoteMethodElement);
|
|
33
36
|
//# sourceMappingURL=open-api-remote-method.element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-api-remote-method.element.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/xml-parser/src/lib/elements/methods/open-api-remote-method.element.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"open-api-remote-method.element.js","sourceRoot":"","sources":["../../../../../../../../packages/schematic/xml-parser/src/lib/elements/methods/open-api-remote-method.element.ts"],"names":[],"mappings":";;;;AAAA,iDAO0B;AAE1B,+CAA+C;AAC/C,qDAG0B;AAC1B,mEAA0D;AAE1D,MAAM,EACJ,SAAS,EACT,QAAQ,EACR,QAAQ,GACT,GAAG,cAAO,CAAC;AAIL,IAAM,0BAA0B,wCAAhC,MAAM,0BAA0B;IAS9B,OAAO,CAAC,EACE,UAAU,EACV,OAAO,GACyD;QAE/E,MAAM,uBAAuB,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC;QAErE,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;SACxD;QAED,IAAA,mCAAa,EAAC,UAAU,EAAE;YACxB,YAAY,EAAE,CAAE,uBAAuB,CAAE;YACzC,eAAe,EAAE,GAAI,OAAO,CAAC,aAAc,mBAAoB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAE,gBAAgB;SACrG,CAAC,CAAC;QAEH,OAAO,uBAAuB,CAAC;IAEjC,CAAC;CAEF,CAAA;AAzBQ;IAFN,IAAA,+BAAkB,GAAE;IACpB,IAAA,4BAAe,GAAE;;wDACG;AAGd;IADN,IAAA,6BAAgB,GAAE;;wDACG;qCAPX,0BAA0B;IAFtC,IAAA,2BAAc,EAAC,8BAAa,CAAC;IAC7B,IAAA,uBAAU,EAAC,wBAAwB,CAAC;GACxB,0BAA0B,CA6BtC"}
|
|
@@ -1,25 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModuleElement = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const xml_parser_1 = require("@rxap/xml-parser");
|
|
6
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
7
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
8
|
+
let ModuleElement = exports.ModuleElement = class ModuleElement {
|
|
6
9
|
handleComponentModule({ sourceFile, project, options, }) {
|
|
7
|
-
AddNgModuleImport(sourceFile, this.name, this.form);
|
|
10
|
+
(0, schematics_ts_morph_1.AddNgModuleImport)(sourceFile, this.name, this.form);
|
|
8
11
|
}
|
|
9
12
|
toValue({ project, options, }) {
|
|
10
|
-
return noop();
|
|
13
|
+
return (0, schematics_1.noop)();
|
|
11
14
|
}
|
|
12
15
|
};
|
|
13
|
-
__decorate([
|
|
14
|
-
ElementChildTextContent(),
|
|
15
|
-
ElementRequired(),
|
|
16
|
-
__metadata("design:type", String)
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
(0, xml_parser_1.ElementChildTextContent)(),
|
|
18
|
+
(0, xml_parser_1.ElementRequired)(),
|
|
19
|
+
tslib_1.__metadata("design:type", String)
|
|
17
20
|
], ModuleElement.prototype, "name", void 0);
|
|
18
|
-
__decorate([
|
|
19
|
-
ElementChildTextContent(),
|
|
20
|
-
__metadata("design:type", String)
|
|
21
|
+
tslib_1.__decorate([
|
|
22
|
+
(0, xml_parser_1.ElementChildTextContent)(),
|
|
23
|
+
tslib_1.__metadata("design:type", String)
|
|
21
24
|
], ModuleElement.prototype, "form", void 0);
|
|
22
|
-
ModuleElement = __decorate([
|
|
23
|
-
ElementDef('module')
|
|
25
|
+
exports.ModuleElement = ModuleElement = tslib_1.__decorate([
|
|
26
|
+
(0, xml_parser_1.ElementDef)('module')
|
|
24
27
|
], ModuleElement);
|
|
25
28
|
//# sourceMappingURL=module.element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.element.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/xml-parser/src/lib/elements/module.element.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.element.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/xml-parser/src/lib/elements/module.element.ts"],"names":[],"mappings":";;;;AAAA,iDAK0B;AAC1B,2DAGoC;AAEpC,mEAImC;AAG5B,IAAM,aAAa,2BAAnB,MAAM,aAAa;IASjB,qBAAqB,CAAC,EACE,UAAU,EACV,OAAO,EACP,OAAO,GACqC;QACzE,IAAA,uCAAiB,EAAC,UAAU,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;IAEM,OAAO,CAAC,EACE,OAAO,EACP,OAAO,GACQ;QAC9B,OAAO,IAAA,iBAAI,GAAE,CAAC;IAChB,CAAC;CAEF,CAAA;AApBQ;IAFN,IAAA,oCAAuB,GAAE;IACzB,IAAA,4BAAe,GAAE;;2CACG;AAGd;IADN,IAAA,oCAAuB,GAAE;;2CACL;wBAPV,aAAa;IADzB,IAAA,uBAAU,EAAC,QAAQ,CAAC;GACR,aAAa,CAwBzB"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StringTypeElement = exports.TypeElement = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const xml_parser_1 = require("@rxap/xml-parser");
|
|
6
|
+
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
7
|
+
let TypeElement = exports.TypeElement = class TypeElement {
|
|
5
8
|
get type() {
|
|
6
9
|
if (this.nullable) {
|
|
7
10
|
return [this.name, 'null'].join(' | ');
|
|
@@ -10,7 +13,7 @@ export let TypeElement = class TypeElement {
|
|
|
10
13
|
}
|
|
11
14
|
toValue({ sourceFile }) {
|
|
12
15
|
if (this.from) {
|
|
13
|
-
CoerceImports(sourceFile, {
|
|
16
|
+
(0, schematics_ts_morph_1.CoerceImports)(sourceFile, {
|
|
14
17
|
namedImports: [this.name],
|
|
15
18
|
moduleSpecifier: this.from,
|
|
16
19
|
});
|
|
@@ -18,30 +21,30 @@ export let TypeElement = class TypeElement {
|
|
|
18
21
|
return this.type;
|
|
19
22
|
}
|
|
20
23
|
};
|
|
21
|
-
__decorate([
|
|
22
|
-
ElementChildTextContent(),
|
|
23
|
-
ElementRequired(),
|
|
24
|
-
__metadata("design:type", String)
|
|
24
|
+
tslib_1.__decorate([
|
|
25
|
+
(0, xml_parser_1.ElementChildTextContent)(),
|
|
26
|
+
(0, xml_parser_1.ElementRequired)(),
|
|
27
|
+
tslib_1.__metadata("design:type", String)
|
|
25
28
|
], TypeElement.prototype, "name", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
ElementChildTextContent(),
|
|
28
|
-
__metadata("design:type", String)
|
|
29
|
+
tslib_1.__decorate([
|
|
30
|
+
(0, xml_parser_1.ElementChildTextContent)(),
|
|
31
|
+
tslib_1.__metadata("design:type", String)
|
|
29
32
|
], TypeElement.prototype, "from", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
ElementAttribute(),
|
|
32
|
-
__metadata("design:type", Boolean)
|
|
33
|
+
tslib_1.__decorate([
|
|
34
|
+
(0, xml_parser_1.ElementAttribute)(),
|
|
35
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
33
36
|
], TypeElement.prototype, "nullable", void 0);
|
|
34
|
-
TypeElement = __decorate([
|
|
35
|
-
ElementDef('type')
|
|
37
|
+
exports.TypeElement = TypeElement = tslib_1.__decorate([
|
|
38
|
+
(0, xml_parser_1.ElementDef)('type')
|
|
36
39
|
], TypeElement);
|
|
37
|
-
|
|
40
|
+
let StringTypeElement = exports.StringTypeElement = class StringTypeElement extends TypeElement {
|
|
38
41
|
constructor() {
|
|
39
42
|
super(...arguments);
|
|
40
43
|
this.name = 'string';
|
|
41
44
|
}
|
|
42
45
|
};
|
|
43
|
-
StringTypeElement = __decorate([
|
|
44
|
-
ElementExtends(TypeElement),
|
|
45
|
-
ElementDef('string-type')
|
|
46
|
+
exports.StringTypeElement = StringTypeElement = tslib_1.__decorate([
|
|
47
|
+
(0, xml_parser_1.ElementExtends)(TypeElement),
|
|
48
|
+
(0, xml_parser_1.ElementDef)('string-type')
|
|
46
49
|
], StringTypeElement);
|
|
47
50
|
//# sourceMappingURL=type.element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.element.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/xml-parser/src/lib/elements/type.element.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"type.element.js","sourceRoot":"","sources":["../../../../../../../packages/schematic/xml-parser/src/lib/elements/type.element.ts"],"names":[],"mappings":";;;;AAAA,iDAO0B;AAE1B,mEAA0D;AAGnD,IAAM,WAAW,yBAAjB,MAAM,WAAW;IAYtB,IAAW,IAAI;QACb,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,OAAO,CAAE,IAAI,CAAC,IAAI,EAAE,MAAM,CAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAC1C;QACD,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAEM,OAAO,CAAC,EAAE,UAAU,EAA8B;QACvD,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAA,mCAAa,EAAC,UAAU,EAAE;gBACxB,YAAY,EAAE,CAAE,IAAI,CAAC,IAAI,CAAE;gBAC3B,eAAe,EAAE,IAAI,CAAC,IAAI;aAC3B,CAAC,CAAC;SACJ;QACD,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;CAEF,CAAA;AAzBQ;IAFN,IAAA,oCAAuB,GAAE;IACzB,IAAA,4BAAe,GAAE;;yCACG;AAGd;IADN,IAAA,oCAAuB,GAAE;;yCACL;AAGd;IADN,IAAA,6BAAgB,GAAE;;6CACO;sBAVf,WAAW;IADvB,IAAA,uBAAU,EAAC,MAAM,CAAC;GACN,WAAW,CA6BvB;AAIM,IAAM,iBAAiB,+BAAvB,MAAM,iBAAkB,SAAQ,WAAW;IAA3C;;QAEW,SAAI,GAAG,QAAQ,CAAC;IAElC,CAAC;CAAA,CAAA;4BAJY,iBAAiB;IAF7B,IAAA,2BAAc,EAAC,WAAW,CAAC;IAC3B,IAAA,uBAAU,EAAC,aAAa,CAAC;GACb,iBAAiB,CAI7B"}
|
package/src/lib/index.js
CHANGED
package/src/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/schematic/xml-parser/src/lib/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/schematic/xml-parser/src/lib/index.ts"],"names":[],"mappings":";;;AAAA,2DAAiC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParseTemplate = exports.FindTemplate = void 0;
|
|
4
|
+
const xml_parser_1 = require("@rxap/xml-parser");
|
|
5
|
+
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
function FindTemplate(template, host, basePath, baseDirEntry = host.getDir('templates')) {
|
|
5
8
|
if (basePath) {
|
|
6
|
-
const path = join(baseDirEntry.path, basePath, template);
|
|
9
|
+
const path = (0, path_1.join)(baseDirEntry.path, basePath, template);
|
|
7
10
|
if (host.exists(path)) {
|
|
8
11
|
return path;
|
|
9
12
|
}
|
|
@@ -12,7 +15,7 @@ export function FindTemplate(template, host, basePath, baseDirEntry = host.getDi
|
|
|
12
15
|
}
|
|
13
16
|
}
|
|
14
17
|
else {
|
|
15
|
-
const path = join(baseDirEntry.path, template);
|
|
18
|
+
const path = (0, path_1.join)(baseDirEntry.path, template);
|
|
16
19
|
if (host.exists(path)) {
|
|
17
20
|
return path;
|
|
18
21
|
}
|
|
@@ -21,7 +24,7 @@ export function FindTemplate(template, host, basePath, baseDirEntry = host.getDi
|
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
26
|
{
|
|
24
|
-
const path = join(baseDirEntry.path, 'shared', template);
|
|
27
|
+
const path = (0, path_1.join)(baseDirEntry.path, 'shared', template);
|
|
25
28
|
if (host.exists(path)) {
|
|
26
29
|
return path;
|
|
27
30
|
}
|
|
@@ -31,6 +34,7 @@ export function FindTemplate(template, host, basePath, baseDirEntry = host.getDi
|
|
|
31
34
|
}
|
|
32
35
|
return null;
|
|
33
36
|
}
|
|
37
|
+
exports.FindTemplate = FindTemplate;
|
|
34
38
|
/**
|
|
35
39
|
* Parse the template and returns the ParsedElement object
|
|
36
40
|
*
|
|
@@ -67,11 +71,11 @@ export function FindTemplate(template, host, basePath, baseDirEntry = host.getDi
|
|
|
67
71
|
* @param basePath the basePath for the search
|
|
68
72
|
* @param elements a collection of ParsedElement class constructors that should be include in the xml parsing
|
|
69
73
|
*/
|
|
70
|
-
|
|
74
|
+
function ParseTemplate(host, template, basePath, ...elements) {
|
|
71
75
|
let templateFile;
|
|
72
76
|
let filename = '__inline__';
|
|
73
77
|
let templateFilePath = template;
|
|
74
|
-
const basePathList = coerceArray(basePath);
|
|
78
|
+
const basePathList = (0, schematics_utilities_1.coerceArray)(basePath);
|
|
75
79
|
if (template.match(/\.xml$/)) {
|
|
76
80
|
if (!host.exists(template)) {
|
|
77
81
|
for (const bp of basePathList) {
|
|
@@ -100,11 +104,12 @@ export function ParseTemplate(host, template, basePath, ...elements) {
|
|
|
100
104
|
else {
|
|
101
105
|
templateFile = template;
|
|
102
106
|
}
|
|
103
|
-
const parser = new XmlParserService();
|
|
107
|
+
const parser = new xml_parser_1.XmlParserService();
|
|
104
108
|
parser.register(...elements);
|
|
105
109
|
if (!templateFile) {
|
|
106
110
|
throw new Error('The template for the xml parser is not defined');
|
|
107
111
|
}
|
|
108
112
|
return parser.parseFromXml(templateFile, filename, templateFilePath);
|
|
109
113
|
}
|
|
114
|
+
exports.ParseTemplate = ParseTemplate;
|
|
110
115
|
//# sourceMappingURL=parse-template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-template.js","sourceRoot":"","sources":["../../../../../../packages/schematic/xml-parser/src/lib/parse-template.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"parse-template.js","sourceRoot":"","sources":["../../../../../../packages/schematic/xml-parser/src/lib/parse-template.ts"],"names":[],"mappings":"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"}
|