xml-model 0.1.2 → 0.2.2
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/build/main/defaults/index.js +22 -16
- package/build/main/defaults/models.js +4 -4
- package/build/main/errors.d.ts +4 -0
- package/build/main/errors.js +35 -0
- package/build/main/middleware.js +11 -11
- package/build/main/model/index.d.ts +7 -9
- package/build/main/model/index.js +88 -67
- package/build/main/model/property.js +16 -14
- package/build/main/model/types.d.ts +5 -1
- package/build/main/model/types.js +86 -70
- package/build/main/types.d.ts +10 -2
- package/build/main/types.js +34 -1
- package/build/{module/xml.d.ts → main/xml/index.d.ts} +5 -4
- package/build/main/{xml.js → xml/index.js} +29 -19
- package/build/main/xml/xml-js.d.ts +9 -0
- package/build/main/xml/xml-js.js +26 -0
- package/build/module/defaults/index.js +24 -17
- package/build/module/defaults/models.js +6 -10
- package/build/module/errors.d.ts +4 -0
- package/build/module/errors.js +31 -0
- package/build/module/middleware.js +11 -11
- package/build/module/model/index.d.ts +7 -9
- package/build/module/model/index.js +97 -74
- package/build/module/model/property.js +18 -16
- package/build/module/model/types.d.ts +5 -1
- package/build/module/model/types.js +88 -72
- package/build/module/types.d.ts +10 -2
- package/build/module/types.js +33 -2
- package/build/{main/xml.d.ts → module/xml/index.d.ts} +5 -4
- package/build/module/{xml.js → xml/index.js} +26 -18
- package/build/module/xml/xml-js.d.ts +9 -0
- package/build/module/xml/xml-js.js +24 -0
- package/package.json +2 -2
- package/build/main/model.spec.d.ts +0 -1
- package/build/main/model.spec.js +0 -261
- package/build/module/model.spec.d.ts +0 -1
- package/build/module/model.spec.js +0 -259
|
@@ -13,48 +13,49 @@ const __RΦ = { m: (k, v) => (t, ...a) => t && Reflect.metadata ? Reflect.metada
|
|
|
13
13
|
__RΦ.t[id] = t = l;
|
|
14
14
|
}
|
|
15
15
|
return t;
|
|
16
|
-
}, t: { [
|
|
16
|
+
}, t: { [1368]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(212), p: [__RΦ.a(1339)] }) }, [212]: { TΦ: "5", name: "XMLModelPropertyOptions" }, [1339]: { LΦ: t => Object }, [1372]: { LΦ: t => Object }, [491]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(212), p: [__RΦ.a(373)] }) }, [373]: { LΦ: t => Object }, [105]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(103) }) }, [103]: { LΦ: t => LΦ_0.IΦXMLElement }, [494]: { LΦ: t => Object }, [495]: { LΦ: t => LΦ_1.ReflectedProperty }, [13]: { LΦ: t => String }, [20]: { LΦ: t => Boolean }, [503]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(500), p: [__RΦ.a(1)] }) }, [500]: { LΦ: t => LΦ_2.XMLModel }, [1]: { RΦ: t => ({ TΦ: "~" }) }, [355]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(20), p: [{ n: "element", t: () => __RΦ.a(103), v: null }, { n: "context", t: () => __RΦ.a(397), v: null }], f: "" }) }, [397]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(398), p: [__RΦ.a(375), __RΦ.a(376)] }) }, [398]: { LΦ: t => Object }, [375]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(372), p: [__RΦ.a(213)] }) }, [372]: { TΦ: "5", name: "PropertyFromXMLContext" }, [213]: { LΦ: t => Object }, [376]: { LΦ: t => "elements" }, [1219]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(105), p: [{ n: "context", t: () => __RΦ.a(397), v: null }], f: "" }) }, [1221]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(1334), p: [{ n: "context", t: () => __RΦ.a(375), v: null }], f: "" }) }, [1334]: { LΦ: t => Object }, [1223]: { RΦ: t => ({ TΦ: "F", r: __RΦ.a(109), p: [{ n: "context", t: () => __RΦ.a(1341), v: null }], f: "" }) }, [109]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(105) }] }) }, [1341]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1338), p: [__RΦ.a(213)] }) }, [1338]: { TΦ: "5", name: "PropertyToXMLContext" }, [1382]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(13), __RΦ.a(74), __RΦ.a(1381)] }) }, [74]: { LΦ: t => RegExp }, [1381]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [4]: { RΦ: t => ({ TΦ: "~" }) }, [1275]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [1344]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [1297]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [504]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(10), __RΦ.a(503)] }) }, [10]: { RΦ: t => ({ TΦ: "u" }) }, [608]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(12), __RΦ.a(600)] }) }, [12]: { RΦ: t => ({ TΦ: "n" }) }, [600]: { TΦ: "5", name: "ConversionOptions" }, [611]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(610) }) }, [610]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [654]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(655), p: [__RΦ.a(379)] }) }, [655]: { LΦ: t => Object }, [379]: { LΦ: t => Object }, [517]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(500), p: [__RΦ.a(379)] }) }, [859]: { LΦ: t => Object }, [886]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(887), p: [__RΦ.a(859)] }) }, [887]: { LΦ: t => Object }, [924]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(500), p: [__RΦ.a(859)] }) }, [526]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(500), p: [__RΦ.a(521)] }) }, [521]: { LΦ: t => Object }, [658]: { RΦ: t => ({ TΦ: "O", m: [{ n: "fromXML", f: "", t: __RΦ.a(665) }, { n: "toXML", f: "", t: __RΦ.a(896) }, { n: "options", f: "", t: __RΦ.a(1072) }] }) }, [665]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(600), p: [__RΦ.a(661), __RΦ.a(663)] }) }, [661]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(662), p: [__RΦ.a(604), __RΦ.a(382)] }) }, [662]: { LΦ: t => Object }, [604]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(378), p: [__RΦ.a(521)] }) }, [378]: { TΦ: "5", name: "fromXMLContext" }, [382]: { LΦ: t => "properties" }, [663]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(664), p: [__RΦ.a(521)] }) }, [664]: { LΦ: t => Object }, [896]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(600), p: [__RΦ.a(892), __RΦ.a(894)] }) }, [892]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(893), p: [__RΦ.a(861), __RΦ.a(382)] }) }, [893]: { LΦ: t => Object }, [861]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(858), p: [__RΦ.a(521)] }) }, [858]: { TΦ: "5", name: "toXMLContext" }, [894]: { RΦ: t => ({ TΦ: "m", t: __RΦ.a(895), p: [__RΦ.a(521)] }) }, [895]: { LΦ: t => Object }, [1072]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(1062), p: [__RΦ.a(1070), __RΦ.a(1071)] }) }, [1062]: { LΦ: t => Map }, [1070]: { LΦ: t => Object }, [1071]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(212), p: [__RΦ.a(521)] }) }, [605]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(600), p: [__RΦ.a(604), __RΦ.a(521)] }) }, [862]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(600), p: [__RΦ.a(861), __RΦ.a(109)] }) }, [1813]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(10), __RΦ.a(1812)] }) }, [1812]: { RΦ: t => ({ TΦ: "g", t: __RΦ.a(500), p: [__RΦ.a(1619)] }) }, [1619]: { LΦ: t => Object }, [1640]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) }, [1630]: { RΦ: t => ({ TΦ: "O", m: [{ n: "__call", f: "", t: __RΦ.a(4) }] }) } } };
|
|
17
17
|
var IΦPropertyToXMLContext = { name: "PropertyToXMLContext", prototype: {}, identity: Symbol("PropertyToXMLContext (interface)") };
|
|
18
18
|
export { IΦPropertyToXMLContext };
|
|
19
|
-
(t => __RΦ.t[
|
|
19
|
+
(t => __RΦ.t[1338] = t)(IΦPropertyToXMLContext);
|
|
20
20
|
__RΦ.m("rt:P", ["property", "value"])(IΦPropertyToXMLContext);
|
|
21
21
|
__RΦ.m("rt:m", [])(IΦPropertyToXMLContext);
|
|
22
22
|
__RΦ.m("rt:i", [() => IΦOmit])(IΦPropertyToXMLContext);
|
|
23
23
|
__RΦ.m("rt:f", "Ie")(IΦPropertyToXMLContext);
|
|
24
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
24
|
+
__RΦ.m("rt:t", () => __RΦ.a(1368))(IΦPropertyToXMLContext.prototype, "property");
|
|
25
25
|
__RΦ.m("rt:f", "P")(IΦPropertyToXMLContext.prototype, "property");
|
|
26
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
26
|
+
__RΦ.m("rt:t", () => __RΦ.a(1372))(IΦPropertyToXMLContext.prototype, "value");
|
|
27
27
|
__RΦ.m("rt:f", "P")(IΦPropertyToXMLContext.prototype, "value");
|
|
28
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
28
|
+
__RΦ.m("rt:t", () => __RΦ.a(1368))(IΦPropertyToXMLContext.prototype, "property");
|
|
29
29
|
__RΦ.m("rt:f", "P")(IΦPropertyToXMLContext.prototype, "property");
|
|
30
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
30
|
+
__RΦ.m("rt:t", () => __RΦ.a(1372))(IΦPropertyToXMLContext.prototype, "value");
|
|
31
31
|
__RΦ.m("rt:f", "P")(IΦPropertyToXMLContext.prototype, "value");
|
|
32
|
-
import * as LΦ_0 from "
|
|
32
|
+
import * as LΦ_0 from "../types";
|
|
33
33
|
var IΦPropertyFromXMLContext = { name: "PropertyFromXMLContext", prototype: {}, identity: Symbol("PropertyFromXMLContext (interface)") };
|
|
34
34
|
export { IΦPropertyFromXMLContext };
|
|
35
|
-
(t => __RΦ.t[
|
|
35
|
+
(t => __RΦ.t[372] = t)(IΦPropertyFromXMLContext);
|
|
36
36
|
__RΦ.m("rt:P", ["property", "elements"])(IΦPropertyFromXMLContext);
|
|
37
37
|
__RΦ.m("rt:m", [])(IΦPropertyFromXMLContext);
|
|
38
38
|
__RΦ.m("rt:i", [() => IΦOmit])(IΦPropertyFromXMLContext);
|
|
39
39
|
__RΦ.m("rt:f", "Ie")(IΦPropertyFromXMLContext);
|
|
40
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
40
|
+
__RΦ.m("rt:t", () => __RΦ.a(491))(IΦPropertyFromXMLContext.prototype, "property");
|
|
41
41
|
__RΦ.m("rt:f", "P")(IΦPropertyFromXMLContext.prototype, "property");
|
|
42
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
42
|
+
__RΦ.m("rt:t", () => __RΦ.a(105))(IΦPropertyFromXMLContext.prototype, "elements");
|
|
43
43
|
__RΦ.m("rt:f", "P")(IΦPropertyFromXMLContext.prototype, "elements");
|
|
44
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
44
|
+
__RΦ.m("rt:t", () => __RΦ.a(491))(IΦPropertyFromXMLContext.prototype, "property");
|
|
45
45
|
__RΦ.m("rt:f", "P")(IΦPropertyFromXMLContext.prototype, "property");
|
|
46
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
46
|
+
__RΦ.m("rt:t", () => __RΦ.a(105))(IΦPropertyFromXMLContext.prototype, "elements");
|
|
47
47
|
__RΦ.m("rt:f", "P")(IΦPropertyFromXMLContext.prototype, "elements");
|
|
48
48
|
import * as LΦ_1 from "typescript-rtti";
|
|
49
|
+
import * as LΦ_2 from "../model";
|
|
49
50
|
var IΦXMLModelPropertyOptions = { name: "XMLModelPropertyOptions", prototype: {}, identity: Symbol("XMLModelPropertyOptions (interface)") };
|
|
50
51
|
export { IΦXMLModelPropertyOptions };
|
|
51
|
-
(t => __RΦ.t[
|
|
52
|
-
__RΦ.m("rt:P", ["name", "reflected", "tagname", "ignored", "inline", "isSourceElement", "resolveElements", "fromXML", "toXML"])(IΦXMLModelPropertyOptions);
|
|
52
|
+
(t => __RΦ.t[212] = t)(IΦXMLModelPropertyOptions);
|
|
53
|
+
__RΦ.m("rt:P", ["name", "reflected", "tagname", "ignored", "inline", "model", "isSourceElement", "resolveElements", "fromXML", "toXML"])(IΦXMLModelPropertyOptions);
|
|
53
54
|
__RΦ.m("rt:m", [])(IΦXMLModelPropertyOptions);
|
|
54
55
|
__RΦ.m("rt:f", "Ie")(IΦXMLModelPropertyOptions);
|
|
55
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
56
|
+
__RΦ.m("rt:t", () => __RΦ.a(494))(IΦXMLModelPropertyOptions.prototype, "name");
|
|
56
57
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "name");
|
|
57
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
58
|
+
__RΦ.m("rt:t", () => __RΦ.a(495))(IΦXMLModelPropertyOptions.prototype, "reflected");
|
|
58
59
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "reflected");
|
|
59
60
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦXMLModelPropertyOptions.prototype, "tagname");
|
|
60
61
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "tagname");
|
|
@@ -62,17 +63,19 @@ __RΦ.m("rt:t", () => __RΦ.a(20))(IΦXMLModelPropertyOptions.prototype, "ignore
|
|
|
62
63
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "ignored");
|
|
63
64
|
__RΦ.m("rt:t", () => __RΦ.a(20))(IΦXMLModelPropertyOptions.prototype, "inline");
|
|
64
65
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "inline");
|
|
65
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
66
|
+
__RΦ.m("rt:t", () => __RΦ.a(503))(IΦXMLModelPropertyOptions.prototype, "model");
|
|
67
|
+
__RΦ.m("rt:f", "P?")(IΦXMLModelPropertyOptions.prototype, "model");
|
|
68
|
+
__RΦ.m("rt:t", () => __RΦ.a(355))(IΦXMLModelPropertyOptions.prototype, "isSourceElement");
|
|
66
69
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "isSourceElement");
|
|
67
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
70
|
+
__RΦ.m("rt:t", () => __RΦ.a(1219))(IΦXMLModelPropertyOptions.prototype, "resolveElements");
|
|
68
71
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "resolveElements");
|
|
69
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
72
|
+
__RΦ.m("rt:t", () => __RΦ.a(1221))(IΦXMLModelPropertyOptions.prototype, "fromXML");
|
|
70
73
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "fromXML");
|
|
71
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
74
|
+
__RΦ.m("rt:t", () => __RΦ.a(1223))(IΦXMLModelPropertyOptions.prototype, "toXML");
|
|
72
75
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "toXML");
|
|
73
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
76
|
+
__RΦ.m("rt:t", () => __RΦ.a(494))(IΦXMLModelPropertyOptions.prototype, "name");
|
|
74
77
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "name");
|
|
75
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
78
|
+
__RΦ.m("rt:t", () => __RΦ.a(495))(IΦXMLModelPropertyOptions.prototype, "reflected");
|
|
76
79
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "reflected");
|
|
77
80
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦXMLModelPropertyOptions.prototype, "tagname");
|
|
78
81
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "tagname");
|
|
@@ -80,135 +83,148 @@ __RΦ.m("rt:t", () => __RΦ.a(20))(IΦXMLModelPropertyOptions.prototype, "ignore
|
|
|
80
83
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "ignored");
|
|
81
84
|
__RΦ.m("rt:t", () => __RΦ.a(20))(IΦXMLModelPropertyOptions.prototype, "inline");
|
|
82
85
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "inline");
|
|
83
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
86
|
+
__RΦ.m("rt:t", () => __RΦ.a(503))(IΦXMLModelPropertyOptions.prototype, "model");
|
|
87
|
+
__RΦ.m("rt:f", "P?")(IΦXMLModelPropertyOptions.prototype, "model");
|
|
88
|
+
__RΦ.m("rt:t", () => __RΦ.a(355))(IΦXMLModelPropertyOptions.prototype, "isSourceElement");
|
|
84
89
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "isSourceElement");
|
|
85
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
90
|
+
__RΦ.m("rt:t", () => __RΦ.a(1219))(IΦXMLModelPropertyOptions.prototype, "resolveElements");
|
|
86
91
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "resolveElements");
|
|
87
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
92
|
+
__RΦ.m("rt:t", () => __RΦ.a(1221))(IΦXMLModelPropertyOptions.prototype, "fromXML");
|
|
88
93
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "fromXML");
|
|
89
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
94
|
+
__RΦ.m("rt:t", () => __RΦ.a(1223))(IΦXMLModelPropertyOptions.prototype, "toXML");
|
|
90
95
|
__RΦ.m("rt:f", "P")(IΦXMLModelPropertyOptions.prototype, "toXML");
|
|
91
96
|
var IΦCreateXMLModelPropertyOptions = { name: "CreateXMLModelPropertyOptions", prototype: {}, identity: Symbol("CreateXMLModelPropertyOptions (interface)") };
|
|
92
97
|
export { IΦCreateXMLModelPropertyOptions };
|
|
93
|
-
(t => __RΦ.t[
|
|
94
|
-
__RΦ.m("rt:P", ["tagname", "sourceElements", "resolveElements", "toXML", "fromXML", "inline", "ignore"])(IΦCreateXMLModelPropertyOptions);
|
|
98
|
+
(t => __RΦ.t[196] = t)(IΦCreateXMLModelPropertyOptions);
|
|
99
|
+
__RΦ.m("rt:P", ["tagname", "sourceElements", "resolveElements", "toXML", "fromXML", "inline", "ignore", "model"])(IΦCreateXMLModelPropertyOptions);
|
|
95
100
|
__RΦ.m("rt:m", [])(IΦCreateXMLModelPropertyOptions);
|
|
96
101
|
__RΦ.m("rt:f", "Ie")(IΦCreateXMLModelPropertyOptions);
|
|
97
102
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦCreateXMLModelPropertyOptions.prototype, "tagname");
|
|
98
103
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "tagname");
|
|
99
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
104
|
+
__RΦ.m("rt:t", () => __RΦ.a(1382))(IΦCreateXMLModelPropertyOptions.prototype, "sourceElements");
|
|
100
105
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "sourceElements");
|
|
101
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
106
|
+
__RΦ.m("rt:t", () => __RΦ.a(1275))(IΦCreateXMLModelPropertyOptions.prototype, "resolveElements");
|
|
102
107
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "resolveElements");
|
|
103
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
108
|
+
__RΦ.m("rt:t", () => __RΦ.a(1344))(IΦCreateXMLModelPropertyOptions.prototype, "toXML");
|
|
104
109
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "toXML");
|
|
105
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
110
|
+
__RΦ.m("rt:t", () => __RΦ.a(1297))(IΦCreateXMLModelPropertyOptions.prototype, "fromXML");
|
|
106
111
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "fromXML");
|
|
107
112
|
__RΦ.m("rt:t", () => __RΦ.a(20))(IΦCreateXMLModelPropertyOptions.prototype, "inline");
|
|
108
113
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "inline");
|
|
109
114
|
__RΦ.m("rt:t", () => __RΦ.a(20))(IΦCreateXMLModelPropertyOptions.prototype, "ignore");
|
|
110
115
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "ignore");
|
|
116
|
+
__RΦ.m("rt:t", () => __RΦ.a(504))(IΦCreateXMLModelPropertyOptions.prototype, "model");
|
|
117
|
+
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "model");
|
|
111
118
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦCreateXMLModelPropertyOptions.prototype, "tagname");
|
|
112
119
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "tagname");
|
|
113
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
120
|
+
__RΦ.m("rt:t", () => __RΦ.a(1382))(IΦCreateXMLModelPropertyOptions.prototype, "sourceElements");
|
|
114
121
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "sourceElements");
|
|
115
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
122
|
+
__RΦ.m("rt:t", () => __RΦ.a(1275))(IΦCreateXMLModelPropertyOptions.prototype, "resolveElements");
|
|
116
123
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "resolveElements");
|
|
117
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
124
|
+
__RΦ.m("rt:t", () => __RΦ.a(1344))(IΦCreateXMLModelPropertyOptions.prototype, "toXML");
|
|
118
125
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "toXML");
|
|
119
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
126
|
+
__RΦ.m("rt:t", () => __RΦ.a(1297))(IΦCreateXMLModelPropertyOptions.prototype, "fromXML");
|
|
120
127
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "fromXML");
|
|
121
128
|
__RΦ.m("rt:t", () => __RΦ.a(20))(IΦCreateXMLModelPropertyOptions.prototype, "inline");
|
|
122
129
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "inline");
|
|
123
130
|
__RΦ.m("rt:t", () => __RΦ.a(20))(IΦCreateXMLModelPropertyOptions.prototype, "ignore");
|
|
124
131
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "ignore");
|
|
132
|
+
__RΦ.m("rt:t", () => __RΦ.a(504))(IΦCreateXMLModelPropertyOptions.prototype, "model");
|
|
133
|
+
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelPropertyOptions.prototype, "model");
|
|
125
134
|
var IΦConversionOptions = { name: "ConversionOptions", prototype: {}, identity: Symbol("ConversionOptions (interface)") };
|
|
126
|
-
(t => __RΦ.t[
|
|
135
|
+
(t => __RΦ.t[600] = t)(IΦConversionOptions);
|
|
127
136
|
__RΦ.m("rt:P", ["parent", "middlewares"])(IΦConversionOptions);
|
|
128
137
|
__RΦ.m("rt:m", [])(IΦConversionOptions);
|
|
129
138
|
__RΦ.m("rt:f", "I")(IΦConversionOptions);
|
|
130
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
139
|
+
__RΦ.m("rt:t", () => __RΦ.a(608))(IΦConversionOptions.prototype, "parent");
|
|
131
140
|
__RΦ.m("rt:f", "P")(IΦConversionOptions.prototype, "parent");
|
|
132
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
141
|
+
__RΦ.m("rt:t", () => __RΦ.a(611))(IΦConversionOptions.prototype, "middlewares");
|
|
133
142
|
__RΦ.m("rt:f", "P")(IΦConversionOptions.prototype, "middlewares");
|
|
134
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
143
|
+
__RΦ.m("rt:t", () => __RΦ.a(608))(IΦConversionOptions.prototype, "parent");
|
|
135
144
|
__RΦ.m("rt:f", "P")(IΦConversionOptions.prototype, "parent");
|
|
136
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
145
|
+
__RΦ.m("rt:t", () => __RΦ.a(611))(IΦConversionOptions.prototype, "middlewares");
|
|
137
146
|
__RΦ.m("rt:f", "P")(IΦConversionOptions.prototype, "middlewares");
|
|
138
|
-
import * as LΦ_2 from "../model";
|
|
139
147
|
var IΦfromXMLContext = { name: "fromXMLContext", prototype: {}, identity: Symbol("fromXMLContext (interface)") };
|
|
140
148
|
export { IΦfromXMLContext };
|
|
141
|
-
(t => __RΦ.t[
|
|
149
|
+
(t => __RΦ.t[378] = t)(IΦfromXMLContext);
|
|
142
150
|
__RΦ.m("rt:P", ["xml", "properties", "model"])(IΦfromXMLContext);
|
|
143
151
|
__RΦ.m("rt:m", [])(IΦfromXMLContext);
|
|
144
152
|
__RΦ.m("rt:f", "Ie")(IΦfromXMLContext);
|
|
145
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
153
|
+
__RΦ.m("rt:t", () => __RΦ.a(109))(IΦfromXMLContext.prototype, "xml");
|
|
146
154
|
__RΦ.m("rt:f", "P")(IΦfromXMLContext.prototype, "xml");
|
|
147
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
155
|
+
__RΦ.m("rt:t", () => __RΦ.a(654))(IΦfromXMLContext.prototype, "properties");
|
|
148
156
|
__RΦ.m("rt:f", "P")(IΦfromXMLContext.prototype, "properties");
|
|
149
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
157
|
+
__RΦ.m("rt:t", () => __RΦ.a(517))(IΦfromXMLContext.prototype, "model");
|
|
150
158
|
__RΦ.m("rt:f", "P")(IΦfromXMLContext.prototype, "model");
|
|
151
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
159
|
+
__RΦ.m("rt:t", () => __RΦ.a(109))(IΦfromXMLContext.prototype, "xml");
|
|
152
160
|
__RΦ.m("rt:f", "P")(IΦfromXMLContext.prototype, "xml");
|
|
153
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
161
|
+
__RΦ.m("rt:t", () => __RΦ.a(654))(IΦfromXMLContext.prototype, "properties");
|
|
154
162
|
__RΦ.m("rt:f", "P")(IΦfromXMLContext.prototype, "properties");
|
|
155
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
163
|
+
__RΦ.m("rt:t", () => __RΦ.a(517))(IΦfromXMLContext.prototype, "model");
|
|
156
164
|
__RΦ.m("rt:f", "P")(IΦfromXMLContext.prototype, "model");
|
|
157
165
|
var IΦtoXMLContext = { name: "toXMLContext", prototype: {}, identity: Symbol("toXMLContext (interface)") };
|
|
158
166
|
export { IΦtoXMLContext };
|
|
159
|
-
(t => __RΦ.t[
|
|
167
|
+
(t => __RΦ.t[858] = t)(IΦtoXMLContext);
|
|
160
168
|
__RΦ.m("rt:P", ["object", "properties", "model"])(IΦtoXMLContext);
|
|
161
169
|
__RΦ.m("rt:m", [])(IΦtoXMLContext);
|
|
162
170
|
__RΦ.m("rt:f", "Ie")(IΦtoXMLContext);
|
|
163
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
171
|
+
__RΦ.m("rt:t", () => __RΦ.a(859))(IΦtoXMLContext.prototype, "object");
|
|
164
172
|
__RΦ.m("rt:f", "P")(IΦtoXMLContext.prototype, "object");
|
|
165
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
173
|
+
__RΦ.m("rt:t", () => __RΦ.a(886))(IΦtoXMLContext.prototype, "properties");
|
|
166
174
|
__RΦ.m("rt:f", "P")(IΦtoXMLContext.prototype, "properties");
|
|
167
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
175
|
+
__RΦ.m("rt:t", () => __RΦ.a(924))(IΦtoXMLContext.prototype, "model");
|
|
168
176
|
__RΦ.m("rt:f", "P")(IΦtoXMLContext.prototype, "model");
|
|
169
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
177
|
+
__RΦ.m("rt:t", () => __RΦ.a(859))(IΦtoXMLContext.prototype, "object");
|
|
170
178
|
__RΦ.m("rt:f", "P")(IΦtoXMLContext.prototype, "object");
|
|
171
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
179
|
+
__RΦ.m("rt:t", () => __RΦ.a(886))(IΦtoXMLContext.prototype, "properties");
|
|
172
180
|
__RΦ.m("rt:f", "P")(IΦtoXMLContext.prototype, "properties");
|
|
173
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
181
|
+
__RΦ.m("rt:t", () => __RΦ.a(924))(IΦtoXMLContext.prototype, "model");
|
|
174
182
|
__RΦ.m("rt:f", "P")(IΦtoXMLContext.prototype, "model");
|
|
175
183
|
var IΦXMLModelOptions = { name: "XMLModelOptions", prototype: {}, identity: Symbol("XMLModelOptions (interface)") };
|
|
176
184
|
export { IΦXMLModelOptions };
|
|
177
|
-
(t => __RΦ.t[
|
|
178
|
-
__RΦ.m("rt:P", ["properties", "fromXML", "toXML", "tagname"])(IΦXMLModelOptions);
|
|
185
|
+
(t => __RΦ.t[520] = t)(IΦXMLModelOptions);
|
|
186
|
+
__RΦ.m("rt:P", ["parent", "properties", "fromXML", "toXML", "tagname"])(IΦXMLModelOptions);
|
|
179
187
|
__RΦ.m("rt:m", [])(IΦXMLModelOptions);
|
|
180
188
|
__RΦ.m("rt:f", "Ie")(IΦXMLModelOptions);
|
|
181
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
189
|
+
__RΦ.m("rt:t", () => __RΦ.a(526))(IΦXMLModelOptions.prototype, "parent");
|
|
190
|
+
__RΦ.m("rt:f", "P?")(IΦXMLModelOptions.prototype, "parent");
|
|
191
|
+
__RΦ.m("rt:t", () => __RΦ.a(658))(IΦXMLModelOptions.prototype, "properties");
|
|
182
192
|
__RΦ.m("rt:f", "P")(IΦXMLModelOptions.prototype, "properties");
|
|
183
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
193
|
+
__RΦ.m("rt:t", () => __RΦ.a(605))(IΦXMLModelOptions.prototype, "fromXML");
|
|
184
194
|
__RΦ.m("rt:f", "P")(IΦXMLModelOptions.prototype, "fromXML");
|
|
185
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
195
|
+
__RΦ.m("rt:t", () => __RΦ.a(862))(IΦXMLModelOptions.prototype, "toXML");
|
|
186
196
|
__RΦ.m("rt:f", "P")(IΦXMLModelOptions.prototype, "toXML");
|
|
187
197
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦXMLModelOptions.prototype, "tagname");
|
|
188
198
|
__RΦ.m("rt:f", "P")(IΦXMLModelOptions.prototype, "tagname");
|
|
189
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
199
|
+
__RΦ.m("rt:t", () => __RΦ.a(526))(IΦXMLModelOptions.prototype, "parent");
|
|
200
|
+
__RΦ.m("rt:f", "P?")(IΦXMLModelOptions.prototype, "parent");
|
|
201
|
+
__RΦ.m("rt:t", () => __RΦ.a(658))(IΦXMLModelOptions.prototype, "properties");
|
|
190
202
|
__RΦ.m("rt:f", "P")(IΦXMLModelOptions.prototype, "properties");
|
|
191
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
203
|
+
__RΦ.m("rt:t", () => __RΦ.a(605))(IΦXMLModelOptions.prototype, "fromXML");
|
|
192
204
|
__RΦ.m("rt:f", "P")(IΦXMLModelOptions.prototype, "fromXML");
|
|
193
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
205
|
+
__RΦ.m("rt:t", () => __RΦ.a(862))(IΦXMLModelOptions.prototype, "toXML");
|
|
194
206
|
__RΦ.m("rt:f", "P")(IΦXMLModelOptions.prototype, "toXML");
|
|
195
207
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦXMLModelOptions.prototype, "tagname");
|
|
196
208
|
__RΦ.m("rt:f", "P")(IΦXMLModelOptions.prototype, "tagname");
|
|
197
209
|
var IΦCreateXMLModelOptions = { name: "CreateXMLModelOptions", prototype: {}, identity: Symbol("CreateXMLModelOptions (interface)") };
|
|
198
210
|
export { IΦCreateXMLModelOptions };
|
|
199
|
-
(t => __RΦ.t[
|
|
200
|
-
__RΦ.m("rt:P", ["
|
|
211
|
+
(t => __RΦ.t[1618] = t)(IΦCreateXMLModelOptions);
|
|
212
|
+
__RΦ.m("rt:P", ["parent", "fromXML", "toXML", "tagname"])(IΦCreateXMLModelOptions);
|
|
201
213
|
__RΦ.m("rt:m", [])(IΦCreateXMLModelOptions);
|
|
202
214
|
__RΦ.m("rt:f", "Ie")(IΦCreateXMLModelOptions);
|
|
203
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
215
|
+
__RΦ.m("rt:t", () => __RΦ.a(1813))(IΦCreateXMLModelOptions.prototype, "parent");
|
|
216
|
+
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "parent");
|
|
217
|
+
__RΦ.m("rt:t", () => __RΦ.a(1640))(IΦCreateXMLModelOptions.prototype, "fromXML");
|
|
204
218
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "fromXML");
|
|
219
|
+
__RΦ.m("rt:t", () => __RΦ.a(1630))(IΦCreateXMLModelOptions.prototype, "toXML");
|
|
220
|
+
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "toXML");
|
|
205
221
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦCreateXMLModelOptions.prototype, "tagname");
|
|
206
222
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "tagname");
|
|
207
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
208
|
-
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "
|
|
209
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
223
|
+
__RΦ.m("rt:t", () => __RΦ.a(1813))(IΦCreateXMLModelOptions.prototype, "parent");
|
|
224
|
+
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "parent");
|
|
225
|
+
__RΦ.m("rt:t", () => __RΦ.a(1640))(IΦCreateXMLModelOptions.prototype, "fromXML");
|
|
210
226
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "fromXML");
|
|
227
|
+
__RΦ.m("rt:t", () => __RΦ.a(1630))(IΦCreateXMLModelOptions.prototype, "toXML");
|
|
228
|
+
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "toXML");
|
|
211
229
|
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦCreateXMLModelOptions.prototype, "tagname");
|
|
212
230
|
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "tagname");
|
|
213
|
-
__RΦ.m("rt:t", () => __RΦ.a(1846))(IΦCreateXMLModelOptions.prototype, "toXML");
|
|
214
|
-
__RΦ.m("rt:f", "P?")(IΦCreateXMLModelOptions.prototype, "toXML");
|
package/build/module/types.d.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
export type { Constructor } from "typescript-rtti";
|
|
2
2
|
export declare type UnknownRecord = Record<string | number | symbol, unknown>;
|
|
3
3
|
export declare type UnknownObject = object;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
export interface XMLAttributes {
|
|
5
|
+
[key: string]: string | number | undefined;
|
|
6
|
+
}
|
|
7
|
+
export interface XMLElement {
|
|
8
|
+
type?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
attributes?: XMLAttributes;
|
|
11
|
+
elements?: Array<XMLElement>;
|
|
12
|
+
text?: string | number | boolean;
|
|
13
|
+
}
|
|
6
14
|
export declare type XMLRoot = {
|
|
7
15
|
elements: XMLElement[];
|
|
8
16
|
};
|
package/build/module/types.js
CHANGED
|
@@ -13,5 +13,36 @@ const __RΦ = { m: (k, v) => (t, ...a) => t && Reflect.metadata ? Reflect.metada
|
|
|
13
13
|
__RΦ.t[id] = t = l;
|
|
14
14
|
}
|
|
15
15
|
return t;
|
|
16
|
-
}, t: {} };
|
|
17
|
-
|
|
16
|
+
}, t: { [13]: { LΦ: t => String }, [101]: { TΦ: "5", name: "XMLAttributes" }, [105]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(103) }) }, [103]: { TΦ: "5", name: "XMLElement" }, [107]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(13), __RΦ.a(14), __RΦ.a(17), __RΦ.a(19)] }) }, [14]: { LΦ: t => Number }, [17]: { RΦ: t => ({ TΦ: "0" }) }, [19]: { RΦ: t => ({ TΦ: "1" }) } } };
|
|
17
|
+
var IΦXMLAttributes = { name: "XMLAttributes", prototype: {}, identity: Symbol("XMLAttributes (interface)") };
|
|
18
|
+
export { IΦXMLAttributes };
|
|
19
|
+
(t => __RΦ.t[101] = t)(IΦXMLAttributes);
|
|
20
|
+
__RΦ.m("rt:P", [])(IΦXMLAttributes);
|
|
21
|
+
__RΦ.m("rt:m", [])(IΦXMLAttributes);
|
|
22
|
+
__RΦ.m("rt:f", "Ie")(IΦXMLAttributes);
|
|
23
|
+
var IΦXMLElement = { name: "XMLElement", prototype: {}, identity: Symbol("XMLElement (interface)") };
|
|
24
|
+
export { IΦXMLElement };
|
|
25
|
+
(t => __RΦ.t[103] = t)(IΦXMLElement);
|
|
26
|
+
__RΦ.m("rt:P", ["type", "name", "attributes", "elements", "text"])(IΦXMLElement);
|
|
27
|
+
__RΦ.m("rt:m", [])(IΦXMLElement);
|
|
28
|
+
__RΦ.m("rt:f", "Ie")(IΦXMLElement);
|
|
29
|
+
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦXMLElement.prototype, "type");
|
|
30
|
+
__RΦ.m("rt:f", "P?")(IΦXMLElement.prototype, "type");
|
|
31
|
+
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦXMLElement.prototype, "name");
|
|
32
|
+
__RΦ.m("rt:f", "P?")(IΦXMLElement.prototype, "name");
|
|
33
|
+
__RΦ.m("rt:t", () => __RΦ.a(101))(IΦXMLElement.prototype, "attributes");
|
|
34
|
+
__RΦ.m("rt:f", "P?")(IΦXMLElement.prototype, "attributes");
|
|
35
|
+
__RΦ.m("rt:t", () => __RΦ.a(105))(IΦXMLElement.prototype, "elements");
|
|
36
|
+
__RΦ.m("rt:f", "P?")(IΦXMLElement.prototype, "elements");
|
|
37
|
+
__RΦ.m("rt:t", () => __RΦ.a(107))(IΦXMLElement.prototype, "text");
|
|
38
|
+
__RΦ.m("rt:f", "P?")(IΦXMLElement.prototype, "text");
|
|
39
|
+
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦXMLElement.prototype, "type");
|
|
40
|
+
__RΦ.m("rt:f", "P?")(IΦXMLElement.prototype, "type");
|
|
41
|
+
__RΦ.m("rt:t", () => __RΦ.a(13))(IΦXMLElement.prototype, "name");
|
|
42
|
+
__RΦ.m("rt:f", "P?")(IΦXMLElement.prototype, "name");
|
|
43
|
+
__RΦ.m("rt:t", () => __RΦ.a(101))(IΦXMLElement.prototype, "attributes");
|
|
44
|
+
__RΦ.m("rt:f", "P?")(IΦXMLElement.prototype, "attributes");
|
|
45
|
+
__RΦ.m("rt:t", () => __RΦ.a(105))(IΦXMLElement.prototype, "elements");
|
|
46
|
+
__RΦ.m("rt:f", "P?")(IΦXMLElement.prototype, "elements");
|
|
47
|
+
__RΦ.m("rt:t", () => __RΦ.a(107))(IΦXMLElement.prototype, "text");
|
|
48
|
+
__RΦ.m("rt:f", "P?")(IΦXMLElement.prototype, "text");
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { XMLElement, XMLRoot } from "./types";
|
|
1
|
+
import { XMLElement, XMLRoot } from "../types";
|
|
3
2
|
export declare function parse(string: string): XMLRoot;
|
|
4
|
-
export declare
|
|
3
|
+
export declare const stringify: typeof import("xml-js").js2xml;
|
|
5
4
|
export declare function getContent(xml: XMLElement): string | number | boolean | undefined;
|
|
6
5
|
export declare function fromContent(content: string): {
|
|
7
6
|
elements: [{
|
|
@@ -20,12 +19,14 @@ export declare function fromContent(content: string, tag: string, attributes?: X
|
|
|
20
19
|
};
|
|
21
20
|
export declare function addElement(xml: XMLElement, element: XMLElement): void;
|
|
22
21
|
export declare function setAttribute(xml: XMLElement, attribute: string, value: string): void;
|
|
22
|
+
export declare function deleteAttribute(xml: XMLElement, attribute: string): void;
|
|
23
23
|
declare const XML: {
|
|
24
24
|
parse: typeof parse;
|
|
25
|
-
stringify: typeof
|
|
25
|
+
stringify: typeof import("xml-js").js2xml;
|
|
26
26
|
fromContent: typeof fromContent;
|
|
27
27
|
getContent: typeof getContent;
|
|
28
28
|
addElement: typeof addElement;
|
|
29
29
|
setAttribute: typeof setAttribute;
|
|
30
|
+
deleteAttribute: typeof deleteAttribute;
|
|
30
31
|
};
|
|
31
32
|
export default XML;
|
|
@@ -13,23 +13,22 @@ const __RΦ = { m: (k, v) => (t, ...a) => t && Reflect.metadata ? Reflect.metada
|
|
|
13
13
|
__RΦ.t[id] = t = l;
|
|
14
14
|
}
|
|
15
15
|
return t;
|
|
16
|
-
}, t: { [13]: { LΦ: t => String }, [
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
}, t: { [13]: { LΦ: t => String }, [109]: { RΦ: t => ({ TΦ: "O", m: [{ n: "elements", f: "", t: __RΦ.a(105) }] }) }, [105]: { RΦ: t => ({ TΦ: "[", e: __RΦ.a(103) }) }, [103]: { LΦ: t => LΦ_0.IΦXMLElement }, [108]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(10), __RΦ.a(13), __RΦ.a(14), __RΦ.a(17), __RΦ.a(19)] }) }, [10]: { RΦ: t => ({ TΦ: "u" }) }, [14]: { LΦ: t => Number }, [17]: { RΦ: t => ({ TΦ: "0" }) }, [19]: { RΦ: t => ({ TΦ: "1" }) }, [46]: { LΦ: t => "" }, [104]: { RΦ: t => ({ TΦ: "|", t: [__RΦ.a(10), __RΦ.a(101)] }) }, [101]: { LΦ: t => LΦ_0.IΦXMLAttributes }, [22]: { RΦ: t => ({ TΦ: "V" }) } } };
|
|
17
|
+
/**
|
|
18
|
+
* @rtti:skip
|
|
19
|
+
*/
|
|
20
|
+
import XMLJS from "./xml-js";
|
|
21
|
+
import * as LΦ_0 from "../types";
|
|
19
22
|
export function parse(string) {
|
|
20
|
-
return
|
|
23
|
+
return XMLJS.parse(string);
|
|
21
24
|
}
|
|
22
25
|
__RΦ.m("rt:p", [{ n: "string", t: () => __RΦ.a(13), v: null }])(parse);
|
|
23
26
|
__RΦ.m("rt:f", "F")(parse);
|
|
24
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
25
|
-
export
|
|
26
|
-
return js2xml(xml, options);
|
|
27
|
-
}
|
|
28
|
-
__RΦ.m("rt:p", [{ n: "xml", t: () => __RΦ.a(93), v: null }, { n: "options", t: () => __RΦ.a(1024), v: null, f: "?" }])(stringify);
|
|
29
|
-
__RΦ.m("rt:f", "F")(stringify);
|
|
30
|
-
__RΦ.m("rt:t", () => __RΦ.a(13))(stringify);
|
|
27
|
+
__RΦ.m("rt:t", () => __RΦ.a(109))(parse);
|
|
28
|
+
export const stringify = XMLJS.stringify;
|
|
31
29
|
export function getContent(xml) {
|
|
32
|
-
|
|
30
|
+
var _a;
|
|
31
|
+
if (((_a = xml.elements) === null || _a === void 0 ? void 0 : _a.length) === 1) {
|
|
33
32
|
const content = xml.elements[0];
|
|
34
33
|
if (content.type === "text")
|
|
35
34
|
return content.text;
|
|
@@ -38,9 +37,9 @@ export function getContent(xml) {
|
|
|
38
37
|
return "";
|
|
39
38
|
throw new TypeError(`can't get text from XMLElement: ${JSON.stringify(xml)}`);
|
|
40
39
|
}
|
|
41
|
-
__RΦ.m("rt:p", [{ n: "xml", t: () => __RΦ.a(
|
|
40
|
+
__RΦ.m("rt:p", [{ n: "xml", t: () => __RΦ.a(103), v: null }])(getContent);
|
|
42
41
|
__RΦ.m("rt:f", "F")(getContent);
|
|
43
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
42
|
+
__RΦ.m("rt:t", () => __RΦ.a(108))(getContent);
|
|
44
43
|
export function fromContent(content = "", tag, attributes) {
|
|
45
44
|
const el = {
|
|
46
45
|
elements: content ? [{ type: "text", text: String(content) }] : [],
|
|
@@ -56,15 +55,15 @@ export function fromContent(content = "", tag, attributes) {
|
|
|
56
55
|
el.type = "element";
|
|
57
56
|
return el;
|
|
58
57
|
}
|
|
59
|
-
__RΦ.m("rt:p", [{ n: "content", t: () => __RΦ.a(46), v: function () { return ""; } }, { n: "tag", t: () => __RΦ.a(13), v: null, f: "?" }, { n: "attributes", t: () => __RΦ.a(
|
|
58
|
+
__RΦ.m("rt:p", [{ n: "content", t: () => __RΦ.a(46), v: function () { return ""; } }, { n: "tag", t: () => __RΦ.a(13), v: null, f: "?" }, { n: "attributes", t: () => __RΦ.a(104), v: null, f: "?" }])(fromContent);
|
|
60
59
|
__RΦ.m("rt:f", "F")(fromContent);
|
|
61
|
-
__RΦ.m("rt:t", () => __RΦ.a(
|
|
60
|
+
__RΦ.m("rt:t", () => __RΦ.a(103))(fromContent);
|
|
62
61
|
export function addElement(xml, element) {
|
|
63
62
|
if (!xml.elements)
|
|
64
63
|
xml.elements = [];
|
|
65
64
|
xml.elements.push(element);
|
|
66
65
|
}
|
|
67
|
-
__RΦ.m("rt:p", [{ n: "xml", t: () => __RΦ.a(
|
|
66
|
+
__RΦ.m("rt:p", [{ n: "xml", t: () => __RΦ.a(103), v: null }, { n: "element", t: () => __RΦ.a(103), v: null }])(addElement);
|
|
68
67
|
__RΦ.m("rt:f", "F")(addElement);
|
|
69
68
|
__RΦ.m("rt:t", () => __RΦ.a(22))(addElement);
|
|
70
69
|
export function setAttribute(xml, attribute, value) {
|
|
@@ -72,9 +71,17 @@ export function setAttribute(xml, attribute, value) {
|
|
|
72
71
|
xml.attributes = {};
|
|
73
72
|
xml.attributes[attribute] = value;
|
|
74
73
|
}
|
|
75
|
-
__RΦ.m("rt:p", [{ n: "xml", t: () => __RΦ.a(
|
|
74
|
+
__RΦ.m("rt:p", [{ n: "xml", t: () => __RΦ.a(103), v: null }, { n: "attribute", t: () => __RΦ.a(13), v: null }, { n: "value", t: () => __RΦ.a(13), v: null }])(setAttribute);
|
|
76
75
|
__RΦ.m("rt:f", "F")(setAttribute);
|
|
77
76
|
__RΦ.m("rt:t", () => __RΦ.a(22))(setAttribute);
|
|
77
|
+
export function deleteAttribute(xml, attribute) {
|
|
78
|
+
if (!xml.attributes)
|
|
79
|
+
return;
|
|
80
|
+
delete xml.attributes[attribute];
|
|
81
|
+
}
|
|
82
|
+
__RΦ.m("rt:p", [{ n: "xml", t: () => __RΦ.a(103), v: null }, { n: "attribute", t: () => __RΦ.a(13), v: null }])(deleteAttribute);
|
|
83
|
+
__RΦ.m("rt:f", "F")(deleteAttribute);
|
|
84
|
+
__RΦ.m("rt:t", () => __RΦ.a(22))(deleteAttribute);
|
|
78
85
|
const XML = {
|
|
79
86
|
parse,
|
|
80
87
|
stringify,
|
|
@@ -82,5 +89,6 @@ const XML = {
|
|
|
82
89
|
getContent,
|
|
83
90
|
addElement,
|
|
84
91
|
setAttribute,
|
|
92
|
+
deleteAttribute,
|
|
85
93
|
};
|
|
86
94
|
export default XML;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
const __RΦ = { m: (k, v) => (t, ...a) => t && Reflect.metadata ? Reflect.metadata(k, v)(t, ...a) : void 0, f: (f, d, n) => (d.forEach(d => d(f)), Object.defineProperty(f, "name", { value: n, writable: false }), f), c: (c, d, dp, dsp, n) => (d.forEach(d => d(c)), dp.forEach(([p, d]) => d(c.prototype, p)), dsp.forEach(([p, d]) => d(c, p)), n ? Object.defineProperty(c, "name", { value: n, writable: false }) : undefined, c), r: (o, a) => (Object.assign(o, a)), a: id => {
|
|
2
|
+
let t = __RΦ.t[id];
|
|
3
|
+
if (t === void 0)
|
|
4
|
+
return void 0;
|
|
5
|
+
if (t.RΦ) {
|
|
6
|
+
let r = t.RΦ;
|
|
7
|
+
delete t.RΦ;
|
|
8
|
+
__RΦ.r(t, r(t));
|
|
9
|
+
}
|
|
10
|
+
else if (t.LΦ) {
|
|
11
|
+
let l = t.LΦ();
|
|
12
|
+
delete t.LΦ;
|
|
13
|
+
__RΦ.t[id] = t = l;
|
|
14
|
+
}
|
|
15
|
+
return t;
|
|
16
|
+
}, t: {} };
|
|
17
|
+
/**
|
|
18
|
+
* @rtti:skip
|
|
19
|
+
*/
|
|
20
|
+
import { xml2js as parse, js2xml as stringify } from "xml-js";
|
|
21
|
+
export default {
|
|
22
|
+
parse,
|
|
23
|
+
stringify,
|
|
24
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xml-model",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"main": "build/main/index.js",
|
|
5
5
|
"typings": "build/main/index.d.ts",
|
|
6
6
|
"module": "build/module/index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"preversion": "npm test",
|
|
11
11
|
"version": "npm run build",
|
|
12
12
|
"postversion": "git push && git push --tags",
|
|
13
|
-
"test": "
|
|
13
|
+
"test": "npm run lint && mocha -r ./register-ts-node --colors src/**/*.spec.ts",
|
|
14
14
|
"build": "run-p build:*",
|
|
15
15
|
"build:main": "rimraf build/main && ttsc -p tsconfig.json",
|
|
16
16
|
"build:module": "rimraf build/module && ttsc -p tsconfig.module.json",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "mocha";
|