@rxap/schematics-xml-parser 16.0.0-dev.9 → 16.0.1-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +61 -0
- package/README.md +1 -1
- package/package.json +49 -43
- package/src/lib/parse-template.d.ts +4 -3
- package/src/lib/parse-template.js +4 -3
- package/src/lib/parse-template.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,67 @@
|
|
|
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.1-dev.0](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@16.0.0...@rxap/schematics-xml-parser@16.0.1-dev.0) (2024-03-05)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rxap/schematics-xml-parser
|
|
9
|
+
|
|
10
|
+
# [16.0.0](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@16.0.0-dev.18...@rxap/schematics-xml-parser@16.0.0) (2024-02-07)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @rxap/schematics-xml-parser
|
|
13
|
+
|
|
14
|
+
# [16.0.0-dev.18](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@16.0.0-dev.5...@rxap/schematics-xml-parser@16.0.0-dev.18) (2023-10-11)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
- add licence file to publishable packages ([d7de1cb](https://gitlab.com/rxap/packages/commit/d7de1cb9db1bd1628f37084e3b0ffd1755aa75f6))
|
|
19
|
+
- change from commonjs to es2022 ([cf675a7](https://gitlab.com/rxap/packages/commit/cf675a7254de9ce4b269264df59794dd42fcbd8b))
|
|
20
|
+
- compile package in commonjs format ([48a60d4](https://gitlab.com/rxap/packages/commit/48a60d4726a479f01b74746df570154237c90abb))
|
|
21
|
+
- ensure the project name is not included in the project tag list ([46d4479](https://gitlab.com/rxap/packages/commit/46d44798258ea1b20df9d4408b9c0809f55027b2))
|
|
22
|
+
- generate readme with peer dependencies to install ([27c2cd7](https://gitlab.com/rxap/packages/commit/27c2cd7d98f0c8a499b8c30719f49d69e4970ae9))
|
|
23
|
+
- peer dependency issue ([ee95415](https://gitlab.com/rxap/packages/commit/ee95415370d9ef2396916d6c25061a0df791034a))
|
|
24
|
+
|
|
25
|
+
### Reverts
|
|
26
|
+
|
|
27
|
+
- change from commonjs to es2022 ([50eca61](https://gitlab.com/rxap/packages/commit/50eca61e9a89388d1cfeefb8b1029b302b6f307e))
|
|
28
|
+
|
|
29
|
+
# [16.0.0-dev.17](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@16.0.0-dev.16...@rxap/schematics-xml-parser@16.0.0-dev.17) (2023-10-09)
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
- compile package in commonjs format ([3b4f38c](https://gitlab.com/rxap/packages/commit/3b4f38cd758b780fd2ec7c943d441bc42e2860f8))
|
|
34
|
+
|
|
35
|
+
# [16.0.0-dev.16](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@16.0.0-dev.15...@rxap/schematics-xml-parser@16.0.0-dev.16) (2023-09-27)
|
|
36
|
+
|
|
37
|
+
**Note:** Version bump only for package @rxap/schematics-xml-parser
|
|
38
|
+
|
|
39
|
+
# [16.0.0-dev.15](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@16.0.0-dev.14...@rxap/schematics-xml-parser@16.0.0-dev.15) (2023-09-12)
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
- peer dependency issue ([e67e2b8](https://gitlab.com/rxap/packages/commit/e67e2b8eb884b598536d16c2c544a9ad9be5b53e))
|
|
44
|
+
|
|
45
|
+
# [16.0.0-dev.14](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@16.0.0-dev.13...@rxap/schematics-xml-parser@16.0.0-dev.14) (2023-09-12)
|
|
46
|
+
|
|
47
|
+
**Note:** Version bump only for package @rxap/schematics-xml-parser
|
|
48
|
+
|
|
49
|
+
# [16.0.0-dev.13](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@16.0.0-dev.12...@rxap/schematics-xml-parser@16.0.0-dev.13) (2023-09-07)
|
|
50
|
+
|
|
51
|
+
**Note:** Version bump only for package @rxap/schematics-xml-parser
|
|
52
|
+
|
|
53
|
+
# [16.0.0-dev.12](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@16.0.0-dev.11...@rxap/schematics-xml-parser@16.0.0-dev.12) (2023-09-03)
|
|
54
|
+
|
|
55
|
+
**Note:** Version bump only for package @rxap/schematics-xml-parser
|
|
56
|
+
|
|
57
|
+
# [16.0.0-dev.11](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@16.0.0-dev.10...@rxap/schematics-xml-parser@16.0.0-dev.11) (2023-09-03)
|
|
58
|
+
|
|
59
|
+
**Note:** Version bump only for package @rxap/schematics-xml-parser
|
|
60
|
+
|
|
61
|
+
# [16.0.0-dev.10](https://gitlab.com/rxap/packages/compare/@rxap/schematics-xml-parser@16.0.0-dev.9...@rxap/schematics-xml-parser@16.0.0-dev.10) (2023-08-31)
|
|
62
|
+
|
|
63
|
+
### Bug Fixes
|
|
64
|
+
|
|
65
|
+
- ensure the project name is not included in the project tag list ([b131ac3](https://gitlab.com/rxap/packages/commit/b131ac3bd92b3b8799d62f15bbd30a1997d7c753))
|
|
66
|
+
|
|
6
67
|
# [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
68
|
|
|
8
69
|
### Reverts
|
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
|
|
20
|
+
yarn add @angular-devkit/core@^16.1.4 @angular-devkit/schematics@^16.1.4 @rxap/schematics-ts-morph@^16.0.0 @rxap/schematics-utilities@^16.0.0 @rxap/xml-parser@^16.0.0 ts-morph@^18.0.0 tslib@2.6.2
|
|
21
21
|
```
|
package/package.json
CHANGED
|
@@ -1,73 +1,79 @@
|
|
|
1
1
|
{
|
|
2
|
+
"version": "16.0.1-dev.0",
|
|
2
3
|
"name": "@rxap/schematics-xml-parser",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
4
|
+
"license": "GPL-3.0-or-later",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"colors": "1.4.0",
|
|
7
|
+
"handlebars": "4.7.7",
|
|
8
|
+
"ignore": "5.2.4",
|
|
9
|
+
"process": "0.11.10",
|
|
10
|
+
"reflect-metadata": "0.1.13",
|
|
11
|
+
"semver": "7.5.3",
|
|
12
|
+
"tslib": "2.6.2",
|
|
13
|
+
"xmldom": "0.6.0",
|
|
14
|
+
"yaml": "2.3.1"
|
|
15
|
+
},
|
|
5
16
|
"peerDependencies": {
|
|
6
17
|
"@angular-devkit/core": "^16.1.4",
|
|
7
18
|
"@angular-devkit/schematics": "^16.1.4",
|
|
8
|
-
"@rxap/schematics-ts-morph": "^16.0.0
|
|
9
|
-
"@rxap/schematics-utilities": "^16.0.0
|
|
10
|
-
"@rxap/xml-parser": "^16.0.0
|
|
19
|
+
"@rxap/schematics-ts-morph": "^16.0.0",
|
|
20
|
+
"@rxap/schematics-utilities": "^16.0.0",
|
|
21
|
+
"@rxap/xml-parser": "^16.0.0",
|
|
11
22
|
"ts-morph": "^18.0.0",
|
|
12
|
-
"
|
|
13
|
-
"@rxap/
|
|
14
|
-
"@rxap/
|
|
15
|
-
"@rxap/
|
|
16
|
-
"@rxap/
|
|
17
|
-
"@rxap/
|
|
18
|
-
"@
|
|
19
|
-
"
|
|
23
|
+
"tslib": "2.6.2",
|
|
24
|
+
"@rxap/mixin": "16.0.1-dev.0",
|
|
25
|
+
"@rxap/node-utilities": "1.1.1-dev.1",
|
|
26
|
+
"@rxap/reflect-metadata": "1.0.2-dev.0",
|
|
27
|
+
"@rxap/ts-morph": "1.1.0-dev.11",
|
|
28
|
+
"@rxap/utilities": "16.1.0-dev.6",
|
|
29
|
+
"@rxap/workspace-ts-morph": "16.0.2-dev.1",
|
|
30
|
+
"@rxap/workspace-utilities": "16.0.2-dev.0",
|
|
31
|
+
"util": "0.12.5"
|
|
20
32
|
},
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"reflect-metadata": "^0.1.13",
|
|
25
|
-
"semver": "^7.3.5",
|
|
26
|
-
"tslib": "2.5.3",
|
|
27
|
-
"xmldom": "0.6.0"
|
|
33
|
+
"author": {
|
|
34
|
+
"name": "Merzough Münker",
|
|
35
|
+
"email": "mmuenker@digitaix.com"
|
|
28
36
|
},
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://gitlab.com/rxap/packages/-/issues",
|
|
39
|
+
"email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
|
|
32
40
|
},
|
|
41
|
+
"homepage": "https:/gitlab.com/rxap/packages/packages/schematic/xml-parser",
|
|
33
42
|
"keywords": [
|
|
34
|
-
"rxap",
|
|
35
43
|
"packages",
|
|
44
|
+
"rxap",
|
|
36
45
|
"schematic",
|
|
46
|
+
"schematic-xml-parser",
|
|
47
|
+
"scope:utilities",
|
|
37
48
|
"xml-parser"
|
|
38
49
|
],
|
|
39
|
-
"homepage": "https:/gitlab.com/rxap/packages/packages/schematic/xml-parser",
|
|
40
|
-
"bugs": {
|
|
41
|
-
"url": "https://gitlab.com/rxap/packages/-/issues",
|
|
42
|
-
"email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
|
|
43
|
-
},
|
|
44
|
-
"license": "GPL-3.0-or-later",
|
|
45
|
-
"repository": {
|
|
46
|
-
"type": "git",
|
|
47
|
-
"url": "https://gitlab.com/rxap/packages.git",
|
|
48
|
-
"directory": "packages/schematic/xml-parser"
|
|
49
|
-
},
|
|
50
|
-
"author": {
|
|
51
|
-
"name": "Merzough Münker",
|
|
52
|
-
"email": "mmuenker@digitaix.com"
|
|
53
|
-
},
|
|
54
50
|
"nx-migrations": {
|
|
55
51
|
"packageGroup": [
|
|
56
52
|
{
|
|
57
53
|
"package": "@rxap/schematics-ts-morph",
|
|
58
|
-
"version": "16.0.0
|
|
54
|
+
"version": "16.0.0"
|
|
59
55
|
},
|
|
60
56
|
{
|
|
61
57
|
"package": "@rxap/schematics-utilities",
|
|
62
|
-
"version": "16.0.0
|
|
58
|
+
"version": "16.0.0"
|
|
63
59
|
},
|
|
64
60
|
{
|
|
65
61
|
"package": "@rxap/xml-parser",
|
|
66
|
-
"version": "16.0.0
|
|
62
|
+
"version": "16.0.0"
|
|
67
63
|
}
|
|
68
64
|
]
|
|
69
65
|
},
|
|
70
|
-
"
|
|
66
|
+
"publishConfig": {
|
|
67
|
+
"access": "public",
|
|
68
|
+
"directory": "../../../dist/packages/schematic/xml-parser"
|
|
69
|
+
},
|
|
70
|
+
"repository": {
|
|
71
|
+
"type": "git",
|
|
72
|
+
"url": "https://gitlab.com/rxap/packages.git",
|
|
73
|
+
"directory": "packages/schematic/xml-parser"
|
|
74
|
+
},
|
|
75
|
+
"type": "commonjs",
|
|
76
|
+
"gitHead": "b07c3a57f82485e8f0680fd2ba4d06e635aa1b4f",
|
|
71
77
|
"main": "./src/index.js",
|
|
72
78
|
"types": "./src/index.d.ts"
|
|
73
79
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParsedElement } from '@rxap/xml-parser';
|
|
2
|
-
import { Constructor } from '@rxap/schematics-utilities';
|
|
3
1
|
import { DirEntry, Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import { Constructor } from '@rxap/schematics-utilities';
|
|
3
|
+
import { ParsedElement } from '@rxap/xml-parser';
|
|
4
4
|
export declare function FindTemplate(template: string, host: Tree, basePath: string | undefined, baseDirEntry?: DirEntry): string | null;
|
|
5
5
|
/**
|
|
6
6
|
* Parse the template and returns the ParsedElement object
|
|
@@ -33,9 +33,10 @@ export declare function FindTemplate(template: string, host: Tree, basePath: str
|
|
|
33
33
|
* - templates/feature/product/views/tables/product.xml
|
|
34
34
|
* - templates/shared/views/tables/product.xml
|
|
35
35
|
*
|
|
36
|
+
* @param DOMParser
|
|
36
37
|
* @param host a schematic Tree instance
|
|
37
38
|
* @param template the path to the template xml document or a xml document
|
|
38
39
|
* @param basePath the basePath for the search
|
|
39
40
|
* @param elements a collection of ParsedElement class constructors that should be include in the xml parsing
|
|
40
41
|
*/
|
|
41
|
-
export declare function ParseTemplate<T extends ParsedElement>(host: Tree, template: string, basePath: string | string[] | undefined, ...elements: Array<Constructor<ParsedElement>>): T;
|
|
42
|
+
export declare function ParseTemplate<T extends ParsedElement>(DOMParser: typeof window.DOMParser, host: Tree, template: string, basePath: string | string[] | undefined, ...elements: Array<Constructor<ParsedElement>>): T;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ParseTemplate = exports.FindTemplate = void 0;
|
|
4
|
-
const xml_parser_1 = require("@rxap/xml-parser");
|
|
5
4
|
const schematics_utilities_1 = require("@rxap/schematics-utilities");
|
|
5
|
+
const xml_parser_1 = require("@rxap/xml-parser");
|
|
6
6
|
const path_1 = require("path");
|
|
7
7
|
function FindTemplate(template, host, basePath, baseDirEntry = host.getDir('templates')) {
|
|
8
8
|
if (basePath) {
|
|
@@ -66,12 +66,13 @@ exports.FindTemplate = FindTemplate;
|
|
|
66
66
|
* - templates/feature/product/views/tables/product.xml
|
|
67
67
|
* - templates/shared/views/tables/product.xml
|
|
68
68
|
*
|
|
69
|
+
* @param DOMParser
|
|
69
70
|
* @param host a schematic Tree instance
|
|
70
71
|
* @param template the path to the template xml document or a xml document
|
|
71
72
|
* @param basePath the basePath for the search
|
|
72
73
|
* @param elements a collection of ParsedElement class constructors that should be include in the xml parsing
|
|
73
74
|
*/
|
|
74
|
-
function ParseTemplate(host, template, basePath, ...elements) {
|
|
75
|
+
function ParseTemplate(DOMParser, host, template, basePath, ...elements) {
|
|
75
76
|
let templateFile;
|
|
76
77
|
let filename = '__inline__';
|
|
77
78
|
let templateFilePath = template;
|
|
@@ -104,7 +105,7 @@ function ParseTemplate(host, template, basePath, ...elements) {
|
|
|
104
105
|
else {
|
|
105
106
|
templateFile = template;
|
|
106
107
|
}
|
|
107
|
-
const parser = new xml_parser_1.XmlParserService();
|
|
108
|
+
const parser = new xml_parser_1.XmlParserService(DOMParser);
|
|
108
109
|
parser.register(...elements);
|
|
109
110
|
if (!templateFile) {
|
|
110
111
|
throw new Error('The template for the xml parser is not defined');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-template.js","sourceRoot":"","sources":["../../../../../../packages/schematic/xml-parser/src/lib/parse-template.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"parse-template.js","sourceRoot":"","sources":["../../../../../../packages/schematic/xml-parser/src/lib/parse-template.ts"],"names":[],"mappings":";;;AAIA,qEAGoC;AACpC,iDAG0B;AAC1B,+BAA4B;AAE5B,SAAgB,YAAY,CAC1B,QAAgB,EAChB,IAAU,EACV,QAA4B,EAC5B,eAAyB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;IAGjD,IAAI,QAAQ,EAAE;QACZ,MAAM,IAAI,GAAG,IAAA,WAAI,EAAC,YAAY,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACzD,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;YACrB,OAAO,IAAI,CAAC;SACb;aAAM;YACL,OAAO,CAAC,IA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