@uniformdev/cli 19.54.3-alpha.5 → 19.55.2-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +553 -260
  2. package/package.json +18 -17
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- // ../../node_modules/.pnpm/tsup@7.2.0_postcss@8.4.28_ts-node@10.9.1_typescript@5.1.6/node_modules/tsup/assets/esm_shims.js
3
+ // ../../node_modules/.pnpm/tsup@7.2.0_postcss@8.4.31_ts-node@10.9.1_typescript@5.2.2/node_modules/tsup/assets/esm_shims.js
4
4
  import { fileURLToPath } from "url";
5
5
  import path from "path";
6
6
  var getFilename = () => fileURLToPath(import.meta.url);
@@ -9,11 +9,11 @@ var __dirname = /* @__PURE__ */ getDirname();
9
9
 
10
10
  // src/index.ts
11
11
  import * as dotenv from "dotenv";
12
- import yargs24 from "yargs";
12
+ import yargs25 from "yargs";
13
13
  import { hideBin } from "yargs/helpers";
14
14
 
15
15
  // src/commands/canvas/index.ts
16
- import yargs8 from "yargs";
16
+ import yargs9 from "yargs";
17
17
 
18
18
  // src/commands/canvas/commands/category.ts
19
19
  import yargs from "yargs";
@@ -126,14 +126,14 @@ import httpsProxyAgent from "https-proxy-agent";
126
126
  import unfetch from "isomorphic-unfetch";
127
127
  import { dump, load } from "js-yaml";
128
128
  import { dirname, extname, isAbsolute, resolve, sep } from "path";
