@_linked/core 2.36.0 → 2.36.2

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 (73) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +19 -0
  3. package/lib/esm/collections/CoreSet.js +2 -0
  4. package/lib/esm/collections/CoreSet.js.map +1 -1
  5. package/lib/esm/collections/ShapeSet.js +2 -0
  6. package/lib/esm/collections/ShapeSet.js.map +1 -1
  7. package/lib/esm/expressions/Expr.js +3 -2
  8. package/lib/esm/expressions/Expr.js.map +1 -1
  9. package/lib/esm/expressions/ExpressionNode.js +10 -7
  10. package/lib/esm/expressions/ExpressionNode.js.map +1 -1
  11. package/lib/esm/index.d.ts +1 -1
  12. package/lib/esm/index.js +1 -1
  13. package/lib/esm/index.js.map +1 -1
  14. package/lib/esm/queries/AskBuilder.js +5 -3
  15. package/lib/esm/queries/AskBuilder.js.map +1 -1
  16. package/lib/esm/queries/CountBuilder.js +4 -2
  17. package/lib/esm/queries/CountBuilder.js.map +1 -1
  18. package/lib/esm/queries/CreateBuilder.js +2 -0
  19. package/lib/esm/queries/CreateBuilder.js.map +1 -1
  20. package/lib/esm/queries/DeleteBuilder.js +3 -1
  21. package/lib/esm/queries/DeleteBuilder.js.map +1 -1
  22. package/lib/esm/queries/DslJsonExpression.js +7 -6
  23. package/lib/esm/queries/DslJsonExpression.js.map +1 -1
  24. package/lib/esm/queries/FieldSet.js +10 -8
  25. package/lib/esm/queries/FieldSet.js.map +1 -1
  26. package/lib/esm/queries/IRLower.js +2 -1
  27. package/lib/esm/queries/IRLower.js.map +1 -1
  28. package/lib/esm/queries/MutationSerialization.js +2 -1
  29. package/lib/esm/queries/MutationSerialization.js.map +1 -1
  30. package/lib/esm/queries/PropertyPath.js +2 -0
  31. package/lib/esm/queries/PropertyPath.js.map +1 -1
  32. package/lib/esm/queries/ProxiedPathBuilder.js +2 -1
  33. package/lib/esm/queries/ProxiedPathBuilder.js.map +1 -1
  34. package/lib/esm/queries/QueryBuilder.js +5 -4
  35. package/lib/esm/queries/QueryBuilder.js.map +1 -1
  36. package/lib/esm/queries/QueryContext.js +17 -6
  37. package/lib/esm/queries/QueryContext.js.map +1 -1
  38. package/lib/esm/queries/SelectQuery.js +18 -12
  39. package/lib/esm/queries/SelectQuery.js.map +1 -1
  40. package/lib/esm/queries/UpdateBuilder.js +3 -1
  41. package/lib/esm/queries/UpdateBuilder.js.map +1 -1
  42. package/lib/esm/queries/lower.js +5 -4
  43. package/lib/esm/queries/lower.js.map +1 -1
  44. package/lib/esm/shapes/SHACL.js +6 -3
  45. package/lib/esm/shapes/SHACL.js.map +1 -1
  46. package/lib/esm/shapes/Shape.d.ts +3 -1
  47. package/lib/esm/shapes/Shape.js +20 -2
  48. package/lib/esm/shapes/Shape.js.map +1 -1
  49. package/lib/esm/shapes/validation.js +3 -2
  50. package/lib/esm/shapes/validation.js.map +1 -1
  51. package/lib/esm/utils/LinkedErrorLogging.d.ts +2 -1
  52. package/lib/esm/utils/LinkedErrorLogging.js +11 -0
  53. package/lib/esm/utils/LinkedErrorLogging.js.map +1 -1
  54. package/lib/esm/utils/LinkedFileStorage.d.ts +6 -4
  55. package/lib/esm/utils/LinkedFileStorage.js +34 -4
  56. package/lib/esm/utils/LinkedFileStorage.js.map +1 -1
  57. package/lib/esm/utils/Package.d.ts +6 -0
  58. package/lib/esm/utils/Package.js +35 -7
  59. package/lib/esm/utils/Package.js.map +1 -1
  60. package/lib/esm/utils/Prefix.d.ts +4 -2
  61. package/lib/esm/utils/Prefix.js +18 -2
  62. package/lib/esm/utils/Prefix.js.map +1 -1
  63. package/lib/esm/utils/ShapeClass.js +11 -6
  64. package/lib/esm/utils/ShapeClass.js.map +1 -1
  65. package/lib/esm/utils/cached.js +2 -1
  66. package/lib/esm/utils/cached.js.map +1 -1
  67. package/lib/esm/utils/linkedError.d.ts +32 -0
  68. package/lib/esm/utils/linkedError.js +40 -0
  69. package/lib/esm/utils/linkedError.js.map +1 -1
  70. package/lib/esm/utils/unresolvedShape.d.ts +8 -4
  71. package/lib/esm/utils/unresolvedShape.js +14 -10
  72. package/lib/esm/utils/unresolvedShape.js.map +1 -1
  73. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"unresolvedShape.js","sourceRoot":"","sources":["../../../src/utils/unresolvedShape.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,qBAAqB,EAAC,MAAM,iBAAiB,CAAC;AAetD;;;;GAIG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAO7C,YAAY,OAAe,EAAE,OAA+B;QAC1D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS;YAAE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACrE,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS;YAAE,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QAC9E,IAAI,OAAO,CAAC,aAAa,KAAK,SAAS;YAAE,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QACpF,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS;YAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IACpE,CAAC;CACF;AAED;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CACzC,EAAqB,EACrB,KAAqB;;IAErB,MAAM,aAAa,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,EAAE,mCAAI,MAAA,EAAE,CAAC,eAAe,0CAAE,EAAE,CAAC;IAC1D,MAAM,OAAO,GAAG,MAAA,qBAAqB,EAAE,0CAAE,IAAI,CAAC;IAC9C,mDACE,QAAQ,EAAE,MAAA,MAAA,EAAE,CAAC,UAAU,0CAAE,EAAE,mCAAI,EAAE,EACjC,QAAQ,EAAE,EAAE,C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AAoB;YACjD,CAAC,CAAC,qCAAqC,CAC1C,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,oBAAoB,CAClC,MAAc,EACd,OAA+B;IAE/B,OAAO,IAAI,oBAAoB,CAAC,GAAG,MAAM,KAAK,kBAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AACzF,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,yBAAyB,CACvC,MAAc,EACd,EAAqB,EACrB,KAAqB;IAErB,OAAO,oBAAoB,CAAC,MAAM,EAAE,2BAA2B,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nimport type {NodeShapeData, PropertyShapeData} from '../shapes/nodeShapeData.js';\nimport {getActiveShapeCatalog} from './ShapeClass.js';\n\n/**\n * Where an unresolved shape was met: the shape IRI that could not be resolved and, when a\n * property pointed at it, that property and the shape that declares it. `catalog` is the\n * active catalog's `name`, absent in the global registry or for an unnamed catalog.\n */\nexport interface UnresolvedShapeDetails {\n shapeIri: string;\n property?: string;\n propertyIri?: string;\n ownerShapeIri?: string;\n catalog?: string;\n}\n\n/**\n * The error core throws when a shape IRI does not resolve, carrying the IRIs as fields so a\n * host can map it without parsing the message. It stays a plain `Error` (`name` is\n * `'Error'`): only the message and the fields are added.\n */\nexport class UnresolvedShapeError extends Error implements UnresolvedShapeDetails {\n readonly shapeIri: string;\n readonly property?: string;\n readonly propertyIri?: string;\n readonly ownerShapeIri?: string;\n readonly catalog?: string;\n\n constructor(message: string, details: UnresolvedShapeDetails) {\n super(message);\n this.shapeIri = details.shapeIri;\n if (details.property !== undefined) this.property = details.property;\n if (details.propertyIri !== undefined) this.propertyIri = details.propertyIri;\n if (details.ownerShapeIri !== undefined) this.ownerShapeIri = details.ownerShapeIri;\n if (details.catalog !== undefined) this.catalog = details.catalog;\n }\n}\n\n/**\n * The details for a property whose value shape does not resolve. The owner is the property's\n * `parentNodeShape`, or `owner` when the caller knows it better (a path walk).\n */\nexport function unresolvedValueShapeDetails(\n ps: PropertyShapeData,\n owner?: NodeShapeData,\n): UnresolvedShapeDetails {\n const ownerShapeIri = owner?.id ?? ps.parentNodeShape?.id;\n const catalog = getActiveShapeCatalog()?.name;\n return {\n shapeIri: ps.valueShape?.id ?? '',\n property: ps.label,\n ...(ps.path && typeof ps.path === 'object' && 'id' in ps.path && typeof ps.path.id === 'string'\n ? {propertyIri: ps.path.id}\n : {}),\n ...(ownerShapeIri ? {ownerShapeIri} : {}),\n ...(catalog !== undefined ? {catalog} : {}),\n };\n}\n\n/** The details for a shape named directly (a query's or mutation's own shape). */\nexport function topLevelDetails(shapeIri: string): UnresolvedShapeDetails {\n const catalog = getActiveShapeCatalog()?.name;\n return {shapeIri, ...(catalog !== undefined ? {catalog} : {})};\n}\n\n/**\n * Why the shape is missing, in words: `property 'home' of '<owner>' points at it; catalog\n * 'p1#main' does not hold it`. Each error keeps its own leading sentence and appends this.\n */\nexport function describeUnresolved(details: UnresolvedShapeDetails): string {\n const parts: string[] = [];\n if (details.property !== undefined) {\n parts.push(\n details.ownerShapeIri\n ? `property '${details.property}' of '${details.ownerShapeIri}' points at it`\n : `property '${details.property}' points at it`,\n );\n }\n if (getActiveShapeCatalog() !== undefined) {\n parts.push(\n details.catalog !== undefined\n ? `catalog '${details.catalog}' does not hold it`\n : 'the active catalog does not hold it',\n );\n } else {\n parts.push('it is not registered');\n }\n return parts.join('; ');\n}\n\n/** `<prefix> (<why>)` as an {@link UnresolvedShapeError}. */\nexport function unresolvedShapeError(\n prefix: string,\n details: UnresolvedShapeDetails,\n): UnresolvedShapeError {\n return new UnresolvedShapeError(`${prefix} (${describeUnresolved(details)})`, details);\n}\n\n/** The error for a property whose `valueShape` does not resolve. */\nexport function unresolvedValueShapeError(\n prefix: string,\n ps: PropertyShapeData,\n owner?: NodeShapeData,\n): UnresolvedShapeError {\n return unresolvedShapeError(prefix, unresolvedValueShapeDetails(ps, owner));\n}\n"]}
