@nicia-ai/typegraph 0.67.1 → 0.68.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/CHANGELOG.md +26 -0
- package/dist/backend/postgres/pglite-store.cjs +1 -1
- package/dist/backend/postgres/pglite-store.js +1 -1
- package/dist/backend/sqlite/local-store.cjs +1 -1
- package/dist/backend/sqlite/local-store.js +1 -1
- package/dist/{chunk-T3VU3YRQ.cjs → chunk-6GUBF5TF.cjs} +24 -18
- package/dist/chunk-6GUBF5TF.cjs.map +1 -0
- package/dist/{chunk-55DGFZYC.js → chunk-EJYBHBIB.js} +3 -3
- package/dist/{chunk-55DGFZYC.js.map → chunk-EJYBHBIB.js.map} +1 -1
- package/dist/{chunk-WY3IFEKV.cjs → chunk-IFTYHOEE.cjs} +13 -5
- package/dist/chunk-IFTYHOEE.cjs.map +1 -0
- package/dist/{chunk-RTPMG6LQ.js → chunk-JVKHJQ6Q.js} +13 -5
- package/dist/chunk-JVKHJQ6Q.js.map +1 -0
- package/dist/{chunk-FS2GVO2T.cjs → chunk-OBEYH22Q.cjs} +159 -159
- package/dist/{chunk-FS2GVO2T.cjs.map → chunk-OBEYH22Q.cjs.map} +1 -1
- package/dist/{chunk-7YJHUY4T.js → chunk-VUYODTHL.js} +10 -5
- package/dist/chunk-VUYODTHL.js.map +1 -0
- package/dist/graph-merge/index.cjs +540 -22
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +317 -9
- package/dist/graph-merge/index.d.ts +317 -9
- package/dist/graph-merge/index.js +512 -8
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/index.cjs +43 -43
- package/dist/index.js +2 -2
- package/dist/interchange/index.cjs +25 -25
- package/dist/interchange/index.js +2 -2
- package/dist/{local-store-impl-GI6S4J6B.cjs → local-store-impl-INNRHDK3.cjs} +5 -5
- package/dist/{local-store-impl-GI6S4J6B.cjs.map → local-store-impl-INNRHDK3.cjs.map} +1 -1
- package/dist/{local-store-impl-CCMWTLGY.js → local-store-impl-VGC3OKCA.js} +4 -4
- package/dist/{local-store-impl-CCMWTLGY.js.map → local-store-impl-VGC3OKCA.js.map} +1 -1
- package/dist/{pglite-store-impl-HAPAJUIO.cjs → pglite-store-impl-KDS4NRMC.cjs} +5 -5
- package/dist/{pglite-store-impl-HAPAJUIO.cjs.map → pglite-store-impl-KDS4NRMC.cjs.map} +1 -1
- package/dist/{pglite-store-impl-HDLFOZWS.js → pglite-store-impl-LJDF2EUF.js} +4 -4
- package/dist/{pglite-store-impl-HDLFOZWS.js.map → pglite-store-impl-LJDF2EUF.js.map} +1 -1
- package/package.json +1 -1
- package/dist/chunk-7YJHUY4T.js.map +0 -1
- package/dist/chunk-RTPMG6LQ.js.map +0 -1
- package/dist/chunk-T3VU3YRQ.cjs.map +0 -1
- package/dist/chunk-WY3IFEKV.cjs.map +0 -1
|
@@ -19,6 +19,7 @@ import { filterReservedKeys, RESERVED_NODE_KEYS, RESERVED_EDGE_KEYS, assertJsonV
|
|
|
19
19
|
import { resolveJsonPointer } from './chunk-LOVRELYJ.js';
|
|
20
20
|
import { readOwnProperty, hasOwnKey, requireDefined, createDataKeyedBag } from './chunk-QD2JFTSL.js';
|
|
21
21
|
import { CompilerInvariantError, ValidationError, ConfigurationError, DatabaseOperationError, NodeNotFoundError, RestrictedDeleteError, UniquenessError, KindNotFoundError, NodeConstraintNotFoundError, NodeIndexNotFoundError, ENTITY_ALREADY_EXISTS_CODE } from './chunk-GMKPIYHY.js';
|
|
22
|
+
import { z } from 'zod';
|
|
22
23
|
|
|
23
24
|
// src/store/row-mappers.ts
|
|
24
25
|
function nullToUndefined(value) {
|
|
@@ -3123,6 +3124,13 @@ async function executeNodeUpdate(ctx, input, backend, options) {
|
|
|
3123
3124
|
{ didWrite: writeResultAlwaysChanges }
|
|
3124
3125
|
);
|
|
3125
3126
|
}
|
|
3127
|
+
function validateNodePropertySubset(schema, properties, context) {
|
|
3128
|
+
return validateNodeProps(
|
|
3129
|
+
z.object(schema.shape).partial(),
|
|
3130
|
+
properties,
|
|
3131
|
+
context
|
|
3132
|
+
);
|
|
3133
|
+
}
|
|
3126
3134
|
function normalizeCompareAndSetExpectations(schema, kind, inputExpected) {
|
|
3127
3135
|
if (Object.keys(inputExpected).length === 0) {
|
|
3128
3136
|
throw new ValidationError("compareAndSet() expected must not be empty", {
|
|
@@ -3176,8 +3184,8 @@ function normalizeCompareAndSetExpectations(schema, kind, inputExpected) {
|
|
|
3176
3184
|
}
|
|
3177
3185
|
scalarExpectedInput[property] = value;
|
|
3178
3186
|
}
|
|
3179
|
-
const parsedExpected =
|
|
3180
|
-
schema
|
|
3187
|
+
const parsedExpected = validateNodePropertySubset(
|
|
3188
|
+
schema,
|
|
3181
3189
|
scalarExpectedInput,
|
|
3182
3190
|
{ kind, operation: "update" }
|
|
3183
3191
|
);
|
|
@@ -3253,7 +3261,7 @@ async function executeNodeSetUpdate(ctx, kind, inputPatch, candidateIds, candida
|
|
|
3253
3261
|
}
|
|
3254
3262
|
);
|
|
3255
3263
|
}
|
|
3256
|
-
const parsedPatch =
|
|
3264
|
+
const parsedPatch = validateNodePropertySubset(schema, inputPatch, {
|
|
3257
3265
|
kind,
|
|
3258
3266
|
operation: "update"
|
|
3259
3267
|
});
|
|
@@ -4442,5 +4450,5 @@ async function executeNodeBulkGetOrCreateByConstraint(ctx, kind, constraintName,
|
|
|
4442
4450
|
}
|
|
4443
4451
|
|
|
4444
4452
|
export { AutocommitWriteRequiresTransaction, ResolvedMutationSetMoved, appliedResolvedMutationSet, assertAtomicDeleteSchemaFenceMatched, assertClearValidToSupported, assertValidityEndMutation, assertsStoredWindowState, atomicResolvedUpdateAttemptBudget, buildEdgeMatchKey, canFuseSchemaFenceInFirstWrite, canonicalPersistedJsonValue, checkCardinalityConstraint, checkDisjointnessConstraint, classifyDurableEdgeBatchOutcomes, createEdgeBatchValidationBackend, createNodeBatchValidationSeams, edgeMatchIdentityUpdateRefusal, edgeWriteNeedsConstraintFence, edgeWritePlan, executeNodeBulkFindByConstraint, executeNodeBulkFindByIndex, executeNodeBulkGetOrCreateByConstraint, executeNodeCreate, executeNodeCreateBatch, executeNodeCreateNoReturnBatch, executeNodeDelete, executeNodeDeleteBatch, executeNodeFindByConstraint, executeNodeGetOrCreateByConstraint, executeNodeHardDelete, executeNodeReplacementBatch, executeNodeResolvedMutationSet, executeNodeSetUpdate, executeNodeUpdate, executeNodeUpsertUpdateBatch, graphOwesClaims, isAutocommitSingleStatementWrite, mixedWritePlan, nestedManagedWriteTarget, nodeUpsertDirtyCheck, normalizePersistedEdgeMatchProps, prepareNodeReplacement, primeBatchValidationCaches, resolveAtomicEdgeBatchExecutor, resolveAtomicEdgeConvergenceExecutor, resolveAtomicEdgeDeleteBatchExecutor, resolveAtomicEdgeResolvedMutationSetExecutor, resolveAtomicEdgeResolvedUpdateBatchExecutor, resolveEdgeMatchIdentityStorage, rowToEdge, rowToEdgeMeta, rowToNode, rowToNodeMeta, runAtomicProgramWithHooks, runAutocommitSingleStatementWritePlan, runHookedWritePlan, runResolvedMutationSetConverging, runWritePlan, unfencedTarget, unsupportedResolvedMutationSet, validityEndAfterMutation, withAlreadyExistsTranslation, writeResultAlwaysChanges };
|
|
4445
|
-
//# sourceMappingURL=chunk-
|
|
4446
|
-
//# sourceMappingURL=chunk-
|
|
4453
|
+
//# sourceMappingURL=chunk-JVKHJQ6Q.js.map
|
|
4454
|
+
//# sourceMappingURL=chunk-JVKHJQ6Q.js.map
|