@uniformdev/cli 19.88.0 → 19.88.1-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -16,11 +16,11 @@ var __dirname = /* @__PURE__ */ getDirname();
16
16
 
17
17
  // src/index.ts
18
18
  import * as dotenv from "dotenv";
19
- import yargs26 from "yargs";
19
+ import yargs27 from "yargs";
20
20
  import { hideBin } from "yargs/helpers";
21
21
 
22
22
  // src/commands/canvas/index.ts
23
- import yargs10 from "yargs";
23
+ import yargs11 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(yargs27) {
141
- return yargs27.option("serialization", {
140
+ function withConfiguration(yargs28) {
141
+ return yargs28.option("serialization", {
142
142
  skipValidation: true,
143
143
  hidden: true
144
144
  });
145
145
  }
146
- function withApiOptions(yargs27) {
147
- return yargs27.option("apiKey", {
146
+ function withApiOptions(yargs28) {
147
+ return yargs28.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(yargs27) {
187
- return yargs27.option("project", {
186
+ function withProjectOptions(yargs28) {
187
+ return yargs28.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,8 @@ function withProjectOptions(yargs27) {
194
194
  alias: ["p"]
195
195
  });
196
196
  }
197
- function withFormatOptions(yargs27) {
198
- return yargs27.option("format", {
197
+ function withFormatOptions(yargs28) {
198
+ return yargs28.option("format", {
199
199
  alias: ["f"],
200
200
  describe: "Output format",
201
201
  default: "yaml",
@@ -207,8 +207,8 @@ function withFormatOptions(yargs27) {
207
207
  type: "string"
208
208
  });
209
209
  }
210
- function withDiffOptions(yargs27) {
211
- return yargs27.option("diff", {
210
+ function withDiffOptions(yargs28) {
211
+ return yargs28.option("diff", {
212
212
  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
213
  default: process.env.UNIFORM_CLI_DIFF_MODE ?? "off",
214
214
  type: "string",
@@ -632,12 +632,12 @@ function createPublishStatusSyncEngineConsoleLogger(options) {
632
632
  var AssetGetModule = {
633
633
  command: "get <id>",
634
634
  describe: "Get an asset",
635
- builder: (yargs27) => withConfiguration(
635
+ builder: (yargs28) => withConfiguration(
636
636
  withFormatOptions(
637
637
  withApiOptions(
638
638
  withProjectOptions(
639
639
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
640
- yargs27.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
640
+ yargs28.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
641
641
  )
642
642
  )
643
643
  )
@@ -658,7 +658,7 @@ import { UncachedAssetClient as UncachedAssetClient2 } from "@uniformdev/assets"
658
658
  var AssetListModule = {
659
659
  command: "list",
660
660
  describe: "List assets",
661
- builder: (yargs27) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs27)))),
661
+ builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
662
662
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
663
663
  const fetch3 = nodeFetchProxy(proxy);
664
664
  const client = new UncachedAssetClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -810,7 +810,9 @@ var extractAndUploadUniformFilesForObject = async (object, options) => {
810
810
  options.fileClient.get({ sourceId: hash }).catch(() => null),
811
811
  options.fileClient.get({ sourceId: legacyHash }).catch(() => null)
812
812
  ]);
813
- if (fileAlreadyExistsChecks.some((check) => check !== null)) {
813
+ const file = fileAlreadyExistsChecks.find((check) => check !== null);
814
+ if (file) {
815
+ objectAsString = objectAsString.replaceAll(`"${url}"`, `"${file.url}"`);
814
816
  return;
815
817
  }
816
818
  const localFileName = urlToFileName(url);
@@ -865,12 +867,12 @@ var extractAndUploadUniformFilesForObject = async (object, options) => {
865
867
  return;
866
868
  }
867
869
  const checkForFile = async () => {
868
- const file = await options.fileClient.get({ id });
869
- if (!file || file.state !== FILE_READY_STATE || !file.url) {
870
+ const file2 = await options.fileClient.get({ id });
871
+ if (!file2 || file2.state !== FILE_READY_STATE || !file2.url) {
870
872
  await new Promise((resolve2) => setTimeout(resolve2, 500));
871
873
  return checkForFile();
872
874
  }
873
- return file.url;
875
+ return file2.url;
874
876
  };
875
877
  const abortTimeout = setTimeout(() => {
876
878
  throw new Error(`Failed to upload file ${url} (upload timed out)`);
@@ -1008,8 +1010,8 @@ function prepCompositionForDisk(composition) {
1008
1010
  delete prepped.state;
1009
1011
  return prepped;
1010
1012
  }
1011
- function withStateOptions(yargs27) {
1012
- return yargs27.option("state", {
1013
+ function withStateOptions(yargs28) {
1014
+ return yargs28.option("state", {
1013
1015
  type: "string",
1014
1016
  describe: `Composition state to fetch.`,
1015
1017
  choices: ["preview", "published"],
@@ -1075,11 +1077,11 @@ function writeCanvasPackage(filename, packageContents) {
1075
1077
  var AssetPullModule = {
1076
1078
  command: "pull <directory>",
1077
1079
  describe: "Pulls all assets to local files in a directory",
1078
- builder: (yargs27) => withConfiguration(
1080
+ builder: (yargs28) => withConfiguration(
1079
1081
  withApiOptions(
1080
1082
  withProjectOptions(
1081
1083
  withDiffOptions(
1082
- yargs27.positional("directory", {
1084
+ yargs28.positional("directory", {
1083
1085
  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.",
1084
1086
  type: "string"
1085
1087
  }).option("format", {
@@ -1197,11 +1199,11 @@ import { UncachedFileClient as UncachedFileClient2 } from "@uniformdev/files";
1197
1199
  var AssetPushModule = {
1198
1200
  command: "push <directory>",
1199
1201
  describe: "Pushes all assets from files in a directory to Uniform",
1200
- builder: (yargs27) => withConfiguration(
1202
+ builder: (yargs28) => withConfiguration(
1201
1203
  withApiOptions(
1202
1204
  withProjectOptions(
1203
1205
  withDiffOptions(
1204
- yargs27.positional("directory", {
1206
+ yargs28.positional("directory", {
1205
1207
  describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
1206
1208
  type: "string"
1207
1209
  }).option("what-if", {
@@ -1277,15 +1279,10 @@ var AssetPushModule = {
1277
1279
  return sourceObjectWithNewFileUrls;
1278
1280
  },
1279
1281
  onBeforeWriteObject: async (sourceObject) => {
1280
- const sourceObjectWithNewFileUrls = await swapOutUniformFileUrlsForTargetProject(
1281
- await extractAndUploadUniformFilesForObject(sourceObject, {
1282
- directory,
1283
- fileClient
1284
- }),
1285
- {
1286
- fileClient
1287
- }
1288
- );
1282
+ const sourceObjectWithNewFileUrls = await extractAndUploadUniformFilesForObject(sourceObject, {
1283
+ directory,
1284
+ fileClient
1285
+ });
1289
1286
  sourceObjectWithNewFileUrls.object = await updateAssetFileIdBasedOnUrl(
1290
1287
  sourceObjectWithNewFileUrls.object,
1291
1288
  {
@@ -1304,9 +1301,9 @@ var AssetRemoveModule = {
1304
1301
  command: "remove <id>",
1305
1302
  aliases: ["delete", "rm"],
1306
1303
  describe: "Delete an asset",
1307
- builder: (yargs27) => withConfiguration(
1304
+ builder: (yargs28) => withConfiguration(
1308
1305
  withApiOptions(
1309
- withProjectOptions(yargs27.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
1306
+ withProjectOptions(yargs28.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
1310
1307
  )
1311
1308
  ),
1312
1309
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -1322,10 +1319,10 @@ var AssetUpdateModule = {
1322
1319
  command: "update <filename>",
1323
1320
  aliases: ["put"],
1324
1321
  describe: "Insert or update an asset",
1325
- builder: (yargs27) => withConfiguration(
1322
+ builder: (yargs28) => withConfiguration(
1326
1323
  withApiOptions(
1327
1324
  withProjectOptions(
1328
- yargs27.positional("filename", { demandOption: true, describe: "Asset file to put" })
1325
+ yargs28.positional("filename", { demandOption: true, describe: "Asset file to put" })
1329
1326
  )
1330
1327
  )
1331
1328
  ),
@@ -1341,7 +1338,7 @@ var AssetUpdateModule = {
1341
1338
  var AssetModule = {
1342
1339
  command: "asset <command>",
1343
1340
  describe: "Commands for Assets",
1344
- builder: (yargs27) => yargs27.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
1341
+ builder: (yargs28) => yargs28.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
1345
1342
  handler: () => {
1346
1343
  yargs.help();
1347
1344
  }
@@ -1355,11 +1352,11 @@ import { UncachedCategoryClient } from "@uniformdev/canvas";
1355
1352
  var CategoryGetModule = {
1356
1353
  command: "get <id>",
1357
1354
  describe: "Fetch a category",
1358
- builder: (yargs27) => withConfiguration(
1355
+ builder: (yargs28) => withConfiguration(
1359
1356
  withFormatOptions(
1360
1357
  withApiOptions(
1361
1358
  withProjectOptions(
1362
- yargs27.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
1359
+ yargs28.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
1363
1360
  )
1364
1361
  )
1365
1362
  )
@@ -1384,7 +1381,7 @@ var CategoryListModule = {
1384
1381
  command: "list",
1385
1382
  describe: "List categories",
1386
1383
  aliases: ["ls"],
1387
- builder: (yargs27) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs27.options({}))))),
1384
+ builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28.options({}))))),
1388
1385
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
1389
1386
  const fetch3 = nodeFetchProxy(proxy);
1390
1387
  const client = new UncachedCategoryClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -1433,11 +1430,11 @@ function createCategoriesEngineDataSource({
1433
1430
  var CategoryPullModule = {
1434
1431
  command: "pull <directory>",
1435
1432
  describe: "Pulls all categories to local files in a directory",
1436
- builder: (yargs27) => withConfiguration(
1433
+ builder: (yargs28) => withConfiguration(
1437
1434
  withApiOptions(
1438
1435
  withProjectOptions(
1439
1436
  withDiffOptions(
1440
- yargs27.positional("directory", {
1437
+ yargs28.positional("directory", {
1441
1438
  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.",
1442
1439
  type: "string"
1443
1440
  }).option("format", {
@@ -1513,11 +1510,11 @@ import { UncachedCategoryClient as UncachedCategoryClient4 } from "@uniformdev/c
1513
1510
  var CategoryPushModule = {
1514
1511
  command: "push <directory>",
1515
1512
  describe: "Pushes all categories from files in a directory to Uniform Canvas",
1516
- builder: (yargs27) => withConfiguration(
1513
+ builder: (yargs28) => withConfiguration(
1517
1514
  withApiOptions(
1518
1515
  withProjectOptions(
1519
1516
  withDiffOptions(
1520
- yargs27.positional("directory", {
1517
+ yargs28.positional("directory", {
1521
1518
  describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
1522
1519
  type: "string"
1523
1520
  }).option("what-if", {
@@ -1581,10 +1578,10 @@ var CategoryRemoveModule = {
1581
1578
  command: "remove <id>",
1582
1579
  aliases: ["delete", "rm"],
1583
1580
  describe: "Delete a category",
1584
- builder: (yargs27) => withConfiguration(
1581
+ builder: (yargs28) => withConfiguration(
1585
1582
  withApiOptions(
1586
1583
  withProjectOptions(
1587
- yargs27.positional("id", { demandOption: true, describe: "Category UUID to delete" })
1584
+ yargs28.positional("id", { demandOption: true, describe: "Category UUID to delete" })
1588
1585
  )
1589
1586
  )
1590
1587
  ),
@@ -1601,10 +1598,10 @@ var CategoryUpdateModule = {
1601
1598
  command: "update <filename>",
1602
1599
  aliases: ["put"],
1603
1600
  describe: "Insert or update a category",
1604
- builder: (yargs27) => withConfiguration(
1601
+ builder: (yargs28) => withConfiguration(
1605
1602
  withApiOptions(
1606
1603
  withProjectOptions(
1607
- yargs27.positional("filename", { demandOption: true, describe: "Category file to put" })
1604
+ yargs28.positional("filename", { demandOption: true, describe: "Category file to put" })
1608
1605
  )
1609
1606
  )
1610
1607
  ),
@@ -1621,7 +1618,7 @@ var CategoryModule = {
1621
1618
  command: "category <command>",
1622
1619
  aliases: ["cat"],
1623
1620
  describe: "Commands for Canvas categories",
1624
- builder: (yargs27) => yargs27.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
1621
+ builder: (yargs28) => yargs28.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
1625
1622
  handler: () => {
1626
1623
  yargs2.help();
1627
1624
  }
@@ -1642,11 +1639,11 @@ var selectSchemaUrl = () => "/schemas/json-schema/component-definition/v1.json";
1642
1639
  var ComponentGetModule = {
1643
1640
  command: "get <id>",
1644
1641
  describe: "Fetch a component definition",
1645
- builder: (yargs27) => withConfiguration(
1642
+ builder: (yargs28) => withConfiguration(
1646
1643
  withFormatOptions(
1647
1644
  withApiOptions(
1648
1645
  withProjectOptions(
1649
- yargs27.positional("id", {
1646
+ yargs28.positional("id", {
1650
1647
  demandOption: true,
1651
1648
  describe: "Component definition public ID to fetch"
1652
1649
  })
@@ -1680,11 +1677,11 @@ var ComponentListModule = {
1680
1677
  command: "list",
1681
1678
  describe: "List component definitions",
1682
1679
  aliases: ["ls"],
1683
- builder: (yargs27) => withConfiguration(
1680
+ builder: (yargs28) => withConfiguration(
1684
1681
  withFormatOptions(
1685
1682
  withApiOptions(
1686
1683
  withProjectOptions(
1687
- yargs27.options({
1684
+ yargs28.options({
1688
1685
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
1689
1686
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
1690
1687
  })
@@ -1739,11 +1736,11 @@ function createComponentDefinitionEngineDataSource({
1739
1736
  var ComponentPullModule = {
1740
1737
  command: "pull <directory>",
1741
1738
  describe: "Pulls all component definitions to local files in a directory",
1742
- builder: (yargs27) => withConfiguration(
1739
+ builder: (yargs28) => withConfiguration(
1743
1740
  withApiOptions(
1744
1741
  withProjectOptions(
1745
1742
  withDiffOptions(
1746
- yargs27.positional("directory", {
1743
+ yargs28.positional("directory", {
1747
1744
  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.",
1748
1745
  type: "string"
1749
1746
  }).option("format", {
@@ -1820,11 +1817,11 @@ import { UncachedCanvasClient as UncachedCanvasClient4 } from "@uniformdev/canva
1820
1817
  var ComponentPushModule = {
1821
1818
  command: "push <directory>",
1822
1819
  describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
1823
- builder: (yargs27) => withConfiguration(
1820
+ builder: (yargs28) => withConfiguration(
1824
1821
  withApiOptions(
1825
1822
  withProjectOptions(
1826
1823
  withDiffOptions(
1827
- yargs27.positional("directory", {
1824
+ yargs28.positional("directory", {
1828
1825
  describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
1829
1826
  type: "string"
1830
1827
  }).option("what-if", {
@@ -1889,10 +1886,10 @@ var ComponentRemoveModule = {
1889
1886
  command: "remove <id>",
1890
1887
  aliases: ["delete", "rm"],
1891
1888
  describe: "Delete a component definition",
1892
- builder: (yargs27) => withConfiguration(
1889
+ builder: (yargs28) => withConfiguration(
1893
1890
  withApiOptions(
1894
1891
  withProjectOptions(
1895
- yargs27.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1892
+ yargs28.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1896
1893
  )
1897
1894
  )
1898
1895
  ),
@@ -1909,10 +1906,10 @@ var ComponentUpdateModule = {
1909
1906
  command: "update <filename>",
1910
1907
  aliases: ["put"],
1911
1908
  describe: "Insert or update a component definition",
1912
- builder: (yargs27) => withConfiguration(
1909
+ builder: (yargs28) => withConfiguration(
1913
1910
  withApiOptions(
1914
1911
  withProjectOptions(
1915
- yargs27.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1912
+ yargs28.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1916
1913
  )
1917
1914
  )
1918
1915
  ),
@@ -1929,7 +1926,7 @@ var ComponentModule = {
1929
1926
  command: "component <command>",
1930
1927
  aliases: ["def"],
1931
1928
  describe: "Commands for Canvas component definitions",
1932
- builder: (yargs27) => yargs27.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
1929
+ builder: (yargs28) => yargs28.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
1933
1930
  handler: () => {
1934
1931
  yargs3.help();
1935
1932
  }
@@ -1943,12 +1940,12 @@ import { UncachedCanvasClient as UncachedCanvasClient7 } from "@uniformdev/canva
1943
1940
  var CompositionGetModule = {
1944
1941
  command: "get <id>",
1945
1942
  describe: "Fetch a composition",
1946
- builder: (yargs27) => withFormatOptions(
1943
+ builder: (yargs28) => withFormatOptions(
1947
1944
  withConfiguration(
1948
1945
  withApiOptions(
1949
1946
  withProjectOptions(
1950
1947
  withStateOptions(
1951
- yargs27.positional("id", { demandOption: true, describe: "Composition/pattern public ID to fetch" }).option({
1948
+ yargs28.positional("id", { demandOption: true, describe: "Composition/pattern public ID to fetch" }).option({
1952
1949
  resolvePatterns: {
1953
1950
  type: "boolean",
1954
1951
  default: false,
@@ -2019,12 +2016,12 @@ var CompositionListModule = {
2019
2016
  command: "list",
2020
2017
  describe: "List compositions",
2021
2018
  aliases: ["ls"],
2022
- builder: (yargs27) => withFormatOptions(
2019
+ builder: (yargs28) => withFormatOptions(
2023
2020
  withConfiguration(
2024
2021
  withApiOptions(
2025
2022
  withProjectOptions(
2026
2023
  withStateOptions(
2027
- yargs27.options({
2024
+ yargs28.options({
2028
2025
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
2029
2026
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
2030
2027
  resolvePatterns: {
@@ -2145,11 +2142,11 @@ function createComponentInstanceEngineDataSource({
2145
2142
  var CompositionPublishModule = {
2146
2143
  command: "publish [ids]",
2147
2144
  describe: "Publishes composition(s)",
2148
- builder: (yargs27) => withConfiguration(
2145
+ builder: (yargs28) => withConfiguration(
2149
2146
  withApiOptions(
2150
2147
  withProjectOptions(
2151
2148
  withDiffOptions(
2152
- yargs27.positional("ids", {
2149
+ yargs28.positional("ids", {
2153
2150
  describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
2154
2151
  type: "string"
2155
2152
  }).option("all", {
@@ -2225,12 +2222,12 @@ import { UncachedFileClient as UncachedFileClient3 } from "@uniformdev/files";
2225
2222
  var CompositionPullModule = {
2226
2223
  command: "pull <directory>",
2227
2224
  describe: "Pulls all compositions to local files in a directory",
2228
- builder: (yargs27) => withConfiguration(
2225
+ builder: (yargs28) => withConfiguration(
2229
2226
  withApiOptions(
2230
2227
  withProjectOptions(
2231
2228
  withStateOptions(
2232
2229
  withDiffOptions(
2233
- yargs27.positional("directory", {
2230
+ yargs28.positional("directory", {
2234
2231
  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.",
2235
2232
  type: "string"
2236
2233
  }).option("format", {
@@ -2333,12 +2330,12 @@ import { UncachedFileClient as UncachedFileClient4 } from "@uniformdev/files";
2333
2330
  var CompositionPushModule = {
2334
2331
  command: "push <directory>",
2335
2332
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
2336
- builder: (yargs27) => withConfiguration(
2333
+ builder: (yargs28) => withConfiguration(
2337
2334
  withApiOptions(
2338
2335
  withProjectOptions(
2339
2336
  withStateOptions(
2340
2337
  withDiffOptions(
2341
- yargs27.positional("directory", {
2338
+ yargs28.positional("directory", {
2342
2339
  describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
2343
2340
  type: "string"
2344
2341
  }).option("what-if", {
@@ -2427,10 +2424,10 @@ var CompositionRemoveModule = {
2427
2424
  command: "remove <id>",
2428
2425
  aliases: ["delete", "rm"],
2429
2426
  describe: "Delete a composition",
2430
- builder: (yargs27) => withConfiguration(
2427
+ builder: (yargs28) => withConfiguration(
2431
2428
  withApiOptions(
2432
2429
  withProjectOptions(
2433
- yargs27.positional("id", { demandOption: true, describe: "Composition/pattern public ID to delete" })
2430
+ yargs28.positional("id", { demandOption: true, describe: "Composition/pattern public ID to delete" })
2434
2431
  )
2435
2432
  )
2436
2433
  ),
@@ -2447,10 +2444,10 @@ import { diffJson as diffJson2 } from "diff";
2447
2444
  var CompositionUnpublishModule = {
2448
2445
  command: "unpublish [ids]",
2449
2446
  describe: "Unpublish a composition(s)",
2450
- builder: (yargs27) => withConfiguration(
2447
+ builder: (yargs28) => withConfiguration(
2451
2448
  withApiOptions(
2452
2449
  withProjectOptions(
2453
- yargs27.positional("ids", {
2450
+ yargs28.positional("ids", {
2454
2451
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
2455
2452
  type: "string"
2456
2453
  }).option("all", {
@@ -2544,11 +2541,11 @@ var CompositionUpdateModule = {
2544
2541
  command: "update <filename>",
2545
2542
  aliases: ["put"],
2546
2543
  describe: "Insert or update a composition",
2547
- builder: (yargs27) => withConfiguration(
2544
+ builder: (yargs28) => withConfiguration(
2548
2545
  withApiOptions(
2549
2546
  withProjectOptions(
2550
2547
  withStateOptions(
2551
- yargs27.positional("filename", { demandOption: true, describe: "Composition/pattern file to put" })
2548
+ yargs28.positional("filename", { demandOption: true, describe: "Composition/pattern file to put" })
2552
2549
  )
2553
2550
  )
2554
2551
  )
@@ -2566,7 +2563,7 @@ var CompositionModule = {
2566
2563
  command: "composition <command>",
2567
2564
  describe: "Commands for Canvas compositions",
2568
2565
  aliases: ["comp"],
2569
- builder: (yargs27) => yargs27.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
2566
+ builder: (yargs28) => yargs28.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
2570
2567
  handler: () => {
2571
2568
  yargs4.help();
2572
2569
  }
@@ -2580,12 +2577,12 @@ import { ContentClient } from "@uniformdev/canvas";
2580
2577
  var ContentTypeGetModule = {
2581
2578
  command: "get <id>",
2582
2579
  describe: "Get a content type",
2583
- builder: (yargs27) => withConfiguration(
2580
+ builder: (yargs28) => withConfiguration(
2584
2581
  withFormatOptions(
2585
2582
  withApiOptions(
2586
2583
  withProjectOptions(
2587
2584
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2588
- yargs27.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
2585
+ yargs28.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
2589
2586
  )
2590
2587
  )
2591
2588
  )
@@ -2607,7 +2604,7 @@ import { ContentClient as ContentClient2 } from "@uniformdev/canvas";
2607
2604
  var ContentTypeListModule = {
2608
2605
  command: "list",
2609
2606
  describe: "List content types",
2610
- builder: (yargs27) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs27)))),
2607
+ builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
2611
2608
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2612
2609
  const fetch3 = nodeFetchProxy(proxy);
2613
2610
  const client = new ContentClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -2654,11 +2651,11 @@ function createContentTypeEngineDataSource({
2654
2651
  var ContentTypePullModule = {
2655
2652
  command: "pull <directory>",
2656
2653
  describe: "Pulls all content types to local files in a directory",
2657
- builder: (yargs27) => withConfiguration(
2654
+ builder: (yargs28) => withConfiguration(
2658
2655
  withApiOptions(
2659
2656
  withProjectOptions(
2660
2657
  withDiffOptions(
2661
- yargs27.positional("directory", {
2658
+ yargs28.positional("directory", {
2662
2659
  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.",
2663
2660
  type: "string"
2664
2661
  }).option("format", {
@@ -2740,11 +2737,11 @@ import { ContentClient as ContentClient4 } from "@uniformdev/canvas";
2740
2737
  var ContentTypePushModule = {
2741
2738
  command: "push <directory>",
2742
2739
  describe: "Pushes all content types from files in a directory to Uniform",
2743
- builder: (yargs27) => withConfiguration(
2740
+ builder: (yargs28) => withConfiguration(
2744
2741
  withApiOptions(
2745
2742
  withProjectOptions(
2746
2743
  withDiffOptions(
2747
- yargs27.positional("directory", {
2744
+ yargs28.positional("directory", {
2748
2745
  describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
2749
2746
  type: "string"
2750
2747
  }).option("what-if", {
@@ -2814,10 +2811,10 @@ var ContentTypeRemoveModule = {
2814
2811
  command: "remove <id>",
2815
2812
  aliases: ["delete", "rm"],
2816
2813
  describe: "Delete a content type",
2817
- builder: (yargs27) => withConfiguration(
2814
+ builder: (yargs28) => withConfiguration(
2818
2815
  withApiOptions(
2819
2816
  withProjectOptions(
2820
- yargs27.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
2817
+ yargs28.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
2821
2818
  )
2822
2819
  )
2823
2820
  ),
@@ -2834,10 +2831,10 @@ var ContentTypeUpdateModule = {
2834
2831
  command: "update <filename>",
2835
2832
  aliases: ["put"],
2836
2833
  describe: "Insert or update a content type",
2837
- builder: (yargs27) => withConfiguration(
2834
+ builder: (yargs28) => withConfiguration(
2838
2835
  withApiOptions(
2839
2836
  withProjectOptions(
2840
- yargs27.positional("filename", { demandOption: true, describe: "Content type file to put" })
2837
+ yargs28.positional("filename", { demandOption: true, describe: "Content type file to put" })
2841
2838
  )
2842
2839
  )
2843
2840
  ),
@@ -2854,7 +2851,7 @@ var ContentTypeModule = {
2854
2851
  command: "contenttype <command>",
2855
2852
  aliases: ["ct"],
2856
2853
  describe: "Commands for Content Types",
2857
- builder: (yargs27) => yargs27.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
2854
+ builder: (yargs28) => yargs28.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
2858
2855
  handler: () => {
2859
2856
  yargs5.help();
2860
2857
  }
@@ -2869,12 +2866,12 @@ var DataTypeGetModule = {
2869
2866
  command: "get <id>",
2870
2867
  describe: "Get a data type",
2871
2868
  aliases: ["ls"],
2872
- builder: (yargs27) => withConfiguration(
2869
+ builder: (yargs28) => withConfiguration(
2873
2870
  withFormatOptions(
2874
2871
  withApiOptions(
2875
2872
  withProjectOptions(
2876
2873
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2877
- yargs27.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
2874
+ yargs28.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
2878
2875
  )
2879
2876
  )
2880
2877
  )
@@ -2897,7 +2894,7 @@ var DataTypeListModule = {
2897
2894
  command: "list",
2898
2895
  describe: "List data types",
2899
2896
  aliases: ["ls"],
2900
- builder: (yargs27) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs27)))),
2897
+ builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
2901
2898
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2902
2899
  const fetch3 = nodeFetchProxy(proxy);
2903
2900
  const client = new DataTypeClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -2946,11 +2943,11 @@ function createDataTypeEngineDataSource({
2946
2943
  var DataTypePullModule = {
2947
2944
  command: "pull <directory>",
2948
2945
  describe: "Pulls all data types to local files in a directory",
2949
- builder: (yargs27) => withConfiguration(
2946
+ builder: (yargs28) => withConfiguration(
2950
2947
  withApiOptions(
2951
2948
  withProjectOptions(
2952
2949
  withDiffOptions(
2953
- yargs27.positional("directory", {
2950
+ yargs28.positional("directory", {
2954
2951
  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.",
2955
2952
  type: "string"
2956
2953
  }).option("format", {
@@ -3032,11 +3029,11 @@ import { DataTypeClient as DataTypeClient4 } from "@uniformdev/canvas";
3032
3029
  var DataTypePushModule = {
3033
3030
  command: "push <directory>",
3034
3031
  describe: "Pushes all data types from files in a directory to Uniform",
3035
- builder: (yargs27) => withConfiguration(
3032
+ builder: (yargs28) => withConfiguration(
3036
3033
  withApiOptions(
3037
3034
  withProjectOptions(
3038
3035
  withDiffOptions(
3039
- yargs27.positional("directory", {
3036
+ yargs28.positional("directory", {
3040
3037
  describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
3041
3038
  type: "string"
3042
3039
  }).option("what-if", {
@@ -3106,10 +3103,10 @@ var DataTypeRemoveModule = {
3106
3103
  command: "remove <id>",
3107
3104
  aliases: ["delete", "rm"],
3108
3105
  describe: "Delete a data type",
3109
- builder: (yargs27) => withConfiguration(
3106
+ builder: (yargs28) => withConfiguration(
3110
3107
  withApiOptions(
3111
3108
  withProjectOptions(
3112
- yargs27.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
3109
+ yargs28.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
3113
3110
  )
3114
3111
  )
3115
3112
  ),
@@ -3126,10 +3123,10 @@ var DataTypeUpdateModule = {
3126
3123
  command: "update <filename>",
3127
3124
  aliases: ["put"],
3128
3125
  describe: "Insert or update a data type",
3129
- builder: (yargs27) => withConfiguration(
3126
+ builder: (yargs28) => withConfiguration(
3130
3127
  withApiOptions(
3131
3128
  withProjectOptions(
3132
- yargs27.positional("filename", { demandOption: true, describe: "Data type file to put" })
3129
+ yargs28.positional("filename", { demandOption: true, describe: "Data type file to put" })
3133
3130
  )
3134
3131
  )
3135
3132
  ),
@@ -3146,7 +3143,7 @@ var DataTypeModule = {
3146
3143
  command: "datatype <command>",
3147
3144
  aliases: ["dt"],
3148
3145
  describe: "Commands for Data Type definitions",
3149
- builder: (yargs27) => yargs27.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
3146
+ builder: (yargs28) => yargs28.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
3150
3147
  handler: () => {
3151
3148
  yargs6.help();
3152
3149
  }
@@ -3160,12 +3157,12 @@ import { ContentClient as ContentClient7 } from "@uniformdev/canvas";
3160
3157
  var EntryGetModule = {
3161
3158
  command: "get <id>",
3162
3159
  describe: "Get an entry",
3163
- builder: (yargs27) => withConfiguration(
3160
+ builder: (yargs28) => withConfiguration(
3164
3161
  withFormatOptions(
3165
3162
  withApiOptions(
3166
3163
  withProjectOptions(
3167
3164
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3168
- yargs27.positional("id", { demandOption: true, describe: "Entry public ID to fetch" })
3165
+ yargs28.positional("id", { demandOption: true, describe: "Entry public ID to fetch" })
3169
3166
  )
3170
3167
  )
3171
3168
  )
@@ -3191,7 +3188,7 @@ import { ContentClient as ContentClient8 } from "@uniformdev/canvas";
3191
3188
  var EntryListModule = {
3192
3189
  command: "list",
3193
3190
  describe: "List entries",
3194
- builder: (yargs27) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs27)))),
3191
+ builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
3195
3192
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3196
3193
  const fetch3 = nodeFetchProxy(proxy);
3197
3194
  const client = new ContentClient8({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -3251,12 +3248,12 @@ function createEntryEngineDataSource({
3251
3248
  var EntryPullModule = {
3252
3249
  command: "pull <directory>",
3253
3250
  describe: "Pulls all entries to local files in a directory",
3254
- builder: (yargs27) => withConfiguration(
3251
+ builder: (yargs28) => withConfiguration(
3255
3252
  withApiOptions(
3256
3253
  withProjectOptions(
3257
3254
  withStateOptions(
3258
3255
  withDiffOptions(
3259
- yargs27.positional("directory", {
3256
+ yargs28.positional("directory", {
3260
3257
  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.",
3261
3258
  type: "string"
3262
3259
  }).option("format", {
@@ -3354,12 +3351,12 @@ import { UncachedFileClient as UncachedFileClient6 } from "@uniformdev/files";
3354
3351
  var EntryPushModule = {
3355
3352
  command: "push <directory>",
3356
3353
  describe: "Pushes all entries from files in a directory to Uniform",
3357
- builder: (yargs27) => withConfiguration(
3354
+ builder: (yargs28) => withConfiguration(
3358
3355
  withApiOptions(
3359
3356
  withProjectOptions(
3360
3357
  withStateOptions(
3361
3358
  withDiffOptions(
3362
- yargs27.positional("directory", {
3359
+ yargs28.positional("directory", {
3363
3360
  describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
3364
3361
  type: "string"
3365
3362
  }).option("what-if", {
@@ -3443,10 +3440,10 @@ var EntryRemoveModule = {
3443
3440
  command: "remove <id>",
3444
3441
  aliases: ["delete", "rm"],
3445
3442
  describe: "Delete an entry",
3446
- builder: (yargs27) => withConfiguration(
3443
+ builder: (yargs28) => withConfiguration(
3447
3444
  withApiOptions(
3448
3445
  withProjectOptions(
3449
- yargs27.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
3446
+ yargs28.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
3450
3447
  )
3451
3448
  )
3452
3449
  ),
@@ -3463,10 +3460,10 @@ var EntryUpdateModule = {
3463
3460
  command: "update <filename>",
3464
3461
  aliases: ["put"],
3465
3462
  describe: "Insert or update an entry",
3466
- builder: (yargs27) => withConfiguration(
3463
+ builder: (yargs28) => withConfiguration(
3467
3464
  withApiOptions(
3468
3465
  withProjectOptions(
3469
- yargs27.positional("filename", { demandOption: true, describe: "Entry file to put" })
3466
+ yargs28.positional("filename", { demandOption: true, describe: "Entry file to put" })
3470
3467
  )
3471
3468
  )
3472
3469
  ),
@@ -3482,15 +3479,218 @@ var EntryUpdateModule = {
3482
3479
  var EntryModule = {
3483
3480
  command: "entry <command>",
3484
3481
  describe: "Commands for Entries",
3485
- builder: (yargs27) => yargs27.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).demandCommand(),
3482
+ builder: (yargs28) => yargs28.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).demandCommand(),
3486
3483
  handler: () => {
3487
3484
  yargs7.help();
3488
3485
  }
3489
3486
  };
3490
3487
 
3491
- // src/commands/canvas/commands/pattern.ts
3488
+ // src/commands/canvas/commands/locale.ts
3492
3489
  import yargs8 from "yargs";
3493
3490
 
3491
+ // src/commands/canvas/commands/locale/pull.ts
3492
+ import { LocaleClient } from "@uniformdev/canvas";
3493
+
3494
+ // src/commands/canvas/localesEngineDataSource.ts
3495
+ function createLocaleEngineDataSource({
3496
+ client
3497
+ }) {
3498
+ async function* getObjects() {
3499
+ const locales = (await client.get()).results;
3500
+ for await (const locale of locales) {
3501
+ const result = {
3502
+ id: locale.locale,
3503
+ displayName: locale.displayName,
3504
+ providerId: locale.locale,
3505
+ object: locale
3506
+ };
3507
+ yield result;
3508
+ }
3509
+ }
3510
+ return {
3511
+ objects: getObjects(),
3512
+ deleteObject: async (providerId) => {
3513
+ await client.remove({ locale: providerId });
3514
+ },
3515
+ writeObject: async (object) => {
3516
+ await client.upsert({
3517
+ locale: object.object
3518
+ });
3519
+ }
3520
+ };
3521
+ }
3522
+
3523
+ // src/commands/canvas/commands/locale/pull.ts
3524
+ var LocalePullModule = {
3525
+ command: "pull <directory>",
3526
+ describe: "Pulls all locales to local files in a directory",
3527
+ builder: (yargs28) => withConfiguration(
3528
+ withApiOptions(
3529
+ withProjectOptions(
3530
+ withDiffOptions(
3531
+ yargs28.positional("directory", {
3532
+ 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.",
3533
+ type: "string"
3534
+ }).option("format", {
3535
+ alias: ["f"],
3536
+ describe: "Output format",
3537
+ default: "yaml",
3538
+ choices: ["yaml", "json"],
3539
+ type: "string"
3540
+ }).option("what-if", {
3541
+ alias: ["w"],
3542
+ describe: "What-if mode reports what would be done but changes no files",
3543
+ default: false,
3544
+ type: "boolean"
3545
+ }).option("mode", {
3546
+ alias: ["m"],
3547
+ describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
3548
+ choices: ["create", "createOrUpdate", "mirror"],
3549
+ default: "mirror",
3550
+ type: "string"
3551
+ })
3552
+ )
3553
+ )
3554
+ )
3555
+ ),
3556
+ handler: async ({
3557
+ apiHost,
3558
+ apiKey,
3559
+ proxy,
3560
+ directory,
3561
+ format,
3562
+ mode,
3563
+ whatIf,
3564
+ project: projectId,
3565
+ diff: diffMode
3566
+ }) => {
3567
+ const fetch3 = nodeFetchProxy(proxy);
3568
+ const client = new LocaleClient({
3569
+ apiKey,
3570
+ apiHost,
3571
+ fetch: fetch3,
3572
+ projectId,
3573
+ bypassCache: true
3574
+ });
3575
+ const source = createLocaleEngineDataSource({ client });
3576
+ let target;
3577
+ const isPackage = isPathAPackageFile(directory);
3578
+ if (isPackage) {
3579
+ const packageContents = readCanvasPackage(directory, false);
3580
+ target = await createArraySyncEngineDataSource({
3581
+ objects: packageContents.locales ?? [],
3582
+ selectIdentifier: (i) => i.locale,
3583
+ selectDisplayName: (i) => i.displayName,
3584
+ onSyncComplete: async (_, synced) => {
3585
+ packageContents.locales = synced;
3586
+ writeCanvasPackage(directory, packageContents);
3587
+ }
3588
+ });
3589
+ } else {
3590
+ target = await createFileSyncEngineDataSource({
3591
+ directory,
3592
+ selectIdentifier: (i) => i.locale,
3593
+ selectDisplayName: (i) => i.displayName,
3594
+ format
3595
+ });
3596
+ }
3597
+ await syncEngine({
3598
+ source,
3599
+ target,
3600
+ mode,
3601
+ whatIf,
3602
+ allowEmptySource: true,
3603
+ log: createSyncEngineConsoleLogger({ diffMode })
3604
+ });
3605
+ }
3606
+ };
3607
+
3608
+ // src/commands/canvas/commands/locale/push.ts
3609
+ import { LocaleClient as LocaleClient2 } from "@uniformdev/canvas";
3610
+ var LocalePushModule = {
3611
+ command: "push <directory>",
3612
+ describe: "Pushes all locales from files in a directory to Uniform",
3613
+ builder: (yargs28) => withConfiguration(
3614
+ withApiOptions(
3615
+ withProjectOptions(
3616
+ withDiffOptions(
3617
+ yargs28.positional("directory", {
3618
+ describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
3619
+ type: "string"
3620
+ }).option("what-if", {
3621
+ alias: ["w"],
3622
+ describe: "What-if mode reports what would be done but changes nothing",
3623
+ default: false,
3624
+ type: "boolean"
3625
+ }).option("mode", {
3626
+ alias: ["m"],
3627
+ describe: 'What kind of changes can be made. "create" = create new, update nothing. "createOrUpdate" = create new, update existing, delete nothing. "mirror" = create, update, and delete',
3628
+ choices: ["create", "createOrUpdate", "mirror"],
3629
+ default: "mirror",
3630
+ type: "string"
3631
+ })
3632
+ )
3633
+ )
3634
+ )
3635
+ ),
3636
+ handler: async ({
3637
+ apiHost,
3638
+ apiKey,
3639
+ proxy,
3640
+ directory,
3641
+ mode,
3642
+ whatIf,
3643
+ project: projectId,
3644
+ diff: diffMode
3645
+ }) => {
3646
+ const fetch3 = nodeFetchProxy(proxy);
3647
+ const client = new LocaleClient2({
3648
+ apiKey,
3649
+ apiHost,
3650
+ fetch: fetch3,
3651
+ projectId,
3652
+ bypassCache: true
3653
+ });
3654
+ let source;
3655
+ const isPackage = isPathAPackageFile(directory);
3656
+ if (isPackage) {
3657
+ const packageContents = readCanvasPackage(directory, true);
3658
+ source = await createArraySyncEngineDataSource({
3659
+ objects: packageContents.locales ?? [],
3660
+ selectIdentifier: (locale) => locale.locale,
3661
+ selectDisplayName: (locale) => locale.displayName
3662
+ });
3663
+ } else {
3664
+ source = await createFileSyncEngineDataSource({
3665
+ directory,
3666
+ selectIdentifier: (locale) => locale.locale,
3667
+ selectDisplayName: (locale) => locale.displayName
3668
+ });
3669
+ }
3670
+ const target = createLocaleEngineDataSource({ client });
3671
+ await syncEngine({
3672
+ source,
3673
+ target,
3674
+ mode,
3675
+ whatIf,
3676
+ log: createSyncEngineConsoleLogger({ diffMode })
3677
+ });
3678
+ }
3679
+ };
3680
+
3681
+ // src/commands/canvas/commands/locale.ts
3682
+ var LocaleModule = {
3683
+ command: "locale <command>",
3684
+ describe: "Commands for locale definitions",
3685
+ builder: (yargs28) => yargs28.command(LocalePullModule).command(LocalePushModule),
3686
+ handler: () => {
3687
+ yargs8.help();
3688
+ }
3689
+ };
3690
+
3691
+ // src/commands/canvas/commands/pattern.ts
3692
+ import yargs9 from "yargs";
3693
+
3494
3694
  // src/commands/canvas/commands/pattern/get.ts
3495
3695
  var PatternGetModule = {
3496
3696
  ...CompositionGetModule,
@@ -3501,12 +3701,12 @@ var PatternGetModule = {
3501
3701
  var PatternListModule = {
3502
3702
  ...CompositionListModule,
3503
3703
  describe: "List patterns",
3504
- builder: (yargs27) => withFormatOptions(
3704
+ builder: (yargs28) => withFormatOptions(
3505
3705
  withConfiguration(
3506
3706
  withApiOptions(
3507
3707
  withProjectOptions(
3508
3708
  withStateOptions(
3509
- yargs27.options({
3709
+ yargs28.options({
3510
3710
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
3511
3711
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
3512
3712
  resolvePatterns: {
@@ -3544,11 +3744,11 @@ var PatternListModule = {
3544
3744
  var PatternPublishModule = {
3545
3745
  ...CompositionPublishModule,
3546
3746
  describe: "Publishes pattern(s)",
3547
- builder: (yargs27) => withConfiguration(
3747
+ builder: (yargs28) => withConfiguration(
3548
3748
  withApiOptions(
3549
3749
  withProjectOptions(
3550
3750
  withDiffOptions(
3551
- yargs27.positional("ids", {
3751
+ yargs28.positional("ids", {
3552
3752
  describe: "Publishes pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
3553
3753
  type: "string"
3554
3754
  }).option("all", {
@@ -3586,12 +3786,12 @@ var PatternPublishModule = {
3586
3786
  var PatternPullModule = {
3587
3787
  ...CompositionPullModule,
3588
3788
  describe: "Pulls all patterns to local files in a directory",
3589
- builder: (yargs27) => withConfiguration(
3789
+ builder: (yargs28) => withConfiguration(
3590
3790
  withApiOptions(
3591
3791
  withProjectOptions(
3592
3792
  withStateOptions(
3593
3793
  withDiffOptions(
3594
- yargs27.positional("directory", {
3794
+ yargs28.positional("directory", {
3595
3795
  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.",
3596
3796
  type: "string"
3597
3797
  }).option("format", {
@@ -3629,12 +3829,12 @@ var PatternPullModule = {
3629
3829
  var PatternPushModule = {
3630
3830
  ...CompositionPushModule,
3631
3831
  describe: "Pushes all patterns from files in a directory to Uniform Canvas",
3632
- builder: (yargs27) => withConfiguration(
3832
+ builder: (yargs28) => withConfiguration(
3633
3833
  withApiOptions(
3634
3834
  withProjectOptions(
3635
3835
  withStateOptions(
3636
3836
  withDiffOptions(
3637
- yargs27.positional("directory", {
3837
+ yargs28.positional("directory", {
3638
3838
  describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
3639
3839
  type: "string"
3640
3840
  }).option("what-if", {
@@ -3672,10 +3872,10 @@ var PatternRemoveModule = {
3672
3872
  var PatternUnpublishModule = {
3673
3873
  command: "unpublish [ids]",
3674
3874
  describe: "Unpublish a pattern(s)",
3675
- builder: (yargs27) => withConfiguration(
3875
+ builder: (yargs28) => withConfiguration(
3676
3876
  withApiOptions(
3677
3877
  withProjectOptions(
3678
- yargs27.positional("ids", {
3878
+ yargs28.positional("ids", {
3679
3879
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
3680
3880
  type: "string"
3681
3881
  }).option("all", {
@@ -3714,26 +3914,26 @@ var PatternUpdateModule = {
3714
3914
  var PatternModule = {
3715
3915
  command: "pattern <command>",
3716
3916
  describe: "Commands for Canvas patterns",
3717
- builder: (yargs27) => yargs27.command(PatternPullModule).command(PatternPushModule).command(PatternGetModule).command(PatternRemoveModule).command(PatternListModule).command(PatternUpdateModule).command(PatternPublishModule).command(PatternUnpublishModule).demandCommand(),
3917
+ builder: (yargs28) => yargs28.command(PatternPullModule).command(PatternPushModule).command(PatternGetModule).command(PatternRemoveModule).command(PatternListModule).command(PatternUpdateModule).command(PatternPublishModule).command(PatternUnpublishModule).demandCommand(),
3718
3918
  handler: () => {
3719
- yargs8.help();
3919
+ yargs9.help();
3720
3920
  }
3721
3921
  };
3722
3922
 
3723
3923
  // src/commands/canvas/commands/prompts.ts
3724
- import yargs9 from "yargs";
3924
+ import yargs10 from "yargs";
3725
3925
 
3726
3926
  // src/commands/canvas/commands/prompts/get.ts
3727
3927
  import { PromptClient } from "@uniformdev/canvas";
3728
3928
  var PromptGetModule = {
3729
3929
  command: "get <id>",
3730
3930
  describe: "Get a prompt",
3731
- builder: (yargs27) => withConfiguration(
3931
+ builder: (yargs28) => withConfiguration(
3732
3932
  withFormatOptions(
3733
3933
  withApiOptions(
3734
3934
  withProjectOptions(
3735
3935
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3736
- yargs27.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
3936
+ yargs28.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
3737
3937
  )
3738
3938
  )
3739
3939
  )
@@ -3754,7 +3954,7 @@ import { PromptClient as PromptClient2 } from "@uniformdev/canvas";
3754
3954
  var PromptListModule = {
3755
3955
  command: "list",
3756
3956
  describe: "List prompts",
3757
- builder: (yargs27) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs27)))),
3957
+ builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
3758
3958
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3759
3959
  const fetch3 = nodeFetchProxy(proxy);
3760
3960
  const client = new PromptClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -3801,12 +4001,12 @@ function createPromptEngineDataSource({
3801
4001
  var PromptPullModule = {
3802
4002
  command: "pull <directory>",
3803
4003
  describe: "Pulls all entries to local files in a directory",
3804
- builder: (yargs27) => withConfiguration(
4004
+ builder: (yargs28) => withConfiguration(
3805
4005
  withApiOptions(
3806
4006
  withProjectOptions(
3807
4007
  withStateOptions(
3808
4008
  withDiffOptions(
3809
- yargs27.positional("directory", {
4009
+ yargs28.positional("directory", {
3810
4010
  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.",
3811
4011
  type: "string"
3812
4012
  }).option("format", {
@@ -3889,12 +4089,12 @@ import { PromptClient as PromptClient4 } from "@uniformdev/canvas";
3889
4089
  var PromptPushModule = {
3890
4090
  command: "push <directory>",
3891
4091
  describe: "Pushes all prompts from files in a directory to Uniform",
3892
- builder: (yargs27) => withConfiguration(
4092
+ builder: (yargs28) => withConfiguration(
3893
4093
  withApiOptions(
3894
4094
  withProjectOptions(
3895
4095
  withStateOptions(
3896
4096
  withDiffOptions(
3897
- yargs27.positional("directory", {
4097
+ yargs28.positional("directory", {
3898
4098
  describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
3899
4099
  type: "string"
3900
4100
  }).option("what-if", {
@@ -3965,9 +4165,9 @@ var PromptRemoveModule = {
3965
4165
  command: "remove <id>",
3966
4166
  aliases: ["delete", "rm"],
3967
4167
  describe: "Delete a prompt",
3968
- builder: (yargs27) => withConfiguration(
4168
+ builder: (yargs28) => withConfiguration(
3969
4169
  withApiOptions(
3970
- withProjectOptions(yargs27.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
4170
+ withProjectOptions(yargs28.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
3971
4171
  )
3972
4172
  ),
3973
4173
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -3983,10 +4183,10 @@ var PromptUpdateModule = {
3983
4183
  command: "update <filename>",
3984
4184
  aliases: ["put"],
3985
4185
  describe: "Insert or update a prompt",
3986
- builder: (yargs27) => withConfiguration(
4186
+ builder: (yargs28) => withConfiguration(
3987
4187
  withApiOptions(
3988
4188
  withProjectOptions(
3989
- yargs27.positional("filename", { demandOption: true, describe: "Prompt file to put" })
4189
+ yargs28.positional("filename", { demandOption: true, describe: "Prompt file to put" })
3990
4190
  )
3991
4191
  )
3992
4192
  ),
@@ -4003,9 +4203,9 @@ var PromptModule = {
4003
4203
  command: "prompt <command>",
4004
4204
  aliases: ["dt"],
4005
4205
  describe: "Commands for AI Prompt definitions",
4006
- builder: (yargs27) => yargs27.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
4206
+ builder: (yargs28) => yargs28.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
4007
4207
  handler: () => {
4008
- yargs9.help();
4208
+ yargs10.help();
4009
4209
  }
4010
4210
  };
4011
4211
 
@@ -4014,28 +4214,28 @@ var CanvasCommand = {
4014
4214
  command: "canvas <command>",
4015
4215
  aliases: ["cv", "pm", "presentation"],
4016
4216
  describe: "Uniform Canvas commands",
4017
- builder: (yargs27) => yargs27.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(CategoryModule).command(PatternModule).command(ContentTypeModule).command(EntryModule).command(PromptModule).command(AssetModule).demandCommand(),
4217
+ builder: (yargs28) => yargs28.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(CategoryModule).command(PatternModule).command(ContentTypeModule).command(EntryModule).command(PromptModule).command(AssetModule).command(LocaleModule).demandCommand(),
4018
4218
  handler: () => {
4019
- yargs10.showHelp();
4219
+ yargs11.showHelp();
4020
4220
  }
4021
4221
  };
4022
4222
 
4023
4223
  // src/commands/context/index.ts
4024
- import yargs17 from "yargs";
4224
+ import yargs18 from "yargs";
4025
4225
 
4026
4226
  // src/commands/context/commands/aggregate.ts
4027
- import yargs11 from "yargs";
4227
+ import yargs12 from "yargs";
4028
4228
 
4029
4229
  // src/commands/context/commands/aggregate/get.ts
4030
4230
  import { UncachedAggregateClient } from "@uniformdev/context/api";
4031
4231
  var AggregateGetModule = {
4032
4232
  command: "get <id>",
4033
4233
  describe: "Fetch an aggregate",
4034
- builder: (yargs27) => withConfiguration(
4234
+ builder: (yargs28) => withConfiguration(
4035
4235
  withFormatOptions(
4036
4236
  withApiOptions(
4037
4237
  withProjectOptions(
4038
- yargs27.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
4238
+ yargs28.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
4039
4239
  )
4040
4240
  )
4041
4241
  )
@@ -4059,7 +4259,7 @@ var AggregateListModule = {
4059
4259
  command: "list",
4060
4260
  describe: "List aggregates",
4061
4261
  aliases: ["ls"],
4062
- builder: (yargs27) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs27)))),
4262
+ builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
4063
4263
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4064
4264
  const fetch3 = nodeFetchProxy(proxy);
4065
4265
  const client = new UncachedAggregateClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -4125,11 +4325,11 @@ function writeContextPackage(filename, packageContents) {
4125
4325
  var AggregatePullModule = {
4126
4326
  command: "pull <directory>",
4127
4327
  describe: "Pulls all aggregates to local files in a directory",
4128
- builder: (yargs27) => withConfiguration(
4328
+ builder: (yargs28) => withConfiguration(
4129
4329
  withApiOptions(
4130
4330
  withProjectOptions(
4131
4331
  withDiffOptions(
4132
- yargs27.positional("directory", {
4332
+ yargs28.positional("directory", {
4133
4333
  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.",
4134
4334
  type: "string"
4135
4335
  }).option("format", {
@@ -4204,11 +4404,11 @@ import { UncachedAggregateClient as UncachedAggregateClient4 } from "@uniformdev
4204
4404
  var AggregatePushModule = {
4205
4405
  command: "push <directory>",
4206
4406
  describe: "Pushes all aggregates from files in a directory or package to Uniform",
4207
- builder: (yargs27) => withConfiguration(
4407
+ builder: (yargs28) => withConfiguration(
4208
4408
  withApiOptions(
4209
4409
  withProjectOptions(
4210
4410
  withDiffOptions(
4211
- yargs27.positional("directory", {
4411
+ yargs28.positional("directory", {
4212
4412
  describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
4213
4413
  type: "string"
4214
4414
  }).option("what-if", {
@@ -4273,10 +4473,10 @@ var AggregateRemoveModule = {
4273
4473
  command: "remove <id>",
4274
4474
  aliases: ["delete", "rm"],
4275
4475
  describe: "Delete an aggregate",
4276
- builder: (yargs27) => withConfiguration(
4476
+ builder: (yargs28) => withConfiguration(
4277
4477
  withApiOptions(
4278
4478
  withProjectOptions(
4279
- yargs27.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
4479
+ yargs28.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
4280
4480
  )
4281
4481
  )
4282
4482
  ),
@@ -4293,10 +4493,10 @@ var AggregateUpdateModule = {
4293
4493
  command: "update <filename>",
4294
4494
  aliases: ["put"],
4295
4495
  describe: "Insert or update an aggregate",
4296
- builder: (yargs27) => withConfiguration(
4496
+ builder: (yargs28) => withConfiguration(
4297
4497
  withApiOptions(
4298
4498
  withProjectOptions(
4299
- yargs27.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
4499
+ yargs28.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
4300
4500
  )
4301
4501
  )
4302
4502
  ),
@@ -4313,25 +4513,25 @@ var AggregateModule = {
4313
4513
  command: "aggregate <command>",
4314
4514
  aliases: ["agg", "intent", "audience"],
4315
4515
  describe: "Commands for Context aggregates (intents, audiences)",
4316
- builder: (yargs27) => yargs27.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
4516
+ builder: (yargs28) => yargs28.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
4317
4517
  handler: () => {
4318
- yargs11.help();
4518
+ yargs12.help();
4319
4519
  }
4320
4520
  };
4321
4521
 
4322
4522
  // src/commands/context/commands/enrichment.ts
4323
- import yargs12 from "yargs";
4523
+ import yargs13 from "yargs";
4324
4524
 
4325
4525
  // src/commands/context/commands/enrichment/get.ts
4326
4526
  import { UncachedEnrichmentClient } from "@uniformdev/context/api";
4327
4527
  var EnrichmentGetModule = {
4328
4528
  command: "get <id>",
4329
4529
  describe: "Fetch an enrichment category and its values",
4330
- builder: (yargs27) => withFormatOptions(
4530
+ builder: (yargs28) => withFormatOptions(
4331
4531
  withConfiguration(
4332
4532
  withApiOptions(
4333
4533
  withProjectOptions(
4334
- yargs27.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
4534
+ yargs28.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
4335
4535
  )
4336
4536
  )
4337
4537
  )
@@ -4356,7 +4556,7 @@ var EnrichmentListModule = {
4356
4556
  command: "list",
4357
4557
  describe: "List enrichments",
4358
4558
  aliases: ["ls"],
4359
- builder: (yargs27) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs27)))),
4559
+ builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
4360
4560
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4361
4561
  const fetch3 = nodeFetchProxy(proxy);
4362
4562
  const client = new UncachedEnrichmentClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -4457,11 +4657,11 @@ var createEnrichmentValueEngineDataSource = ({
4457
4657
  var EnrichmentPullModule = {
4458
4658
  command: "pull <directory>",
4459
4659
  describe: "Pulls all enrichments to local files in a directory",
4460
- builder: (yargs27) => withConfiguration(
4660
+ builder: (yargs28) => withConfiguration(
4461
4661
  withApiOptions(
4462
4662
  withProjectOptions(
4463
4663
  withDiffOptions(
4464
- yargs27.positional("directory", {
4664
+ yargs28.positional("directory", {
4465
4665
  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.",
4466
4666
  type: "string"
4467
4667
  }).option("format", {
@@ -4536,11 +4736,11 @@ import { UncachedEnrichmentClient as UncachedEnrichmentClient4 } from "@uniformd
4536
4736
  var EnrichmentPushModule = {
4537
4737
  command: "push <directory>",
4538
4738
  describe: "Pushes all enrichments from files in a directory or package to Uniform",
4539
- builder: (yargs27) => withConfiguration(
4739
+ builder: (yargs28) => withConfiguration(
4540
4740
  withApiOptions(
4541
4741
  withProjectOptions(
4542
4742
  withDiffOptions(
4543
- yargs27.positional("directory", {
4743
+ yargs28.positional("directory", {
4544
4744
  describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
4545
4745
  type: "string"
4546
4746
  }).option("what-if", {
@@ -4604,10 +4804,10 @@ var EnrichmentRemoveModule = {
4604
4804
  command: "remove <id>",
4605
4805
  aliases: ["delete", "rm"],
4606
4806
  describe: "Delete an enrichment category and its values",
4607
- builder: (yargs27) => withConfiguration(
4807
+ builder: (yargs28) => withConfiguration(
4608
4808
  withApiOptions(
4609
4809
  withProjectOptions(
4610
- yargs27.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
4810
+ yargs28.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
4611
4811
  )
4612
4812
  )
4613
4813
  ),
@@ -4623,14 +4823,14 @@ var EnrichmentModule = {
4623
4823
  command: "enrichment <command>",
4624
4824
  aliases: ["enr"],
4625
4825
  describe: "Commands for Context enrichments",
4626
- builder: (yargs27) => yargs27.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
4826
+ builder: (yargs28) => yargs28.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
4627
4827
  handler: () => {
4628
- yargs12.help();
4828
+ yargs13.help();
4629
4829
  }
4630
4830
  };
4631
4831
 
4632
4832
  // src/commands/context/commands/manifest.ts
4633
- import yargs13 from "yargs";
4833
+ import yargs14 from "yargs";
4634
4834
 
4635
4835
  // src/commands/context/commands/manifest/get.ts
4636
4836
  import { ApiClientError, UncachedManifestClient } from "@uniformdev/context/api";
@@ -4641,10 +4841,10 @@ var ManifestGetModule = {
4641
4841
  command: "get [output]",
4642
4842
  aliases: ["dl", "download"],
4643
4843
  describe: "Download the Uniform Context manifest for a project",
4644
- builder: (yargs27) => withConfiguration(
4844
+ builder: (yargs28) => withConfiguration(
4645
4845
  withApiOptions(
4646
4846
  withProjectOptions(
4647
- yargs27.option("preview", {
4847
+ yargs28.option("preview", {
4648
4848
  describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
4649
4849
  default: false,
4650
4850
  type: "boolean",
@@ -4706,7 +4906,7 @@ import { exit as exit2 } from "process";
4706
4906
  var ManifestPublishModule = {
4707
4907
  command: "publish",
4708
4908
  describe: "Publish the Uniform Context manifest for a project",
4709
- builder: (yargs27) => withConfiguration(withApiOptions(withProjectOptions(yargs27))),
4909
+ builder: (yargs28) => withConfiguration(withApiOptions(withProjectOptions(yargs28))),
4710
4910
  handler: async ({ apiKey, apiHost, proxy, project }) => {
4711
4911
  const fetch3 = nodeFetchProxy(proxy);
4712
4912
  try {
@@ -4739,25 +4939,25 @@ var ManifestModule = {
4739
4939
  command: "manifest <command>",
4740
4940
  describe: "Commands for context manifests",
4741
4941
  aliases: ["man"],
4742
- builder: (yargs27) => yargs27.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
4942
+ builder: (yargs28) => yargs28.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
4743
4943
  handler: () => {
4744
- yargs13.help();
4944
+ yargs14.help();
4745
4945
  }
4746
4946
  };
4747
4947
 
4748
4948
  // src/commands/context/commands/quirk.ts
4749
- import yargs14 from "yargs";
4949
+ import yargs15 from "yargs";
4750
4950
 
4751
4951
  // src/commands/context/commands/quirk/get.ts
4752
4952
  import { UncachedQuirkClient } from "@uniformdev/context/api";
4753
4953
  var QuirkGetModule = {
4754
4954
  command: "get <id>",
4755
4955
  describe: "Fetch a quirk",
4756
- builder: (yargs27) => withConfiguration(
4956
+ builder: (yargs28) => withConfiguration(
4757
4957
  withFormatOptions(
4758
4958
  withApiOptions(
4759
4959
  withProjectOptions(
4760
- yargs27.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
4960
+ yargs28.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
4761
4961
  )
4762
4962
  )
4763
4963
  )
@@ -4781,11 +4981,11 @@ var QuirkListModule = {
4781
4981
  command: "list",
4782
4982
  describe: "List quirks",
4783
4983
  aliases: ["ls"],
4784
- builder: (yargs27) => withConfiguration(
4984
+ builder: (yargs28) => withConfiguration(
4785
4985
  withFormatOptions(
4786
4986
  withApiOptions(
4787
4987
  withProjectOptions(
4788
- yargs27.option("withIntegrations", {
4988
+ yargs28.option("withIntegrations", {
4789
4989
  alias: ["i"],
4790
4990
  describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
4791
4991
  type: "boolean"
@@ -4842,11 +5042,11 @@ function createQuirkEngineDataSource({
4842
5042
  var QuirkPullModule = {
4843
5043
  command: "pull <directory>",
4844
5044
  describe: "Pulls all quirks to local files in a directory",
4845
- builder: (yargs27) => withConfiguration(
5045
+ builder: (yargs28) => withConfiguration(
4846
5046
  withApiOptions(
4847
5047
  withProjectOptions(
4848
5048
  withDiffOptions(
4849
- yargs27.positional("directory", {
5049
+ yargs28.positional("directory", {
4850
5050
  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.",
4851
5051
  type: "string"
4852
5052
  }).option("format", {
@@ -4921,11 +5121,11 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
4921
5121
  var QuirkPushModule = {
4922
5122
  command: "push <directory>",
4923
5123
  describe: "Pushes all quirks from files in a directory or package to Uniform",
4924
- builder: (yargs27) => withConfiguration(
5124
+ builder: (yargs28) => withConfiguration(
4925
5125
  withApiOptions(
4926
5126
  withProjectOptions(
4927
5127
  withDiffOptions(
4928
- yargs27.positional("directory", {
5128
+ yargs28.positional("directory", {
4929
5129
  describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
4930
5130
  type: "string"
4931
5131
  }).option("what-if", {
@@ -4989,10 +5189,10 @@ var QuirkRemoveModule = {
4989
5189
  command: "remove <id>",
4990
5190
  aliases: ["delete", "rm"],
4991
5191
  describe: "Delete a quirk",
4992
- builder: (yargs27) => withConfiguration(
5192
+ builder: (yargs28) => withConfiguration(
4993
5193
  withApiOptions(
4994
5194
  withProjectOptions(
4995
- yargs27.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
5195
+ yargs28.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
4996
5196
  )
4997
5197
  )
4998
5198
  ),
@@ -5009,10 +5209,10 @@ var QuirkUpdateModule = {
5009
5209
  command: "update <filename>",
5010
5210
  aliases: ["put"],
5011
5211
  describe: "Insert or update a quirk",
5012
- builder: (yargs27) => withConfiguration(
5212
+ builder: (yargs28) => withConfiguration(
5013
5213
  withApiOptions(
5014
5214
  withProjectOptions(
5015
- yargs27.positional("filename", { demandOption: true, describe: "Quirk file to put" })
5215
+ yargs28.positional("filename", { demandOption: true, describe: "Quirk file to put" })
5016
5216
  )
5017
5217
  )
5018
5218
  ),
@@ -5029,25 +5229,25 @@ var QuirkModule = {
5029
5229
  command: "quirk <command>",
5030
5230
  aliases: ["qk"],
5031
5231
  describe: "Commands for Context quirks",
5032
- builder: (yargs27) => yargs27.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
5232
+ builder: (yargs28) => yargs28.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
5033
5233
  handler: () => {
5034
- yargs14.help();
5234
+ yargs15.help();
5035
5235
  }
5036
5236
  };
5037
5237
 
5038
5238
  // src/commands/context/commands/signal.ts
5039
- import yargs15 from "yargs";
5239
+ import yargs16 from "yargs";
5040
5240
 
5041
5241
  // src/commands/context/commands/signal/get.ts
5042
5242
  import { UncachedSignalClient } from "@uniformdev/context/api";
5043
5243
  var SignalGetModule = {
5044
5244
  command: "get <id>",
5045
5245
  describe: "Fetch a signal",
5046
- builder: (yargs27) => withConfiguration(
5246
+ builder: (yargs28) => withConfiguration(
5047
5247
  withFormatOptions(
5048
5248
  withApiOptions(
5049
5249
  withProjectOptions(
5050
- yargs27.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
5250
+ yargs28.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
5051
5251
  )
5052
5252
  )
5053
5253
  )
@@ -5071,7 +5271,7 @@ var SignalListModule = {
5071
5271
  command: "list",
5072
5272
  describe: "List signals",
5073
5273
  aliases: ["ls"],
5074
- builder: (yargs27) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs27)))),
5274
+ builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
5075
5275
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5076
5276
  const fetch3 = nodeFetchProxy(proxy);
5077
5277
  const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5120,11 +5320,11 @@ function createSignalEngineDataSource({
5120
5320
  var SignalPullModule = {
5121
5321
  command: "pull <directory>",
5122
5322
  describe: "Pulls all signals to local files in a directory",
5123
- builder: (yargs27) => withConfiguration(
5323
+ builder: (yargs28) => withConfiguration(
5124
5324
  withApiOptions(
5125
5325
  withProjectOptions(
5126
5326
  withDiffOptions(
5127
- yargs27.positional("directory", {
5327
+ yargs28.positional("directory", {
5128
5328
  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.",
5129
5329
  type: "string"
5130
5330
  }).option("format", {
@@ -5199,11 +5399,11 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
5199
5399
  var SignalPushModule = {
5200
5400
  command: "push <directory>",
5201
5401
  describe: "Pushes all signals from files in a directory or package to Uniform",
5202
- builder: (yargs27) => withConfiguration(
5402
+ builder: (yargs28) => withConfiguration(
5203
5403
  withApiOptions(
5204
5404
  withProjectOptions(
5205
5405
  withDiffOptions(
5206
- yargs27.positional("directory", {
5406
+ yargs28.positional("directory", {
5207
5407
  describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
5208
5408
  type: "string"
5209
5409
  }).option("what-if", {
@@ -5267,10 +5467,10 @@ var SignalRemoveModule = {
5267
5467
  command: "remove <id>",
5268
5468
  aliases: ["delete", "rm"],
5269
5469
  describe: "Delete a signal",
5270
- builder: (yargs27) => withConfiguration(
5470
+ builder: (yargs28) => withConfiguration(
5271
5471
  withApiOptions(
5272
5472
  withProjectOptions(
5273
- yargs27.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
5473
+ yargs28.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
5274
5474
  )
5275
5475
  )
5276
5476
  ),
@@ -5287,10 +5487,10 @@ var SignalUpdateModule = {
5287
5487
  command: "update <filename>",
5288
5488
  aliases: ["put"],
5289
5489
  describe: "Insert or update a signal",
5290
- builder: (yargs27) => withConfiguration(
5490
+ builder: (yargs28) => withConfiguration(
5291
5491
  withApiOptions(
5292
5492
  withProjectOptions(
5293
- yargs27.positional("filename", { demandOption: true, describe: "Signal file to put" })
5493
+ yargs28.positional("filename", { demandOption: true, describe: "Signal file to put" })
5294
5494
  )
5295
5495
  )
5296
5496
  ),
@@ -5307,25 +5507,25 @@ var SignalModule = {
5307
5507
  command: "signal <command>",
5308
5508
  aliases: ["sig"],
5309
5509
  describe: "Commands for Context signals",
5310
- builder: (yargs27) => yargs27.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
5510
+ builder: (yargs28) => yargs28.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
5311
5511
  handler: () => {
5312
- yargs15.help();
5512
+ yargs16.help();
5313
5513
  }
5314
5514
  };
5315
5515
 
5316
5516
  // src/commands/context/commands/test.ts
5317
- import yargs16 from "yargs";
5517
+ import yargs17 from "yargs";
5318
5518
 
5319
5519
  // src/commands/context/commands/test/get.ts
5320
5520
  import { UncachedTestClient } from "@uniformdev/context/api";
5321
5521
  var TestGetModule = {
5322
5522
  command: "get <id>",
5323
5523
  describe: "Fetch a test",
5324
- builder: (yargs27) => withConfiguration(
5524
+ builder: (yargs28) => withConfiguration(
5325
5525
  withFormatOptions(
5326
5526
  withApiOptions(
5327
5527
  withProjectOptions(
5328
- yargs27.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
5528
+ yargs28.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
5329
5529
  )
5330
5530
  )
5331
5531
  )
@@ -5349,7 +5549,7 @@ var TestListModule = {
5349
5549
  command: "list",
5350
5550
  describe: "List tests",
5351
5551
  aliases: ["ls"],
5352
- builder: (yargs27) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs27)))),
5552
+ builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
5353
5553
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5354
5554
  const fetch3 = nodeFetchProxy(proxy);
5355
5555
  const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5398,11 +5598,11 @@ function createTestEngineDataSource({
5398
5598
  var TestPullModule = {
5399
5599
  command: "pull <directory>",
5400
5600
  describe: "Pulls all tests to local files in a directory",
5401
- builder: (yargs27) => withConfiguration(
5601
+ builder: (yargs28) => withConfiguration(
5402
5602
  withApiOptions(
5403
5603
  withProjectOptions(
5404
5604
  withDiffOptions(
5405
- yargs27.positional("directory", {
5605
+ yargs28.positional("directory", {
5406
5606
  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.",
5407
5607
  type: "string"
5408
5608
  }).option("format", {
@@ -5477,11 +5677,11 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
5477
5677
  var TestPushModule = {
5478
5678
  command: "push <directory>",
5479
5679
  describe: "Pushes all tests from files in a directory or package to Uniform",
5480
- builder: (yargs27) => withConfiguration(
5680
+ builder: (yargs28) => withConfiguration(
5481
5681
  withApiOptions(
5482
5682
  withProjectOptions(
5483
5683
  withDiffOptions(
5484
- yargs27.positional("directory", {
5684
+ yargs28.positional("directory", {
5485
5685
  describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
5486
5686
  type: "string"
5487
5687
  }).option("what-if", {
@@ -5545,10 +5745,10 @@ var TestRemoveModule = {
5545
5745
  command: "remove <id>",
5546
5746
  aliases: ["delete", "rm"],
5547
5747
  describe: "Delete a test",
5548
- builder: (yargs27) => withConfiguration(
5748
+ builder: (yargs28) => withConfiguration(
5549
5749
  withApiOptions(
5550
5750
  withProjectOptions(
5551
- yargs27.positional("id", { demandOption: true, describe: "Test public ID to delete" })
5751
+ yargs28.positional("id", { demandOption: true, describe: "Test public ID to delete" })
5552
5752
  )
5553
5753
  )
5554
5754
  ),
@@ -5565,9 +5765,9 @@ var TestUpdateModule = {
5565
5765
  command: "update <filename>",
5566
5766
  aliases: ["put"],
5567
5767
  describe: "Insert or update a test",
5568
- builder: (yargs27) => withConfiguration(
5768
+ builder: (yargs28) => withConfiguration(
5569
5769
  withApiOptions(
5570
- withProjectOptions(yargs27.positional("filename", { demandOption: true, describe: "Test file to put" }))
5770
+ withProjectOptions(yargs28.positional("filename", { demandOption: true, describe: "Test file to put" }))
5571
5771
  )
5572
5772
  ),
5573
5773
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -5582,9 +5782,9 @@ var TestUpdateModule = {
5582
5782
  var TestModule = {
5583
5783
  command: "test <command>",
5584
5784
  describe: "Commands for Context A/B tests",
5585
- builder: (yargs27) => yargs27.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
5785
+ builder: (yargs28) => yargs28.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
5586
5786
  handler: () => {
5587
- yargs16.help();
5787
+ yargs17.help();
5588
5788
  }
5589
5789
  };
5590
5790
 
@@ -5593,9 +5793,9 @@ var ContextCommand = {
5593
5793
  command: "context <command>",
5594
5794
  aliases: ["ctx"],
5595
5795
  describe: "Uniform Context commands",
5596
- builder: (yargs27) => yargs27.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
5796
+ builder: (yargs28) => yargs28.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
5597
5797
  handler: () => {
5598
- yargs17.showHelp();
5798
+ yargs18.showHelp();
5599
5799
  }
5600
5800
  };
5601
5801
 
@@ -5680,7 +5880,7 @@ var package_default = {
5680
5880
  "@types/js-yaml": "4.0.9",
5681
5881
  "@types/jsonwebtoken": "9.0.5",
5682
5882
  "@types/lodash.isequalwith": "4.4.9",
5683
- "@types/node": "18.19.1",
5883
+ "@types/node": "18.19.3",
5684
5884
  "@types/yargs": "17.0.32"
5685
5885
  },
5686
5886
  bin: {
@@ -6633,10 +6833,10 @@ var NewMeshCmd = {
6633
6833
  };
6634
6834
 
6635
6835
  // src/commands/optimize/index.ts
6636
- import yargs19 from "yargs";
6836
+ import yargs20 from "yargs";
6637
6837
 
6638
6838
  // src/commands/optimize/manifest.ts
6639
- import yargs18 from "yargs";
6839
+ import yargs19 from "yargs";
6640
6840
 
6641
6841
  // src/commands/optimize/manifest/download.ts
6642
6842
  import { gray as gray4, green as green3, red as red5, yellow as yellow2 } from "colorette";
@@ -6651,7 +6851,7 @@ var UniformBaseUrl = "https://uniform.app";
6651
6851
  var module = {
6652
6852
  command: "download [output]",
6653
6853
  describe: "Download intent manifest",
6654
- builder: (yargs27) => yargs27.option("apiKey", {
6854
+ builder: (yargs28) => yargs28.option("apiKey", {
6655
6855
  alias: "k",
6656
6856
  demandOption: true,
6657
6857
  string: true,
@@ -6752,10 +6952,10 @@ var module2 = {
6752
6952
  command: "manifest <command>",
6753
6953
  describe: "Intent manifest commands",
6754
6954
  builder: () => {
6755
- return yargs18.command(download_default);
6955
+ return yargs19.command(download_default);
6756
6956
  },
6757
6957
  handler: () => {
6758
- yargs18.showHelp();
6958
+ yargs19.showHelp();
6759
6959
  }
6760
6960
  };
6761
6961
  var manifest_default = module2;
@@ -6766,29 +6966,29 @@ var OptimizeCommand = {
6766
6966
  aliases: ["opt"],
6767
6967
  describe: "Uniform Optimize commands",
6768
6968
  builder: () => {
6769
- return yargs19.command(manifest_default);
6969
+ return yargs20.command(manifest_default);
6770
6970
  },
6771
6971
  handler: () => {
6772
- yargs19.showHelp();
6972
+ yargs20.showHelp();
6773
6973
  }
6774
6974
  };
6775
6975
 
6776
6976
  // src/commands/project-map/index.ts
6777
- import yargs22 from "yargs";
6977
+ import yargs23 from "yargs";
6778
6978
 
6779
6979
  // src/commands/project-map/commands/projectMapDefinition.ts
6780
- import yargs20 from "yargs";
6980
+ import yargs21 from "yargs";
6781
6981
 
6782
6982
  // src/commands/project-map/commands/ProjectMapDefinition/get.ts
6783
6983
  import { UncachedProjectMapClient } from "@uniformdev/project-map";
6784
6984
  var ProjectMapDefinitionGetModule = {
6785
6985
  command: "get <id>",
6786
6986
  describe: "Fetch a project map",
6787
- builder: (yargs27) => withFormatOptions(
6987
+ builder: (yargs28) => withFormatOptions(
6788
6988
  withConfiguration(
6789
6989
  withApiOptions(
6790
6990
  withProjectOptions(
6791
- yargs27.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
6991
+ yargs28.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
6792
6992
  )
6793
6993
  )
6794
6994
  )
@@ -6812,7 +7012,7 @@ var ProjectMapDefinitionListModule = {
6812
7012
  command: "list",
6813
7013
  describe: "List of project maps",
6814
7014
  aliases: ["ls"],
6815
- builder: (yargs27) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs27)))),
7015
+ builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
6816
7016
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
6817
7017
  const fetch3 = nodeFetchProxy(proxy);
6818
7018
  const client = new UncachedProjectMapClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -6869,11 +7069,11 @@ function createProjectMapDefinitionEngineDataSource({
6869
7069
  var ProjectMapDefinitionPullModule = {
6870
7070
  command: "pull <directory>",
6871
7071
  describe: "Pulls all project maps to local files in a directory",
6872
- builder: (yargs27) => withConfiguration(
7072
+ builder: (yargs28) => withConfiguration(
6873
7073
  withApiOptions(
6874
7074
  withProjectOptions(
6875
7075
  withDiffOptions(
6876
- yargs27.positional("directory", {
7076
+ yargs28.positional("directory", {
6877
7077
  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.",
6878
7078
  type: "string"
6879
7079
  }).option("format", {
@@ -6949,11 +7149,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient4 } from "@uniformd
6949
7149
  var ProjectMapDefinitionPushModule = {
6950
7150
  command: "push <directory>",
6951
7151
  describe: "Pushes all project maps from files in a directory or package to Uniform",
6952
- builder: (yargs27) => withConfiguration(
7152
+ builder: (yargs28) => withConfiguration(
6953
7153
  withApiOptions(
6954
7154
  withProjectOptions(
6955
7155
  withDiffOptions(
6956
- yargs27.positional("directory", {
7156
+ yargs28.positional("directory", {
6957
7157
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
6958
7158
  type: "string"
6959
7159
  }).option("what-if", {
@@ -7017,9 +7217,9 @@ var ProjectMapDefinitionRemoveModule = {
7017
7217
  command: "remove <id>",
7018
7218
  aliases: ["delete", "rm"],
7019
7219
  describe: "Delete a project map",
7020
- builder: (yargs27) => withConfiguration(
7220
+ builder: (yargs28) => withConfiguration(
7021
7221
  withApiOptions(
7022
- withProjectOptions(yargs27.positional("id", { demandOption: true, describe: " UUID to delete" }))
7222
+ withProjectOptions(yargs28.positional("id", { demandOption: true, describe: " UUID to delete" }))
7023
7223
  )
7024
7224
  ),
7025
7225
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -7035,10 +7235,10 @@ var ProjectMapDefinitionUpdateModule = {
7035
7235
  command: "update <filename>",
7036
7236
  aliases: ["put"],
7037
7237
  describe: "Insert or update a project map",
7038
- builder: (yargs27) => withConfiguration(
7238
+ builder: (yargs28) => withConfiguration(
7039
7239
  withApiOptions(
7040
7240
  withProjectOptions(
7041
- yargs27.positional("filename", { demandOption: true, describe: "Project map file to put" })
7241
+ yargs28.positional("filename", { demandOption: true, describe: "Project map file to put" })
7042
7242
  )
7043
7243
  )
7044
7244
  ),
@@ -7054,25 +7254,25 @@ var ProjectMapDefinitionUpdateModule = {
7054
7254
  var ProjectMapDefinitionModule = {
7055
7255
  command: "definition <command>",
7056
7256
  describe: "Commands for ProjectMap Definitions",
7057
- builder: (yargs27) => yargs27.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
7257
+ builder: (yargs28) => yargs28.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
7058
7258
  handler: () => {
7059
- yargs20.help();
7259
+ yargs21.help();
7060
7260
  }
7061
7261
  };
7062
7262
 
7063
7263
  // src/commands/project-map/commands/projectMapNode.ts
7064
- import yargs21 from "yargs";
7264
+ import yargs22 from "yargs";
7065
7265
 
7066
7266
  // src/commands/project-map/commands/ProjectMapNode/get.ts
7067
7267
  import { UncachedProjectMapClient as UncachedProjectMapClient7 } from "@uniformdev/project-map";
7068
7268
  var ProjectMapNodeGetModule = {
7069
7269
  command: "get <id> <projectMapId>",
7070
7270
  describe: "Fetch a project map node",
7071
- builder: (yargs27) => withConfiguration(
7271
+ builder: (yargs28) => withConfiguration(
7072
7272
  withFormatOptions(
7073
7273
  withApiOptions(
7074
7274
  withProjectOptions(
7075
- yargs27.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
7275
+ yargs28.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
7076
7276
  )
7077
7277
  )
7078
7278
  )
@@ -7098,11 +7298,11 @@ var ProjectMapNodeListModule = {
7098
7298
  command: "list <projectMapId>",
7099
7299
  describe: "List project map nodes",
7100
7300
  aliases: ["ls"],
7101
- builder: (yargs27) => withConfiguration(
7301
+ builder: (yargs28) => withConfiguration(
7102
7302
  withFormatOptions(
7103
7303
  withApiOptions(
7104
7304
  withProjectOptions(
7105
- yargs27.positional("projectMapId", {
7305
+ yargs28.positional("projectMapId", {
7106
7306
  demandOption: true,
7107
7307
  describe: "ProjectMap UUID to fetch from"
7108
7308
  })
@@ -7173,11 +7373,11 @@ function createProjectMapNodeEngineDataSource({
7173
7373
  var ProjectMapNodePullModule = {
7174
7374
  command: "pull <directory>",
7175
7375
  describe: "Pulls all project maps nodes to local files in a directory",
7176
- builder: (yargs27) => withConfiguration(
7376
+ builder: (yargs28) => withConfiguration(
7177
7377
  withApiOptions(
7178
7378
  withProjectOptions(
7179
7379
  withDiffOptions(
7180
- yargs27.positional("directory", {
7380
+ yargs28.positional("directory", {
7181
7381
  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.",
7182
7382
  type: "string"
7183
7383
  }).option("format", {
@@ -7257,11 +7457,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient10 } from "@uniform
7257
7457
  var ProjectMapNodePushModule = {
7258
7458
  command: "push <directory>",
7259
7459
  describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
7260
- builder: (yargs27) => withConfiguration(
7460
+ builder: (yargs28) => withConfiguration(
7261
7461
  withApiOptions(
7262
7462
  withProjectOptions(
7263
7463
  withDiffOptions(
7264
- yargs27.positional("directory", {
7464
+ yargs28.positional("directory", {
7265
7465
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
7266
7466
  type: "string"
7267
7467
  }).option("what-if", {
@@ -7334,10 +7534,10 @@ var ProjectMapNodeRemoveModule = {
7334
7534
  command: "remove <id> <projectMapId>",
7335
7535
  aliases: ["delete", "rm"],
7336
7536
  describe: "Delete a project map node",
7337
- builder: (yargs27) => withConfiguration(
7537
+ builder: (yargs28) => withConfiguration(
7338
7538
  withApiOptions(
7339
7539
  withProjectOptions(
7340
- yargs27.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
7540
+ yargs28.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
7341
7541
  )
7342
7542
  )
7343
7543
  ),
@@ -7354,10 +7554,10 @@ var ProjectMapNodeUpdateModule = {
7354
7554
  command: "update <filename> <projectMapId>",
7355
7555
  aliases: ["put"],
7356
7556
  describe: "Insert or update a project map node",
7357
- builder: (yargs27) => withConfiguration(
7557
+ builder: (yargs28) => withConfiguration(
7358
7558
  withApiOptions(
7359
7559
  withProjectOptions(
7360
- yargs27.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
7560
+ yargs28.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
7361
7561
  )
7362
7562
  )
7363
7563
  ),
@@ -7373,9 +7573,9 @@ var ProjectMapNodeUpdateModule = {
7373
7573
  var ProjectMapNodeModule = {
7374
7574
  command: "node <command>",
7375
7575
  describe: "Commands for ProjectMap Nodes",
7376
- builder: (yargs27) => yargs27.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
7576
+ builder: (yargs28) => yargs28.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
7377
7577
  handler: () => {
7378
- yargs21.help();
7578
+ yargs22.help();
7379
7579
  }
7380
7580
  };
7381
7581
 
@@ -7384,28 +7584,28 @@ var ProjectMapCommand = {
7384
7584
  command: "project-map <command>",
7385
7585
  aliases: ["prm"],
7386
7586
  describe: "Uniform ProjectMap commands",
7387
- builder: (yargs27) => yargs27.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
7587
+ builder: (yargs28) => yargs28.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
7388
7588
  handler: () => {
7389
- yargs22.showHelp();
7589
+ yargs23.showHelp();
7390
7590
  }
7391
7591
  };
7392
7592
 
7393
7593
  // src/commands/redirect/index.ts
7394
- import yargs24 from "yargs";
7594
+ import yargs25 from "yargs";
7395
7595
 
7396
7596
  // src/commands/redirect/commands/redirect.ts
7397
- import yargs23 from "yargs";
7597
+ import yargs24 from "yargs";
7398
7598
 
7399
7599
  // src/commands/redirect/commands/RedirectDefinition/get.ts
7400
7600
  import { UncachedRedirectClient } from "@uniformdev/redirect";
7401
7601
  var RedirectDefinitionGetModule = {
7402
7602
  command: "get <id>",
7403
7603
  describe: "Fetch a redirect",
7404
- builder: (yargs27) => withConfiguration(
7604
+ builder: (yargs28) => withConfiguration(
7405
7605
  withFormatOptions(
7406
7606
  withApiOptions(
7407
7607
  withProjectOptions(
7408
- yargs27.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
7608
+ yargs28.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
7409
7609
  )
7410
7610
  )
7411
7611
  )
@@ -7429,7 +7629,7 @@ var RedirectDefinitionListModule = {
7429
7629
  command: "list",
7430
7630
  describe: "List of redirects",
7431
7631
  aliases: ["ls"],
7432
- builder: (yargs27) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs27)))),
7632
+ builder: (yargs28) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs28)))),
7433
7633
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
7434
7634
  const fetch3 = nodeFetchProxy(proxy);
7435
7635
  const client = new UncachedRedirectClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -7495,11 +7695,11 @@ function createRedirectDefinitionEngineDataSource({
7495
7695
  var RedirectDefinitionPullModule = {
7496
7696
  command: "pull <directory>",
7497
7697
  describe: "Pulls all redirects to local files in a directory",
7498
- builder: (yargs27) => withConfiguration(
7698
+ builder: (yargs28) => withConfiguration(
7499
7699
  withApiOptions(
7500
7700
  withProjectOptions(
7501
7701
  withDiffOptions(
7502
- yargs27.positional("directory", {
7702
+ yargs28.positional("directory", {
7503
7703
  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.",
7504
7704
  type: "string"
7505
7705
  }).option("format", {
@@ -7576,11 +7776,11 @@ import { UncachedRedirectClient as UncachedRedirectClient4 } from "@uniformdev/r
7576
7776
  var RedirectDefinitionPushModule = {
7577
7777
  command: "push <directory>",
7578
7778
  describe: "Pushes all redirects from files in a directory or package to Uniform",
7579
- builder: (yargs27) => withConfiguration(
7779
+ builder: (yargs28) => withConfiguration(
7580
7780
  withApiOptions(
7581
7781
  withProjectOptions(
7582
7782
  withDiffOptions(
7583
- yargs27.positional("directory", {
7783
+ yargs28.positional("directory", {
7584
7784
  describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
7585
7785
  type: "string"
7586
7786
  }).option("what-if", {
@@ -7644,9 +7844,9 @@ var RedirectDefinitionRemoveModule = {
7644
7844
  command: "remove <id>",
7645
7845
  aliases: ["delete", "rm"],
7646
7846
  describe: "Delete a redirect",
7647
- builder: (yargs27) => withConfiguration(
7847
+ builder: (yargs28) => withConfiguration(
7648
7848
  withApiOptions(
7649
- withProjectOptions(yargs27.positional("id", { demandOption: true, describe: " UUID to delete" }))
7849
+ withProjectOptions(yargs28.positional("id", { demandOption: true, describe: " UUID to delete" }))
7650
7850
  )
7651
7851
  ),
7652
7852
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -7662,10 +7862,10 @@ var RedirectDefinitionUpdateModule = {
7662
7862
  command: "update <filename>",
7663
7863
  aliases: ["put"],
7664
7864
  describe: "Insert or update a redirect",
7665
- builder: (yargs27) => withConfiguration(
7865
+ builder: (yargs28) => withConfiguration(
7666
7866
  withApiOptions(
7667
7867
  withProjectOptions(
7668
- yargs27.positional("filename", { demandOption: true, describe: "Redirect file to put" })
7868
+ yargs28.positional("filename", { demandOption: true, describe: "Redirect file to put" })
7669
7869
  )
7670
7870
  )
7671
7871
  ),
@@ -7681,9 +7881,9 @@ var RedirectDefinitionUpdateModule = {
7681
7881
  var RedirectDefinitionModule = {
7682
7882
  command: "definition <command>",
7683
7883
  describe: "Commands for Redirect Definitions",
7684
- builder: (yargs27) => yargs27.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
7884
+ builder: (yargs28) => yargs28.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
7685
7885
  handler: () => {
7686
- yargs23.help();
7886
+ yargs24.help();
7687
7887
  }
7688
7888
  };
7689
7889
 
@@ -7692,14 +7892,14 @@ var RedirectCommand = {
7692
7892
  command: "redirect <command>",
7693
7893
  aliases: ["red"],
7694
7894
  describe: "Uniform Redirect commands",
7695
- builder: (yargs27) => yargs27.command(RedirectDefinitionModule).demandCommand(),
7895
+ builder: (yargs28) => yargs28.command(RedirectDefinitionModule).demandCommand(),
7696
7896
  handler: () => {
7697
- yargs24.showHelp();
7897
+ yargs25.showHelp();
7698
7898
  }
7699
7899
  };
7700
7900
 
7701
7901
  // src/commands/sync/index.ts
7702
- import yargs25 from "yargs";
7902
+ import yargs26 from "yargs";
7703
7903
 
7704
7904
  // src/commands/sync/commands/util.ts
7705
7905
  import ora2 from "ora";
@@ -7732,11 +7932,11 @@ function spin(entityType) {
7732
7932
  var SyncPullModule = {
7733
7933
  command: "pull",
7734
7934
  describe: "Pulls whole project to local files in a directory",
7735
- builder: (yargs27) => withConfiguration(
7935
+ builder: (yargs28) => withConfiguration(
7736
7936
  withApiOptions(
7737
7937
  withProjectOptions(
7738
7938
  withDiffOptions(
7739
- yargs27.option("what-if", {
7939
+ yargs28.option("what-if", {
7740
7940
  alias: ["w"],
7741
7941
  describe: "What-if mode reports what would be done but changes no files",
7742
7942
  default: false,
@@ -7750,6 +7950,7 @@ var SyncPullModule = {
7750
7950
  var _a;
7751
7951
  const config2 = serialization;
7752
7952
  const enabledEntities = Object.entries({
7953
+ locale: LocalePullModule,
7753
7954
  asset: AssetPullModule,
7754
7955
  category: CategoryPullModule,
7755
7956
  dataType: DataTypePullModule,
@@ -7828,11 +8029,11 @@ var getFormat = (entityType, config2) => {
7828
8029
  var SyncPushModule = {
7829
8030
  command: "push",
7830
8031
  describe: "Pushes whole project data from files in a directory or package to Uniform",
7831
- builder: (yargs27) => withConfiguration(
8032
+ builder: (yargs28) => withConfiguration(
7832
8033
  withApiOptions(
7833
8034
  withProjectOptions(
7834
8035
  withDiffOptions(
7835
- yargs27.option("what-if", {
8036
+ yargs28.option("what-if", {
7836
8037
  alias: ["w"],
7837
8038
  describe: "What-if mode reports what would be done but changes nothing",
7838
8039
  default: false,
@@ -7846,6 +8047,7 @@ var SyncPushModule = {
7846
8047
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
7847
8048
  const config2 = serialization;
7848
8049
  const enabledEntities = Object.entries({
8050
+ locale: LocalePushModule,
7849
8051
  asset: AssetPushModule,
7850
8052
  category: CategoryPushModule,
7851
8053
  dataType: DataTypePushModule,
@@ -7926,9 +8128,9 @@ var getFormat2 = (entityType, config2) => {
7926
8128
  var SyncCommand = {
7927
8129
  command: "sync <command>",
7928
8130
  describe: "Uniform Sync commands",
7929
- builder: (yargs27) => yargs27.command(SyncPullModule).command(SyncPushModule).demandCommand(),
8131
+ builder: (yargs28) => yargs28.command(SyncPullModule).command(SyncPushModule).demandCommand(),
7930
8132
  handler: () => {
7931
- yargs25.showHelp();
8133
+ yargs26.showHelp();
7932
8134
  }
7933
8135
  };
7934
8136
 
@@ -8194,7 +8396,7 @@ First found was: v${firstVersion}`;
8194
8396
 
8195
8397
  // src/index.ts
8196
8398
  dotenv.config();
8197
- var yarggery = yargs26(hideBin(process.argv));
8399
+ var yarggery = yargs27(hideBin(process.argv));
8198
8400
  var inlineConfigurationFilePath = "config" in yarggery.argv && yarggery.argv.config;
8199
8401
  var configuration = loadConfig(inlineConfigurationFilePath || null);
8200
8402
  yarggery.option("verbose", {