129
- function withConfiguration(yargs25) {
130
- return yargs25.option("serialization", {
129
+ function withConfiguration(yargs26) {
130
+ return yargs26.option("serialization", {
131
131
  skipValidation: true,
132
132
  hidden: true
133
133
  });
134
134
  }
135
- function withApiOptions(yargs25) {
136
- return yargs25.option("apiKey", {
135
+ function withApiOptions(yargs26) {
136
+ return yargs26.option("apiKey", {
137
137
  describe: "Uniform API key. Defaults to UNIFORM_CLI_API_KEY or UNIFORM_API_KEY env. Supports dotenv.",
138
138
  default: process.env.UNIFORM_CLI_API_KEY ?? // deprecated
139
139
  process.env.CANVAS_CLI_API_KEY ?? // deprecated
@@ -172,8 +172,8 @@ function nodeFetchProxy(proxy) {
172
172
  };
173
173
  return wrappedFetch;
174
174
  }
175
- function withProjectOptions(yargs25) {
176
- return yargs25.option("project", {
175
+ function withProjectOptions(yargs26) {
176
+ return yargs26.option("project", {
177
177
  describe: "Uniform project ID. Defaults to UNIFORM_CLI_PROJECT_ID or UNIFORM_PROJECT_ID env. Supports dotenv.",
178
178
  default: process.env.UNIFORM_CLI_PROJECT_ID ?? // deprecated
179
179
  process.env.CANVAS_CLI_PROJECT_ID ?? // deprecated
@@ -183,8 +183,8 @@ function withProjectOptions(yargs25) {
183
183
  alias: ["p"]
184
184
  });
185
185
  }
186
- function withFormatOptions(yargs25) {
187
- return yargs25.option("format", {
186
+ function withFormatOptions(yargs26) {
187
+ return yargs26.option("format", {
188
188
  alias: ["f"],
189
189
  describe: "Output format",
190
190
  default: "yaml",
@@ -196,8 +196,8 @@ function withFormatOptions(yargs25) {
196
196
  type: "string"
197
197
  });
198
198
  }
199
- function withDiffOptions(yargs25) {
200
- return yargs25.option("diff", {
199
+ function withDiffOptions(yargs26) {
200
+ return yargs26.option("diff", {
201
201
  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.",
202
202
  default: process.env.UNIFORM_CLI_DIFF_MODE ?? "off",
203
203
  type: "string",
@@ -617,11 +617,11 @@ function createPublishStatusSyncEngineConsoleLogger(options) {
617
617
  var CategoryGetModule = {
618
618
  command: "get <id>",
619
619
  describe: "Fetch a category",
620
- builder: (yargs25) => withConfiguration(
620
+ builder: (yargs26) => withConfiguration(
621
621
  withFormatOptions(
622
622
  withApiOptions(
623
623
  withProjectOptions(
624
- yargs25.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
624
+ yargs26.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
625
625
  )
626
626
  )
627
627
  )
@@ -646,7 +646,7 @@ var CategoryListModule = {
646
646
  command: "list",
647
647
  describe: "List categories",
648
648
  aliases: ["ls"],
649
- builder: (yargs25) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs25.options({}))))),
649
+ builder: (yargs26) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs26.options({}))))),
650
650
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
651
651
  const fetch3 = nodeFetchProxy(proxy);
652
652
  const client = new UncachedCategoryClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -703,11 +703,11 @@ function writeCanvasPackage(filename, packageContents) {
703
703
  var CategoryPullModule = {
704
704
  command: "pull <directory>",
705
705
  describe: "Pulls all categories to local files in a directory",
706
- builder: (yargs25) => withConfiguration(
706
+ builder: (yargs26) => withConfiguration(
707
707
  withApiOptions(
708
708
  withProjectOptions(
709
709
  withDiffOptions(
710
- yargs25.positional("directory", {
710
+ yargs26.positional("directory", {
711
711
  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.",
712
712
  type: "string"
713
713
  }).option("format", {
@@ -783,11 +783,11 @@ import { UncachedCategoryClient as UncachedCategoryClient4 } from "@uniformdev/c
783
783
  var CategoryPushModule = {
784
784
  command: "push <directory>",
785
785
  describe: "Pushes all categories from files in a directory to Uniform Canvas",
786
- builder: (yargs25) => withConfiguration(
786
+ builder: (yargs26) => withConfiguration(
787
787
  withApiOptions(
788
788
  withProjectOptions(
789
789
  withDiffOptions(
790
- yargs25.positional("directory", {
790
+ yargs26.positional("directory", {
791
791
  describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
792
792
  type: "string"
793
793
  }).option("what-if", {
@@ -851,10 +851,10 @@ var CategoryRemoveModule = {
851
851
  command: "remove <id>",
852
852
  aliases: ["delete", "rm"],
853
853
  describe: "Delete a category",
854
- builder: (yargs25) => withConfiguration(
854
+ builder: (yargs26) => withConfiguration(
855
855
  withApiOptions(
856
856
  withProjectOptions(
857
- yargs25.positional("id", { demandOption: true, describe: "Category UUID to delete" })
857
+ yargs26.positional("id", { demandOption: true, describe: "Category UUID to delete" })
858
858
  )
859
859
  )
860
860
  ),
@@ -871,10 +871,10 @@ var CategoryUpdateModule = {
871
871
  command: "update <filename>",
872
872
  aliases: ["put"],
873
873
  describe: "Insert or update a category",
874
- builder: (yargs25) => withConfiguration(
874
+ builder: (yargs26) => withConfiguration(
875
875
  withApiOptions(
876
876
  withProjectOptions(
877
- yargs25.positional("filename", { demandOption: true, describe: "Category file to put" })
877
+ yargs26.positional("filename", { demandOption: true, describe: "Category file to put" })
878
878
  )
879
879
  )
880
880
  ),
@@ -891,7 +891,7 @@ var CategoryModule = {
891
891
  command: "category <command>",
892
892
  aliases: ["cat"],
893
893
  describe: "Commands for Canvas categories",
894
- builder: (yargs25) => yargs25.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
894
+ builder: (yargs26) => yargs26.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
895
895
  handler: () => {
896
896
  yargs.help();
897
897
  }
@@ -912,11 +912,11 @@ var selectSchemaUrl = () => "/schemas/json-schema/component-definition/v1.json";
912
912
  var ComponentGetModule = {
913
913
  command: "get <id>",
914
914
  describe: "Fetch a component definition",
915
- builder: (yargs25) => withConfiguration(
915
+ builder: (yargs26) => withConfiguration(
916
916
  withFormatOptions(
917
917
  withApiOptions(
918
918
  withProjectOptions(
919
- yargs25.positional("id", {
919
+ yargs26.positional("id", {
920
920
  demandOption: true,
921
921
  describe: "Component definition public ID to fetch"
922
922
  })
@@ -950,11 +950,11 @@ var ComponentListModule = {
950
950
  command: "list",
951
951
  describe: "List component definitions",
952
952
  aliases: ["ls"],
953
- builder: (yargs25) => withConfiguration(
953
+ builder: (yargs26) => withConfiguration(
954
954
  withFormatOptions(
955
955
  withApiOptions(
956
956
  withProjectOptions(
957
- yargs25.options({
957
+ yargs26.options({
958
958
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
959
959
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
960
960
  })
@@ -1009,11 +1009,11 @@ function createComponentDefinitionEngineDataSource({
1009
1009
  var ComponentPullModule = {
1010
1010
  command: "pull <directory>",
1011
1011
  describe: "Pulls all component definitions to local files in a directory",
1012
- builder: (yargs25) => withConfiguration(
1012
+ builder: (yargs26) => withConfiguration(
1013
1013
  withApiOptions(
1014
1014
  withProjectOptions(
1015
1015
  withDiffOptions(
1016
- yargs25.positional("directory", {
1016
+ yargs26.positional("directory", {
1017
1017
  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.",
1018
1018
  type: "string"
1019
1019
  }).option("format", {
@@ -1090,11 +1090,11 @@ import { UncachedCanvasClient as UncachedCanvasClient4 } from "@uniformdev/canva
1090
1090
  var ComponentPushModule = {
1091
1091
  command: "push <directory>",
1092
1092
  describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
1093
- builder: (yargs25) => withConfiguration(
1093
+ builder: (yargs26) => withConfiguration(
1094
1094
  withApiOptions(
1095
1095
  withProjectOptions(
1096
1096
  withDiffOptions(
1097
- yargs25.positional("directory", {
1097
+ yargs26.positional("directory", {
1098
1098
  describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
1099
1099
  type: "string"
1100
1100
  }).option("what-if", {
@@ -1159,10 +1159,10 @@ var ComponentRemoveModule = {
1159
1159
  command: "remove <id>",
1160
1160
  aliases: ["delete", "rm"],
1161
1161
  describe: "Delete a component definition",
1162
- builder: (yargs25) => withConfiguration(
1162
+ builder: (yargs26) => withConfiguration(
1163
1163
  withApiOptions(
1164
1164
  withProjectOptions(
1165
- yargs25.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1165
+ yargs26.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1166
1166
  )
1167
1167
  )
1168
1168
  ),
@@ -1179,10 +1179,10 @@ var ComponentUpdateModule = {
1179
1179
  command: "update <filename>",
1180
1180
  aliases: ["put"],
1181
1181
  describe: "Insert or update a component definition",
1182
- builder: (yargs25) => withConfiguration(
1182
+ builder: (yargs26) => withConfiguration(
1183
1183
  withApiOptions(
1184
1184
  withProjectOptions(
1185
- yargs25.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1185
+ yargs26.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1186
1186
  )
1187
1187
  )
1188
1188
  ),
@@ -1199,7 +1199,7 @@ var ComponentModule = {
1199
1199
  command: "component <command>",
1200
1200
  aliases: ["def"],
1201
1201
  describe: "Commands for Canvas component definitions",
1202
- builder: (yargs25) => yargs25.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
1202
+ builder: (yargs26) => yargs26.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
1203
1203
  handler: () => {
1204
1204
  yargs2.help();
1205
1205
  }
@@ -1224,8 +1224,8 @@ function prepCompositionForDisk(composition) {
1224
1224
  delete prepped.state;
1225
1225
  return prepped;
1226
1226
  }
1227
- function withStateOptions(yargs25) {
1228
- return yargs25.option("state", {
1227
+ function withStateOptions(yargs26) {
1228
+ return yargs26.option("state", {
1229
1229
  type: "string",
1230
1230
  describe: `Composition state to fetch.`,
1231
1231
  choices: ["preview", "published"],
@@ -1250,12 +1250,12 @@ function convertCompositionState(state) {
1250
1250
  var CompositionGetModule = {
1251
1251
  command: "get <id>",
1252
1252
  describe: "Fetch a composition",
1253
- builder: (yargs25) => withFormatOptions(
1253
+ builder: (yargs26) => withFormatOptions(
1254
1254
  withConfiguration(
1255
1255
  withApiOptions(
1256
1256
  withProjectOptions(
1257
1257
  withStateOptions(
1258
- yargs25.positional("id", { demandOption: true, describe: "Composition/pattern public ID to fetch" }).option({
1258
+ yargs26.positional("id", { demandOption: true, describe: "Composition/pattern public ID to fetch" }).option({
1259
1259
  resolvePatterns: {
1260
1260
  type: "boolean",
1261
1261
  default: false,
@@ -1326,12 +1326,12 @@ var CompositionListModule = {
1326
1326
  command: "list",
1327
1327
  describe: "List compositions",
1328
1328
  aliases: ["ls"],
1329
- builder: (yargs25) => withFormatOptions(
1329
+ builder: (yargs26) => withFormatOptions(
1330
1330
  withConfiguration(
1331
1331
  withApiOptions(
1332
1332
  withProjectOptions(
1333
1333
  withStateOptions(
1334
- yargs25.options({
1334
+ yargs26.options({
1335
1335
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
1336
1336
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
1337
1337
  resolvePatterns: {
@@ -1452,11 +1452,11 @@ function createComponentInstanceEngineDataSource({
1452
1452
  var CompositionPublishModule = {
1453
1453
  command: "publish [ids]",
1454
1454
  describe: "Publishes composition(s)",
1455
- builder: (yargs25) => withConfiguration(
1455
+ builder: (yargs26) => withConfiguration(
1456
1456
  withApiOptions(
1457
1457
  withProjectOptions(
1458
1458
  withDiffOptions(
1459
- yargs25.positional("ids", {
1459
+ yargs26.positional("ids", {
1460
1460
  describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
1461
1461
  type: "string"
1462
1462
  }).option("all", {
@@ -1705,12 +1705,12 @@ var swapOutUniformFileUrlsForTargetProject = async (object, options) => {
1705
1705
  var CompositionPullModule = {
1706
1706
  command: "pull <directory>",
1707
1707
  describe: "Pulls all compositions to local files in a directory",
1708
- builder: (yargs25) => withConfiguration(
1708
+ builder: (yargs26) => withConfiguration(
1709
1709
  withApiOptions(
1710
1710
  withProjectOptions(
1711
1711
  withStateOptions(
1712
1712
  withDiffOptions(
1713
- yargs25.positional("directory", {
1713
+ yargs26.positional("directory", {
1714
1714
  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.",
1715
1715
  type: "string"
1716
1716
  }).option("format", {
@@ -1805,12 +1805,12 @@ import { FileClient as FileClient2 } from "@uniformdev/files";
1805
1805
  var CompositionPushModule = {
1806
1806
  command: "push <directory>",
1807
1807
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
1808
- builder: (yargs25) => withConfiguration(
1808
+ builder: (yargs26) => withConfiguration(
1809
1809
  withApiOptions(
1810
1810
  withProjectOptions(
1811
1811
  withStateOptions(
1812
1812
  withDiffOptions(
1813
- yargs25.positional("directory", {
1813
+ yargs26.positional("directory", {
1814
1814
  describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
1815
1815
  type: "string"
1816
1816
  }).option("what-if", {
@@ -1901,10 +1901,10 @@ var CompositionRemoveModule = {
1901
1901
  command: "remove <id>",
1902
1902
  aliases: ["delete", "rm"],
1903
1903
  describe: "Delete a composition",
1904
- builder: (yargs25) => withConfiguration(
1904
+ builder: (yargs26) => withConfiguration(
1905
1905
  withApiOptions(
1906
1906
  withProjectOptions(
1907
- yargs25.positional("id", { demandOption: true, describe: "Composition/pattern public ID to delete" })
1907
+ yargs26.positional("id", { demandOption: true, describe: "Composition/pattern public ID to delete" })
1908
1908
  )
1909
1909
  )
1910
1910
  ),
@@ -1921,10 +1921,10 @@ import { diffJson as diffJson2 } from "diff";
1921
1921
  var CompositionUnpublishModule = {
1922
1922
  command: "unpublish [ids]",
1923
1923
  describe: "Unpublish a composition(s)",
1924
- builder: (yargs25) => withConfiguration(
1924
+ builder: (yargs26) => withConfiguration(
1925
1925
  withApiOptions(
1926
1926
  withProjectOptions(
1927
- yargs25.positional("ids", {
1927
+ yargs26.positional("ids", {
1928
1928
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
1929
1929
  type: "string"
1930
1930
  }).option("all", {
@@ -2018,11 +2018,11 @@ var CompositionUpdateModule = {
2018
2018
  command: "update <filename>",
2019
2019
  aliases: ["put"],
2020
2020
  describe: "Insert or update a composition",
2021
- builder: (yargs25) => withConfiguration(
2021
+ builder: (yargs26) => withConfiguration(
2022
2022
  withApiOptions(
2023
2023
  withProjectOptions(
2024
2024
  withStateOptions(
2025
- yargs25.positional("filename", { demandOption: true, describe: "Composition/pattern file to put" })
2025
+ yargs26.positional("filename", { demandOption: true, describe: "Composition/pattern file to put" })
2026
2026
  )
2027
2027
  )
2028
2028
  )
@@ -2040,7 +2040,7 @@ var CompositionModule = {
2040
2040
  command: "composition <command>",
2041
2041
  describe: "Commands for Canvas compositions",
2042
2042
  aliases: ["comp"],
2043
- builder: (yargs25) => yargs25.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
2043
+ builder: (yargs26) => yargs26.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
2044
2044
  handler: () => {
2045
2045
  yargs3.help();
2046
2046
  }
@@ -2054,12 +2054,12 @@ import { ContentClient } from "@uniformdev/canvas";
2054
2054
  var ContentTypeGetModule = {
2055
2055
  command: "get <id>",
2056
2056
  describe: "Get a content type",
2057
- builder: (yargs25) => withConfiguration(
2057
+ builder: (yargs26) => withConfiguration(
2058
2058
  withFormatOptions(
2059
2059
  withApiOptions(
2060
2060
  withProjectOptions(
2061
2061
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2062
- yargs25.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
2062
+ yargs26.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
2063
2063
  )
2064
2064
  )
2065
2065
  )
@@ -2081,7 +2081,7 @@ import { ContentClient as ContentClient2 } from "@uniformdev/canvas";
2081
2081
  var ContentTypeListModule = {
2082
2082
  command: "list",
2083
2083
  describe: "List content types",
2084
- builder: (yargs25) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs25)))),
2084
+ builder: (yargs26) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs26)))),
2085
2085
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2086
2086
  const fetch3 = nodeFetchProxy(proxy);
2087
2087
  const client = new ContentClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -2128,11 +2128,11 @@ function createContentTypeEngineDataSource({
2128
2128
  var ContentTypePullModule = {
2129
2129
  command: "pull <directory>",
2130
2130
  describe: "Pulls all content types to local files in a directory",
2131
- builder: (yargs25) => withConfiguration(
2131
+ builder: (yargs26) => withConfiguration(
2132
2132
  withApiOptions(
2133
2133
  withProjectOptions(
2134
2134
  withDiffOptions(
2135
- yargs25.positional("directory", {
2135
+ yargs26.positional("directory", {
2136
2136
  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.",
2137
2137
  type: "string"
2138
2138
  }).option("format", {
@@ -2214,11 +2214,11 @@ import { ContentClient as ContentClient4 } from "@uniformdev/canvas";
2214
2214
  var ContentTypePushModule = {
2215
2215
  command: "push <directory>",
2216
2216
  describe: "Pushes all content types from files in a directory to Uniform",
2217
- builder: (yargs25) => withConfiguration(
2217
+ builder: (yargs26) => withConfiguration(
2218
2218
  withApiOptions(
2219
2219
  withProjectOptions(
2220
2220
  withDiffOptions(
2221
- yargs25.positional("directory", {
2221
+ yargs26.positional("directory", {
2222
2222
  describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
2223
2223
  type: "string"
2224
2224
  }).option("what-if", {
@@ -2288,10 +2288,10 @@ var ContentTypeRemoveModule = {
2288
2288
  command: "remove <id>",
2289
2289
  aliases: ["delete", "rm"],
2290
2290
  describe: "Delete a content type",
2291
- builder: (yargs25) => withConfiguration(
2291
+ builder: (yargs26) => withConfiguration(
2292
2292
  withApiOptions(
2293
2293
  withProjectOptions(
2294
- yargs25.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
2294
+ yargs26.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
2295
2295
  )
2296
2296
  )
2297
2297
  ),
@@ -2308,10 +2308,10 @@ var ContentTypeUpdateModule = {
2308
2308
  command: "update <filename>",
2309
2309
  aliases: ["put"],
2310
2310
  describe: "Insert or update a content type",
2311
- builder: (yargs25) => withConfiguration(
2311
+ builder: (yargs26) => withConfiguration(
2312
2312
  withApiOptions(
2313
2313
  withProjectOptions(
2314
- yargs25.positional("filename", { demandOption: true, describe: "Content type file to put" })
2314
+ yargs26.positional("filename", { demandOption: true, describe: "Content type file to put" })
2315
2315
  )
2316
2316
  )
2317
2317
  ),
@@ -2328,7 +2328,7 @@ var ContentTypeModule = {
2328
2328
  command: "contenttype <command>",
2329
2329
  aliases: ["ct"],
2330
2330
  describe: "Commands for Content Types",
2331
- builder: (yargs25) => yargs25.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
2331
+ builder: (yargs26) => yargs26.command(ContentTypeGetModule).command(ContentTypeListModule).command(ContentTypeRemoveModule).command(ContentTypeUpdateModule).command(ContentTypePullModule).command(ContentTypePushModule).demandCommand(),
2332
2332
  handler: () => {
2333
2333
  yargs4.help();
2334
2334
  }
@@ -2343,12 +2343,12 @@ var DataTypeGetModule = {
2343
2343
  command: "get <id>",
2344
2344
  describe: "Get a data type",
2345
2345
  aliases: ["ls"],
2346
- builder: (yargs25) => withConfiguration(
2346
+ builder: (yargs26) => withConfiguration(
2347
2347
  withFormatOptions(
2348
2348
  withApiOptions(
2349
2349
  withProjectOptions(
2350
2350
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2351
- yargs25.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
2351
+ yargs26.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
2352
2352
  )
2353
2353
  )
2354
2354
  )
@@ -2371,7 +2371,7 @@ var DataTypeListModule = {
2371
2371
  command: "list",
2372
2372
  describe: "List data types",
2373
2373
  aliases: ["ls"],
2374
- builder: (yargs25) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs25)))),
2374
+ builder: (yargs26) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs26)))),
2375
2375
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2376
2376
  const fetch3 = nodeFetchProxy(proxy);
2377
2377
  const client = new DataTypeClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -2424,11 +2424,11 @@ function createDataTypeEngineDataSource({
2424
2424
  var DataTypePullModule = {
2425
2425
  command: "pull <directory>",
2426
2426
  describe: "Pulls all data types to local files in a directory",
2427
- builder: (yargs25) => withConfiguration(
2427
+ builder: (yargs26) => withConfiguration(
2428
2428
  withApiOptions(
2429
2429
  withProjectOptions(
2430
2430
  withDiffOptions(
2431
- yargs25.positional("directory", {
2431
+ yargs26.positional("directory", {
2432
2432
  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.",
2433
2433
  type: "string"
2434
2434
  }).option("format", {
@@ -2510,11 +2510,11 @@ import { DataTypeClient as DataTypeClient4 } from "@uniformdev/canvas";
2510
2510
  var DataTypePushModule = {
2511
2511
  command: "push <directory>",
2512
2512
  describe: "Pushes all data types from files in a directory to Uniform",
2513
- builder: (yargs25) => withConfiguration(
2513
+ builder: (yargs26) => withConfiguration(
2514
2514
  withApiOptions(
2515
2515
  withProjectOptions(
2516
2516
  withDiffOptions(
2517
- yargs25.positional("directory", {
2517
+ yargs26.positional("directory", {
2518
2518
  describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
2519
2519
  type: "string"
2520
2520
  }).option("what-if", {
@@ -2584,10 +2584,10 @@ var DataTypeRemoveModule = {
2584
2584
  command: "remove <id>",
2585
2585
  aliases: ["delete", "rm"],
2586
2586
  describe: "Delete a data type",
2587
- builder: (yargs25) => withConfiguration(
2587
+ builder: (yargs26) => withConfiguration(
2588
2588
  withApiOptions(
2589
2589
  withProjectOptions(
2590
- yargs25.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
2590
+ yargs26.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
2591
2591
  )
2592
2592
  )
2593
2593
  ),
@@ -2604,10 +2604,10 @@ var DataTypeUpdateModule = {
2604
2604
  command: "update <filename>",
2605
2605
  aliases: ["put"],
2606
2606
  describe: "Insert or update a data type",
2607
- builder: (yargs25) => withConfiguration(
2607
+ builder: (yargs26) => withConfiguration(
2608
2608
  withApiOptions(
2609
2609
  withProjectOptions(
2610
- yargs25.positional("filename", { demandOption: true, describe: "Data type file to put" })
2610
+ yargs26.positional("filename", { demandOption: true, describe: "Data type file to put" })
2611
2611
  )
2612
2612
  )
2613
2613
  ),
@@ -2624,7 +2624,7 @@ var DataTypeModule = {
2624
2624
  command: "datatype <command>",
2625
2625
  aliases: ["dt"],
2626
2626
  describe: "Commands for Data Type definitions",
2627
- builder: (yargs25) => yargs25.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
2627
+ builder: (yargs26) => yargs26.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
2628
2628
  handler: () => {
2629
2629
  yargs5.help();
2630
2630
  }
@@ -2638,12 +2638,12 @@ import { ContentClient as ContentClient7 } from "@uniformdev/canvas";
2638
2638
  var EntryGetModule = {
2639
2639
  command: "get <id>",
2640
2640
  describe: "Get an entry",
2641
- builder: (yargs25) => withConfiguration(
2641
+ builder: (yargs26) => withConfiguration(
2642
2642
  withFormatOptions(
2643
2643
  withApiOptions(
2644
2644
  withProjectOptions(
2645
2645
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2646
- yargs25.positional("id", { demandOption: true, describe: "Entry public ID to fetch" })
2646
+ yargs26.positional("id", { demandOption: true, describe: "Entry public ID to fetch" })
2647
2647
  )
2648
2648
  )
2649
2649
  )
@@ -2664,7 +2664,7 @@ import { ContentClient as ContentClient8 } from "@uniformdev/canvas";
2664
2664
  var EntryListModule = {
2665
2665
  command: "list",
2666
2666
  describe: "List entries",
2667
- builder: (yargs25) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs25)))),
2667
+ builder: (yargs26) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs26)))),
2668
2668
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2669
2669
  const fetch3 = nodeFetchProxy(proxy);
2670
2670
  const client = new ContentClient8({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -2694,7 +2694,8 @@ function createEntryEngineDataSource({
2694
2694
  offset: 0,
2695
2695
  limit: 1e3,
2696
2696
  skipDataResolution: true,
2697
- state: stateId
2697
+ state: stateId,
2698
+ withComponentIDs: true
2698
2699
  });
2699
2700
  for await (const e of entries) {
2700
2701
  const result = {
@@ -2721,12 +2722,12 @@ function createEntryEngineDataSource({
2721
2722
  var EntryPullModule = {
2722
2723
  command: "pull <directory>",
2723
2724
  describe: "Pulls all entries to local files in a directory",
2724
- builder: (yargs25) => withConfiguration(
2725
+ builder: (yargs26) => withConfiguration(
2725
2726
  withApiOptions(
2726
2727
  withProjectOptions(
2727
2728
  withStateOptions(
2728
2729
  withDiffOptions(
2729
- yargs25.positional("directory", {
2730
+ yargs26.positional("directory", {
2730
2731
  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.",
2731
2732
  type: "string"
2732
2733
  }).option("format", {
@@ -2810,12 +2811,12 @@ import { ContentClient as ContentClient11 } from "@uniformdev/canvas";
2810
2811
  var EntryPushModule = {
2811
2812
  command: "push <directory>",
2812
2813
  describe: "Pushes all entries from files in a directory to Uniform",
2813
- builder: (yargs25) => withConfiguration(
2814
+ builder: (yargs26) => withConfiguration(
2814
2815
  withApiOptions(
2815
2816
  withProjectOptions(
2816
2817
  withStateOptions(
2817
2818
  withDiffOptions(
2818
- yargs25.positional("directory", {
2819
+ yargs26.positional("directory", {
2819
2820
  describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
2820
2821
  type: "string"
2821
2822
  }).option("what-if", {
@@ -2887,10 +2888,10 @@ var EntryRemoveModule = {
2887
2888
  command: "remove <id>",
2888
2889
  aliases: ["delete", "rm"],
2889
2890
  describe: "Delete an entry",
2890
- builder: (yargs25) => withConfiguration(
2891
+ builder: (yargs26) => withConfiguration(
2891
2892
  withApiOptions(
2892
2893
  withProjectOptions(
2893
- yargs25.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
2894
+ yargs26.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
2894
2895
  )
2895
2896
  )
2896
2897
  ),
@@ -2907,10 +2908,10 @@ var EntryUpdateModule = {
2907
2908
  command: "update <filename>",
2908
2909
  aliases: ["put"],
2909
2910
  describe: "Insert or update an entry",
2910
- builder: (yargs25) => withConfiguration(
2911
+ builder: (yargs26) => withConfiguration(
2911
2912
  withApiOptions(
2912
2913
  withProjectOptions(
2913
- yargs25.positional("filename", { demandOption: true, describe: "Entry file to put" })
2914
+ yargs26.positional("filename", { demandOption: true, describe: "Entry file to put" })
2914
2915
  )
2915
2916
  )
2916
2917
  ),
@@ -2926,7 +2927,7 @@ var EntryUpdateModule = {
2926
2927
  var EntryModule = {
2927
2928
  command: "entry <command>",
2928
2929
  describe: "Commands for Entries",
2929
- builder: (yargs25) => yargs25.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).demandCommand(),
2930
+ builder: (yargs26) => yargs26.command(EntryGetModule).command(EntryListModule).command(EntryRemoveModule).command(EntryUpdateModule).command(EntryPullModule).command(EntryPushModule).demandCommand(),
2930
2931
  handler: () => {
2931
2932
  yargs6.help();
2932
2933
  }
@@ -2945,12 +2946,12 @@ var PatternGetModule = {
2945
2946
  var PatternListModule = {
2946
2947
  ...CompositionListModule,
2947
2948
  describe: "List patterns",
2948
- builder: (yargs25) => withFormatOptions(
2949
+ builder: (yargs26) => withFormatOptions(
2949
2950
  withConfiguration(
2950
2951
  withApiOptions(
2951
2952
  withProjectOptions(
2952
2953
  withStateOptions(
2953
- yargs25.options({
2954
+ yargs26.options({
2954
2955
  offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
2955
2956
  limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
2956
2957
  resolvePatterns: {
@@ -2988,11 +2989,11 @@ var PatternListModule = {
2988
2989
  var PatternPublishModule = {
2989
2990
  ...CompositionPublishModule,
2990
2991
  describe: "Publishes pattern(s)",
2991
- builder: (yargs25) => withConfiguration(
2992
+ builder: (yargs26) => withConfiguration(
2992
2993
  withApiOptions(
2993
2994
  withProjectOptions(
2994
2995
  withDiffOptions(
2995
- yargs25.positional("ids", {
2996
+ yargs26.positional("ids", {
2996
2997
  describe: "Publishes pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
2997
2998
  type: "string"
2998
2999
  }).option("all", {
@@ -3030,12 +3031,12 @@ var PatternPublishModule = {
3030
3031
  var PatternPullModule = {
3031
3032
  ...CompositionPullModule,
3032
3033
  describe: "Pulls all patterns to local files in a directory",
3033
- builder: (yargs25) => withConfiguration(
3034
+ builder: (yargs26) => withConfiguration(
3034
3035
  withApiOptions(
3035
3036
  withProjectOptions(
3036
3037
  withStateOptions(
3037
3038
  withDiffOptions(
3038
- yargs25.positional("directory", {
3039
+ yargs26.positional("directory", {
3039
3040
  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.",
3040
3041
  type: "string"
3041
3042
  }).option("format", {
@@ -3073,12 +3074,12 @@ var PatternPullModule = {
3073
3074
  var PatternPushModule = {
3074
3075
  ...CompositionPushModule,
3075
3076
  describe: "Pushes all patterns from files in a directory to Uniform Canvas",
3076
- builder: (yargs25) => withConfiguration(
3077
+ builder: (yargs26) => withConfiguration(
3077
3078
  withApiOptions(
3078
3079
  withProjectOptions(
3079
3080
  withStateOptions(
3080
3081
  withDiffOptions(
3081
- yargs25.positional("directory", {
3082
+ yargs26.positional("directory", {
3082
3083
  describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
3083
3084
  type: "string"
3084
3085
  }).option("what-if", {
@@ -3116,10 +3117,10 @@ var PatternRemoveModule = {
3116
3117
  var PatternUnpublishModule = {
3117
3118
  command: "unpublish [ids]",
3118
3119
  describe: "Unpublish a pattern(s)",
3119
- builder: (yargs25) => withConfiguration(
3120
+ builder: (yargs26) => withConfiguration(
3120
3121
  withApiOptions(
3121
3122
  withProjectOptions(
3122
- yargs25.positional("ids", {
3123
+ yargs26.positional("ids", {
3123
3124
  describe: "Un-publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to un-publish all instead.",
3124
3125
  type: "string"
3125
3126
  }).option("all", {
@@ -3158,39 +3159,328 @@ var PatternUpdateModule = {
3158
3159
  var PatternModule = {
3159
3160
  command: "pattern <command>",
3160
3161
  describe: "Commands for Canvas patterns",
3161
- builder: (yargs25) => yargs25.command(PatternPullModule).command(PatternPushModule).command(PatternGetModule).command(PatternRemoveModule).command(PatternListModule).command(PatternUpdateModule).command(PatternPublishModule).command(PatternUnpublishModule).demandCommand(),
3162
+ builder: (yargs26) => yargs26.command(PatternPullModule).command(PatternPushModule).command(PatternGetModule).command(PatternRemoveModule).command(PatternListModule).command(PatternUpdateModule).command(PatternPublishModule).command(PatternUnpublishModule).demandCommand(),
3162
3163
  handler: () => {
3163
3164
  yargs7.help();
3164
3165
  }
3165
3166
  };
3166
3167
 
3168
+ // src/commands/canvas/commands/prompts.ts
3169
+ import yargs8 from "yargs";
3170
+
3171
+ // src/commands/canvas/commands/prompts/get.ts
3172
+ import { PromptClient } from "@uniformdev/canvas";
3173
+ var PromptGetModule = {
3174
+ command: "get <id>",
3175
+ describe: "Get a prompt",
3176
+ builder: (yargs26) => withConfiguration(
3177
+ withFormatOptions(
3178
+ withApiOptions(
3179
+ withProjectOptions(
3180
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3181
+ yargs26.positional("id", { demandOption: true, describe: "Prompt ID to fetch" })
3182
+ )
3183
+ )
3184
+ )
3185
+ ),
3186
+ handler: async ({ apiHost, apiKey, proxy, id, format, filename, project: projectId }) => {
3187
+ const fetch3 = nodeFetchProxy(proxy);
3188
+ const client = new PromptClient({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
3189
+ const res = await client.get({ promptId: id });
3190
+ if (!res.result) {
3191
+ throw new Error(`Prompt with ID ${id} not found`);
3192
+ }
3193
+ emitWithFormat(res.result, format, filename);
3194
+ }
3195
+ };
3196
+
3197
+ // src/commands/canvas/commands/prompts/list.ts
3198
+ import { PromptClient as PromptClient2 } from "@uniformdev/canvas";
3199
+ var PromptListModule = {
3200
+ command: "list",
3201
+ describe: "List prompts",
3202
+ builder: (yargs26) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs26)))),
3203
+ handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3204
+ const fetch3 = nodeFetchProxy(proxy);
3205
+ const client = new PromptClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
3206
+ const res = await client.getList();
3207
+ emitWithFormat(res.results, format, filename);
3208
+ }
3209
+ };
3210
+
3211
+ // src/commands/canvas/commands/prompts/pull.ts
3212
+ import { PromptClient as PromptClient3 } from "@uniformdev/canvas";
3213
+
3214
+ // src/commands/canvas/commands/prompts/_util.ts
3215
+ var selectPromptIdentifier = (e) => e.id;
3216
+ var selectPromptDisplayName = (e) => `${e.promptName ?? "Untitled"} (pid: ${e.id})`;
3217
+
3218
+ // src/commands/canvas/promptEngineDataSource.ts
3219
+ function createPromptEngineDataSource({
3220
+ client
3221
+ }) {
3222
+ async function* getObjects() {
3223
+ const { results: prompts } = await client.getList();
3224
+ for await (const prompt of prompts) {
3225
+ const result = {
3226
+ id: selectPromptIdentifier(prompt),
3227
+ displayName: selectPromptDisplayName(prompt),
3228
+ providerId: prompt.id,
3229
+ object: prompt
3230
+ };
3231
+ yield result;
3232
+ }
3233
+ }
3234
+ return {
3235
+ objects: getObjects(),
3236
+ deleteObject: async (providerId) => {
3237
+ await client.remove({ promptId: providerId });
3238
+ },
3239
+ writeObject: async ({ object }) => {
3240
+ await client.upsert({ data: object });
3241
+ }
3242
+ };
3243
+ }
3244
+
3245
+ // src/commands/canvas/commands/prompts/pull.ts
3246
+ var PromptPullModule = {
3247
+ command: "pull <directory>",
3248
+ describe: "Pulls all entries to local files in a directory",
3249
+ builder: (yargs26) => withConfiguration(
3250
+ withApiOptions(
3251
+ withProjectOptions(
3252
+ withStateOptions(
3253
+ withDiffOptions(
3254
+ yargs26.positional("directory", {
3255
+ 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.",
3256
+ type: "string"
3257
+ }).option("format", {
3258
+ alias: ["f"],
3259
+ describe: "Output format",
3260
+ default: "yaml",
3261
+ choices: ["yaml", "json"],
3262
+ type: "string"
3263
+ }).option("what-if", {
3264
+ alias: ["w"],
3265
+ describe: "What-if mode reports what would be done but changes no files",
3266
+ default: false,
3267
+ type: "boolean"
3268
+ }).option("mode", {
3269
+ alias: ["m"],
3270
+ 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',
3271
+ choices: ["create", "createOrUpdate", "mirror"],
3272
+ default: "mirror",
3273
+ type: "string"
3274
+ })
3275
+ )
3276
+ )
3277
+ )
3278
+ )
3279
+ ),
3280
+ handler: async ({
3281
+ apiHost,
3282
+ apiKey,
3283
+ proxy,
3284
+ directory,
3285
+ format,
3286
+ mode,
3287
+ whatIf,
3288
+ project: projectId,
3289
+ diff: diffMode
3290
+ }) => {
3291
+ const fetch3 = nodeFetchProxy(proxy);
3292
+ const client = new PromptClient3({
3293
+ apiKey,
3294
+ apiHost,
3295
+ fetch: fetch3,
3296
+ projectId,
3297
+ bypassCache: true
3298
+ });
3299
+ const source = createPromptEngineDataSource({ client });
3300
+ let target;
3301
+ const isPackage = isPathAPackageFile(directory);
3302
+ if (isPackage) {
3303
+ const packageContents = readCanvasPackage(directory, false);
3304
+ target = await createArraySyncEngineDataSource({
3305
+ objects: packageContents.prompts ?? [],
3306
+ selectIdentifier: selectPromptIdentifier,
3307
+ selectDisplayName: selectPromptDisplayName,
3308
+ onSyncComplete: async (_, synced) => {
3309
+ packageContents.prompts = synced;
3310
+ writeCanvasPackage(directory, packageContents);
3311
+ }
3312
+ });
3313
+ } else {
3314
+ target = await createFileSyncEngineDataSource({
3315
+ directory,
3316
+ selectIdentifier: selectPromptIdentifier,
3317
+ selectDisplayName: selectPromptDisplayName,
3318
+ format
3319
+ });
3320
+ }
3321
+ await syncEngine({
3322
+ source,
3323
+ target,
3324
+ mode,
3325
+ whatIf,
3326
+ allowEmptySource: true,
3327
+ log: createSyncEngineConsoleLogger({ diffMode })
3328
+ });
3329
+ }
3330
+ };
3331
+
3332
+ // src/commands/canvas/commands/prompts/push.ts
3333
+ import { PromptClient as PromptClient4 } from "@uniformdev/canvas";
3334
+ var PromptPushModule = {
3335
+ command: "push <directory>",
3336
+ describe: "Pushes all prompts from files in a directory to Uniform",
3337
+ builder: (yargs26) => withConfiguration(
3338
+ withApiOptions(
3339
+ withProjectOptions(
3340
+ withStateOptions(
3341
+ withDiffOptions(
3342
+ yargs26.positional("directory", {
3343
+ describe: "Directory to read the prompts from. If a filename is used, a package will be read instead.",
3344
+ type: "string"
3345
+ }).option("what-if", {
3346
+ alias: ["w"],
3347
+ describe: "What-if mode reports what would be done but changes nothing",
3348
+ default: false,
3349
+ type: "boolean"
3350
+ }).option("mode", {
3351
+ alias: ["m"],
3352
+ 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',
3353
+ choices: ["create", "createOrUpdate", "mirror"],
3354
+ default: "mirror",
3355
+ type: "string"
3356
+ })
3357
+ )
3358
+ )
3359
+ )
3360
+ )
3361
+ ),
3362
+ handler: async ({
3363
+ apiHost,
3364
+ apiKey,
3365
+ proxy,
3366
+ directory,
3367
+ mode,
3368
+ whatIf,
3369
+ project: projectId,
3370
+ diff: diffMode
3371
+ }) => {
3372
+ const fetch3 = nodeFetchProxy(proxy);
3373
+ const client = new PromptClient4({
3374
+ apiKey,
3375
+ apiHost,
3376
+ fetch: fetch3,
3377
+ projectId,
3378
+ bypassCache: true
3379
+ });
3380
+ let source;
3381
+ const isPackage = isPathAPackageFile(directory);
3382
+ if (isPackage) {
3383
+ const packageContents = readCanvasPackage(directory, true);
3384
+ source = await createArraySyncEngineDataSource({
3385
+ objects: packageContents.prompts ?? [],
3386
+ selectIdentifier: selectPromptIdentifier,
3387
+ selectDisplayName: selectPromptDisplayName
3388
+ });
3389
+ } else {
3390
+ source = await createFileSyncEngineDataSource({
3391
+ directory,
3392
+ selectIdentifier: selectPromptIdentifier,
3393
+ selectDisplayName: selectPromptDisplayName
3394
+ });
3395
+ }
3396
+ const target = createPromptEngineDataSource({ client });
3397
+ await syncEngine({
3398
+ source,
3399
+ target,
3400
+ mode,
3401
+ whatIf,
3402
+ log: createSyncEngineConsoleLogger({ diffMode })
3403
+ });
3404
+ }
3405
+ };
3406
+
3407
+ // src/commands/canvas/commands/prompts/remove.ts
3408
+ import { PromptClient as PromptClient5 } from "@uniformdev/canvas";
3409
+ var PromptRemoveModule = {
3410
+ command: "remove <id>",
3411
+ aliases: ["delete", "rm"],
3412
+ describe: "Delete a prompt",
3413
+ builder: (yargs26) => withConfiguration(
3414
+ withApiOptions(
3415
+ withProjectOptions(yargs26.positional("id", { demandOption: true, describe: "Prompt ID to delete" }))
3416
+ )
3417
+ ),
3418
+ handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
3419
+ const fetch3 = nodeFetchProxy(proxy);
3420
+ const client = new PromptClient5({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
3421
+ await client.remove({ promptId: id });
3422
+ }
3423
+ };
3424
+
3425
+ // src/commands/canvas/commands/prompts/update.ts
3426
+ import { PromptClient as PromptClient6 } from "@uniformdev/canvas";
3427
+ var PromptUpdateModule = {
3428
+ command: "update <filename>",
3429
+ aliases: ["put"],
3430
+ describe: "Insert or update a prompt",
3431
+ builder: (yargs26) => withConfiguration(
3432
+ withApiOptions(
3433
+ withProjectOptions(
3434
+ yargs26.positional("filename", { demandOption: true, describe: "Prompt file to put" })
3435
+ )
3436
+ )
3437
+ ),
3438
+ handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
3439
+ const fetch3 = nodeFetchProxy(proxy);
3440
+ const client = new PromptClient6({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
3441
+ const file = readFileToObject(filename);
3442
+ await client.upsert({ data: file });
3443
+ }
3444
+ };
3445
+
3446
+ // src/commands/canvas/commands/prompts.ts
3447
+ var PromptModule = {
3448
+ command: "prompt <command>",
3449
+ aliases: ["dt"],
3450
+ describe: "Commands for AI Prompt definitions",
3451
+ builder: (yargs26) => yargs26.command(PromptGetModule).command(PromptListModule).command(PromptPullModule).command(PromptPushModule).command(PromptRemoveModule).command(PromptUpdateModule).demandCommand(),
3452
+ handler: () => {
3453
+ yargs8.help();
3454
+ }
3455
+ };
3456
+
3167
3457
  // src/commands/canvas/index.ts
3168
3458
  var CanvasCommand = {
3169
3459
  command: "canvas <command>",
3170
3460
  aliases: ["cv", "pm", "presentation"],
3171
3461
  describe: "Uniform Canvas commands",
3172
- builder: (yargs25) => yargs25.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(CategoryModule).command(PatternModule).command(ContentTypeModule).command(EntryModule).demandCommand(),
3462
+ builder: (yargs26) => yargs26.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(CategoryModule).command(PatternModule).command(ContentTypeModule).command(EntryModule).command(PromptModule).demandCommand(),
3173
3463
  handler: () => {
3174
- yargs8.showHelp();
3464
+ yargs9.showHelp();
3175
3465
  }
3176
3466
  };
3177
3467
 
3178
3468
  // src/commands/context/index.ts
3179
- import yargs15 from "yargs";
3469
+ import yargs16 from "yargs";
3180
3470
 
3181
3471
  // src/commands/context/commands/aggregate.ts
3182
- import yargs9 from "yargs";
3472
+ import yargs10 from "yargs";
3183
3473
 
3184
3474
  // src/commands/context/commands/aggregate/get.ts
3185
3475
  import { UncachedAggregateClient } from "@uniformdev/context/api";
3186
3476
  var AggregateGetModule = {
3187
3477
  command: "get <id>",
3188
3478
  describe: "Fetch an aggregate",
3189
- builder: (yargs25) => withConfiguration(
3479
+ builder: (yargs26) => withConfiguration(
3190
3480
  withFormatOptions(
3191
3481
  withApiOptions(
3192
3482
  withProjectOptions(
3193
- yargs25.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
3483
+ yargs26.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
3194
3484
  )
3195
3485
  )
3196
3486
  )
@@ -3214,7 +3504,7 @@ var AggregateListModule = {
3214
3504
  command: "list",
3215
3505
  describe: "List aggregates",
3216
3506
  aliases: ["ls"],
3217
- builder: (yargs25) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs25)))),
3507
+ builder: (yargs26) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs26)))),
3218
3508
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3219
3509
  const fetch3 = nodeFetchProxy(proxy);
3220
3510
  const client = new UncachedAggregateClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -3280,11 +3570,11 @@ function writeContextPackage(filename, packageContents) {
3280
3570
  var AggregatePullModule = {
3281
3571
  command: "pull <directory>",
3282
3572
  describe: "Pulls all aggregates to local files in a directory",
3283
- builder: (yargs25) => withConfiguration(
3573
+ builder: (yargs26) => withConfiguration(
3284
3574
  withApiOptions(
3285
3575
  withProjectOptions(
3286
3576
  withDiffOptions(
3287
- yargs25.positional("directory", {
3577
+ yargs26.positional("directory", {
3288
3578
  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.",
3289
3579
  type: "string"
3290
3580
  }).option("format", {
@@ -3359,11 +3649,11 @@ import { UncachedAggregateClient as UncachedAggregateClient4 } from "@uniformdev
3359
3649
  var AggregatePushModule = {
3360
3650
  command: "push <directory>",
3361
3651
  describe: "Pushes all aggregates from files in a directory or package to Uniform",
3362
- builder: (yargs25) => withConfiguration(
3652
+ builder: (yargs26) => withConfiguration(
3363
3653
  withApiOptions(
3364
3654
  withProjectOptions(
3365
3655
  withDiffOptions(
3366
- yargs25.positional("directory", {
3656
+ yargs26.positional("directory", {
3367
3657
  describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
3368
3658
  type: "string"
3369
3659
  }).option("what-if", {
@@ -3428,10 +3718,10 @@ var AggregateRemoveModule = {
3428
3718
  command: "remove <id>",
3429
3719
  aliases: ["delete", "rm"],
3430
3720
  describe: "Delete an aggregate",
3431
- builder: (yargs25) => withConfiguration(
3721
+ builder: (yargs26) => withConfiguration(
3432
3722
  withApiOptions(
3433
3723
  withProjectOptions(
3434
- yargs25.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
3724
+ yargs26.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
3435
3725
  )
3436
3726
  )
3437
3727
  ),
@@ -3448,10 +3738,10 @@ var AggregateUpdateModule = {
3448
3738
  command: "update <filename>",
3449
3739
  aliases: ["put"],
3450
3740
  describe: "Insert or update an aggregate",
3451
- builder: (yargs25) => withConfiguration(
3741
+ builder: (yargs26) => withConfiguration(
3452
3742
  withApiOptions(
3453
3743
  withProjectOptions(
3454
- yargs25.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
3744
+ yargs26.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
3455
3745
  )
3456
3746
  )
3457
3747
  ),
@@ -3468,25 +3758,25 @@ var AggregateModule = {
3468
3758
  command: "aggregate <command>",
3469
3759
  aliases: ["agg", "intent", "audience"],
3470
3760
  describe: "Commands for Context aggregates (intents, audiences)",
3471
- builder: (yargs25) => yargs25.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
3761
+ builder: (yargs26) => yargs26.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
3472
3762
  handler: () => {
3473
- yargs9.help();
3763
+ yargs10.help();
3474
3764
  }
3475
3765
  };
3476
3766
 
3477
3767
  // src/commands/context/commands/enrichment.ts
3478
- import yargs10 from "yargs";
3768
+ import yargs11 from "yargs";
3479
3769
 
3480
3770
  // src/commands/context/commands/enrichment/get.ts
3481
3771
  import { UncachedEnrichmentClient } from "@uniformdev/context/api";
3482
3772
  var EnrichmentGetModule = {
3483
3773
  command: "get <id>",
3484
3774
  describe: "Fetch an enrichment category and its values",
3485
- builder: (yargs25) => withFormatOptions(
3775
+ builder: (yargs26) => withFormatOptions(
3486
3776
  withConfiguration(
3487
3777
  withApiOptions(
3488
3778
  withProjectOptions(
3489
- yargs25.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
3779
+ yargs26.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
3490
3780
  )
3491
3781
  )
3492
3782
  )
@@ -3511,7 +3801,7 @@ var EnrichmentListModule = {
3511
3801
  command: "list",
3512
3802
  describe: "List enrichments",
3513
3803
  aliases: ["ls"],
3514
- builder: (yargs25) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs25)))),
3804
+ builder: (yargs26) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs26)))),
3515
3805
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3516
3806
  const fetch3 = nodeFetchProxy(proxy);
3517
3807
  const client = new UncachedEnrichmentClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -3612,11 +3902,11 @@ var createEnrichmentValueEngineDataSource = ({
3612
3902
  var EnrichmentPullModule = {
3613
3903
  command: "pull <directory>",
3614
3904
  describe: "Pulls all enrichments to local files in a directory",
3615
- builder: (yargs25) => withConfiguration(
3905
+ builder: (yargs26) => withConfiguration(
3616
3906
  withApiOptions(
3617
3907
  withProjectOptions(
3618
3908
  withDiffOptions(
3619
- yargs25.positional("directory", {
3909
+ yargs26.positional("directory", {
3620
3910
  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.",
3621
3911
  type: "string"
3622
3912
  }).option("format", {
@@ -3691,11 +3981,11 @@ import { UncachedEnrichmentClient as UncachedEnrichmentClient4 } from "@uniformd
3691
3981
  var EnrichmentPushModule = {
3692
3982
  command: "push <directory>",
3693
3983
  describe: "Pushes all enrichments from files in a directory or package to Uniform",
3694
- builder: (yargs25) => withConfiguration(
3984
+ builder: (yargs26) => withConfiguration(
3695
3985
  withApiOptions(
3696
3986
  withProjectOptions(
3697
3987
  withDiffOptions(
3698
- yargs25.positional("directory", {
3988
+ yargs26.positional("directory", {
3699
3989
  describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
3700
3990
  type: "string"
3701
3991
  }).option("what-if", {
@@ -3759,10 +4049,10 @@ var EnrichmentRemoveModule = {
3759
4049
  command: "remove <id>",
3760
4050
  aliases: ["delete", "rm"],
3761
4051
  describe: "Delete an enrichment category and its values",
3762
- builder: (yargs25) => withConfiguration(
4052
+ builder: (yargs26) => withConfiguration(
3763
4053
  withApiOptions(
3764
4054
  withProjectOptions(
3765
- yargs25.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
4055
+ yargs26.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
3766
4056
  )
3767
4057
  )
3768
4058
  ),
@@ -3778,14 +4068,14 @@ var EnrichmentModule = {
3778
4068
  command: "enrichment <command>",
3779
4069
  aliases: ["enr"],
3780
4070
  describe: "Commands for Context enrichments",
3781
- builder: (yargs25) => yargs25.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
4071
+ builder: (yargs26) => yargs26.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
3782
4072
  handler: () => {
3783
- yargs10.help();
4073
+ yargs11.help();
3784
4074
  }
3785
4075
  };
3786
4076
 
3787
4077
  // src/commands/context/commands/manifest.ts
3788
- import yargs11 from "yargs";
4078
+ import yargs12 from "yargs";
3789
4079
 
3790
4080
  // src/commands/context/commands/manifest/get.ts
3791
4081
  import { ApiClientError, UncachedManifestClient } from "@uniformdev/context/api";
@@ -3796,10 +4086,10 @@ var ManifestGetModule = {
3796
4086
  command: "get [output]",
3797
4087
  aliases: ["dl", "download"],
3798
4088
  describe: "Download the Uniform Context manifest for a project",
3799
- builder: (yargs25) => withConfiguration(
4089
+ builder: (yargs26) => withConfiguration(
3800
4090
  withApiOptions(
3801
4091
  withProjectOptions(
3802
- yargs25.option("preview", {
4092
+ yargs26.option("preview", {
3803
4093
  describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
3804
4094
  default: false,
3805
4095
  type: "boolean",
@@ -3861,7 +4151,7 @@ import { exit as exit2 } from "process";
3861
4151
  var ManifestPublishModule = {
3862
4152
  command: "publish",
3863
4153
  describe: "Publish the Uniform Context manifest for a project",
3864
- builder: (yargs25) => withConfiguration(withApiOptions(withProjectOptions(yargs25))),
4154
+ builder: (yargs26) => withConfiguration(withApiOptions(withProjectOptions(yargs26))),
3865
4155
  handler: async ({ apiKey, apiHost, proxy, project }) => {
3866
4156
  const fetch3 = nodeFetchProxy(proxy);
3867
4157
  try {
@@ -3894,25 +4184,25 @@ var ManifestModule = {
3894
4184
  command: "manifest <command>",
3895
4185
  describe: "Commands for context manifests",
3896
4186
  aliases: ["man"],
3897
- builder: (yargs25) => yargs25.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
4187
+ builder: (yargs26) => yargs26.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
3898
4188
  handler: () => {
3899
- yargs11.help();
4189
+ yargs12.help();
3900
4190
  }
3901
4191
  };
3902
4192
 
3903
4193
  // src/commands/context/commands/quirk.ts
3904
- import yargs12 from "yargs";
4194
+ import yargs13 from "yargs";
3905
4195
 
3906
4196
  // src/commands/context/commands/quirk/get.ts
3907
4197
  import { UncachedQuirkClient } from "@uniformdev/context/api";
3908
4198
  var QuirkGetModule = {
3909
4199
  command: "get <id>",
3910
4200
  describe: "Fetch a quirk",
3911
- builder: (yargs25) => withConfiguration(
4201
+ builder: (yargs26) => withConfiguration(
3912
4202
  withFormatOptions(
3913
4203
  withApiOptions(
3914
4204
  withProjectOptions(
3915
- yargs25.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
4205
+ yargs26.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
3916
4206
  )
3917
4207
  )
3918
4208
  )
@@ -3936,11 +4226,11 @@ var QuirkListModule = {
3936
4226
  command: "list",
3937
4227
  describe: "List quirks",
3938
4228
  aliases: ["ls"],
3939
- builder: (yargs25) => withConfiguration(
4229
+ builder: (yargs26) => withConfiguration(
3940
4230
  withFormatOptions(
3941
4231
  withApiOptions(
3942
4232
  withProjectOptions(
3943
- yargs25.option("withIntegrations", {
4233
+ yargs26.option("withIntegrations", {
3944
4234
  alias: ["i"],
3945
4235
  describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
3946
4236
  type: "boolean"
@@ -3997,11 +4287,11 @@ function createQuirkEngineDataSource({
3997
4287
  var QuirkPullModule = {
3998
4288
  command: "pull <directory>",
3999
4289
  describe: "Pulls all quirks to local files in a directory",
4000
- builder: (yargs25) => withConfiguration(
4290
+ builder: (yargs26) => withConfiguration(
4001
4291
  withApiOptions(
4002
4292
  withProjectOptions(
4003
4293
  withDiffOptions(
4004
- yargs25.positional("directory", {
4294
+ yargs26.positional("directory", {
4005
4295
  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.",
4006
4296
  type: "string"
4007
4297
  }).option("format", {
@@ -4076,11 +4366,11 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
4076
4366
  var QuirkPushModule = {
4077
4367
  command: "push <directory>",
4078
4368
  describe: "Pushes all quirks from files in a directory or package to Uniform",
4079
- builder: (yargs25) => withConfiguration(
4369
+ builder: (yargs26) => withConfiguration(
4080
4370
  withApiOptions(
4081
4371
  withProjectOptions(
4082
4372
  withDiffOptions(
4083
- yargs25.positional("directory", {
4373
+ yargs26.positional("directory", {
4084
4374
  describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
4085
4375
  type: "string"
4086
4376
  }).option("what-if", {
@@ -4144,10 +4434,10 @@ var QuirkRemoveModule = {
4144
4434
  command: "remove <id>",
4145
4435
  aliases: ["delete", "rm"],
4146
4436
  describe: "Delete a quirk",
4147
- builder: (yargs25) => withConfiguration(
4437
+ builder: (yargs26) => withConfiguration(
4148
4438
  withApiOptions(
4149
4439
  withProjectOptions(
4150
- yargs25.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
4440
+ yargs26.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
4151
4441
  )
4152
4442
  )
4153
4443
  ),
@@ -4164,10 +4454,10 @@ var QuirkUpdateModule = {
4164
4454
  command: "update <filename>",
4165
4455
  aliases: ["put"],
4166
4456
  describe: "Insert or update a quirk",
4167
- builder: (yargs25) => withConfiguration(
4457
+ builder: (yargs26) => withConfiguration(
4168
4458
  withApiOptions(
4169
4459
  withProjectOptions(
4170
- yargs25.positional("filename", { demandOption: true, describe: "Quirk file to put" })
4460
+ yargs26.positional("filename", { demandOption: true, describe: "Quirk file to put" })
4171
4461
  )
4172
4462
  )
4173
4463
  ),
@@ -4184,25 +4474,25 @@ var QuirkModule = {
4184
4474
  command: "quirk <command>",
4185
4475
  aliases: ["qk"],
4186
4476
  describe: "Commands for Context quirks",
4187
- builder: (yargs25) => yargs25.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
4477
+ builder: (yargs26) => yargs26.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
4188
4478
  handler: () => {
4189
- yargs12.help();
4479
+ yargs13.help();
4190
4480
  }
4191
4481
  };
4192
4482
 
4193
4483
  // src/commands/context/commands/signal.ts
4194
- import yargs13 from "yargs";
4484
+ import yargs14 from "yargs";
4195
4485
 
4196
4486
  // src/commands/context/commands/signal/get.ts
4197
4487
  import { UncachedSignalClient } from "@uniformdev/context/api";
4198
4488
  var SignalGetModule = {
4199
4489
  command: "get <id>",
4200
4490
  describe: "Fetch a signal",
4201
- builder: (yargs25) => withConfiguration(
4491
+ builder: (yargs26) => withConfiguration(
4202
4492
  withFormatOptions(
4203
4493
  withApiOptions(
4204
4494
  withProjectOptions(
4205
- yargs25.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
4495
+ yargs26.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
4206
4496
  )
4207
4497
  )
4208
4498
  )
@@ -4226,7 +4516,7 @@ var SignalListModule = {
4226
4516
  command: "list",
4227
4517
  describe: "List signals",
4228
4518
  aliases: ["ls"],
4229
- builder: (yargs25) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs25)))),
4519
+ builder: (yargs26) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs26)))),
4230
4520
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4231
4521
  const fetch3 = nodeFetchProxy(proxy);
4232
4522
  const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -4275,11 +4565,11 @@ function createSignalEngineDataSource({
4275
4565
  var SignalPullModule = {
4276
4566
  command: "pull <directory>",
4277
4567
  describe: "Pulls all signals to local files in a directory",
4278
- builder: (yargs25) => withConfiguration(
4568
+ builder: (yargs26) => withConfiguration(
4279
4569
  withApiOptions(
4280
4570
  withProjectOptions(
4281
4571
  withDiffOptions(
4282
- yargs25.positional("directory", {
4572
+ yargs26.positional("directory", {
4283
4573
  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.",
4284
4574
  type: "string"
4285
4575
  }).option("format", {
@@ -4354,11 +4644,11 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
4354
4644
  var SignalPushModule = {
4355
4645
  command: "push <directory>",
4356
4646
  describe: "Pushes all signals from files in a directory or package to Uniform",
4357
- builder: (yargs25) => withConfiguration(
4647
+ builder: (yargs26) => withConfiguration(
4358
4648
  withApiOptions(
4359
4649
  withProjectOptions(
4360
4650
  withDiffOptions(
4361
- yargs25.positional("directory", {
4651
+ yargs26.positional("directory", {
4362
4652
  describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
4363
4653
  type: "string"
4364
4654
  }).option("what-if", {
@@ -4422,10 +4712,10 @@ var SignalRemoveModule = {
4422
4712
  command: "remove <id>",
4423
4713
  aliases: ["delete", "rm"],
4424
4714
  describe: "Delete a signal",
4425
- builder: (yargs25) => withConfiguration(
4715
+ builder: (yargs26) => withConfiguration(
4426
4716
  withApiOptions(
4427
4717
  withProjectOptions(
4428
- yargs25.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
4718
+ yargs26.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
4429
4719
  )
4430
4720
  )
4431
4721
  ),
@@ -4442,10 +4732,10 @@ var SignalUpdateModule = {
4442
4732
  command: "update <filename>",
4443
4733
  aliases: ["put"],
4444
4734
  describe: "Insert or update a signal",
4445
- builder: (yargs25) => withConfiguration(
4735
+ builder: (yargs26) => withConfiguration(
4446
4736
  withApiOptions(
4447
4737
  withProjectOptions(
4448
- yargs25.positional("filename", { demandOption: true, describe: "Signal file to put" })
4738
+ yargs26.positional("filename", { demandOption: true, describe: "Signal file to put" })
4449
4739
  )
4450
4740
  )
4451
4741
  ),
@@ -4462,25 +4752,25 @@ var SignalModule = {
4462
4752
  command: "signal <command>",
4463
4753
  aliases: ["sig"],
4464
4754
  describe: "Commands for Context signals",
4465
- builder: (yargs25) => yargs25.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
4755
+ builder: (yargs26) => yargs26.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
4466
4756
  handler: () => {
4467
- yargs13.help();
4757
+ yargs14.help();
4468
4758
  }
4469
4759
  };
4470
4760
 
4471
4761
  // src/commands/context/commands/test.ts
4472
- import yargs14 from "yargs";
4762
+ import yargs15 from "yargs";
4473
4763
 
4474
4764
  // src/commands/context/commands/test/get.ts
4475
4765
  import { UncachedTestClient } from "@uniformdev/context/api";
4476
4766
  var TestGetModule = {
4477
4767
  command: "get <id>",
4478
4768
  describe: "Fetch a test",
4479
- builder: (yargs25) => withConfiguration(
4769
+ builder: (yargs26) => withConfiguration(
4480
4770
  withFormatOptions(
4481
4771
  withApiOptions(
4482
4772
  withProjectOptions(
4483
- yargs25.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
4773
+ yargs26.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
4484
4774
  )
4485
4775
  )
4486
4776
  )
@@ -4504,7 +4794,7 @@ var TestListModule = {
4504
4794
  command: "list",
4505
4795
  describe: "List tests",
4506
4796
  aliases: ["ls"],
4507
- builder: (yargs25) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs25)))),
4797
+ builder: (yargs26) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs26)))),
4508
4798
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4509
4799
  const fetch3 = nodeFetchProxy(proxy);
4510
4800
  const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -4553,11 +4843,11 @@ function createTestEngineDataSource({
4553
4843
  var TestPullModule = {
4554
4844
  command: "pull <directory>",
4555
4845
  describe: "Pulls all tests to local files in a directory",
4556
- builder: (yargs25) => withConfiguration(
4846
+ builder: (yargs26) => withConfiguration(
4557
4847
  withApiOptions(
4558
4848
  withProjectOptions(
4559
4849
  withDiffOptions(
4560
- yargs25.positional("directory", {
4850
+ yargs26.positional("directory", {
4561
4851
  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.",
4562
4852
  type: "string"
4563
4853
  }).option("format", {
@@ -4632,11 +4922,11 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
4632
4922
  var TestPushModule = {
4633
4923
  command: "push <directory>",
4634
4924
  describe: "Pushes all tests from files in a directory or package to Uniform",
4635
- builder: (yargs25) => withConfiguration(
4925
+ builder: (yargs26) => withConfiguration(
4636
4926
  withApiOptions(
4637
4927
  withProjectOptions(
4638
4928
  withDiffOptions(
4639
- yargs25.positional("directory", {
4929
+ yargs26.positional("directory", {
4640
4930
  describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
4641
4931
  type: "string"
4642
4932
  }).option("what-if", {
@@ -4700,10 +4990,10 @@ var TestRemoveModule = {
4700
4990
  command: "remove <id>",
4701
4991
  aliases: ["delete", "rm"],
4702
4992
  describe: "Delete a test",
4703
- builder: (yargs25) => withConfiguration(
4993
+ builder: (yargs26) => withConfiguration(
4704
4994
  withApiOptions(
4705
4995
  withProjectOptions(
4706
- yargs25.positional("id", { demandOption: true, describe: "Test public ID to delete" })
4996
+ yargs26.positional("id", { demandOption: true, describe: "Test public ID to delete" })
4707
4997
  )
4708
4998
  )
4709
4999
  ),
@@ -4720,9 +5010,9 @@ var TestUpdateModule = {
4720
5010
  command: "update <filename>",
4721
5011
  aliases: ["put"],
4722
5012
  describe: "Insert or update a test",
4723
- builder: (yargs25) => withConfiguration(
5013
+ builder: (yargs26) => withConfiguration(
4724
5014
  withApiOptions(
4725
- withProjectOptions(yargs25.positional("filename", { demandOption: true, describe: "Test file to put" }))
5015
+ withProjectOptions(yargs26.positional("filename", { demandOption: true, describe: "Test file to put" }))
4726
5016
  )
4727
5017
  ),
4728
5018
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -4737,9 +5027,9 @@ var TestUpdateModule = {
4737
5027
  var TestModule = {
4738
5028
  command: "test <command>",
4739
5029
  describe: "Commands for Context A/B tests",
4740
- builder: (yargs25) => yargs25.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
5030
+ builder: (yargs26) => yargs26.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
4741
5031
  handler: () => {
4742
- yargs14.help();
5032
+ yargs15.help();
4743
5033
  }
4744
5034
  };
4745
5035
 
@@ -4748,9 +5038,9 @@ var ContextCommand = {
4748
5038
  command: "context <command>",
4749
5039
  aliases: ["ctx"],
4750
5040
  describe: "Uniform Context commands",
4751
- builder: (yargs25) => yargs25.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
5041
+ builder: (yargs26) => yargs26.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
4752
5042
  handler: () => {
4753
- yargs15.showHelp();
5043
+ yargs16.showHelp();
4754
5044
  }
4755
5045
  };
4756
5046
 
@@ -4778,7 +5068,7 @@ import { PostHog } from "posthog-node";
4778
5068
  // package.json
4779
5069
  var package_default = {
4780
5070
  name: "@uniformdev/cli",
4781
- version: "19.55.0",
5071
+ version: "19.63.0",
4782
5072
  description: "Uniform command line interface tool",
4783
5073
  license: "SEE LICENSE IN LICENSE.txt",
4784
5074
  main: "./cli.js",
@@ -4800,39 +5090,40 @@ var package_default = {
4800
5090
  "@uniformdev/files": "workspace:*",
4801
5091
  "@uniformdev/project-map": "workspace:*",
4802
5092
  "@uniformdev/redirect": "workspace:*",
5093
+ "call-bind": "^1.0.2",
4803
5094
  colorette: "2.0.20",
4804
- cosmiconfig: "8.2.0",
5095
+ cosmiconfig: "8.3.6",
4805
5096
  "cosmiconfig-typescript-loader": "5.0.0",
4806
5097
  diff: "^5.0.0",
4807
5098
  dotenv: "^16.0.3",
4808
5099
  execa: "5.1.1",
4809
5100
  "fs-jetpack": "5.1.0",
4810
- graphql: "16.8.0",
5101
+ graphql: "16.8.1",
4811
5102
  "graphql-request": "6.1.0",
4812
5103
  "https-proxy-agent": "^7.0.0",
4813
5104
  "image-size": "^1.0.2",
4814
- inquirer: "9.2.10",
5105
+ inquirer: "9.2.11",
4815
5106
  "isomorphic-git": "1.24.5",
4816
- "isomorphic-unfetch": "^3.1.0",
5107
+ "isomorphic-unfetch": "^4.0.0",
4817
5108
  "js-yaml": "^4.1.0",
4818
5109
  jsonwebtoken: "9.0.2",
4819
5110
  "lodash.isequalwith": "^4.4.0",
4820
5111
  open: "9.1.0",
4821
- ora: "6.3.1",
5112
+ ora: "7.0.1",
4822
5113
  "p-queue": "7.3.4",
4823
5114
  "posthog-node": "3.1.2",
4824
5115
  slugify: "1.6.6",
4825
5116
  "update-check": "^1.5.4",
4826
5117
  yargs: "^17.6.2",
4827
- zod: "3.21.4"
5118
+ zod: "3.22.3"
4828
5119
  },
4829
5120
  devDependencies: {
4830
- "@types/diff": "5.0.4",
5121
+ "@types/diff": "5.0.5",
4831
5122
  "@types/inquirer": "9.0.3",
4832
- "@types/js-yaml": "4.0.5",
4833
- "@types/jsonwebtoken": "9.0.2",
5123
+ "@types/js-yaml": "4.0.6",
5124
+ "@types/jsonwebtoken": "9.0.3",
4834
5125
  "@types/lodash.isequalwith": "4.4.7",
4835
- "@types/node": "18.17.6",
5126
+ "@types/node": "18.17.18",
4836
5127
  "@types/yargs": "17.0.24"
4837
5128
  },
4838
5129
  bin: {
@@ -5822,10 +6113,10 @@ var NewMeshCmd = {
5822
6113
  };
5823
6114
 
5824
6115
  // src/commands/optimize/index.ts
5825
- import yargs17 from "yargs";
6116
+ import yargs18 from "yargs";
5826
6117
 
5827
6118
  // src/commands/optimize/manifest.ts
5828
- import yargs16 from "yargs";
6119
+ import yargs17 from "yargs";
5829
6120
 
5830
6121
  // src/commands/optimize/manifest/download.ts
5831
6122
  import { gray as gray4, green as green3, red as red5, yellow as yellow2 } from "colorette";
@@ -5840,7 +6131,7 @@ var UniformBaseUrl = "https://uniform.app";
5840
6131
  var module = {
5841
6132
  command: "download [output]",
5842
6133
  describe: "Download intent manifest",
5843
- builder: (yargs25) => yargs25.option("apiKey", {
6134
+ builder: (yargs26) => yargs26.option("apiKey", {
5844
6135
  alias: "k",
5845
6136
  demandOption: true,
5846
6137
  string: true,
@@ -5941,10 +6232,10 @@ var module2 = {
5941
6232
  command: "manifest <command>",
5942
6233
  describe: "Intent manifest commands",
5943
6234
  builder: () => {
5944
- return yargs16.command(download_default);
6235
+ return yargs17.command(download_default);
5945
6236
  },
5946
6237
  handler: () => {
5947
- yargs16.showHelp();
6238
+ yargs17.showHelp();
5948
6239
  }
5949
6240
  };
5950
6241
  var manifest_default = module2;
@@ -5955,29 +6246,29 @@ var OptimizeCommand = {
5955
6246
  aliases: ["opt"],
5956
6247
  describe: "Uniform Optimize commands",
5957
6248
  builder: () => {
5958
- return yargs17.command(manifest_default);
6249
+ return yargs18.command(manifest_default);
5959
6250
  },
5960
6251
  handler: () => {
5961
- yargs17.showHelp();
6252
+ yargs18.showHelp();
5962
6253
  }
5963
6254
  };
5964
6255
 
5965
6256
  // src/commands/project-map/index.ts
5966
- import yargs20 from "yargs";
6257
+ import yargs21 from "yargs";
5967
6258
 
5968
6259
  // src/commands/project-map/commands/projectMapDefinition.ts
5969
- import yargs18 from "yargs";
6260
+ import yargs19 from "yargs";
5970
6261
 
5971
6262
  // src/commands/project-map/commands/ProjectMapDefinition/get.ts
5972
6263
  import { UncachedProjectMapClient } from "@uniformdev/project-map";
5973
6264
  var ProjectMapDefinitionGetModule = {
5974
6265
  command: "get <id>",
5975
6266
  describe: "Fetch a project map",
5976
- builder: (yargs25) => withFormatOptions(
6267
+ builder: (yargs26) => withFormatOptions(
5977
6268
  withConfiguration(
5978
6269
  withApiOptions(
5979
6270
  withProjectOptions(
5980
- yargs25.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
6271
+ yargs26.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
5981
6272
  )
5982
6273
  )
5983
6274
  )
@@ -6001,7 +6292,7 @@ var ProjectMapDefinitionListModule = {
6001
6292
  command: "list",
6002
6293
  describe: "List of project maps",
6003
6294
  aliases: ["ls"],
6004
- builder: (yargs25) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs25)))),
6295
+ builder: (yargs26) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs26)))),
6005
6296
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
6006
6297
  const fetch3 = nodeFetchProxy(proxy);
6007
6298
  const client = new UncachedProjectMapClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -6058,11 +6349,11 @@ function createProjectMapDefinitionEngineDataSource({
6058
6349
  var ProjectMapDefinitionPullModule = {
6059
6350
  command: "pull <directory>",
6060
6351
  describe: "Pulls all project maps to local files in a directory",
6061
- builder: (yargs25) => withConfiguration(
6352
+ builder: (yargs26) => withConfiguration(
6062
6353
  withApiOptions(
6063
6354
  withProjectOptions(
6064
6355
  withDiffOptions(
6065
- yargs25.positional("directory", {
6356
+ yargs26.positional("directory", {
6066
6357
  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.",
6067
6358
  type: "string"
6068
6359
  }).option("format", {
@@ -6137,11 +6428,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient4 } from "@uniformd
6137
6428
  var ProjectMapDefinitionPushModule = {
6138
6429
  command: "push <directory>",
6139
6430
  describe: "Pushes all project maps from files in a directory or package to Uniform",
6140
- builder: (yargs25) => withConfiguration(
6431
+ builder: (yargs26) => withConfiguration(
6141
6432
  withApiOptions(
6142
6433
  withProjectOptions(
6143
6434
  withDiffOptions(
6144
- yargs25.positional("directory", {
6435
+ yargs26.positional("directory", {
6145
6436
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
6146
6437
  type: "string"
6147
6438
  }).option("what-if", {
@@ -6205,9 +6496,9 @@ var ProjectMapDefinitionRemoveModule = {
6205
6496
  command: "remove <id>",
6206
6497
  aliases: ["delete", "rm"],
6207
6498
  describe: "Delete a project map",
6208
- builder: (yargs25) => withConfiguration(
6499
+ builder: (yargs26) => withConfiguration(
6209
6500
  withApiOptions(
6210
- withProjectOptions(yargs25.positional("id", { demandOption: true, describe: " UUID to delete" }))
6501
+ withProjectOptions(yargs26.positional("id", { demandOption: true, describe: " UUID to delete" }))
6211
6502
  )
6212
6503
  ),
6213
6504
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -6223,10 +6514,10 @@ var ProjectMapDefinitionUpdateModule = {
6223
6514
  command: "update <filename>",
6224
6515
  aliases: ["put"],
6225
6516
  describe: "Insert or update a project map",
6226
- builder: (yargs25) => withConfiguration(
6517
+ builder: (yargs26) => withConfiguration(
6227
6518
  withApiOptions(
6228
6519
  withProjectOptions(
6229
- yargs25.positional("filename", { demandOption: true, describe: "Project map file to put" })
6520
+ yargs26.positional("filename", { demandOption: true, describe: "Project map file to put" })
6230
6521
  )
6231
6522
  )
6232
6523
  ),
@@ -6242,25 +6533,25 @@ var ProjectMapDefinitionUpdateModule = {
6242
6533
  var ProjectMapDefinitionModule = {
6243
6534
  command: "definition <command>",
6244
6535
  describe: "Commands for ProjectMap Definitions",
6245
- builder: (yargs25) => yargs25.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
6536
+ builder: (yargs26) => yargs26.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
6246
6537
  handler: () => {
6247
- yargs18.help();
6538
+ yargs19.help();
6248
6539
  }
6249
6540
  };
6250
6541
 
6251
6542
  // src/commands/project-map/commands/projectMapNode.ts
6252
- import yargs19 from "yargs";
6543
+ import yargs20 from "yargs";
6253
6544
 
6254
6545
  // src/commands/project-map/commands/ProjectMapNode/get.ts
6255
6546
  import { UncachedProjectMapClient as UncachedProjectMapClient7 } from "@uniformdev/project-map";
6256
6547
  var ProjectMapNodeGetModule = {
6257
6548
  command: "get <id> <projectMapId>",
6258
6549
  describe: "Fetch a project map node",
6259
- builder: (yargs25) => withConfiguration(
6550
+ builder: (yargs26) => withConfiguration(
6260
6551
  withFormatOptions(
6261
6552
  withApiOptions(
6262
6553
  withProjectOptions(
6263
- yargs25.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
6554
+ yargs26.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
6264
6555
  )
6265
6556
  )
6266
6557
  )
@@ -6286,11 +6577,11 @@ var ProjectMapNodeListModule = {
6286
6577
  command: "list <projectMapId>",
6287
6578
  describe: "List project map nodes",
6288
6579
  aliases: ["ls"],
6289
- builder: (yargs25) => withConfiguration(
6580
+ builder: (yargs26) => withConfiguration(
6290
6581
  withFormatOptions(
6291
6582
  withApiOptions(
6292
6583
  withProjectOptions(
6293
- yargs25.positional("projectMapId", {
6584
+ yargs26.positional("projectMapId", {
6294
6585
  demandOption: true,
6295
6586
  describe: "ProjectMap UUID to fetch from"
6296
6587
  })
@@ -6361,11 +6652,11 @@ function createProjectMapNodeEngineDataSource({
6361
6652
  var ProjectMapNodePullModule = {
6362
6653
  command: "pull <directory>",
6363
6654
  describe: "Pulls all project maps nodes to local files in a directory",
6364
- builder: (yargs25) => withConfiguration(
6655
+ builder: (yargs26) => withConfiguration(
6365
6656
  withApiOptions(
6366
6657
  withProjectOptions(
6367
6658
  withDiffOptions(
6368
- yargs25.positional("directory", {
6659
+ yargs26.positional("directory", {
6369
6660
  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.",
6370
6661
  type: "string"
6371
6662
  }).option("format", {
@@ -6444,11 +6735,11 @@ import { UncachedProjectMapClient as UncachedProjectMapClient10 } from "@uniform
6444
6735
  var ProjectMapNodePushModule = {
6445
6736
  command: "push <directory>",
6446
6737
  describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
6447
- builder: (yargs25) => withConfiguration(
6738
+ builder: (yargs26) => withConfiguration(
6448
6739
  withApiOptions(
6449
6740
  withProjectOptions(
6450
6741
  withDiffOptions(
6451
- yargs25.positional("directory", {
6742
+ yargs26.positional("directory", {
6452
6743
  describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
6453
6744
  type: "string"
6454
6745
  }).option("what-if", {
@@ -6521,10 +6812,10 @@ var ProjectMapNodeRemoveModule = {
6521
6812
  command: "remove <id> <projectMapId>",
6522
6813
  aliases: ["delete", "rm"],
6523
6814
  describe: "Delete a project map node",
6524
- builder: (yargs25) => withConfiguration(
6815
+ builder: (yargs26) => withConfiguration(
6525
6816
  withApiOptions(
6526
6817
  withProjectOptions(
6527
- yargs25.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
6818
+ yargs26.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
6528
6819
  )
6529
6820
  )
6530
6821
  ),
@@ -6541,10 +6832,10 @@ var ProjectMapNodeUpdateModule = {
6541
6832
  command: "update <filename> <projectMapId>",
6542
6833
  aliases: ["put"],
6543
6834
  describe: "Insert or update a project map node",
6544
- builder: (yargs25) => withConfiguration(
6835
+ builder: (yargs26) => withConfiguration(
6545
6836
  withApiOptions(
6546
6837
  withProjectOptions(
6547
- yargs25.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
6838
+ yargs26.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
6548
6839
  )
6549
6840
  )
6550
6841
  ),
@@ -6560,9 +6851,9 @@ var ProjectMapNodeUpdateModule = {
6560
6851
  var ProjectMapNodeModule = {
6561
6852
  command: "node <command>",
6562
6853
  describe: "Commands for ProjectMap Nodes",
6563
- builder: (yargs25) => yargs25.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
6854
+ builder: (yargs26) => yargs26.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
6564
6855
  handler: () => {
6565
- yargs19.help();
6856
+ yargs20.help();
6566
6857
  }
6567
6858
  };
6568
6859
 
@@ -6571,28 +6862,28 @@ var ProjectMapCommand = {
6571
6862
  command: "project-map <command>",
6572
6863
  aliases: ["prm"],
6573
6864
  describe: "Uniform ProjectMap commands",
6574
- builder: (yargs25) => yargs25.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
6865
+ builder: (yargs26) => yargs26.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
6575
6866
  handler: () => {
6576
- yargs20.showHelp();
6867
+ yargs21.showHelp();
6577
6868
  }
6578
6869
  };
6579
6870
 
6580
6871
  // src/commands/redirect/index.ts
6581
- import yargs22 from "yargs";
6872
+ import yargs23 from "yargs";
6582
6873
 
6583
6874
  // src/commands/redirect/commands/redirect.ts
6584
- import yargs21 from "yargs";
6875
+ import yargs22 from "yargs";
6585
6876
 
6586
6877
  // src/commands/redirect/commands/RedirectDefinition/get.ts
6587
6878
  import { UncachedRedirectClient } from "@uniformdev/redirect";
6588
6879
  var RedirectDefinitionGetModule = {
6589
6880
  command: "get <id>",
6590
6881
  describe: "Fetch a redirect",
6591
- builder: (yargs25) => withConfiguration(
6882
+ builder: (yargs26) => withConfiguration(
6592
6883
  withFormatOptions(
6593
6884
  withApiOptions(
6594
6885
  withProjectOptions(
6595
- yargs25.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
6886
+ yargs26.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
6596
6887
  )
6597
6888
  )
6598
6889
  )
@@ -6616,7 +6907,7 @@ var RedirectDefinitionListModule = {
6616
6907
  command: "list",
6617
6908
  describe: "List of redirects",
6618
6909
  aliases: ["ls"],
6619
- builder: (yargs25) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs25)))),
6910
+ builder: (yargs26) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs26)))),
6620
6911
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
6621
6912
  const fetch3 = nodeFetchProxy(proxy);
6622
6913
  const client = new UncachedRedirectClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -6682,11 +6973,11 @@ function createRedirectDefinitionEngineDataSource({
6682
6973
  var RedirectDefinitionPullModule = {
6683
6974
  command: "pull <directory>",
6684
6975
  describe: "Pulls all redirects to local files in a directory",
6685
- builder: (yargs25) => withConfiguration(
6976
+ builder: (yargs26) => withConfiguration(
6686
6977
  withApiOptions(
6687
6978
  withProjectOptions(
6688
6979
  withDiffOptions(
6689
- yargs25.positional("directory", {
6980
+ yargs26.positional("directory", {
6690
6981
  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.",
6691
6982
  type: "string"
6692
6983
  }).option("format", {
@@ -6762,11 +7053,11 @@ import { UncachedRedirectClient as UncachedRedirectClient4 } from "@uniformdev/r
6762
7053
  var RedirectDefinitionPushModule = {
6763
7054
  command: "push <directory>",
6764
7055
  describe: "Pushes all redirects from files in a directory or package to Uniform",
6765
- builder: (yargs25) => withConfiguration(
7056
+ builder: (yargs26) => withConfiguration(
6766
7057
  withApiOptions(
6767
7058
  withProjectOptions(
6768
7059
  withDiffOptions(
6769
- yargs25.positional("directory", {
7060
+ yargs26.positional("directory", {
6770
7061
  describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
6771
7062
  type: "string"
6772
7063
  }).option("what-if", {
@@ -6830,9 +7121,9 @@ var RedirectDefinitionRemoveModule = {
6830
7121
  command: "remove <id>",
6831
7122
  aliases: ["delete", "rm"],
6832
7123
  describe: "Delete a redirect",
6833
- builder: (yargs25) => withConfiguration(
7124
+ builder: (yargs26) => withConfiguration(
6834
7125
  withApiOptions(
6835
- withProjectOptions(yargs25.positional("id", { demandOption: true, describe: " UUID to delete" }))
7126
+ withProjectOptions(yargs26.positional("id", { demandOption: true, describe: " UUID to delete" }))
6836
7127
  )
6837
7128
  ),
6838
7129
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -6848,10 +7139,10 @@ var RedirectDefinitionUpdateModule = {
6848
7139
  command: "update <filename>",
6849
7140
  aliases: ["put"],
6850
7141
  describe: "Insert or update a redirect",
6851
- builder: (yargs25) => withConfiguration(
7142
+ builder: (yargs26) => withConfiguration(
6852
7143
  withApiOptions(
6853
7144
  withProjectOptions(
6854
- yargs25.positional("filename", { demandOption: true, describe: "Redirect file to put" })
7145
+ yargs26.positional("filename", { demandOption: true, describe: "Redirect file to put" })
6855
7146
  )
6856
7147
  )
6857
7148
  ),
@@ -6867,9 +7158,9 @@ var RedirectDefinitionUpdateModule = {
6867
7158
  var RedirectDefinitionModule = {
6868
7159
  command: "definition <command>",
6869
7160
  describe: "Commands for Redirect Definitions",
6870
- builder: (yargs25) => yargs25.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
7161
+ builder: (yargs26) => yargs26.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
6871
7162
  handler: () => {
6872
- yargs21.help();
7163
+ yargs22.help();
6873
7164
  }
6874
7165
  };
6875
7166
 
@@ -6878,14 +7169,14 @@ var RedirectCommand = {
6878
7169
  command: "redirect <command>",
6879
7170
  aliases: ["red"],
6880
7171
  describe: "Uniform Redirect commands",
6881
- builder: (yargs25) => yargs25.command(RedirectDefinitionModule).demandCommand(),
7172
+ builder: (yargs26) => yargs26.command(RedirectDefinitionModule).demandCommand(),
6882
7173
  handler: () => {
6883
- yargs22.showHelp();
7174
+ yargs23.showHelp();
6884
7175
  }
6885
7176
  };
6886
7177
 
6887
7178
  // src/commands/sync/index.ts
6888
- import yargs23 from "yargs";
7179
+ import yargs24 from "yargs";
6889
7180
 
6890
7181
  // src/commands/sync/commands/util.ts
6891
7182
  import ora2 from "ora";
@@ -6916,11 +7207,11 @@ function spin(entityType) {
6916
7207
  var SyncPullModule = {
6917
7208
  command: "pull",
6918
7209
  describe: "Pulls whole project to local files in a directory",
6919
- builder: (yargs25) => withConfiguration(
7210
+ builder: (yargs26) => withConfiguration(
6920
7211
  withApiOptions(
6921
7212
  withProjectOptions(
6922
7213
  withDiffOptions(
6923
- yargs25.option("what-if", {
7214
+ yargs26.option("what-if", {
6924
7215
  alias: ["w"],
6925
7216
  describe: "What-if mode reports what would be done but changes no files",
6926
7217
  default: false,
@@ -6935,6 +7226,7 @@ var SyncPullModule = {
6935
7226
  const enabledEntities = Object.entries({
6936
7227
  category: CategoryPullModule,
6937
7228
  dataType: DataTypePullModule,
7229
+ prompt: PromptPullModule,
6938
7230
  quirk: QuirkPullModule,
6939
7231
  test: TestPullModule,
6940
7232
  signal: SignalPullModule,
@@ -7005,11 +7297,11 @@ var getFormat = (entityType, config2) => {
7005
7297
  var SyncPushModule = {
7006
7298
  command: "push",
7007
7299
  describe: "Pushes whole project data from files in a directory or package to Uniform",
7008
- builder: (yargs25) => withConfiguration(
7300
+ builder: (yargs26) => withConfiguration(
7009
7301
  withApiOptions(
7010
7302
  withProjectOptions(
7011
7303
  withDiffOptions(
7012
- yargs25.option("what-if", {
7304
+ yargs26.option("what-if", {
7013
7305
  alias: ["w"],
7014
7306
  describe: "What-if mode reports what would be done but changes nothing",
7015
7307
  default: false,
@@ -7025,6 +7317,7 @@ var SyncPushModule = {
7025
7317
  const enabledEntities = Object.entries({
7026
7318
  category: CategoryPushModule,
7027
7319
  dataType: DataTypePushModule,
7320
+ prompt: PromptPushModule,
7028
7321
  quirk: QuirkPushModule,
7029
7322
  test: TestPushModule,
7030
7323
  signal: SignalPushModule,
@@ -7101,9 +7394,9 @@ var getFormat2 = (entityType, config2) => {
7101
7394
  var SyncCommand = {
7102
7395
  command: "sync <command>",
7103
7396
  describe: "Uniform Sync commands",
7104
- builder: (yargs25) => yargs25.command(SyncPullModule).command(SyncPushModule).demandCommand(),
7397
+ builder: (yargs26) => yargs26.command(SyncPullModule).command(SyncPushModule).demandCommand(),
7105
7398
  handler: () => {
7106
- yargs23.showHelp();
7399
+ yargs24.showHelp();
7107
7400
  }
7108
7401
  };
7109
7402
 
@@ -7219,7 +7512,7 @@ First found was: v${firstVersion}`;
7219
7512
 
7220
7513
  // src/index.ts
7221
7514
  dotenv.config();
7222
- var yarggery = yargs24(hideBin(process.argv));
7515
+ var yarggery = yargs25(hideBin(process.argv));
7223
7516
  var inlineConfigurationFilePath = "config" in yarggery.argv && yarggery.argv.config;
7224
7517
  var configuration = loadConfig(inlineConfigurationFilePath || null);
7225
7518
  yarggery.option("verbose", {