@valbuild/core 0.21.1 → 0.22.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/declarations/src/ValApi.d.ts +2 -1
- package/dist/declarations/src/index.d.ts +21 -3
- package/dist/declarations/src/module.d.ts +11 -5
- package/dist/declarations/src/patch/deref.d.ts +0 -3
- package/dist/declarations/src/patch/operation.d.ts +2 -0
- package/dist/declarations/src/schema/string.d.ts +5 -1
- package/dist/{index-75b79c89.cjs.prod.js → index-30eee5ec.cjs.prod.js} +47 -43
- package/dist/{index-067cff4a.cjs.prod.js → index-425d164d.cjs.prod.js} +1 -1
- package/dist/{index-31991dd7.cjs.dev.js → index-43369070.cjs.dev.js} +47 -43
- package/dist/{index-4bb14a92.esm.js → index-499b9e87.esm.js} +47 -43
- package/dist/{index-d17f9503.cjs.dev.js → index-a0f36fe3.cjs.dev.js} +1 -1
- package/dist/{index-870205b5.esm.js → index-f0475164.esm.js} +1 -1
- package/dist/{ops-9b396073.esm.js → ops-1225f750.esm.js} +5 -2
- package/dist/{ops-0f7617a0.cjs.dev.js → ops-558f07b7.cjs.dev.js} +5 -2
- package/dist/{ops-451ffb3f.cjs.prod.js → ops-b263963e.cjs.prod.js} +5 -2
- package/dist/valbuild-core.cjs.dev.js +251 -240
- package/dist/valbuild-core.cjs.prod.js +251 -240
- package/dist/valbuild-core.esm.js +252 -241
- package/expr/dist/valbuild-core-expr.cjs.dev.js +2 -2
- package/expr/dist/valbuild-core-expr.cjs.prod.js +2 -2
- package/expr/dist/valbuild-core-expr.esm.js +2 -2
- package/package.json +1 -1
- package/patch/dist/valbuild-core-patch.cjs.dev.js +13 -3
- package/patch/dist/valbuild-core-patch.cjs.prod.js +13 -3
- package/patch/dist/valbuild-core-patch.esm.js +14 -4
- package/src/ValApi.ts +9 -13
- package/src/index.ts +23 -3
- package/src/module.ts +40 -14
- package/src/patch/deref.test.ts +130 -132
- package/src/patch/deref.ts +12 -17
- package/src/patch/operation.ts +2 -0
- package/src/patch/parse.ts +15 -1
- package/src/schema/image.ts +5 -3
- package/src/schema/string.ts +27 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var index = require('./index-
|
3
|
+
var index = require('./index-30eee5ec.cjs.prod.js');
|
4
4
|
var result = require('./result-26f67b40.cjs.prod.js');
|
5
5
|
|
6
6
|
function hasOwn(obj, prop) {
|
@@ -529,6 +529,9 @@ function getSource(valModule) {
|
|
529
529
|
return source;
|
530
530
|
}
|
531
531
|
function splitModuleIdAndModulePath(path) {
|
532
|
+
if (path.indexOf(".") === -1) {
|
533
|
+
return [path, ""];
|
534
|
+
}
|
532
535
|
return [path.slice(0, path.indexOf(".")), path.slice(path.indexOf(".") + 1)];
|
533
536
|
}
|
534
537
|
function isObjectSchema(schema) {
|
@@ -584,7 +587,7 @@ function resolvePath(path, valModule, schema) {
|
|
584
587
|
}
|
585
588
|
if (isArraySchema(resolvedSchema)) {
|
586
589
|
if (Number.isNaN(Number(part))) {
|
587
|
-
throw Error("Invalid path: array schema ".concat(resolvedSchema, " must have ").concat(part, "
|
590
|
+
throw Error("Invalid path: array schema ".concat(JSON.stringify(resolvedSchema), " must have a number as path, but got ").concat(part, ". Path: ").concat(path));
|
588
591
|
}
|
589
592
|
if (index._typeof(resolvedSource) !== "object" && !Array.isArray(resolvedSource)) {
|
590
593
|
throw Error("Schema type error: expected source to be type of array, but got ".concat(index._typeof(resolvedSource)));
|