@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.
@@ -6208,6 +6208,13 @@ function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, opti
6208
6208
  `Prepare graph sync insert execution for ${tableName}`,
6209
6209
  (ctx) => ({
6210
6210
  ...ctx,
6211
+ __resolverOriginalContext: {
6212
+ ...ctx
6213
+ },
6214
+ __resolverQueryData: buildSyncInsertQueryData(
6215
+ ctx,
6216
+ queryData
6217
+ ),
6211
6218
  queryData: buildSyncInsertQueryData(
6212
6219
  ctx,
6213
6220
  queryData
@@ -6225,8 +6232,15 @@ function resolveSyncInsertTask(isCadenzaDBReady, tableName, queryData = {}, opti
6225
6232
  if (!ctx.__resolverRequestId) {
6226
6233
  return false;
6227
6234
  }
6228
- emit(executionResolvedSignal, ctx);
6229
- return ctx;
6235
+ const originalContext = ctx.__resolverOriginalContext && typeof ctx.__resolverOriginalContext === "object" ? ctx.__resolverOriginalContext : {};
6236
+ const originalQueryData = ctx.__resolverQueryData && typeof ctx.__resolverQueryData === "object" ? ctx.__resolverQueryData : void 0;
6237
+ const normalizedContext = {
6238
+ ...originalContext,
6239
+ ...ctx,
6240
+ queryData: ctx.queryData && typeof ctx.queryData === "object" ? ctx.queryData : originalQueryData
6241
+ };
6242
+ emit(executionResolvedSignal, normalizedContext);
6243
+ return normalizedContext;
6230
6244
  },
6231
6245
  `Resolves signal-driven ${tableName} graph-sync insert execution.`,
6232
6246
  {
@@ -6429,7 +6443,7 @@ var GraphSyncController = class _GraphSyncController {
6429
6443
  { concurrency: 30 }
6430
6444
  )?.then(
6431
6445
  CadenzaService.createMetaTask("Register routine", (ctx) => {
6432
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6446
+ if (!didSyncInsertSucceed(ctx)) {
6433
6447
  return;
6434
6448
  }
6435
6449
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6518,7 +6532,7 @@ var GraphSyncController = class _GraphSyncController {
6518
6532
  { concurrency: 30 }
6519
6533
  )?.then(
6520
6534
  CadenzaService.createMetaTask("Register routine task", (ctx) => {
6521
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6535
+ if (!didSyncInsertSucceed(ctx)) {
6522
6536
  return;
6523
6537
  }
6524
6538
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6573,7 +6587,7 @@ var GraphSyncController = class _GraphSyncController {
6573
6587
  { concurrency: 30 }
6574
6588
  )?.then(
6575
6589
  CadenzaService.createMetaTask("Process signal registration", (ctx) => {
6576
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6590
+ if (!didSyncInsertSucceed(ctx)) {
6577
6591
  return;
6578
6592
  }
6579
6593
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6665,7 +6679,7 @@ var GraphSyncController = class _GraphSyncController {
6665
6679
  { concurrency: 30 }
6666
6680
  )?.then(
6667
6681
  CadenzaService.createMetaTask("Record registration", (ctx, emit) => {
6668
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6682
+ if (!didSyncInsertSucceed(ctx)) {
6669
6683
  return;
6670
6684
  }
6671
6685
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6736,7 +6750,7 @@ var GraphSyncController = class _GraphSyncController {
6736
6750
  { concurrency: 30 }
6737
6751
  )?.then(
6738
6752
  CadenzaService.createMetaTask("Record actor registration", (ctx) => {
6739
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6753
+ if (!didSyncInsertSucceed(ctx)) {
6740
6754
  return;
6741
6755
  }
6742
6756
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6816,7 +6830,7 @@ var GraphSyncController = class _GraphSyncController {
6816
6830
  { concurrency: 30 }
6817
6831
  )?.then(
6818
6832
  CadenzaService.createMetaTask("Record actor task map registration", (ctx) => {
6819
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6833
+ if (!didSyncInsertSucceed(ctx)) {
6820
6834
  return;
6821
6835
  }
6822
6836
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6829,7 +6843,7 @@ var GraphSyncController = class _GraphSyncController {
6829
6843
  const registerSignalTask = CadenzaService.createMetaTask(
6830
6844
  "Record signal registration",
6831
6845
  (ctx) => {
6832
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6846
+ if (!didSyncInsertSucceed(ctx)) {
6833
6847
  return;
6834
6848
  }
6835
6849
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6921,7 +6935,7 @@ var GraphSyncController = class _GraphSyncController {
6921
6935
  CadenzaService.createMetaTask("Process split intent registration", (ctx) => ctx).doOn("meta.sync_controller.intent_registration_split").then(
6922
6936
  insertIntentRegistryTask?.then(
6923
6937
  CadenzaService.createMetaTask("Record intent definition registration", (ctx) => {
6924
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6938
+ if (!didSyncInsertSucceed(ctx)) {
6925
6939
  return;
6926
6940
  }
6927
6941
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -6947,7 +6961,7 @@ var GraphSyncController = class _GraphSyncController {
6947
6961
  const registerIntentTask = CadenzaService.createMetaTask(
6948
6962
  "Record intent registration",
6949
6963
  (ctx) => {
6950
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
6964
+ if (!didSyncInsertSucceed(ctx)) {
6951
6965
  return;
6952
6966
  }
6953
6967
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -7119,7 +7133,7 @@ var GraphSyncController = class _GraphSyncController {
7119
7133
  { concurrency: 30 }
7120
7134
  )?.then(
7121
7135
  CadenzaService.createMetaTask("Record task map registration", (ctx) => {
7122
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
7136
+ if (!didSyncInsertSucceed(ctx)) {
7123
7137
  return;
7124
7138
  }
7125
7139
  CadenzaService.debounce("meta.sync_controller.synced_resource", {
@@ -7180,7 +7194,7 @@ var GraphSyncController = class _GraphSyncController {
7180
7194
  CadenzaService.createMetaTask(
7181
7195
  "Record deputy relationship registration",
7182
7196
  (ctx) => {
7183
- if (!ctx.__syncing || !didSyncInsertSucceed(ctx)) {
7197
+ if (!didSyncInsertSucceed(ctx)) {
7184
7198
  return;
7185
7199
  }
7186
7200
  CadenzaService.debounce("meta.sync_controller.synced_resource", {