@uniformdev/cli 19.136.0 → 19.137.1-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 yargs31 from "yargs";
19
+ import yargs32 from "yargs";
20
20
  import { hideBin } from "yargs/helpers";
21
21
 
22
22
  // src/commands/canvas/index.ts
23
- import yargs12 from "yargs";
23
+ import yargs13 from "yargs";
24
24
 
25
25
  // src/commands/canvas/commands/asset.ts
26
26
  import yargs from "yargs";
@@ -136,14 +136,14 @@ import { mkdirSync, readFileSync, writeFileSync } from "fs";
136
136
  import { dump, load } from "js-yaml";
137
137
  import { dirname, extname, isAbsolute, resolve, sep } from "path";
138
138
  import { fetch as undiciFetch, ProxyAgent } from "undici";
139
- function withConfiguration(yargs32) {
140
- return yargs32.option("serialization", {
139
+ function withConfiguration(yargs33) {
140
+ return yargs33.option("serialization", {
141
141
  skipValidation: true,
142
142
  hidden: true
143
143
  });
144
144
  }
145
- function withApiOptions(yargs32) {
146
- return yargs32.option("apiKey", {
145
+ function withApiOptions(yargs33) {
146
+ return yargs33.option("apiKey", {
147
147
  describe: "Uniform API key. Defaults to UNIFORM_CLI_API_KEY or UNIFORM_API_KEY env. Supports dotenv.",
148
148
  default: process.env.UNIFORM_CLI_API_KEY ?? // deprecated
149
149
  process.env.CANVAS_CLI_API_KEY ?? // deprecated
@@ -182,8 +182,8 @@ function nodeFetchProxy(proxy) {
182
182
  };
183
183
  return wrappedFetch;
184
184
  }
185
- function withProjectOptions(yargs32) {
186
- return yargs32.option("project", {
185
+ function withProjectOptions(yargs33) {
186
+ return yargs33.option("project", {
187
187
  describe: "Uniform project ID. Defaults to UNIFORM_CLI_PROJECT_ID or UNIFORM_PROJECT_ID env. Supports dotenv.",
188
188
  default: process.env.UNIFORM_CLI_PROJECT_ID ?? // deprecated
189
189
  process.env.CANVAS_CLI_PROJECT_ID ?? // deprecated
@@ -193,8 +193,8 @@ function withProjectOptions(yargs32) {
193
193
  alias: ["p"]
194
194
  });
195
195
  }
196
- function withTeamOptions(yargs32) {
197
- return yargs32.option("team", {
196
+ function withTeamOptions(yargs33) {
197
+ return yargs33.option("team", {
198
198
  describe: "Uniform team ID. Defaults to UNIFORM_CLI_TEAM_ID or UNIFORM_TEAM_ID env. Supports dotenv.",
199
199
  default: process.env.UNIFORM_CLI_TEAM_ID ?? process.env.UNIFORM_TEAM_ID,
200
200
  demandOption: true,
@@ -202,8 +202,8 @@ function withTeamOptions(yargs32) {
202
202
  alias: ["p"]
203
203
  });
204
204
  }
205
- function withFormatOptions(yargs32) {
206
- return yargs32.option("format", {
205
+ function withFormatOptions(yargs33) {
206
+ return yargs33.option("format", {
207
207
  alias: ["f"],
208
208
  describe: "Output format",
209
209
  default: "yaml",
@@ -215,8 +215,8 @@ function withFormatOptions(yargs32) {
215
215
  type: "string"
216
216
  });
217
217
  }
218
- function withDiffOptions(yargs32) {
219
- return yargs32.option("diff", {
218
+ function withDiffOptions(yargs33) {
219
+ return yargs33.option("diff", {
220
220
  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.",
221
221
  default: process.env.UNIFORM_CLI_DIFF_MODE ?? "off",
222
222
  type: "string",
@@ -641,12 +641,12 @@ function createPublishStatusSyncEngineConsoleLogger(options) {
641
641
  var AssetGetModule = {
642
642
  command: "get <id>",
643
643
  describe: "Get an asset",
644
- builder: (yargs32) => withConfiguration(
644
+ builder: (yargs33) => withConfiguration(
645
645
  withFormatOptions(
646
646
  withApiOptions(
647
647
  withProjectOptions(
648
648
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
649
- yargs32.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
649
+ yargs33.positional("id", { demandOption: true, describe: "Asset ID to fetch" })
650
650
  )
651
651
  )
652
652
  )
@@ -667,7 +667,7 @@ import { UncachedAssetClient as UncachedAssetClient2 } from "@uniformdev/assets"
667
667
  var AssetListModule = {
668
668
  command: "list",
669
669
  describe: "List assets",
670
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
670
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
671
671
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
672
672
  const fetch3 = nodeFetchProxy(proxy);
673
673
  const client = new UncachedAssetClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -1023,8 +1023,8 @@ function prepCompositionForDisk(composition) {
1023
1023
  delete prepped.state;
1024
1024
  return prepped;
1025
1025
  }
1026
- function withStateOptions(yargs32) {
1027
- return yargs32.option("state", {
1026
+ function withStateOptions(yargs33) {
1027
+ return yargs33.option("state", {
1028
1028
  type: "string",
1029
1029
  describe: `Composition state to fetch.`,
1030
1030
  choices: ["preview", "published"],
@@ -1090,11 +1090,11 @@ function writeCanvasPackage(filename, packageContents) {
1090
1090
  var AssetPullModule = {
1091
1091
  command: "pull <directory>",
1092
1092
  describe: "Pulls all assets to local files in a directory",
1093
- builder: (yargs32) => withConfiguration(
1093
+ builder: (yargs33) => withConfiguration(
1094
1094
  withApiOptions(
1095
1095
  withProjectOptions(
1096
1096
  withDiffOptions(
1097
- yargs32.positional("directory", {
1097
+ yargs33.positional("directory", {
1098
1098
  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.",
1099
1099
  type: "string"
1100
1100
  }).option("format", {
@@ -1213,11 +1213,11 @@ import { UncachedFileClient as UncachedFileClient2 } from "@uniformdev/files";
1213
1213
  var AssetPushModule = {
1214
1214
  command: "push <directory>",
1215
1215
  describe: "Pushes all assets from files in a directory to Uniform",
1216
- builder: (yargs32) => withConfiguration(
1216
+ builder: (yargs33) => withConfiguration(
1217
1217
  withApiOptions(
1218
1218
  withProjectOptions(
1219
1219
  withDiffOptions(
1220
- yargs32.positional("directory", {
1220
+ yargs33.positional("directory", {
1221
1221
  describe: "Directory to read the assets from. If a filename is used, a package will be read instead.",
1222
1222
  type: "string"
1223
1223
  }).option("what-if", {
@@ -1317,9 +1317,9 @@ var AssetRemoveModule = {
1317
1317
  command: "remove <id>",
1318
1318
  aliases: ["delete", "rm"],
1319
1319
  describe: "Delete an asset",
1320
- builder: (yargs32) => withConfiguration(
1320
+ builder: (yargs33) => withConfiguration(
1321
1321
  withApiOptions(
1322
- withProjectOptions(yargs32.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
1322
+ withProjectOptions(yargs33.positional("id", { demandOption: true, describe: "Asset ID to delete" }))
1323
1323
  )
1324
1324
  ),
1325
1325
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -1335,10 +1335,10 @@ var AssetUpdateModule = {
1335
1335
  command: "update <filename>",
1336
1336
  aliases: ["put"],
1337
1337
  describe: "Insert or update an asset",
1338
- builder: (yargs32) => withConfiguration(
1338
+ builder: (yargs33) => withConfiguration(
1339
1339
  withApiOptions(
1340
1340
  withProjectOptions(
1341
- yargs32.positional("filename", { demandOption: true, describe: "Asset file to put" })
1341
+ yargs33.positional("filename", { demandOption: true, describe: "Asset file to put" })
1342
1342
  )
1343
1343
  )
1344
1344
  ),
@@ -1354,7 +1354,7 @@ var AssetUpdateModule = {
1354
1354
  var AssetModule = {
1355
1355
  command: "asset <command>",
1356
1356
  describe: "Commands for Assets",
1357
- builder: (yargs32) => yargs32.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
1357
+ builder: (yargs33) => yargs33.command(AssetGetModule).command(AssetListModule).command(AssetRemoveModule).command(AssetUpdateModule).command(AssetPullModule).command(AssetPushModule).demandCommand(),
1358
1358
  handler: () => {
1359
1359
  yargs.help();
1360
1360
  }
@@ -1368,11 +1368,11 @@ import { UncachedCategoryClient } from "@uniformdev/canvas";
1368
1368
  var CategoryGetModule = {
1369
1369
  command: "get <id>",
1370
1370
  describe: "Fetch a category",
1371
- builder: (yargs32) => withConfiguration(
1371
+ builder: (yargs33) => withConfiguration(
1372
1372
  withFormatOptions(
1373
1373
  withApiOptions(
1374
1374
  withProjectOptions(
1375
- yargs32.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
1375
+ yargs33.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
1376
1376
  )
1377
1377
  )
1378
1378
  )
@@ -1397,7 +1397,7 @@ var CategoryListModule = {
1397
1397
  command: "list",
1398
1398
  describe: "List categories",
1399
1399
  aliases: ["ls"],
1400
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32.options({}))))),
1400
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33.options({}))))),
1401
1401
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
1402
1402
  const fetch3 = nodeFetchProxy(proxy);
1403
1403
  const client = new UncachedCategoryClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -1446,11 +1446,11 @@ function createCategoriesEngineDataSource({
1446
1446
  var CategoryPullModule = {
1447
1447
  command: "pull <directory>",
1448
1448
  describe: "Pulls all categories to local files in a directory",
1449
- builder: (yargs32) => withConfiguration(
1449
+ builder: (yargs33) => withConfiguration(
1450
1450
  withApiOptions(
1451
1451
  withProjectOptions(
1452
1452
  withDiffOptions(
1453
- yargs32.positional("directory", {
1453
+ yargs33.positional("directory", {
1454
1454
  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.",
1455
1455
  type: "string"
1456
1456
  }).option("format", {
@@ -1527,11 +1527,11 @@ import { UncachedCategoryClient as UncachedCategoryClient4 } from "@uniformdev/c
1527
1527
  var CategoryPushModule = {
1528
1528
  command: "push <directory>",
1529
1529
  describe: "Pushes all categories from files in a directory to Uniform Canvas",
1530
- builder: (yargs32) => withConfiguration(
1530
+ builder: (yargs33) => withConfiguration(
1531
1531
  withApiOptions(
1532
1532
  withProjectOptions(
1533
1533
  withDiffOptions(
1534
- yargs32.positional("directory", {
1534
+ yargs33.positional("directory", {
1535
1535
  describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
1536
1536
  type: "string"
1537
1537
  }).option("what-if", {
@@ -1597,10 +1597,10 @@ var CategoryRemoveModule = {
1597
1597
  command: "remove <id>",
1598
1598
  aliases: ["delete", "rm"],
1599
1599
  describe: "Delete a category",
1600
- builder: (yargs32) => withConfiguration(
1600
+ builder: (yargs33) => withConfiguration(
1601
1601
  withApiOptions(
1602
1602
  withProjectOptions(
1603
- yargs32.positional("id", { demandOption: true, describe: "Category UUID to delete" })
1603
+ yargs33.positional("id", { demandOption: true, describe: "Category UUID to delete" })
1604
1604
  )
1605
1605
  )
1606
1606
  ),
@@ -1617,10 +1617,10 @@ var CategoryUpdateModule = {
1617
1617
  command: "update <filename>",
1618
1618
  aliases: ["put"],
1619
1619
  describe: "Insert or update a category",
1620
- builder: (yargs32) => withConfiguration(
1620
+ builder: (yargs33) => withConfiguration(
1621
1621
  withApiOptions(
1622
1622
  withProjectOptions(
1623
- yargs32.positional("filename", { demandOption: true, describe: "Category file to put" })
1623
+ yargs33.positional("filename", { demandOption: true, describe: "Category file to put" })
1624
1624
  )
1625
1625
  )
1626
1626
  ),
@@ -1637,7 +1637,7 @@ var CategoryModule = {
1637
1637
  command: "category <command>",
1638
1638
  aliases: ["cat"],
1639
1639
  describe: "Commands for Canvas categories",
1640
- builder: (yargs32) => yargs32.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
1640
+ builder: (yargs33) => yargs33.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
1641
1641
  handler: () => {
1642
1642
  yargs2.help();
1643
1643
  }
@@ -1658,11 +1658,11 @@ var selectSchemaUrl = () => "/schemas/json-schema/component-definition/v1.json";
1658
1658
  var ComponentGetModule = {
1659
1659
  command: "get <id>",
1660
1660
  describe: "Fetch a component definition",
1661
- builder: (yargs32) => withConfiguration(
1661
+ builder: (yargs33) => withConfiguration(
1662
1662
  withFormatOptions(
1663
1663
  withApiOptions(
1664
1664
  withProjectOptions(
1665
- yargs32.positional("id", {
1665
+ yargs33.positional("id", {
1666
1666
  demandOption: true,
1667
1667
  describe: "Component definition public ID to fetch"
1668
1668
  })
@@ -1696,11 +1696,11 @@ var ComponentListModule = {
1696
1696
  command: "list",
1697
1697
  describe: "List component definitions",
1698
1698
  aliases: ["ls"],
1699
- builder: (yargs32) => withConfiguration(
1699
+ builder: (yargs33) => withConfiguration(
1700
1700
  withFormatOptions(
1701
1701
  withApiOptions(
1702
1702
  withProjectOptions(
1703
- yargs32.options({
1703
+ yargs33.options({
1704
1704
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
1705
1705
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
1706
1706
  })
@@ -1755,11 +1755,11 @@ function createComponentDefinitionEngineDataSource({
1755
1755
  var ComponentPullModule = {
1756
1756
  command: "pull <directory>",
1757
1757
  describe: "Pulls all component definitions to local files in a directory",
1758
- builder: (yargs32) => withConfiguration(
1758
+ builder: (yargs33) => withConfiguration(
1759
1759
  withApiOptions(
1760
1760
  withProjectOptions(
1761
1761
  withDiffOptions(
1762
- yargs32.positional("directory", {
1762
+ yargs33.positional("directory", {
1763
1763
  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.",
1764
1764
  type: "string"
1765
1765
  }).option("format", {
@@ -1837,11 +1837,11 @@ import { UncachedCanvasClient as UncachedCanvasClient4 } from "@uniformdev/canva
1837
1837
  var ComponentPushModule = {
1838
1838
  command: "push <directory>",
1839
1839
  describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
1840
- builder: (yargs32) => withConfiguration(
1840
+ builder: (yargs33) => withConfiguration(
1841
1841
  withApiOptions(
1842
1842
  withProjectOptions(
1843
1843
  withDiffOptions(
1844
- yargs32.positional("directory", {
1844
+ yargs33.positional("directory", {
1845
1845
  describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
1846
1846
  type: "string"
1847
1847
  }).option("what-if", {
@@ -1908,10 +1908,10 @@ var ComponentRemoveModule = {
1908
1908
  command: "remove <id>",
1909
1909
  aliases: ["delete", "rm"],
1910
1910
  describe: "Delete a component definition",
1911
- builder: (yargs32) => withConfiguration(
1911
+ builder: (yargs33) => withConfiguration(
1912
1912
  withApiOptions(
1913
1913
  withProjectOptions(
1914
- yargs32.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1914
+ yargs33.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1915
1915
  )
1916
1916
  )
1917
1917
  ),
@@ -1928,10 +1928,10 @@ var ComponentUpdateModule = {
1928
1928
  command: "update <filename>",
1929
1929
  aliases: ["put"],
1930
1930
  describe: "Insert or update a component definition",
1931
- builder: (yargs32) => withConfiguration(
1931
+ builder: (yargs33) => withConfiguration(
1932
1932
  withApiOptions(
1933
1933
  withProjectOptions(
1934
- yargs32.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1934
+ yargs33.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1935
1935
  )
1936
1936
  )
1937
1937
  ),
@@ -1948,13 +1948,13 @@ var ComponentModule = {
1948
1948
  command: "component <command>",
1949
1949
  aliases: ["def"],
1950
1950
  describe: "Commands for Canvas component definitions",
1951
- builder: (yargs32) => yargs32.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
1951
+ builder: (yargs33) => yargs33.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
1952
1952
  handler: () => {
1953
1953
  yargs3.help();
1954
1954
  }
1955
1955
  };
1956
1956
 
1957
- // src/commands/canvas/commands/composition.ts
1957
+ // src/commands/canvas/commands/componentPattern.ts
1958
1958
  import yargs4 from "yargs";
1959
1959
 
1960
1960
  // src/commands/canvas/commands/composition/get.ts
@@ -1962,12 +1962,12 @@ import { UncachedCanvasClient as UncachedCanvasClient7 } from "@uniformdev/canva
1962
1962
  var CompositionGetModule = {
1963
1963
  command: "get <id>",
1964
1964
  describe: "Fetch a composition",
1965
- builder: (yargs32) => withFormatOptions(
1965
+ builder: (yargs33) => withFormatOptions(
1966
1966
  withConfiguration(
1967
1967
  withApiOptions(
1968
1968
  withProjectOptions(
1969
1969
  withStateOptions(
1970
- yargs32.positional("id", { demandOption: true, describe: "Composition/pattern public ID to fetch" }).option({
1970
+ yargs33.positional("id", { demandOption: true, describe: "Composition/pattern public ID to fetch" }).option({
1971
1971
  resolvePatterns: {
1972
1972
  type: "boolean",
1973
1973
  default: false,
@@ -2032,18 +2032,24 @@ var CompositionGetModule = {
2032
2032
  }
2033
2033
  };
2034
2034
 
2035
+ // src/commands/canvas/commands/componentPattern/get.ts
2036
+ var ComponentPatternGetModule = {
2037
+ ...CompositionGetModule,
2038
+ describe: "Fetch a component pattern"
2039
+ };
2040
+
2035
2041
  // src/commands/canvas/commands/composition/list.ts
2036
2042
  import { UncachedCanvasClient as UncachedCanvasClient8 } from "@uniformdev/canvas";
2037
2043
  var CompositionListModule = {
2038
2044
  command: "list",
2039
2045
  describe: "List compositions",
2040
2046
  aliases: ["ls"],
2041
- builder: (yargs32) => withFormatOptions(
2047
+ builder: (yargs33) => withFormatOptions(
2042
2048
  withConfiguration(
2043
2049
  withApiOptions(
2044
2050
  withProjectOptions(
2045
2051
  withStateOptions(
2046
- yargs32.options({
2052
+ yargs33.options({
2047
2053
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
2048
2054
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
2049
2055
  resolvePatterns: {
@@ -2109,6 +2115,49 @@ var CompositionListModule = {
2109
2115
  }
2110
2116
  };
2111
2117
 
2118
+ // src/commands/canvas/commands/componentPattern/list.ts
2119
+ var ComponentPatternListModule = {
2120
+ ...CompositionListModule,
2121
+ describe: "List component patterns",
2122
+ builder: (yargs33) => withFormatOptions(
2123
+ withConfiguration(
2124
+ withApiOptions(
2125
+ withProjectOptions(
2126
+ withStateOptions(
2127
+ yargs33.options({
2128
+ offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
2129
+ limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
2130
+ resolvePatterns: {
2131
+ type: "boolean",
2132
+ default: false,
2133
+ describe: "Resolve component pattern references in the composition"
2134
+ },
2135
+ resolveOverrides: {
2136
+ type: "boolean",
2137
+ default: false,
2138
+ describe: "Resolves component pattern overrides in the composition and removes override definition data"
2139
+ },
2140
+ onlyPatterns: {
2141
+ describe: "Only pulling component patterns and not compositions",
2142
+ // This default differentiate this list command from composition list command
2143
+ default: true,
2144
+ type: "boolean",
2145
+ hidden: true
2146
+ },
2147
+ componentIDs: {
2148
+ alias: ["componentIDs"],
2149
+ type: "boolean",
2150
+ default: false,
2151
+ describe: "Include individual component UIDs"
2152
+ }
2153
+ })
2154
+ )
2155
+ )
2156
+ )
2157
+ )
2158
+ )
2159
+ };
2160
+
2112
2161
  // src/commands/canvas/commands/composition/publish.ts
2113
2162
  import { UncachedCanvasClient as UncachedCanvasClient9 } from "@uniformdev/canvas";
2114
2163
 
@@ -2164,11 +2213,11 @@ function createComponentInstanceEngineDataSource({
2164
2213
  var CompositionPublishModule = {
2165
2214
  command: "publish [ids]",
2166
2215
  describe: "Publishes composition(s)",
2167
- builder: (yargs32) => withConfiguration(
2216
+ builder: (yargs33) => withConfiguration(
2168
2217
  withApiOptions(
2169
2218
  withProjectOptions(
2170
2219
  withDiffOptions(
2171
- yargs32.positional("ids", {
2220
+ yargs33.positional("ids", {
2172
2221
  describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
2173
2222
  type: "string"
2174
2223
  }).option("all", {
@@ -2238,18 +2287,60 @@ var CompositionPublishModule = {
2238
2287
  }
2239
2288
  };
2240
2289
 
2290
+ // src/commands/canvas/commands/componentPattern/publish.ts
2291
+ var ComponentPatternPublishModule = {
2292
+ ...CompositionPublishModule,
2293
+ describe: "Publishes component pattern(s)",
2294
+ builder: (yargs33) => withConfiguration(
2295
+ withApiOptions(
2296
+ withProjectOptions(
2297
+ withDiffOptions(
2298
+ yargs33.positional("ids", {
2299
+ describe: "Publishes component pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
2300
+ type: "string"
2301
+ }).option("all", {
2302
+ alias: ["a"],
2303
+ describe: "Publishes all component patterns. Use compositionId to publish one instead.",
2304
+ default: false,
2305
+ type: "boolean"
2306
+ }).option("what-if", {
2307
+ alias: ["w"],
2308
+ describe: "What-if mode reports what would be done but does not perform any un-publishing",
2309
+ default: false,
2310
+ type: "boolean"
2311
+ }).option("publishingState", {
2312
+ describe: 'Publishing state to update to. Can be "published" or "preview".',
2313
+ default: "published",
2314
+ type: "string",
2315
+ hidden: true
2316
+ }).option("onlyCompositions", {
2317
+ describe: "Only publishing compositions and not component patterns",
2318
+ default: false,
2319
+ type: "boolean"
2320
+ }).option("onlyPatterns", {
2321
+ describe: "Only pulling component patterns and not compositions",
2322
+ default: true,
2323
+ type: "boolean",
2324
+ hidden: true
2325
+ })
2326
+ )
2327
+ )
2328
+ )
2329
+ )
2330
+ };
2331
+
2241
2332
  // src/commands/canvas/commands/composition/pull.ts
2242
2333
  import { UncachedCanvasClient as UncachedCanvasClient10 } from "@uniformdev/canvas";
2243
2334
  import { UncachedFileClient as UncachedFileClient3 } from "@uniformdev/files";
2244
2335
  var CompositionPullModule = {
2245
2336
  command: "pull <directory>",
2246
2337
  describe: "Pulls all compositions to local files in a directory",
2247
- builder: (yargs32) => withConfiguration(
2338
+ builder: (yargs33) => withConfiguration(
2248
2339
  withApiOptions(
2249
2340
  withProjectOptions(
2250
2341
  withStateOptions(
2251
2342
  withDiffOptions(
2252
- yargs32.positional("directory", {
2343
+ yargs33.positional("directory", {
2253
2344
  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.",
2254
2345
  type: "string"
2255
2346
  }).option("format", {
@@ -2347,18 +2438,61 @@ var CompositionPullModule = {
2347
2438
  }
2348
2439
  };
2349
2440
 
2441
+ // src/commands/canvas/commands/componentPattern/pull.ts
2442
+ var ComponentPatternPullModule = {
2443
+ ...CompositionPullModule,
2444
+ describe: "Pulls all component patterns to local files in a directory",
2445
+ builder: (yargs33) => withConfiguration(
2446
+ withApiOptions(
2447
+ withProjectOptions(
2448
+ withStateOptions(
2449
+ withDiffOptions(
2450
+ yargs33.positional("directory", {
2451
+ 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.",
2452
+ type: "string"
2453
+ }).option("format", {
2454
+ alias: ["f"],
2455
+ describe: "Output format",
2456
+ default: "yaml",
2457
+ choices: ["yaml", "json"],
2458
+ type: "string"
2459
+ }).option("onlyPatterns", {
2460
+ describe: "Only pulling component patterns and not compositions",
2461
+ // This default differentiate this list command from composition list command
2462
+ default: true,
2463
+ type: "boolean",
2464
+ hidden: true
2465
+ }).option("what-if", {
2466
+ alias: ["w"],
2467
+ describe: "What-if mode reports what would be done but changes no files",
2468
+ default: false,
2469
+ type: "boolean"
2470
+ }).option("mode", {
2471
+ alias: ["m"],
2472
+ 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',
2473
+ choices: ["create", "createOrUpdate", "mirror"],
2474
+ default: "mirror",
2475
+ type: "string"
2476
+ })
2477
+ )
2478
+ )
2479
+ )
2480
+ )
2481
+ )
2482
+ };
2483
+
2350
2484
  // src/commands/canvas/commands/composition/push.ts
2351
2485
  import { UncachedCanvasClient as UncachedCanvasClient11 } from "@uniformdev/canvas";
2352
2486
  import { UncachedFileClient as UncachedFileClient4 } from "@uniformdev/files";
2353
2487
  var CompositionPushModule = {
2354
2488
  command: "push <directory>",
2355
2489
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
2356
- builder: (yargs32) => withConfiguration(
2490
+ builder: (yargs33) => withConfiguration(
2357
2491
  withApiOptions(
2358
2492
  withProjectOptions(
2359
2493
  withStateOptions(
2360
2494
  withDiffOptions(
2361
- yargs32.positional("directory", {
2495
+ yargs33.positional("directory", {
2362
2496
  describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
2363
2497
  type: "string"
2364
2498
  }).option("what-if", {
@@ -2443,16 +2577,53 @@ var CompositionPushModule = {
2443
2577
  }
2444
2578
  };
2445
2579
 
2580
+ // src/commands/canvas/commands/componentPattern/push.ts
2581
+ var ComponentPatternPushModule = {
2582
+ ...CompositionPushModule,
2583
+ describe: "Pushes all component patterns from files in a directory to Uniform Canvas",
2584
+ builder: (yargs33) => withConfiguration(
2585
+ withApiOptions(
2586
+ withProjectOptions(
2587
+ withStateOptions(
2588
+ withDiffOptions(
2589
+ yargs33.positional("directory", {
2590
+ describe: "Directory to read the compositions/component patterns from. If a filename is used, a package will be read instead.",
2591
+ type: "string"
2592
+ }).option("what-if", {
2593
+ alias: ["w"],
2594
+ describe: "What-if mode reports what would be done but changes nothing",
2595
+ default: false,
2596
+ type: "boolean"
2597
+ }).option("mode", {
2598
+ alias: ["m"],
2599
+ 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',
2600
+ choices: ["create", "createOrUpdate", "mirror"],
2601
+ default: "mirror",
2602
+ type: "string"
2603
+ }).option("onlyPatterns", {
2604
+ describe: "Only pulling component patterns and not compositions",
2605
+ // This default differentiate this list command from composition list command
2606
+ default: true,
2607
+ type: "boolean",
2608
+ hidden: true
2609
+ })
2610
+ )
2611
+ )
2612
+ )
2613
+ )
2614
+ )
2615
+ };
2616
+
2446
2617
  // src/commands/canvas/commands/composition/remove.ts
2447
2618
  import { UncachedCanvasClient as UncachedCanvasClient12 } from "@uniformdev/canvas";
2448
2619
  var CompositionRemoveModule = {
2449
2620
  command: "remove <id>",
2450
2621
  aliases: ["delete", "rm"],
2451
2622
  describe: "Delete a composition",
2452
- builder: (yargs32) => withConfiguration(
2623
+ builder: (yargs33) => withConfiguration(
2453
2624
  withApiOptions(
2454
2625
  withProjectOptions(
2455
- yargs32.positional("id", { demandOption: true, describe: "Composition/pattern public ID to delete" })
2626
+ yargs33.positional("id", { demandOption: true, describe: "Composition/pattern public ID to delete" })
2456
2627
  )
2457
2628
  )
2458
2629
  ),
@@ -2463,16 +2634,22 @@ var CompositionRemoveModule = {
2463
2634
  }
2464
2635
  };
2465
2636
 
2637
+ // src/commands/canvas/commands/componentPattern/remove.ts
2638
+ var ComponentPatternRemoveModule = {
2639
+ ...CompositionRemoveModule,
2640
+ describe: "Delete a component pattern"
2641
+ };
2642
+
2466
2643
  // src/commands/canvas/commands/composition/unpublish.ts
2467
2644
  import { CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE2, UncachedCanvasClient as UncachedCanvasClient13 } from "@uniformdev/canvas";
2468
2645
  import { diffJson as diffJson2 } from "diff";
2469
2646
  var CompositionUnpublishModule = {
2470
2647
  command: "unpublish [ids]",
2471
2648
  describe: "Unpublish a composition(s)",
2472
- builder: (yargs32) => withConfiguration(
2649
+ builder: (yargs33) => withConfiguration(
2473
2650
  withApiOptions(
2474
2651
  withProjectOptions(
2475
- yargs32.positional("ids", {
2652
+ yargs33.positional("ids", {
2476
2653
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
2477
2654
  type: "string"
2478
2655
  }).option("all", {
@@ -2560,17 +2737,53 @@ var CompositionUnpublishModule = {
2560
2737
  }
2561
2738
  };
2562
2739
 
2740
+ // src/commands/canvas/commands/componentPattern/unpublish.ts
2741
+ var ComponentPatternUnpublishModule = {
2742
+ command: "unpublish [ids]",
2743
+ describe: "Unpublish a component pattern(s)",
2744
+ builder: (yargs33) => withConfiguration(
2745
+ withApiOptions(
2746
+ withProjectOptions(
2747
+ yargs33.positional("ids", {
2748
+ describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
2749
+ type: "string"
2750
+ }).option("all", {
2751
+ alias: ["a"],
2752
+ describe: "Un-pPublishes all compositions. Use compositionId to publish one instead.",
2753
+ default: false,
2754
+ type: "boolean"
2755
+ }).option("what-if", {
2756
+ alias: ["w"],
2757
+ describe: "What-if mode reports what would be done but does not perform any publishing",
2758
+ default: false,
2759
+ type: "boolean"
2760
+ }).option("onlyCompositions", {
2761
+ describe: "Only publishing compositions and not component patterns",
2762
+ default: false,
2763
+ type: "boolean"
2764
+ }).option("onlyPatterns", {
2765
+ describe: "Only pulling component patterns and not compositions",
2766
+ default: true,
2767
+ type: "boolean",
2768
+ hidden: true
2769
+ })
2770
+ )
2771
+ )
2772
+ ),
2773
+ handler: CompositionUnpublishModule.handler
2774
+ };
2775
+
2563
2776
  // src/commands/canvas/commands/composition/update.ts
2564
2777
  import { UncachedCanvasClient as UncachedCanvasClient14 } from "@uniformdev/canvas";
2565
2778
  var CompositionUpdateModule = {
2566
2779
  command: "update <filename>",
2567
2780
  aliases: ["put"],
2568
2781
  describe: "Insert or update a composition",
2569
- builder: (yargs32) => withConfiguration(
2782
+ builder: (yargs33) => withConfiguration(
2570
2783
  withApiOptions(
2571
2784
  withProjectOptions(
2572
2785
  withStateOptions(
2573
- yargs32.positional("filename", { demandOption: true, describe: "Composition/pattern file to put" })
2786
+ yargs33.positional("filename", { demandOption: true, describe: "Composition/pattern file to put" })
2574
2787
  )
2575
2788
  )
2576
2789
  )
@@ -2583,31 +2796,49 @@ var CompositionUpdateModule = {
2583
2796
  }
2584
2797
  };
2585
2798
 
2799
+ // src/commands/canvas/commands/componentPattern/update.ts
2800
+ var ComponentPatternUpdateModule = {
2801
+ ...CompositionUpdateModule,
2802
+ describe: "Insert or update a component pattern"
2803
+ };
2804
+
2805
+ // src/commands/canvas/commands/componentPattern.ts
2806
+ var ComponentPatternModule = {
2807
+ command: "component-pattern <command>",
2808
+ aliases: ["pattern"],
2809
+ describe: "Commands for Canvas component patterns",
2810
+ builder: (yargs33) => yargs33.command(ComponentPatternPullModule).command(ComponentPatternPushModule).command(ComponentPatternGetModule).command(ComponentPatternRemoveModule).command(ComponentPatternListModule).command(ComponentPatternUpdateModule).command(ComponentPatternPublishModule).command(ComponentPatternUnpublishModule).demandCommand(),
2811
+ handler: () => {
2812
+ yargs4.help();
2813
+ }
2814
+ };
2815
+
2586
2816
  // src/commands/canvas/commands/composition.ts
2817
+ import yargs5 from "yargs";
2587
2818
  var CompositionModule = {
2588
2819
  command: "composition <command>",
2589
2820
  describe: "Commands for Canvas compositions",
2590
2821
  aliases: ["comp"],
2591
- builder: (yargs32) => yargs32.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
2822
+ builder: (yargs33) => yargs33.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
2592
2823
  handler: () => {
2593
- yargs4.help();
2824
+ yargs5.help();
2594
2825
  }
2595
2826
  };
2596
2827
 
2597
2828
  // src/commands/canvas/commands/contentType.ts
2598
- import yargs5 from "yargs";
2829
+ import yargs6 from "yargs";
2599
2830
 
2600
2831
  // src/commands/canvas/commands/contentType/get.ts
2601
2832
  import { ContentClient } from "@uniformdev/canvas";
2602
2833
  var ContentTypeGetModule = {
2603
2834
  command: "get <id>",
2604
2835
  describe: "Get a content type",
2605
- builder: (yargs32) => withConfiguration(
2836
+ builder: (yargs33) => withConfiguration(
2606
2837
  withFormatOptions(
2607
2838
  withApiOptions(
2608
2839
  withProjectOptions(
2609
2840
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2610
- yargs32.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
2841
+ yargs33.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
2611
2842
  )
2612
2843
  )
2613
2844
  )
@@ -2629,7 +2860,7 @@ import { ContentClient as ContentClient2 } from "@uniformdev/canvas";
2629
2860
  var ContentTypeListModule = {
2630
2861
  command: "list",
2631
2862
  describe: "List content types",
2632
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
2863
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
2633
2864
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2634
2865
  const fetch3 = nodeFetchProxy(proxy);
2635
2866
  const client = new ContentClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -2676,11 +2907,11 @@ function createContentTypeEngineDataSource({
2676
2907
  var ContentTypePullModule = {
2677
2908
  command: "pull <directory>",
2678
2909
  describe: "Pulls all content types to local files in a directory",
2679
- builder: (yargs32) => withConfiguration(
2910
+ builder: (yargs33) => withConfiguration(
2680
2911
  withApiOptions(
2681
2912
  withProjectOptions(
2682
2913
  withDiffOptions(
2683
- yargs32.positional("directory", {
2914
+ yargs33.positional("directory", {
2684
2915
  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.",
2685
2916
  type: "string"
2686
2917
  }).option("format", {
@@ -2763,11 +2994,11 @@ import { ContentClient as ContentClient4 } from "@uniformdev/canvas";
2763
2994
  var ContentTypePushModule = {
2764
2995
  command: "push <directory>",
2765
2996
  describe: "Pushes all content types from files in a directory to Uniform",
2766
- builder: (yargs32) => withConfiguration(
2997
+ builder: (yargs33) => withConfiguration(
2767
2998
  withApiOptions(
2768
2999
  withProjectOptions(
2769
3000
  withDiffOptions(
2770
- yargs32.positional("directory", {
3001
+ yargs33.positional("directory", {
2771
3002
  describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
2772
3003
  type: "string"
2773
3004
  }).option("what-if", {
@@ -2839,10 +3070,10 @@ var ContentTypeRemoveModule = {
2839
3070
  command: "remove <id>",
2840
3071
  aliases: ["delete", "rm"],
2841
3072
  describe: "Delete a content type",
2842
- builder: (yargs32) => withConfiguration(
3073
+ builder: (yargs33) => withConfiguration(
2843
3074
  withApiOptions(
2844
3075
  withProjectOptions(
2845
- yargs32.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
3076
+ yargs33.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
2846
3077
  )
2847
3078
  )
2848
3079
  ),
@@ -2859,10 +3090,10 @@ var ContentTypeUpdateModule = {
2859
3090
  command: "update <filename>",
2860
3091
  aliases: ["put"],
2861
3092
  describe: "Insert or update a content type",
2862
- builder: (yargs32) => withConfiguration(
3093
+ builder: (yargs33) => withConfiguration(
2863
3094
  withApiOptions(
2864
3095
  withProjectOptions(
2865
- yargs32.positional("filename", { demandOption: true, describe: "Content type file to put" })
3096
+ yargs33.positional("filename", { demandOption: true, describe: "Content type file to put" })
2866
3097
  )
2867
3098
  )
2868
3099
  ),
@@ -2879,25 +3110,25 @@ var ContentTypeModule = {
2879
3110
  command: "contenttype <command>",
2880
3111
  aliases: ["ct"],
2881
3112
  describe: "Commands for Content Types",
2882
- builder: (yargs32) => yargs32.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
3113
+ builder: (yargs33) => yargs33.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
2883
3114
  handler: () => {
2884
- yargs5.help();
3115
+ yargs6.help();
2885
3116
  }
2886
3117
  };
2887
3118
 
2888
3119
  // src/commands/canvas/commands/dataSource.ts
2889
- import yargs6 from "yargs";
3120
+ import yargs7 from "yargs";
2890
3121
 
2891
3122
  // src/commands/canvas/commands/dataSource/get.ts
2892
3123
  import { DataSourceClient } from "@uniformdev/canvas";
2893
3124
  var DataSourceGetModule = {
2894
3125
  command: "get <id>",
2895
3126
  describe: "Get a data source by ID and writes to stdout. Please note this may contain secret data, use discretion.",
2896
- builder: (yargs32) => withConfiguration(
3127
+ builder: (yargs33) => withConfiguration(
2897
3128
  withApiOptions(
2898
3129
  withProjectOptions(
2899
3130
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2900
- yargs32.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
3131
+ yargs33.positional("id", { demandOption: true, describe: "Data source public ID to fetch" })
2901
3132
  )
2902
3133
  )
2903
3134
  ),
@@ -2915,10 +3146,10 @@ var DataSourceRemoveModule = {
2915
3146
  command: "remove <id>",
2916
3147
  aliases: ["delete", "rm"],
2917
3148
  describe: "Delete a data source",
2918
- builder: (yargs32) => withConfiguration(
3149
+ builder: (yargs33) => withConfiguration(
2919
3150
  withApiOptions(
2920
3151
  withProjectOptions(
2921
- yargs32.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
3152
+ yargs33.positional("id", { demandOption: true, describe: "Data source public ID to delete" })
2922
3153
  )
2923
3154
  )
2924
3155
  ),
@@ -2935,10 +3166,10 @@ var DataSourceUpdateModule = {
2935
3166
  command: "update <dataSource>",
2936
3167
  aliases: ["put"],
2937
3168
  describe: "Insert or update a data source",
2938
- builder: (yargs32) => withConfiguration(
3169
+ builder: (yargs33) => withConfiguration(
2939
3170
  withApiOptions(
2940
3171
  withProjectOptions(
2941
- yargs32.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
3172
+ yargs33.positional("dataSource", { demandOption: true, describe: "Data source JSON to put" }).option("integrationType", {
2942
3173
  describe: "Integration type that exposes the connector type for this data source (as defined in integration manifest).",
2943
3174
  type: "string",
2944
3175
  demandOption: true
@@ -2958,14 +3189,14 @@ var DataSourceModule = {
2958
3189
  command: "datasource <command>",
2959
3190
  aliases: ["ds"],
2960
3191
  describe: "Commands for Data Source definitions",
2961
- builder: (yargs32) => yargs32.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
3192
+ builder: (yargs33) => yargs33.command(DataSourceGetModule).command(DataSourceRemoveModule).command(DataSourceUpdateModule).demandCommand(),
2962
3193
  handler: () => {
2963
- yargs6.help();
3194
+ yargs7.help();
2964
3195
  }
2965
3196
  };
2966
3197
 
2967
3198
  // src/commands/canvas/commands/dataType.ts
2968
- import yargs7 from "yargs";
3199
+ import yargs8 from "yargs";
2969
3200
 
2970
3201
  // src/commands/canvas/commands/dataType/get.ts
2971
3202
  import { DataTypeClient } from "@uniformdev/canvas";
@@ -2973,12 +3204,12 @@ var DataTypeGetModule = {
2973
3204
  command: "get <id>",
2974
3205
  describe: "Get a data type",
2975
3206
  aliases: ["ls"],
2976
- builder: (yargs32) => withConfiguration(
3207
+ builder: (yargs33) => withConfiguration(
2977
3208
  withFormatOptions(
2978
3209
  withApiOptions(
2979
3210
  withProjectOptions(
2980
3211
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2981
- yargs32.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
3212
+ yargs33.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
2982
3213
  )
2983
3214
  )
2984
3215
  )
@@ -3001,7 +3232,7 @@ var DataTypeListModule = {
3001
3232
  command: "list",
3002
3233
  describe: "List data types",
3003
3234
  aliases: ["ls"],
3004
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
3235
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
3005
3236
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3006
3237
  const fetch3 = nodeFetchProxy(proxy);
3007
3238
  const client = new DataTypeClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -3050,11 +3281,11 @@ function createDataTypeEngineDataSource({
3050
3281
  var DataTypePullModule = {
3051
3282
  command: "pull <directory>",
3052
3283
  describe: "Pulls all data types to local files in a directory",
3053
- builder: (yargs32) => withConfiguration(
3284
+ builder: (yargs33) => withConfiguration(
3054
3285
  withApiOptions(
3055
3286
  withProjectOptions(
3056
3287
  withDiffOptions(
3057
- yargs32.positional("directory", {
3288
+ yargs33.positional("directory", {
3058
3289
  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.",
3059
3290
  type: "string"
3060
3291
  }).option("format", {
@@ -3137,11 +3368,11 @@ import { DataTypeClient as DataTypeClient4 } from "@uniformdev/canvas";
3137
3368
  var DataTypePushModule = {
3138
3369
  command: "push <directory>",
3139
3370
  describe: "Pushes all data types from files in a directory to Uniform",
3140
- builder: (yargs32) => withConfiguration(
3371
+ builder: (yargs33) => withConfiguration(
3141
3372
  withApiOptions(
3142
3373
  withProjectOptions(
3143
3374
  withDiffOptions(
3144
- yargs32.positional("directory", {
3375
+ yargs33.positional("directory", {
3145
3376
  describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
3146
3377
  type: "string"
3147
3378
  }).option("what-if", {
@@ -3213,10 +3444,10 @@ var DataTypeRemoveModule = {
3213
3444
  command: "remove <id>",
3214
3445
  aliases: ["delete", "rm"],
3215
3446
  describe: "Delete a data type",
3216
- builder: (yargs32) => withConfiguration(
3447
+ builder: (yargs33) => withConfiguration(
3217
3448
  withApiOptions(
3218
3449
  withProjectOptions(
3219
- yargs32.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
3450
+ yargs33.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
3220
3451
  )
3221
3452
  )
3222
3453
  ),
@@ -3233,10 +3464,10 @@ var DataTypeUpdateModule = {
3233
3464
  command: "update <filename>",
3234
3465
  aliases: ["put"],
3235
3466
  describe: "Insert or update a data type",
3236
- builder: (yargs32) => withConfiguration(
3467
+ builder: (yargs33) => withConfiguration(
3237
3468
  withApiOptions(
3238
3469
  withProjectOptions(
3239
- yargs32.positional("filename", { demandOption: true, describe: "Data type file to put" })
3470
+ yargs33.positional("filename", { demandOption: true, describe: "Data type file to put" })
3240
3471
  )
3241
3472
  )
3242
3473
  ),
@@ -3253,26 +3484,26 @@ var DataTypeModule = {
3253
3484
  command: "datatype <command>",
3254
3485
  aliases: ["dt"],
3255
3486
  describe: "Commands for Data Type definitions",
3256
- builder: (yargs32) => yargs32.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
3487
+ builder: (yargs33) => yargs33.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
3257
3488
  handler: () => {
3258
- yargs7.help();
3489
+ yargs8.help();
3259
3490
  }
3260
3491
  };
3261
3492
 
3262
3493
  // src/commands/canvas/commands/entry.ts
3263
- import yargs8 from "yargs";
3494
+ import yargs9 from "yargs";
3264
3495
 
3265
3496
  // src/commands/canvas/commands/entry/get.ts
3266
3497
  import { ContentClient as ContentClient7 } from "@uniformdev/canvas";
3267
3498
  var EntryGetModule = {
3268
3499
  command: "get <id>",
3269
3500
  describe: "Get an entry",
3270
- builder: (yargs32) => withConfiguration(
3501
+ builder: (yargs33) => withConfiguration(
3271
3502
  withFormatOptions(
3272
3503
  withApiOptions(
3273
3504
  withProjectOptions(
3274
3505
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3275
- yargs32.positional("id", { demandOption: true, describe: "Entry public ID to fetch" })
3506
+ yargs33.positional("id", { demandOption: true, describe: "Entry public ID to fetch" })
3276
3507
  )
3277
3508
  )
3278
3509
  )
@@ -3300,7 +3531,7 @@ import { ContentClient as ContentClient8 } from "@uniformdev/canvas";
3300
3531
  var EntryListModule = {
3301
3532
  command: "list",
3302
3533
  describe: "List entries",
3303
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
3534
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
3304
3535
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3305
3536
  const fetch3 = nodeFetchProxy(proxy);
3306
3537
  const client = new ContentClient8({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -3374,11 +3605,11 @@ function createEntryEngineDataSource({
3374
3605
  var EntryPublishModule = {
3375
3606
  command: "publish [ids]",
3376
3607
  describe: "Publishes entry(ies)",
3377
- builder: (yargs32) => withConfiguration(
3608
+ builder: (yargs33) => withConfiguration(
3378
3609
  withApiOptions(
3379
3610
  withProjectOptions(
3380
3611
  withDiffOptions(
3381
- yargs32.positional("ids", {
3612
+ yargs33.positional("ids", {
3382
3613
  describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
3383
3614
  type: "string"
3384
3615
  }).option("all", {
@@ -3391,31 +3622,12 @@ var EntryPublishModule = {
3391
3622
  describe: "What-if mode reports what would be done but does not perform any publishing",
3392
3623
  default: false,
3393
3624
  type: "boolean"
3394
- }).option("onlyEntries", {
3395
- describe: "Only publishing entries and not patterns",
3396
- default: false,
3397
- type: "boolean"
3398
- }).option("onlyPatterns", {
3399
- describe: "Only pulling patterns and not entries",
3400
- default: false,
3401
- type: "boolean",
3402
- hidden: true
3403
3625
  })
3404
3626
  )
3405
3627
  )
3406
3628
  )
3407
3629
  ),
3408
- handler: async ({
3409
- apiHost,
3410
- apiKey,
3411
- proxy,
3412
- ids,
3413
- all,
3414
- whatIf,
3415
- project: projectId,
3416
- onlyEntries,
3417
- onlyPatterns
3418
- }) => {
3630
+ handler: async ({ apiHost, apiKey, proxy, ids, all, whatIf, project: projectId }) => {
3419
3631
  if (!all && !ids || all && ids) {
3420
3632
  console.error(`Specify --all or entry ID(s) to publish.`);
3421
3633
  process.exit(1);
@@ -3427,15 +3639,13 @@ var EntryPublishModule = {
3427
3639
  client,
3428
3640
  state: "preview",
3429
3641
  entryIDs: entryIDsArray,
3430
- onlyEntries,
3431
- onlyPatterns
3642
+ onlyEntries: true
3432
3643
  });
3433
3644
  const target = createEntryEngineDataSource({
3434
3645
  client,
3435
3646
  state: "published",
3436
3647
  entryIDs: entryIDsArray,
3437
- onlyEntries,
3438
- onlyPatterns
3648
+ onlyEntries: true
3439
3649
  });
3440
3650
  await syncEngine({
3441
3651
  source,
@@ -3454,12 +3664,12 @@ import { UncachedFileClient as UncachedFileClient5 } from "@uniformdev/files";
3454
3664
  var EntryPullModule = {
3455
3665
  command: "pull <directory>",
3456
3666
  describe: "Pulls all entries to local files in a directory",
3457
- builder: (yargs32) => withConfiguration(
3667
+ builder: (yargs33) => withConfiguration(
3458
3668
  withApiOptions(
3459
3669
  withProjectOptions(
3460
3670
  withStateOptions(
3461
3671
  withDiffOptions(
3462
- yargs32.positional("directory", {
3672
+ yargs33.positional("directory", {
3463
3673
  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.",
3464
3674
  type: "string"
3465
3675
  }).option("format", {
@@ -3558,12 +3768,12 @@ import { UncachedFileClient as UncachedFileClient6 } from "@uniformdev/files";
3558
3768
  var EntryPushModule = {
3559
3769
  command: "push <directory>",
3560
3770
  describe: "Pushes all entries from files in a directory to Uniform",
3561
- builder: (yargs32) => withConfiguration(
3771
+ builder: (yargs33) => withConfiguration(
3562
3772
  withApiOptions(
3563
3773
  withProjectOptions(
3564
3774
  withStateOptions(
3565
3775
  withDiffOptions(
3566
- yargs32.positional("directory", {
3776
+ yargs33.positional("directory", {
3567
3777
  describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
3568
3778
  type: "string"
3569
3779
  }).option("what-if", {
@@ -3649,10 +3859,10 @@ var EntryRemoveModule = {
3649
3859
  command: "remove <id>",
3650
3860
  aliases: ["delete", "rm"],
3651
3861
  describe: "Delete an entry",
3652
- builder: (yargs32) => withConfiguration(
3862
+ builder: (yargs33) => withConfiguration(
3653
3863
  withApiOptions(
3654
3864
  withProjectOptions(
3655
- yargs32.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
3865
+ yargs33.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
3656
3866
  )
3657
3867
  )
3658
3868
  ),
@@ -3669,10 +3879,10 @@ import { diffJson as diffJson3 } from "diff";
3669
3879
  var EntryUnpublishModule = {
3670
3880
  command: "unpublish [ids]",
3671
3881
  describe: "Unpublish an entry(ies)",
3672
- builder: (yargs32) => withConfiguration(
3882
+ builder: (yargs33) => withConfiguration(
3673
3883
  withApiOptions(
3674
3884
  withProjectOptions(
3675
- yargs32.positional("ids", {
3885
+ yargs33.positional("ids", {
3676
3886
  describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
3677
3887
  type: "string"
3678
3888
  }).option("all", {
@@ -3685,30 +3895,11 @@ var EntryUnpublishModule = {
3685
3895
  describe: "What-if mode reports what would be done but does not perform any un-publishing",
3686
3896
  default: false,
3687
3897
  type: "boolean"
3688
- }).option("onlyEntries", {
3689
- describe: "Only un-publishing entries and not patterns",
3690
- default: false,
3691
- type: "boolean"
3692
- }).option("onlyPatterns", {
3693
- describe: "Only un-publishing patterns and not entries",
3694
- default: false,
3695
- type: "boolean",
3696
- hidden: true
3697
3898
  })
3698
3899
  )
3699
3900
  )
3700
3901
  ),
3701
- handler: async ({
3702
- apiHost,
3703
- apiKey,
3704
- proxy,
3705
- ids,
3706
- all,
3707
- onlyEntries,
3708
- onlyPatterns,
3709
- project: projectId,
3710
- whatIf
3711
- }) => {
3902
+ handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf }) => {
3712
3903
  if (!all && !ids || all && ids) {
3713
3904
  console.error(`Specify --all or entry ID(s) to publish.`);
3714
3905
  process.exit(1);
@@ -3721,15 +3912,13 @@ var EntryUnpublishModule = {
3721
3912
  client,
3722
3913
  state: "published",
3723
3914
  entryIDs: entryIDsArray,
3724
- onlyEntries,
3725
- onlyPatterns
3915
+ onlyEntries: true
3726
3916
  });
3727
3917
  const target = createEntryEngineDataSource({
3728
3918
  client,
3729
3919
  state: "preview",
3730
3920
  entryIDs: entryIDsArray,
3731
- onlyEntries,
3732
- onlyPatterns
3921
+ onlyEntries: true
3733
3922
  });
3734
3923
  const actions = [];
3735
3924
  const log = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
@@ -3766,10 +3955,10 @@ var EntryUpdateModule = {
3766
3955
  command: "update <filename>",
3767
3956
  aliases: ["put"],
3768
3957
  describe: "Insert or update an entry",
3769
- builder: (yargs32) => withConfiguration(
3958
+ builder: (yargs33) => withConfiguration(
3770
3959
  withApiOptions(
3771
3960
  withProjectOptions(
3772
- yargs32.positional("filename", { demandOption: true, describe: "Entry file to put" })
3961
+ yargs33.positional("filename", { demandOption: true, describe: "Entry file to put" })
3773
3962
  )
3774
3963
  )
3775
3964
  ),
@@ -3785,14 +3974,455 @@ var EntryUpdateModule = {
3785
3974
  var EntryModule = {
3786
3975
  command: "entry <command>",
3787
3976
  describe: "Commands for Entries",
3788
- builder: (yargs32) => yargs32.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
3977
+ builder: (yargs33) => yargs33.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
3789
3978
  handler: () => {
3790
- yargs8.help();
3979
+ yargs9.help();
3791
3980
  }
3792
3981
  };
3793
3982
 
3794
- // src/commands/canvas/commands/locale.ts
3795
- import yargs9 from "yargs";
3983
+ // src/commands/canvas/commands/entryPattern.ts
3984
+ import yargs10 from "yargs";
3985
+
3986
+ // src/commands/canvas/commands/entryPattern/get.ts
3987
+ import { ContentClient as ContentClient16 } from "@uniformdev/canvas";
3988
+ var EntryPatternGetModule = {
3989
+ command: "get <id>",
3990
+ describe: "Get an entry pattern",
3991
+ builder: (yargs33) => withConfiguration(
3992
+ withFormatOptions(
3993
+ withApiOptions(
3994
+ withProjectOptions(
3995
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3996
+ yargs33.positional("id", {
3997
+ demandOption: true,
3998
+ describe: "Entry pattern public ID to fetch"
3999
+ })
4000
+ )
4001
+ )
4002
+ )
4003
+ ),
4004
+ handler: async ({ apiHost, apiKey, proxy, id, format, filename, project: projectId }) => {
4005
+ const fetch3 = nodeFetchProxy(proxy);
4006
+ const client = new ContentClient16({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
4007
+ const res = await client.getEntries({
4008
+ offset: 0,
4009
+ limit: 1,
4010
+ entryIDs: [id],
4011
+ skipOverridesResolution: true,
4012
+ skipPatternResolution: true,
4013
+ skipDataResolution: true,
4014
+ pattern: true
4015
+ });
4016
+ if (res.entries.length !== 1) {
4017
+ throw new Error(`Entry pattern with ID ${id} not found`);
4018
+ }
4019
+ emitWithFormat(res.entries[0], format, filename);
4020
+ }
4021
+ };
4022
+
4023
+ // src/commands/canvas/commands/entryPattern/list.ts
4024
+ import { ContentClient as ContentClient17 } from "@uniformdev/canvas";
4025
+ var EntryPatternListModule = {
4026
+ command: "list",
4027
+ describe: "List entry patterns",
4028
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
4029
+ handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4030
+ const fetch3 = nodeFetchProxy(proxy);
4031
+ const client = new ContentClient17({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
4032
+ const res = await client.getEntries({
4033
+ offset: 0,
4034
+ limit: 1e3,
4035
+ skipOverridesResolution: true,
4036
+ skipPatternResolution: true,
4037
+ skipDataResolution: true,
4038
+ pattern: true
4039
+ });
4040
+ emitWithFormat(res.entries, format, filename);
4041
+ }
4042
+ };
4043
+
4044
+ // src/commands/canvas/commands/entryPattern/publish.ts
4045
+ import { ContentClient as ContentClient18 } from "@uniformdev/canvas";
4046
+ var EntryPatternPublishModule = {
4047
+ command: "publish [ids]",
4048
+ describe: "Publishes entry pattern(s)",
4049
+ builder: (yargs33) => withConfiguration(
4050
+ withApiOptions(
4051
+ withProjectOptions(
4052
+ withDiffOptions(
4053
+ yargs33.positional("ids", {
4054
+ describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4055
+ type: "string"
4056
+ }).option("all", {
4057
+ alias: ["a"],
4058
+ describe: "Publishes all entry patterns. Use --ids to publish selected entry patterns instead.",
4059
+ default: false,
4060
+ type: "boolean"
4061
+ }).option("what-if", {
4062
+ alias: ["w"],
4063
+ describe: "What-if mode reports what would be done but does not perform any publishing",
4064
+ default: false,
4065
+ type: "boolean"
4066
+ })
4067
+ )
4068
+ )
4069
+ )
4070
+ ),
4071
+ handler: async ({ apiHost, apiKey, proxy, ids, all, whatIf, project: projectId }) => {
4072
+ if (!all && !ids || all && ids) {
4073
+ console.error(`Specify --all or entry pattern ID(s) to publish.`);
4074
+ process.exit(1);
4075
+ }
4076
+ const entryIDsArray = ids ? ids.split(",").map((id) => id.trim()) : void 0;
4077
+ const fetch3 = nodeFetchProxy(proxy);
4078
+ const client = new ContentClient18({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
4079
+ const source = createEntryEngineDataSource({
4080
+ client,
4081
+ state: "preview",
4082
+ entryIDs: entryIDsArray,
4083
+ onlyPatterns: true
4084
+ });
4085
+ const target = createEntryEngineDataSource({
4086
+ client,
4087
+ state: "published",
4088
+ entryIDs: entryIDsArray,
4089
+ onlyPatterns: true
4090
+ });
4091
+ await syncEngine({
4092
+ source,
4093
+ target,
4094
+ // Publishing is one-direction operation, so no need to support automatic un-publishing
4095
+ mode: "createOrUpdate",
4096
+ whatIf,
4097
+ log: createPublishStatusSyncEngineConsoleLogger({ status: "publish" })
4098
+ });
4099
+ }
4100
+ };
4101
+
4102
+ // src/commands/canvas/commands/entryPattern/pull.ts
4103
+ import { ContentClient as ContentClient19 } from "@uniformdev/canvas";
4104
+ import { UncachedFileClient as UncachedFileClient7 } from "@uniformdev/files";
4105
+ var EntryPatternPullModule = {
4106
+ command: "pull <directory>",
4107
+ describe: "Pulls all entry patterns to local files in a directory",
4108
+ builder: (yargs33) => withConfiguration(
4109
+ withApiOptions(
4110
+ withProjectOptions(
4111
+ withStateOptions(
4112
+ withDiffOptions(
4113
+ yargs33.positional("directory", {
4114
+ 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.",
4115
+ type: "string"
4116
+ }).option("format", {
4117
+ alias: ["f"],
4118
+ describe: "Output format",
4119
+ default: "yaml",
4120
+ choices: ["yaml", "json"],
4121
+ type: "string"
4122
+ }).option("what-if", {
4123
+ alias: ["w"],
4124
+ describe: "What-if mode reports what would be done but changes no files",
4125
+ default: false,
4126
+ type: "boolean"
4127
+ }).option("mode", {
4128
+ alias: ["m"],
4129
+ 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',
4130
+ choices: ["create", "createOrUpdate", "mirror"],
4131
+ default: "mirror",
4132
+ type: "string"
4133
+ })
4134
+ )
4135
+ )
4136
+ )
4137
+ )
4138
+ ),
4139
+ handler: async ({
4140
+ apiHost,
4141
+ apiKey,
4142
+ proxy,
4143
+ directory,
4144
+ format,
4145
+ mode,
4146
+ whatIf,
4147
+ state,
4148
+ project: projectId,
4149
+ diff: diffMode,
4150
+ allowEmptySource
4151
+ }) => {
4152
+ const fetch3 = nodeFetchProxy(proxy);
4153
+ const client = new ContentClient19({
4154
+ apiKey,
4155
+ apiHost,
4156
+ fetch: fetch3,
4157
+ projectId,
4158
+ bypassCache: true
4159
+ });
4160
+ const fileClient = new UncachedFileClient7({ apiKey, apiHost, fetch: fetch3, projectId });
4161
+ const source = createEntryEngineDataSource({ client, state, onlyPatterns: true });
4162
+ let target;
4163
+ const isPackage = isPathAPackageFile(directory);
4164
+ if (isPackage) {
4165
+ const packageContents = readCanvasPackage(directory, false);
4166
+ target = await createArraySyncEngineDataSource({
4167
+ objects: packageContents.entries ?? [],
4168
+ selectIdentifier: selectEntryIdentifier,
4169
+ selectDisplayName: selectEntryDisplayName,
4170
+ onSyncComplete: async (_, synced) => {
4171
+ packageContents.entries = synced;
4172
+ writeCanvasPackage(directory, packageContents);
4173
+ }
4174
+ });
4175
+ } else {
4176
+ target = await createFileSyncEngineDataSource({
4177
+ directory,
4178
+ selectIdentifier: selectEntryIdentifier,
4179
+ selectDisplayName: selectEntryDisplayName,
4180
+ format
4181
+ });
4182
+ }
4183
+ await syncEngine({
4184
+ source,
4185
+ target,
4186
+ mode,
4187
+ whatIf,
4188
+ allowEmptySource: allowEmptySource ?? true,
4189
+ log: createSyncEngineConsoleLogger({ diffMode }),
4190
+ onBeforeCompareObjects: async (sourceObject, targetObject) => {
4191
+ return replaceRemoteUrlsWithLocalReferences(sourceObject, targetObject, {
4192
+ directory,
4193
+ fileClient
4194
+ });
4195
+ },
4196
+ onBeforeWriteObject: async (sourceObject) => {
4197
+ return extractAndDownloadUniformFilesForObject(sourceObject, {
4198
+ directory,
4199
+ fileClient
4200
+ });
4201
+ }
4202
+ });
4203
+ }
4204
+ };
4205
+
4206
+ // src/commands/canvas/commands/entryPattern/push.ts
4207
+ import { ContentClient as ContentClient20 } from "@uniformdev/canvas";
4208
+ import { UncachedFileClient as UncachedFileClient8 } from "@uniformdev/files";
4209
+ var EntryPatternPushModule = {
4210
+ command: "push <directory>",
4211
+ describe: "Pushes all entry patterns from files in a directory to Uniform",
4212
+ builder: (yargs33) => withConfiguration(
4213
+ withApiOptions(
4214
+ withProjectOptions(
4215
+ withStateOptions(
4216
+ withDiffOptions(
4217
+ yargs33.positional("directory", {
4218
+ describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
4219
+ type: "string"
4220
+ }).option("what-if", {
4221
+ alias: ["w"],
4222
+ describe: "What-if mode reports what would be done but changes nothing",
4223
+ default: false,
4224
+ type: "boolean"
4225
+ }).option("mode", {
4226
+ alias: ["m"],
4227
+ 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',
4228
+ choices: ["create", "createOrUpdate", "mirror"],
4229
+ default: "mirror",
4230
+ type: "string"
4231
+ })
4232
+ )
4233
+ )
4234
+ )
4235
+ )
4236
+ ),
4237
+ handler: async ({
4238
+ apiHost,
4239
+ apiKey,
4240
+ proxy,
4241
+ directory,
4242
+ mode,
4243
+ whatIf,
4244
+ state,
4245
+ project: projectId,
4246
+ diff: diffMode,
4247
+ allowEmptySource
4248
+ }) => {
4249
+ const fetch3 = nodeFetchProxy(proxy);
4250
+ const client = new ContentClient20({
4251
+ apiKey,
4252
+ apiHost,
4253
+ fetch: fetch3,
4254
+ projectId,
4255
+ bypassCache: true
4256
+ });
4257
+ let source;
4258
+ const isPackage = isPathAPackageFile(directory);
4259
+ if (isPackage) {
4260
+ const packageContents = readCanvasPackage(directory, true);
4261
+ source = await createArraySyncEngineDataSource({
4262
+ objects: packageContents.entries ?? [],
4263
+ selectIdentifier: selectEntryIdentifier,
4264
+ selectDisplayName: selectEntryDisplayName
4265
+ });
4266
+ } else {
4267
+ source = await createFileSyncEngineDataSource({
4268
+ directory,
4269
+ selectIdentifier: selectEntryIdentifier,
4270
+ selectDisplayName: selectEntryDisplayName
4271
+ });
4272
+ }
4273
+ const target = createEntryEngineDataSource({ client, state, onlyPatterns: true });
4274
+ const fileClient = new UncachedFileClient8({ apiKey, apiHost, fetch: fetch3, projectId });
4275
+ await syncEngine({
4276
+ source,
4277
+ target,
4278
+ mode,
4279
+ whatIf,
4280
+ allowEmptySource,
4281
+ log: createSyncEngineConsoleLogger({ diffMode }),
4282
+ onBeforeCompareObjects: async (sourceObject) => {
4283
+ return swapOutUniformFileUrlsForTargetProject(sourceObject, {
4284
+ fileClient
4285
+ });
4286
+ },
4287
+ onBeforeWriteObject: async (sourceObject) => {
4288
+ return extractAndUploadUniformFilesForObject(sourceObject, {
4289
+ directory,
4290
+ fileClient
4291
+ });
4292
+ }
4293
+ });
4294
+ }
4295
+ };
4296
+
4297
+ // src/commands/canvas/commands/entryPattern/remove.ts
4298
+ import { ContentClient as ContentClient21 } from "@uniformdev/canvas";
4299
+ var EntryPatternRemoveModule = {
4300
+ command: "remove <id>",
4301
+ aliases: ["delete", "rm"],
4302
+ describe: "Delete an entry pattern",
4303
+ builder: (yargs33) => withConfiguration(
4304
+ withApiOptions(
4305
+ withProjectOptions(
4306
+ yargs33.positional("id", { demandOption: true, describe: "Entry pattern public ID to delete" })
4307
+ )
4308
+ )
4309
+ ),
4310
+ handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
4311
+ const fetch3 = nodeFetchProxy(proxy);
4312
+ const client = new ContentClient21({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
4313
+ await client.deleteEntry({ entryId: id });
4314
+ }
4315
+ };
4316
+
4317
+ // src/commands/canvas/commands/entryPattern/unpublish.ts
4318
+ import { CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE4, ContentClient as ContentClient22 } from "@uniformdev/canvas";
4319
+ import { diffJson as diffJson4 } from "diff";
4320
+ var EntryPatternUnpublishModule = {
4321
+ command: "unpublish [ids]",
4322
+ describe: "Unpublish an entry patterns",
4323
+ builder: (yargs33) => withConfiguration(
4324
+ withApiOptions(
4325
+ withProjectOptions(
4326
+ yargs33.positional("ids", {
4327
+ describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4328
+ type: "string"
4329
+ }).option("all", {
4330
+ alias: ["a"],
4331
+ describe: "Un-publishes all entry patterns. Use --all to un-publish selected entry patterns instead.",
4332
+ default: false,
4333
+ type: "boolean"
4334
+ }).option("what-if", {
4335
+ alias: ["w"],
4336
+ describe: "What-if mode reports what would be done but does not perform any un-publishing",
4337
+ default: false,
4338
+ type: "boolean"
4339
+ })
4340
+ )
4341
+ )
4342
+ ),
4343
+ handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf }) => {
4344
+ if (!all && !ids || all && ids) {
4345
+ console.error(`Specify --all or entry pattern ID(s) to publish.`);
4346
+ process.exit(1);
4347
+ }
4348
+ const entryIDsArray = ids ? ids.split(",").map((id) => id.trim()) : void 0;
4349
+ const targetItems = /* @__PURE__ */ new Map();
4350
+ const fetch3 = nodeFetchProxy(proxy);
4351
+ const client = new ContentClient22({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
4352
+ const source = createEntryEngineDataSource({
4353
+ client,
4354
+ state: "published",
4355
+ entryIDs: entryIDsArray,
4356
+ onlyPatterns: true
4357
+ });
4358
+ const target = createEntryEngineDataSource({
4359
+ client,
4360
+ state: "preview",
4361
+ entryIDs: entryIDsArray,
4362
+ onlyPatterns: true
4363
+ });
4364
+ const actions = [];
4365
+ const log = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
4366
+ for await (const obj of target.objects) {
4367
+ if (Array.isArray(obj.id)) {
4368
+ obj.id.forEach((o) => targetItems.set(o, obj));
4369
+ } else {
4370
+ targetItems.set(obj.id, obj);
4371
+ }
4372
+ }
4373
+ for await (const sourceObject of source.objects) {
4374
+ const id = Array.isArray(sourceObject.id) ? sourceObject.id[0] : sourceObject.id;
4375
+ const targetObject = targetItems.get(id);
4376
+ if (!targetObject) {
4377
+ console.log(`Entry pattern ${id} was not found`);
4378
+ return;
4379
+ }
4380
+ actions.push(client.deleteEntry({ entryId: id, state: CANVAS_PUBLISHED_STATE4 }));
4381
+ log({
4382
+ action: "update",
4383
+ id,
4384
+ providerId: sourceObject.providerId,
4385
+ displayName: sourceObject.displayName ?? sourceObject.providerId,
4386
+ whatIf,
4387
+ diff: diffJson4(targetObject.object, sourceObject.object)
4388
+ });
4389
+ }
4390
+ }
4391
+ };
4392
+
4393
+ // src/commands/canvas/commands/entryPattern/update.ts
4394
+ import { ContentClient as ContentClient23 } from "@uniformdev/canvas";
4395
+ var EntryPatternUpdateModule = {
4396
+ command: "update <filename>",
4397
+ aliases: ["put"],
4398
+ describe: "Insert or update an entry pattern",
4399
+ builder: (yargs33) => withConfiguration(
4400
+ withApiOptions(
4401
+ withProjectOptions(
4402
+ yargs33.positional("filename", { demandOption: true, describe: "Entry pattern file to put" })
4403
+ )
4404
+ )
4405
+ ),
4406
+ handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
4407
+ const fetch3 = nodeFetchProxy(proxy);
4408
+ const client = new ContentClient23({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
4409
+ const file = readFileToObject(filename);
4410
+ await client.upsertEntry(file);
4411
+ }
4412
+ };
4413
+
4414
+ // src/commands/canvas/commands/entryPattern.ts
4415
+ var EntryPatternModule = {
4416
+ command: "entry-pattern <command>",
4417
+ describe: "Commands for Entry patterns",
4418
+ builder: (yargs33) => yargs33.command(EntryPatternGetModule).command(EntryPatternListModule).command(EntryPatternRemoveModule).command(EntryPatternUpdateModule).command(EntryPatternPullModule).command(EntryPatternPushModule).command(EntryPatternPublishModule).command(EntryPatternUnpublishModule).demandCommand(),
4419
+ handler: () => {
4420
+ yargs10.help();
4421
+ }
4422
+ };
4423
+
4424
+ // src/commands/canvas/commands/locale.ts
4425
+ import yargs11 from "yargs";
3796
4426
 
3797
4427
  // src/commands/canvas/commands/locale/pull.ts
3798
4428
  import { LocaleClient } from "@uniformdev/canvas";
@@ -3830,11 +4460,11 @@ function createLocaleEngineDataSource({
3830
4460
  var LocalePullModule = {
3831
4461
  command: "pull <directory>",
3832
4462
  describe: "Pulls all locales to local files in a directory",
3833
- builder: (yargs32) => withConfiguration(
4463
+ builder: (yargs33) => withConfiguration(
3834
4464
  withApiOptions(
3835
4465
  withProjectOptions(
3836
4466
  withDiffOptions(
3837
- yargs32.positional("directory", {
4467
+ yargs33.positional("directory", {
3838
4468
  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.",
3839
4469
  type: "string"
3840
4470
  }).option("format", {
@@ -3917,11 +4547,11 @@ import { LocaleClient as LocaleClient2 } from "@uniformdev/canvas";
3917
4547
  var LocalePushModule = {
3918
4548
  command: "push <directory>",
3919
4549
  describe: "Pushes all locales from files in a directory to Uniform",
3920
- builder: (yargs32) => withConfiguration(
4550
+ builder: (yargs33) => withConfiguration(
3921
4551
  withApiOptions(
3922
4552
  withProjectOptions(
3923
4553
  withDiffOptions(
3924
- yargs32.positional("directory", {
4554
+ yargs33.positional("directory", {
3925
4555
  describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
3926
4556
  type: "string"
3927
4557
  }).option("what-if", {
@@ -3991,258 +4621,26 @@ var LocalePushModule = {
3991
4621
  var LocaleModule = {
3992
4622
  command: "locale <command>",
3993
4623
  describe: "Commands for locale definitions",
3994
- builder: (yargs32) => yargs32.command(LocalePullModule).command(LocalePushModule),
4624
+ builder: (yargs33) => yargs33.command(LocalePullModule).command(LocalePushModule),
3995
4625
  handler: () => {
3996
- yargs9.help();
3997
- }
3998
- };
3999
-
4000
- // src/commands/canvas/commands/pattern.ts
4001
- import yargs10 from "yargs";
4002
-
4003
- // src/commands/canvas/commands/pattern/get.ts
4004
- var PatternGetModule = {
4005
- ...CompositionGetModule,
4006
- describe: "Fetch a pattern"
4007
- };
4008
-
4009
- // src/commands/canvas/commands/pattern/list.ts
4010
- var PatternListModule = {
4011
- ...CompositionListModule,
4012
- describe: "List patterns",
4013
- builder: (yargs32) => withFormatOptions(
4014
- withConfiguration(
4015
- withApiOptions(
4016
- withProjectOptions(
4017
- withStateOptions(
4018
- yargs32.options({
4019
- offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
4020
- limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
4021
- resolvePatterns: {
4022
- type: "boolean",
4023
- default: false,
4024
- describe: "Resolve pattern references in the composition"
4025
- },
4026
- resolveOverrides: {
4027
- type: "boolean",
4028
- default: false,
4029
- describe: "Resolves pattern overrides in the composition and removes override definition data"
4030
- },
4031
- onlyPatterns: {
4032
- describe: "Only pulling patterns and not compositions",
4033
- // This default differentiate this list command from composition list command
4034
- default: true,
4035
- type: "boolean",
4036
- hidden: true
4037
- },
4038
- componentIDs: {
4039
- alias: ["componentIDs"],
4040
- type: "boolean",
4041
- default: false,
4042
- describe: "Include individual component UIDs"
4043
- }
4044
- })
4045
- )
4046
- )
4047
- )
4048
- )
4049
- )
4050
- };
4051
-
4052
- // src/commands/canvas/commands/pattern/publish.ts
4053
- var PatternPublishModule = {
4054
- ...CompositionPublishModule,
4055
- describe: "Publishes pattern(s)",
4056
- builder: (yargs32) => withConfiguration(
4057
- withApiOptions(
4058
- withProjectOptions(
4059
- withDiffOptions(
4060
- yargs32.positional("ids", {
4061
- describe: "Publishes pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4062
- type: "string"
4063
- }).option("all", {
4064
- alias: ["a"],
4065
- describe: "Publishes all patterns. Use compositionId to publish one instead.",
4066
- default: false,
4067
- type: "boolean"
4068
- }).option("what-if", {
4069
- alias: ["w"],
4070
- describe: "What-if mode reports what would be done but does not perform any un-publishing",
4071
- default: false,
4072
- type: "boolean"
4073
- }).option("publishingState", {
4074
- describe: 'Publishing state to update to. Can be "published" or "preview".',
4075
- default: "published",
4076
- type: "string",
4077
- hidden: true
4078
- }).option("onlyCompositions", {
4079
- describe: "Only publishing compositions and not patterns",
4080
- default: false,
4081
- type: "boolean"
4082
- }).option("onlyPatterns", {
4083
- describe: "Only pulling patterns and not compositions",
4084
- default: true,
4085
- type: "boolean",
4086
- hidden: true
4087
- })
4088
- )
4089
- )
4090
- )
4091
- )
4092
- };
4093
-
4094
- // src/commands/canvas/commands/pattern/pull.ts
4095
- var PatternPullModule = {
4096
- ...CompositionPullModule,
4097
- describe: "Pulls all patterns to local files in a directory",
4098
- builder: (yargs32) => withConfiguration(
4099
- withApiOptions(
4100
- withProjectOptions(
4101
- withStateOptions(
4102
- withDiffOptions(
4103
- yargs32.positional("directory", {
4104
- 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.",
4105
- type: "string"
4106
- }).option("format", {
4107
- alias: ["f"],
4108
- describe: "Output format",
4109
- default: "yaml",
4110
- choices: ["yaml", "json"],
4111
- type: "string"
4112
- }).option("onlyPatterns", {
4113
- describe: "Only pulling patterns and not compositions",
4114
- // This default differentiate this list command from composition list command
4115
- default: true,
4116
- type: "boolean",
4117
- hidden: true
4118
- }).option("what-if", {
4119
- alias: ["w"],
4120
- describe: "What-if mode reports what would be done but changes no files",
4121
- default: false,
4122
- type: "boolean"
4123
- }).option("mode", {
4124
- alias: ["m"],
4125
- 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',
4126
- choices: ["create", "createOrUpdate", "mirror"],
4127
- default: "mirror",
4128
- type: "string"
4129
- })
4130
- )
4131
- )
4132
- )
4133
- )
4134
- )
4135
- };
4136
-
4137
- // src/commands/canvas/commands/pattern/push.ts
4138
- var PatternPushModule = {
4139
- ...CompositionPushModule,
4140
- describe: "Pushes all patterns from files in a directory to Uniform Canvas",
4141
- builder: (yargs32) => withConfiguration(
4142
- withApiOptions(
4143
- withProjectOptions(
4144
- withStateOptions(
4145
- withDiffOptions(
4146
- yargs32.positional("directory", {
4147
- describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
4148
- type: "string"
4149
- }).option("what-if", {
4150
- alias: ["w"],
4151
- describe: "What-if mode reports what would be done but changes nothing",
4152
- default: false,
4153
- type: "boolean"
4154
- }).option("mode", {
4155
- alias: ["m"],
4156
- 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',
4157
- choices: ["create", "createOrUpdate", "mirror"],
4158
- default: "mirror",
4159
- type: "string"
4160
- }).option("onlyPatterns", {
4161
- describe: "Only pulling patterns and not compositions",
4162
- // This default differentiate this list command from composition list command
4163
- default: true,
4164
- type: "boolean",
4165
- hidden: true
4166
- })
4167
- )
4168
- )
4169
- )
4170
- )
4171
- )
4172
- };
4173
-
4174
- // src/commands/canvas/commands/pattern/remove.ts
4175
- var PatternRemoveModule = {
4176
- ...CompositionRemoveModule,
4177
- describe: "Delete a pattern"
4178
- };
4179
-
4180
- // src/commands/canvas/commands/pattern/unpublish.ts
4181
- var PatternUnpublishModule = {
4182
- command: "unpublish [ids]",
4183
- describe: "Unpublish a pattern(s)",
4184
- builder: (yargs32) => withConfiguration(
4185
- withApiOptions(
4186
- withProjectOptions(
4187
- yargs32.positional("ids", {
4188
- describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4189
- type: "string"
4190
- }).option("all", {
4191
- alias: ["a"],
4192
- describe: "Un-pPublishes all compositions. Use compositionId to publish one instead.",
4193
- default: false,
4194
- type: "boolean"
4195
- }).option("what-if", {
4196
- alias: ["w"],
4197
- describe: "What-if mode reports what would be done but does not perform any publishing",
4198
- default: false,
4199
- type: "boolean"
4200
- }).option("onlyCompositions", {
4201
- describe: "Only publishing compositions and not patterns",
4202
- default: false,
4203
- type: "boolean"
4204
- }).option("onlyPatterns", {
4205
- describe: "Only pulling patterns and not compositions",
4206
- default: true,
4207
- type: "boolean",
4208
- hidden: true
4209
- })
4210
- )
4211
- )
4212
- ),
4213
- handler: CompositionUnpublishModule.handler
4214
- };
4215
-
4216
- // src/commands/canvas/commands/pattern/update.ts
4217
- var PatternUpdateModule = {
4218
- ...CompositionUpdateModule,
4219
- describe: "Insert or update a pattern"
4220
- };
4221
-
4222
- // src/commands/canvas/commands/pattern.ts
4223
- var PatternModule = {
4224
- command: "pattern <command>",
4225
- describe: "Commands for Canvas patterns",
4226
- builder: (yargs32) => yargs32.command(PatternPullModule).command(PatternPushModule).command(PatternGetModule).command(PatternRemoveModule).command(PatternListModule).command(PatternUpdateModule).command(PatternPublishModule).command(PatternUnpublishModule).demandCommand(),
4227
- handler: () => {
4228
- yargs10.help();
4626
+ yargs11.help();
4229
4627
  }
4230
4628
  };
4231
4629
 
4232
4630
  // src/commands/canvas/commands/prompts.ts
4233
- import yargs11 from "yargs";
4631
+ import yargs12 from "yargs";
4234
4632
 
4235
4633
  // src/commands/canvas/commands/prompts/get.ts
4236
4634
  import { PromptClient } from "@uniformdev/canvas";
4237
4635
  var PromptGetModule = {
4238
4636
  command: "get <id>",
4239
4637
  describe: "Get a prompt",
4240
- builder: (yargs32) => withConfiguration(
4638
+ builder: (yargs33) => withConfiguration(
4241
4639
  withFormatOptions(
4242
4640
  withApiOptions(
4243
4641
  withProjectOptions(
4244
4642
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4245
- yargs32.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
4643
+ yargs33.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
4246
4644
  )
4247
4645
  )
4248
4646
  )
@@ -4263,7 +4661,7 @@ import { PromptClient as PromptClient2 } from "@uniformdev/canvas";
4263
4661
  var PromptListModule = {
4264
4662
  command: "list",
4265
4663
  describe: "List prompts",
4266
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
4664
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
4267
4665
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4268
4666
  const fetch3 = nodeFetchProxy(proxy);
4269
4667
  const client = new PromptClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -4310,12 +4708,12 @@ function createPromptEngineDataSource({
4310
4708
  var PromptPullModule = {
4311
4709
  command: "pull <directory>",
4312
4710
  describe: "Pulls all prompts to local files in a directory",
4313
- builder: (yargs32) => withConfiguration(
4711
+ builder: (yargs33) => withConfiguration(
4314
4712
  withApiOptions(
4315
4713
  withProjectOptions(
4316
4714
  withStateOptions(
4317
4715
  withDiffOptions(
4318
- yargs32.positional("directory", {
4716
+ yargs33.positional("directory", {
4319
4717
  describe: "Directory to save the prompts to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
4320
4718
  type: "string"
4321
4719
  }).option("format", {
@@ -4399,12 +4797,12 @@ import { PromptClient as PromptClient4 } from "@uniformdev/canvas";
4399
4797
  var PromptPushModule = {
4400
4798
  command: "push <directory>",
4401
4799
  describe: "Pushes all prompts from files in a directory to Uniform",
4402
- builder: (yargs32) => withConfiguration(
4800
+ builder: (yargs33) => withConfiguration(
4403
4801
  withApiOptions(
4404
4802
  withProjectOptions(
4405
4803
  withStateOptions(
4406
4804
  withDiffOptions(
4407
- yargs32.positional("directory", {
4805
+ yargs33.positional("directory", {
4408
4806
  describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
4409
4807
  type: "string"
4410
4808
  }).option("what-if", {
@@ -4477,9 +4875,9 @@ var PromptRemoveModule = {
4477
4875
  command: "remove <id>",
4478
4876
  aliases: ["delete", "rm"],
4479
4877
  describe: "Delete a prompt",
4480
- builder: (yargs32) => withConfiguration(
4878
+ builder: (yargs33) => withConfiguration(
4481
4879
  withApiOptions(
4482
- withProjectOptions(yargs32.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
4880
+ withProjectOptions(yargs33.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
4483
4881
  )
4484
4882
  ),
4485
4883
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -4495,10 +4893,10 @@ var PromptUpdateModule = {
4495
4893
  command: "update <filename>",
4496
4894
  aliases: ["put"],
4497
4895
  describe: "Insert or update a prompt",
4498
- builder: (yargs32) => withConfiguration(
4896
+ builder: (yargs33) => withConfiguration(
4499
4897
  withApiOptions(
4500
4898
  withProjectOptions(
4501
- yargs32.positional("filename", { demandOption: true, describe: "Prompt file to put" })
4899
+ yargs33.positional("filename", { demandOption: true, describe: "Prompt file to put" })
4502
4900
  )
4503
4901
  )
4504
4902
  ),
@@ -4515,9 +4913,9 @@ var PromptModule = {
4515
4913
  command: "prompt <command>",
4516
4914
  aliases: ["dt"],
4517
4915
  describe: "Commands for AI Prompt definitions",
4518
- builder: (yargs32) => yargs32.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
4916
+ builder: (yargs33) => yargs33.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
4519
4917
  handler: () => {
4520
- yargs11.help();
4918
+ yargs12.help();
4521
4919
  }
4522
4920
  };
4523
4921
 
@@ -4526,28 +4924,28 @@ var CanvasCommand = {
4526
4924
  command: "canvas <command>",
4527
4925
  aliases: ["cv", "pm", "presentation"],
4528
4926
  describe: "Uniform Canvas commands",
4529
- builder: (yargs32) => yargs32.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(DataSourceModule).command(CategoryModule).command(PatternModule).command(ContentTypeModule).command(EntryModule).command(PromptModule).command(AssetModule).command(LocaleModule).demandCommand(),
4927
+ builder: (yargs33) => yargs33.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(DataSourceModule).command(CategoryModule).command(ComponentPatternModule).command(ContentTypeModule).command(EntryModule).command(EntryPatternModule).command(PromptModule).command(AssetModule).command(LocaleModule).demandCommand(),
4530
4928
  handler: () => {
4531
- yargs12.showHelp();
4929
+ yargs13.showHelp();
4532
4930
  }
4533
4931
  };
4534
4932
 
4535
4933
  // src/commands/context/index.ts
4536
- import yargs19 from "yargs";
4934
+ import yargs20 from "yargs";
4537
4935
 
4538
4936
  // src/commands/context/commands/aggregate.ts
4539
- import yargs13 from "yargs";
4937
+ import yargs14 from "yargs";
4540
4938
 
4541
4939
  // src/commands/context/commands/aggregate/get.ts
4542
4940
  import { UncachedAggregateClient } from "@uniformdev/context/api";
4543
4941
  var AggregateGetModule = {
4544
4942
  command: "get <id>",
4545
4943
  describe: "Fetch an aggregate",
4546
- builder: (yargs32) => withConfiguration(
4944
+ builder: (yargs33) => withConfiguration(
4547
4945
  withFormatOptions(
4548
4946
  withApiOptions(
4549
4947
  withProjectOptions(
4550
- yargs32.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
4948
+ yargs33.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
4551
4949
  )
4552
4950
  )
4553
4951
  )
@@ -4571,7 +4969,7 @@ var AggregateListModule = {
4571
4969
  command: "list",
4572
4970
  describe: "List aggregates",
4573
4971
  aliases: ["ls"],
4574
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
4972
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
4575
4973
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4576
4974
  const fetch3 = nodeFetchProxy(proxy);
4577
4975
  const client = new UncachedAggregateClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -4637,11 +5035,11 @@ function writeContextPackage(filename, packageContents) {
4637
5035
  var AggregatePullModule = {
4638
5036
  command: "pull <directory>",
4639
5037
  describe: "Pulls all aggregates to local files in a directory",
4640
- builder: (yargs32) => withConfiguration(
5038
+ builder: (yargs33) => withConfiguration(
4641
5039
  withApiOptions(
4642
5040
  withProjectOptions(
4643
5041
  withDiffOptions(
4644
- yargs32.positional("directory", {
5042
+ yargs33.positional("directory", {
4645
5043
  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.",
4646
5044
  type: "string"
4647
5045
  }).option("format", {
@@ -4718,11 +5116,11 @@ import { UncachedAggregateClient as UncachedAggregateClient4 } from "@uniformdev
4718
5116
  var AggregatePushModule = {
4719
5117
  command: "push <directory>",
4720
5118
  describe: "Pushes all aggregates from files in a directory or package to Uniform",
4721
- builder: (yargs32) => withConfiguration(
5119
+ builder: (yargs33) => withConfiguration(
4722
5120
  withApiOptions(
4723
5121
  withProjectOptions(
4724
5122
  withDiffOptions(
4725
- yargs32.positional("directory", {
5123
+ yargs33.positional("directory", {
4726
5124
  describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
4727
5125
  type: "string"
4728
5126
  }).option("what-if", {
@@ -4789,10 +5187,10 @@ var AggregateRemoveModule = {
4789
5187
  command: "remove <id>",
4790
5188
  aliases: ["delete", "rm"],
4791
5189
  describe: "Delete an aggregate",
4792
- builder: (yargs32) => withConfiguration(
5190
+ builder: (yargs33) => withConfiguration(
4793
5191
  withApiOptions(
4794
5192
  withProjectOptions(
4795
- yargs32.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
5193
+ yargs33.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
4796
5194
  )
4797
5195
  )
4798
5196
  ),
@@ -4809,10 +5207,10 @@ var AggregateUpdateModule = {
4809
5207
  command: "update <filename>",
4810
5208
  aliases: ["put"],
4811
5209
  describe: "Insert or update an aggregate",
4812
- builder: (yargs32) => withConfiguration(
5210
+ builder: (yargs33) => withConfiguration(
4813
5211
  withApiOptions(
4814
5212
  withProjectOptions(
4815
- yargs32.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
5213
+ yargs33.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
4816
5214
  )
4817
5215
  )
4818
5216
  ),
@@ -4829,25 +5227,25 @@ var AggregateModule = {
4829
5227
  command: "aggregate <command>",
4830
5228
  aliases: ["agg", "intent", "audience"],
4831
5229
  describe: "Commands for Context aggregates (intents, audiences)",
4832
- builder: (yargs32) => yargs32.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
5230
+ builder: (yargs33) => yargs33.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
4833
5231
  handler: () => {
4834
- yargs13.help();
5232
+ yargs14.help();
4835
5233
  }
4836
5234
  };
4837
5235
 
4838
5236
  // src/commands/context/commands/enrichment.ts
4839
- import yargs14 from "yargs";
5237
+ import yargs15 from "yargs";
4840
5238
 
4841
5239
  // src/commands/context/commands/enrichment/get.ts
4842
5240
  import { UncachedEnrichmentClient } from "@uniformdev/context/api";
4843
5241
  var EnrichmentGetModule = {
4844
5242
  command: "get <id>",
4845
5243
  describe: "Fetch an enrichment category and its values",
4846
- builder: (yargs32) => withFormatOptions(
5244
+ builder: (yargs33) => withFormatOptions(
4847
5245
  withConfiguration(
4848
5246
  withApiOptions(
4849
5247
  withProjectOptions(
4850
- yargs32.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
5248
+ yargs33.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
4851
5249
  )
4852
5250
  )
4853
5251
  )
@@ -4872,7 +5270,7 @@ var EnrichmentListModule = {
4872
5270
  command: "list",
4873
5271
  describe: "List enrichments",
4874
5272
  aliases: ["ls"],
4875
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
5273
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
4876
5274
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4877
5275
  const fetch3 = nodeFetchProxy(proxy);
4878
5276
  const client = new UncachedEnrichmentClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -4973,11 +5371,11 @@ var createEnrichmentValueEngineDataSource = ({
4973
5371
  var EnrichmentPullModule = {
4974
5372
  command: "pull <directory>",
4975
5373
  describe: "Pulls all enrichments to local files in a directory",
4976
- builder: (yargs32) => withConfiguration(
5374
+ builder: (yargs33) => withConfiguration(
4977
5375
  withApiOptions(
4978
5376
  withProjectOptions(
4979
5377
  withDiffOptions(
4980
- yargs32.positional("directory", {
5378
+ yargs33.positional("directory", {
4981
5379
  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.",
4982
5380
  type: "string"
4983
5381
  }).option("format", {
@@ -5054,11 +5452,11 @@ import { UncachedEnrichmentClient as UncachedEnrichmentClient4 } from "@uniformd
5054
5452
  var EnrichmentPushModule = {
5055
5453
  command: "push <directory>",
5056
5454
  describe: "Pushes all enrichments from files in a directory or package to Uniform",
5057
- builder: (yargs32) => withConfiguration(
5455
+ builder: (yargs33) => withConfiguration(
5058
5456
  withApiOptions(
5059
5457
  withProjectOptions(
5060
5458
  withDiffOptions(
5061
- yargs32.positional("directory", {
5459
+ yargs33.positional("directory", {
5062
5460
  describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
5063
5461
  type: "string"
5064
5462
  }).option("what-if", {
@@ -5124,10 +5522,10 @@ var EnrichmentRemoveModule = {
5124
5522
  command: "remove <id>",
5125
5523
  aliases: ["delete", "rm"],
5126
5524
  describe: "Delete an enrichment category and its values",
5127
- builder: (yargs32) => withConfiguration(
5525
+ builder: (yargs33) => withConfiguration(
5128
5526
  withApiOptions(
5129
5527
  withProjectOptions(
5130
- yargs32.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
5528
+ yargs33.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
5131
5529
  )
5132
5530
  )
5133
5531
  ),
@@ -5143,14 +5541,14 @@ var EnrichmentModule = {
5143
5541
  command: "enrichment <command>",
5144
5542
  aliases: ["enr"],
5145
5543
  describe: "Commands for Context enrichments",
5146
- builder: (yargs32) => yargs32.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
5544
+ builder: (yargs33) => yargs33.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
5147
5545
  handler: () => {
5148
- yargs14.help();
5546
+ yargs15.help();
5149
5547
  }
5150
5548
  };
5151
5549
 
5152
5550
  // src/commands/context/commands/manifest.ts
5153
- import yargs15 from "yargs";
5551
+ import yargs16 from "yargs";
5154
5552
 
5155
5553
  // src/commands/context/commands/manifest/get.ts
5156
5554
  import { ApiClientError, UncachedManifestClient } from "@uniformdev/context/api";
@@ -5161,10 +5559,10 @@ var ManifestGetModule = {
5161
5559
  command: "get [output]",
5162
5560
  aliases: ["dl", "download"],
5163
5561
  describe: "Download the Uniform Context manifest for a project",
5164
- builder: (yargs32) => withConfiguration(
5562
+ builder: (yargs33) => withConfiguration(
5165
5563
  withApiOptions(
5166
5564
  withProjectOptions(
5167
- yargs32.option("preview", {
5565
+ yargs33.option("preview", {
5168
5566
  describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
5169
5567
  default: false,
5170
5568
  type: "boolean",
@@ -5226,7 +5624,7 @@ import { exit as exit2 } from "process";
5226
5624
  var ManifestPublishModule = {
5227
5625
  command: "publish",
5228
5626
  describe: "Publish the Uniform Context manifest for a project",
5229
- builder: (yargs32) => withConfiguration(withApiOptions(withProjectOptions(yargs32))),
5627
+ builder: (yargs33) => withConfiguration(withApiOptions(withProjectOptions(yargs33))),
5230
5628
  handler: async ({ apiKey, apiHost, proxy, project }) => {
5231
5629
  const fetch3 = nodeFetchProxy(proxy);
5232
5630
  try {
@@ -5259,25 +5657,25 @@ var ManifestModule = {
5259
5657
  command: "manifest <command>",
5260
5658
  describe: "Commands for context manifests",
5261
5659
  aliases: ["man"],
5262
- builder: (yargs32) => yargs32.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
5660
+ builder: (yargs33) => yargs33.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
5263
5661
  handler: () => {
5264
- yargs15.help();
5662
+ yargs16.help();
5265
5663
  }
5266
5664
  };
5267
5665
 
5268
5666
  // src/commands/context/commands/quirk.ts
5269
- import yargs16 from "yargs";
5667
+ import yargs17 from "yargs";
5270
5668
 
5271
5669
  // src/commands/context/commands/quirk/get.ts
5272
5670
  import { UncachedQuirkClient } from "@uniformdev/context/api";
5273
5671
  var QuirkGetModule = {
5274
5672
  command: "get <id>",
5275
5673
  describe: "Fetch a quirk",
5276
- builder: (yargs32) => withConfiguration(
5674
+ builder: (yargs33) => withConfiguration(
5277
5675
  withFormatOptions(
5278
5676
  withApiOptions(
5279
5677
  withProjectOptions(
5280
- yargs32.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
5678
+ yargs33.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
5281
5679
  )
5282
5680
  )
5283
5681
  )
@@ -5301,11 +5699,11 @@ var QuirkListModule = {
5301
5699
  command: "list",
5302
5700
  describe: "List quirks",
5303
5701
  aliases: ["ls"],
5304
- builder: (yargs32) => withConfiguration(
5702
+ builder: (yargs33) => withConfiguration(
5305
5703
  withFormatOptions(
5306
5704
  withApiOptions(
5307
5705
  withProjectOptions(
5308
- yargs32.option("withIntegrations", {
5706
+ yargs33.option("withIntegrations", {
5309
5707
  alias: ["i"],
5310
5708
  describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
5311
5709
  type: "boolean"
@@ -5362,11 +5760,11 @@ function createQuirkEngineDataSource({
5362
5760
  var QuirkPullModule = {
5363
5761
  command: "pull <directory>",
5364
5762
  describe: "Pulls all quirks to local files in a directory",
5365
- builder: (yargs32) => withConfiguration(
5763
+ builder: (yargs33) => withConfiguration(
5366
5764
  withApiOptions(
5367
5765
  withProjectOptions(
5368
5766
  withDiffOptions(
5369
- yargs32.positional("directory", {
5767
+ yargs33.positional("directory", {
5370
5768
  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.",
5371
5769
  type: "string"
5372
5770
  }).option("format", {
@@ -5443,11 +5841,11 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
5443
5841
  var QuirkPushModule = {
5444
5842
  command: "push <directory>",
5445
5843
  describe: "Pushes all quirks from files in a directory or package to Uniform",
5446
- builder: (yargs32) => withConfiguration(
5844
+ builder: (yargs33) => withConfiguration(
5447
5845
  withApiOptions(
5448
5846
  withProjectOptions(
5449
5847
  withDiffOptions(
5450
- yargs32.positional("directory", {
5848
+ yargs33.positional("directory", {
5451
5849
  describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
5452
5850
  type: "string"
5453
5851
  }).option("what-if", {
@@ -5513,10 +5911,10 @@ var QuirkRemoveModule = {
5513
5911
  command: "remove <id>",
5514
5912
  aliases: ["delete", "rm"],
5515
5913
  describe: "Delete a quirk",
5516
- builder: (yargs32) => withConfiguration(
5914
+ builder: (yargs33) => withConfiguration(
5517
5915
  withApiOptions(
5518
5916
  withProjectOptions(
5519
- yargs32.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
5917
+ yargs33.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
5520
5918
  )
5521
5919
  )
5522
5920
  ),
@@ -5533,10 +5931,10 @@ var QuirkUpdateModule = {
5533
5931
  command: "update <filename>",
5534
5932
  aliases: ["put"],
5535
5933
  describe: "Insert or update a quirk",
5536
- builder: (yargs32) => withConfiguration(
5934
+ builder: (yargs33) => withConfiguration(
5537
5935
  withApiOptions(
5538
5936
  withProjectOptions(
5539
- yargs32.positional("filename", { demandOption: true, describe: "Quirk file to put" })
5937
+ yargs33.positional("filename", { demandOption: true, describe: "Quirk file to put" })
5540
5938
  )
5541
5939
  )
5542
5940
  ),
@@ -5553,25 +5951,25 @@ var QuirkModule = {
5553
5951
  command: "quirk <command>",
5554
5952
  aliases: ["qk"],
5555
5953
  describe: "Commands for Context quirks",
5556
- builder: (yargs32) => yargs32.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
5954
+ builder: (yargs33) => yargs33.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
5557
5955
  handler: () => {
5558
- yargs16.help();
5956
+ yargs17.help();
5559
5957
  }
5560
5958
  };
5561
5959
 
5562
5960
  // src/commands/context/commands/signal.ts
5563
- import yargs17 from "yargs";
5961
+ import yargs18 from "yargs";
5564
5962
 
5565
5963
  // src/commands/context/commands/signal/get.ts
5566
5964
  import { UncachedSignalClient } from "@uniformdev/context/api";
5567
5965
  var SignalGetModule = {
5568
5966
  command: "get <id>",
5569
5967
  describe: "Fetch a signal",
5570
- builder: (yargs32) => withConfiguration(
5968
+ builder: (yargs33) => withConfiguration(
5571
5969
  withFormatOptions(
5572
5970
  withApiOptions(
5573
5971
  withProjectOptions(
5574
- yargs32.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
5972
+ yargs33.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
5575
5973
  )
5576
5974
  )
5577
5975
  )
@@ -5595,7 +5993,7 @@ var SignalListModule = {
5595
5993
  command: "list",
5596
5994
  describe: "List signals",
5597
5995
  aliases: ["ls"],
5598
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
5996
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
5599
5997
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5600
5998
  const fetch3 = nodeFetchProxy(proxy);
5601
5999
  const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5644,11 +6042,11 @@ function createSignalEngineDataSource({
5644
6042
  var SignalPullModule = {
5645
6043
  command: "pull <directory>",
5646
6044
  describe: "Pulls all signals to local files in a directory",
5647
- builder: (yargs32) => withConfiguration(
6045
+ builder: (yargs33) => withConfiguration(
5648
6046
  withApiOptions(
5649
6047
  withProjectOptions(
5650
6048
  withDiffOptions(
5651
- yargs32.positional("directory", {
6049
+ yargs33.positional("directory", {
5652
6050
  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.",
5653
6051
  type: "string"
5654
6052
  }).option("format", {
@@ -5725,11 +6123,11 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
5725
6123
  var SignalPushModule = {
5726
6124
  command: "push <directory>",
5727
6125
  describe: "Pushes all signals from files in a directory or package to Uniform",
5728
- builder: (yargs32) => withConfiguration(
6126
+ builder: (yargs33) => withConfiguration(
5729
6127
  withApiOptions(
5730
6128
  withProjectOptions(
5731
6129
  withDiffOptions(
5732
- yargs32.positional("directory", {
6130
+ yargs33.positional("directory", {
5733
6131
  describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
5734
6132
  type: "string"
5735
6133
  }).option("what-if", {
@@ -5795,10 +6193,10 @@ var SignalRemoveModule = {
5795
6193
  command: "remove <id>",
5796
6194
  aliases: ["delete", "rm"],
5797
6195
  describe: "Delete a signal",
5798
- builder: (yargs32) => withConfiguration(
6196
+ builder: (yargs33) => withConfiguration(
5799
6197
  withApiOptions(
5800
6198
  withProjectOptions(
5801
- yargs32.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
6199
+ yargs33.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
5802
6200
  )
5803
6201
  )
5804
6202
  ),
@@ -5815,10 +6213,10 @@ var SignalUpdateModule = {
5815
6213
  command: "update <filename>",
5816
6214
  aliases: ["put"],
5817
6215
  describe: "Insert or update a signal",
5818
- builder: (yargs32) => withConfiguration(
6216
+ builder: (yargs33) => withConfiguration(
5819
6217
  withApiOptions(
5820
6218
  withProjectOptions(
5821
- yargs32.positional("filename", { demandOption: true, describe: "Signal file to put" })
6219
+ yargs33.positional("filename", { demandOption: true, describe: "Signal file to put" })
5822
6220
  )
5823
6221
  )
5824
6222
  ),
@@ -5835,25 +6233,25 @@ var SignalModule = {
5835
6233
  command: "signal <command>",
5836
6234
  aliases: ["sig"],
5837
6235
  describe: "Commands for Context signals",
5838
- builder: (yargs32) => yargs32.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
6236
+ builder: (yargs33) => yargs33.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
5839
6237
  handler: () => {
5840
- yargs17.help();
6238
+ yargs18.help();
5841
6239
  }
5842
6240
  };
5843
6241
 
5844
6242
  // src/commands/context/commands/test.ts
5845
- import yargs18 from "yargs";
6243
+ import yargs19 from "yargs";
5846
6244
 
5847
6245
  // src/commands/context/commands/test/get.ts
5848
6246
  import { UncachedTestClient } from "@uniformdev/context/api";
5849
6247
  var TestGetModule = {
5850
6248
  command: "get <id>",
5851
6249
  describe: "Fetch a test",
5852
- builder: (yargs32) => withConfiguration(
6250
+ builder: (yargs33) => withConfiguration(
5853
6251
  withFormatOptions(
5854
6252
  withApiOptions(
5855
6253
  withProjectOptions(
5856
- yargs32.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
6254
+ yargs33.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
5857
6255
  )
5858
6256
  )
5859
6257
  )
@@ -5877,7 +6275,7 @@ var TestListModule = {
5877
6275
  command: "list",
5878
6276
  describe: "List tests",
5879
6277
  aliases: ["ls"],
5880
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
6278
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
5881
6279
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5882
6280
  const fetch3 = nodeFetchProxy(proxy);
5883
6281
  const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5926,11 +6324,11 @@ function createTestEngineDataSource({
5926
6324
  var TestPullModule = {
5927
6325
  command: "pull <directory>",
5928
6326
  describe: "Pulls all tests to local files in a directory",
5929
- builder: (yargs32) => withConfiguration(
6327
+ builder: (yargs33) => withConfiguration(
5930
6328
  withApiOptions(
5931
6329
  withProjectOptions(
5932
6330
  withDiffOptions(
5933
- yargs32.positional("directory", {
6331
+ yargs33.positional("directory", {
5934
6332
  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.",
5935
6333
  type: "string"
5936
6334
  }).option("format", {
@@ -6007,11 +6405,11 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
6007
6405
  var TestPushModule = {
6008
6406
  command: "push <directory>",
6009
6407
  describe: "Pushes all tests from files in a directory or package to Uniform",
6010
- builder: (yargs32) => withConfiguration(
6408
+ builder: (yargs33) => withConfiguration(
6011
6409
  withApiOptions(
6012
6410
  withProjectOptions(
6013
6411
  withDiffOptions(
6014
- yargs32.positional("directory", {
6412
+ yargs33.positional("directory", {
6015
6413
  describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
6016
6414
  type: "string"
6017
6415
  }).option("what-if", {
@@ -6077,10 +6475,10 @@ var TestRemoveModule = {
6077
6475
  command: "remove <id>",
6078
6476
  aliases: ["delete", "rm"],
6079
6477
  describe: "Delete a test",
6080
- builder: (yargs32) => withConfiguration(
6478
+ builder: (yargs33) => withConfiguration(
6081
6479
  withApiOptions(
6082
6480
  withProjectOptions(
6083
- yargs32.positional("id", { demandOption: true, describe: "Test public ID to delete" })
6481
+ yargs33.positional("id", { demandOption: true, describe: "Test public ID to delete" })
6084
6482
  )
6085
6483
  )
6086
6484
  ),
@@ -6097,9 +6495,9 @@ var TestUpdateModule = {
6097
6495
  command: "update <filename>",
6098
6496
  aliases: ["put"],
6099
6497
  describe: "Insert or update a test",
6100
- builder: (yargs32) => withConfiguration(
6498
+ builder: (yargs33) => withConfiguration(
6101
6499
  withApiOptions(
6102
- withProjectOptions(yargs32.positional("filename", { demandOption: true, describe: "Test file to put" }))
6500
+ withProjectOptions(yargs33.positional("filename", { demandOption: true, describe: "Test file to put" }))
6103
6501
  )
6104
6502
  ),
6105
6503
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -6114,9 +6512,9 @@ var TestUpdateModule = {
6114
6512
  var TestModule = {
6115
6513
  command: "test <command>",
6116
6514
  describe: "Commands for Context A/B tests",
6117
- builder: (yargs32) => yargs32.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
6515
+ builder: (yargs33) => yargs33.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
6118
6516
  handler: () => {
6119
- yargs18.help();
6517
+ yargs19.help();
6120
6518
  }
6121
6519
  };
6122
6520
 
@@ -6125,20 +6523,20 @@ var ContextCommand = {
6125
6523
  command: "context <command>",
6126
6524
  aliases: ["ctx"],
6127
6525
  describe: "Uniform Context commands",
6128
- builder: (yargs32) => yargs32.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
6526
+ builder: (yargs33) => yargs33.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
6129
6527
  handler: () => {
6130
- yargs19.showHelp();
6528
+ yargs20.showHelp();
6131
6529
  }
6132
6530
  };
6133
6531
 
6134
6532
  // src/commands/integration/index.ts
6135
- import yargs22 from "yargs";
6533
+ import yargs23 from "yargs";
6136
6534
 
6137
6535
  // src/commands/integration/commands/definition.ts
6138
- import yargs21 from "yargs";
6536
+ import yargs22 from "yargs";
6139
6537
 
6140
6538
  // src/commands/integration/commands/definition/edgehancer/edgehancer.ts
6141
- import yargs20 from "yargs";
6539
+ import yargs21 from "yargs";
6142
6540
 
6143
6541
  // src/commands/integration/commands/definition/edgehancer/deploy.ts
6144
6542
  import { readFileSync as readFileSync2 } from "fs";
@@ -6176,8 +6574,8 @@ var EdgehancerClient = class extends ApiClient {
6176
6574
  };
6177
6575
 
6178
6576
  // src/commands/integration/commands/definition/edgehancer/util.ts
6179
- function withEdgehancerIdOptions(yargs32) {
6180
- return yargs32.option("connectorType", {
6577
+ function withEdgehancerIdOptions(yargs33) {
6578
+ return yargs33.option("connectorType", {
6181
6579
  describe: "Integration data connector type to edgehance, as defined in the integration manifest file.",
6182
6580
  demandOption: true,
6183
6581
  type: "string"
@@ -6197,11 +6595,11 @@ function withEdgehancerIdOptions(yargs32) {
6197
6595
  var IntegrationEdgehancerDeployModule = {
6198
6596
  command: "deploy <filename>",
6199
6597
  describe: "Deploys a custom edgehancer hook to run when a data resource of a specific archetype is fetched. The API key used must have team admin permissions.",
6200
- builder: (yargs32) => withConfiguration(
6598
+ builder: (yargs33) => withConfiguration(
6201
6599
  withApiOptions(
6202
6600
  withTeamOptions(
6203
6601
  withEdgehancerIdOptions(
6204
- yargs32.positional("filename", {
6602
+ yargs33.positional("filename", {
6205
6603
  demandOption: true,
6206
6604
  describe: "ESM code file to run for the target edgehancer hook. Refer to the documentation for expected types."
6207
6605
  })
@@ -6221,7 +6619,7 @@ var IntegrationEdgehancerDeployModule = {
6221
6619
  var IntegrationEdgehancerRemoveModule = {
6222
6620
  command: "remove",
6223
6621
  describe: "Deletes a custom edgehancer hook from a data connector archetype. The API key used must have team admin permissions.",
6224
- builder: (yargs32) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs32)))),
6622
+ builder: (yargs33) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs33)))),
6225
6623
  handler: async ({ apiHost, apiKey, proxy, team: teamId, archetype, connectorType, hook }) => {
6226
6624
  const fetch3 = nodeFetchProxy(proxy);
6227
6625
  const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch3, teamId });
@@ -6233,9 +6631,9 @@ var IntegrationEdgehancerRemoveModule = {
6233
6631
  var IntegrationEdgehancerModule = {
6234
6632
  command: "edgehancer <command>",
6235
6633
  describe: "Commands for managing custom integration edgehancers at the team level.",
6236
- builder: (yargs32) => yargs32.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
6634
+ builder: (yargs33) => yargs33.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
6237
6635
  handler: () => {
6238
- yargs20.help();
6636
+ yargs21.help();
6239
6637
  }
6240
6638
  };
6241
6639
 
@@ -6275,10 +6673,10 @@ var DefinitionClient = class extends ApiClient2 {
6275
6673
  var IntegrationDefinitionRegisterModule = {
6276
6674
  command: "register <filename>",
6277
6675
  describe: "Registers a custom integration definition on a team. The API key used must have team admin permissions.",
6278
- builder: (yargs32) => withConfiguration(
6676
+ builder: (yargs33) => withConfiguration(
6279
6677
  withApiOptions(
6280
6678
  withTeamOptions(
6281
- yargs32.positional("filename", {
6679
+ yargs33.positional("filename", {
6282
6680
  demandOption: true,
6283
6681
  describe: "Integration definition manifest to register"
6284
6682
  })
@@ -6297,10 +6695,10 @@ var IntegrationDefinitionRegisterModule = {
6297
6695
  var IntegrationDefinitionRemoveModule = {
6298
6696
  command: "remove <type>",
6299
6697
  describe: "Deletes a custom integration definition from a team. This will uninstall it on any active projects. Existing usages of the integration may break. The API key used must have team admin permissions.",
6300
- builder: (yargs32) => withConfiguration(
6698
+ builder: (yargs33) => withConfiguration(
6301
6699
  withApiOptions(
6302
6700
  withTeamOptions(
6303
- yargs32.positional("type", {
6701
+ yargs33.positional("type", {
6304
6702
  demandOption: true,
6305
6703
  describe: "Integration type (from its manifest) to remove."
6306
6704
  })
@@ -6318,9 +6716,9 @@ var IntegrationDefinitionRemoveModule = {
6318
6716
  var IntegrationDefinitionModule = {
6319
6717
  command: "definition <command>",
6320
6718
  describe: "Commands for managing custom integration definitions at the team level.",
6321
- builder: (yargs32) => yargs32.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).demandCommand(),
6719
+ builder: (yargs33) => yargs33.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).demandCommand(),
6322
6720
  handler: () => {
6323
- yargs21.help();
6721
+ yargs22.help();
6324
6722
  }
6325
6723
  };
6326
6724
 
@@ -6360,10 +6758,10 @@ var InstallClient = class extends ApiClient3 {
6360
6758
  var IntegrationInstallModule = {
6361
6759
  command: "install <type>",
6362
6760
  describe: "Installs an integration to a project. The integration may be built-in or custom. Custom integrations must be registered to the parent team first.",
6363
- builder: (yargs32) => withConfiguration(
6761
+ builder: (yargs33) => withConfiguration(
6364
6762
  withApiOptions(
6365
6763
  withProjectOptions(
6366
- yargs32.positional("type", {
6764
+ yargs33.positional("type", {
6367
6765
  demandOption: true,
6368
6766
  describe: "Integration type to install (as defined in its manifest)"
6369
6767
  }).option("configuration", {
@@ -6385,10 +6783,10 @@ var IntegrationInstallModule = {
6385
6783
  var IntegrationUninstallModule = {
6386
6784
  command: "uninstall <type>",
6387
6785
  describe: "Uninstalls an integration from a project. Existing usages of the integration may break.",
6388
- builder: (yargs32) => withConfiguration(
6786
+ builder: (yargs33) => withConfiguration(
6389
6787
  withApiOptions(
6390
6788
  withProjectOptions(
6391
- yargs32.positional("type", {
6789
+ yargs33.positional("type", {
6392
6790
  demandOption: true,
6393
6791
  describe: "Integration type to uninstall (as defined in its manifest)"
6394
6792
  })
@@ -6406,9 +6804,9 @@ var IntegrationUninstallModule = {
6406
6804
  var IntegrationCommand = {
6407
6805
  command: "integration <command>",
6408
6806
  describe: "Integration management commands",
6409
- builder: (yargs32) => yargs32.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
6807
+ builder: (yargs33) => yargs33.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
6410
6808
  handler: () => {
6411
- yargs22.showHelp();
6809
+ yargs23.showHelp();
6412
6810
  }
6413
6811
  };
6414
6812
 
@@ -6436,7 +6834,7 @@ import { PostHog } from "posthog-node";
6436
6834
  // package.json
6437
6835
  var package_default = {
6438
6836
  name: "@uniformdev/cli",
6439
- version: "19.136.0",
6837
+ version: "19.137.0",
6440
6838
  description: "Uniform command line interface tool",
6441
6839
  license: "SEE LICENSE IN LICENSE.txt",
6442
6840
  main: "./cli.js",
@@ -7445,10 +7843,10 @@ var NewMeshCmd = {
7445
7843
  };
7446
7844
 
7447
7845
  // src/commands/optimize/index.ts
7448
- import yargs24 from "yargs";
7846
+ import yargs25 from "yargs";
7449
7847
 
7450
7848
  // src/commands/optimize/manifest.ts
7451
- import yargs23 from "yargs";
7849
+ import yargs24 from "yargs";
7452
7850
 
7453
7851
  // src/commands/optimize/manifest/download.ts
7454
7852
  import { gray as gray4, green as green3, red as red5, yellow as yellow2 } from "colorette";
@@ -7463,7 +7861,7 @@ var UniformBaseUrl = "https://uniform.app";
7463
7861
  var module = {
7464
7862
  command: "download [output]",
7465
7863
  describe: "Download intent manifest",
7466
- builder: (yargs32) => yargs32.option("apiKey", {
7864
+ builder: (yargs33) => yargs33.option("apiKey", {
7467
7865
  alias: "k",
7468
7866
  demandOption: true,
7469
7867
  string: true,
@@ -7564,10 +7962,10 @@ var module2 = {
7564
7962
  command: "manifest <command>",
7565
7963
  describe: "Intent manifest commands",
7566
7964
  builder: () => {
7567
- return yargs23.command(download_default);
7965
+ return yargs24.command(download_default);
7568
7966
  },
7569
7967
  handler: () => {
7570
- yargs23.showHelp();
7968
+ yargs24.showHelp();
7571
7969
  }
7572
7970
  };
7573
7971
  var manifest_default = module2;
@@ -7578,29 +7976,29 @@ var OptimizeCommand = {
7578
7976
  aliases: ["opt"],
7579
7977
  describe: "Uniform Optimize commands",
7580
7978
  builder: () => {
7581
- return yargs24.command(manifest_default);
7979
+ return yargs25.command(manifest_default);
7582
7980
  },
7583
7981
  handler: () => {
7584
- yargs24.showHelp();
7982
+ yargs25.showHelp();
7585
7983
  }
7586
7984
  };
7587
7985
 
7588
7986
  // src/commands/project-map/index.ts
7589
- import yargs27 from "yargs";
7987
+ import yargs28 from "yargs";
7590
7988
 
7591
7989
  // src/commands/project-map/commands/projectMapDefinition.ts
7592
- import yargs25 from "yargs";
7990
+ import yargs26 from "yargs";
7593
7991
 
7594
7992
  // src/commands/project-map/commands/ProjectMapDefinition/get.ts
7595
7993
  import { UncachedProjectMapClient } from "@uniformdev/project-map";
7596
7994
  var ProjectMapDefinitionGetModule = {
7597
7995
  command: "get <id>",
7598
7996
  describe: "Fetch a project map",
7599
- builder: (yargs32) => withFormatOptions(
7997
+ builder: (yargs33) => withFormatOptions(
7600
7998
  withConfiguration(
7601
7999
  withApiOptions(
7602
8000
  withProjectOptions(
7603
- yargs32.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
8001
+ yargs33.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
7604
8002
  )
7605
8003
  )
7606
8004
  )
@@ -7624,7 +8022,7 @@ var ProjectMapDefinitionListModule = {
7624
8022
  command: "list",
7625
8023
  describe: "List of project maps",
7626
8024
  aliases: ["ls"],
7627
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
8025
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
7628
8026
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
7629
8027
  const fetch3 = nodeFetchProxy(proxy);
7630
8028
  const client = new UncachedProjectMapClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -7681,11 +8079,11 @@ function createProjectMapDefinitionEngineDataSource({
7681
8079
  var ProjectMapDefinitionPullModule = {
7682
8080
  command: "pull <directory>",
7683
8081
  describe: "Pulls all project maps to local files in a directory",
7684
- builder: (yargs32) => withConfiguration(
8082
+ builder: (yargs33) => withConfiguration(
7685
8083
  withApiOptions(
7686
8084
  withProjectOptions(
7687
8085
  withDiffOptions(
7688
- yargs32.positional("directory", {
8086
+ yargs33.positional("directory", {
7689
8087
  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.",
7690
8088
  type: "string"
7691
8089
  }).option("format", {
@@ -7762,11 +8160,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient4 } from "@uniformd
7762
8160
  var ProjectMapDefinitionPushModule = {
7763
8161
  command: "push <directory>",
7764
8162
  describe: "Pushes all project maps from files in a directory or package to Uniform",
7765
- builder: (yargs32) => withConfiguration(
8163
+ builder: (yargs33) => withConfiguration(
7766
8164
  withApiOptions(
7767
8165
  withProjectOptions(
7768
8166
  withDiffOptions(
7769
- yargs32.positional("directory", {
8167
+ yargs33.positional("directory", {
7770
8168
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
7771
8169
  type: "string"
7772
8170
  }).option("what-if", {
@@ -7832,9 +8230,9 @@ var ProjectMapDefinitionRemoveModule = {
7832
8230
  command: "remove <id>",
7833
8231
  aliases: ["delete", "rm"],
7834
8232
  describe: "Delete a project map",
7835
- builder: (yargs32) => withConfiguration(
8233
+ builder: (yargs33) => withConfiguration(
7836
8234
  withApiOptions(
7837
- withProjectOptions(yargs32.positional("id", { demandOption: true, describe: " UUID to delete" }))
8235
+ withProjectOptions(yargs33.positional("id", { demandOption: true, describe: " UUID to delete" }))
7838
8236
  )
7839
8237
  ),
7840
8238
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -7850,10 +8248,10 @@ var ProjectMapDefinitionUpdateModule = {
7850
8248
  command: "update <filename>",
7851
8249
  aliases: ["put"],
7852
8250
  describe: "Insert or update a project map",
7853
- builder: (yargs32) => withConfiguration(
8251
+ builder: (yargs33) => withConfiguration(
7854
8252
  withApiOptions(
7855
8253
  withProjectOptions(
7856
- yargs32.positional("filename", { demandOption: true, describe: "Project map file to put" })
8254
+ yargs33.positional("filename", { demandOption: true, describe: "Project map file to put" })
7857
8255
  )
7858
8256
  )
7859
8257
  ),
@@ -7869,25 +8267,25 @@ var ProjectMapDefinitionUpdateModule = {
7869
8267
  var ProjectMapDefinitionModule = {
7870
8268
  command: "definition <command>",
7871
8269
  describe: "Commands for ProjectMap Definitions",
7872
- builder: (yargs32) => yargs32.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
8270
+ builder: (yargs33) => yargs33.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
7873
8271
  handler: () => {
7874
- yargs25.help();
8272
+ yargs26.help();
7875
8273
  }
7876
8274
  };
7877
8275
 
7878
8276
  // src/commands/project-map/commands/projectMapNode.ts
7879
- import yargs26 from "yargs";
8277
+ import yargs27 from "yargs";
7880
8278
 
7881
8279
  // src/commands/project-map/commands/ProjectMapNode/get.ts
7882
8280
  import { UncachedProjectMapClient as UncachedProjectMapClient7 } from "@uniformdev/project-map";
7883
8281
  var ProjectMapNodeGetModule = {
7884
8282
  command: "get <id> <projectMapId>",
7885
8283
  describe: "Fetch a project map node",
7886
- builder: (yargs32) => withConfiguration(
8284
+ builder: (yargs33) => withConfiguration(
7887
8285
  withFormatOptions(
7888
8286
  withApiOptions(
7889
8287
  withProjectOptions(
7890
- yargs32.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
8288
+ yargs33.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
7891
8289
  )
7892
8290
  )
7893
8291
  )
@@ -7913,12 +8311,12 @@ var ProjectMapNodeListModule = {
7913
8311
  command: "list <projectMapId>",
7914
8312
  describe: "List project map nodes",
7915
8313
  aliases: ["ls"],
7916
- builder: (yargs32) => withConfiguration(
8314
+ builder: (yargs33) => withConfiguration(
7917
8315
  withFormatOptions(
7918
8316
  withApiOptions(
7919
8317
  withProjectOptions(
7920
8318
  withStateOptions(
7921
- yargs32.positional("projectMapId", {
8319
+ yargs33.positional("projectMapId", {
7922
8320
  demandOption: true,
7923
8321
  describe: "ProjectMap UUID to fetch from"
7924
8322
  })
@@ -7990,11 +8388,11 @@ function createProjectMapNodeEngineDataSource({
7990
8388
  var ProjectMapNodePullModule = {
7991
8389
  command: "pull <directory>",
7992
8390
  describe: "Pulls all project maps nodes to local files in a directory",
7993
- builder: (yargs32) => withConfiguration(
8391
+ builder: (yargs33) => withConfiguration(
7994
8392
  withApiOptions(
7995
8393
  withProjectOptions(
7996
8394
  withDiffOptions(
7997
- yargs32.positional("directory", {
8395
+ yargs33.positional("directory", {
7998
8396
  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.",
7999
8397
  type: "string"
8000
8398
  }).option("format", {
@@ -8075,11 +8473,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient10 } from "@uniform
8075
8473
  var ProjectMapNodePushModule = {
8076
8474
  command: "push <directory>",
8077
8475
  describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
8078
- builder: (yargs32) => withConfiguration(
8476
+ builder: (yargs33) => withConfiguration(
8079
8477
  withApiOptions(
8080
8478
  withProjectOptions(
8081
8479
  withDiffOptions(
8082
- yargs32.positional("directory", {
8480
+ yargs33.positional("directory", {
8083
8481
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
8084
8482
  type: "string"
8085
8483
  }).option("what-if", {
@@ -8154,10 +8552,10 @@ var ProjectMapNodeRemoveModule = {
8154
8552
  command: "remove <id> <projectMapId>",
8155
8553
  aliases: ["delete", "rm"],
8156
8554
  describe: "Delete a project map node",
8157
- builder: (yargs32) => withConfiguration(
8555
+ builder: (yargs33) => withConfiguration(
8158
8556
  withApiOptions(
8159
8557
  withProjectOptions(
8160
- yargs32.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
8558
+ yargs33.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
8161
8559
  )
8162
8560
  )
8163
8561
  ),
@@ -8174,10 +8572,10 @@ var ProjectMapNodeUpdateModule = {
8174
8572
  command: "update <filename> <projectMapId>",
8175
8573
  aliases: ["put"],
8176
8574
  describe: "Insert or update a project map node",
8177
- builder: (yargs32) => withConfiguration(
8575
+ builder: (yargs33) => withConfiguration(
8178
8576
  withApiOptions(
8179
8577
  withProjectOptions(
8180
- yargs32.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
8578
+ yargs33.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
8181
8579
  )
8182
8580
  )
8183
8581
  ),
@@ -8193,9 +8591,9 @@ var ProjectMapNodeUpdateModule = {
8193
8591
  var ProjectMapNodeModule = {
8194
8592
  command: "node <command>",
8195
8593
  describe: "Commands for ProjectMap Nodes",
8196
- builder: (yargs32) => yargs32.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
8594
+ builder: (yargs33) => yargs33.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
8197
8595
  handler: () => {
8198
- yargs26.help();
8596
+ yargs27.help();
8199
8597
  }
8200
8598
  };
8201
8599
 
@@ -8204,28 +8602,28 @@ var ProjectMapCommand = {
8204
8602
  command: "project-map <command>",
8205
8603
  aliases: ["prm"],
8206
8604
  describe: "Uniform ProjectMap commands",
8207
- builder: (yargs32) => yargs32.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
8605
+ builder: (yargs33) => yargs33.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
8208
8606
  handler: () => {
8209
- yargs27.showHelp();
8607
+ yargs28.showHelp();
8210
8608
  }
8211
8609
  };
8212
8610
 
8213
8611
  // src/commands/redirect/index.ts
8214
- import yargs29 from "yargs";
8612
+ import yargs30 from "yargs";
8215
8613
 
8216
8614
  // src/commands/redirect/commands/redirect.ts
8217
- import yargs28 from "yargs";
8615
+ import yargs29 from "yargs";
8218
8616
 
8219
8617
  // src/commands/redirect/commands/RedirectDefinition/get.ts
8220
8618
  import { UncachedRedirectClient } from "@uniformdev/redirect";
8221
8619
  var RedirectDefinitionGetModule = {
8222
8620
  command: "get <id>",
8223
8621
  describe: "Fetch a redirect",
8224
- builder: (yargs32) => withConfiguration(
8622
+ builder: (yargs33) => withConfiguration(
8225
8623
  withFormatOptions(
8226
8624
  withApiOptions(
8227
8625
  withProjectOptions(
8228
- yargs32.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
8626
+ yargs33.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
8229
8627
  )
8230
8628
  )
8231
8629
  )
@@ -8249,7 +8647,7 @@ var RedirectDefinitionListModule = {
8249
8647
  command: "list",
8250
8648
  describe: "List of redirects",
8251
8649
  aliases: ["ls"],
8252
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
8650
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
8253
8651
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
8254
8652
  const fetch3 = nodeFetchProxy(proxy);
8255
8653
  const client = new UncachedRedirectClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -8315,11 +8713,11 @@ function createRedirectDefinitionEngineDataSource({
8315
8713
  var RedirectDefinitionPullModule = {
8316
8714
  command: "pull <directory>",
8317
8715
  describe: "Pulls all redirects to local files in a directory",
8318
- builder: (yargs32) => withConfiguration(
8716
+ builder: (yargs33) => withConfiguration(
8319
8717
  withApiOptions(
8320
8718
  withProjectOptions(
8321
8719
  withDiffOptions(
8322
- yargs32.positional("directory", {
8720
+ yargs33.positional("directory", {
8323
8721
  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.",
8324
8722
  type: "string"
8325
8723
  }).option("format", {
@@ -8397,11 +8795,11 @@ import { UncachedRedirectClient as UncachedRedirectClient4 } from "@uniformdev/r
8397
8795
  var RedirectDefinitionPushModule = {
8398
8796
  command: "push <directory>",
8399
8797
  describe: "Pushes all redirects from files in a directory or package to Uniform",
8400
- builder: (yargs32) => withConfiguration(
8798
+ builder: (yargs33) => withConfiguration(
8401
8799
  withApiOptions(
8402
8800
  withProjectOptions(
8403
8801
  withDiffOptions(
8404
- yargs32.positional("directory", {
8802
+ yargs33.positional("directory", {
8405
8803
  describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
8406
8804
  type: "string"
8407
8805
  }).option("what-if", {
@@ -8467,9 +8865,9 @@ var RedirectDefinitionRemoveModule = {
8467
8865
  command: "remove <id>",
8468
8866
  aliases: ["delete", "rm"],
8469
8867
  describe: "Delete a redirect",
8470
- builder: (yargs32) => withConfiguration(
8868
+ builder: (yargs33) => withConfiguration(
8471
8869
  withApiOptions(
8472
- withProjectOptions(yargs32.positional("id", { demandOption: true, describe: " UUID to delete" }))
8870
+ withProjectOptions(yargs33.positional("id", { demandOption: true, describe: " UUID to delete" }))
8473
8871
  )
8474
8872
  ),
8475
8873
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -8485,10 +8883,10 @@ var RedirectDefinitionUpdateModule = {
8485
8883
  command: "update <filename>",
8486
8884
  aliases: ["put"],
8487
8885
  describe: "Insert or update a redirect",
8488
- builder: (yargs32) => withConfiguration(
8886
+ builder: (yargs33) => withConfiguration(
8489
8887
  withApiOptions(
8490
8888
  withProjectOptions(
8491
- yargs32.positional("filename", { demandOption: true, describe: "Redirect file to put" })
8889
+ yargs33.positional("filename", { demandOption: true, describe: "Redirect file to put" })
8492
8890
  )
8493
8891
  )
8494
8892
  ),
@@ -8504,9 +8902,9 @@ var RedirectDefinitionUpdateModule = {
8504
8902
  var RedirectDefinitionModule = {
8505
8903
  command: "definition <command>",
8506
8904
  describe: "Commands for Redirect Definitions",
8507
- builder: (yargs32) => yargs32.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
8905
+ builder: (yargs33) => yargs33.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
8508
8906
  handler: () => {
8509
- yargs28.help();
8907
+ yargs29.help();
8510
8908
  }
8511
8909
  };
8512
8910
 
@@ -8515,14 +8913,14 @@ var RedirectCommand = {
8515
8913
  command: "redirect <command>",
8516
8914
  aliases: ["red"],
8517
8915
  describe: "Uniform Redirect commands",
8518
- builder: (yargs32) => yargs32.command(RedirectDefinitionModule).demandCommand(),
8916
+ builder: (yargs33) => yargs33.command(RedirectDefinitionModule).demandCommand(),
8519
8917
  handler: () => {
8520
- yargs29.showHelp();
8918
+ yargs30.showHelp();
8521
8919
  }
8522
8920
  };
8523
8921
 
8524
8922
  // src/commands/sync/index.ts
8525
- import yargs30 from "yargs";
8923
+ import yargs31 from "yargs";
8526
8924
 
8527
8925
  // src/commands/sync/commands/util.ts
8528
8926
  import ora2 from "ora";
@@ -8555,11 +8953,11 @@ function spin(entityType) {
8555
8953
  var SyncPullModule = {
8556
8954
  command: "pull",
8557
8955
  describe: "Pulls whole project to local files in a directory",
8558
- builder: (yargs32) => withConfiguration(
8956
+ builder: (yargs33) => withConfiguration(
8559
8957
  withApiOptions(
8560
8958
  withProjectOptions(
8561
8959
  withDiffOptions(
8562
- yargs32.option("what-if", {
8960
+ yargs33.option("what-if", {
8563
8961
  alias: ["w"],
8564
8962
  describe: "What-if mode reports what would be done but changes no files",
8565
8963
  default: false,
@@ -8570,8 +8968,11 @@ var SyncPullModule = {
8570
8968
  )
8571
8969
  ),
8572
8970
  handler: async ({ serialization, ...otherParams }) => {
8573
- var _a;
8971
+ var _a, _b;
8574
8972
  const config2 = serialization;
8973
+ if (config2.entitiesConfig.pattern) {
8974
+ (_a = config2.entitiesConfig).componentPattern ?? (_a.componentPattern = config2.entitiesConfig.pattern);
8975
+ }
8575
8976
  const enabledEntities = Object.entries({
8576
8977
  locale: LocalePullModule,
8577
8978
  asset: AssetPullModule,
@@ -8584,17 +8985,18 @@ var SyncPullModule = {
8584
8985
  enrichment: EnrichmentPullModule,
8585
8986
  aggregate: AggregatePullModule,
8586
8987
  component: ComponentPullModule,
8587
- pattern: PatternPullModule,
8988
+ componentPattern: ComponentPatternPullModule,
8588
8989
  composition: CompositionPullModule,
8589
8990
  projectMapDefinition: ProjectMapDefinitionPullModule,
8590
8991
  projectMapNode: ProjectMapNodePullModule,
8591
8992
  redirect: RedirectDefinitionPullModule,
8592
8993
  entry: EntryPullModule,
8994
+ entryPattern: EntryPatternPullModule,
8593
8995
  contentType: ContentTypePullModule
8594
8996
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8595
8997
  }).filter(([entityType]) => {
8596
- var _a2, _b, _c, _d, _e, _f;
8597
- return Boolean((_a2 = config2.entitiesConfig) == null ? void 0 : _a2[entityType]) && ((_c = (_b = config2.entitiesConfig) == null ? void 0 : _b[entityType]) == null ? void 0 : _c.disabled) !== true && ((_f = (_e = (_d = config2.entitiesConfig) == null ? void 0 : _d[entityType]) == null ? void 0 : _e.pull) == null ? void 0 : _f.disabled) !== true;
8998
+ var _a2, _b2, _c, _d, _e, _f;
8999
+ return Boolean((_a2 = config2.entitiesConfig) == null ? void 0 : _a2[entityType]) && ((_c = (_b2 = config2.entitiesConfig) == null ? void 0 : _b2[entityType]) == null ? void 0 : _c.disabled) !== true && ((_f = (_e = (_d = config2.entitiesConfig) == null ? void 0 : _d[entityType]) == null ? void 0 : _e.pull) == null ? void 0 : _f.disabled) !== true;
8598
9000
  });
8599
9001
  if (enabledEntities.length === 0) {
8600
9002
  throw new Error(
@@ -8606,14 +9008,14 @@ var SyncPullModule = {
8606
9008
  const entityConfigSupportsPullState = (entityConfig2) => {
8607
9009
  return entityConfig2 !== void 0 && "state" in entityConfig2;
8608
9010
  };
8609
- const entityConfig = (_a = config2.entitiesConfig) == null ? void 0 : _a[entityType];
9011
+ const entityConfig = (_b = config2.entitiesConfig) == null ? void 0 : _b[entityType];
8610
9012
  try {
8611
9013
  await module3.handler({
8612
9014
  ...otherParams,
8613
9015
  state: entityConfigSupportsPullState(entityConfig) ? entityConfig.state ?? 0 : 0,
8614
9016
  format: getFormat(entityType, config2),
8615
9017
  onlyCompositions: entityType === "composition" ? true : void 0,
8616
- onlyPatterns: entityType === "pattern" ? true : void 0,
9018
+ onlyPatterns: entityType === "componentPattern" ? true : void 0,
8617
9019
  mode: getPullMode(entityType, config2),
8618
9020
  directory: getPullFilename(entityType, config2),
8619
9021
  allowEmptySource: config2.allowEmptySource
@@ -8654,11 +9056,11 @@ var getFormat = (entityType, config2) => {
8654
9056
  var SyncPushModule = {
8655
9057
  command: "push",
8656
9058
  describe: "Pushes whole project data from files in a directory or package to Uniform",
8657
- builder: (yargs32) => withConfiguration(
9059
+ builder: (yargs33) => withConfiguration(
8658
9060
  withApiOptions(
8659
9061
  withProjectOptions(
8660
9062
  withDiffOptions(
8661
- yargs32.option("what-if", {
9063
+ yargs33.option("what-if", {
8662
9064
  alias: ["w"],
8663
9065
  describe: "What-if mode reports what would be done but changes nothing",
8664
9066
  default: false,
@@ -8669,8 +9071,11 @@ var SyncPushModule = {
8669
9071
  )
8670
9072
  ),
8671
9073
  handler: async ({ serialization, ...otherParams }) => {
8672
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
9074
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
8673
9075
  const config2 = serialization;
9076
+ if (config2.entitiesConfig.pattern) {
9077
+ (_a = config2.entitiesConfig).componentPattern ?? (_a.componentPattern = config2.entitiesConfig.pattern);
9078
+ }
8674
9079
  const enabledEntities = Object.entries({
8675
9080
  locale: LocalePushModule,
8676
9081
  asset: AssetPushModule,
@@ -8683,13 +9088,14 @@ var SyncPushModule = {
8683
9088
  enrichment: EnrichmentPushModule,
8684
9089
  aggregate: AggregatePushModule,
8685
9090
  component: ComponentPushModule,
8686
- pattern: PatternPushModule,
9091
+ componentPattern: ComponentPatternPushModule,
8687
9092
  composition: CompositionPushModule,
8688
9093
  projectMapDefinition: ProjectMapDefinitionPushModule,
8689
9094
  projectMapNode: ProjectMapNodePushModule,
8690
9095
  redirect: RedirectDefinitionPushModule,
8691
9096
  contentType: ContentTypePushModule,
8692
- entry: EntryPushModule
9097
+ entry: EntryPushModule,
9098
+ entryPattern: EntryPatternPushModule
8693
9099
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8694
9100
  }).filter(([entityType]) => {
8695
9101
  var _a2, _b2, _c2, _d2, _e2, _f2;
@@ -8708,7 +9114,7 @@ var SyncPushModule = {
8708
9114
  state: 0,
8709
9115
  format: getFormat2(entityType, config2),
8710
9116
  onlyCompositions: entityType === "composition" ? true : void 0,
8711
- onlyPatterns: entityType === "pattern" ? true : void 0,
9117
+ onlyPatterns: entityType === "componentPattern" ? true : void 0,
8712
9118
  mode: getPushMode(entityType, config2),
8713
9119
  directory: getPushFilename(entityType, config2),
8714
9120
  allowEmptySource: config2.allowEmptySource
@@ -8719,15 +9125,18 @@ var SyncPushModule = {
8719
9125
  throw e;
8720
9126
  }
8721
9127
  }
8722
- if (((_a = config2.entitiesConfig) == null ? void 0 : _a.pattern) && ((_d = (_c = (_b = config2.entitiesConfig) == null ? void 0 : _b.pattern) == null ? void 0 : _c.push) == null ? void 0 : _d.disabled) !== true && ((_f = (_e = config2.entitiesConfig) == null ? void 0 : _e.pattern) == null ? void 0 : _f.publish)) {
8723
- await PatternPublishModule.handler({ ...otherParams, all: true });
9128
+ if (((_b = config2.entitiesConfig) == null ? void 0 : _b.componentPattern) && ((_e = (_d = (_c = config2.entitiesConfig) == null ? void 0 : _c.componentPattern) == null ? void 0 : _d.push) == null ? void 0 : _e.disabled) !== true && ((_g = (_f = config2.entitiesConfig) == null ? void 0 : _f.componentPattern) == null ? void 0 : _g.publish)) {
9129
+ await ComponentPatternPublishModule.handler({ ...otherParams, all: true });
8724
9130
  }
8725
- if (((_g = config2.entitiesConfig) == null ? void 0 : _g.composition) && ((_j = (_i = (_h = config2.entitiesConfig) == null ? void 0 : _h.composition) == null ? void 0 : _i.push) == null ? void 0 : _j.disabled) !== true && ((_l = (_k = config2.entitiesConfig) == null ? void 0 : _k.composition) == null ? void 0 : _l.publish)) {
9131
+ if (((_h = config2.entitiesConfig) == null ? void 0 : _h.composition) && ((_k = (_j = (_i = config2.entitiesConfig) == null ? void 0 : _i.composition) == null ? void 0 : _j.push) == null ? void 0 : _k.disabled) !== true && ((_m = (_l = config2.entitiesConfig) == null ? void 0 : _l.composition) == null ? void 0 : _m.publish)) {
8726
9132
  await CompositionPublishModule.handler({ ...otherParams, all: true });
8727
9133
  }
8728
- if (((_m = config2.entitiesConfig) == null ? void 0 : _m.entry) && ((_p = (_o = (_n = config2.entitiesConfig) == null ? void 0 : _n.entry) == null ? void 0 : _o.push) == null ? void 0 : _p.disabled) !== true && ((_r = (_q = config2.entitiesConfig) == null ? void 0 : _q.entry) == null ? void 0 : _r.publish)) {
9134
+ if (((_n = config2.entitiesConfig) == null ? void 0 : _n.entry) && ((_q = (_p = (_o = config2.entitiesConfig) == null ? void 0 : _o.entry) == null ? void 0 : _p.push) == null ? void 0 : _q.disabled) !== true && ((_s = (_r = config2.entitiesConfig) == null ? void 0 : _r.entry) == null ? void 0 : _s.publish)) {
8729
9135
  await EntryPublishModule.handler({ ...otherParams, all: true });
8730
9136
  }
9137
+ if (((_t = config2.entitiesConfig) == null ? void 0 : _t.entryPattern) && ((_w = (_v = (_u = config2.entitiesConfig) == null ? void 0 : _u.entryPattern) == null ? void 0 : _v.push) == null ? void 0 : _w.disabled) !== true && ((_y = (_x = config2.entitiesConfig) == null ? void 0 : _x.entryPattern) == null ? void 0 : _y.publish)) {
9138
+ await EntryPatternPublishModule.handler({ ...otherParams, all: true });
9139
+ }
8731
9140
  }
8732
9141
  };
8733
9142
  var getPushMode = (entityType, config2) => {
@@ -8758,9 +9167,9 @@ var getFormat2 = (entityType, config2) => {
8758
9167
  var SyncCommand = {
8759
9168
  command: "sync <command>",
8760
9169
  describe: "Uniform Sync commands",
8761
- builder: (yargs32) => yargs32.command(SyncPullModule).command(SyncPushModule).demandCommand(),
9170
+ builder: (yargs33) => yargs33.command(SyncPullModule).command(SyncPushModule).demandCommand(),
8762
9171
  handler: () => {
8763
- yargs30.showHelp();
9172
+ yargs31.showHelp();
8764
9173
  }
8765
9174
  };
8766
9175
 
@@ -9027,7 +9436,7 @@ First found was: v${firstVersion}`;
9027
9436
 
9028
9437
  // src/index.ts
9029
9438
  dotenv.config();
9030
- var yarggery = yargs31(hideBin(process.argv));
9439
+ var yarggery = yargs32(hideBin(process.argv));
9031
9440
  var inlineConfigurationFilePath = "config" in yarggery.argv && yarggery.argv.config;
9032
9441
  var configuration = loadConfig(inlineConfigurationFilePath || null);
9033
9442
  yarggery.option("verbose", {