@uniformdev/cli 19.96.0 → 19.96.1-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +669 -299
  2. package/package.json +8 -8
package/dist/index.mjs CHANGED
@@ -16,11 +16,11 @@ var __dirname = /* @__PURE__ */ getDirname();
16
16
 
17
17
  // src/index.ts
18
18
  import * as dotenv from "dotenv";
19
- import yargs27 from "yargs";
19
+ import yargs31 from "yargs";
20
20
  import { hideBin } from "yargs/helpers";
21
21
 
22
22
  // src/commands/canvas/index.ts
23
- import yargs11 from "yargs";
23
+ import yargs12 from "yargs";
24
24
 
25
25
  // src/commands/canvas/commands/asset.ts
26
26
  import yargs from "yargs";
@@ -137,14 +137,14 @@ import httpsProxyAgent from "https-proxy-agent";
137
137
  import unfetch from "isomorphic-unfetch";
138
138
  import { dump, load } from "js-yaml";
139
139
  import { dirname, extname, isAbsolute, resolve, sep } from "path";
140
- function withConfiguration(yargs28) {
141
- return yargs28.option("serialization", {
140
+ function withConfiguration(yargs32) {
141
+ return yargs32.option("serialization", {
142
142
  skipValidation: true,
143
143
  hidden: true
144
144
  });
145
145
  }
146
- function withApiOptions(yargs28) {
147
- return yargs28.option("apiKey", {
146
+ function withApiOptions(yargs32) {
147
+ return yargs32.option("apiKey", {
148
148
  describe: "Uniform API key. Defaults to UNIFORM_CLI_API_KEY or UNIFORM_API_KEY env. Supports dotenv.",
149
149
  default: process.env.UNIFORM_CLI_API_KEY ?? // deprecated
150
150
  process.env.CANVAS_CLI_API_KEY ?? // deprecated
@@ -183,8 +183,8 @@ function nodeFetchProxy(proxy) {
183
183
  };
184
184
  return wrappedFetch;
185
185
  }
186
- function withProjectOptions(yargs28) {
187
- return yargs28.option("project", {
186
+ function withProjectOptions(yargs32) {
187
+ return yargs32.option("project", {
188
188
  describe: "Uniform project ID. Defaults to UNIFORM_CLI_PROJECT_ID or UNIFORM_PROJECT_ID env. Supports dotenv.",
189
189
  default: process.env.UNIFORM_CLI_PROJECT_ID ?? // deprecated
190
190
  process.env.CANVAS_CLI_PROJECT_ID ?? // deprecated
@@ -194,8 +194,17 @@ function withProjectOptions(yargs28) {
194
194
  alias: ["p"]
195
195
  });
196
196
  }
197
- function withFormatOptions(yargs28) {
198
- return yargs28.option("format", {
197
+ function withTeamOptions(yargs32) {
198
+ return yargs32.option("team", {
199
+ describe: "Uniform team ID. Defaults to UNIFORM_CLI_TEAM_ID or UNIFORM_TEAM_ID env. Supports dotenv.",
200
+ default: process.env.UNIFORM_CLI_TEAM_ID ?? process.env.UNIFORM_TEAM_ID,
201
+ demandOption: true,
202
+ type: "string",
203
+ alias: ["p"]
204
+ });
205
+ }
206
+ function withFormatOptions(yargs32) {
207
+ return yargs32.option("format", {
199
208
  alias: ["f"],
200
209
  describe: "Output format",
201
210
  default: "yaml",
@@ -207,8 +216,8 @@ function withFormatOptions(yargs28) {
207
216
  type: "string"
208
217
  });
209
218
  }
210
- function withDiffOptions(yargs28) {
211
- return yargs28.option("diff", {
219
+ function withDiffOptions(yargs32) {
220
+ return yargs32.option("diff", {
212
221
  describe: "Whether to show diffs in stdout. off = no diffs; update = on for updates; on = updates, creates, deletes. Can be set by UNIFORM_CLI_DIFF_MODE environment variable.",
213
222
  default: process.env.UNIFORM_CLI_DIFF_MODE ?? "off",
214
223
  type: "string",
@@ -633,12 +642,12 @@ function createPublishStatusSyncEngineConsoleLogger(options) {
633
642
  var AssetGetModule = {
634
643
  command: "get <id>",
635
644
  describe: "Get an asset",
636
- builder: (yargs28) => withConfiguration(
645
+ builder: (yargs32) => withConfiguration(
637
646
  withFormatOptions(
638
647
  withApiOptions(
639
648
  withProjectOptions(
640
649
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
641
- yargs28.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
650
+ yargs32.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
642
651
  )
643
652
  )
644
653
  )
@@ -659,7 +668,7 @@ import { UncachedAssetClient as UncachedAssetClient2 } from "@uniformdev/assets"
659
668
  var AssetListModule = {
660
669
  command: "list",
661
670
  describe: "List assets",
662
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
671
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
663
672
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
664
673
  const fetch3 = nodeFetchProxy(proxy);
665
674
  const client = new UncachedAssetClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -1011,8 +1020,8 @@ function prepCompositionForDisk(composition) {
1011
1020
  delete prepped.state;
1012
1021
  return prepped;
1013
1022
  }
1014
- function withStateOptions(yargs28) {
1015
- return yargs28.option("state", {
1023
+ function withStateOptions(yargs32) {
1024
+ return yargs32.option("state", {
1016
1025
  type: "string",
1017
1026
  describe: `Composition state to fetch.`,
1018
1027
  choices: ["preview", "published"],
@@ -1078,11 +1087,11 @@ function writeCanvasPackage(filename, packageContents) {
1078
1087
  var AssetPullModule = {
1079
1088
  command: "pull <directory>",
1080
1089
  describe: "Pulls all assets to local files in a directory",
1081
- builder: (yargs28) => withConfiguration(
1090
+ builder: (yargs32) => withConfiguration(
1082
1091
  withApiOptions(
1083
1092
  withProjectOptions(
1084
1093
  withDiffOptions(
1085
- yargs28.positional("directory", {
1094
+ yargs32.positional("directory", {
1086
1095
  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.",
1087
1096
  type: "string"
1088
1097
  }).option("format", {
@@ -1201,11 +1210,11 @@ import { UncachedFileClient as UncachedFileClient2 } from "@uniformdev/files";
1201
1210
  var AssetPushModule = {
1202
1211
  command: "push <directory>",
1203
1212
  describe: "Pushes all assets from files in a directory to Uniform",
1204
- builder: (yargs28) => withConfiguration(
1213
+ builder: (yargs32) => withConfiguration(
1205
1214
  withApiOptions(
1206
1215
  withProjectOptions(
1207
1216
  withDiffOptions(
1208
- yargs28.positional("directory", {
1217
+ yargs32.positional("directory", {
1209
1218
  describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
1210
1219
  type: "string"
1211
1220
  }).option("what-if", {
@@ -1305,9 +1314,9 @@ var AssetRemoveModule = {
1305
1314
  command: "remove <id>",
1306
1315
  aliases: ["delete", "rm"],
1307
1316
  describe: "Delete an asset",
1308
- builder: (yargs28) => withConfiguration(
1317
+ builder: (yargs32) => withConfiguration(
1309
1318
  withApiOptions(
1310
- withProjectOptions(yargs28.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
1319
+ withProjectOptions(yargs32.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
1311
1320
  )
1312
1321
  ),
1313
1322
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -1323,10 +1332,10 @@ var AssetUpdateModule = {
1323
1332
  command: "update <filename>",
1324
1333
  aliases: ["put"],
1325
1334
  describe: "Insert or update an asset",
1326
- builder: (yargs28) => withConfiguration(
1335
+ builder: (yargs32) => withConfiguration(
1327
1336
  withApiOptions(
1328
1337
  withProjectOptions(
1329
- yargs28.positional("filename", { demandOption: true, describe: "Asset file to put" })
1338
+ yargs32.positional("filename", { demandOption: true, describe: "Asset file to put" })
1330
1339
  )
1331
1340
  )
1332
1341
  ),
@@ -1342,7 +1351,7 @@ var AssetUpdateModule = {
1342
1351
  var AssetModule = {
1343
1352
  command: "asset <command>",
1344
1353
  describe: "Commands for Assets",
1345
- builder: (yargs28) => yargs28.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
1354
+ builder: (yargs32) => yargs32.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
1346
1355
  handler: () => {
1347
1356
  yargs.help();
1348
1357
  }
@@ -1356,11 +1365,11 @@ import { UncachedCategoryClient } from "@uniformdev/canvas";
1356
1365
  var CategoryGetModule = {
1357
1366
  command: "get <id>",
1358
1367
  describe: "Fetch a category",
1359
- builder: (yargs28) => withConfiguration(
1368
+ builder: (yargs32) => withConfiguration(
1360
1369
  withFormatOptions(
1361
1370
  withApiOptions(
1362
1371
  withProjectOptions(
1363
- yargs28.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
1372
+ yargs32.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
1364
1373
  )
1365
1374
  )
1366
1375
  )
@@ -1385,7 +1394,7 @@ var CategoryListModule = {
1385
1394
  command: "list",
1386
1395
  describe: "List categories",
1387
1396
  aliases: ["ls"],
1388
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28.options({}))))),
1397
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32.options({}))))),
1389
1398
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
1390
1399
  const fetch3 = nodeFetchProxy(proxy);
1391
1400
  const client = new UncachedCategoryClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -1434,11 +1443,11 @@ function createCategoriesEngineDataSource({
1434
1443
  var CategoryPullModule = {
1435
1444
  command: "pull <directory>",
1436
1445
  describe: "Pulls all categories to local files in a directory",
1437
- builder: (yargs28) => withConfiguration(
1446
+ builder: (yargs32) => withConfiguration(
1438
1447
  withApiOptions(
1439
1448
  withProjectOptions(
1440
1449
  withDiffOptions(
1441
- yargs28.positional("directory", {
1450
+ yargs32.positional("directory", {
1442
1451
  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.",
1443
1452
  type: "string"
1444
1453
  }).option("format", {
@@ -1515,11 +1524,11 @@ import { UncachedCategoryClient as UncachedCategoryClient4 } from "@uniformdev/c
1515
1524
  var CategoryPushModule = {
1516
1525
  command: "push <directory>",
1517
1526
  describe: "Pushes all categories from files in a directory to Uniform Canvas",
1518
- builder: (yargs28) => withConfiguration(
1527
+ builder: (yargs32) => withConfiguration(
1519
1528
  withApiOptions(
1520
1529
  withProjectOptions(
1521
1530
  withDiffOptions(
1522
- yargs28.positional("directory", {
1531
+ yargs32.positional("directory", {
1523
1532
  describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
1524
1533
  type: "string"
1525
1534
  }).option("what-if", {
@@ -1585,10 +1594,10 @@ var CategoryRemoveModule = {
1585
1594
  command: "remove <id>",
1586
1595
  aliases: ["delete", "rm"],
1587
1596
  describe: "Delete a category",
1588
- builder: (yargs28) => withConfiguration(
1597
+ builder: (yargs32) => withConfiguration(
1589
1598
  withApiOptions(
1590
1599
  withProjectOptions(
1591
- yargs28.positional("id", { demandOption: true, describe: "Category UUID to delete" })
1600
+ yargs32.positional("id", { demandOption: true, describe: "Category UUID to delete" })
1592
1601
  )
1593
1602
  )
1594
1603
  ),
@@ -1605,10 +1614,10 @@ var CategoryUpdateModule = {
1605
1614
  command: "update <filename>",
1606
1615
  aliases: ["put"],
1607
1616
  describe: "Insert or update a category",
1608
- builder: (yargs28) => withConfiguration(
1617
+ builder: (yargs32) => withConfiguration(
1609
1618
  withApiOptions(
1610
1619
  withProjectOptions(
1611
- yargs28.positional("filename", { demandOption: true, describe: "Category file to put" })
1620
+ yargs32.positional("filename", { demandOption: true, describe: "Category file to put" })
1612
1621
  )
1613
1622
  )
1614
1623
  ),
@@ -1625,7 +1634,7 @@ var CategoryModule = {
1625
1634
  command: "category <command>",
1626
1635
  aliases: ["cat"],
1627
1636
  describe: "Commands for Canvas categories",
1628
- builder: (yargs28) => yargs28.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
1637
+ builder: (yargs32) => yargs32.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
1629
1638
  handler: () => {
1630
1639
  yargs2.help();
1631
1640
  }
@@ -1646,11 +1655,11 @@ var selectSchemaUrl = () => "/schemas/json-schema/component-definition/v1.json";
1646
1655
  var ComponentGetModule = {
1647
1656
  command: "get <id>",
1648
1657
  describe: "Fetch a component definition",
1649
- builder: (yargs28) => withConfiguration(
1658
+ builder: (yargs32) => withConfiguration(
1650
1659
  withFormatOptions(
1651
1660
  withApiOptions(
1652
1661
  withProjectOptions(
1653
- yargs28.positional("id", {
1662
+ yargs32.positional("id", {
1654
1663
  demandOption: true,
1655
1664
  describe: "Component definition public ID to fetch"
1656
1665
  })
@@ -1684,11 +1693,11 @@ var ComponentListModule = {
1684
1693
  command: "list",
1685
1694
  describe: "List component definitions",
1686
1695
  aliases: ["ls"],
1687
- builder: (yargs28) => withConfiguration(
1696
+ builder: (yargs32) => withConfiguration(
1688
1697
  withFormatOptions(
1689
1698
  withApiOptions(
1690
1699
  withProjectOptions(
1691
- yargs28.options({
1700
+ yargs32.options({
1692
1701
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
1693
1702
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
1694
1703
  })
@@ -1743,11 +1752,11 @@ function createComponentDefinitionEngineDataSource({
1743
1752
  var ComponentPullModule = {
1744
1753
  command: "pull <directory>",
1745
1754
  describe: "Pulls all component definitions to local files in a directory",
1746
- builder: (yargs28) => withConfiguration(
1755
+ builder: (yargs32) => withConfiguration(
1747
1756
  withApiOptions(
1748
1757
  withProjectOptions(
1749
1758
  withDiffOptions(
1750
- yargs28.positional("directory", {
1759
+ yargs32.positional("directory", {
1751
1760
  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.",
1752
1761
  type: "string"
1753
1762
  }).option("format", {
@@ -1825,11 +1834,11 @@ import { UncachedCanvasClient as UncachedCanvasClient4 } from "@uniformdev/canva
1825
1834
  var ComponentPushModule = {
1826
1835
  command: "push <directory>",
1827
1836
  describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
1828
- builder: (yargs28) => withConfiguration(
1837
+ builder: (yargs32) => withConfiguration(
1829
1838
  withApiOptions(
1830
1839
  withProjectOptions(
1831
1840
  withDiffOptions(
1832
- yargs28.positional("directory", {
1841
+ yargs32.positional("directory", {
1833
1842
  describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
1834
1843
  type: "string"
1835
1844
  }).option("what-if", {
@@ -1896,10 +1905,10 @@ var ComponentRemoveModule = {
1896
1905
  command: "remove <id>",
1897
1906
  aliases: ["delete", "rm"],
1898
1907
  describe: "Delete a component definition",
1899
- builder: (yargs28) => withConfiguration(
1908
+ builder: (yargs32) => withConfiguration(
1900
1909
  withApiOptions(
1901
1910
  withProjectOptions(
1902
- yargs28.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1911
+ yargs32.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1903
1912
  )
1904
1913
  )
1905
1914
  ),
@@ -1916,10 +1925,10 @@ var ComponentUpdateModule = {
1916
1925
  command: "update <filename>",
1917
1926
  aliases: ["put"],
1918
1927
  describe: "Insert or update a component definition",
1919
- builder: (yargs28) => withConfiguration(
1928
+ builder: (yargs32) => withConfiguration(
1920
1929
  withApiOptions(
1921
1930
  withProjectOptions(
1922
- yargs28.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1931
+ yargs32.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1923
1932
  )
1924
1933
  )
1925
1934
  ),
@@ -1936,7 +1945,7 @@ var ComponentModule = {
1936
1945
  command: "component <command>",
1937
1946
  aliases: ["def"],
1938
1947
  describe: "Commands for Canvas component definitions",
1939
- builder: (yargs28) => yargs28.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
1948
+ builder: (yargs32) => yargs32.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
1940
1949
  handler: () => {
1941
1950
  yargs3.help();
1942
1951
  }
@@ -1950,12 +1959,12 @@ import { UncachedCanvasClient as UncachedCanvasClient7 } from "@uniformdev/canva
1950
1959
  var CompositionGetModule = {
1951
1960
  command: "get <id>",
1952
1961
  describe: "Fetch a composition",
1953
- builder: (yargs28) => withFormatOptions(
1962
+ builder: (yargs32) => withFormatOptions(
1954
1963
  withConfiguration(
1955
1964
  withApiOptions(
1956
1965
  withProjectOptions(
1957
1966
  withStateOptions(
1958
- yargs28.positional("id", { demandOption: true, describe: "Composition/pattern public ID to fetch" }).option({
1967
+ yargs32.positional("id", { demandOption: true, describe: "Composition/pattern public ID to fetch" }).option({
1959
1968
  resolvePatterns: {
1960
1969
  type: "boolean",
1961
1970
  default: false,
@@ -2026,12 +2035,12 @@ var CompositionListModule = {
2026
2035
  command: "list",
2027
2036
  describe: "List compositions",
2028
2037
  aliases: ["ls"],
2029
- builder: (yargs28) => withFormatOptions(
2038
+ builder: (yargs32) => withFormatOptions(
2030
2039
  withConfiguration(
2031
2040
  withApiOptions(
2032
2041
  withProjectOptions(
2033
2042
  withStateOptions(
2034
- yargs28.options({
2043
+ yargs32.options({
2035
2044
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
2036
2045
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
2037
2046
  resolvePatterns: {
@@ -2152,11 +2161,11 @@ function createComponentInstanceEngineDataSource({
2152
2161
  var CompositionPublishModule = {
2153
2162
  command: "publish [ids]",
2154
2163
  describe: "Publishes composition(s)",
2155
- builder: (yargs28) => withConfiguration(
2164
+ builder: (yargs32) => withConfiguration(
2156
2165
  withApiOptions(
2157
2166
  withProjectOptions(
2158
2167
  withDiffOptions(
2159
- yargs28.positional("ids", {
2168
+ yargs32.positional("ids", {
2160
2169
  describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
2161
2170
  type: "string"
2162
2171
  }).option("all", {
@@ -2232,12 +2241,12 @@ import { UncachedFileClient as UncachedFileClient3 } from "@uniformdev/files";
2232
2241
  var CompositionPullModule = {
2233
2242
  command: "pull <directory>",
2234
2243
  describe: "Pulls all compositions to local files in a directory",
2235
- builder: (yargs28) => withConfiguration(
2244
+ builder: (yargs32) => withConfiguration(
2236
2245
  withApiOptions(
2237
2246
  withProjectOptions(
2238
2247
  withStateOptions(
2239
2248
  withDiffOptions(
2240
- yargs28.positional("directory", {
2249
+ yargs32.positional("directory", {
2241
2250
  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.",
2242
2251
  type: "string"
2243
2252
  }).option("format", {
@@ -2341,12 +2350,12 @@ import { UncachedFileClient as UncachedFileClient4 } from "@uniformdev/files";
2341
2350
  var CompositionPushModule = {
2342
2351
  command: "push <directory>",
2343
2352
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
2344
- builder: (yargs28) => withConfiguration(
2353
+ builder: (yargs32) => withConfiguration(
2345
2354
  withApiOptions(
2346
2355
  withProjectOptions(
2347
2356
  withStateOptions(
2348
2357
  withDiffOptions(
2349
- yargs28.positional("directory", {
2358
+ yargs32.positional("directory", {
2350
2359
  describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
2351
2360
  type: "string"
2352
2361
  }).option("what-if", {
@@ -2437,10 +2446,10 @@ var CompositionRemoveModule = {
2437
2446
  command: "remove <id>",
2438
2447
  aliases: ["delete", "rm"],
2439
2448
  describe: "Delete a composition",
2440
- builder: (yargs28) => withConfiguration(
2449
+ builder: (yargs32) => withConfiguration(
2441
2450
  withApiOptions(
2442
2451
  withProjectOptions(
2443
- yargs28.positional("id", { demandOption: true, describe: "Composition/pattern public ID to delete" })
2452
+ yargs32.positional("id", { demandOption: true, describe: "Composition/pattern public ID to delete" })
2444
2453
  )
2445
2454
  )
2446
2455
  ),
@@ -2457,10 +2466,10 @@ import { diffJson as diffJson2 } from "diff";
2457
2466
  var CompositionUnpublishModule = {
2458
2467
  command: "unpublish [ids]",
2459
2468
  describe: "Unpublish a composition(s)",
2460
- builder: (yargs28) => withConfiguration(
2469
+ builder: (yargs32) => withConfiguration(
2461
2470
  withApiOptions(
2462
2471
  withProjectOptions(
2463
- yargs28.positional("ids", {
2472
+ yargs32.positional("ids", {
2464
2473
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
2465
2474
  type: "string"
2466
2475
  }).option("all", {
@@ -2554,11 +2563,11 @@ var CompositionUpdateModule = {
2554
2563
  command: "update <filename>",
2555
2564
  aliases: ["put"],
2556
2565
  describe: "Insert or update a composition",
2557
- builder: (yargs28) => withConfiguration(
2566
+ builder: (yargs32) => withConfiguration(
2558
2567
  withApiOptions(
2559
2568
  withProjectOptions(
2560
2569
  withStateOptions(
2561
- yargs28.positional("filename", { demandOption: true, describe: "Composition/pattern file to put" })
2570
+ yargs32.positional("filename", { demandOption: true, describe: "Composition/pattern file to put" })
2562
2571
  )
2563
2572
  )
2564
2573
  )
@@ -2576,7 +2585,7 @@ var CompositionModule = {
2576
2585
  command: "composition <command>",
2577
2586
  describe: "Commands for Canvas compositions",
2578
2587
  aliases: ["comp"],
2579
- builder: (yargs28) => yargs28.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
2588
+ builder: (yargs32) => yargs32.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
2580
2589
  handler: () => {
2581
2590
  yargs4.help();
2582
2591
  }
@@ -2590,12 +2599,12 @@ import { ContentClient } from "@uniformdev/canvas";
2590
2599
  var ContentTypeGetModule = {
2591
2600
  command: "get <id>",
2592
2601
  describe: "Get a content type",
2593
- builder: (yargs28) => withConfiguration(
2602
+ builder: (yargs32) => withConfiguration(
2594
2603
  withFormatOptions(
2595
2604
  withApiOptions(
2596
2605
  withProjectOptions(
2597
2606
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2598
- yargs28.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
2607
+ yargs32.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
2599
2608
  )
2600
2609
  )
2601
2610
  )
@@ -2617,7 +2626,7 @@ import { ContentClient as ContentClient2 } from "@uniformdev/canvas";
2617
2626
  var ContentTypeListModule = {
2618
2627
  command: "list",
2619
2628
  describe: "List content types",
2620
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
2629
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
2621
2630
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2622
2631
  const fetch3 = nodeFetchProxy(proxy);
2623
2632
  const client = new ContentClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -2664,11 +2673,11 @@ function createContentTypeEngineDataSource({
2664
2673
  var ContentTypePullModule = {
2665
2674
  command: "pull <directory>",
2666
2675
  describe: "Pulls all content types to local files in a directory",
2667
- builder: (yargs28) => withConfiguration(
2676
+ builder: (yargs32) => withConfiguration(
2668
2677
  withApiOptions(
2669
2678
  withProjectOptions(
2670
2679
  withDiffOptions(
2671
- yargs28.positional("directory", {
2680
+ yargs32.positional("directory", {
2672
2681
  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.",
2673
2682
  type: "string"
2674
2683
  }).option("format", {
@@ -2751,11 +2760,11 @@ import { ContentClient as ContentClient4 } from "@uniformdev/canvas";
2751
2760
  var ContentTypePushModule = {
2752
2761
  command: "push <directory>",
2753
2762
  describe: "Pushes all content types from files in a directory to Uniform",
2754
- builder: (yargs28) => withConfiguration(
2763
+ builder: (yargs32) => withConfiguration(
2755
2764
  withApiOptions(
2756
2765
  withProjectOptions(
2757
2766
  withDiffOptions(
2758
- yargs28.positional("directory", {
2767
+ yargs32.positional("directory", {
2759
2768
  describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
2760
2769
  type: "string"
2761
2770
  }).option("what-if", {
@@ -2827,10 +2836,10 @@ var ContentTypeRemoveModule = {
2827
2836
  command: "remove <id>",
2828
2837
  aliases: ["delete", "rm"],
2829
2838
  describe: "Delete a content type",
2830
- builder: (yargs28) => withConfiguration(
2839
+ builder: (yargs32) => withConfiguration(
2831
2840
  withApiOptions(
2832
2841
  withProjectOptions(
2833
- yargs28.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
2842
+ yargs32.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
2834
2843
  )
2835
2844
  )
2836
2845
  ),
@@ -2847,10 +2856,10 @@ var ContentTypeUpdateModule = {
2847
2856
  command: "update <filename>",
2848
2857
  aliases: ["put"],
2849
2858
  describe: "Insert or update a content type",
2850
- builder: (yargs28) => withConfiguration(
2859
+ builder: (yargs32) => withConfiguration(
2851
2860
  withApiOptions(
2852
2861
  withProjectOptions(
2853
- yargs28.positional("filename", { demandOption: true, describe: "Content type file to put" })
2862
+ yargs32.positional("filename", { demandOption: true, describe: "Content type file to put" })
2854
2863
  )
2855
2864
  )
2856
2865
  ),
@@ -2867,27 +2876,106 @@ var ContentTypeModule = {
2867
2876
  command: "contenttype <command>",
2868
2877
  aliases: ["ct"],
2869
2878
  describe: "Commands for Content Types",
2870
- builder: (yargs28) => yargs28.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
2879
+ builder: (yargs32) => yargs32.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
2871
2880
  handler: () => {
2872
2881
  yargs5.help();
2873
2882
  }
2874
2883
  };
2875
2884
 
2876
- // src/commands/canvas/commands/dataType.ts
2885
+ // src/commands/canvas/commands/dataSource.ts
2877
2886
  import yargs6 from "yargs";
2878
2887
 
2888
+ // src/commands/canvas/commands/dataSource/get.ts
2889
+ import { DataSourceClient } from "@uniformdev/canvas";
2890
+ var DataSourceGetModule = {
2891
+ command: "get <id>",
2892
+ describe: "Get a data source by ID and writes to stdout. Please note this may contain secret data, use discretion.",
2893
+ builder: (yargs32) => withConfiguration(
2894
+ withApiOptions(
2895
+ withProjectOptions(
2896
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2897
+ yargs32.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
2898
+ )
2899
+ )
2900
+ ),
2901
+ handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
2902
+ const fetch3 = nodeFetchProxy(proxy);
2903
+ const client = new DataSourceClient({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
2904
+ const res = await client.get({ dataSourceId: id });
2905
+ emitWithFormat(res.result, "json", void 0);
2906
+ }
2907
+ };
2908
+
2909
+ // src/commands/canvas/commands/dataSource/remove.ts
2910
+ import { DataSourceClient as DataSourceClient2 } from "@uniformdev/canvas";
2911
+ var DataSourceRemoveModule = {
2912
+ command: "remove <id>",
2913
+ aliases: ["delete", "rm"],
2914
+ describe: "Delete a data source",
2915
+ builder: (yargs32) => withConfiguration(
2916
+ withApiOptions(
2917
+ withProjectOptions(
2918
+ yargs32.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
2919
+ )
2920
+ )
2921
+ ),
2922
+ handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
2923
+ const fetch3 = nodeFetchProxy(proxy);
2924
+ const client = new DataSourceClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
2925
+ await client.remove({ dataSourceId: id });
2926
+ }
2927
+ };
2928
+
2929
+ // src/commands/canvas/commands/dataSource/update.ts
2930
+ import { DataSourceClient as DataSourceClient3 } from "@uniformdev/canvas";
2931
+ var DataSourceUpdateModule = {
2932
+ command: "update <dataSource>",
2933
+ aliases: ["put"],
2934
+ describe: "Insert or update a data source",
2935
+ builder: (yargs32) => withConfiguration(
2936
+ withApiOptions(
2937
+ withProjectOptions(
2938
+ yargs32.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
2939
+ describe: "Integration type that exposes the connector type for this data source (as defined in integration manifest).",
2940
+ type: "string",
2941
+ demandOption: true
2942
+ })
2943
+ )
2944
+ )
2945
+ ),
2946
+ handler: async ({ apiHost, apiKey, proxy, dataSource, integrationType, project: projectId }) => {
2947
+ const fetch3 = nodeFetchProxy(proxy);
2948
+ const client = new DataSourceClient3({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
2949
+ await client.upsert({ data: JSON.parse(dataSource), integrationType });
2950
+ }
2951
+ };
2952
+
2953
+ // src/commands/canvas/commands/dataSource.ts
2954
+ var DataSourceModule = {
2955
+ command: "datasource <command>",
2956
+ aliases: ["ds"],
2957
+ describe: "Commands for Data Source definitions",
2958
+ builder: (yargs32) => yargs32.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
2959
+ handler: () => {
2960
+ yargs6.help();
2961
+ }
2962
+ };
2963
+
2964
+ // src/commands/canvas/commands/dataType.ts
2965
+ import yargs7 from "yargs";
2966
+
2879
2967
  // src/commands/canvas/commands/dataType/get.ts
2880
2968
  import { DataTypeClient } from "@uniformdev/canvas";
2881
2969
  var DataTypeGetModule = {
2882
2970
  command: "get <id>",
2883
2971
  describe: "Get a data type",
2884
2972
  aliases: ["ls"],
2885
- builder: (yargs28) => withConfiguration(
2973
+ builder: (yargs32) => withConfiguration(
2886
2974
  withFormatOptions(
2887
2975
  withApiOptions(
2888
2976
  withProjectOptions(
2889
2977
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2890
- yargs28.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
2978
+ yargs32.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
2891
2979
  )
2892
2980
  )
2893
2981
  )
@@ -2910,7 +2998,7 @@ var DataTypeListModule = {
2910
2998
  command: "list",
2911
2999
  describe: "List data types",
2912
3000
  aliases: ["ls"],
2913
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
3001
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
2914
3002
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2915
3003
  const fetch3 = nodeFetchProxy(proxy);
2916
3004
  const client = new DataTypeClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -2959,11 +3047,11 @@ function createDataTypeEngineDataSource({
2959
3047
  var DataTypePullModule = {
2960
3048
  command: "pull <directory>",
2961
3049
  describe: "Pulls all data types to local files in a directory",
2962
- builder: (yargs28) => withConfiguration(
3050
+ builder: (yargs32) => withConfiguration(
2963
3051
  withApiOptions(
2964
3052
  withProjectOptions(
2965
3053
  withDiffOptions(
2966
- yargs28.positional("directory", {
3054
+ yargs32.positional("directory", {
2967
3055
  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.",
2968
3056
  type: "string"
2969
3057
  }).option("format", {
@@ -3046,11 +3134,11 @@ import { DataTypeClient as DataTypeClient4 } from "@uniformdev/canvas";
3046
3134
  var DataTypePushModule = {
3047
3135
  command: "push <directory>",
3048
3136
  describe: "Pushes all data types from files in a directory to Uniform",
3049
- builder: (yargs28) => withConfiguration(
3137
+ builder: (yargs32) => withConfiguration(
3050
3138
  withApiOptions(
3051
3139
  withProjectOptions(
3052
3140
  withDiffOptions(
3053
- yargs28.positional("directory", {
3141
+ yargs32.positional("directory", {
3054
3142
  describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
3055
3143
  type: "string"
3056
3144
  }).option("what-if", {
@@ -3122,10 +3210,10 @@ var DataTypeRemoveModule = {
3122
3210
  command: "remove <id>",
3123
3211
  aliases: ["delete", "rm"],
3124
3212
  describe: "Delete a data type",
3125
- builder: (yargs28) => withConfiguration(
3213
+ builder: (yargs32) => withConfiguration(
3126
3214
  withApiOptions(
3127
3215
  withProjectOptions(
3128
- yargs28.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
3216
+ yargs32.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
3129
3217
  )
3130
3218
  )
3131
3219
  ),
@@ -3142,10 +3230,10 @@ var DataTypeUpdateModule = {
3142
3230
  command: "update <filename>",
3143
3231
  aliases: ["put"],
3144
3232
  describe: "Insert or update a data type",
3145
- builder: (yargs28) => withConfiguration(
3233
+ builder: (yargs32) => withConfiguration(
3146
3234
  withApiOptions(
3147
3235
  withProjectOptions(
3148
- yargs28.positional("filename", { demandOption: true, describe: "Data type file to put" })
3236
+ yargs32.positional("filename", { demandOption: true, describe: "Data type file to put" })
3149
3237
  )
3150
3238
  )
3151
3239
  ),
@@ -3162,26 +3250,26 @@ var DataTypeModule = {
3162
3250
  command: "datatype <command>",
3163
3251
  aliases: ["dt"],
3164
3252
  describe: "Commands for Data Type definitions",
3165
- builder: (yargs28) => yargs28.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
3253
+ builder: (yargs32) => yargs32.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
3166
3254
  handler: () => {
3167
- yargs6.help();
3255
+ yargs7.help();
3168
3256
  }
3169
3257
  };
3170
3258
 
3171
3259
  // src/commands/canvas/commands/entry.ts
3172
- import yargs7 from "yargs";
3260
+ import yargs8 from "yargs";
3173
3261
 
3174
3262
  // src/commands/canvas/commands/entry/get.ts
3175
3263
  import { ContentClient as ContentClient7 } from "@uniformdev/canvas";
3176
3264
  var EntryGetModule = {
3177
3265
  command: "get <id>",
3178
3266
  describe: "Get an entry",
3179
- builder: (yargs28) => withConfiguration(
3267
+ builder: (yargs32) => withConfiguration(
3180
3268
  withFormatOptions(
3181
3269
  withApiOptions(
3182
3270
  withProjectOptions(
3183
3271
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3184
- yargs28.positional("id", { demandOption: true, describe: "Entry public ID to fetch" })
3272
+ yargs32.positional("id", { demandOption: true, describe: "Entry public ID to fetch" })
3185
3273
  )
3186
3274
  )
3187
3275
  )
@@ -3209,7 +3297,7 @@ import { ContentClient as ContentClient8 } from "@uniformdev/canvas";
3209
3297
  var EntryListModule = {
3210
3298
  command: "list",
3211
3299
  describe: "List entries",
3212
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
3300
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
3213
3301
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3214
3302
  const fetch3 = nodeFetchProxy(proxy);
3215
3303
  const client = new ContentClient8({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -3283,11 +3371,11 @@ function createEntryEngineDataSource({
3283
3371
  var EntryPublishModule = {
3284
3372
  command: "publish [ids]",
3285
3373
  describe: "Publishes entry(ies)",
3286
- builder: (yargs28) => withConfiguration(
3374
+ builder: (yargs32) => withConfiguration(
3287
3375
  withApiOptions(
3288
3376
  withProjectOptions(
3289
3377
  withDiffOptions(
3290
- yargs28.positional("ids", {
3378
+ yargs32.positional("ids", {
3291
3379
  describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
3292
3380
  type: "string"
3293
3381
  }).option("all", {
@@ -3363,12 +3451,12 @@ import { UncachedFileClient as UncachedFileClient5 } from "@uniformdev/files";
3363
3451
  var EntryPullModule = {
3364
3452
  command: "pull <directory>",
3365
3453
  describe: "Pulls all entries to local files in a directory",
3366
- builder: (yargs28) => withConfiguration(
3454
+ builder: (yargs32) => withConfiguration(
3367
3455
  withApiOptions(
3368
3456
  withProjectOptions(
3369
3457
  withStateOptions(
3370
3458
  withDiffOptions(
3371
- yargs28.positional("directory", {
3459
+ yargs32.positional("directory", {
3372
3460
  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.",
3373
3461
  type: "string"
3374
3462
  }).option("format", {
@@ -3467,12 +3555,12 @@ import { UncachedFileClient as UncachedFileClient6 } from "@uniformdev/files";
3467
3555
  var EntryPushModule = {
3468
3556
  command: "push <directory>",
3469
3557
  describe: "Pushes all entries from files in a directory to Uniform",
3470
- builder: (yargs28) => withConfiguration(
3558
+ builder: (yargs32) => withConfiguration(
3471
3559
  withApiOptions(
3472
3560
  withProjectOptions(
3473
3561
  withStateOptions(
3474
3562
  withDiffOptions(
3475
- yargs28.positional("directory", {
3563
+ yargs32.positional("directory", {
3476
3564
  describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
3477
3565
  type: "string"
3478
3566
  }).option("what-if", {
@@ -3558,10 +3646,10 @@ var EntryRemoveModule = {
3558
3646
  command: "remove <id>",
3559
3647
  aliases: ["delete", "rm"],
3560
3648
  describe: "Delete an entry",
3561
- builder: (yargs28) => withConfiguration(
3649
+ builder: (yargs32) => withConfiguration(
3562
3650
  withApiOptions(
3563
3651
  withProjectOptions(
3564
- yargs28.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
3652
+ yargs32.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
3565
3653
  )
3566
3654
  )
3567
3655
  ),
@@ -3578,10 +3666,10 @@ import { diffJson as diffJson3 } from "diff";
3578
3666
  var EntryUnpublishModule = {
3579
3667
  command: "unpublish [ids]",
3580
3668
  describe: "Unpublish an entry(ies)",
3581
- builder: (yargs28) => withConfiguration(
3669
+ builder: (yargs32) => withConfiguration(
3582
3670
  withApiOptions(
3583
3671
  withProjectOptions(
3584
- yargs28.positional("ids", {
3672
+ yargs32.positional("ids", {
3585
3673
  describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
3586
3674
  type: "string"
3587
3675
  }).option("all", {
@@ -3675,10 +3763,10 @@ var EntryUpdateModule = {
3675
3763
  command: "update <filename>",
3676
3764
  aliases: ["put"],
3677
3765
  describe: "Insert or update an entry",
3678
- builder: (yargs28) => withConfiguration(
3766
+ builder: (yargs32) => withConfiguration(
3679
3767
  withApiOptions(
3680
3768
  withProjectOptions(
3681
- yargs28.positional("filename", { demandOption: true, describe: "Entry file to put" })
3769
+ yargs32.positional("filename", { demandOption: true, describe: "Entry file to put" })
3682
3770
  )
3683
3771
  )
3684
3772
  ),
@@ -3694,14 +3782,14 @@ var EntryUpdateModule = {
3694
3782
  var EntryModule = {
3695
3783
  command: "entry <command>",
3696
3784
  describe: "Commands for Entries",
3697
- builder: (yargs28) => yargs28.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
3785
+ builder: (yargs32) => yargs32.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
3698
3786
  handler: () => {
3699
- yargs7.help();
3787
+ yargs8.help();
3700
3788
  }
3701
3789
  };
3702
3790
 
3703
3791
  // src/commands/canvas/commands/locale.ts
3704
- import yargs8 from "yargs";
3792
+ import yargs9 from "yargs";
3705
3793
 
3706
3794
  // src/commands/canvas/commands/locale/pull.ts
3707
3795
  import { LocaleClient } from "@uniformdev/canvas";
@@ -3739,11 +3827,11 @@ function createLocaleEngineDataSource({
3739
3827
  var LocalePullModule = {
3740
3828
  command: "pull <directory>",
3741
3829
  describe: "Pulls all locales to local files in a directory",
3742
- builder: (yargs28) => withConfiguration(
3830
+ builder: (yargs32) => withConfiguration(
3743
3831
  withApiOptions(
3744
3832
  withProjectOptions(
3745
3833
  withDiffOptions(
3746
- yargs28.positional("directory", {
3834
+ yargs32.positional("directory", {
3747
3835
  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.",
3748
3836
  type: "string"
3749
3837
  }).option("format", {
@@ -3826,11 +3914,11 @@ import { LocaleClient as LocaleClient2 } from "@uniformdev/canvas";
3826
3914
  var LocalePushModule = {
3827
3915
  command: "push <directory>",
3828
3916
  describe: "Pushes all locales from files in a directory to Uniform",
3829
- builder: (yargs28) => withConfiguration(
3917
+ builder: (yargs32) => withConfiguration(
3830
3918
  withApiOptions(
3831
3919
  withProjectOptions(
3832
3920
  withDiffOptions(
3833
- yargs28.positional("directory", {
3921
+ yargs32.positional("directory", {
3834
3922
  describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
3835
3923
  type: "string"
3836
3924
  }).option("what-if", {
@@ -3900,14 +3988,14 @@ var LocalePushModule = {
3900
3988
  var LocaleModule = {
3901
3989
  command: "locale <command>",
3902
3990
  describe: "Commands for locale definitions",
3903
- builder: (yargs28) => yargs28.command(LocalePullModule).command(LocalePushModule),
3991
+ builder: (yargs32) => yargs32.command(LocalePullModule).command(LocalePushModule),
3904
3992
  handler: () => {
3905
- yargs8.help();
3993
+ yargs9.help();
3906
3994
  }
3907
3995
  };
3908
3996
 
3909
3997
  // src/commands/canvas/commands/pattern.ts
3910
- import yargs9 from "yargs";
3998
+ import yargs10 from "yargs";
3911
3999
 
3912
4000
  // src/commands/canvas/commands/pattern/get.ts
3913
4001
  var PatternGetModule = {
@@ -3919,12 +4007,12 @@ var PatternGetModule = {
3919
4007
  var PatternListModule = {
3920
4008
  ...CompositionListModule,
3921
4009
  describe: "List patterns",
3922
- builder: (yargs28) => withFormatOptions(
4010
+ builder: (yargs32) => withFormatOptions(
3923
4011
  withConfiguration(
3924
4012
  withApiOptions(
3925
4013
  withProjectOptions(
3926
4014
  withStateOptions(
3927
- yargs28.options({
4015
+ yargs32.options({
3928
4016
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
3929
4017
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
3930
4018
  resolvePatterns: {
@@ -3962,11 +4050,11 @@ var PatternListModule = {
3962
4050
  var PatternPublishModule = {
3963
4051
  ...CompositionPublishModule,
3964
4052
  describe: "Publishes pattern(s)",
3965
- builder: (yargs28) => withConfiguration(
4053
+ builder: (yargs32) => withConfiguration(
3966
4054
  withApiOptions(
3967
4055
  withProjectOptions(
3968
4056
  withDiffOptions(
3969
- yargs28.positional("ids", {
4057
+ yargs32.positional("ids", {
3970
4058
  describe: "Publishes pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
3971
4059
  type: "string"
3972
4060
  }).option("all", {
@@ -4004,12 +4092,12 @@ var PatternPublishModule = {
4004
4092
  var PatternPullModule = {
4005
4093
  ...CompositionPullModule,
4006
4094
  describe: "Pulls all patterns to local files in a directory",
4007
- builder: (yargs28) => withConfiguration(
4095
+ builder: (yargs32) => withConfiguration(
4008
4096
  withApiOptions(
4009
4097
  withProjectOptions(
4010
4098
  withStateOptions(
4011
4099
  withDiffOptions(
4012
- yargs28.positional("directory", {
4100
+ yargs32.positional("directory", {
4013
4101
  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.",
4014
4102
  type: "string"
4015
4103
  }).option("format", {
@@ -4047,12 +4135,12 @@ var PatternPullModule = {
4047
4135
  var PatternPushModule = {
4048
4136
  ...CompositionPushModule,
4049
4137
  describe: "Pushes all patterns from files in a directory to Uniform Canvas",
4050
- builder: (yargs28) => withConfiguration(
4138
+ builder: (yargs32) => withConfiguration(
4051
4139
  withApiOptions(
4052
4140
  withProjectOptions(
4053
4141
  withStateOptions(
4054
4142
  withDiffOptions(
4055
- yargs28.positional("directory", {
4143
+ yargs32.positional("directory", {
4056
4144
  describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
4057
4145
  type: "string"
4058
4146
  }).option("what-if", {
@@ -4090,10 +4178,10 @@ var PatternRemoveModule = {
4090
4178
  var PatternUnpublishModule = {
4091
4179
  command: "unpublish [ids]",
4092
4180
  describe: "Unpublish a pattern(s)",
4093
- builder: (yargs28) => withConfiguration(
4181
+ builder: (yargs32) => withConfiguration(
4094
4182
  withApiOptions(
4095
4183
  withProjectOptions(
4096
- yargs28.positional("ids", {
4184
+ yargs32.positional("ids", {
4097
4185
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4098
4186
  type: "string"
4099
4187
  }).option("all", {
@@ -4132,26 +4220,26 @@ var PatternUpdateModule = {
4132
4220
  var PatternModule = {
4133
4221
  command: "pattern <command>",
4134
4222
  describe: "Commands for Canvas patterns",
4135
- builder: (yargs28) => yargs28.command(PatternPullModule).command(PatternPushModule).command(PatternGetModule).command(PatternRemoveModule).command(PatternListModule).command(PatternUpdateModule).command(PatternPublishModule).command(PatternUnpublishModule).demandCommand(),
4223
+ builder: (yargs32) => yargs32.command(PatternPullModule).command(PatternPushModule).command(PatternGetModule).command(PatternRemoveModule).command(PatternListModule).command(PatternUpdateModule).command(PatternPublishModule).command(PatternUnpublishModule).demandCommand(),
4136
4224
  handler: () => {
4137
- yargs9.help();
4225
+ yargs10.help();
4138
4226
  }
4139
4227
  };
4140
4228
 
4141
4229
  // src/commands/canvas/commands/prompts.ts
4142
- import yargs10 from "yargs";
4230
+ import yargs11 from "yargs";
4143
4231
 
4144
4232
  // src/commands/canvas/commands/prompts/get.ts
4145
4233
  import { PromptClient } from "@uniformdev/canvas";
4146
4234
  var PromptGetModule = {
4147
4235
  command: "get <id>",
4148
4236
  describe: "Get a prompt",
4149
- builder: (yargs28) => withConfiguration(
4237
+ builder: (yargs32) => withConfiguration(
4150
4238
  withFormatOptions(
4151
4239
  withApiOptions(
4152
4240
  withProjectOptions(
4153
4241
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4154
- yargs28.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
4242
+ yargs32.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
4155
4243
  )
4156
4244
  )
4157
4245
  )
@@ -4172,7 +4260,7 @@ import { PromptClient as PromptClient2 } from "@uniformdev/canvas";
4172
4260
  var PromptListModule = {
4173
4261
  command: "list",
4174
4262
  describe: "List prompts",
4175
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
4263
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
4176
4264
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4177
4265
  const fetch3 = nodeFetchProxy(proxy);
4178
4266
  const client = new PromptClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -4219,12 +4307,12 @@ function createPromptEngineDataSource({
4219
4307
  var PromptPullModule = {
4220
4308
  command: "pull <directory>",
4221
4309
  describe: "Pulls all entries to local files in a directory",
4222
- builder: (yargs28) => withConfiguration(
4310
+ builder: (yargs32) => withConfiguration(
4223
4311
  withApiOptions(
4224
4312
  withProjectOptions(
4225
4313
  withStateOptions(
4226
4314
  withDiffOptions(
4227
- yargs28.positional("directory", {
4315
+ yargs32.positional("directory", {
4228
4316
  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.",
4229
4317
  type: "string"
4230
4318
  }).option("format", {
@@ -4308,12 +4396,12 @@ import { PromptClient as PromptClient4 } from "@uniformdev/canvas";
4308
4396
  var PromptPushModule = {
4309
4397
  command: "push <directory>",
4310
4398
  describe: "Pushes all prompts from files in a directory to Uniform",
4311
- builder: (yargs28) => withConfiguration(
4399
+ builder: (yargs32) => withConfiguration(
4312
4400
  withApiOptions(
4313
4401
  withProjectOptions(
4314
4402
  withStateOptions(
4315
4403
  withDiffOptions(
4316
- yargs28.positional("directory", {
4404
+ yargs32.positional("directory", {
4317
4405
  describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
4318
4406
  type: "string"
4319
4407
  }).option("what-if", {
@@ -4386,9 +4474,9 @@ var PromptRemoveModule = {
4386
4474
  command: "remove <id>",
4387
4475
  aliases: ["delete", "rm"],
4388
4476
  describe: "Delete a prompt",
4389
- builder: (yargs28) => withConfiguration(
4477
+ builder: (yargs32) => withConfiguration(
4390
4478
  withApiOptions(
4391
- withProjectOptions(yargs28.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
4479
+ withProjectOptions(yargs32.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
4392
4480
  )
4393
4481
  ),
4394
4482
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -4404,10 +4492,10 @@ var PromptUpdateModule = {
4404
4492
  command: "update <filename>",
4405
4493
  aliases: ["put"],
4406
4494
  describe: "Insert or update a prompt",
4407
- builder: (yargs28) => withConfiguration(
4495
+ builder: (yargs32) => withConfiguration(
4408
4496
  withApiOptions(
4409
4497
  withProjectOptions(
4410
- yargs28.positional("filename", { demandOption: true, describe: "Prompt file to put" })
4498
+ yargs32.positional("filename", { demandOption: true, describe: "Prompt file to put" })
4411
4499
  )
4412
4500
  )
4413
4501
  ),
@@ -4424,9 +4512,9 @@ var PromptModule = {
4424
4512
  command: "prompt <command>",
4425
4513
  aliases: ["dt"],
4426
4514
  describe: "Commands for AI Prompt definitions",
4427
- builder: (yargs28) => yargs28.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
4515
+ builder: (yargs32) => yargs32.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
4428
4516
  handler: () => {
4429
- yargs10.help();
4517
+ yargs11.help();
4430
4518
  }
4431
4519
  };
4432
4520
 
@@ -4435,28 +4523,28 @@ var CanvasCommand = {
4435
4523
  command: "canvas <command>",
4436
4524
  aliases: ["cv", "pm", "presentation"],
4437
4525
  describe: "Uniform Canvas commands",
4438
- builder: (yargs28) => yargs28.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(CategoryModule).command(PatternModule).command(ContentTypeModule).command(EntryModule).command(PromptModule).command(AssetModule).command(LocaleModule).demandCommand(),
4526
+ builder: (yargs32) => yargs32.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(DataSourceModule).command(CategoryModule).command(PatternModule).command(ContentTypeModule).command(EntryModule).command(PromptModule).command(AssetModule).command(LocaleModule).demandCommand(),
4439
4527
  handler: () => {
4440
- yargs11.showHelp();
4528
+ yargs12.showHelp();
4441
4529
  }
4442
4530
  };
4443
4531
 
4444
4532
  // src/commands/context/index.ts
4445
- import yargs18 from "yargs";
4533
+ import yargs19 from "yargs";
4446
4534
 
4447
4535
  // src/commands/context/commands/aggregate.ts
4448
- import yargs12 from "yargs";
4536
+ import yargs13 from "yargs";
4449
4537
 
4450
4538
  // src/commands/context/commands/aggregate/get.ts
4451
4539
  import { UncachedAggregateClient } from "@uniformdev/context/api";
4452
4540
  var AggregateGetModule = {
4453
4541
  command: "get <id>",
4454
4542
  describe: "Fetch an aggregate",
4455
- builder: (yargs28) => withConfiguration(
4543
+ builder: (yargs32) => withConfiguration(
4456
4544
  withFormatOptions(
4457
4545
  withApiOptions(
4458
4546
  withProjectOptions(
4459
- yargs28.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
4547
+ yargs32.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
4460
4548
  )
4461
4549
  )
4462
4550
  )
@@ -4480,7 +4568,7 @@ var AggregateListModule = {
4480
4568
  command: "list",
4481
4569
  describe: "List aggregates",
4482
4570
  aliases: ["ls"],
4483
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
4571
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
4484
4572
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4485
4573
  const fetch3 = nodeFetchProxy(proxy);
4486
4574
  const client = new UncachedAggregateClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -4546,11 +4634,11 @@ function writeContextPackage(filename, packageContents) {
4546
4634
  var AggregatePullModule = {
4547
4635
  command: "pull <directory>",
4548
4636
  describe: "Pulls all aggregates to local files in a directory",
4549
- builder: (yargs28) => withConfiguration(
4637
+ builder: (yargs32) => withConfiguration(
4550
4638
  withApiOptions(
4551
4639
  withProjectOptions(
4552
4640
  withDiffOptions(
4553
- yargs28.positional("directory", {
4641
+ yargs32.positional("directory", {
4554
4642
  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.",
4555
4643
  type: "string"
4556
4644
  }).option("format", {
@@ -4627,11 +4715,11 @@ import { UncachedAggregateClient as UncachedAggregateClient4 } from "@uniformdev
4627
4715
  var AggregatePushModule = {
4628
4716
  command: "push <directory>",
4629
4717
  describe: "Pushes all aggregates from files in a directory or package to Uniform",
4630
- builder: (yargs28) => withConfiguration(
4718
+ builder: (yargs32) => withConfiguration(
4631
4719
  withApiOptions(
4632
4720
  withProjectOptions(
4633
4721
  withDiffOptions(
4634
- yargs28.positional("directory", {
4722
+ yargs32.positional("directory", {
4635
4723
  describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
4636
4724
  type: "string"
4637
4725
  }).option("what-if", {
@@ -4698,10 +4786,10 @@ var AggregateRemoveModule = {
4698
4786
  command: "remove <id>",
4699
4787
  aliases: ["delete", "rm"],
4700
4788
  describe: "Delete an aggregate",
4701
- builder: (yargs28) => withConfiguration(
4789
+ builder: (yargs32) => withConfiguration(
4702
4790
  withApiOptions(
4703
4791
  withProjectOptions(
4704
- yargs28.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
4792
+ yargs32.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
4705
4793
  )
4706
4794
  )
4707
4795
  ),
@@ -4718,10 +4806,10 @@ var AggregateUpdateModule = {
4718
4806
  command: "update <filename>",
4719
4807
  aliases: ["put"],
4720
4808
  describe: "Insert or update an aggregate",
4721
- builder: (yargs28) => withConfiguration(
4809
+ builder: (yargs32) => withConfiguration(
4722
4810
  withApiOptions(
4723
4811
  withProjectOptions(
4724
- yargs28.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
4812
+ yargs32.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
4725
4813
  )
4726
4814
  )
4727
4815
  ),
@@ -4738,25 +4826,25 @@ var AggregateModule = {
4738
4826
  command: "aggregate <command>",
4739
4827
  aliases: ["agg", "intent", "audience"],
4740
4828
  describe: "Commands for Context aggregates (intents, audiences)",
4741
- builder: (yargs28) => yargs28.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
4829
+ builder: (yargs32) => yargs32.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
4742
4830
  handler: () => {
4743
- yargs12.help();
4831
+ yargs13.help();
4744
4832
  }
4745
4833
  };
4746
4834
 
4747
4835
  // src/commands/context/commands/enrichment.ts
4748
- import yargs13 from "yargs";
4836
+ import yargs14 from "yargs";
4749
4837
 
4750
4838
  // src/commands/context/commands/enrichment/get.ts
4751
4839
  import { UncachedEnrichmentClient } from "@uniformdev/context/api";
4752
4840
  var EnrichmentGetModule = {
4753
4841
  command: "get <id>",
4754
4842
  describe: "Fetch an enrichment category and its values",
4755
- builder: (yargs28) => withFormatOptions(
4843
+ builder: (yargs32) => withFormatOptions(
4756
4844
  withConfiguration(
4757
4845
  withApiOptions(
4758
4846
  withProjectOptions(
4759
- yargs28.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
4847
+ yargs32.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
4760
4848
  )
4761
4849
  )
4762
4850
  )
@@ -4781,7 +4869,7 @@ var EnrichmentListModule = {
4781
4869
  command: "list",
4782
4870
  describe: "List enrichments",
4783
4871
  aliases: ["ls"],
4784
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
4872
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
4785
4873
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4786
4874
  const fetch3 = nodeFetchProxy(proxy);
4787
4875
  const client = new UncachedEnrichmentClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -4882,11 +4970,11 @@ var createEnrichmentValueEngineDataSource = ({
4882
4970
  var EnrichmentPullModule = {
4883
4971
  command: "pull <directory>",
4884
4972
  describe: "Pulls all enrichments to local files in a directory",
4885
- builder: (yargs28) => withConfiguration(
4973
+ builder: (yargs32) => withConfiguration(
4886
4974
  withApiOptions(
4887
4975
  withProjectOptions(
4888
4976
  withDiffOptions(
4889
- yargs28.positional("directory", {
4977
+ yargs32.positional("directory", {
4890
4978
  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.",
4891
4979
  type: "string"
4892
4980
  }).option("format", {
@@ -4963,11 +5051,11 @@ import { UncachedEnrichmentClient as UncachedEnrichmentClient4 } from "@uniformd
4963
5051
  var EnrichmentPushModule = {
4964
5052
  command: "push <directory>",
4965
5053
  describe: "Pushes all enrichments from files in a directory or package to Uniform",
4966
- builder: (yargs28) => withConfiguration(
5054
+ builder: (yargs32) => withConfiguration(
4967
5055
  withApiOptions(
4968
5056
  withProjectOptions(
4969
5057
  withDiffOptions(
4970
- yargs28.positional("directory", {
5058
+ yargs32.positional("directory", {
4971
5059
  describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
4972
5060
  type: "string"
4973
5061
  }).option("what-if", {
@@ -5033,10 +5121,10 @@ var EnrichmentRemoveModule = {
5033
5121
  command: "remove <id>",
5034
5122
  aliases: ["delete", "rm"],
5035
5123
  describe: "Delete an enrichment category and its values",
5036
- builder: (yargs28) => withConfiguration(
5124
+ builder: (yargs32) => withConfiguration(
5037
5125
  withApiOptions(
5038
5126
  withProjectOptions(
5039
- yargs28.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
5127
+ yargs32.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
5040
5128
  )
5041
5129
  )
5042
5130
  ),
@@ -5052,14 +5140,14 @@ var EnrichmentModule = {
5052
5140
  command: "enrichment <command>",
5053
5141
  aliases: ["enr"],
5054
5142
  describe: "Commands for Context enrichments",
5055
- builder: (yargs28) => yargs28.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
5143
+ builder: (yargs32) => yargs32.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
5056
5144
  handler: () => {
5057
- yargs13.help();
5145
+ yargs14.help();
5058
5146
  }
5059
5147
  };
5060
5148
 
5061
5149
  // src/commands/context/commands/manifest.ts
5062
- import yargs14 from "yargs";
5150
+ import yargs15 from "yargs";
5063
5151
 
5064
5152
  // src/commands/context/commands/manifest/get.ts
5065
5153
  import { ApiClientError, UncachedManifestClient } from "@uniformdev/context/api";
@@ -5070,10 +5158,10 @@ var ManifestGetModule = {
5070
5158
  command: "get [output]",
5071
5159
  aliases: ["dl", "download"],
5072
5160
  describe: "Download the Uniform Context manifest for a project",
5073
- builder: (yargs28) => withConfiguration(
5161
+ builder: (yargs32) => withConfiguration(
5074
5162
  withApiOptions(
5075
5163
  withProjectOptions(
5076
- yargs28.option("preview", {
5164
+ yargs32.option("preview", {
5077
5165
  describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
5078
5166
  default: false,
5079
5167
  type: "boolean",
@@ -5135,7 +5223,7 @@ import { exit as exit2 } from "process";
5135
5223
  var ManifestPublishModule = {
5136
5224
  command: "publish",
5137
5225
  describe: "Publish the Uniform Context manifest for a project",
5138
- builder: (yargs28) => withConfiguration(withApiOptions(withProjectOptions(yargs28))),
5226
+ builder: (yargs32) => withConfiguration(withApiOptions(withProjectOptions(yargs32))),
5139
5227
  handler: async ({ apiKey, apiHost, proxy, project }) => {
5140
5228
  const fetch3 = nodeFetchProxy(proxy);
5141
5229
  try {
@@ -5168,25 +5256,25 @@ var ManifestModule = {
5168
5256
  command: "manifest <command>",
5169
5257
  describe: "Commands for context manifests",
5170
5258
  aliases: ["man"],
5171
- builder: (yargs28) => yargs28.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
5259
+ builder: (yargs32) => yargs32.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
5172
5260
  handler: () => {
5173
- yargs14.help();
5261
+ yargs15.help();
5174
5262
  }
5175
5263
  };
5176
5264
 
5177
5265
  // src/commands/context/commands/quirk.ts
5178
- import yargs15 from "yargs";
5266
+ import yargs16 from "yargs";
5179
5267
 
5180
5268
  // src/commands/context/commands/quirk/get.ts
5181
5269
  import { UncachedQuirkClient } from "@uniformdev/context/api";
5182
5270
  var QuirkGetModule = {
5183
5271
  command: "get <id>",
5184
5272
  describe: "Fetch a quirk",
5185
- builder: (yargs28) => withConfiguration(
5273
+ builder: (yargs32) => withConfiguration(
5186
5274
  withFormatOptions(
5187
5275
  withApiOptions(
5188
5276
  withProjectOptions(
5189
- yargs28.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
5277
+ yargs32.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
5190
5278
  )
5191
5279
  )
5192
5280
  )
@@ -5210,11 +5298,11 @@ var QuirkListModule = {
5210
5298
  command: "list",
5211
5299
  describe: "List quirks",
5212
5300
  aliases: ["ls"],
5213
- builder: (yargs28) => withConfiguration(
5301
+ builder: (yargs32) => withConfiguration(
5214
5302
  withFormatOptions(
5215
5303
  withApiOptions(
5216
5304
  withProjectOptions(
5217
- yargs28.option("withIntegrations", {
5305
+ yargs32.option("withIntegrations", {
5218
5306
  alias: ["i"],
5219
5307
  describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
5220
5308
  type: "boolean"
@@ -5271,11 +5359,11 @@ function createQuirkEngineDataSource({
5271
5359
  var QuirkPullModule = {
5272
5360
  command: "pull <directory>",
5273
5361
  describe: "Pulls all quirks to local files in a directory",
5274
- builder: (yargs28) => withConfiguration(
5362
+ builder: (yargs32) => withConfiguration(
5275
5363
  withApiOptions(
5276
5364
  withProjectOptions(
5277
5365
  withDiffOptions(
5278
- yargs28.positional("directory", {
5366
+ yargs32.positional("directory", {
5279
5367
  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.",
5280
5368
  type: "string"
5281
5369
  }).option("format", {
@@ -5352,11 +5440,11 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
5352
5440
  var QuirkPushModule = {
5353
5441
  command: "push <directory>",
5354
5442
  describe: "Pushes all quirks from files in a directory or package to Uniform",
5355
- builder: (yargs28) => withConfiguration(
5443
+ builder: (yargs32) => withConfiguration(
5356
5444
  withApiOptions(
5357
5445
  withProjectOptions(
5358
5446
  withDiffOptions(
5359
- yargs28.positional("directory", {
5447
+ yargs32.positional("directory", {
5360
5448
  describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
5361
5449
  type: "string"
5362
5450
  }).option("what-if", {
@@ -5422,10 +5510,10 @@ var QuirkRemoveModule = {
5422
5510
  command: "remove <id>",
5423
5511
  aliases: ["delete", "rm"],
5424
5512
  describe: "Delete a quirk",
5425
- builder: (yargs28) => withConfiguration(
5513
+ builder: (yargs32) => withConfiguration(
5426
5514
  withApiOptions(
5427
5515
  withProjectOptions(
5428
- yargs28.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
5516
+ yargs32.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
5429
5517
  )
5430
5518
  )
5431
5519
  ),
@@ -5442,10 +5530,10 @@ var QuirkUpdateModule = {
5442
5530
  command: "update <filename>",
5443
5531
  aliases: ["put"],
5444
5532
  describe: "Insert or update a quirk",
5445
- builder: (yargs28) => withConfiguration(
5533
+ builder: (yargs32) => withConfiguration(
5446
5534
  withApiOptions(
5447
5535
  withProjectOptions(
5448
- yargs28.positional("filename", { demandOption: true, describe: "Quirk file to put" })
5536
+ yargs32.positional("filename", { demandOption: true, describe: "Quirk file to put" })
5449
5537
  )
5450
5538
  )
5451
5539
  ),
@@ -5462,25 +5550,25 @@ var QuirkModule = {
5462
5550
  command: "quirk <command>",
5463
5551
  aliases: ["qk"],
5464
5552
  describe: "Commands for Context quirks",
5465
- builder: (yargs28) => yargs28.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
5553
+ builder: (yargs32) => yargs32.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
5466
5554
  handler: () => {
5467
- yargs15.help();
5555
+ yargs16.help();
5468
5556
  }
5469
5557
  };
5470
5558
 
5471
5559
  // src/commands/context/commands/signal.ts
5472
- import yargs16 from "yargs";
5560
+ import yargs17 from "yargs";
5473
5561
 
5474
5562
  // src/commands/context/commands/signal/get.ts
5475
5563
  import { UncachedSignalClient } from "@uniformdev/context/api";
5476
5564
  var SignalGetModule = {
5477
5565
  command: "get <id>",
5478
5566
  describe: "Fetch a signal",
5479
- builder: (yargs28) => withConfiguration(
5567
+ builder: (yargs32) => withConfiguration(
5480
5568
  withFormatOptions(
5481
5569
  withApiOptions(
5482
5570
  withProjectOptions(
5483
- yargs28.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
5571
+ yargs32.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
5484
5572
  )
5485
5573
  )
5486
5574
  )
@@ -5504,7 +5592,7 @@ var SignalListModule = {
5504
5592
  command: "list",
5505
5593
  describe: "List signals",
5506
5594
  aliases: ["ls"],
5507
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
5595
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
5508
5596
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5509
5597
  const fetch3 = nodeFetchProxy(proxy);
5510
5598
  const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5553,11 +5641,11 @@ function createSignalEngineDataSource({
5553
5641
  var SignalPullModule = {
5554
5642
  command: "pull <directory>",
5555
5643
  describe: "Pulls all signals to local files in a directory",
5556
- builder: (yargs28) => withConfiguration(
5644
+ builder: (yargs32) => withConfiguration(
5557
5645
  withApiOptions(
5558
5646
  withProjectOptions(
5559
5647
  withDiffOptions(
5560
- yargs28.positional("directory", {
5648
+ yargs32.positional("directory", {
5561
5649
  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.",
5562
5650
  type: "string"
5563
5651
  }).option("format", {
@@ -5634,11 +5722,11 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
5634
5722
  var SignalPushModule = {
5635
5723
  command: "push <directory>",
5636
5724
  describe: "Pushes all signals from files in a directory or package to Uniform",
5637
- builder: (yargs28) => withConfiguration(
5725
+ builder: (yargs32) => withConfiguration(
5638
5726
  withApiOptions(
5639
5727
  withProjectOptions(
5640
5728
  withDiffOptions(
5641
- yargs28.positional("directory", {
5729
+ yargs32.positional("directory", {
5642
5730
  describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
5643
5731
  type: "string"
5644
5732
  }).option("what-if", {
@@ -5704,10 +5792,10 @@ var SignalRemoveModule = {
5704
5792
  command: "remove <id>",
5705
5793
  aliases: ["delete", "rm"],
5706
5794
  describe: "Delete a signal",
5707
- builder: (yargs28) => withConfiguration(
5795
+ builder: (yargs32) => withConfiguration(
5708
5796
  withApiOptions(
5709
5797
  withProjectOptions(
5710
- yargs28.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
5798
+ yargs32.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
5711
5799
  )
5712
5800
  )
5713
5801
  ),
@@ -5724,10 +5812,10 @@ var SignalUpdateModule = {
5724
5812
  command: "update <filename>",
5725
5813
  aliases: ["put"],
5726
5814
  describe: "Insert or update a signal",
5727
- builder: (yargs28) => withConfiguration(
5815
+ builder: (yargs32) => withConfiguration(
5728
5816
  withApiOptions(
5729
5817
  withProjectOptions(
5730
- yargs28.positional("filename", { demandOption: true, describe: "Signal file to put" })
5818
+ yargs32.positional("filename", { demandOption: true, describe: "Signal file to put" })
5731
5819
  )
5732
5820
  )
5733
5821
  ),
@@ -5744,25 +5832,25 @@ var SignalModule = {
5744
5832
  command: "signal <command>",
5745
5833
  aliases: ["sig"],
5746
5834
  describe: "Commands for Context signals",
5747
- builder: (yargs28) => yargs28.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
5835
+ builder: (yargs32) => yargs32.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
5748
5836
  handler: () => {
5749
- yargs16.help();
5837
+ yargs17.help();
5750
5838
  }
5751
5839
  };
5752
5840
 
5753
5841
  // src/commands/context/commands/test.ts
5754
- import yargs17 from "yargs";
5842
+ import yargs18 from "yargs";
5755
5843
 
5756
5844
  // src/commands/context/commands/test/get.ts
5757
5845
  import { UncachedTestClient } from "@uniformdev/context/api";
5758
5846
  var TestGetModule = {
5759
5847
  command: "get <id>",
5760
5848
  describe: "Fetch a test",
5761
- builder: (yargs28) => withConfiguration(
5849
+ builder: (yargs32) => withConfiguration(
5762
5850
  withFormatOptions(
5763
5851
  withApiOptions(
5764
5852
  withProjectOptions(
5765
- yargs28.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
5853
+ yargs32.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
5766
5854
  )
5767
5855
  )
5768
5856
  )
@@ -5786,7 +5874,7 @@ var TestListModule = {
5786
5874
  command: "list",
5787
5875
  describe: "List tests",
5788
5876
  aliases: ["ls"],
5789
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
5877
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
5790
5878
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5791
5879
  const fetch3 = nodeFetchProxy(proxy);
5792
5880
  const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5835,11 +5923,11 @@ function createTestEngineDataSource({
5835
5923
  var TestPullModule = {
5836
5924
  command: "pull <directory>",
5837
5925
  describe: "Pulls all tests to local files in a directory",
5838
- builder: (yargs28) => withConfiguration(
5926
+ builder: (yargs32) => withConfiguration(
5839
5927
  withApiOptions(
5840
5928
  withProjectOptions(
5841
5929
  withDiffOptions(
5842
- yargs28.positional("directory", {
5930
+ yargs32.positional("directory", {
5843
5931
  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.",
5844
5932
  type: "string"
5845
5933
  }).option("format", {
@@ -5916,11 +6004,11 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
5916
6004
  var TestPushModule = {
5917
6005
  command: "push <directory>",
5918
6006
  describe: "Pushes all tests from files in a directory or package to Uniform",
5919
- builder: (yargs28) => withConfiguration(
6007
+ builder: (yargs32) => withConfiguration(
5920
6008
  withApiOptions(
5921
6009
  withProjectOptions(
5922
6010
  withDiffOptions(
5923
- yargs28.positional("directory", {
6011
+ yargs32.positional("directory", {
5924
6012
  describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
5925
6013
  type: "string"
5926
6014
  }).option("what-if", {
@@ -5986,10 +6074,10 @@ var TestRemoveModule = {
5986
6074
  command: "remove <id>",
5987
6075
  aliases: ["delete", "rm"],
5988
6076
  describe: "Delete a test",
5989
- builder: (yargs28) => withConfiguration(
6077
+ builder: (yargs32) => withConfiguration(
5990
6078
  withApiOptions(
5991
6079
  withProjectOptions(
5992
- yargs28.positional("id", { demandOption: true, describe: "Test public ID to delete" })
6080
+ yargs32.positional("id", { demandOption: true, describe: "Test public ID to delete" })
5993
6081
  )
5994
6082
  )
5995
6083
  ),
@@ -6006,9 +6094,9 @@ var TestUpdateModule = {
6006
6094
  command: "update <filename>",
6007
6095
  aliases: ["put"],
6008
6096
  describe: "Insert or update a test",
6009
- builder: (yargs28) => withConfiguration(
6097
+ builder: (yargs32) => withConfiguration(
6010
6098
  withApiOptions(
6011
- withProjectOptions(yargs28.positional("filename", { demandOption: true, describe: "Test file to put" }))
6099
+ withProjectOptions(yargs32.positional("filename", { demandOption: true, describe: "Test file to put" }))
6012
6100
  )
6013
6101
  ),
6014
6102
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -6023,9 +6111,9 @@ var TestUpdateModule = {
6023
6111
  var TestModule = {
6024
6112
  command: "test <command>",
6025
6113
  describe: "Commands for Context A/B tests",
6026
- builder: (yargs28) => yargs28.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
6114
+ builder: (yargs32) => yargs32.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
6027
6115
  handler: () => {
6028
- yargs17.help();
6116
+ yargs18.help();
6029
6117
  }
6030
6118
  };
6031
6119
 
@@ -6034,9 +6122,290 @@ var ContextCommand = {
6034
6122
  command: "context <command>",
6035
6123
  aliases: ["ctx"],
6036
6124
  describe: "Uniform Context commands",
6037
- builder: (yargs28) => yargs28.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
6125
+ builder: (yargs32) => yargs32.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
6038
6126
  handler: () => {
6039
- yargs18.showHelp();
6127
+ yargs19.showHelp();
6128
+ }
6129
+ };
6130
+
6131
+ // src/commands/integration/index.ts
6132
+ import yargs22 from "yargs";
6133
+
6134
+ // src/commands/integration/commands/definition.ts
6135
+ import yargs21 from "yargs";
6136
+
6137
+ // src/commands/integration/commands/definition/edgehancer/edgehancer.ts
6138
+ import yargs20 from "yargs";
6139
+
6140
+ // src/commands/integration/commands/definition/edgehancer/deploy.ts
6141
+ import { readFileSync as readFileSync2 } from "fs";
6142
+
6143
+ // src/commands/integration/commands/definition/edgehancer/EdgehancerClient.ts
6144
+ import { createLimitPolicy } from "@uniformdev/canvas";
6145
+ import { ApiClient } from "@uniformdev/context/api";
6146
+ var ENDPOINT = "/api/v1/integration-edgehancers";
6147
+ var EdgehancerClient = class extends ApiClient {
6148
+ constructor(options) {
6149
+ if (!options.limitPolicy) {
6150
+ options.limitPolicy = createLimitPolicy({});
6151
+ }
6152
+ super(options);
6153
+ this.options = options;
6154
+ }
6155
+ async deploy(definition) {
6156
+ const { teamId } = this.options;
6157
+ const fetchUri = this.createUrl(ENDPOINT);
6158
+ return await this.apiClient(fetchUri, {
6159
+ method: "PUT",
6160
+ body: JSON.stringify({ ...definition, teamId }),
6161
+ expectNoContent: true
6162
+ });
6163
+ }
6164
+ async remove(edgehancer) {
6165
+ const { teamId } = this.options;
6166
+ const fetchUri = this.createUrl(ENDPOINT);
6167
+ return await this.apiClient(fetchUri, {
6168
+ method: "DELETE",
6169
+ body: JSON.stringify({ teamId, ...edgehancer }),
6170
+ expectNoContent: true
6171
+ });
6172
+ }
6173
+ };
6174
+
6175
+ // src/commands/integration/commands/definition/edgehancer/util.ts
6176
+ function withEdgehancerIdOptions(yargs32) {
6177
+ return yargs32.option("connectorType", {
6178
+ describe: "Integration data connector type to edgehance, as defined in the integration manifest file.",
6179
+ demandOption: true,
6180
+ type: "string"
6181
+ }).option("archetype", {
6182
+ describe: "Data connector archetype to edgehance. Must be defined within the connectorType.",
6183
+ demandOption: true,
6184
+ type: "string"
6185
+ }).option("hook", {
6186
+ describe: "Edgehancer hook to deploy to.",
6187
+ demandOption: true,
6188
+ choices: ["preRequest", "request"],
6189
+ type: "string"
6190
+ });
6191
+ }
6192
+
6193
+ // src/commands/integration/commands/definition/edgehancer/deploy.ts
6194
+ var IntegrationEdgehancerDeployModule = {
6195
+ command: "deploy <filename>",
6196
+ describe: "Registers a custom integration definition on a project. The API key used must have project admin permissions.",
6197
+ builder: (yargs32) => withConfiguration(
6198
+ withApiOptions(
6199
+ withTeamOptions(
6200
+ withEdgehancerIdOptions(
6201
+ yargs32.positional("filename", {
6202
+ demandOption: true,
6203
+ describe: "ESM code file to run for the target edgehancer hook. Refer to the documentation for expected types."
6204
+ })
6205
+ )
6206
+ )
6207
+ )
6208
+ ),
6209
+ handler: async ({ apiHost, apiKey, proxy, filename, team: teamId, archetype, connectorType, hook }) => {
6210
+ const fetch3 = nodeFetchProxy(proxy);
6211
+ const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch3, teamId });
6212
+ const code = readFileSync2(filename, "utf8");
6213
+ await client.deploy({ archetype, code, connectorType, hook });
6214
+ }
6215
+ };
6216
+
6217
+ // src/commands/integration/commands/definition/edgehancer/remove.ts
6218
+ var IntegrationEdgehancerRemoveModule = {
6219
+ command: "remove",
6220
+ 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.",
6221
+ builder: (yargs32) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs32)))),
6222
+ handler: async ({ apiHost, apiKey, proxy, team: teamId, archetype, connectorType, hook }) => {
6223
+ const fetch3 = nodeFetchProxy(proxy);
6224
+ const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch3, teamId });
6225
+ await client.remove({ archetype, connectorType, hook });
6226
+ }
6227
+ };
6228
+
6229
+ // src/commands/integration/commands/definition/edgehancer/edgehancer.ts
6230
+ var IntegrationEdgehancerModule = {
6231
+ command: "edgehancer <command>",
6232
+ describe: "Commands for managing custom integration edgehancers at the team level.",
6233
+ builder: (yargs32) => yargs32.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
6234
+ handler: () => {
6235
+ yargs20.help();
6236
+ }
6237
+ };
6238
+
6239
+ // src/commands/integration/commands/definition/DefinitionClient.ts
6240
+ import { createLimitPolicy as createLimitPolicy2 } from "@uniformdev/canvas";
6241
+ import { ApiClient as ApiClient2 } from "@uniformdev/context/api";
6242
+ var ENDPOINT2 = "/api/v1/integration-definitions";
6243
+ var DefinitionClient = class extends ApiClient2 {
6244
+ constructor(options) {
6245
+ if (!options.limitPolicy) {
6246
+ options.limitPolicy = createLimitPolicy2({});
6247
+ }
6248
+ super(options);
6249
+ this.options = options;
6250
+ }
6251
+ async register(manifest) {
6252
+ const { teamId } = this.options;
6253
+ const fetchUri = this.createUrl(ENDPOINT2);
6254
+ return await this.apiClient(fetchUri, {
6255
+ method: "PUT",
6256
+ body: JSON.stringify({ data: manifest, teamId }),
6257
+ expectNoContent: true
6258
+ });
6259
+ }
6260
+ async remove(integrationType) {
6261
+ const { teamId } = this.options;
6262
+ const fetchUri = this.createUrl(ENDPOINT2);
6263
+ return await this.apiClient(fetchUri, {
6264
+ method: "DELETE",
6265
+ body: JSON.stringify({ teamId, type: integrationType }),
6266
+ expectNoContent: true
6267
+ });
6268
+ }
6269
+ };
6270
+
6271
+ // src/commands/integration/commands/definition/register.ts
6272
+ var IntegrationDefinitionRegisterModule = {
6273
+ command: "register <filename>",
6274
+ describe: "Registers a custom integration definition on a project. The API key used must have project admin permissions.",
6275
+ builder: (yargs32) => withConfiguration(
6276
+ withApiOptions(
6277
+ withTeamOptions(
6278
+ yargs32.positional("filename", {
6279
+ demandOption: true,
6280
+ describe: "Integration definition manifest to register"
6281
+ })
6282
+ )
6283
+ )
6284
+ ),
6285
+ handler: async ({ apiHost, apiKey, proxy, filename, team: teamId }) => {
6286
+ const fetch3 = nodeFetchProxy(proxy);
6287
+ const client = new DefinitionClient({ apiKey, apiHost, fetch: fetch3, teamId });
6288
+ const file = readFileToObject(filename);
6289
+ await client.register(file);
6290
+ }
6291
+ };
6292
+
6293
+ // src/commands/integration/commands/definition/remove.ts
6294
+ var IntegrationDefinitionRemoveModule = {
6295
+ command: "remove <type>",
6296
+ 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.",
6297
+ builder: (yargs32) => withConfiguration(
6298
+ withApiOptions(
6299
+ withTeamOptions(
6300
+ yargs32.positional("type", {
6301
+ demandOption: true,
6302
+ describe: "Integration type (from its manifest) to remove."
6303
+ })
6304
+ )
6305
+ )
6306
+ ),
6307
+ handler: async ({ apiHost, apiKey, proxy, type, team: teamId }) => {
6308
+ const fetch3 = nodeFetchProxy(proxy);
6309
+ const client = new DefinitionClient({ apiKey, apiHost, fetch: fetch3, teamId });
6310
+ await client.remove(type);
6311
+ }
6312
+ };
6313
+
6314
+ // src/commands/integration/commands/definition.ts
6315
+ var IntegrationDefinitionModule = {
6316
+ command: "definition <command>",
6317
+ describe: "Commands for managing custom integration definitions at the team level.",
6318
+ builder: (yargs32) => yargs32.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).demandCommand(),
6319
+ handler: () => {
6320
+ yargs21.help();
6321
+ }
6322
+ };
6323
+
6324
+ // src/commands/integration/commands/InstallClient.ts
6325
+ import { createLimitPolicy as createLimitPolicy3 } from "@uniformdev/canvas";
6326
+ import { ApiClient as ApiClient3 } from "@uniformdev/context/api";
6327
+ var ENDPOINT3 = "/api/v1/integration-installations";
6328
+ var InstallClient = class extends ApiClient3 {
6329
+ constructor(options) {
6330
+ if (!options.limitPolicy) {
6331
+ options.limitPolicy = createLimitPolicy3({});
6332
+ }
6333
+ super(options);
6334
+ this.options = options;
6335
+ }
6336
+ async install(definition) {
6337
+ const { projectId } = this.options;
6338
+ const fetchUri = this.createUrl(ENDPOINT3);
6339
+ return await this.apiClient(fetchUri, {
6340
+ method: "PUT",
6341
+ body: JSON.stringify({ ...definition, projectId }),
6342
+ expectNoContent: true
6343
+ });
6344
+ }
6345
+ async remove(type) {
6346
+ const { projectId } = this.options;
6347
+ const fetchUri = this.createUrl(ENDPOINT3);
6348
+ return await this.apiClient(fetchUri, {
6349
+ method: "DELETE",
6350
+ body: JSON.stringify({ projectId, type }),
6351
+ expectNoContent: true
6352
+ });
6353
+ }
6354
+ };
6355
+
6356
+ // src/commands/integration/commands/install.ts
6357
+ var IntegrationInstallModule = {
6358
+ command: "install <type>",
6359
+ 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.",
6360
+ builder: (yargs32) => withConfiguration(
6361
+ withApiOptions(
6362
+ withProjectOptions(
6363
+ yargs32.positional("type", {
6364
+ demandOption: true,
6365
+ describe: "Integration type to install (as defined in its manifest)"
6366
+ }).option("configuration", {
6367
+ describe: "Optional JSON configuration data for the integration, to pre-configure it. The schema is specific to each integration.",
6368
+ type: "string"
6369
+ })
6370
+ )
6371
+ )
6372
+ ),
6373
+ handler: async ({ apiHost, apiKey, proxy, type, configuration: configuration2, project: projectId }) => {
6374
+ const fetch3 = nodeFetchProxy(proxy);
6375
+ const client = new InstallClient({ apiKey, apiHost, fetch: fetch3, projectId });
6376
+ const data = configuration2 ? JSON.parse(configuration2) : void 0;
6377
+ await client.install({ data, type });
6378
+ }
6379
+ };
6380
+
6381
+ // src/commands/integration/commands/uninstall.ts
6382
+ var IntegrationUninstallModule = {
6383
+ command: "uninstall <type>",
6384
+ describe: "Uninstalls an integration from a project. Existing usages of the integration may break.",
6385
+ builder: (yargs32) => withConfiguration(
6386
+ withApiOptions(
6387
+ withProjectOptions(
6388
+ yargs32.positional("type", {
6389
+ demandOption: true,
6390
+ describe: "Integration type to uninstall (as defined in its manifest)"
6391
+ })
6392
+ )
6393
+ )
6394
+ ),
6395
+ handler: async ({ apiHost, apiKey, proxy, type, project: projectId }) => {
6396
+ const fetch3 = nodeFetchProxy(proxy);
6397
+ const client = new InstallClient({ apiKey, apiHost, fetch: fetch3, projectId });
6398
+ await client.remove(type);
6399
+ }
6400
+ };
6401
+
6402
+ // src/commands/integration/index.ts
6403
+ var IntegrationCommand = {
6404
+ command: "integration <command>",
6405
+ describe: "Integration management commands",
6406
+ builder: (yargs32) => yargs32.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
6407
+ handler: () => {
6408
+ yargs22.showHelp();
6040
6409
  }
6041
6410
  };
6042
6411
 
@@ -6879,7 +7248,7 @@ npm run dev
6879
7248
  }
6880
7249
 
6881
7250
  // src/commands/new/commands/new-mesh-integration.ts
6882
- import { existsSync as existsSync3, mkdirSync as mkdirSync4, readdirSync, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
7251
+ import { existsSync as existsSync3, mkdirSync as mkdirSync4, readdirSync, readFileSync as readFileSync3, writeFileSync as writeFileSync2 } from "fs";
6883
7252
  import inquirer5 from "inquirer";
6884
7253
  import path4 from "path";
6885
7254
  import slugify2 from "slugify";
@@ -6926,13 +7295,13 @@ async function newMeshIntegrationHandler({
6926
7295
  if (!existsSync3(pathToManifest)) {
6927
7296
  throw new Error("Invalid integration starter cloned: missing `mesh-manifest.json`");
6928
7297
  }
6929
- const manifestContents = readFileSync2(pathToManifest, "utf-8");
7298
+ const manifestContents = readFileSync3(pathToManifest, "utf-8");
6930
7299
  const manifestJson = JSON.parse(manifestContents);
6931
7300
  manifestJson.type = typeSlug;
6932
7301
  manifestJson.displayName = name;
6933
7302
  writeFileSync2(pathToManifest, JSON.stringify(manifestJson, null, 2), "utf-8");
6934
7303
  const packageJsonPath = path4.resolve(targetDir, "package.json");
6935
- const packageJson = JSON.parse(readFileSync2(packageJsonPath, "utf-8"));
7304
+ const packageJson = JSON.parse(readFileSync3(packageJsonPath, "utf-8"));
6936
7305
  packageJson.name = typeSlug;
6937
7306
  writeFileSync2(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf-8");
6938
7307
  const fullMeshAppKey = await uniformClient.registerMeshIntegration({ teamId, manifest: manifestJson });
@@ -7074,10 +7443,10 @@ var NewMeshCmd = {
7074
7443
  };
7075
7444
 
7076
7445
  // src/commands/optimize/index.ts
7077
- import yargs20 from "yargs";
7446
+ import yargs24 from "yargs";
7078
7447
 
7079
7448
  // src/commands/optimize/manifest.ts
7080
- import yargs19 from "yargs";
7449
+ import yargs23 from "yargs";
7081
7450
 
7082
7451
  // src/commands/optimize/manifest/download.ts
7083
7452
  import { gray as gray4, green as green3, red as red5, yellow as yellow2 } from "colorette";
@@ -7092,7 +7461,7 @@ var UniformBaseUrl = "https://uniform.app";
7092
7461
  var module = {
7093
7462
  command: "download [output]",
7094
7463
  describe: "Download intent manifest",
7095
- builder: (yargs28) => yargs28.option("apiKey", {
7464
+ builder: (yargs32) => yargs32.option("apiKey", {
7096
7465
  alias: "k",
7097
7466
  demandOption: true,
7098
7467
  string: true,
@@ -7193,10 +7562,10 @@ var module2 = {
7193
7562
  command: "manifest <command>",
7194
7563
  describe: "Intent manifest commands",
7195
7564
  builder: () => {
7196
- return yargs19.command(download_default);
7565
+ return yargs23.command(download_default);
7197
7566
  },
7198
7567
  handler: () => {
7199
- yargs19.showHelp();
7568
+ yargs23.showHelp();
7200
7569
  }
7201
7570
  };
7202
7571
  var manifest_default = module2;
@@ -7207,29 +7576,29 @@ var OptimizeCommand = {
7207
7576
  aliases: ["opt"],
7208
7577
  describe: "Uniform Optimize commands",
7209
7578
  builder: () => {
7210
- return yargs20.command(manifest_default);
7579
+ return yargs24.command(manifest_default);
7211
7580
  },
7212
7581
  handler: () => {
7213
- yargs20.showHelp();
7582
+ yargs24.showHelp();
7214
7583
  }
7215
7584
  };
7216
7585
 
7217
7586
  // src/commands/project-map/index.ts
7218
- import yargs23 from "yargs";
7587
+ import yargs27 from "yargs";
7219
7588
 
7220
7589
  // src/commands/project-map/commands/projectMapDefinition.ts
7221
- import yargs21 from "yargs";
7590
+ import yargs25 from "yargs";
7222
7591
 
7223
7592
  // src/commands/project-map/commands/ProjectMapDefinition/get.ts
7224
7593
  import { UncachedProjectMapClient } from "@uniformdev/project-map";
7225
7594
  var ProjectMapDefinitionGetModule = {
7226
7595
  command: "get <id>",
7227
7596
  describe: "Fetch a project map",
7228
- builder: (yargs28) => withFormatOptions(
7597
+ builder: (yargs32) => withFormatOptions(
7229
7598
  withConfiguration(
7230
7599
  withApiOptions(
7231
7600
  withProjectOptions(
7232
- yargs28.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
7601
+ yargs32.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
7233
7602
  )
7234
7603
  )
7235
7604
  )
@@ -7253,7 +7622,7 @@ var ProjectMapDefinitionListModule = {
7253
7622
  command: "list",
7254
7623
  describe: "List of project maps",
7255
7624
  aliases: ["ls"],
7256
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
7625
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
7257
7626
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
7258
7627
  const fetch3 = nodeFetchProxy(proxy);
7259
7628
  const client = new UncachedProjectMapClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -7310,11 +7679,11 @@ function createProjectMapDefinitionEngineDataSource({
7310
7679
  var ProjectMapDefinitionPullModule = {
7311
7680
  command: "pull <directory>",
7312
7681
  describe: "Pulls all project maps to local files in a directory",
7313
- builder: (yargs28) => withConfiguration(
7682
+ builder: (yargs32) => withConfiguration(
7314
7683
  withApiOptions(
7315
7684
  withProjectOptions(
7316
7685
  withDiffOptions(
7317
- yargs28.positional("directory", {
7686
+ yargs32.positional("directory", {
7318
7687
  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.",
7319
7688
  type: "string"
7320
7689
  }).option("format", {
@@ -7391,11 +7760,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient4 } from "@uniformd
7391
7760
  var ProjectMapDefinitionPushModule = {
7392
7761
  command: "push <directory>",
7393
7762
  describe: "Pushes all project maps from files in a directory or package to Uniform",
7394
- builder: (yargs28) => withConfiguration(
7763
+ builder: (yargs32) => withConfiguration(
7395
7764
  withApiOptions(
7396
7765
  withProjectOptions(
7397
7766
  withDiffOptions(
7398
- yargs28.positional("directory", {
7767
+ yargs32.positional("directory", {
7399
7768
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
7400
7769
  type: "string"
7401
7770
  }).option("what-if", {
@@ -7461,9 +7830,9 @@ var ProjectMapDefinitionRemoveModule = {
7461
7830
  command: "remove <id>",
7462
7831
  aliases: ["delete", "rm"],
7463
7832
  describe: "Delete a project map",
7464
- builder: (yargs28) => withConfiguration(
7833
+ builder: (yargs32) => withConfiguration(
7465
7834
  withApiOptions(
7466
- withProjectOptions(yargs28.positional("id", { demandOption: true, describe: " UUID to delete" }))
7835
+ withProjectOptions(yargs32.positional("id", { demandOption: true, describe: " UUID to delete" }))
7467
7836
  )
7468
7837
  ),
7469
7838
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -7479,10 +7848,10 @@ var ProjectMapDefinitionUpdateModule = {
7479
7848
  command: "update <filename>",
7480
7849
  aliases: ["put"],
7481
7850
  describe: "Insert or update a project map",
7482
- builder: (yargs28) => withConfiguration(
7851
+ builder: (yargs32) => withConfiguration(
7483
7852
  withApiOptions(
7484
7853
  withProjectOptions(
7485
- yargs28.positional("filename", { demandOption: true, describe: "Project map file to put" })
7854
+ yargs32.positional("filename", { demandOption: true, describe: "Project map file to put" })
7486
7855
  )
7487
7856
  )
7488
7857
  ),
@@ -7498,25 +7867,25 @@ var ProjectMapDefinitionUpdateModule = {
7498
7867
  var ProjectMapDefinitionModule = {
7499
7868
  command: "definition <command>",
7500
7869
  describe: "Commands for ProjectMap Definitions",
7501
- builder: (yargs28) => yargs28.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
7870
+ builder: (yargs32) => yargs32.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
7502
7871
  handler: () => {
7503
- yargs21.help();
7872
+ yargs25.help();
7504
7873
  }
7505
7874
  };
7506
7875
 
7507
7876
  // src/commands/project-map/commands/projectMapNode.ts
7508
- import yargs22 from "yargs";
7877
+ import yargs26 from "yargs";
7509
7878
 
7510
7879
  // src/commands/project-map/commands/ProjectMapNode/get.ts
7511
7880
  import { UncachedProjectMapClient as UncachedProjectMapClient7 } from "@uniformdev/project-map";
7512
7881
  var ProjectMapNodeGetModule = {
7513
7882
  command: "get <id> <projectMapId>",
7514
7883
  describe: "Fetch a project map node",
7515
- builder: (yargs28) => withConfiguration(
7884
+ builder: (yargs32) => withConfiguration(
7516
7885
  withFormatOptions(
7517
7886
  withApiOptions(
7518
7887
  withProjectOptions(
7519
- yargs28.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
7888
+ yargs32.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
7520
7889
  )
7521
7890
  )
7522
7891
  )
@@ -7542,11 +7911,11 @@ var ProjectMapNodeListModule = {
7542
7911
  command: "list <projectMapId>",
7543
7912
  describe: "List project map nodes",
7544
7913
  aliases: ["ls"],
7545
- builder: (yargs28) => withConfiguration(
7914
+ builder: (yargs32) => withConfiguration(
7546
7915
  withFormatOptions(
7547
7916
  withApiOptions(
7548
7917
  withProjectOptions(
7549
- yargs28.positional("projectMapId", {
7918
+ yargs32.positional("projectMapId", {
7550
7919
  demandOption: true,
7551
7920
  describe: "ProjectMap UUID to fetch from"
7552
7921
  })
@@ -7617,11 +7986,11 @@ function createProjectMapNodeEngineDataSource({
7617
7986
  var ProjectMapNodePullModule = {
7618
7987
  command: "pull <directory>",
7619
7988
  describe: "Pulls all project maps nodes to local files in a directory",
7620
- builder: (yargs28) => withConfiguration(
7989
+ builder: (yargs32) => withConfiguration(
7621
7990
  withApiOptions(
7622
7991
  withProjectOptions(
7623
7992
  withDiffOptions(
7624
- yargs28.positional("directory", {
7993
+ yargs32.positional("directory", {
7625
7994
  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.",
7626
7995
  type: "string"
7627
7996
  }).option("format", {
@@ -7702,11 +8071,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient10 } from "@uniform
7702
8071
  var ProjectMapNodePushModule = {
7703
8072
  command: "push <directory>",
7704
8073
  describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
7705
- builder: (yargs28) => withConfiguration(
8074
+ builder: (yargs32) => withConfiguration(
7706
8075
  withApiOptions(
7707
8076
  withProjectOptions(
7708
8077
  withDiffOptions(
7709
- yargs28.positional("directory", {
8078
+ yargs32.positional("directory", {
7710
8079
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
7711
8080
  type: "string"
7712
8081
  }).option("what-if", {
@@ -7781,10 +8150,10 @@ var ProjectMapNodeRemoveModule = {
7781
8150
  command: "remove <id> <projectMapId>",
7782
8151
  aliases: ["delete", "rm"],
7783
8152
  describe: "Delete a project map node",
7784
- builder: (yargs28) => withConfiguration(
8153
+ builder: (yargs32) => withConfiguration(
7785
8154
  withApiOptions(
7786
8155
  withProjectOptions(
7787
- yargs28.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
8156
+ yargs32.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
7788
8157
  )
7789
8158
  )
7790
8159
  ),
@@ -7801,10 +8170,10 @@ var ProjectMapNodeUpdateModule = {
7801
8170
  command: "update <filename> <projectMapId>",
7802
8171
  aliases: ["put"],
7803
8172
  describe: "Insert or update a project map node",
7804
- builder: (yargs28) => withConfiguration(
8173
+ builder: (yargs32) => withConfiguration(
7805
8174
  withApiOptions(
7806
8175
  withProjectOptions(
7807
- yargs28.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
8176
+ yargs32.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
7808
8177
  )
7809
8178
  )
7810
8179
  ),
@@ -7820,9 +8189,9 @@ var ProjectMapNodeUpdateModule = {
7820
8189
  var ProjectMapNodeModule = {
7821
8190
  command: "node <command>",
7822
8191
  describe: "Commands for ProjectMap Nodes",
7823
- builder: (yargs28) => yargs28.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
8192
+ builder: (yargs32) => yargs32.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
7824
8193
  handler: () => {
7825
- yargs22.help();
8194
+ yargs26.help();
7826
8195
  }
7827
8196
  };
7828
8197
 
@@ -7831,28 +8200,28 @@ var ProjectMapCommand = {
7831
8200
  command: "project-map <command>",
7832
8201
  aliases: ["prm"],
7833
8202
  describe: "Uniform ProjectMap commands",
7834
- builder: (yargs28) => yargs28.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
8203
+ builder: (yargs32) => yargs32.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
7835
8204
  handler: () => {
7836
- yargs23.showHelp();
8205
+ yargs27.showHelp();
7837
8206
  }
7838
8207
  };
7839
8208
 
7840
8209
  // src/commands/redirect/index.ts
7841
- import yargs25 from "yargs";
8210
+ import yargs29 from "yargs";
7842
8211
 
7843
8212
  // src/commands/redirect/commands/redirect.ts
7844
- import yargs24 from "yargs";
8213
+ import yargs28 from "yargs";
7845
8214
 
7846
8215
  // src/commands/redirect/commands/RedirectDefinition/get.ts
7847
8216
  import { UncachedRedirectClient } from "@uniformdev/redirect";
7848
8217
  var RedirectDefinitionGetModule = {
7849
8218
  command: "get <id>",
7850
8219
  describe: "Fetch a redirect",
7851
- builder: (yargs28) => withConfiguration(
8220
+ builder: (yargs32) => withConfiguration(
7852
8221
  withFormatOptions(
7853
8222
  withApiOptions(
7854
8223
  withProjectOptions(
7855
- yargs28.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
8224
+ yargs32.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
7856
8225
  )
7857
8226
  )
7858
8227
  )
@@ -7876,7 +8245,7 @@ var RedirectDefinitionListModule = {
7876
8245
  command: "list",
7877
8246
  describe: "List of redirects",
7878
8247
  aliases: ["ls"],
7879
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
8248
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
7880
8249
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
7881
8250
  const fetch3 = nodeFetchProxy(proxy);
7882
8251
  const client = new UncachedRedirectClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -7942,11 +8311,11 @@ function createRedirectDefinitionEngineDataSource({
7942
8311
  var RedirectDefinitionPullModule = {
7943
8312
  command: "pull <directory>",
7944
8313
  describe: "Pulls all redirects to local files in a directory",
7945
- builder: (yargs28) => withConfiguration(
8314
+ builder: (yargs32) => withConfiguration(
7946
8315
  withApiOptions(
7947
8316
  withProjectOptions(
7948
8317
  withDiffOptions(
7949
- yargs28.positional("directory", {
8318
+ yargs32.positional("directory", {
7950
8319
  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.",
7951
8320
  type: "string"
7952
8321
  }).option("format", {
@@ -8024,11 +8393,11 @@ import { UncachedRedirectClient as UncachedRedirectClient4 } from "@uniformdev/r
8024
8393
  var RedirectDefinitionPushModule = {
8025
8394
  command: "push <directory>",
8026
8395
  describe: "Pushes all redirects from files in a directory or package to Uniform",
8027
- builder: (yargs28) => withConfiguration(
8396
+ builder: (yargs32) => withConfiguration(
8028
8397
  withApiOptions(
8029
8398
  withProjectOptions(
8030
8399
  withDiffOptions(
8031
- yargs28.positional("directory", {
8400
+ yargs32.positional("directory", {
8032
8401
  describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
8033
8402
  type: "string"
8034
8403
  }).option("what-if", {
@@ -8094,9 +8463,9 @@ var RedirectDefinitionRemoveModule = {
8094
8463
  command: "remove <id>",
8095
8464
  aliases: ["delete", "rm"],
8096
8465
  describe: "Delete a redirect",
8097
- builder: (yargs28) => withConfiguration(
8466
+ builder: (yargs32) => withConfiguration(
8098
8467
  withApiOptions(
8099
- withProjectOptions(yargs28.positional("id", { demandOption: true, describe: " UUID to delete" }))
8468
+ withProjectOptions(yargs32.positional("id", { demandOption: true, describe: " UUID to delete" }))
8100
8469
  )
8101
8470
  ),
8102
8471
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -8112,10 +8481,10 @@ var RedirectDefinitionUpdateModule = {
8112
8481
  command: "update <filename>",
8113
8482
  aliases: ["put"],
8114
8483
  describe: "Insert or update a redirect",
8115
- builder: (yargs28) => withConfiguration(
8484
+ builder: (yargs32) => withConfiguration(
8116
8485
  withApiOptions(
8117
8486
  withProjectOptions(
8118
- yargs28.positional("filename", { demandOption: true, describe: "Redirect file to put" })
8487
+ yargs32.positional("filename", { demandOption: true, describe: "Redirect file to put" })
8119
8488
  )
8120
8489
  )
8121
8490
  ),
@@ -8131,9 +8500,9 @@ var RedirectDefinitionUpdateModule = {
8131
8500
  var RedirectDefinitionModule = {
8132
8501
  command: "definition <command>",
8133
8502
  describe: "Commands for Redirect Definitions",
8134
- builder: (yargs28) => yargs28.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
8503
+ builder: (yargs32) => yargs32.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
8135
8504
  handler: () => {
8136
- yargs24.help();
8505
+ yargs28.help();
8137
8506
  }
8138
8507
  };
8139
8508
 
@@ -8142,14 +8511,14 @@ var RedirectCommand = {
8142
8511
  command: "redirect <command>",
8143
8512
  aliases: ["red"],
8144
8513
  describe: "Uniform Redirect commands",
8145
- builder: (yargs28) => yargs28.command(RedirectDefinitionModule).demandCommand(),
8514
+ builder: (yargs32) => yargs32.command(RedirectDefinitionModule).demandCommand(),
8146
8515
  handler: () => {
8147
- yargs25.showHelp();
8516
+ yargs29.showHelp();
8148
8517
  }
8149
8518
  };
8150
8519
 
8151
8520
  // src/commands/sync/index.ts
8152
- import yargs26 from "yargs";
8521
+ import yargs30 from "yargs";
8153
8522
 
8154
8523
  // src/commands/sync/commands/util.ts
8155
8524
  import ora2 from "ora";
@@ -8182,11 +8551,11 @@ function spin(entityType) {
8182
8551
  var SyncPullModule = {
8183
8552
  command: "pull",
8184
8553
  describe: "Pulls whole project to local files in a directory",
8185
- builder: (yargs28) => withConfiguration(
8554
+ builder: (yargs32) => withConfiguration(
8186
8555
  withApiOptions(
8187
8556
  withProjectOptions(
8188
8557
  withDiffOptions(
8189
- yargs28.option("what-if", {
8558
+ yargs32.option("what-if", {
8190
8559
  alias: ["w"],
8191
8560
  describe: "What-if mode reports what would be done but changes no files",
8192
8561
  default: false,
@@ -8280,11 +8649,11 @@ var getFormat = (entityType, config2) => {
8280
8649
  var SyncPushModule = {
8281
8650
  command: "push",
8282
8651
  describe: "Pushes whole project data from files in a directory or package to Uniform",
8283
- builder: (yargs28) => withConfiguration(
8652
+ builder: (yargs32) => withConfiguration(
8284
8653
  withApiOptions(
8285
8654
  withProjectOptions(
8286
8655
  withDiffOptions(
8287
- yargs28.option("what-if", {
8656
+ yargs32.option("what-if", {
8288
8657
  alias: ["w"],
8289
8658
  describe: "What-if mode reports what would be done but changes nothing",
8290
8659
  default: false,
@@ -8383,9 +8752,9 @@ var getFormat2 = (entityType, config2) => {
8383
8752
  var SyncCommand = {
8384
8753
  command: "sync <command>",
8385
8754
  describe: "Uniform Sync commands",
8386
- builder: (yargs28) => yargs28.command(SyncPullModule).command(SyncPushModule).demandCommand(),
8755
+ builder: (yargs32) => yargs32.command(SyncPullModule).command(SyncPushModule).demandCommand(),
8387
8756
  handler: () => {
8388
- yargs26.showHelp();
8757
+ yargs30.showHelp();
8389
8758
  }
8390
8759
  };
8391
8760
 
@@ -8397,18 +8766,19 @@ import { reset } from "colorette";
8397
8766
  function fillString(char, length) {
8398
8767
  return Array.from({ length }).map(() => char).join("");
8399
8768
  }
8769
+ var stdErrLog = (message) => process.stderr.write(message + "\n");
8400
8770
  function logCallout(options) {
8401
8771
  const message = typeof options === "string" ? options : options.message;
8402
8772
  const messageLines = message.trim().split("\n");
8403
8773
  const longestLine = messageLines.reduce((longest, next) => next.length > longest.length ? next : longest);
8404
8774
  const bar = "**" + fillString("*", reset(longestLine).length);
8405
- console.log("");
8406
- console.log(bar);
8775
+ stdErrLog("");
8776
+ stdErrLog(bar);
8407
8777
  for (const line of messageLines) {
8408
- console.log(` ${line}`);
8778
+ stdErrLog(` ${line}`);
8409
8779
  }
8410
- console.log(bar);
8411
- console.log("");
8780
+ stdErrLog(bar);
8781
+ stdErrLog("");
8412
8782
  }
8413
8783
 
8414
8784
  // src/updateCheck.ts
@@ -8651,7 +9021,7 @@ First found was: v${firstVersion}`;
8651
9021
 
8652
9022
  // src/index.ts
8653
9023
  dotenv.config();
8654
- var yarggery = yargs27(hideBin(process.argv));
9024
+ var yarggery = yargs31(hideBin(process.argv));
8655
9025
  var inlineConfigurationFilePath = "config" in yarggery.argv && yarggery.argv.config;
8656
9026
  var configuration = loadConfig(inlineConfigurationFilePath || null);
8657
9027
  yarggery.option("verbose", {
@@ -8660,4 +9030,4 @@ yarggery.option("verbose", {
8660
9030
  type: "boolean"
8661
9031
  }).scriptName("uniform").config(configuration).config("config", function() {
8662
9032
  return {};
8663
- }).command(CanvasCommand).command(ContextCommand).command(ProjectMapCommand).command(RedirectCommand).command(SyncCommand).command(NewCmd).command(NewMeshCmd).command(OptimizeCommand).demandCommand(1, "").strict().help().middleware([checkForUpdateMiddleware, checkLocalDepsVersions]).argv;
9033
+ }).command(CanvasCommand).command(ContextCommand).command(ProjectMapCommand).command(RedirectCommand).command(SyncCommand).command(NewCmd).command(NewMeshCmd).command(OptimizeCommand).command(IntegrationCommand).demandCommand(1, "").strict().help().middleware([checkForUpdateMiddleware, checkLocalDepsVersions]).argv;