@rxap/schematics-xml-parser 13.0.1-next.0 → 13.0.1-next.3
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 +30 -0
- package/README.md +1 -1
- package/package.json +10 -8
- package/src/index.js +6 -9
- package/src/index.js.map +1 -1
- package/src/lib/elements/methods/method.element.js +28 -31
- package/src/lib/elements/methods/method.element.js.map +1 -1
- package/src/lib/elements/methods/methods.d.ts +1 -1
- package/src/lib/elements/methods/methods.js +5 -8
- package/src/lib/elements/methods/methods.js.map +1 -1
- package/src/lib/elements/methods/open-api-remote-method.element.js +16 -19
- package/src/lib/elements/methods/open-api-remote-method.element.js.map +1 -1
- package/src/lib/elements/module.element.js +16 -19
- package/src/lib/elements/module.element.js.map +1 -1
- package/src/lib/elements/type.element.js +19 -22
- package/src/lib/elements/type.element.js.map +1 -1
- package/src/lib/parse-template.d.ts +1 -1
- package/src/lib/parse-template.js +10 -15
- package/src/lib/parse-template.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,36 @@
|
|
|
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
|
+
## [13.0.1-next.3](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@13.0.1-next.2...@rxap/schematics-xml-parser@13.0.1-next.3) (2022-08-18)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* support node16 module resolution ([f8975a1](https://gitlab.com/rxap/packages/commit/f8975a160b07276e72db3f6745c207ac4b4632f4))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [13.0.1-next.2](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@13.0.1-next.1...@rxap/schematics-xml-parser@13.0.1-next.2) (2022-05-09)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @rxap/schematics-xml-parser
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [13.0.1-next.1](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@13.0.1-next.0...@rxap/schematics-xml-parser@13.0.1-next.1) (2022-03-23)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* remove rxap/utilities dependency ([d8dfe16](https://gitlab.com/rxap/packages/commit/d8dfe168f5d3afd5cd88d4fd143bd2c7b2c687b7))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
6
36
|
## [13.0.1-next.0](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@13.0.0-next.0...@rxap/schematics-xml-parser@13.0.1-next.0) (2022-03-03)
|
|
7
37
|
|
|
8
38
|
**Note:** Version bump only for package @rxap/schematics-xml-parser
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxap/schematics-xml-parser",
|
|
3
|
-
"version": "13.0.1-next.
|
|
3
|
+
"version": "13.0.1-next.3",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
},
|
|
8
|
-
"peerDependencies": {
|
|
9
|
-
"@rxap/schematics-ts-morph": "^13.0.0-next.0",
|
|
10
|
-
"@rxap/xml-parser": "^12.1.1",
|
|
11
|
-
"ts-morph": "^13.0.3"
|
|
5
|
+
"tslib": "^2.3.1",
|
|
6
|
+
"semver": "^7.3.5"
|
|
12
7
|
},
|
|
13
8
|
"publishConfig": {
|
|
14
9
|
"directory": "../../dist/libs/xml-parser",
|
|
@@ -36,10 +31,17 @@
|
|
|
36
31
|
"ng-update": {
|
|
37
32
|
"packageGroup": [
|
|
38
33
|
"@rxap/schematics-ts-morph",
|
|
34
|
+
"@rxap/schematics-utilities",
|
|
39
35
|
"@rxap/schematics-xml-parser",
|
|
40
36
|
"@rxap/xml-parser"
|
|
41
37
|
],
|
|
42
38
|
"migrations": "./migration.json"
|
|
43
39
|
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@rxap/schematics-ts-morph": "^13.0.0-next.3",
|
|
42
|
+
"@rxap/schematics-utilities": "^13.0.0-next.2",
|
|
43
|
+
"@rxap/xml-parser": "^12.1.1",
|
|
44
|
+
"ts-morph": "^13.0.3"
|
|
45
|
+
},
|
|
44
46
|
"typings": "./src/index.d.ts"
|
|
45
47
|
}
|
package/src/index.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./lib/parse-template"), exports);
|
|
1
|
+
export * from './lib/parse-template';
|
|
5
2
|
// region elements
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export * from './lib/elements/module.element';
|
|
4
|
+
export * from './lib/elements/type.element';
|
|
8
5
|
// region methods
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export * from './lib/elements/methods/methods';
|
|
7
|
+
export * from './lib/elements/methods/open-api-remote-method.element';
|
|
8
|
+
export * from './lib/elements/methods/method.element';
|
|
12
9
|
// endregion
|
|
13
10
|
// endregion
|
|
14
11
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/xml-parser/src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/xml-parser/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AAErC,kBAAkB;AAElB,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAE5C,iBAAiB;AACjB,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uDAAuD,CAAC;AACtE,cAAc,uCAAuC,CAAC;AACtD,YAAY;AAEZ,YAAY"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
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;
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { ElementAttribute, ElementChild, ElementDef, ElementRequired, ElementTextContent } from '@rxap/xml-parser/decorators';
|
|
3
|
+
import { join } from 'path';
|
|
4
|
+
import { strings } from '@angular-devkit/core';
|
|
5
|
+
import { CoerceSuffix } from '@rxap/schematics-utilities';
|
|
6
|
+
import { CoerceMethodClass, CoerceSourceFile } from '@rxap/schematics-ts-morph';
|
|
7
|
+
import { TypeElement } from '../type.element';
|
|
8
|
+
const { dasherize, classify, camelize } = strings;
|
|
12
9
|
let MethodElement = class MethodElement {
|
|
13
10
|
toValue({ sourceFile, project }) {
|
|
14
11
|
if (this.from) {
|
|
@@ -19,39 +16,39 @@ let MethodElement = class MethodElement {
|
|
|
19
16
|
return this.name;
|
|
20
17
|
}
|
|
21
18
|
else {
|
|
22
|
-
const methodName =
|
|
23
|
-
const methodFilePath =
|
|
24
|
-
const methodSourceFile =
|
|
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);
|
|
25
22
|
const methodOptions = {
|
|
26
23
|
statements: [`console.log('${dasherize(methodName)}', parameters);`],
|
|
27
24
|
};
|
|
28
25
|
if (this.parameterType) {
|
|
29
26
|
methodOptions.parameterType = this.parameterType.toValue({ sourceFile: methodSourceFile });
|
|
30
27
|
}
|
|
31
|
-
|
|
28
|
+
CoerceMethodClass(methodSourceFile, methodName, methodOptions);
|
|
32
29
|
return methodName;
|
|
33
30
|
}
|
|
34
31
|
}
|
|
35
32
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
__decorate([
|
|
34
|
+
ElementTextContent(),
|
|
35
|
+
ElementRequired(),
|
|
36
|
+
__metadata("design:type", String)
|
|
40
37
|
], MethodElement.prototype, "name", void 0);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
__decorate([
|
|
39
|
+
ElementAttribute(),
|
|
40
|
+
__metadata("design:type", String)
|
|
44
41
|
], MethodElement.prototype, "from", void 0);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
__decorate([
|
|
43
|
+
ElementAttribute(),
|
|
44
|
+
__metadata("design:type", Boolean)
|
|
48
45
|
], MethodElement.prototype, "mock", void 0);
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
__decorate([
|
|
47
|
+
ElementChild(TypeElement),
|
|
48
|
+
__metadata("design:type", TypeElement)
|
|
52
49
|
], MethodElement.prototype, "parameterType", void 0);
|
|
53
|
-
MethodElement =
|
|
54
|
-
|
|
50
|
+
MethodElement = __decorate([
|
|
51
|
+
ElementDef('method')
|
|
55
52
|
], MethodElement);
|
|
56
|
-
|
|
53
|
+
export { MethodElement };
|
|
57
54
|
//# sourceMappingURL=method.element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method.element.js","sourceRoot":"","sources":["../../../../../../../libs/xml-parser/src/lib/elements/methods/method.element.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"method.element.js","sourceRoot":"","sources":["../../../../../../../libs/xml-parser/src/lib/elements/methods/method.element.ts"],"names":[],"mappings":";AACA,OAAO,EACL,gBAAgB,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G,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAC,CAAC;aAC5F;YACD,iBAAiB,CAAC,gBAAgB,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;YAC/D,OAAO,UAAU,CAAC;SACnB;IACH,CAAC;CAEF,CAAA;AAjCC;IAFC,kBAAkB,EAAE;IACpB,eAAe,EAAE;;2CACG;AAGrB;IADC,gBAAgB,EAAE;;2CACE;AAGrB;IADC,gBAAgB,EAAE;;2CACG;AAGtB;IADC,YAAY,CAAC,WAAW,CAAC;8BACH,WAAW;oDAAA;AAbvB,aAAa;IADzB,UAAU,CAAC,QAAQ,CAAC;GACR,aAAa,CAqCzB;SArCY,aAAa"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.Methods = [
|
|
7
|
-
method_element_1.MethodElement,
|
|
8
|
-
open_api_remote_method_element_1.OpenApiRemoteMethodElement
|
|
1
|
+
import { MethodElement } from './method.element';
|
|
2
|
+
import { OpenApiRemoteMethodElement } from './open-api-remote-method.element';
|
|
3
|
+
export const Methods = [
|
|
4
|
+
MethodElement,
|
|
5
|
+
OpenApiRemoteMethodElement
|
|
9
6
|
];
|
|
10
7
|
//# sourceMappingURL=methods.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../../../../../libs/xml-parser/src/lib/elements/methods/methods.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"methods.js","sourceRoot":"","sources":["../../../../../../../libs/xml-parser/src/lib/elements/methods/methods.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E,MAAM,CAAC,MAAM,OAAO,GAAsC;IACxD,aAAa;IACb,0BAA0B;CAC3B,CAAC"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const core_1 = require("@angular-devkit/core");
|
|
7
|
-
const method_element_1 = require("./method.element");
|
|
8
|
-
const { dasherize, classify, camelize } = core_1.strings;
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { ElementDef, ElementExtends, ElementRequired, ElementTextContent, ElementAttribute } from '@rxap/xml-parser/decorators';
|
|
3
|
+
import { strings } from '@angular-devkit/core';
|
|
4
|
+
import { MethodElement } from './method.element';
|
|
5
|
+
const { dasherize, classify, camelize } = strings;
|
|
9
6
|
let OpenApiRemoteMethodElement = class OpenApiRemoteMethodElement {
|
|
10
7
|
toValue({ sourceFile, options }) {
|
|
11
8
|
const openApiRemoteMethodName = classify(this.name) + 'RemoteMethod';
|
|
@@ -19,18 +16,18 @@ let OpenApiRemoteMethodElement = class OpenApiRemoteMethodElement {
|
|
|
19
16
|
return openApiRemoteMethodName;
|
|
20
17
|
}
|
|
21
18
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
__decorate([
|
|
20
|
+
ElementTextContent(),
|
|
21
|
+
ElementRequired(),
|
|
22
|
+
__metadata("design:type", String)
|
|
26
23
|
], OpenApiRemoteMethodElement.prototype, "name", void 0);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
__decorate([
|
|
25
|
+
ElementAttribute(),
|
|
26
|
+
__metadata("design:type", Boolean)
|
|
30
27
|
], OpenApiRemoteMethodElement.prototype, "mock", void 0);
|
|
31
|
-
OpenApiRemoteMethodElement =
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
OpenApiRemoteMethodElement = __decorate([
|
|
29
|
+
ElementExtends(MethodElement),
|
|
30
|
+
ElementDef('open-api-remote-method')
|
|
34
31
|
], OpenApiRemoteMethodElement);
|
|
35
|
-
|
|
32
|
+
export { OpenApiRemoteMethodElement };
|
|
36
33
|
//# sourceMappingURL=open-api-remote-method.element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-api-remote-method.element.js","sourceRoot":"","sources":["../../../../../../../libs/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":["../../../../../../../libs/xml-parser/src/lib/elements/methods/open-api-remote-method.element.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EACL,aAAa,EAEd,MAAM,kBAAkB,CAAC;AAE1B,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;AAIlD,IAAa,0BAA0B,GAAvC,MAAa,0BAA0B;IAS9B,OAAO,CAAC,EAAE,UAAU,EAAE,OAAO,EAAmE;QAErG,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,UAAU,CAAC,oBAAoB,CAAC;YAC9B,YAAY,EAAK,CAAE,uBAAuB,CAAE;YAC5C,eAAe,EAAE,GAAG,OAAO,CAAC,aAAa,mBAAmB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB;SACjG,CAAC,CAAC;QAEH,OAAO,uBAAuB,CAAC;IAEjC,CAAC;CAEF,CAAA;AAtBC;IAFC,kBAAkB,EAAE;IACpB,eAAe,EAAE;;wDACG;AAGrB;IADC,gBAAgB,EAAE;;wDACG;AAPX,0BAA0B;IAFtC,cAAc,CAAC,aAAa,CAAC;IAC7B,UAAU,CAAC,wBAAwB,CAAC;GACxB,0BAA0B,CA0BtC;SA1BY,0BAA0B"}
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
6
|
-
const decorators_1 = require("@rxap/xml-parser/decorators");
|
|
7
|
-
const schematics_ts_morph_1 = require("@rxap/schematics-ts-morph");
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { noop } from '@angular-devkit/schematics';
|
|
3
|
+
import { ElementDef, ElementChildTextContent, ElementRequired } from '@rxap/xml-parser/decorators';
|
|
4
|
+
import { AddNgModuleImport } from '@rxap/schematics-ts-morph';
|
|
8
5
|
let ModuleElement = class ModuleElement {
|
|
9
6
|
handleComponentModule({ sourceFile, project, options }) {
|
|
10
|
-
|
|
7
|
+
AddNgModuleImport(sourceFile, this.name, this.form);
|
|
11
8
|
}
|
|
12
9
|
toValue({ project, options }) {
|
|
13
|
-
return
|
|
10
|
+
return noop();
|
|
14
11
|
}
|
|
15
12
|
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
__decorate([
|
|
14
|
+
ElementChildTextContent(),
|
|
15
|
+
ElementRequired(),
|
|
16
|
+
__metadata("design:type", String)
|
|
20
17
|
], ModuleElement.prototype, "name", void 0);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
__decorate([
|
|
19
|
+
ElementChildTextContent(),
|
|
20
|
+
__metadata("design:type", String)
|
|
24
21
|
], ModuleElement.prototype, "form", void 0);
|
|
25
|
-
ModuleElement =
|
|
26
|
-
|
|
22
|
+
ModuleElement = __decorate([
|
|
23
|
+
ElementDef('module')
|
|
27
24
|
], ModuleElement);
|
|
28
|
-
|
|
25
|
+
export { ModuleElement };
|
|
29
26
|
//# sourceMappingURL=module.element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.element.js","sourceRoot":"","sources":["../../../../../../libs/xml-parser/src/lib/elements/module.element.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module.element.js","sourceRoot":"","sources":["../../../../../../libs/xml-parser/src/lib/elements/module.element.ts"],"names":[],"mappings":";AACA,OAAO,EAAQ,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAGnC,IAAa,aAAa,GAA1B,MAAa,aAAa;IASjB,qBAAqB,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAA+C;QACxG,iBAAiB,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;IAEM,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,EAAkB;QACjD,OAAO,IAAI,EAAE,CAAC;IAChB,CAAC;CAEF,CAAA;AAbC;IAFC,uBAAuB,EAAE;IACzB,eAAe,EAAE;;2CACG;AAGrB;IADC,uBAAuB,EAAE;;2CACL;AAPV,aAAa;IADzB,UAAU,CAAC,QAAQ,CAAC;GACR,aAAa,CAiBzB;SAjBY,aAAa"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.StringTypeElement = exports.TypeElement = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const decorators_1 = require("@rxap/xml-parser/decorators");
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { ElementAttribute, ElementChildTextContent, ElementDef, ElementExtends, ElementRequired } from '@rxap/xml-parser/decorators';
|
|
6
3
|
let TypeElement = class TypeElement {
|
|
7
4
|
get type() {
|
|
8
5
|
if (this.nullable) {
|
|
@@ -20,32 +17,32 @@ let TypeElement = class TypeElement {
|
|
|
20
17
|
return this.type;
|
|
21
18
|
}
|
|
22
19
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
__decorate([
|
|
21
|
+
ElementChildTextContent(),
|
|
22
|
+
ElementRequired(),
|
|
23
|
+
__metadata("design:type", String)
|
|
27
24
|
], TypeElement.prototype, "name", void 0);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
__decorate([
|
|
26
|
+
ElementChildTextContent(),
|
|
27
|
+
__metadata("design:type", String)
|
|
31
28
|
], TypeElement.prototype, "from", void 0);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
__decorate([
|
|
30
|
+
ElementAttribute(),
|
|
31
|
+
__metadata("design:type", Boolean)
|
|
35
32
|
], TypeElement.prototype, "nullable", void 0);
|
|
36
|
-
TypeElement =
|
|
37
|
-
|
|
33
|
+
TypeElement = __decorate([
|
|
34
|
+
ElementDef('type')
|
|
38
35
|
], TypeElement);
|
|
39
|
-
|
|
36
|
+
export { TypeElement };
|
|
40
37
|
let StringTypeElement = class StringTypeElement extends TypeElement {
|
|
41
38
|
constructor() {
|
|
42
39
|
super(...arguments);
|
|
43
40
|
this.name = 'string';
|
|
44
41
|
}
|
|
45
42
|
};
|
|
46
|
-
StringTypeElement =
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
StringTypeElement = __decorate([
|
|
44
|
+
ElementExtends(TypeElement),
|
|
45
|
+
ElementDef('string-type')
|
|
49
46
|
], StringTypeElement);
|
|
50
|
-
|
|
47
|
+
export { StringTypeElement };
|
|
51
48
|
//# sourceMappingURL=type.element.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.element.js","sourceRoot":"","sources":["../../../../../../libs/xml-parser/src/lib/elements/type.element.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"type.element.js","sourceRoot":"","sources":["../../../../../../libs/xml-parser/src/lib/elements/type.element.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,UAAU,EACV,cAAc,EACd,eAAe,EAChB,MAAM,6BAA6B,CAAC;AAKrC,IAAa,WAAW,GAAxB,MAAa,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,UAAU,CAAC,oBAAoB,CAAC;gBAC9B,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;AAzBC;IAFC,uBAAuB,EAAE;IACzB,eAAe,EAAE;;yCACG;AAGrB;IADC,uBAAuB,EAAE;;yCACL;AAGrB;IADC,gBAAgB,EAAE;;6CACO;AAVf,WAAW;IADvB,UAAU,CAAC,MAAM,CAAC;GACN,WAAW,CA6BvB;SA7BY,WAAW;AAiCxB,IAAa,iBAAiB,GAA9B,MAAa,iBAAkB,SAAQ,WAAW;IAAlD;;QAES,SAAI,GAAG,QAAQ,CAAC;IAEzB,CAAC;CAAA,CAAA;AAJY,iBAAiB;IAF7B,cAAc,CAAC,WAAW,CAAC;IAC3B,UAAU,CAAC,aAAa,CAAC;GACb,iBAAiB,CAI7B;SAJY,iBAAiB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ParsedElement } from '@rxap/xml-parser';
|
|
2
|
-
import { Constructor } from '@rxap/utilities';
|
|
2
|
+
import { Constructor } from '@rxap/schematics-utilities';
|
|
3
3
|
import { DirEntry, Tree } from '@angular-devkit/schematics';
|
|
4
4
|
export declare function FindTemplate(template: string, host: Tree, basePath: string | undefined, baseDirEntry?: DirEntry): string | null;
|
|
5
5
|
/**
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const utilities_1 = require("@rxap/utilities");
|
|
6
|
-
const path_1 = require("path");
|
|
7
|
-
function FindTemplate(template, host, basePath, baseDirEntry = host.getDir('templates')) {
|
|
1
|
+
import { XmlParserService } from '@rxap/xml-parser';
|
|
2
|
+
import { coerceArray } from '@rxap/schematics-utilities';
|
|
3
|
+
import { join } from 'path';
|
|
4
|
+
export function FindTemplate(template, host, basePath, baseDirEntry = host.getDir('templates')) {
|
|
8
5
|
if (basePath) {
|
|
9
|
-
const path =
|
|
6
|
+
const path = join(baseDirEntry.path, basePath, template);
|
|
10
7
|
if (host.exists(path)) {
|
|
11
8
|
return path;
|
|
12
9
|
}
|
|
@@ -15,7 +12,7 @@ function FindTemplate(template, host, basePath, baseDirEntry = host.getDir('temp
|
|
|
15
12
|
}
|
|
16
13
|
}
|
|
17
14
|
else {
|
|
18
|
-
const path =
|
|
15
|
+
const path = join(baseDirEntry.path, template);
|
|
19
16
|
if (host.exists(path)) {
|
|
20
17
|
return path;
|
|
21
18
|
}
|
|
@@ -24,7 +21,7 @@ function FindTemplate(template, host, basePath, baseDirEntry = host.getDir('temp
|
|
|
24
21
|
}
|
|
25
22
|
}
|
|
26
23
|
{
|
|
27
|
-
const path =
|
|
24
|
+
const path = join(baseDirEntry.path, 'shared', template);
|
|
28
25
|
if (host.exists(path)) {
|
|
29
26
|
return path;
|
|
30
27
|
}
|
|
@@ -34,7 +31,6 @@ function FindTemplate(template, host, basePath, baseDirEntry = host.getDir('temp
|
|
|
34
31
|
}
|
|
35
32
|
return null;
|
|
36
33
|
}
|
|
37
|
-
exports.FindTemplate = FindTemplate;
|
|
38
34
|
/**
|
|
39
35
|
* Parse the template and returns the ParsedElement object
|
|
40
36
|
*
|
|
@@ -71,11 +67,11 @@ exports.FindTemplate = FindTemplate;
|
|
|
71
67
|
* @param basePath the basePath for the search
|
|
72
68
|
* @param elements a collection of ParsedElement class constructors that should be include in the xml parsing
|
|
73
69
|
*/
|
|
74
|
-
function ParseTemplate(host, template, basePath, ...elements) {
|
|
70
|
+
export function ParseTemplate(host, template, basePath, ...elements) {
|
|
75
71
|
let templateFile;
|
|
76
72
|
let filename = '__inline__';
|
|
77
73
|
let templateFilePath = template;
|
|
78
|
-
const basePathList =
|
|
74
|
+
const basePathList = coerceArray(basePath);
|
|
79
75
|
if (template.match(/\.xml$/)) {
|
|
80
76
|
if (!host.exists(template)) {
|
|
81
77
|
for (const bp of basePathList) {
|
|
@@ -104,12 +100,11 @@ function ParseTemplate(host, template, basePath, ...elements) {
|
|
|
104
100
|
else {
|
|
105
101
|
templateFile = template;
|
|
106
102
|
}
|
|
107
|
-
const parser = new
|
|
103
|
+
const parser = new XmlParserService();
|
|
108
104
|
parser.register(...elements);
|
|
109
105
|
if (!templateFile) {
|
|
110
106
|
throw new Error('The template for the xml parser is not defined');
|
|
111
107
|
}
|
|
112
108
|
return parser.parseFromXml(templateFile, filename, templateFilePath);
|
|
113
109
|
}
|
|
114
|
-
exports.ParseTemplate = ParseTemplate;
|
|
115
110
|
//# sourceMappingURL=parse-template.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-template.js","sourceRoot":"","sources":["../../../../../libs/xml-parser/src/lib/parse-template.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse-template.js","sourceRoot":"","sources":["../../../../../libs/xml-parser/src/lib/parse-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAe,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,MAAM,UAAU,YAAY,CAAC,Q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