1
+ {"version":3,"file":"unresolvedShape.js","sourceRoot":"","sources":["../../../src/utils/unresolvedShape.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,qBAAqB,EAAC,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAelD;;;;;;GAMG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAO7C,YAAY,OAAe,EAAE,OAA+B;QAC1D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACjC,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS;YAAE,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACrE,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS;YAAE,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QAC9E,IAAI,OAAO,CAAC,aAAa,KAAK,SAAS;YAAE,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;QACpF,IAAI,OAAO,CAAC,OAAO,KAAK,SAAS;YAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IACpE,CAAC;CACF;AACD,gBAAgB,CAAC,oBAAoB,EAAE,eAAe,EAAE,sBAAsB,CAAC,CAAC;AAEhF;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CACzC,EAAqB,EACrB,KAAqB;;IAErB,MAAM,aAAa,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,EAAE,mCAAI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C,CAAC,aAAa,OAAO,CAAC,QAAQ,gBAAgB,CAClD,CAAC;IACJ,CAAC;IACD,IAAI,qBAAqB,EAAE,KAAK,SAAS,EAAE,CAAC;QAC1C,KAAK,CAAC,IAAI,CACR,OAAO,CAAC,OAAO,KAAK,SAAS;YAC3B,CAAC,CAAC,kCAAkC,OAAO,CAAC,OAAO,GAAG;YACtD,CAAC,CAAC,+BAA+B,CACpC,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,oBAAoB,CAClC,MAAc,EACd,OAA+B;IAE/B,MAAM,GAAG,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACxC,OAAO,IAAI,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,MAAM,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAChF,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,yBAAyB,CACvC,MAAc,EACd,EAAqB,EACrB,KAAqB;IAErB,OAAO,oBAAoB,CAAC,MAAM,EAAE,2BAA2B,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["/*\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at https://mozilla.org/MPL/2.0/.\n */\nimport type {NodeShapeData, PropertyShapeData} from '../shapes/nodeShapeData.js';\nimport {getActiveShapeCatalog} from './ShapeClass.js';\nimport {brandLinkedError} from './linkedError.js';\n\n/**\n * Where an unresolved shape was met: the shape IRI that could not be resolved and, when a\n * property pointed at it, that property and the shape that declares it. `catalog` is the\n * active catalog's `name`, absent in the global registry or for an unnamed catalog.\n */\nexport interface UnresolvedShapeDetails {\n shapeIri: string;\n property?: string;\n propertyIri?: string;\n ownerShapeIri?: string;\n catalog?: string;\n}\n\n/**\n * The error core throws when a shape IRI does not resolve, carrying the IRIs as fields so a\n * host can map it without parsing the message. It stays a plain `Error` (`name` is\n * `'Error'`): only the message and the fields are added. Match it with\n * `isLinkedError(err, UnresolvedShapeError)`, which also recognises one thrown by another copy\n * of core.\n */\nexport class UnresolvedShapeError extends Error implements UnresolvedShapeDetails {\n readonly shapeIri: string;\n readonly property?: string;\n readonly propertyIri?: string;\n readonly ownerShapeIri?: string;\n readonly catalog?: string;\n\n constructor(message: string, details: UnresolvedShapeDetails) {\n super(message);\n this.shapeIri = details.shapeIri;\n if (details.property !== undefined) this.property = details.property;\n if (details.propertyIri !== undefined) this.propertyIri = details.propertyIri;\n if (details.ownerShapeIri !== undefined) this.ownerShapeIri = details.ownerShapeIri;\n if (details.catalog !== undefined) this.catalog = details.catalog;\n }\n}\nbrandLinkedError(UnresolvedShapeError, '@_linked/core', 'UnresolvedShapeError');\n\n/**\n * The details for a property whose value shape does not resolve. The owner is the property's\n * `parentNodeShape`, or `owner` when the caller knows it better (a path walk).\n */\nexport function unresolvedValueShapeDetails(\n ps: PropertyShapeData,\n owner?: NodeShapeData,\n): UnresolvedShapeDetails {\n const ownerShapeIri = owner?.id ?? ps.parentNodeShape?.id;\n const catalog = getActiveShapeCatalog()?.name;\n return {\n shapeIri: ps.valueShape?.id ?? '',\n property: ps.label,\n ...(ps.path && typeof ps.path === 'object' && 'id' in ps.path && typeof ps.path.id === 'string'\n ? {propertyIri: ps.path.id}\n : {}),\n ...(ownerShapeIri ? {ownerShapeIri} : {}),\n ...(catalog !== undefined ? {catalog} : {}),\n };\n}\n\n/** The details for a shape named directly (a query's or mutation's own shape). */\nexport function topLevelDetails(shapeIri: string): UnresolvedShapeDetails {\n const catalog = getActiveShapeCatalog()?.name;\n return {shapeIri, ...(catalog !== undefined ? {catalog} : {})};\n}\n\n/**\n * Why the shape is missing, in words: `property 'home' of '<owner>' points at it; not among the\n * shapes in scope 'p1#main'`. The scope is named only while a scoped `ShapeCatalog` is active\n * (`withShapeCatalog`); against the global registry the text ends after \"points at it\". Each\n * error keeps its own leading sentence and appends this; empty when there is nothing to add.\n */\nexport function describeUnresolved(details: UnresolvedShapeDetails): string {\n const parts: string[] = [];\n if (details.property !== undefined) {\n parts.push(\n details.ownerShapeIri\n ? `property '${details.property}' of '${details.ownerShapeIri}' points at it`\n : `property '${details.property}' points at it`,\n );\n }\n if (getActiveShapeCatalog() !== undefined) {\n parts.push(\n details.catalog !== undefined\n ? `not among the shapes in scope '${details.catalog}'`\n : 'not among the shapes in scope',\n );\n }\n return parts.join('; ');\n}\n\n/** `<prefix> (<why>)` as an {@link UnresolvedShapeError}; just `<prefix>` when there is no why. */\nexport function unresolvedShapeError(\n prefix: string,\n details: UnresolvedShapeDetails,\n): UnresolvedShapeError {\n const why = describeUnresolved(details);\n return new UnresolvedShapeError(why ? `${prefix} (${why})` : prefix, details);\n}\n\n/** The error for a property whose `valueShape` does not resolve. */\nexport function unresolvedValueShapeError(\n prefix: string,\n ps: PropertyShapeData,\n owner?: NodeShapeData,\n): UnresolvedShapeError {\n return unresolvedShapeError(prefix, unresolvedValueShapeDetails(ps, owner));\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@_linked/core",
3
- "version": "2.36.0",
3
+ "version": "2.36.2",
4
4
  "packageManager": "npm@12.2.0",
5
5
  "license": "MIT",
6
6
  "linkedPackage": true,