@cadenza.io/service 2.17.40 → 2.17.42

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/index.mjs CHANGED
@@ -8672,6 +8672,13 @@ function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, opti
8672
8672
  `Prepare graph sync insert execution for ${tableName}`,
8673
8673
  (ctx) => ({
8674
8674
  ...ctx,
8675
+ __resolverOriginalContext: {
8676
+ ...ctx
8677
+ },
8678
+ __resolverQueryData: buildSyncInsertQueryData(
8679
+ ctx,
8680
+ queryData
8681
+ ),
8675
8682
  queryData: buildSyncInsertQueryData(
8676
8683
  ctx,
8677
8684
  queryData
@@ -8689,8 +8696,15 @@ function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, opti
8689
8696
  if (!ctx.__resolverRequestId) {
8690
8697
  return false;
8691
8698
  }
8692
- emit(executionResolvedSignal, ctx);
8693
- return ctx;
8699
+ const originalContext = ctx.__resolverOriginalContext && typeof ctx.__resolverOriginalContext === "object" ? ctx.__resolverOriginalContext : {};
8700
+ const originalQueryData = ctx.__resolverQueryData && typeof ctx.__resolverQueryData === "object" ? ctx.__resolverQueryData : void 0;
8701
+ const normalizedContext = {
8702
+ ...originalContext,
8703
+ ...ctx,
8704
+ queryData: ctx.queryData && typeof ctx.queryData === "object" ? ctx.queryData : originalQueryData
8705
+ };
8706
+ emit(executionResolvedSignal, normalizedContext);
8707
+ return normalizedContext;
8694
8708
  },
8695
8709
  `Resolves signal-driven ${tableName} graph-sync insert execution.`,
8696
8710
  {
@@ -8893,7 +8907,7 @@ var GraphSyncController = class _GraphSyncController {
8893
8907
  { concurrency: 30 }
8894
8908
  )?.then(
8895
8909
  CadenzaService.createMetaTask("Register routine", (ctx) => {
8896
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
8910
+ if (!didSyncInsertSucceed(ctx)) {
8897
8911
  return;
8898
8912
  }
8899
8913
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -8982,7 +8996,7 @@ var GraphSyncController = class _GraphSyncController {
8982
8996
  { concurrency: 30 }
8983
8997
  )?.then(
8984
8998
  CadenzaService.createMetaTask("Register routine task", (ctx) => {
8985
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
8999
+ if (!didSyncInsertSucceed(ctx)) {
8986
9000
  return;
8987
9001
  }
8988
9002
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9037,7 +9051,7 @@ var GraphSyncController = class _GraphSyncController {
9037
9051
  { concurrency: 30 }
9038
9052
  )?.then(
9039
9053
  CadenzaService.createMetaTask("Process signal registration", (ctx) => {
9040
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9054
+ if (!didSyncInsertSucceed(ctx)) {
9041
9055
  return;
9042
9056
  }
9043
9057
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9129,7 +9143,7 @@ var GraphSyncController = class _GraphSyncController {
9129
9143
  { concurrency: 30 }
9130
9144
  )?.then(
9131
9145
  CadenzaService.createMetaTask("Record registration", (ctx, emit) => {
9132
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9146
+ if (!didSyncInsertSucceed(ctx)) {
9133
9147
  return;
9134
9148
  }
9135
9149
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9200,7 +9214,7 @@ var GraphSyncController = class _GraphSyncController {
9200
9214
  { concurrency: 30 }
9201
9215
  )?.then(
9202
9216
  CadenzaService.createMetaTask("Record actor registration", (ctx) => {
9203
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9217
+ if (!didSyncInsertSucceed(ctx)) {
9204
9218
  return;
9205
9219
  }
9206
9220
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9280,7 +9294,7 @@ var GraphSyncController = class _GraphSyncController {
9280
9294
  { concurrency: 30 }
9281
9295
  )?.then(
9282
9296
  CadenzaService.createMetaTask("Record actor task map registration", (ctx) => {
9283
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9297
+ if (!didSyncInsertSucceed(ctx)) {
9284
9298
  return;
9285
9299
  }
9286
9300
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9293,7 +9307,7 @@ var GraphSyncController = class _GraphSyncController {
9293
9307
  const registerSignalTask = CadenzaService.createMetaTask(
9294
9308
  "Record signal registration",
9295
9309
  (ctx) => {
9296
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9310
+ if (!didSyncInsertSucceed(ctx)) {
9297
9311
  return;
9298
9312
  }
9299
9313
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9385,7 +9399,7 @@ var GraphSyncController = class _GraphSyncController {
9385
9399
  CadenzaService.createMetaTask("Process split intent registration", (ctx) => ctx).doOn("meta.sync_controller.intent_registration_split").then(
9386
9400
  insertIntentRegistryTask?.then(
9387
9401
  CadenzaService.createMetaTask("Record intent definition registration", (ctx) => {
9388
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9402
+ if (!didSyncInsertSucceed(ctx)) {
9389
9403
  return;
9390
9404
  }
9391
9405
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9411,7 +9425,7 @@ var GraphSyncController = class _GraphSyncController {
9411
9425
  const registerIntentTask = CadenzaService.createMetaTask(
9412
9426
  "Record intent registration",
9413
9427
  (ctx) => {
9414
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9428
+ if (!didSyncInsertSucceed(ctx)) {
9415
9429
  return;
9416
9430
  }
9417
9431
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9583,7 +9597,7 @@ var GraphSyncController = class _GraphSyncController {
9583
9597
  { concurrency: 30 }
9584
9598
  )?.then(
9585
9599
  CadenzaService.createMetaTask("Record task map registration", (ctx) => {
9586
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9600
+ if (!didSyncInsertSucceed(ctx)) {
9587
9601
  return;
9588
9602
  }
9589
9603
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9644,7 +9658,7 @@ var GraphSyncController = class _GraphSyncController {
9644
9658
  CadenzaService.createMetaTask(
9645
9659
  "Record deputy relationship registration",
9646
9660
  (ctx) => {
9647
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9661
+ if (!didSyncInsertSucceed(ctx)) {
9648
9662
  return;
9649
9663
  }
9650
9664
  CadenzaService.debounce("meta.sync_controller.synced_resource", {