@valbuild/core 0.83.0 → 0.84.1
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/declarations/src/index.d.ts +2 -0
- package/dist/declarations/src/router.d.ts +24 -0
- package/dist/declarations/src/schema/index.d.ts +6 -2
- package/dist/declarations/src/schema/keyOf.d.ts +10 -2
- package/dist/declarations/src/schema/record.d.ts +7 -2
- package/dist/{index-6b263f20.cjs.prod.js → index-0bd0c826.cjs.prod.js} +476 -186
- package/dist/{index-55206077.cjs.dev.js → index-8ca3114a.cjs.dev.js} +476 -186
- package/dist/{index-ffbf9639.esm.js → index-b0586240.esm.js} +476 -186
- package/dist/valbuild-core.cjs.dev.js +1 -1
- package/dist/valbuild-core.cjs.prod.js +1 -1
- package/dist/valbuild-core.esm.js +1 -1
- package/package.json +1 -1
- package/patch/dist/valbuild-core-patch.cjs.dev.js +1 -1
- package/patch/dist/valbuild-core-patch.cjs.prod.js +1 -1
- package/patch/dist/valbuild-core-patch.esm.js +2 -2
@@ -191,7 +191,7 @@ var Schema = /*#__PURE__*/function () {
|
|
191
191
|
}
|
192
192
|
return _createClass(Schema, [{
|
193
193
|
key: "executeCustomValidateFunctions",
|
194
|
-
value: function executeCustomValidateFunctions(src, customValidateFunctions) {
|
194
|
+
value: function executeCustomValidateFunctions(src, customValidateFunctions, ctx) {
|
195
195
|
var errors = [];
|
196
196
|
var _iterator = result._createForOfIteratorHelper(customValidateFunctions),
|
197
197
|
_step;
|
@@ -199,7 +199,7 @@ var Schema = /*#__PURE__*/function () {
|
|
199
199
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
200
200
|
var customValidateFunction = _step.value;
|
201
201
|
try {
|
202
|
-
var result$1 = customValidateFunction(src);
|
202
|
+
var result$1 = customValidateFunction(src, ctx);
|
203
203
|
if (result$1) {
|
204
204
|
errors.push({
|
205
205
|
message: result$1,
|
@@ -405,7 +405,9 @@ var FileSchema = /*#__PURE__*/function (_Schema) {
|
|
405
405
|
}, {
|
406
406
|
key: "executeValidate",
|
407
407
|
value: function executeValidate(path, src) {
|
408
|
-
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions
|
408
|
+
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions, {
|
409
|
+
path: path
|
410
|
+
});
|
409
411
|
if (this.opt && (src === null || src === undefined)) {
|
410
412
|
return customValidationErrors.length > 0 ? _defineProperty({}, path, customValidationErrors) : false;
|
411
413
|
}
|
@@ -668,6 +670,170 @@ function unsafeCreateSourcePath(path, itemKey) {
|
|
668
670
|
return "".concat(path).concat(Internal.ModuleFilePathSep).concat(JSON.stringify(itemKey));
|
669
671
|
}
|
670
672
|
|
673
|
+
var StringSchema = /*#__PURE__*/function (_Schema) {
|
674
|
+
function StringSchema(options) {
|
675
|
+
var _this;
|
676
|
+
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
677
|
+
var isRaw = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
678
|
+
var customValidateFunctions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
679
|
+
_classCallCheck(this, StringSchema);
|
680
|
+
_this = _callSuper(this, StringSchema);
|
681
|
+
_this.options = options;
|
682
|
+
_this.opt = opt;
|
683
|
+
_this.isRaw = isRaw;
|
684
|
+
_this.customValidateFunctions = customValidateFunctions;
|
685
|
+
return _this;
|
686
|
+
}
|
687
|
+
|
688
|
+
/**
|
689
|
+
* @deprecated Use `minLength` instead
|
690
|
+
*/
|
691
|
+
_inherits(StringSchema, _Schema);
|
692
|
+
return _createClass(StringSchema, [{
|
693
|
+
key: "min",
|
694
|
+
value: function min(minLength) {
|
695
|
+
return this.minLength(minLength);
|
696
|
+
}
|
697
|
+
}, {
|
698
|
+
key: "minLength",
|
699
|
+
value: function minLength(_minLength) {
|
700
|
+
return new StringSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
|
701
|
+
minLength: _minLength
|
702
|
+
}), this.opt, this.isRaw);
|
703
|
+
}
|
704
|
+
|
705
|
+
/**
|
706
|
+
* @deprecated Use `maxLength` instead
|
707
|
+
*/
|
708
|
+
}, {
|
709
|
+
key: "max",
|
710
|
+
value: function max(maxLength) {
|
711
|
+
return this.maxLength(maxLength);
|
712
|
+
}
|
713
|
+
}, {
|
714
|
+
key: "maxLength",
|
715
|
+
value: function maxLength(_maxLength) {
|
716
|
+
return new StringSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
|
717
|
+
maxLength: _maxLength
|
718
|
+
}), this.opt, this.isRaw);
|
719
|
+
}
|
720
|
+
}, {
|
721
|
+
key: "regexp",
|
722
|
+
value: function regexp(_regexp, message) {
|
723
|
+
return new StringSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
|
724
|
+
regexp: _regexp,
|
725
|
+
regExpMessage: message
|
726
|
+
}), this.opt, this.isRaw);
|
727
|
+
}
|
728
|
+
}, {
|
729
|
+
key: "validate",
|
730
|
+
value: function validate(validationFunction) {
|
731
|
+
return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions.concat(validationFunction));
|
732
|
+
}
|
733
|
+
}, {
|
734
|
+
key: "executeValidate",
|
735
|
+
value: function executeValidate(path, src) {
|
736
|
+
var _this$options, _this$options2, _this$options3;
|
737
|
+
var errors = this.executeCustomValidateFunctions(src, this.customValidateFunctions, {
|
738
|
+
path: path
|
739
|
+
});
|
740
|
+
if (this.opt && (src === null || src === undefined)) {
|
741
|
+
return errors.length > 0 ? _defineProperty({}, path, errors) : false;
|
742
|
+
}
|
743
|
+
if (typeof src !== "string") {
|
744
|
+
return _defineProperty({}, path, [{
|
745
|
+
message: "Expected 'string', got '".concat(_typeof(src), "'"),
|
746
|
+
value: src
|
747
|
+
}]);
|
748
|
+
}
|
749
|
+
if ((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.maxLength && src.length > this.options.maxLength) {
|
750
|
+
errors.push({
|
751
|
+
message: "Expected string to be at most ".concat(this.options.maxLength, " characters long, got ").concat(src.length),
|
752
|
+
value: src
|
753
|
+
});
|
754
|
+
}
|
755
|
+
if ((_this$options2 = this.options) !== null && _this$options2 !== void 0 && _this$options2.minLength && src.length < this.options.minLength) {
|
756
|
+
errors.push({
|
757
|
+
message: "Expected string to be at least ".concat(this.options.minLength, " characters long, got ").concat(src.length),
|
758
|
+
value: src
|
759
|
+
});
|
760
|
+
}
|
761
|
+
if ((_this$options3 = this.options) !== null && _this$options3 !== void 0 && _this$options3.regexp && !this.options.regexp.test(src)) {
|
762
|
+
errors.push({
|
763
|
+
message: this.options.regExpMessage || "Expected string to match reg exp: ".concat(this.options.regexp.toString(), ", got '").concat(src, "'"),
|
764
|
+
value: src
|
765
|
+
});
|
766
|
+
}
|
767
|
+
if (errors.length > 0) {
|
768
|
+
return _defineProperty({}, path, errors);
|
769
|
+
}
|
770
|
+
return false;
|
771
|
+
}
|
772
|
+
}, {
|
773
|
+
key: "executeAssert",
|
774
|
+
value: function executeAssert(path, src) {
|
775
|
+
if (this.opt && src === null) {
|
776
|
+
return {
|
777
|
+
success: true,
|
778
|
+
data: src
|
779
|
+
};
|
780
|
+
}
|
781
|
+
if (typeof src === "string") {
|
782
|
+
return {
|
783
|
+
success: true,
|
784
|
+
data: src
|
785
|
+
};
|
786
|
+
}
|
787
|
+
return {
|
788
|
+
success: false,
|
789
|
+
errors: _defineProperty({}, path, [{
|
790
|
+
message: "Expected 'string', got '".concat(_typeof(src), "'"),
|
791
|
+
typeError: true
|
792
|
+
}])
|
793
|
+
};
|
794
|
+
}
|
795
|
+
}, {
|
796
|
+
key: "nullable",
|
797
|
+
value: function nullable() {
|
798
|
+
return new StringSchema(this.options, true, this.isRaw);
|
799
|
+
}
|
800
|
+
}, {
|
801
|
+
key: "raw",
|
802
|
+
value: function raw() {
|
803
|
+
return new StringSchema(this.options, this.opt, true);
|
804
|
+
}
|
805
|
+
}, {
|
806
|
+
key: "executeSerialize",
|
807
|
+
value: function executeSerialize() {
|
808
|
+
var _this$options4, _this$options5, _this$options6, _this$customValidateF, _this$customValidateF2;
|
809
|
+
return {
|
810
|
+
type: "string",
|
811
|
+
options: {
|
812
|
+
maxLength: (_this$options4 = this.options) === null || _this$options4 === void 0 ? void 0 : _this$options4.maxLength,
|
813
|
+
minLength: (_this$options5 = this.options) === null || _this$options5 === void 0 ? void 0 : _this$options5.minLength,
|
814
|
+
regexp: ((_this$options6 = this.options) === null || _this$options6 === void 0 ? void 0 : _this$options6.regexp) && {
|
815
|
+
message: this.options.regExpMessage,
|
816
|
+
source: this.options.regexp.source,
|
817
|
+
flags: this.options.regexp.flags
|
818
|
+
},
|
819
|
+
customValidate: this.customValidateFunctions && ((_this$customValidateF = this.customValidateFunctions) === null || _this$customValidateF === void 0 ? void 0 : _this$customValidateF.length) > 0
|
820
|
+
},
|
821
|
+
opt: this.opt,
|
822
|
+
raw: this.isRaw,
|
823
|
+
customValidate: this.customValidateFunctions && ((_this$customValidateF2 = this.customValidateFunctions) === null || _this$customValidateF2 === void 0 ? void 0 : _this$customValidateF2.length) > 0
|
824
|
+
};
|
825
|
+
}
|
826
|
+
}, {
|
827
|
+
key: "executeRender",
|
828
|
+
value: function executeRender() {
|
829
|
+
return {};
|
830
|
+
}
|
831
|
+
}]);
|
832
|
+
}(Schema);
|
833
|
+
var string = function string(options) {
|
834
|
+
return new StringSchema(options);
|
835
|
+
};
|
836
|
+
|
671
837
|
var ObjectSchema = /*#__PURE__*/function (_Schema) {
|
672
838
|
function ObjectSchema(items) {
|
673
839
|
var _this;
|
@@ -690,7 +856,9 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
|
|
690
856
|
key: "executeValidate",
|
691
857
|
value: function executeValidate(path, src) {
|
692
858
|
var error = false;
|
693
|
-
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions
|
859
|
+
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions, {
|
860
|
+
path: path
|
861
|
+
});
|
694
862
|
if (this.opt && (src === null || src === undefined)) {
|
695
863
|
return customValidationErrors.length > 0 ? _defineProperty({}, path, customValidationErrors) : false;
|
696
864
|
}
|
@@ -850,6 +1018,11 @@ var ObjectSchema = /*#__PURE__*/function (_Schema) {
|
|
850
1018
|
var object = function object(schema) {
|
851
1019
|
return new ObjectSchema(schema);
|
852
1020
|
};
|
1021
|
+
object({
|
1022
|
+
get test() {
|
1023
|
+
return string();
|
1024
|
+
}
|
1025
|
+
});
|
853
1026
|
|
854
1027
|
var ArraySchema = /*#__PURE__*/function (_Schema) {
|
855
1028
|
function ArraySchema(item) {
|
@@ -1047,7 +1220,9 @@ var LiteralSchema = /*#__PURE__*/function (_Schema) {
|
|
1047
1220
|
}, {
|
1048
1221
|
key: "executeValidate",
|
1049
1222
|
value: function executeValidate(path, src) {
|
1050
|
-
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions
|
1223
|
+
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions, {
|
1224
|
+
path: path
|
1225
|
+
});
|
1051
1226
|
if (this.opt && (src === null || src === undefined)) {
|
1052
1227
|
return customValidationErrors.length > 0 ? _defineProperty({}, path, customValidationErrors) : false;
|
1053
1228
|
}
|
@@ -1149,7 +1324,9 @@ var UnionSchema = /*#__PURE__*/function (_Schema) {
|
|
1149
1324
|
}, {
|
1150
1325
|
key: "executeValidate",
|
1151
1326
|
value: function executeValidate(path, src) {
|
1152
|
-
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions
|
1327
|
+
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions, {
|
1328
|
+
path: path
|
1329
|
+
});
|
1153
1330
|
var unknownSrc = src;
|
1154
1331
|
if (this.opt && unknownSrc === null) {
|
1155
1332
|
return customValidationErrors.length > 0 ? _defineProperty({}, path, customValidationErrors) : false;
|
@@ -1542,7 +1719,9 @@ var ImageSchema = /*#__PURE__*/function (_Schema) {
|
|
1542
1719
|
}, {
|
1543
1720
|
key: "executeValidate",
|
1544
1721
|
value: function executeValidate(path, src) {
|
1545
|
-
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions
|
1722
|
+
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions, {
|
1723
|
+
path: path
|
1724
|
+
});
|
1546
1725
|
if (this.opt && (src === null || src === undefined)) {
|
1547
1726
|
return customValidationErrors.length > 0 ? _defineProperty({}, path, customValidationErrors) : false;
|
1548
1727
|
}
|
@@ -1769,7 +1948,9 @@ var RichTextSchema = /*#__PURE__*/function (_Schema) {
|
|
1769
1948
|
}, {
|
1770
1949
|
key: "executeValidate",
|
1771
1950
|
value: function executeValidate(path, src) {
|
1772
|
-
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions
|
1951
|
+
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions, {
|
1952
|
+
path: path
|
1953
|
+
});
|
1773
1954
|
var assertRes = this.executeAssert(path, src);
|
1774
1955
|
if (!assertRes.success) {
|
1775
1956
|
return customValidationErrors.length > 0 ? _defineProperty({}, path, customValidationErrors) : assertRes.errors;
|
@@ -2197,12 +2378,14 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2197
2378
|
var _this;
|
2198
2379
|
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
2199
2380
|
var customValidateFunctions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
2381
|
+
var currentRouter = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
2200
2382
|
_classCallCheck(this, RecordSchema);
|
2201
2383
|
_this = _callSuper(this, RecordSchema);
|
2202
2384
|
_defineProperty(_this, "renderInput", null);
|
2203
2385
|
_this.item = item;
|
2204
2386
|
_this.opt = opt;
|
2205
2387
|
_this.customValidateFunctions = customValidateFunctions;
|
2388
|
+
_this.currentRouter = currentRouter;
|
2206
2389
|
return _this;
|
2207
2390
|
}
|
2208
2391
|
_inherits(RecordSchema, _Schema);
|
@@ -2216,7 +2399,9 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2216
2399
|
value: function executeValidate(path, src) {
|
2217
2400
|
var _this2 = this;
|
2218
2401
|
var error = false;
|
2219
|
-
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions
|
2402
|
+
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions, {
|
2403
|
+
path: path
|
2404
|
+
});
|
2220
2405
|
if (this.opt && (src === null || src === undefined)) {
|
2221
2406
|
return customValidationErrors.length > 0 ? _defineProperty({}, path, customValidationErrors) : false;
|
2222
2407
|
}
|
@@ -2235,6 +2420,10 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2235
2420
|
message: "Expected 'object', got 'array'"
|
2236
2421
|
}]));
|
2237
2422
|
}
|
2423
|
+
var routerValidations = this.getRouterValidations(path, src);
|
2424
|
+
if (routerValidations) {
|
2425
|
+
return routerValidations;
|
2426
|
+
}
|
2238
2427
|
var _iterator = result._createForOfIteratorHelper(customValidationErrors),
|
2239
2428
|
_step;
|
2240
2429
|
try {
|
@@ -2304,14 +2493,62 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2304
2493
|
value: function nullable() {
|
2305
2494
|
return new RecordSchema(this.item, true);
|
2306
2495
|
}
|
2496
|
+
}, {
|
2497
|
+
key: "router",
|
2498
|
+
value: function router(_router) {
|
2499
|
+
return new RecordSchema(this.item, this.opt, this.customValidateFunctions, _router);
|
2500
|
+
}
|
2501
|
+
}, {
|
2502
|
+
key: "getRouterValidations",
|
2503
|
+
value: function getRouterValidations(path, src) {
|
2504
|
+
if (!this.currentRouter) {
|
2505
|
+
return false;
|
2506
|
+
}
|
2507
|
+
if (src === null) {
|
2508
|
+
return false;
|
2509
|
+
}
|
2510
|
+
var _splitModuleFilePathA = splitModuleFilePathAndModulePath(path),
|
2511
|
+
_splitModuleFilePathA2 = _slicedToArray(_splitModuleFilePathA, 2),
|
2512
|
+
moduleFilePath = _splitModuleFilePathA2[0],
|
2513
|
+
modulePath = _splitModuleFilePathA2[1];
|
2514
|
+
if (modulePath) {
|
2515
|
+
return _defineProperty({}, path, [{
|
2516
|
+
message: "This field was configured as a router, but it is not defined at the root of the module",
|
2517
|
+
schemaError: true
|
2518
|
+
}]);
|
2519
|
+
}
|
2520
|
+
var routerValidations = this.currentRouter.validate(moduleFilePath, Object.keys(src));
|
2521
|
+
if (routerValidations.length > 0) {
|
2522
|
+
return Object.fromEntries(routerValidations.map(function (validation) {
|
2523
|
+
if (!validation.error.urlPath) {
|
2524
|
+
return [path, [{
|
2525
|
+
message: "Router validation error: ".concat(validation.error.message, " has no url path"),
|
2526
|
+
schemaError: true
|
2527
|
+
}]];
|
2528
|
+
}
|
2529
|
+
var subPath = createValPathOfItem(path, validation.error.urlPath);
|
2530
|
+
if (!subPath) {
|
2531
|
+
return [path, [{
|
2532
|
+
message: "Could not create path for router validation error",
|
2533
|
+
schemaError: true
|
2534
|
+
}]];
|
2535
|
+
}
|
2536
|
+
return [subPath, [{
|
2537
|
+
message: validation.error.message
|
2538
|
+
}]];
|
2539
|
+
}));
|
2540
|
+
}
|
2541
|
+
return false;
|
2542
|
+
}
|
2307
2543
|
}, {
|
2308
2544
|
key: "executeSerialize",
|
2309
2545
|
value: function executeSerialize() {
|
2310
|
-
var _this$customValidateF;
|
2546
|
+
var _this$currentRouter, _this$customValidateF;
|
2311
2547
|
return {
|
2312
2548
|
type: "record",
|
2313
2549
|
item: this.item["executeSerialize"](),
|
2314
2550
|
opt: this.opt,
|
2551
|
+
router: (_this$currentRouter = this.currentRouter) === null || _this$currentRouter === void 0 ? void 0 : _this$currentRouter.getRouterId(),
|
2315
2552
|
customValidate: this.customValidateFunctions && ((_this$customValidateF = this.customValidateFunctions) === null || _this$customValidateF === void 0 ? void 0 : _this$customValidateF.length) > 0
|
2316
2553
|
};
|
2317
2554
|
}
|
@@ -2350,10 +2587,10 @@ var RecordSchema = /*#__PURE__*/function (_Schema) {
|
|
2350
2587
|
data: {
|
2351
2588
|
layout: "list",
|
2352
2589
|
parent: "record",
|
2353
|
-
items: Object.entries(src).map(function (
|
2354
|
-
var
|
2355
|
-
key =
|
2356
|
-
val =
|
2590
|
+
items: Object.entries(src).map(function (_ref8) {
|
2591
|
+
var _ref9 = _slicedToArray(_ref8, 2),
|
2592
|
+
key = _ref9[0],
|
2593
|
+
val = _ref9[1];
|
2357
2594
|
// NB NB: display is actually defined by the user
|
2358
2595
|
var _prepare = prepare({
|
2359
2596
|
key: key,
|
@@ -2913,7 +3150,9 @@ var NumberSchema = /*#__PURE__*/function (_Schema) {
|
|
2913
3150
|
key: "executeValidate",
|
2914
3151
|
value: function executeValidate(path, src) {
|
2915
3152
|
var _this$options, _this$options2;
|
2916
|
-
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions
|
3153
|
+
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions, {
|
3154
|
+
path: path
|
3155
|
+
});
|
2917
3156
|
if (this.opt && (src === null || src === undefined)) {
|
2918
3157
|
return customValidationErrors.length > 0 ? _defineProperty({}, path, customValidationErrors) : false;
|
2919
3158
|
}
|
@@ -3013,168 +3252,6 @@ var number = function number(options) {
|
|
3013
3252
|
return new NumberSchema(options);
|
3014
3253
|
};
|
3015
3254
|
|
3016
|
-
var StringSchema = /*#__PURE__*/function (_Schema) {
|
3017
|
-
function StringSchema(options) {
|
3018
|
-
var _this;
|
3019
|
-
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
3020
|
-
var isRaw = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
3021
|
-
var customValidateFunctions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
3022
|
-
_classCallCheck(this, StringSchema);
|
3023
|
-
_this = _callSuper(this, StringSchema);
|
3024
|
-
_this.options = options;
|
3025
|
-
_this.opt = opt;
|
3026
|
-
_this.isRaw = isRaw;
|
3027
|
-
_this.customValidateFunctions = customValidateFunctions;
|
3028
|
-
return _this;
|
3029
|
-
}
|
3030
|
-
|
3031
|
-
/**
|
3032
|
-
* @deprecated Use `minLength` instead
|
3033
|
-
*/
|
3034
|
-
_inherits(StringSchema, _Schema);
|
3035
|
-
return _createClass(StringSchema, [{
|
3036
|
-
key: "min",
|
3037
|
-
value: function min(minLength) {
|
3038
|
-
return this.minLength(minLength);
|
3039
|
-
}
|
3040
|
-
}, {
|
3041
|
-
key: "minLength",
|
3042
|
-
value: function minLength(_minLength) {
|
3043
|
-
return new StringSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
|
3044
|
-
minLength: _minLength
|
3045
|
-
}), this.opt, this.isRaw);
|
3046
|
-
}
|
3047
|
-
|
3048
|
-
/**
|
3049
|
-
* @deprecated Use `maxLength` instead
|
3050
|
-
*/
|
3051
|
-
}, {
|
3052
|
-
key: "max",
|
3053
|
-
value: function max(maxLength) {
|
3054
|
-
return this.maxLength(maxLength);
|
3055
|
-
}
|
3056
|
-
}, {
|
3057
|
-
key: "maxLength",
|
3058
|
-
value: function maxLength(_maxLength) {
|
3059
|
-
return new StringSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
|
3060
|
-
maxLength: _maxLength
|
3061
|
-
}), this.opt, this.isRaw);
|
3062
|
-
}
|
3063
|
-
}, {
|
3064
|
-
key: "regexp",
|
3065
|
-
value: function regexp(_regexp, message) {
|
3066
|
-
return new StringSchema(_objectSpread2(_objectSpread2({}, this.options), {}, {
|
3067
|
-
regexp: _regexp,
|
3068
|
-
regExpMessage: message
|
3069
|
-
}), this.opt, this.isRaw);
|
3070
|
-
}
|
3071
|
-
}, {
|
3072
|
-
key: "validate",
|
3073
|
-
value: function validate(validationFunction) {
|
3074
|
-
return new StringSchema(this.options, this.opt, this.isRaw, this.customValidateFunctions.concat(validationFunction));
|
3075
|
-
}
|
3076
|
-
}, {
|
3077
|
-
key: "executeValidate",
|
3078
|
-
value: function executeValidate(path, src) {
|
3079
|
-
var _this$options, _this$options2, _this$options3;
|
3080
|
-
var errors = this.executeCustomValidateFunctions(src, this.customValidateFunctions);
|
3081
|
-
if (this.opt && (src === null || src === undefined)) {
|
3082
|
-
return errors.length > 0 ? _defineProperty({}, path, errors) : false;
|
3083
|
-
}
|
3084
|
-
if (typeof src !== "string") {
|
3085
|
-
return _defineProperty({}, path, [{
|
3086
|
-
message: "Expected 'string', got '".concat(_typeof(src), "'"),
|
3087
|
-
value: src
|
3088
|
-
}]);
|
3089
|
-
}
|
3090
|
-
if ((_this$options = this.options) !== null && _this$options !== void 0 && _this$options.maxLength && src.length > this.options.maxLength) {
|
3091
|
-
errors.push({
|
3092
|
-
message: "Expected string to be at most ".concat(this.options.maxLength, " characters long, got ").concat(src.length),
|
3093
|
-
value: src
|
3094
|
-
});
|
3095
|
-
}
|
3096
|
-
if ((_this$options2 = this.options) !== null && _this$options2 !== void 0 && _this$options2.minLength && src.length < this.options.minLength) {
|
3097
|
-
errors.push({
|
3098
|
-
message: "Expected string to be at least ".concat(this.options.minLength, " characters long, got ").concat(src.length),
|
3099
|
-
value: src
|
3100
|
-
});
|
3101
|
-
}
|
3102
|
-
if ((_this$options3 = this.options) !== null && _this$options3 !== void 0 && _this$options3.regexp && !this.options.regexp.test(src)) {
|
3103
|
-
errors.push({
|
3104
|
-
message: this.options.regExpMessage || "Expected string to match reg exp: ".concat(this.options.regexp.toString(), ", got '").concat(src, "'"),
|
3105
|
-
value: src
|
3106
|
-
});
|
3107
|
-
}
|
3108
|
-
if (errors.length > 0) {
|
3109
|
-
return _defineProperty({}, path, errors);
|
3110
|
-
}
|
3111
|
-
return false;
|
3112
|
-
}
|
3113
|
-
}, {
|
3114
|
-
key: "executeAssert",
|
3115
|
-
value: function executeAssert(path, src) {
|
3116
|
-
if (this.opt && src === null) {
|
3117
|
-
return {
|
3118
|
-
success: true,
|
3119
|
-
data: src
|
3120
|
-
};
|
3121
|
-
}
|
3122
|
-
if (typeof src === "string") {
|
3123
|
-
return {
|
3124
|
-
success: true,
|
3125
|
-
data: src
|
3126
|
-
};
|
3127
|
-
}
|
3128
|
-
return {
|
3129
|
-
success: false,
|
3130
|
-
errors: _defineProperty({}, path, [{
|
3131
|
-
message: "Expected 'string', got '".concat(_typeof(src), "'"),
|
3132
|
-
typeError: true
|
3133
|
-
}])
|
3134
|
-
};
|
3135
|
-
}
|
3136
|
-
}, {
|
3137
|
-
key: "nullable",
|
3138
|
-
value: function nullable() {
|
3139
|
-
return new StringSchema(this.options, true, this.isRaw);
|
3140
|
-
}
|
3141
|
-
}, {
|
3142
|
-
key: "raw",
|
3143
|
-
value: function raw() {
|
3144
|
-
return new StringSchema(this.options, this.opt, true);
|
3145
|
-
}
|
3146
|
-
}, {
|
3147
|
-
key: "executeSerialize",
|
3148
|
-
value: function executeSerialize() {
|
3149
|
-
var _this$options4, _this$options5, _this$options6, _this$customValidateF, _this$customValidateF2;
|
3150
|
-
return {
|
3151
|
-
type: "string",
|
3152
|
-
options: {
|
3153
|
-
maxLength: (_this$options4 = this.options) === null || _this$options4 === void 0 ? void 0 : _this$options4.maxLength,
|
3154
|
-
minLength: (_this$options5 = this.options) === null || _this$options5 === void 0 ? void 0 : _this$options5.minLength,
|
3155
|
-
regexp: ((_this$options6 = this.options) === null || _this$options6 === void 0 ? void 0 : _this$options6.regexp) && {
|
3156
|
-
message: this.options.regExpMessage,
|
3157
|
-
source: this.options.regexp.source,
|
3158
|
-
flags: this.options.regexp.flags
|
3159
|
-
},
|
3160
|
-
customValidate: this.customValidateFunctions && ((_this$customValidateF = this.customValidateFunctions) === null || _this$customValidateF === void 0 ? void 0 : _this$customValidateF.length) > 0
|
3161
|
-
},
|
3162
|
-
opt: this.opt,
|
3163
|
-
raw: this.isRaw,
|
3164
|
-
customValidate: this.customValidateFunctions && ((_this$customValidateF2 = this.customValidateFunctions) === null || _this$customValidateF2 === void 0 ? void 0 : _this$customValidateF2.length) > 0
|
3165
|
-
};
|
3166
|
-
}
|
3167
|
-
}, {
|
3168
|
-
key: "executeRender",
|
3169
|
-
value: function executeRender() {
|
3170
|
-
return {};
|
3171
|
-
}
|
3172
|
-
}]);
|
3173
|
-
}(Schema);
|
3174
|
-
var string = function string(options) {
|
3175
|
-
return new StringSchema(options);
|
3176
|
-
};
|
3177
|
-
|
3178
3255
|
var BooleanSchema = /*#__PURE__*/function (_Schema) {
|
3179
3256
|
function BooleanSchema() {
|
3180
3257
|
var _this;
|
@@ -3286,7 +3363,9 @@ var KeyOfSchema = /*#__PURE__*/function (_Schema) {
|
|
3286
3363
|
}, {
|
3287
3364
|
key: "executeValidate",
|
3288
3365
|
value: function executeValidate(path, src) {
|
3289
|
-
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions
|
3366
|
+
var customValidationErrors = this.executeCustomValidateFunctions(src, this.customValidateFunctions, {
|
3367
|
+
path: path
|
3368
|
+
});
|
3290
3369
|
if (this.opt && (src === null || src === undefined)) {
|
3291
3370
|
return customValidationErrors.length > 0 ? _defineProperty({}, path, customValidationErrors) : false;
|
3292
3371
|
}
|
@@ -3298,7 +3377,8 @@ var KeyOfSchema = /*#__PURE__*/function (_Schema) {
|
|
3298
3377
|
var serializedSchema = this.schema;
|
3299
3378
|
if (!(serializedSchema.type === "object" || serializedSchema.type === "record")) {
|
3300
3379
|
return _defineProperty({}, path, [].concat(_toConsumableArray(customValidationErrors), [{
|
3301
|
-
|
3380
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
3381
|
+
message: "Schema in keyOf must be an 'object' or 'record'. Found '".concat(serializedSchema.type || "unknown", "'")
|
3302
3382
|
}]));
|
3303
3383
|
}
|
3304
3384
|
if (serializedSchema.opt && (src === null || src === undefined)) {
|
@@ -3310,7 +3390,7 @@ var KeyOfSchema = /*#__PURE__*/function (_Schema) {
|
|
3310
3390
|
}]));
|
3311
3391
|
}
|
3312
3392
|
if (serializedSchema.type === "object") {
|
3313
|
-
var keys =
|
3393
|
+
var keys = serializedSchema.keys;
|
3314
3394
|
if (!keys.includes(src)) {
|
3315
3395
|
return _defineProperty({}, path, [].concat(_toConsumableArray(customValidationErrors), [{
|
3316
3396
|
message: "Value of keyOf (object) must be: ".concat(keys.join(", "), ". Found: ").concat(src)
|
@@ -3370,7 +3450,8 @@ var KeyOfSchema = /*#__PURE__*/function (_Schema) {
|
|
3370
3450
|
return {
|
3371
3451
|
success: false,
|
3372
3452
|
errors: _defineProperty({}, path, [{
|
3373
|
-
|
3453
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
3454
|
+
message: "Schema of first argument must be either: 'array', 'object' or 'record'. Found '".concat(serializedSchema.type || "unknown", "'"),
|
3374
3455
|
typeError: true
|
3375
3456
|
}])
|
3376
3457
|
};
|
@@ -3388,7 +3469,7 @@ var KeyOfSchema = /*#__PURE__*/function (_Schema) {
|
|
3388
3469
|
// and there it also makes sense to check the actual string values (i.e. that it is not just a string) since
|
3389
3470
|
// missing one would lead to a runtime error. At least this is what we are thinking currently.
|
3390
3471
|
if (serializedSchema.type === "object") {
|
3391
|
-
var keys =
|
3472
|
+
var keys = serializedSchema.keys;
|
3392
3473
|
if (!keys.includes(src)) {
|
3393
3474
|
return {
|
3394
3475
|
success: false,
|
@@ -3427,10 +3508,11 @@ var KeyOfSchema = /*#__PURE__*/function (_Schema) {
|
|
3427
3508
|
values = "string";
|
3428
3509
|
break;
|
3429
3510
|
case "object":
|
3430
|
-
values =
|
3511
|
+
values = serializedSchema.keys;
|
3431
3512
|
break;
|
3432
3513
|
default:
|
3433
|
-
throw new Error(
|
3514
|
+
throw new Error(// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
3515
|
+
"Cannot serialize keyOf schema with selector of type '".concat(serializedSchema.type || "unknown", "'"));
|
3434
3516
|
}
|
3435
3517
|
return {
|
3436
3518
|
type: "keyOf",
|
@@ -3449,8 +3531,27 @@ var KeyOfSchema = /*#__PURE__*/function (_Schema) {
|
|
3449
3531
|
}]);
|
3450
3532
|
}(Schema);
|
3451
3533
|
var keyOf = function keyOf(valModule) {
|
3452
|
-
var
|
3453
|
-
|
3534
|
+
var refSchema = valModule === null || valModule === void 0 ? void 0 : valModule[GetSchema];
|
3535
|
+
var serializedRefSchema = undefined;
|
3536
|
+
if (refSchema instanceof ObjectSchema) {
|
3537
|
+
var keys = [];
|
3538
|
+
try {
|
3539
|
+
keys = Object.keys((refSchema === null || refSchema === void 0 ? void 0 : refSchema["items"]) || {});
|
3540
|
+
} catch (e) {
|
3541
|
+
// ignore this error here
|
3542
|
+
}
|
3543
|
+
serializedRefSchema = {
|
3544
|
+
type: "object",
|
3545
|
+
keys: keys,
|
3546
|
+
opt: refSchema === null || refSchema === void 0 ? void 0 : refSchema["opt"]
|
3547
|
+
};
|
3548
|
+
} else if (refSchema instanceof RecordSchema) {
|
3549
|
+
serializedRefSchema = {
|
3550
|
+
type: "record",
|
3551
|
+
opt: refSchema === null || refSchema === void 0 ? void 0 : refSchema["opt"]
|
3552
|
+
};
|
3553
|
+
}
|
3554
|
+
return new KeyOfSchema(serializedRefSchema, getValPath(valModule));
|
3454
3555
|
};
|
3455
3556
|
|
3456
3557
|
var DateSchema = /*#__PURE__*/function (_Schema) {
|
@@ -4292,6 +4393,7 @@ var EXT_TO_MIME_TYPES = {
|
|
4292
4393
|
aam: "application/x-authorware-map",
|
4293
4394
|
aas: "application/x-authorware-seg",
|
4294
4395
|
air: "application/vnd.adobe.air-application-installer-package+zip",
|
4396
|
+
avif: "image/avif",
|
4295
4397
|
swf: "application/x-shockwave-flash",
|
4296
4398
|
fxp: "application/vnd.adobe.fxp",
|
4297
4399
|
pdf: "application/pdf",
|
@@ -5089,6 +5191,193 @@ function deserializeSchema(serialized) {
|
|
5089
5191
|
}
|
5090
5192
|
}
|
5091
5193
|
|
5194
|
+
// Helper function to validate a URL path against a route pattern
|
5195
|
+
function validateUrlAgainstPattern(urlPath, routePattern) {
|
5196
|
+
// Remove leading slash and split URL path
|
5197
|
+
var urlSegments = urlPath.startsWith("/") ? urlPath.slice(1).split("/") : urlPath.split("/");
|
5198
|
+
|
5199
|
+
// Handle empty patterns (root route)
|
5200
|
+
if (routePattern.length === 0) {
|
5201
|
+
return {
|
5202
|
+
isValid: urlSegments.length === 0 || urlSegments.length === 1 && urlSegments[0] === "",
|
5203
|
+
expectedPath: "/"
|
5204
|
+
};
|
5205
|
+
}
|
5206
|
+
|
5207
|
+
// Check if segment counts match (accounting for optional segments and catch-all)
|
5208
|
+
var minSegments = 0;
|
5209
|
+
var maxSegments = 0;
|
5210
|
+
var hasCatchAll = false;
|
5211
|
+
var catchAllIndex = -1;
|
5212
|
+
for (var i = 0; i < routePattern.length; i++) {
|
5213
|
+
var segment = routePattern[i];
|
5214
|
+
if (segment.startsWith("[[") && segment.endsWith("]]")) {
|
5215
|
+
// Optional catch-all segment
|
5216
|
+
hasCatchAll = true;
|
5217
|
+
catchAllIndex = i;
|
5218
|
+
maxSegments = Infinity;
|
5219
|
+
} else if (segment.startsWith("[...") && segment.endsWith("]")) {
|
5220
|
+
// Required catch-all segment
|
5221
|
+
hasCatchAll = true;
|
5222
|
+
catchAllIndex = i;
|
5223
|
+
minSegments++;
|
5224
|
+
maxSegments = Infinity;
|
5225
|
+
} else if (segment.startsWith("[[") && segment.endsWith("]")) {
|
5226
|
+
// Optional segment
|
5227
|
+
maxSegments++;
|
5228
|
+
} else if (segment.startsWith("[") && segment.endsWith("]")) {
|
5229
|
+
// Required segment
|
5230
|
+
minSegments++;
|
5231
|
+
maxSegments++;
|
5232
|
+
} else {
|
5233
|
+
// Static segment
|
5234
|
+
minSegments++;
|
5235
|
+
maxSegments++;
|
5236
|
+
}
|
5237
|
+
}
|
5238
|
+
|
5239
|
+
// Check segment count
|
5240
|
+
if (urlSegments.length < minSegments || !hasCatchAll && urlSegments.length > maxSegments) {
|
5241
|
+
var expectedSegments = routePattern.map(function (seg) {
|
5242
|
+
if (seg.startsWith("[[") && seg.endsWith("]]")) {
|
5243
|
+
return "[optional:".concat(seg.slice(2, -2), "]");
|
5244
|
+
} else if (seg.startsWith("[...") && seg.endsWith("]")) {
|
5245
|
+
return "[...".concat(seg.slice(4, -1), "]");
|
5246
|
+
} else if (seg.startsWith("[[") && seg.endsWith("]")) {
|
5247
|
+
return "[optional:".concat(seg.slice(2, -1), "]");
|
5248
|
+
} else if (seg.startsWith("[") && seg.endsWith("]")) {
|
5249
|
+
return "[".concat(seg.slice(1, -1), "]");
|
5250
|
+
}
|
5251
|
+
return seg;
|
5252
|
+
}).join("/");
|
5253
|
+
return {
|
5254
|
+
isValid: false,
|
5255
|
+
expectedPath: "/".concat(expectedSegments)
|
5256
|
+
};
|
5257
|
+
}
|
5258
|
+
|
5259
|
+
// Validate each segment up to the catch-all or the end of the pattern
|
5260
|
+
var segmentsToValidate = hasCatchAll ? catchAllIndex : routePattern.length;
|
5261
|
+
for (var _i = 0; _i < segmentsToValidate; _i++) {
|
5262
|
+
var patternSegment = routePattern[_i];
|
5263
|
+
var urlSegment = urlSegments[_i];
|
5264
|
+
|
5265
|
+
// Handle optional segments
|
5266
|
+
if (patternSegment.startsWith("[[") && patternSegment.endsWith("]]")) {
|
5267
|
+
// Optional segment - can be empty or match
|
5268
|
+
if (urlSegment !== "" && urlSegment !== undefined) {
|
5269
|
+
// If provided, validate it's not empty
|
5270
|
+
if (urlSegment === "") {
|
5271
|
+
return {
|
5272
|
+
isValid: false,
|
5273
|
+
expectedPath: "/".concat(routePattern.join("/"))
|
5274
|
+
};
|
5275
|
+
}
|
5276
|
+
}
|
5277
|
+
} else if (patternSegment.startsWith("[") && patternSegment.endsWith("]")) {
|
5278
|
+
// Required dynamic segment - just check it's not empty
|
5279
|
+
if (urlSegment === "" || urlSegment === undefined) {
|
5280
|
+
return {
|
5281
|
+
isValid: false,
|
5282
|
+
expectedPath: "/".concat(routePattern.join("/"))
|
5283
|
+
};
|
5284
|
+
}
|
5285
|
+
} else {
|
5286
|
+
// Static segment - must match exactly
|
5287
|
+
if (patternSegment !== urlSegment) {
|
5288
|
+
return {
|
5289
|
+
isValid: false,
|
5290
|
+
expectedPath: "/".concat(routePattern.join("/"))
|
5291
|
+
};
|
5292
|
+
}
|
5293
|
+
}
|
5294
|
+
}
|
5295
|
+
return {
|
5296
|
+
isValid: true
|
5297
|
+
};
|
5298
|
+
}
|
5299
|
+
|
5300
|
+
// This router should not be in core package
|
5301
|
+
var nextAppRouter = {
|
5302
|
+
getRouterId: function getRouterId() {
|
5303
|
+
return "next-app-router";
|
5304
|
+
},
|
5305
|
+
validate: function validate(moduleFilePath, urlPaths) {
|
5306
|
+
var routePattern = parseNextJsRoutePattern(moduleFilePath);
|
5307
|
+
var errors = [];
|
5308
|
+
var _iterator = result._createForOfIteratorHelper(urlPaths),
|
5309
|
+
_step;
|
5310
|
+
try {
|
5311
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
5312
|
+
var urlPath = _step.value;
|
5313
|
+
var validation = validateUrlAgainstPattern(urlPath, routePattern);
|
5314
|
+
if (!validation.isValid) {
|
5315
|
+
errors.push({
|
5316
|
+
error: {
|
5317
|
+
message: "URL path \"".concat(urlPath, "\" does not match the route pattern for \"").concat(moduleFilePath, "\""),
|
5318
|
+
urlPath: urlPath,
|
5319
|
+
expectedPath: validation.expectedPath || null
|
5320
|
+
}
|
5321
|
+
});
|
5322
|
+
}
|
5323
|
+
}
|
5324
|
+
} catch (err) {
|
5325
|
+
_iterator.e(err);
|
5326
|
+
} finally {
|
5327
|
+
_iterator.f();
|
5328
|
+
}
|
5329
|
+
return errors;
|
5330
|
+
}
|
5331
|
+
};
|
5332
|
+
|
5333
|
+
/**
|
5334
|
+
* Parse Next.js route pattern from file path
|
5335
|
+
* Support multiple Next.js app directory structures:
|
5336
|
+
* - /app/blogs/[blog]/page.val.ts -> ["blogs", "[blog]"]
|
5337
|
+
* - /src/app/blogs/[blog]/page.val.ts -> ["blogs", "[blog]"]
|
5338
|
+
* - /pages/blogs/[blog].tsx -> ["blogs", "[blog]"] (Pages Router)
|
5339
|
+
* - /app/(group)/blogs/[blog]/page.val.ts -> ["blogs", "[blog]"] (with groups)
|
5340
|
+
* - /app/(.)feed/page.val.ts -> ["feed"] (interception route)
|
5341
|
+
* - /app/(..)(dashboard)/feed/page.val.ts -> ["feed"] (interception route)
|
5342
|
+
*/
|
5343
|
+
function parseNextJsRoutePattern(moduleFilePath) {
|
5344
|
+
if (!moduleFilePath || typeof moduleFilePath !== "string") {
|
5345
|
+
return [];
|
5346
|
+
}
|
5347
|
+
|
5348
|
+
// Try App Router patterns first
|
5349
|
+
var appRouterPatterns = [/\/app\/(.+)\/page\.val\.ts$/,
|
5350
|
+
// /app/...
|
5351
|
+
/\/src\/app\/(.+)\/page\.val\.ts$/,
|
5352
|
+
// /src/app/...
|
5353
|
+
/\/app\/(.+)\/page\.tsx?$/,
|
5354
|
+
// /app/... with .tsx
|
5355
|
+
/\/src\/app\/(.+)\/page\.tsx?$/ // /src/app/... with .tsx
|
5356
|
+
];
|
5357
|
+
for (var _i2 = 0, _appRouterPatterns = appRouterPatterns; _i2 < _appRouterPatterns.length; _i2++) {
|
5358
|
+
var pattern = _appRouterPatterns[_i2];
|
5359
|
+
var match = moduleFilePath.match(pattern);
|
5360
|
+
if (match) {
|
5361
|
+
var routePath = match[1];
|
5362
|
+
// Remove group and interception segments
|
5363
|
+
// Group: (group), Interception: (.), (..), (..)(dashboard), etc.
|
5364
|
+
return routePath.split("/").flatMap(function (segment) {
|
5365
|
+
// Remove group segments (but not interception segments)
|
5366
|
+
if (segment.startsWith("(") && segment.endsWith(")") && !segment.includes(".")) return [];
|
5367
|
+
// Interception segments: (.)feed, (..)(dashboard)/feed, etc.
|
5368
|
+
// If segment starts with (.) or (..), strip the interception marker and keep the rest
|
5369
|
+
var interceptionMatch = segment.match(/^(\([.]+\)(\(.+\))?)(.*)$/);
|
5370
|
+
if (interceptionMatch) {
|
5371
|
+
var rest = interceptionMatch[3] || interceptionMatch[4];
|
5372
|
+
return rest ? [rest] : [];
|
5373
|
+
}
|
5374
|
+
return [segment];
|
5375
|
+
});
|
5376
|
+
}
|
5377
|
+
}
|
5378
|
+
return [];
|
5379
|
+
}
|
5380
|
+
|
5092
5381
|
var ModuleFilePathSep = "?p=";
|
5093
5382
|
var FATAL_ERROR_TYPES = ["no-schema", "no-source", "invalid-id", "no-module", "invalid-patch"];
|
5094
5383
|
var DEFAULT_CONTENT_HOST = "https://content.val.build";
|
@@ -5113,6 +5402,7 @@ var Internal = {
|
|
5113
5402
|
safeResolvePath: safeResolvePath,
|
5114
5403
|
splitModuleFilePathAndModulePath: splitModuleFilePathAndModulePath,
|
5115
5404
|
joinModuleFilePathAndModulePath: joinModuleFilePathAndModulePath,
|
5405
|
+
nextAppRouter: nextAppRouter,
|
5116
5406
|
remote: {
|
5117
5407
|
createRemoteRef: createRemoteRef,
|
5118
5408
|
getValidationBasis: getValidationBasis,
|