@purescraps/purehtml 0.7.1 → 0.9.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/dist/examples/simple.js +465 -154
- package/dist/examples/simple.js.map +1 -1
- package/dist/src/index.js +465 -154
- package/dist/src/index.js.map +1 -1
- package/package.json +14 -16
- package/src/config-schema.json +2 -2
package/dist/src/index.js
CHANGED
|
@@ -29,9 +29,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
));
|
|
30
30
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
31
31
|
|
|
32
|
-
// node_modules/.pnpm/ajv@8.
|
|
32
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js
|
|
33
33
|
var require_code = __commonJS({
|
|
34
|
-
"node_modules/.pnpm/ajv@8.
|
|
34
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js"(exports2) {
|
|
35
35
|
"use strict";
|
|
36
36
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
37
37
|
exports2.regexpCode = exports2.getEsmExportName = exports2.getProperty = exports2.safeStringify = exports2.stringify = exports2.strConcat = exports2.addCodeArg = exports2.str = exports2._ = exports2.nil = exports2._Code = exports2.Name = exports2.IDENTIFIER = exports2._CodeOrName = void 0;
|
|
@@ -183,9 +183,9 @@ var require_code = __commonJS({
|
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
185
|
|
|
186
|
-
// node_modules/.pnpm/ajv@8.
|
|
186
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js
|
|
187
187
|
var require_scope = __commonJS({
|
|
188
|
-
"node_modules/.pnpm/ajv@8.
|
|
188
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/scope.js"(exports2) {
|
|
189
189
|
"use strict";
|
|
190
190
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
191
191
|
exports2.ValueScope = exports2.ValueScopeName = exports2.Scope = exports2.varKinds = exports2.UsedValueState = void 0;
|
|
@@ -328,9 +328,9 @@ var require_scope = __commonJS({
|
|
|
328
328
|
}
|
|
329
329
|
});
|
|
330
330
|
|
|
331
|
-
// node_modules/.pnpm/ajv@8.
|
|
331
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js
|
|
332
332
|
var require_codegen = __commonJS({
|
|
333
|
-
"node_modules/.pnpm/ajv@8.
|
|
333
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/index.js"(exports2) {
|
|
334
334
|
"use strict";
|
|
335
335
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
336
336
|
exports2.or = exports2.and = exports2.not = exports2.CodeGen = exports2.operators = exports2.varKinds = exports2.ValueScopeName = exports2.ValueScope = exports2.Scope = exports2.Name = exports2.regexpCode = exports2.stringify = exports2.getProperty = exports2.nil = exports2.strConcat = exports2.str = exports2._ = void 0;
|
|
@@ -1048,9 +1048,9 @@ var require_codegen = __commonJS({
|
|
|
1048
1048
|
}
|
|
1049
1049
|
});
|
|
1050
1050
|
|
|
1051
|
-
// node_modules/.pnpm/ajv@8.
|
|
1051
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js
|
|
1052
1052
|
var require_util = __commonJS({
|
|
1053
|
-
"node_modules/.pnpm/ajv@8.
|
|
1053
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/util.js"(exports2) {
|
|
1054
1054
|
"use strict";
|
|
1055
1055
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1056
1056
|
exports2.checkStrictMode = exports2.getErrorPath = exports2.Type = exports2.useFunc = exports2.setEvaluated = exports2.evaluatedPropsToName = exports2.mergeEvaluated = exports2.eachItem = exports2.unescapeJsonPointer = exports2.escapeJsonPointer = exports2.escapeFragment = exports2.unescapeFragment = exports2.schemaRefOrVal = exports2.schemaHasRulesButRef = exports2.schemaHasRules = exports2.checkUnknownRules = exports2.alwaysValidSchema = exports2.toHash = void 0;
|
|
@@ -1215,9 +1215,9 @@ var require_util = __commonJS({
|
|
|
1215
1215
|
}
|
|
1216
1216
|
});
|
|
1217
1217
|
|
|
1218
|
-
// node_modules/.pnpm/ajv@8.
|
|
1218
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js
|
|
1219
1219
|
var require_names = __commonJS({
|
|
1220
|
-
"node_modules/.pnpm/ajv@8.
|
|
1220
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/names.js"(exports2) {
|
|
1221
1221
|
"use strict";
|
|
1222
1222
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1223
1223
|
var codegen_1 = require_codegen();
|
|
@@ -1254,9 +1254,9 @@ var require_names = __commonJS({
|
|
|
1254
1254
|
}
|
|
1255
1255
|
});
|
|
1256
1256
|
|
|
1257
|
-
// node_modules/.pnpm/ajv@8.
|
|
1257
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js
|
|
1258
1258
|
var require_errors = __commonJS({
|
|
1259
|
-
"node_modules/.pnpm/ajv@8.
|
|
1259
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/errors.js"(exports2) {
|
|
1260
1260
|
"use strict";
|
|
1261
1261
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1262
1262
|
exports2.extendErrors = exports2.resetErrorsCount = exports2.reportExtraError = exports2.reportError = exports2.keyword$DataError = exports2.keywordError = void 0;
|
|
@@ -1376,9 +1376,9 @@ var require_errors = __commonJS({
|
|
|
1376
1376
|
}
|
|
1377
1377
|
});
|
|
1378
1378
|
|
|
1379
|
-
// node_modules/.pnpm/ajv@8.
|
|
1379
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js
|
|
1380
1380
|
var require_boolSchema = __commonJS({
|
|
1381
|
-
"node_modules/.pnpm/ajv@8.
|
|
1381
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/boolSchema.js"(exports2) {
|
|
1382
1382
|
"use strict";
|
|
1383
1383
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1384
1384
|
exports2.boolOrEmptySchema = exports2.topBoolOrEmptySchema = void 0;
|
|
@@ -1427,9 +1427,9 @@ var require_boolSchema = __commonJS({
|
|
|
1427
1427
|
}
|
|
1428
1428
|
});
|
|
1429
1429
|
|
|
1430
|
-
// node_modules/.pnpm/ajv@8.
|
|
1430
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js
|
|
1431
1431
|
var require_rules = __commonJS({
|
|
1432
|
-
"node_modules/.pnpm/ajv@8.
|
|
1432
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/rules.js"(exports2) {
|
|
1433
1433
|
"use strict";
|
|
1434
1434
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1435
1435
|
exports2.getRules = exports2.isJSONType = void 0;
|
|
@@ -1458,9 +1458,9 @@ var require_rules = __commonJS({
|
|
|
1458
1458
|
}
|
|
1459
1459
|
});
|
|
1460
1460
|
|
|
1461
|
-
// node_modules/.pnpm/ajv@8.
|
|
1461
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js
|
|
1462
1462
|
var require_applicability = __commonJS({
|
|
1463
|
-
"node_modules/.pnpm/ajv@8.
|
|
1463
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/applicability.js"(exports2) {
|
|
1464
1464
|
"use strict";
|
|
1465
1465
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1466
1466
|
exports2.shouldUseRule = exports2.shouldUseGroup = exports2.schemaHasRulesForType = void 0;
|
|
@@ -1481,9 +1481,9 @@ var require_applicability = __commonJS({
|
|
|
1481
1481
|
}
|
|
1482
1482
|
});
|
|
1483
1483
|
|
|
1484
|
-
// node_modules/.pnpm/ajv@8.
|
|
1484
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js
|
|
1485
1485
|
var require_dataType = __commonJS({
|
|
1486
|
-
"node_modules/.pnpm/ajv@8.
|
|
1486
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/dataType.js"(exports2) {
|
|
1487
1487
|
"use strict";
|
|
1488
1488
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1489
1489
|
exports2.reportTypeError = exports2.checkDataTypes = exports2.checkDataType = exports2.coerceAndCheckDataType = exports2.getJSONTypes = exports2.getSchemaTypes = exports2.DataType = void 0;
|
|
@@ -1665,9 +1665,9 @@ var require_dataType = __commonJS({
|
|
|
1665
1665
|
}
|
|
1666
1666
|
});
|
|
1667
1667
|
|
|
1668
|
-
// node_modules/.pnpm/ajv@8.
|
|
1668
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js
|
|
1669
1669
|
var require_defaults = __commonJS({
|
|
1670
|
-
"node_modules/.pnpm/ajv@8.
|
|
1670
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/defaults.js"(exports2) {
|
|
1671
1671
|
"use strict";
|
|
1672
1672
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1673
1673
|
exports2.assignDefaults = void 0;
|
|
@@ -1702,9 +1702,9 @@ var require_defaults = __commonJS({
|
|
|
1702
1702
|
}
|
|
1703
1703
|
});
|
|
1704
1704
|
|
|
1705
|
-
// node_modules/.pnpm/ajv@8.
|
|
1705
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js
|
|
1706
1706
|
var require_code2 = __commonJS({
|
|
1707
|
-
"node_modules/.pnpm/ajv@8.
|
|
1707
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/code.js"(exports2) {
|
|
1708
1708
|
"use strict";
|
|
1709
1709
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1710
1710
|
exports2.validateUnion = exports2.validateArray = exports2.usePattern = exports2.callValidateCode = exports2.schemaProperties = exports2.allSchemaProperties = exports2.noPropertyInData = exports2.propertyInData = exports2.isOwnProperty = exports2.hasPropFunc = exports2.reportMissingProp = exports2.checkMissingProp = exports2.checkReportMissingProp = void 0;
|
|
@@ -1835,9 +1835,9 @@ var require_code2 = __commonJS({
|
|
|
1835
1835
|
}
|
|
1836
1836
|
});
|
|
1837
1837
|
|
|
1838
|
-
// node_modules/.pnpm/ajv@8.
|
|
1838
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js
|
|
1839
1839
|
var require_keyword = __commonJS({
|
|
1840
|
-
"node_modules/.pnpm/ajv@8.
|
|
1840
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/keyword.js"(exports2) {
|
|
1841
1841
|
"use strict";
|
|
1842
1842
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1843
1843
|
exports2.validateKeywordUsage = exports2.validSchemaType = exports2.funcKeywordCode = exports2.macroKeywordCode = void 0;
|
|
@@ -1953,9 +1953,9 @@ var require_keyword = __commonJS({
|
|
|
1953
1953
|
}
|
|
1954
1954
|
});
|
|
1955
1955
|
|
|
1956
|
-
// node_modules/.pnpm/ajv@8.
|
|
1956
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js
|
|
1957
1957
|
var require_subschema = __commonJS({
|
|
1958
|
-
"node_modules/.pnpm/ajv@8.
|
|
1958
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/subschema.js"(exports2) {
|
|
1959
1959
|
"use strict";
|
|
1960
1960
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
1961
1961
|
exports2.extendSubschemaMode = exports2.extendSubschemaData = exports2.getSubschema = void 0;
|
|
@@ -2159,9 +2159,9 @@ var require_json_schema_traverse = __commonJS({
|
|
|
2159
2159
|
}
|
|
2160
2160
|
});
|
|
2161
2161
|
|
|
2162
|
-
// node_modules/.pnpm/ajv@8.
|
|
2162
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js
|
|
2163
2163
|
var require_resolve = __commonJS({
|
|
2164
|
-
"node_modules/.pnpm/ajv@8.
|
|
2164
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/resolve.js"(exports2) {
|
|
2165
2165
|
"use strict";
|
|
2166
2166
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2167
2167
|
exports2.getSchemaRefs = exports2.resolveUrl = exports2.normalizeId = exports2._getFullPath = exports2.getFullPath = exports2.inlineRef = void 0;
|
|
@@ -2315,9 +2315,9 @@ var require_resolve = __commonJS({
|
|
|
2315
2315
|
}
|
|
2316
2316
|
});
|
|
2317
2317
|
|
|
2318
|
-
// node_modules/.pnpm/ajv@8.
|
|
2318
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js
|
|
2319
2319
|
var require_validate = __commonJS({
|
|
2320
|
-
"node_modules/.pnpm/ajv@8.
|
|
2320
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/validate/index.js"(exports2) {
|
|
2321
2321
|
"use strict";
|
|
2322
2322
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2323
2323
|
exports2.getData = exports2.KeywordCxt = exports2.validateFunctionCode = void 0;
|
|
@@ -2823,9 +2823,9 @@ var require_validate = __commonJS({
|
|
|
2823
2823
|
}
|
|
2824
2824
|
});
|
|
2825
2825
|
|
|
2826
|
-
// node_modules/.pnpm/ajv@8.
|
|
2826
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js
|
|
2827
2827
|
var require_validation_error = __commonJS({
|
|
2828
|
-
"node_modules/.pnpm/ajv@8.
|
|
2828
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/validation_error.js"(exports2) {
|
|
2829
2829
|
"use strict";
|
|
2830
2830
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2831
2831
|
var ValidationError = class extends Error {
|
|
@@ -2839,9 +2839,9 @@ var require_validation_error = __commonJS({
|
|
|
2839
2839
|
}
|
|
2840
2840
|
});
|
|
2841
2841
|
|
|
2842
|
-
// node_modules/.pnpm/ajv@8.
|
|
2842
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js
|
|
2843
2843
|
var require_ref_error = __commonJS({
|
|
2844
|
-
"node_modules/.pnpm/ajv@8.
|
|
2844
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/ref_error.js"(exports2) {
|
|
2845
2845
|
"use strict";
|
|
2846
2846
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2847
2847
|
var resolve_1 = require_resolve();
|
|
@@ -2856,9 +2856,9 @@ var require_ref_error = __commonJS({
|
|
|
2856
2856
|
}
|
|
2857
2857
|
});
|
|
2858
2858
|
|
|
2859
|
-
// node_modules/.pnpm/ajv@8.
|
|
2859
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js
|
|
2860
2860
|
var require_compile = __commonJS({
|
|
2861
|
-
"node_modules/.pnpm/ajv@8.
|
|
2861
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/index.js"(exports2) {
|
|
2862
2862
|
"use strict";
|
|
2863
2863
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2864
2864
|
exports2.resolveSchema = exports2.getCompilingSchema = exports2.resolveRef = exports2.compileSchema = exports2.SchemaEnv = void 0;
|
|
@@ -3080,9 +3080,9 @@ var require_compile = __commonJS({
|
|
|
3080
3080
|
}
|
|
3081
3081
|
});
|
|
3082
3082
|
|
|
3083
|
-
// node_modules/.pnpm/ajv@8.
|
|
3083
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.json
|
|
3084
3084
|
var require_data = __commonJS({
|
|
3085
|
-
"node_modules/.pnpm/ajv@8.
|
|
3085
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/data.json"(exports2, module2) {
|
|
3086
3086
|
module2.exports = {
|
|
3087
3087
|
$id: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",
|
|
3088
3088
|
description: "Meta-schema for $data reference (JSON AnySchema extension proposal)",
|
|
@@ -3766,9 +3766,9 @@ var require_fast_uri = __commonJS({
|
|
|
3766
3766
|
}
|
|
3767
3767
|
});
|
|
3768
3768
|
|
|
3769
|
-
// node_modules/.pnpm/ajv@8.
|
|
3769
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js
|
|
3770
3770
|
var require_uri = __commonJS({
|
|
3771
|
-
"node_modules/.pnpm/ajv@8.
|
|
3771
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/uri.js"(exports2) {
|
|
3772
3772
|
"use strict";
|
|
3773
3773
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
3774
3774
|
var uri = require_fast_uri();
|
|
@@ -3777,9 +3777,9 @@ var require_uri = __commonJS({
|
|
|
3777
3777
|
}
|
|
3778
3778
|
});
|
|
3779
3779
|
|
|
3780
|
-
// node_modules/.pnpm/ajv@8.
|
|
3780
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js
|
|
3781
3781
|
var require_core = __commonJS({
|
|
3782
|
-
"node_modules/.pnpm/ajv@8.
|
|
3782
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/core.js"(exports2) {
|
|
3783
3783
|
"use strict";
|
|
3784
3784
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
3785
3785
|
exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = void 0;
|
|
@@ -3889,7 +3889,7 @@ var require_core = __commonJS({
|
|
|
3889
3889
|
constructor(opts = {}) {
|
|
3890
3890
|
this.schemas = {};
|
|
3891
3891
|
this.refs = {};
|
|
3892
|
-
this.formats =
|
|
3892
|
+
this.formats = /* @__PURE__ */ Object.create(null);
|
|
3893
3893
|
this._compilations = /* @__PURE__ */ new Set();
|
|
3894
3894
|
this._loading = {};
|
|
3895
3895
|
this._cache = /* @__PURE__ */ new Map();
|
|
@@ -4388,9 +4388,9 @@ var require_core = __commonJS({
|
|
|
4388
4388
|
}
|
|
4389
4389
|
});
|
|
4390
4390
|
|
|
4391
|
-
// node_modules/.pnpm/ajv@8.
|
|
4391
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js
|
|
4392
4392
|
var require_id = __commonJS({
|
|
4393
|
-
"node_modules/.pnpm/ajv@8.
|
|
4393
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/id.js"(exports2) {
|
|
4394
4394
|
"use strict";
|
|
4395
4395
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4396
4396
|
var def = {
|
|
@@ -4403,9 +4403,9 @@ var require_id = __commonJS({
|
|
|
4403
4403
|
}
|
|
4404
4404
|
});
|
|
4405
4405
|
|
|
4406
|
-
// node_modules/.pnpm/ajv@8.
|
|
4406
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js
|
|
4407
4407
|
var require_ref = __commonJS({
|
|
4408
|
-
"node_modules/.pnpm/ajv@8.
|
|
4408
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/ref.js"(exports2) {
|
|
4409
4409
|
"use strict";
|
|
4410
4410
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4411
4411
|
exports2.callRef = exports2.getValidate = void 0;
|
|
@@ -4525,9 +4525,9 @@ var require_ref = __commonJS({
|
|
|
4525
4525
|
}
|
|
4526
4526
|
});
|
|
4527
4527
|
|
|
4528
|
-
// node_modules/.pnpm/ajv@8.
|
|
4528
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js
|
|
4529
4529
|
var require_core2 = __commonJS({
|
|
4530
|
-
"node_modules/.pnpm/ajv@8.
|
|
4530
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/core/index.js"(exports2) {
|
|
4531
4531
|
"use strict";
|
|
4532
4532
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4533
4533
|
var id_1 = require_id();
|
|
@@ -4546,9 +4546,9 @@ var require_core2 = __commonJS({
|
|
|
4546
4546
|
}
|
|
4547
4547
|
});
|
|
4548
4548
|
|
|
4549
|
-
// node_modules/.pnpm/ajv@8.
|
|
4549
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js
|
|
4550
4550
|
var require_limitNumber = __commonJS({
|
|
4551
|
-
"node_modules/.pnpm/ajv@8.
|
|
4551
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"(exports2) {
|
|
4552
4552
|
"use strict";
|
|
4553
4553
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4554
4554
|
var codegen_1 = require_codegen();
|
|
@@ -4578,9 +4578,9 @@ var require_limitNumber = __commonJS({
|
|
|
4578
4578
|
}
|
|
4579
4579
|
});
|
|
4580
4580
|
|
|
4581
|
-
// node_modules/.pnpm/ajv@8.
|
|
4581
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js
|
|
4582
4582
|
var require_multipleOf = __commonJS({
|
|
4583
|
-
"node_modules/.pnpm/ajv@8.
|
|
4583
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"(exports2) {
|
|
4584
4584
|
"use strict";
|
|
4585
4585
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4586
4586
|
var codegen_1 = require_codegen();
|
|
@@ -4606,9 +4606,9 @@ var require_multipleOf = __commonJS({
|
|
|
4606
4606
|
}
|
|
4607
4607
|
});
|
|
4608
4608
|
|
|
4609
|
-
// node_modules/.pnpm/ajv@8.
|
|
4609
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js
|
|
4610
4610
|
var require_ucs2length = __commonJS({
|
|
4611
|
-
"node_modules/.pnpm/ajv@8.
|
|
4611
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/ucs2length.js"(exports2) {
|
|
4612
4612
|
"use strict";
|
|
4613
4613
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4614
4614
|
function ucs2length(str) {
|
|
@@ -4632,9 +4632,9 @@ var require_ucs2length = __commonJS({
|
|
|
4632
4632
|
}
|
|
4633
4633
|
});
|
|
4634
4634
|
|
|
4635
|
-
// node_modules/.pnpm/ajv@8.
|
|
4635
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js
|
|
4636
4636
|
var require_limitLength = __commonJS({
|
|
4637
|
-
"node_modules/.pnpm/ajv@8.
|
|
4637
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitLength.js"(exports2) {
|
|
4638
4638
|
"use strict";
|
|
4639
4639
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4640
4640
|
var codegen_1 = require_codegen();
|
|
@@ -4664,12 +4664,13 @@ var require_limitLength = __commonJS({
|
|
|
4664
4664
|
}
|
|
4665
4665
|
});
|
|
4666
4666
|
|
|
4667
|
-
// node_modules/.pnpm/ajv@8.
|
|
4667
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js
|
|
4668
4668
|
var require_pattern = __commonJS({
|
|
4669
|
-
"node_modules/.pnpm/ajv@8.
|
|
4669
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/pattern.js"(exports2) {
|
|
4670
4670
|
"use strict";
|
|
4671
4671
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4672
4672
|
var code_1 = require_code2();
|
|
4673
|
+
var util_1 = require_util();
|
|
4673
4674
|
var codegen_1 = require_codegen();
|
|
4674
4675
|
var error = {
|
|
4675
4676
|
message: ({ schemaCode }) => (0, codegen_1.str)`must match pattern "${schemaCode}"`,
|
|
@@ -4682,19 +4683,27 @@ var require_pattern = __commonJS({
|
|
|
4682
4683
|
$data: true,
|
|
4683
4684
|
error,
|
|
4684
4685
|
code(cxt) {
|
|
4685
|
-
const { data, $data, schema, schemaCode, it } = cxt;
|
|
4686
|
+
const { gen, data, $data, schema, schemaCode, it } = cxt;
|
|
4686
4687
|
const u = it.opts.unicodeRegExp ? "u" : "";
|
|
4687
|
-
|
|
4688
|
-
|
|
4688
|
+
if ($data) {
|
|
4689
|
+
const { regExp } = it.opts.code;
|
|
4690
|
+
const regExpCode = regExp.code === "new RegExp" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);
|
|
4691
|
+
const valid = gen.let("valid");
|
|
4692
|
+
gen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));
|
|
4693
|
+
cxt.fail$data((0, codegen_1._)`!${valid}`);
|
|
4694
|
+
} else {
|
|
4695
|
+
const regExp = (0, code_1.usePattern)(cxt, schema);
|
|
4696
|
+
cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
|
|
4697
|
+
}
|
|
4689
4698
|
}
|
|
4690
4699
|
};
|
|
4691
4700
|
exports2.default = def;
|
|
4692
4701
|
}
|
|
4693
4702
|
});
|
|
4694
4703
|
|
|
4695
|
-
// node_modules/.pnpm/ajv@8.
|
|
4704
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js
|
|
4696
4705
|
var require_limitProperties = __commonJS({
|
|
4697
|
-
"node_modules/.pnpm/ajv@8.
|
|
4706
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"(exports2) {
|
|
4698
4707
|
"use strict";
|
|
4699
4708
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4700
4709
|
var codegen_1 = require_codegen();
|
|
@@ -4721,9 +4730,9 @@ var require_limitProperties = __commonJS({
|
|
|
4721
4730
|
}
|
|
4722
4731
|
});
|
|
4723
4732
|
|
|
4724
|
-
// node_modules/.pnpm/ajv@8.
|
|
4733
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js
|
|
4725
4734
|
var require_required = __commonJS({
|
|
4726
|
-
"node_modules/.pnpm/ajv@8.
|
|
4735
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/required.js"(exports2) {
|
|
4727
4736
|
"use strict";
|
|
4728
4737
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4729
4738
|
var code_1 = require_code2();
|
|
@@ -4803,9 +4812,9 @@ var require_required = __commonJS({
|
|
|
4803
4812
|
}
|
|
4804
4813
|
});
|
|
4805
4814
|
|
|
4806
|
-
// node_modules/.pnpm/ajv@8.
|
|
4815
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js
|
|
4807
4816
|
var require_limitItems = __commonJS({
|
|
4808
|
-
"node_modules/.pnpm/ajv@8.
|
|
4817
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitItems.js"(exports2) {
|
|
4809
4818
|
"use strict";
|
|
4810
4819
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4811
4820
|
var codegen_1 = require_codegen();
|
|
@@ -4832,9 +4841,9 @@ var require_limitItems = __commonJS({
|
|
|
4832
4841
|
}
|
|
4833
4842
|
});
|
|
4834
4843
|
|
|
4835
|
-
// node_modules/.pnpm/ajv@8.
|
|
4844
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js
|
|
4836
4845
|
var require_equal = __commonJS({
|
|
4837
|
-
"node_modules/.pnpm/ajv@8.
|
|
4846
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/runtime/equal.js"(exports2) {
|
|
4838
4847
|
"use strict";
|
|
4839
4848
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4840
4849
|
var equal = require_fast_deep_equal();
|
|
@@ -4843,9 +4852,9 @@ var require_equal = __commonJS({
|
|
|
4843
4852
|
}
|
|
4844
4853
|
});
|
|
4845
4854
|
|
|
4846
|
-
// node_modules/.pnpm/ajv@8.
|
|
4855
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js
|
|
4847
4856
|
var require_uniqueItems = __commonJS({
|
|
4848
|
-
"node_modules/.pnpm/ajv@8.
|
|
4857
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"(exports2) {
|
|
4849
4858
|
"use strict";
|
|
4850
4859
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4851
4860
|
var dataType_1 = require_dataType();
|
|
@@ -4910,9 +4919,9 @@ var require_uniqueItems = __commonJS({
|
|
|
4910
4919
|
}
|
|
4911
4920
|
});
|
|
4912
4921
|
|
|
4913
|
-
// node_modules/.pnpm/ajv@8.
|
|
4922
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js
|
|
4914
4923
|
var require_const = __commonJS({
|
|
4915
|
-
"node_modules/.pnpm/ajv@8.
|
|
4924
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/const.js"(exports2) {
|
|
4916
4925
|
"use strict";
|
|
4917
4926
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4918
4927
|
var codegen_1 = require_codegen();
|
|
@@ -4939,9 +4948,9 @@ var require_const = __commonJS({
|
|
|
4939
4948
|
}
|
|
4940
4949
|
});
|
|
4941
4950
|
|
|
4942
|
-
// node_modules/.pnpm/ajv@8.
|
|
4951
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js
|
|
4943
4952
|
var require_enum = __commonJS({
|
|
4944
|
-
"node_modules/.pnpm/ajv@8.
|
|
4953
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/enum.js"(exports2) {
|
|
4945
4954
|
"use strict";
|
|
4946
4955
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4947
4956
|
var codegen_1 = require_codegen();
|
|
@@ -4988,9 +4997,9 @@ var require_enum = __commonJS({
|
|
|
4988
4997
|
}
|
|
4989
4998
|
});
|
|
4990
4999
|
|
|
4991
|
-
// node_modules/.pnpm/ajv@8.
|
|
5000
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js
|
|
4992
5001
|
var require_validation = __commonJS({
|
|
4993
|
-
"node_modules/.pnpm/ajv@8.
|
|
5002
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/index.js"(exports2) {
|
|
4994
5003
|
"use strict";
|
|
4995
5004
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
4996
5005
|
var limitNumber_1 = require_limitNumber();
|
|
@@ -5026,9 +5035,9 @@ var require_validation = __commonJS({
|
|
|
5026
5035
|
}
|
|
5027
5036
|
});
|
|
5028
5037
|
|
|
5029
|
-
// node_modules/.pnpm/ajv@8.
|
|
5038
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js
|
|
5030
5039
|
var require_additionalItems = __commonJS({
|
|
5031
|
-
"node_modules/.pnpm/ajv@8.
|
|
5040
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"(exports2) {
|
|
5032
5041
|
"use strict";
|
|
5033
5042
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5034
5043
|
exports2.validateAdditionalItems = void 0;
|
|
@@ -5079,9 +5088,9 @@ var require_additionalItems = __commonJS({
|
|
|
5079
5088
|
}
|
|
5080
5089
|
});
|
|
5081
5090
|
|
|
5082
|
-
// node_modules/.pnpm/ajv@8.
|
|
5091
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js
|
|
5083
5092
|
var require_items = __commonJS({
|
|
5084
|
-
"node_modules/.pnpm/ajv@8.
|
|
5093
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items.js"(exports2) {
|
|
5085
5094
|
"use strict";
|
|
5086
5095
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5087
5096
|
exports2.validateTuple = void 0;
|
|
@@ -5136,9 +5145,9 @@ var require_items = __commonJS({
|
|
|
5136
5145
|
}
|
|
5137
5146
|
});
|
|
5138
5147
|
|
|
5139
|
-
// node_modules/.pnpm/ajv@8.
|
|
5148
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js
|
|
5140
5149
|
var require_prefixItems = __commonJS({
|
|
5141
|
-
"node_modules/.pnpm/ajv@8.
|
|
5150
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"(exports2) {
|
|
5142
5151
|
"use strict";
|
|
5143
5152
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5144
5153
|
var items_1 = require_items();
|
|
@@ -5153,9 +5162,9 @@ var require_prefixItems = __commonJS({
|
|
|
5153
5162
|
}
|
|
5154
5163
|
});
|
|
5155
5164
|
|
|
5156
|
-
// node_modules/.pnpm/ajv@8.
|
|
5165
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js
|
|
5157
5166
|
var require_items2020 = __commonJS({
|
|
5158
|
-
"node_modules/.pnpm/ajv@8.
|
|
5167
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/items2020.js"(exports2) {
|
|
5159
5168
|
"use strict";
|
|
5160
5169
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5161
5170
|
var codegen_1 = require_codegen();
|
|
@@ -5188,9 +5197,9 @@ var require_items2020 = __commonJS({
|
|
|
5188
5197
|
}
|
|
5189
5198
|
});
|
|
5190
5199
|
|
|
5191
|
-
// node_modules/.pnpm/ajv@8.
|
|
5200
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js
|
|
5192
5201
|
var require_contains = __commonJS({
|
|
5193
|
-
"node_modules/.pnpm/ajv@8.
|
|
5202
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/contains.js"(exports2) {
|
|
5194
5203
|
"use strict";
|
|
5195
5204
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5196
5205
|
var codegen_1 = require_codegen();
|
|
@@ -5282,9 +5291,9 @@ var require_contains = __commonJS({
|
|
|
5282
5291
|
}
|
|
5283
5292
|
});
|
|
5284
5293
|
|
|
5285
|
-
// node_modules/.pnpm/ajv@8.
|
|
5294
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js
|
|
5286
5295
|
var require_dependencies = __commonJS({
|
|
5287
|
-
"node_modules/.pnpm/ajv@8.
|
|
5296
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"(exports2) {
|
|
5288
5297
|
"use strict";
|
|
5289
5298
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5290
5299
|
exports2.validateSchemaDeps = exports2.validatePropertyDeps = exports2.error = void 0;
|
|
@@ -5376,9 +5385,9 @@ var require_dependencies = __commonJS({
|
|
|
5376
5385
|
}
|
|
5377
5386
|
});
|
|
5378
5387
|
|
|
5379
|
-
// node_modules/.pnpm/ajv@8.
|
|
5388
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js
|
|
5380
5389
|
var require_propertyNames = __commonJS({
|
|
5381
|
-
"node_modules/.pnpm/ajv@8.
|
|
5390
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"(exports2) {
|
|
5382
5391
|
"use strict";
|
|
5383
5392
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5384
5393
|
var codegen_1 = require_codegen();
|
|
@@ -5419,9 +5428,9 @@ var require_propertyNames = __commonJS({
|
|
|
5419
5428
|
}
|
|
5420
5429
|
});
|
|
5421
5430
|
|
|
5422
|
-
// node_modules/.pnpm/ajv@8.
|
|
5431
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js
|
|
5423
5432
|
var require_additionalProperties = __commonJS({
|
|
5424
|
-
"node_modules/.pnpm/ajv@8.
|
|
5433
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"(exports2) {
|
|
5425
5434
|
"use strict";
|
|
5426
5435
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5427
5436
|
var code_1 = require_code2();
|
|
@@ -5525,9 +5534,9 @@ var require_additionalProperties = __commonJS({
|
|
|
5525
5534
|
}
|
|
5526
5535
|
});
|
|
5527
5536
|
|
|
5528
|
-
// node_modules/.pnpm/ajv@8.
|
|
5537
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js
|
|
5529
5538
|
var require_properties = __commonJS({
|
|
5530
|
-
"node_modules/.pnpm/ajv@8.
|
|
5539
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/properties.js"(exports2) {
|
|
5531
5540
|
"use strict";
|
|
5532
5541
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5533
5542
|
var validate_1 = require_validate();
|
|
@@ -5583,9 +5592,9 @@ var require_properties = __commonJS({
|
|
|
5583
5592
|
}
|
|
5584
5593
|
});
|
|
5585
5594
|
|
|
5586
|
-
// node_modules/.pnpm/ajv@8.
|
|
5595
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js
|
|
5587
5596
|
var require_patternProperties = __commonJS({
|
|
5588
|
-
"node_modules/.pnpm/ajv@8.
|
|
5597
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"(exports2) {
|
|
5589
5598
|
"use strict";
|
|
5590
5599
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5591
5600
|
var code_1 = require_code2();
|
|
@@ -5657,9 +5666,9 @@ var require_patternProperties = __commonJS({
|
|
|
5657
5666
|
}
|
|
5658
5667
|
});
|
|
5659
5668
|
|
|
5660
|
-
// node_modules/.pnpm/ajv@8.
|
|
5669
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js
|
|
5661
5670
|
var require_not = __commonJS({
|
|
5662
|
-
"node_modules/.pnpm/ajv@8.
|
|
5671
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/not.js"(exports2) {
|
|
5663
5672
|
"use strict";
|
|
5664
5673
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5665
5674
|
var util_1 = require_util();
|
|
@@ -5688,9 +5697,9 @@ var require_not = __commonJS({
|
|
|
5688
5697
|
}
|
|
5689
5698
|
});
|
|
5690
5699
|
|
|
5691
|
-
// node_modules/.pnpm/ajv@8.
|
|
5700
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js
|
|
5692
5701
|
var require_anyOf = __commonJS({
|
|
5693
|
-
"node_modules/.pnpm/ajv@8.
|
|
5702
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"(exports2) {
|
|
5694
5703
|
"use strict";
|
|
5695
5704
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5696
5705
|
var code_1 = require_code2();
|
|
@@ -5705,9 +5714,9 @@ var require_anyOf = __commonJS({
|
|
|
5705
5714
|
}
|
|
5706
5715
|
});
|
|
5707
5716
|
|
|
5708
|
-
// node_modules/.pnpm/ajv@8.
|
|
5717
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js
|
|
5709
5718
|
var require_oneOf = __commonJS({
|
|
5710
|
-
"node_modules/.pnpm/ajv@8.
|
|
5719
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"(exports2) {
|
|
5711
5720
|
"use strict";
|
|
5712
5721
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5713
5722
|
var codegen_1 = require_codegen();
|
|
@@ -5763,9 +5772,9 @@ var require_oneOf = __commonJS({
|
|
|
5763
5772
|
}
|
|
5764
5773
|
});
|
|
5765
5774
|
|
|
5766
|
-
// node_modules/.pnpm/ajv@8.
|
|
5775
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js
|
|
5767
5776
|
var require_allOf = __commonJS({
|
|
5768
|
-
"node_modules/.pnpm/ajv@8.
|
|
5777
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/allOf.js"(exports2) {
|
|
5769
5778
|
"use strict";
|
|
5770
5779
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5771
5780
|
var util_1 = require_util();
|
|
@@ -5790,9 +5799,9 @@ var require_allOf = __commonJS({
|
|
|
5790
5799
|
}
|
|
5791
5800
|
});
|
|
5792
5801
|
|
|
5793
|
-
// node_modules/.pnpm/ajv@8.
|
|
5802
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js
|
|
5794
5803
|
var require_if = __commonJS({
|
|
5795
|
-
"node_modules/.pnpm/ajv@8.
|
|
5804
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/if.js"(exports2) {
|
|
5796
5805
|
"use strict";
|
|
5797
5806
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5798
5807
|
var codegen_1 = require_codegen();
|
|
@@ -5859,9 +5868,9 @@ var require_if = __commonJS({
|
|
|
5859
5868
|
}
|
|
5860
5869
|
});
|
|
5861
5870
|
|
|
5862
|
-
// node_modules/.pnpm/ajv@8.
|
|
5871
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js
|
|
5863
5872
|
var require_thenElse = __commonJS({
|
|
5864
|
-
"node_modules/.pnpm/ajv@8.
|
|
5873
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/thenElse.js"(exports2) {
|
|
5865
5874
|
"use strict";
|
|
5866
5875
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5867
5876
|
var util_1 = require_util();
|
|
@@ -5877,9 +5886,9 @@ var require_thenElse = __commonJS({
|
|
|
5877
5886
|
}
|
|
5878
5887
|
});
|
|
5879
5888
|
|
|
5880
|
-
// node_modules/.pnpm/ajv@8.
|
|
5889
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js
|
|
5881
5890
|
var require_applicator = __commonJS({
|
|
5882
|
-
"node_modules/.pnpm/ajv@8.
|
|
5891
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/index.js"(exports2) {
|
|
5883
5892
|
"use strict";
|
|
5884
5893
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5885
5894
|
var additionalItems_1 = require_additionalItems();
|
|
@@ -5925,9 +5934,9 @@ var require_applicator = __commonJS({
|
|
|
5925
5934
|
}
|
|
5926
5935
|
});
|
|
5927
5936
|
|
|
5928
|
-
// node_modules/.pnpm/ajv@8.
|
|
5937
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js
|
|
5929
5938
|
var require_format = __commonJS({
|
|
5930
|
-
"node_modules/.pnpm/ajv@8.
|
|
5939
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/format.js"(exports2) {
|
|
5931
5940
|
"use strict";
|
|
5932
5941
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
5933
5942
|
var codegen_1 = require_codegen();
|
|
@@ -6015,9 +6024,9 @@ var require_format = __commonJS({
|
|
|
6015
6024
|
}
|
|
6016
6025
|
});
|
|
6017
6026
|
|
|
6018
|
-
// node_modules/.pnpm/ajv@8.
|
|
6027
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js
|
|
6019
6028
|
var require_format2 = __commonJS({
|
|
6020
|
-
"node_modules/.pnpm/ajv@8.
|
|
6029
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/format/index.js"(exports2) {
|
|
6021
6030
|
"use strict";
|
|
6022
6031
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6023
6032
|
var format_1 = require_format();
|
|
@@ -6026,9 +6035,9 @@ var require_format2 = __commonJS({
|
|
|
6026
6035
|
}
|
|
6027
6036
|
});
|
|
6028
6037
|
|
|
6029
|
-
// node_modules/.pnpm/ajv@8.
|
|
6038
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js
|
|
6030
6039
|
var require_metadata = __commonJS({
|
|
6031
|
-
"node_modules/.pnpm/ajv@8.
|
|
6040
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/metadata.js"(exports2) {
|
|
6032
6041
|
"use strict";
|
|
6033
6042
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6034
6043
|
exports2.contentVocabulary = exports2.metadataVocabulary = void 0;
|
|
@@ -6049,9 +6058,9 @@ var require_metadata = __commonJS({
|
|
|
6049
6058
|
}
|
|
6050
6059
|
});
|
|
6051
6060
|
|
|
6052
|
-
// node_modules/.pnpm/ajv@8.
|
|
6061
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js
|
|
6053
6062
|
var require_draft7 = __commonJS({
|
|
6054
|
-
"node_modules/.pnpm/ajv@8.
|
|
6063
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft7.js"(exports2) {
|
|
6055
6064
|
"use strict";
|
|
6056
6065
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6057
6066
|
var core_1 = require_core2();
|
|
@@ -6071,9 +6080,9 @@ var require_draft7 = __commonJS({
|
|
|
6071
6080
|
}
|
|
6072
6081
|
});
|
|
6073
6082
|
|
|
6074
|
-
// node_modules/.pnpm/ajv@8.
|
|
6083
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js
|
|
6075
6084
|
var require_types = __commonJS({
|
|
6076
|
-
"node_modules/.pnpm/ajv@8.
|
|
6085
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/types.js"(exports2) {
|
|
6077
6086
|
"use strict";
|
|
6078
6087
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6079
6088
|
exports2.DiscrError = void 0;
|
|
@@ -6085,9 +6094,9 @@ var require_types = __commonJS({
|
|
|
6085
6094
|
}
|
|
6086
6095
|
});
|
|
6087
6096
|
|
|
6088
|
-
// node_modules/.pnpm/ajv@8.
|
|
6097
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js
|
|
6089
6098
|
var require_discriminator = __commonJS({
|
|
6090
|
-
"node_modules/.pnpm/ajv@8.
|
|
6099
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/discriminator/index.js"(exports2) {
|
|
6091
6100
|
"use strict";
|
|
6092
6101
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6093
6102
|
var codegen_1 = require_codegen();
|
|
@@ -6190,9 +6199,9 @@ var require_discriminator = __commonJS({
|
|
|
6190
6199
|
}
|
|
6191
6200
|
});
|
|
6192
6201
|
|
|
6193
|
-
// node_modules/.pnpm/ajv@8.
|
|
6202
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json
|
|
6194
6203
|
var require_json_schema_draft_07 = __commonJS({
|
|
6195
|
-
"node_modules/.pnpm/ajv@8.
|
|
6204
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-draft-07.json"(exports2, module2) {
|
|
6196
6205
|
module2.exports = {
|
|
6197
6206
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
6198
6207
|
$id: "http://json-schema.org/draft-07/schema#",
|
|
@@ -6347,9 +6356,9 @@ var require_json_schema_draft_07 = __commonJS({
|
|
|
6347
6356
|
}
|
|
6348
6357
|
});
|
|
6349
6358
|
|
|
6350
|
-
// node_modules/.pnpm/ajv@8.
|
|
6359
|
+
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js
|
|
6351
6360
|
var require_ajv = __commonJS({
|
|
6352
|
-
"node_modules/.pnpm/ajv@8.
|
|
6361
|
+
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/ajv.js"(exports2, module2) {
|
|
6353
6362
|
"use strict";
|
|
6354
6363
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
6355
6364
|
exports2.MissingRefError = exports2.ValidationError = exports2.CodeGen = exports2.Name = exports2.nil = exports2.stringify = exports2.str = exports2._ = exports2.KeywordCxt = exports2.Ajv = void 0;
|
|
@@ -6660,6 +6669,65 @@ var AttributeTransformer = class _AttributeTransformer extends Transformer {
|
|
|
6660
6669
|
}
|
|
6661
6670
|
};
|
|
6662
6671
|
|
|
6672
|
+
// src/transformers/boolean.ts
|
|
6673
|
+
var BooleanTransformer = class extends Transformer {
|
|
6674
|
+
static getName() {
|
|
6675
|
+
return "boolean";
|
|
6676
|
+
}
|
|
6677
|
+
inputType() {
|
|
6678
|
+
return BOOLEAN;
|
|
6679
|
+
}
|
|
6680
|
+
outputType() {
|
|
6681
|
+
return BOOLEAN;
|
|
6682
|
+
}
|
|
6683
|
+
transform({ val }) {
|
|
6684
|
+
if (Array.isArray(val)) {
|
|
6685
|
+
return val.length > 0;
|
|
6686
|
+
}
|
|
6687
|
+
if (val !== null && typeof val === "object") {
|
|
6688
|
+
return Object.keys(val).length > 0;
|
|
6689
|
+
}
|
|
6690
|
+
return Boolean(val);
|
|
6691
|
+
}
|
|
6692
|
+
};
|
|
6693
|
+
|
|
6694
|
+
// src/errors/invalid-parse-input-error.ts
|
|
6695
|
+
var InvalidParseInputError = class extends Error {
|
|
6696
|
+
constructor(property, message) {
|
|
6697
|
+
super(message);
|
|
6698
|
+
this.property = property;
|
|
6699
|
+
}
|
|
6700
|
+
};
|
|
6701
|
+
|
|
6702
|
+
// src/transformers/capitalize.ts
|
|
6703
|
+
var CapitalizeTransformer = class extends Transformer {
|
|
6704
|
+
static getName() {
|
|
6705
|
+
return "capitalize";
|
|
6706
|
+
}
|
|
6707
|
+
inputType() {
|
|
6708
|
+
return STRING;
|
|
6709
|
+
}
|
|
6710
|
+
outputType() {
|
|
6711
|
+
return STRING;
|
|
6712
|
+
}
|
|
6713
|
+
transform({ property, val }) {
|
|
6714
|
+
if (val === null) {
|
|
6715
|
+
return null;
|
|
6716
|
+
}
|
|
6717
|
+
if (typeof val !== "string") {
|
|
6718
|
+
throw new InvalidParseInputError(
|
|
6719
|
+
property,
|
|
6720
|
+
`CapitalizeTransformer.transform: invalid value type: ${typeof val}`
|
|
6721
|
+
);
|
|
6722
|
+
}
|
|
6723
|
+
if (val.length === 0) {
|
|
6724
|
+
return val;
|
|
6725
|
+
}
|
|
6726
|
+
const lower = val.toLowerCase();
|
|
6727
|
+
return lower.charAt(0).toUpperCase() + lower.slice(1);
|
|
6728
|
+
}
|
|
6729
|
+
};
|
|
6730
|
+
|
|
6663
6731
|
// src/transformers/exists.ts
|
|
6664
6732
|
var Exists = class extends Transformer {
|
|
6665
6733
|
static getName() {
|
|
@@ -6692,6 +6760,40 @@ var HTMLTransformer = class extends Transformer {
|
|
|
6692
6760
|
}
|
|
6693
6761
|
};
|
|
6694
6762
|
|
|
6763
|
+
// src/core/complex-types.ts
|
|
6764
|
+
var OBJECT = Symbol("OBJECT");
|
|
6765
|
+
var ARRAY = Symbol("ARRAY");
|
|
6766
|
+
|
|
6767
|
+
// src/transformers/join.ts
|
|
6768
|
+
var JoinTransformer = class extends Transformer {
|
|
6769
|
+
constructor(args) {
|
|
6770
|
+
super();
|
|
6771
|
+
this.args = args;
|
|
6772
|
+
}
|
|
6773
|
+
static getName() {
|
|
6774
|
+
return "join";
|
|
6775
|
+
}
|
|
6776
|
+
inputType() {
|
|
6777
|
+
return ARRAY;
|
|
6778
|
+
}
|
|
6779
|
+
outputType() {
|
|
6780
|
+
return STRING;
|
|
6781
|
+
}
|
|
6782
|
+
transform({ property, val }) {
|
|
6783
|
+
if (val === null) {
|
|
6784
|
+
return null;
|
|
6785
|
+
}
|
|
6786
|
+
if (!Array.isArray(val)) {
|
|
6787
|
+
throw new InvalidParseInputError(
|
|
6788
|
+
property,
|
|
6789
|
+
`JoinTransformer.transform: invalid value type: ${typeof val}`
|
|
6790
|
+
);
|
|
6791
|
+
}
|
|
6792
|
+
const [delimiter = ""] = this.args;
|
|
6793
|
+
return val.map((item) => String(item)).join(delimiter);
|
|
6794
|
+
}
|
|
6795
|
+
};
|
|
6796
|
+
|
|
6695
6797
|
// src/transformers/json.ts
|
|
6696
6798
|
var JSONTransformer = class extends Transformer {
|
|
6697
6799
|
static getName() {
|
|
@@ -6711,14 +6813,6 @@ var JSONTransformer = class extends Transformer {
|
|
|
6711
6813
|
}
|
|
6712
6814
|
};
|
|
6713
6815
|
|
|
6714
|
-
// src/errors/invalid-parse-input-error.ts
|
|
6715
|
-
var InvalidParseInputError = class extends Error {
|
|
6716
|
-
constructor(property, message) {
|
|
6717
|
-
super(message);
|
|
6718
|
-
this.property = property;
|
|
6719
|
-
}
|
|
6720
|
-
};
|
|
6721
|
-
|
|
6722
6816
|
// src/transformers/length.ts
|
|
6723
6817
|
var Length = class extends Transformer {
|
|
6724
6818
|
static getName() {
|
|
@@ -6741,6 +6835,31 @@ var Length = class extends Transformer {
|
|
|
6741
6835
|
}
|
|
6742
6836
|
};
|
|
6743
6837
|
|
|
6838
|
+
// src/transformers/lower.ts
|
|
6839
|
+
var LowerTransformer = class extends Transformer {
|
|
6840
|
+
static getName() {
|
|
6841
|
+
return "lower";
|
|
6842
|
+
}
|
|
6843
|
+
inputType() {
|
|
6844
|
+
return STRING;
|
|
6845
|
+
}
|
|
6846
|
+
outputType() {
|
|
6847
|
+
return STRING;
|
|
6848
|
+
}
|
|
6849
|
+
transform({ property, val }) {
|
|
6850
|
+
if (val === null) {
|
|
6851
|
+
return null;
|
|
6852
|
+
}
|
|
6853
|
+
if (typeof val === "string") {
|
|
6854
|
+
return val.toLowerCase();
|
|
6855
|
+
}
|
|
6856
|
+
throw new InvalidParseInputError(
|
|
6857
|
+
property,
|
|
6858
|
+
`LowerTransformer.transform: invalid value type: ${typeof val}`
|
|
6859
|
+
);
|
|
6860
|
+
}
|
|
6861
|
+
};
|
|
6862
|
+
|
|
6744
6863
|
// src/transformers/number.ts
|
|
6745
6864
|
var NumberTransformer = class extends Transformer {
|
|
6746
6865
|
static getName() {
|
|
@@ -6768,6 +6887,35 @@ var NumberTransformer = class extends Transformer {
|
|
|
6768
6887
|
}
|
|
6769
6888
|
};
|
|
6770
6889
|
|
|
6890
|
+
// src/transformers/remove-last-path-section.ts
|
|
6891
|
+
var RemoveLastPathSection = class _RemoveLastPathSection extends Transformer {
|
|
6892
|
+
static transformerName = "removeLastPathSection";
|
|
6893
|
+
static getName() {
|
|
6894
|
+
return _RemoveLastPathSection.transformerName;
|
|
6895
|
+
}
|
|
6896
|
+
inputType() {
|
|
6897
|
+
return STRING;
|
|
6898
|
+
}
|
|
6899
|
+
outputType() {
|
|
6900
|
+
return STRING;
|
|
6901
|
+
}
|
|
6902
|
+
transform({ val }) {
|
|
6903
|
+
if (val === null) return null;
|
|
6904
|
+
if (typeof val !== "string") {
|
|
6905
|
+
throw new Error(
|
|
6906
|
+
`${_RemoveLastPathSection.transformerName}: expects string. Got ${JSON.stringify(
|
|
6907
|
+
val
|
|
6908
|
+
)}`
|
|
6909
|
+
);
|
|
6910
|
+
}
|
|
6911
|
+
const url = new URL(val);
|
|
6912
|
+
const sections = url.pathname.split("/");
|
|
6913
|
+
sections.pop();
|
|
6914
|
+
url.pathname = sections.join("/");
|
|
6915
|
+
return url.toString();
|
|
6916
|
+
}
|
|
6917
|
+
};
|
|
6918
|
+
|
|
6771
6919
|
// src/transformers/remove-url-query-param.ts
|
|
6772
6920
|
var RemoveUrlQueryParam = class _RemoveUrlQueryParam extends Transformer {
|
|
6773
6921
|
constructor(args) {
|
|
@@ -6795,15 +6943,56 @@ var RemoveUrlQueryParam = class _RemoveUrlQueryParam extends Transformer {
|
|
|
6795
6943
|
)}`
|
|
6796
6944
|
);
|
|
6797
6945
|
}
|
|
6798
|
-
if (args.length === 0) return val;
|
|
6799
6946
|
const url = new URL(val);
|
|
6800
|
-
|
|
6801
|
-
url.searchParams.
|
|
6947
|
+
if (args.length === 0) {
|
|
6948
|
+
const keys = Array.from(url.searchParams.keys());
|
|
6949
|
+
keys.forEach((key) => {
|
|
6950
|
+
url.searchParams.delete(key);
|
|
6951
|
+
});
|
|
6952
|
+
} else {
|
|
6953
|
+
for (const paramName of args) {
|
|
6954
|
+
url.searchParams.delete(paramName);
|
|
6955
|
+
}
|
|
6802
6956
|
}
|
|
6803
6957
|
return url.toString();
|
|
6804
6958
|
}
|
|
6805
6959
|
};
|
|
6806
6960
|
|
|
6961
|
+
// src/transformers/replace.ts
|
|
6962
|
+
var ReplaceTransformer = class extends Transformer {
|
|
6963
|
+
constructor(args) {
|
|
6964
|
+
super();
|
|
6965
|
+
this.args = args;
|
|
6966
|
+
}
|
|
6967
|
+
static getName() {
|
|
6968
|
+
return "replace";
|
|
6969
|
+
}
|
|
6970
|
+
inputType() {
|
|
6971
|
+
return STRING;
|
|
6972
|
+
}
|
|
6973
|
+
outputType() {
|
|
6974
|
+
return STRING;
|
|
6975
|
+
}
|
|
6976
|
+
transform({ property, val }) {
|
|
6977
|
+
if (val === null) {
|
|
6978
|
+
return null;
|
|
6979
|
+
}
|
|
6980
|
+
if (typeof val !== "string") {
|
|
6981
|
+
throw new InvalidParseInputError(
|
|
6982
|
+
property,
|
|
6983
|
+
`ReplaceTransformer.transform: invalid value type: ${typeof val}`
|
|
6984
|
+
);
|
|
6985
|
+
}
|
|
6986
|
+
const [pattern, replacement] = this.args;
|
|
6987
|
+
if (pattern === void 0 || replacement === void 0) {
|
|
6988
|
+
throw new Error(
|
|
6989
|
+
'replace: requires a pattern and a replacement, e.g. replace("\\s+", " ")'
|
|
6990
|
+
);
|
|
6991
|
+
}
|
|
6992
|
+
return val.replace(new RegExp(pattern, "g"), replacement);
|
|
6993
|
+
}
|
|
6994
|
+
};
|
|
6995
|
+
|
|
6807
6996
|
// src/transformers/resolve.ts
|
|
6808
6997
|
var ResolveTransformer = class extends Transformer {
|
|
6809
6998
|
static getName() {
|
|
@@ -6826,6 +7015,40 @@ var ResolveTransformer = class extends Transformer {
|
|
|
6826
7015
|
}
|
|
6827
7016
|
};
|
|
6828
7017
|
|
|
7018
|
+
// src/transformers/split.ts
|
|
7019
|
+
var SplitTransformer = class extends Transformer {
|
|
7020
|
+
constructor(args) {
|
|
7021
|
+
super();
|
|
7022
|
+
this.args = args;
|
|
7023
|
+
}
|
|
7024
|
+
static getName() {
|
|
7025
|
+
return "split";
|
|
7026
|
+
}
|
|
7027
|
+
inputType() {
|
|
7028
|
+
return STRING;
|
|
7029
|
+
}
|
|
7030
|
+
outputType() {
|
|
7031
|
+
return ARRAY;
|
|
7032
|
+
}
|
|
7033
|
+
transform({ property, val }) {
|
|
7034
|
+
if (val === null) {
|
|
7035
|
+
return null;
|
|
7036
|
+
}
|
|
7037
|
+
if (typeof val !== "string") {
|
|
7038
|
+
throw new InvalidParseInputError(
|
|
7039
|
+
property,
|
|
7040
|
+
`SplitTransformer.transform: invalid value type: ${typeof val}`
|
|
7041
|
+
);
|
|
7042
|
+
}
|
|
7043
|
+
const [delimiter] = this.args;
|
|
7044
|
+
if (delimiter === void 0) {
|
|
7045
|
+
const trimmed = val.trim();
|
|
7046
|
+
return trimmed === "" ? [] : trimmed.split(/\s+/);
|
|
7047
|
+
}
|
|
7048
|
+
return val.split(delimiter);
|
|
7049
|
+
}
|
|
7050
|
+
};
|
|
7051
|
+
|
|
6829
7052
|
// src/transformers/trim.ts
|
|
6830
7053
|
var Trim = class extends Transformer {
|
|
6831
7054
|
static getName() {
|
|
@@ -6851,6 +7074,31 @@ var Trim = class extends Transformer {
|
|
|
6851
7074
|
}
|
|
6852
7075
|
};
|
|
6853
7076
|
|
|
7077
|
+
// src/transformers/upper.ts
|
|
7078
|
+
var UpperTransformer = class extends Transformer {
|
|
7079
|
+
static getName() {
|
|
7080
|
+
return "upper";
|
|
7081
|
+
}
|
|
7082
|
+
inputType() {
|
|
7083
|
+
return STRING;
|
|
7084
|
+
}
|
|
7085
|
+
outputType() {
|
|
7086
|
+
return STRING;
|
|
7087
|
+
}
|
|
7088
|
+
transform({ property, val }) {
|
|
7089
|
+
if (val === null) {
|
|
7090
|
+
return null;
|
|
7091
|
+
}
|
|
7092
|
+
if (typeof val === "string") {
|
|
7093
|
+
return val.toUpperCase();
|
|
7094
|
+
}
|
|
7095
|
+
throw new InvalidParseInputError(
|
|
7096
|
+
property,
|
|
7097
|
+
`UpperTransformer.transform: invalid value type: ${typeof val}`
|
|
7098
|
+
);
|
|
7099
|
+
}
|
|
7100
|
+
};
|
|
7101
|
+
|
|
6854
7102
|
// src/transformers/url-query-param.ts
|
|
6855
7103
|
var UrlQueryParamTransformer = class _UrlQueryParamTransformer extends Transformer {
|
|
6856
7104
|
constructor(args) {
|
|
@@ -6898,14 +7146,22 @@ var UrlQueryParamTransformer = class _UrlQueryParamTransformer extends Transform
|
|
|
6898
7146
|
var Transformers = class _Transformers {
|
|
6899
7147
|
static transformers = [
|
|
6900
7148
|
AttributeTransformer,
|
|
7149
|
+
BooleanTransformer,
|
|
7150
|
+
CapitalizeTransformer,
|
|
6901
7151
|
Exists,
|
|
6902
7152
|
HTMLTransformer,
|
|
7153
|
+
JoinTransformer,
|
|
6903
7154
|
JSONTransformer,
|
|
6904
7155
|
Length,
|
|
7156
|
+
LowerTransformer,
|
|
6905
7157
|
NumberTransformer,
|
|
7158
|
+
RemoveLastPathSection,
|
|
6906
7159
|
RemoveUrlQueryParam,
|
|
7160
|
+
ReplaceTransformer,
|
|
6907
7161
|
ResolveTransformer,
|
|
7162
|
+
SplitTransformer,
|
|
6908
7163
|
Trim,
|
|
7164
|
+
UpperTransformer,
|
|
6909
7165
|
UrlQueryParamTransformer
|
|
6910
7166
|
];
|
|
6911
7167
|
static getByName(name) {
|
|
@@ -6914,9 +7170,9 @@ var Transformers = class _Transformers {
|
|
|
6914
7170
|
};
|
|
6915
7171
|
|
|
6916
7172
|
// src/transformers/factory.ts
|
|
7173
|
+
var ARG_PATTERN = /(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|[\w-]+)/.source;
|
|
7174
|
+
var TRANSFORMER_DEFINITION_REGEX = `^[\\w-]+(\\((\\s*${ARG_PATTERN}\\s*(,\\s*${ARG_PATTERN}\\s*)*)?\\))?$`;
|
|
6917
7175
|
var TRANSFORMER_NAME_REGEX = /^([\w-]+[^(])/;
|
|
6918
|
-
var TRANSFORMER_ARGUMENT_PARANTHESIS_REGEX = /\(([\w-]+\s*,?\s*)*\)/;
|
|
6919
|
-
var TRANSFORMER_ARGUMENT_NAME_REGEX = /[\w-]+/g;
|
|
6920
7176
|
var TransformerFactory = class _TransformerFactory {
|
|
6921
7177
|
static create(transform) {
|
|
6922
7178
|
const transformerName = _TransformerFactory.extractTransformerName(transform);
|
|
@@ -6935,19 +7191,74 @@ var TransformerFactory = class _TransformerFactory {
|
|
|
6935
7191
|
return matches[0];
|
|
6936
7192
|
}
|
|
6937
7193
|
static extractTransformerArgs(def) {
|
|
6938
|
-
const
|
|
6939
|
-
|
|
6940
|
-
);
|
|
6941
|
-
if (argsParanthesisMatch === null) {
|
|
7194
|
+
const openIndex = def.indexOf("(");
|
|
7195
|
+
if (openIndex === -1) {
|
|
6942
7196
|
return [];
|
|
6943
7197
|
}
|
|
6944
|
-
const
|
|
6945
|
-
|
|
6946
|
-
);
|
|
6947
|
-
if (argMatches === null) {
|
|
7198
|
+
const closeIndex = def.lastIndexOf(")");
|
|
7199
|
+
if (closeIndex === -1 || closeIndex < openIndex) {
|
|
6948
7200
|
return [];
|
|
6949
7201
|
}
|
|
6950
|
-
return
|
|
7202
|
+
return _TransformerFactory.parseArgList(
|
|
7203
|
+
def.slice(openIndex + 1, closeIndex)
|
|
7204
|
+
);
|
|
7205
|
+
}
|
|
7206
|
+
/**
|
|
7207
|
+
* Parses a comma-separated argument list, honoring single- and
|
|
7208
|
+
* double-quoted arguments so that delimiters, regex patterns, and
|
|
7209
|
+
* replacement strings can contain commas, spaces, and other characters
|
|
7210
|
+
* that would otherwise conflict with the comma separator, e.g.
|
|
7211
|
+
* replace("\s+", " ") or split(", "). Inside a quoted argument, a
|
|
7212
|
+
* backslash escapes the matching quote character or another backslash
|
|
7213
|
+
* (\" or \\); any other backslash (e.g. the \s above) is left untouched
|
|
7214
|
+
* so regex patterns pass through unchanged. Bare (unquoted) arguments are
|
|
7215
|
+
* trimmed of surrounding whitespace but otherwise taken verbatim.
|
|
7216
|
+
*/
|
|
7217
|
+
static parseArgList(argsStr) {
|
|
7218
|
+
const args = [];
|
|
7219
|
+
let i = 0;
|
|
7220
|
+
const n = argsStr.length;
|
|
7221
|
+
const isSpace = (ch) => ch === " " || ch === " " || ch === "\n";
|
|
7222
|
+
while (i < n) {
|
|
7223
|
+
while (i < n && isSpace(argsStr.charAt(i))) {
|
|
7224
|
+
i += 1;
|
|
7225
|
+
}
|
|
7226
|
+
if (i >= n) {
|
|
7227
|
+
break;
|
|
7228
|
+
}
|
|
7229
|
+
const ch = argsStr.charAt(i);
|
|
7230
|
+
if (ch === '"' || ch === "'") {
|
|
7231
|
+
const quote = ch;
|
|
7232
|
+
i += 1;
|
|
7233
|
+
let value = "";
|
|
7234
|
+
while (i < n && argsStr.charAt(i) !== quote) {
|
|
7235
|
+
const c = argsStr.charAt(i);
|
|
7236
|
+
const next = argsStr.charAt(i + 1);
|
|
7237
|
+
if (c === "\\" && i + 1 < n && (next === quote || next === "\\")) {
|
|
7238
|
+
value += next;
|
|
7239
|
+
i += 2;
|
|
7240
|
+
} else {
|
|
7241
|
+
value += c;
|
|
7242
|
+
i += 1;
|
|
7243
|
+
}
|
|
7244
|
+
}
|
|
7245
|
+
i += 1;
|
|
7246
|
+
args.push(value);
|
|
7247
|
+
} else {
|
|
7248
|
+
const start = i;
|
|
7249
|
+
while (i < n && argsStr.charAt(i) !== ",") {
|
|
7250
|
+
i += 1;
|
|
7251
|
+
}
|
|
7252
|
+
args.push(argsStr.slice(start, i).trim());
|
|
7253
|
+
}
|
|
7254
|
+
while (i < n && isSpace(argsStr.charAt(i))) {
|
|
7255
|
+
i += 1;
|
|
7256
|
+
}
|
|
7257
|
+
if (i < n && argsStr.charAt(i) === ",") {
|
|
7258
|
+
i += 1;
|
|
7259
|
+
}
|
|
7260
|
+
}
|
|
7261
|
+
return args;
|
|
6951
7262
|
}
|
|
6952
7263
|
};
|
|
6953
7264
|
|
|
@@ -7124,13 +7435,13 @@ var oneOf = [
|
|
|
7124
7435
|
oneOf: [
|
|
7125
7436
|
{
|
|
7126
7437
|
type: "string",
|
|
7127
|
-
pattern:
|
|
7438
|
+
pattern: `^[\\w-]+(\\((\\s*(?:"(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|[\\w-]+)\\s*(,\\s*(?:"(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|[\\w-]+)\\s*)*)?\\))?$`
|
|
7128
7439
|
},
|
|
7129
7440
|
{
|
|
7130
7441
|
type: "array",
|
|
7131
7442
|
items: {
|
|
7132
7443
|
type: "string",
|
|
7133
|
-
pattern:
|
|
7444
|
+
pattern: `^[\\w-]+(\\((\\s*(?:"(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|[\\w-]+)\\s*(,\\s*(?:"(?:[^"\\\\]|\\\\.)*"|'(?:[^'\\\\]|\\\\.)*'|[\\w-]+)\\s*)*)?\\))?$`
|
|
7134
7445
|
},
|
|
7135
7446
|
minItems: 1
|
|
7136
7447
|
}
|