@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.
Files changed (34) hide show
  1. package/dist/declarations/src/ValApi.d.ts +2 -1
  2. package/dist/declarations/src/index.d.ts +21 -3
  3. package/dist/declarations/src/module.d.ts +11 -5
  4. package/dist/declarations/src/patch/deref.d.ts +0 -3
  5. package/dist/declarations/src/patch/operation.d.ts +2 -0
  6. package/dist/declarations/src/schema/string.d.ts +5 -1
  7. package/dist/{index-75b79c89.cjs.prod.js → index-30eee5ec.cjs.prod.js} +47 -43
  8. package/dist/{index-067cff4a.cjs.prod.js → index-425d164d.cjs.prod.js} +1 -1
  9. package/dist/{index-31991dd7.cjs.dev.js → index-43369070.cjs.dev.js} +47 -43
  10. package/dist/{index-4bb14a92.esm.js → index-499b9e87.esm.js} +47 -43
  11. package/dist/{index-d17f9503.cjs.dev.js → index-a0f36fe3.cjs.dev.js} +1 -1
  12. package/dist/{index-870205b5.esm.js → index-f0475164.esm.js} +1 -1
  13. package/dist/{ops-9b396073.esm.js → ops-1225f750.esm.js} +5 -2
  14. package/dist/{ops-0f7617a0.cjs.dev.js → ops-558f07b7.cjs.dev.js} +5 -2
  15. package/dist/{ops-451ffb3f.cjs.prod.js → ops-b263963e.cjs.prod.js} +5 -2
  16. package/dist/valbuild-core.cjs.dev.js +251 -240
  17. package/dist/valbuild-core.cjs.prod.js +251 -240
  18. package/dist/valbuild-core.esm.js +252 -241
  19. package/expr/dist/valbuild-core-expr.cjs.dev.js +2 -2
  20. package/expr/dist/valbuild-core-expr.cjs.prod.js +2 -2
  21. package/expr/dist/valbuild-core-expr.esm.js +2 -2
  22. package/package.json +1 -1
  23. package/patch/dist/valbuild-core-patch.cjs.dev.js +13 -3
  24. package/patch/dist/valbuild-core-patch.cjs.prod.js +13 -3
  25. package/patch/dist/valbuild-core-patch.esm.js +14 -4
  26. package/src/ValApi.ts +9 -13
  27. package/src/index.ts +23 -3
  28. package/src/module.ts +40 -14
  29. package/src/patch/deref.test.ts +130 -132
  30. package/src/patch/deref.ts +12 -17
  31. package/src/patch/operation.ts +2 -0
  32. package/src/patch/parse.ts +15 -1
  33. package/src/schema/image.ts +5 -3
  34. package/src/schema/string.ts +27 -2
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-75b79c89.cjs.prod.js');
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, " a number as path"));
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)));