@uniformdev/cli 19.40.1-alpha.16 → 19.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,15 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/index.ts
4
- import { cosmiconfigSync } from "cosmiconfig";
5
- import { TypeScriptLoader } from "cosmiconfig-typescript-loader";
6
4
  import * as dotenv from "dotenv";
7
- import fs5 from "fs";
8
- import yargs22 from "yargs";
5
+ import yargs20 from "yargs";
9
6
  import { hideBin } from "yargs/helpers";
10
7
 
11
8
  // src/commands/canvas/index.ts
12
- import yargs6 from "yargs";
9
+ import yargs5 from "yargs";
13
10
 
14
11
  // src/commands/canvas/commands/category.ts
15
12
  import yargs from "yargs";
@@ -95,14 +92,8 @@ import httpsProxyAgent from "https-proxy-agent";
95
92
  import unfetch from "isomorphic-unfetch";
96
93
  import { dump, load } from "js-yaml";
97
94
  import { extname } from "path";
98
- function withConfiguration(yargs23) {
99
- return yargs23.option("serialization", {
100
- skipValidation: true,
101
- hidden: true
102
- });
103
- }
104
- function withApiOptions(yargs23) {
105
- return yargs23.option("apiKey", {
95
+ function withApiOptions(yargs21) {
96
+ return yargs21.option("apiKey", {
106
97
  describe: "Uniform API key. Defaults to UNIFORM_CLI_API_KEY or UNIFORM_API_KEY env. Supports dotenv.",
107
98
  default: process.env.UNIFORM_CLI_API_KEY ?? // deprecated
108
99
  process.env.CANVAS_CLI_API_KEY ?? // deprecated
@@ -141,8 +132,8 @@ function nodeFetchProxy(proxy) {
141
132
  };
142
133
  return wrappedFetch;
143
134
  }
144
- function withProjectOptions(yargs23) {
145
- return yargs23.option("project", {
135
+ function withProjectOptions(yargs21) {
136
+ return yargs21.option("project", {
146
137
  describe: "Uniform project ID. Defaults to UNIFORM_CLI_PROJECT_ID or UNIFORM_PROJECT_ID env. Supports dotenv.",
147
138
  default: process.env.UNIFORM_CLI_PROJECT_ID ?? // deprecated
148
139
  process.env.CANVAS_CLI_PROJECT_ID ?? // deprecated
@@ -152,8 +143,8 @@ function withProjectOptions(yargs23) {
152
143
  alias: ["p"]
153
144
  });
154
145
  }
155
- function withFormatOptions(yargs23) {
156
- return yargs23.option("format", {
146
+ function withFormatOptions(yargs21) {
147
+ return yargs21.option("format", {
157
148
  alias: ["f"],
158
149
  describe: "Output format",
159
150
  default: "yaml",
@@ -165,8 +156,8 @@ function withFormatOptions(yargs23) {
165
156
  type: "string"
166
157
  });
167
158
  }
168
- function withDiffOptions(yargs23) {
169
- return yargs23.option("diff", {
159
+ function withDiffOptions(yargs21) {
160
+ return yargs21.option("diff", {
170
161
  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.",
171
162
  default: process.env.UNIFORM_CLI_DIFF_MODE ?? "off",
172
163
  type: "string",
@@ -226,72 +217,6 @@ async function* paginateAsync(fetchPage, options) {
226
217
  offset += perPage;
227
218
  } while (pageData.length === perPage);
228
219
  }
229
- var defaultSyncConfiguration = {
230
- entitiesConfig: {},
231
- directory: "uniform-data",
232
- format: "yaml",
233
- mode: "mirror"
234
- };
235
- var applyDefaultSyncConfiguration = (config2) => {
236
- var _a;
237
- const mergedConfig = {
238
- serialization: {
239
- ...defaultSyncConfiguration,
240
- ...(config2 == null ? void 0 : config2.serialization) ?? {},
241
- entitiesConfig: {
242
- ...defaultSyncConfiguration.entitiesConfig,
243
- ...((_a = config2 == null ? void 0 : config2.serialization) == null ? void 0 : _a.entitiesConfig) ?? {}
244
- }
245
- }
246
- };
247
- for (const entityType in mergedConfig.serialization.entitiesConfig) {
248
- const entityTypeCasted = entityType;
249
- const entityConfig = mergedConfig.serialization.entitiesConfig[entityTypeCasted];
250
- if (Object.keys(entityConfig).length === 0) {
251
- const separator = mergedConfig.serialization.directory[mergedConfig.serialization.directory.length - 1] === "/" ? "" : "/";
252
- mergedConfig.serialization.entitiesConfig[entityTypeCasted].directory = isPathAPackageFile(
253
- mergedConfig.serialization.directory
254
- ) ? mergedConfig.serialization.directory : `${mergedConfig.serialization.directory}${separator}${entityTypeCasted}`;
255
- }
256
- }
257
- return mergedConfig;
258
- };
259
- var getEntityOption = ({
260
- optionName,
261
- config: config2,
262
- entityType,
263
- operation
264
- }) => {
265
- var _a, _b, _c, _d, _e, _f;
266
- if ((_b = (_a = config2.entitiesConfig[entityType]) == null ? void 0 : _a[operation]) == null ? void 0 : _b[optionName]) {
267
- return (_d = (_c = config2.entitiesConfig[entityType]) == null ? void 0 : _c[operation]) == null ? void 0 : _d[optionName];
268
- }
269
- if ((_e = config2.entitiesConfig[entityType]) == null ? void 0 : _e[optionName]) {
270
- return (_f = config2.entitiesConfig[entityType]) == null ? void 0 : _f[optionName];
271
- }
272
- if (config2[optionName]) {
273
- return config2[optionName];
274
- }
275
- throw `No ${optionName} option specified for ${entityType} ${operation}`;
276
- };
277
- var getDirectoryOrFilename = ({
278
- config: config2,
279
- entityType,
280
- operation
281
- }) => {
282
- var _a, _b, _c, _d, _e, _f;
283
- if ((_b = (_a = config2.entitiesConfig[entityType]) == null ? void 0 : _a[operation]) == null ? void 0 : _b.directory) {
284
- return (_d = (_c = config2.entitiesConfig[entityType]) == null ? void 0 : _c[operation]) == null ? void 0 : _d.directory;
285
- }
286
- if ((_e = config2.entitiesConfig[entityType]) == null ? void 0 : _e.directory) {
287
- return (_f = config2.entitiesConfig[entityType]) == null ? void 0 : _f.directory;
288
- }
289
- const isPackage = isPathAPackageFile(config2.directory);
290
- if (isPackage) {
291
- return config2.directory;
292
- }
293
- return `${config2.directory}/${entityType}`;
294
- };
295
220
 
296
221
  // src/sync/fileSyncEngineDataSource.ts
297
222
  async function createFileSyncEngineDataSource({
@@ -550,13 +475,9 @@ function createSyncEngineConsoleLogger(options) {
550
475
  var CategoryGetModule = {
551
476
  command: "get <id>",
552
477
  describe: "Fetch a category",
553
- builder: (yargs23) => withConfiguration(
554
- withFormatOptions(
555
- withApiOptions(
556
- withProjectOptions(
557
- yargs23.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
558
- )
559
- )
478
+ builder: (yargs21) => withFormatOptions(
479
+ withApiOptions(
480
+ withProjectOptions(yargs21.positional("id", { demandOption: true, describe: "Category UUID to fetch" }))
560
481
  )
561
482
  ),
562
483
  handler: async ({ apiHost, apiKey, proxy, id, format, project: projectId, filename }) => {
@@ -579,7 +500,7 @@ var CategoryListModule = {
579
500
  command: "list",
580
501
  describe: "List categories",
581
502
  aliases: ["ls"],
582
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23.options({}))))),
503
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21.options({})))),
583
504
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
584
505
  const fetch3 = nodeFetchProxy(proxy);
585
506
  const client = new UncachedCategoryClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -636,32 +557,30 @@ function writeCanvasPackage(filename, packageContents) {
636
557
  var CategoryPullModule = {
637
558
  command: "pull <directory>",
638
559
  describe: "Pulls all categories to local files in a directory",
639
- builder: (yargs23) => withConfiguration(
640
- withApiOptions(
641
- withProjectOptions(
642
- withDiffOptions(
643
- yargs23.positional("directory", {
644
- 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.",
645
- type: "string"
646
- }).option("format", {
647
- alias: ["f"],
648
- describe: "Output format",
649
- default: "yaml",
650
- choices: ["yaml", "json"],
651
- type: "string"
652
- }).option("what-if", {
653
- alias: ["w"],
654
- describe: "What-if mode reports what would be done but changes no files",
655
- default: false,
656
- type: "boolean"
657
- }).option("mode", {
658
- alias: ["m"],
659
- 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',
660
- choices: ["create", "createOrUpdate", "mirror"],
661
- default: "mirror",
662
- type: "string"
663
- })
664
- )
560
+ builder: (yargs21) => withApiOptions(
561
+ withProjectOptions(
562
+ withDiffOptions(
563
+ yargs21.positional("directory", {
564
+ 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.",
565
+ type: "string"
566
+ }).option("format", {
567
+ alias: ["f"],
568
+ describe: "Output format",
569
+ default: "yaml",
570
+ choices: ["yaml", "json"],
571
+ type: "string"
572
+ }).option("what-if", {
573
+ alias: ["w"],
574
+ describe: "What-if mode reports what would be done but changes no files",
575
+ default: false,
576
+ type: "boolean"
577
+ }).option("mode", {
578
+ alias: ["m"],
579
+ 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',
580
+ choices: ["create", "createOrUpdate", "mirror"],
581
+ default: "mirror",
582
+ type: "string"
583
+ })
665
584
  )
666
585
  )
667
586
  ),
@@ -715,26 +634,24 @@ import { UncachedCategoryClient as UncachedCategoryClient4 } from "@uniformdev/c
715
634
  var CategoryPushModule = {
716
635
  command: "push <directory>",
717
636
  describe: "Pushes all categories from files in a directory to Uniform Canvas",
718
- builder: (yargs23) => withConfiguration(
719
- withApiOptions(
720
- withProjectOptions(
721
- withDiffOptions(
722
- yargs23.positional("directory", {
723
- describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
724
- type: "string"
725
- }).option("what-if", {
726
- alias: ["w"],
727
- describe: "What-if mode reports what would be done but changes nothing",
728
- default: false,
729
- type: "boolean"
730
- }).option("mode", {
731
- alias: ["m"],
732
- 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',
733
- choices: ["create", "createOrUpdate", "mirror"],
734
- default: "mirror",
735
- type: "string"
736
- })
737
- )
637
+ builder: (yargs21) => withApiOptions(
638
+ withProjectOptions(
639
+ withDiffOptions(
640
+ yargs21.positional("directory", {
641
+ describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
642
+ type: "string"
643
+ }).option("what-if", {
644
+ alias: ["w"],
645
+ describe: "What-if mode reports what would be done but changes nothing",
646
+ default: false,
647
+ type: "boolean"
648
+ }).option("mode", {
649
+ alias: ["m"],
650
+ 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',
651
+ choices: ["create", "createOrUpdate", "mirror"],
652
+ default: "mirror",
653
+ type: "string"
654
+ })
738
655
  )
739
656
  )
740
657
  ),
@@ -783,12 +700,8 @@ var CategoryRemoveModule = {
783
700
  command: "remove <id>",
784
701
  aliases: ["delete", "rm"],
785
702
  describe: "Delete a category",
786
- builder: (yargs23) => withConfiguration(
787
- withApiOptions(
788
- withProjectOptions(
789
- yargs23.positional("id", { demandOption: true, describe: "Category UUID to delete" })
790
- )
791
- )
703
+ builder: (yargs21) => withApiOptions(
704
+ withProjectOptions(yargs21.positional("id", { demandOption: true, describe: "Category UUID to delete" }))
792
705
  ),
793
706
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
794
707
  const fetch3 = nodeFetchProxy(proxy);
@@ -803,11 +716,9 @@ var CategoryUpdateModule = {
803
716
  command: "update <filename>",
804
717
  aliases: ["put"],
805
718
  describe: "Insert or update a category",
806
- builder: (yargs23) => withConfiguration(
807
- withApiOptions(
808
- withProjectOptions(
809
- yargs23.positional("filename", { demandOption: true, describe: "Category file to put" })
810
- )
719
+ builder: (yargs21) => withApiOptions(
720
+ withProjectOptions(
721
+ yargs21.positional("filename", { demandOption: true, describe: "Category file to put" })
811
722
  )
812
723
  ),
813
724
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -823,7 +734,7 @@ var CategoryModule = {
823
734
  command: "category <command>",
824
735
  aliases: ["cat"],
825
736
  describe: "Commands for Canvas categories",
826
- builder: (yargs23) => yargs23.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
737
+ builder: (yargs21) => yargs21.command(CategoryPullModule).command(CategoryPushModule).command(CategoryGetModule).command(CategoryRemoveModule).command(CategoryListModule).command(CategoryUpdateModule).demandCommand(),
827
738
  handler: () => {
828
739
  yargs.help();
829
740
  }
@@ -844,15 +755,10 @@ var selectSchemaUrl = () => "/schemas/json-schema/component-definition/v1.json";
844
755
  var ComponentGetModule = {
845
756
  command: "get <id>",
846
757
  describe: "Fetch a component definition",
847
- builder: (yargs23) => withConfiguration(
848
- withFormatOptions(
849
- withApiOptions(
850
- withProjectOptions(
851
- yargs23.positional("id", {
852
- demandOption: true,
853
- describe: "Component definition public ID to fetch"
854
- })
855
- )
758
+ builder: (yargs21) => withFormatOptions(
759
+ withApiOptions(
760
+ withProjectOptions(
761
+ yargs21.positional("id", { demandOption: true, describe: "Component definition public ID to fetch" })
856
762
  )
857
763
  )
858
764
  ),
@@ -882,15 +788,13 @@ var ComponentListModule = {
882
788
  command: "list",
883
789
  describe: "List component definitions",
884
790
  aliases: ["ls"],
885
- builder: (yargs23) => withConfiguration(
886
- withFormatOptions(
887
- withApiOptions(
888
- withProjectOptions(
889
- yargs23.options({
890
- offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
891
- limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
892
- })
893
- )
791
+ builder: (yargs21) => withFormatOptions(
792
+ withApiOptions(
793
+ withProjectOptions(
794
+ yargs21.options({
795
+ offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
796
+ limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
797
+ })
894
798
  )
895
799
  )
896
800
  ),
@@ -941,32 +845,30 @@ function createComponentDefinitionEngineDataSource({
941
845
  var ComponentPullModule = {
942
846
  command: "pull <directory>",
943
847
  describe: "Pulls all component definitions to local files in a directory",
944
- builder: (yargs23) => withConfiguration(
945
- withApiOptions(
946
- withProjectOptions(
947
- withDiffOptions(
948
- yargs23.positional("directory", {
949
- 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.",
950
- type: "string"
951
- }).option("format", {
952
- alias: ["f"],
953
- describe: "Output format",
954
- default: "yaml",
955
- choices: ["yaml", "json"],
956
- type: "string"
957
- }).option("what-if", {
958
- alias: ["w"],
959
- describe: "What-if mode reports what would be done but changes no files",
960
- default: false,
961
- type: "boolean"
962
- }).option("mode", {
963
- alias: ["m"],
964
- 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',
965
- choices: ["create", "createOrUpdate", "mirror"],
966
- default: "mirror",
967
- type: "string"
968
- })
969
- )
848
+ builder: (yargs21) => withApiOptions(
849
+ withProjectOptions(
850
+ withDiffOptions(
851
+ yargs21.positional("directory", {
852
+ 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.",
853
+ type: "string"
854
+ }).option("format", {
855
+ alias: ["f"],
856
+ describe: "Output format",
857
+ default: "yaml",
858
+ choices: ["yaml", "json"],
859
+ type: "string"
860
+ }).option("what-if", {
861
+ alias: ["w"],
862
+ describe: "What-if mode reports what would be done but changes no files",
863
+ default: false,
864
+ type: "boolean"
865
+ }).option("mode", {
866
+ alias: ["m"],
867
+ 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',
868
+ choices: ["create", "createOrUpdate", "mirror"],
869
+ default: "mirror",
870
+ type: "string"
871
+ })
970
872
  )
971
873
  )
972
874
  ),
@@ -1021,26 +923,24 @@ import { UncachedCanvasClient as UncachedCanvasClient4 } from "@uniformdev/canva
1021
923
  var ComponentPushModule = {
1022
924
  command: "push <directory>",
1023
925
  describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
1024
- builder: (yargs23) => withConfiguration(
1025
- withApiOptions(
1026
- withProjectOptions(
1027
- withDiffOptions(
1028
- yargs23.positional("directory", {
1029
- describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
1030
- type: "string"
1031
- }).option("what-if", {
1032
- alias: ["w"],
1033
- describe: "What-if mode reports what would be done but changes nothing",
1034
- default: false,
1035
- type: "boolean"
1036
- }).option("mode", {
1037
- alias: ["m"],
1038
- 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',
1039
- choices: ["create", "createOrUpdate", "mirror"],
1040
- default: "mirror",
1041
- type: "string"
1042
- })
1043
- )
926
+ builder: (yargs21) => withApiOptions(
927
+ withProjectOptions(
928
+ withDiffOptions(
929
+ yargs21.positional("directory", {
930
+ describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
931
+ type: "string"
932
+ }).option("what-if", {
933
+ alias: ["w"],
934
+ describe: "What-if mode reports what would be done but changes nothing",
935
+ default: false,
936
+ type: "boolean"
937
+ }).option("mode", {
938
+ alias: ["m"],
939
+ 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',
940
+ choices: ["create", "createOrUpdate", "mirror"],
941
+ default: "mirror",
942
+ type: "string"
943
+ })
1044
944
  )
1045
945
  )
1046
946
  ),
@@ -1090,11 +990,9 @@ var ComponentRemoveModule = {
1090
990
  command: "remove <id>",
1091
991
  aliases: ["delete", "rm"],
1092
992
  describe: "Delete a component definition",
1093
- builder: (yargs23) => withConfiguration(
1094
- withApiOptions(
1095
- withProjectOptions(
1096
- yargs23.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1097
- )
993
+ builder: (yargs21) => withApiOptions(
994
+ withProjectOptions(
995
+ yargs21.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1098
996
  )
1099
997
  ),
1100
998
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -1110,11 +1008,9 @@ var ComponentUpdateModule = {
1110
1008
  command: "update <filename>",
1111
1009
  aliases: ["put"],
1112
1010
  describe: "Insert or update a component definition",
1113
- builder: (yargs23) => withConfiguration(
1114
- withApiOptions(
1115
- withProjectOptions(
1116
- yargs23.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1117
- )
1011
+ builder: (yargs21) => withApiOptions(
1012
+ withProjectOptions(
1013
+ yargs21.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1118
1014
  )
1119
1015
  ),
1120
1016
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -1130,7 +1026,7 @@ var ComponentModule = {
1130
1026
  command: "component <command>",
1131
1027
  aliases: ["def"],
1132
1028
  describe: "Commands for Canvas component definitions",
1133
- builder: (yargs23) => yargs23.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
1029
+ builder: (yargs21) => yargs21.command(ComponentPullModule).command(ComponentPushModule).command(ComponentGetModule).command(ComponentRemoveModule).command(ComponentListModule).command(ComponentUpdateModule).demandCommand(),
1134
1030
  handler: () => {
1135
1031
  yargs2.help();
1136
1032
  }
@@ -1152,8 +1048,8 @@ function prepCompositionForDisk(composition) {
1152
1048
  delete prepped.state;
1153
1049
  return prepped;
1154
1050
  }
1155
- function withStateOptions(yargs23) {
1156
- return yargs23.option("state", {
1051
+ function withStateOptions(yargs21) {
1052
+ return yargs21.option("state", {
1157
1053
  type: "string",
1158
1054
  describe: `Composition state to fetch.`,
1159
1055
  choices: ["preview", "published"],
@@ -1178,39 +1074,37 @@ function convertCompositionState(state) {
1178
1074
  var CompositionGetModule = {
1179
1075
  command: "get <id>",
1180
1076
  describe: "Fetch a composition",
1181
- builder: (yargs23) => withFormatOptions(
1182
- withConfiguration(
1183
- withApiOptions(
1184
- withProjectOptions(
1185
- withStateOptions(
1186
- yargs23.positional("id", { demandOption: true, describe: "Composition/pattern public ID to fetch" }).option({
1187
- resolvePatterns: {
1188
- type: "boolean",
1189
- default: false,
1190
- describe: "Resolve pattern references in the composition"
1191
- },
1192
- resolveOverrides: {
1193
- type: "boolean",
1194
- default: false,
1195
- describe: "Resolves pattern overrides in the composition and removes override definition data"
1196
- },
1197
- componentIDs: {
1198
- type: "boolean",
1199
- default: false,
1200
- describe: "Include individual component UIDs"
1201
- },
1202
- resolveData: {
1203
- type: "boolean",
1204
- default: false,
1205
- describe: "Resolve all data resources used by the composition/pattern"
1206
- },
1207
- diagnostics: {
1208
- type: "boolean",
1209
- default: false,
1210
- describe: "Include diagnostics information when resolving data"
1211
- }
1212
- })
1213
- )
1077
+ builder: (yargs21) => withFormatOptions(
1078
+ withApiOptions(
1079
+ withProjectOptions(
1080
+ withStateOptions(
1081
+ yargs21.positional("id", { demandOption: true, describe: "Composition public ID to fetch" }).option({
1082
+ resolvePatterns: {
1083
+ type: "boolean",
1084
+ default: false,
1085
+ describe: "Resolve pattern references in the composition"
1086
+ },
1087
+ resolveOverrides: {
1088
+ type: "boolean",
1089
+ default: false,
1090
+ describe: "Resolves pattern overrides in the composition and removes override definition data"
1091
+ },
1092
+ componentIDs: {
1093
+ type: "boolean",
1094
+ default: false,
1095
+ describe: "Include individual component UIDs"
1096
+ },
1097
+ resolveData: {
1098
+ type: "boolean",
1099
+ default: false,
1100
+ describe: "Resolve all data resources used by the composition"
1101
+ },
1102
+ diagnostics: {
1103
+ type: "boolean",
1104
+ default: false,
1105
+ describe: "Include diagnostics information when resolving data"
1106
+ }
1107
+ })
1214
1108
  )
1215
1109
  )
1216
1110
  )
@@ -1254,42 +1148,29 @@ var CompositionListModule = {
1254
1148
  command: "list",
1255
1149
  describe: "List compositions",
1256
1150
  aliases: ["ls"],
1257
- builder: (yargs23) => withFormatOptions(
1258
- withConfiguration(
1259
- withApiOptions(
1260
- withProjectOptions(
1261
- withStateOptions(
1262
- yargs23.options({
1263
- offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
1264
- limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
1265
- resolvePatterns: {
1266
- type: "boolean",
1267
- default: false,
1268
- describe: "Resolve pattern references in the composition"
1269
- },
1270
- resolveOverrides: {
1271
- type: "boolean",
1272
- default: false,
1273
- describe: "Resolves pattern overrides in the composition and removes override definition data"
1274
- },
1275
- onlyCompositions: {
1276
- describe: "Only pulling compositions and not patterns",
1277
- default: false,
1278
- type: "boolean"
1279
- },
1280
- onlyPatterns: {
1281
- describe: "Only pulling patterns and not compositions",
1282
- default: false,
1283
- type: "boolean",
1284
- hidden: true
1285
- },
1286
- componentIDs: {
1287
- type: "boolean",
1288
- default: false,
1289
- describe: "Include individual component UIDs"
1290
- }
1291
- })
1292
- )
1151
+ builder: (yargs21) => withFormatOptions(
1152
+ withApiOptions(
1153
+ withProjectOptions(
1154
+ withStateOptions(
1155
+ yargs21.options({
1156
+ offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
1157
+ limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
1158
+ resolvePatterns: {
1159
+ type: "boolean",
1160
+ default: false,
1161
+ describe: "Resolve pattern references in the composition"
1162
+ },
1163
+ resolveOverrides: {
1164
+ type: "boolean",
1165
+ default: false,
1166
+ describe: "Resolves pattern overrides in the composition and removes override definition data"
1167
+ },
1168
+ componentIDs: {
1169
+ type: "boolean",
1170
+ default: false,
1171
+ describe: "Include individual component UIDs"
1172
+ }
1173
+ })
1293
1174
  )
1294
1175
  )
1295
1176
  )
@@ -1302,8 +1183,6 @@ var CompositionListModule = {
1302
1183
  offset,
1303
1184
  format,
1304
1185
  filename,
1305
- onlyCompositions,
1306
- onlyPatterns,
1307
1186
  project: projectId,
1308
1187
  state,
1309
1188
  resolvePatterns,
@@ -1315,7 +1194,6 @@ var CompositionListModule = {
1315
1194
  const res = await client.getCompositionList({
1316
1195
  limit,
1317
1196
  offset,
1318
- pattern: onlyCompositions ? false : onlyPatterns ? true : void 0,
1319
1197
  state: convertCompositionState(state),
1320
1198
  skipPatternResolution: !resolvePatterns,
1321
1199
  withComponentIDs: componentIDs,
@@ -1336,8 +1214,6 @@ var selectDisplayName3 = (component) => `${component.composition._name ?? compon
1336
1214
  function createComponentInstanceEngineDataSource({
1337
1215
  client,
1338
1216
  state,
1339
- onlyCompositions,
1340
- onlyPatterns,
1341
1217
  ...clientOptions
1342
1218
  }) {
1343
1219
  const stateId = convertCompositionState(state);
@@ -1347,7 +1223,6 @@ function createComponentInstanceEngineDataSource({
1347
1223
  ...clientOptions,
1348
1224
  limit,
1349
1225
  offset,
1350
- pattern: onlyCompositions ? false : onlyPatterns ? true : void 0,
1351
1226
  state: stateId,
1352
1227
  skipPatternResolution: true,
1353
1228
  skipOverridesResolution: true,
@@ -1378,36 +1253,43 @@ function createComponentInstanceEngineDataSource({
1378
1253
 
1379
1254
  // src/commands/canvas/commands/composition/publish.ts
1380
1255
  var CompositionPublishModule = {
1381
- command: "publish [ids]",
1256
+ command: "publish [compositionIDs]",
1382
1257
  describe: "Publishes compositions",
1383
- builder: (yargs23) => withConfiguration(
1384
- withApiOptions(
1385
- withProjectOptions(
1386
- withDiffOptions(
1387
- yargs23.positional("ids", {
1388
- describe: "Publishes composition/pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
1389
- type: "string"
1390
- }).option("all", {
1391
- alias: ["a"],
1392
- describe: "Publishes all compositions. Use compositionId to publish one instead.",
1393
- default: false,
1394
- type: "boolean"
1395
- }).option("what-if", {
1396
- alias: ["w"],
1397
- describe: "What-if mode reports what would be done but does not perform any publishing",
1398
- default: false,
1399
- type: "boolean"
1400
- })
1401
- )
1258
+ builder: (yargs21) => withApiOptions(
1259
+ withProjectOptions(
1260
+ withDiffOptions(
1261
+ yargs21.positional("compositionIDs", {
1262
+ describe: "Publishes composition(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
1263
+ type: "string"
1264
+ }).option("all", {
1265
+ alias: ["a"],
1266
+ describe: "Publishes all compositions. Use compositionId to publish one instead.",
1267
+ default: false,
1268
+ type: "boolean"
1269
+ }).option("what-if", {
1270
+ alias: ["w"],
1271
+ describe: "What-if mode reports what would be done but does not perform any publishing",
1272
+ default: false,
1273
+ type: "boolean"
1274
+ })
1402
1275
  )
1403
1276
  )
1404
1277
  ),
1405
- handler: async ({ apiHost, apiKey, proxy, ids, all, whatIf, project: projectId, diff: diffMode }) => {
1406
- if (!all && !ids || all && ids) {
1278
+ handler: async ({
1279
+ apiHost,
1280
+ apiKey,
1281
+ proxy,
1282
+ compositionIDs,
1283
+ all,
1284
+ whatIf,
1285
+ project: projectId,
1286
+ diff: diffMode
1287
+ }) => {
1288
+ if (!all && !compositionIDs || all && compositionIDs) {
1407
1289
  console.error(`Specify --all or composition ID(s) to publish.`);
1408
1290
  process.exit(1);
1409
1291
  }
1410
- const compositionIDsArray = ids ? ids.split(",").map((id) => id.trim()) : void 0;
1292
+ const compositionIDsArray = compositionIDs ? compositionIDs.split(",").map((id) => id.trim()) : void 0;
1411
1293
  const fetch3 = nodeFetchProxy(proxy);
1412
1294
  const client = new UncachedCanvasClient9({ apiKey, apiHost, fetch: fetch3, projectId });
1413
1295
  const source = createComponentInstanceEngineDataSource({
@@ -1435,42 +1317,31 @@ import { UncachedCanvasClient as UncachedCanvasClient10 } from "@uniformdev/canv
1435
1317
  var CompositionPullModule = {
1436
1318
  command: "pull <directory>",
1437
1319
  describe: "Pulls all compositions to local files in a directory",
1438
- builder: (yargs23) => withConfiguration(
1439
- withApiOptions(
1440
- withProjectOptions(
1441
- withStateOptions(
1442
- withDiffOptions(
1443
- yargs23.positional("directory", {
1444
- 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.",
1445
- type: "string"
1446
- }).option("format", {
1447
- alias: ["f"],
1448
- describe: "Output format",
1449
- default: "yaml",
1450
- choices: ["yaml", "json"],
1451
- type: "string"
1452
- }).option("onlyCompositions", {
1453
- describe: "Only pulling compositions and not patterns",
1454
- default: false,
1455
- type: "boolean"
1456
- }).option("onlyPatterns", {
1457
- describe: "Only pulling patterns and not compositions",
1458
- default: false,
1459
- type: "boolean",
1460
- hidden: true
1461
- }).option("what-if", {
1462
- alias: ["w"],
1463
- describe: "What-if mode reports what would be done but changes no files",
1464
- default: false,
1465
- type: "boolean"
1466
- }).option("mode", {
1467
- alias: ["m"],
1468
- 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',
1469
- choices: ["create", "createOrUpdate", "mirror"],
1470
- default: "mirror",
1471
- type: "string"
1472
- })
1473
- )
1320
+ builder: (yargs21) => withApiOptions(
1321
+ withProjectOptions(
1322
+ withStateOptions(
1323
+ withDiffOptions(
1324
+ yargs21.positional("directory", {
1325
+ 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.",
1326
+ type: "string"
1327
+ }).option("format", {
1328
+ alias: ["f"],
1329
+ describe: "Output format",
1330
+ default: "yaml",
1331
+ choices: ["yaml", "json"],
1332
+ type: "string"
1333
+ }).option("what-if", {
1334
+ alias: ["w"],
1335
+ describe: "What-if mode reports what would be done but changes no files",
1336
+ default: false,
1337
+ type: "boolean"
1338
+ }).option("mode", {
1339
+ alias: ["m"],
1340
+ 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',
1341
+ choices: ["create", "createOrUpdate", "mirror"],
1342
+ default: "mirror",
1343
+ type: "string"
1344
+ })
1474
1345
  )
1475
1346
  )
1476
1347
  )
@@ -1481,8 +1352,6 @@ var CompositionPullModule = {
1481
1352
  proxy,
1482
1353
  directory,
1483
1354
  format,
1484
- onlyCompositions,
1485
- onlyPatterns,
1486
1355
  mode,
1487
1356
  whatIf,
1488
1357
  state,
@@ -1491,7 +1360,7 @@ var CompositionPullModule = {
1491
1360
  }) => {
1492
1361
  const fetch3 = nodeFetchProxy(proxy);
1493
1362
  const client = new UncachedCanvasClient10({ apiKey, apiHost, fetch: fetch3, projectId });
1494
- const source = createComponentInstanceEngineDataSource({ client, state, onlyCompositions, onlyPatterns });
1363
+ const source = createComponentInstanceEngineDataSource({ client, state });
1495
1364
  const isPackage = isPathAPackageFile(directory);
1496
1365
  let target;
1497
1366
  if (isPackage) {
@@ -1528,36 +1397,25 @@ import { UncachedCanvasClient as UncachedCanvasClient11 } from "@uniformdev/canv
1528
1397
  var CompositionPushModule = {
1529
1398
  command: "push <directory>",
1530
1399
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
1531
- builder: (yargs23) => withConfiguration(
1532
- withApiOptions(
1533
- withProjectOptions(
1534
- withStateOptions(
1535
- withDiffOptions(
1536
- yargs23.positional("directory", {
1537
- describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
1538
- type: "string"
1539
- }).option("what-if", {
1540
- alias: ["w"],
1541
- describe: "What-if mode reports what would be done but changes nothing",
1542
- default: false,
1543
- type: "boolean"
1544
- }).option("mode", {
1545
- alias: ["m"],
1546
- 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',
1547
- choices: ["create", "createOrUpdate", "mirror"],
1548
- default: "mirror",
1549
- type: "string"
1550
- }).option("onlyCompositions", {
1551
- describe: "Only pulling compositions and not patterns",
1552
- default: false,
1553
- type: "boolean"
1554
- }).option("onlyPatterns", {
1555
- describe: "Only pulling patterns and not compositions",
1556
- default: false,
1557
- type: "boolean",
1558
- hidden: true
1559
- })
1560
- )
1400
+ builder: (yargs21) => withApiOptions(
1401
+ withProjectOptions(
1402
+ withStateOptions(
1403
+ withDiffOptions(
1404
+ yargs21.positional("directory", {
1405
+ describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
1406
+ type: "string"
1407
+ }).option("what-if", {
1408
+ alias: ["w"],
1409
+ describe: "What-if mode reports what would be done but changes nothing",
1410
+ default: false,
1411
+ type: "boolean"
1412
+ }).option("mode", {
1413
+ alias: ["m"],
1414
+ 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',
1415
+ choices: ["create", "createOrUpdate", "mirror"],
1416
+ default: "mirror",
1417
+ type: "string"
1418
+ })
1561
1419
  )
1562
1420
  )
1563
1421
  )
@@ -1571,8 +1429,6 @@ var CompositionPushModule = {
1571
1429
  whatIf,
1572
1430
  state,
1573
1431
  project: projectId,
1574
- onlyCompositions,
1575
- onlyPatterns,
1576
1432
  diff: diffMode
1577
1433
  }) => {
1578
1434
  const fetch3 = nodeFetchProxy(proxy);
@@ -1593,7 +1449,7 @@ var CompositionPushModule = {
1593
1449
  selectDisplayName: selectDisplayName3
1594
1450
  });
1595
1451
  }
1596
- const target = createComponentInstanceEngineDataSource({ client, state, onlyCompositions, onlyPatterns });
1452
+ const target = createComponentInstanceEngineDataSource({ client, state });
1597
1453
  await syncEngine({
1598
1454
  source,
1599
1455
  target,
@@ -1610,11 +1466,9 @@ var CompositionRemoveModule = {
1610
1466
  command: "remove <id>",
1611
1467
  aliases: ["delete", "rm"],
1612
1468
  describe: "Delete a composition",
1613
- builder: (yargs23) => withConfiguration(
1614
- withApiOptions(
1615
- withProjectOptions(
1616
- yargs23.positional("id", { demandOption: true, describe: "Composition/pattern public ID to delete" })
1617
- )
1469
+ builder: (yargs21) => withApiOptions(
1470
+ withProjectOptions(
1471
+ yargs21.positional("id", { demandOption: true, describe: "Composition public ID to delete" })
1618
1472
  )
1619
1473
  ),
1620
1474
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -1629,14 +1483,9 @@ import { CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE2, UncachedCanvasClient
1629
1483
  var CompositionUnpublishModule = {
1630
1484
  command: "unpublish <id>",
1631
1485
  describe: "Unpublish a composition",
1632
- builder: (yargs23) => withConfiguration(
1633
- withApiOptions(
1634
- withProjectOptions(
1635
- yargs23.positional("id", {
1636
- demandOption: true,
1637
- describe: "Composition/pattern public ID to unpublish"
1638
- })
1639
- )
1486
+ builder: (yargs21) => withApiOptions(
1487
+ withProjectOptions(
1488
+ yargs21.positional("id", { demandOption: true, describe: "Composition public ID to unpublish" })
1640
1489
  )
1641
1490
  ),
1642
1491
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -1652,12 +1501,10 @@ var CompositionUpdateModule = {
1652
1501
  command: "update <filename>",
1653
1502
  aliases: ["put"],
1654
1503
  describe: "Insert or update a composition",
1655
- builder: (yargs23) => withConfiguration(
1656
- withApiOptions(
1657
- withProjectOptions(
1658
- withStateOptions(
1659
- yargs23.positional("filename", { demandOption: true, describe: "Composition/pattern file to put" })
1660
- )
1504
+ builder: (yargs21) => withApiOptions(
1505
+ withProjectOptions(
1506
+ withStateOptions(
1507
+ yargs21.positional("filename", { demandOption: true, describe: "Composition file to put" })
1661
1508
  )
1662
1509
  )
1663
1510
  ),
@@ -1674,7 +1521,7 @@ var CompositionModule = {
1674
1521
  command: "composition <command>",
1675
1522
  describe: "Commands for Canvas compositions",
1676
1523
  aliases: ["comp"],
1677
- builder: (yargs23) => yargs23.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
1524
+ builder: (yargs21) => yargs21.command(CompositionPullModule).command(CompositionPushModule).command(CompositionGetModule).command(CompositionRemoveModule).command(CompositionListModule).command(CompositionUpdateModule).command(CompositionPublishModule).command(CompositionUnpublishModule).demandCommand(),
1678
1525
  handler: () => {
1679
1526
  yargs3.help();
1680
1527
  }
@@ -1689,13 +1536,11 @@ var DataTypeGetModule = {
1689
1536
  command: "get <id>",
1690
1537
  describe: "Get a data type",
1691
1538
  aliases: ["ls"],
1692
- builder: (yargs23) => withConfiguration(
1693
- withFormatOptions(
1694
- withApiOptions(
1695
- withProjectOptions(
1696
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1697
- yargs23.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
1698
- )
1539
+ builder: (yargs21) => withFormatOptions(
1540
+ withApiOptions(
1541
+ withProjectOptions(
1542
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1543
+ yargs21.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
1699
1544
  )
1700
1545
  )
1701
1546
  ),
@@ -1717,7 +1562,7 @@ var DataTypeListModule = {
1717
1562
  command: "list",
1718
1563
  describe: "List data types",
1719
1564
  aliases: ["ls"],
1720
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23)))),
1565
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21))),
1721
1566
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
1722
1567
  const fetch3 = nodeFetchProxy(proxy);
1723
1568
  const client = new DataTypeClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -1766,32 +1611,30 @@ function createDataTypeEngineDataSource({
1766
1611
  var DataTypePullModule = {
1767
1612
  command: "pull <directory>",
1768
1613
  describe: "Pulls all data types to local files in a directory",
1769
- builder: (yargs23) => withConfiguration(
1770
- withApiOptions(
1771
- withProjectOptions(
1772
- withDiffOptions(
1773
- yargs23.positional("directory", {
1774
- 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.",
1775
- type: "string"
1776
- }).option("format", {
1777
- alias: ["f"],
1778
- describe: "Output format",
1779
- default: "yaml",
1780
- choices: ["yaml", "json"],
1781
- type: "string"
1782
- }).option("what-if", {
1783
- alias: ["w"],
1784
- describe: "What-if mode reports what would be done but changes no files",
1785
- default: false,
1786
- type: "boolean"
1787
- }).option("mode", {
1788
- alias: ["m"],
1789
- 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',
1790
- choices: ["create", "createOrUpdate", "mirror"],
1791
- default: "mirror",
1792
- type: "string"
1793
- })
1794
- )
1614
+ builder: (yargs21) => withApiOptions(
1615
+ withProjectOptions(
1616
+ withDiffOptions(
1617
+ yargs21.positional("directory", {
1618
+ 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.",
1619
+ type: "string"
1620
+ }).option("format", {
1621
+ alias: ["f"],
1622
+ describe: "Output format",
1623
+ default: "yaml",
1624
+ choices: ["yaml", "json"],
1625
+ type: "string"
1626
+ }).option("what-if", {
1627
+ alias: ["w"],
1628
+ describe: "What-if mode reports what would be done but changes no files",
1629
+ default: false,
1630
+ type: "boolean"
1631
+ }).option("mode", {
1632
+ alias: ["m"],
1633
+ 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',
1634
+ choices: ["create", "createOrUpdate", "mirror"],
1635
+ default: "mirror",
1636
+ type: "string"
1637
+ })
1795
1638
  )
1796
1639
  )
1797
1640
  ),
@@ -1851,26 +1694,24 @@ import { DataTypeClient as DataTypeClient4 } from "@uniformdev/canvas";
1851
1694
  var DataTypePushModule = {
1852
1695
  command: "push <directory>",
1853
1696
  describe: "Pushes all data types from files in a directory to Uniform",
1854
- builder: (yargs23) => withConfiguration(
1855
- withApiOptions(
1856
- withProjectOptions(
1857
- withDiffOptions(
1858
- yargs23.positional("directory", {
1859
- describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
1860
- type: "string"
1861
- }).option("what-if", {
1862
- alias: ["w"],
1863
- describe: "What-if mode reports what would be done but changes nothing",
1864
- default: false,
1865
- type: "boolean"
1866
- }).option("mode", {
1867
- alias: ["m"],
1868
- 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',
1869
- choices: ["create", "createOrUpdate", "mirror"],
1870
- default: "mirror",
1871
- type: "string"
1872
- })
1873
- )
1697
+ builder: (yargs21) => withApiOptions(
1698
+ withProjectOptions(
1699
+ withDiffOptions(
1700
+ yargs21.positional("directory", {
1701
+ describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
1702
+ type: "string"
1703
+ }).option("what-if", {
1704
+ alias: ["w"],
1705
+ describe: "What-if mode reports what would be done but changes nothing",
1706
+ default: false,
1707
+ type: "boolean"
1708
+ }).option("mode", {
1709
+ alias: ["m"],
1710
+ 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',
1711
+ choices: ["create", "createOrUpdate", "mirror"],
1712
+ default: "mirror",
1713
+ type: "string"
1714
+ })
1874
1715
  )
1875
1716
  )
1876
1717
  ),
@@ -1925,11 +1766,9 @@ var DataTypeRemoveModule = {
1925
1766
  command: "remove <id>",
1926
1767
  aliases: ["delete", "rm"],
1927
1768
  describe: "Delete a data type",
1928
- builder: (yargs23) => withConfiguration(
1929
- withApiOptions(
1930
- withProjectOptions(
1931
- yargs23.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
1932
- )
1769
+ builder: (yargs21) => withApiOptions(
1770
+ withProjectOptions(
1771
+ yargs21.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
1933
1772
  )
1934
1773
  ),
1935
1774
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -1945,11 +1784,9 @@ var DataTypeUpdateModule = {
1945
1784
  command: "update <filename>",
1946
1785
  aliases: ["put"],
1947
1786
  describe: "Insert or update a data type",
1948
- builder: (yargs23) => withConfiguration(
1949
- withApiOptions(
1950
- withProjectOptions(
1951
- yargs23.positional("filename", { demandOption: true, describe: "Data type file to put" })
1952
- )
1787
+ builder: (yargs21) => withApiOptions(
1788
+ withProjectOptions(
1789
+ yargs21.positional("filename", { demandOption: true, describe: "Data type file to put" })
1953
1790
  )
1954
1791
  ),
1955
1792
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -1965,206 +1802,38 @@ var DataTypeModule = {
1965
1802
  command: "datatype <command>",
1966
1803
  aliases: ["dt"],
1967
1804
  describe: "Commands for Data Type definitions",
1968
- builder: (yargs23) => yargs23.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
1805
+ builder: (yargs21) => yargs21.command(DataTypeGetModule).command(DataTypePullModule).command(DataTypePushModule).command(DataTypeRemoveModule).command(DataTypeListModule).command(DataTypeUpdateModule).demandCommand(),
1969
1806
  handler: () => {
1970
1807
  yargs4.help();
1971
1808
  }
1972
1809
  };
1973
1810
 
1974
- // src/commands/canvas/commands/pattern.ts
1975
- import yargs5 from "yargs";
1976
-
1977
- // src/commands/canvas/commands/pattern/get.ts
1978
- var PatternGetModule = {
1979
- ...CompositionGetModule,
1980
- describe: "Fetch a pattern"
1981
- };
1982
-
1983
- // src/commands/canvas/commands/pattern/list.ts
1984
- var PatternListModule = {
1985
- ...CompositionListModule,
1986
- describe: "List patterns",
1987
- builder: (yargs23) => withFormatOptions(
1988
- withConfiguration(
1989
- withApiOptions(
1990
- withProjectOptions(
1991
- withStateOptions(
1992
- yargs23.options({
1993
- offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
1994
- limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
1995
- resolvePatterns: {
1996
- type: "boolean",
1997
- default: false,
1998
- describe: "Resolve pattern references in the composition"
1999
- },
2000
- resolveOverrides: {
2001
- type: "boolean",
2002
- default: false,
2003
- describe: "Resolves pattern overrides in the composition and removes override definition data"
2004
- },
2005
- onlyPatterns: {
2006
- describe: "Only pulling patterns and not compositions",
2007
- // This default differentiate this list command from composition list command
2008
- default: true,
2009
- type: "boolean",
2010
- hidden: true
2011
- },
2012
- componentIDs: {
2013
- alias: ["componentIDs"],
2014
- type: "boolean",
2015
- default: false,
2016
- describe: "Include individual component UIDs"
2017
- }
2018
- })
2019
- )
2020
- )
2021
- )
2022
- )
2023
- )
2024
- };
2025
-
2026
- // src/commands/canvas/commands/pattern/publish.ts
2027
- var PatternPublishModule = {
2028
- ...CompositionPublishModule,
2029
- describe: "Publishes patterns"
2030
- };
2031
-
2032
- // src/commands/canvas/commands/pattern/pull.ts
2033
- var PatternPullModule = {
2034
- ...CompositionPullModule,
2035
- describe: "Pulls all patterns to local files in a directory",
2036
- builder: (yargs23) => withConfiguration(
2037
- withApiOptions(
2038
- withProjectOptions(
2039
- withStateOptions(
2040
- withDiffOptions(
2041
- yargs23.positional("directory", {
2042
- 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.",
2043
- type: "string"
2044
- }).option("format", {
2045
- alias: ["f"],
2046
- describe: "Output format",
2047
- default: "yaml",
2048
- choices: ["yaml", "json"],
2049
- type: "string"
2050
- }).option("onlyPatterns", {
2051
- describe: "Only pulling patterns and not compositions",
2052
- // This default differentiate this list command from composition list command
2053
- default: true,
2054
- type: "boolean",
2055
- hidden: true
2056
- }).option("what-if", {
2057
- alias: ["w"],
2058
- describe: "What-if mode reports what would be done but changes no files",
2059
- default: false,
2060
- type: "boolean"
2061
- }).option("mode", {
2062
- alias: ["m"],
2063
- 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',
2064
- choices: ["create", "createOrUpdate", "mirror"],
2065
- default: "mirror",
2066
- type: "string"
2067
- })
2068
- )
2069
- )
2070
- )
2071
- )
2072
- )
2073
- };
2074
-
2075
- // src/commands/canvas/commands/pattern/push.ts
2076
- var PatternPushModule = {
2077
- ...CompositionPushModule,
2078
- describe: "Pushes all patterns from files in a directory to Uniform Canvas",
2079
- builder: (yargs23) => withConfiguration(
2080
- withApiOptions(
2081
- withProjectOptions(
2082
- withStateOptions(
2083
- withDiffOptions(
2084
- yargs23.positional("directory", {
2085
- describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
2086
- type: "string"
2087
- }).option("what-if", {
2088
- alias: ["w"],
2089
- describe: "What-if mode reports what would be done but changes nothing",
2090
- default: false,
2091
- type: "boolean"
2092
- }).option("mode", {
2093
- alias: ["m"],
2094
- 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',
2095
- choices: ["create", "createOrUpdate", "mirror"],
2096
- default: "mirror",
2097
- type: "string"
2098
- }).option("onlyPatterns", {
2099
- describe: "Only pulling patterns and not compositions",
2100
- // This default differentiate this list command from composition list command
2101
- default: true,
2102
- type: "boolean",
2103
- hidden: true
2104
- })
2105
- )
2106
- )
2107
- )
2108
- )
2109
- )
2110
- };
2111
-
2112
- // src/commands/canvas/commands/pattern/remove.ts
2113
- var PatternRemoveModule = {
2114
- ...CompositionRemoveModule,
2115
- describe: "Delete a pattern"
2116
- };
2117
-
2118
- // src/commands/canvas/commands/pattern/unpublish.ts
2119
- var PatternUnpublishModule = {
2120
- ...CompositionUnpublishModule,
2121
- describe: "Unpublish a pattern"
2122
- };
2123
-
2124
- // src/commands/canvas/commands/pattern/update.ts
2125
- var PatternUpdateModule = {
2126
- ...CompositionUpdateModule,
2127
- describe: "Insert or update a pattern"
2128
- };
2129
-
2130
- // src/commands/canvas/commands/pattern.ts
2131
- var PatternModule = {
2132
- command: "pattern <command>",
2133
- describe: "Commands for Canvas patterns",
2134
- builder: (yargs23) => yargs23.command(PatternPullModule).command(PatternPushModule).command(PatternGetModule).command(PatternRemoveModule).command(PatternListModule).command(PatternUpdateModule).command(PatternPublishModule).command(PatternUnpublishModule).demandCommand(),
2135
- handler: () => {
2136
- yargs5.help();
2137
- }
2138
- };
2139
-
2140
1811
  // src/commands/canvas/index.ts
2141
1812
  var CanvasCommand = {
2142
1813
  command: "canvas <command>",
2143
1814
  aliases: ["cv", "pm", "presentation"],
2144
1815
  describe: "Uniform Canvas commands",
2145
- builder: (yargs23) => yargs23.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(CategoryModule).command(PatternModule).demandCommand(),
1816
+ builder: (yargs21) => yargs21.command(CompositionModule).command(ComponentModule).command(DataTypeModule).command(CategoryModule).demandCommand(),
2146
1817
  handler: () => {
2147
- yargs6.showHelp();
1818
+ yargs5.showHelp();
2148
1819
  }
2149
1820
  };
2150
1821
 
2151
1822
  // src/commands/context/index.ts
2152
- import yargs13 from "yargs";
1823
+ import yargs12 from "yargs";
2153
1824
 
2154
1825
  // src/commands/context/commands/aggregate.ts
2155
- import yargs7 from "yargs";
1826
+ import yargs6 from "yargs";
2156
1827
 
2157
1828
  // src/commands/context/commands/aggregate/get.ts
2158
1829
  import { UncachedAggregateClient } from "@uniformdev/context/api";
2159
1830
  var AggregateGetModule = {
2160
1831
  command: "get <id>",
2161
1832
  describe: "Fetch an aggregate",
2162
- builder: (yargs23) => withConfiguration(
2163
- withFormatOptions(
2164
- withApiOptions(
2165
- withProjectOptions(
2166
- yargs23.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
2167
- )
1833
+ builder: (yargs21) => withFormatOptions(
1834
+ withApiOptions(
1835
+ withProjectOptions(
1836
+ yargs21.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
2168
1837
  )
2169
1838
  )
2170
1839
  ),
@@ -2187,7 +1856,7 @@ var AggregateListModule = {
2187
1856
  command: "list",
2188
1857
  describe: "List aggregates",
2189
1858
  aliases: ["ls"],
2190
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23)))),
1859
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21))),
2191
1860
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2192
1861
  const fetch3 = nodeFetchProxy(proxy);
2193
1862
  const client = new UncachedAggregateClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -2253,32 +1922,30 @@ function writeContextPackage(filename, packageContents) {
2253
1922
  var AggregatePullModule = {
2254
1923
  command: "pull <directory>",
2255
1924
  describe: "Pulls all aggregates to local files in a directory",
2256
- builder: (yargs23) => withConfiguration(
2257
- withApiOptions(
2258
- withProjectOptions(
2259
- withDiffOptions(
2260
- yargs23.positional("directory", {
2261
- 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.",
2262
- type: "string"
2263
- }).option("format", {
2264
- alias: ["f"],
2265
- describe: "Output format",
2266
- default: "yaml",
2267
- choices: ["yaml", "json"],
2268
- type: "string"
2269
- }).option("what-if", {
2270
- alias: ["w"],
2271
- describe: "What-if mode reports what would be done but changes no files",
2272
- default: false,
2273
- type: "boolean"
2274
- }).option("mode", {
2275
- alias: ["m"],
2276
- 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',
2277
- choices: ["create", "createOrUpdate", "mirror"],
2278
- default: "mirror",
2279
- type: "string"
2280
- })
2281
- )
1925
+ builder: (yargs21) => withApiOptions(
1926
+ withProjectOptions(
1927
+ withDiffOptions(
1928
+ yargs21.positional("directory", {
1929
+ 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.",
1930
+ type: "string"
1931
+ }).option("format", {
1932
+ alias: ["f"],
1933
+ describe: "Output format",
1934
+ default: "yaml",
1935
+ choices: ["yaml", "json"],
1936
+ type: "string"
1937
+ }).option("what-if", {
1938
+ alias: ["w"],
1939
+ describe: "What-if mode reports what would be done but changes no files",
1940
+ default: false,
1941
+ type: "boolean"
1942
+ }).option("mode", {
1943
+ alias: ["m"],
1944
+ 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',
1945
+ choices: ["create", "createOrUpdate", "mirror"],
1946
+ default: "mirror",
1947
+ type: "string"
1948
+ })
2282
1949
  )
2283
1950
  )
2284
1951
  ),
@@ -2332,26 +1999,24 @@ import { UncachedAggregateClient as UncachedAggregateClient4 } from "@uniformdev
2332
1999
  var AggregatePushModule = {
2333
2000
  command: "push <directory>",
2334
2001
  describe: "Pushes all aggregates from files in a directory or package to Uniform",
2335
- builder: (yargs23) => withConfiguration(
2336
- withApiOptions(
2337
- withProjectOptions(
2338
- withDiffOptions(
2339
- yargs23.positional("directory", {
2340
- describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
2341
- type: "string"
2342
- }).option("what-if", {
2343
- alias: ["w"],
2344
- describe: "What-if mode reports what would be done but changes nothing",
2345
- default: false,
2346
- type: "boolean"
2347
- }).option("mode", {
2348
- alias: ["m"],
2349
- 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',
2350
- choices: ["create", "createOrUpdate", "mirror"],
2351
- default: "mirror",
2352
- type: "string"
2353
- })
2354
- )
2002
+ builder: (yargs21) => withApiOptions(
2003
+ withProjectOptions(
2004
+ withDiffOptions(
2005
+ yargs21.positional("directory", {
2006
+ describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
2007
+ type: "string"
2008
+ }).option("what-if", {
2009
+ alias: ["w"],
2010
+ describe: "What-if mode reports what would be done but changes nothing",
2011
+ default: false,
2012
+ type: "boolean"
2013
+ }).option("mode", {
2014
+ alias: ["m"],
2015
+ 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',
2016
+ choices: ["create", "createOrUpdate", "mirror"],
2017
+ default: "mirror",
2018
+ type: "string"
2019
+ })
2355
2020
  )
2356
2021
  )
2357
2022
  ),
@@ -2401,11 +2066,9 @@ var AggregateRemoveModule = {
2401
2066
  command: "remove <id>",
2402
2067
  aliases: ["delete", "rm"],
2403
2068
  describe: "Delete an aggregate",
2404
- builder: (yargs23) => withConfiguration(
2405
- withApiOptions(
2406
- withProjectOptions(
2407
- yargs23.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
2408
- )
2069
+ builder: (yargs21) => withApiOptions(
2070
+ withProjectOptions(
2071
+ yargs21.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
2409
2072
  )
2410
2073
  ),
2411
2074
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -2421,11 +2084,9 @@ var AggregateUpdateModule = {
2421
2084
  command: "update <filename>",
2422
2085
  aliases: ["put"],
2423
2086
  describe: "Insert or update an aggregate",
2424
- builder: (yargs23) => withConfiguration(
2425
- withApiOptions(
2426
- withProjectOptions(
2427
- yargs23.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
2428
- )
2087
+ builder: (yargs21) => withApiOptions(
2088
+ withProjectOptions(
2089
+ yargs21.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
2429
2090
  )
2430
2091
  ),
2431
2092
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -2441,26 +2102,24 @@ var AggregateModule = {
2441
2102
  command: "aggregate <command>",
2442
2103
  aliases: ["agg", "intent", "audience"],
2443
2104
  describe: "Commands for Context aggregates (intents, audiences)",
2444
- builder: (yargs23) => yargs23.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
2105
+ builder: (yargs21) => yargs21.command(AggregatePullModule).command(AggregatePushModule).command(AggregateGetModule).command(AggregateRemoveModule).command(AggregateListModule).command(AggregateUpdateModule).demandCommand(),
2445
2106
  handler: () => {
2446
- yargs7.help();
2107
+ yargs6.help();
2447
2108
  }
2448
2109
  };
2449
2110
 
2450
2111
  // src/commands/context/commands/enrichment.ts
2451
- import yargs8 from "yargs";
2112
+ import yargs7 from "yargs";
2452
2113
 
2453
2114
  // src/commands/context/commands/enrichment/get.ts
2454
2115
  import { UncachedEnrichmentClient } from "@uniformdev/context/api";
2455
2116
  var EnrichmentGetModule = {
2456
2117
  command: "get <id>",
2457
2118
  describe: "Fetch an enrichment category and its values",
2458
- builder: (yargs23) => withFormatOptions(
2459
- withConfiguration(
2460
- withApiOptions(
2461
- withProjectOptions(
2462
- yargs23.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
2463
- )
2119
+ builder: (yargs21) => withFormatOptions(
2120
+ withApiOptions(
2121
+ withProjectOptions(
2122
+ yargs21.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
2464
2123
  )
2465
2124
  )
2466
2125
  ),
@@ -2484,7 +2143,7 @@ var EnrichmentListModule = {
2484
2143
  command: "list",
2485
2144
  describe: "List enrichments",
2486
2145
  aliases: ["ls"],
2487
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23)))),
2146
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21))),
2488
2147
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2489
2148
  const fetch3 = nodeFetchProxy(proxy);
2490
2149
  const client = new UncachedEnrichmentClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -2585,32 +2244,30 @@ var createEnrichmentValueEngineDataSource = ({
2585
2244
  var EnrichmentPullModule = {
2586
2245
  command: "pull <directory>",
2587
2246
  describe: "Pulls all enrichments to local files in a directory",
2588
- builder: (yargs23) => withConfiguration(
2589
- withApiOptions(
2590
- withProjectOptions(
2591
- withDiffOptions(
2592
- yargs23.positional("directory", {
2593
- 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.",
2594
- type: "string"
2595
- }).option("format", {
2596
- alias: ["f"],
2597
- describe: "Output format",
2598
- default: "yaml",
2599
- choices: ["yaml", "json"],
2600
- type: "string"
2601
- }).option("what-if", {
2602
- alias: ["w"],
2603
- describe: "What-if mode reports what would be done but changes no files",
2604
- default: false,
2605
- type: "boolean"
2606
- }).option("mode", {
2607
- alias: ["m"],
2608
- 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',
2609
- choices: ["create", "createOrUpdate", "mirror"],
2610
- default: "mirror",
2611
- type: "string"
2612
- })
2613
- )
2247
+ builder: (yargs21) => withApiOptions(
2248
+ withProjectOptions(
2249
+ withDiffOptions(
2250
+ yargs21.positional("directory", {
2251
+ 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.",
2252
+ type: "string"
2253
+ }).option("format", {
2254
+ alias: ["f"],
2255
+ describe: "Output format",
2256
+ default: "yaml",
2257
+ choices: ["yaml", "json"],
2258
+ type: "string"
2259
+ }).option("what-if", {
2260
+ alias: ["w"],
2261
+ describe: "What-if mode reports what would be done but changes no files",
2262
+ default: false,
2263
+ type: "boolean"
2264
+ }).option("mode", {
2265
+ alias: ["m"],
2266
+ 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',
2267
+ choices: ["create", "createOrUpdate", "mirror"],
2268
+ default: "mirror",
2269
+ type: "string"
2270
+ })
2614
2271
  )
2615
2272
  )
2616
2273
  ),
@@ -2664,26 +2321,24 @@ import { UncachedEnrichmentClient as UncachedEnrichmentClient4 } from "@uniformd
2664
2321
  var EnrichmentPushModule = {
2665
2322
  command: "push <directory>",
2666
2323
  describe: "Pushes all enrichments from files in a directory or package to Uniform",
2667
- builder: (yargs23) => withConfiguration(
2668
- withApiOptions(
2669
- withProjectOptions(
2670
- withDiffOptions(
2671
- yargs23.positional("directory", {
2672
- describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
2673
- type: "string"
2674
- }).option("what-if", {
2675
- alias: ["w"],
2676
- describe: "What-if mode reports what would be done but changes nothing",
2677
- default: false,
2678
- type: "boolean"
2679
- }).option("mode", {
2680
- alias: ["m"],
2681
- 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',
2682
- choices: ["create", "createOrUpdate", "mirror"],
2683
- default: "mirror",
2684
- type: "string"
2685
- })
2686
- )
2324
+ builder: (yargs21) => withApiOptions(
2325
+ withProjectOptions(
2326
+ withDiffOptions(
2327
+ yargs21.positional("directory", {
2328
+ describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
2329
+ type: "string"
2330
+ }).option("what-if", {
2331
+ alias: ["w"],
2332
+ describe: "What-if mode reports what would be done but changes nothing",
2333
+ default: false,
2334
+ type: "boolean"
2335
+ }).option("mode", {
2336
+ alias: ["m"],
2337
+ 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',
2338
+ choices: ["create", "createOrUpdate", "mirror"],
2339
+ default: "mirror",
2340
+ type: "string"
2341
+ })
2687
2342
  )
2688
2343
  )
2689
2344
  ),
@@ -2732,11 +2387,9 @@ var EnrichmentRemoveModule = {
2732
2387
  command: "remove <id>",
2733
2388
  aliases: ["delete", "rm"],
2734
2389
  describe: "Delete an enrichment category and its values",
2735
- builder: (yargs23) => withConfiguration(
2736
- withApiOptions(
2737
- withProjectOptions(
2738
- yargs23.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
2739
- )
2390
+ builder: (yargs21) => withApiOptions(
2391
+ withProjectOptions(
2392
+ yargs21.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
2740
2393
  )
2741
2394
  ),
2742
2395
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -2751,14 +2404,14 @@ var EnrichmentModule = {
2751
2404
  command: "enrichment <command>",
2752
2405
  aliases: ["enr"],
2753
2406
  describe: "Commands for Context enrichments",
2754
- builder: (yargs23) => yargs23.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
2407
+ builder: (yargs21) => yargs21.command(EnrichmentPullModule).command(EnrichmentPushModule).command(EnrichmentGetModule).command(EnrichmentRemoveModule).command(EnrichmentListModule).demandCommand(),
2755
2408
  handler: () => {
2756
- yargs8.help();
2409
+ yargs7.help();
2757
2410
  }
2758
2411
  };
2759
2412
 
2760
2413
  // src/commands/context/commands/manifest.ts
2761
- import yargs9 from "yargs";
2414
+ import yargs8 from "yargs";
2762
2415
 
2763
2416
  // src/commands/context/commands/manifest/get.ts
2764
2417
  import { ApiClientError, UncachedManifestClient } from "@uniformdev/context/api";
@@ -2769,22 +2422,20 @@ var ManifestGetModule = {
2769
2422
  command: "get [output]",
2770
2423
  aliases: ["dl", "download"],
2771
2424
  describe: "Download the Uniform Context manifest for a project",
2772
- builder: (yargs23) => withConfiguration(
2773
- withApiOptions(
2774
- withProjectOptions(
2775
- yargs23.option("preview", {
2776
- describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
2777
- default: false,
2778
- type: "boolean",
2779
- alias: ["d"]
2780
- }).option("output", {
2781
- string: true,
2782
- alias: "o",
2783
- default: process.env.UNIFORM_MANIFEST_PATH,
2784
- describe: "Path to write manifest to. Defaults to UNIFORM_MANIFEST_PATH env if set.",
2785
- demandOption: true
2786
- })
2787
- )
2425
+ builder: (yargs21) => withApiOptions(
2426
+ withProjectOptions(
2427
+ yargs21.option("preview", {
2428
+ describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
2429
+ default: false,
2430
+ type: "boolean",
2431
+ alias: ["d"]
2432
+ }).option("output", {
2433
+ string: true,
2434
+ alias: "o",
2435
+ default: process.env.UNIFORM_MANIFEST_PATH,
2436
+ describe: "Path to write manifest to. Defaults to UNIFORM_MANIFEST_PATH env if set.",
2437
+ demandOption: true
2438
+ })
2788
2439
  )
2789
2440
  ),
2790
2441
  handler: async ({ apiKey, apiHost, proxy, output, project, preview }) => {
@@ -2834,7 +2485,7 @@ import { exit as exit2 } from "process";
2834
2485
  var ManifestPublishModule = {
2835
2486
  command: "publish",
2836
2487
  describe: "Publish the Uniform Context manifest for a project",
2837
- builder: (yargs23) => withConfiguration(withApiOptions(withProjectOptions(yargs23))),
2488
+ builder: (yargs21) => withApiOptions(withProjectOptions(yargs21)),
2838
2489
  handler: async ({ apiKey, apiHost, proxy, project }) => {
2839
2490
  const fetch3 = nodeFetchProxy(proxy);
2840
2491
  try {
@@ -2867,26 +2518,24 @@ var ManifestModule = {
2867
2518
  command: "manifest <command>",
2868
2519
  describe: "Commands for context manifests",
2869
2520
  aliases: ["man"],
2870
- builder: (yargs23) => yargs23.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
2521
+ builder: (yargs21) => yargs21.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
2871
2522
  handler: () => {
2872
- yargs9.help();
2523
+ yargs8.help();
2873
2524
  }
2874
2525
  };
2875
2526
 
2876
2527
  // src/commands/context/commands/quirk.ts
2877
- import yargs10 from "yargs";
2528
+ import yargs9 from "yargs";
2878
2529
 
2879
2530
  // src/commands/context/commands/quirk/get.ts
2880
2531
  import { UncachedQuirkClient } from "@uniformdev/context/api";
2881
2532
  var QuirkGetModule = {
2882
2533
  command: "get <id>",
2883
2534
  describe: "Fetch a quirk",
2884
- builder: (yargs23) => withConfiguration(
2885
- withFormatOptions(
2886
- withApiOptions(
2887
- withProjectOptions(
2888
- yargs23.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
2889
- )
2535
+ builder: (yargs21) => withFormatOptions(
2536
+ withApiOptions(
2537
+ withProjectOptions(
2538
+ yargs21.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
2890
2539
  )
2891
2540
  )
2892
2541
  ),
@@ -2909,16 +2558,14 @@ var QuirkListModule = {
2909
2558
  command: "list",
2910
2559
  describe: "List quirks",
2911
2560
  aliases: ["ls"],
2912
- builder: (yargs23) => withConfiguration(
2913
- withFormatOptions(
2914
- withApiOptions(
2915
- withProjectOptions(
2916
- yargs23.option("withIntegrations", {
2917
- alias: ["i"],
2918
- describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
2919
- type: "boolean"
2920
- })
2921
- )
2561
+ builder: (yargs21) => withFormatOptions(
2562
+ withApiOptions(
2563
+ withProjectOptions(
2564
+ yargs21.option("withIntegrations", {
2565
+ alias: ["i"],
2566
+ describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
2567
+ type: "boolean"
2568
+ })
2922
2569
  )
2923
2570
  )
2924
2571
  ),
@@ -2970,32 +2617,30 @@ function createQuirkEngineDataSource({
2970
2617
  var QuirkPullModule = {
2971
2618
  command: "pull <directory>",
2972
2619
  describe: "Pulls all quirks to local files in a directory",
2973
- builder: (yargs23) => withConfiguration(
2974
- withApiOptions(
2975
- withProjectOptions(
2976
- withDiffOptions(
2977
- yargs23.positional("directory", {
2978
- 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.",
2979
- type: "string"
2980
- }).option("format", {
2981
- alias: ["f"],
2982
- describe: "Output format",
2983
- default: "yaml",
2984
- choices: ["yaml", "json"],
2985
- type: "string"
2986
- }).option("what-if", {
2987
- alias: ["w"],
2988
- describe: "What-if mode reports what would be done but changes no files",
2989
- default: false,
2990
- type: "boolean"
2991
- }).option("mode", {
2992
- alias: ["m"],
2993
- 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',
2994
- choices: ["create", "createOrUpdate", "mirror"],
2995
- default: "mirror",
2996
- type: "string"
2997
- })
2998
- )
2620
+ builder: (yargs21) => withApiOptions(
2621
+ withProjectOptions(
2622
+ withDiffOptions(
2623
+ yargs21.positional("directory", {
2624
+ 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.",
2625
+ type: "string"
2626
+ }).option("format", {
2627
+ alias: ["f"],
2628
+ describe: "Output format",
2629
+ default: "yaml",
2630
+ choices: ["yaml", "json"],
2631
+ type: "string"
2632
+ }).option("what-if", {
2633
+ alias: ["w"],
2634
+ describe: "What-if mode reports what would be done but changes no files",
2635
+ default: false,
2636
+ type: "boolean"
2637
+ }).option("mode", {
2638
+ alias: ["m"],
2639
+ 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',
2640
+ choices: ["create", "createOrUpdate", "mirror"],
2641
+ default: "mirror",
2642
+ type: "string"
2643
+ })
2999
2644
  )
3000
2645
  )
3001
2646
  ),
@@ -3049,26 +2694,24 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
3049
2694
  var QuirkPushModule = {
3050
2695
  command: "push <directory>",
3051
2696
  describe: "Pushes all quirks from files in a directory or package to Uniform",
3052
- builder: (yargs23) => withConfiguration(
3053
- withApiOptions(
3054
- withProjectOptions(
3055
- withDiffOptions(
3056
- yargs23.positional("directory", {
3057
- describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
3058
- type: "string"
3059
- }).option("what-if", {
3060
- alias: ["w"],
3061
- describe: "What-if mode reports what would be done but changes nothing",
3062
- default: false,
3063
- type: "boolean"
3064
- }).option("mode", {
3065
- alias: ["m"],
3066
- 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',
3067
- choices: ["create", "createOrUpdate", "mirror"],
3068
- default: "mirror",
3069
- type: "string"
3070
- })
3071
- )
2697
+ builder: (yargs21) => withApiOptions(
2698
+ withProjectOptions(
2699
+ withDiffOptions(
2700
+ yargs21.positional("directory", {
2701
+ describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
2702
+ type: "string"
2703
+ }).option("what-if", {
2704
+ alias: ["w"],
2705
+ describe: "What-if mode reports what would be done but changes nothing",
2706
+ default: false,
2707
+ type: "boolean"
2708
+ }).option("mode", {
2709
+ alias: ["m"],
2710
+ 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',
2711
+ choices: ["create", "createOrUpdate", "mirror"],
2712
+ default: "mirror",
2713
+ type: "string"
2714
+ })
3072
2715
  )
3073
2716
  )
3074
2717
  ),
@@ -3117,11 +2760,9 @@ var QuirkRemoveModule = {
3117
2760
  command: "remove <id>",
3118
2761
  aliases: ["delete", "rm"],
3119
2762
  describe: "Delete a quirk",
3120
- builder: (yargs23) => withConfiguration(
3121
- withApiOptions(
3122
- withProjectOptions(
3123
- yargs23.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
3124
- )
2763
+ builder: (yargs21) => withApiOptions(
2764
+ withProjectOptions(
2765
+ yargs21.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
3125
2766
  )
3126
2767
  ),
3127
2768
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -3137,12 +2778,8 @@ var QuirkUpdateModule = {
3137
2778
  command: "update <filename>",
3138
2779
  aliases: ["put"],
3139
2780
  describe: "Insert or update a quirk",
3140
- builder: (yargs23) => withConfiguration(
3141
- withApiOptions(
3142
- withProjectOptions(
3143
- yargs23.positional("filename", { demandOption: true, describe: "Quirk file to put" })
3144
- )
3145
- )
2781
+ builder: (yargs21) => withApiOptions(
2782
+ withProjectOptions(yargs21.positional("filename", { demandOption: true, describe: "Quirk file to put" }))
3146
2783
  ),
3147
2784
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
3148
2785
  const fetch3 = nodeFetchProxy(proxy);
@@ -3157,26 +2794,24 @@ var QuirkModule = {
3157
2794
  command: "quirk <command>",
3158
2795
  aliases: ["qk"],
3159
2796
  describe: "Commands for Context quirks",
3160
- builder: (yargs23) => yargs23.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
2797
+ builder: (yargs21) => yargs21.command(QuirkPullModule).command(QuirkPushModule).command(QuirkGetModule).command(QuirkRemoveModule).command(QuirkListModule).command(QuirkUpdateModule).demandCommand(),
3161
2798
  handler: () => {
3162
- yargs10.help();
2799
+ yargs9.help();
3163
2800
  }
3164
2801
  };
3165
2802
 
3166
2803
  // src/commands/context/commands/signal.ts
3167
- import yargs11 from "yargs";
2804
+ import yargs10 from "yargs";
3168
2805
 
3169
2806
  // src/commands/context/commands/signal/get.ts
3170
2807
  import { UncachedSignalClient } from "@uniformdev/context/api";
3171
2808
  var SignalGetModule = {
3172
2809
  command: "get <id>",
3173
2810
  describe: "Fetch a signal",
3174
- builder: (yargs23) => withConfiguration(
3175
- withFormatOptions(
3176
- withApiOptions(
3177
- withProjectOptions(
3178
- yargs23.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
3179
- )
2811
+ builder: (yargs21) => withFormatOptions(
2812
+ withApiOptions(
2813
+ withProjectOptions(
2814
+ yargs21.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
3180
2815
  )
3181
2816
  )
3182
2817
  ),
@@ -3199,7 +2834,7 @@ var SignalListModule = {
3199
2834
  command: "list",
3200
2835
  describe: "List signals",
3201
2836
  aliases: ["ls"],
3202
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23)))),
2837
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21))),
3203
2838
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3204
2839
  const fetch3 = nodeFetchProxy(proxy);
3205
2840
  const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -3248,32 +2883,30 @@ function createSignalEngineDataSource({
3248
2883
  var SignalPullModule = {
3249
2884
  command: "pull <directory>",
3250
2885
  describe: "Pulls all signals to local files in a directory",
3251
- builder: (yargs23) => withConfiguration(
3252
- withApiOptions(
3253
- withProjectOptions(
3254
- withDiffOptions(
3255
- yargs23.positional("directory", {
3256
- 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.",
3257
- type: "string"
3258
- }).option("format", {
3259
- alias: ["f"],
3260
- describe: "Output format",
3261
- default: "yaml",
3262
- choices: ["yaml", "json"],
3263
- type: "string"
3264
- }).option("what-if", {
3265
- alias: ["w"],
3266
- describe: "What-if mode reports what would be done but changes no files",
3267
- default: false,
3268
- type: "boolean"
3269
- }).option("mode", {
3270
- alias: ["m"],
3271
- 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',
3272
- choices: ["create", "createOrUpdate", "mirror"],
3273
- default: "mirror",
3274
- type: "string"
3275
- })
3276
- )
2886
+ builder: (yargs21) => withApiOptions(
2887
+ withProjectOptions(
2888
+ withDiffOptions(
2889
+ yargs21.positional("directory", {
2890
+ 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.",
2891
+ type: "string"
2892
+ }).option("format", {
2893
+ alias: ["f"],
2894
+ describe: "Output format",
2895
+ default: "yaml",
2896
+ choices: ["yaml", "json"],
2897
+ type: "string"
2898
+ }).option("what-if", {
2899
+ alias: ["w"],
2900
+ describe: "What-if mode reports what would be done but changes no files",
2901
+ default: false,
2902
+ type: "boolean"
2903
+ }).option("mode", {
2904
+ alias: ["m"],
2905
+ 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',
2906
+ choices: ["create", "createOrUpdate", "mirror"],
2907
+ default: "mirror",
2908
+ type: "string"
2909
+ })
3277
2910
  )
3278
2911
  )
3279
2912
  ),
@@ -3327,26 +2960,24 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
3327
2960
  var SignalPushModule = {
3328
2961
  command: "push <directory>",
3329
2962
  describe: "Pushes all signals from files in a directory or package to Uniform",
3330
- builder: (yargs23) => withConfiguration(
3331
- withApiOptions(
3332
- withProjectOptions(
3333
- withDiffOptions(
3334
- yargs23.positional("directory", {
3335
- describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
3336
- type: "string"
3337
- }).option("what-if", {
3338
- alias: ["w"],
3339
- describe: "What-if mode reports what would be done but changes nothing",
3340
- default: false,
3341
- type: "boolean"
3342
- }).option("mode", {
3343
- alias: ["m"],
3344
- 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',
3345
- choices: ["create", "createOrUpdate", "mirror"],
3346
- default: "mirror",
3347
- type: "string"
3348
- })
3349
- )
2963
+ builder: (yargs21) => withApiOptions(
2964
+ withProjectOptions(
2965
+ withDiffOptions(
2966
+ yargs21.positional("directory", {
2967
+ describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
2968
+ type: "string"
2969
+ }).option("what-if", {
2970
+ alias: ["w"],
2971
+ describe: "What-if mode reports what would be done but changes nothing",
2972
+ default: false,
2973
+ type: "boolean"
2974
+ }).option("mode", {
2975
+ alias: ["m"],
2976
+ 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',
2977
+ choices: ["create", "createOrUpdate", "mirror"],
2978
+ default: "mirror",
2979
+ type: "string"
2980
+ })
3350
2981
  )
3351
2982
  )
3352
2983
  ),
@@ -3395,11 +3026,9 @@ var SignalRemoveModule = {
3395
3026
  command: "remove <id>",
3396
3027
  aliases: ["delete", "rm"],
3397
3028
  describe: "Delete a signal",
3398
- builder: (yargs23) => withConfiguration(
3399
- withApiOptions(
3400
- withProjectOptions(
3401
- yargs23.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
3402
- )
3029
+ builder: (yargs21) => withApiOptions(
3030
+ withProjectOptions(
3031
+ yargs21.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
3403
3032
  )
3404
3033
  ),
3405
3034
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -3415,12 +3044,8 @@ var SignalUpdateModule = {
3415
3044
  command: "update <filename>",
3416
3045
  aliases: ["put"],
3417
3046
  describe: "Insert or update a signal",
3418
- builder: (yargs23) => withConfiguration(
3419
- withApiOptions(
3420
- withProjectOptions(
3421
- yargs23.positional("filename", { demandOption: true, describe: "Signal file to put" })
3422
- )
3423
- )
3047
+ builder: (yargs21) => withApiOptions(
3048
+ withProjectOptions(yargs21.positional("filename", { demandOption: true, describe: "Signal file to put" }))
3424
3049
  ),
3425
3050
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
3426
3051
  const fetch3 = nodeFetchProxy(proxy);
@@ -3435,26 +3060,24 @@ var SignalModule = {
3435
3060
  command: "signal <command>",
3436
3061
  aliases: ["sig"],
3437
3062
  describe: "Commands for Context signals",
3438
- builder: (yargs23) => yargs23.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
3063
+ builder: (yargs21) => yargs21.command(SignalPullModule).command(SignalPushModule).command(SignalGetModule).command(SignalRemoveModule).command(SignalListModule).command(SignalUpdateModule).demandCommand(),
3439
3064
  handler: () => {
3440
- yargs11.help();
3065
+ yargs10.help();
3441
3066
  }
3442
3067
  };
3443
3068
 
3444
3069
  // src/commands/context/commands/test.ts
3445
- import yargs12 from "yargs";
3070
+ import yargs11 from "yargs";
3446
3071
 
3447
3072
  // src/commands/context/commands/test/get.ts
3448
3073
  import { UncachedTestClient } from "@uniformdev/context/api";
3449
3074
  var TestGetModule = {
3450
3075
  command: "get <id>",
3451
3076
  describe: "Fetch a test",
3452
- builder: (yargs23) => withConfiguration(
3453
- withFormatOptions(
3454
- withApiOptions(
3455
- withProjectOptions(
3456
- yargs23.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
3457
- )
3077
+ builder: (yargs21) => withFormatOptions(
3078
+ withApiOptions(
3079
+ withProjectOptions(
3080
+ yargs21.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
3458
3081
  )
3459
3082
  )
3460
3083
  ),
@@ -3477,7 +3100,7 @@ var TestListModule = {
3477
3100
  command: "list",
3478
3101
  describe: "List tests",
3479
3102
  aliases: ["ls"],
3480
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23)))),
3103
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21))),
3481
3104
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3482
3105
  const fetch3 = nodeFetchProxy(proxy);
3483
3106
  const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -3526,32 +3149,30 @@ function createTestEngineDataSource({
3526
3149
  var TestPullModule = {
3527
3150
  command: "pull <directory>",
3528
3151
  describe: "Pulls all tests to local files in a directory",
3529
- builder: (yargs23) => withConfiguration(
3530
- withApiOptions(
3531
- withProjectOptions(
3532
- withDiffOptions(
3533
- yargs23.positional("directory", {
3534
- 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.",
3535
- type: "string"
3536
- }).option("format", {
3537
- alias: ["f"],
3538
- describe: "Output format",
3539
- default: "yaml",
3540
- choices: ["yaml", "json"],
3541
- type: "string"
3542
- }).option("what-if", {
3543
- alias: ["w"],
3544
- describe: "What-if mode reports what would be done but changes no files",
3545
- default: false,
3546
- type: "boolean"
3547
- }).option("mode", {
3548
- alias: ["m"],
3549
- 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',
3550
- choices: ["create", "createOrUpdate", "mirror"],
3551
- default: "mirror",
3552
- type: "string"
3553
- })
3554
- )
3152
+ builder: (yargs21) => withApiOptions(
3153
+ withProjectOptions(
3154
+ withDiffOptions(
3155
+ yargs21.positional("directory", {
3156
+ 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.",
3157
+ type: "string"
3158
+ }).option("format", {
3159
+ alias: ["f"],
3160
+ describe: "Output format",
3161
+ default: "yaml",
3162
+ choices: ["yaml", "json"],
3163
+ type: "string"
3164
+ }).option("what-if", {
3165
+ alias: ["w"],
3166
+ describe: "What-if mode reports what would be done but changes no files",
3167
+ default: false,
3168
+ type: "boolean"
3169
+ }).option("mode", {
3170
+ alias: ["m"],
3171
+ 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',
3172
+ choices: ["create", "createOrUpdate", "mirror"],
3173
+ default: "mirror",
3174
+ type: "string"
3175
+ })
3555
3176
  )
3556
3177
  )
3557
3178
  ),
@@ -3605,26 +3226,24 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
3605
3226
  var TestPushModule = {
3606
3227
  command: "push <directory>",
3607
3228
  describe: "Pushes all tests from files in a directory or package to Uniform",
3608
- builder: (yargs23) => withConfiguration(
3609
- withApiOptions(
3610
- withProjectOptions(
3611
- withDiffOptions(
3612
- yargs23.positional("directory", {
3613
- describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
3614
- type: "string"
3615
- }).option("what-if", {
3616
- alias: ["w"],
3617
- describe: "What-if mode reports what would be done but changes nothing",
3618
- default: false,
3619
- type: "boolean"
3620
- }).option("mode", {
3621
- alias: ["m"],
3622
- 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',
3623
- choices: ["create", "createOrUpdate", "mirror"],
3624
- default: "mirror",
3625
- type: "string"
3626
- })
3627
- )
3229
+ builder: (yargs21) => withApiOptions(
3230
+ withProjectOptions(
3231
+ withDiffOptions(
3232
+ yargs21.positional("directory", {
3233
+ describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
3234
+ type: "string"
3235
+ }).option("what-if", {
3236
+ alias: ["w"],
3237
+ describe: "What-if mode reports what would be done but changes nothing",
3238
+ default: false,
3239
+ type: "boolean"
3240
+ }).option("mode", {
3241
+ alias: ["m"],
3242
+ 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',
3243
+ choices: ["create", "createOrUpdate", "mirror"],
3244
+ default: "mirror",
3245
+ type: "string"
3246
+ })
3628
3247
  )
3629
3248
  )
3630
3249
  ),
@@ -3673,12 +3292,8 @@ var TestRemoveModule = {
3673
3292
  command: "remove <id>",
3674
3293
  aliases: ["delete", "rm"],
3675
3294
  describe: "Delete a test",
3676
- builder: (yargs23) => withConfiguration(
3677
- withApiOptions(
3678
- withProjectOptions(
3679
- yargs23.positional("id", { demandOption: true, describe: "Test public ID to delete" })
3680
- )
3681
- )
3295
+ builder: (yargs21) => withApiOptions(
3296
+ withProjectOptions(yargs21.positional("id", { demandOption: true, describe: "Test public ID to delete" }))
3682
3297
  ),
3683
3298
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
3684
3299
  const fetch3 = nodeFetchProxy(proxy);
@@ -3693,10 +3308,8 @@ var TestUpdateModule = {
3693
3308
  command: "update <filename>",
3694
3309
  aliases: ["put"],
3695
3310
  describe: "Insert or update a test",
3696
- builder: (yargs23) => withConfiguration(
3697
- withApiOptions(
3698
- withProjectOptions(yargs23.positional("filename", { demandOption: true, describe: "Test file to put" }))
3699
- )
3311
+ builder: (yargs21) => withApiOptions(
3312
+ withProjectOptions(yargs21.positional("filename", { demandOption: true, describe: "Test file to put" }))
3700
3313
  ),
3701
3314
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
3702
3315
  const fetch3 = nodeFetchProxy(proxy);
@@ -3710,9 +3323,9 @@ var TestUpdateModule = {
3710
3323
  var TestModule = {
3711
3324
  command: "test <command>",
3712
3325
  describe: "Commands for Context A/B tests",
3713
- builder: (yargs23) => yargs23.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
3326
+ builder: (yargs21) => yargs21.command(TestPullModule).command(TestPushModule).command(TestGetModule).command(TestRemoveModule).command(TestListModule).command(TestUpdateModule).demandCommand(),
3714
3327
  handler: () => {
3715
- yargs12.help();
3328
+ yargs11.help();
3716
3329
  }
3717
3330
  };
3718
3331
 
@@ -3721,9 +3334,9 @@ var ContextCommand = {
3721
3334
  command: "context <command>",
3722
3335
  aliases: ["ctx"],
3723
3336
  describe: "Uniform Context commands",
3724
- builder: (yargs23) => yargs23.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
3337
+ builder: (yargs21) => yargs21.command(ManifestModule).command(SignalModule).command(EnrichmentModule).command(AggregateModule).command(QuirkModule).command(TestModule).demandCommand(),
3725
3338
  handler: () => {
3726
- yargs13.showHelp();
3339
+ yargs12.showHelp();
3727
3340
  }
3728
3341
  };
3729
3342
 
@@ -3751,11 +3364,11 @@ import { PostHog } from "posthog-node";
3751
3364
  // package.json
3752
3365
  var package_default = {
3753
3366
  name: "@uniformdev/cli",
3754
- version: "19.40.0",
3367
+ version: "19.41.0",
3755
3368
  description: "Uniform command line interface tool",
3756
3369
  license: "SEE LICENSE IN LICENSE.txt",
3757
3370
  main: "./cli.js",
3758
- types: "./dist/index.d.mts",
3371
+ types: "./dist/index.d.ts",
3759
3372
  sideEffects: false,
3760
3373
  scripts: {
3761
3374
  uniform: "node ./cli.js",
@@ -3772,8 +3385,7 @@ var package_default = {
3772
3385
  "@uniformdev/project-map": "workspace:*",
3773
3386
  "@uniformdev/redirect": "workspace:*",
3774
3387
  colorette: "2.0.20",
3775
- cosmiconfig: "8.2.0",
3776
- "cosmiconfig-typescript-loader": "5.0.0",
3388
+ cosmiconfig: "^8.2.0",
3777
3389
  diff: "^5.0.0",
3778
3390
  dotenv: "^16.0.3",
3779
3391
  execa: "5.1.1",
@@ -4711,27 +4323,25 @@ var disableTelemetryDefault = !["", "0", "false", "no"].includes(
4711
4323
  process.env.UNIFORM_CLI_DISABLE_TELEMETRY || ""
4712
4324
  );
4713
4325
  var NewCmd = {
4714
- command: "new [name]",
4715
- builder: (y) => withConfiguration(
4716
- y.positional("name", {
4717
- describe: "Name of a project",
4718
- type: "string"
4719
- }).option("apiHost", {
4720
- describe: `Uniform host. Defaults to UNIFORM_CLI_BASE_URL env or ${stableApiHost}. Supports dotenv.`,
4721
- default: apiHostDefault,
4722
- demandOption: true,
4723
- type: "string"
4724
- }).option("outputPath", {
4725
- alias: "o",
4726
- description: "Specify where to store integration files. Defaults to cwd.",
4727
- type: "string"
4728
- }).option("disableTelemetry", {
4729
- describe: "By default, usage information is sent to Uniform. Use this option or set UNIFORM_CLI_DISABLE_TELEMETRY to disable telemetry.",
4730
- default: disableTelemetryDefault,
4731
- demandOption: true,
4732
- type: "boolean"
4733
- })
4734
- ),
4326
+ command: "new [name]",
4327
+ builder: (y) => y.positional("name", {
4328
+ describe: "Name of a project",
4329
+ type: "string"
4330
+ }).option("apiHost", {
4331
+ describe: `Uniform host. Defaults to UNIFORM_CLI_BASE_URL env or ${stableApiHost}. Supports dotenv.`,
4332
+ default: apiHostDefault,
4333
+ demandOption: true,
4334
+ type: "string"
4335
+ }).option("outputPath", {
4336
+ alias: "o",
4337
+ description: "Specify where to store integration files. Defaults to cwd.",
4338
+ type: "string"
4339
+ }).option("disableTelemetry", {
4340
+ describe: "By default, usage information is sent to Uniform. Use this option or set UNIFORM_CLI_DISABLE_TELEMETRY to disable telemetry.",
4341
+ default: disableTelemetryDefault,
4342
+ demandOption: true,
4343
+ type: "boolean"
4344
+ }),
4735
4345
  describe: "Start a new Uniform project",
4736
4346
  handler: async function({ name, apiHost, outputPath, disableTelemetry }) {
4737
4347
  const { stopAllSpinners, spin } = makeSpinner();
@@ -4752,23 +4362,21 @@ var NewCmd = {
4752
4362
  };
4753
4363
  var NewMeshCmd = {
4754
4364
  command: "new-integration",
4755
- builder: (y) => withConfiguration(
4756
- y.option("apiHost", {
4757
- describe: `Uniform host. Defaults to UNIFORM_CLI_BASE_URL env or ${stableApiHost}. Supports dotenv.`,
4758
- default: apiHostDefault,
4759
- demandOption: true,
4760
- type: "string"
4761
- }).option("outputPath", {
4762
- alias: "o",
4763
- description: "Specify where to store integration files. Defaults to cwd.",
4764
- type: "string"
4765
- }).option("disableTelemetry", {
4766
- describe: "By default, usage information is sent to Uniform. Use this option or set UNIFORM_CLI_DISABLE_TELEMETRY to disable telemetry.",
4767
- default: disableTelemetryDefault,
4768
- demandOption: true,
4769
- type: "boolean"
4770
- })
4771
- ),
4365
+ builder: (y) => y.option("apiHost", {
4366
+ describe: `Uniform host. Defaults to UNIFORM_CLI_BASE_URL env or ${stableApiHost}. Supports dotenv.`,
4367
+ default: apiHostDefault,
4368
+ demandOption: true,
4369
+ type: "string"
4370
+ }).option("outputPath", {
4371
+ alias: "o",
4372
+ description: "Specify where to store integration files. Defaults to cwd.",
4373
+ type: "string"
4374
+ }).option("disableTelemetry", {
4375
+ describe: "By default, usage information is sent to Uniform. Use this option or set UNIFORM_CLI_DISABLE_TELEMETRY to disable telemetry.",
4376
+ default: disableTelemetryDefault,
4377
+ demandOption: true,
4378
+ type: "boolean"
4379
+ }),
4772
4380
  describe: "Start a new Uniform project",
4773
4381
  handler: async function({ apiHost, outputPath, disableTelemetry }) {
4774
4382
  const { stopAllSpinners, spin } = makeSpinner();
@@ -4789,10 +4397,10 @@ var NewMeshCmd = {
4789
4397
  };
4790
4398
 
4791
4399
  // src/commands/optimize/index.ts
4792
- import yargs15 from "yargs";
4400
+ import yargs14 from "yargs";
4793
4401
 
4794
4402
  // src/commands/optimize/manifest.ts
4795
- import yargs14 from "yargs";
4403
+ import yargs13 from "yargs";
4796
4404
 
4797
4405
  // src/commands/optimize/manifest/download.ts
4798
4406
  import { gray as gray4, green as green3, red as red5, yellow as yellow2 } from "colorette";
@@ -4807,7 +4415,7 @@ var UniformBaseUrl = "https://uniform.app";
4807
4415
  var module = {
4808
4416
  command: "download [output]",
4809
4417
  describe: "Download intent manifest",
4810
- builder: (yargs23) => yargs23.option("apiKey", {
4418
+ builder: (yargs21) => yargs21.option("apiKey", {
4811
4419
  alias: "k",
4812
4420
  demandOption: true,
4813
4421
  string: true,
@@ -4908,10 +4516,10 @@ var module2 = {
4908
4516
  command: "manifest <command>",
4909
4517
  describe: "Intent manifest commands",
4910
4518
  builder: () => {
4911
- return yargs14.command(download_default);
4519
+ return yargs13.command(download_default);
4912
4520
  },
4913
4521
  handler: () => {
4914
- yargs14.showHelp();
4522
+ yargs13.showHelp();
4915
4523
  }
4916
4524
  };
4917
4525
  var manifest_default = module2;
@@ -4922,30 +4530,28 @@ var OptimizeCommand = {
4922
4530
  aliases: ["opt"],
4923
4531
  describe: "Uniform Optimize commands",
4924
4532
  builder: () => {
4925
- return yargs15.command(manifest_default);
4533
+ return yargs14.command(manifest_default);
4926
4534
  },
4927
4535
  handler: () => {
4928
- yargs15.showHelp();
4536
+ yargs14.showHelp();
4929
4537
  }
4930
4538
  };
4931
4539
 
4932
4540
  // src/commands/project-map/index.ts
4933
- import yargs18 from "yargs";
4541
+ import yargs17 from "yargs";
4934
4542
 
4935
4543
  // src/commands/project-map/commands/projectMapDefinition.ts
4936
- import yargs16 from "yargs";
4544
+ import yargs15 from "yargs";
4937
4545
 
4938
4546
  // src/commands/project-map/commands/ProjectMapDefinition/get.ts
4939
4547
  import { UncachedProjectMapClient } from "@uniformdev/project-map";
4940
4548
  var ProjectMapDefinitionGetModule = {
4941
4549
  command: "get <id>",
4942
4550
  describe: "Fetch a project map",
4943
- builder: (yargs23) => withFormatOptions(
4944
- withConfiguration(
4945
- withApiOptions(
4946
- withProjectOptions(
4947
- yargs23.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
4948
- )
4551
+ builder: (yargs21) => withFormatOptions(
4552
+ withApiOptions(
4553
+ withProjectOptions(
4554
+ yargs21.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
4949
4555
  )
4950
4556
  )
4951
4557
  ),
@@ -4968,7 +4574,7 @@ var ProjectMapDefinitionListModule = {
4968
4574
  command: "list",
4969
4575
  describe: "List of project maps",
4970
4576
  aliases: ["ls"],
4971
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23)))),
4577
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21))),
4972
4578
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4973
4579
  const fetch3 = nodeFetchProxy(proxy);
4974
4580
  const client = new UncachedProjectMapClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5025,32 +4631,30 @@ function createProjectMapDefinitionEngineDataSource({
5025
4631
  var ProjectMapDefinitionPullModule = {
5026
4632
  command: "pull <directory>",
5027
4633
  describe: "Pulls all project maps to local files in a directory",
5028
- builder: (yargs23) => withConfiguration(
5029
- withApiOptions(
5030
- withProjectOptions(
5031
- withDiffOptions(
5032
- yargs23.positional("directory", {
5033
- 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.",
5034
- type: "string"
5035
- }).option("format", {
5036
- alias: ["f"],
5037
- describe: "Output format",
5038
- default: "yaml",
5039
- choices: ["yaml", "json"],
5040
- type: "string"
5041
- }).option("what-if", {
5042
- alias: ["w"],
5043
- describe: "What-if mode reports what would be done but changes no files",
5044
- default: false,
5045
- type: "boolean"
5046
- }).option("mode", {
5047
- alias: ["m"],
5048
- 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',
5049
- choices: ["create", "createOrUpdate", "mirror"],
5050
- default: "mirror",
5051
- type: "string"
5052
- })
5053
- )
4634
+ builder: (yargs21) => withApiOptions(
4635
+ withProjectOptions(
4636
+ withDiffOptions(
4637
+ yargs21.positional("directory", {
4638
+ 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.",
4639
+ type: "string"
4640
+ }).option("format", {
4641
+ alias: ["f"],
4642
+ describe: "Output format",
4643
+ default: "yaml",
4644
+ choices: ["yaml", "json"],
4645
+ type: "string"
4646
+ }).option("what-if", {
4647
+ alias: ["w"],
4648
+ describe: "What-if mode reports what would be done but changes no files",
4649
+ default: false,
4650
+ type: "boolean"
4651
+ }).option("mode", {
4652
+ alias: ["m"],
4653
+ 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',
4654
+ choices: ["create", "createOrUpdate", "mirror"],
4655
+ default: "mirror",
4656
+ type: "string"
4657
+ })
5054
4658
  )
5055
4659
  )
5056
4660
  ),
@@ -5104,26 +4708,24 @@ import { UncachedProjectMapClient as UncachedProjectMapClient4 } from "@uniformd
5104
4708
  var ProjectMapDefinitionPushModule = {
5105
4709
  command: "push <directory>",
5106
4710
  describe: "Pushes all project maps from files in a directory or package to Uniform",
5107
- builder: (yargs23) => withConfiguration(
5108
- withApiOptions(
5109
- withProjectOptions(
5110
- withDiffOptions(
5111
- yargs23.positional("directory", {
5112
- describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
5113
- type: "string"
5114
- }).option("what-if", {
5115
- alias: ["w"],
5116
- describe: "What-if mode reports what would be done but changes nothing",
5117
- default: false,
5118
- type: "boolean"
5119
- }).option("mode", {
5120
- alias: ["m"],
5121
- 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',
5122
- choices: ["create", "createOrUpdate", "mirror"],
5123
- default: "mirror",
5124
- type: "string"
5125
- })
5126
- )
4711
+ builder: (yargs21) => withApiOptions(
4712
+ withProjectOptions(
4713
+ withDiffOptions(
4714
+ yargs21.positional("directory", {
4715
+ describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
4716
+ type: "string"
4717
+ }).option("what-if", {
4718
+ alias: ["w"],
4719
+ describe: "What-if mode reports what would be done but changes nothing",
4720
+ default: false,
4721
+ type: "boolean"
4722
+ }).option("mode", {
4723
+ alias: ["m"],
4724
+ 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',
4725
+ choices: ["create", "createOrUpdate", "mirror"],
4726
+ default: "mirror",
4727
+ type: "string"
4728
+ })
5127
4729
  )
5128
4730
  )
5129
4731
  ),
@@ -5172,10 +4774,8 @@ var ProjectMapDefinitionRemoveModule = {
5172
4774
  command: "remove <id>",
5173
4775
  aliases: ["delete", "rm"],
5174
4776
  describe: "Delete a project map",
5175
- builder: (yargs23) => withConfiguration(
5176
- withApiOptions(
5177
- withProjectOptions(yargs23.positional("id", { demandOption: true, describe: " UUID to delete" }))
5178
- )
4777
+ builder: (yargs21) => withApiOptions(
4778
+ withProjectOptions(yargs21.positional("id", { demandOption: true, describe: " UUID to delete" }))
5179
4779
  ),
5180
4780
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
5181
4781
  const fetch3 = nodeFetchProxy(proxy);
@@ -5190,11 +4790,9 @@ var ProjectMapDefinitionUpdateModule = {
5190
4790
  command: "update <filename>",
5191
4791
  aliases: ["put"],
5192
4792
  describe: "Insert or update a project map",
5193
- builder: (yargs23) => withConfiguration(
5194
- withApiOptions(
5195
- withProjectOptions(
5196
- yargs23.positional("filename", { demandOption: true, describe: "Project map file to put" })
5197
- )
4793
+ builder: (yargs21) => withApiOptions(
4794
+ withProjectOptions(
4795
+ yargs21.positional("filename", { demandOption: true, describe: "Project map file to put" })
5198
4796
  )
5199
4797
  ),
5200
4798
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -5209,26 +4807,24 @@ var ProjectMapDefinitionUpdateModule = {
5209
4807
  var ProjectMapDefinitionModule = {
5210
4808
  command: "definition <command>",
5211
4809
  describe: "Commands for ProjectMap Definitions",
5212
- builder: (yargs23) => yargs23.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
4810
+ builder: (yargs21) => yargs21.command(ProjectMapDefinitionPullModule).command(ProjectMapDefinitionPushModule).command(ProjectMapDefinitionGetModule).command(ProjectMapDefinitionRemoveModule).command(ProjectMapDefinitionListModule).command(ProjectMapDefinitionUpdateModule).demandCommand(),
5213
4811
  handler: () => {
5214
- yargs16.help();
4812
+ yargs15.help();
5215
4813
  }
5216
4814
  };
5217
4815
 
5218
4816
  // src/commands/project-map/commands/projectMapNode.ts
5219
- import yargs17 from "yargs";
4817
+ import yargs16 from "yargs";
5220
4818
 
5221
4819
  // src/commands/project-map/commands/ProjectMapNode/get.ts
5222
4820
  import { UncachedProjectMapClient as UncachedProjectMapClient7 } from "@uniformdev/project-map";
5223
4821
  var ProjectMapNodeGetModule = {
5224
4822
  command: "get <id> <projectMapId>",
5225
4823
  describe: "Fetch a project map node",
5226
- builder: (yargs23) => withConfiguration(
5227
- withFormatOptions(
5228
- withApiOptions(
5229
- withProjectOptions(
5230
- yargs23.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
5231
- )
4824
+ builder: (yargs21) => withFormatOptions(
4825
+ withApiOptions(
4826
+ withProjectOptions(
4827
+ yargs21.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
5232
4828
  )
5233
4829
  )
5234
4830
  ),
@@ -5253,15 +4849,10 @@ var ProjectMapNodeListModule = {
5253
4849
  command: "list <projectMapId>",
5254
4850
  describe: "List project map nodes",
5255
4851
  aliases: ["ls"],
5256
- builder: (yargs23) => withConfiguration(
5257
- withFormatOptions(
5258
- withApiOptions(
5259
- withProjectOptions(
5260
- yargs23.positional("projectMapId", {
5261
- demandOption: true,
5262
- describe: "ProjectMap UUID to fetch from"
5263
- })
5264
- )
4852
+ builder: (yargs21) => withFormatOptions(
4853
+ withApiOptions(
4854
+ withProjectOptions(
4855
+ yargs21.positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
5265
4856
  )
5266
4857
  )
5267
4858
  ),
@@ -5328,32 +4919,30 @@ function createProjectMapNodeEngineDataSource({
5328
4919
  var ProjectMapNodePullModule = {
5329
4920
  command: "pull <directory>",
5330
4921
  describe: "Pulls all project maps nodes to local files in a directory",
5331
- builder: (yargs23) => withConfiguration(
5332
- withApiOptions(
5333
- withProjectOptions(
5334
- withDiffOptions(
5335
- yargs23.positional("directory", {
5336
- 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.",
5337
- type: "string"
5338
- }).option("format", {
5339
- alias: ["f"],
5340
- describe: "Output format",
5341
- default: "yaml",
5342
- choices: ["yaml", "json"],
5343
- type: "string"
5344
- }).option("what-if", {
5345
- alias: ["w"],
5346
- describe: "What-if mode reports what would be done but changes no files",
5347
- default: false,
5348
- type: "boolean"
5349
- }).option("mode", {
5350
- alias: ["m"],
5351
- 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',
5352
- choices: ["create", "createOrUpdate", "mirror"],
5353
- default: "mirror",
5354
- type: "string"
5355
- })
5356
- )
4922
+ builder: (yargs21) => withApiOptions(
4923
+ withProjectOptions(
4924
+ withDiffOptions(
4925
+ yargs21.positional("directory", {
4926
+ 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.",
4927
+ type: "string"
4928
+ }).option("format", {
4929
+ alias: ["f"],
4930
+ describe: "Output format",
4931
+ default: "yaml",
4932
+ choices: ["yaml", "json"],
4933
+ type: "string"
4934
+ }).option("what-if", {
4935
+ alias: ["w"],
4936
+ describe: "What-if mode reports what would be done but changes no files",
4937
+ default: false,
4938
+ type: "boolean"
4939
+ }).option("mode", {
4940
+ alias: ["m"],
4941
+ 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',
4942
+ choices: ["create", "createOrUpdate", "mirror"],
4943
+ default: "mirror",
4944
+ type: "string"
4945
+ })
5357
4946
  )
5358
4947
  )
5359
4948
  ),
@@ -5411,26 +5000,24 @@ import { UncachedProjectMapClient as UncachedProjectMapClient10 } from "@uniform
5411
5000
  var ProjectMapNodePushModule = {
5412
5001
  command: "push <directory>",
5413
5002
  describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
5414
- builder: (yargs23) => withConfiguration(
5415
- withApiOptions(
5416
- withProjectOptions(
5417
- withDiffOptions(
5418
- yargs23.positional("directory", {
5419
- describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
5420
- type: "string"
5421
- }).option("what-if", {
5422
- alias: ["w"],
5423
- describe: "What-if mode reports what would be done but changes nothing",
5424
- default: false,
5425
- type: "boolean"
5426
- }).option("mode", {
5427
- alias: ["m"],
5428
- 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',
5429
- choices: ["create", "createOrUpdate", "mirror"],
5430
- default: "mirror",
5431
- type: "string"
5432
- })
5433
- )
5003
+ builder: (yargs21) => withApiOptions(
5004
+ withProjectOptions(
5005
+ withDiffOptions(
5006
+ yargs21.positional("directory", {
5007
+ describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
5008
+ type: "string"
5009
+ }).option("what-if", {
5010
+ alias: ["w"],
5011
+ describe: "What-if mode reports what would be done but changes nothing",
5012
+ default: false,
5013
+ type: "boolean"
5014
+ }).option("mode", {
5015
+ alias: ["m"],
5016
+ 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',
5017
+ choices: ["create", "createOrUpdate", "mirror"],
5018
+ default: "mirror",
5019
+ type: "string"
5020
+ })
5434
5021
  )
5435
5022
  )
5436
5023
  ),
@@ -5488,11 +5075,9 @@ var ProjectMapNodeRemoveModule = {
5488
5075
  command: "remove <id> <projectMapId>",
5489
5076
  aliases: ["delete", "rm"],
5490
5077
  describe: "Delete a project map node",
5491
- builder: (yargs23) => withConfiguration(
5492
- withApiOptions(
5493
- withProjectOptions(
5494
- yargs23.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
5495
- )
5078
+ builder: (yargs21) => withApiOptions(
5079
+ withProjectOptions(
5080
+ yargs21.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
5496
5081
  )
5497
5082
  ),
5498
5083
  handler: async ({ apiHost, apiKey, proxy, projectMapId, id, project: projectId }) => {
@@ -5508,11 +5093,9 @@ var ProjectMapNodeUpdateModule = {
5508
5093
  command: "update <filename> <projectMapId>",
5509
5094
  aliases: ["put"],
5510
5095
  describe: "Insert or update a project map node",
5511
- builder: (yargs23) => withConfiguration(
5512
- withApiOptions(
5513
- withProjectOptions(
5514
- yargs23.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
5515
- )
5096
+ builder: (yargs21) => withApiOptions(
5097
+ withProjectOptions(
5098
+ yargs21.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
5516
5099
  )
5517
5100
  ),
5518
5101
  handler: async ({ apiHost, apiKey, proxy, projectMapId, filename, project: projectId }) => {
@@ -5527,9 +5110,9 @@ var ProjectMapNodeUpdateModule = {
5527
5110
  var ProjectMapNodeModule = {
5528
5111
  command: "node <command>",
5529
5112
  describe: "Commands for ProjectMap Nodes",
5530
- builder: (yargs23) => yargs23.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
5113
+ builder: (yargs21) => yargs21.command(ProjectMapNodePullModule).command(ProjectMapNodePushModule).command(ProjectMapNodeGetModule).command(ProjectMapNodeRemoveModule).command(ProjectMapNodeListModule).command(ProjectMapNodeUpdateModule).demandCommand(),
5531
5114
  handler: () => {
5532
- yargs17.help();
5115
+ yargs16.help();
5533
5116
  }
5534
5117
  };
5535
5118
 
@@ -5538,30 +5121,26 @@ var ProjectMapCommand = {
5538
5121
  command: "project-map <command>",
5539
5122
  aliases: ["prm"],
5540
5123
  describe: "Uniform ProjectMap commands",
5541
- builder: (yargs23) => yargs23.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
5124
+ builder: (yargs21) => yargs21.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
5542
5125
  handler: () => {
5543
- yargs18.showHelp();
5126
+ yargs17.showHelp();
5544
5127
  }
5545
5128
  };
5546
5129
 
5547
5130
  // src/commands/redirect/index.ts
5548
- import yargs20 from "yargs";
5131
+ import yargs19 from "yargs";
5549
5132
 
5550
5133
  // src/commands/redirect/commands/redirect.ts
5551
- import yargs19 from "yargs";
5134
+ import yargs18 from "yargs";
5552
5135
 
5553
5136
  // src/commands/redirect/commands/RedirectDefinition/get.ts
5554
5137
  import { UncachedRedirectClient } from "@uniformdev/redirect";
5555
5138
  var RedirectDefinitionGetModule = {
5556
5139
  command: "get <id>",
5557
5140
  describe: "Fetch a redirect",
5558
- builder: (yargs23) => withConfiguration(
5559
- withFormatOptions(
5560
- withApiOptions(
5561
- withProjectOptions(
5562
- yargs23.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
5563
- )
5564
- )
5141
+ builder: (yargs21) => withFormatOptions(
5142
+ withApiOptions(
5143
+ withProjectOptions(yargs21.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" }))
5565
5144
  )
5566
5145
  ),
5567
5146
  handler: async ({ apiHost, apiKey, proxy, id, format, project: projectId, filename }) => {
@@ -5583,7 +5162,7 @@ var RedirectDefinitionListModule = {
5583
5162
  command: "list",
5584
5163
  describe: "List of redirects",
5585
5164
  aliases: ["ls"],
5586
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23)))),
5165
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21))),
5587
5166
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5588
5167
  const fetch3 = nodeFetchProxy(proxy);
5589
5168
  const client = new UncachedRedirectClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5649,32 +5228,30 @@ function createRedirectDefinitionEngineDataSource({
5649
5228
  var RedirectDefinitionPullModule = {
5650
5229
  command: "pull <directory>",
5651
5230
  describe: "Pulls all redirects to local files in a directory",
5652
- builder: (yargs23) => withConfiguration(
5653
- withApiOptions(
5654
- withProjectOptions(
5655
- withDiffOptions(
5656
- yargs23.positional("directory", {
5657
- 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.",
5658
- type: "string"
5659
- }).option("format", {
5660
- alias: ["f"],
5661
- describe: "Output format",
5662
- default: "yaml",
5663
- choices: ["yaml", "json"],
5664
- type: "string"
5665
- }).option("what-if", {
5666
- alias: ["w"],
5667
- describe: "What-if mode reports what would be done but changes no files",
5668
- default: false,
5669
- type: "boolean"
5670
- }).option("mode", {
5671
- alias: ["m"],
5672
- 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',
5673
- choices: ["create", "createOrUpdate", "mirror"],
5674
- default: "mirror",
5675
- type: "string"
5676
- })
5677
- )
5231
+ builder: (yargs21) => withApiOptions(
5232
+ withProjectOptions(
5233
+ withDiffOptions(
5234
+ yargs21.positional("directory", {
5235
+ 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.",
5236
+ type: "string"
5237
+ }).option("format", {
5238
+ alias: ["f"],
5239
+ describe: "Output format",
5240
+ default: "yaml",
5241
+ choices: ["yaml", "json"],
5242
+ type: "string"
5243
+ }).option("what-if", {
5244
+ alias: ["w"],
5245
+ describe: "What-if mode reports what would be done but changes no files",
5246
+ default: false,
5247
+ type: "boolean"
5248
+ }).option("mode", {
5249
+ alias: ["m"],
5250
+ 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',
5251
+ choices: ["create", "createOrUpdate", "mirror"],
5252
+ default: "mirror",
5253
+ type: "string"
5254
+ })
5678
5255
  )
5679
5256
  )
5680
5257
  ),
@@ -5729,26 +5306,24 @@ import { UncachedRedirectClient as UncachedRedirectClient4 } from "@uniformdev/r
5729
5306
  var RedirectDefinitionPushModule = {
5730
5307
  command: "push <directory>",
5731
5308
  describe: "Pushes all redirects from files in a directory or package to Uniform",
5732
- builder: (yargs23) => withConfiguration(
5733
- withApiOptions(
5734
- withProjectOptions(
5735
- withDiffOptions(
5736
- yargs23.positional("directory", {
5737
- describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
5738
- type: "string"
5739
- }).option("what-if", {
5740
- alias: ["w"],
5741
- describe: "What-if mode reports what would be done but changes nothing",
5742
- default: false,
5743
- type: "boolean"
5744
- }).option("mode", {
5745
- alias: ["m"],
5746
- 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',
5747
- choices: ["create", "createOrUpdate", "mirror"],
5748
- default: "mirror",
5749
- type: "string"
5750
- })
5751
- )
5309
+ builder: (yargs21) => withApiOptions(
5310
+ withProjectOptions(
5311
+ withDiffOptions(
5312
+ yargs21.positional("directory", {
5313
+ describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
5314
+ type: "string"
5315
+ }).option("what-if", {
5316
+ alias: ["w"],
5317
+ describe: "What-if mode reports what would be done but changes nothing",
5318
+ default: false,
5319
+ type: "boolean"
5320
+ }).option("mode", {
5321
+ alias: ["m"],
5322
+ 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',
5323
+ choices: ["create", "createOrUpdate", "mirror"],
5324
+ default: "mirror",
5325
+ type: "string"
5326
+ })
5752
5327
  )
5753
5328
  )
5754
5329
  ),
@@ -5797,10 +5372,8 @@ var RedirectDefinitionRemoveModule = {
5797
5372
  command: "remove <id>",
5798
5373
  aliases: ["delete", "rm"],
5799
5374
  describe: "Delete a redirect",
5800
- builder: (yargs23) => withConfiguration(
5801
- withApiOptions(
5802
- withProjectOptions(yargs23.positional("id", { demandOption: true, describe: " UUID to delete" }))
5803
- )
5375
+ builder: (yargs21) => withApiOptions(
5376
+ withProjectOptions(yargs21.positional("id", { demandOption: true, describe: " UUID to delete" }))
5804
5377
  ),
5805
5378
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
5806
5379
  const fetch3 = nodeFetchProxy(proxy);
@@ -5815,11 +5388,9 @@ var RedirectDefinitionUpdateModule = {
5815
5388
  command: "update <filename>",
5816
5389
  aliases: ["put"],
5817
5390
  describe: "Insert or update a redirect",
5818
- builder: (yargs23) => withConfiguration(
5819
- withApiOptions(
5820
- withProjectOptions(
5821
- yargs23.positional("filename", { demandOption: true, describe: "Redirect file to put" })
5822
- )
5391
+ builder: (yargs21) => withApiOptions(
5392
+ withProjectOptions(
5393
+ yargs21.positional("filename", { demandOption: true, describe: "Redirect file to put" })
5823
5394
  )
5824
5395
  ),
5825
5396
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -5834,9 +5405,9 @@ var RedirectDefinitionUpdateModule = {
5834
5405
  var RedirectDefinitionModule = {
5835
5406
  command: "definition <command>",
5836
5407
  describe: "Commands for Redirect Definitions",
5837
- builder: (yargs23) => yargs23.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
5408
+ builder: (yargs21) => yargs21.command(RedirectDefinitionPullModule).command(RedirectDefinitionPushModule).command(RedirectDefinitionGetModule).command(RedirectDefinitionRemoveModule).command(RedirectDefinitionListModule).command(RedirectDefinitionUpdateModule).demandCommand(),
5838
5409
  handler: () => {
5839
- yargs19.help();
5410
+ yargs18.help();
5840
5411
  }
5841
5412
  };
5842
5413
 
@@ -5845,179 +5416,9 @@ var RedirectCommand = {
5845
5416
  command: "redirect <command>",
5846
5417
  aliases: ["red"],
5847
5418
  describe: "Uniform Redirect commands",
5848
- builder: (yargs23) => yargs23.command(RedirectDefinitionModule).demandCommand(),
5849
- handler: () => {
5850
- yargs20.showHelp();
5851
- }
5852
- };
5853
-
5854
- // src/commands/sync/index.ts
5855
- import yargs21 from "yargs";
5856
-
5857
- // src/commands/sync/commands/pull.ts
5858
- var SyncPullModule = {
5859
- command: "pull",
5860
- describe: "Pulls whole project to local files in a directory",
5861
- builder: (yargs23) => withConfiguration(
5862
- withApiOptions(
5863
- withProjectOptions(
5864
- withDiffOptions(
5865
- yargs23.option("what-if", {
5866
- alias: ["w"],
5867
- describe: "What-if mode reports what would be done but changes no files",
5868
- default: false,
5869
- type: "boolean"
5870
- })
5871
- )
5872
- )
5873
- )
5874
- ),
5875
- handler: async ({ serialization, ...otherParams }) => {
5876
- const config2 = serialization;
5877
- const enabledEntities = Object.entries({
5878
- category: CategoryPullModule,
5879
- dataType: DataTypePullModule,
5880
- quirk: QuirkPullModule,
5881
- test: TestPullModule,
5882
- signal: SignalPullModule,
5883
- enrichment: EnrichmentPullModule,
5884
- aggregate: AggregatePullModule,
5885
- component: ComponentPullModule,
5886
- pattern: PatternPullModule,
5887
- composition: CompositionPullModule,
5888
- projectMapDefinition: ProjectMapDefinitionPullModule,
5889
- projectMapNode: ProjectMapNodePullModule,
5890
- redirect: RedirectDefinitionPullModule
5891
- }).filter(([entityType]) => {
5892
- var _a, _b, _c, _d, _e, _f;
5893
- return Boolean((_a = config2.entitiesConfig) == null ? void 0 : _a[entityType]) && ((_c = (_b = config2.entitiesConfig) == null ? void 0 : _b[entityType]) == null ? void 0 : _c.disabled) !== true && ((_f = (_e = (_d = config2.entitiesConfig) == null ? void 0 : _d[entityType]) == null ? void 0 : _e.pull) == null ? void 0 : _f.disabled) !== true;
5894
- });
5895
- for (const [entityType, module3] of enabledEntities) {
5896
- await module3.handler({
5897
- ...otherParams,
5898
- state: 0,
5899
- format: getFormat(entityType, config2),
5900
- onlyCompositions: entityType === "composition" ? true : void 0,
5901
- onlyPatterns: entityType === "pattern" ? true : void 0,
5902
- mode: getPullMode(entityType, config2),
5903
- directory: getPullFilename(entityType, config2)
5904
- });
5905
- }
5906
- }
5907
- };
5908
- var getPullMode = (entityType, config2) => {
5909
- return getEntityOption({
5910
- optionName: "mode",
5911
- operation: "pull",
5912
- config: config2,
5913
- entityType
5914
- });
5915
- };
5916
- var getPullFilename = (entityType, config2) => {
5917
- return getDirectoryOrFilename({
5918
- operation: "pull",
5919
- config: config2,
5920
- entityType
5921
- });
5922
- };
5923
- var getFormat = (entityType, config2) => {
5924
- return getEntityOption({
5925
- optionName: "format",
5926
- operation: "pull",
5927
- config: config2,
5928
- entityType
5929
- });
5930
- };
5931
-
5932
- // src/commands/sync/commands/push.ts
5933
- var SyncPushModule = {
5934
- command: "push",
5935
- describe: "Pushes whole project data from files in a directory or package to Uniform",
5936
- builder: (yargs23) => withConfiguration(
5937
- withApiOptions(
5938
- withProjectOptions(
5939
- withDiffOptions(
5940
- yargs23.option("what-if", {
5941
- alias: ["w"],
5942
- describe: "What-if mode reports what would be done but changes nothing",
5943
- default: false,
5944
- type: "boolean"
5945
- })
5946
- )
5947
- )
5948
- )
5949
- ),
5950
- handler: async ({ serialization, ...otherParams }) => {
5951
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
5952
- const config2 = serialization;
5953
- const enabledEntities = Object.entries({
5954
- category: CategoryPushModule,
5955
- dataType: DataTypePushModule,
5956
- quirk: QuirkPushModule,
5957
- test: TestPushModule,
5958
- signal: SignalPushModule,
5959
- enrichment: EnrichmentPushModule,
5960
- aggregate: AggregatePushModule,
5961
- component: ComponentPushModule,
5962
- pattern: PatternPushModule,
5963
- composition: CompositionPushModule,
5964
- projectMapDefinition: ProjectMapDefinitionPushModule,
5965
- projectMapNode: ProjectMapNodePushModule,
5966
- redirect: RedirectDefinitionPushModule
5967
- }).filter(([entityType]) => {
5968
- var _a2, _b2, _c2, _d2, _e2, _f2;
5969
- return Boolean((_a2 = config2.entitiesConfig) == null ? void 0 : _a2[entityType]) && ((_c2 = (_b2 = config2.entitiesConfig) == null ? void 0 : _b2[entityType]) == null ? void 0 : _c2.disabled) !== true && ((_f2 = (_e2 = (_d2 = config2.entitiesConfig) == null ? void 0 : _d2[entityType]) == null ? void 0 : _e2.push) == null ? void 0 : _f2.disabled) !== true;
5970
- });
5971
- for (const [entityType, module3] of enabledEntities) {
5972
- await module3.handler({
5973
- ...otherParams,
5974
- state: 0,
5975
- format: getFormat2(entityType, config2),
5976
- onlyCompositions: entityType === "composition" ? true : void 0,
5977
- onlyPatterns: entityType === "pattern" ? true : void 0,
5978
- mode: getPushMode(entityType, config2),
5979
- directory: getPushFilename(entityType, config2)
5980
- });
5981
- }
5982
- if (((_a = config2.entitiesConfig) == null ? void 0 : _a.pattern) && ((_d = (_c = (_b = config2.entitiesConfig) == null ? void 0 : _b.pattern) == null ? void 0 : _c.push) == null ? void 0 : _d.disabled) !== true && ((_f = (_e = config2.entitiesConfig) == null ? void 0 : _e.pattern) == null ? void 0 : _f.publish)) {
5983
- await PatternPublishModule.handler({ ...otherParams, all: true });
5984
- }
5985
- if (((_g = config2.entitiesConfig) == null ? void 0 : _g.composition) && ((_j = (_i = (_h = config2.entitiesConfig) == null ? void 0 : _h.composition) == null ? void 0 : _i.push) == null ? void 0 : _j.disabled) !== true && ((_l = (_k = config2.entitiesConfig) == null ? void 0 : _k.composition) == null ? void 0 : _l.publish)) {
5986
- await CompositionPublishModule.handler({ ...otherParams, all: true });
5987
- }
5988
- }
5989
- };
5990
- var getPushMode = (entityType, config2) => {
5991
- return getEntityOption({
5992
- optionName: "mode",
5993
- operation: "push",
5994
- config: config2,
5995
- entityType
5996
- });
5997
- };
5998
- var getPushFilename = (entityType, config2) => {
5999
- return getDirectoryOrFilename({
6000
- operation: "push",
6001
- config: config2,
6002
- entityType
6003
- });
6004
- };
6005
- var getFormat2 = (entityType, config2) => {
6006
- return getEntityOption({
6007
- optionName: "format",
6008
- operation: "push",
6009
- config: config2,
6010
- entityType
6011
- });
6012
- };
6013
-
6014
- // src/commands/sync/index.ts
6015
- var SyncCommand = {
6016
- command: "sync <command>",
6017
- describe: "Uniform Sync commands",
6018
- builder: (yargs23) => yargs23.command(SyncPullModule).command(SyncPushModule).demandCommand(),
5419
+ builder: (yargs21) => yargs21.command(RedirectDefinitionModule).demandCommand(),
6019
5420
  handler: () => {
6020
- yargs21.showHelp();
5421
+ yargs19.showHelp();
6021
5422
  }
6022
5423
  };
6023
5424
 
@@ -6133,30 +5534,9 @@ First found was: v${firstVersion}`;
6133
5534
 
6134
5535
  // src/index.ts
6135
5536
  dotenv.config();
6136
- var yarggery = yargs22(hideBin(process.argv));
6137
- var moduleName = "uniform";
6138
- var syncCosmicExplorer = cosmiconfigSync("uniform", {
6139
- searchPlaces: [`${moduleName}.config.js`, `${moduleName}.config.ts`, `${moduleName}.config.json`],
6140
- loaders: {
6141
- ".ts": TypeScriptLoader()
6142
- }
6143
- });
6144
- var searchedForm = syncCosmicExplorer.search();
6145
- var cosmicConfig = applyDefaultSyncConfiguration((searchedForm == null ? void 0 : searchedForm.config) ?? {});
5537
+ var yarggery = yargs20(hideBin(process.argv));
6146
5538
  yarggery.option("verbose", {
6147
5539
  describe: "Include verbose logging",
6148
5540
  default: false,
6149
5541
  type: "boolean"
6150
- }).scriptName("uniform").config(cosmicConfig).config("config", function(configPath) {
6151
- if (!fs5.existsSync(configPath)) {
6152
- throw new Error(`Invalid configuration file path: ${configPath}. File does not exist.`);
6153
- }
6154
- const config2 = syncCosmicExplorer.load(configPath);
6155
- if (!(config2 == null ? void 0 : config2.config.serialization)) {
6156
- throw new Error(
6157
- `Invalid configuration file: ${configPath}. Missing config.serialization configuration.`
6158
- );
6159
- }
6160
- const configuration = applyDefaultSyncConfiguration((config2 == null ? void 0 : config2.config) ?? {});
6161
- return { serialization: configuration.serialization };
6162
- }).command(CanvasCommand).command(ContextCommand).command(ProjectMapCommand).command(RedirectCommand).command(SyncCommand).command(NewCmd).command(NewMeshCmd).command(OptimizeCommand).demandCommand(1, "").strict().help().middleware([checkForUpdateMiddleware, checkLocalDepsVersions]).argv;
5542
+ }).command(CanvasCommand).command(ContextCommand).command(ProjectMapCommand).command(RedirectCommand).command(NewCmd).command(NewMeshCmd).command(OptimizeCommand).demandCommand(1, "").strict().help().middleware([checkForUpdateMiddleware, checkLocalDepsVersions]).argv;