@uniformdev/cli 19.106.1-alpha.3 → 19.106.2-alpha.4

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 +670 -300
  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 });
@@ -1015,8 +1024,8 @@ function prepCompositionForDisk(composition) {
1015
1024
  delete prepped.state;
1016
1025
  return prepped;
1017
1026
  }
1018
- function withStateOptions(yargs28) {
1019
- return yargs28.option("state", {
1027
+ function withStateOptions(yargs32) {
1028
+ return yargs32.option("state", {
1020
1029
  type: "string",
1021
1030
  describe: `Composition state to fetch.`,
1022
1031
  choices: ["preview", "published"],
@@ -1082,11 +1091,11 @@ function writeCanvasPackage(filename, packageContents) {
1082
1091
  var AssetPullModule = {
1083
1092
  command: "pull <directory>",
1084
1093
  describe: "Pulls all assets to local files in a directory",
1085
- builder: (yargs28) => withConfiguration(
1094
+ builder: (yargs32) => withConfiguration(
1086
1095
  withApiOptions(
1087
1096
  withProjectOptions(
1088
1097
  withDiffOptions(
1089
- yargs28.positional("directory", {
1098
+ yargs32.positional("directory", {
1090
1099
  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.",
1091
1100
  type: "string"
1092
1101
  }).option("format", {
@@ -1205,11 +1214,11 @@ import { UncachedFileClient as UncachedFileClient2 } from "@uniformdev/files";
1205
1214
  var AssetPushModule = {
1206
1215
  command: "push <directory>",
1207
1216
  describe: "Pushes all assets from files in a directory to Uniform",
1208
- builder: (yargs28) => withConfiguration(
1217
+ builder: (yargs32) => withConfiguration(
1209
1218
  withApiOptions(
1210
1219
  withProjectOptions(
1211
1220
  withDiffOptions(
1212
- yargs28.positional("directory", {
1221
+ yargs32.positional("directory", {
1213
1222
  describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
1214
1223
  type: "string"
1215
1224
  }).option("what-if", {
@@ -1309,9 +1318,9 @@ var AssetRemoveModule = {
1309
1318
  command: "remove <id>",
1310
1319
  aliases: ["delete", "rm"],
1311
1320
  describe: "Delete an asset",
1312
- builder: (yargs28) => withConfiguration(
1321
+ builder: (yargs32) => withConfiguration(
1313
1322
  withApiOptions(
1314
- withProjectOptions(yargs28.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
1323
+ withProjectOptions(yargs32.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
1315
1324
  )
1316
1325
  ),
1317
1326
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -1327,10 +1336,10 @@ var AssetUpdateModule = {
1327
1336
  command: "update <filename>",
1328
1337
  aliases: ["put"],
1329
1338
  describe: "Insert or update an asset",
1330
- builder: (yargs28) => withConfiguration(
1339
+ builder: (yargs32) => withConfiguration(
1331
1340
  withApiOptions(
1332
1341
  withProjectOptions(
1333
- yargs28.positional("filename", { demandOption: true, describe: "Asset file to put" })
1342
+ yargs32.positional("filename", { demandOption: true, describe: "Asset file to put" })
1334
1343
  )
1335
1344
  )
1336
1345
  ),
@@ -1346,7 +1355,7 @@ var AssetUpdateModule = {
1346
1355
  var AssetModule = {
1347
1356
  command: "asset <command>",
1348
1357
  describe: "Commands for Assets",
1349
- builder: (yargs28) => yargs28.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
1358
+ builder: (yargs32) => yargs32.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
1350
1359
  handler: () => {
1351
1360
  yargs.help();
1352
1361
  }
@@ -1360,11 +1369,11 @@ import { UncachedCategoryClient } from "@uniformdev/canvas";
1360
1369
  var CategoryGetModule = {
1361
1370
  command: "get <id>",
1362
1371
  describe: "Fetch a category",
1363
- builder: (yargs28) => withConfiguration(
1372
+ builder: (yargs32) => withConfiguration(
1364
1373
  withFormatOptions(
1365
1374
  withApiOptions(
1366
1375
  withProjectOptions(
1367
- yargs28.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
1376
+ yargs32.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
1368
1377
  )
1369
1378
  )
1370
1379
  )
@@ -1389,7 +1398,7 @@ var CategoryListModule = {
1389
1398
  command: "list",
1390
1399
  describe: "List categories",
1391
1400
  aliases: ["ls"],
1392
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28.options({}))))),
1401
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32.options({}))))),
1393
1402
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
1394
1403
  const fetch3 = nodeFetchProxy(proxy);
1395
1404
  const client = new UncachedCategoryClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -1438,11 +1447,11 @@ function createCategoriesEngineDataSource({
1438
1447
  var CategoryPullModule = {
1439
1448
  command: "pull <directory>",
1440
1449
  describe: "Pulls all categories to local files in a directory",
1441
- builder: (yargs28) => withConfiguration(
1450
+ builder: (yargs32) => withConfiguration(
1442
1451
  withApiOptions(
1443
1452
  withProjectOptions(
1444
1453
  withDiffOptions(
1445
- yargs28.positional("directory", {
1454
+ yargs32.positional("directory", {
1446
1455
  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.",
1447
1456
  type: "string"
1448
1457
  }).option("format", {
@@ -1519,11 +1528,11 @@ import { UncachedCategoryClient as UncachedCategoryClient4 } from "@uniformdev/c
1519
1528
  var CategoryPushModule = {
1520
1529
  command: "push <directory>",
1521
1530
  describe: "Pushes all categories from files in a directory to Uniform Canvas",
1522
- builder: (yargs28) => withConfiguration(
1531
+ builder: (yargs32) => withConfiguration(
1523
1532
  withApiOptions(
1524
1533
  withProjectOptions(
1525
1534
  withDiffOptions(
1526
- yargs28.positional("directory", {
1535
+ yargs32.positional("directory", {
1527
1536
  describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
1528
1537
  type: "string"
1529
1538
  }).option("what-if", {
@@ -1589,10 +1598,10 @@ var CategoryRemoveModule = {
1589
1598
  command: "remove <id>",
1590
1599
  aliases: ["delete", "rm"],
1591
1600
  describe: "Delete a category",
1592
- builder: (yargs28) => withConfiguration(
1601
+ builder: (yargs32) => withConfiguration(
1593
1602
  withApiOptions(
1594
1603
  withProjectOptions(
1595
- yargs28.positional("id", { demandOption: true, describe: "Category UUID to delete" })
1604
+ yargs32.positional("id", { demandOption: true, describe: "Category UUID to delete" })
1596
1605
  )
1597
1606
  )
1598
1607
  ),
@@ -1609,10 +1618,10 @@ var CategoryUpdateModule = {
1609
1618
  command: "update <filename>",
1610
1619
  aliases: ["put"],
1611
1620
  describe: "Insert or update a category",
1612
- builder: (yargs28) => withConfiguration(
1621
+ builder: (yargs32) => withConfiguration(
1613
1622
  withApiOptions(
1614
1623
  withProjectOptions(
1615
- yargs28.positional("filename", { demandOption: true, describe: "Category file to put" })
1624
+ yargs32.positional("filename", { demandOption: true, describe: "Category file to put" })
1616
1625
  )
1617
1626
  )
1618
1627
  ),
@@ -1629,7 +1638,7 @@ var CategoryModule = {
1629
1638
  command: "category <command>",
1630
1639
  aliases: ["cat"],
1631
1640
  describe: "Commands for Canvas categories",
1632
- builder: (yargs28) => yargs28.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
1641
+ builder: (yargs32) => yargs32.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
1633
1642
  handler: () => {
1634
1643
  yargs2.help();
1635
1644
  }
@@ -1650,11 +1659,11 @@ var selectSchemaUrl = () => "/schemas/json-schema/component-definition/v1.json";
1650
1659
  var ComponentGetModule = {
1651
1660
  command: "get <id>",
1652
1661
  describe: "Fetch a component definition",
1653
- builder: (yargs28) => withConfiguration(
1662
+ builder: (yargs32) => withConfiguration(
1654
1663
  withFormatOptions(
1655
1664
  withApiOptions(
1656
1665
  withProjectOptions(
1657
- yargs28.positional("id", {
1666
+ yargs32.positional("id", {
1658
1667
  demandOption: true,
1659
1668
  describe: "Component definition public ID to fetch"
1660
1669
  })
@@ -1688,11 +1697,11 @@ var ComponentListModule = {
1688
1697
  command: "list",
1689
1698
  describe: "List component definitions",
1690
1699
  aliases: ["ls"],
1691
- builder: (yargs28) => withConfiguration(
1700
+ builder: (yargs32) => withConfiguration(
1692
1701
  withFormatOptions(
1693
1702
  withApiOptions(
1694
1703
  withProjectOptions(
1695
- yargs28.options({
1704
+ yargs32.options({
1696
1705
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
1697
1706
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
1698
1707
  })
@@ -1747,11 +1756,11 @@ function createComponentDefinitionEngineDataSource({
1747
1756
  var ComponentPullModule = {
1748
1757
  command: "pull <directory>",
1749
1758
  describe: "Pulls all component definitions to local files in a directory",
1750
- builder: (yargs28) => withConfiguration(
1759
+ builder: (yargs32) => withConfiguration(
1751
1760
  withApiOptions(
1752
1761
  withProjectOptions(
1753
1762
  withDiffOptions(
1754
- yargs28.positional("directory", {
1763
+ yargs32.positional("directory", {
1755
1764
  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.",
1756
1765
  type: "string"
1757
1766
  }).option("format", {
@@ -1829,11 +1838,11 @@ import { UncachedCanvasClient as UncachedCanvasClient4 } from "@uniformdev/canva
1829
1838
  var ComponentPushModule = {
1830
1839
  command: "push <directory>",
1831
1840
  describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
1832
- builder: (yargs28) => withConfiguration(
1841
+ builder: (yargs32) => withConfiguration(
1833
1842
  withApiOptions(
1834
1843
  withProjectOptions(
1835
1844
  withDiffOptions(
1836
- yargs28.positional("directory", {
1845
+ yargs32.positional("directory", {
1837
1846
  describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
1838
1847
  type: "string"
1839
1848
  }).option("what-if", {
@@ -1900,10 +1909,10 @@ var ComponentRemoveModule = {
1900
1909
  command: "remove <id>",
1901
1910
  aliases: ["delete", "rm"],
1902
1911
  describe: "Delete a component definition",
1903
- builder: (yargs28) => withConfiguration(
1912
+ builder: (yargs32) => withConfiguration(
1904
1913
  withApiOptions(
1905
1914
  withProjectOptions(
1906
- yargs28.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1915
+ yargs32.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1907
1916
  )
1908
1917
  )
1909
1918
  ),
@@ -1920,10 +1929,10 @@ var ComponentUpdateModule = {
1920
1929
  command: "update <filename>",
1921
1930
  aliases: ["put"],
1922
1931
  describe: "Insert or update a component definition",
1923
- builder: (yargs28) => withConfiguration(
1932
+ builder: (yargs32) => withConfiguration(
1924
1933
  withApiOptions(
1925
1934
  withProjectOptions(
1926
- yargs28.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1935
+ yargs32.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1927
1936
  )
1928
1937
  )
1929
1938
  ),
@@ -1940,7 +1949,7 @@ var ComponentModule = {
1940
1949
  command: "component <command>",
1941
1950
  aliases: ["def"],
1942
1951
  describe: "Commands for Canvas component definitions",
1943
- builder: (yargs28) => yargs28.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
1952
+ builder: (yargs32) => yargs32.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
1944
1953
  handler: () => {
1945
1954
  yargs3.help();
1946
1955
  }
@@ -1954,12 +1963,12 @@ import { UncachedCanvasClient as UncachedCanvasClient7 } from "@uniformdev/canva
1954
1963
  var CompositionGetModule = {
1955
1964
  command: "get <id>",
1956
1965
  describe: "Fetch a composition",
1957
- builder: (yargs28) => withFormatOptions(
1966
+ builder: (yargs32) => withFormatOptions(
1958
1967
  withConfiguration(
1959
1968
  withApiOptions(
1960
1969
  withProjectOptions(
1961
1970
  withStateOptions(
1962
- yargs28.positional("id", { demandOption: true, describe: "Composition/pattern public ID to fetch" }).option({
1971
+ yargs32.positional("id", { demandOption: true, describe: "Composition/pattern public ID to fetch" }).option({
1963
1972
  resolvePatterns: {
1964
1973
  type: "boolean",
1965
1974
  default: false,
@@ -2030,12 +2039,12 @@ var CompositionListModule = {
2030
2039
  command: "list",
2031
2040
  describe: "List compositions",
2032
2041
  aliases: ["ls"],
2033
- builder: (yargs28) => withFormatOptions(
2042
+ builder: (yargs32) => withFormatOptions(
2034
2043
  withConfiguration(
2035
2044
  withApiOptions(
2036
2045
  withProjectOptions(
2037
2046
  withStateOptions(
2038
- yargs28.options({
2047
+ yargs32.options({
2039
2048
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
2040
2049
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
2041
2050
  resolvePatterns: {
@@ -2156,11 +2165,11 @@ function createComponentInstanceEngineDataSource({
2156
2165
  var CompositionPublishModule = {
2157
2166
  command: "publish [ids]",
2158
2167
  describe: "Publishes composition(s)",
2159
- builder: (yargs28) => withConfiguration(
2168
+ builder: (yargs32) => withConfiguration(
2160
2169
  withApiOptions(
2161
2170
  withProjectOptions(
2162
2171
  withDiffOptions(
2163
- yargs28.positional("ids", {
2172
+ yargs32.positional("ids", {
2164
2173
  describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
2165
2174
  type: "string"
2166
2175
  }).option("all", {
@@ -2236,12 +2245,12 @@ import { UncachedFileClient as UncachedFileClient3 } from "@uniformdev/files";
2236
2245
  var CompositionPullModule = {
2237
2246
  command: "pull <directory>",
2238
2247
  describe: "Pulls all compositions to local files in a directory",
2239
- builder: (yargs28) => withConfiguration(
2248
+ builder: (yargs32) => withConfiguration(
2240
2249
  withApiOptions(
2241
2250
  withProjectOptions(
2242
2251
  withStateOptions(
2243
2252
  withDiffOptions(
2244
- yargs28.positional("directory", {
2253
+ yargs32.positional("directory", {
2245
2254
  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.",
2246
2255
  type: "string"
2247
2256
  }).option("format", {
@@ -2345,12 +2354,12 @@ import { UncachedFileClient as UncachedFileClient4 } from "@uniformdev/files";
2345
2354
  var CompositionPushModule = {
2346
2355
  command: "push <directory>",
2347
2356
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
2348
- builder: (yargs28) => withConfiguration(
2357
+ builder: (yargs32) => withConfiguration(
2349
2358
  withApiOptions(
2350
2359
  withProjectOptions(
2351
2360
  withStateOptions(
2352
2361
  withDiffOptions(
2353
- yargs28.positional("directory", {
2362
+ yargs32.positional("directory", {
2354
2363
  describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
2355
2364
  type: "string"
2356
2365
  }).option("what-if", {
@@ -2441,10 +2450,10 @@ var CompositionRemoveModule = {
2441
2450
  command: "remove <id>",
2442
2451
  aliases: ["delete", "rm"],
2443
2452
  describe: "Delete a composition",
2444
- builder: (yargs28) => withConfiguration(
2453
+ builder: (yargs32) => withConfiguration(
2445
2454
  withApiOptions(
2446
2455
  withProjectOptions(
2447
- yargs28.positional("id", { demandOption: true, describe: "Composition/pattern public ID to delete" })
2456
+ yargs32.positional("id", { demandOption: true, describe: "Composition/pattern public ID to delete" })
2448
2457
  )
2449
2458
  )
2450
2459
  ),
@@ -2461,10 +2470,10 @@ import { diffJson as diffJson2 } from "diff";
2461
2470
  var CompositionUnpublishModule = {
2462
2471
  command: "unpublish [ids]",
2463
2472
  describe: "Unpublish a composition(s)",
2464
- builder: (yargs28) => withConfiguration(
2473
+ builder: (yargs32) => withConfiguration(
2465
2474
  withApiOptions(
2466
2475
  withProjectOptions(
2467
- yargs28.positional("ids", {
2476
+ yargs32.positional("ids", {
2468
2477
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
2469
2478
  type: "string"
2470
2479
  }).option("all", {
@@ -2558,11 +2567,11 @@ var CompositionUpdateModule = {
2558
2567
  command: "update <filename>",
2559
2568
  aliases: ["put"],
2560
2569
  describe: "Insert or update a composition",
2561
- builder: (yargs28) => withConfiguration(
2570
+ builder: (yargs32) => withConfiguration(
2562
2571
  withApiOptions(
2563
2572
  withProjectOptions(
2564
2573
  withStateOptions(
2565
- yargs28.positional("filename", { demandOption: true, describe: "Composition/pattern file to put" })
2574
+ yargs32.positional("filename", { demandOption: true, describe: "Composition/pattern file to put" })
2566
2575
  )
2567
2576
  )
2568
2577
  )
@@ -2580,7 +2589,7 @@ var CompositionModule = {
2580
2589
  command: "composition <command>",
2581
2590
  describe: "Commands for Canvas compositions",
2582
2591
  aliases: ["comp"],
2583
- builder: (yargs28) => yargs28.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
2592
+ builder: (yargs32) => yargs32.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
2584
2593
  handler: () => {
2585
2594
  yargs4.help();
2586
2595
  }
@@ -2594,12 +2603,12 @@ import { ContentClient } from "@uniformdev/canvas";
2594
2603
  var ContentTypeGetModule = {
2595
2604
  command: "get <id>",
2596
2605
  describe: "Get a content type",
2597
- builder: (yargs28) => withConfiguration(
2606
+ builder: (yargs32) => withConfiguration(
2598
2607
  withFormatOptions(
2599
2608
  withApiOptions(
2600
2609
  withProjectOptions(
2601
2610
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2602
- yargs28.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
2611
+ yargs32.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
2603
2612
  )
2604
2613
  )
2605
2614
  )
@@ -2621,7 +2630,7 @@ import { ContentClient as ContentClient2 } from "@uniformdev/canvas";
2621
2630
  var ContentTypeListModule = {
2622
2631
  command: "list",
2623
2632
  describe: "List content types",
2624
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
2633
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
2625
2634
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2626
2635
  const fetch3 = nodeFetchProxy(proxy);
2627
2636
  const client = new ContentClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -2668,11 +2677,11 @@ function createContentTypeEngineDataSource({
2668
2677
  var ContentTypePullModule = {
2669
2678
  command: "pull <directory>",
2670
2679
  describe: "Pulls all content types to local files in a directory",
2671
- builder: (yargs28) => withConfiguration(
2680
+ builder: (yargs32) => withConfiguration(
2672
2681
  withApiOptions(
2673
2682
  withProjectOptions(
2674
2683
  withDiffOptions(
2675
- yargs28.positional("directory", {
2684
+ yargs32.positional("directory", {
2676
2685
  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.",
2677
2686
  type: "string"
2678
2687
  }).option("format", {
@@ -2755,11 +2764,11 @@ import { ContentClient as ContentClient4 } from "@uniformdev/canvas";
2755
2764
  var ContentTypePushModule = {
2756
2765
  command: "push <directory>",
2757
2766
  describe: "Pushes all content types from files in a directory to Uniform",
2758
- builder: (yargs28) => withConfiguration(
2767
+ builder: (yargs32) => withConfiguration(
2759
2768
  withApiOptions(
2760
2769
  withProjectOptions(
2761
2770
  withDiffOptions(
2762
- yargs28.positional("directory", {
2771
+ yargs32.positional("directory", {
2763
2772
  describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
2764
2773
  type: "string"
2765
2774
  }).option("what-if", {
@@ -2831,10 +2840,10 @@ var ContentTypeRemoveModule = {
2831
2840
  command: "remove <id>",
2832
2841
  aliases: ["delete", "rm"],
2833
2842
  describe: "Delete a content type",
2834
- builder: (yargs28) => withConfiguration(
2843
+ builder: (yargs32) => withConfiguration(
2835
2844
  withApiOptions(
2836
2845
  withProjectOptions(
2837
- yargs28.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
2846
+ yargs32.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
2838
2847
  )
2839
2848
  )
2840
2849
  ),
@@ -2851,10 +2860,10 @@ var ContentTypeUpdateModule = {
2851
2860
  command: "update <filename>",
2852
2861
  aliases: ["put"],
2853
2862
  describe: "Insert or update a content type",
2854
- builder: (yargs28) => withConfiguration(
2863
+ builder: (yargs32) => withConfiguration(
2855
2864
  withApiOptions(
2856
2865
  withProjectOptions(
2857
- yargs28.positional("filename", { demandOption: true, describe: "Content type file to put" })
2866
+ yargs32.positional("filename", { demandOption: true, describe: "Content type file to put" })
2858
2867
  )
2859
2868
  )
2860
2869
  ),
@@ -2871,27 +2880,106 @@ var ContentTypeModule = {
2871
2880
  command: "contenttype <command>",
2872
2881
  aliases: ["ct"],
2873
2882
  describe: "Commands for Content Types",
2874
- builder: (yargs28) => yargs28.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
2883
+ builder: (yargs32) => yargs32.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
2875
2884
  handler: () => {
2876
2885
  yargs5.help();
2877
2886
  }
2878
2887
  };
2879
2888
 
2880
- // src/commands/canvas/commands/dataType.ts
2889
+ // src/commands/canvas/commands/dataSource.ts
2881
2890
  import yargs6 from "yargs";
2882
2891
 
2892
+ // src/commands/canvas/commands/dataSource/get.ts
2893
+ import { DataSourceClient } from "@uniformdev/canvas";
2894
+ var DataSourceGetModule = {
2895
+ command: "get <id>",
2896
+ describe: "Get a data source by ID and writes to stdout. Please note this may contain secret data, use discretion.",
2897
+ builder: (yargs32) => withConfiguration(
2898
+ withApiOptions(
2899
+ withProjectOptions(
2900
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2901
+ yargs32.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
2902
+ )
2903
+ )
2904
+ ),
2905
+ handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
2906
+ const fetch3 = nodeFetchProxy(proxy);
2907
+ const client = new DataSourceClient({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
2908
+ const res = await client.get({ dataSourceId: id });
2909
+ emitWithFormat(res.result, "json", void 0);
2910
+ }
2911
+ };
2912
+
2913
+ // src/commands/canvas/commands/dataSource/remove.ts
2914
+ import { DataSourceClient as DataSourceClient2 } from "@uniformdev/canvas";
2915
+ var DataSourceRemoveModule = {
2916
+ command: "remove <id>",
2917
+ aliases: ["delete", "rm"],
2918
+ describe: "Delete a data source",
2919
+ builder: (yargs32) => withConfiguration(
2920
+ withApiOptions(
2921
+ withProjectOptions(
2922
+ yargs32.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
2923
+ )
2924
+ )
2925
+ ),
2926
+ handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
2927
+ const fetch3 = nodeFetchProxy(proxy);
2928
+ const client = new DataSourceClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
2929
+ await client.remove({ dataSourceId: id });
2930
+ }
2931
+ };
2932
+
2933
+ // src/commands/canvas/commands/dataSource/update.ts
2934
+ import { DataSourceClient as DataSourceClient3 } from "@uniformdev/canvas";
2935
+ var DataSourceUpdateModule = {
2936
+ command: "update <dataSource>",
2937
+ aliases: ["put"],
2938
+ describe: "Insert or update a data source",
2939
+ builder: (yargs32) => withConfiguration(
2940
+ withApiOptions(
2941
+ withProjectOptions(
2942
+ yargs32.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
2943
+ describe: "Integration type that exposes the connector type for this data source (as defined in integration manifest).",
2944
+ type: "string",
2945
+ demandOption: true
2946
+ })
2947
+ )
2948
+ )
2949
+ ),
2950
+ handler: async ({ apiHost, apiKey, proxy, dataSource, integrationType, project: projectId }) => {
2951
+ const fetch3 = nodeFetchProxy(proxy);
2952
+ const client = new DataSourceClient3({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
2953
+ await client.upsert({ data: JSON.parse(dataSource), integrationType });
2954
+ }
2955
+ };
2956
+
2957
+ // src/commands/canvas/commands/dataSource.ts
2958
+ var DataSourceModule = {
2959
+ command: "datasource <command>",
2960
+ aliases: ["ds"],
2961
+ describe: "Commands for Data Source definitions",
2962
+ builder: (yargs32) => yargs32.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
2963
+ handler: () => {
2964
+ yargs6.help();
2965
+ }
2966
+ };
2967
+
2968
+ // src/commands/canvas/commands/dataType.ts
2969
+ import yargs7 from "yargs";
2970
+
2883
2971
  // src/commands/canvas/commands/dataType/get.ts
2884
2972
  import { DataTypeClient } from "@uniformdev/canvas";
2885
2973
  var DataTypeGetModule = {
2886
2974
  command: "get <id>",
2887
2975
  describe: "Get a data type",
2888
2976
  aliases: ["ls"],
2889
- builder: (yargs28) => withConfiguration(
2977
+ builder: (yargs32) => withConfiguration(
2890
2978
  withFormatOptions(
2891
2979
  withApiOptions(
2892
2980
  withProjectOptions(
2893
2981
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2894
- yargs28.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
2982
+ yargs32.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
2895
2983
  )
2896
2984
  )
2897
2985
  )
@@ -2914,7 +3002,7 @@ var DataTypeListModule = {
2914
3002
  command: "list",
2915
3003
  describe: "List data types",
2916
3004
  aliases: ["ls"],
2917
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
3005
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
2918
3006
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2919
3007
  const fetch3 = nodeFetchProxy(proxy);
2920
3008
  const client = new DataTypeClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -2963,11 +3051,11 @@ function createDataTypeEngineDataSource({
2963
3051
  var DataTypePullModule = {
2964
3052
  command: "pull <directory>",
2965
3053
  describe: "Pulls all data types to local files in a directory",
2966
- builder: (yargs28) => withConfiguration(
3054
+ builder: (yargs32) => withConfiguration(
2967
3055
  withApiOptions(
2968
3056
  withProjectOptions(
2969
3057
  withDiffOptions(
2970
- yargs28.positional("directory", {
3058
+ yargs32.positional("directory", {
2971
3059
  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.",
2972
3060
  type: "string"
2973
3061
  }).option("format", {
@@ -3050,11 +3138,11 @@ import { DataTypeClient as DataTypeClient4 } from "@uniformdev/canvas";
3050
3138
  var DataTypePushModule = {
3051
3139
  command: "push <directory>",
3052
3140
  describe: "Pushes all data types from files in a directory to Uniform",
3053
- builder: (yargs28) => withConfiguration(
3141
+ builder: (yargs32) => withConfiguration(
3054
3142
  withApiOptions(
3055
3143
  withProjectOptions(
3056
3144
  withDiffOptions(
3057
- yargs28.positional("directory", {
3145
+ yargs32.positional("directory", {
3058
3146
  describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
3059
3147
  type: "string"
3060
3148
  }).option("what-if", {
@@ -3126,10 +3214,10 @@ var DataTypeRemoveModule = {
3126
3214
  command: "remove <id>",
3127
3215
  aliases: ["delete", "rm"],
3128
3216
  describe: "Delete a data type",
3129
- builder: (yargs28) => withConfiguration(
3217
+ builder: (yargs32) => withConfiguration(
3130
3218
  withApiOptions(
3131
3219
  withProjectOptions(
3132
- yargs28.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
3220
+ yargs32.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
3133
3221
  )
3134
3222
  )
3135
3223
  ),
@@ -3146,10 +3234,10 @@ var DataTypeUpdateModule = {
3146
3234
  command: "update <filename>",
3147
3235
  aliases: ["put"],
3148
3236
  describe: "Insert or update a data type",
3149
- builder: (yargs28) => withConfiguration(
3237
+ builder: (yargs32) => withConfiguration(
3150
3238
  withApiOptions(
3151
3239
  withProjectOptions(
3152
- yargs28.positional("filename", { demandOption: true, describe: "Data type file to put" })
3240
+ yargs32.positional("filename", { demandOption: true, describe: "Data type file to put" })
3153
3241
  )
3154
3242
  )
3155
3243
  ),
@@ -3166,26 +3254,26 @@ var DataTypeModule = {
3166
3254
  command: "datatype <command>",
3167
3255
  aliases: ["dt"],
3168
3256
  describe: "Commands for Data Type definitions",
3169
- builder: (yargs28) => yargs28.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
3257
+ builder: (yargs32) => yargs32.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
3170
3258
  handler: () => {
3171
- yargs6.help();
3259
+ yargs7.help();
3172
3260
  }
3173
3261
  };
3174
3262
 
3175
3263
  // src/commands/canvas/commands/entry.ts
3176
- import yargs7 from "yargs";
3264
+ import yargs8 from "yargs";
3177
3265
 
3178
3266
  // src/commands/canvas/commands/entry/get.ts
3179
3267
  import { ContentClient as ContentClient7 } from "@uniformdev/canvas";
3180
3268
  var EntryGetModule = {
3181
3269
  command: "get <id>",
3182
3270
  describe: "Get an entry",
3183
- builder: (yargs28) => withConfiguration(
3271
+ builder: (yargs32) => withConfiguration(
3184
3272
  withFormatOptions(
3185
3273
  withApiOptions(
3186
3274
  withProjectOptions(
3187
3275
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3188
- yargs28.positional("id", { demandOption: true, describe: "Entry public ID to fetch" })
3276
+ yargs32.positional("id", { demandOption: true, describe: "Entry public ID to fetch" })
3189
3277
  )
3190
3278
  )
3191
3279
  )
@@ -3213,7 +3301,7 @@ import { ContentClient as ContentClient8 } from "@uniformdev/canvas";
3213
3301
  var EntryListModule = {
3214
3302
  command: "list",
3215
3303
  describe: "List entries",
3216
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
3304
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
3217
3305
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3218
3306
  const fetch3 = nodeFetchProxy(proxy);
3219
3307
  const client = new ContentClient8({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -3287,11 +3375,11 @@ function createEntryEngineDataSource({
3287
3375
  var EntryPublishModule = {
3288
3376
  command: "publish [ids]",
3289
3377
  describe: "Publishes entry(ies)",
3290
- builder: (yargs28) => withConfiguration(
3378
+ builder: (yargs32) => withConfiguration(
3291
3379
  withApiOptions(
3292
3380
  withProjectOptions(
3293
3381
  withDiffOptions(
3294
- yargs28.positional("ids", {
3382
+ yargs32.positional("ids", {
3295
3383
  describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
3296
3384
  type: "string"
3297
3385
  }).option("all", {
@@ -3367,12 +3455,12 @@ import { UncachedFileClient as UncachedFileClient5 } from "@uniformdev/files";
3367
3455
  var EntryPullModule = {
3368
3456
  command: "pull <directory>",
3369
3457
  describe: "Pulls all entries to local files in a directory",
3370
- builder: (yargs28) => withConfiguration(
3458
+ builder: (yargs32) => withConfiguration(
3371
3459
  withApiOptions(
3372
3460
  withProjectOptions(
3373
3461
  withStateOptions(
3374
3462
  withDiffOptions(
3375
- yargs28.positional("directory", {
3463
+ yargs32.positional("directory", {
3376
3464
  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.",
3377
3465
  type: "string"
3378
3466
  }).option("format", {
@@ -3471,12 +3559,12 @@ import { UncachedFileClient as UncachedFileClient6 } from "@uniformdev/files";
3471
3559
  var EntryPushModule = {
3472
3560
  command: "push <directory>",
3473
3561
  describe: "Pushes all entries from files in a directory to Uniform",
3474
- builder: (yargs28) => withConfiguration(
3562
+ builder: (yargs32) => withConfiguration(
3475
3563
  withApiOptions(
3476
3564
  withProjectOptions(
3477
3565
  withStateOptions(
3478
3566
  withDiffOptions(
3479
- yargs28.positional("directory", {
3567
+ yargs32.positional("directory", {
3480
3568
  describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
3481
3569
  type: "string"
3482
3570
  }).option("what-if", {
@@ -3562,10 +3650,10 @@ var EntryRemoveModule = {
3562
3650
  command: "remove <id>",
3563
3651
  aliases: ["delete", "rm"],
3564
3652
  describe: "Delete an entry",
3565
- builder: (yargs28) => withConfiguration(
3653
+ builder: (yargs32) => withConfiguration(
3566
3654
  withApiOptions(
3567
3655
  withProjectOptions(
3568
- yargs28.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
3656
+ yargs32.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
3569
3657
  )
3570
3658
  )
3571
3659
  ),
@@ -3582,10 +3670,10 @@ import { diffJson as diffJson3 } from "diff";
3582
3670
  var EntryUnpublishModule = {
3583
3671
  command: "unpublish [ids]",
3584
3672
  describe: "Unpublish an entry(ies)",
3585
- builder: (yargs28) => withConfiguration(
3673
+ builder: (yargs32) => withConfiguration(
3586
3674
  withApiOptions(
3587
3675
  withProjectOptions(
3588
- yargs28.positional("ids", {
3676
+ yargs32.positional("ids", {
3589
3677
  describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
3590
3678
  type: "string"
3591
3679
  }).option("all", {
@@ -3679,10 +3767,10 @@ var EntryUpdateModule = {
3679
3767
  command: "update <filename>",
3680
3768
  aliases: ["put"],
3681
3769
  describe: "Insert or update an entry",
3682
- builder: (yargs28) => withConfiguration(
3770
+ builder: (yargs32) => withConfiguration(
3683
3771
  withApiOptions(
3684
3772
  withProjectOptions(
3685
- yargs28.positional("filename", { demandOption: true, describe: "Entry file to put" })
3773
+ yargs32.positional("filename", { demandOption: true, describe: "Entry file to put" })
3686
3774
  )
3687
3775
  )
3688
3776
  ),
@@ -3698,14 +3786,14 @@ var EntryUpdateModule = {
3698
3786
  var EntryModule = {
3699
3787
  command: "entry <command>",
3700
3788
  describe: "Commands for Entries",
3701
- builder: (yargs28) => yargs28.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
3789
+ builder: (yargs32) => yargs32.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
3702
3790
  handler: () => {
3703
- yargs7.help();
3791
+ yargs8.help();
3704
3792
  }
3705
3793
  };
3706
3794
 
3707
3795
  // src/commands/canvas/commands/locale.ts
3708
- import yargs8 from "yargs";
3796
+ import yargs9 from "yargs";
3709
3797
 
3710
3798
  // src/commands/canvas/commands/locale/pull.ts
3711
3799
  import { LocaleClient } from "@uniformdev/canvas";
@@ -3743,11 +3831,11 @@ function createLocaleEngineDataSource({
3743
3831
  var LocalePullModule = {
3744
3832
  command: "pull <directory>",
3745
3833
  describe: "Pulls all locales to local files in a directory",
3746
- builder: (yargs28) => withConfiguration(
3834
+ builder: (yargs32) => withConfiguration(
3747
3835
  withApiOptions(
3748
3836
  withProjectOptions(
3749
3837
  withDiffOptions(
3750
- yargs28.positional("directory", {
3838
+ yargs32.positional("directory", {
3751
3839
  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.",
3752
3840
  type: "string"
3753
3841
  }).option("format", {
@@ -3830,11 +3918,11 @@ import { LocaleClient as LocaleClient2 } from "@uniformdev/canvas";
3830
3918
  var LocalePushModule = {
3831
3919
  command: "push <directory>",
3832
3920
  describe: "Pushes all locales from files in a directory to Uniform",
3833
- builder: (yargs28) => withConfiguration(
3921
+ builder: (yargs32) => withConfiguration(
3834
3922
  withApiOptions(
3835
3923
  withProjectOptions(
3836
3924
  withDiffOptions(
3837
- yargs28.positional("directory", {
3925
+ yargs32.positional("directory", {
3838
3926
  describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
3839
3927
  type: "string"
3840
3928
  }).option("what-if", {
@@ -3904,14 +3992,14 @@ var LocalePushModule = {
3904
3992
  var LocaleModule = {
3905
3993
  command: "locale <command>",
3906
3994
  describe: "Commands for locale definitions",
3907
- builder: (yargs28) => yargs28.command(LocalePullModule).command(LocalePushModule),
3995
+ builder: (yargs32) => yargs32.command(LocalePullModule).command(LocalePushModule),
3908
3996
  handler: () => {
3909
- yargs8.help();
3997
+ yargs9.help();
3910
3998
  }
3911
3999
  };
3912
4000
 
3913
4001
  // src/commands/canvas/commands/pattern.ts
3914
- import yargs9 from "yargs";
4002
+ import yargs10 from "yargs";
3915
4003
 
3916
4004
  // src/commands/canvas/commands/pattern/get.ts
3917
4005
  var PatternGetModule = {
@@ -3923,12 +4011,12 @@ var PatternGetModule = {
3923
4011
  var PatternListModule = {
3924
4012
  ...CompositionListModule,
3925
4013
  describe: "List patterns",
3926
- builder: (yargs28) => withFormatOptions(
4014
+ builder: (yargs32) => withFormatOptions(
3927
4015
  withConfiguration(
3928
4016
  withApiOptions(
3929
4017
  withProjectOptions(
3930
4018
  withStateOptions(
3931
- yargs28.options({
4019
+ yargs32.options({
3932
4020
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
3933
4021
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
3934
4022
  resolvePatterns: {
@@ -3966,11 +4054,11 @@ var PatternListModule = {
3966
4054
  var PatternPublishModule = {
3967
4055
  ...CompositionPublishModule,
3968
4056
  describe: "Publishes pattern(s)",
3969
- builder: (yargs28) => withConfiguration(
4057
+ builder: (yargs32) => withConfiguration(
3970
4058
  withApiOptions(
3971
4059
  withProjectOptions(
3972
4060
  withDiffOptions(
3973
- yargs28.positional("ids", {
4061
+ yargs32.positional("ids", {
3974
4062
  describe: "Publishes pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
3975
4063
  type: "string"
3976
4064
  }).option("all", {
@@ -4008,12 +4096,12 @@ var PatternPublishModule = {
4008
4096
  var PatternPullModule = {
4009
4097
  ...CompositionPullModule,
4010
4098
  describe: "Pulls all patterns to local files in a directory",
4011
- builder: (yargs28) => withConfiguration(
4099
+ builder: (yargs32) => withConfiguration(
4012
4100
  withApiOptions(
4013
4101
  withProjectOptions(
4014
4102
  withStateOptions(
4015
4103
  withDiffOptions(
4016
- yargs28.positional("directory", {
4104
+ yargs32.positional("directory", {
4017
4105
  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.",
4018
4106
  type: "string"
4019
4107
  }).option("format", {
@@ -4051,12 +4139,12 @@ var PatternPullModule = {
4051
4139
  var PatternPushModule = {
4052
4140
  ...CompositionPushModule,
4053
4141
  describe: "Pushes all patterns from files in a directory to Uniform Canvas",
4054
- builder: (yargs28) => withConfiguration(
4142
+ builder: (yargs32) => withConfiguration(
4055
4143
  withApiOptions(
4056
4144
  withProjectOptions(
4057
4145
  withStateOptions(
4058
4146
  withDiffOptions(
4059
- yargs28.positional("directory", {
4147
+ yargs32.positional("directory", {
4060
4148
  describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
4061
4149
  type: "string"
4062
4150
  }).option("what-if", {
@@ -4094,10 +4182,10 @@ var PatternRemoveModule = {
4094
4182
  var PatternUnpublishModule = {
4095
4183
  command: "unpublish [ids]",
4096
4184
  describe: "Unpublish a pattern(s)",
4097
- builder: (yargs28) => withConfiguration(
4185
+ builder: (yargs32) => withConfiguration(
4098
4186
  withApiOptions(
4099
4187
  withProjectOptions(
4100
- yargs28.positional("ids", {
4188
+ yargs32.positional("ids", {
4101
4189
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4102
4190
  type: "string"
4103
4191
  }).option("all", {
@@ -4136,26 +4224,26 @@ var PatternUpdateModule = {
4136
4224
  var PatternModule = {
4137
4225
  command: "pattern <command>",
4138
4226
  describe: "Commands for Canvas patterns",
4139
- builder: (yargs28) => yargs28.command(PatternPullModule).command(PatternPushModule).command(PatternGetModule).command(PatternRemoveModule).command(PatternListModule).command(PatternUpdateModule).command(PatternPublishModule).command(PatternUnpublishModule).demandCommand(),
4227
+ builder: (yargs32) => yargs32.command(PatternPullModule).command(PatternPushModule).command(PatternGetModule).command(PatternRemoveModule).command(PatternListModule).command(PatternUpdateModule).command(PatternPublishModule).command(PatternUnpublishModule).demandCommand(),
4140
4228
  handler: () => {
4141
- yargs9.help();
4229
+ yargs10.help();
4142
4230
  }
4143
4231
  };
4144
4232
 
4145
4233
  // src/commands/canvas/commands/prompts.ts
4146
- import yargs10 from "yargs";
4234
+ import yargs11 from "yargs";
4147
4235
 
4148
4236
  // src/commands/canvas/commands/prompts/get.ts
4149
4237
  import { PromptClient } from "@uniformdev/canvas";
4150
4238
  var PromptGetModule = {
4151
4239
  command: "get <id>",
4152
4240
  describe: "Get a prompt",
4153
- builder: (yargs28) => withConfiguration(
4241
+ builder: (yargs32) => withConfiguration(
4154
4242
  withFormatOptions(
4155
4243
  withApiOptions(
4156
4244
  withProjectOptions(
4157
4245
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4158
- yargs28.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
4246
+ yargs32.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
4159
4247
  )
4160
4248
  )
4161
4249
  )
@@ -4176,7 +4264,7 @@ import { PromptClient as PromptClient2 } from "@uniformdev/canvas";
4176
4264
  var PromptListModule = {
4177
4265
  command: "list",
4178
4266
  describe: "List prompts",
4179
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
4267
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
4180
4268
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4181
4269
  const fetch3 = nodeFetchProxy(proxy);
4182
4270
  const client = new PromptClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -4223,12 +4311,12 @@ function createPromptEngineDataSource({
4223
4311
  var PromptPullModule = {
4224
4312
  command: "pull <directory>",
4225
4313
  describe: "Pulls all entries to local files in a directory",
4226
- builder: (yargs28) => withConfiguration(
4314
+ builder: (yargs32) => withConfiguration(
4227
4315
  withApiOptions(
4228
4316
  withProjectOptions(
4229
4317
  withStateOptions(
4230
4318
  withDiffOptions(
4231
- yargs28.positional("directory", {
4319
+ yargs32.positional("directory", {
4232
4320
  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.",
4233
4321
  type: "string"
4234
4322
  }).option("format", {
@@ -4312,12 +4400,12 @@ import { PromptClient as PromptClient4 } from "@uniformdev/canvas";
4312
4400
  var PromptPushModule = {
4313
4401
  command: "push <directory>",
4314
4402
  describe: "Pushes all prompts from files in a directory to Uniform",
4315
- builder: (yargs28) => withConfiguration(
4403
+ builder: (yargs32) => withConfiguration(
4316
4404
  withApiOptions(
4317
4405
  withProjectOptions(
4318
4406
  withStateOptions(
4319
4407
  withDiffOptions(
4320
- yargs28.positional("directory", {
4408
+ yargs32.positional("directory", {
4321
4409
  describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
4322
4410
  type: "string"
4323
4411
  }).option("what-if", {
@@ -4390,9 +4478,9 @@ var PromptRemoveModule = {
4390
4478
  command: "remove <id>",
4391
4479
  aliases: ["delete", "rm"],
4392
4480
  describe: "Delete a prompt",
4393
- builder: (yargs28) => withConfiguration(
4481
+ builder: (yargs32) => withConfiguration(
4394
4482
  withApiOptions(
4395
- withProjectOptions(yargs28.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
4483
+ withProjectOptions(yargs32.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
4396
4484
  )
4397
4485
  ),
4398
4486
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -4408,10 +4496,10 @@ var PromptUpdateModule = {
4408
4496
  command: "update <filename>",
4409
4497
  aliases: ["put"],
4410
4498
  describe: "Insert or update a prompt",
4411
- builder: (yargs28) => withConfiguration(
4499
+ builder: (yargs32) => withConfiguration(
4412
4500
  withApiOptions(
4413
4501
  withProjectOptions(
4414
- yargs28.positional("filename", { demandOption: true, describe: "Prompt file to put" })
4502
+ yargs32.positional("filename", { demandOption: true, describe: "Prompt file to put" })
4415
4503
  )
4416
4504
  )
4417
4505
  ),
@@ -4428,9 +4516,9 @@ var PromptModule = {
4428
4516
  command: "prompt <command>",
4429
4517
  aliases: ["dt"],
4430
4518
  describe: "Commands for AI Prompt definitions",
4431
- builder: (yargs28) => yargs28.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
4519
+ builder: (yargs32) => yargs32.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
4432
4520
  handler: () => {
4433
- yargs10.help();
4521
+ yargs11.help();
4434
4522
  }
4435
4523
  };
4436
4524
 
@@ -4439,28 +4527,28 @@ var CanvasCommand = {
4439
4527
  command: "canvas <command>",
4440
4528
  aliases: ["cv", "pm", "presentation"],
4441
4529
  describe: "Uniform Canvas commands",
4442
- builder: (yargs28) => yargs28.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(CategoryModule).command(PatternModule).command(ContentTypeModule).command(EntryModule).command(PromptModule).command(AssetModule).command(LocaleModule).demandCommand(),
4530
+ 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(),
4443
4531
  handler: () => {
4444
- yargs11.showHelp();
4532
+ yargs12.showHelp();
4445
4533
  }
4446
4534
  };
4447
4535
 
4448
4536
  // src/commands/context/index.ts
4449
- import yargs18 from "yargs";
4537
+ import yargs19 from "yargs";
4450
4538
 
4451
4539
  // src/commands/context/commands/aggregate.ts
4452
- import yargs12 from "yargs";
4540
+ import yargs13 from "yargs";
4453
4541
 
4454
4542
  // src/commands/context/commands/aggregate/get.ts
4455
4543
  import { UncachedAggregateClient } from "@uniformdev/context/api";
4456
4544
  var AggregateGetModule = {
4457
4545
  command: "get <id>",
4458
4546
  describe: "Fetch an aggregate",
4459
- builder: (yargs28) => withConfiguration(
4547
+ builder: (yargs32) => withConfiguration(
4460
4548
  withFormatOptions(
4461
4549
  withApiOptions(
4462
4550
  withProjectOptions(
4463
- yargs28.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
4551
+ yargs32.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
4464
4552
  )
4465
4553
  )
4466
4554
  )
@@ -4484,7 +4572,7 @@ var AggregateListModule = {
4484
4572
  command: "list",
4485
4573
  describe: "List aggregates",
4486
4574
  aliases: ["ls"],
4487
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
4575
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
4488
4576
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4489
4577
  const fetch3 = nodeFetchProxy(proxy);
4490
4578
  const client = new UncachedAggregateClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -4550,11 +4638,11 @@ function writeContextPackage(filename, packageContents) {
4550
4638
  var AggregatePullModule = {
4551
4639
  command: "pull <directory>",
4552
4640
  describe: "Pulls all aggregates to local files in a directory",
4553
- builder: (yargs28) => withConfiguration(
4641
+ builder: (yargs32) => withConfiguration(
4554
4642
  withApiOptions(
4555
4643
  withProjectOptions(
4556
4644
  withDiffOptions(
4557
- yargs28.positional("directory", {
4645
+ yargs32.positional("directory", {
4558
4646
  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.",
4559
4647
  type: "string"
4560
4648
  }).option("format", {
@@ -4631,11 +4719,11 @@ import { UncachedAggregateClient as UncachedAggregateClient4 } from "@uniformdev
4631
4719
  var AggregatePushModule = {
4632
4720
  command: "push <directory>",
4633
4721
  describe: "Pushes all aggregates from files in a directory or package to Uniform",
4634
- builder: (yargs28) => withConfiguration(
4722
+ builder: (yargs32) => withConfiguration(
4635
4723
  withApiOptions(
4636
4724
  withProjectOptions(
4637
4725
  withDiffOptions(
4638
- yargs28.positional("directory", {
4726
+ yargs32.positional("directory", {
4639
4727
  describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
4640
4728
  type: "string"
4641
4729
  }).option("what-if", {
@@ -4702,10 +4790,10 @@ var AggregateRemoveModule = {
4702
4790
  command: "remove <id>",
4703
4791
  aliases: ["delete", "rm"],
4704
4792
  describe: "Delete an aggregate",
4705
- builder: (yargs28) => withConfiguration(
4793
+ builder: (yargs32) => withConfiguration(
4706
4794
  withApiOptions(
4707
4795
  withProjectOptions(
4708
- yargs28.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
4796
+ yargs32.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
4709
4797
  )
4710
4798
  )
4711
4799
  ),
@@ -4722,10 +4810,10 @@ var AggregateUpdateModule = {
4722
4810
  command: "update <filename>",
4723
4811
  aliases: ["put"],
4724
4812
  describe: "Insert or update an aggregate",
4725
- builder: (yargs28) => withConfiguration(
4813
+ builder: (yargs32) => withConfiguration(
4726
4814
  withApiOptions(
4727
4815
  withProjectOptions(
4728
- yargs28.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
4816
+ yargs32.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
4729
4817
  )
4730
4818
  )
4731
4819
  ),
@@ -4742,25 +4830,25 @@ var AggregateModule = {
4742
4830
  command: "aggregate <command>",
4743
4831
  aliases: ["agg", "intent", "audience"],
4744
4832
  describe: "Commands for Context aggregates (intents, audiences)",
4745
- builder: (yargs28) => yargs28.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
4833
+ builder: (yargs32) => yargs32.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
4746
4834
  handler: () => {
4747
- yargs12.help();
4835
+ yargs13.help();
4748
4836
  }
4749
4837
  };
4750
4838
 
4751
4839
  // src/commands/context/commands/enrichment.ts
4752
- import yargs13 from "yargs";
4840
+ import yargs14 from "yargs";
4753
4841
 
4754
4842
  // src/commands/context/commands/enrichment/get.ts
4755
4843
  import { UncachedEnrichmentClient } from "@uniformdev/context/api";
4756
4844
  var EnrichmentGetModule = {
4757
4845
  command: "get <id>",
4758
4846
  describe: "Fetch an enrichment category and its values",
4759
- builder: (yargs28) => withFormatOptions(
4847
+ builder: (yargs32) => withFormatOptions(
4760
4848
  withConfiguration(
4761
4849
  withApiOptions(
4762
4850
  withProjectOptions(
4763
- yargs28.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
4851
+ yargs32.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
4764
4852
  )
4765
4853
  )
4766
4854
  )
@@ -4785,7 +4873,7 @@ var EnrichmentListModule = {
4785
4873
  command: "list",
4786
4874
  describe: "List enrichments",
4787
4875
  aliases: ["ls"],
4788
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
4876
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
4789
4877
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4790
4878
  const fetch3 = nodeFetchProxy(proxy);
4791
4879
  const client = new UncachedEnrichmentClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -4886,11 +4974,11 @@ var createEnrichmentValueEngineDataSource = ({
4886
4974
  var EnrichmentPullModule = {
4887
4975
  command: "pull <directory>",
4888
4976
  describe: "Pulls all enrichments to local files in a directory",
4889
- builder: (yargs28) => withConfiguration(
4977
+ builder: (yargs32) => withConfiguration(
4890
4978
  withApiOptions(
4891
4979
  withProjectOptions(
4892
4980
  withDiffOptions(
4893
- yargs28.positional("directory", {
4981
+ yargs32.positional("directory", {
4894
4982
  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.",
4895
4983
  type: "string"
4896
4984
  }).option("format", {
@@ -4967,11 +5055,11 @@ import { UncachedEnrichmentClient as UncachedEnrichmentClient4 } from "@uniformd
4967
5055
  var EnrichmentPushModule = {
4968
5056
  command: "push <directory>",
4969
5057
  describe: "Pushes all enrichments from files in a directory or package to Uniform",
4970
- builder: (yargs28) => withConfiguration(
5058
+ builder: (yargs32) => withConfiguration(
4971
5059
  withApiOptions(
4972
5060
  withProjectOptions(
4973
5061
  withDiffOptions(
4974
- yargs28.positional("directory", {
5062
+ yargs32.positional("directory", {
4975
5063
  describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
4976
5064
  type: "string"
4977
5065
  }).option("what-if", {
@@ -5037,10 +5125,10 @@ var EnrichmentRemoveModule = {
5037
5125
  command: "remove <id>",
5038
5126
  aliases: ["delete", "rm"],
5039
5127
  describe: "Delete an enrichment category and its values",
5040
- builder: (yargs28) => withConfiguration(
5128
+ builder: (yargs32) => withConfiguration(
5041
5129
  withApiOptions(
5042
5130
  withProjectOptions(
5043
- yargs28.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
5131
+ yargs32.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
5044
5132
  )
5045
5133
  )
5046
5134
  ),
@@ -5056,14 +5144,14 @@ var EnrichmentModule = {
5056
5144
  command: "enrichment <command>",
5057
5145
  aliases: ["enr"],
5058
5146
  describe: "Commands for Context enrichments",
5059
- builder: (yargs28) => yargs28.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
5147
+ builder: (yargs32) => yargs32.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
5060
5148
  handler: () => {
5061
- yargs13.help();
5149
+ yargs14.help();
5062
5150
  }
5063
5151
  };
5064
5152
 
5065
5153
  // src/commands/context/commands/manifest.ts
5066
- import yargs14 from "yargs";
5154
+ import yargs15 from "yargs";
5067
5155
 
5068
5156
  // src/commands/context/commands/manifest/get.ts
5069
5157
  import { ApiClientError, UncachedManifestClient } from "@uniformdev/context/api";
@@ -5074,10 +5162,10 @@ var ManifestGetModule = {
5074
5162
  command: "get [output]",
5075
5163
  aliases: ["dl", "download"],
5076
5164
  describe: "Download the Uniform Context manifest for a project",
5077
- builder: (yargs28) => withConfiguration(
5165
+ builder: (yargs32) => withConfiguration(
5078
5166
  withApiOptions(
5079
5167
  withProjectOptions(
5080
- yargs28.option("preview", {
5168
+ yargs32.option("preview", {
5081
5169
  describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
5082
5170
  default: false,
5083
5171
  type: "boolean",
@@ -5139,7 +5227,7 @@ import { exit as exit2 } from "process";
5139
5227
  var ManifestPublishModule = {
5140
5228
  command: "publish",
5141
5229
  describe: "Publish the Uniform Context manifest for a project",
5142
- builder: (yargs28) => withConfiguration(withApiOptions(withProjectOptions(yargs28))),
5230
+ builder: (yargs32) => withConfiguration(withApiOptions(withProjectOptions(yargs32))),
5143
5231
  handler: async ({ apiKey, apiHost, proxy, project }) => {
5144
5232
  const fetch3 = nodeFetchProxy(proxy);
5145
5233
  try {
@@ -5172,25 +5260,25 @@ var ManifestModule = {
5172
5260
  command: "manifest <command>",
5173
5261
  describe: "Commands for context manifests",
5174
5262
  aliases: ["man"],
5175
- builder: (yargs28) => yargs28.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
5263
+ builder: (yargs32) => yargs32.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
5176
5264
  handler: () => {
5177
- yargs14.help();
5265
+ yargs15.help();
5178
5266
  }
5179
5267
  };
5180
5268
 
5181
5269
  // src/commands/context/commands/quirk.ts
5182
- import yargs15 from "yargs";
5270
+ import yargs16 from "yargs";
5183
5271
 
5184
5272
  // src/commands/context/commands/quirk/get.ts
5185
5273
  import { UncachedQuirkClient } from "@uniformdev/context/api";
5186
5274
  var QuirkGetModule = {
5187
5275
  command: "get <id>",
5188
5276
  describe: "Fetch a quirk",
5189
- builder: (yargs28) => withConfiguration(
5277
+ builder: (yargs32) => withConfiguration(
5190
5278
  withFormatOptions(
5191
5279
  withApiOptions(
5192
5280
  withProjectOptions(
5193
- yargs28.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
5281
+ yargs32.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
5194
5282
  )
5195
5283
  )
5196
5284
  )
@@ -5214,11 +5302,11 @@ var QuirkListModule = {
5214
5302
  command: "list",
5215
5303
  describe: "List quirks",
5216
5304
  aliases: ["ls"],
5217
- builder: (yargs28) => withConfiguration(
5305
+ builder: (yargs32) => withConfiguration(
5218
5306
  withFormatOptions(
5219
5307
  withApiOptions(
5220
5308
  withProjectOptions(
5221
- yargs28.option("withIntegrations", {
5309
+ yargs32.option("withIntegrations", {
5222
5310
  alias: ["i"],
5223
5311
  describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
5224
5312
  type: "boolean"
@@ -5275,11 +5363,11 @@ function createQuirkEngineDataSource({
5275
5363
  var QuirkPullModule = {
5276
5364
  command: "pull <directory>",
5277
5365
  describe: "Pulls all quirks to local files in a directory",
5278
- builder: (yargs28) => withConfiguration(
5366
+ builder: (yargs32) => withConfiguration(
5279
5367
  withApiOptions(
5280
5368
  withProjectOptions(
5281
5369
  withDiffOptions(
5282
- yargs28.positional("directory", {
5370
+ yargs32.positional("directory", {
5283
5371
  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.",
5284
5372
  type: "string"
5285
5373
  }).option("format", {
@@ -5356,11 +5444,11 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
5356
5444
  var QuirkPushModule = {
5357
5445
  command: "push <directory>",
5358
5446
  describe: "Pushes all quirks from files in a directory or package to Uniform",
5359
- builder: (yargs28) => withConfiguration(
5447
+ builder: (yargs32) => withConfiguration(
5360
5448
  withApiOptions(
5361
5449
  withProjectOptions(
5362
5450
  withDiffOptions(
5363
- yargs28.positional("directory", {
5451
+ yargs32.positional("directory", {
5364
5452
  describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
5365
5453
  type: "string"
5366
5454
  }).option("what-if", {
@@ -5426,10 +5514,10 @@ var QuirkRemoveModule = {
5426
5514
  command: "remove <id>",
5427
5515
  aliases: ["delete", "rm"],
5428
5516
  describe: "Delete a quirk",
5429
- builder: (yargs28) => withConfiguration(
5517
+ builder: (yargs32) => withConfiguration(
5430
5518
  withApiOptions(
5431
5519
  withProjectOptions(
5432
- yargs28.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
5520
+ yargs32.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
5433
5521
  )
5434
5522
  )
5435
5523
  ),
@@ -5446,10 +5534,10 @@ var QuirkUpdateModule = {
5446
5534
  command: "update <filename>",
5447
5535
  aliases: ["put"],
5448
5536
  describe: "Insert or update a quirk",
5449
- builder: (yargs28) => withConfiguration(
5537
+ builder: (yargs32) => withConfiguration(
5450
5538
  withApiOptions(
5451
5539
  withProjectOptions(
5452
- yargs28.positional("filename", { demandOption: true, describe: "Quirk file to put" })
5540
+ yargs32.positional("filename", { demandOption: true, describe: "Quirk file to put" })
5453
5541
  )
5454
5542
  )
5455
5543
  ),
@@ -5466,25 +5554,25 @@ var QuirkModule = {
5466
5554
  command: "quirk <command>",
5467
5555
  aliases: ["qk"],
5468
5556
  describe: "Commands for Context quirks",
5469
- builder: (yargs28) => yargs28.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
5557
+ builder: (yargs32) => yargs32.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
5470
5558
  handler: () => {
5471
- yargs15.help();
5559
+ yargs16.help();
5472
5560
  }
5473
5561
  };
5474
5562
 
5475
5563
  // src/commands/context/commands/signal.ts
5476
- import yargs16 from "yargs";
5564
+ import yargs17 from "yargs";
5477
5565
 
5478
5566
  // src/commands/context/commands/signal/get.ts
5479
5567
  import { UncachedSignalClient } from "@uniformdev/context/api";
5480
5568
  var SignalGetModule = {
5481
5569
  command: "get <id>",
5482
5570
  describe: "Fetch a signal",
5483
- builder: (yargs28) => withConfiguration(
5571
+ builder: (yargs32) => withConfiguration(
5484
5572
  withFormatOptions(
5485
5573
  withApiOptions(
5486
5574
  withProjectOptions(
5487
- yargs28.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
5575
+ yargs32.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
5488
5576
  )
5489
5577
  )
5490
5578
  )
@@ -5508,7 +5596,7 @@ var SignalListModule = {
5508
5596
  command: "list",
5509
5597
  describe: "List signals",
5510
5598
  aliases: ["ls"],
5511
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
5599
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
5512
5600
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5513
5601
  const fetch3 = nodeFetchProxy(proxy);
5514
5602
  const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5557,11 +5645,11 @@ function createSignalEngineDataSource({
5557
5645
  var SignalPullModule = {
5558
5646
  command: "pull <directory>",
5559
5647
  describe: "Pulls all signals to local files in a directory",
5560
- builder: (yargs28) => withConfiguration(
5648
+ builder: (yargs32) => withConfiguration(
5561
5649
  withApiOptions(
5562
5650
  withProjectOptions(
5563
5651
  withDiffOptions(
5564
- yargs28.positional("directory", {
5652
+ yargs32.positional("directory", {
5565
5653
  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.",
5566
5654
  type: "string"
5567
5655
  }).option("format", {
@@ -5638,11 +5726,11 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
5638
5726
  var SignalPushModule = {
5639
5727
  command: "push <directory>",
5640
5728
  describe: "Pushes all signals from files in a directory or package to Uniform",
5641
- builder: (yargs28) => withConfiguration(
5729
+ builder: (yargs32) => withConfiguration(
5642
5730
  withApiOptions(
5643
5731
  withProjectOptions(
5644
5732
  withDiffOptions(
5645
- yargs28.positional("directory", {
5733
+ yargs32.positional("directory", {
5646
5734
  describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
5647
5735
  type: "string"
5648
5736
  }).option("what-if", {
@@ -5708,10 +5796,10 @@ var SignalRemoveModule = {
5708
5796
  command: "remove <id>",
5709
5797
  aliases: ["delete", "rm"],
5710
5798
  describe: "Delete a signal",
5711
- builder: (yargs28) => withConfiguration(
5799
+ builder: (yargs32) => withConfiguration(
5712
5800
  withApiOptions(
5713
5801
  withProjectOptions(
5714
- yargs28.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
5802
+ yargs32.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
5715
5803
  )
5716
5804
  )
5717
5805
  ),
@@ -5728,10 +5816,10 @@ var SignalUpdateModule = {
5728
5816
  command: "update <filename>",
5729
5817
  aliases: ["put"],
5730
5818
  describe: "Insert or update a signal",
5731
- builder: (yargs28) => withConfiguration(
5819
+ builder: (yargs32) => withConfiguration(
5732
5820
  withApiOptions(
5733
5821
  withProjectOptions(
5734
- yargs28.positional("filename", { demandOption: true, describe: "Signal file to put" })
5822
+ yargs32.positional("filename", { demandOption: true, describe: "Signal file to put" })
5735
5823
  )
5736
5824
  )
5737
5825
  ),
@@ -5748,25 +5836,25 @@ var SignalModule = {
5748
5836
  command: "signal <command>",
5749
5837
  aliases: ["sig"],
5750
5838
  describe: "Commands for Context signals",
5751
- builder: (yargs28) => yargs28.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
5839
+ builder: (yargs32) => yargs32.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
5752
5840
  handler: () => {
5753
- yargs16.help();
5841
+ yargs17.help();
5754
5842
  }
5755
5843
  };
5756
5844
 
5757
5845
  // src/commands/context/commands/test.ts
5758
- import yargs17 from "yargs";
5846
+ import yargs18 from "yargs";
5759
5847
 
5760
5848
  // src/commands/context/commands/test/get.ts
5761
5849
  import { UncachedTestClient } from "@uniformdev/context/api";
5762
5850
  var TestGetModule = {
5763
5851
  command: "get <id>",
5764
5852
  describe: "Fetch a test",
5765
- builder: (yargs28) => withConfiguration(
5853
+ builder: (yargs32) => withConfiguration(
5766
5854
  withFormatOptions(
5767
5855
  withApiOptions(
5768
5856
  withProjectOptions(
5769
- yargs28.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
5857
+ yargs32.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
5770
5858
  )
5771
5859
  )
5772
5860
  )
@@ -5790,7 +5878,7 @@ var TestListModule = {
5790
5878
  command: "list",
5791
5879
  describe: "List tests",
5792
5880
  aliases: ["ls"],
5793
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
5881
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
5794
5882
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5795
5883
  const fetch3 = nodeFetchProxy(proxy);
5796
5884
  const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5839,11 +5927,11 @@ function createTestEngineDataSource({
5839
5927
  var TestPullModule = {
5840
5928
  command: "pull <directory>",
5841
5929
  describe: "Pulls all tests to local files in a directory",
5842
- builder: (yargs28) => withConfiguration(
5930
+ builder: (yargs32) => withConfiguration(
5843
5931
  withApiOptions(
5844
5932
  withProjectOptions(
5845
5933
  withDiffOptions(
5846
- yargs28.positional("directory", {
5934
+ yargs32.positional("directory", {
5847
5935
  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.",
5848
5936
  type: "string"
5849
5937
  }).option("format", {
@@ -5920,11 +6008,11 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
5920
6008
  var TestPushModule = {
5921
6009
  command: "push <directory>",
5922
6010
  describe: "Pushes all tests from files in a directory or package to Uniform",
5923
- builder: (yargs28) => withConfiguration(
6011
+ builder: (yargs32) => withConfiguration(
5924
6012
  withApiOptions(
5925
6013
  withProjectOptions(
5926
6014
  withDiffOptions(
5927
- yargs28.positional("directory", {
6015
+ yargs32.positional("directory", {
5928
6016
  describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
5929
6017
  type: "string"
5930
6018
  }).option("what-if", {
@@ -5990,10 +6078,10 @@ var TestRemoveModule = {
5990
6078
  command: "remove <id>",
5991
6079
  aliases: ["delete", "rm"],
5992
6080
  describe: "Delete a test",
5993
- builder: (yargs28) => withConfiguration(
6081
+ builder: (yargs32) => withConfiguration(
5994
6082
  withApiOptions(
5995
6083
  withProjectOptions(
5996
- yargs28.positional("id", { demandOption: true, describe: "Test public ID to delete" })
6084
+ yargs32.positional("id", { demandOption: true, describe: "Test public ID to delete" })
5997
6085
  )
5998
6086
  )
5999
6087
  ),
@@ -6010,9 +6098,9 @@ var TestUpdateModule = {
6010
6098
  command: "update <filename>",
6011
6099
  aliases: ["put"],
6012
6100
  describe: "Insert or update a test",
6013
- builder: (yargs28) => withConfiguration(
6101
+ builder: (yargs32) => withConfiguration(
6014
6102
  withApiOptions(
6015
- withProjectOptions(yargs28.positional("filename", { demandOption: true, describe: "Test file to put" }))
6103
+ withProjectOptions(yargs32.positional("filename", { demandOption: true, describe: "Test file to put" }))
6016
6104
  )
6017
6105
  ),
6018
6106
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -6027,9 +6115,9 @@ var TestUpdateModule = {
6027
6115
  var TestModule = {
6028
6116
  command: "test <command>",
6029
6117
  describe: "Commands for Context A/B tests",
6030
- builder: (yargs28) => yargs28.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
6118
+ builder: (yargs32) => yargs32.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
6031
6119
  handler: () => {
6032
- yargs17.help();
6120
+ yargs18.help();
6033
6121
  }
6034
6122
  };
6035
6123
 
@@ -6038,9 +6126,290 @@ var ContextCommand = {
6038
6126
  command: "context <command>",
6039
6127
  aliases: ["ctx"],
6040
6128
  describe: "Uniform Context commands",
6041
- builder: (yargs28) => yargs28.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
6129
+ builder: (yargs32) => yargs32.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
6042
6130
  handler: () => {
6043
- yargs18.showHelp();
6131
+ yargs19.showHelp();
6132
+ }
6133
+ };
6134
+
6135
+ // src/commands/integration/index.ts
6136
+ import yargs22 from "yargs";
6137
+
6138
+ // src/commands/integration/commands/definition.ts
6139
+ import yargs21 from "yargs";
6140
+
6141
+ // src/commands/integration/commands/definition/edgehancer/edgehancer.ts
6142
+ import yargs20 from "yargs";
6143
+
6144
+ // src/commands/integration/commands/definition/edgehancer/deploy.ts
6145
+ import { readFileSync as readFileSync2 } from "fs";
6146
+
6147
+ // src/commands/integration/commands/definition/edgehancer/EdgehancerClient.ts
6148
+ import { createLimitPolicy } from "@uniformdev/canvas";
6149
+ import { ApiClient } from "@uniformdev/context/api";
6150
+ var ENDPOINT = "/api/v1/integration-edgehancers";
6151
+ var EdgehancerClient = class extends ApiClient {
6152
+ constructor(options) {
6153
+ if (!options.limitPolicy) {
6154
+ options.limitPolicy = createLimitPolicy({});
6155
+ }
6156
+ super(options);
6157
+ this.options = options;
6158
+ }
6159
+ async deploy(definition) {
6160
+ const { teamId } = this.options;
6161
+ const fetchUri = this.createUrl(ENDPOINT);
6162
+ return await this.apiClient(fetchUri, {
6163
+ method: "PUT",
6164
+ body: JSON.stringify({ ...definition, teamId }),
6165
+ expectNoContent: true
6166
+ });
6167
+ }
6168
+ async remove(edgehancer) {
6169
+ const { teamId } = this.options;
6170
+ const fetchUri = this.createUrl(ENDPOINT);
6171
+ return await this.apiClient(fetchUri, {
6172
+ method: "DELETE",
6173
+ body: JSON.stringify({ teamId, ...edgehancer }),
6174
+ expectNoContent: true
6175
+ });
6176
+ }
6177
+ };
6178
+
6179
+ // src/commands/integration/commands/definition/edgehancer/util.ts
6180
+ function withEdgehancerIdOptions(yargs32) {
6181
+ return yargs32.option("connectorType", {
6182
+ describe: "Integration data connector type to edgehance, as defined in the integration manifest file.",
6183
+ demandOption: true,
6184
+ type: "string"
6185
+ }).option("archetype", {
6186
+ describe: "Data connector archetype to edgehance. Must be defined within the connectorType.",
6187
+ demandOption: true,
6188
+ type: "string"
6189
+ }).option("hook", {
6190
+ describe: "Edgehancer hook to deploy to.",
6191
+ demandOption: true,
6192
+ choices: ["preRequest", "request"],
6193
+ type: "string"
6194
+ });
6195
+ }
6196
+
6197
+ // src/commands/integration/commands/definition/edgehancer/deploy.ts
6198
+ var IntegrationEdgehancerDeployModule = {
6199
+ command: "deploy <filename>",
6200
+ describe: "Deploys a custom edgehancer hook to run when a data resource of a specific archetype is fetched. The API key used must have team admin permissions.",
6201
+ builder: (yargs32) => withConfiguration(
6202
+ withApiOptions(
6203
+ withTeamOptions(
6204
+ withEdgehancerIdOptions(
6205
+ yargs32.positional("filename", {
6206
+ demandOption: true,
6207
+ describe: "ESM code file to run for the target edgehancer hook. Refer to the documentation for expected types."
6208
+ })
6209
+ )
6210
+ )
6211
+ )
6212
+ ),
6213
+ handler: async ({ apiHost, apiKey, proxy, filename, team: teamId, archetype, connectorType, hook }) => {
6214
+ const fetch3 = nodeFetchProxy(proxy);
6215
+ const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch3, teamId });
6216
+ const code = readFileSync2(filename, "utf8");
6217
+ await client.deploy({ archetype, code, connectorType, hook });
6218
+ }
6219
+ };
6220
+
6221
+ // src/commands/integration/commands/definition/edgehancer/remove.ts
6222
+ var IntegrationEdgehancerRemoveModule = {
6223
+ command: "remove",
6224
+ describe: "Deletes a custom edgehancer hook from a data connector archetype. The API key used must have team admin permissions.",
6225
+ builder: (yargs32) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs32)))),
6226
+ handler: async ({ apiHost, apiKey, proxy, team: teamId, archetype, connectorType, hook }) => {
6227
+ const fetch3 = nodeFetchProxy(proxy);
6228
+ const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch3, teamId });
6229
+ await client.remove({ archetype, connectorType, hook });
6230
+ }
6231
+ };
6232
+
6233
+ // src/commands/integration/commands/definition/edgehancer/edgehancer.ts
6234
+ var IntegrationEdgehancerModule = {
6235
+ command: "edgehancer <command>",
6236
+ describe: "Commands for managing custom integration edgehancers at the team level.",
6237
+ builder: (yargs32) => yargs32.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
6238
+ handler: () => {
6239
+ yargs20.help();
6240
+ }
6241
+ };
6242
+
6243
+ // src/commands/integration/commands/definition/DefinitionClient.ts
6244
+ import { createLimitPolicy as createLimitPolicy2 } from "@uniformdev/canvas";
6245
+ import { ApiClient as ApiClient2 } from "@uniformdev/context/api";
6246
+ var ENDPOINT2 = "/api/v1/integration-definitions";
6247
+ var DefinitionClient = class extends ApiClient2 {
6248
+ constructor(options) {
6249
+ if (!options.limitPolicy) {
6250
+ options.limitPolicy = createLimitPolicy2({});
6251
+ }
6252
+ super(options);
6253
+ this.options = options;
6254
+ }
6255
+ async register(manifest) {
6256
+ const { teamId } = this.options;
6257
+ const fetchUri = this.createUrl(ENDPOINT2);
6258
+ return await this.apiClient(fetchUri, {
6259
+ method: "PUT",
6260
+ body: JSON.stringify({ data: manifest, teamId }),
6261
+ expectNoContent: true
6262
+ });
6263
+ }
6264
+ async remove(integrationType) {
6265
+ const { teamId } = this.options;
6266
+ const fetchUri = this.createUrl(ENDPOINT2);
6267
+ return await this.apiClient(fetchUri, {
6268
+ method: "DELETE",
6269
+ body: JSON.stringify({ teamId, type: integrationType }),
6270
+ expectNoContent: true
6271
+ });
6272
+ }
6273
+ };
6274
+
6275
+ // src/commands/integration/commands/definition/register.ts
6276
+ var IntegrationDefinitionRegisterModule = {
6277
+ command: "register <filename>",
6278
+ describe: "Registers a custom integration definition on a team. The API key used must have team admin permissions.",
6279
+ builder: (yargs32) => withConfiguration(
6280
+ withApiOptions(
6281
+ withTeamOptions(
6282
+ yargs32.positional("filename", {
6283
+ demandOption: true,
6284
+ describe: "Integration definition manifest to register"
6285
+ })
6286
+ )
6287
+ )
6288
+ ),
6289
+ handler: async ({ apiHost, apiKey, proxy, filename, team: teamId }) => {
6290
+ const fetch3 = nodeFetchProxy(proxy);
6291
+ const client = new DefinitionClient({ apiKey, apiHost, fetch: fetch3, teamId });
6292
+ const file = readFileToObject(filename);
6293
+ await client.register(file);
6294
+ }
6295
+ };
6296
+
6297
+ // src/commands/integration/commands/definition/remove.ts
6298
+ var IntegrationDefinitionRemoveModule = {
6299
+ command: "remove <type>",
6300
+ 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.",
6301
+ builder: (yargs32) => withConfiguration(
6302
+ withApiOptions(
6303
+ withTeamOptions(
6304
+ yargs32.positional("type", {
6305
+ demandOption: true,
6306
+ describe: "Integration type (from its manifest) to remove."
6307
+ })
6308
+ )
6309
+ )
6310
+ ),
6311
+ handler: async ({ apiHost, apiKey, proxy, type, team: teamId }) => {
6312
+ const fetch3 = nodeFetchProxy(proxy);
6313
+ const client = new DefinitionClient({ apiKey, apiHost, fetch: fetch3, teamId });
6314
+ await client.remove(type);
6315
+ }
6316
+ };
6317
+
6318
+ // src/commands/integration/commands/definition.ts
6319
+ var IntegrationDefinitionModule = {
6320
+ command: "definition <command>",
6321
+ describe: "Commands for managing custom integration definitions at the team level.",
6322
+ builder: (yargs32) => yargs32.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).demandCommand(),
6323
+ handler: () => {
6324
+ yargs21.help();
6325
+ }
6326
+ };
6327
+
6328
+ // src/commands/integration/commands/InstallClient.ts
6329
+ import { createLimitPolicy as createLimitPolicy3 } from "@uniformdev/canvas";
6330
+ import { ApiClient as ApiClient3 } from "@uniformdev/context/api";
6331
+ var ENDPOINT3 = "/api/v1/integration-installations";
6332
+ var InstallClient = class extends ApiClient3 {
6333
+ constructor(options) {
6334
+ if (!options.limitPolicy) {
6335
+ options.limitPolicy = createLimitPolicy3({});
6336
+ }
6337
+ super(options);
6338
+ this.options = options;
6339
+ }
6340
+ async install(definition) {
6341
+ const { projectId } = this.options;
6342
+ const fetchUri = this.createUrl(ENDPOINT3);
6343
+ return await this.apiClient(fetchUri, {
6344
+ method: "PUT",
6345
+ body: JSON.stringify({ ...definition, projectId }),
6346
+ expectNoContent: true
6347
+ });
6348
+ }
6349
+ async remove(type) {
6350
+ const { projectId } = this.options;
6351
+ const fetchUri = this.createUrl(ENDPOINT3);
6352
+ return await this.apiClient(fetchUri, {
6353
+ method: "DELETE",
6354
+ body: JSON.stringify({ projectId, type }),
6355
+ expectNoContent: true
6356
+ });
6357
+ }
6358
+ };
6359
+
6360
+ // src/commands/integration/commands/install.ts
6361
+ var IntegrationInstallModule = {
6362
+ command: "install <type>",
6363
+ 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.",
6364
+ builder: (yargs32) => withConfiguration(
6365
+ withApiOptions(
6366
+ withProjectOptions(
6367
+ yargs32.positional("type", {
6368
+ demandOption: true,
6369
+ describe: "Integration type to install (as defined in its manifest)"
6370
+ }).option("configuration", {
6371
+ describe: "Optional JSON configuration data for the integration, to pre-configure it. The schema is specific to each integration.",
6372
+ type: "string"
6373
+ })
6374
+ )
6375
+ )
6376
+ ),
6377
+ handler: async ({ apiHost, apiKey, proxy, type, configuration: configuration2, project: projectId }) => {
6378
+ const fetch3 = nodeFetchProxy(proxy);
6379
+ const client = new InstallClient({ apiKey, apiHost, fetch: fetch3, projectId });
6380
+ const data = configuration2 ? JSON.parse(configuration2) : void 0;
6381
+ await client.install({ data, type });
6382
+ }
6383
+ };
6384
+
6385
+ // src/commands/integration/commands/uninstall.ts
6386
+ var IntegrationUninstallModule = {
6387
+ command: "uninstall <type>",
6388
+ describe: "Uninstalls an integration from a project. Existing usages of the integration may break.",
6389
+ builder: (yargs32) => withConfiguration(
6390
+ withApiOptions(
6391
+ withProjectOptions(
6392
+ yargs32.positional("type", {
6393
+ demandOption: true,
6394
+ describe: "Integration type to uninstall (as defined in its manifest)"
6395
+ })
6396
+ )
6397
+ )
6398
+ ),
6399
+ handler: async ({ apiHost, apiKey, proxy, type, project: projectId }) => {
6400
+ const fetch3 = nodeFetchProxy(proxy);
6401
+ const client = new InstallClient({ apiKey, apiHost, fetch: fetch3, projectId });
6402
+ await client.remove(type);
6403
+ }
6404
+ };
6405
+
6406
+ // src/commands/integration/index.ts
6407
+ var IntegrationCommand = {
6408
+ command: "integration <command>",
6409
+ describe: "Integration management commands",
6410
+ builder: (yargs32) => yargs32.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
6411
+ handler: () => {
6412
+ yargs22.showHelp();
6044
6413
  }
6045
6414
  };
6046
6415
 
@@ -6068,7 +6437,7 @@ import { PostHog } from "posthog-node";
6068
6437
  // package.json
6069
6438
  var package_default = {
6070
6439
  name: "@uniformdev/cli",
6071
- version: "19.106.0",
6440
+ version: "19.106.1",
6072
6441
  description: "Uniform command line interface tool",
6073
6442
  license: "SEE LICENSE IN LICENSE.txt",
6074
6443
  main: "./cli.js",
@@ -6883,7 +7252,7 @@ npm run dev
6883
7252
  }
6884
7253
 
6885
7254
  // src/commands/new/commands/new-mesh-integration.ts
6886
- import { existsSync as existsSync3, mkdirSync as mkdirSync4, readdirSync, readFileSync as readFileSync2, writeFileSync as writeFileSync2 } from "fs";
7255
+ import { existsSync as existsSync3, mkdirSync as mkdirSync4, readdirSync, readFileSync as readFileSync3, writeFileSync as writeFileSync2 } from "fs";
6887
7256
  import inquirer5 from "inquirer";
6888
7257
  import path4 from "path";
6889
7258
  import slugify2 from "slugify";
@@ -6930,13 +7299,13 @@ async function newMeshIntegrationHandler({
6930
7299
  if (!existsSync3(pathToManifest)) {
6931
7300
  throw new Error("Invalid integration starter cloned: missing `mesh-manifest.json`");
6932
7301
  }
6933
- const manifestContents = readFileSync2(pathToManifest, "utf-8");
7302
+ const manifestContents = readFileSync3(pathToManifest, "utf-8");
6934
7303
  const manifestJson = JSON.parse(manifestContents);
6935
7304
  manifestJson.type = typeSlug;
6936
7305
  manifestJson.displayName = name;
6937
7306
  writeFileSync2(pathToManifest, JSON.stringify(manifestJson, null, 2), "utf-8");
6938
7307
  const packageJsonPath = path4.resolve(targetDir, "package.json");
6939
- const packageJson = JSON.parse(readFileSync2(packageJsonPath, "utf-8"));
7308
+ const packageJson = JSON.parse(readFileSync3(packageJsonPath, "utf-8"));
6940
7309
  packageJson.name = typeSlug;
6941
7310
  writeFileSync2(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf-8");
6942
7311
  const fullMeshAppKey = await uniformClient.registerMeshIntegration({ teamId, manifest: manifestJson });
@@ -7078,10 +7447,10 @@ var NewMeshCmd = {
7078
7447
  };
7079
7448
 
7080
7449
  // src/commands/optimize/index.ts
7081
- import yargs20 from "yargs";
7450
+ import yargs24 from "yargs";
7082
7451
 
7083
7452
  // src/commands/optimize/manifest.ts
7084
- import yargs19 from "yargs";
7453
+ import yargs23 from "yargs";
7085
7454
 
7086
7455
  // src/commands/optimize/manifest/download.ts
7087
7456
  import { gray as gray4, green as green3, red as red5, yellow as yellow2 } from "colorette";
@@ -7096,7 +7465,7 @@ var UniformBaseUrl = "https://uniform.app";
7096
7465
  var module = {
7097
7466
  command: "download [output]",
7098
7467
  describe: "Download intent manifest",
7099
- builder: (yargs28) => yargs28.option("apiKey", {
7468
+ builder: (yargs32) => yargs32.option("apiKey", {
7100
7469
  alias: "k",
7101
7470
  demandOption: true,
7102
7471
  string: true,
@@ -7197,10 +7566,10 @@ var module2 = {
7197
7566
  command: "manifest <command>",
7198
7567
  describe: "Intent manifest commands",
7199
7568
  builder: () => {
7200
- return yargs19.command(download_default);
7569
+ return yargs23.command(download_default);
7201
7570
  },
7202
7571
  handler: () => {
7203
- yargs19.showHelp();
7572
+ yargs23.showHelp();
7204
7573
  }
7205
7574
  };
7206
7575
  var manifest_default = module2;
@@ -7211,29 +7580,29 @@ var OptimizeCommand = {
7211
7580
  aliases: ["opt"],
7212
7581
  describe: "Uniform Optimize commands",
7213
7582
  builder: () => {
7214
- return yargs20.command(manifest_default);
7583
+ return yargs24.command(manifest_default);
7215
7584
  },
7216
7585
  handler: () => {
7217
- yargs20.showHelp();
7586
+ yargs24.showHelp();
7218
7587
  }
7219
7588
  };
7220
7589
 
7221
7590
  // src/commands/project-map/index.ts
7222
- import yargs23 from "yargs";
7591
+ import yargs27 from "yargs";
7223
7592
 
7224
7593
  // src/commands/project-map/commands/projectMapDefinition.ts
7225
- import yargs21 from "yargs";
7594
+ import yargs25 from "yargs";
7226
7595
 
7227
7596
  // src/commands/project-map/commands/ProjectMapDefinition/get.ts
7228
7597
  import { UncachedProjectMapClient } from "@uniformdev/project-map";
7229
7598
  var ProjectMapDefinitionGetModule = {
7230
7599
  command: "get <id>",
7231
7600
  describe: "Fetch a project map",
7232
- builder: (yargs28) => withFormatOptions(
7601
+ builder: (yargs32) => withFormatOptions(
7233
7602
  withConfiguration(
7234
7603
  withApiOptions(
7235
7604
  withProjectOptions(
7236
- yargs28.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
7605
+ yargs32.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
7237
7606
  )
7238
7607
  )
7239
7608
  )
@@ -7257,7 +7626,7 @@ var ProjectMapDefinitionListModule = {
7257
7626
  command: "list",
7258
7627
  describe: "List of project maps",
7259
7628
  aliases: ["ls"],
7260
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
7629
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
7261
7630
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
7262
7631
  const fetch3 = nodeFetchProxy(proxy);
7263
7632
  const client = new UncachedProjectMapClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -7314,11 +7683,11 @@ function createProjectMapDefinitionEngineDataSource({
7314
7683
  var ProjectMapDefinitionPullModule = {
7315
7684
  command: "pull <directory>",
7316
7685
  describe: "Pulls all project maps to local files in a directory",
7317
- builder: (yargs28) => withConfiguration(
7686
+ builder: (yargs32) => withConfiguration(
7318
7687
  withApiOptions(
7319
7688
  withProjectOptions(
7320
7689
  withDiffOptions(
7321
- yargs28.positional("directory", {
7690
+ yargs32.positional("directory", {
7322
7691
  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.",
7323
7692
  type: "string"
7324
7693
  }).option("format", {
@@ -7395,11 +7764,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient4 } from "@uniformd
7395
7764
  var ProjectMapDefinitionPushModule = {
7396
7765
  command: "push <directory>",
7397
7766
  describe: "Pushes all project maps from files in a directory or package to Uniform",
7398
- builder: (yargs28) => withConfiguration(
7767
+ builder: (yargs32) => withConfiguration(
7399
7768
  withApiOptions(
7400
7769
  withProjectOptions(
7401
7770
  withDiffOptions(
7402
- yargs28.positional("directory", {
7771
+ yargs32.positional("directory", {
7403
7772
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
7404
7773
  type: "string"
7405
7774
  }).option("what-if", {
@@ -7465,9 +7834,9 @@ var ProjectMapDefinitionRemoveModule = {
7465
7834
  command: "remove <id>",
7466
7835
  aliases: ["delete", "rm"],
7467
7836
  describe: "Delete a project map",
7468
- builder: (yargs28) => withConfiguration(
7837
+ builder: (yargs32) => withConfiguration(
7469
7838
  withApiOptions(
7470
- withProjectOptions(yargs28.positional("id", { demandOption: true, describe: " UUID to delete" }))
7839
+ withProjectOptions(yargs32.positional("id", { demandOption: true, describe: " UUID to delete" }))
7471
7840
  )
7472
7841
  ),
7473
7842
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -7483,10 +7852,10 @@ var ProjectMapDefinitionUpdateModule = {
7483
7852
  command: "update <filename>",
7484
7853
  aliases: ["put"],
7485
7854
  describe: "Insert or update a project map",
7486
- builder: (yargs28) => withConfiguration(
7855
+ builder: (yargs32) => withConfiguration(
7487
7856
  withApiOptions(
7488
7857
  withProjectOptions(
7489
- yargs28.positional("filename", { demandOption: true, describe: "Project map file to put" })
7858
+ yargs32.positional("filename", { demandOption: true, describe: "Project map file to put" })
7490
7859
  )
7491
7860
  )
7492
7861
  ),
@@ -7502,25 +7871,25 @@ var ProjectMapDefinitionUpdateModule = {
7502
7871
  var ProjectMapDefinitionModule = {
7503
7872
  command: "definition <command>",
7504
7873
  describe: "Commands for ProjectMap Definitions",
7505
- builder: (yargs28) => yargs28.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
7874
+ builder: (yargs32) => yargs32.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
7506
7875
  handler: () => {
7507
- yargs21.help();
7876
+ yargs25.help();
7508
7877
  }
7509
7878
  };
7510
7879
 
7511
7880
  // src/commands/project-map/commands/projectMapNode.ts
7512
- import yargs22 from "yargs";
7881
+ import yargs26 from "yargs";
7513
7882
 
7514
7883
  // src/commands/project-map/commands/ProjectMapNode/get.ts
7515
7884
  import { UncachedProjectMapClient as UncachedProjectMapClient7 } from "@uniformdev/project-map";
7516
7885
  var ProjectMapNodeGetModule = {
7517
7886
  command: "get <id> <projectMapId>",
7518
7887
  describe: "Fetch a project map node",
7519
- builder: (yargs28) => withConfiguration(
7888
+ builder: (yargs32) => withConfiguration(
7520
7889
  withFormatOptions(
7521
7890
  withApiOptions(
7522
7891
  withProjectOptions(
7523
- yargs28.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
7892
+ yargs32.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
7524
7893
  )
7525
7894
  )
7526
7895
  )
@@ -7546,11 +7915,11 @@ var ProjectMapNodeListModule = {
7546
7915
  command: "list <projectMapId>",
7547
7916
  describe: "List project map nodes",
7548
7917
  aliases: ["ls"],
7549
- builder: (yargs28) => withConfiguration(
7918
+ builder: (yargs32) => withConfiguration(
7550
7919
  withFormatOptions(
7551
7920
  withApiOptions(
7552
7921
  withProjectOptions(
7553
- yargs28.positional("projectMapId", {
7922
+ yargs32.positional("projectMapId", {
7554
7923
  demandOption: true,
7555
7924
  describe: "ProjectMap UUID to fetch from"
7556
7925
  })
@@ -7621,11 +7990,11 @@ function createProjectMapNodeEngineDataSource({
7621
7990
  var ProjectMapNodePullModule = {
7622
7991
  command: "pull <directory>",
7623
7992
  describe: "Pulls all project maps nodes to local files in a directory",
7624
- builder: (yargs28) => withConfiguration(
7993
+ builder: (yargs32) => withConfiguration(
7625
7994
  withApiOptions(
7626
7995
  withProjectOptions(
7627
7996
  withDiffOptions(
7628
- yargs28.positional("directory", {
7997
+ yargs32.positional("directory", {
7629
7998
  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.",
7630
7999
  type: "string"
7631
8000
  }).option("format", {
@@ -7706,11 +8075,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient10 } from "@uniform
7706
8075
  var ProjectMapNodePushModule = {
7707
8076
  command: "push <directory>",
7708
8077
  describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
7709
- builder: (yargs28) => withConfiguration(
8078
+ builder: (yargs32) => withConfiguration(
7710
8079
  withApiOptions(
7711
8080
  withProjectOptions(
7712
8081
  withDiffOptions(
7713
- yargs28.positional("directory", {
8082
+ yargs32.positional("directory", {
7714
8083
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
7715
8084
  type: "string"
7716
8085
  }).option("what-if", {
@@ -7785,10 +8154,10 @@ var ProjectMapNodeRemoveModule = {
7785
8154
  command: "remove <id> <projectMapId>",
7786
8155
  aliases: ["delete", "rm"],
7787
8156
  describe: "Delete a project map node",
7788
- builder: (yargs28) => withConfiguration(
8157
+ builder: (yargs32) => withConfiguration(
7789
8158
  withApiOptions(
7790
8159
  withProjectOptions(
7791
- yargs28.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
8160
+ yargs32.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
7792
8161
  )
7793
8162
  )
7794
8163
  ),
@@ -7805,10 +8174,10 @@ var ProjectMapNodeUpdateModule = {
7805
8174
  command: "update <filename> <projectMapId>",
7806
8175
  aliases: ["put"],
7807
8176
  describe: "Insert or update a project map node",
7808
- builder: (yargs28) => withConfiguration(
8177
+ builder: (yargs32) => withConfiguration(
7809
8178
  withApiOptions(
7810
8179
  withProjectOptions(
7811
- yargs28.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
8180
+ yargs32.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
7812
8181
  )
7813
8182
  )
7814
8183
  ),
@@ -7824,9 +8193,9 @@ var ProjectMapNodeUpdateModule = {
7824
8193
  var ProjectMapNodeModule = {
7825
8194
  command: "node <command>",
7826
8195
  describe: "Commands for ProjectMap Nodes",
7827
- builder: (yargs28) => yargs28.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
8196
+ builder: (yargs32) => yargs32.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
7828
8197
  handler: () => {
7829
- yargs22.help();
8198
+ yargs26.help();
7830
8199
  }
7831
8200
  };
7832
8201
 
@@ -7835,28 +8204,28 @@ var ProjectMapCommand = {
7835
8204
  command: "project-map <command>",
7836
8205
  aliases: ["prm"],
7837
8206
  describe: "Uniform ProjectMap commands",
7838
- builder: (yargs28) => yargs28.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
8207
+ builder: (yargs32) => yargs32.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
7839
8208
  handler: () => {
7840
- yargs23.showHelp();
8209
+ yargs27.showHelp();
7841
8210
  }
7842
8211
  };
7843
8212
 
7844
8213
  // src/commands/redirect/index.ts
7845
- import yargs25 from "yargs";
8214
+ import yargs29 from "yargs";
7846
8215
 
7847
8216
  // src/commands/redirect/commands/redirect.ts
7848
- import yargs24 from "yargs";
8217
+ import yargs28 from "yargs";
7849
8218
 
7850
8219
  // src/commands/redirect/commands/RedirectDefinition/get.ts
7851
8220
  import { UncachedRedirectClient } from "@uniformdev/redirect";
7852
8221
  var RedirectDefinitionGetModule = {
7853
8222
  command: "get <id>",
7854
8223
  describe: "Fetch a redirect",
7855
- builder: (yargs28) => withConfiguration(
8224
+ builder: (yargs32) => withConfiguration(
7856
8225
  withFormatOptions(
7857
8226
  withApiOptions(
7858
8227
  withProjectOptions(
7859
- yargs28.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
8228
+ yargs32.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
7860
8229
  )
7861
8230
  )
7862
8231
  )
@@ -7880,7 +8249,7 @@ var RedirectDefinitionListModule = {
7880
8249
  command: "list",
7881
8250
  describe: "List of redirects",
7882
8251
  aliases: ["ls"],
7883
- builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
8252
+ builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
7884
8253
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
7885
8254
  const fetch3 = nodeFetchProxy(proxy);
7886
8255
  const client = new UncachedRedirectClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -7946,11 +8315,11 @@ function createRedirectDefinitionEngineDataSource({
7946
8315
  var RedirectDefinitionPullModule = {
7947
8316
  command: "pull <directory>",
7948
8317
  describe: "Pulls all redirects to local files in a directory",
7949
- builder: (yargs28) => withConfiguration(
8318
+ builder: (yargs32) => withConfiguration(
7950
8319
  withApiOptions(
7951
8320
  withProjectOptions(
7952
8321
  withDiffOptions(
7953
- yargs28.positional("directory", {
8322
+ yargs32.positional("directory", {
7954
8323
  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.",
7955
8324
  type: "string"
7956
8325
  }).option("format", {
@@ -8028,11 +8397,11 @@ import { UncachedRedirectClient as UncachedRedirectClient4 } from "@uniformdev/r
8028
8397
  var RedirectDefinitionPushModule = {
8029
8398
  command: "push <directory>",
8030
8399
  describe: "Pushes all redirects from files in a directory or package to Uniform",
8031
- builder: (yargs28) => withConfiguration(
8400
+ builder: (yargs32) => withConfiguration(
8032
8401
  withApiOptions(
8033
8402
  withProjectOptions(
8034
8403
  withDiffOptions(
8035
- yargs28.positional("directory", {
8404
+ yargs32.positional("directory", {
8036
8405
  describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
8037
8406
  type: "string"
8038
8407
  }).option("what-if", {
@@ -8098,9 +8467,9 @@ var RedirectDefinitionRemoveModule = {
8098
8467
  command: "remove <id>",
8099
8468
  aliases: ["delete", "rm"],
8100
8469
  describe: "Delete a redirect",
8101
- builder: (yargs28) => withConfiguration(
8470
+ builder: (yargs32) => withConfiguration(
8102
8471
  withApiOptions(
8103
- withProjectOptions(yargs28.positional("id", { demandOption: true, describe: " UUID to delete" }))
8472
+ withProjectOptions(yargs32.positional("id", { demandOption: true, describe: " UUID to delete" }))
8104
8473
  )
8105
8474
  ),
8106
8475
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -8116,10 +8485,10 @@ var RedirectDefinitionUpdateModule = {
8116
8485
  command: "update <filename>",
8117
8486
  aliases: ["put"],
8118
8487
  describe: "Insert or update a redirect",
8119
- builder: (yargs28) => withConfiguration(
8488
+ builder: (yargs32) => withConfiguration(
8120
8489
  withApiOptions(
8121
8490
  withProjectOptions(
8122
- yargs28.positional("filename", { demandOption: true, describe: "Redirect file to put" })
8491
+ yargs32.positional("filename", { demandOption: true, describe: "Redirect file to put" })
8123
8492
  )
8124
8493
  )
8125
8494
  ),
@@ -8135,9 +8504,9 @@ var RedirectDefinitionUpdateModule = {
8135
8504
  var RedirectDefinitionModule = {
8136
8505
  command: "definition <command>",
8137
8506
  describe: "Commands for Redirect Definitions",
8138
- builder: (yargs28) => yargs28.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
8507
+ builder: (yargs32) => yargs32.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
8139
8508
  handler: () => {
8140
- yargs24.help();
8509
+ yargs28.help();
8141
8510
  }
8142
8511
  };
8143
8512
 
@@ -8146,14 +8515,14 @@ var RedirectCommand = {
8146
8515
  command: "redirect <command>",
8147
8516
  aliases: ["red"],
8148
8517
  describe: "Uniform Redirect commands",
8149
- builder: (yargs28) => yargs28.command(RedirectDefinitionModule).demandCommand(),
8518
+ builder: (yargs32) => yargs32.command(RedirectDefinitionModule).demandCommand(),
8150
8519
  handler: () => {
8151
- yargs25.showHelp();
8520
+ yargs29.showHelp();
8152
8521
  }
8153
8522
  };
8154
8523
 
8155
8524
  // src/commands/sync/index.ts
8156
- import yargs26 from "yargs";
8525
+ import yargs30 from "yargs";
8157
8526
 
8158
8527
  // src/commands/sync/commands/util.ts
8159
8528
  import ora2 from "ora";
@@ -8186,11 +8555,11 @@ function spin(entityType) {
8186
8555
  var SyncPullModule = {
8187
8556
  command: "pull",
8188
8557
  describe: "Pulls whole project to local files in a directory",
8189
- builder: (yargs28) => withConfiguration(
8558
+ builder: (yargs32) => withConfiguration(
8190
8559
  withApiOptions(
8191
8560
  withProjectOptions(
8192
8561
  withDiffOptions(
8193
- yargs28.option("what-if", {
8562
+ yargs32.option("what-if", {
8194
8563
  alias: ["w"],
8195
8564
  describe: "What-if mode reports what would be done but changes no files",
8196
8565
  default: false,
@@ -8284,11 +8653,11 @@ var getFormat = (entityType, config2) => {
8284
8653
  var SyncPushModule = {
8285
8654
  command: "push",
8286
8655
  describe: "Pushes whole project data from files in a directory or package to Uniform",
8287
- builder: (yargs28) => withConfiguration(
8656
+ builder: (yargs32) => withConfiguration(
8288
8657
  withApiOptions(
8289
8658
  withProjectOptions(
8290
8659
  withDiffOptions(
8291
- yargs28.option("what-if", {
8660
+ yargs32.option("what-if", {
8292
8661
  alias: ["w"],
8293
8662
  describe: "What-if mode reports what would be done but changes nothing",
8294
8663
  default: false,
@@ -8387,9 +8756,9 @@ var getFormat2 = (entityType, config2) => {
8387
8756
  var SyncCommand = {
8388
8757
  command: "sync <command>",
8389
8758
  describe: "Uniform Sync commands",
8390
- builder: (yargs28) => yargs28.command(SyncPullModule).command(SyncPushModule).demandCommand(),
8759
+ builder: (yargs32) => yargs32.command(SyncPullModule).command(SyncPushModule).demandCommand(),
8391
8760
  handler: () => {
8392
- yargs26.showHelp();
8761
+ yargs30.showHelp();
8393
8762
  }
8394
8763
  };
8395
8764
 
@@ -8401,18 +8770,19 @@ import { reset } from "colorette";
8401
8770
  function fillString(char, length) {
8402
8771
  return Array.from({ length }).map(() => char).join("");
8403
8772
  }
8773
+ var stdErrLog = (message) => process.stderr.write(message + "\n");
8404
8774
  function logCallout(options) {
8405
8775
  const message = typeof options === "string" ? options : options.message;
8406
8776
  const messageLines = message.trim().split("\n");
8407
8777
  const longestLine = messageLines.reduce((longest, next) => next.length > longest.length ? next : longest);
8408
8778
  const bar = "**" + fillString("*", reset(longestLine).length);
8409
- console.log("");
8410
- console.log(bar);
8779
+ stdErrLog("");
8780
+ stdErrLog(bar);
8411
8781
  for (const line of messageLines) {
8412
- console.log(` ${line}`);
8782
+ stdErrLog(` ${line}`);
8413
8783
  }
8414
- console.log(bar);
8415
- console.log("");
8784
+ stdErrLog(bar);
8785
+ stdErrLog("");
8416
8786
  }
8417
8787
 
8418
8788
  // src/updateCheck.ts
@@ -8655,7 +9025,7 @@ First found was: v${firstVersion}`;
8655
9025
 
8656
9026
  // src/index.ts
8657
9027
  dotenv.config();
8658
- var yarggery = yargs27(hideBin(process.argv));
9028
+ var yarggery = yargs31(hideBin(process.argv));
8659
9029
  var inlineConfigurationFilePath = "config" in yarggery.argv && yarggery.argv.config;
8660
9030
  var configuration = loadConfig(inlineConfigurationFilePath || null);
8661
9031
  yarggery.option("verbose", {
@@ -8664,4 +9034,4 @@ yarggery.option("verbose", {
8664
9034
  type: "boolean"
8665
9035
  }).scriptName("uniform").config(configuration).config("config", function() {
8666
9036
  return {};
8667
- }).command(CanvasCommand).command(ContextCommand).command(ProjectMapCommand).command(RedirectCommand).command(SyncCommand).command(NewCmd).command(NewMeshCmd).command(OptimizeCommand).demandCommand(1, "").strict().help().middleware([checkForUpdateMiddleware, checkLocalDepsVersions]).argv;
9037
+ }).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;