bguard 0.0.5 → 0.0.6
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/lib/InferType.js +1 -19
- package/lib/InferType.js.map +1 -1
- package/lib/asserts/array/index.js +7 -86
- package/lib/asserts/array/index.js.map +1 -1
- package/lib/asserts/array/index.mjs +7 -59
- package/lib/asserts/array/index.mjs.map +1 -1
- package/lib/asserts/boolean/index.js +7 -114
- package/lib/asserts/boolean/index.js.map +1 -1
- package/lib/asserts/boolean/index.mjs +7 -87
- package/lib/asserts/boolean/index.mjs.map +1 -1
- package/lib/asserts/common/equalTo.js +4 -50
- package/lib/asserts/common/equalTo.js.map +1 -1
- package/lib/asserts/common/equalTo.mjs +4 -23
- package/lib/asserts/common/equalTo.mjs.map +1 -1
- package/lib/asserts/common/index.js +6 -68
- package/lib/asserts/common/index.js.map +1 -1
- package/lib/asserts/common/index.mjs +6 -41
- package/lib/asserts/common/index.mjs.map +1 -1
- package/lib/asserts/number/index.js +8 -108
- package/lib/asserts/number/index.js.map +1 -1
- package/lib/asserts/number/index.mjs +8 -81
- package/lib/asserts/number/index.mjs.map +1 -1
- package/lib/asserts/number/max.js +6 -47
- package/lib/asserts/number/max.js.map +1 -1
- package/lib/asserts/number/max.mjs +3 -17
- package/lib/asserts/number/max.mjs.map +1 -1
- package/lib/asserts/number/maxExcluded.js +6 -47
- package/lib/asserts/number/maxExcluded.js.map +1 -1
- package/lib/asserts/number/maxExcluded.mjs +3 -17
- package/lib/asserts/number/maxExcluded.mjs.map +1 -1
- package/lib/asserts/number/min.js +6 -47
- package/lib/asserts/number/min.js.map +1 -1
- package/lib/asserts/number/min.mjs +3 -17
- package/lib/asserts/number/min.mjs.map +1 -1
- package/lib/asserts/number/minExcluded.js +6 -47
- package/lib/asserts/number/minExcluded.js.map +1 -1
- package/lib/asserts/number/minExcluded.mjs +3 -17
- package/lib/asserts/number/minExcluded.mjs.map +1 -1
- package/lib/asserts/number/negative.js +6 -47
- package/lib/asserts/number/negative.js.map +1 -1
- package/lib/asserts/number/negative.mjs +3 -17
- package/lib/asserts/number/negative.mjs.map +1 -1
- package/lib/asserts/number/positive.js +6 -47
- package/lib/asserts/number/positive.js.map +1 -1
- package/lib/asserts/number/positive.mjs +3 -17
- package/lib/asserts/number/positive.mjs.map +1 -1
- package/lib/asserts/object/index.js +7 -90
- package/lib/asserts/object/index.js.map +1 -1
- package/lib/asserts/object/index.mjs +7 -63
- package/lib/asserts/object/index.mjs.map +1 -1
- package/lib/asserts/string/email.js +6 -47
- package/lib/asserts/string/email.js.map +1 -1
- package/lib/asserts/string/email.mjs +3 -17
- package/lib/asserts/string/email.mjs.map +1 -1
- package/lib/asserts/string/index.js +8 -108
- package/lib/asserts/string/index.js.map +1 -1
- package/lib/asserts/string/index.mjs +8 -81
- package/lib/asserts/string/index.mjs.map +1 -1
- package/lib/asserts/string/maxLength.js +6 -47
- package/lib/asserts/string/maxLength.js.map +1 -1
- package/lib/asserts/string/maxLength.mjs +3 -17
- package/lib/asserts/string/maxLength.mjs.map +1 -1
- package/lib/asserts/string/minLength.js +6 -47
- package/lib/asserts/string/minLength.js.map +1 -1
- package/lib/asserts/string/minLength.mjs +3 -17
- package/lib/asserts/string/minLength.mjs.map +1 -1
- package/lib/asserts/string/regExp.js +6 -47
- package/lib/asserts/string/regExp.js.map +1 -1
- package/lib/asserts/string/regExp.mjs +3 -17
- package/lib/asserts/string/regExp.mjs.map +1 -1
- package/lib/chunk-2AP4OQMT.js +26 -0
- package/lib/chunk-2AP4OQMT.js.map +1 -0
- package/lib/chunk-32IQXZRK.mjs +13 -0
- package/lib/chunk-32IQXZRK.mjs.map +1 -0
- package/lib/chunk-3FEJUC3K.mjs +13 -0
- package/lib/chunk-3FEJUC3K.mjs.map +1 -0
- package/lib/chunk-5NCJN6D2.js +70 -0
- package/lib/chunk-5NCJN6D2.js.map +1 -0
- package/lib/chunk-5ZMICHV3.js +21 -0
- package/lib/chunk-5ZMICHV3.js.map +1 -0
- package/lib/chunk-63IQFNFO.mjs +27 -0
- package/lib/chunk-63IQFNFO.mjs.map +1 -0
- package/lib/chunk-A2SAWKJA.mjs +13 -0
- package/lib/chunk-A2SAWKJA.mjs.map +1 -0
- package/lib/chunk-A3UTB4RE.mjs +28 -0
- package/lib/chunk-A3UTB4RE.mjs.map +1 -0
- package/lib/chunk-A7I2JEQO.js +13 -0
- package/lib/chunk-A7I2JEQO.js.map +1 -0
- package/lib/chunk-AJ4WV5DG.mjs +13 -0
- package/lib/chunk-AJ4WV5DG.mjs.map +1 -0
- package/lib/chunk-APTTIN2L.js +42 -0
- package/lib/chunk-APTTIN2L.js.map +1 -0
- package/lib/chunk-AXOP6HPJ.js +14 -0
- package/lib/chunk-AXOP6HPJ.js.map +1 -0
- package/lib/chunk-BGMR7A6X.mjs +13 -0
- package/lib/chunk-BGMR7A6X.mjs.map +1 -0
- package/lib/chunk-FCFO5J5Y.mjs +14 -0
- package/lib/chunk-FCFO5J5Y.mjs.map +1 -0
- package/lib/chunk-GEZME6V2.mjs +39 -0
- package/lib/chunk-GEZME6V2.mjs.map +1 -0
- package/lib/chunk-GNBSKTFV.js +27 -0
- package/lib/chunk-GNBSKTFV.js.map +1 -0
- package/lib/chunk-IQ3QYABE.js +32 -0
- package/lib/chunk-IQ3QYABE.js.map +1 -0
- package/lib/chunk-K2S3FS5K.js +13 -0
- package/lib/chunk-K2S3FS5K.js.map +1 -0
- package/lib/chunk-KCBOOOTF.mjs +13 -0
- package/lib/chunk-KCBOOOTF.mjs.map +1 -0
- package/lib/chunk-L6A7NXUJ.js +13 -0
- package/lib/chunk-L6A7NXUJ.js.map +1 -0
- package/lib/chunk-L7HUXYFV.mjs +42 -0
- package/lib/chunk-L7HUXYFV.mjs.map +1 -0
- package/lib/chunk-LHTJHMKJ.mjs +27 -0
- package/lib/chunk-LHTJHMKJ.mjs.map +1 -0
- package/lib/chunk-NOADI6PO.mjs +21 -0
- package/lib/chunk-NOADI6PO.mjs.map +1 -0
- package/lib/chunk-NWY33MFU.js +13 -0
- package/lib/chunk-NWY33MFU.js.map +1 -0
- package/lib/chunk-P3Y6IWFA.mjs +70 -0
- package/lib/chunk-P3Y6IWFA.mjs.map +1 -0
- package/lib/chunk-PDVXBE27.js +27 -0
- package/lib/chunk-PDVXBE27.js.map +1 -0
- package/lib/chunk-PJP63SJT.js +13 -0
- package/lib/chunk-PJP63SJT.js.map +1 -0
- package/lib/chunk-QJOXKH7A.mjs +26 -0
- package/lib/chunk-QJOXKH7A.mjs.map +1 -0
- package/lib/chunk-QKGQ4XZC.js +13 -0
- package/lib/chunk-QKGQ4XZC.js.map +1 -0
- package/lib/chunk-QYLH5ZAC.mjs +32 -0
- package/lib/chunk-QYLH5ZAC.mjs.map +1 -0
- package/lib/chunk-VPFIIM2X.js +39 -0
- package/lib/chunk-VPFIIM2X.js.map +1 -0
- package/lib/chunk-YXHH5BF6.js +28 -0
- package/lib/chunk-YXHH5BF6.js.map +1 -0
- package/lib/core.js +6 -107
- package/lib/core.js.map +1 -1
- package/lib/core.mjs +5 -78
- package/lib/core.mjs.map +1 -1
- package/lib/exceptions.js +9 -50
- package/lib/exceptions.js.map +1 -1
- package/lib/exceptions.mjs +5 -19
- package/lib/exceptions.mjs.map +1 -1
- package/lib/index.js +29 -283
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +34 -252
- package/lib/index.mjs.map +1 -1
- package/lib/parseSchema.js +5 -115
- package/lib/parseSchema.js.map +1 -1
- package/lib/parseSchema.mjs +5 -88
- package/lib/parseSchema.mjs.map +1 -1
- package/lib/schemas/ArraySchema.js +6 -81
- package/lib/schemas/ArraySchema.js.map +1 -1
- package/lib/schemas/ArraySchema.mjs +6 -54
- package/lib/schemas/ArraySchema.mjs.map +1 -1
- package/lib/schemas/BooleanSchema.js +6 -109
- package/lib/schemas/BooleanSchema.js.map +1 -1
- package/lib/schemas/BooleanSchema.mjs +6 -82
- package/lib/schemas/BooleanSchema.mjs.map +1 -1
- package/lib/schemas/CommonSchema.js +5 -63
- package/lib/schemas/CommonSchema.js.map +1 -1
- package/lib/schemas/CommonSchema.mjs +5 -36
- package/lib/schemas/CommonSchema.mjs.map +1 -1
- package/lib/schemas/NumberSchema.js +7 -103
- package/lib/schemas/NumberSchema.js.map +1 -1
- package/lib/schemas/NumberSchema.mjs +7 -76
- package/lib/schemas/NumberSchema.mjs.map +1 -1
- package/lib/schemas/ObjectSchema.js +6 -85
- package/lib/schemas/ObjectSchema.js.map +1 -1
- package/lib/schemas/ObjectSchema.mjs +6 -58
- package/lib/schemas/ObjectSchema.mjs.map +1 -1
- package/lib/schemas/StringSchema.js +7 -103
- package/lib/schemas/StringSchema.js.map +1 -1
- package/lib/schemas/StringSchema.mjs +7 -76
- package/lib/schemas/StringSchema.mjs.map +1 -1
- package/package.json +4 -3
- package/lib/__tests__/ArraySchema.test.d.mts +0 -2
- package/lib/__tests__/ArraySchema.test.d.ts +0 -2
- package/lib/__tests__/ArraySchema.test.js +0 -201
- package/lib/__tests__/ArraySchema.test.js.map +0 -1
- package/lib/__tests__/ArraySchema.test.mjs +0 -199
- package/lib/__tests__/ArraySchema.test.mjs.map +0 -1
- package/lib/__tests__/BooleanSchema.test.d.mts +0 -2
- package/lib/__tests__/BooleanSchema.test.d.ts +0 -2
- package/lib/__tests__/BooleanSchema.test.js +0 -219
- package/lib/__tests__/BooleanSchema.test.js.map +0 -1
- package/lib/__tests__/BooleanSchema.test.mjs +0 -217
- package/lib/__tests__/BooleanSchema.test.mjs.map +0 -1
- package/lib/__tests__/CommonSchema.test.d.mts +0 -2
- package/lib/__tests__/CommonSchema.test.d.ts +0 -2
- package/lib/__tests__/CommonSchema.test.js +0 -253
- package/lib/__tests__/CommonSchema.test.js.map +0 -1
- package/lib/__tests__/CommonSchema.test.mjs +0 -251
- package/lib/__tests__/CommonSchema.test.mjs.map +0 -1
- package/lib/__tests__/MixTypes.test.d.mts +0 -2
- package/lib/__tests__/MixTypes.test.d.ts +0 -2
- package/lib/__tests__/MixTypes.test.js +0 -165
- package/lib/__tests__/MixTypes.test.js.map +0 -1
- package/lib/__tests__/MixTypes.test.mjs +0 -163
- package/lib/__tests__/MixTypes.test.mjs.map +0 -1
- package/lib/__tests__/NumberSchema.test.d.mts +0 -2
- package/lib/__tests__/NumberSchema.test.d.ts +0 -2
- package/lib/__tests__/NumberSchema.test.js +0 -253
- package/lib/__tests__/NumberSchema.test.js.map +0 -1
- package/lib/__tests__/NumberSchema.test.mjs +0 -251
- package/lib/__tests__/NumberSchema.test.mjs.map +0 -1
- package/lib/__tests__/ObjectSchema.test.d.mts +0 -2
- package/lib/__tests__/ObjectSchema.test.d.ts +0 -2
- package/lib/__tests__/ObjectSchema.test.js +0 -356
- package/lib/__tests__/ObjectSchema.test.js.map +0 -1
- package/lib/__tests__/ObjectSchema.test.mjs +0 -354
- package/lib/__tests__/ObjectSchema.test.mjs.map +0 -1
- package/lib/__tests__/StringSchema.test.d.mts +0 -2
- package/lib/__tests__/StringSchema.test.d.ts +0 -2
- package/lib/__tests__/StringSchema.test.js +0 -228
- package/lib/__tests__/StringSchema.test.js.map +0 -1
- package/lib/__tests__/StringSchema.test.mjs +0 -226
- package/lib/__tests__/StringSchema.test.mjs.map +0 -1
package/lib/core.js
CHANGED
|
@@ -1,111 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
19
2
|
|
|
20
|
-
// src/core.ts
|
|
21
|
-
var core_exports = {};
|
|
22
|
-
__export(core_exports, {
|
|
23
|
-
ctxSymbol: () => ctxSymbol,
|
|
24
|
-
innerCheck: () => innerCheck
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(core_exports);
|
|
27
3
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
expected;
|
|
31
|
-
received;
|
|
32
|
-
pathToError;
|
|
33
|
-
message;
|
|
34
|
-
constructor(expected, received, pathToError, message) {
|
|
35
|
-
super();
|
|
36
|
-
this.expected = expected;
|
|
37
|
-
this.received = received;
|
|
38
|
-
this.pathToError = pathToError;
|
|
39
|
-
this.message = message;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
function throwException(expected, received, pathToError, message) {
|
|
43
|
-
throw new ValidationError(expected, received, pathToError, message);
|
|
44
|
-
}
|
|
4
|
+
var _chunk5NCJN6D2js = require('./chunk-5NCJN6D2.js');
|
|
5
|
+
require('./chunk-2AP4OQMT.js');
|
|
45
6
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const ctx = schema[ctxSymbol];
|
|
50
|
-
if (receivedValue === void 0) {
|
|
51
|
-
if (!ctx.isOptional) throwException("Required", receivedValue, pathToError, "The required value is missing");
|
|
52
|
-
return receivedValue;
|
|
53
|
-
}
|
|
54
|
-
if (receivedValue === null) {
|
|
55
|
-
if (!ctx.isNullable) throwException("Not null", receivedValue, pathToError, "Value should not be null");
|
|
56
|
-
return receivedValue;
|
|
57
|
-
}
|
|
58
|
-
if (ctx.array) {
|
|
59
|
-
if (!Array.isArray(receivedValue))
|
|
60
|
-
throwException("Array", receivedValue, pathToError, "Expected an array but received a different type");
|
|
61
|
-
const schema2 = ctx.array;
|
|
62
|
-
receivedValue.forEach((elem, i) => {
|
|
63
|
-
innerCheck(schema2, elem, `${pathToError}[${i}]`);
|
|
64
|
-
});
|
|
65
|
-
return receivedValue;
|
|
66
|
-
}
|
|
67
|
-
const typeOfVal = typeof receivedValue;
|
|
68
|
-
if (ctx.object) {
|
|
69
|
-
if (typeOfVal !== "object")
|
|
70
|
-
throwException("Object", receivedValue, pathToError, "Expected an object but received a different type");
|
|
71
|
-
if (Array.isArray(receivedValue))
|
|
72
|
-
throwException(
|
|
73
|
-
"Object",
|
|
74
|
-
receivedValue,
|
|
75
|
-
pathToError,
|
|
76
|
-
"Expected an object but received an array. Invalid type of data"
|
|
77
|
-
);
|
|
78
|
-
const shapeSchema = ctx.object;
|
|
79
|
-
for (const keyPerReceivedValue of Object.keys(receivedValue)) {
|
|
80
|
-
if (shapeSchema[keyPerReceivedValue] === void 0)
|
|
81
|
-
throwException("Not allowed", keyPerReceivedValue, pathToError, "This key is not allowed in the object");
|
|
82
|
-
}
|
|
83
|
-
for (const [keyOfSchema, valueOfSchema] of Object.entries(shapeSchema)) {
|
|
84
|
-
const receivedObjectValuePropery = receivedValue[keyOfSchema];
|
|
85
|
-
if (receivedObjectValuePropery === void 0) {
|
|
86
|
-
if (!valueOfSchema[ctxSymbol].isOptional)
|
|
87
|
-
throwException(
|
|
88
|
-
"Required",
|
|
89
|
-
receivedObjectValuePropery,
|
|
90
|
-
pathToError,
|
|
91
|
-
"Missing required property in the object"
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
innerCheck(valueOfSchema, receivedObjectValuePropery, `${pathToError}.${keyOfSchema}`);
|
|
95
|
-
}
|
|
96
|
-
return receivedValue;
|
|
97
|
-
}
|
|
98
|
-
if (ctx.type.length) {
|
|
99
|
-
if (!ctx.type.includes(typeOfVal)) throwException(ctx.type, typeOfVal, pathToError, "Invalid type of data");
|
|
100
|
-
}
|
|
101
|
-
ctx.requiredValidations.forEach((requiredValidation) => {
|
|
102
|
-
requiredValidation(receivedValue, pathToError);
|
|
103
|
-
});
|
|
104
|
-
return receivedValue;
|
|
105
|
-
}
|
|
106
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
107
|
-
0 && (module.exports = {
|
|
108
|
-
ctxSymbol,
|
|
109
|
-
innerCheck
|
|
110
|
-
});
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
exports.ctxSymbol = _chunk5NCJN6D2js.ctxSymbol; exports.innerCheck = _chunk5NCJN6D2js.innerCheck;
|
|
111
10
|
//# sourceMappingURL=core.js.map
|
package/lib/core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/bguard/bguard/lib/core.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACA;AACF,iGAAC","file":"/home/runner/work/bguard/bguard/lib/core.js"}
|
package/lib/core.mjs
CHANGED
|
@@ -1,81 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
message;
|
|
7
|
-
constructor(expected, received, pathToError, message) {
|
|
8
|
-
super();
|
|
9
|
-
this.expected = expected;
|
|
10
|
-
this.received = received;
|
|
11
|
-
this.pathToError = pathToError;
|
|
12
|
-
this.message = message;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
function throwException(expected, received, pathToError, message) {
|
|
16
|
-
throw new ValidationError(expected, received, pathToError, message);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// src/core.ts
|
|
20
|
-
var ctxSymbol = Symbol("contextSymbol");
|
|
21
|
-
function innerCheck(schema, receivedValue, pathToError) {
|
|
22
|
-
const ctx = schema[ctxSymbol];
|
|
23
|
-
if (receivedValue === void 0) {
|
|
24
|
-
if (!ctx.isOptional) throwException("Required", receivedValue, pathToError, "The required value is missing");
|
|
25
|
-
return receivedValue;
|
|
26
|
-
}
|
|
27
|
-
if (receivedValue === null) {
|
|
28
|
-
if (!ctx.isNullable) throwException("Not null", receivedValue, pathToError, "Value should not be null");
|
|
29
|
-
return receivedValue;
|
|
30
|
-
}
|
|
31
|
-
if (ctx.array) {
|
|
32
|
-
if (!Array.isArray(receivedValue))
|
|
33
|
-
throwException("Array", receivedValue, pathToError, "Expected an array but received a different type");
|
|
34
|
-
const schema2 = ctx.array;
|
|
35
|
-
receivedValue.forEach((elem, i) => {
|
|
36
|
-
innerCheck(schema2, elem, `${pathToError}[${i}]`);
|
|
37
|
-
});
|
|
38
|
-
return receivedValue;
|
|
39
|
-
}
|
|
40
|
-
const typeOfVal = typeof receivedValue;
|
|
41
|
-
if (ctx.object) {
|
|
42
|
-
if (typeOfVal !== "object")
|
|
43
|
-
throwException("Object", receivedValue, pathToError, "Expected an object but received a different type");
|
|
44
|
-
if (Array.isArray(receivedValue))
|
|
45
|
-
throwException(
|
|
46
|
-
"Object",
|
|
47
|
-
receivedValue,
|
|
48
|
-
pathToError,
|
|
49
|
-
"Expected an object but received an array. Invalid type of data"
|
|
50
|
-
);
|
|
51
|
-
const shapeSchema = ctx.object;
|
|
52
|
-
for (const keyPerReceivedValue of Object.keys(receivedValue)) {
|
|
53
|
-
if (shapeSchema[keyPerReceivedValue] === void 0)
|
|
54
|
-
throwException("Not allowed", keyPerReceivedValue, pathToError, "This key is not allowed in the object");
|
|
55
|
-
}
|
|
56
|
-
for (const [keyOfSchema, valueOfSchema] of Object.entries(shapeSchema)) {
|
|
57
|
-
const receivedObjectValuePropery = receivedValue[keyOfSchema];
|
|
58
|
-
if (receivedObjectValuePropery === void 0) {
|
|
59
|
-
if (!valueOfSchema[ctxSymbol].isOptional)
|
|
60
|
-
throwException(
|
|
61
|
-
"Required",
|
|
62
|
-
receivedObjectValuePropery,
|
|
63
|
-
pathToError,
|
|
64
|
-
"Missing required property in the object"
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
innerCheck(valueOfSchema, receivedObjectValuePropery, `${pathToError}.${keyOfSchema}`);
|
|
68
|
-
}
|
|
69
|
-
return receivedValue;
|
|
70
|
-
}
|
|
71
|
-
if (ctx.type.length) {
|
|
72
|
-
if (!ctx.type.includes(typeOfVal)) throwException(ctx.type, typeOfVal, pathToError, "Invalid type of data");
|
|
73
|
-
}
|
|
74
|
-
ctx.requiredValidations.forEach((requiredValidation) => {
|
|
75
|
-
requiredValidation(receivedValue, pathToError);
|
|
76
|
-
});
|
|
77
|
-
return receivedValue;
|
|
78
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
ctxSymbol,
|
|
3
|
+
innerCheck
|
|
4
|
+
} from "./chunk-P3Y6IWFA.mjs";
|
|
5
|
+
import "./chunk-QJOXKH7A.mjs";
|
|
79
6
|
export {
|
|
80
7
|
ctxSymbol,
|
|
81
8
|
innerCheck
|
package/lib/core.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/lib/exceptions.js
CHANGED
|
@@ -1,52 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var ValidationError = class extends Error {
|
|
29
|
-
expected;
|
|
30
|
-
received;
|
|
31
|
-
pathToError;
|
|
32
|
-
message;
|
|
33
|
-
constructor(expected, received, pathToError, message) {
|
|
34
|
-
super();
|
|
35
|
-
this.expected = expected;
|
|
36
|
-
this.received = received;
|
|
37
|
-
this.pathToError = pathToError;
|
|
38
|
-
this.message = message;
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
var BuildSchemaError = class extends Error {
|
|
42
|
-
};
|
|
43
|
-
function throwException(expected, received, pathToError, message) {
|
|
44
|
-
throw new ValidationError(expected, received, pathToError, message);
|
|
45
|
-
}
|
|
46
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
-
0 && (module.exports = {
|
|
48
|
-
BuildSchemaError,
|
|
49
|
-
ValidationError,
|
|
50
|
-
throwException
|
|
51
|
-
});
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _chunk2AP4OQMTjs = require('./chunk-2AP4OQMT.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.BuildSchemaError = _chunk2AP4OQMTjs.BuildSchemaError; exports.ValidationError = _chunk2AP4OQMTjs.ValidationError; exports.throwException = _chunk2AP4OQMTjs.throwException;
|
|
52
11
|
//# sourceMappingURL=exceptions.js.map
|
package/lib/exceptions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/bguard/bguard/lib/exceptions.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACF,mLAAC","file":"/home/runner/work/bguard/bguard/lib/exceptions.js"}
|
package/lib/exceptions.mjs
CHANGED
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
message;
|
|
7
|
-
constructor(expected, received, pathToError, message) {
|
|
8
|
-
super();
|
|
9
|
-
this.expected = expected;
|
|
10
|
-
this.received = received;
|
|
11
|
-
this.pathToError = pathToError;
|
|
12
|
-
this.message = message;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
var BuildSchemaError = class extends Error {
|
|
16
|
-
};
|
|
17
|
-
function throwException(expected, received, pathToError, message) {
|
|
18
|
-
throw new ValidationError(expected, received, pathToError, message);
|
|
19
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
BuildSchemaError,
|
|
3
|
+
ValidationError,
|
|
4
|
+
throwException
|
|
5
|
+
} from "./chunk-QJOXKH7A.mjs";
|
|
20
6
|
export {
|
|
21
7
|
BuildSchemaError,
|
|
22
8
|
ValidationError,
|
package/lib/exceptions.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/lib/index.js
CHANGED
|
@@ -1,301 +1,47 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
var src_exports = {};
|
|
22
|
-
__export(src_exports, {
|
|
23
|
-
BuildSchemaError: () => BuildSchemaError,
|
|
24
|
-
ValidationError: () => ValidationError,
|
|
25
|
-
array: () => array,
|
|
26
|
-
boolean: () => boolean,
|
|
27
|
-
number: () => number,
|
|
28
|
-
object: () => object,
|
|
29
|
-
oneOfTypes: () => oneOfTypes,
|
|
30
|
-
parseSchema: () => parseSchema,
|
|
31
|
-
string: () => string,
|
|
32
|
-
throwException: () => throwException
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(src_exports);
|
|
3
|
+
var _chunkPJP63SJTjs = require('./chunk-PJP63SJT.js');
|
|
35
4
|
|
|
36
|
-
// src/exceptions.ts
|
|
37
|
-
var ValidationError = class extends Error {
|
|
38
|
-
expected;
|
|
39
|
-
received;
|
|
40
|
-
pathToError;
|
|
41
|
-
message;
|
|
42
|
-
constructor(expected, received, pathToError, message) {
|
|
43
|
-
super();
|
|
44
|
-
this.expected = expected;
|
|
45
|
-
this.received = received;
|
|
46
|
-
this.pathToError = pathToError;
|
|
47
|
-
this.message = message;
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
var BuildSchemaError = class extends Error {
|
|
51
|
-
};
|
|
52
|
-
function throwException(expected, received, pathToError, message) {
|
|
53
|
-
throw new ValidationError(expected, received, pathToError, message);
|
|
54
|
-
}
|
|
55
5
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const ctx = schema[ctxSymbol];
|
|
60
|
-
if (receivedValue === void 0) {
|
|
61
|
-
if (!ctx.isOptional) throwException("Required", receivedValue, pathToError, "The required value is missing");
|
|
62
|
-
return receivedValue;
|
|
63
|
-
}
|
|
64
|
-
if (receivedValue === null) {
|
|
65
|
-
if (!ctx.isNullable) throwException("Not null", receivedValue, pathToError, "Value should not be null");
|
|
66
|
-
return receivedValue;
|
|
67
|
-
}
|
|
68
|
-
if (ctx.array) {
|
|
69
|
-
if (!Array.isArray(receivedValue))
|
|
70
|
-
throwException("Array", receivedValue, pathToError, "Expected an array but received a different type");
|
|
71
|
-
const schema2 = ctx.array;
|
|
72
|
-
receivedValue.forEach((elem, i) => {
|
|
73
|
-
innerCheck(schema2, elem, `${pathToError}[${i}]`);
|
|
74
|
-
});
|
|
75
|
-
return receivedValue;
|
|
76
|
-
}
|
|
77
|
-
const typeOfVal = typeof receivedValue;
|
|
78
|
-
if (ctx.object) {
|
|
79
|
-
if (typeOfVal !== "object")
|
|
80
|
-
throwException("Object", receivedValue, pathToError, "Expected an object but received a different type");
|
|
81
|
-
if (Array.isArray(receivedValue))
|
|
82
|
-
throwException(
|
|
83
|
-
"Object",
|
|
84
|
-
receivedValue,
|
|
85
|
-
pathToError,
|
|
86
|
-
"Expected an object but received an array. Invalid type of data"
|
|
87
|
-
);
|
|
88
|
-
const shapeSchema = ctx.object;
|
|
89
|
-
for (const keyPerReceivedValue of Object.keys(receivedValue)) {
|
|
90
|
-
if (shapeSchema[keyPerReceivedValue] === void 0)
|
|
91
|
-
throwException("Not allowed", keyPerReceivedValue, pathToError, "This key is not allowed in the object");
|
|
92
|
-
}
|
|
93
|
-
for (const [keyOfSchema, valueOfSchema] of Object.entries(shapeSchema)) {
|
|
94
|
-
const receivedObjectValuePropery = receivedValue[keyOfSchema];
|
|
95
|
-
if (receivedObjectValuePropery === void 0) {
|
|
96
|
-
if (!valueOfSchema[ctxSymbol].isOptional)
|
|
97
|
-
throwException(
|
|
98
|
-
"Required",
|
|
99
|
-
receivedObjectValuePropery,
|
|
100
|
-
pathToError,
|
|
101
|
-
"Missing required property in the object"
|
|
102
|
-
);
|
|
103
|
-
}
|
|
104
|
-
innerCheck(valueOfSchema, receivedObjectValuePropery, `${pathToError}.${keyOfSchema}`);
|
|
105
|
-
}
|
|
106
|
-
return receivedValue;
|
|
107
|
-
}
|
|
108
|
-
if (ctx.type.length) {
|
|
109
|
-
if (!ctx.type.includes(typeOfVal)) throwException(ctx.type, typeOfVal, pathToError, "Invalid type of data");
|
|
110
|
-
}
|
|
111
|
-
ctx.requiredValidations.forEach((requiredValidation) => {
|
|
112
|
-
requiredValidation(receivedValue, pathToError);
|
|
113
|
-
});
|
|
114
|
-
return receivedValue;
|
|
115
|
-
}
|
|
6
|
+
var _chunkK2S3FS5Kjs = require('./chunk-K2S3FS5K.js');
|
|
7
|
+
require('./chunk-IQ3QYABE.js');
|
|
8
|
+
require('./chunk-PDVXBE27.js');
|
|
116
9
|
|
|
117
|
-
// src/parseSchema.ts
|
|
118
|
-
function parseSchema(schema, receivedValue) {
|
|
119
|
-
try {
|
|
120
|
-
return innerCheck(schema, receivedValue, "");
|
|
121
|
-
} catch (e) {
|
|
122
|
-
if (e instanceof ValidationError) throw e;
|
|
123
|
-
throw new Error("Something unexpected happened");
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
10
|
|
|
127
|
-
|
|
128
|
-
var equalTo = (expected) => (received, pathToError) => {
|
|
129
|
-
if (expected !== received)
|
|
130
|
-
throwException(expected, received, pathToError, "The received value is not equal to expected");
|
|
131
|
-
};
|
|
11
|
+
var _chunkL6A7NXUJjs = require('./chunk-L6A7NXUJ.js');
|
|
132
12
|
|
|
133
|
-
// src/schemas/CommonSchema.ts
|
|
134
|
-
var CommonSchema = class {
|
|
135
|
-
[ctxSymbol];
|
|
136
|
-
constructor(ctx) {
|
|
137
|
-
this[ctxSymbol] = ctx;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* @param validators - One or more custom validation functions.
|
|
141
|
-
* @returns {this} The schema instance with the added custom validation.
|
|
142
|
-
*/
|
|
143
|
-
custom(...validators) {
|
|
144
|
-
this[ctxSymbol].requiredValidations.push(...validators);
|
|
145
|
-
return this;
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Marks the schema as nullable, allowing the value to be `null`.
|
|
149
|
-
*
|
|
150
|
-
* @returns {WithNull<this>} The schema instance marked as nullable.
|
|
151
|
-
*/
|
|
152
|
-
nullable() {
|
|
153
|
-
this[ctxSymbol].isNullable = true;
|
|
154
|
-
return this;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Marks the schema as optional, allowing the value to be `undefined`.
|
|
158
|
-
*
|
|
159
|
-
* @returns {WithUndefined<this>}} The schema instance marked as optional.
|
|
160
|
-
*/
|
|
161
|
-
optional() {
|
|
162
|
-
this[ctxSymbol].isOptional = true;
|
|
163
|
-
return this;
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
13
|
|
|
167
|
-
|
|
168
|
-
var NumberSchema = class extends CommonSchema {
|
|
169
|
-
_number = 1;
|
|
170
|
-
/**
|
|
171
|
-
* Restricts the schema to exactly match the specified value and infers the literal value as the TypeScript type.
|
|
172
|
-
*
|
|
173
|
-
* @param expectedValue - The value that the schema must exactly match.
|
|
174
|
-
* @returns - The schema instance restricted to the specified value, with the literal value inferred as the TypeScript type
|
|
175
|
-
*
|
|
176
|
-
* @example - number().equalTo(42); // Infers the type 42
|
|
177
|
-
*/
|
|
178
|
-
equalTo(expectedValue) {
|
|
179
|
-
return this.custom(equalTo(expectedValue));
|
|
180
|
-
}
|
|
181
|
-
};
|
|
14
|
+
var _chunkA7I2JEQOjs = require('./chunk-A7I2JEQO.js');
|
|
182
15
|
|
|
183
|
-
// src/asserts/number/index.ts
|
|
184
|
-
function number() {
|
|
185
|
-
return new NumberSchema({ type: ["number"], requiredValidations: [] });
|
|
186
|
-
}
|
|
187
16
|
|
|
188
|
-
|
|
189
|
-
var StringSchema = class extends CommonSchema {
|
|
190
|
-
_string = 1;
|
|
191
|
-
/**
|
|
192
|
-
* Restricts the schema to exactly match the specified value and infers the literal value as the TypeScript type.
|
|
193
|
-
*
|
|
194
|
-
* @param expectedValue - The value that the schema must exactly match.
|
|
195
|
-
* @returns - The schema instance restricted to the specified value, with the literal value inferred as the TypeScript type
|
|
196
|
-
*
|
|
197
|
-
* @example - string().equalTo('hello'); // Infers the type 'hello'
|
|
198
|
-
*/
|
|
199
|
-
equalTo(expectedValue) {
|
|
200
|
-
return this.custom(equalTo(expectedValue));
|
|
201
|
-
}
|
|
202
|
-
};
|
|
17
|
+
var _chunkNWY33MFUjs = require('./chunk-NWY33MFU.js');
|
|
203
18
|
|
|
204
|
-
// src/asserts/string/index.ts
|
|
205
|
-
function string() {
|
|
206
|
-
return new StringSchema({ type: ["string"], requiredValidations: [] });
|
|
207
|
-
}
|
|
208
19
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
};
|
|
213
|
-
var BooleanSchema = class extends CommonSchema {
|
|
214
|
-
_boolean = 1;
|
|
215
|
-
/**
|
|
216
|
-
* Restricts the schema to exactly match the boolean value true and infers the true value as the TypeScript type.
|
|
217
|
-
*
|
|
218
|
-
* @returns - The schema instance restricted to the value true, with the true value inferred as the TypeScript type
|
|
219
|
-
*
|
|
220
|
-
* @example - boolean().onlyTrue(); // Infers the type true
|
|
221
|
-
*/
|
|
222
|
-
onlyTrue() {
|
|
223
|
-
return this.custom(isBoolean(true));
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* Restricts the schema to exactly match the boolean value false and infers the false value as the TypeScript type.
|
|
227
|
-
*
|
|
228
|
-
* @returns - The schema instance restricted to the value false, with the false value inferred as the TypeScript type
|
|
229
|
-
*
|
|
230
|
-
* @example - boolean().onlyFalse(); // Infers the type false
|
|
231
|
-
*/
|
|
232
|
-
onlyFalse() {
|
|
233
|
-
return this.custom(isBoolean(false));
|
|
234
|
-
}
|
|
235
|
-
};
|
|
20
|
+
var _chunkQKGQ4XZCjs = require('./chunk-QKGQ4XZC.js');
|
|
21
|
+
require('./chunk-GNBSKTFV.js');
|
|
22
|
+
require('./chunk-AXOP6HPJ.js');
|
|
236
23
|
|
|
237
|
-
// src/asserts/boolean/index.ts
|
|
238
|
-
function boolean() {
|
|
239
|
-
return new BooleanSchema({ type: ["boolean"], requiredValidations: [] });
|
|
240
|
-
}
|
|
241
24
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
this.validateArrayEntry(arraySchema);
|
|
248
|
-
this[ctxSymbol].array = arraySchema;
|
|
249
|
-
}
|
|
250
|
-
validateArrayEntry(arraySchema) {
|
|
251
|
-
if (!arraySchema) throw new BuildSchemaError("Missing schema in array method");
|
|
252
|
-
if (!(arraySchema instanceof CommonSchema)) throw new BuildSchemaError("Invalid schema in array method");
|
|
253
|
-
}
|
|
254
|
-
};
|
|
25
|
+
var _chunk5ZMICHV3js = require('./chunk-5ZMICHV3.js');
|
|
26
|
+
require('./chunk-YXHH5BF6.js');
|
|
27
|
+
require('./chunk-VPFIIM2X.js');
|
|
28
|
+
require('./chunk-APTTIN2L.js');
|
|
29
|
+
require('./chunk-5NCJN6D2.js');
|
|
255
30
|
|
|
256
|
-
// src/asserts/array/index.ts
|
|
257
|
-
function array(arraySchema) {
|
|
258
|
-
return new ArraySchema({ type: [], requiredValidations: [] }, arraySchema);
|
|
259
|
-
}
|
|
260
31
|
|
|
261
|
-
// src/schemas/ObjectSchema.ts
|
|
262
|
-
var ObjectSchema = class extends CommonSchema {
|
|
263
|
-
_object = 1;
|
|
264
|
-
constructor(ctx, shapeSchema) {
|
|
265
|
-
super(ctx);
|
|
266
|
-
this.validateObjectEntry(shapeSchema);
|
|
267
|
-
this[ctxSymbol].object = shapeSchema;
|
|
268
|
-
}
|
|
269
|
-
validateObjectEntry(shapeSchema) {
|
|
270
|
-
if (!shapeSchema) throw new BuildSchemaError("Missing schema in object method");
|
|
271
|
-
if (shapeSchema instanceof CommonSchema) throw new BuildSchemaError("Invalid schema in object");
|
|
272
|
-
for (const [key, value] of Object.entries(shapeSchema)) {
|
|
273
|
-
if (!(value instanceof CommonSchema))
|
|
274
|
-
throw new BuildSchemaError(`Invalid schema in object method for property '${key}'`);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
};
|
|
278
32
|
|
|
279
|
-
// src/asserts/object/index.ts
|
|
280
|
-
function object(shapeSchema) {
|
|
281
|
-
return new ObjectSchema({ type: [], requiredValidations: [] }, shapeSchema);
|
|
282
|
-
}
|
|
283
33
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
parseSchema,
|
|
298
|
-
string,
|
|
299
|
-
throwException
|
|
300
|
-
});
|
|
34
|
+
var _chunk2AP4OQMTjs = require('./chunk-2AP4OQMT.js');
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
exports.BuildSchemaError = _chunk2AP4OQMTjs.BuildSchemaError; exports.ValidationError = _chunk2AP4OQMTjs.ValidationError; exports.array = _chunkL6A7NXUJjs.array; exports.boolean = _chunkA7I2JEQOjs.boolean; exports.number = _chunkQKGQ4XZCjs.number; exports.object = _chunkK2S3FS5Kjs.object; exports.oneOfTypes = _chunkNWY33MFUjs.oneOfTypes; exports.parseSchema = _chunk5ZMICHV3js.parseSchema; exports.string = _chunkPJP63SJTjs.string; exports.throwException = _chunk2AP4OQMTjs.throwException;
|
|
301
47
|
//# sourceMappingURL=index.js.map
|