@cadenza.io/service 2.17.39 → 2.17.41

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.
@@ -6233,10 +6233,10 @@ function buildSyncInsertQueryData(ctx, queryData = {}) {
6233
6233
  };
6234
6234
  const resolvedData = Object.prototype.hasOwnProperty.call(ctx, "data") || ctx.data !== void 0 ? ctx.data : getJoinedContextValue(ctx, "data");
6235
6235
  const resolvedBatch = Object.prototype.hasOwnProperty.call(ctx, "batch") || ctx.batch !== void 0 ? ctx.batch : getJoinedContextValue(ctx, "batch");
6236
- if (!("data" in nextQueryData) && resolvedData !== void 0) {
6236
+ if (resolvedData !== void 0) {
6237
6237
  nextQueryData.data = resolvedData && typeof resolvedData === "object" && !Array.isArray(resolvedData) ? { ...resolvedData } : resolvedData;
6238
6238
  }
6239
- if (!("batch" in nextQueryData) && resolvedBatch !== void 0) {
6239
+ if (resolvedBatch !== void 0) {
6240
6240
  nextQueryData.batch = Array.isArray(resolvedBatch) ? resolvedBatch.map(
6241
6241
  (row) => row && typeof row === "object" ? { ...row } : row
6242
6242
  ) : resolvedBatch;
@@ -6257,6 +6257,13 @@ function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, opti
6257
6257
  `Prepare graph sync insert execution for ${tableName}`,
6258
6258
  (ctx) => ({
6259
6259
  ...ctx,
6260
+ __resolverOriginalContext: {
6261
+ ...ctx
6262
+ },
6263
+ __resolverQueryData: buildSyncInsertQueryData(
6264
+ ctx,
6265
+ queryData
6266
+ ),
6260
6267
  queryData: buildSyncInsertQueryData(
6261
6268
  ctx,
6262
6269
  queryData
@@ -6274,8 +6281,15 @@ function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, opti
6274
6281
  if (!ctx.__resolverRequestId) {
6275
6282
  return false;
6276
6283
  }
6277
- emit(executionResolvedSignal, ctx);
6278
- return ctx;
6284
+ const originalContext = ctx.__resolverOriginalContext && typeof ctx.__resolverOriginalContext === "object" ? ctx.__resolverOriginalContext : {};
6285
+ const originalQueryData = ctx.__resolverQueryData && typeof ctx.__resolverQueryData === "object" ? ctx.__resolverQueryData : void 0;
6286
+ const normalizedContext = {
6287
+ ...originalContext,
6288
+ ...ctx,
6289
+ queryData: ctx.queryData && typeof ctx.queryData === "object" ? ctx.queryData : originalQueryData
6290
+ };
6291
+ emit(executionResolvedSignal, normalizedContext);
6292
+ return normalizedContext;
6279
6293
  },
6280
6294
  `Resolves signal-driven ${tableName} graph-sync insert execution.`,
6281
6295
  {