@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.
@@ -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
  {
@@ -6478,7 +6492,7 @@ var GraphSyncController = class _GraphSyncController {
6478
6492
  { concurrency: 30 }
6479
6493
  )?.then(
6480
6494
  CadenzaService.createMetaTask("Register routine", (ctx) => {
6481
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6495
+ if (!didSyncInsertSucceed(ctx)) {
6482
6496
  return;
6483
6497
  }
6484
6498
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6567,7 +6581,7 @@ var GraphSyncController = class _GraphSyncController {
6567
6581
  { concurrency: 30 }
6568
6582
  )?.then(
6569
6583
  CadenzaService.createMetaTask("Register routine task", (ctx) => {
6570
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6584
+ if (!didSyncInsertSucceed(ctx)) {
6571
6585
  return;
6572
6586
  }
6573
6587
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6622,7 +6636,7 @@ var GraphSyncController = class _GraphSyncController {
6622
6636
  { concurrency: 30 }
6623
6637
  )?.then(
6624
6638
  CadenzaService.createMetaTask("Process signal registration", (ctx) => {
6625
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6639
+ if (!didSyncInsertSucceed(ctx)) {
6626
6640
  return;
6627
6641
  }
6628
6642
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6714,7 +6728,7 @@ var GraphSyncController = class _GraphSyncController {
6714
6728
  { concurrency: 30 }
6715
6729
  )?.then(
6716
6730
  CadenzaService.createMetaTask("Record registration", (ctx, emit) => {
6717
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6731
+ if (!didSyncInsertSucceed(ctx)) {
6718
6732
  return;
6719
6733
  }
6720
6734
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6785,7 +6799,7 @@ var GraphSyncController = class _GraphSyncController {
6785
6799
  { concurrency: 30 }
6786
6800
  )?.then(
6787
6801
  CadenzaService.createMetaTask("Record actor registration", (ctx) => {
6788
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6802
+ if (!didSyncInsertSucceed(ctx)) {
6789
6803
  return;
6790
6804
  }
6791
6805
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6865,7 +6879,7 @@ var GraphSyncController = class _GraphSyncController {
6865
6879
  { concurrency: 30 }
6866
6880
  )?.then(
6867
6881
  CadenzaService.createMetaTask("Record actor task map registration", (ctx) => {
6868
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6882
+ if (!didSyncInsertSucceed(ctx)) {
6869
6883
  return;
6870
6884
  }
6871
6885
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6878,7 +6892,7 @@ var GraphSyncController = class _GraphSyncController {
6878
6892
  const registerSignalTask = CadenzaService.createMetaTask(
6879
6893
  "Record signal registration",
6880
6894
  (ctx) => {
6881
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6895
+ if (!didSyncInsertSucceed(ctx)) {
6882
6896
  return;
6883
6897
  }
6884
6898
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6970,7 +6984,7 @@ var GraphSyncController = class _GraphSyncController {
6970
6984
  CadenzaService.createMetaTask("Process split intent registration", (ctx) => ctx).doOn("meta.sync_controller.intent_registration_split").then(
6971
6985
  insertIntentRegistryTask?.then(
6972
6986
  CadenzaService.createMetaTask("Record intent definition registration", (ctx) => {
6973
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6987
+ if (!didSyncInsertSucceed(ctx)) {
6974
6988
  return;
6975
6989
  }
6976
6990
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6996,7 +7010,7 @@ var GraphSyncController = class _GraphSyncController {
6996
7010
  const registerIntentTask = CadenzaService.createMetaTask(
6997
7011
  "Record intent registration",
6998
7012
  (ctx) => {
6999
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
7013
+ if (!didSyncInsertSucceed(ctx)) {
7000
7014
  return;
7001
7015
  }
7002
7016
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -7168,7 +7182,7 @@ var GraphSyncController = class _GraphSyncController {
7168
7182
  { concurrency: 30 }
7169
7183
  )?.then(
7170
7184
  CadenzaService.createMetaTask("Record task map registration", (ctx) => {
7171
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
7185
+ if (!didSyncInsertSucceed(ctx)) {
7172
7186
  return;
7173
7187
  }
7174
7188
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -7229,7 +7243,7 @@ var GraphSyncController = class _GraphSyncController {
7229
7243
  CadenzaService.createMetaTask(
7230
7244
  "Record deputy relationship registration",
7231
7245
  (ctx) => {
7232
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
7246
+ if (!didSyncInsertSucceed(ctx)) {
7233
7247
  return;
7234
7248
  }
7235
7249
  CadenzaService.debounce("meta.sync_controller.synced_resource", {