xml-model 1.3.1 → 1.3.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/dist/_virtual/_commonjsHelpers.js +4 -10
- package/dist/defaults.js +9 -8
- package/dist/errors.js +14 -20
- package/dist/middleware.js +4 -10
- package/dist/model/built-ins.js +0 -3
- package/dist/model/index.js +30 -38
- package/dist/model/property.js +9 -13
- package/dist/model/registry.js +2 -9
- package/dist/node_modules/reflect-metadata/Reflect.js +9 -70
- package/dist/util/is-regexp.js +0 -3
- package/dist/util/kebab-case.js +0 -3
- package/dist/util/merge-maps.js +1 -5
- package/dist/vite/index.d.ts +53 -0
- package/dist/xml/index.js +8 -24
- package/package.json +11 -9
- package/dist/model/types.js +0 -2
- package/dist/types.js +0 -2
- package/vite/dist/src/class-names.test.d.ts +0 -9
- package/vite/dist/src/defaults.d.ts +0 -15
- package/vite/dist/src/errors.d.ts +0 -24
- package/vite/dist/src/index.d.ts +0 -8
- package/vite/dist/src/middleware.d.ts +0 -10
- package/vite/dist/src/model/built-ins.d.ts +0 -3
- package/vite/dist/src/model/index.d.ts +0 -21
- package/vite/dist/src/model/property.d.ts +0 -6
- package/vite/dist/src/model/registry.d.ts +0 -9
- package/vite/dist/src/model/types.d.ts +0 -74
- package/vite/dist/src/model.test.d.ts +0 -2
- package/vite/dist/src/types.d.ts +0 -17
- package/vite/dist/src/util/is-regexp.d.ts +0 -12
- package/vite/dist/src/util/kebab-case.d.ts +0 -16
- package/vite/dist/src/util/merge-maps.d.ts +0 -2
- package/vite/dist/src/xml/index.d.ts +0 -33
- package/vite/dist/src/xml/xml-js.d.ts +0 -7
- /package/{vite/dist → dist/vite}/index.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/common/format.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/common/index.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/api-call-transformer.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/common/class-analyzer.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/common/compile-error.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/common/import-analyzer.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/common/interface-analyzer.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/common/visitor-base.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/declarations-emitter.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/encode-parameter.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/find-relative-path.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/flags.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/forward-ref.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/get-exports-for-symbol.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/index.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/legacy-decorator.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/legacy-type-encoder.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/literal-node.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/metadata-collector.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/metadata-decorator.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/metadata-emitter.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/metadata-encoder.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/rt-helper.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/rtti-visitor-base.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/serialize.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/type-encoder.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/type-literal.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/utils.js +0 -0
- /package/{vite/dist → dist/vite}/node_modules/typescript-rtti/dist.esm/transformer/workarounds.js +0 -0
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import { commonjsGlobal } from "../../_virtual/_commonjsHelpers.js";
|
|
4
2
|
import { __exports as _Reflect } from "../../_virtual/Reflect2.js";
|
|
5
3
|
var hasRequired_Reflect;
|
|
6
4
|
function require_Reflect() {
|
|
7
5
|
if (hasRequired_Reflect) return _Reflect;
|
|
8
6
|
hasRequired_Reflect = 1;
|
|
9
|
-
var
|
|
10
|
-
(function(
|
|
7
|
+
var Reflect;
|
|
8
|
+
(function(Reflect2) {
|
|
11
9
|
(function(factory) {
|
|
12
10
|
var root = typeof commonjsGlobal === "object" ? commonjsGlobal : typeof self === "object" ? self : typeof this === "object" ? this : Function("return this;")();
|
|
13
|
-
var exporter = makeExporter(
|
|
11
|
+
var exporter = makeExporter(Reflect2);
|
|
14
12
|
if (typeof root.Reflect === "undefined") {
|
|
15
|
-
root.Reflect =
|
|
13
|
+
root.Reflect = Reflect2;
|
|
16
14
|
} else {
|
|
17
15
|
exporter = makeExporter(root.Reflect, exporter);
|
|
18
16
|
}
|
|
@@ -26,7 +24,6 @@ function require_Reflect() {
|
|
|
26
24
|
previous(key, value);
|
|
27
25
|
};
|
|
28
26
|
}
|
|
29
|
-
__name(makeExporter, "makeExporter");
|
|
30
27
|
})(function(exporter) {
|
|
31
28
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
32
29
|
var supportsSymbol = typeof Symbol === "function";
|
|
@@ -81,7 +78,6 @@ function require_Reflect() {
|
|
|
81
78
|
return DecorateConstructor(decorators, target);
|
|
82
79
|
}
|
|
83
80
|
}
|
|
84
|
-
__name(decorate, "decorate");
|
|
85
81
|
exporter("decorate", decorate);
|
|
86
82
|
function metadata(metadataKey, metadataValue) {
|
|
87
83
|
function decorator(target, propertyKey) {
|
|
@@ -91,10 +87,8 @@ function require_Reflect() {
|
|
|
91
87
|
throw new TypeError();
|
|
92
88
|
OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
93
89
|
}
|
|
94
|
-
__name(decorator, "decorator");
|
|
95
90
|
return decorator;
|
|
96
91
|
}
|
|
97
|
-
__name(metadata, "metadata");
|
|
98
92
|
exporter("metadata", metadata);
|
|
99
93
|
function defineMetadata(metadataKey, metadataValue, target, propertyKey) {
|
|
100
94
|
if (!IsObject(target))
|
|
@@ -103,7 +97,6 @@ function require_Reflect() {
|
|
|
103
97
|
propertyKey = ToPropertyKey(propertyKey);
|
|
104
98
|
return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, propertyKey);
|
|
105
99
|
}
|
|
106
|
-
__name(defineMetadata, "defineMetadata");
|
|
107
100
|
exporter("defineMetadata", defineMetadata);
|
|
108
101
|
function hasMetadata(metadataKey, target, propertyKey) {
|
|
109
102
|
if (!IsObject(target))
|
|
@@ -112,7 +105,6 @@ function require_Reflect() {
|
|
|
112
105
|
propertyKey = ToPropertyKey(propertyKey);
|
|
113
106
|
return OrdinaryHasMetadata(metadataKey, target, propertyKey);
|
|
114
107
|
}
|
|
115
|
-
__name(hasMetadata, "hasMetadata");
|
|
116
108
|
exporter("hasMetadata", hasMetadata);
|
|
117
109
|
function hasOwnMetadata(metadataKey, target, propertyKey) {
|
|
118
110
|
if (!IsObject(target))
|
|
@@ -121,7 +113,6 @@ function require_Reflect() {
|
|
|
121
113
|
propertyKey = ToPropertyKey(propertyKey);
|
|
122
114
|
return OrdinaryHasOwnMetadata(metadataKey, target, propertyKey);
|
|
123
115
|
}
|
|
124
|
-
__name(hasOwnMetadata, "hasOwnMetadata");
|
|
125
116
|
exporter("hasOwnMetadata", hasOwnMetadata);
|
|
126
117
|
function getMetadata(metadataKey, target, propertyKey) {
|
|
127
118
|
if (!IsObject(target))
|
|
@@ -130,7 +121,6 @@ function require_Reflect() {
|
|
|
130
121
|
propertyKey = ToPropertyKey(propertyKey);
|
|
131
122
|
return OrdinaryGetMetadata(metadataKey, target, propertyKey);
|
|
132
123
|
}
|
|
133
|
-
__name(getMetadata, "getMetadata");
|
|
134
124
|
exporter("getMetadata", getMetadata);
|
|
135
125
|
function getOwnMetadata(metadataKey, target, propertyKey) {
|
|
136
126
|
if (!IsObject(target))
|
|
@@ -139,7 +129,6 @@ function require_Reflect() {
|
|
|
139
129
|
propertyKey = ToPropertyKey(propertyKey);
|
|
140
130
|
return OrdinaryGetOwnMetadata(metadataKey, target, propertyKey);
|
|
141
131
|
}
|
|
142
|
-
__name(getOwnMetadata, "getOwnMetadata");
|
|
143
132
|
exporter("getOwnMetadata", getOwnMetadata);
|
|
144
133
|
function getMetadataKeys(target, propertyKey) {
|
|
145
134
|
if (!IsObject(target))
|
|
@@ -148,7 +137,6 @@ function require_Reflect() {
|
|
|
148
137
|
propertyKey = ToPropertyKey(propertyKey);
|
|
149
138
|
return OrdinaryMetadataKeys(target, propertyKey);
|
|
150
139
|
}
|
|
151
|
-
__name(getMetadataKeys, "getMetadataKeys");
|
|
152
140
|
exporter("getMetadataKeys", getMetadataKeys);
|
|
153
141
|
function getOwnMetadataKeys(target, propertyKey) {
|
|
154
142
|
if (!IsObject(target))
|
|
@@ -157,7 +145,6 @@ function require_Reflect() {
|
|
|
157
145
|
propertyKey = ToPropertyKey(propertyKey);
|
|
158
146
|
return OrdinaryOwnMetadataKeys(target, propertyKey);
|
|
159
147
|
}
|
|
160
|
-
__name(getOwnMetadataKeys, "getOwnMetadataKeys");
|
|
161
148
|
exporter("getOwnMetadataKeys", getOwnMetadataKeys);
|
|
162
149
|
function deleteMetadata(metadataKey, target, propertyKey) {
|
|
163
150
|
if (!IsObject(target))
|
|
@@ -183,7 +170,6 @@ function require_Reflect() {
|
|
|
183
170
|
Metadata.delete(target);
|
|
184
171
|
return true;
|
|
185
172
|
}
|
|
186
|
-
__name(deleteMetadata, "deleteMetadata");
|
|
187
173
|
exporter("deleteMetadata", deleteMetadata);
|
|
188
174
|
function DecorateConstructor(decorators, target) {
|
|
189
175
|
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
@@ -197,7 +183,6 @@ function require_Reflect() {
|
|
|
197
183
|
}
|
|
198
184
|
return target;
|
|
199
185
|
}
|
|
200
|
-
__name(DecorateConstructor, "DecorateConstructor");
|
|
201
186
|
function DecorateProperty(decorators, target, propertyKey, descriptor) {
|
|
202
187
|
for (var i = decorators.length - 1; i >= 0; --i) {
|
|
203
188
|
var decorator = decorators[i];
|
|
@@ -210,7 +195,6 @@ function require_Reflect() {
|
|
|
210
195
|
}
|
|
211
196
|
return descriptor;
|
|
212
197
|
}
|
|
213
|
-
__name(DecorateProperty, "DecorateProperty");
|
|
214
198
|
function GetOrCreateMetadataMap(O, P, Create) {
|
|
215
199
|
var targetMetadata = Metadata.get(O);
|
|
216
200
|
if (IsUndefined(targetMetadata)) {
|
|
@@ -228,7 +212,6 @@ function require_Reflect() {
|
|
|
228
212
|
}
|
|
229
213
|
return metadataMap;
|
|
230
214
|
}
|
|
231
|
-
__name(GetOrCreateMetadataMap, "GetOrCreateMetadataMap");
|
|
232
215
|
function OrdinaryHasMetadata(MetadataKey, O, P) {
|
|
233
216
|
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
234
217
|
if (hasOwn2)
|
|
@@ -238,7 +221,6 @@ function require_Reflect() {
|
|
|
238
221
|
return OrdinaryHasMetadata(MetadataKey, parent, P);
|
|
239
222
|
return false;
|
|
240
223
|
}
|
|
241
|
-
__name(OrdinaryHasMetadata, "OrdinaryHasMetadata");
|
|
242
224
|
function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
|
|
243
225
|
var metadataMap = GetOrCreateMetadataMap(
|
|
244
226
|
O,
|
|
@@ -250,7 +232,6 @@ function require_Reflect() {
|
|
|
250
232
|
return false;
|
|
251
233
|
return ToBoolean(metadataMap.has(MetadataKey));
|
|
252
234
|
}
|
|
253
|
-
__name(OrdinaryHasOwnMetadata, "OrdinaryHasOwnMetadata");
|
|
254
235
|
function OrdinaryGetMetadata(MetadataKey, O, P) {
|
|
255
236
|
var hasOwn2 = OrdinaryHasOwnMetadata(MetadataKey, O, P);
|
|
256
237
|
if (hasOwn2)
|
|
@@ -260,7 +241,6 @@ function require_Reflect() {
|
|
|
260
241
|
return OrdinaryGetMetadata(MetadataKey, parent, P);
|
|
261
242
|
return void 0;
|
|
262
243
|
}
|
|
263
|
-
__name(OrdinaryGetMetadata, "OrdinaryGetMetadata");
|
|
264
244
|
function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
|
|
265
245
|
var metadataMap = GetOrCreateMetadataMap(
|
|
266
246
|
O,
|
|
@@ -272,7 +252,6 @@ function require_Reflect() {
|
|
|
272
252
|
return void 0;
|
|
273
253
|
return metadataMap.get(MetadataKey);
|
|
274
254
|
}
|
|
275
|
-
__name(OrdinaryGetOwnMetadata, "OrdinaryGetOwnMetadata");
|
|
276
255
|
function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
|
|
277
256
|
var metadataMap = GetOrCreateMetadataMap(
|
|
278
257
|
O,
|
|
@@ -282,7 +261,6 @@ function require_Reflect() {
|
|
|
282
261
|
);
|
|
283
262
|
metadataMap.set(MetadataKey, MetadataValue);
|
|
284
263
|
}
|
|
285
|
-
__name(OrdinaryDefineOwnMetadata, "OrdinaryDefineOwnMetadata");
|
|
286
264
|
function OrdinaryMetadataKeys(O, P) {
|
|
287
265
|
var ownKeys = OrdinaryOwnMetadataKeys(O, P);
|
|
288
266
|
var parent = OrdinaryGetPrototypeOf(O);
|
|
@@ -313,7 +291,6 @@ function require_Reflect() {
|
|
|
313
291
|
}
|
|
314
292
|
return keys;
|
|
315
293
|
}
|
|
316
|
-
__name(OrdinaryMetadataKeys, "OrdinaryMetadataKeys");
|
|
317
294
|
function OrdinaryOwnMetadataKeys(O, P) {
|
|
318
295
|
var keys = [];
|
|
319
296
|
var metadataMap = GetOrCreateMetadataMap(
|
|
@@ -346,7 +323,6 @@ function require_Reflect() {
|
|
|
346
323
|
k++;
|
|
347
324
|
}
|
|
348
325
|
}
|
|
349
|
-
__name(OrdinaryOwnMetadataKeys, "OrdinaryOwnMetadataKeys");
|
|
350
326
|
function Type(x) {
|
|
351
327
|
if (x === null)
|
|
352
328
|
return 1;
|
|
@@ -367,23 +343,18 @@ function require_Reflect() {
|
|
|
367
343
|
return 6;
|
|
368
344
|
}
|
|
369
345
|
}
|
|
370
|
-
__name(Type, "Type");
|
|
371
346
|
function IsUndefined(x) {
|
|
372
347
|
return x === void 0;
|
|
373
348
|
}
|
|
374
|
-
__name(IsUndefined, "IsUndefined");
|
|
375
349
|
function IsNull(x) {
|
|
376
350
|
return x === null;
|
|
377
351
|
}
|
|
378
|
-
__name(IsNull, "IsNull");
|
|
379
352
|
function IsSymbol(x) {
|
|
380
353
|
return typeof x === "symbol";
|
|
381
354
|
}
|
|
382
|
-
__name(IsSymbol, "IsSymbol");
|
|
383
355
|
function IsObject(x) {
|
|
384
356
|
return typeof x === "object" ? x !== null : typeof x === "function";
|
|
385
357
|
}
|
|
386
|
-
__name(IsObject, "IsObject");
|
|
387
358
|
function ToPrimitive(input, PreferredType) {
|
|
388
359
|
switch (Type(input)) {
|
|
389
360
|
case 0:
|
|
@@ -409,7 +380,6 @@ function require_Reflect() {
|
|
|
409
380
|
}
|
|
410
381
|
return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint);
|
|
411
382
|
}
|
|
412
|
-
__name(ToPrimitive, "ToPrimitive");
|
|
413
383
|
function OrdinaryToPrimitive(O, hint) {
|
|
414
384
|
if (hint === "string") {
|
|
415
385
|
var toString_1 = O.toString;
|
|
@@ -440,15 +410,12 @@ function require_Reflect() {
|
|
|
440
410
|
}
|
|
441
411
|
throw new TypeError();
|
|
442
412
|
}
|
|
443
|
-
__name(OrdinaryToPrimitive, "OrdinaryToPrimitive");
|
|
444
413
|
function ToBoolean(argument) {
|
|
445
414
|
return !!argument;
|
|
446
415
|
}
|
|
447
|
-
__name(ToBoolean, "ToBoolean");
|
|
448
416
|
function ToString(argument) {
|
|
449
417
|
return "" + argument;
|
|
450
418
|
}
|
|
451
|
-
__name(ToString, "ToString");
|
|
452
419
|
function ToPropertyKey(argument) {
|
|
453
420
|
var key = ToPrimitive(
|
|
454
421
|
argument,
|
|
@@ -459,19 +426,15 @@ function require_Reflect() {
|
|
|
459
426
|
return key;
|
|
460
427
|
return ToString(key);
|
|
461
428
|
}
|
|
462
|
-
__name(ToPropertyKey, "ToPropertyKey");
|
|
463
429
|
function IsArray(argument) {
|
|
464
430
|
return Array.isArray ? Array.isArray(argument) : argument instanceof Object ? argument instanceof Array : Object.prototype.toString.call(argument) === "[object Array]";
|
|
465
431
|
}
|
|
466
|
-
__name(IsArray, "IsArray");
|
|
467
432
|
function IsCallable(argument) {
|
|
468
433
|
return typeof argument === "function";
|
|
469
434
|
}
|
|
470
|
-
__name(IsCallable, "IsCallable");
|
|
471
435
|
function IsConstructor(argument) {
|
|
472
436
|
return typeof argument === "function";
|
|
473
437
|
}
|
|
474
|
-
__name(IsConstructor, "IsConstructor");
|
|
475
438
|
function IsPropertyKey(argument) {
|
|
476
439
|
switch (Type(argument)) {
|
|
477
440
|
case 3:
|
|
@@ -482,7 +445,6 @@ function require_Reflect() {
|
|
|
482
445
|
return false;
|
|
483
446
|
}
|
|
484
447
|
}
|
|
485
|
-
__name(IsPropertyKey, "IsPropertyKey");
|
|
486
448
|
function GetMethod(V, P) {
|
|
487
449
|
var func = V[P];
|
|
488
450
|
if (func === void 0 || func === null)
|
|
@@ -491,7 +453,6 @@ function require_Reflect() {
|
|
|
491
453
|
throw new TypeError();
|
|
492
454
|
return func;
|
|
493
455
|
}
|
|
494
|
-
__name(GetMethod, "GetMethod");
|
|
495
456
|
function GetIterator(obj) {
|
|
496
457
|
var method = GetMethod(obj, iteratorSymbol);
|
|
497
458
|
if (!IsCallable(method))
|
|
@@ -501,22 +462,18 @@ function require_Reflect() {
|
|
|
501
462
|
throw new TypeError();
|
|
502
463
|
return iterator;
|
|
503
464
|
}
|
|
504
|
-
__name(GetIterator, "GetIterator");
|
|
505
465
|
function IteratorValue(iterResult) {
|
|
506
466
|
return iterResult.value;
|
|
507
467
|
}
|
|
508
|
-
__name(IteratorValue, "IteratorValue");
|
|
509
468
|
function IteratorStep(iterator) {
|
|
510
469
|
var result = iterator.next();
|
|
511
470
|
return result.done ? false : result;
|
|
512
471
|
}
|
|
513
|
-
__name(IteratorStep, "IteratorStep");
|
|
514
472
|
function IteratorClose(iterator) {
|
|
515
473
|
var f = iterator["return"];
|
|
516
474
|
if (f)
|
|
517
475
|
f.call(iterator);
|
|
518
476
|
}
|
|
519
|
-
__name(IteratorClose, "IteratorClose");
|
|
520
477
|
function OrdinaryGetPrototypeOf(O) {
|
|
521
478
|
var proto = Object.getPrototypeOf(O);
|
|
522
479
|
if (typeof O !== "function" || O === functionPrototype)
|
|
@@ -534,7 +491,6 @@ function require_Reflect() {
|
|
|
534
491
|
return proto;
|
|
535
492
|
return constructor;
|
|
536
493
|
}
|
|
537
|
-
__name(OrdinaryGetPrototypeOf, "OrdinaryGetPrototypeOf");
|
|
538
494
|
function CreateMapPolyfill() {
|
|
539
495
|
var cacheSentinel = {};
|
|
540
496
|
var arraySentinel = [];
|
|
@@ -547,7 +503,6 @@ function require_Reflect() {
|
|
|
547
503
|
this._values = values;
|
|
548
504
|
this._selector = selector;
|
|
549
505
|
}
|
|
550
|
-
__name(MapIterator2, "MapIterator");
|
|
551
506
|
MapIterator2.prototype["@@iterator"] = function() {
|
|
552
507
|
return this;
|
|
553
508
|
};
|
|
@@ -597,11 +552,10 @@ function require_Reflect() {
|
|
|
597
552
|
this._cacheKey = cacheSentinel;
|
|
598
553
|
this._cacheIndex = -2;
|
|
599
554
|
}
|
|
600
|
-
__name(Map2, "Map");
|
|
601
555
|
Object.defineProperty(Map2.prototype, "size", {
|
|
602
|
-
get:
|
|
556
|
+
get: function() {
|
|
603
557
|
return this._keys.length;
|
|
604
|
-
},
|
|
558
|
+
},
|
|
605
559
|
enumerable: true,
|
|
606
560
|
configurable: true
|
|
607
561
|
});
|
|
@@ -689,17 +643,13 @@ function require_Reflect() {
|
|
|
689
643
|
function getKey(key, _) {
|
|
690
644
|
return key;
|
|
691
645
|
}
|
|
692
|
-
__name(getKey, "getKey");
|
|
693
646
|
function getValue(_, value) {
|
|
694
647
|
return value;
|
|
695
648
|
}
|
|
696
|
-
__name(getValue, "getValue");
|
|
697
649
|
function getEntry(key, value) {
|
|
698
650
|
return [key, value];
|
|
699
651
|
}
|
|
700
|
-
__name(getEntry, "getEntry");
|
|
701
652
|
}
|
|
702
|
-
__name(CreateMapPolyfill, "CreateMapPolyfill");
|
|
703
653
|
function CreateSetPolyfill() {
|
|
704
654
|
return (
|
|
705
655
|
/** @class */
|
|
@@ -707,11 +657,10 @@ function require_Reflect() {
|
|
|
707
657
|
function Set2() {
|
|
708
658
|
this._map = new _Map();
|
|
709
659
|
}
|
|
710
|
-
__name(Set2, "Set");
|
|
711
660
|
Object.defineProperty(Set2.prototype, "size", {
|
|
712
|
-
get:
|
|
661
|
+
get: function() {
|
|
713
662
|
return this._map.size;
|
|
714
|
-
},
|
|
663
|
+
},
|
|
715
664
|
enumerable: true,
|
|
716
665
|
configurable: true
|
|
717
666
|
});
|
|
@@ -746,7 +695,6 @@ function require_Reflect() {
|
|
|
746
695
|
})()
|
|
747
696
|
);
|
|
748
697
|
}
|
|
749
|
-
__name(CreateSetPolyfill, "CreateSetPolyfill");
|
|
750
698
|
function CreateWeakMapPolyfill() {
|
|
751
699
|
var UUID_SIZE = 16;
|
|
752
700
|
var keys = HashMap.create();
|
|
@@ -757,7 +705,6 @@ function require_Reflect() {
|
|
|
757
705
|
function WeakMap2() {
|
|
758
706
|
this._key = CreateUniqueKey();
|
|
759
707
|
}
|
|
760
|
-
__name(WeakMap2, "WeakMap");
|
|
761
708
|
WeakMap2.prototype.has = function(target) {
|
|
762
709
|
var table = GetOrCreateWeakMapTable(
|
|
763
710
|
target,
|
|
@@ -805,7 +752,6 @@ function require_Reflect() {
|
|
|
805
752
|
keys[key] = true;
|
|
806
753
|
return key;
|
|
807
754
|
}
|
|
808
|
-
__name(CreateUniqueKey, "CreateUniqueKey");
|
|
809
755
|
function GetOrCreateWeakMapTable(target, create) {
|
|
810
756
|
if (!hasOwn.call(target, rootKey)) {
|
|
811
757
|
if (!create)
|
|
@@ -814,13 +760,11 @@ function require_Reflect() {
|
|
|
814
760
|
}
|
|
815
761
|
return target[rootKey];
|
|
816
762
|
}
|
|
817
|
-
__name(GetOrCreateWeakMapTable, "GetOrCreateWeakMapTable");
|
|
818
763
|
function FillRandomBytes(buffer, size) {
|
|
819
764
|
for (var i = 0; i < size; ++i)
|
|
820
765
|
buffer[i] = Math.random() * 255 | 0;
|
|
821
766
|
return buffer;
|
|
822
767
|
}
|
|
823
|
-
__name(FillRandomBytes, "FillRandomBytes");
|
|
824
768
|
function GenRandomBytes(size) {
|
|
825
769
|
if (typeof Uint8Array === "function") {
|
|
826
770
|
if (typeof crypto !== "undefined")
|
|
@@ -831,7 +775,6 @@ function require_Reflect() {
|
|
|
831
775
|
}
|
|
832
776
|
return FillRandomBytes(new Array(size), size);
|
|
833
777
|
}
|
|
834
|
-
__name(GenRandomBytes, "GenRandomBytes");
|
|
835
778
|
function CreateUUID() {
|
|
836
779
|
var data = GenRandomBytes(UUID_SIZE);
|
|
837
780
|
data[6] = data[6] & 79 | 64;
|
|
@@ -847,20 +790,16 @@ function require_Reflect() {
|
|
|
847
790
|
}
|
|
848
791
|
return result;
|
|
849
792
|
}
|
|
850
|
-
__name(CreateUUID, "CreateUUID");
|
|
851
793
|
}
|
|
852
|
-
__name(CreateWeakMapPolyfill, "CreateWeakMapPolyfill");
|
|
853
794
|
function MakeDictionary(obj) {
|
|
854
795
|
obj.__ = void 0;
|
|
855
796
|
delete obj.__;
|
|
856
797
|
return obj;
|
|
857
798
|
}
|
|
858
|
-
__name(MakeDictionary, "MakeDictionary");
|
|
859
799
|
});
|
|
860
|
-
})(
|
|
800
|
+
})(Reflect || (Reflect = {}));
|
|
861
801
|
return _Reflect;
|
|
862
802
|
}
|
|
863
|
-
__name(require_Reflect, "require_Reflect");
|
|
864
803
|
export {
|
|
865
804
|
require_Reflect as __require
|
|
866
805
|
};
|
package/dist/util/is-regexp.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
function isRegExp(value) {
|
|
4
2
|
return Object.prototype.toString.call(value) === "[object RegExp]";
|
|
5
3
|
}
|
|
6
|
-
__name(isRegExp, "isRegExp");
|
|
7
4
|
export {
|
|
8
5
|
isRegExp as default,
|
|
9
6
|
isRegExp
|
package/dist/util/kebab-case.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
const KEBAB_REGEX = new RegExp("\\p{Lu}", "gu");
|
|
4
2
|
function kebabCase(str, keepLeadingDash = false) {
|
|
5
3
|
const result = str.replace(KEBAB_REGEX, (match) => `-${match.toLowerCase()}`);
|
|
@@ -11,7 +9,6 @@ function kebabCase(str, keepLeadingDash = false) {
|
|
|
11
9
|
}
|
|
12
10
|
return result;
|
|
13
11
|
}
|
|
14
|
-
__name(kebabCase, "kebabCase");
|
|
15
12
|
export {
|
|
16
13
|
kebabCase
|
|
17
14
|
};
|
package/dist/util/merge-maps.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
function mergeMaps(...sources) {
|
|
4
2
|
const res = /* @__PURE__ */ new Map();
|
|
5
3
|
sources.forEach((source) => {
|
|
@@ -10,8 +8,7 @@ function mergeMaps(...sources) {
|
|
|
10
8
|
const entries = Array.from(res.entries());
|
|
11
9
|
entries.forEach((entry) => {
|
|
12
10
|
const key = entry[0];
|
|
13
|
-
if (overrides.has(key))
|
|
14
|
-
entry[1] = overrides.get(key);
|
|
11
|
+
if (overrides.has(key)) entry[1] = overrides.get(key);
|
|
15
12
|
});
|
|
16
13
|
res.clear();
|
|
17
14
|
entries.forEach(([key, val]) => res.set(key, val));
|
|
@@ -20,7 +17,6 @@ function mergeMaps(...sources) {
|
|
|
20
17
|
});
|
|
21
18
|
return res;
|
|
22
19
|
}
|
|
23
|
-
__name(mergeMaps, "mergeMaps");
|
|
24
20
|
export {
|
|
25
21
|
mergeMaps as default
|
|
26
22
|
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { RollupTypescriptOptions } from '@rollup/plugin-typescript';
|
|
2
|
+
/**
|
|
3
|
+
* When Building, class names are changed but the library relies on them
|
|
4
|
+
* so they need to be preserved
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare function FixClassNames(): {
|
|
8
|
+
name: string;
|
|
9
|
+
enforce: "post";
|
|
10
|
+
transform(this: import('rollup').TransformPluginContext, code: string, id: string): {
|
|
11
|
+
code: string;
|
|
12
|
+
map: any;
|
|
13
|
+
};
|
|
14
|
+
config(this: import('vite').ConfigPluginContext): {
|
|
15
|
+
esbuild: {
|
|
16
|
+
keepNames: true;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export type RTTIPluginOptions = {
|
|
21
|
+
/**
|
|
22
|
+
* options for @rollup/plugin-typescript
|
|
23
|
+
*
|
|
24
|
+
* Plugin might not work if you override the `transformers` property as these options are assigned and not deep merged
|
|
25
|
+
*/
|
|
26
|
+
typescript?: RollupTypescriptOptions;
|
|
27
|
+
/** Files where the rtti transformer should be applied
|
|
28
|
+
*
|
|
29
|
+
* If not set, will include every files by default
|
|
30
|
+
*/
|
|
31
|
+
include?: RegExp;
|
|
32
|
+
/** Files where the rtti transformer should not be applied */
|
|
33
|
+
exclude?: RegExp;
|
|
34
|
+
/** Print debug logs */
|
|
35
|
+
debug?: boolean;
|
|
36
|
+
};
|
|
37
|
+
export declare function TypescriptRTTI(options?: RTTIPluginOptions): import('rollup').Plugin<any>;
|
|
38
|
+
export type XMLModelVitePluginOptions = RTTIPluginOptions;
|
|
39
|
+
export declare function XMLModelVitePlugin(options?: RTTIPluginOptions): (import('rollup').Plugin<any> | {
|
|
40
|
+
name: string;
|
|
41
|
+
enforce: "post";
|
|
42
|
+
transform(this: import('rollup').TransformPluginContext, code: string, id: string): {
|
|
43
|
+
code: string;
|
|
44
|
+
map: any;
|
|
45
|
+
};
|
|
46
|
+
config(this: import('vite').ConfigPluginContext): {
|
|
47
|
+
esbuild: {
|
|
48
|
+
keepNames: true;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
})[];
|
|
52
|
+
export default XMLModelVitePlugin;
|
|
53
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/xml/index.js
CHANGED
|
@@ -1,56 +1,40 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
1
|
import XMLJS from "./xml-js.js";
|
|
4
2
|
function parse(string) {
|
|
5
3
|
return XMLJS.parse(string);
|
|
6
4
|
}
|
|
7
|
-
__name(parse, "parse");
|
|
8
5
|
const stringify = XMLJS.stringify;
|
|
9
6
|
function getContent(xml) {
|
|
10
7
|
if (xml.elements?.length === 1) {
|
|
11
8
|
const content = xml.elements[0];
|
|
12
|
-
if (content.type === "text")
|
|
13
|
-
return content.text;
|
|
9
|
+
if (content.type === "text") return content.text;
|
|
14
10
|
}
|
|
15
|
-
if (!xml.elements)
|
|
16
|
-
return "";
|
|
11
|
+
if (!xml.elements) return "";
|
|
17
12
|
throw new TypeError(`can't get text from XMLElement: ${JSON.stringify(xml)}`);
|
|
18
13
|
}
|
|
19
|
-
__name(getContent, "getContent");
|
|
20
14
|
function fromContent(content = "", tag, attributes) {
|
|
21
15
|
const el = {
|
|
22
16
|
elements: content ? [{ type: "text", text: String(content) }] : []
|
|
23
17
|
};
|
|
24
|
-
if (tag)
|
|
25
|
-
el.name = tag;
|
|
18
|
+
if (tag) el.name = tag;
|
|
26
19
|
if (attributes) {
|
|
27
|
-
if (!el.name)
|
|
28
|
-
throw new TypeError("please provide a name if you want to provide attributes");
|
|
20
|
+
if (!el.name) throw new TypeError("please provide a name if you want to provide attributes");
|
|
29
21
|
el.attributes = attributes;
|
|
30
22
|
}
|
|
31
|
-
if (el.name)
|
|
32
|
-
el.type = "element";
|
|
23
|
+
if (el.name) el.type = "element";
|
|
33
24
|
return el;
|
|
34
25
|
}
|
|
35
|
-
__name(fromContent, "fromContent");
|
|
36
26
|
function addElement(xml, element) {
|
|
37
|
-
if (!xml.elements)
|
|
38
|
-
xml.elements = [];
|
|
27
|
+
if (!xml.elements) xml.elements = [];
|
|
39
28
|
xml.elements.push(element);
|
|
40
29
|
}
|
|
41
|
-
__name(addElement, "addElement");
|
|
42
30
|
function setAttribute(xml, attribute, value) {
|
|
43
|
-
if (!xml.attributes)
|
|
44
|
-
xml.attributes = {};
|
|
31
|
+
if (!xml.attributes) xml.attributes = {};
|
|
45
32
|
xml.attributes[attribute] = value;
|
|
46
33
|
}
|
|
47
|
-
__name(setAttribute, "setAttribute");
|
|
48
34
|
function deleteAttribute(xml, attribute) {
|
|
49
|
-
if (!xml.attributes)
|
|
50
|
-
return;
|
|
35
|
+
if (!xml.attributes) return;
|
|
51
36
|
delete xml.attributes[attribute];
|
|
52
37
|
}
|
|
53
|
-
__name(deleteAttribute, "deleteAttribute");
|
|
54
38
|
const XML = {
|
|
55
39
|
parse,
|
|
56
40
|
stringify,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xml-model",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "allows transparent XML <-> Object conversion in typescript",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "MathisTLD",
|
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"import": "./dist/index.js"
|
|
13
13
|
},
|
|
14
|
+
"./vite": {
|
|
15
|
+
"types": "./dist/vite/index.d.ts",
|
|
16
|
+
"import": "./dist/vite/index.js"
|
|
17
|
+
},
|
|
14
18
|
"./*": {
|
|
15
19
|
"types": "./dist/*.d.ts",
|
|
16
20
|
"import": "./dist/*.js"
|
|
17
|
-
},
|
|
18
|
-
"./vite": {
|
|
19
|
-
"types": "./vite/dist/index.d.ts",
|
|
20
|
-
"import": "./vite/dist/index.js"
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
|
-
"preversion": "
|
|
24
|
+
"preversion": "vitest run",
|
|
25
25
|
"version": "npm run build",
|
|
26
26
|
"postversion": "git push && git push --tags",
|
|
27
27
|
"build": "vite build",
|
|
@@ -42,16 +42,18 @@
|
|
|
42
42
|
"@types/node": "^24.10.11",
|
|
43
43
|
"husky": "^9.1.7",
|
|
44
44
|
"lint-staged": "^16.2.7",
|
|
45
|
-
"marmotte": "^0.
|
|
46
|
-
"oxfmt": "^0.
|
|
47
|
-
"oxlint": "^1.
|
|
45
|
+
"marmotte": "^0.4.2",
|
|
46
|
+
"oxfmt": "^0.36.0",
|
|
47
|
+
"oxlint": "^1.51.0",
|
|
48
48
|
"reflect-metadata": "^0.1.14",
|
|
49
49
|
"typescript": "*",
|
|
50
50
|
"vite": "*",
|
|
51
|
+
"vitepress": "^2.0.0-alpha.16",
|
|
51
52
|
"vitest": "^4.0.18"
|
|
52
53
|
},
|
|
53
54
|
"peerDependencies": {
|
|
54
55
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
56
|
+
"tslib": "^2.8.1",
|
|
55
57
|
"typescript": "~5.1.6",
|
|
56
58
|
"vite": "^7.3.1"
|
|
57
59
|
},
|
package/dist/model/types.js
DELETED
package/dist/types.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { fromXMLContext, PropertyFromXMLContext, PropertyToXMLContext, toXMLContext, XMLModelPropertyOptions, XMLModel } from './model/types';
|
|
2
|
-
import { XMLElement, XMLRoot } from './types';
|
|
3
|
-
interface Defaults {
|
|
4
|
-
fromXML<T>(context: fromXMLContext<T>): T;
|
|
5
|
-
propertySourceElementsFilter<T>(...args: Parameters<XMLModelPropertyOptions<T>["isSourceElement"]>): boolean;
|
|
6
|
-
propertyResolveSourceElements<T>(context: Omit<PropertyFromXMLContext<T>, "elements">): XMLElement[];
|
|
7
|
-
propertyFromXML<T>(context: PropertyFromXMLContext<T>): T[keyof T];
|
|
8
|
-
toXML<T>(context: toXMLContext<T>): XMLRoot;
|
|
9
|
-
tagnameFromModel: (model: XMLModel) => string;
|
|
10
|
-
tagnameFromProperty<T>(property: XMLModelPropertyOptions<T>): string;
|
|
11
|
-
propertyToXML<T>(context: PropertyToXMLContext<T>): XMLRoot;
|
|
12
|
-
}
|
|
13
|
-
export declare const defaults: Defaults;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=defaults.d.ts.map
|