@uniformdev/cli 19.196.0 → 19.196.1-alpha.8

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
@@ -21,11 +21,11 @@ import {
21
21
 
22
22
  // src/index.ts
23
23
  import * as dotenv from "dotenv";
24
- import yargs35 from "yargs";
24
+ import yargs37 from "yargs";
25
25
  import { hideBin } from "yargs/helpers";
26
26
 
27
27
  // src/commands/canvas/index.ts
28
- import yargs16 from "yargs";
28
+ import yargs18 from "yargs";
29
29
 
30
30
  // src/commands/canvas/commands/asset.ts
31
31
  import yargs from "yargs";
@@ -37,20 +37,20 @@ import { UncachedAssetClient } from "@uniformdev/assets";
37
37
  async function createArraySyncEngineDataSource({
38
38
  name,
39
39
  objects,
40
- selectIdentifier: selectIdentifier14,
41
- selectDisplayName: selectDisplayName14 = selectIdentifier14,
40
+ selectIdentifier: selectIdentifier16,
41
+ selectDisplayName: selectDisplayName16 = selectIdentifier16,
42
42
  onSyncComplete,
43
43
  onBeforeDeleteObject
44
44
  }) {
45
45
  const objectIndex = objects.reduce(
46
46
  (result, current) => {
47
- const rawIdentifiers = selectIdentifier14(current);
47
+ const rawIdentifiers = selectIdentifier16(current);
48
48
  const identifiers = Array.isArray(rawIdentifiers) ? rawIdentifiers : [rawIdentifiers];
49
49
  const existingResult = identifiers.find((id) => result[id]);
50
50
  if (existingResult) {
51
51
  throw new Error(`Identifier(s) ${identifiers} was not unique.`);
52
52
  }
53
- const displayName = selectDisplayName14(current);
53
+ const displayName = selectDisplayName16(current);
54
54
  result[identifiers[0]] = {
55
55
  id: identifiers,
56
56
  object: current,
@@ -80,7 +80,7 @@ async function createArraySyncEngineDataSource({
80
80
  delete objectIndex[providerId];
81
81
  },
82
82
  writeObject: async (objectToWrite) => {
83
- const id = selectIdentifier14(objectToWrite.object);
83
+ const id = selectIdentifier16(objectToWrite.object);
84
84
  if (Array.isArray(id)) {
85
85
  objectIndex[id[0]] = objectToWrite;
86
86
  } else {
@@ -141,8 +141,8 @@ var loadConfig = (configPath) => {
141
141
  async function createFileSyncEngineDataSource({
142
142
  directory,
143
143
  format = "yaml",
144
- selectIdentifier: selectIdentifier14,
145
- selectDisplayName: selectDisplayName14 = selectIdentifier14,
144
+ selectIdentifier: selectIdentifier16,
145
+ selectDisplayName: selectDisplayName16 = selectIdentifier16,
146
146
  selectFilename: selectFilename3,
147
147
  selectSchemaUrl: selectSchemaUrl2,
148
148
  onBeforeDeleteObject
@@ -164,9 +164,9 @@ async function createFileSyncEngineDataSource({
164
164
  const fullFilename = join(directory, filename);
165
165
  try {
166
166
  const contents = await readFileToObject(fullFilename);
167
- const displayName = selectDisplayName14(contents);
167
+ const displayName = selectDisplayName16(contents);
168
168
  const object = {
169
- id: selectIdentifier14(contents),
169
+ id: selectIdentifier16(contents),
170
170
  displayName: Array.isArray(displayName) ? displayName[0] : displayName,
171
171
  providerId: fullFilename,
172
172
  object: omit(contents, ["$schema"])
@@ -424,12 +424,12 @@ function createPublishStatusSyncEngineConsoleLogger(options) {
424
424
  var AssetGetModule = {
425
425
  command: "get <id>",
426
426
  describe: "Get an asset",
427
- builder: (yargs36) => withConfiguration(
427
+ builder: (yargs38) => withConfiguration(
428
428
  withFormatOptions(
429
429
  withApiOptions(
430
430
  withProjectOptions(
431
431
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
432
- yargs36.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
432
+ yargs38.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
433
433
  )
434
434
  )
435
435
  )
@@ -450,7 +450,7 @@ import { UncachedAssetClient as UncachedAssetClient2 } from "@uniformdev/assets"
450
450
  var AssetListModule = {
451
451
  command: "list",
452
452
  describe: "List assets",
453
- builder: (yargs36) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs36)))),
453
+ builder: (yargs38) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs38)))),
454
454
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
455
455
  const fetch3 = nodeFetchProxy(proxy);
456
456
  const client = new UncachedAssetClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -802,8 +802,8 @@ function prepCompositionForDisk(composition) {
802
802
  delete prepped.state;
803
803
  return prepped;
804
804
  }
805
- function withStateOptions(yargs36, defaultState = "preview") {
806
- return yargs36.option("state", {
805
+ function withStateOptions(yargs38, defaultState = "preview") {
806
+ return yargs38.option("state", {
807
807
  type: "string",
808
808
  describe: `State to fetch.`,
809
809
  choices: ["preview", "published"],
@@ -870,11 +870,11 @@ function writeCanvasPackage(filename, packageContents) {
870
870
  var AssetPullModule = {
871
871
  command: "pull <directory>",
872
872
  describe: "Pulls all assets to local files in a directory",
873
- builder: (yargs36) => withConfiguration(
873
+ builder: (yargs38) => withConfiguration(
874
874
  withApiOptions(
875
875
  withProjectOptions(
876
876
  withDiffOptions(
877
- yargs36.positional("directory", {
877
+ yargs38.positional("directory", {
878
878
  describe: "Directory to save the assets to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
879
879
  type: "string"
880
880
  }).option("format", {
@@ -992,11 +992,11 @@ import { UncachedFileClient as UncachedFileClient2 } from "@uniformdev/files";
992
992
  var AssetPushModule = {
993
993
  command: "push <directory>",
994
994
  describe: "Pushes all assets from files in a directory to Uniform",
995
- builder: (yargs36) => withConfiguration(
995
+ builder: (yargs38) => withConfiguration(
996
996
  withApiOptions(
997
997
  withProjectOptions(
998
998
  withDiffOptions(
999
- yargs36.positional("directory", {
999
+ yargs38.positional("directory", {
1000
1000
  describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
1001
1001
  type: "string"
1002
1002
  }).option("what-if", {
@@ -1097,9 +1097,9 @@ var AssetRemoveModule = {
1097
1097
  command: "remove <id>",
1098
1098
  aliases: ["delete", "rm"],
1099
1099
  describe: "Delete an asset",
1100
- builder: (yargs36) => withConfiguration(
1100
+ builder: (yargs38) => withConfiguration(
1101
1101
  withApiOptions(
1102
- withProjectOptions(yargs36.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
1102
+ withProjectOptions(yargs38.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
1103
1103
  )
1104
1104
  ),
1105
1105
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -1115,10 +1115,10 @@ var AssetUpdateModule = {
1115
1115
  command: "update <filename>",
1116
1116
  aliases: ["put"],
1117
1117
  describe: "Insert or update an asset",
1118
- builder: (yargs36) => withConfiguration(
1118
+ builder: (yargs38) => withConfiguration(
1119
1119
  withApiOptions(
1120
1120
  withProjectOptions(
1121
- yargs36.positional("filename", { demandOption: true, describe: "Asset file to put" })
1121
+ yargs38.positional("filename", { demandOption: true, describe: "Asset file to put" })
1122
1122
  )
1123
1123
  )
1124
1124
  ),
@@ -1134,7 +1134,7 @@ var AssetUpdateModule = {
1134
1134
  var AssetModule = {
1135
1135
  command: "asset <command>",
1136
1136
  describe: "Commands for Assets",
1137
- builder: (yargs36) => yargs36.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
1137
+ builder: (yargs38) => yargs38.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
1138
1138
  handler: () => {
1139
1139
  yargs.help();
1140
1140
  }
@@ -1148,11 +1148,11 @@ import { UncachedCategoryClient } from "@uniformdev/canvas";
1148
1148
  var CategoryGetModule = {
1149
1149
  command: "get <id>",
1150
1150
  describe: "Fetch a category",
1151
- builder: (yargs36) => withConfiguration(
1151
+ builder: (yargs38) => withConfiguration(
1152
1152
  withFormatOptions(
1153
1153
  withApiOptions(
1154
1154
  withProjectOptions(
1155
- yargs36.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
1155
+ yargs38.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
1156
1156
  )
1157
1157
  )
1158
1158
  )
@@ -1177,7 +1177,7 @@ var CategoryListModule = {
1177
1177
  command: "list",
1178
1178
  describe: "List categories",
1179
1179
  aliases: ["ls"],
1180
- builder: (yargs36) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs36.options({}))))),
1180
+ builder: (yargs38) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs38.options({}))))),
1181
1181
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
1182
1182
  const fetch3 = nodeFetchProxy(proxy);
1183
1183
  const client = new UncachedCategoryClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -1227,11 +1227,11 @@ function createCategoriesEngineDataSource({
1227
1227
  var CategoryPullModule = {
1228
1228
  command: "pull <directory>",
1229
1229
  describe: "Pulls all categories to local files in a directory",
1230
- builder: (yargs36) => withConfiguration(
1230
+ builder: (yargs38) => withConfiguration(
1231
1231
  withApiOptions(
1232
1232
  withProjectOptions(
1233
1233
  withDiffOptions(
1234
- yargs36.positional("directory", {
1234
+ yargs38.positional("directory", {
1235
1235
  describe: "Directory to save the categories to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
1236
1236
  type: "string"
1237
1237
  }).option("format", {
@@ -1309,11 +1309,11 @@ import { UncachedCategoryClient as UncachedCategoryClient4 } from "@uniformdev/c
1309
1309
  var CategoryPushModule = {
1310
1310
  command: "push <directory>",
1311
1311
  describe: "Pushes all categories from files in a directory to Uniform Canvas",
1312
- builder: (yargs36) => withConfiguration(
1312
+ builder: (yargs38) => withConfiguration(
1313
1313
  withApiOptions(
1314
1314
  withProjectOptions(
1315
1315
  withDiffOptions(
1316
- yargs36.positional("directory", {
1316
+ yargs38.positional("directory", {
1317
1317
  describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
1318
1318
  type: "string"
1319
1319
  }).option("what-if", {
@@ -1380,10 +1380,10 @@ var CategoryRemoveModule = {
1380
1380
  command: "remove <id>",
1381
1381
  aliases: ["delete", "rm"],
1382
1382
  describe: "Delete a category",
1383
- builder: (yargs36) => withConfiguration(
1383
+ builder: (yargs38) => withConfiguration(
1384
1384
  withApiOptions(
1385
1385
  withProjectOptions(
1386
- yargs36.positional("id", { demandOption: true, describe: "Category UUID to delete" })
1386
+ yargs38.positional("id", { demandOption: true, describe: "Category UUID to delete" })
1387
1387
  )
1388
1388
  )
1389
1389
  ),
@@ -1400,10 +1400,10 @@ var CategoryUpdateModule = {
1400
1400
  command: "update <filename>",
1401
1401
  aliases: ["put"],
1402
1402
  describe: "Insert or update a category",
1403
- builder: (yargs36) => withConfiguration(
1403
+ builder: (yargs38) => withConfiguration(
1404
1404
  withApiOptions(
1405
1405
  withProjectOptions(
1406
- yargs36.positional("filename", { demandOption: true, describe: "Category file to put" })
1406
+ yargs38.positional("filename", { demandOption: true, describe: "Category file to put" })
1407
1407
  )
1408
1408
  )
1409
1409
  ),
@@ -1420,7 +1420,7 @@ var CategoryModule = {
1420
1420
  command: "category <command>",
1421
1421
  aliases: ["cat"],
1422
1422
  describe: "Commands for Canvas categories",
1423
- builder: (yargs36) => yargs36.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
1423
+ builder: (yargs38) => yargs38.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
1424
1424
  handler: () => {
1425
1425
  yargs2.help();
1426
1426
  }
@@ -1441,11 +1441,11 @@ var selectSchemaUrl = () => "/schemas/json-schema/component-definition/v1.json";
1441
1441
  var ComponentGetModule = {
1442
1442
  command: "get <id>",
1443
1443
  describe: "Fetch a component definition",
1444
- builder: (yargs36) => withConfiguration(
1444
+ builder: (yargs38) => withConfiguration(
1445
1445
  withFormatOptions(
1446
1446
  withApiOptions(
1447
1447
  withProjectOptions(
1448
- yargs36.positional("id", {
1448
+ yargs38.positional("id", {
1449
1449
  demandOption: true,
1450
1450
  describe: "Component definition public ID to fetch"
1451
1451
  })
@@ -1479,11 +1479,11 @@ var ComponentListModule = {
1479
1479
  command: "list",
1480
1480
  describe: "List component definitions",
1481
1481
  aliases: ["ls"],
1482
- builder: (yargs36) => withConfiguration(
1482
+ builder: (yargs38) => withConfiguration(
1483
1483
  withFormatOptions(
1484
1484
  withApiOptions(
1485
1485
  withProjectOptions(
1486
- yargs36.options({
1486
+ yargs38.options({
1487
1487
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
1488
1488
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
1489
1489
  })
@@ -1539,11 +1539,11 @@ function createComponentDefinitionEngineDataSource({
1539
1539
  var ComponentPullModule = {
1540
1540
  command: "pull <directory>",
1541
1541
  describe: "Pulls all component definitions to local files in a directory",
1542
- builder: (yargs36) => withConfiguration(
1542
+ builder: (yargs38) => withConfiguration(
1543
1543
  withApiOptions(
1544
1544
  withProjectOptions(
1545
1545
  withDiffOptions(
1546
- yargs36.positional("directory", {
1546
+ yargs38.positional("directory", {
1547
1547
  describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
1548
1548
  type: "string"
1549
1549
  }).option("format", {
@@ -1622,11 +1622,11 @@ import { UncachedCanvasClient as UncachedCanvasClient4 } from "@uniformdev/canva
1622
1622
  var ComponentPushModule = {
1623
1623
  command: "push <directory>",
1624
1624
  describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
1625
- builder: (yargs36) => withConfiguration(
1625
+ builder: (yargs38) => withConfiguration(
1626
1626
  withApiOptions(
1627
1627
  withProjectOptions(
1628
1628
  withDiffOptions(
1629
- yargs36.positional("directory", {
1629
+ yargs38.positional("directory", {
1630
1630
  describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
1631
1631
  type: "string"
1632
1632
  }).option("what-if", {
@@ -1694,10 +1694,10 @@ var ComponentRemoveModule = {
1694
1694
  command: "remove <id>",
1695
1695
  aliases: ["delete", "rm"],
1696
1696
  describe: "Delete a component definition",
1697
- builder: (yargs36) => withConfiguration(
1697
+ builder: (yargs38) => withConfiguration(
1698
1698
  withApiOptions(
1699
1699
  withProjectOptions(
1700
- yargs36.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1700
+ yargs38.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1701
1701
  )
1702
1702
  )
1703
1703
  ),
@@ -1714,10 +1714,10 @@ var ComponentUpdateModule = {
1714
1714
  command: "update <filename>",
1715
1715
  aliases: ["put"],
1716
1716
  describe: "Insert or update a component definition",
1717
- builder: (yargs36) => withConfiguration(
1717
+ builder: (yargs38) => withConfiguration(
1718
1718
  withApiOptions(
1719
1719
  withProjectOptions(
1720
- yargs36.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1720
+ yargs38.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1721
1721
  )
1722
1722
  )
1723
1723
  ),
@@ -1734,7 +1734,7 @@ var ComponentModule = {
1734
1734
  command: "component <command>",
1735
1735
  aliases: ["def"],
1736
1736
  describe: "Commands for Canvas component definitions",
1737
- builder: (yargs36) => yargs36.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
1737
+ builder: (yargs38) => yargs38.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
1738
1738
  handler: () => {
1739
1739
  yargs3.help();
1740
1740
  }
@@ -1748,13 +1748,13 @@ import { UncachedCanvasClient as UncachedCanvasClient7 } from "@uniformdev/canva
1748
1748
  var CompositionGetModule = {
1749
1749
  command: "get <id>",
1750
1750
  describe: "Fetch a composition",
1751
- builder: (yargs36) => withFormatOptions(
1751
+ builder: (yargs38) => withFormatOptions(
1752
1752
  withConfiguration(
1753
1753
  withApiOptions(
1754
1754
  withProjectOptions(
1755
1755
  withStateOptions(
1756
1756
  withVerboseOption(
1757
- yargs36.positional("id", {
1757
+ yargs38.positional("id", {
1758
1758
  demandOption: true,
1759
1759
  describe: "Composition/pattern public ID to fetch"
1760
1760
  }).option({
@@ -1845,13 +1845,13 @@ var CompositionListModule = {
1845
1845
  command: "list",
1846
1846
  describe: "List compositions",
1847
1847
  aliases: ["ls"],
1848
- builder: (yargs36) => withFormatOptions(
1848
+ builder: (yargs38) => withFormatOptions(
1849
1849
  withConfiguration(
1850
1850
  withApiOptions(
1851
1851
  withProjectOptions(
1852
1852
  withDebugOptions(
1853
1853
  withStateOptions(
1854
- yargs36.options({
1854
+ yargs38.options({
1855
1855
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
1856
1856
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
1857
1857
  search: { describe: "Search query", type: "string", default: "" },
@@ -1932,12 +1932,12 @@ var CompositionListModule = {
1932
1932
  var ComponentPatternListModule = {
1933
1933
  ...CompositionListModule,
1934
1934
  describe: "List component patterns",
1935
- builder: (yargs36) => withFormatOptions(
1935
+ builder: (yargs38) => withFormatOptions(
1936
1936
  withConfiguration(
1937
1937
  withApiOptions(
1938
1938
  withProjectOptions(
1939
1939
  withStateOptions(
1940
- yargs36.options({
1940
+ yargs38.options({
1941
1941
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
1942
1942
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
1943
1943
  resolvePatterns: {
@@ -2062,12 +2062,12 @@ function createComponentInstanceEngineDataSource({
2062
2062
  var CompositionPublishModule = {
2063
2063
  command: "publish [ids]",
2064
2064
  describe: "Publishes composition(s)",
2065
- builder: (yargs36) => withConfiguration(
2065
+ builder: (yargs38) => withConfiguration(
2066
2066
  withApiOptions(
2067
2067
  withProjectOptions(
2068
2068
  withDebugOptions(
2069
2069
  withDiffOptions(
2070
- yargs36.positional("ids", {
2070
+ yargs38.positional("ids", {
2071
2071
  describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
2072
2072
  type: "string"
2073
2073
  }).option("all", {
@@ -2144,11 +2144,11 @@ var CompositionPublishModule = {
2144
2144
  var ComponentPatternPublishModule = {
2145
2145
  ...CompositionPublishModule,
2146
2146
  describe: "Publishes component pattern(s)",
2147
- builder: (yargs36) => withConfiguration(
2147
+ builder: (yargs38) => withConfiguration(
2148
2148
  withApiOptions(
2149
2149
  withProjectOptions(
2150
2150
  withDiffOptions(
2151
- yargs36.positional("ids", {
2151
+ yargs38.positional("ids", {
2152
2152
  describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
2153
2153
  type: "string"
2154
2154
  }).option("all", {
@@ -2192,13 +2192,13 @@ import { UncachedFileClient as UncachedFileClient3 } from "@uniformdev/files";
2192
2192
  var CompositionPullModule = {
2193
2193
  command: "pull <directory>",
2194
2194
  describe: "Pulls all compositions to local files in a directory",
2195
- builder: (yargs36) => withConfiguration(
2195
+ builder: (yargs38) => withConfiguration(
2196
2196
  withApiOptions(
2197
2197
  withProjectOptions(
2198
2198
  withStateOptions(
2199
2199
  withDebugOptions(
2200
2200
  withDiffOptions(
2201
- yargs36.positional("directory", {
2201
+ yargs38.positional("directory", {
2202
2202
  describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
2203
2203
  type: "string"
2204
2204
  }).option("format", {
@@ -2306,12 +2306,12 @@ var CompositionPullModule = {
2306
2306
  var ComponentPatternPullModule = {
2307
2307
  ...CompositionPullModule,
2308
2308
  describe: "Pulls all component patterns to local files in a directory",
2309
- builder: (yargs36) => withConfiguration(
2309
+ builder: (yargs38) => withConfiguration(
2310
2310
  withApiOptions(
2311
2311
  withProjectOptions(
2312
2312
  withStateOptions(
2313
2313
  withDiffOptions(
2314
- yargs36.positional("directory", {
2314
+ yargs38.positional("directory", {
2315
2315
  describe: "Directory to save the component definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
2316
2316
  type: "string"
2317
2317
  }).option("format", {
@@ -2355,13 +2355,13 @@ import { UncachedFileClient as UncachedFileClient4 } from "@uniformdev/files";
2355
2355
  var CompositionPushModule = {
2356
2356
  command: "push <directory>",
2357
2357
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
2358
- builder: (yargs36) => withConfiguration(
2358
+ builder: (yargs38) => withConfiguration(
2359
2359
  withApiOptions(
2360
2360
  withProjectOptions(
2361
2361
  withStateOptions(
2362
2362
  withDebugOptions(
2363
2363
  withDiffOptions(
2364
- yargs36.positional("directory", {
2364
+ yargs38.positional("directory", {
2365
2365
  describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
2366
2366
  type: "string"
2367
2367
  }).option("mode", {
@@ -2457,12 +2457,12 @@ var CompositionPushModule = {
2457
2457
  var ComponentPatternPushModule = {
2458
2458
  ...CompositionPushModule,
2459
2459
  describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
2460
- builder: (yargs36) => withConfiguration(
2460
+ builder: (yargs38) => withConfiguration(
2461
2461
  withApiOptions(
2462
2462
  withProjectOptions(
2463
2463
  withStateOptions(
2464
2464
  withDiffOptions(
2465
- yargs36.positional("directory", {
2465
+ yargs38.positional("directory", {
2466
2466
  describe: "Directory to read the compositions/component patterns from. If a filename is used, a package will be read instead.",
2467
2467
  type: "string"
2468
2468
  }).option("what-if", {
@@ -2500,11 +2500,11 @@ var CompositionRemoveModule = {
2500
2500
  command: "remove <id>",
2501
2501
  aliases: ["delete", "rm"],
2502
2502
  describe: "Delete a composition",
2503
- builder: (yargs36) => withConfiguration(
2503
+ builder: (yargs38) => withConfiguration(
2504
2504
  withApiOptions(
2505
2505
  withDebugOptions(
2506
2506
  withProjectOptions(
2507
- yargs36.positional("id", {
2507
+ yargs38.positional("id", {
2508
2508
  demandOption: true,
2509
2509
  describe: "Composition/pattern public ID to delete"
2510
2510
  })
@@ -2537,11 +2537,11 @@ import { diffJson as diffJson2 } from "diff";
2537
2537
  var CompositionUnpublishModule = {
2538
2538
  command: "unpublish [ids]",
2539
2539
  describe: "Unpublish a composition(s)",
2540
- builder: (yargs36) => withConfiguration(
2540
+ builder: (yargs38) => withConfiguration(
2541
2541
  withApiOptions(
2542
2542
  withDebugOptions(
2543
2543
  withProjectOptions(
2544
- yargs36.positional("ids", {
2544
+ yargs38.positional("ids", {
2545
2545
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
2546
2546
  type: "string"
2547
2547
  }).option("all", {
@@ -2636,10 +2636,10 @@ var CompositionUnpublishModule = {
2636
2636
  var ComponentPatternUnpublishModule = {
2637
2637
  command: "unpublish [ids]",
2638
2638
  describe: "Unpublish a component pattern(s)",
2639
- builder: (yargs36) => withConfiguration(
2639
+ builder: (yargs38) => withConfiguration(
2640
2640
  withApiOptions(
2641
2641
  withProjectOptions(
2642
- yargs36.positional("ids", {
2642
+ yargs38.positional("ids", {
2643
2643
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
2644
2644
  type: "string"
2645
2645
  }).option("all", {
@@ -2678,12 +2678,12 @@ var CompositionUpdateModule = {
2678
2678
  command: "update <filename>",
2679
2679
  aliases: ["put"],
2680
2680
  describe: "Insert or update a composition",
2681
- builder: (yargs36) => withConfiguration(
2681
+ builder: (yargs38) => withConfiguration(
2682
2682
  withApiOptions(
2683
2683
  withProjectOptions(
2684
2684
  withVerboseOption(
2685
2685
  withStateOptions(
2686
- yargs36.positional("filename", {
2686
+ yargs38.positional("filename", {
2687
2687
  demandOption: true,
2688
2688
  describe: "Composition/pattern file to put"
2689
2689
  })
@@ -2713,7 +2713,7 @@ var ComponentPatternUpdateModule = {
2713
2713
  var ComponentPatternModule = {
2714
2714
  command: "component-pattern <command>",
2715
2715
  describe: "Commands for Canvas component patterns",
2716
- builder: (yargs36) => yargs36.command(ComponentPatternPullModule).command(ComponentPatternPushModule).command(ComponentPatternGetModule).command(ComponentPatternRemoveModule).command(ComponentPatternListModule).command(ComponentPatternUpdateModule).command(ComponentPatternPublishModule).command(ComponentPatternUnpublishModule).demandCommand(),
2716
+ builder: (yargs38) => yargs38.command(ComponentPatternPullModule).command(ComponentPatternPushModule).command(ComponentPatternGetModule).command(ComponentPatternRemoveModule).command(ComponentPatternListModule).command(ComponentPatternUpdateModule).command(ComponentPatternPublishModule).command(ComponentPatternUnpublishModule).demandCommand(),
2717
2717
  handler: () => {
2718
2718
  yargs4.help();
2719
2719
  }
@@ -2725,7 +2725,7 @@ var CompositionModule = {
2725
2725
  command: "composition <command>",
2726
2726
  describe: "Commands for Canvas compositions",
2727
2727
  aliases: ["comp"],
2728
- builder: (yargs36) => yargs36.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
2728
+ builder: (yargs38) => yargs38.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
2729
2729
  handler: () => {
2730
2730
  yargs5.help();
2731
2731
  }
@@ -2744,12 +2744,12 @@ var CompositionPatternGetModule = {
2744
2744
  var CompositionPatternListModule = {
2745
2745
  ...CompositionListModule,
2746
2746
  describe: "List composition patterns",
2747
- builder: (yargs36) => withFormatOptions(
2747
+ builder: (yargs38) => withFormatOptions(
2748
2748
  withConfiguration(
2749
2749
  withApiOptions(
2750
2750
  withProjectOptions(
2751
2751
  withStateOptions(
2752
- yargs36.options({
2752
+ yargs38.options({
2753
2753
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
2754
2754
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
2755
2755
  resolvePatterns: {
@@ -2792,11 +2792,11 @@ var CompositionPatternListModule = {
2792
2792
  var CompositionPatternPublishModule = {
2793
2793
  ...CompositionPublishModule,
2794
2794
  describe: "Publishes composition pattern(s)",
2795
- builder: (yargs36) => withConfiguration(
2795
+ builder: (yargs38) => withConfiguration(
2796
2796
  withApiOptions(
2797
2797
  withProjectOptions(
2798
2798
  withDiffOptions(
2799
- yargs36.positional("ids", {
2799
+ yargs38.positional("ids", {
2800
2800
  describe: "Publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
2801
2801
  type: "string"
2802
2802
  }).option("all", {
@@ -2839,12 +2839,12 @@ var CompositionPatternPublishModule = {
2839
2839
  var CompositionPatternPullModule = {
2840
2840
  ...CompositionPullModule,
2841
2841
  describe: "Pulls all composition patterns to local files in a directory",
2842
- builder: (yargs36) => withConfiguration(
2842
+ builder: (yargs38) => withConfiguration(
2843
2843
  withApiOptions(
2844
2844
  withProjectOptions(
2845
2845
  withStateOptions(
2846
2846
  withDiffOptions(
2847
- yargs36.positional("directory", {
2847
+ yargs38.positional("directory", {
2848
2848
  describe: "Directory to save the composition patterns to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
2849
2849
  type: "string"
2850
2850
  }).option("format", {
@@ -2886,12 +2886,12 @@ var CompositionPatternPullModule = {
2886
2886
  var CompositionPatternPushModule = {
2887
2887
  ...CompositionPushModule,
2888
2888
  describe: "Pushes all composition patterns from files in a directory to Uniform Canvas",
2889
- builder: (yargs36) => withConfiguration(
2889
+ builder: (yargs38) => withConfiguration(
2890
2890
  withApiOptions(
2891
2891
  withProjectOptions(
2892
2892
  withStateOptions(
2893
2893
  withDiffOptions(
2894
- yargs36.positional("directory", {
2894
+ yargs38.positional("directory", {
2895
2895
  describe: "Directory to read the compositions patterns from. If a filename is used, a package will be read instead.",
2896
2896
  type: "string"
2897
2897
  }).option("what-if", {
@@ -2933,10 +2933,10 @@ var CompositionPatternRemoveModule = {
2933
2933
  var CompositionPatternUnpublishModule = {
2934
2934
  command: "unpublish [ids]",
2935
2935
  describe: "Unpublish a composition pattern(s)",
2936
- builder: (yargs36) => withConfiguration(
2936
+ builder: (yargs38) => withConfiguration(
2937
2937
  withApiOptions(
2938
2938
  withProjectOptions(
2939
- yargs36.positional("ids", {
2939
+ yargs38.positional("ids", {
2940
2940
  describe: "Un-publishes composition pattern(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
2941
2941
  type: "string"
2942
2942
  }).option("all", {
@@ -2976,7 +2976,7 @@ var CompositionPatternUpdateModule = {
2976
2976
  var CompositionPatternModule = {
2977
2977
  command: "composition-pattern <command>",
2978
2978
  describe: "Commands for Canvas composition patterns",
2979
- builder: (yargs36) => yargs36.command(CompositionPatternPullModule).command(CompositionPatternPushModule).command(CompositionPatternGetModule).command(CompositionPatternRemoveModule).command(CompositionPatternListModule).command(CompositionPatternUpdateModule).command(CompositionPatternPublishModule).command(CompositionPatternUnpublishModule).demandCommand(),
2979
+ builder: (yargs38) => yargs38.command(CompositionPatternPullModule).command(CompositionPatternPushModule).command(CompositionPatternGetModule).command(CompositionPatternRemoveModule).command(CompositionPatternListModule).command(CompositionPatternUpdateModule).command(CompositionPatternPublishModule).command(CompositionPatternUnpublishModule).demandCommand(),
2980
2980
  handler: () => {
2981
2981
  yargs6.help();
2982
2982
  }
@@ -2990,12 +2990,12 @@ import { ContentClient } from "@uniformdev/canvas";
2990
2990
  var ContentTypeGetModule = {
2991
2991
  command: "get <id>",
2992
2992
  describe: "Get a content type",
2993
- builder: (yargs36) => withConfiguration(
2993
+ builder: (yargs38) => withConfiguration(
2994
2994
  withFormatOptions(
2995
2995
  withApiOptions(
2996
2996
  withProjectOptions(
2997
2997
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2998
- yargs36.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
2998
+ yargs38.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
2999
2999
  )
3000
3000
  )
3001
3001
  )
@@ -3017,7 +3017,7 @@ import { ContentClient as ContentClient2 } from "@uniformdev/canvas";
3017
3017
  var ContentTypeListModule = {
3018
3018
  command: "list",
3019
3019
  describe: "List content types",
3020
- builder: (yargs36) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs36)))),
3020
+ builder: (yargs38) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs38)))),
3021
3021
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3022
3022
  const fetch3 = nodeFetchProxy(proxy);
3023
3023
  const client = new ContentClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -3065,11 +3065,11 @@ function createContentTypeEngineDataSource({
3065
3065
  var ContentTypePullModule = {
3066
3066
  command: "pull <directory>",
3067
3067
  describe: "Pulls all content types to local files in a directory",
3068
- builder: (yargs36) => withConfiguration(
3068
+ builder: (yargs38) => withConfiguration(
3069
3069
  withApiOptions(
3070
3070
  withProjectOptions(
3071
3071
  withDiffOptions(
3072
- yargs36.positional("directory", {
3072
+ yargs38.positional("directory", {
3073
3073
  describe: "Directory to save the content types to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
3074
3074
  type: "string"
3075
3075
  }).option("format", {
@@ -3153,11 +3153,11 @@ import { ContentClient as ContentClient4 } from "@uniformdev/canvas";
3153
3153
  var ContentTypePushModule = {
3154
3154
  command: "push <directory>",
3155
3155
  describe: "Pushes all content types from files in a directory to Uniform",
3156
- builder: (yargs36) => withConfiguration(
3156
+ builder: (yargs38) => withConfiguration(
3157
3157
  withApiOptions(
3158
3158
  withProjectOptions(
3159
3159
  withDiffOptions(
3160
- yargs36.positional("directory", {
3160
+ yargs38.positional("directory", {
3161
3161
  describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
3162
3162
  type: "string"
3163
3163
  }).option("what-if", {
@@ -3230,10 +3230,10 @@ var ContentTypeRemoveModule = {
3230
3230
  command: "remove <id>",
3231
3231
  aliases: ["delete", "rm"],
3232
3232
  describe: "Delete a content type",
3233
- builder: (yargs36) => withConfiguration(
3233
+ builder: (yargs38) => withConfiguration(
3234
3234
  withApiOptions(
3235
3235
  withProjectOptions(
3236
- yargs36.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
3236
+ yargs38.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
3237
3237
  )
3238
3238
  )
3239
3239
  ),
@@ -3250,10 +3250,10 @@ var ContentTypeUpdateModule = {
3250
3250
  command: "update <filename>",
3251
3251
  aliases: ["put"],
3252
3252
  describe: "Insert or update a content type",
3253
- builder: (yargs36) => withConfiguration(
3253
+ builder: (yargs38) => withConfiguration(
3254
3254
  withApiOptions(
3255
3255
  withProjectOptions(
3256
- yargs36.positional("filename", { demandOption: true, describe: "Content type file to put" })
3256
+ yargs38.positional("filename", { demandOption: true, describe: "Content type file to put" })
3257
3257
  )
3258
3258
  )
3259
3259
  ),
@@ -3270,7 +3270,7 @@ var ContentTypeModule = {
3270
3270
  command: "contenttype <command>",
3271
3271
  aliases: ["ct"],
3272
3272
  describe: "Commands for Content Types",
3273
- builder: (yargs36) => yargs36.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
3273
+ builder: (yargs38) => yargs38.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
3274
3274
  handler: () => {
3275
3275
  yargs7.help();
3276
3276
  }
@@ -3284,11 +3284,11 @@ import { DataSourceClient } from "@uniformdev/canvas";
3284
3284
  var DataSourceGetModule = {
3285
3285
  command: "get <id>",
3286
3286
  describe: "Get a data source by ID and writes to stdout. Please note this may contain secret data, use discretion.",
3287
- builder: (yargs36) => withConfiguration(
3287
+ builder: (yargs38) => withConfiguration(
3288
3288
  withApiOptions(
3289
3289
  withProjectOptions(
3290
3290
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3291
- yargs36.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
3291
+ yargs38.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
3292
3292
  )
3293
3293
  )
3294
3294
  ),
@@ -3306,10 +3306,10 @@ var DataSourceRemoveModule = {
3306
3306
  command: "remove <id>",
3307
3307
  aliases: ["delete", "rm"],
3308
3308
  describe: "Delete a data source",
3309
- builder: (yargs36) => withConfiguration(
3309
+ builder: (yargs38) => withConfiguration(
3310
3310
  withApiOptions(
3311
3311
  withProjectOptions(
3312
- yargs36.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
3312
+ yargs38.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
3313
3313
  )
3314
3314
  )
3315
3315
  ),
@@ -3326,10 +3326,10 @@ var DataSourceUpdateModule = {
3326
3326
  command: "update <dataSource>",
3327
3327
  aliases: ["put"],
3328
3328
  describe: "Insert or update a data source",
3329
- builder: (yargs36) => withConfiguration(
3329
+ builder: (yargs38) => withConfiguration(
3330
3330
  withApiOptions(
3331
3331
  withProjectOptions(
3332
- yargs36.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
3332
+ yargs38.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
3333
3333
  describe: "Integration type that exposes the connector type for this data source (as defined in integration manifest).",
3334
3334
  type: "string",
3335
3335
  demandOption: true
@@ -3349,7 +3349,7 @@ var DataSourceModule = {
3349
3349
  command: "datasource <command>",
3350
3350
  aliases: ["ds"],
3351
3351
  describe: "Commands for Data Source definitions",
3352
- builder: (yargs36) => yargs36.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
3352
+ builder: (yargs38) => yargs38.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
3353
3353
  handler: () => {
3354
3354
  yargs8.help();
3355
3355
  }
@@ -3364,12 +3364,12 @@ var DataTypeGetModule = {
3364
3364
  command: "get <id>",
3365
3365
  describe: "Get a data type",
3366
3366
  aliases: ["ls"],
3367
- builder: (yargs36) => withConfiguration(
3367
+ builder: (yargs38) => withConfiguration(
3368
3368
  withFormatOptions(
3369
3369
  withApiOptions(
3370
3370
  withProjectOptions(
3371
3371
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3372
- yargs36.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
3372
+ yargs38.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
3373
3373
  )
3374
3374
  )
3375
3375
  )
@@ -3392,7 +3392,7 @@ var DataTypeListModule = {
3392
3392
  command: "list",
3393
3393
  describe: "List data types",
3394
3394
  aliases: ["ls"],
3395
- builder: (yargs36) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs36)))),
3395
+ builder: (yargs38) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs38)))),
3396
3396
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3397
3397
  const fetch3 = nodeFetchProxy(proxy);
3398
3398
  const client = new DataTypeClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -3442,11 +3442,11 @@ function createDataTypeEngineDataSource({
3442
3442
  var DataTypePullModule = {
3443
3443
  command: "pull <directory>",
3444
3444
  describe: "Pulls all data types to local files in a directory",
3445
- builder: (yargs36) => withConfiguration(
3445
+ builder: (yargs38) => withConfiguration(
3446
3446
  withApiOptions(
3447
3447
  withProjectOptions(
3448
3448
  withDiffOptions(
3449
- yargs36.positional("directory", {
3449
+ yargs38.positional("directory", {
3450
3450
  describe: "Directory to save the data types to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
3451
3451
  type: "string"
3452
3452
  }).option("format", {
@@ -3530,11 +3530,11 @@ import { DataTypeClient as DataTypeClient4 } from "@uniformdev/canvas";
3530
3530
  var DataTypePushModule = {
3531
3531
  command: "push <directory>",
3532
3532
  describe: "Pushes all data types from files in a directory to Uniform",
3533
- builder: (yargs36) => withConfiguration(
3533
+ builder: (yargs38) => withConfiguration(
3534
3534
  withApiOptions(
3535
3535
  withProjectOptions(
3536
3536
  withDiffOptions(
3537
- yargs36.positional("directory", {
3537
+ yargs38.positional("directory", {
3538
3538
  describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
3539
3539
  type: "string"
3540
3540
  }).option("what-if", {
@@ -3607,10 +3607,10 @@ var DataTypeRemoveModule = {
3607
3607
  command: "remove <id>",
3608
3608
  aliases: ["delete", "rm"],
3609
3609
  describe: "Delete a data type",
3610
- builder: (yargs36) => withConfiguration(
3610
+ builder: (yargs38) => withConfiguration(
3611
3611
  withApiOptions(
3612
3612
  withProjectOptions(
3613
- yargs36.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
3613
+ yargs38.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
3614
3614
  )
3615
3615
  )
3616
3616
  ),
@@ -3627,10 +3627,10 @@ var DataTypeUpdateModule = {
3627
3627
  command: "update <filename>",
3628
3628
  aliases: ["put"],
3629
3629
  describe: "Insert or update a data type",
3630
- builder: (yargs36) => withConfiguration(
3630
+ builder: (yargs38) => withConfiguration(
3631
3631
  withApiOptions(
3632
3632
  withProjectOptions(
3633
- yargs36.positional("filename", { demandOption: true, describe: "Data type file to put" })
3633
+ yargs38.positional("filename", { demandOption: true, describe: "Data type file to put" })
3634
3634
  )
3635
3635
  )
3636
3636
  ),
@@ -3647,7 +3647,7 @@ var DataTypeModule = {
3647
3647
  command: "datatype <command>",
3648
3648
  aliases: ["dt"],
3649
3649
  describe: "Commands for Data Type definitions",
3650
- builder: (yargs36) => yargs36.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
3650
+ builder: (yargs38) => yargs38.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
3651
3651
  handler: () => {
3652
3652
  yargs9.help();
3653
3653
  }
@@ -3661,12 +3661,12 @@ import { ContentClient as ContentClient7 } from "@uniformdev/canvas";
3661
3661
  var EntryGetModule = {
3662
3662
  command: "get <id>",
3663
3663
  describe: "Get an entry",
3664
- builder: (yargs36) => withConfiguration(
3664
+ builder: (yargs38) => withConfiguration(
3665
3665
  withFormatOptions(
3666
3666
  withApiOptions(
3667
3667
  withProjectOptions(
3668
3668
  withStateOptions(
3669
- yargs36.positional("id", { demandOption: true, describe: "Entry public ID to fetch" }).option({
3669
+ yargs38.positional("id", { demandOption: true, describe: "Entry public ID to fetch" }).option({
3670
3670
  resolveData: {
3671
3671
  type: "boolean",
3672
3672
  default: false,
@@ -3730,12 +3730,12 @@ var LEGACY_DEFAULT_LIMIT = 1e3;
3730
3730
  var EntryListModule = {
3731
3731
  command: "list",
3732
3732
  describe: "List entries",
3733
- builder: (yargs36) => withConfiguration(
3733
+ builder: (yargs38) => withConfiguration(
3734
3734
  withFormatOptions(
3735
3735
  withApiOptions(
3736
3736
  withProjectOptions(
3737
3737
  withStateOptions(
3738
- yargs36.options({
3738
+ yargs38.options({
3739
3739
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
3740
3740
  limit: { describe: "Number of rows to fetch", type: "number", default: LEGACY_DEFAULT_LIMIT },
3741
3741
  search: { describe: "Search query", type: "string", default: "" }
@@ -3860,11 +3860,11 @@ function createEntryEngineDataSource({
3860
3860
  var EntryPublishModule = {
3861
3861
  command: "publish [ids]",
3862
3862
  describe: "Publishes entry(ies)",
3863
- builder: (yargs36) => withConfiguration(
3863
+ builder: (yargs38) => withConfiguration(
3864
3864
  withApiOptions(
3865
3865
  withProjectOptions(
3866
3866
  withDiffOptions(
3867
- yargs36.positional("ids", {
3867
+ yargs38.positional("ids", {
3868
3868
  describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
3869
3869
  type: "string"
3870
3870
  }).option("all", {
@@ -3919,12 +3919,12 @@ import { UncachedFileClient as UncachedFileClient5 } from "@uniformdev/files";
3919
3919
  var EntryPullModule = {
3920
3920
  command: "pull <directory>",
3921
3921
  describe: "Pulls all entries to local files in a directory",
3922
- builder: (yargs36) => withConfiguration(
3922
+ builder: (yargs38) => withConfiguration(
3923
3923
  withApiOptions(
3924
3924
  withProjectOptions(
3925
3925
  withStateOptions(
3926
3926
  withDiffOptions(
3927
- yargs36.positional("directory", {
3927
+ yargs38.positional("directory", {
3928
3928
  describe: "Directory to save the entries to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
3929
3929
  type: "string"
3930
3930
  }).option("format", {
@@ -4024,12 +4024,12 @@ import { UncachedFileClient as UncachedFileClient6 } from "@uniformdev/files";
4024
4024
  var EntryPushModule = {
4025
4025
  command: "push <directory>",
4026
4026
  describe: "Pushes all entries from files in a directory to Uniform",
4027
- builder: (yargs36) => withConfiguration(
4027
+ builder: (yargs38) => withConfiguration(
4028
4028
  withApiOptions(
4029
4029
  withProjectOptions(
4030
4030
  withStateOptions(
4031
4031
  withDiffOptions(
4032
- yargs36.positional("directory", {
4032
+ yargs38.positional("directory", {
4033
4033
  describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
4034
4034
  type: "string"
4035
4035
  }).option("what-if", {
@@ -4116,10 +4116,10 @@ var EntryRemoveModule = {
4116
4116
  command: "remove <id>",
4117
4117
  aliases: ["delete", "rm"],
4118
4118
  describe: "Delete an entry",
4119
- builder: (yargs36) => withConfiguration(
4119
+ builder: (yargs38) => withConfiguration(
4120
4120
  withApiOptions(
4121
4121
  withProjectOptions(
4122
- yargs36.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
4122
+ yargs38.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
4123
4123
  )
4124
4124
  )
4125
4125
  ),
@@ -4136,10 +4136,10 @@ import { diffJson as diffJson3 } from "diff";
4136
4136
  var EntryUnpublishModule = {
4137
4137
  command: "unpublish [ids]",
4138
4138
  describe: "Unpublish an entry(ies)",
4139
- builder: (yargs36) => withConfiguration(
4139
+ builder: (yargs38) => withConfiguration(
4140
4140
  withApiOptions(
4141
4141
  withProjectOptions(
4142
- yargs36.positional("ids", {
4142
+ yargs38.positional("ids", {
4143
4143
  describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4144
4144
  type: "string"
4145
4145
  }).option("all", {
@@ -4212,11 +4212,11 @@ var EntryUpdateModule = {
4212
4212
  command: "update <filename>",
4213
4213
  aliases: ["put"],
4214
4214
  describe: "Insert or update an entry",
4215
- builder: (yargs36) => withConfiguration(
4215
+ builder: (yargs38) => withConfiguration(
4216
4216
  withApiOptions(
4217
4217
  withProjectOptions(
4218
4218
  withStateOptions(
4219
- yargs36.positional("filename", { demandOption: true, describe: "Entry file to put" })
4219
+ yargs38.positional("filename", { demandOption: true, describe: "Entry file to put" })
4220
4220
  )
4221
4221
  )
4222
4222
  )
@@ -4233,7 +4233,7 @@ var EntryUpdateModule = {
4233
4233
  var EntryModule = {
4234
4234
  command: "entry <command>",
4235
4235
  describe: "Commands for Entries",
4236
- builder: (yargs36) => yargs36.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
4236
+ builder: (yargs38) => yargs38.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
4237
4237
  handler: () => {
4238
4238
  yargs10.help();
4239
4239
  }
@@ -4247,12 +4247,12 @@ import { ContentClient as ContentClient16 } from "@uniformdev/canvas";
4247
4247
  var EntryPatternGetModule = {
4248
4248
  command: "get <id>",
4249
4249
  describe: "Get an entry pattern",
4250
- builder: (yargs36) => withConfiguration(
4250
+ builder: (yargs38) => withConfiguration(
4251
4251
  withFormatOptions(
4252
4252
  withApiOptions(
4253
4253
  withProjectOptions(
4254
4254
  withStateOptions(
4255
- yargs36.positional("id", {
4255
+ yargs38.positional("id", {
4256
4256
  demandOption: true,
4257
4257
  describe: "Entry pattern public ID to fetch"
4258
4258
  }),
@@ -4287,8 +4287,8 @@ import { ContentClient as ContentClient17 } from "@uniformdev/canvas";
4287
4287
  var EntryPatternListModule = {
4288
4288
  command: "list",
4289
4289
  describe: "List entry patterns",
4290
- builder: (yargs36) => withConfiguration(
4291
- withFormatOptions(withApiOptions(withProjectOptions(withStateOptions(yargs36, "published"))))
4290
+ builder: (yargs38) => withConfiguration(
4291
+ withFormatOptions(withApiOptions(withProjectOptions(withStateOptions(yargs38, "published"))))
4292
4292
  ),
4293
4293
  handler: async ({ apiHost, edgeApiHost, apiKey, proxy, format, filename, project: projectId, state }) => {
4294
4294
  const fetch3 = nodeFetchProxy(proxy);
@@ -4311,11 +4311,11 @@ import { ContentClient as ContentClient18 } from "@uniformdev/canvas";
4311
4311
  var EntryPatternPublishModule = {
4312
4312
  command: "publish [ids]",
4313
4313
  describe: "Publishes entry pattern(s)",
4314
- builder: (yargs36) => withConfiguration(
4314
+ builder: (yargs38) => withConfiguration(
4315
4315
  withApiOptions(
4316
4316
  withProjectOptions(
4317
4317
  withDiffOptions(
4318
- yargs36.positional("ids", {
4318
+ yargs38.positional("ids", {
4319
4319
  describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4320
4320
  type: "string"
4321
4321
  }).option("all", {
@@ -4370,12 +4370,12 @@ import { UncachedFileClient as UncachedFileClient7 } from "@uniformdev/files";
4370
4370
  var EntryPatternPullModule = {
4371
4371
  command: "pull <directory>",
4372
4372
  describe: "Pulls all entry patterns to local files in a directory",
4373
- builder: (yargs36) => withConfiguration(
4373
+ builder: (yargs38) => withConfiguration(
4374
4374
  withApiOptions(
4375
4375
  withProjectOptions(
4376
4376
  withStateOptions(
4377
4377
  withDiffOptions(
4378
- yargs36.positional("directory", {
4378
+ yargs38.positional("directory", {
4379
4379
  describe: "Directory to save the entries to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
4380
4380
  type: "string"
4381
4381
  }).option("format", {
@@ -4475,12 +4475,12 @@ import { UncachedFileClient as UncachedFileClient8 } from "@uniformdev/files";
4475
4475
  var EntryPatternPushModule = {
4476
4476
  command: "push <directory>",
4477
4477
  describe: "Pushes all entry patterns from files in a directory to Uniform",
4478
- builder: (yargs36) => withConfiguration(
4478
+ builder: (yargs38) => withConfiguration(
4479
4479
  withApiOptions(
4480
4480
  withProjectOptions(
4481
4481
  withStateOptions(
4482
4482
  withDiffOptions(
4483
- yargs36.positional("directory", {
4483
+ yargs38.positional("directory", {
4484
4484
  describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
4485
4485
  type: "string"
4486
4486
  }).option("what-if", {
@@ -4567,10 +4567,10 @@ var EntryPatternRemoveModule = {
4567
4567
  command: "remove <id>",
4568
4568
  aliases: ["delete", "rm"],
4569
4569
  describe: "Delete an entry pattern",
4570
- builder: (yargs36) => withConfiguration(
4570
+ builder: (yargs38) => withConfiguration(
4571
4571
  withApiOptions(
4572
4572
  withProjectOptions(
4573
- yargs36.positional("id", { demandOption: true, describe: "Entry pattern public ID to delete" })
4573
+ yargs38.positional("id", { demandOption: true, describe: "Entry pattern public ID to delete" })
4574
4574
  )
4575
4575
  )
4576
4576
  ),
@@ -4587,10 +4587,10 @@ import { diffJson as diffJson4 } from "diff";
4587
4587
  var EntryPatternUnpublishModule = {
4588
4588
  command: "unpublish [ids]",
4589
4589
  describe: "Unpublish an entry patterns",
4590
- builder: (yargs36) => withConfiguration(
4590
+ builder: (yargs38) => withConfiguration(
4591
4591
  withApiOptions(
4592
4592
  withProjectOptions(
4593
- yargs36.positional("ids", {
4593
+ yargs38.positional("ids", {
4594
4594
  describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4595
4595
  type: "string"
4596
4596
  }).option("all", {
@@ -4663,11 +4663,11 @@ var EntryPatternUpdateModule = {
4663
4663
  command: "update <filename>",
4664
4664
  aliases: ["put"],
4665
4665
  describe: "Insert or update an entry pattern",
4666
- builder: (yargs36) => withConfiguration(
4666
+ builder: (yargs38) => withConfiguration(
4667
4667
  withApiOptions(
4668
4668
  withProjectOptions(
4669
4669
  withStateOptions(
4670
- yargs36.positional("filename", { demandOption: true, describe: "Entry pattern file to put" })
4670
+ yargs38.positional("filename", { demandOption: true, describe: "Entry pattern file to put" })
4671
4671
  )
4672
4672
  )
4673
4673
  )
@@ -4684,7 +4684,7 @@ var EntryPatternUpdateModule = {
4684
4684
  var EntryPatternModule = {
4685
4685
  command: "entry-pattern <command>",
4686
4686
  describe: "Commands for Entry patterns",
4687
- builder: (yargs36) => yargs36.command(EntryPatternGetModule).command(EntryPatternListModule).command(EntryPatternRemoveModule).command(EntryPatternUpdateModule).command(EntryPatternPullModule).command(EntryPatternPushModule).command(EntryPatternPublishModule).command(EntryPatternUnpublishModule).demandCommand(),
4687
+ builder: (yargs38) => yargs38.command(EntryPatternGetModule).command(EntryPatternListModule).command(EntryPatternRemoveModule).command(EntryPatternUpdateModule).command(EntryPatternPullModule).command(EntryPatternPushModule).command(EntryPatternPublishModule).command(EntryPatternUnpublishModule).demandCommand(),
4688
4688
  handler: () => {
4689
4689
  yargs11.help();
4690
4690
  }
@@ -4730,11 +4730,11 @@ function createLocaleEngineDataSource({
4730
4730
  var LocalePullModule = {
4731
4731
  command: "pull <directory>",
4732
4732
  describe: "Pulls all locales to local files in a directory",
4733
- builder: (yargs36) => withConfiguration(
4733
+ builder: (yargs38) => withConfiguration(
4734
4734
  withApiOptions(
4735
4735
  withProjectOptions(
4736
4736
  withDiffOptions(
4737
- yargs36.positional("directory", {
4737
+ yargs38.positional("directory", {
4738
4738
  describe: "Directory to save the locales to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
4739
4739
  type: "string"
4740
4740
  }).option("format", {
@@ -4818,11 +4818,11 @@ import { LocaleClient as LocaleClient2 } from "@uniformdev/canvas";
4818
4818
  var LocalePushModule = {
4819
4819
  command: "push <directory>",
4820
4820
  describe: "Pushes all locales from files in a directory to Uniform",
4821
- builder: (yargs36) => withConfiguration(
4821
+ builder: (yargs38) => withConfiguration(
4822
4822
  withApiOptions(
4823
4823
  withProjectOptions(
4824
4824
  withDiffOptions(
4825
- yargs36.positional("directory", {
4825
+ yargs38.positional("directory", {
4826
4826
  describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
4827
4827
  type: "string"
4828
4828
  }).option("what-if", {
@@ -4893,7 +4893,7 @@ var LocalePushModule = {
4893
4893
  var LocaleModule = {
4894
4894
  command: "locale <command>",
4895
4895
  describe: "Commands for locale definitions",
4896
- builder: (yargs36) => yargs36.command(LocalePullModule).command(LocalePushModule),
4896
+ builder: (yargs38) => yargs38.command(LocalePullModule).command(LocalePushModule),
4897
4897
  handler: () => {
4898
4898
  yargs12.help();
4899
4899
  }
@@ -4912,12 +4912,12 @@ var PatternGetModule = {
4912
4912
  var PatternListModule = {
4913
4913
  ...CompositionListModule,
4914
4914
  describe: "List patterns",
4915
- builder: (yargs36) => withFormatOptions(
4915
+ builder: (yargs38) => withFormatOptions(
4916
4916
  withConfiguration(
4917
4917
  withApiOptions(
4918
4918
  withProjectOptions(
4919
4919
  withStateOptions(
4920
- yargs36.options({
4920
+ yargs38.options({
4921
4921
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
4922
4922
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
4923
4923
  resolvePatterns: {
@@ -4955,11 +4955,11 @@ var PatternListModule = {
4955
4955
  var PatternPublishModule = {
4956
4956
  ...CompositionPublishModule,
4957
4957
  describe: "Publishes pattern(s)",
4958
- builder: (yargs36) => withConfiguration(
4958
+ builder: (yargs38) => withConfiguration(
4959
4959
  withApiOptions(
4960
4960
  withProjectOptions(
4961
4961
  withDiffOptions(
4962
- yargs36.positional("ids", {
4962
+ yargs38.positional("ids", {
4963
4963
  describe: "Publishes pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4964
4964
  type: "string"
4965
4965
  }).option("all", {
@@ -4997,12 +4997,12 @@ var PatternPublishModule = {
4997
4997
  var PatternPullModule = {
4998
4998
  ...CompositionPullModule,
4999
4999
  describe: "Pulls all patterns to local files in a directory",
5000
- builder: (yargs36) => withConfiguration(
5000
+ builder: (yargs38) => withConfiguration(
5001
5001
  withApiOptions(
5002
5002
  withProjectOptions(
5003
5003
  withStateOptions(
5004
5004
  withDiffOptions(
5005
- yargs36.positional("directory", {
5005
+ yargs38.positional("directory", {
5006
5006
  describe: "Directory to save the definitions to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
5007
5007
  type: "string"
5008
5008
  }).option("format", {
@@ -5040,12 +5040,12 @@ var PatternPullModule = {
5040
5040
  var PatternPushModule = {
5041
5041
  ...CompositionPushModule,
5042
5042
  describe: "Pushes all patterns from files in a directory to Uniform Canvas",
5043
- builder: (yargs36) => withConfiguration(
5043
+ builder: (yargs38) => withConfiguration(
5044
5044
  withApiOptions(
5045
5045
  withProjectOptions(
5046
5046
  withStateOptions(
5047
5047
  withDiffOptions(
5048
- yargs36.positional("directory", {
5048
+ yargs38.positional("directory", {
5049
5049
  describe: "Directory to read the patterns from. If a filename is used, a package will be read instead.",
5050
5050
  type: "string"
5051
5051
  }).option("what-if", {
@@ -5087,10 +5087,10 @@ var PatternRemoveModule = {
5087
5087
  var PatternUnpublishModule = {
5088
5088
  command: "unpublish [ids]",
5089
5089
  describe: "Unpublish a pattern(s)",
5090
- builder: (yargs36) => withConfiguration(
5090
+ builder: (yargs38) => withConfiguration(
5091
5091
  withApiOptions(
5092
5092
  withProjectOptions(
5093
- yargs36.positional("ids", {
5093
+ yargs38.positional("ids", {
5094
5094
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
5095
5095
  type: "string"
5096
5096
  }).option("all", {
@@ -5130,74 +5130,34 @@ var PatternModule = {
5130
5130
  command: "pattern <command>",
5131
5131
  describe: "Commands for Canvas patterns",
5132
5132
  deprecated: 'will be removed in a future major release. Use "component-pattern" and "composition-pattern" instead.',
5133
- builder: (yargs36) => yargs36.command(PatternPullModule).command(PatternPushModule).command(PatternGetModule).command(PatternRemoveModule).command(PatternListModule).command(PatternUpdateModule).command(PatternPublishModule).command(PatternUnpublishModule).demandCommand(),
5133
+ builder: (yargs38) => yargs38.command(PatternPullModule).command(PatternPushModule).command(PatternGetModule).command(PatternRemoveModule).command(PatternListModule).command(PatternUpdateModule).command(PatternPublishModule).command(PatternUnpublishModule).demandCommand(),
5134
5134
  handler: () => {
5135
5135
  yargs13.help();
5136
5136
  }
5137
5137
  };
5138
5138
 
5139
- // src/commands/canvas/commands/prompts.ts
5139
+ // src/commands/canvas/commands/previewUrl.ts
5140
5140
  import yargs14 from "yargs";
5141
5141
 
5142
- // src/commands/canvas/commands/prompts/get.ts
5143
- import { PromptClient } from "@uniformdev/canvas";
5144
- var PromptGetModule = {
5145
- command: "get <id>",
5146
- describe: "Get a prompt",
5147
- builder: (yargs36) => withConfiguration(
5148
- withFormatOptions(
5149
- withApiOptions(
5150
- withProjectOptions(
5151
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5152
- yargs36.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
5153
- )
5154
- )
5155
- )
5156
- ),
5157
- handler: async ({ apiHost, apiKey, proxy, id, format, filename, project: projectId }) => {
5158
- const fetch3 = nodeFetchProxy(proxy);
5159
- const client = new PromptClient({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5160
- const res = await client.get({ promptId: id });
5161
- if (!res) {
5162
- throw new Error(`Prompt with ID ${id} not found`);
5163
- }
5164
- emitWithFormat(res, format, filename);
5165
- }
5166
- };
5167
-
5168
- // src/commands/canvas/commands/prompts/list.ts
5169
- import { PromptClient as PromptClient2 } from "@uniformdev/canvas";
5170
- var PromptListModule = {
5171
- command: "list",
5172
- describe: "List prompts",
5173
- builder: (yargs36) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs36)))),
5174
- handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5175
- const fetch3 = nodeFetchProxy(proxy);
5176
- const client = new PromptClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5177
- const res = await client.get();
5178
- emitWithFormat(res, format, filename);
5179
- }
5180
- };
5181
-
5182
- // src/commands/canvas/commands/prompts/pull.ts
5183
- import { PromptClient as PromptClient3 } from "@uniformdev/canvas";
5142
+ // src/commands/canvas/commands/previewUrl/pull.ts
5143
+ import { PreviewClient } from "@uniformdev/canvas";
5184
5144
 
5185
- // src/commands/canvas/commands/prompts/_util.ts
5186
- var selectPromptIdentifier = (e) => e.id;
5187
- var selectPromptDisplayName = (e) => `${e.name ?? "Untitled"} (pid: ${e.id})`;
5145
+ // src/commands/canvas/commands/previewUrl/_util.ts
5146
+ var selectIdentifier5 = (previewUrl) => previewUrl.id;
5147
+ var selectDisplayName5 = (previewUrl) => `${previewUrl.name} (pid: ${previewUrl.id})`;
5188
5148
 
5189
- // src/commands/canvas/promptEngineDataSource.ts
5190
- function createPromptEngineDataSource({
5149
+ // src/commands/canvas/previewUrlEngineDataSource.ts
5150
+ function createPreviewUrlEngineDataSource({
5191
5151
  client
5192
5152
  }) {
5193
5153
  async function* getObjects() {
5194
- const prompts = await client.get();
5195
- for await (const prompt of prompts) {
5154
+ const previewUrls = (await client.getPreviewUrls()).previewUrls;
5155
+ for await (const previewUrl of previewUrls) {
5196
5156
  const result = {
5197
- id: selectPromptIdentifier(prompt),
5198
- displayName: selectPromptDisplayName(prompt),
5199
- providerId: prompt.id,
5200
- object: prompt
5157
+ id: selectIdentifier5(previewUrl),
5158
+ displayName: selectDisplayName5(previewUrl),
5159
+ providerId: previewUrl.id,
5160
+ object: previewUrl
5201
5161
  };
5202
5162
  yield result;
5203
5163
  }
@@ -5206,45 +5166,43 @@ function createPromptEngineDataSource({
5206
5166
  name: "Uniform API",
5207
5167
  objects: getObjects(),
5208
5168
  deleteObject: async (providerId) => {
5209
- await client.remove({ promptId: providerId });
5169
+ await client.deletePreviewUrl({ id: providerId });
5210
5170
  },
5211
- writeObject: async ({ object }) => {
5212
- await client.upsert({ data: object });
5171
+ writeObject: async (object) => {
5172
+ await client.upsertPreviewUrl(object.object);
5213
5173
  }
5214
5174
  };
5215
5175
  }
5216
5176
 
5217
- // src/commands/canvas/commands/prompts/pull.ts
5218
- var PromptPullModule = {
5177
+ // src/commands/canvas/commands/previewUrl/pull.ts
5178
+ var PreviewUrlPullModule = {
5219
5179
  command: "pull <directory>",
5220
- describe: "Pulls all prompts to local files in a directory",
5221
- builder: (yargs36) => withConfiguration(
5180
+ describe: "Pulls all preview urls to local files in a directory",
5181
+ builder: (yargs38) => withConfiguration(
5222
5182
  withApiOptions(
5223
5183
  withProjectOptions(
5224
- withStateOptions(
5225
- withDiffOptions(
5226
- yargs36.positional("directory", {
5227
- describe: "Directory to save the prompts to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
5228
- type: "string"
5229
- }).option("format", {
5230
- alias: ["f"],
5231
- describe: "Output format",
5232
- default: "yaml",
5233
- choices: ["yaml", "json"],
5234
- type: "string"
5235
- }).option("what-if", {
5236
- alias: ["w"],
5237
- describe: "What-if mode reports what would be done but changes no files",
5238
- default: false,
5239
- type: "boolean"
5240
- }).option("mode", {
5241
- alias: ["m"],
5242
- describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
5243
- choices: ["create", "createOrUpdate", "mirror"],
5244
- default: "mirror",
5245
- type: "string"
5246
- })
5247
- )
5184
+ withDiffOptions(
5185
+ yargs38.positional("directory", {
5186
+ describe: "Directory to save to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
5187
+ type: "string"
5188
+ }).option("format", {
5189
+ alias: ["f"],
5190
+ describe: "Output format",
5191
+ default: "yaml",
5192
+ choices: ["yaml", "json"],
5193
+ type: "string"
5194
+ }).option("what-if", {
5195
+ alias: ["w"],
5196
+ describe: "What-if mode reports what would be done but changes no files",
5197
+ default: false,
5198
+ type: "boolean"
5199
+ }).option("mode", {
5200
+ alias: ["m"],
5201
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
5202
+ choices: ["create", "createOrUpdate", "mirror"],
5203
+ default: "mirror",
5204
+ type: "string"
5205
+ })
5248
5206
  )
5249
5207
  )
5250
5208
  )
@@ -5262,33 +5220,27 @@ var PromptPullModule = {
5262
5220
  allowEmptySource
5263
5221
  }) => {
5264
5222
  const fetch3 = nodeFetchProxy(proxy);
5265
- const client = new PromptClient3({
5266
- apiKey,
5267
- apiHost,
5268
- fetch: fetch3,
5269
- projectId,
5270
- bypassCache: true
5271
- });
5272
- const source = createPromptEngineDataSource({ client });
5223
+ const client = new PreviewClient({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5224
+ const source = createPreviewUrlEngineDataSource({ client });
5273
5225
  let target;
5274
5226
  const isPackage = isPathAPackageFile(directory);
5275
5227
  if (isPackage) {
5276
5228
  const packageContents = readCanvasPackage(directory, false);
5277
5229
  target = await createArraySyncEngineDataSource({
5278
5230
  name: `Package file ${directory}`,
5279
- objects: packageContents.prompts ?? [],
5280
- selectIdentifier: selectPromptIdentifier,
5281
- selectDisplayName: selectPromptDisplayName,
5231
+ objects: packageContents.previewUrls ?? [],
5232
+ selectIdentifier: selectIdentifier5,
5233
+ selectDisplayName: selectDisplayName5,
5282
5234
  onSyncComplete: async (_, synced) => {
5283
- packageContents.prompts = synced;
5235
+ packageContents.previewUrls = synced;
5284
5236
  writeCanvasPackage(directory, packageContents);
5285
5237
  }
5286
5238
  });
5287
5239
  } else {
5288
5240
  target = await createFileSyncEngineDataSource({
5289
5241
  directory,
5290
- selectIdentifier: selectPromptIdentifier,
5291
- selectDisplayName: selectPromptDisplayName,
5242
+ selectIdentifier: selectIdentifier5,
5243
+ selectDisplayName: selectDisplayName5,
5292
5244
  format
5293
5245
  });
5294
5246
  }
@@ -5303,32 +5255,30 @@ var PromptPullModule = {
5303
5255
  }
5304
5256
  };
5305
5257
 
5306
- // src/commands/canvas/commands/prompts/push.ts
5307
- import { PromptClient as PromptClient4 } from "@uniformdev/canvas";
5308
- var PromptPushModule = {
5258
+ // src/commands/canvas/commands/previewUrl/push.ts
5259
+ import { PreviewClient as PreviewClient2 } from "@uniformdev/canvas";
5260
+ var PreviewUrlPushModule = {
5309
5261
  command: "push <directory>",
5310
- describe: "Pushes all prompts from files in a directory to Uniform",
5311
- builder: (yargs36) => withConfiguration(
5262
+ describe: "Pushes all preview urls from files in a directory to Uniform Canvas",
5263
+ builder: (yargs38) => withConfiguration(
5312
5264
  withApiOptions(
5313
5265
  withProjectOptions(
5314
- withStateOptions(
5315
- withDiffOptions(
5316
- yargs36.positional("directory", {
5317
- describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
5318
- type: "string"
5319
- }).option("what-if", {
5320
- alias: ["w"],
5321
- describe: "What-if mode reports what would be done but changes nothing",
5322
- default: false,
5323
- type: "boolean"
5324
- }).option("mode", {
5325
- alias: ["m"],
5326
- describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
5327
- choices: ["create", "createOrUpdate", "mirror"],
5328
- default: "mirror",
5329
- type: "string"
5330
- })
5331
- )
5266
+ withDiffOptions(
5267
+ yargs38.positional("directory", {
5268
+ describe: "Directory to read from. If a filename is used, a package will be read instead.",
5269
+ type: "string"
5270
+ }).option("what-if", {
5271
+ alias: ["w"],
5272
+ describe: "What-if mode reports what would be done but changes nothing",
5273
+ default: false,
5274
+ type: "boolean"
5275
+ }).option("mode", {
5276
+ alias: ["m"],
5277
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
5278
+ choices: ["create", "createOrUpdate", "mirror"],
5279
+ default: "mirror",
5280
+ type: "string"
5281
+ })
5332
5282
  )
5333
5283
  )
5334
5284
  )
@@ -5345,31 +5295,25 @@ var PromptPushModule = {
5345
5295
  allowEmptySource
5346
5296
  }) => {
5347
5297
  const fetch3 = nodeFetchProxy(proxy);
5348
- const client = new PromptClient4({
5349
- apiKey,
5350
- apiHost,
5351
- fetch: fetch3,
5352
- projectId,
5353
- bypassCache: true
5354
- });
5298
+ const client = new PreviewClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5355
5299
  let source;
5356
5300
  const isPackage = isPathAPackageFile(directory);
5357
5301
  if (isPackage) {
5358
5302
  const packageContents = readCanvasPackage(directory, true);
5359
5303
  source = await createArraySyncEngineDataSource({
5360
5304
  name: `Package file ${directory}`,
5361
- objects: packageContents.prompts ?? [],
5362
- selectIdentifier: selectPromptIdentifier,
5363
- selectDisplayName: selectPromptDisplayName
5305
+ objects: packageContents.previewUrls ?? [],
5306
+ selectIdentifier: selectIdentifier5,
5307
+ selectDisplayName: selectDisplayName5
5364
5308
  });
5365
5309
  } else {
5366
5310
  source = await createFileSyncEngineDataSource({
5367
5311
  directory,
5368
- selectIdentifier: selectPromptIdentifier,
5369
- selectDisplayName: selectPromptDisplayName
5312
+ selectIdentifier: selectIdentifier5,
5313
+ selectDisplayName: selectDisplayName5
5370
5314
  });
5371
5315
  }
5372
- const target = createPromptEngineDataSource({ client });
5316
+ const target = createPreviewUrlEngineDataSource({ client });
5373
5317
  await syncEngine({
5374
5318
  source,
5375
5319
  target,
@@ -5381,81 +5325,39 @@ var PromptPushModule = {
5381
5325
  }
5382
5326
  };
5383
5327
 
5384
- // src/commands/canvas/commands/prompts/remove.ts
5385
- import { PromptClient as PromptClient5 } from "@uniformdev/canvas";
5386
- var PromptRemoveModule = {
5387
- command: "remove <id>",
5388
- aliases: ["delete", "rm"],
5389
- describe: "Delete a prompt",
5390
- builder: (yargs36) => withConfiguration(
5391
- withApiOptions(
5392
- withProjectOptions(yargs36.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
5393
- )
5394
- ),
5395
- handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
5396
- const fetch3 = nodeFetchProxy(proxy);
5397
- const client = new PromptClient5({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5398
- await client.remove({ promptId: id });
5399
- }
5400
- };
5401
-
5402
- // src/commands/canvas/commands/prompts/update.ts
5403
- import { PromptClient as PromptClient6 } from "@uniformdev/canvas";
5404
- var PromptUpdateModule = {
5405
- command: "update <filename>",
5406
- aliases: ["put"],
5407
- describe: "Insert or update a prompt",
5408
- builder: (yargs36) => withConfiguration(
5409
- withApiOptions(
5410
- withProjectOptions(
5411
- yargs36.positional("filename", { demandOption: true, describe: "Prompt file to put" })
5412
- )
5413
- )
5414
- ),
5415
- handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
5416
- const fetch3 = nodeFetchProxy(proxy);
5417
- const client = new PromptClient6({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5418
- const file = readFileToObject(filename);
5419
- await client.upsert({ data: file });
5420
- }
5421
- };
5422
-
5423
- // src/commands/canvas/commands/prompts.ts
5424
- var PromptModule = {
5425
- command: "prompt <command>",
5426
- aliases: ["dt"],
5427
- describe: "Commands for AI Prompt definitions",
5428
- builder: (yargs36) => yargs36.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
5328
+ // src/commands/canvas/commands/previewUrl.ts
5329
+ var PreviewUrlModule = {
5330
+ command: "preview-url <command>",
5331
+ aliases: ["pu"],
5332
+ describe: "Commands for Canvas preview urls",
5333
+ builder: (yargs38) => yargs38.command(PreviewUrlPullModule).command(PreviewUrlPushModule).demandCommand(),
5429
5334
  handler: () => {
5430
5335
  yargs14.help();
5431
5336
  }
5432
5337
  };
5433
5338
 
5434
- // src/commands/canvas/commands/workflow.ts
5339
+ // src/commands/canvas/commands/previewViewport.ts
5435
5340
  import yargs15 from "yargs";
5436
5341
 
5437
- // src/commands/canvas/commands/workflow/pull.ts
5438
- import { WorkflowClient } from "@uniformdev/canvas";
5342
+ // src/commands/canvas/commands/previewViewport/pull.ts
5343
+ import { PreviewClient as PreviewClient3 } from "@uniformdev/canvas";
5439
5344
 
5440
- // src/commands/canvas/commands/workflow/_util.ts
5441
- var selectIdentifier5 = (workflow) => workflow.id;
5442
- var selectDisplayName5 = (workflow) => `${workflow.name} (pid: ${workflow.id})`;
5345
+ // src/commands/canvas/commands/previewViewport/_util.ts
5346
+ var selectIdentifier6 = (previewViewport) => previewViewport.id;
5347
+ var selectDisplayName6 = (previewViewport) => `${previewViewport.name} (pid: ${previewViewport.id})`;
5443
5348
 
5444
- // src/commands/canvas/workflowEngineDataSource.ts
5445
- function createWorkflowEngineDataSource({
5349
+ // src/commands/canvas/previewViewportEngineDataSource.ts
5350
+ function createPreviewViewportEngineDataSource({
5446
5351
  client
5447
5352
  }) {
5448
5353
  async function* getObjects() {
5449
- const workflows = paginateAsync(async () => (await client.get()).results, {
5450
- pageSize: 100
5451
- });
5452
- for await (const workflow of workflows) {
5453
- const { modified, modifiedBy, created, createdBy, ...workflowWithoutStatistics } = workflow;
5354
+ const previewViewports = (await client.getPreviewViewports()).previewViewports;
5355
+ for await (const previewViewport of previewViewports) {
5454
5356
  const result = {
5455
- id: selectIdentifier5(workflow),
5456
- displayName: selectDisplayName5(workflow),
5457
- providerId: workflow.id,
5458
- object: workflowWithoutStatistics
5357
+ id: selectIdentifier6(previewViewport),
5358
+ displayName: selectDisplayName6(previewViewport),
5359
+ providerId: previewViewport.id,
5360
+ object: previewViewport
5459
5361
  };
5460
5362
  yield result;
5461
5363
  }
@@ -5464,23 +5366,23 @@ function createWorkflowEngineDataSource({
5464
5366
  name: "Uniform API",
5465
5367
  objects: getObjects(),
5466
5368
  deleteObject: async (providerId) => {
5467
- await client.remove({ workflowId: providerId });
5369
+ await client.deletePreviewViewport({ id: providerId });
5468
5370
  },
5469
5371
  writeObject: async (object) => {
5470
- await client.upsert({ workflow: object.object });
5372
+ await client.upsertPreviewViewport(object.object);
5471
5373
  }
5472
5374
  };
5473
5375
  }
5474
5376
 
5475
- // src/commands/canvas/commands/workflow/pull.ts
5476
- var WorkflowPullModule = {
5377
+ // src/commands/canvas/commands/previewViewport/pull.ts
5378
+ var PreviewViewportPullModule = {
5477
5379
  command: "pull <directory>",
5478
- describe: "Pulls all workflows to local files in a directory",
5479
- builder: (yargs36) => withConfiguration(
5380
+ describe: "Pulls all preview viewports to local files in a directory",
5381
+ builder: (yargs38) => withConfiguration(
5480
5382
  withApiOptions(
5481
5383
  withProjectOptions(
5482
5384
  withDiffOptions(
5483
- yargs36.positional("directory", {
5385
+ yargs38.positional("directory", {
5484
5386
  describe: "Directory to save to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
5485
5387
  type: "string"
5486
5388
  }).option("format", {
@@ -5518,27 +5420,27 @@ var WorkflowPullModule = {
5518
5420
  allowEmptySource
5519
5421
  }) => {
5520
5422
  const fetch3 = nodeFetchProxy(proxy);
5521
- const client = new WorkflowClient({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5522
- const source = createWorkflowEngineDataSource({ client });
5423
+ const client = new PreviewClient3({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5424
+ const source = createPreviewViewportEngineDataSource({ client });
5523
5425
  let target;
5524
5426
  const isPackage = isPathAPackageFile(directory);
5525
5427
  if (isPackage) {
5526
5428
  const packageContents = readCanvasPackage(directory, false);
5527
5429
  target = await createArraySyncEngineDataSource({
5528
5430
  name: `Package file ${directory}`,
5529
- objects: packageContents.workflows ?? [],
5530
- selectIdentifier: selectIdentifier5,
5531
- selectDisplayName: selectDisplayName5,
5431
+ objects: packageContents.previewViewports ?? [],
5432
+ selectIdentifier: selectIdentifier6,
5433
+ selectDisplayName: selectDisplayName6,
5532
5434
  onSyncComplete: async (_, synced) => {
5533
- packageContents.workflows = synced;
5435
+ packageContents.previewViewports = synced;
5534
5436
  writeCanvasPackage(directory, packageContents);
5535
5437
  }
5536
5438
  });
5537
5439
  } else {
5538
5440
  target = await createFileSyncEngineDataSource({
5539
5441
  directory,
5540
- selectIdentifier: selectIdentifier5,
5541
- selectDisplayName: selectDisplayName5,
5442
+ selectIdentifier: selectIdentifier6,
5443
+ selectDisplayName: selectDisplayName6,
5542
5444
  format
5543
5445
  });
5544
5446
  }
@@ -5553,16 +5455,16 @@ var WorkflowPullModule = {
5553
5455
  }
5554
5456
  };
5555
5457
 
5556
- // src/commands/canvas/commands/workflow/push.ts
5557
- import { WorkflowClient as WorkflowClient2 } from "@uniformdev/canvas";
5558
- var WorkflowPushModule = {
5458
+ // src/commands/canvas/commands/previewViewport/push.ts
5459
+ import { PreviewClient as PreviewClient4 } from "@uniformdev/canvas";
5460
+ var PreviewViewportPushModule = {
5559
5461
  command: "push <directory>",
5560
- describe: "Pushes all workflows from files in a directory to Uniform Canvas",
5561
- builder: (yargs36) => withConfiguration(
5462
+ describe: "Pushes all preview viewports from files in a directory to Uniform Canvas",
5463
+ builder: (yargs38) => withConfiguration(
5562
5464
  withApiOptions(
5563
5465
  withProjectOptions(
5564
5466
  withDiffOptions(
5565
- yargs36.positional("directory", {
5467
+ yargs38.positional("directory", {
5566
5468
  describe: "Directory to read from. If a filename is used, a package will be read instead.",
5567
5469
  type: "string"
5568
5470
  }).option("what-if", {
@@ -5593,22 +5495,520 @@ var WorkflowPushModule = {
5593
5495
  allowEmptySource
5594
5496
  }) => {
5595
5497
  const fetch3 = nodeFetchProxy(proxy);
5596
- const client = new WorkflowClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5498
+ const client = new PreviewClient4({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5597
5499
  let source;
5598
5500
  const isPackage = isPathAPackageFile(directory);
5599
5501
  if (isPackage) {
5600
5502
  const packageContents = readCanvasPackage(directory, true);
5601
5503
  source = await createArraySyncEngineDataSource({
5602
5504
  name: `Package file ${directory}`,
5603
- objects: packageContents.workflows ?? [],
5604
- selectIdentifier: selectIdentifier5,
5605
- selectDisplayName: selectDisplayName5
5505
+ objects: packageContents.previewViewports ?? [],
5506
+ selectIdentifier: selectIdentifier6,
5507
+ selectDisplayName: selectDisplayName6
5606
5508
  });
5607
5509
  } else {
5608
5510
  source = await createFileSyncEngineDataSource({
5609
5511
  directory,
5610
- selectIdentifier: selectIdentifier5,
5611
- selectDisplayName: selectDisplayName5
5512
+ selectIdentifier: selectIdentifier6,
5513
+ selectDisplayName: selectDisplayName6
5514
+ });
5515
+ }
5516
+ const target = createPreviewViewportEngineDataSource({ client });
5517
+ await syncEngine({
5518
+ source,
5519
+ target,
5520
+ mode,
5521
+ whatIf,
5522
+ allowEmptySource,
5523
+ log: createSyncEngineConsoleLogger({ diffMode })
5524
+ });
5525
+ }
5526
+ };
5527
+
5528
+ // src/commands/canvas/commands/previewViewport.ts
5529
+ var PreviewViewportModule = {
5530
+ command: "preview-viewport <command>",
5531
+ aliases: ["pv"],
5532
+ describe: "Commands for Canvas preview viewports",
5533
+ builder: (yargs38) => yargs38.command(PreviewViewportPullModule).command(PreviewViewportPushModule).demandCommand(),
5534
+ handler: () => {
5535
+ yargs15.help();
5536
+ }
5537
+ };
5538
+
5539
+ // src/commands/canvas/commands/prompts.ts
5540
+ import yargs16 from "yargs";
5541
+
5542
+ // src/commands/canvas/commands/prompts/get.ts
5543
+ import { PromptClient } from "@uniformdev/canvas";
5544
+ var PromptGetModule = {
5545
+ command: "get <id>",
5546
+ describe: "Get a prompt",
5547
+ builder: (yargs38) => withConfiguration(
5548
+ withFormatOptions(
5549
+ withApiOptions(
5550
+ withProjectOptions(
5551
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5552
+ yargs38.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
5553
+ )
5554
+ )
5555
+ )
5556
+ ),
5557
+ handler: async ({ apiHost, apiKey, proxy, id, format, filename, project: projectId }) => {
5558
+ const fetch3 = nodeFetchProxy(proxy);
5559
+ const client = new PromptClient({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5560
+ const res = await client.get({ promptId: id });
5561
+ if (!res) {
5562
+ throw new Error(`Prompt with ID ${id} not found`);
5563
+ }
5564
+ emitWithFormat(res, format, filename);
5565
+ }
5566
+ };
5567
+
5568
+ // src/commands/canvas/commands/prompts/list.ts
5569
+ import { PromptClient as PromptClient2 } from "@uniformdev/canvas";
5570
+ var PromptListModule = {
5571
+ command: "list",
5572
+ describe: "List prompts",
5573
+ builder: (yargs38) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs38)))),
5574
+ handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5575
+ const fetch3 = nodeFetchProxy(proxy);
5576
+ const client = new PromptClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5577
+ const res = await client.get();
5578
+ emitWithFormat(res, format, filename);
5579
+ }
5580
+ };
5581
+
5582
+ // src/commands/canvas/commands/prompts/pull.ts
5583
+ import { PromptClient as PromptClient3 } from "@uniformdev/canvas";
5584
+
5585
+ // src/commands/canvas/commands/prompts/_util.ts
5586
+ var selectPromptIdentifier = (e) => e.id;
5587
+ var selectPromptDisplayName = (e) => `${e.name ?? "Untitled"} (pid: ${e.id})`;
5588
+
5589
+ // src/commands/canvas/promptEngineDataSource.ts
5590
+ function createPromptEngineDataSource({
5591
+ client
5592
+ }) {
5593
+ async function* getObjects() {
5594
+ const prompts = await client.get();
5595
+ for await (const prompt of prompts) {
5596
+ const result = {
5597
+ id: selectPromptIdentifier(prompt),
5598
+ displayName: selectPromptDisplayName(prompt),
5599
+ providerId: prompt.id,
5600
+ object: prompt
5601
+ };
5602
+ yield result;
5603
+ }
5604
+ }
5605
+ return {
5606
+ name: "Uniform API",
5607
+ objects: getObjects(),
5608
+ deleteObject: async (providerId) => {
5609
+ await client.remove({ promptId: providerId });
5610
+ },
5611
+ writeObject: async ({ object }) => {
5612
+ await client.upsert({ data: object });
5613
+ }
5614
+ };
5615
+ }
5616
+
5617
+ // src/commands/canvas/commands/prompts/pull.ts
5618
+ var PromptPullModule = {
5619
+ command: "pull <directory>",
5620
+ describe: "Pulls all prompts to local files in a directory",
5621
+ builder: (yargs38) => withConfiguration(
5622
+ withApiOptions(
5623
+ withProjectOptions(
5624
+ withStateOptions(
5625
+ withDiffOptions(
5626
+ yargs38.positional("directory", {
5627
+ describe: "Directory to save the prompts to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
5628
+ type: "string"
5629
+ }).option("format", {
5630
+ alias: ["f"],
5631
+ describe: "Output format",
5632
+ default: "yaml",
5633
+ choices: ["yaml", "json"],
5634
+ type: "string"
5635
+ }).option("what-if", {
5636
+ alias: ["w"],
5637
+ describe: "What-if mode reports what would be done but changes no files",
5638
+ default: false,
5639
+ type: "boolean"
5640
+ }).option("mode", {
5641
+ alias: ["m"],
5642
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
5643
+ choices: ["create", "createOrUpdate", "mirror"],
5644
+ default: "mirror",
5645
+ type: "string"
5646
+ })
5647
+ )
5648
+ )
5649
+ )
5650
+ )
5651
+ ),
5652
+ handler: async ({
5653
+ apiHost,
5654
+ apiKey,
5655
+ proxy,
5656
+ directory,
5657
+ format,
5658
+ mode,
5659
+ whatIf,
5660
+ project: projectId,
5661
+ diff: diffMode,
5662
+ allowEmptySource
5663
+ }) => {
5664
+ const fetch3 = nodeFetchProxy(proxy);
5665
+ const client = new PromptClient3({
5666
+ apiKey,
5667
+ apiHost,
5668
+ fetch: fetch3,
5669
+ projectId,
5670
+ bypassCache: true
5671
+ });
5672
+ const source = createPromptEngineDataSource({ client });
5673
+ let target;
5674
+ const isPackage = isPathAPackageFile(directory);
5675
+ if (isPackage) {
5676
+ const packageContents = readCanvasPackage(directory, false);
5677
+ target = await createArraySyncEngineDataSource({
5678
+ name: `Package file ${directory}`,
5679
+ objects: packageContents.prompts ?? [],
5680
+ selectIdentifier: selectPromptIdentifier,
5681
+ selectDisplayName: selectPromptDisplayName,
5682
+ onSyncComplete: async (_, synced) => {
5683
+ packageContents.prompts = synced;
5684
+ writeCanvasPackage(directory, packageContents);
5685
+ }
5686
+ });
5687
+ } else {
5688
+ target = await createFileSyncEngineDataSource({
5689
+ directory,
5690
+ selectIdentifier: selectPromptIdentifier,
5691
+ selectDisplayName: selectPromptDisplayName,
5692
+ format
5693
+ });
5694
+ }
5695
+ await syncEngine({
5696
+ source,
5697
+ target,
5698
+ mode,
5699
+ whatIf,
5700
+ allowEmptySource: allowEmptySource ?? true,
5701
+ log: createSyncEngineConsoleLogger({ diffMode })
5702
+ });
5703
+ }
5704
+ };
5705
+
5706
+ // src/commands/canvas/commands/prompts/push.ts
5707
+ import { PromptClient as PromptClient4 } from "@uniformdev/canvas";
5708
+ var PromptPushModule = {
5709
+ command: "push <directory>",
5710
+ describe: "Pushes all prompts from files in a directory to Uniform",
5711
+ builder: (yargs38) => withConfiguration(
5712
+ withApiOptions(
5713
+ withProjectOptions(
5714
+ withStateOptions(
5715
+ withDiffOptions(
5716
+ yargs38.positional("directory", {
5717
+ describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
5718
+ type: "string"
5719
+ }).option("what-if", {
5720
+ alias: ["w"],
5721
+ describe: "What-if mode reports what would be done but changes nothing",
5722
+ default: false,
5723
+ type: "boolean"
5724
+ }).option("mode", {
5725
+ alias: ["m"],
5726
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
5727
+ choices: ["create", "createOrUpdate", "mirror"],
5728
+ default: "mirror",
5729
+ type: "string"
5730
+ })
5731
+ )
5732
+ )
5733
+ )
5734
+ )
5735
+ ),
5736
+ handler: async ({
5737
+ apiHost,
5738
+ apiKey,
5739
+ proxy,
5740
+ directory,
5741
+ mode,
5742
+ whatIf,
5743
+ project: projectId,
5744
+ diff: diffMode,
5745
+ allowEmptySource
5746
+ }) => {
5747
+ const fetch3 = nodeFetchProxy(proxy);
5748
+ const client = new PromptClient4({
5749
+ apiKey,
5750
+ apiHost,
5751
+ fetch: fetch3,
5752
+ projectId,
5753
+ bypassCache: true
5754
+ });
5755
+ let source;
5756
+ const isPackage = isPathAPackageFile(directory);
5757
+ if (isPackage) {
5758
+ const packageContents = readCanvasPackage(directory, true);
5759
+ source = await createArraySyncEngineDataSource({
5760
+ name: `Package file ${directory}`,
5761
+ objects: packageContents.prompts ?? [],
5762
+ selectIdentifier: selectPromptIdentifier,
5763
+ selectDisplayName: selectPromptDisplayName
5764
+ });
5765
+ } else {
5766
+ source = await createFileSyncEngineDataSource({
5767
+ directory,
5768
+ selectIdentifier: selectPromptIdentifier,
5769
+ selectDisplayName: selectPromptDisplayName
5770
+ });
5771
+ }
5772
+ const target = createPromptEngineDataSource({ client });
5773
+ await syncEngine({
5774
+ source,
5775
+ target,
5776
+ mode,
5777
+ whatIf,
5778
+ allowEmptySource,
5779
+ log: createSyncEngineConsoleLogger({ diffMode })
5780
+ });
5781
+ }
5782
+ };
5783
+
5784
+ // src/commands/canvas/commands/prompts/remove.ts
5785
+ import { PromptClient as PromptClient5 } from "@uniformdev/canvas";
5786
+ var PromptRemoveModule = {
5787
+ command: "remove <id>",
5788
+ aliases: ["delete", "rm"],
5789
+ describe: "Delete a prompt",
5790
+ builder: (yargs38) => withConfiguration(
5791
+ withApiOptions(
5792
+ withProjectOptions(yargs38.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
5793
+ )
5794
+ ),
5795
+ handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
5796
+ const fetch3 = nodeFetchProxy(proxy);
5797
+ const client = new PromptClient5({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5798
+ await client.remove({ promptId: id });
5799
+ }
5800
+ };
5801
+
5802
+ // src/commands/canvas/commands/prompts/update.ts
5803
+ import { PromptClient as PromptClient6 } from "@uniformdev/canvas";
5804
+ var PromptUpdateModule = {
5805
+ command: "update <filename>",
5806
+ aliases: ["put"],
5807
+ describe: "Insert or update a prompt",
5808
+ builder: (yargs38) => withConfiguration(
5809
+ withApiOptions(
5810
+ withProjectOptions(
5811
+ yargs38.positional("filename", { demandOption: true, describe: "Prompt file to put" })
5812
+ )
5813
+ )
5814
+ ),
5815
+ handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
5816
+ const fetch3 = nodeFetchProxy(proxy);
5817
+ const client = new PromptClient6({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5818
+ const file = readFileToObject(filename);
5819
+ await client.upsert({ data: file });
5820
+ }
5821
+ };
5822
+
5823
+ // src/commands/canvas/commands/prompts.ts
5824
+ var PromptModule = {
5825
+ command: "prompt <command>",
5826
+ aliases: ["dt"],
5827
+ describe: "Commands for AI Prompt definitions",
5828
+ builder: (yargs38) => yargs38.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
5829
+ handler: () => {
5830
+ yargs16.help();
5831
+ }
5832
+ };
5833
+
5834
+ // src/commands/canvas/commands/workflow.ts
5835
+ import yargs17 from "yargs";
5836
+
5837
+ // src/commands/canvas/commands/workflow/pull.ts
5838
+ import { WorkflowClient } from "@uniformdev/canvas";
5839
+
5840
+ // src/commands/canvas/commands/workflow/_util.ts
5841
+ var selectIdentifier7 = (workflow) => workflow.id;
5842
+ var selectDisplayName7 = (workflow) => `${workflow.name} (pid: ${workflow.id})`;
5843
+
5844
+ // src/commands/canvas/workflowEngineDataSource.ts
5845
+ function createWorkflowEngineDataSource({
5846
+ client
5847
+ }) {
5848
+ async function* getObjects() {
5849
+ const workflows = paginateAsync(async () => (await client.get()).results, {
5850
+ pageSize: 100
5851
+ });
5852
+ for await (const workflow of workflows) {
5853
+ const { modified, modifiedBy, created, createdBy, ...workflowWithoutStatistics } = workflow;
5854
+ const result = {
5855
+ id: selectIdentifier7(workflow),
5856
+ displayName: selectDisplayName7(workflow),
5857
+ providerId: workflow.id,
5858
+ object: workflowWithoutStatistics
5859
+ };
5860
+ yield result;
5861
+ }
5862
+ }
5863
+ return {
5864
+ name: "Uniform API",
5865
+ objects: getObjects(),
5866
+ deleteObject: async (providerId) => {
5867
+ await client.remove({ workflowId: providerId });
5868
+ },
5869
+ writeObject: async (object) => {
5870
+ await client.upsert({ workflow: object.object });
5871
+ }
5872
+ };
5873
+ }
5874
+
5875
+ // src/commands/canvas/commands/workflow/pull.ts
5876
+ var WorkflowPullModule = {
5877
+ command: "pull <directory>",
5878
+ describe: "Pulls all workflows to local files in a directory",
5879
+ builder: (yargs38) => withConfiguration(
5880
+ withApiOptions(
5881
+ withProjectOptions(
5882
+ withDiffOptions(
5883
+ yargs38.positional("directory", {
5884
+ describe: "Directory to save to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
5885
+ type: "string"
5886
+ }).option("format", {
5887
+ alias: ["f"],
5888
+ describe: "Output format",
5889
+ default: "yaml",
5890
+ choices: ["yaml", "json"],
5891
+ type: "string"
5892
+ }).option("what-if", {
5893
+ alias: ["w"],
5894
+ describe: "What-if mode reports what would be done but changes no files",
5895
+ default: false,
5896
+ type: "boolean"
5897
+ }).option("mode", {
5898
+ alias: ["m"],
5899
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
5900
+ choices: ["create", "createOrUpdate", "mirror"],
5901
+ default: "mirror",
5902
+ type: "string"
5903
+ })
5904
+ )
5905
+ )
5906
+ )
5907
+ ),
5908
+ handler: async ({
5909
+ apiHost,
5910
+ apiKey,
5911
+ proxy,
5912
+ directory,
5913
+ format,
5914
+ mode,
5915
+ whatIf,
5916
+ project: projectId,
5917
+ diff: diffMode,
5918
+ allowEmptySource
5919
+ }) => {
5920
+ const fetch3 = nodeFetchProxy(proxy);
5921
+ const client = new WorkflowClient({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5922
+ const source = createWorkflowEngineDataSource({ client });
5923
+ let target;
5924
+ const isPackage = isPathAPackageFile(directory);
5925
+ if (isPackage) {
5926
+ const packageContents = readCanvasPackage(directory, false);
5927
+ target = await createArraySyncEngineDataSource({
5928
+ name: `Package file ${directory}`,
5929
+ objects: packageContents.workflows ?? [],
5930
+ selectIdentifier: selectIdentifier7,
5931
+ selectDisplayName: selectDisplayName7,
5932
+ onSyncComplete: async (_, synced) => {
5933
+ packageContents.workflows = synced;
5934
+ writeCanvasPackage(directory, packageContents);
5935
+ }
5936
+ });
5937
+ } else {
5938
+ target = await createFileSyncEngineDataSource({
5939
+ directory,
5940
+ selectIdentifier: selectIdentifier7,
5941
+ selectDisplayName: selectDisplayName7,
5942
+ format
5943
+ });
5944
+ }
5945
+ await syncEngine({
5946
+ source,
5947
+ target,
5948
+ mode,
5949
+ whatIf,
5950
+ allowEmptySource: allowEmptySource ?? true,
5951
+ log: createSyncEngineConsoleLogger({ diffMode })
5952
+ });
5953
+ }
5954
+ };
5955
+
5956
+ // src/commands/canvas/commands/workflow/push.ts
5957
+ import { WorkflowClient as WorkflowClient2 } from "@uniformdev/canvas";
5958
+ var WorkflowPushModule = {
5959
+ command: "push <directory>",
5960
+ describe: "Pushes all workflows from files in a directory to Uniform Canvas",
5961
+ builder: (yargs38) => withConfiguration(
5962
+ withApiOptions(
5963
+ withProjectOptions(
5964
+ withDiffOptions(
5965
+ yargs38.positional("directory", {
5966
+ describe: "Directory to read from. If a filename is used, a package will be read instead.",
5967
+ type: "string"
5968
+ }).option("what-if", {
5969
+ alias: ["w"],
5970
+ describe: "What-if mode reports what would be done but changes nothing",
5971
+ default: false,
5972
+ type: "boolean"
5973
+ }).option("mode", {
5974
+ alias: ["m"],
5975
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
5976
+ choices: ["create", "createOrUpdate", "mirror"],
5977
+ default: "mirror",
5978
+ type: "string"
5979
+ })
5980
+ )
5981
+ )
5982
+ )
5983
+ ),
5984
+ handler: async ({
5985
+ apiHost,
5986
+ apiKey,
5987
+ proxy,
5988
+ directory,
5989
+ mode,
5990
+ whatIf,
5991
+ project: projectId,
5992
+ diff: diffMode,
5993
+ allowEmptySource
5994
+ }) => {
5995
+ const fetch3 = nodeFetchProxy(proxy);
5996
+ const client = new WorkflowClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
5997
+ let source;
5998
+ const isPackage = isPathAPackageFile(directory);
5999
+ if (isPackage) {
6000
+ const packageContents = readCanvasPackage(directory, true);
6001
+ source = await createArraySyncEngineDataSource({
6002
+ name: `Package file ${directory}`,
6003
+ objects: packageContents.workflows ?? [],
6004
+ selectIdentifier: selectIdentifier7,
6005
+ selectDisplayName: selectDisplayName7
6006
+ });
6007
+ } else {
6008
+ source = await createFileSyncEngineDataSource({
6009
+ directory,
6010
+ selectIdentifier: selectIdentifier7,
6011
+ selectDisplayName: selectDisplayName7
5612
6012
  });
5613
6013
  }
5614
6014
  const target = createWorkflowEngineDataSource({ client });
@@ -5628,9 +6028,9 @@ var WorkflowModule = {
5628
6028
  command: "workflow <command>",
5629
6029
  aliases: ["wf"],
5630
6030
  describe: "Commands for Canvas workflows",
5631
- builder: (yargs36) => yargs36.command(WorkflowPullModule).command(WorkflowPushModule).demandCommand(),
6031
+ builder: (yargs38) => yargs38.command(WorkflowPullModule).command(WorkflowPushModule).demandCommand(),
5632
6032
  handler: () => {
5633
- yargs15.help();
6033
+ yargs17.help();
5634
6034
  }
5635
6035
  };
5636
6036
 
@@ -5639,28 +6039,28 @@ var CanvasCommand = {
5639
6039
  command: "canvas <command>",
5640
6040
  aliases: ["cv", "pm", "presentation"],
5641
6041
  describe: "Uniform Canvas commands",
5642
- builder: (yargs36) => yargs36.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(DataSourceModule).command(CategoryModule).command(PatternModule).command(ComponentPatternModule).command(CompositionPatternModule).command(ContentTypeModule).command(EntryModule).command(EntryPatternModule).command(PromptModule).command(AssetModule).command(LocaleModule).command(WorkflowModule).demandCommand(),
6042
+ builder: (yargs38) => yargs38.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(DataSourceModule).command(CategoryModule).command(PatternModule).command(ComponentPatternModule).command(CompositionPatternModule).command(ContentTypeModule).command(EntryModule).command(EntryPatternModule).command(PromptModule).command(AssetModule).command(LocaleModule).command(WorkflowModule).command(PreviewUrlModule).command(PreviewViewportModule).demandCommand(),
5643
6043
  handler: () => {
5644
- yargs16.showHelp();
6044
+ yargs18.showHelp();
5645
6045
  }
5646
6046
  };
5647
6047
 
5648
6048
  // src/commands/context/index.ts
5649
- import yargs23 from "yargs";
6049
+ import yargs25 from "yargs";
5650
6050
 
5651
6051
  // src/commands/context/commands/aggregate.ts
5652
- import yargs17 from "yargs";
6052
+ import yargs19 from "yargs";
5653
6053
 
5654
6054
  // src/commands/context/commands/aggregate/get.ts
5655
6055
  import { UncachedAggregateClient } from "@uniformdev/context/api";
5656
6056
  var AggregateGetModule = {
5657
6057
  command: "get <id>",
5658
6058
  describe: "Fetch an aggregate",
5659
- builder: (yargs36) => withConfiguration(
6059
+ builder: (yargs38) => withConfiguration(
5660
6060
  withFormatOptions(
5661
6061
  withApiOptions(
5662
6062
  withProjectOptions(
5663
- yargs36.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
6063
+ yargs38.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
5664
6064
  )
5665
6065
  )
5666
6066
  )
@@ -5684,7 +6084,7 @@ var AggregateListModule = {
5684
6084
  command: "list",
5685
6085
  describe: "List aggregates",
5686
6086
  aliases: ["ls"],
5687
- builder: (yargs36) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs36)))),
6087
+ builder: (yargs38) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs38)))),
5688
6088
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5689
6089
  const fetch3 = nodeFetchProxy(proxy);
5690
6090
  const client = new UncachedAggregateClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5697,8 +6097,8 @@ var AggregateListModule = {
5697
6097
  import { UncachedAggregateClient as UncachedAggregateClient3 } from "@uniformdev/context/api";
5698
6098
 
5699
6099
  // src/commands/context/commands/aggregate/_util.ts
5700
- var selectIdentifier6 = (source) => source.id;
5701
- var selectDisplayName6 = (source) => `${source.name} (pid: ${source.id})`;
6100
+ var selectIdentifier8 = (source) => source.id;
6101
+ var selectDisplayName8 = (source) => `${source.name} (pid: ${source.id})`;
5702
6102
 
5703
6103
  // src/commands/context/aggregateEngineDataSource.ts
5704
6104
  function createAggregateEngineDataSource({
@@ -5709,8 +6109,8 @@ function createAggregateEngineDataSource({
5709
6109
  const aggregates = (await client.get({ type })).aggregates;
5710
6110
  for await (const def of aggregates) {
5711
6111
  const result = {
5712
- id: selectIdentifier6(def),
5713
- displayName: selectDisplayName6(def),
6112
+ id: selectIdentifier8(def),
6113
+ displayName: selectDisplayName8(def),
5714
6114
  providerId: def.id,
5715
6115
  object: def
5716
6116
  };
@@ -5751,11 +6151,11 @@ function writeContextPackage(filename, packageContents) {
5751
6151
  var AggregatePullModule = {
5752
6152
  command: "pull <directory>",
5753
6153
  describe: "Pulls all aggregates to local files in a directory",
5754
- builder: (yargs36) => withConfiguration(
6154
+ builder: (yargs38) => withConfiguration(
5755
6155
  withApiOptions(
5756
6156
  withProjectOptions(
5757
6157
  withDiffOptions(
5758
- yargs36.positional("directory", {
6158
+ yargs38.positional("directory", {
5759
6159
  describe: "Directory to save the aggregates to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
5760
6160
  type: "string"
5761
6161
  }).option("format", {
@@ -5802,8 +6202,8 @@ var AggregatePullModule = {
5802
6202
  target = await createArraySyncEngineDataSource({
5803
6203
  name: `Package file ${directory}`,
5804
6204
  objects: packageContents.aggregates ?? [],
5805
- selectIdentifier: selectIdentifier6,
5806
- selectDisplayName: selectDisplayName6,
6205
+ selectIdentifier: selectIdentifier8,
6206
+ selectDisplayName: selectDisplayName8,
5807
6207
  onSyncComplete: async (_, synced) => {
5808
6208
  packageContents.aggregates = synced;
5809
6209
  writeContextPackage(directory, packageContents);
@@ -5812,8 +6212,8 @@ var AggregatePullModule = {
5812
6212
  } else {
5813
6213
  target = await createFileSyncEngineDataSource({
5814
6214
  directory,
5815
- selectIdentifier: selectIdentifier6,
5816
- selectDisplayName: selectDisplayName6,
6215
+ selectIdentifier: selectIdentifier8,
6216
+ selectDisplayName: selectDisplayName8,
5817
6217
  format
5818
6218
  });
5819
6219
  }
@@ -5833,11 +6233,11 @@ import { UncachedAggregateClient as UncachedAggregateClient4 } from "@uniformdev
5833
6233
  var AggregatePushModule = {
5834
6234
  command: "push <directory>",
5835
6235
  describe: "Pushes all aggregates from files in a directory or package to Uniform",
5836
- builder: (yargs36) => withConfiguration(
6236
+ builder: (yargs38) => withConfiguration(
5837
6237
  withApiOptions(
5838
6238
  withProjectOptions(
5839
6239
  withDiffOptions(
5840
- yargs36.positional("directory", {
6240
+ yargs38.positional("directory", {
5841
6241
  describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
5842
6242
  type: "string"
5843
6243
  }).option("what-if", {
@@ -5876,14 +6276,14 @@ var AggregatePushModule = {
5876
6276
  source = await createArraySyncEngineDataSource({
5877
6277
  name: `Package file ${directory}`,
5878
6278
  objects: packageContents.aggregates ?? [],
5879
- selectIdentifier: selectIdentifier6,
5880
- selectDisplayName: selectDisplayName6
6279
+ selectIdentifier: selectIdentifier8,
6280
+ selectDisplayName: selectDisplayName8
5881
6281
  });
5882
6282
  } else {
5883
6283
  source = await createFileSyncEngineDataSource({
5884
6284
  directory,
5885
- selectIdentifier: selectIdentifier6,
5886
- selectDisplayName: selectDisplayName6
6285
+ selectIdentifier: selectIdentifier8,
6286
+ selectDisplayName: selectDisplayName8
5887
6287
  });
5888
6288
  }
5889
6289
  const target = createAggregateEngineDataSource({ client });
@@ -5905,10 +6305,10 @@ var AggregateRemoveModule = {
5905
6305
  command: "remove <id>",
5906
6306
  aliases: ["delete", "rm"],
5907
6307
  describe: "Delete an aggregate",
5908
- builder: (yargs36) => withConfiguration(
6308
+ builder: (yargs38) => withConfiguration(
5909
6309
  withApiOptions(
5910
6310
  withProjectOptions(
5911
- yargs36.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
6311
+ yargs38.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
5912
6312
  )
5913
6313
  )
5914
6314
  ),
@@ -5925,10 +6325,10 @@ var AggregateUpdateModule = {
5925
6325
  command: "update <filename>",
5926
6326
  aliases: ["put"],
5927
6327
  describe: "Insert or update an aggregate",
5928
- builder: (yargs36) => withConfiguration(
6328
+ builder: (yargs38) => withConfiguration(
5929
6329
  withApiOptions(
5930
6330
  withProjectOptions(
5931
- yargs36.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
6331
+ yargs38.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
5932
6332
  )
5933
6333
  )
5934
6334
  ),
@@ -5945,25 +6345,25 @@ var AggregateModule = {
5945
6345
  command: "aggregate <command>",
5946
6346
  aliases: ["agg", "intent", "audience"],
5947
6347
  describe: "Commands for Context aggregates (intents, audiences)",
5948
- builder: (yargs36) => yargs36.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
6348
+ builder: (yargs38) => yargs38.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
5949
6349
  handler: () => {
5950
- yargs17.help();
6350
+ yargs19.help();
5951
6351
  }
5952
6352
  };
5953
6353
 
5954
6354
  // src/commands/context/commands/enrichment.ts
5955
- import yargs18 from "yargs";
6355
+ import yargs20 from "yargs";
5956
6356
 
5957
6357
  // src/commands/context/commands/enrichment/get.ts
5958
6358
  import { UncachedEnrichmentClient } from "@uniformdev/context/api";
5959
6359
  var EnrichmentGetModule = {
5960
6360
  command: "get <id>",
5961
6361
  describe: "Fetch an enrichment category and its values",
5962
- builder: (yargs36) => withFormatOptions(
6362
+ builder: (yargs38) => withFormatOptions(
5963
6363
  withConfiguration(
5964
6364
  withApiOptions(
5965
6365
  withProjectOptions(
5966
- yargs36.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
6366
+ yargs38.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
5967
6367
  )
5968
6368
  )
5969
6369
  )
@@ -5987,7 +6387,7 @@ var EnrichmentListModule = {
5987
6387
  command: "list",
5988
6388
  describe: "List enrichments",
5989
6389
  aliases: ["ls"],
5990
- builder: (yargs36) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs36)))),
6390
+ builder: (yargs38) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs38)))),
5991
6391
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5992
6392
  const fetch3 = nodeFetchProxy(proxy);
5993
6393
  const client = new UncachedEnrichmentClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -6000,8 +6400,8 @@ var EnrichmentListModule = {
6000
6400
  import { UncachedEnrichmentClient as UncachedEnrichmentClient3 } from "@uniformdev/context/api";
6001
6401
 
6002
6402
  // src/commands/context/commands/enrichment/_util.ts
6003
- var selectIdentifier7 = (source) => source.id;
6004
- var selectDisplayName7 = (source) => `${source.name} (pid: ${source.id})`;
6403
+ var selectIdentifier9 = (source) => source.id;
6404
+ var selectDisplayName9 = (source) => `${source.name} (pid: ${source.id})`;
6005
6405
 
6006
6406
  // src/commands/context/enrichmentEngineDataSource.ts
6007
6407
  function createEnrichmentEngineDataSource({
@@ -6011,8 +6411,8 @@ function createEnrichmentEngineDataSource({
6011
6411
  const enrichments = (await client.get()).enrichments;
6012
6412
  for await (const def of enrichments) {
6013
6413
  const result = {
6014
- id: selectIdentifier7(def),
6015
- displayName: selectDisplayName7(def),
6414
+ id: selectIdentifier9(def),
6415
+ displayName: selectDisplayName9(def),
6016
6416
  providerId: def.id,
6017
6417
  object: def
6018
6418
  };
@@ -6089,11 +6489,11 @@ var createEnrichmentValueEngineDataSource = ({
6089
6489
  var EnrichmentPullModule = {
6090
6490
  command: "pull <directory>",
6091
6491
  describe: "Pulls all enrichments to local files in a directory",
6092
- builder: (yargs36) => withConfiguration(
6492
+ builder: (yargs38) => withConfiguration(
6093
6493
  withApiOptions(
6094
6494
  withProjectOptions(
6095
6495
  withDiffOptions(
6096
- yargs36.positional("directory", {
6496
+ yargs38.positional("directory", {
6097
6497
  describe: "Directory to save the enrichments to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
6098
6498
  type: "string"
6099
6499
  }).option("format", {
@@ -6140,8 +6540,8 @@ var EnrichmentPullModule = {
6140
6540
  target = await createArraySyncEngineDataSource({
6141
6541
  name: `Package file ${directory}`,
6142
6542
  objects: packageContents.enrichments ?? [],
6143
- selectIdentifier: selectIdentifier7,
6144
- selectDisplayName: selectDisplayName7,
6543
+ selectIdentifier: selectIdentifier9,
6544
+ selectDisplayName: selectDisplayName9,
6145
6545
  onSyncComplete: async (_, synced) => {
6146
6546
  packageContents.enrichments = synced;
6147
6547
  writeContextPackage(directory, packageContents);
@@ -6150,8 +6550,8 @@ var EnrichmentPullModule = {
6150
6550
  } else {
6151
6551
  target = await createFileSyncEngineDataSource({
6152
6552
  directory,
6153
- selectIdentifier: selectIdentifier7,
6154
- selectDisplayName: selectDisplayName7,
6553
+ selectIdentifier: selectIdentifier9,
6554
+ selectDisplayName: selectDisplayName9,
6155
6555
  format
6156
6556
  });
6157
6557
  }
@@ -6171,11 +6571,11 @@ import { UncachedEnrichmentClient as UncachedEnrichmentClient4 } from "@uniformd
6171
6571
  var EnrichmentPushModule = {
6172
6572
  command: "push <directory>",
6173
6573
  describe: "Pushes all enrichments from files in a directory or package to Uniform",
6174
- builder: (yargs36) => withConfiguration(
6574
+ builder: (yargs38) => withConfiguration(
6175
6575
  withApiOptions(
6176
6576
  withProjectOptions(
6177
6577
  withDiffOptions(
6178
- yargs36.positional("directory", {
6578
+ yargs38.positional("directory", {
6179
6579
  describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
6180
6580
  type: "string"
6181
6581
  }).option("what-if", {
@@ -6214,14 +6614,14 @@ var EnrichmentPushModule = {
6214
6614
  source = await createArraySyncEngineDataSource({
6215
6615
  name: `Package file ${directory}`,
6216
6616
  objects: packageContents.enrichments ?? [],
6217
- selectIdentifier: selectIdentifier7,
6218
- selectDisplayName: selectDisplayName7
6617
+ selectIdentifier: selectIdentifier9,
6618
+ selectDisplayName: selectDisplayName9
6219
6619
  });
6220
6620
  } else {
6221
6621
  source = await createFileSyncEngineDataSource({
6222
6622
  directory,
6223
- selectIdentifier: selectIdentifier7,
6224
- selectDisplayName: selectDisplayName7
6623
+ selectIdentifier: selectIdentifier9,
6624
+ selectDisplayName: selectDisplayName9
6225
6625
  });
6226
6626
  }
6227
6627
  const target = createEnrichmentEngineDataSource({ client });
@@ -6242,10 +6642,10 @@ var EnrichmentRemoveModule = {
6242
6642
  command: "remove <id>",
6243
6643
  aliases: ["delete", "rm"],
6244
6644
  describe: "Delete an enrichment category and its values",
6245
- builder: (yargs36) => withConfiguration(
6645
+ builder: (yargs38) => withConfiguration(
6246
6646
  withApiOptions(
6247
6647
  withProjectOptions(
6248
- yargs36.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
6648
+ yargs38.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
6249
6649
  )
6250
6650
  )
6251
6651
  ),
@@ -6261,14 +6661,14 @@ var EnrichmentModule = {
6261
6661
  command: "enrichment <command>",
6262
6662
  aliases: ["enr"],
6263
6663
  describe: "Commands for Context enrichments",
6264
- builder: (yargs36) => yargs36.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
6664
+ builder: (yargs38) => yargs38.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
6265
6665
  handler: () => {
6266
- yargs18.help();
6666
+ yargs20.help();
6267
6667
  }
6268
6668
  };
6269
6669
 
6270
6670
  // src/commands/context/commands/manifest.ts
6271
- import yargs19 from "yargs";
6671
+ import yargs21 from "yargs";
6272
6672
 
6273
6673
  // src/commands/context/commands/manifest/get.ts
6274
6674
  import { ApiClientError as ApiClientError2, UncachedManifestClient } from "@uniformdev/context/api";
@@ -6279,10 +6679,10 @@ var ManifestGetModule = {
6279
6679
  command: "get [output]",
6280
6680
  aliases: ["dl", "download"],
6281
6681
  describe: "Download the Uniform Context manifest for a project",
6282
- builder: (yargs36) => withConfiguration(
6682
+ builder: (yargs38) => withConfiguration(
6283
6683
  withApiOptions(
6284
6684
  withProjectOptions(
6285
- yargs36.option("preview", {
6685
+ yargs38.option("preview", {
6286
6686
  describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
6287
6687
  default: false,
6288
6688
  type: "boolean",
@@ -6344,7 +6744,7 @@ import { exit as exit2 } from "process";
6344
6744
  var ManifestPublishModule = {
6345
6745
  command: "publish",
6346
6746
  describe: "Publish the Uniform Context manifest for a project",
6347
- builder: (yargs36) => withConfiguration(withApiOptions(withProjectOptions(yargs36))),
6747
+ builder: (yargs38) => withConfiguration(withApiOptions(withProjectOptions(yargs38))),
6348
6748
  handler: async ({ apiKey, apiHost, proxy, project }) => {
6349
6749
  const fetch3 = nodeFetchProxy(proxy);
6350
6750
  try {
@@ -6377,25 +6777,25 @@ var ManifestModule = {
6377
6777
  command: "manifest <command>",
6378
6778
  describe: "Commands for context manifests",
6379
6779
  aliases: ["man"],
6380
- builder: (yargs36) => yargs36.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
6780
+ builder: (yargs38) => yargs38.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
6381
6781
  handler: () => {
6382
- yargs19.help();
6782
+ yargs21.help();
6383
6783
  }
6384
6784
  };
6385
6785
 
6386
6786
  // src/commands/context/commands/quirk.ts
6387
- import yargs20 from "yargs";
6787
+ import yargs22 from "yargs";
6388
6788
 
6389
6789
  // src/commands/context/commands/quirk/get.ts
6390
6790
  import { UncachedQuirkClient } from "@uniformdev/context/api";
6391
6791
  var QuirkGetModule = {
6392
6792
  command: "get <id>",
6393
6793
  describe: "Fetch a quirk",
6394
- builder: (yargs36) => withConfiguration(
6794
+ builder: (yargs38) => withConfiguration(
6395
6795
  withFormatOptions(
6396
6796
  withApiOptions(
6397
6797
  withProjectOptions(
6398
- yargs36.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
6798
+ yargs38.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
6399
6799
  )
6400
6800
  )
6401
6801
  )
@@ -6419,11 +6819,11 @@ var QuirkListModule = {
6419
6819
  command: "list",
6420
6820
  describe: "List quirks",
6421
6821
  aliases: ["ls"],
6422
- builder: (yargs36) => withConfiguration(
6822
+ builder: (yargs38) => withConfiguration(
6423
6823
  withFormatOptions(
6424
6824
  withApiOptions(
6425
6825
  withProjectOptions(
6426
- yargs36.option("withIntegrations", {
6826
+ yargs38.option("withIntegrations", {
6427
6827
  alias: ["i"],
6428
6828
  describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
6429
6829
  type: "boolean"
@@ -6444,8 +6844,8 @@ var QuirkListModule = {
6444
6844
  import { UncachedQuirkClient as UncachedQuirkClient3 } from "@uniformdev/context/api";
6445
6845
 
6446
6846
  // src/commands/context/commands/quirk/_util.ts
6447
- var selectIdentifier8 = (source) => source.id;
6448
- var selectDisplayName8 = (source) => `${source.name} (pid: ${source.id})`;
6847
+ var selectIdentifier10 = (source) => source.id;
6848
+ var selectDisplayName10 = (source) => `${source.name} (pid: ${source.id})`;
6449
6849
 
6450
6850
  // src/commands/context/quirkEngineDataSource.ts
6451
6851
  function createQuirkEngineDataSource({
@@ -6455,8 +6855,8 @@ function createQuirkEngineDataSource({
6455
6855
  const quirks = (await client.get({ withIntegrations: false })).quirks;
6456
6856
  for await (const def of quirks) {
6457
6857
  const result = {
6458
- id: selectIdentifier8(def),
6459
- displayName: selectDisplayName8(def),
6858
+ id: selectIdentifier10(def),
6859
+ displayName: selectDisplayName10(def),
6460
6860
  providerId: def.id,
6461
6861
  object: def
6462
6862
  };
@@ -6481,11 +6881,11 @@ function createQuirkEngineDataSource({
6481
6881
  var QuirkPullModule = {
6482
6882
  command: "pull <directory>",
6483
6883
  describe: "Pulls all quirks to local files in a directory",
6484
- builder: (yargs36) => withConfiguration(
6884
+ builder: (yargs38) => withConfiguration(
6485
6885
  withApiOptions(
6486
6886
  withProjectOptions(
6487
6887
  withDiffOptions(
6488
- yargs36.positional("directory", {
6888
+ yargs38.positional("directory", {
6489
6889
  describe: "Directory to save the quirks to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
6490
6890
  type: "string"
6491
6891
  }).option("format", {
@@ -6532,8 +6932,8 @@ var QuirkPullModule = {
6532
6932
  target = await createArraySyncEngineDataSource({
6533
6933
  name: `Package file ${directory}`,
6534
6934
  objects: packageContents.quirks ?? [],
6535
- selectIdentifier: selectIdentifier8,
6536
- selectDisplayName: selectDisplayName8,
6935
+ selectIdentifier: selectIdentifier10,
6936
+ selectDisplayName: selectDisplayName10,
6537
6937
  onSyncComplete: async (_, synced) => {
6538
6938
  packageContents.quirks = synced;
6539
6939
  writeContextPackage(directory, packageContents);
@@ -6542,8 +6942,8 @@ var QuirkPullModule = {
6542
6942
  } else {
6543
6943
  target = await createFileSyncEngineDataSource({
6544
6944
  directory,
6545
- selectIdentifier: selectIdentifier8,
6546
- selectDisplayName: selectDisplayName8,
6945
+ selectIdentifier: selectIdentifier10,
6946
+ selectDisplayName: selectDisplayName10,
6547
6947
  format
6548
6948
  });
6549
6949
  }
@@ -6563,11 +6963,11 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
6563
6963
  var QuirkPushModule = {
6564
6964
  command: "push <directory>",
6565
6965
  describe: "Pushes all quirks from files in a directory or package to Uniform",
6566
- builder: (yargs36) => withConfiguration(
6966
+ builder: (yargs38) => withConfiguration(
6567
6967
  withApiOptions(
6568
6968
  withProjectOptions(
6569
6969
  withDiffOptions(
6570
- yargs36.positional("directory", {
6970
+ yargs38.positional("directory", {
6571
6971
  describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
6572
6972
  type: "string"
6573
6973
  }).option("what-if", {
@@ -6606,14 +7006,14 @@ var QuirkPushModule = {
6606
7006
  source = await createArraySyncEngineDataSource({
6607
7007
  name: `Package file ${directory}`,
6608
7008
  objects: packageContents.quirks ?? [],
6609
- selectIdentifier: selectIdentifier8,
6610
- selectDisplayName: selectDisplayName8
7009
+ selectIdentifier: selectIdentifier10,
7010
+ selectDisplayName: selectDisplayName10
6611
7011
  });
6612
7012
  } else {
6613
7013
  source = await createFileSyncEngineDataSource({
6614
7014
  directory,
6615
- selectIdentifier: selectIdentifier8,
6616
- selectDisplayName: selectDisplayName8
7015
+ selectIdentifier: selectIdentifier10,
7016
+ selectDisplayName: selectDisplayName10
6617
7017
  });
6618
7018
  }
6619
7019
  const target = createQuirkEngineDataSource({ client });
@@ -6634,10 +7034,10 @@ var QuirkRemoveModule = {
6634
7034
  command: "remove <id>",
6635
7035
  aliases: ["delete", "rm"],
6636
7036
  describe: "Delete a quirk",
6637
- builder: (yargs36) => withConfiguration(
7037
+ builder: (yargs38) => withConfiguration(
6638
7038
  withApiOptions(
6639
7039
  withProjectOptions(
6640
- yargs36.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
7040
+ yargs38.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
6641
7041
  )
6642
7042
  )
6643
7043
  ),
@@ -6654,10 +7054,10 @@ var QuirkUpdateModule = {
6654
7054
  command: "update <filename>",
6655
7055
  aliases: ["put"],
6656
7056
  describe: "Insert or update a quirk",
6657
- builder: (yargs36) => withConfiguration(
7057
+ builder: (yargs38) => withConfiguration(
6658
7058
  withApiOptions(
6659
7059
  withProjectOptions(
6660
- yargs36.positional("filename", { demandOption: true, describe: "Quirk file to put" })
7060
+ yargs38.positional("filename", { demandOption: true, describe: "Quirk file to put" })
6661
7061
  )
6662
7062
  )
6663
7063
  ),
@@ -6674,25 +7074,25 @@ var QuirkModule = {
6674
7074
  command: "quirk <command>",
6675
7075
  aliases: ["qk"],
6676
7076
  describe: "Commands for Context quirks",
6677
- builder: (yargs36) => yargs36.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
7077
+ builder: (yargs38) => yargs38.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
6678
7078
  handler: () => {
6679
- yargs20.help();
7079
+ yargs22.help();
6680
7080
  }
6681
7081
  };
6682
7082
 
6683
7083
  // src/commands/context/commands/signal.ts
6684
- import yargs21 from "yargs";
7084
+ import yargs23 from "yargs";
6685
7085
 
6686
7086
  // src/commands/context/commands/signal/get.ts
6687
7087
  import { UncachedSignalClient } from "@uniformdev/context/api";
6688
7088
  var SignalGetModule = {
6689
7089
  command: "get <id>",
6690
7090
  describe: "Fetch a signal",
6691
- builder: (yargs36) => withConfiguration(
7091
+ builder: (yargs38) => withConfiguration(
6692
7092
  withFormatOptions(
6693
7093
  withApiOptions(
6694
7094
  withProjectOptions(
6695
- yargs36.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
7095
+ yargs38.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
6696
7096
  )
6697
7097
  )
6698
7098
  )
@@ -6716,7 +7116,7 @@ var SignalListModule = {
6716
7116
  command: "list",
6717
7117
  describe: "List signals",
6718
7118
  aliases: ["ls"],
6719
- builder: (yargs36) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs36)))),
7119
+ builder: (yargs38) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs38)))),
6720
7120
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
6721
7121
  const fetch3 = nodeFetchProxy(proxy);
6722
7122
  const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -6729,8 +7129,8 @@ var SignalListModule = {
6729
7129
  import { UncachedSignalClient as UncachedSignalClient3 } from "@uniformdev/context/api";
6730
7130
 
6731
7131
  // src/commands/context/commands/signal/_util.ts
6732
- var selectIdentifier9 = (source) => source.id;
6733
- var selectDisplayName9 = (source) => `${source.name} (pid: ${source.id})`;
7132
+ var selectIdentifier11 = (source) => source.id;
7133
+ var selectDisplayName11 = (source) => `${source.name} (pid: ${source.id})`;
6734
7134
 
6735
7135
  // src/commands/context/signalEngineDataSource.ts
6736
7136
  function createSignalEngineDataSource({
@@ -6740,8 +7140,8 @@ function createSignalEngineDataSource({
6740
7140
  const signals = (await client.get()).signals;
6741
7141
  for await (const def of signals) {
6742
7142
  const result = {
6743
- id: selectIdentifier9(def),
6744
- displayName: selectDisplayName9(def),
7143
+ id: selectIdentifier11(def),
7144
+ displayName: selectDisplayName11(def),
6745
7145
  providerId: def.id,
6746
7146
  object: def
6747
7147
  };
@@ -6766,11 +7166,11 @@ function createSignalEngineDataSource({
6766
7166
  var SignalPullModule = {
6767
7167
  command: "pull <directory>",
6768
7168
  describe: "Pulls all signals to local files in a directory",
6769
- builder: (yargs36) => withConfiguration(
7169
+ builder: (yargs38) => withConfiguration(
6770
7170
  withApiOptions(
6771
7171
  withProjectOptions(
6772
7172
  withDiffOptions(
6773
- yargs36.positional("directory", {
7173
+ yargs38.positional("directory", {
6774
7174
  describe: "Directory to save the signals to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
6775
7175
  type: "string"
6776
7176
  }).option("format", {
@@ -6817,8 +7217,8 @@ var SignalPullModule = {
6817
7217
  target = await createArraySyncEngineDataSource({
6818
7218
  name: `Package file ${directory}`,
6819
7219
  objects: packageContents.signals ?? [],
6820
- selectIdentifier: selectIdentifier9,
6821
- selectDisplayName: selectDisplayName9,
7220
+ selectIdentifier: selectIdentifier11,
7221
+ selectDisplayName: selectDisplayName11,
6822
7222
  onSyncComplete: async (_, synced) => {
6823
7223
  packageContents.signals = synced;
6824
7224
  writeContextPackage(directory, packageContents);
@@ -6827,8 +7227,8 @@ var SignalPullModule = {
6827
7227
  } else {
6828
7228
  target = await createFileSyncEngineDataSource({
6829
7229
  directory,
6830
- selectIdentifier: selectIdentifier9,
6831
- selectDisplayName: selectDisplayName9,
7230
+ selectIdentifier: selectIdentifier11,
7231
+ selectDisplayName: selectDisplayName11,
6832
7232
  format
6833
7233
  });
6834
7234
  }
@@ -6848,11 +7248,11 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
6848
7248
  var SignalPushModule = {
6849
7249
  command: "push <directory>",
6850
7250
  describe: "Pushes all signals from files in a directory or package to Uniform",
6851
- builder: (yargs36) => withConfiguration(
7251
+ builder: (yargs38) => withConfiguration(
6852
7252
  withApiOptions(
6853
7253
  withProjectOptions(
6854
7254
  withDiffOptions(
6855
- yargs36.positional("directory", {
7255
+ yargs38.positional("directory", {
6856
7256
  describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
6857
7257
  type: "string"
6858
7258
  }).option("what-if", {
@@ -6891,14 +7291,14 @@ var SignalPushModule = {
6891
7291
  source = await createArraySyncEngineDataSource({
6892
7292
  name: `Package file ${directory}`,
6893
7293
  objects: packageContents.signals ?? [],
6894
- selectIdentifier: selectIdentifier9,
6895
- selectDisplayName: selectDisplayName9
7294
+ selectIdentifier: selectIdentifier11,
7295
+ selectDisplayName: selectDisplayName11
6896
7296
  });
6897
7297
  } else {
6898
7298
  source = await createFileSyncEngineDataSource({
6899
7299
  directory,
6900
- selectIdentifier: selectIdentifier9,
6901
- selectDisplayName: selectDisplayName9
7300
+ selectIdentifier: selectIdentifier11,
7301
+ selectDisplayName: selectDisplayName11
6902
7302
  });
6903
7303
  }
6904
7304
  const target = createSignalEngineDataSource({ client });
@@ -6919,10 +7319,10 @@ var SignalRemoveModule = {
6919
7319
  command: "remove <id>",
6920
7320
  aliases: ["delete", "rm"],
6921
7321
  describe: "Delete a signal",
6922
- builder: (yargs36) => withConfiguration(
7322
+ builder: (yargs38) => withConfiguration(
6923
7323
  withApiOptions(
6924
7324
  withProjectOptions(
6925
- yargs36.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
7325
+ yargs38.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
6926
7326
  )
6927
7327
  )
6928
7328
  ),
@@ -6939,10 +7339,10 @@ var SignalUpdateModule = {
6939
7339
  command: "update <filename>",
6940
7340
  aliases: ["put"],
6941
7341
  describe: "Insert or update a signal",
6942
- builder: (yargs36) => withConfiguration(
7342
+ builder: (yargs38) => withConfiguration(
6943
7343
  withApiOptions(
6944
7344
  withProjectOptions(
6945
- yargs36.positional("filename", { demandOption: true, describe: "Signal file to put" })
7345
+ yargs38.positional("filename", { demandOption: true, describe: "Signal file to put" })
6946
7346
  )
6947
7347
  )
6948
7348
  ),
@@ -6959,25 +7359,25 @@ var SignalModule = {
6959
7359
  command: "signal <command>",
6960
7360
  aliases: ["sig"],
6961
7361
  describe: "Commands for Context signals",
6962
- builder: (yargs36) => yargs36.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
7362
+ builder: (yargs38) => yargs38.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
6963
7363
  handler: () => {
6964
- yargs21.help();
7364
+ yargs23.help();
6965
7365
  }
6966
7366
  };
6967
7367
 
6968
7368
  // src/commands/context/commands/test.ts
6969
- import yargs22 from "yargs";
7369
+ import yargs24 from "yargs";
6970
7370
 
6971
7371
  // src/commands/context/commands/test/get.ts
6972
7372
  import { UncachedTestClient } from "@uniformdev/context/api";
6973
7373
  var TestGetModule = {
6974
7374
  command: "get <id>",
6975
7375
  describe: "Fetch a test",
6976
- builder: (yargs36) => withConfiguration(
7376
+ builder: (yargs38) => withConfiguration(
6977
7377
  withFormatOptions(
6978
7378
  withApiOptions(
6979
7379
  withProjectOptions(
6980
- yargs36.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
7380
+ yargs38.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
6981
7381
  )
6982
7382
  )
6983
7383
  )
@@ -7001,7 +7401,7 @@ var TestListModule = {
7001
7401
  command: "list",
7002
7402
  describe: "List tests",
7003
7403
  aliases: ["ls"],
7004
- builder: (yargs36) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs36)))),
7404
+ builder: (yargs38) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs38)))),
7005
7405
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
7006
7406
  const fetch3 = nodeFetchProxy(proxy);
7007
7407
  const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -7014,8 +7414,8 @@ var TestListModule = {
7014
7414
  import { UncachedTestClient as UncachedTestClient3 } from "@uniformdev/context/api";
7015
7415
 
7016
7416
  // src/commands/context/commands/test/_util.ts
7017
- var selectIdentifier10 = (source) => source.id;
7018
- var selectDisplayName10 = (source) => `${source.name} (pid: ${source.id})`;
7417
+ var selectIdentifier12 = (source) => source.id;
7418
+ var selectDisplayName12 = (source) => `${source.name} (pid: ${source.id})`;
7019
7419
 
7020
7420
  // src/commands/context/testEngineDataSource.ts
7021
7421
  function createTestEngineDataSource({
@@ -7025,8 +7425,8 @@ function createTestEngineDataSource({
7025
7425
  const tests = (await client.get()).tests;
7026
7426
  for await (const def of tests) {
7027
7427
  const result = {
7028
- id: selectIdentifier10(def),
7029
- displayName: selectDisplayName10(def),
7428
+ id: selectIdentifier12(def),
7429
+ displayName: selectDisplayName12(def),
7030
7430
  providerId: def.id,
7031
7431
  object: def
7032
7432
  };
@@ -7051,11 +7451,11 @@ function createTestEngineDataSource({
7051
7451
  var TestPullModule = {
7052
7452
  command: "pull <directory>",
7053
7453
  describe: "Pulls all tests to local files in a directory",
7054
- builder: (yargs36) => withConfiguration(
7454
+ builder: (yargs38) => withConfiguration(
7055
7455
  withApiOptions(
7056
7456
  withProjectOptions(
7057
7457
  withDiffOptions(
7058
- yargs36.positional("directory", {
7458
+ yargs38.positional("directory", {
7059
7459
  describe: "Directory to save the tests to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
7060
7460
  type: "string"
7061
7461
  }).option("format", {
@@ -7102,8 +7502,8 @@ var TestPullModule = {
7102
7502
  target = await createArraySyncEngineDataSource({
7103
7503
  name: `Package file ${directory}`,
7104
7504
  objects: packageContents.tests ?? [],
7105
- selectIdentifier: selectIdentifier10,
7106
- selectDisplayName: selectDisplayName10,
7505
+ selectIdentifier: selectIdentifier12,
7506
+ selectDisplayName: selectDisplayName12,
7107
7507
  onSyncComplete: async (_, synced) => {
7108
7508
  packageContents.tests = synced;
7109
7509
  writeContextPackage(directory, packageContents);
@@ -7112,8 +7512,8 @@ var TestPullModule = {
7112
7512
  } else {
7113
7513
  target = await createFileSyncEngineDataSource({
7114
7514
  directory,
7115
- selectIdentifier: selectIdentifier10,
7116
- selectDisplayName: selectDisplayName10,
7515
+ selectIdentifier: selectIdentifier12,
7516
+ selectDisplayName: selectDisplayName12,
7117
7517
  format
7118
7518
  });
7119
7519
  }
@@ -7133,11 +7533,11 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
7133
7533
  var TestPushModule = {
7134
7534
  command: "push <directory>",
7135
7535
  describe: "Pushes all tests from files in a directory or package to Uniform",
7136
- builder: (yargs36) => withConfiguration(
7536
+ builder: (yargs38) => withConfiguration(
7137
7537
  withApiOptions(
7138
7538
  withProjectOptions(
7139
7539
  withDiffOptions(
7140
- yargs36.positional("directory", {
7540
+ yargs38.positional("directory", {
7141
7541
  describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
7142
7542
  type: "string"
7143
7543
  }).option("what-if", {
@@ -7176,14 +7576,14 @@ var TestPushModule = {
7176
7576
  source = await createArraySyncEngineDataSource({
7177
7577
  name: `Package file ${directory}`,
7178
7578
  objects: packageContents.tests ?? [],
7179
- selectIdentifier: selectIdentifier10,
7180
- selectDisplayName: selectDisplayName10
7579
+ selectIdentifier: selectIdentifier12,
7580
+ selectDisplayName: selectDisplayName12
7181
7581
  });
7182
7582
  } else {
7183
7583
  source = await createFileSyncEngineDataSource({
7184
7584
  directory,
7185
- selectIdentifier: selectIdentifier10,
7186
- selectDisplayName: selectDisplayName10
7585
+ selectIdentifier: selectIdentifier12,
7586
+ selectDisplayName: selectDisplayName12
7187
7587
  });
7188
7588
  }
7189
7589
  const target = createTestEngineDataSource({ client });
@@ -7204,10 +7604,10 @@ var TestRemoveModule = {
7204
7604
  command: "remove <id>",
7205
7605
  aliases: ["delete", "rm"],
7206
7606
  describe: "Delete a test",
7207
- builder: (yargs36) => withConfiguration(
7607
+ builder: (yargs38) => withConfiguration(
7208
7608
  withApiOptions(
7209
7609
  withProjectOptions(
7210
- yargs36.positional("id", { demandOption: true, describe: "Test public ID to delete" })
7610
+ yargs38.positional("id", { demandOption: true, describe: "Test public ID to delete" })
7211
7611
  )
7212
7612
  )
7213
7613
  ),
@@ -7224,9 +7624,9 @@ var TestUpdateModule = {
7224
7624
  command: "update <filename>",
7225
7625
  aliases: ["put"],
7226
7626
  describe: "Insert or update a test",
7227
- builder: (yargs36) => withConfiguration(
7627
+ builder: (yargs38) => withConfiguration(
7228
7628
  withApiOptions(
7229
- withProjectOptions(yargs36.positional("filename", { demandOption: true, describe: "Test file to put" }))
7629
+ withProjectOptions(yargs38.positional("filename", { demandOption: true, describe: "Test file to put" }))
7230
7630
  )
7231
7631
  ),
7232
7632
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -7241,9 +7641,9 @@ var TestUpdateModule = {
7241
7641
  var TestModule = {
7242
7642
  command: "test <command>",
7243
7643
  describe: "Commands for Context A/B tests",
7244
- builder: (yargs36) => yargs36.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
7644
+ builder: (yargs38) => yargs38.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
7245
7645
  handler: () => {
7246
- yargs22.help();
7646
+ yargs24.help();
7247
7647
  }
7248
7648
  };
7249
7649
 
@@ -7252,20 +7652,20 @@ var ContextCommand = {
7252
7652
  command: "context <command>",
7253
7653
  aliases: ["ctx"],
7254
7654
  describe: "Uniform Context commands",
7255
- builder: (yargs36) => yargs36.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
7655
+ builder: (yargs38) => yargs38.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
7256
7656
  handler: () => {
7257
- yargs23.showHelp();
7657
+ yargs25.showHelp();
7258
7658
  }
7259
7659
  };
7260
7660
 
7261
7661
  // src/commands/integration/index.ts
7262
- import yargs26 from "yargs";
7662
+ import yargs28 from "yargs";
7263
7663
 
7264
7664
  // src/commands/integration/commands/definition.ts
7265
- import yargs25 from "yargs";
7665
+ import yargs27 from "yargs";
7266
7666
 
7267
7667
  // src/commands/integration/commands/definition/edgehancer/edgehancer.ts
7268
- import yargs24 from "yargs";
7668
+ import yargs26 from "yargs";
7269
7669
 
7270
7670
  // src/commands/integration/commands/definition/edgehancer/deploy.ts
7271
7671
  import { readFileSync } from "fs";
@@ -7303,8 +7703,8 @@ var EdgehancerClient = class extends ApiClient {
7303
7703
  };
7304
7704
 
7305
7705
  // src/commands/integration/commands/definition/edgehancer/util.ts
7306
- function withEdgehancerIdOptions(yargs36) {
7307
- return yargs36.option("connectorType", {
7706
+ function withEdgehancerIdOptions(yargs38) {
7707
+ return yargs38.option("connectorType", {
7308
7708
  describe: "Integration data connector type to edgehance, as defined in the integration manifest file.",
7309
7709
  demandOption: true,
7310
7710
  type: "string"
@@ -7324,11 +7724,11 @@ function withEdgehancerIdOptions(yargs36) {
7324
7724
  var IntegrationEdgehancerDeployModule = {
7325
7725
  command: "deploy <filename>",
7326
7726
  describe: "Deploys a custom edgehancer hook to run when a data resource of a specific archetype is fetched. The API key used must have team admin permissions.",
7327
- builder: (yargs36) => withConfiguration(
7727
+ builder: (yargs38) => withConfiguration(
7328
7728
  withApiOptions(
7329
7729
  withTeamOptions(
7330
7730
  withEdgehancerIdOptions(
7331
- yargs36.positional("filename", {
7731
+ yargs38.positional("filename", {
7332
7732
  demandOption: true,
7333
7733
  describe: "ESM code file to run for the target edgehancer hook. Refer to the documentation for expected types."
7334
7734
  })
@@ -7348,7 +7748,7 @@ var IntegrationEdgehancerDeployModule = {
7348
7748
  var IntegrationEdgehancerRemoveModule = {
7349
7749
  command: "remove",
7350
7750
  describe: "Deletes a custom edgehancer hook from a data connector archetype. The API key used must have team admin permissions.",
7351
- builder: (yargs36) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs36)))),
7751
+ builder: (yargs38) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs38)))),
7352
7752
  handler: async ({ apiHost, apiKey, proxy, team: teamId, archetype, connectorType, hook }) => {
7353
7753
  const fetch3 = nodeFetchProxy(proxy);
7354
7754
  const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch3, teamId });
@@ -7360,9 +7760,9 @@ var IntegrationEdgehancerRemoveModule = {
7360
7760
  var IntegrationEdgehancerModule = {
7361
7761
  command: "edgehancer <command>",
7362
7762
  describe: "Commands for managing custom integration edgehancers at the team level.",
7363
- builder: (yargs36) => yargs36.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
7763
+ builder: (yargs38) => yargs38.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
7364
7764
  handler: () => {
7365
- yargs24.help();
7765
+ yargs26.help();
7366
7766
  }
7367
7767
  };
7368
7768
 
@@ -7402,10 +7802,10 @@ var DefinitionClient = class extends ApiClient2 {
7402
7802
  var IntegrationDefinitionRegisterModule = {
7403
7803
  command: "register <filename>",
7404
7804
  describe: "Registers a custom integration definition on a team. The API key used must have team admin permissions.",
7405
- builder: (yargs36) => withConfiguration(
7805
+ builder: (yargs38) => withConfiguration(
7406
7806
  withApiOptions(
7407
7807
  withTeamOptions(
7408
- yargs36.positional("filename", {
7808
+ yargs38.positional("filename", {
7409
7809
  demandOption: true,
7410
7810
  describe: "Integration definition manifest to register"
7411
7811
  })
@@ -7424,10 +7824,10 @@ var IntegrationDefinitionRegisterModule = {
7424
7824
  var IntegrationDefinitionRemoveModule = {
7425
7825
  command: "remove <type>",
7426
7826
  describe: "Deletes a custom integration definition from a team. This will uninstall it on any active projects. Existing usages of the integration may break. The API key used must have team admin permissions.",
7427
- builder: (yargs36) => withConfiguration(
7827
+ builder: (yargs38) => withConfiguration(
7428
7828
  withApiOptions(
7429
7829
  withTeamOptions(
7430
- yargs36.positional("type", {
7830
+ yargs38.positional("type", {
7431
7831
  demandOption: true,
7432
7832
  describe: "Integration type (from its manifest) to remove."
7433
7833
  })
@@ -7445,9 +7845,9 @@ var IntegrationDefinitionRemoveModule = {
7445
7845
  var IntegrationDefinitionModule = {
7446
7846
  command: "definition <command>",
7447
7847
  describe: "Commands for managing custom integration definitions at the team level.",
7448
- builder: (yargs36) => yargs36.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).demandCommand(),
7848
+ builder: (yargs38) => yargs38.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).demandCommand(),
7449
7849
  handler: () => {
7450
- yargs25.help();
7850
+ yargs27.help();
7451
7851
  }
7452
7852
  };
7453
7853
 
@@ -7487,10 +7887,10 @@ var InstallClient = class extends ApiClient3 {
7487
7887
  var IntegrationInstallModule = {
7488
7888
  command: "install <type>",
7489
7889
  describe: "Installs an integration to a project. The integration may be built-in or custom. Custom integrations must be registered to the parent team first.",
7490
- builder: (yargs36) => withConfiguration(
7890
+ builder: (yargs38) => withConfiguration(
7491
7891
  withApiOptions(
7492
7892
  withProjectOptions(
7493
- yargs36.positional("type", {
7893
+ yargs38.positional("type", {
7494
7894
  demandOption: true,
7495
7895
  describe: "Integration type to install (as defined in its manifest)"
7496
7896
  }).option("configuration", {
@@ -7512,10 +7912,10 @@ var IntegrationInstallModule = {
7512
7912
  var IntegrationUninstallModule = {
7513
7913
  command: "uninstall <type>",
7514
7914
  describe: "Uninstalls an integration from a project. Existing usages of the integration may break.",
7515
- builder: (yargs36) => withConfiguration(
7915
+ builder: (yargs38) => withConfiguration(
7516
7916
  withApiOptions(
7517
7917
  withProjectOptions(
7518
- yargs36.positional("type", {
7918
+ yargs38.positional("type", {
7519
7919
  demandOption: true,
7520
7920
  describe: "Integration type to uninstall (as defined in its manifest)"
7521
7921
  })
@@ -7533,9 +7933,9 @@ var IntegrationUninstallModule = {
7533
7933
  var IntegrationCommand = {
7534
7934
  command: "integration <command>",
7535
7935
  describe: "Integration management commands",
7536
- builder: (yargs36) => yargs36.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
7936
+ builder: (yargs38) => yargs38.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
7537
7937
  handler: () => {
7538
- yargs26.showHelp();
7938
+ yargs28.showHelp();
7539
7939
  }
7540
7940
  };
7541
7941
 
@@ -8579,10 +8979,10 @@ var NewMeshCmd = {
8579
8979
  };
8580
8980
 
8581
8981
  // src/commands/optimize/index.ts
8582
- import yargs28 from "yargs";
8982
+ import yargs30 from "yargs";
8583
8983
 
8584
8984
  // src/commands/optimize/manifest.ts
8585
- import yargs27 from "yargs";
8985
+ import yargs29 from "yargs";
8586
8986
 
8587
8987
  // src/commands/optimize/manifest/download.ts
8588
8988
  import { gray as gray4, green as green3, red as red5, yellow as yellow2 } from "colorette";
@@ -8597,7 +8997,7 @@ var UniformBaseUrl = "https://uniform.app";
8597
8997
  var module = {
8598
8998
  command: "download [output]",
8599
8999
  describe: "Download intent manifest",
8600
- builder: (yargs36) => yargs36.option("apiKey", {
9000
+ builder: (yargs38) => yargs38.option("apiKey", {
8601
9001
  alias: "k",
8602
9002
  demandOption: true,
8603
9003
  string: true,
@@ -8698,10 +9098,10 @@ var module2 = {
8698
9098
  command: "manifest <command>",
8699
9099
  describe: "Intent manifest commands",
8700
9100
  builder: () => {
8701
- return yargs27.command(download_default);
9101
+ return yargs29.command(download_default);
8702
9102
  },
8703
9103
  handler: () => {
8704
- yargs27.showHelp();
9104
+ yargs29.showHelp();
8705
9105
  }
8706
9106
  };
8707
9107
  var manifest_default = module2;
@@ -8712,29 +9112,29 @@ var OptimizeCommand = {
8712
9112
  aliases: ["opt"],
8713
9113
  describe: "Uniform Optimize commands",
8714
9114
  builder: () => {
8715
- return yargs28.command(manifest_default);
9115
+ return yargs30.command(manifest_default);
8716
9116
  },
8717
9117
  handler: () => {
8718
- yargs28.showHelp();
9118
+ yargs30.showHelp();
8719
9119
  }
8720
9120
  };
8721
9121
 
8722
9122
  // src/commands/project-map/index.ts
8723
- import yargs31 from "yargs";
9123
+ import yargs33 from "yargs";
8724
9124
 
8725
9125
  // src/commands/project-map/commands/projectMapDefinition.ts
8726
- import yargs29 from "yargs";
9126
+ import yargs31 from "yargs";
8727
9127
 
8728
9128
  // src/commands/project-map/commands/ProjectMapDefinition/get.ts
8729
9129
  import { UncachedProjectMapClient } from "@uniformdev/project-map";
8730
9130
  var ProjectMapDefinitionGetModule = {
8731
9131
  command: "get <id>",
8732
9132
  describe: "Fetch a project map",
8733
- builder: (yargs36) => withFormatOptions(
9133
+ builder: (yargs38) => withFormatOptions(
8734
9134
  withConfiguration(
8735
9135
  withApiOptions(
8736
9136
  withProjectOptions(
8737
- yargs36.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
9137
+ yargs38.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
8738
9138
  )
8739
9139
  )
8740
9140
  )
@@ -8758,7 +9158,7 @@ var ProjectMapDefinitionListModule = {
8758
9158
  command: "list",
8759
9159
  describe: "List of project maps",
8760
9160
  aliases: ["ls"],
8761
- builder: (yargs36) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs36)))),
9161
+ builder: (yargs38) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs38)))),
8762
9162
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
8763
9163
  const fetch3 = nodeFetchProxy(proxy);
8764
9164
  const client = new UncachedProjectMapClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -8779,8 +9179,8 @@ function writeContextPackage2(filename, packageContents) {
8779
9179
  }
8780
9180
 
8781
9181
  // src/commands/project-map/commands/ProjectMapDefinition/_util.ts
8782
- var selectIdentifier11 = (source) => source.id;
8783
- var selectDisplayName11 = (source) => `${source.name} (pid: ${source.id})`;
9182
+ var selectIdentifier13 = (source) => source.id;
9183
+ var selectDisplayName13 = (source) => `${source.name} (pid: ${source.id})`;
8784
9184
 
8785
9185
  // src/commands/project-map/ProjectMapDefinitionEngineDataSource.ts
8786
9186
  function createProjectMapDefinitionEngineDataSource({
@@ -8790,9 +9190,9 @@ function createProjectMapDefinitionEngineDataSource({
8790
9190
  const projectMaps = (await client.getProjectMapDefinitions()).projectMaps;
8791
9191
  for await (const def of projectMaps) {
8792
9192
  const result = {
8793
- id: selectIdentifier11(def),
8794
- displayName: selectDisplayName11(def),
8795
- providerId: selectIdentifier11(def),
9193
+ id: selectIdentifier13(def),
9194
+ displayName: selectDisplayName13(def),
9195
+ providerId: selectIdentifier13(def),
8796
9196
  object: def
8797
9197
  };
8798
9198
  yield result;
@@ -8816,11 +9216,11 @@ function createProjectMapDefinitionEngineDataSource({
8816
9216
  var ProjectMapDefinitionPullModule = {
8817
9217
  command: "pull <directory>",
8818
9218
  describe: "Pulls all project maps to local files in a directory",
8819
- builder: (yargs36) => withConfiguration(
9219
+ builder: (yargs38) => withConfiguration(
8820
9220
  withApiOptions(
8821
9221
  withProjectOptions(
8822
9222
  withDiffOptions(
8823
- yargs36.positional("directory", {
9223
+ yargs38.positional("directory", {
8824
9224
  describe: "Directory to save project maps to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
8825
9225
  type: "string"
8826
9226
  }).option("format", {
@@ -8867,8 +9267,8 @@ var ProjectMapDefinitionPullModule = {
8867
9267
  target = await createArraySyncEngineDataSource({
8868
9268
  name: `Package file ${directory}`,
8869
9269
  objects: packageContents.projectMaps ?? [],
8870
- selectIdentifier: selectIdentifier11,
8871
- selectDisplayName: selectDisplayName11,
9270
+ selectIdentifier: selectIdentifier13,
9271
+ selectDisplayName: selectDisplayName13,
8872
9272
  onSyncComplete: async (_, synced) => {
8873
9273
  packageContents.projectMaps = synced;
8874
9274
  writeContextPackage2(directory, packageContents);
@@ -8877,8 +9277,8 @@ var ProjectMapDefinitionPullModule = {
8877
9277
  } else {
8878
9278
  target = await createFileSyncEngineDataSource({
8879
9279
  directory,
8880
- selectIdentifier: selectIdentifier11,
8881
- selectDisplayName: selectDisplayName11,
9280
+ selectIdentifier: selectIdentifier13,
9281
+ selectDisplayName: selectDisplayName13,
8882
9282
  format
8883
9283
  });
8884
9284
  }
@@ -8898,11 +9298,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient4 } from "@uniformd
8898
9298
  var ProjectMapDefinitionPushModule = {
8899
9299
  command: "push <directory>",
8900
9300
  describe: "Pushes all project maps from files in a directory or package to Uniform",
8901
- builder: (yargs36) => withConfiguration(
9301
+ builder: (yargs38) => withConfiguration(
8902
9302
  withApiOptions(
8903
9303
  withProjectOptions(
8904
9304
  withDiffOptions(
8905
- yargs36.positional("directory", {
9305
+ yargs38.positional("directory", {
8906
9306
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
8907
9307
  type: "string"
8908
9308
  }).option("what-if", {
@@ -8941,14 +9341,14 @@ var ProjectMapDefinitionPushModule = {
8941
9341
  source = await createArraySyncEngineDataSource({
8942
9342
  name: `Package file ${directory}`,
8943
9343
  objects: packageContents.projectMaps ?? [],
8944
- selectIdentifier: selectIdentifier11,
8945
- selectDisplayName: selectDisplayName11
9344
+ selectIdentifier: selectIdentifier13,
9345
+ selectDisplayName: selectDisplayName13
8946
9346
  });
8947
9347
  } else {
8948
9348
  source = await createFileSyncEngineDataSource({
8949
9349
  directory,
8950
- selectIdentifier: selectIdentifier11,
8951
- selectDisplayName: selectDisplayName11
9350
+ selectIdentifier: selectIdentifier13,
9351
+ selectDisplayName: selectDisplayName13
8952
9352
  });
8953
9353
  }
8954
9354
  const target = createProjectMapDefinitionEngineDataSource({ client });
@@ -8969,9 +9369,9 @@ var ProjectMapDefinitionRemoveModule = {
8969
9369
  command: "remove <id>",
8970
9370
  aliases: ["delete", "rm"],
8971
9371
  describe: "Delete a project map",
8972
- builder: (yargs36) => withConfiguration(
9372
+ builder: (yargs38) => withConfiguration(
8973
9373
  withApiOptions(
8974
- withProjectOptions(yargs36.positional("id", { demandOption: true, describe: " UUID to delete" }))
9374
+ withProjectOptions(yargs38.positional("id", { demandOption: true, describe: " UUID to delete" }))
8975
9375
  )
8976
9376
  ),
8977
9377
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -8987,10 +9387,10 @@ var ProjectMapDefinitionUpdateModule = {
8987
9387
  command: "update <filename>",
8988
9388
  aliases: ["put"],
8989
9389
  describe: "Insert or update a project map",
8990
- builder: (yargs36) => withConfiguration(
9390
+ builder: (yargs38) => withConfiguration(
8991
9391
  withApiOptions(
8992
9392
  withProjectOptions(
8993
- yargs36.positional("filename", { demandOption: true, describe: "Project map file to put" })
9393
+ yargs38.positional("filename", { demandOption: true, describe: "Project map file to put" })
8994
9394
  )
8995
9395
  )
8996
9396
  ),
@@ -9006,25 +9406,25 @@ var ProjectMapDefinitionUpdateModule = {
9006
9406
  var ProjectMapDefinitionModule = {
9007
9407
  command: "definition <command>",
9008
9408
  describe: "Commands for ProjectMap Definitions",
9009
- builder: (yargs36) => yargs36.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
9409
+ builder: (yargs38) => yargs38.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
9010
9410
  handler: () => {
9011
- yargs29.help();
9411
+ yargs31.help();
9012
9412
  }
9013
9413
  };
9014
9414
 
9015
9415
  // src/commands/project-map/commands/projectMapNode.ts
9016
- import yargs30 from "yargs";
9416
+ import yargs32 from "yargs";
9017
9417
 
9018
9418
  // src/commands/project-map/commands/ProjectMapNode/get.ts
9019
9419
  import { UncachedProjectMapClient as UncachedProjectMapClient7 } from "@uniformdev/project-map";
9020
9420
  var ProjectMapNodeGetModule = {
9021
9421
  command: "get <id> <projectMapId>",
9022
9422
  describe: "Fetch a project map node",
9023
- builder: (yargs36) => withConfiguration(
9423
+ builder: (yargs38) => withConfiguration(
9024
9424
  withFormatOptions(
9025
9425
  withApiOptions(
9026
9426
  withProjectOptions(
9027
- yargs36.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
9427
+ yargs38.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
9028
9428
  )
9029
9429
  )
9030
9430
  )
@@ -9049,12 +9449,12 @@ var ProjectMapNodeListModule = {
9049
9449
  command: "list <projectMapId>",
9050
9450
  describe: "List project map nodes",
9051
9451
  aliases: ["ls"],
9052
- builder: (yargs36) => withConfiguration(
9452
+ builder: (yargs38) => withConfiguration(
9053
9453
  withFormatOptions(
9054
9454
  withApiOptions(
9055
9455
  withProjectOptions(
9056
9456
  withStateOptions(
9057
- yargs36.positional("projectMapId", {
9457
+ yargs38.positional("projectMapId", {
9058
9458
  demandOption: true,
9059
9459
  describe: "ProjectMap UUID to fetch from"
9060
9460
  })
@@ -9075,12 +9475,12 @@ var ProjectMapNodeListModule = {
9075
9475
  import { UncachedProjectMapClient as UncachedProjectMapClient9 } from "@uniformdev/project-map";
9076
9476
 
9077
9477
  // src/commands/project-map/commands/ProjectMapNode/_util.ts
9078
- var selectIdentifier12 = (source, projectId) => [
9478
+ var selectIdentifier14 = (source, projectId) => [
9079
9479
  projectId + source.projectMapId + source.id,
9080
9480
  projectId + source.projectMapId + source.path
9081
9481
  ];
9082
9482
  var selectFilename = (source) => cleanFileName(`${source.pathSegment}_${source.id}`);
9083
- var selectDisplayName12 = (source) => `${source.name} (pid: ${source.id})`;
9483
+ var selectDisplayName14 = (source) => `${source.name} (pid: ${source.id})`;
9084
9484
 
9085
9485
  // src/commands/project-map/ProjectMapNodeEngineDataSource.ts
9086
9486
  function createProjectMapNodeEngineDataSource({
@@ -9094,9 +9494,9 @@ function createProjectMapNodeEngineDataSource({
9094
9494
  for await (const node of nodes ?? []) {
9095
9495
  if (node) {
9096
9496
  const result = {
9097
- id: selectIdentifier12({ ...node, projectMapId: projectMap.id }, projectId),
9098
- displayName: selectDisplayName12(node),
9099
- providerId: selectIdentifier12({ ...node, projectMapId: projectMap.id }, projectId)[0],
9497
+ id: selectIdentifier14({ ...node, projectMapId: projectMap.id }, projectId),
9498
+ displayName: selectDisplayName14(node),
9499
+ providerId: selectIdentifier14({ ...node, projectMapId: projectMap.id }, projectId)[0],
9100
9500
  object: { ...node, projectMapId: projectMap.id }
9101
9501
  };
9102
9502
  yield result;
@@ -9127,11 +9527,11 @@ function createProjectMapNodeEngineDataSource({
9127
9527
  var ProjectMapNodePullModule = {
9128
9528
  command: "pull <directory>",
9129
9529
  describe: "Pulls all project maps nodes to local files in a directory",
9130
- builder: (yargs36) => withConfiguration(
9530
+ builder: (yargs38) => withConfiguration(
9131
9531
  withApiOptions(
9132
9532
  withProjectOptions(
9133
9533
  withDiffOptions(
9134
- yargs36.positional("directory", {
9534
+ yargs38.positional("directory", {
9135
9535
  describe: "Directory to save project maps to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
9136
9536
  type: "string"
9137
9537
  }).option("format", {
@@ -9174,7 +9574,7 @@ var ProjectMapNodePullModule = {
9174
9574
  let target;
9175
9575
  const isPackage = isPathAPackageFile(directory);
9176
9576
  const expandedSelectIdentifier = (object) => {
9177
- return selectIdentifier12(object, projectId);
9577
+ return selectIdentifier14(object, projectId);
9178
9578
  };
9179
9579
  if (isPackage) {
9180
9580
  const packageContents = readContextPackage2(directory, false);
@@ -9182,7 +9582,7 @@ var ProjectMapNodePullModule = {
9182
9582
  name: `Package file ${directory}`,
9183
9583
  objects: packageContents.projectMapNodes ?? [],
9184
9584
  selectIdentifier: expandedSelectIdentifier,
9185
- selectDisplayName: selectDisplayName12,
9585
+ selectDisplayName: selectDisplayName14,
9186
9586
  onSyncComplete: async (_, synced) => {
9187
9587
  packageContents.projectMapNodes = synced;
9188
9588
  writeContextPackage2(directory, packageContents);
@@ -9192,7 +9592,7 @@ var ProjectMapNodePullModule = {
9192
9592
  target = await createFileSyncEngineDataSource({
9193
9593
  directory,
9194
9594
  selectIdentifier: expandedSelectIdentifier,
9195
- selectDisplayName: selectDisplayName12,
9595
+ selectDisplayName: selectDisplayName14,
9196
9596
  format,
9197
9597
  selectFilename
9198
9598
  });
@@ -9216,11 +9616,11 @@ import {
9216
9616
  var ProjectMapNodePushModule = {
9217
9617
  command: "push <directory>",
9218
9618
  describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
9219
- builder: (yargs36) => withConfiguration(
9619
+ builder: (yargs38) => withConfiguration(
9220
9620
  withApiOptions(
9221
9621
  withProjectOptions(
9222
9622
  withDiffOptions(
9223
- yargs36.positional("directory", {
9623
+ yargs38.positional("directory", {
9224
9624
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
9225
9625
  type: "string"
9226
9626
  }).option("what-if", {
@@ -9260,7 +9660,7 @@ var ProjectMapNodePushModule = {
9260
9660
  let source;
9261
9661
  const isPackage = isPathAPackageFile(directory);
9262
9662
  const expandedSelectIdentifier = (object) => {
9263
- return selectIdentifier12(object, projectId);
9663
+ return selectIdentifier14(object, projectId);
9264
9664
  };
9265
9665
  if (isPackage) {
9266
9666
  const packageContents = readContextPackage2(directory, true);
@@ -9270,13 +9670,13 @@ var ProjectMapNodePushModule = {
9270
9670
  return a.path.length - b.path.length;
9271
9671
  }) ?? [],
9272
9672
  selectIdentifier: expandedSelectIdentifier,
9273
- selectDisplayName: selectDisplayName12
9673
+ selectDisplayName: selectDisplayName14
9274
9674
  });
9275
9675
  } else {
9276
9676
  source = await createFileSyncEngineDataSource({
9277
9677
  directory,
9278
9678
  selectIdentifier: expandedSelectIdentifier,
9279
- selectDisplayName: selectDisplayName12,
9679
+ selectDisplayName: selectDisplayName14,
9280
9680
  selectFilename
9281
9681
  });
9282
9682
  }
@@ -9307,7 +9707,7 @@ var ProjectMapNodePushModule = {
9307
9707
  name: `Nodes re-push from ${directory}`,
9308
9708
  objects: Array.from(nodesFailedDueToMissingParent),
9309
9709
  selectIdentifier: expandedSelectIdentifier,
9310
- selectDisplayName: selectDisplayName12
9710
+ selectDisplayName: selectDisplayName14
9311
9711
  });
9312
9712
  await attemptSync();
9313
9713
  } else {
@@ -9325,10 +9725,10 @@ var ProjectMapNodeRemoveModule = {
9325
9725
  command: "remove <id> <projectMapId>",
9326
9726
  aliases: ["delete", "rm"],
9327
9727
  describe: "Delete a project map node",
9328
- builder: (yargs36) => withConfiguration(
9728
+ builder: (yargs38) => withConfiguration(
9329
9729
  withApiOptions(
9330
9730
  withProjectOptions(
9331
- yargs36.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
9731
+ yargs38.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
9332
9732
  )
9333
9733
  )
9334
9734
  ),
@@ -9345,10 +9745,10 @@ var ProjectMapNodeUpdateModule = {
9345
9745
  command: "update <filename> <projectMapId>",
9346
9746
  aliases: ["put"],
9347
9747
  describe: "Insert or update a project map node",
9348
- builder: (yargs36) => withConfiguration(
9748
+ builder: (yargs38) => withConfiguration(
9349
9749
  withApiOptions(
9350
9750
  withProjectOptions(
9351
- yargs36.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
9751
+ yargs38.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
9352
9752
  )
9353
9753
  )
9354
9754
  ),
@@ -9364,9 +9764,9 @@ var ProjectMapNodeUpdateModule = {
9364
9764
  var ProjectMapNodeModule = {
9365
9765
  command: "node <command>",
9366
9766
  describe: "Commands for ProjectMap Nodes",
9367
- builder: (yargs36) => yargs36.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
9767
+ builder: (yargs38) => yargs38.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
9368
9768
  handler: () => {
9369
- yargs30.help();
9769
+ yargs32.help();
9370
9770
  }
9371
9771
  };
9372
9772
 
@@ -9375,28 +9775,28 @@ var ProjectMapCommand = {
9375
9775
  command: "project-map <command>",
9376
9776
  aliases: ["prm"],
9377
9777
  describe: "Uniform ProjectMap commands",
9378
- builder: (yargs36) => yargs36.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
9778
+ builder: (yargs38) => yargs38.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
9379
9779
  handler: () => {
9380
- yargs31.showHelp();
9780
+ yargs33.showHelp();
9381
9781
  }
9382
9782
  };
9383
9783
 
9384
9784
  // src/commands/redirect/index.ts
9385
- import yargs33 from "yargs";
9785
+ import yargs35 from "yargs";
9386
9786
 
9387
9787
  // src/commands/redirect/commands/redirect.ts
9388
- import yargs32 from "yargs";
9788
+ import yargs34 from "yargs";
9389
9789
 
9390
9790
  // src/commands/redirect/commands/RedirectDefinition/get.ts
9391
9791
  import { UncachedRedirectClient } from "@uniformdev/redirect";
9392
9792
  var RedirectDefinitionGetModule = {
9393
9793
  command: "get <id>",
9394
9794
  describe: "Fetch a redirect",
9395
- builder: (yargs36) => withConfiguration(
9795
+ builder: (yargs38) => withConfiguration(
9396
9796
  withFormatOptions(
9397
9797
  withApiOptions(
9398
9798
  withProjectOptions(
9399
- yargs36.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
9799
+ yargs38.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
9400
9800
  )
9401
9801
  )
9402
9802
  )
@@ -9420,7 +9820,7 @@ var RedirectDefinitionListModule = {
9420
9820
  command: "list",
9421
9821
  describe: "List of redirects",
9422
9822
  aliases: ["ls"],
9423
- builder: (yargs36) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs36)))),
9823
+ builder: (yargs38) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs38)))),
9424
9824
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
9425
9825
  const fetch3 = nodeFetchProxy(proxy);
9426
9826
  const client = new UncachedRedirectClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -9441,12 +9841,12 @@ function writeContextPackage3(filename, packageContents) {
9441
9841
  }
9442
9842
 
9443
9843
  // src/commands/redirect/commands/RedirectDefinition/_util.ts
9444
- var selectIdentifier13 = (source) => source.id;
9844
+ var selectIdentifier15 = (source) => source.id;
9445
9845
  var selectFilename2 = (source) => {
9446
9846
  const index = source.sourceUrl.lastIndexOf("/");
9447
9847
  return cleanFileName(source.sourceUrl.substring(index + 1)) + `_${source.id}`;
9448
9848
  };
9449
- var selectDisplayName13 = (source) => {
9849
+ var selectDisplayName15 = (source) => {
9450
9850
  let pathName = source.sourceUrl;
9451
9851
  if (pathName.length > 30) {
9452
9852
  const slashIndex = source.sourceUrl.indexOf("/", source.sourceUrl.length - 30);
@@ -9463,9 +9863,9 @@ function createRedirectDefinitionEngineDataSource({
9463
9863
  const redirects = client.getAllRedirects();
9464
9864
  for await (const redirect of redirects) {
9465
9865
  const result = {
9466
- id: selectIdentifier13(redirect.redirect),
9467
- displayName: selectDisplayName13(redirect.redirect),
9468
- providerId: selectIdentifier13(redirect.redirect),
9866
+ id: selectIdentifier15(redirect.redirect),
9867
+ displayName: selectDisplayName15(redirect.redirect),
9868
+ providerId: selectIdentifier15(redirect.redirect),
9469
9869
  object: redirect.redirect
9470
9870
  };
9471
9871
  yield result;
@@ -9487,11 +9887,11 @@ function createRedirectDefinitionEngineDataSource({
9487
9887
  var RedirectDefinitionPullModule = {
9488
9888
  command: "pull <directory>",
9489
9889
  describe: "Pulls all redirects to local files in a directory",
9490
- builder: (yargs36) => withConfiguration(
9890
+ builder: (yargs38) => withConfiguration(
9491
9891
  withApiOptions(
9492
9892
  withProjectOptions(
9493
9893
  withDiffOptions(
9494
- yargs36.positional("directory", {
9894
+ yargs38.positional("directory", {
9495
9895
  describe: "Directory to save redirects to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
9496
9896
  type: "string"
9497
9897
  }).option("format", {
@@ -9538,8 +9938,8 @@ var RedirectDefinitionPullModule = {
9538
9938
  target = await createArraySyncEngineDataSource({
9539
9939
  name: `Package file ${directory}`,
9540
9940
  objects: packageContents.redirects ?? [],
9541
- selectIdentifier: selectIdentifier13,
9542
- selectDisplayName: selectDisplayName13,
9941
+ selectIdentifier: selectIdentifier15,
9942
+ selectDisplayName: selectDisplayName15,
9543
9943
  onSyncComplete: async (_, synced) => {
9544
9944
  packageContents.redirects = synced;
9545
9945
  writeContextPackage3(directory, packageContents);
@@ -9549,8 +9949,8 @@ var RedirectDefinitionPullModule = {
9549
9949
  target = await createFileSyncEngineDataSource({
9550
9950
  directory,
9551
9951
  selectFilename: selectFilename2,
9552
- selectIdentifier: selectIdentifier13,
9553
- selectDisplayName: selectDisplayName13,
9952
+ selectIdentifier: selectIdentifier15,
9953
+ selectDisplayName: selectDisplayName15,
9554
9954
  format
9555
9955
  });
9556
9956
  }
@@ -9570,11 +9970,11 @@ import { UncachedRedirectClient as UncachedRedirectClient4 } from "@uniformdev/r
9570
9970
  var RedirectDefinitionPushModule = {
9571
9971
  command: "push <directory>",
9572
9972
  describe: "Pushes all redirects from files in a directory or package to Uniform",
9573
- builder: (yargs36) => withConfiguration(
9973
+ builder: (yargs38) => withConfiguration(
9574
9974
  withApiOptions(
9575
9975
  withProjectOptions(
9576
9976
  withDiffOptions(
9577
- yargs36.positional("directory", {
9977
+ yargs38.positional("directory", {
9578
9978
  describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
9579
9979
  type: "string"
9580
9980
  }).option("what-if", {
@@ -9613,14 +10013,14 @@ var RedirectDefinitionPushModule = {
9613
10013
  source = await createArraySyncEngineDataSource({
9614
10014
  name: `Package file ${directory}`,
9615
10015
  objects: packageContents.redirects ?? [],
9616
- selectIdentifier: selectIdentifier13,
9617
- selectDisplayName: selectDisplayName13
10016
+ selectIdentifier: selectIdentifier15,
10017
+ selectDisplayName: selectDisplayName15
9618
10018
  });
9619
10019
  } else {
9620
10020
  source = await createFileSyncEngineDataSource({
9621
10021
  directory,
9622
- selectIdentifier: selectIdentifier13,
9623
- selectDisplayName: selectDisplayName13
10022
+ selectIdentifier: selectIdentifier15,
10023
+ selectDisplayName: selectDisplayName15
9624
10024
  });
9625
10025
  }
9626
10026
  const target = createRedirectDefinitionEngineDataSource({ client });
@@ -9641,9 +10041,9 @@ var RedirectDefinitionRemoveModule = {
9641
10041
  command: "remove <id>",
9642
10042
  aliases: ["delete", "rm"],
9643
10043
  describe: "Delete a redirect",
9644
- builder: (yargs36) => withConfiguration(
10044
+ builder: (yargs38) => withConfiguration(
9645
10045
  withApiOptions(
9646
- withProjectOptions(yargs36.positional("id", { demandOption: true, describe: " UUID to delete" }))
10046
+ withProjectOptions(yargs38.positional("id", { demandOption: true, describe: " UUID to delete" }))
9647
10047
  )
9648
10048
  ),
9649
10049
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -9659,10 +10059,10 @@ var RedirectDefinitionUpdateModule = {
9659
10059
  command: "update <filename>",
9660
10060
  aliases: ["put"],
9661
10061
  describe: "Insert or update a redirect",
9662
- builder: (yargs36) => withConfiguration(
10062
+ builder: (yargs38) => withConfiguration(
9663
10063
  withApiOptions(
9664
10064
  withProjectOptions(
9665
- yargs36.positional("filename", { demandOption: true, describe: "Redirect file to put" })
10065
+ yargs38.positional("filename", { demandOption: true, describe: "Redirect file to put" })
9666
10066
  )
9667
10067
  )
9668
10068
  ),
@@ -9678,9 +10078,9 @@ var RedirectDefinitionUpdateModule = {
9678
10078
  var RedirectDefinitionModule = {
9679
10079
  command: "definition <command>",
9680
10080
  describe: "Commands for Redirect Definitions",
9681
- builder: (yargs36) => yargs36.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
10081
+ builder: (yargs38) => yargs38.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
9682
10082
  handler: () => {
9683
- yargs32.help();
10083
+ yargs34.help();
9684
10084
  }
9685
10085
  };
9686
10086
 
@@ -9689,14 +10089,14 @@ var RedirectCommand = {
9689
10089
  command: "redirect <command>",
9690
10090
  aliases: ["red"],
9691
10091
  describe: "Uniform Redirect commands",
9692
- builder: (yargs36) => yargs36.command(RedirectDefinitionModule).demandCommand(),
10092
+ builder: (yargs38) => yargs38.command(RedirectDefinitionModule).demandCommand(),
9693
10093
  handler: () => {
9694
- yargs33.showHelp();
10094
+ yargs35.showHelp();
9695
10095
  }
9696
10096
  };
9697
10097
 
9698
10098
  // src/commands/sync/index.ts
9699
- import yargs34 from "yargs";
10099
+ import yargs36 from "yargs";
9700
10100
 
9701
10101
  // src/commands/sync/commands/util.ts
9702
10102
  import ora2 from "ora";
@@ -9756,12 +10156,12 @@ function patchConsole(fn, ora3, replay = []) {
9756
10156
  var SyncPullModule = {
9757
10157
  command: "pull",
9758
10158
  describe: "Pulls whole project to local files in a directory",
9759
- builder: (yargs36) => withConfiguration(
10159
+ builder: (yargs38) => withConfiguration(
9760
10160
  withApiOptions(
9761
10161
  withProjectOptions(
9762
10162
  withDebugOptions(
9763
10163
  withDiffOptions(
9764
- yargs36.option("what-if", {
10164
+ yargs38.option("what-if", {
9765
10165
  alias: ["w"],
9766
10166
  describe: "What-if mode reports what would be done but changes no files",
9767
10167
  default: false,
@@ -9796,7 +10196,9 @@ var SyncPullModule = {
9796
10196
  redirect: RedirectDefinitionPullModule,
9797
10197
  entry: EntryPullModule,
9798
10198
  entryPattern: EntryPatternPullModule,
9799
- contentType: ContentTypePullModule
10199
+ contentType: ContentTypePullModule,
10200
+ previewUrl: PreviewUrlPullModule,
10201
+ previewViewport: PreviewViewportPullModule
9800
10202
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9801
10203
  }).filter(([entityType]) => {
9802
10204
  return Boolean(config2.entitiesConfig?.[entityType]) && config2.entitiesConfig?.[entityType]?.disabled !== true && config2.entitiesConfig?.[entityType]?.pull?.disabled !== true;
@@ -9868,7 +10270,7 @@ var getFormat = (entityType, config2) => {
9868
10270
  var SyncPushModule = {
9869
10271
  command: "push",
9870
10272
  describe: "Pushes whole project data from files in a directory or package to Uniform",
9871
- builder: (yargs36) => withConfiguration(withApiOptions(withProjectOptions(withDiffOptions(withDebugOptions(yargs36))))),
10273
+ builder: (yargs38) => withConfiguration(withApiOptions(withProjectOptions(withDiffOptions(withDebugOptions(yargs38))))),
9872
10274
  handler: async ({ serialization, ...otherParams }) => {
9873
10275
  const config2 = serialization;
9874
10276
  const enabledEntities = Object.entries({
@@ -9893,7 +10295,9 @@ var SyncPushModule = {
9893
10295
  redirect: RedirectDefinitionPushModule,
9894
10296
  contentType: ContentTypePushModule,
9895
10297
  entry: EntryPushModule,
9896
- entryPattern: EntryPatternPushModule
10298
+ entryPattern: EntryPatternPushModule,
10299
+ previewUrl: PreviewUrlPushModule,
10300
+ previewViewport: PreviewViewportPushModule
9897
10301
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9898
10302
  }).filter(([entityType]) => {
9899
10303
  return Boolean(config2.entitiesConfig?.[entityType]) && config2.entitiesConfig?.[entityType]?.disabled !== true && config2.entitiesConfig?.[entityType]?.push?.disabled !== true;
@@ -9976,9 +10380,9 @@ var getFormat2 = (entityType, config2) => {
9976
10380
  var SyncCommand = {
9977
10381
  command: "sync <command>",
9978
10382
  describe: "Uniform Sync commands",
9979
- builder: (yargs36) => yargs36.command(SyncPullModule).command(SyncPushModule).demandCommand(),
10383
+ builder: (yargs38) => yargs38.command(SyncPullModule).command(SyncPushModule).demandCommand(),
9980
10384
  handler: () => {
9981
- yargs34.showHelp();
10385
+ yargs36.showHelp();
9982
10386
  }
9983
10387
  };
9984
10388
 
@@ -10250,7 +10654,7 @@ First found was: v${firstVersion}`;
10250
10654
 
10251
10655
  // src/index.ts
10252
10656
  dotenv.config();
10253
- var yarggery = yargs35(hideBin(process.argv));
10657
+ var yarggery = yargs37(hideBin(process.argv));
10254
10658
  var inlineConfigurationFilePath = "config" in yarggery.argv && yarggery.argv.config;
10255
10659
  var configuration = loadConfig(inlineConfigurationFilePath || null);
10256
10660
  yarggery.option("verbose", {