@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.js CHANGED
@@ -8721,6 +8721,13 @@ function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, opti
8721
8721
  `Prepare graph sync insert execution for ${tableName}`,
8722
8722
  (ctx) => ({
8723
8723
  ...ctx,
8724
+ __resolverOriginalContext: {
8725
+ ...ctx
8726
+ },
8727
+ __resolverQueryData: buildSyncInsertQueryData(
8728
+ ctx,
8729
+ queryData
8730
+ ),
8724
8731
  queryData: buildSyncInsertQueryData(
8725
8732
  ctx,
8726
8733
  queryData
@@ -8738,8 +8745,15 @@ function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, opti
8738
8745
  if (!ctx.__resolverRequestId) {
8739
8746
  return false;
8740
8747
  }
8741
- emit(executionResolvedSignal, ctx);
8742
- return ctx;
8748
+ const originalContext = ctx.__resolverOriginalContext && typeof ctx.__resolverOriginalContext === "object" ? ctx.__resolverOriginalContext : {};
8749
+ const originalQueryData = ctx.__resolverQueryData && typeof ctx.__resolverQueryData === "object" ? ctx.__resolverQueryData : void 0;
8750
+ const normalizedContext = {
8751
+ ...originalContext,
8752
+ ...ctx,
8753
+ queryData: ctx.queryData && typeof ctx.queryData === "object" ? ctx.queryData : originalQueryData
8754
+ };
8755
+ emit(executionResolvedSignal, normalizedContext);
8756
+ return normalizedContext;
8743
8757
  },
8744
8758
  `Resolves signal-driven ${tableName} graph-sync insert execution.`,
8745
8759
  {
@@ -8942,7 +8956,7 @@ var GraphSyncController = class _GraphSyncController {
8942
8956
  { concurrency: 30 }
8943
8957
  )?.then(
8944
8958
  CadenzaService.createMetaTask("Register routine", (ctx) => {
8945
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
8959
+ if (!didSyncInsertSucceed(ctx)) {
8946
8960
  return;
8947
8961
  }
8948
8962
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9031,7 +9045,7 @@ var GraphSyncController = class _GraphSyncController {
9031
9045
  { concurrency: 30 }
9032
9046
  )?.then(
9033
9047
  CadenzaService.createMetaTask("Register routine task", (ctx) => {
9034
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9048
+ if (!didSyncInsertSucceed(ctx)) {
9035
9049
  return;
9036
9050
  }
9037
9051
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9086,7 +9100,7 @@ var GraphSyncController = class _GraphSyncController {
9086
9100
  { concurrency: 30 }
9087
9101
  )?.then(
9088
9102
  CadenzaService.createMetaTask("Process signal registration", (ctx) => {
9089
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9103
+ if (!didSyncInsertSucceed(ctx)) {
9090
9104
  return;
9091
9105
  }
9092
9106
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9178,7 +9192,7 @@ var GraphSyncController = class _GraphSyncController {
9178
9192
  { concurrency: 30 }
9179
9193
  )?.then(
9180
9194
  CadenzaService.createMetaTask("Record registration", (ctx, emit) => {
9181
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9195
+ if (!didSyncInsertSucceed(ctx)) {
9182
9196
  return;
9183
9197
  }
9184
9198
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9249,7 +9263,7 @@ var GraphSyncController = class _GraphSyncController {
9249
9263
  { concurrency: 30 }
9250
9264
  )?.then(
9251
9265
  CadenzaService.createMetaTask("Record actor registration", (ctx) => {
9252
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9266
+ if (!didSyncInsertSucceed(ctx)) {
9253
9267
  return;
9254
9268
  }
9255
9269
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9329,7 +9343,7 @@ var GraphSyncController = class _GraphSyncController {
9329
9343
  { concurrency: 30 }
9330
9344
  )?.then(
9331
9345
  CadenzaService.createMetaTask("Record actor task map registration", (ctx) => {
9332
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9346
+ if (!didSyncInsertSucceed(ctx)) {
9333
9347
  return;
9334
9348
  }
9335
9349
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9342,7 +9356,7 @@ var GraphSyncController = class _GraphSyncController {
9342
9356
  const registerSignalTask = CadenzaService.createMetaTask(
9343
9357
  "Record signal registration",
9344
9358
  (ctx) => {
9345
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9359
+ if (!didSyncInsertSucceed(ctx)) {
9346
9360
  return;
9347
9361
  }
9348
9362
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9434,7 +9448,7 @@ var GraphSyncController = class _GraphSyncController {
9434
9448
  CadenzaService.createMetaTask("Process split intent registration", (ctx) => ctx).doOn("meta.sync_controller.intent_registration_split").then(
9435
9449
  insertIntentRegistryTask?.then(
9436
9450
  CadenzaService.createMetaTask("Record intent definition registration", (ctx) => {
9437
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9451
+ if (!didSyncInsertSucceed(ctx)) {
9438
9452
  return;
9439
9453
  }
9440
9454
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9460,7 +9474,7 @@ var GraphSyncController = class _GraphSyncController {
9460
9474
  const registerIntentTask = CadenzaService.createMetaTask(
9461
9475
  "Record intent registration",
9462
9476
  (ctx) => {
9463
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9477
+ if (!didSyncInsertSucceed(ctx)) {
9464
9478
  return;
9465
9479
  }
9466
9480
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9632,7 +9646,7 @@ var GraphSyncController = class _GraphSyncController {
9632
9646
  { concurrency: 30 }
9633
9647
  )?.then(
9634
9648
  CadenzaService.createMetaTask("Record task map registration", (ctx) => {
9635
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9649
+ if (!didSyncInsertSucceed(ctx)) {
9636
9650
  return;
9637
9651
  }
9638
9652
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -9693,7 +9707,7 @@ var GraphSyncController = class _GraphSyncController {
9693
9707
  CadenzaService.createMetaTask(
9694
9708
  "Record deputy relationship registration",
9695
9709
  (ctx) => {
9696
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
9710
+ if (!didSyncInsertSucceed(ctx)) {
9697
9711
  return;
9698
9712
  }
9699
9713
  CadenzaService.debounce("meta.sync_controller.synced_resource", {