@erdoai/cli 0.103.2 → 0.104.0

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.
Files changed (2) hide show
  1. package/dist/index.js +10 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6528,6 +6528,9 @@ datasetsCmd.command("configure-integration <dataset-id>").description(
6528
6528
  ).option(
6529
6529
  "--disable-sync",
6530
6530
  "tear down the canonical data-platform sync \u2014 retire a superseded or stale synced dataset; ignores --segments"
6531
+ ).option(
6532
+ "--replaced-by <slug>",
6533
+ "with --disable-sync: the dataset that takes over (same organization); automations reading the retired dataset are moved onto it"
6531
6534
  ).action(
6532
6535
  async (datasetID, opts) => {
6533
6536
  try {
@@ -6535,6 +6538,10 @@ datasetsCmd.command("configure-integration <dataset-id>").description(
6535
6538
  fail("Pass either --enable-sync or --disable-sync, not both");
6536
6539
  return;
6537
6540
  }
6541
+ if (opts.replacedBy && !opts.disableSync) {
6542
+ fail("--replaced-by only applies together with --disable-sync");
6543
+ return;
6544
+ }
6538
6545
  if (!opts.disableSync && !opts.enableSync && !opts.segments) {
6539
6546
  fail("--segments is required unless you pass --enable-sync or --disable-sync");
6540
6547
  return;
@@ -6543,10 +6550,11 @@ datasetsCmd.command("configure-integration <dataset-id>").description(
6543
6550
  const result = await new ErdoClient().configureIntegrationDataset(datasetID, {
6544
6551
  segments,
6545
6552
  enable_sync: opts.enableSync,
6546
- disable_sync: opts.disableSync
6553
+ disable_sync: opts.disableSync,
6554
+ replaced_by: opts.replacedBy
6547
6555
  });
6548
6556
  console.log(
6549
- opts.disableSync ? `Retired sync for dataset ${result.dataset_id} (status: ${result.status}). Re-enable with --enable-sync.` : `Configured dataset ${result.dataset_id}, status: ${result.status}, sync: ${result.sync_enabled ? "enabled" : "unchanged"}`
6557
+ opts.disableSync ? `Retired sync for dataset ${result.dataset_id} (status: ${result.status}).` + (opts.replacedBy ? ` Automations that read it are moving to ${opts.replacedBy}.` : "") + " Re-enable with --enable-sync." : `Configured dataset ${result.dataset_id}, status: ${result.status}, sync: ${result.sync_enabled ? "enabled" : "unchanged"}`
6550
6558
  );
6551
6559
  } catch (e) {
6552
6560
  fail(e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.103.2",
3
+ "version": "0.104.0",
4
4
  "description": "Erdo CLI — drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {