@uniformdev/cli 19.142.2-alpha.1 → 19.145.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,15 +1023,15 @@ 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, defaultState = "preview") {
1027
+ return yargs33.option("state", {
1028
1028
  type: "string",
1029
- describe: `Composition state to fetch.`,
1029
+ describe: `State to fetch.`,
1030
1030
  choices: ["preview", "published"],
1031
- default: "preview"
1031
+ default: defaultState
1032
1032
  });
1033
1033
  }
1034
- function convertCompositionState(state) {
1034
+ function convertStateOption(state) {
1035
1035
  const number = Number(state);
1036
1036
  if (!isNaN(number)) {
1037
1037
  return number;
@@ -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,
@@ -2020,7 +2020,7 @@ var CompositionGetModule = {
2020
2020
  const res = prepCompositionForDisk(
2021
2021
  await client.getCompositionById({
2022
2022
  compositionId: id,
2023
- state: convertCompositionState(state),
2023
+ state: convertStateOption(state),
2024
2024
  skipPatternResolution: !resolvePatterns,
2025
2025
  skipOverridesResolution: !resolveOverrides,
2026
2026
  withComponentIDs: componentIDs,
@@ -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: {
@@ -2100,7 +2106,7 @@ var CompositionListModule = {
2100
2106
  limit,
2101
2107
  offset,
2102
2108
  pattern: onlyCompositions ? false : onlyPatterns ? true : void 0,
2103
- state: convertCompositionState(state),
2109
+ state: convertStateOption(state),
2104
2110
  skipPatternResolution: !resolvePatterns,
2105
2111
  withComponentIDs: componentIDs,
2106
2112
  skipOverridesResolution: !resolveOverrides
@@ -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
 
@@ -2124,7 +2173,7 @@ function createComponentInstanceEngineDataSource({
2124
2173
  onlyPatterns,
2125
2174
  ...clientOptions
2126
2175
  }) {
2127
- const stateId = convertCompositionState(state);
2176
+ const stateId = convertStateOption(state);
2128
2177
  async function* getObjects() {
2129
2178
  const componentInstances = paginateAsync(
2130
2179
  async (offset, limit) => (await client.getCompositionList({
@@ -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
  )
@@ -2579,35 +2792,53 @@ var CompositionUpdateModule = {
2579
2792
  const fetch3 = nodeFetchProxy(proxy);
2580
2793
  const client = new UncachedCanvasClient14({ apiKey, apiHost, fetch: fetch3, projectId });
2581
2794
  const file = readFileToObject(filename);
2582
- await client.updateComposition({ ...file, state: convertCompositionState(state) });
2795
+ await client.updateComposition({ ...file, state: convertStateOption(state) });
2796
+ }
2797
+ };
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();
2583
2813
  }
2584
2814
  };
2585
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,37 +3484,52 @@ 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
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3275
- yargs32.positional("id", { demandOption: true, describe: "Entry public ID to fetch" })
3505
+ withStateOptions(
3506
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3507
+ yargs33.positional("id", { demandOption: true, describe: "Entry public ID to fetch" }),
3508
+ // for backwards compatibility, we default to the "published" state, unlike compositions
3509
+ "published"
3510
+ )
3276
3511
  )
3277
3512
  )
3278
3513
  )
3279
3514
  ),
3280
- handler: async ({ apiHost, apiKey, proxy, id, format, filename, project: projectId }) => {
3515
+ handler: async ({
3516
+ apiHost,
3517
+ edgeApiHost,
3518
+ apiKey,
3519
+ proxy,
3520
+ id,
3521
+ format,
3522
+ filename,
3523
+ project: projectId,
3524
+ state
3525
+ }) => {
3281
3526
  const fetch3 = nodeFetchProxy(proxy);
3282
- const client = new ContentClient7({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
3527
+ const client = new ContentClient7({ apiKey, apiHost, edgeApiHost, fetch: fetch3, projectId, bypassCache: true });
3283
3528
  const res = await client.getEntries({
3284
3529
  offset: 0,
3285
3530
  limit: 1,
3286
3531
  entryIDs: [id],
3532
+ state: convertStateOption(state),
3287
3533
  skipOverridesResolution: true,
3288
3534
  skipPatternResolution: true,
3289
3535
  skipDataResolution: true
@@ -3300,13 +3546,26 @@ import { ContentClient as ContentClient8 } from "@uniformdev/canvas";
3300
3546
  var EntryListModule = {
3301
3547
  command: "list",
3302
3548
  describe: "List entries",
3303
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
3304
- handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3549
+ builder: (yargs33) => withConfiguration(
3550
+ withFormatOptions(
3551
+ withApiOptions(
3552
+ withProjectOptions(
3553
+ withStateOptions(
3554
+ yargs33,
3555
+ // for backwards compatibility, we default to the "published" state, unlike compositions
3556
+ "published"
3557
+ )
3558
+ )
3559
+ )
3560
+ )
3561
+ ),
3562
+ handler: async ({ apiHost, edgeApiHost, apiKey, proxy, format, filename, project: projectId, state }) => {
3305
3563
  const fetch3 = nodeFetchProxy(proxy);
3306
- const client = new ContentClient8({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
3564
+ const client = new ContentClient8({ apiKey, apiHost, edgeApiHost, fetch: fetch3, projectId, bypassCache: true });
3307
3565
  const res = await client.getEntries({
3308
3566
  offset: 0,
3309
3567
  limit: 1e3,
3568
+ state: convertStateOption(state),
3310
3569
  skipOverridesResolution: true,
3311
3570
  skipPatternResolution: true,
3312
3571
  skipDataResolution: true
@@ -3333,7 +3592,7 @@ function createEntryEngineDataSource({
3333
3592
  onlyPatterns,
3334
3593
  entryIDs
3335
3594
  }) {
3336
- const stateId = convertCompositionState(state);
3595
+ const stateId = convertStateOption(state);
3337
3596
  async function* getObjects() {
3338
3597
  const entries = paginateAsync(
3339
3598
  async (offset, limit) => (await client.getEntries({
@@ -3374,11 +3633,11 @@ function createEntryEngineDataSource({
3374
3633
  var EntryPublishModule = {
3375
3634
  command: "publish [ids]",
3376
3635
  describe: "Publishes entry(ies)",
3377
- builder: (yargs32) => withConfiguration(
3636
+ builder: (yargs33) => withConfiguration(
3378
3637
  withApiOptions(
3379
3638
  withProjectOptions(
3380
3639
  withDiffOptions(
3381
- yargs32.positional("ids", {
3640
+ yargs33.positional("ids", {
3382
3641
  describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
3383
3642
  type: "string"
3384
3643
  }).option("all", {
@@ -3391,51 +3650,30 @@ var EntryPublishModule = {
3391
3650
  describe: "What-if mode reports what would be done but does not perform any publishing",
3392
3651
  default: false,
3393
3652
  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
3653
  })
3404
3654
  )
3405
3655
  )
3406
3656
  )
3407
3657
  ),
3408
- handler: async ({
3409
- apiHost,
3410
- apiKey,
3411
- proxy,
3412
- ids,
3413
- all,
3414
- whatIf,
3415
- project: projectId,
3416
- onlyEntries,
3417
- onlyPatterns
3418
- }) => {
3658
+ handler: async ({ apiHost, edgeApiHost, apiKey, proxy, ids, all, whatIf, project: projectId }) => {
3419
3659
  if (!all && !ids || all && ids) {
3420
3660
  console.error(`Specify --all or entry ID(s) to publish.`);
3421
3661
  process.exit(1);
3422
3662
  }
3423
3663
  const entryIDsArray = ids ? ids.split(",").map((id) => id.trim()) : void 0;
3424
3664
  const fetch3 = nodeFetchProxy(proxy);
3425
- const client = new ContentClient10({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
3665
+ const client = new ContentClient10({ apiKey, apiHost, edgeApiHost, fetch: fetch3, projectId, bypassCache: true });
3426
3666
  const source = createEntryEngineDataSource({
3427
3667
  client,
3428
3668
  state: "preview",
3429
3669
  entryIDs: entryIDsArray,
3430
- onlyEntries,
3431
- onlyPatterns
3670
+ onlyEntries: true
3432
3671
  });
3433
3672
  const target = createEntryEngineDataSource({
3434
3673
  client,
3435
3674
  state: "published",
3436
3675
  entryIDs: entryIDsArray,
3437
- onlyEntries,
3438
- onlyPatterns
3676
+ onlyEntries: true
3439
3677
  });
3440
3678
  await syncEngine({
3441
3679
  source,
@@ -3454,12 +3692,12 @@ import { UncachedFileClient as UncachedFileClient5 } from "@uniformdev/files";
3454
3692
  var EntryPullModule = {
3455
3693
  command: "pull <directory>",
3456
3694
  describe: "Pulls all entries to local files in a directory",
3457
- builder: (yargs32) => withConfiguration(
3695
+ builder: (yargs33) => withConfiguration(
3458
3696
  withApiOptions(
3459
3697
  withProjectOptions(
3460
3698
  withStateOptions(
3461
3699
  withDiffOptions(
3462
- yargs32.positional("directory", {
3700
+ yargs33.positional("directory", {
3463
3701
  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
3702
  type: "string"
3465
3703
  }).option("format", {
@@ -3507,7 +3745,7 @@ var EntryPullModule = {
3507
3745
  bypassCache: true
3508
3746
  });
3509
3747
  const fileClient = new UncachedFileClient5({ apiKey, apiHost, fetch: fetch3, projectId });
3510
- const source = createEntryEngineDataSource({ client, state });
3748
+ const source = createEntryEngineDataSource({ client, state, onlyEntries: true });
3511
3749
  let target;
3512
3750
  const isPackage = isPathAPackageFile(directory);
3513
3751
  if (isPackage) {
@@ -3558,12 +3796,12 @@ import { UncachedFileClient as UncachedFileClient6 } from "@uniformdev/files";
3558
3796
  var EntryPushModule = {
3559
3797
  command: "push <directory>",
3560
3798
  describe: "Pushes all entries from files in a directory to Uniform",
3561
- builder: (yargs32) => withConfiguration(
3799
+ builder: (yargs33) => withConfiguration(
3562
3800
  withApiOptions(
3563
3801
  withProjectOptions(
3564
3802
  withStateOptions(
3565
3803
  withDiffOptions(
3566
- yargs32.positional("directory", {
3804
+ yargs33.positional("directory", {
3567
3805
  describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
3568
3806
  type: "string"
3569
3807
  }).option("what-if", {
@@ -3619,7 +3857,7 @@ var EntryPushModule = {
3619
3857
  selectDisplayName: selectEntryDisplayName
3620
3858
  });
3621
3859
  }
3622
- const target = createEntryEngineDataSource({ client, state });
3860
+ const target = createEntryEngineDataSource({ client, state, onlyEntries: true });
3623
3861
  const fileClient = new UncachedFileClient6({ apiKey, apiHost, fetch: fetch3, projectId });
3624
3862
  await syncEngine({
3625
3863
  source,
@@ -3649,10 +3887,10 @@ var EntryRemoveModule = {
3649
3887
  command: "remove <id>",
3650
3888
  aliases: ["delete", "rm"],
3651
3889
  describe: "Delete an entry",
3652
- builder: (yargs32) => withConfiguration(
3890
+ builder: (yargs33) => withConfiguration(
3653
3891
  withApiOptions(
3654
3892
  withProjectOptions(
3655
- yargs32.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
3893
+ yargs33.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
3656
3894
  )
3657
3895
  )
3658
3896
  ),
@@ -3669,10 +3907,10 @@ import { diffJson as diffJson3 } from "diff";
3669
3907
  var EntryUnpublishModule = {
3670
3908
  command: "unpublish [ids]",
3671
3909
  describe: "Unpublish an entry(ies)",
3672
- builder: (yargs32) => withConfiguration(
3910
+ builder: (yargs33) => withConfiguration(
3673
3911
  withApiOptions(
3674
3912
  withProjectOptions(
3675
- yargs32.positional("ids", {
3913
+ yargs33.positional("ids", {
3676
3914
  describe: "Un-publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
3677
3915
  type: "string"
3678
3916
  }).option("all", {
@@ -3685,30 +3923,11 @@ var EntryUnpublishModule = {
3685
3923
  describe: "What-if mode reports what would be done but does not perform any un-publishing",
3686
3924
  default: false,
3687
3925
  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
3926
  })
3698
3927
  )
3699
3928
  )
3700
3929
  ),
3701
- handler: async ({
3702
- apiHost,
3703
- apiKey,
3704
- proxy,
3705
- ids,
3706
- all,
3707
- onlyEntries,
3708
- onlyPatterns,
3709
- project: projectId,
3710
- whatIf
3711
- }) => {
3930
+ handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf }) => {
3712
3931
  if (!all && !ids || all && ids) {
3713
3932
  console.error(`Specify --all or entry ID(s) to publish.`);
3714
3933
  process.exit(1);
@@ -3721,15 +3940,13 @@ var EntryUnpublishModule = {
3721
3940
  client,
3722
3941
  state: "published",
3723
3942
  entryIDs: entryIDsArray,
3724
- onlyEntries,
3725
- onlyPatterns
3943
+ onlyEntries: true
3726
3944
  });
3727
3945
  const target = createEntryEngineDataSource({
3728
3946
  client,
3729
3947
  state: "preview",
3730
3948
  entryIDs: entryIDsArray,
3731
- onlyEntries,
3732
- onlyPatterns
3949
+ onlyEntries: true
3733
3950
  });
3734
3951
  const actions = [];
3735
3952
  const log = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
@@ -3766,18 +3983,20 @@ var EntryUpdateModule = {
3766
3983
  command: "update <filename>",
3767
3984
  aliases: ["put"],
3768
3985
  describe: "Insert or update an entry",
3769
- builder: (yargs32) => withConfiguration(
3986
+ builder: (yargs33) => withConfiguration(
3770
3987
  withApiOptions(
3771
3988
  withProjectOptions(
3772
- yargs32.positional("filename", { demandOption: true, describe: "Entry file to put" })
3989
+ withStateOptions(
3990
+ yargs33.positional("filename", { demandOption: true, describe: "Entry file to put" })
3991
+ )
3773
3992
  )
3774
3993
  )
3775
3994
  ),
3776
- handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
3995
+ handler: async ({ apiHost, edgeApiHost, apiKey, proxy, filename, project: projectId, state }) => {
3777
3996
  const fetch3 = nodeFetchProxy(proxy);
3778
- const client = new ContentClient15({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
3997
+ const client = new ContentClient15({ apiKey, apiHost, edgeApiHost, fetch: fetch3, projectId, bypassCache: true });
3779
3998
  const file = readFileToObject(filename);
3780
- await client.upsertEntry(file);
3999
+ await client.upsertEntry({ ...file, state: convertStateOption(state) });
3781
4000
  }
3782
4001
  };
3783
4002
 
@@ -3785,14 +4004,464 @@ var EntryUpdateModule = {
3785
4004
  var EntryModule = {
3786
4005
  command: "entry <command>",
3787
4006
  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(),
4007
+ builder: (yargs33) => yargs33.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).command(EntryPublishModule).command(EntryUnpublishModule).demandCommand(),
3789
4008
  handler: () => {
3790
- yargs8.help();
4009
+ yargs9.help();
4010
+ }
4011
+ };
4012
+
4013
+ // src/commands/canvas/commands/entryPattern.ts
4014
+ import yargs10 from "yargs";
4015
+
4016
+ // src/commands/canvas/commands/entryPattern/get.ts
4017
+ import { ContentClient as ContentClient16 } from "@uniformdev/canvas";
4018
+ var EntryPatternGetModule = {
4019
+ command: "get <id>",
4020
+ describe: "Get an entry pattern",
4021
+ builder: (yargs33) => withConfiguration(
4022
+ withFormatOptions(
4023
+ withApiOptions(
4024
+ withProjectOptions(
4025
+ withStateOptions(
4026
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4027
+ yargs33.positional("id", {
4028
+ demandOption: true,
4029
+ describe: "Entry pattern public ID to fetch"
4030
+ }),
4031
+ "published"
4032
+ )
4033
+ )
4034
+ )
4035
+ )
4036
+ ),
4037
+ handler: async ({ apiHost, apiKey, proxy, id, format, filename, project: projectId, state }) => {
4038
+ const fetch3 = nodeFetchProxy(proxy);
4039
+ const client = new ContentClient16({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
4040
+ const res = await client.getEntries({
4041
+ offset: 0,
4042
+ limit: 1,
4043
+ entryIDs: [id],
4044
+ state: convertStateOption(state),
4045
+ skipOverridesResolution: true,
4046
+ skipPatternResolution: true,
4047
+ skipDataResolution: true,
4048
+ pattern: true
4049
+ });
4050
+ if (res.entries.length !== 1) {
4051
+ throw new Error(`Entry pattern with ID ${id} not found`);
4052
+ }
4053
+ emitWithFormat(res.entries[0], format, filename);
4054
+ }
4055
+ };
4056
+
4057
+ // src/commands/canvas/commands/entryPattern/list.ts
4058
+ import { ContentClient as ContentClient17 } from "@uniformdev/canvas";
4059
+ var EntryPatternListModule = {
4060
+ command: "list",
4061
+ describe: "List entry patterns",
4062
+ builder: (yargs33) => withConfiguration(
4063
+ withFormatOptions(withApiOptions(withProjectOptions(withStateOptions(yargs33, "published"))))
4064
+ ),
4065
+ handler: async ({ apiHost, edgeApiHost, apiKey, proxy, format, filename, project: projectId, state }) => {
4066
+ const fetch3 = nodeFetchProxy(proxy);
4067
+ const client = new ContentClient17({ apiKey, apiHost, edgeApiHost, fetch: fetch3, projectId, bypassCache: true });
4068
+ const res = await client.getEntries({
4069
+ offset: 0,
4070
+ limit: 1e3,
4071
+ state: convertStateOption(state),
4072
+ skipOverridesResolution: true,
4073
+ skipPatternResolution: true,
4074
+ skipDataResolution: true,
4075
+ pattern: true
4076
+ });
4077
+ emitWithFormat(res.entries, format, filename);
4078
+ }
4079
+ };
4080
+
4081
+ // src/commands/canvas/commands/entryPattern/publish.ts
4082
+ import { ContentClient as ContentClient18 } from "@uniformdev/canvas";
4083
+ var EntryPatternPublishModule = {
4084
+ command: "publish [ids]",
4085
+ describe: "Publishes entry pattern(s)",
4086
+ builder: (yargs33) => withConfiguration(
4087
+ withApiOptions(
4088
+ withProjectOptions(
4089
+ withDiffOptions(
4090
+ yargs33.positional("ids", {
4091
+ describe: "Publishes entry pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
4092
+ type: "string"
4093
+ }).option("all", {
4094
+ alias: ["a"],
4095
+ describe: "Publishes all entry patterns. Use --ids to publish selected entry patterns instead.",
4096
+ default: false,
4097
+ type: "boolean"
4098
+ }).option("what-if", {
4099
+ alias: ["w"],
4100
+ describe: "What-if mode reports what would be done but does not perform any publishing",
4101
+ default: false,
4102
+ type: "boolean"
4103
+ })
4104
+ )
4105
+ )
4106
+ )
4107
+ ),
4108
+ handler: async ({ apiHost, edgeApiHost, apiKey, proxy, ids, all, whatIf, project: projectId }) => {
4109
+ if (!all && !ids || all && ids) {
4110
+ console.error(`Specify --all or entry pattern ID(s) to publish.`);
4111
+ process.exit(1);
4112
+ }
4113
+ const entryIDsArray = ids ? ids.split(",").map((id) => id.trim()) : void 0;
4114
+ const fetch3 = nodeFetchProxy(proxy);
4115
+ const client = new ContentClient18({ apiKey, apiHost, edgeApiHost, fetch: fetch3, projectId, bypassCache: true });
4116
+ const source = createEntryEngineDataSource({
4117
+ client,
4118
+ state: "preview",
4119
+ entryIDs: entryIDsArray,
4120
+ onlyPatterns: true
4121
+ });
4122
+ const target = createEntryEngineDataSource({
4123
+ client,
4124
+ state: "published",
4125
+ entryIDs: entryIDsArray,
4126
+ onlyPatterns: true
4127
+ });
4128
+ await syncEngine({
4129
+ source,
4130
+ target,
4131
+ // Publishing is one-direction operation, so no need to support automatic un-publishing
4132
+ mode: "createOrUpdate",
4133
+ whatIf,
4134
+ log: createPublishStatusSyncEngineConsoleLogger({ status: "publish" })
4135
+ });
4136
+ }
4137
+ };
4138
+
4139
+ // src/commands/canvas/commands/entryPattern/pull.ts
4140
+ import { ContentClient as ContentClient19 } from "@uniformdev/canvas";
4141
+ import { UncachedFileClient as UncachedFileClient7 } from "@uniformdev/files";
4142
+ var EntryPatternPullModule = {
4143
+ command: "pull <directory>",
4144
+ describe: "Pulls all entry patterns to local files in a directory",
4145
+ builder: (yargs33) => withConfiguration(
4146
+ withApiOptions(
4147
+ withProjectOptions(
4148
+ withStateOptions(
4149
+ withDiffOptions(
4150
+ yargs33.positional("directory", {
4151
+ 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.",
4152
+ type: "string"
4153
+ }).option("format", {
4154
+ alias: ["f"],
4155
+ describe: "Output format",
4156
+ default: "yaml",
4157
+ choices: ["yaml", "json"],
4158
+ type: "string"
4159
+ }).option("what-if", {
4160
+ alias: ["w"],
4161
+ describe: "What-if mode reports what would be done but changes no files",
4162
+ default: false,
4163
+ type: "boolean"
4164
+ }).option("mode", {
4165
+ alias: ["m"],
4166
+ 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',
4167
+ choices: ["create", "createOrUpdate", "mirror"],
4168
+ default: "mirror",
4169
+ type: "string"
4170
+ })
4171
+ )
4172
+ )
4173
+ )
4174
+ )
4175
+ ),
4176
+ handler: async ({
4177
+ apiHost,
4178
+ apiKey,
4179
+ proxy,
4180
+ directory,
4181
+ format,
4182
+ mode,
4183
+ whatIf,
4184
+ state,
4185
+ project: projectId,
4186
+ diff: diffMode,
4187
+ allowEmptySource
4188
+ }) => {
4189
+ const fetch3 = nodeFetchProxy(proxy);
4190
+ const client = new ContentClient19({
4191
+ apiKey,
4192
+ apiHost,
4193
+ fetch: fetch3,
4194
+ projectId,
4195
+ bypassCache: true
4196
+ });
4197
+ const fileClient = new UncachedFileClient7({ apiKey, apiHost, fetch: fetch3, projectId });
4198
+ const source = createEntryEngineDataSource({ client, state, onlyPatterns: true });
4199
+ let target;
4200
+ const isPackage = isPathAPackageFile(directory);
4201
+ if (isPackage) {
4202
+ const packageContents = readCanvasPackage(directory, false);
4203
+ target = await createArraySyncEngineDataSource({
4204
+ objects: packageContents.entries ?? [],
4205
+ selectIdentifier: selectEntryIdentifier,
4206
+ selectDisplayName: selectEntryDisplayName,
4207
+ onSyncComplete: async (_, synced) => {
4208
+ packageContents.entries = synced;
4209
+ writeCanvasPackage(directory, packageContents);
4210
+ }
4211
+ });
4212
+ } else {
4213
+ target = await createFileSyncEngineDataSource({
4214
+ directory,
4215
+ selectIdentifier: selectEntryIdentifier,
4216
+ selectDisplayName: selectEntryDisplayName,
4217
+ format
4218
+ });
4219
+ }
4220
+ await syncEngine({
4221
+ source,
4222
+ target,
4223
+ mode,
4224
+ whatIf,
4225
+ allowEmptySource: allowEmptySource ?? true,
4226
+ log: createSyncEngineConsoleLogger({ diffMode }),
4227
+ onBeforeCompareObjects: async (sourceObject, targetObject) => {
4228
+ return replaceRemoteUrlsWithLocalReferences(sourceObject, targetObject, {
4229
+ directory,
4230
+ fileClient
4231
+ });
4232
+ },
4233
+ onBeforeWriteObject: async (sourceObject) => {
4234
+ return extractAndDownloadUniformFilesForObject(sourceObject, {
4235
+ directory,
4236
+ fileClient
4237
+ });
4238
+ }
4239
+ });
4240
+ }
4241
+ };
4242
+
4243
+ // src/commands/canvas/commands/entryPattern/push.ts
4244
+ import { ContentClient as ContentClient20 } from "@uniformdev/canvas";
4245
+ import { UncachedFileClient as UncachedFileClient8 } from "@uniformdev/files";
4246
+ var EntryPatternPushModule = {
4247
+ command: "push <directory>",
4248
+ describe: "Pushes all entry patterns from files in a directory to Uniform",
4249
+ builder: (yargs33) => withConfiguration(
4250
+ withApiOptions(
4251
+ withProjectOptions(
4252
+ withStateOptions(
4253
+ withDiffOptions(
4254
+ yargs33.positional("directory", {
4255
+ describe: "Directory to read the entry patterns from. If a filename is used, a package will be read instead.",
4256
+ type: "string"
4257
+ }).option("what-if", {
4258
+ alias: ["w"],
4259
+ describe: "What-if mode reports what would be done but changes nothing",
4260
+ default: false,
4261
+ type: "boolean"
4262
+ }).option("mode", {
4263
+ alias: ["m"],
4264
+ 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',
4265
+ choices: ["create", "createOrUpdate", "mirror"],
4266
+ default: "mirror",
4267
+ type: "string"
4268
+ })
4269
+ )
4270
+ )
4271
+ )
4272
+ )
4273
+ ),
4274
+ handler: async ({
4275
+ apiHost,
4276
+ apiKey,
4277
+ proxy,
4278
+ directory,
4279
+ mode,
4280
+ whatIf,
4281
+ state,
4282
+ project: projectId,
4283
+ diff: diffMode,
4284
+ allowEmptySource
4285
+ }) => {
4286
+ const fetch3 = nodeFetchProxy(proxy);
4287
+ const client = new ContentClient20({
4288
+ apiKey,
4289
+ apiHost,
4290
+ fetch: fetch3,
4291
+ projectId,
4292
+ bypassCache: true
4293
+ });
4294
+ let source;
4295
+ const isPackage = isPathAPackageFile(directory);
4296
+ if (isPackage) {
4297
+ const packageContents = readCanvasPackage(directory, true);
4298
+ source = await createArraySyncEngineDataSource({
4299
+ objects: packageContents.entries ?? [],
4300
+ selectIdentifier: selectEntryIdentifier,
4301
+ selectDisplayName: selectEntryDisplayName
4302
+ });
4303
+ } else {
4304
+ source = await createFileSyncEngineDataSource({
4305
+ directory,
4306
+ selectIdentifier: selectEntryIdentifier,
4307
+ selectDisplayName: selectEntryDisplayName
4308
+ });
4309
+ }
4310
+ const target = createEntryEngineDataSource({ client, state, onlyPatterns: true });
4311
+ const fileClient = new UncachedFileClient8({ apiKey, apiHost, fetch: fetch3, projectId });
4312
+ await syncEngine({
4313
+ source,
4314
+ target,
4315
+ mode,
4316
+ whatIf,
4317
+ allowEmptySource,
4318
+ log: createSyncEngineConsoleLogger({ diffMode }),
4319
+ onBeforeCompareObjects: async (sourceObject) => {
4320
+ return swapOutUniformFileUrlsForTargetProject(sourceObject, {
4321
+ fileClient
4322
+ });
4323
+ },
4324
+ onBeforeWriteObject: async (sourceObject) => {
4325
+ return extractAndUploadUniformFilesForObject(sourceObject, {
4326
+ directory,
4327
+ fileClient
4328
+ });
4329
+ }
4330
+ });
4331
+ }
4332
+ };
4333
+
4334
+ // src/commands/canvas/commands/entryPattern/remove.ts
4335
+ import { ContentClient as ContentClient21 } from "@uniformdev/canvas";
4336
+ var EntryPatternRemoveModule = {
4337
+ command: "remove <id>",
4338
+ aliases: ["delete", "rm"],
4339
+ describe: "Delete an entry pattern",
4340
+ builder: (yargs33) => withConfiguration(
4341
+ withApiOptions(
4342
+ withProjectOptions(
4343
+ yargs33.positional("id", { demandOption: true, describe: "Entry pattern public ID to delete" })
4344
+ )
4345
+ )
4346
+ ),
4347
+ handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
4348
+ const fetch3 = nodeFetchProxy(proxy);
4349
+ const client = new ContentClient21({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
4350
+ await client.deleteEntry({ entryId: id });
4351
+ }
4352
+ };
4353
+
4354
+ // src/commands/canvas/commands/entryPattern/unpublish.ts
4355
+ import { CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE4, ContentClient as ContentClient22 } from "@uniformdev/canvas";
4356
+ import { diffJson as diffJson4 } from "diff";
4357
+ var EntryPatternUnpublishModule = {
4358
+ command: "unpublish [ids]",
4359
+ describe: "Unpublish an entry patterns",
4360
+ builder: (yargs33) => withConfiguration(
4361
+ withApiOptions(
4362
+ withProjectOptions(
4363
+ yargs33.positional("ids", {
4364
+ describe: "Un-publishes entry patterns by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
4365
+ type: "string"
4366
+ }).option("all", {
4367
+ alias: ["a"],
4368
+ describe: "Un-publishes all entry patterns. Use --all to un-publish selected entry patterns instead.",
4369
+ default: false,
4370
+ type: "boolean"
4371
+ }).option("what-if", {
4372
+ alias: ["w"],
4373
+ describe: "What-if mode reports what would be done but does not perform any un-publishing",
4374
+ default: false,
4375
+ type: "boolean"
4376
+ })
4377
+ )
4378
+ )
4379
+ ),
4380
+ handler: async ({ apiHost, apiKey, proxy, ids, all, project: projectId, whatIf }) => {
4381
+ if (!all && !ids || all && ids) {
4382
+ console.error(`Specify --all or entry pattern ID(s) to publish.`);
4383
+ process.exit(1);
4384
+ }
4385
+ const entryIDsArray = ids ? ids.split(",").map((id) => id.trim()) : void 0;
4386
+ const targetItems = /* @__PURE__ */ new Map();
4387
+ const fetch3 = nodeFetchProxy(proxy);
4388
+ const client = new ContentClient22({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
4389
+ const source = createEntryEngineDataSource({
4390
+ client,
4391
+ state: "published",
4392
+ entryIDs: entryIDsArray,
4393
+ onlyPatterns: true
4394
+ });
4395
+ const target = createEntryEngineDataSource({
4396
+ client,
4397
+ state: "preview",
4398
+ entryIDs: entryIDsArray,
4399
+ onlyPatterns: true
4400
+ });
4401
+ const actions = [];
4402
+ const log = createPublishStatusSyncEngineConsoleLogger({ status: "unpublish" });
4403
+ for await (const obj of target.objects) {
4404
+ if (Array.isArray(obj.id)) {
4405
+ obj.id.forEach((o) => targetItems.set(o, obj));
4406
+ } else {
4407
+ targetItems.set(obj.id, obj);
4408
+ }
4409
+ }
4410
+ for await (const sourceObject of source.objects) {
4411
+ const id = Array.isArray(sourceObject.id) ? sourceObject.id[0] : sourceObject.id;
4412
+ const targetObject = targetItems.get(id);
4413
+ if (!targetObject) {
4414
+ console.log(`Entry pattern ${id} was not found`);
4415
+ return;
4416
+ }
4417
+ actions.push(client.deleteEntry({ entryId: id, state: CANVAS_PUBLISHED_STATE4 }));
4418
+ log({
4419
+ action: "update",
4420
+ id,
4421
+ providerId: sourceObject.providerId,
4422
+ displayName: sourceObject.displayName ?? sourceObject.providerId,
4423
+ whatIf,
4424
+ diff: diffJson4(targetObject.object, sourceObject.object)
4425
+ });
4426
+ }
4427
+ }
4428
+ };
4429
+
4430
+ // src/commands/canvas/commands/entryPattern/update.ts
4431
+ import { ContentClient as ContentClient23 } from "@uniformdev/canvas";
4432
+ var EntryPatternUpdateModule = {
4433
+ command: "update <filename>",
4434
+ aliases: ["put"],
4435
+ describe: "Insert or update an entry pattern",
4436
+ builder: (yargs33) => withConfiguration(
4437
+ withApiOptions(
4438
+ withProjectOptions(
4439
+ withStateOptions(
4440
+ yargs33.positional("filename", { demandOption: true, describe: "Entry pattern file to put" })
4441
+ )
4442
+ )
4443
+ )
4444
+ ),
4445
+ handler: async ({ apiHost, edgeApiHost, apiKey, proxy, filename, project: projectId, state }) => {
4446
+ const fetch3 = nodeFetchProxy(proxy);
4447
+ const client = new ContentClient23({ apiKey, apiHost, edgeApiHost, fetch: fetch3, projectId, bypassCache: true });
4448
+ const file = readFileToObject(filename);
4449
+ await client.upsertEntry({ ...file, state: convertStateOption(state) });
4450
+ }
4451
+ };
4452
+
4453
+ // src/commands/canvas/commands/entryPattern.ts
4454
+ var EntryPatternModule = {
4455
+ command: "entry-pattern <command>",
4456
+ describe: "Commands for Entry patterns",
4457
+ builder: (yargs33) => yargs33.command(EntryPatternGetModule).command(EntryPatternListModule).command(EntryPatternRemoveModule).command(EntryPatternUpdateModule).command(EntryPatternPullModule).command(EntryPatternPushModule).command(EntryPatternPublishModule).command(EntryPatternUnpublishModule).demandCommand(),
4458
+ handler: () => {
4459
+ yargs10.help();
3791
4460
  }
3792
4461
  };
3793
4462
 
3794
4463
  // src/commands/canvas/commands/locale.ts
3795
- import yargs9 from "yargs";
4464
+ import yargs11 from "yargs";
3796
4465
 
3797
4466
  // src/commands/canvas/commands/locale/pull.ts
3798
4467
  import { LocaleClient } from "@uniformdev/canvas";
@@ -3830,11 +4499,11 @@ function createLocaleEngineDataSource({
3830
4499
  var LocalePullModule = {
3831
4500
  command: "pull <directory>",
3832
4501
  describe: "Pulls all locales to local files in a directory",
3833
- builder: (yargs32) => withConfiguration(
4502
+ builder: (yargs33) => withConfiguration(
3834
4503
  withApiOptions(
3835
4504
  withProjectOptions(
3836
4505
  withDiffOptions(
3837
- yargs32.positional("directory", {
4506
+ yargs33.positional("directory", {
3838
4507
  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
4508
  type: "string"
3840
4509
  }).option("format", {
@@ -3917,11 +4586,11 @@ import { LocaleClient as LocaleClient2 } from "@uniformdev/canvas";
3917
4586
  var LocalePushModule = {
3918
4587
  command: "push <directory>",
3919
4588
  describe: "Pushes all locales from files in a directory to Uniform",
3920
- builder: (yargs32) => withConfiguration(
4589
+ builder: (yargs33) => withConfiguration(
3921
4590
  withApiOptions(
3922
4591
  withProjectOptions(
3923
4592
  withDiffOptions(
3924
- yargs32.positional("directory", {
4593
+ yargs33.positional("directory", {
3925
4594
  describe: "Directory to read the locales from. If a filename is used, a package will be read instead.",
3926
4595
  type: "string"
3927
4596
  }).option("what-if", {
@@ -3991,258 +4660,26 @@ var LocalePushModule = {
3991
4660
  var LocaleModule = {
3992
4661
  command: "locale <command>",
3993
4662
  describe: "Commands for locale definitions",
3994
- builder: (yargs32) => yargs32.command(LocalePullModule).command(LocalePushModule),
4663
+ builder: (yargs33) => yargs33.command(LocalePullModule).command(LocalePushModule),
3995
4664
  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();
4665
+ yargs11.help();
4229
4666
  }
4230
4667
  };
4231
4668
 
4232
4669
  // src/commands/canvas/commands/prompts.ts
4233
- import yargs11 from "yargs";
4670
+ import yargs12 from "yargs";
4234
4671
 
4235
4672
  // src/commands/canvas/commands/prompts/get.ts
4236
4673
  import { PromptClient } from "@uniformdev/canvas";
4237
4674
  var PromptGetModule = {
4238
4675
  command: "get <id>",
4239
4676
  describe: "Get a prompt",
4240
- builder: (yargs32) => withConfiguration(
4677
+ builder: (yargs33) => withConfiguration(
4241
4678
  withFormatOptions(
4242
4679
  withApiOptions(
4243
4680
  withProjectOptions(
4244
4681
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
4245
- yargs32.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
4682
+ yargs33.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
4246
4683
  )
4247
4684
  )
4248
4685
  )
@@ -4263,7 +4700,7 @@ import { PromptClient as PromptClient2 } from "@uniformdev/canvas";
4263
4700
  var PromptListModule = {
4264
4701
  command: "list",
4265
4702
  describe: "List prompts",
4266
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
4703
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
4267
4704
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4268
4705
  const fetch3 = nodeFetchProxy(proxy);
4269
4706
  const client = new PromptClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -4310,12 +4747,12 @@ function createPromptEngineDataSource({
4310
4747
  var PromptPullModule = {
4311
4748
  command: "pull <directory>",
4312
4749
  describe: "Pulls all prompts to local files in a directory",
4313
- builder: (yargs32) => withConfiguration(
4750
+ builder: (yargs33) => withConfiguration(
4314
4751
  withApiOptions(
4315
4752
  withProjectOptions(
4316
4753
  withStateOptions(
4317
4754
  withDiffOptions(
4318
- yargs32.positional("directory", {
4755
+ yargs33.positional("directory", {
4319
4756
  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
4757
  type: "string"
4321
4758
  }).option("format", {
@@ -4399,12 +4836,12 @@ import { PromptClient as PromptClient4 } from "@uniformdev/canvas";
4399
4836
  var PromptPushModule = {
4400
4837
  command: "push <directory>",
4401
4838
  describe: "Pushes all prompts from files in a directory to Uniform",
4402
- builder: (yargs32) => withConfiguration(
4839
+ builder: (yargs33) => withConfiguration(
4403
4840
  withApiOptions(
4404
4841
  withProjectOptions(
4405
4842
  withStateOptions(
4406
4843
  withDiffOptions(
4407
- yargs32.positional("directory", {
4844
+ yargs33.positional("directory", {
4408
4845
  describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
4409
4846
  type: "string"
4410
4847
  }).option("what-if", {
@@ -4477,9 +4914,9 @@ var PromptRemoveModule = {
4477
4914
  command: "remove <id>",
4478
4915
  aliases: ["delete", "rm"],
4479
4916
  describe: "Delete a prompt",
4480
- builder: (yargs32) => withConfiguration(
4917
+ builder: (yargs33) => withConfiguration(
4481
4918
  withApiOptions(
4482
- withProjectOptions(yargs32.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
4919
+ withProjectOptions(yargs33.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
4483
4920
  )
4484
4921
  ),
4485
4922
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -4495,10 +4932,10 @@ var PromptUpdateModule = {
4495
4932
  command: "update <filename>",
4496
4933
  aliases: ["put"],
4497
4934
  describe: "Insert or update a prompt",
4498
- builder: (yargs32) => withConfiguration(
4935
+ builder: (yargs33) => withConfiguration(
4499
4936
  withApiOptions(
4500
4937
  withProjectOptions(
4501
- yargs32.positional("filename", { demandOption: true, describe: "Prompt file to put" })
4938
+ yargs33.positional("filename", { demandOption: true, describe: "Prompt file to put" })
4502
4939
  )
4503
4940
  )
4504
4941
  ),
@@ -4515,9 +4952,9 @@ var PromptModule = {
4515
4952
  command: "prompt <command>",
4516
4953
  aliases: ["dt"],
4517
4954
  describe: "Commands for AI Prompt definitions",
4518
- builder: (yargs32) => yargs32.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
4955
+ builder: (yargs33) => yargs33.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
4519
4956
  handler: () => {
4520
- yargs11.help();
4957
+ yargs12.help();
4521
4958
  }
4522
4959
  };
4523
4960
 
@@ -4526,28 +4963,28 @@ var CanvasCommand = {
4526
4963
  command: "canvas <command>",
4527
4964
  aliases: ["cv", "pm", "presentation"],
4528
4965
  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(),
4966
+ 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
4967
  handler: () => {
4531
- yargs12.showHelp();
4968
+ yargs13.showHelp();
4532
4969
  }
4533
4970
  };
4534
4971
 
4535
4972
  // src/commands/context/index.ts
4536
- import yargs19 from "yargs";
4973
+ import yargs20 from "yargs";
4537
4974
 
4538
4975
  // src/commands/context/commands/aggregate.ts
4539
- import yargs13 from "yargs";
4976
+ import yargs14 from "yargs";
4540
4977
 
4541
4978
  // src/commands/context/commands/aggregate/get.ts
4542
4979
  import { UncachedAggregateClient } from "@uniformdev/context/api";
4543
4980
  var AggregateGetModule = {
4544
4981
  command: "get <id>",
4545
4982
  describe: "Fetch an aggregate",
4546
- builder: (yargs32) => withConfiguration(
4983
+ builder: (yargs33) => withConfiguration(
4547
4984
  withFormatOptions(
4548
4985
  withApiOptions(
4549
4986
  withProjectOptions(
4550
- yargs32.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
4987
+ yargs33.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
4551
4988
  )
4552
4989
  )
4553
4990
  )
@@ -4571,7 +5008,7 @@ var AggregateListModule = {
4571
5008
  command: "list",
4572
5009
  describe: "List aggregates",
4573
5010
  aliases: ["ls"],
4574
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
5011
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
4575
5012
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4576
5013
  const fetch3 = nodeFetchProxy(proxy);
4577
5014
  const client = new UncachedAggregateClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -4637,11 +5074,11 @@ function writeContextPackage(filename, packageContents) {
4637
5074
  var AggregatePullModule = {
4638
5075
  command: "pull <directory>",
4639
5076
  describe: "Pulls all aggregates to local files in a directory",
4640
- builder: (yargs32) => withConfiguration(
5077
+ builder: (yargs33) => withConfiguration(
4641
5078
  withApiOptions(
4642
5079
  withProjectOptions(
4643
5080
  withDiffOptions(
4644
- yargs32.positional("directory", {
5081
+ yargs33.positional("directory", {
4645
5082
  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
5083
  type: "string"
4647
5084
  }).option("format", {
@@ -4718,11 +5155,11 @@ import { UncachedAggregateClient as UncachedAggregateClient4 } from "@uniformdev
4718
5155
  var AggregatePushModule = {
4719
5156
  command: "push <directory>",
4720
5157
  describe: "Pushes all aggregates from files in a directory or package to Uniform",
4721
- builder: (yargs32) => withConfiguration(
5158
+ builder: (yargs33) => withConfiguration(
4722
5159
  withApiOptions(
4723
5160
  withProjectOptions(
4724
5161
  withDiffOptions(
4725
- yargs32.positional("directory", {
5162
+ yargs33.positional("directory", {
4726
5163
  describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
4727
5164
  type: "string"
4728
5165
  }).option("what-if", {
@@ -4789,10 +5226,10 @@ var AggregateRemoveModule = {
4789
5226
  command: "remove <id>",
4790
5227
  aliases: ["delete", "rm"],
4791
5228
  describe: "Delete an aggregate",
4792
- builder: (yargs32) => withConfiguration(
5229
+ builder: (yargs33) => withConfiguration(
4793
5230
  withApiOptions(
4794
5231
  withProjectOptions(
4795
- yargs32.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
5232
+ yargs33.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
4796
5233
  )
4797
5234
  )
4798
5235
  ),
@@ -4809,10 +5246,10 @@ var AggregateUpdateModule = {
4809
5246
  command: "update <filename>",
4810
5247
  aliases: ["put"],
4811
5248
  describe: "Insert or update an aggregate",
4812
- builder: (yargs32) => withConfiguration(
5249
+ builder: (yargs33) => withConfiguration(
4813
5250
  withApiOptions(
4814
5251
  withProjectOptions(
4815
- yargs32.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
5252
+ yargs33.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
4816
5253
  )
4817
5254
  )
4818
5255
  ),
@@ -4829,25 +5266,25 @@ var AggregateModule = {
4829
5266
  command: "aggregate <command>",
4830
5267
  aliases: ["agg", "intent", "audience"],
4831
5268
  describe: "Commands for Context aggregates (intents, audiences)",
4832
- builder: (yargs32) => yargs32.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
5269
+ builder: (yargs33) => yargs33.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
4833
5270
  handler: () => {
4834
- yargs13.help();
5271
+ yargs14.help();
4835
5272
  }
4836
5273
  };
4837
5274
 
4838
5275
  // src/commands/context/commands/enrichment.ts
4839
- import yargs14 from "yargs";
5276
+ import yargs15 from "yargs";
4840
5277
 
4841
5278
  // src/commands/context/commands/enrichment/get.ts
4842
5279
  import { UncachedEnrichmentClient } from "@uniformdev/context/api";
4843
5280
  var EnrichmentGetModule = {
4844
5281
  command: "get <id>",
4845
5282
  describe: "Fetch an enrichment category and its values",
4846
- builder: (yargs32) => withFormatOptions(
5283
+ builder: (yargs33) => withFormatOptions(
4847
5284
  withConfiguration(
4848
5285
  withApiOptions(
4849
5286
  withProjectOptions(
4850
- yargs32.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
5287
+ yargs33.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
4851
5288
  )
4852
5289
  )
4853
5290
  )
@@ -4872,7 +5309,7 @@ var EnrichmentListModule = {
4872
5309
  command: "list",
4873
5310
  describe: "List enrichments",
4874
5311
  aliases: ["ls"],
4875
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
5312
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
4876
5313
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4877
5314
  const fetch3 = nodeFetchProxy(proxy);
4878
5315
  const client = new UncachedEnrichmentClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -4973,11 +5410,11 @@ var createEnrichmentValueEngineDataSource = ({
4973
5410
  var EnrichmentPullModule = {
4974
5411
  command: "pull <directory>",
4975
5412
  describe: "Pulls all enrichments to local files in a directory",
4976
- builder: (yargs32) => withConfiguration(
5413
+ builder: (yargs33) => withConfiguration(
4977
5414
  withApiOptions(
4978
5415
  withProjectOptions(
4979
5416
  withDiffOptions(
4980
- yargs32.positional("directory", {
5417
+ yargs33.positional("directory", {
4981
5418
  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
5419
  type: "string"
4983
5420
  }).option("format", {
@@ -5054,11 +5491,11 @@ import { UncachedEnrichmentClient as UncachedEnrichmentClient4 } from "@uniformd
5054
5491
  var EnrichmentPushModule = {
5055
5492
  command: "push <directory>",
5056
5493
  describe: "Pushes all enrichments from files in a directory or package to Uniform",
5057
- builder: (yargs32) => withConfiguration(
5494
+ builder: (yargs33) => withConfiguration(
5058
5495
  withApiOptions(
5059
5496
  withProjectOptions(
5060
5497
  withDiffOptions(
5061
- yargs32.positional("directory", {
5498
+ yargs33.positional("directory", {
5062
5499
  describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
5063
5500
  type: "string"
5064
5501
  }).option("what-if", {
@@ -5124,10 +5561,10 @@ var EnrichmentRemoveModule = {
5124
5561
  command: "remove <id>",
5125
5562
  aliases: ["delete", "rm"],
5126
5563
  describe: "Delete an enrichment category and its values",
5127
- builder: (yargs32) => withConfiguration(
5564
+ builder: (yargs33) => withConfiguration(
5128
5565
  withApiOptions(
5129
5566
  withProjectOptions(
5130
- yargs32.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
5567
+ yargs33.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
5131
5568
  )
5132
5569
  )
5133
5570
  ),
@@ -5143,14 +5580,14 @@ var EnrichmentModule = {
5143
5580
  command: "enrichment <command>",
5144
5581
  aliases: ["enr"],
5145
5582
  describe: "Commands for Context enrichments",
5146
- builder: (yargs32) => yargs32.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
5583
+ builder: (yargs33) => yargs33.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
5147
5584
  handler: () => {
5148
- yargs14.help();
5585
+ yargs15.help();
5149
5586
  }
5150
5587
  };
5151
5588
 
5152
5589
  // src/commands/context/commands/manifest.ts
5153
- import yargs15 from "yargs";
5590
+ import yargs16 from "yargs";
5154
5591
 
5155
5592
  // src/commands/context/commands/manifest/get.ts
5156
5593
  import { ApiClientError, UncachedManifestClient } from "@uniformdev/context/api";
@@ -5161,10 +5598,10 @@ var ManifestGetModule = {
5161
5598
  command: "get [output]",
5162
5599
  aliases: ["dl", "download"],
5163
5600
  describe: "Download the Uniform Context manifest for a project",
5164
- builder: (yargs32) => withConfiguration(
5601
+ builder: (yargs33) => withConfiguration(
5165
5602
  withApiOptions(
5166
5603
  withProjectOptions(
5167
- yargs32.option("preview", {
5604
+ yargs33.option("preview", {
5168
5605
  describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
5169
5606
  default: false,
5170
5607
  type: "boolean",
@@ -5226,7 +5663,7 @@ import { exit as exit2 } from "process";
5226
5663
  var ManifestPublishModule = {
5227
5664
  command: "publish",
5228
5665
  describe: "Publish the Uniform Context manifest for a project",
5229
- builder: (yargs32) => withConfiguration(withApiOptions(withProjectOptions(yargs32))),
5666
+ builder: (yargs33) => withConfiguration(withApiOptions(withProjectOptions(yargs33))),
5230
5667
  handler: async ({ apiKey, apiHost, proxy, project }) => {
5231
5668
  const fetch3 = nodeFetchProxy(proxy);
5232
5669
  try {
@@ -5259,25 +5696,25 @@ var ManifestModule = {
5259
5696
  command: "manifest <command>",
5260
5697
  describe: "Commands for context manifests",
5261
5698
  aliases: ["man"],
5262
- builder: (yargs32) => yargs32.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
5699
+ builder: (yargs33) => yargs33.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
5263
5700
  handler: () => {
5264
- yargs15.help();
5701
+ yargs16.help();
5265
5702
  }
5266
5703
  };
5267
5704
 
5268
5705
  // src/commands/context/commands/quirk.ts
5269
- import yargs16 from "yargs";
5706
+ import yargs17 from "yargs";
5270
5707
 
5271
5708
  // src/commands/context/commands/quirk/get.ts
5272
5709
  import { UncachedQuirkClient } from "@uniformdev/context/api";
5273
5710
  var QuirkGetModule = {
5274
5711
  command: "get <id>",
5275
5712
  describe: "Fetch a quirk",
5276
- builder: (yargs32) => withConfiguration(
5713
+ builder: (yargs33) => withConfiguration(
5277
5714
  withFormatOptions(
5278
5715
  withApiOptions(
5279
5716
  withProjectOptions(
5280
- yargs32.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
5717
+ yargs33.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
5281
5718
  )
5282
5719
  )
5283
5720
  )
@@ -5301,11 +5738,11 @@ var QuirkListModule = {
5301
5738
  command: "list",
5302
5739
  describe: "List quirks",
5303
5740
  aliases: ["ls"],
5304
- builder: (yargs32) => withConfiguration(
5741
+ builder: (yargs33) => withConfiguration(
5305
5742
  withFormatOptions(
5306
5743
  withApiOptions(
5307
5744
  withProjectOptions(
5308
- yargs32.option("withIntegrations", {
5745
+ yargs33.option("withIntegrations", {
5309
5746
  alias: ["i"],
5310
5747
  describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
5311
5748
  type: "boolean"
@@ -5362,11 +5799,11 @@ function createQuirkEngineDataSource({
5362
5799
  var QuirkPullModule = {
5363
5800
  command: "pull <directory>",
5364
5801
  describe: "Pulls all quirks to local files in a directory",
5365
- builder: (yargs32) => withConfiguration(
5802
+ builder: (yargs33) => withConfiguration(
5366
5803
  withApiOptions(
5367
5804
  withProjectOptions(
5368
5805
  withDiffOptions(
5369
- yargs32.positional("directory", {
5806
+ yargs33.positional("directory", {
5370
5807
  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
5808
  type: "string"
5372
5809
  }).option("format", {
@@ -5443,11 +5880,11 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
5443
5880
  var QuirkPushModule = {
5444
5881
  command: "push <directory>",
5445
5882
  describe: "Pushes all quirks from files in a directory or package to Uniform",
5446
- builder: (yargs32) => withConfiguration(
5883
+ builder: (yargs33) => withConfiguration(
5447
5884
  withApiOptions(
5448
5885
  withProjectOptions(
5449
5886
  withDiffOptions(
5450
- yargs32.positional("directory", {
5887
+ yargs33.positional("directory", {
5451
5888
  describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
5452
5889
  type: "string"
5453
5890
  }).option("what-if", {
@@ -5513,10 +5950,10 @@ var QuirkRemoveModule = {
5513
5950
  command: "remove <id>",
5514
5951
  aliases: ["delete", "rm"],
5515
5952
  describe: "Delete a quirk",
5516
- builder: (yargs32) => withConfiguration(
5953
+ builder: (yargs33) => withConfiguration(
5517
5954
  withApiOptions(
5518
5955
  withProjectOptions(
5519
- yargs32.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
5956
+ yargs33.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
5520
5957
  )
5521
5958
  )
5522
5959
  ),
@@ -5533,10 +5970,10 @@ var QuirkUpdateModule = {
5533
5970
  command: "update <filename>",
5534
5971
  aliases: ["put"],
5535
5972
  describe: "Insert or update a quirk",
5536
- builder: (yargs32) => withConfiguration(
5973
+ builder: (yargs33) => withConfiguration(
5537
5974
  withApiOptions(
5538
5975
  withProjectOptions(
5539
- yargs32.positional("filename", { demandOption: true, describe: "Quirk file to put" })
5976
+ yargs33.positional("filename", { demandOption: true, describe: "Quirk file to put" })
5540
5977
  )
5541
5978
  )
5542
5979
  ),
@@ -5553,25 +5990,25 @@ var QuirkModule = {
5553
5990
  command: "quirk <command>",
5554
5991
  aliases: ["qk"],
5555
5992
  describe: "Commands for Context quirks",
5556
- builder: (yargs32) => yargs32.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
5993
+ builder: (yargs33) => yargs33.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
5557
5994
  handler: () => {
5558
- yargs16.help();
5995
+ yargs17.help();
5559
5996
  }
5560
5997
  };
5561
5998
 
5562
5999
  // src/commands/context/commands/signal.ts
5563
- import yargs17 from "yargs";
6000
+ import yargs18 from "yargs";
5564
6001
 
5565
6002
  // src/commands/context/commands/signal/get.ts
5566
6003
  import { UncachedSignalClient } from "@uniformdev/context/api";
5567
6004
  var SignalGetModule = {
5568
6005
  command: "get <id>",
5569
6006
  describe: "Fetch a signal",
5570
- builder: (yargs32) => withConfiguration(
6007
+ builder: (yargs33) => withConfiguration(
5571
6008
  withFormatOptions(
5572
6009
  withApiOptions(
5573
6010
  withProjectOptions(
5574
- yargs32.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
6011
+ yargs33.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
5575
6012
  )
5576
6013
  )
5577
6014
  )
@@ -5595,7 +6032,7 @@ var SignalListModule = {
5595
6032
  command: "list",
5596
6033
  describe: "List signals",
5597
6034
  aliases: ["ls"],
5598
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
6035
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
5599
6036
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5600
6037
  const fetch3 = nodeFetchProxy(proxy);
5601
6038
  const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5644,11 +6081,11 @@ function createSignalEngineDataSource({
5644
6081
  var SignalPullModule = {
5645
6082
  command: "pull <directory>",
5646
6083
  describe: "Pulls all signals to local files in a directory",
5647
- builder: (yargs32) => withConfiguration(
6084
+ builder: (yargs33) => withConfiguration(
5648
6085
  withApiOptions(
5649
6086
  withProjectOptions(
5650
6087
  withDiffOptions(
5651
- yargs32.positional("directory", {
6088
+ yargs33.positional("directory", {
5652
6089
  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
6090
  type: "string"
5654
6091
  }).option("format", {
@@ -5725,11 +6162,11 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
5725
6162
  var SignalPushModule = {
5726
6163
  command: "push <directory>",
5727
6164
  describe: "Pushes all signals from files in a directory or package to Uniform",
5728
- builder: (yargs32) => withConfiguration(
6165
+ builder: (yargs33) => withConfiguration(
5729
6166
  withApiOptions(
5730
6167
  withProjectOptions(
5731
6168
  withDiffOptions(
5732
- yargs32.positional("directory", {
6169
+ yargs33.positional("directory", {
5733
6170
  describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
5734
6171
  type: "string"
5735
6172
  }).option("what-if", {
@@ -5795,10 +6232,10 @@ var SignalRemoveModule = {
5795
6232
  command: "remove <id>",
5796
6233
  aliases: ["delete", "rm"],
5797
6234
  describe: "Delete a signal",
5798
- builder: (yargs32) => withConfiguration(
6235
+ builder: (yargs33) => withConfiguration(
5799
6236
  withApiOptions(
5800
6237
  withProjectOptions(
5801
- yargs32.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
6238
+ yargs33.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
5802
6239
  )
5803
6240
  )
5804
6241
  ),
@@ -5815,10 +6252,10 @@ var SignalUpdateModule = {
5815
6252
  command: "update <filename>",
5816
6253
  aliases: ["put"],
5817
6254
  describe: "Insert or update a signal",
5818
- builder: (yargs32) => withConfiguration(
6255
+ builder: (yargs33) => withConfiguration(
5819
6256
  withApiOptions(
5820
6257
  withProjectOptions(
5821
- yargs32.positional("filename", { demandOption: true, describe: "Signal file to put" })
6258
+ yargs33.positional("filename", { demandOption: true, describe: "Signal file to put" })
5822
6259
  )
5823
6260
  )
5824
6261
  ),
@@ -5835,25 +6272,25 @@ var SignalModule = {
5835
6272
  command: "signal <command>",
5836
6273
  aliases: ["sig"],
5837
6274
  describe: "Commands for Context signals",
5838
- builder: (yargs32) => yargs32.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
6275
+ builder: (yargs33) => yargs33.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
5839
6276
  handler: () => {
5840
- yargs17.help();
6277
+ yargs18.help();
5841
6278
  }
5842
6279
  };
5843
6280
 
5844
6281
  // src/commands/context/commands/test.ts
5845
- import yargs18 from "yargs";
6282
+ import yargs19 from "yargs";
5846
6283
 
5847
6284
  // src/commands/context/commands/test/get.ts
5848
6285
  import { UncachedTestClient } from "@uniformdev/context/api";
5849
6286
  var TestGetModule = {
5850
6287
  command: "get <id>",
5851
6288
  describe: "Fetch a test",
5852
- builder: (yargs32) => withConfiguration(
6289
+ builder: (yargs33) => withConfiguration(
5853
6290
  withFormatOptions(
5854
6291
  withApiOptions(
5855
6292
  withProjectOptions(
5856
- yargs32.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
6293
+ yargs33.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
5857
6294
  )
5858
6295
  )
5859
6296
  )
@@ -5877,7 +6314,7 @@ var TestListModule = {
5877
6314
  command: "list",
5878
6315
  describe: "List tests",
5879
6316
  aliases: ["ls"],
5880
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
6317
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
5881
6318
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5882
6319
  const fetch3 = nodeFetchProxy(proxy);
5883
6320
  const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5926,11 +6363,11 @@ function createTestEngineDataSource({
5926
6363
  var TestPullModule = {
5927
6364
  command: "pull <directory>",
5928
6365
  describe: "Pulls all tests to local files in a directory",
5929
- builder: (yargs32) => withConfiguration(
6366
+ builder: (yargs33) => withConfiguration(
5930
6367
  withApiOptions(
5931
6368
  withProjectOptions(
5932
6369
  withDiffOptions(
5933
- yargs32.positional("directory", {
6370
+ yargs33.positional("directory", {
5934
6371
  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
6372
  type: "string"
5936
6373
  }).option("format", {
@@ -6007,11 +6444,11 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
6007
6444
  var TestPushModule = {
6008
6445
  command: "push <directory>",
6009
6446
  describe: "Pushes all tests from files in a directory or package to Uniform",
6010
- builder: (yargs32) => withConfiguration(
6447
+ builder: (yargs33) => withConfiguration(
6011
6448
  withApiOptions(
6012
6449
  withProjectOptions(
6013
6450
  withDiffOptions(
6014
- yargs32.positional("directory", {
6451
+ yargs33.positional("directory", {
6015
6452
  describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
6016
6453
  type: "string"
6017
6454
  }).option("what-if", {
@@ -6077,10 +6514,10 @@ var TestRemoveModule = {
6077
6514
  command: "remove <id>",
6078
6515
  aliases: ["delete", "rm"],
6079
6516
  describe: "Delete a test",
6080
- builder: (yargs32) => withConfiguration(
6517
+ builder: (yargs33) => withConfiguration(
6081
6518
  withApiOptions(
6082
6519
  withProjectOptions(
6083
- yargs32.positional("id", { demandOption: true, describe: "Test public ID to delete" })
6520
+ yargs33.positional("id", { demandOption: true, describe: "Test public ID to delete" })
6084
6521
  )
6085
6522
  )
6086
6523
  ),
@@ -6097,9 +6534,9 @@ var TestUpdateModule = {
6097
6534
  command: "update <filename>",
6098
6535
  aliases: ["put"],
6099
6536
  describe: "Insert or update a test",
6100
- builder: (yargs32) => withConfiguration(
6537
+ builder: (yargs33) => withConfiguration(
6101
6538
  withApiOptions(
6102
- withProjectOptions(yargs32.positional("filename", { demandOption: true, describe: "Test file to put" }))
6539
+ withProjectOptions(yargs33.positional("filename", { demandOption: true, describe: "Test file to put" }))
6103
6540
  )
6104
6541
  ),
6105
6542
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -6114,9 +6551,9 @@ var TestUpdateModule = {
6114
6551
  var TestModule = {
6115
6552
  command: "test <command>",
6116
6553
  describe: "Commands for Context A/B tests",
6117
- builder: (yargs32) => yargs32.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
6554
+ builder: (yargs33) => yargs33.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
6118
6555
  handler: () => {
6119
- yargs18.help();
6556
+ yargs19.help();
6120
6557
  }
6121
6558
  };
6122
6559
 
@@ -6125,20 +6562,20 @@ var ContextCommand = {
6125
6562
  command: "context <command>",
6126
6563
  aliases: ["ctx"],
6127
6564
  describe: "Uniform Context commands",
6128
- builder: (yargs32) => yargs32.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
6565
+ builder: (yargs33) => yargs33.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
6129
6566
  handler: () => {
6130
- yargs19.showHelp();
6567
+ yargs20.showHelp();
6131
6568
  }
6132
6569
  };
6133
6570
 
6134
6571
  // src/commands/integration/index.ts
6135
- import yargs22 from "yargs";
6572
+ import yargs23 from "yargs";
6136
6573
 
6137
6574
  // src/commands/integration/commands/definition.ts
6138
- import yargs21 from "yargs";
6575
+ import yargs22 from "yargs";
6139
6576
 
6140
6577
  // src/commands/integration/commands/definition/edgehancer/edgehancer.ts
6141
- import yargs20 from "yargs";
6578
+ import yargs21 from "yargs";
6142
6579
 
6143
6580
  // src/commands/integration/commands/definition/edgehancer/deploy.ts
6144
6581
  import { readFileSync as readFileSync2 } from "fs";
@@ -6176,8 +6613,8 @@ var EdgehancerClient = class extends ApiClient {
6176
6613
  };
6177
6614
 
6178
6615
  // src/commands/integration/commands/definition/edgehancer/util.ts
6179
- function withEdgehancerIdOptions(yargs32) {
6180
- return yargs32.option("connectorType", {
6616
+ function withEdgehancerIdOptions(yargs33) {
6617
+ return yargs33.option("connectorType", {
6181
6618
  describe: "Integration data connector type to edgehance, as defined in the integration manifest file.",
6182
6619
  demandOption: true,
6183
6620
  type: "string"
@@ -6197,11 +6634,11 @@ function withEdgehancerIdOptions(yargs32) {
6197
6634
  var IntegrationEdgehancerDeployModule = {
6198
6635
  command: "deploy <filename>",
6199
6636
  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(
6637
+ builder: (yargs33) => withConfiguration(
6201
6638
  withApiOptions(
6202
6639
  withTeamOptions(
6203
6640
  withEdgehancerIdOptions(
6204
- yargs32.positional("filename", {
6641
+ yargs33.positional("filename", {
6205
6642
  demandOption: true,
6206
6643
  describe: "ESM code file to run for the target edgehancer hook. Refer to the documentation for expected types."
6207
6644
  })
@@ -6221,7 +6658,7 @@ var IntegrationEdgehancerDeployModule = {
6221
6658
  var IntegrationEdgehancerRemoveModule = {
6222
6659
  command: "remove",
6223
6660
  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)))),
6661
+ builder: (yargs33) => withConfiguration(withApiOptions(withTeamOptions(withEdgehancerIdOptions(yargs33)))),
6225
6662
  handler: async ({ apiHost, apiKey, proxy, team: teamId, archetype, connectorType, hook }) => {
6226
6663
  const fetch3 = nodeFetchProxy(proxy);
6227
6664
  const client = new EdgehancerClient({ apiKey, apiHost, fetch: fetch3, teamId });
@@ -6233,9 +6670,9 @@ var IntegrationEdgehancerRemoveModule = {
6233
6670
  var IntegrationEdgehancerModule = {
6234
6671
  command: "edgehancer <command>",
6235
6672
  describe: "Commands for managing custom integration edgehancers at the team level.",
6236
- builder: (yargs32) => yargs32.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
6673
+ builder: (yargs33) => yargs33.command(IntegrationEdgehancerDeployModule).command(IntegrationEdgehancerRemoveModule).demandCommand(),
6237
6674
  handler: () => {
6238
- yargs20.help();
6675
+ yargs21.help();
6239
6676
  }
6240
6677
  };
6241
6678
 
@@ -6275,10 +6712,10 @@ var DefinitionClient = class extends ApiClient2 {
6275
6712
  var IntegrationDefinitionRegisterModule = {
6276
6713
  command: "register <filename>",
6277
6714
  describe: "Registers a custom integration definition on a team. The API key used must have team admin permissions.",
6278
- builder: (yargs32) => withConfiguration(
6715
+ builder: (yargs33) => withConfiguration(
6279
6716
  withApiOptions(
6280
6717
  withTeamOptions(
6281
- yargs32.positional("filename", {
6718
+ yargs33.positional("filename", {
6282
6719
  demandOption: true,
6283
6720
  describe: "Integration definition manifest to register"
6284
6721
  })
@@ -6297,10 +6734,10 @@ var IntegrationDefinitionRegisterModule = {
6297
6734
  var IntegrationDefinitionRemoveModule = {
6298
6735
  command: "remove <type>",
6299
6736
  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(
6737
+ builder: (yargs33) => withConfiguration(
6301
6738
  withApiOptions(
6302
6739
  withTeamOptions(
6303
- yargs32.positional("type", {
6740
+ yargs33.positional("type", {
6304
6741
  demandOption: true,
6305
6742
  describe: "Integration type (from its manifest) to remove."
6306
6743
  })
@@ -6318,9 +6755,9 @@ var IntegrationDefinitionRemoveModule = {
6318
6755
  var IntegrationDefinitionModule = {
6319
6756
  command: "definition <command>",
6320
6757
  describe: "Commands for managing custom integration definitions at the team level.",
6321
- builder: (yargs32) => yargs32.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).demandCommand(),
6758
+ builder: (yargs33) => yargs33.command(IntegrationDefinitionRemoveModule).command(IntegrationDefinitionRegisterModule).command(IntegrationEdgehancerModule).demandCommand(),
6322
6759
  handler: () => {
6323
- yargs21.help();
6760
+ yargs22.help();
6324
6761
  }
6325
6762
  };
6326
6763
 
@@ -6360,10 +6797,10 @@ var InstallClient = class extends ApiClient3 {
6360
6797
  var IntegrationInstallModule = {
6361
6798
  command: "install <type>",
6362
6799
  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(
6800
+ builder: (yargs33) => withConfiguration(
6364
6801
  withApiOptions(
6365
6802
  withProjectOptions(
6366
- yargs32.positional("type", {
6803
+ yargs33.positional("type", {
6367
6804
  demandOption: true,
6368
6805
  describe: "Integration type to install (as defined in its manifest)"
6369
6806
  }).option("configuration", {
@@ -6385,10 +6822,10 @@ var IntegrationInstallModule = {
6385
6822
  var IntegrationUninstallModule = {
6386
6823
  command: "uninstall <type>",
6387
6824
  describe: "Uninstalls an integration from a project. Existing usages of the integration may break.",
6388
- builder: (yargs32) => withConfiguration(
6825
+ builder: (yargs33) => withConfiguration(
6389
6826
  withApiOptions(
6390
6827
  withProjectOptions(
6391
- yargs32.positional("type", {
6828
+ yargs33.positional("type", {
6392
6829
  demandOption: true,
6393
6830
  describe: "Integration type to uninstall (as defined in its manifest)"
6394
6831
  })
@@ -6406,9 +6843,9 @@ var IntegrationUninstallModule = {
6406
6843
  var IntegrationCommand = {
6407
6844
  command: "integration <command>",
6408
6845
  describe: "Integration management commands",
6409
- builder: (yargs32) => yargs32.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
6846
+ builder: (yargs33) => yargs33.command(IntegrationDefinitionModule).command(IntegrationInstallModule).command(IntegrationUninstallModule).demandCommand(),
6410
6847
  handler: () => {
6411
- yargs22.showHelp();
6848
+ yargs23.showHelp();
6412
6849
  }
6413
6850
  };
6414
6851
 
@@ -6436,7 +6873,7 @@ import { PostHog } from "posthog-node";
6436
6873
  // package.json
6437
6874
  var package_default = {
6438
6875
  name: "@uniformdev/cli",
6439
- version: "19.142.1",
6876
+ version: "19.145.0",
6440
6877
  description: "Uniform command line interface tool",
6441
6878
  license: "SEE LICENSE IN LICENSE.txt",
6442
6879
  main: "./cli.js",
@@ -7445,10 +7882,10 @@ var NewMeshCmd = {
7445
7882
  };
7446
7883
 
7447
7884
  // src/commands/optimize/index.ts
7448
- import yargs24 from "yargs";
7885
+ import yargs25 from "yargs";
7449
7886
 
7450
7887
  // src/commands/optimize/manifest.ts
7451
- import yargs23 from "yargs";
7888
+ import yargs24 from "yargs";
7452
7889
 
7453
7890
  // src/commands/optimize/manifest/download.ts
7454
7891
  import { gray as gray4, green as green3, red as red5, yellow as yellow2 } from "colorette";
@@ -7463,7 +7900,7 @@ var UniformBaseUrl = "https://uniform.app";
7463
7900
  var module = {
7464
7901
  command: "download [output]",
7465
7902
  describe: "Download intent manifest",
7466
- builder: (yargs32) => yargs32.option("apiKey", {
7903
+ builder: (yargs33) => yargs33.option("apiKey", {
7467
7904
  alias: "k",
7468
7905
  demandOption: true,
7469
7906
  string: true,
@@ -7564,10 +8001,10 @@ var module2 = {
7564
8001
  command: "manifest <command>",
7565
8002
  describe: "Intent manifest commands",
7566
8003
  builder: () => {
7567
- return yargs23.command(download_default);
8004
+ return yargs24.command(download_default);
7568
8005
  },
7569
8006
  handler: () => {
7570
- yargs23.showHelp();
8007
+ yargs24.showHelp();
7571
8008
  }
7572
8009
  };
7573
8010
  var manifest_default = module2;
@@ -7578,29 +8015,29 @@ var OptimizeCommand = {
7578
8015
  aliases: ["opt"],
7579
8016
  describe: "Uniform Optimize commands",
7580
8017
  builder: () => {
7581
- return yargs24.command(manifest_default);
8018
+ return yargs25.command(manifest_default);
7582
8019
  },
7583
8020
  handler: () => {
7584
- yargs24.showHelp();
8021
+ yargs25.showHelp();
7585
8022
  }
7586
8023
  };
7587
8024
 
7588
8025
  // src/commands/project-map/index.ts
7589
- import yargs27 from "yargs";
8026
+ import yargs28 from "yargs";
7590
8027
 
7591
8028
  // src/commands/project-map/commands/projectMapDefinition.ts
7592
- import yargs25 from "yargs";
8029
+ import yargs26 from "yargs";
7593
8030
 
7594
8031
  // src/commands/project-map/commands/ProjectMapDefinition/get.ts
7595
8032
  import { UncachedProjectMapClient } from "@uniformdev/project-map";
7596
8033
  var ProjectMapDefinitionGetModule = {
7597
8034
  command: "get <id>",
7598
8035
  describe: "Fetch a project map",
7599
- builder: (yargs32) => withFormatOptions(
8036
+ builder: (yargs33) => withFormatOptions(
7600
8037
  withConfiguration(
7601
8038
  withApiOptions(
7602
8039
  withProjectOptions(
7603
- yargs32.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
8040
+ yargs33.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
7604
8041
  )
7605
8042
  )
7606
8043
  )
@@ -7624,7 +8061,7 @@ var ProjectMapDefinitionListModule = {
7624
8061
  command: "list",
7625
8062
  describe: "List of project maps",
7626
8063
  aliases: ["ls"],
7627
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
8064
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
7628
8065
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
7629
8066
  const fetch3 = nodeFetchProxy(proxy);
7630
8067
  const client = new UncachedProjectMapClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -7681,11 +8118,11 @@ function createProjectMapDefinitionEngineDataSource({
7681
8118
  var ProjectMapDefinitionPullModule = {
7682
8119
  command: "pull <directory>",
7683
8120
  describe: "Pulls all project maps to local files in a directory",
7684
- builder: (yargs32) => withConfiguration(
8121
+ builder: (yargs33) => withConfiguration(
7685
8122
  withApiOptions(
7686
8123
  withProjectOptions(
7687
8124
  withDiffOptions(
7688
- yargs32.positional("directory", {
8125
+ yargs33.positional("directory", {
7689
8126
  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
8127
  type: "string"
7691
8128
  }).option("format", {
@@ -7762,11 +8199,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient4 } from "@uniformd
7762
8199
  var ProjectMapDefinitionPushModule = {
7763
8200
  command: "push <directory>",
7764
8201
  describe: "Pushes all project maps from files in a directory or package to Uniform",
7765
- builder: (yargs32) => withConfiguration(
8202
+ builder: (yargs33) => withConfiguration(
7766
8203
  withApiOptions(
7767
8204
  withProjectOptions(
7768
8205
  withDiffOptions(
7769
- yargs32.positional("directory", {
8206
+ yargs33.positional("directory", {
7770
8207
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
7771
8208
  type: "string"
7772
8209
  }).option("what-if", {
@@ -7832,9 +8269,9 @@ var ProjectMapDefinitionRemoveModule = {
7832
8269
  command: "remove <id>",
7833
8270
  aliases: ["delete", "rm"],
7834
8271
  describe: "Delete a project map",
7835
- builder: (yargs32) => withConfiguration(
8272
+ builder: (yargs33) => withConfiguration(
7836
8273
  withApiOptions(
7837
- withProjectOptions(yargs32.positional("id", { demandOption: true, describe: " UUID to delete" }))
8274
+ withProjectOptions(yargs33.positional("id", { demandOption: true, describe: " UUID to delete" }))
7838
8275
  )
7839
8276
  ),
7840
8277
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -7850,10 +8287,10 @@ var ProjectMapDefinitionUpdateModule = {
7850
8287
  command: "update <filename>",
7851
8288
  aliases: ["put"],
7852
8289
  describe: "Insert or update a project map",
7853
- builder: (yargs32) => withConfiguration(
8290
+ builder: (yargs33) => withConfiguration(
7854
8291
  withApiOptions(
7855
8292
  withProjectOptions(
7856
- yargs32.positional("filename", { demandOption: true, describe: "Project map file to put" })
8293
+ yargs33.positional("filename", { demandOption: true, describe: "Project map file to put" })
7857
8294
  )
7858
8295
  )
7859
8296
  ),
@@ -7869,25 +8306,25 @@ var ProjectMapDefinitionUpdateModule = {
7869
8306
  var ProjectMapDefinitionModule = {
7870
8307
  command: "definition <command>",
7871
8308
  describe: "Commands for ProjectMap Definitions",
7872
- builder: (yargs32) => yargs32.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
8309
+ builder: (yargs33) => yargs33.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
7873
8310
  handler: () => {
7874
- yargs25.help();
8311
+ yargs26.help();
7875
8312
  }
7876
8313
  };
7877
8314
 
7878
8315
  // src/commands/project-map/commands/projectMapNode.ts
7879
- import yargs26 from "yargs";
8316
+ import yargs27 from "yargs";
7880
8317
 
7881
8318
  // src/commands/project-map/commands/ProjectMapNode/get.ts
7882
8319
  import { UncachedProjectMapClient as UncachedProjectMapClient7 } from "@uniformdev/project-map";
7883
8320
  var ProjectMapNodeGetModule = {
7884
8321
  command: "get <id> <projectMapId>",
7885
8322
  describe: "Fetch a project map node",
7886
- builder: (yargs32) => withConfiguration(
8323
+ builder: (yargs33) => withConfiguration(
7887
8324
  withFormatOptions(
7888
8325
  withApiOptions(
7889
8326
  withProjectOptions(
7890
- yargs32.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
8327
+ yargs33.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
7891
8328
  )
7892
8329
  )
7893
8330
  )
@@ -7913,12 +8350,12 @@ var ProjectMapNodeListModule = {
7913
8350
  command: "list <projectMapId>",
7914
8351
  describe: "List project map nodes",
7915
8352
  aliases: ["ls"],
7916
- builder: (yargs32) => withConfiguration(
8353
+ builder: (yargs33) => withConfiguration(
7917
8354
  withFormatOptions(
7918
8355
  withApiOptions(
7919
8356
  withProjectOptions(
7920
8357
  withStateOptions(
7921
- yargs32.positional("projectMapId", {
8358
+ yargs33.positional("projectMapId", {
7922
8359
  demandOption: true,
7923
8360
  describe: "ProjectMap UUID to fetch from"
7924
8361
  })
@@ -7930,7 +8367,7 @@ var ProjectMapNodeListModule = {
7930
8367
  handler: async ({ apiHost, apiKey, proxy, projectMapId, format, filename, project: projectId, state }) => {
7931
8368
  const fetch3 = nodeFetchProxy(proxy);
7932
8369
  const client = new UncachedProjectMapClient8({ apiKey, apiHost, fetch: fetch3, projectId });
7933
- const res = await client.getNodes({ projectMapId, state: convertCompositionState(state) });
8370
+ const res = await client.getNodes({ projectMapId, state: convertStateOption(state) });
7934
8371
  emitWithFormat({ nodes: res.nodes ?? [], projectMapId }, format, filename);
7935
8372
  }
7936
8373
  };
@@ -7990,11 +8427,11 @@ function createProjectMapNodeEngineDataSource({
7990
8427
  var ProjectMapNodePullModule = {
7991
8428
  command: "pull <directory>",
7992
8429
  describe: "Pulls all project maps nodes to local files in a directory",
7993
- builder: (yargs32) => withConfiguration(
8430
+ builder: (yargs33) => withConfiguration(
7994
8431
  withApiOptions(
7995
8432
  withProjectOptions(
7996
8433
  withDiffOptions(
7997
- yargs32.positional("directory", {
8434
+ yargs33.positional("directory", {
7998
8435
  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
8436
  type: "string"
8000
8437
  }).option("format", {
@@ -8075,11 +8512,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient10 } from "@uniform
8075
8512
  var ProjectMapNodePushModule = {
8076
8513
  command: "push <directory>",
8077
8514
  describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
8078
- builder: (yargs32) => withConfiguration(
8515
+ builder: (yargs33) => withConfiguration(
8079
8516
  withApiOptions(
8080
8517
  withProjectOptions(
8081
8518
  withDiffOptions(
8082
- yargs32.positional("directory", {
8519
+ yargs33.positional("directory", {
8083
8520
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
8084
8521
  type: "string"
8085
8522
  }).option("what-if", {
@@ -8154,10 +8591,10 @@ var ProjectMapNodeRemoveModule = {
8154
8591
  command: "remove <id> <projectMapId>",
8155
8592
  aliases: ["delete", "rm"],
8156
8593
  describe: "Delete a project map node",
8157
- builder: (yargs32) => withConfiguration(
8594
+ builder: (yargs33) => withConfiguration(
8158
8595
  withApiOptions(
8159
8596
  withProjectOptions(
8160
- yargs32.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
8597
+ yargs33.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
8161
8598
  )
8162
8599
  )
8163
8600
  ),
@@ -8174,10 +8611,10 @@ var ProjectMapNodeUpdateModule = {
8174
8611
  command: "update <filename> <projectMapId>",
8175
8612
  aliases: ["put"],
8176
8613
  describe: "Insert or update a project map node",
8177
- builder: (yargs32) => withConfiguration(
8614
+ builder: (yargs33) => withConfiguration(
8178
8615
  withApiOptions(
8179
8616
  withProjectOptions(
8180
- yargs32.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
8617
+ yargs33.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
8181
8618
  )
8182
8619
  )
8183
8620
  ),
@@ -8193,9 +8630,9 @@ var ProjectMapNodeUpdateModule = {
8193
8630
  var ProjectMapNodeModule = {
8194
8631
  command: "node <command>",
8195
8632
  describe: "Commands for ProjectMap Nodes",
8196
- builder: (yargs32) => yargs32.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
8633
+ builder: (yargs33) => yargs33.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
8197
8634
  handler: () => {
8198
- yargs26.help();
8635
+ yargs27.help();
8199
8636
  }
8200
8637
  };
8201
8638
 
@@ -8204,28 +8641,28 @@ var ProjectMapCommand = {
8204
8641
  command: "project-map <command>",
8205
8642
  aliases: ["prm"],
8206
8643
  describe: "Uniform ProjectMap commands",
8207
- builder: (yargs32) => yargs32.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
8644
+ builder: (yargs33) => yargs33.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
8208
8645
  handler: () => {
8209
- yargs27.showHelp();
8646
+ yargs28.showHelp();
8210
8647
  }
8211
8648
  };
8212
8649
 
8213
8650
  // src/commands/redirect/index.ts
8214
- import yargs29 from "yargs";
8651
+ import yargs30 from "yargs";
8215
8652
 
8216
8653
  // src/commands/redirect/commands/redirect.ts
8217
- import yargs28 from "yargs";
8654
+ import yargs29 from "yargs";
8218
8655
 
8219
8656
  // src/commands/redirect/commands/RedirectDefinition/get.ts
8220
8657
  import { UncachedRedirectClient } from "@uniformdev/redirect";
8221
8658
  var RedirectDefinitionGetModule = {
8222
8659
  command: "get <id>",
8223
8660
  describe: "Fetch a redirect",
8224
- builder: (yargs32) => withConfiguration(
8661
+ builder: (yargs33) => withConfiguration(
8225
8662
  withFormatOptions(
8226
8663
  withApiOptions(
8227
8664
  withProjectOptions(
8228
- yargs32.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
8665
+ yargs33.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
8229
8666
  )
8230
8667
  )
8231
8668
  )
@@ -8249,7 +8686,7 @@ var RedirectDefinitionListModule = {
8249
8686
  command: "list",
8250
8687
  describe: "List of redirects",
8251
8688
  aliases: ["ls"],
8252
- builder: (yargs32) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs32)))),
8689
+ builder: (yargs33) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs33)))),
8253
8690
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
8254
8691
  const fetch3 = nodeFetchProxy(proxy);
8255
8692
  const client = new UncachedRedirectClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -8315,11 +8752,11 @@ function createRedirectDefinitionEngineDataSource({
8315
8752
  var RedirectDefinitionPullModule = {
8316
8753
  command: "pull <directory>",
8317
8754
  describe: "Pulls all redirects to local files in a directory",
8318
- builder: (yargs32) => withConfiguration(
8755
+ builder: (yargs33) => withConfiguration(
8319
8756
  withApiOptions(
8320
8757
  withProjectOptions(
8321
8758
  withDiffOptions(
8322
- yargs32.positional("directory", {
8759
+ yargs33.positional("directory", {
8323
8760
  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
8761
  type: "string"
8325
8762
  }).option("format", {
@@ -8397,11 +8834,11 @@ import { UncachedRedirectClient as UncachedRedirectClient4 } from "@uniformdev/r
8397
8834
  var RedirectDefinitionPushModule = {
8398
8835
  command: "push <directory>",
8399
8836
  describe: "Pushes all redirects from files in a directory or package to Uniform",
8400
- builder: (yargs32) => withConfiguration(
8837
+ builder: (yargs33) => withConfiguration(
8401
8838
  withApiOptions(
8402
8839
  withProjectOptions(
8403
8840
  withDiffOptions(
8404
- yargs32.positional("directory", {
8841
+ yargs33.positional("directory", {
8405
8842
  describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
8406
8843
  type: "string"
8407
8844
  }).option("what-if", {
@@ -8467,9 +8904,9 @@ var RedirectDefinitionRemoveModule = {
8467
8904
  command: "remove <id>",
8468
8905
  aliases: ["delete", "rm"],
8469
8906
  describe: "Delete a redirect",
8470
- builder: (yargs32) => withConfiguration(
8907
+ builder: (yargs33) => withConfiguration(
8471
8908
  withApiOptions(
8472
- withProjectOptions(yargs32.positional("id", { demandOption: true, describe: " UUID to delete" }))
8909
+ withProjectOptions(yargs33.positional("id", { demandOption: true, describe: " UUID to delete" }))
8473
8910
  )
8474
8911
  ),
8475
8912
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -8485,10 +8922,10 @@ var RedirectDefinitionUpdateModule = {
8485
8922
  command: "update <filename>",
8486
8923
  aliases: ["put"],
8487
8924
  describe: "Insert or update a redirect",
8488
- builder: (yargs32) => withConfiguration(
8925
+ builder: (yargs33) => withConfiguration(
8489
8926
  withApiOptions(
8490
8927
  withProjectOptions(
8491
- yargs32.positional("filename", { demandOption: true, describe: "Redirect file to put" })
8928
+ yargs33.positional("filename", { demandOption: true, describe: "Redirect file to put" })
8492
8929
  )
8493
8930
  )
8494
8931
  ),
@@ -8504,9 +8941,9 @@ var RedirectDefinitionUpdateModule = {
8504
8941
  var RedirectDefinitionModule = {
8505
8942
  command: "definition <command>",
8506
8943
  describe: "Commands for Redirect Definitions",
8507
- builder: (yargs32) => yargs32.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
8944
+ builder: (yargs33) => yargs33.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
8508
8945
  handler: () => {
8509
- yargs28.help();
8946
+ yargs29.help();
8510
8947
  }
8511
8948
  };
8512
8949
 
@@ -8515,14 +8952,14 @@ var RedirectCommand = {
8515
8952
  command: "redirect <command>",
8516
8953
  aliases: ["red"],
8517
8954
  describe: "Uniform Redirect commands",
8518
- builder: (yargs32) => yargs32.command(RedirectDefinitionModule).demandCommand(),
8955
+ builder: (yargs33) => yargs33.command(RedirectDefinitionModule).demandCommand(),
8519
8956
  handler: () => {
8520
- yargs29.showHelp();
8957
+ yargs30.showHelp();
8521
8958
  }
8522
8959
  };
8523
8960
 
8524
8961
  // src/commands/sync/index.ts
8525
- import yargs30 from "yargs";
8962
+ import yargs31 from "yargs";
8526
8963
 
8527
8964
  // src/commands/sync/commands/util.ts
8528
8965
  import ora2 from "ora";
@@ -8555,11 +8992,11 @@ function spin(entityType) {
8555
8992
  var SyncPullModule = {
8556
8993
  command: "pull",
8557
8994
  describe: "Pulls whole project to local files in a directory",
8558
- builder: (yargs32) => withConfiguration(
8995
+ builder: (yargs33) => withConfiguration(
8559
8996
  withApiOptions(
8560
8997
  withProjectOptions(
8561
8998
  withDiffOptions(
8562
- yargs32.option("what-if", {
8999
+ yargs33.option("what-if", {
8563
9000
  alias: ["w"],
8564
9001
  describe: "What-if mode reports what would be done but changes no files",
8565
9002
  default: false,
@@ -8570,8 +9007,11 @@ var SyncPullModule = {
8570
9007
  )
8571
9008
  ),
8572
9009
  handler: async ({ serialization, ...otherParams }) => {
8573
- var _a;
9010
+ var _a, _b;
8574
9011
  const config2 = serialization;
9012
+ if (config2.entitiesConfig.pattern) {
9013
+ (_a = config2.entitiesConfig).componentPattern ?? (_a.componentPattern = config2.entitiesConfig.pattern);
9014
+ }
8575
9015
  const enabledEntities = Object.entries({
8576
9016
  locale: LocalePullModule,
8577
9017
  asset: AssetPullModule,
@@ -8584,17 +9024,18 @@ var SyncPullModule = {
8584
9024
  enrichment: EnrichmentPullModule,
8585
9025
  aggregate: AggregatePullModule,
8586
9026
  component: ComponentPullModule,
8587
- pattern: PatternPullModule,
9027
+ componentPattern: ComponentPatternPullModule,
8588
9028
  composition: CompositionPullModule,
8589
9029
  projectMapDefinition: ProjectMapDefinitionPullModule,
8590
9030
  projectMapNode: ProjectMapNodePullModule,
8591
9031
  redirect: RedirectDefinitionPullModule,
8592
9032
  entry: EntryPullModule,
9033
+ entryPattern: EntryPatternPullModule,
8593
9034
  contentType: ContentTypePullModule
8594
9035
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8595
9036
  }).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;
9037
+ var _a2, _b2, _c, _d, _e, _f;
9038
+ 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
9039
  });
8599
9040
  if (enabledEntities.length === 0) {
8600
9041
  throw new Error(
@@ -8606,14 +9047,14 @@ var SyncPullModule = {
8606
9047
  const entityConfigSupportsPullState = (entityConfig2) => {
8607
9048
  return entityConfig2 !== void 0 && "state" in entityConfig2;
8608
9049
  };
8609
- const entityConfig = (_a = config2.entitiesConfig) == null ? void 0 : _a[entityType];
9050
+ const entityConfig = (_b = config2.entitiesConfig) == null ? void 0 : _b[entityType];
8610
9051
  try {
8611
9052
  await module3.handler({
8612
9053
  ...otherParams,
8613
9054
  state: entityConfigSupportsPullState(entityConfig) ? entityConfig.state ?? 0 : 0,
8614
9055
  format: getFormat(entityType, config2),
8615
9056
  onlyCompositions: entityType === "composition" ? true : void 0,
8616
- onlyPatterns: entityType === "pattern" ? true : void 0,
9057
+ onlyPatterns: entityType === "componentPattern" ? true : void 0,
8617
9058
  mode: getPullMode(entityType, config2),
8618
9059
  directory: getPullFilename(entityType, config2),
8619
9060
  allowEmptySource: config2.allowEmptySource
@@ -8654,11 +9095,11 @@ var getFormat = (entityType, config2) => {
8654
9095
  var SyncPushModule = {
8655
9096
  command: "push",
8656
9097
  describe: "Pushes whole project data from files in a directory or package to Uniform",
8657
- builder: (yargs32) => withConfiguration(
9098
+ builder: (yargs33) => withConfiguration(
8658
9099
  withApiOptions(
8659
9100
  withProjectOptions(
8660
9101
  withDiffOptions(
8661
- yargs32.option("what-if", {
9102
+ yargs33.option("what-if", {
8662
9103
  alias: ["w"],
8663
9104
  describe: "What-if mode reports what would be done but changes nothing",
8664
9105
  default: false,
@@ -8669,8 +9110,11 @@ var SyncPushModule = {
8669
9110
  )
8670
9111
  ),
8671
9112
  handler: async ({ serialization, ...otherParams }) => {
8672
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
9113
+ 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
9114
  const config2 = serialization;
9115
+ if (config2.entitiesConfig.pattern) {
9116
+ (_a = config2.entitiesConfig).componentPattern ?? (_a.componentPattern = config2.entitiesConfig.pattern);
9117
+ }
8674
9118
  const enabledEntities = Object.entries({
8675
9119
  locale: LocalePushModule,
8676
9120
  asset: AssetPushModule,
@@ -8683,13 +9127,14 @@ var SyncPushModule = {
8683
9127
  enrichment: EnrichmentPushModule,
8684
9128
  aggregate: AggregatePushModule,
8685
9129
  component: ComponentPushModule,
8686
- pattern: PatternPushModule,
9130
+ componentPattern: ComponentPatternPushModule,
8687
9131
  composition: CompositionPushModule,
8688
9132
  projectMapDefinition: ProjectMapDefinitionPushModule,
8689
9133
  projectMapNode: ProjectMapNodePushModule,
8690
9134
  redirect: RedirectDefinitionPushModule,
8691
9135
  contentType: ContentTypePushModule,
8692
- entry: EntryPushModule
9136
+ entry: EntryPushModule,
9137
+ entryPattern: EntryPatternPushModule
8693
9138
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8694
9139
  }).filter(([entityType]) => {
8695
9140
  var _a2, _b2, _c2, _d2, _e2, _f2;
@@ -8708,7 +9153,7 @@ var SyncPushModule = {
8708
9153
  state: 0,
8709
9154
  format: getFormat2(entityType, config2),
8710
9155
  onlyCompositions: entityType === "composition" ? true : void 0,
8711
- onlyPatterns: entityType === "pattern" ? true : void 0,
9156
+ onlyPatterns: entityType === "componentPattern" ? true : void 0,
8712
9157
  mode: getPushMode(entityType, config2),
8713
9158
  directory: getPushFilename(entityType, config2),
8714
9159
  allowEmptySource: config2.allowEmptySource
@@ -8719,15 +9164,18 @@ var SyncPushModule = {
8719
9164
  throw e;
8720
9165
  }
8721
9166
  }
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 });
9167
+ 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)) {
9168
+ await ComponentPatternPublishModule.handler({ ...otherParams, all: true });
8724
9169
  }
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)) {
9170
+ 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
9171
  await CompositionPublishModule.handler({ ...otherParams, all: true });
8727
9172
  }
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)) {
9173
+ 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
9174
  await EntryPublishModule.handler({ ...otherParams, all: true });
8730
9175
  }
9176
+ 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)) {
9177
+ await EntryPatternPublishModule.handler({ ...otherParams, all: true });
9178
+ }
8731
9179
  }
8732
9180
  };
8733
9181
  var getPushMode = (entityType, config2) => {
@@ -8758,9 +9206,9 @@ var getFormat2 = (entityType, config2) => {
8758
9206
  var SyncCommand = {
8759
9207
  command: "sync <command>",
8760
9208
  describe: "Uniform Sync commands",
8761
- builder: (yargs32) => yargs32.command(SyncPullModule).command(SyncPushModule).demandCommand(),
9209
+ builder: (yargs33) => yargs33.command(SyncPullModule).command(SyncPushModule).demandCommand(),
8762
9210
  handler: () => {
8763
- yargs30.showHelp();
9211
+ yargs31.showHelp();
8764
9212
  }
8765
9213
  };
8766
9214
 
@@ -9027,7 +9475,7 @@ First found was: v${firstVersion}`;
9027
9475
 
9028
9476
  // src/index.ts
9029
9477
  dotenv.config();
9030
- var yarggery = yargs31(hideBin(process.argv));
9478
+ var yarggery = yargs32(hideBin(process.argv));
9031
9479
  var inlineConfigurationFilePath = "config" in yarggery.argv && yarggery.argv.config;
9032
9480
  var configuration = loadConfig(inlineConfigurationFilePath || null);
9033
9481
  yarggery.option("verbose", {