@uniformdev/cli 19.38.3-alpha.70 → 19.39.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,70 +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
- filename: "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.filename[mergedConfig.serialization.filename.length - 1] === "/" ? "" : "/";
252
- mergedConfig.serialization.entitiesConfig[entityTypeCasted].filename = `${mergedConfig.serialization.filename}${separator}${entityTypeCasted}`;
253
- }
254
- }
255
- return mergedConfig;
256
- };
257
- var getEntityOption = ({
258
- optionName,
259
- config: config2,
260
- entityType,
261
- operation
262
- }) => {
263
- var _a, _b, _c, _d, _e, _f;
264
- if ((_b = (_a = config2.entitiesConfig[entityType]) == null ? void 0 : _a[operation]) == null ? void 0 : _b[optionName]) {
265
- return (_d = (_c = config2.entitiesConfig[entityType]) == null ? void 0 : _c[operation]) == null ? void 0 : _d[optionName];
266
- }
267
- if ((_e = config2.entitiesConfig[entityType]) == null ? void 0 : _e[optionName]) {
268
- return (_f = config2.entitiesConfig[entityType]) == null ? void 0 : _f[optionName];
269
- }
270
- if (config2[optionName]) {
271
- return config2[optionName];
272
- }
273
- throw `No ${optionName} option specified for ${entityType} ${operation}`;
274
- };
275
- var getDirectoryOrFilename = ({
276
- config: config2,
277
- entityType,
278
- operation
279
- }) => {
280
- var _a, _b, _c, _d, _e, _f;
281
- if ((_b = (_a = config2.entitiesConfig[entityType]) == null ? void 0 : _a[operation]) == null ? void 0 : _b.filename) {
282
- return (_d = (_c = config2.entitiesConfig[entityType]) == null ? void 0 : _c[operation]) == null ? void 0 : _d.filename;
283
- }
284
- if ((_e = config2.entitiesConfig[entityType]) == null ? void 0 : _e.filename) {
285
- return (_f = config2.entitiesConfig[entityType]) == null ? void 0 : _f.filename;
286
- }
287
- const isPackage = isPathAPackageFile(config2.filename);
288
- if (isPackage) {
289
- return config2.filename;
290
- }
291
- return `${config2.filename}/${entityType}`;
292
- };
293
220
 
294
221
  // src/sync/fileSyncEngineDataSource.ts
295
222
  async function createFileSyncEngineDataSource({
@@ -548,13 +475,9 @@ function createSyncEngineConsoleLogger(options) {
548
475
  var CategoryGetModule = {
549
476
  command: "get <id>",
550
477
  describe: "Fetch a category",
551
- builder: (yargs23) => withConfiguration(
552
- withFormatOptions(
553
- withApiOptions(
554
- withProjectOptions(
555
- yargs23.positional("id", { demandOption: true, describe: "Category UUID to fetch" })
556
- )
557
- )
478
+ builder: (yargs21) => withFormatOptions(
479
+ withApiOptions(
480
+ withProjectOptions(yargs21.positional("id", { demandOption: true, describe: "Category UUID to fetch" }))
558
481
  )
559
482
  ),
560
483
  handler: async ({ apiHost, apiKey, proxy, id, format, project: projectId, filename }) => {
@@ -577,7 +500,7 @@ var CategoryListModule = {
577
500
  command: "list",
578
501
  describe: "List categories",
579
502
  aliases: ["ls"],
580
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23.options({}))))),
503
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21.options({})))),
581
504
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
582
505
  const fetch3 = nodeFetchProxy(proxy);
583
506
  const client = new UncachedCategoryClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -634,32 +557,30 @@ function writeCanvasPackage(filename, packageContents) {
634
557
  var CategoryPullModule = {
635
558
  command: "pull <directory>",
636
559
  describe: "Pulls all categories to local files in a directory",
637
- builder: (yargs23) => withConfiguration(
638
- withApiOptions(
639
- withProjectOptions(
640
- withDiffOptions(
641
- yargs23.positional("directory", {
642
- 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.",
643
- type: "string"
644
- }).option("format", {
645
- alias: ["f"],
646
- describe: "Output format",
647
- default: "yaml",
648
- choices: ["yaml", "json"],
649
- type: "string"
650
- }).option("what-if", {
651
- alias: ["w"],
652
- describe: "What-if mode reports what would be done but changes no files",
653
- default: false,
654
- type: "boolean"
655
- }).option("mode", {
656
- alias: ["m"],
657
- 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',
658
- choices: ["create", "createOrUpdate", "mirror"],
659
- default: "mirror",
660
- type: "string"
661
- })
662
- )
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
+ })
663
584
  )
664
585
  )
665
586
  ),
@@ -713,26 +634,24 @@ import { UncachedCategoryClient as UncachedCategoryClient4 } from "@uniformdev/c
713
634
  var CategoryPushModule = {
714
635
  command: "push <directory>",
715
636
  describe: "Pushes all categories from files in a directory to Uniform Canvas",
716
- builder: (yargs23) => withConfiguration(
717
- withApiOptions(
718
- withProjectOptions(
719
- withDiffOptions(
720
- yargs23.positional("directory", {
721
- describe: "Directory to read the categories from. If a filename is used, a package will be read instead.",
722
- type: "string"
723
- }).option("what-if", {
724
- alias: ["w"],
725
- describe: "What-if mode reports what would be done but changes nothing",
726
- default: false,
727
- type: "boolean"
728
- }).option("mode", {
729
- alias: ["m"],
730
- 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',
731
- choices: ["create", "createOrUpdate", "mirror"],
732
- default: "mirror",
733
- type: "string"
734
- })
735
- )
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
+ })
736
655
  )
737
656
  )
738
657
  ),
@@ -781,12 +700,8 @@ var CategoryRemoveModule = {
781
700
  command: "remove <id>",
782
701
  aliases: ["delete", "rm"],
783
702
  describe: "Delete a category",
784
- builder: (yargs23) => withConfiguration(
785
- withApiOptions(
786
- withProjectOptions(
787
- yargs23.positional("id", { demandOption: true, describe: "Category UUID to delete" })
788
- )
789
- )
703
+ builder: (yargs21) => withApiOptions(
704
+ withProjectOptions(yargs21.positional("id", { demandOption: true, describe: "Category UUID to delete" }))
790
705
  ),
791
706
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
792
707
  const fetch3 = nodeFetchProxy(proxy);
@@ -801,11 +716,9 @@ var CategoryUpdateModule = {
801
716
  command: "update <filename>",
802
717
  aliases: ["put"],
803
718
  describe: "Insert or update a category",
804
- builder: (yargs23) => withConfiguration(
805
- withApiOptions(
806
- withProjectOptions(
807
- yargs23.positional("filename", { demandOption: true, describe: "Category file to put" })
808
- )
719
+ builder: (yargs21) => withApiOptions(
720
+ withProjectOptions(
721
+ yargs21.positional("filename", { demandOption: true, describe: "Category file to put" })
809
722
  )
810
723
  ),
811
724
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -821,7 +734,7 @@ var CategoryModule = {
821
734
  command: "category <command>",
822
735
  aliases: ["cat"],
823
736
  describe: "Commands for Canvas categories",
824
- 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(),
825
738
  handler: () => {
826
739
  yargs.help();
827
740
  }
@@ -842,15 +755,10 @@ var selectSchemaUrl = () => "/schemas/json-schema/component-definition/v1.json";
842
755
  var ComponentGetModule = {
843
756
  command: "get <id>",
844
757
  describe: "Fetch a component definition",
845
- builder: (yargs23) => withConfiguration(
846
- withFormatOptions(
847
- withApiOptions(
848
- withProjectOptions(
849
- yargs23.positional("id", {
850
- demandOption: true,
851
- describe: "Component definition public ID to fetch"
852
- })
853
- )
758
+ builder: (yargs21) => withFormatOptions(
759
+ withApiOptions(
760
+ withProjectOptions(
761
+ yargs21.positional("id", { demandOption: true, describe: "Component definition public ID to fetch" })
854
762
  )
855
763
  )
856
764
  ),
@@ -880,15 +788,13 @@ var ComponentListModule = {
880
788
  command: "list",
881
789
  describe: "List component definitions",
882
790
  aliases: ["ls"],
883
- builder: (yargs23) => withConfiguration(
884
- withFormatOptions(
885
- withApiOptions(
886
- withProjectOptions(
887
- yargs23.options({
888
- offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
889
- limit: { describe: "Number of rows to fetch", type: "number", default: 20 }
890
- })
891
- )
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
+ })
892
798
  )
893
799
  )
894
800
  ),
@@ -939,32 +845,30 @@ function createComponentDefinitionEngineDataSource({
939
845
  var ComponentPullModule = {
940
846
  command: "pull <directory>",
941
847
  describe: "Pulls all component definitions to local files in a directory",
942
- builder: (yargs23) => withConfiguration(
943
- withApiOptions(
944
- withProjectOptions(
945
- withDiffOptions(
946
- yargs23.positional("directory", {
947
- 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.",
948
- type: "string"
949
- }).option("format", {
950
- alias: ["f"],
951
- describe: "Output format",
952
- default: "yaml",
953
- choices: ["yaml", "json"],
954
- type: "string"
955
- }).option("what-if", {
956
- alias: ["w"],
957
- describe: "What-if mode reports what would be done but changes no files",
958
- default: false,
959
- type: "boolean"
960
- }).option("mode", {
961
- alias: ["m"],
962
- 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',
963
- choices: ["create", "createOrUpdate", "mirror"],
964
- default: "mirror",
965
- type: "string"
966
- })
967
- )
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
+ })
968
872
  )
969
873
  )
970
874
  ),
@@ -1019,26 +923,24 @@ import { UncachedCanvasClient as UncachedCanvasClient4 } from "@uniformdev/canva
1019
923
  var ComponentPushModule = {
1020
924
  command: "push <directory>",
1021
925
  describe: "Pushes all component definitions from files in a directory to Uniform Canvas",
1022
- builder: (yargs23) => withConfiguration(
1023
- withApiOptions(
1024
- withProjectOptions(
1025
- withDiffOptions(
1026
- yargs23.positional("directory", {
1027
- describe: "Directory to read the component definitions from. If a filename is used, a package will be read instead.",
1028
- type: "string"
1029
- }).option("what-if", {
1030
- alias: ["w"],
1031
- describe: "What-if mode reports what would be done but changes nothing",
1032
- default: false,
1033
- type: "boolean"
1034
- }).option("mode", {
1035
- alias: ["m"],
1036
- 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',
1037
- choices: ["create", "createOrUpdate", "mirror"],
1038
- default: "mirror",
1039
- type: "string"
1040
- })
1041
- )
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
+ })
1042
944
  )
1043
945
  )
1044
946
  ),
@@ -1088,11 +990,9 @@ var ComponentRemoveModule = {
1088
990
  command: "remove <id>",
1089
991
  aliases: ["delete", "rm"],
1090
992
  describe: "Delete a component definition",
1091
- builder: (yargs23) => withConfiguration(
1092
- withApiOptions(
1093
- withProjectOptions(
1094
- yargs23.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1095
- )
993
+ builder: (yargs21) => withApiOptions(
994
+ withProjectOptions(
995
+ yargs21.positional("id", { demandOption: true, describe: "Component definition public ID to delete" })
1096
996
  )
1097
997
  ),
1098
998
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -1108,11 +1008,9 @@ var ComponentUpdateModule = {
1108
1008
  command: "update <filename>",
1109
1009
  aliases: ["put"],
1110
1010
  describe: "Insert or update a component definition",
1111
- builder: (yargs23) => withConfiguration(
1112
- withApiOptions(
1113
- withProjectOptions(
1114
- yargs23.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1115
- )
1011
+ builder: (yargs21) => withApiOptions(
1012
+ withProjectOptions(
1013
+ yargs21.positional("filename", { demandOption: true, describe: "Component definition file to put" })
1116
1014
  )
1117
1015
  ),
1118
1016
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -1128,7 +1026,7 @@ var ComponentModule = {
1128
1026
  command: "component <command>",
1129
1027
  aliases: ["def"],
1130
1028
  describe: "Commands for Canvas component definitions",
1131
- 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(),
1132
1030
  handler: () => {
1133
1031
  yargs2.help();
1134
1032
  }
@@ -1150,8 +1048,8 @@ function prepCompositionForDisk(composition) {
1150
1048
  delete prepped.state;
1151
1049
  return prepped;
1152
1050
  }
1153
- function withStateOptions(yargs23) {
1154
- return yargs23.option("state", {
1051
+ function withStateOptions(yargs21) {
1052
+ return yargs21.option("state", {
1155
1053
  type: "string",
1156
1054
  describe: `Composition state to fetch.`,
1157
1055
  choices: ["preview", "published"],
@@ -1176,39 +1074,37 @@ function convertCompositionState(state) {
1176
1074
  var CompositionGetModule = {
1177
1075
  command: "get <id>",
1178
1076
  describe: "Fetch a composition",
1179
- builder: (yargs23) => withFormatOptions(
1180
- withConfiguration(
1181
- withApiOptions(
1182
- withProjectOptions(
1183
- withStateOptions(
1184
- yargs23.positional("id", { demandOption: true, describe: "Composition/pattern public ID to fetch" }).option({
1185
- resolvePatterns: {
1186
- type: "boolean",
1187
- default: false,
1188
- describe: "Resolve pattern references in the composition"
1189
- },
1190
- resolveOverrides: {
1191
- type: "boolean",
1192
- default: false,
1193
- describe: "Resolves pattern overrides in the composition and removes override definition data"
1194
- },
1195
- componentIDs: {
1196
- type: "boolean",
1197
- default: false,
1198
- describe: "Include individual component UIDs"
1199
- },
1200
- resolveData: {
1201
- type: "boolean",
1202
- default: false,
1203
- describe: "Resolve all data resources used by the composition/pattern"
1204
- },
1205
- diagnostics: {
1206
- type: "boolean",
1207
- default: false,
1208
- describe: "Include diagnostics information when resolving data"
1209
- }
1210
- })
1211
- )
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
+ })
1212
1108
  )
1213
1109
  )
1214
1110
  )
@@ -1252,42 +1148,29 @@ var CompositionListModule = {
1252
1148
  command: "list",
1253
1149
  describe: "List compositions",
1254
1150
  aliases: ["ls"],
1255
- builder: (yargs23) => withFormatOptions(
1256
- withConfiguration(
1257
- withApiOptions(
1258
- withProjectOptions(
1259
- withStateOptions(
1260
- yargs23.options({
1261
- offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
1262
- limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
1263
- resolvePatterns: {
1264
- type: "boolean",
1265
- default: false,
1266
- describe: "Resolve pattern references in the composition"
1267
- },
1268
- resolveOverrides: {
1269
- type: "boolean",
1270
- default: false,
1271
- describe: "Resolves pattern overrides in the composition and removes override definition data"
1272
- },
1273
- onlyCompositions: {
1274
- describe: "Only pulling compositions and not patterns",
1275
- default: false,
1276
- type: "boolean"
1277
- },
1278
- onlyPatterns: {
1279
- describe: "Only pulling patterns and not compositions",
1280
- default: false,
1281
- type: "boolean",
1282
- hidden: true
1283
- },
1284
- componentIDs: {
1285
- type: "boolean",
1286
- default: false,
1287
- describe: "Include individual component UIDs"
1288
- }
1289
- })
1290
- )
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
+ })
1291
1174
  )
1292
1175
  )
1293
1176
  )
@@ -1300,8 +1183,6 @@ var CompositionListModule = {
1300
1183
  offset,
1301
1184
  format,
1302
1185
  filename,
1303
- onlyCompositions,
1304
- onlyPatterns,
1305
1186
  project: projectId,
1306
1187
  state,
1307
1188
  resolvePatterns,
@@ -1313,7 +1194,6 @@ var CompositionListModule = {
1313
1194
  const res = await client.getCompositionList({
1314
1195
  limit,
1315
1196
  offset,
1316
- pattern: onlyCompositions ? false : onlyPatterns ? true : void 0,
1317
1197
  state: convertCompositionState(state),
1318
1198
  skipPatternResolution: !resolvePatterns,
1319
1199
  withComponentIDs: componentIDs,
@@ -1334,8 +1214,6 @@ var selectDisplayName3 = (component) => `${component.composition._name ?? compon
1334
1214
  function createComponentInstanceEngineDataSource({
1335
1215
  client,
1336
1216
  state,
1337
- onlyCompositions,
1338
- onlyPatterns,
1339
1217
  ...clientOptions
1340
1218
  }) {
1341
1219
  const stateId = convertCompositionState(state);
@@ -1345,7 +1223,6 @@ function createComponentInstanceEngineDataSource({
1345
1223
  ...clientOptions,
1346
1224
  limit,
1347
1225
  offset,
1348
- pattern: onlyCompositions ? false : onlyPatterns ? true : void 0,
1349
1226
  state: stateId,
1350
1227
  skipPatternResolution: true,
1351
1228
  skipOverridesResolution: true,
@@ -1376,36 +1253,43 @@ function createComponentInstanceEngineDataSource({
1376
1253
 
1377
1254
  // src/commands/canvas/commands/composition/publish.ts
1378
1255
  var CompositionPublishModule = {
1379
- command: "publish [ids]",
1256
+ command: "publish [compositionIDs]",
1380
1257
  describe: "Publishes compositions",
1381
- builder: (yargs23) => withConfiguration(
1382
- withApiOptions(
1383
- withProjectOptions(
1384
- withDiffOptions(
1385
- yargs23.positional("ids", {
1386
- describe: "Publishes composition/pattern(s) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
1387
- type: "string"
1388
- }).option("all", {
1389
- alias: ["a"],
1390
- describe: "Publishes all compositions. Use compositionId to publish one instead.",
1391
- default: false,
1392
- type: "boolean"
1393
- }).option("what-if", {
1394
- alias: ["w"],
1395
- describe: "What-if mode reports what would be done but does not perform any publishing",
1396
- default: false,
1397
- type: "boolean"
1398
- })
1399
- )
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
+ })
1400
1275
  )
1401
1276
  )
1402
1277
  ),
1403
- handler: async ({ apiHost, apiKey, proxy, ids, all, whatIf, project: projectId, diff: diffMode }) => {
1404
- 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) {
1405
1289
  console.error(`Specify --all or composition ID(s) to publish.`);
1406
1290
  process.exit(1);
1407
1291
  }
1408
- const compositionIDsArray = ids ? ids.split(",").map((id) => id.trim()) : void 0;
1292
+ const compositionIDsArray = compositionIDs ? compositionIDs.split(",").map((id) => id.trim()) : void 0;
1409
1293
  const fetch3 = nodeFetchProxy(proxy);
1410
1294
  const client = new UncachedCanvasClient9({ apiKey, apiHost, fetch: fetch3, projectId });
1411
1295
  const source = createComponentInstanceEngineDataSource({
@@ -1433,42 +1317,31 @@ import { UncachedCanvasClient as UncachedCanvasClient10 } from "@uniformdev/canv
1433
1317
  var CompositionPullModule = {
1434
1318
  command: "pull <directory>",
1435
1319
  describe: "Pulls all compositions to local files in a directory",
1436
- builder: (yargs23) => withConfiguration(
1437
- withApiOptions(
1438
- withProjectOptions(
1439
- withStateOptions(
1440
- withDiffOptions(
1441
- yargs23.positional("directory", {
1442
- 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.",
1443
- type: "string"
1444
- }).option("format", {
1445
- alias: ["f"],
1446
- describe: "Output format",
1447
- default: "yaml",
1448
- choices: ["yaml", "json"],
1449
- type: "string"
1450
- }).option("onlyCompositions", {
1451
- describe: "Only pulling compositions and not patterns",
1452
- default: false,
1453
- type: "boolean"
1454
- }).option("onlyPatterns", {
1455
- describe: "Only pulling patterns and not compositions",
1456
- default: false,
1457
- type: "boolean",
1458
- hidden: true
1459
- }).option("what-if", {
1460
- alias: ["w"],
1461
- describe: "What-if mode reports what would be done but changes no files",
1462
- default: false,
1463
- type: "boolean"
1464
- }).option("mode", {
1465
- alias: ["m"],
1466
- 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',
1467
- choices: ["create", "createOrUpdate", "mirror"],
1468
- default: "mirror",
1469
- type: "string"
1470
- })
1471
- )
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
+ })
1472
1345
  )
1473
1346
  )
1474
1347
  )
@@ -1479,8 +1352,6 @@ var CompositionPullModule = {
1479
1352
  proxy,
1480
1353
  directory,
1481
1354
  format,
1482
- onlyCompositions,
1483
- onlyPatterns,
1484
1355
  mode,
1485
1356
  whatIf,
1486
1357
  state,
@@ -1489,7 +1360,7 @@ var CompositionPullModule = {
1489
1360
  }) => {
1490
1361
  const fetch3 = nodeFetchProxy(proxy);
1491
1362
  const client = new UncachedCanvasClient10({ apiKey, apiHost, fetch: fetch3, projectId });
1492
- const source = createComponentInstanceEngineDataSource({ client, state, onlyCompositions, onlyPatterns });
1363
+ const source = createComponentInstanceEngineDataSource({ client, state });
1493
1364
  const isPackage = isPathAPackageFile(directory);
1494
1365
  let target;
1495
1366
  if (isPackage) {
@@ -1526,36 +1397,25 @@ import { UncachedCanvasClient as UncachedCanvasClient11 } from "@uniformdev/canv
1526
1397
  var CompositionPushModule = {
1527
1398
  command: "push <directory>",
1528
1399
  describe: "Pushes all compositions from files in a directory to Uniform Canvas",
1529
- builder: (yargs23) => withConfiguration(
1530
- withApiOptions(
1531
- withProjectOptions(
1532
- withStateOptions(
1533
- withDiffOptions(
1534
- yargs23.positional("directory", {
1535
- describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
1536
- type: "string"
1537
- }).option("what-if", {
1538
- alias: ["w"],
1539
- describe: "What-if mode reports what would be done but changes nothing",
1540
- default: false,
1541
- type: "boolean"
1542
- }).option("mode", {
1543
- alias: ["m"],
1544
- 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',
1545
- choices: ["create", "createOrUpdate", "mirror"],
1546
- default: "mirror",
1547
- type: "string"
1548
- }).option("onlyCompositions", {
1549
- describe: "Only pulling compositions and not patterns",
1550
- default: false,
1551
- type: "boolean"
1552
- }).option("onlyPatterns", {
1553
- describe: "Only pulling patterns and not compositions",
1554
- default: false,
1555
- type: "boolean",
1556
- hidden: true
1557
- })
1558
- )
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
+ })
1559
1419
  )
1560
1420
  )
1561
1421
  )
@@ -1569,8 +1429,6 @@ var CompositionPushModule = {
1569
1429
  whatIf,
1570
1430
  state,
1571
1431
  project: projectId,
1572
- onlyCompositions,
1573
- onlyPatterns,
1574
1432
  diff: diffMode
1575
1433
  }) => {
1576
1434
  const fetch3 = nodeFetchProxy(proxy);
@@ -1591,7 +1449,7 @@ var CompositionPushModule = {
1591
1449
  selectDisplayName: selectDisplayName3
1592
1450
  });
1593
1451
  }
1594
- const target = createComponentInstanceEngineDataSource({ client, state, onlyCompositions, onlyPatterns });
1452
+ const target = createComponentInstanceEngineDataSource({ client, state });
1595
1453
  await syncEngine({
1596
1454
  source,
1597
1455
  target,
@@ -1608,11 +1466,9 @@ var CompositionRemoveModule = {
1608
1466
  command: "remove <id>",
1609
1467
  aliases: ["delete", "rm"],
1610
1468
  describe: "Delete a composition",
1611
- builder: (yargs23) => withConfiguration(
1612
- withApiOptions(
1613
- withProjectOptions(
1614
- yargs23.positional("id", { demandOption: true, describe: "Composition/pattern public ID to delete" })
1615
- )
1469
+ builder: (yargs21) => withApiOptions(
1470
+ withProjectOptions(
1471
+ yargs21.positional("id", { demandOption: true, describe: "Composition public ID to delete" })
1616
1472
  )
1617
1473
  ),
1618
1474
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -1627,14 +1483,9 @@ import { CANVAS_PUBLISHED_STATE as CANVAS_PUBLISHED_STATE2, UncachedCanvasClient
1627
1483
  var CompositionUnpublishModule = {
1628
1484
  command: "unpublish <id>",
1629
1485
  describe: "Unpublish a composition",
1630
- builder: (yargs23) => withConfiguration(
1631
- withApiOptions(
1632
- withProjectOptions(
1633
- yargs23.positional("id", {
1634
- demandOption: true,
1635
- describe: "Composition/pattern public ID to unpublish"
1636
- })
1637
- )
1486
+ builder: (yargs21) => withApiOptions(
1487
+ withProjectOptions(
1488
+ yargs21.positional("id", { demandOption: true, describe: "Composition public ID to unpublish" })
1638
1489
  )
1639
1490
  ),
1640
1491
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -1650,12 +1501,10 @@ var CompositionUpdateModule = {
1650
1501
  command: "update <filename>",
1651
1502
  aliases: ["put"],
1652
1503
  describe: "Insert or update a composition",
1653
- builder: (yargs23) => withConfiguration(
1654
- withApiOptions(
1655
- withProjectOptions(
1656
- withStateOptions(
1657
- yargs23.positional("filename", { demandOption: true, describe: "Composition/pattern file to put" })
1658
- )
1504
+ builder: (yargs21) => withApiOptions(
1505
+ withProjectOptions(
1506
+ withStateOptions(
1507
+ yargs21.positional("filename", { demandOption: true, describe: "Composition file to put" })
1659
1508
  )
1660
1509
  )
1661
1510
  ),
@@ -1672,7 +1521,7 @@ var CompositionModule = {
1672
1521
  command: "composition <command>",
1673
1522
  describe: "Commands for Canvas compositions",
1674
1523
  aliases: ["comp"],
1675
- 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(),
1676
1525
  handler: () => {
1677
1526
  yargs3.help();
1678
1527
  }
@@ -1687,13 +1536,11 @@ var DataTypeGetModule = {
1687
1536
  command: "get <id>",
1688
1537
  describe: "Get a data type",
1689
1538
  aliases: ["ls"],
1690
- builder: (yargs23) => withConfiguration(
1691
- withFormatOptions(
1692
- withApiOptions(
1693
- withProjectOptions(
1694
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1695
- yargs23.positional("id", { demandOption: true, describe: "Data type public ID to fetch" })
1696
- )
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" })
1697
1544
  )
1698
1545
  )
1699
1546
  ),
@@ -1715,7 +1562,7 @@ var DataTypeListModule = {
1715
1562
  command: "list",
1716
1563
  describe: "List data types",
1717
1564
  aliases: ["ls"],
1718
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23)))),
1565
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21))),
1719
1566
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
1720
1567
  const fetch3 = nodeFetchProxy(proxy);
1721
1568
  const client = new DataTypeClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -1764,32 +1611,30 @@ function createDataTypeEngineDataSource({
1764
1611
  var DataTypePullModule = {
1765
1612
  command: "pull <directory>",
1766
1613
  describe: "Pulls all data types to local files in a directory",
1767
- builder: (yargs23) => withConfiguration(
1768
- withApiOptions(
1769
- withProjectOptions(
1770
- withDiffOptions(
1771
- yargs23.positional("directory", {
1772
- 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.",
1773
- type: "string"
1774
- }).option("format", {
1775
- alias: ["f"],
1776
- describe: "Output format",
1777
- default: "yaml",
1778
- choices: ["yaml", "json"],
1779
- type: "string"
1780
- }).option("what-if", {
1781
- alias: ["w"],
1782
- describe: "What-if mode reports what would be done but changes no files",
1783
- default: false,
1784
- type: "boolean"
1785
- }).option("mode", {
1786
- alias: ["m"],
1787
- 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',
1788
- choices: ["create", "createOrUpdate", "mirror"],
1789
- default: "mirror",
1790
- type: "string"
1791
- })
1792
- )
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
+ })
1793
1638
  )
1794
1639
  )
1795
1640
  ),
@@ -1849,26 +1694,24 @@ import { DataTypeClient as DataTypeClient4 } from "@uniformdev/canvas";
1849
1694
  var DataTypePushModule = {
1850
1695
  command: "push <directory>",
1851
1696
  describe: "Pushes all data types from files in a directory to Uniform",
1852
- builder: (yargs23) => withConfiguration(
1853
- withApiOptions(
1854
- withProjectOptions(
1855
- withDiffOptions(
1856
- yargs23.positional("directory", {
1857
- describe: "Directory to read the data types from. If a filename is used, a package will be read instead.",
1858
- type: "string"
1859
- }).option("what-if", {
1860
- alias: ["w"],
1861
- describe: "What-if mode reports what would be done but changes nothing",
1862
- default: false,
1863
- type: "boolean"
1864
- }).option("mode", {
1865
- alias: ["m"],
1866
- 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',
1867
- choices: ["create", "createOrUpdate", "mirror"],
1868
- default: "mirror",
1869
- type: "string"
1870
- })
1871
- )
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
+ })
1872
1715
  )
1873
1716
  )
1874
1717
  ),
@@ -1923,11 +1766,9 @@ var DataTypeRemoveModule = {
1923
1766
  command: "remove <id>",
1924
1767
  aliases: ["delete", "rm"],
1925
1768
  describe: "Delete a data type",
1926
- builder: (yargs23) => withConfiguration(
1927
- withApiOptions(
1928
- withProjectOptions(
1929
- yargs23.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
1930
- )
1769
+ builder: (yargs21) => withApiOptions(
1770
+ withProjectOptions(
1771
+ yargs21.positional("id", { demandOption: true, describe: "Data type public ID to delete" })
1931
1772
  )
1932
1773
  ),
1933
1774
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -1943,11 +1784,9 @@ var DataTypeUpdateModule = {
1943
1784
  command: "update <filename>",
1944
1785
  aliases: ["put"],
1945
1786
  describe: "Insert or update a data type",
1946
- builder: (yargs23) => withConfiguration(
1947
- withApiOptions(
1948
- withProjectOptions(
1949
- yargs23.positional("filename", { demandOption: true, describe: "Data type file to put" })
1950
- )
1787
+ builder: (yargs21) => withApiOptions(
1788
+ withProjectOptions(
1789
+ yargs21.positional("filename", { demandOption: true, describe: "Data type file to put" })
1951
1790
  )
1952
1791
  ),
1953
1792
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -1963,206 +1802,38 @@ var DataTypeModule = {
1963
1802
  command: "datatype <command>",
1964
1803
  aliases: ["dt"],
1965
1804
  describe: "Commands for Data Type definitions",
1966
- 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(),
1967
1806
  handler: () => {
1968
1807
  yargs4.help();
1969
1808
  }
1970
1809
  };
1971
1810
 
1972
- // src/commands/canvas/commands/pattern.ts
1973
- import yargs5 from "yargs";
1974
-
1975
- // src/commands/canvas/commands/pattern/get.ts
1976
- var PatternGetModule = {
1977
- ...CompositionGetModule,
1978
- describe: "Fetch a pattern"
1979
- };
1980
-
1981
- // src/commands/canvas/commands/pattern/list.ts
1982
- var PatternListModule = {
1983
- ...CompositionListModule,
1984
- describe: "List patterns",
1985
- builder: (yargs23) => withFormatOptions(
1986
- withConfiguration(
1987
- withApiOptions(
1988
- withProjectOptions(
1989
- withStateOptions(
1990
- yargs23.options({
1991
- offset: { describe: "Number of rows to skip before fetching", type: "number", default: 0 },
1992
- limit: { describe: "Number of rows to fetch", type: "number", default: 20 },
1993
- resolvePatterns: {
1994
- type: "boolean",
1995
- default: false,
1996
- describe: "Resolve pattern references in the composition"
1997
- },
1998
- resolveOverrides: {
1999
- type: "boolean",
2000
- default: false,
2001
- describe: "Resolves pattern overrides in the composition and removes override definition data"
2002
- },
2003
- onlyPatterns: {
2004
- describe: "Only pulling patterns and not compositions",
2005
- // This default differentiate this list command from composition list command
2006
- default: true,
2007
- type: "boolean",
2008
- hidden: true
2009
- },
2010
- componentIDs: {
2011
- alias: ["componentIDs"],
2012
- type: "boolean",
2013
- default: false,
2014
- describe: "Include individual component UIDs"
2015
- }
2016
- })
2017
- )
2018
- )
2019
- )
2020
- )
2021
- )
2022
- };
2023
-
2024
- // src/commands/canvas/commands/pattern/publish.ts
2025
- var PatternPublishModule = {
2026
- ...CompositionPublishModule,
2027
- describe: "Publishes patterns"
2028
- };
2029
-
2030
- // src/commands/canvas/commands/pattern/pull.ts
2031
- var PatternPullModule = {
2032
- ...CompositionPullModule,
2033
- describe: "Pulls all patterns to local files in a directory",
2034
- builder: (yargs23) => withConfiguration(
2035
- withApiOptions(
2036
- withProjectOptions(
2037
- withStateOptions(
2038
- withDiffOptions(
2039
- yargs23.positional("directory", {
2040
- 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.",
2041
- type: "string"
2042
- }).option("format", {
2043
- alias: ["f"],
2044
- describe: "Output format",
2045
- default: "yaml",
2046
- choices: ["yaml", "json"],
2047
- type: "string"
2048
- }).option("onlyPatterns", {
2049
- describe: "Only pulling patterns and not compositions",
2050
- // This default differentiate this list command from composition list command
2051
- default: true,
2052
- type: "boolean",
2053
- hidden: true
2054
- }).option("what-if", {
2055
- alias: ["w"],
2056
- describe: "What-if mode reports what would be done but changes no files",
2057
- default: false,
2058
- type: "boolean"
2059
- }).option("mode", {
2060
- alias: ["m"],
2061
- 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',
2062
- choices: ["create", "createOrUpdate", "mirror"],
2063
- default: "mirror",
2064
- type: "string"
2065
- })
2066
- )
2067
- )
2068
- )
2069
- )
2070
- )
2071
- };
2072
-
2073
- // src/commands/canvas/commands/pattern/push.ts
2074
- var PatternPushModule = {
2075
- ...CompositionPushModule,
2076
- describe: "Pushes all patterns from files in a directory to Uniform Canvas",
2077
- builder: (yargs23) => withConfiguration(
2078
- withApiOptions(
2079
- withProjectOptions(
2080
- withStateOptions(
2081
- withDiffOptions(
2082
- yargs23.positional("directory", {
2083
- describe: "Directory to read the compositions/patterns from. If a filename is used, a package will be read instead.",
2084
- type: "string"
2085
- }).option("what-if", {
2086
- alias: ["w"],
2087
- describe: "What-if mode reports what would be done but changes nothing",
2088
- default: false,
2089
- type: "boolean"
2090
- }).option("mode", {
2091
- alias: ["m"],
2092
- 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',
2093
- choices: ["create", "createOrUpdate", "mirror"],
2094
- default: "mirror",
2095
- type: "string"
2096
- }).option("onlyPatterns", {
2097
- describe: "Only pulling patterns and not compositions",
2098
- // This default differentiate this list command from composition list command
2099
- default: true,
2100
- type: "boolean",
2101
- hidden: true
2102
- })
2103
- )
2104
- )
2105
- )
2106
- )
2107
- )
2108
- };
2109
-
2110
- // src/commands/canvas/commands/pattern/remove.ts
2111
- var PatternRemoveModule = {
2112
- ...CompositionRemoveModule,
2113
- describe: "Delete a pattern"
2114
- };
2115
-
2116
- // src/commands/canvas/commands/pattern/unpublish.ts
2117
- var PatternUnpublishModule = {
2118
- ...CompositionUnpublishModule,
2119
- describe: "Unpublish a pattern"
2120
- };
2121
-
2122
- // src/commands/canvas/commands/pattern/update.ts
2123
- var PatternUpdateModule = {
2124
- ...CompositionUpdateModule,
2125
- describe: "Insert or update a pattern"
2126
- };
2127
-
2128
- // src/commands/canvas/commands/pattern.ts
2129
- var PatternModule = {
2130
- command: "pattern <command>",
2131
- describe: "Commands for Canvas patterns",
2132
- builder: (yargs23) => yargs23.command(PatternPullModule).command(PatternPushModule).command(PatternGetModule).command(PatternRemoveModule).command(PatternListModule).command(PatternUpdateModule).command(PatternPublishModule).command(PatternUnpublishModule).demandCommand(),
2133
- handler: () => {
2134
- yargs5.help();
2135
- }
2136
- };
2137
-
2138
1811
  // src/commands/canvas/index.ts
2139
1812
  var CanvasCommand = {
2140
1813
  command: "canvas <command>",
2141
1814
  aliases: ["cv", "pm", "presentation"],
2142
1815
  describe: "Uniform Canvas commands",
2143
- 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(),
2144
1817
  handler: () => {
2145
- yargs6.showHelp();
1818
+ yargs5.showHelp();
2146
1819
  }
2147
1820
  };
2148
1821
 
2149
1822
  // src/commands/context/index.ts
2150
- import yargs13 from "yargs";
1823
+ import yargs12 from "yargs";
2151
1824
 
2152
1825
  // src/commands/context/commands/aggregate.ts
2153
- import yargs7 from "yargs";
1826
+ import yargs6 from "yargs";
2154
1827
 
2155
1828
  // src/commands/context/commands/aggregate/get.ts
2156
1829
  import { UncachedAggregateClient } from "@uniformdev/context/api";
2157
1830
  var AggregateGetModule = {
2158
1831
  command: "get <id>",
2159
1832
  describe: "Fetch an aggregate",
2160
- builder: (yargs23) => withConfiguration(
2161
- withFormatOptions(
2162
- withApiOptions(
2163
- withProjectOptions(
2164
- yargs23.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
2165
- )
1833
+ builder: (yargs21) => withFormatOptions(
1834
+ withApiOptions(
1835
+ withProjectOptions(
1836
+ yargs21.positional("id", { demandOption: true, describe: "Aggregate public ID to fetch" })
2166
1837
  )
2167
1838
  )
2168
1839
  ),
@@ -2185,7 +1856,7 @@ var AggregateListModule = {
2185
1856
  command: "list",
2186
1857
  describe: "List aggregates",
2187
1858
  aliases: ["ls"],
2188
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23)))),
1859
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21))),
2189
1860
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2190
1861
  const fetch3 = nodeFetchProxy(proxy);
2191
1862
  const client = new UncachedAggregateClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -2251,32 +1922,30 @@ function writeContextPackage(filename, packageContents) {
2251
1922
  var AggregatePullModule = {
2252
1923
  command: "pull <directory>",
2253
1924
  describe: "Pulls all aggregates to local files in a directory",
2254
- builder: (yargs23) => withConfiguration(
2255
- withApiOptions(
2256
- withProjectOptions(
2257
- withDiffOptions(
2258
- yargs23.positional("directory", {
2259
- 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.",
2260
- type: "string"
2261
- }).option("format", {
2262
- alias: ["f"],
2263
- describe: "Output format",
2264
- default: "yaml",
2265
- choices: ["yaml", "json"],
2266
- type: "string"
2267
- }).option("what-if", {
2268
- alias: ["w"],
2269
- describe: "What-if mode reports what would be done but changes no files",
2270
- default: false,
2271
- type: "boolean"
2272
- }).option("mode", {
2273
- alias: ["m"],
2274
- 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',
2275
- choices: ["create", "createOrUpdate", "mirror"],
2276
- default: "mirror",
2277
- type: "string"
2278
- })
2279
- )
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
+ })
2280
1949
  )
2281
1950
  )
2282
1951
  ),
@@ -2330,26 +1999,24 @@ import { UncachedAggregateClient as UncachedAggregateClient4 } from "@uniformdev
2330
1999
  var AggregatePushModule = {
2331
2000
  command: "push <directory>",
2332
2001
  describe: "Pushes all aggregates from files in a directory or package to Uniform",
2333
- builder: (yargs23) => withConfiguration(
2334
- withApiOptions(
2335
- withProjectOptions(
2336
- withDiffOptions(
2337
- yargs23.positional("directory", {
2338
- describe: "Directory to read the aggregates from. If a filename is used, a package will be read instead.",
2339
- type: "string"
2340
- }).option("what-if", {
2341
- alias: ["w"],
2342
- describe: "What-if mode reports what would be done but changes nothing",
2343
- default: false,
2344
- type: "boolean"
2345
- }).option("mode", {
2346
- alias: ["m"],
2347
- 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',
2348
- choices: ["create", "createOrUpdate", "mirror"],
2349
- default: "mirror",
2350
- type: "string"
2351
- })
2352
- )
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
+ })
2353
2020
  )
2354
2021
  )
2355
2022
  ),
@@ -2399,11 +2066,9 @@ var AggregateRemoveModule = {
2399
2066
  command: "remove <id>",
2400
2067
  aliases: ["delete", "rm"],
2401
2068
  describe: "Delete an aggregate",
2402
- builder: (yargs23) => withConfiguration(
2403
- withApiOptions(
2404
- withProjectOptions(
2405
- yargs23.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
2406
- )
2069
+ builder: (yargs21) => withApiOptions(
2070
+ withProjectOptions(
2071
+ yargs21.positional("id", { demandOption: true, describe: "Aggregate public ID to delete" })
2407
2072
  )
2408
2073
  ),
2409
2074
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -2419,11 +2084,9 @@ var AggregateUpdateModule = {
2419
2084
  command: "update <filename>",
2420
2085
  aliases: ["put"],
2421
2086
  describe: "Insert or update an aggregate",
2422
- builder: (yargs23) => withConfiguration(
2423
- withApiOptions(
2424
- withProjectOptions(
2425
- yargs23.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
2426
- )
2087
+ builder: (yargs21) => withApiOptions(
2088
+ withProjectOptions(
2089
+ yargs21.positional("filename", { demandOption: true, describe: "Aggregate file to put" })
2427
2090
  )
2428
2091
  ),
2429
2092
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -2439,26 +2102,24 @@ var AggregateModule = {
2439
2102
  command: "aggregate <command>",
2440
2103
  aliases: ["agg", "intent", "audience"],
2441
2104
  describe: "Commands for Context aggregates (intents, audiences)",
2442
- 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(),
2443
2106
  handler: () => {
2444
- yargs7.help();
2107
+ yargs6.help();
2445
2108
  }
2446
2109
  };
2447
2110
 
2448
2111
  // src/commands/context/commands/enrichment.ts
2449
- import yargs8 from "yargs";
2112
+ import yargs7 from "yargs";
2450
2113
 
2451
2114
  // src/commands/context/commands/enrichment/get.ts
2452
2115
  import { UncachedEnrichmentClient } from "@uniformdev/context/api";
2453
2116
  var EnrichmentGetModule = {
2454
2117
  command: "get <id>",
2455
2118
  describe: "Fetch an enrichment category and its values",
2456
- builder: (yargs23) => withFormatOptions(
2457
- withConfiguration(
2458
- withApiOptions(
2459
- withProjectOptions(
2460
- yargs23.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
2461
- )
2119
+ builder: (yargs21) => withFormatOptions(
2120
+ withApiOptions(
2121
+ withProjectOptions(
2122
+ yargs21.positional("id", { demandOption: true, describe: "Enrichment category public ID to fetch" })
2462
2123
  )
2463
2124
  )
2464
2125
  ),
@@ -2482,7 +2143,7 @@ var EnrichmentListModule = {
2482
2143
  command: "list",
2483
2144
  describe: "List enrichments",
2484
2145
  aliases: ["ls"],
2485
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23)))),
2146
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21))),
2486
2147
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2487
2148
  const fetch3 = nodeFetchProxy(proxy);
2488
2149
  const client = new UncachedEnrichmentClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -2583,32 +2244,30 @@ var createEnrichmentValueEngineDataSource = ({
2583
2244
  var EnrichmentPullModule = {
2584
2245
  command: "pull <directory>",
2585
2246
  describe: "Pulls all enrichments to local files in a directory",
2586
- builder: (yargs23) => withConfiguration(
2587
- withApiOptions(
2588
- withProjectOptions(
2589
- withDiffOptions(
2590
- yargs23.positional("directory", {
2591
- 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.",
2592
- type: "string"
2593
- }).option("format", {
2594
- alias: ["f"],
2595
- describe: "Output format",
2596
- default: "yaml",
2597
- choices: ["yaml", "json"],
2598
- type: "string"
2599
- }).option("what-if", {
2600
- alias: ["w"],
2601
- describe: "What-if mode reports what would be done but changes no files",
2602
- default: false,
2603
- type: "boolean"
2604
- }).option("mode", {
2605
- alias: ["m"],
2606
- 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',
2607
- choices: ["create", "createOrUpdate", "mirror"],
2608
- default: "mirror",
2609
- type: "string"
2610
- })
2611
- )
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
+ })
2612
2271
  )
2613
2272
  )
2614
2273
  ),
@@ -2662,26 +2321,24 @@ import { UncachedEnrichmentClient as UncachedEnrichmentClient4 } from "@uniformd
2662
2321
  var EnrichmentPushModule = {
2663
2322
  command: "push <directory>",
2664
2323
  describe: "Pushes all enrichments from files in a directory or package to Uniform",
2665
- builder: (yargs23) => withConfiguration(
2666
- withApiOptions(
2667
- withProjectOptions(
2668
- withDiffOptions(
2669
- yargs23.positional("directory", {
2670
- describe: "Directory to read the enrichments from. If a filename is used, a package will be read instead.",
2671
- type: "string"
2672
- }).option("what-if", {
2673
- alias: ["w"],
2674
- describe: "What-if mode reports what would be done but changes nothing",
2675
- default: false,
2676
- type: "boolean"
2677
- }).option("mode", {
2678
- alias: ["m"],
2679
- 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',
2680
- choices: ["create", "createOrUpdate", "mirror"],
2681
- default: "mirror",
2682
- type: "string"
2683
- })
2684
- )
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
+ })
2685
2342
  )
2686
2343
  )
2687
2344
  ),
@@ -2730,11 +2387,9 @@ var EnrichmentRemoveModule = {
2730
2387
  command: "remove <id>",
2731
2388
  aliases: ["delete", "rm"],
2732
2389
  describe: "Delete an enrichment category and its values",
2733
- builder: (yargs23) => withConfiguration(
2734
- withApiOptions(
2735
- withProjectOptions(
2736
- yargs23.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
2737
- )
2390
+ builder: (yargs21) => withApiOptions(
2391
+ withProjectOptions(
2392
+ yargs21.positional("id", { demandOption: true, describe: "Enrichment category public ID to delete" })
2738
2393
  )
2739
2394
  ),
2740
2395
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -2749,14 +2404,14 @@ var EnrichmentModule = {
2749
2404
  command: "enrichment <command>",
2750
2405
  aliases: ["enr"],
2751
2406
  describe: "Commands for Context enrichments",
2752
- 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(),
2753
2408
  handler: () => {
2754
- yargs8.help();
2409
+ yargs7.help();
2755
2410
  }
2756
2411
  };
2757
2412
 
2758
2413
  // src/commands/context/commands/manifest.ts
2759
- import yargs9 from "yargs";
2414
+ import yargs8 from "yargs";
2760
2415
 
2761
2416
  // src/commands/context/commands/manifest/get.ts
2762
2417
  import { ApiClientError, UncachedManifestClient } from "@uniformdev/context/api";
@@ -2767,22 +2422,20 @@ var ManifestGetModule = {
2767
2422
  command: "get [output]",
2768
2423
  aliases: ["dl", "download"],
2769
2424
  describe: "Download the Uniform Context manifest for a project",
2770
- builder: (yargs23) => withConfiguration(
2771
- withApiOptions(
2772
- withProjectOptions(
2773
- yargs23.option("preview", {
2774
- describe: "If set, fetches the unpublished preview manifest (The API key must have permission)",
2775
- default: false,
2776
- type: "boolean",
2777
- alias: ["d"]
2778
- }).option("output", {
2779
- string: true,
2780
- alias: "o",
2781
- default: process.env.UNIFORM_MANIFEST_PATH,
2782
- describe: "Path to write manifest to. Defaults to UNIFORM_MANIFEST_PATH env if set.",
2783
- demandOption: true
2784
- })
2785
- )
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
+ })
2786
2439
  )
2787
2440
  ),
2788
2441
  handler: async ({ apiKey, apiHost, proxy, output, project, preview }) => {
@@ -2832,7 +2485,7 @@ import { exit as exit2 } from "process";
2832
2485
  var ManifestPublishModule = {
2833
2486
  command: "publish",
2834
2487
  describe: "Publish the Uniform Context manifest for a project",
2835
- builder: (yargs23) => withConfiguration(withApiOptions(withProjectOptions(yargs23))),
2488
+ builder: (yargs21) => withApiOptions(withProjectOptions(yargs21)),
2836
2489
  handler: async ({ apiKey, apiHost, proxy, project }) => {
2837
2490
  const fetch3 = nodeFetchProxy(proxy);
2838
2491
  try {
@@ -2865,26 +2518,24 @@ var ManifestModule = {
2865
2518
  command: "manifest <command>",
2866
2519
  describe: "Commands for context manifests",
2867
2520
  aliases: ["man"],
2868
- builder: (yargs23) => yargs23.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
2521
+ builder: (yargs21) => yargs21.command(ManifestGetModule).command(ManifestPublishModule).demandCommand(),
2869
2522
  handler: () => {
2870
- yargs9.help();
2523
+ yargs8.help();
2871
2524
  }
2872
2525
  };
2873
2526
 
2874
2527
  // src/commands/context/commands/quirk.ts
2875
- import yargs10 from "yargs";
2528
+ import yargs9 from "yargs";
2876
2529
 
2877
2530
  // src/commands/context/commands/quirk/get.ts
2878
2531
  import { UncachedQuirkClient } from "@uniformdev/context/api";
2879
2532
  var QuirkGetModule = {
2880
2533
  command: "get <id>",
2881
2534
  describe: "Fetch a quirk",
2882
- builder: (yargs23) => withConfiguration(
2883
- withFormatOptions(
2884
- withApiOptions(
2885
- withProjectOptions(
2886
- yargs23.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
2887
- )
2535
+ builder: (yargs21) => withFormatOptions(
2536
+ withApiOptions(
2537
+ withProjectOptions(
2538
+ yargs21.positional("id", { demandOption: true, describe: "Quirk public ID to fetch" })
2888
2539
  )
2889
2540
  )
2890
2541
  ),
@@ -2907,16 +2558,14 @@ var QuirkListModule = {
2907
2558
  command: "list",
2908
2559
  describe: "List quirks",
2909
2560
  aliases: ["ls"],
2910
- builder: (yargs23) => withConfiguration(
2911
- withFormatOptions(
2912
- withApiOptions(
2913
- withProjectOptions(
2914
- yargs23.option("withIntegrations", {
2915
- alias: ["i"],
2916
- describe: "Whether to include meta-quirks created by integrations in the list. Defaults to false.",
2917
- type: "boolean"
2918
- })
2919
- )
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
+ })
2920
2569
  )
2921
2570
  )
2922
2571
  ),
@@ -2968,32 +2617,30 @@ function createQuirkEngineDataSource({
2968
2617
  var QuirkPullModule = {
2969
2618
  command: "pull <directory>",
2970
2619
  describe: "Pulls all quirks to local files in a directory",
2971
- builder: (yargs23) => withConfiguration(
2972
- withApiOptions(
2973
- withProjectOptions(
2974
- withDiffOptions(
2975
- yargs23.positional("directory", {
2976
- 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.",
2977
- type: "string"
2978
- }).option("format", {
2979
- alias: ["f"],
2980
- describe: "Output format",
2981
- default: "yaml",
2982
- choices: ["yaml", "json"],
2983
- type: "string"
2984
- }).option("what-if", {
2985
- alias: ["w"],
2986
- describe: "What-if mode reports what would be done but changes no files",
2987
- default: false,
2988
- type: "boolean"
2989
- }).option("mode", {
2990
- alias: ["m"],
2991
- 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',
2992
- choices: ["create", "createOrUpdate", "mirror"],
2993
- default: "mirror",
2994
- type: "string"
2995
- })
2996
- )
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
+ })
2997
2644
  )
2998
2645
  )
2999
2646
  ),
@@ -3047,26 +2694,24 @@ import { UncachedQuirkClient as UncachedQuirkClient4 } from "@uniformdev/context
3047
2694
  var QuirkPushModule = {
3048
2695
  command: "push <directory>",
3049
2696
  describe: "Pushes all quirks from files in a directory or package to Uniform",
3050
- builder: (yargs23) => withConfiguration(
3051
- withApiOptions(
3052
- withProjectOptions(
3053
- withDiffOptions(
3054
- yargs23.positional("directory", {
3055
- describe: "Directory to read the quirks from. If a filename is used, a package will be read instead.",
3056
- type: "string"
3057
- }).option("what-if", {
3058
- alias: ["w"],
3059
- describe: "What-if mode reports what would be done but changes nothing",
3060
- default: false,
3061
- type: "boolean"
3062
- }).option("mode", {
3063
- alias: ["m"],
3064
- 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',
3065
- choices: ["create", "createOrUpdate", "mirror"],
3066
- default: "mirror",
3067
- type: "string"
3068
- })
3069
- )
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
+ })
3070
2715
  )
3071
2716
  )
3072
2717
  ),
@@ -3115,11 +2760,9 @@ var QuirkRemoveModule = {
3115
2760
  command: "remove <id>",
3116
2761
  aliases: ["delete", "rm"],
3117
2762
  describe: "Delete a quirk",
3118
- builder: (yargs23) => withConfiguration(
3119
- withApiOptions(
3120
- withProjectOptions(
3121
- yargs23.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
3122
- )
2763
+ builder: (yargs21) => withApiOptions(
2764
+ withProjectOptions(
2765
+ yargs21.positional("id", { demandOption: true, describe: "Quirk public ID to delete" })
3123
2766
  )
3124
2767
  ),
3125
2768
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -3135,12 +2778,8 @@ var QuirkUpdateModule = {
3135
2778
  command: "update <filename>",
3136
2779
  aliases: ["put"],
3137
2780
  describe: "Insert or update a quirk",
3138
- builder: (yargs23) => withConfiguration(
3139
- withApiOptions(
3140
- withProjectOptions(
3141
- yargs23.positional("filename", { demandOption: true, describe: "Quirk file to put" })
3142
- )
3143
- )
2781
+ builder: (yargs21) => withApiOptions(
2782
+ withProjectOptions(yargs21.positional("filename", { demandOption: true, describe: "Quirk file to put" }))
3144
2783
  ),
3145
2784
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
3146
2785
  const fetch3 = nodeFetchProxy(proxy);
@@ -3155,26 +2794,24 @@ var QuirkModule = {
3155
2794
  command: "quirk <command>",
3156
2795
  aliases: ["qk"],
3157
2796
  describe: "Commands for Context quirks",
3158
- 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(),
3159
2798
  handler: () => {
3160
- yargs10.help();
2799
+ yargs9.help();
3161
2800
  }
3162
2801
  };
3163
2802
 
3164
2803
  // src/commands/context/commands/signal.ts
3165
- import yargs11 from "yargs";
2804
+ import yargs10 from "yargs";
3166
2805
 
3167
2806
  // src/commands/context/commands/signal/get.ts
3168
2807
  import { UncachedSignalClient } from "@uniformdev/context/api";
3169
2808
  var SignalGetModule = {
3170
2809
  command: "get <id>",
3171
2810
  describe: "Fetch a signal",
3172
- builder: (yargs23) => withConfiguration(
3173
- withFormatOptions(
3174
- withApiOptions(
3175
- withProjectOptions(
3176
- yargs23.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
3177
- )
2811
+ builder: (yargs21) => withFormatOptions(
2812
+ withApiOptions(
2813
+ withProjectOptions(
2814
+ yargs21.positional("id", { demandOption: true, describe: "Signal public ID to fetch" })
3178
2815
  )
3179
2816
  )
3180
2817
  ),
@@ -3197,7 +2834,7 @@ var SignalListModule = {
3197
2834
  command: "list",
3198
2835
  describe: "List signals",
3199
2836
  aliases: ["ls"],
3200
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23)))),
2837
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21))),
3201
2838
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3202
2839
  const fetch3 = nodeFetchProxy(proxy);
3203
2840
  const client = new UncachedSignalClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -3246,32 +2883,30 @@ function createSignalEngineDataSource({
3246
2883
  var SignalPullModule = {
3247
2884
  command: "pull <directory>",
3248
2885
  describe: "Pulls all signals to local files in a directory",
3249
- builder: (yargs23) => withConfiguration(
3250
- withApiOptions(
3251
- withProjectOptions(
3252
- withDiffOptions(
3253
- yargs23.positional("directory", {
3254
- 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.",
3255
- type: "string"
3256
- }).option("format", {
3257
- alias: ["f"],
3258
- describe: "Output format",
3259
- default: "yaml",
3260
- choices: ["yaml", "json"],
3261
- type: "string"
3262
- }).option("what-if", {
3263
- alias: ["w"],
3264
- describe: "What-if mode reports what would be done but changes no files",
3265
- default: false,
3266
- type: "boolean"
3267
- }).option("mode", {
3268
- alias: ["m"],
3269
- 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',
3270
- choices: ["create", "createOrUpdate", "mirror"],
3271
- default: "mirror",
3272
- type: "string"
3273
- })
3274
- )
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
+ })
3275
2910
  )
3276
2911
  )
3277
2912
  ),
@@ -3325,26 +2960,24 @@ import { UncachedSignalClient as UncachedSignalClient4 } from "@uniformdev/conte
3325
2960
  var SignalPushModule = {
3326
2961
  command: "push <directory>",
3327
2962
  describe: "Pushes all signals from files in a directory or package to Uniform",
3328
- builder: (yargs23) => withConfiguration(
3329
- withApiOptions(
3330
- withProjectOptions(
3331
- withDiffOptions(
3332
- yargs23.positional("directory", {
3333
- describe: "Directory to read the signals from. If a filename is used, a package will be read instead.",
3334
- type: "string"
3335
- }).option("what-if", {
3336
- alias: ["w"],
3337
- describe: "What-if mode reports what would be done but changes nothing",
3338
- default: false,
3339
- type: "boolean"
3340
- }).option("mode", {
3341
- alias: ["m"],
3342
- 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',
3343
- choices: ["create", "createOrUpdate", "mirror"],
3344
- default: "mirror",
3345
- type: "string"
3346
- })
3347
- )
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
+ })
3348
2981
  )
3349
2982
  )
3350
2983
  ),
@@ -3393,11 +3026,9 @@ var SignalRemoveModule = {
3393
3026
  command: "remove <id>",
3394
3027
  aliases: ["delete", "rm"],
3395
3028
  describe: "Delete a signal",
3396
- builder: (yargs23) => withConfiguration(
3397
- withApiOptions(
3398
- withProjectOptions(
3399
- yargs23.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
3400
- )
3029
+ builder: (yargs21) => withApiOptions(
3030
+ withProjectOptions(
3031
+ yargs21.positional("id", { demandOption: true, describe: "Signal public ID to delete" })
3401
3032
  )
3402
3033
  ),
3403
3034
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -3413,12 +3044,8 @@ var SignalUpdateModule = {
3413
3044
  command: "update <filename>",
3414
3045
  aliases: ["put"],
3415
3046
  describe: "Insert or update a signal",
3416
- builder: (yargs23) => withConfiguration(
3417
- withApiOptions(
3418
- withProjectOptions(
3419
- yargs23.positional("filename", { demandOption: true, describe: "Signal file to put" })
3420
- )
3421
- )
3047
+ builder: (yargs21) => withApiOptions(
3048
+ withProjectOptions(yargs21.positional("filename", { demandOption: true, describe: "Signal file to put" }))
3422
3049
  ),
3423
3050
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
3424
3051
  const fetch3 = nodeFetchProxy(proxy);
@@ -3433,26 +3060,24 @@ var SignalModule = {
3433
3060
  command: "signal <command>",
3434
3061
  aliases: ["sig"],
3435
3062
  describe: "Commands for Context signals",
3436
- 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(),
3437
3064
  handler: () => {
3438
- yargs11.help();
3065
+ yargs10.help();
3439
3066
  }
3440
3067
  };
3441
3068
 
3442
3069
  // src/commands/context/commands/test.ts
3443
- import yargs12 from "yargs";
3070
+ import yargs11 from "yargs";
3444
3071
 
3445
3072
  // src/commands/context/commands/test/get.ts
3446
3073
  import { UncachedTestClient } from "@uniformdev/context/api";
3447
3074
  var TestGetModule = {
3448
3075
  command: "get <id>",
3449
3076
  describe: "Fetch a test",
3450
- builder: (yargs23) => withConfiguration(
3451
- withFormatOptions(
3452
- withApiOptions(
3453
- withProjectOptions(
3454
- yargs23.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
3455
- )
3077
+ builder: (yargs21) => withFormatOptions(
3078
+ withApiOptions(
3079
+ withProjectOptions(
3080
+ yargs21.positional("id", { demandOption: true, describe: "Test public ID to fetch" })
3456
3081
  )
3457
3082
  )
3458
3083
  ),
@@ -3475,7 +3100,7 @@ var TestListModule = {
3475
3100
  command: "list",
3476
3101
  describe: "List tests",
3477
3102
  aliases: ["ls"],
3478
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23)))),
3103
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21))),
3479
3104
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
3480
3105
  const fetch3 = nodeFetchProxy(proxy);
3481
3106
  const client = new UncachedTestClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -3524,32 +3149,30 @@ function createTestEngineDataSource({
3524
3149
  var TestPullModule = {
3525
3150
  command: "pull <directory>",
3526
3151
  describe: "Pulls all tests to local files in a directory",
3527
- builder: (yargs23) => withConfiguration(
3528
- withApiOptions(
3529
- withProjectOptions(
3530
- withDiffOptions(
3531
- yargs23.positional("directory", {
3532
- 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.",
3533
- type: "string"
3534
- }).option("format", {
3535
- alias: ["f"],
3536
- describe: "Output format",
3537
- default: "yaml",
3538
- choices: ["yaml", "json"],
3539
- type: "string"
3540
- }).option("what-if", {
3541
- alias: ["w"],
3542
- describe: "What-if mode reports what would be done but changes no files",
3543
- default: false,
3544
- type: "boolean"
3545
- }).option("mode", {
3546
- alias: ["m"],
3547
- describe: 'What kind of changes can be made. "create" = create new files, update nothing. "createOrUpdate" = create new files, update existing, delete nothing. "mirror" = create, update, and delete to mirror state',
3548
- choices: ["create", "createOrUpdate", "mirror"],
3549
- default: "mirror",
3550
- type: "string"
3551
- })
3552
- )
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
+ })
3553
3176
  )
3554
3177
  )
3555
3178
  ),
@@ -3603,26 +3226,24 @@ import { UncachedTestClient as UncachedTestClient4 } from "@uniformdev/context/a
3603
3226
  var TestPushModule = {
3604
3227
  command: "push <directory>",
3605
3228
  describe: "Pushes all tests from files in a directory or package to Uniform",
3606
- builder: (yargs23) => withConfiguration(
3607
- withApiOptions(
3608
- withProjectOptions(
3609
- withDiffOptions(
3610
- yargs23.positional("directory", {
3611
- describe: "Directory to read the tests from. If a filename is used, a package will be read instead.",
3612
- type: "string"
3613
- }).option("what-if", {
3614
- alias: ["w"],
3615
- describe: "What-if mode reports what would be done but changes nothing",
3616
- default: false,
3617
- type: "boolean"
3618
- }).option("mode", {
3619
- alias: ["m"],
3620
- 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',
3621
- choices: ["create", "createOrUpdate", "mirror"],
3622
- default: "mirror",
3623
- type: "string"
3624
- })
3625
- )
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
+ })
3626
3247
  )
3627
3248
  )
3628
3249
  ),
@@ -3671,12 +3292,8 @@ var TestRemoveModule = {
3671
3292
  command: "remove <id>",
3672
3293
  aliases: ["delete", "rm"],
3673
3294
  describe: "Delete a test",
3674
- builder: (yargs23) => withConfiguration(
3675
- withApiOptions(
3676
- withProjectOptions(
3677
- yargs23.positional("id", { demandOption: true, describe: "Test public ID to delete" })
3678
- )
3679
- )
3295
+ builder: (yargs21) => withApiOptions(
3296
+ withProjectOptions(yargs21.positional("id", { demandOption: true, describe: "Test public ID to delete" }))
3680
3297
  ),
3681
3298
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
3682
3299
  const fetch3 = nodeFetchProxy(proxy);
@@ -3690,11 +3307,9 @@ import { UncachedTestClient as UncachedTestClient6 } from "@uniformdev/context/a
3690
3307
  var TestUpdateModule = {
3691
3308
  command: "update <filename>",
3692
3309
  aliases: ["put"],
3693
- describe: "Insert or update a test",
3694
- builder: (yargs23) => withConfiguration(
3695
- withApiOptions(
3696
- withProjectOptions(yargs23.positional("filename", { demandOption: true, describe: "Test file to put" }))
3697
- )
3310
+ describe: "Insert or update a test",
3311
+ builder: (yargs21) => withApiOptions(
3312
+ withProjectOptions(yargs21.positional("filename", { demandOption: true, describe: "Test file to put" }))
3698
3313
  ),
3699
3314
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
3700
3315
  const fetch3 = nodeFetchProxy(proxy);
@@ -3708,9 +3323,9 @@ var TestUpdateModule = {
3708
3323
  var TestModule = {
3709
3324
  command: "test <command>",
3710
3325
  describe: "Commands for Context A/B tests",
3711
- 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(),
3712
3327
  handler: () => {
3713
- yargs12.help();
3328
+ yargs11.help();
3714
3329
  }
3715
3330
  };
3716
3331
 
@@ -3719,9 +3334,9 @@ var ContextCommand = {
3719
3334
  command: "context <command>",
3720
3335
  aliases: ["ctx"],
3721
3336
  describe: "Uniform Context commands",
3722
- 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(),
3723
3338
  handler: () => {
3724
- yargs13.showHelp();
3339
+ yargs12.showHelp();
3725
3340
  }
3726
3341
  };
3727
3342
 
@@ -3749,15 +3364,15 @@ import { PostHog } from "posthog-node";
3749
3364
  // package.json
3750
3365
  var package_default = {
3751
3366
  name: "@uniformdev/cli",
3752
- version: "19.38.2",
3367
+ version: "19.39.0",
3753
3368
  description: "Uniform command line interface tool",
3754
3369
  license: "SEE LICENSE IN LICENSE.txt",
3755
3370
  main: "./cli.js",
3756
- types: "./dist/index.d.mts",
3371
+ types: "./dist/index.d.ts",
3757
3372
  sideEffects: false,
3758
3373
  scripts: {
3759
3374
  uniform: "node ./cli.js",
3760
- build: "tsup",
3375
+ build: "tsc --noEmit && tsup",
3761
3376
  dev: "tsup --watch",
3762
3377
  clean: "rimraf dist",
3763
3378
  test: "jest --maxWorkers=1 --passWithNoTests",
@@ -3770,8 +3385,7 @@ var package_default = {
3770
3385
  "@uniformdev/project-map": "workspace:*",
3771
3386
  "@uniformdev/redirect": "workspace:*",
3772
3387
  colorette: "2.0.20",
3773
- cosmiconfig: "8.2.0",
3774
- "cosmiconfig-typescript-loader": "5.0.0",
3388
+ cosmiconfig: "^8.2.0",
3775
3389
  diff: "^5.0.0",
3776
3390
  dotenv: "^16.0.3",
3777
3391
  execa: "5.1.1",
@@ -4710,26 +4324,24 @@ var disableTelemetryDefault = !["", "0", "false", "no"].includes(
4710
4324
  );
4711
4325
  var NewCmd = {
4712
4326
  command: "new [name]",
4713
- builder: (y) => withConfiguration(
4714
- y.positional("name", {
4715
- describe: "Name of a project",
4716
- type: "string"
4717
- }).option("apiHost", {
4718
- describe: `Uniform host. Defaults to UNIFORM_CLI_BASE_URL env or ${stableApiHost}. Supports dotenv.`,
4719
- default: apiHostDefault,
4720
- demandOption: true,
4721
- type: "string"
4722
- }).option("outputPath", {
4723
- alias: "o",
4724
- description: "Specify where to store integration files. Defaults to cwd.",
4725
- type: "string"
4726
- }).option("disableTelemetry", {
4727
- describe: "By default, usage information is sent to Uniform. Use this option or set UNIFORM_CLI_DISABLE_TELEMETRY to disable telemetry.",
4728
- default: disableTelemetryDefault,
4729
- demandOption: true,
4730
- type: "boolean"
4731
- })
4732
- ),
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
+ }),
4733
4345
  describe: "Start a new Uniform project",
4734
4346
  handler: async function({ name, apiHost, outputPath, disableTelemetry }) {
4735
4347
  const { stopAllSpinners, spin } = makeSpinner();
@@ -4750,23 +4362,21 @@ var NewCmd = {
4750
4362
  };
4751
4363
  var NewMeshCmd = {
4752
4364
  command: "new-integration",
4753
- builder: (y) => withConfiguration(
4754
- y.option("apiHost", {
4755
- describe: `Uniform host. Defaults to UNIFORM_CLI_BASE_URL env or ${stableApiHost}. Supports dotenv.`,
4756
- default: apiHostDefault,
4757
- demandOption: true,
4758
- type: "string"
4759
- }).option("outputPath", {
4760
- alias: "o",
4761
- description: "Specify where to store integration files. Defaults to cwd.",
4762
- type: "string"
4763
- }).option("disableTelemetry", {
4764
- describe: "By default, usage information is sent to Uniform. Use this option or set UNIFORM_CLI_DISABLE_TELEMETRY to disable telemetry.",
4765
- default: disableTelemetryDefault,
4766
- demandOption: true,
4767
- type: "boolean"
4768
- })
4769
- ),
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
+ }),
4770
4380
  describe: "Start a new Uniform project",
4771
4381
  handler: async function({ apiHost, outputPath, disableTelemetry }) {
4772
4382
  const { stopAllSpinners, spin } = makeSpinner();
@@ -4787,10 +4397,10 @@ var NewMeshCmd = {
4787
4397
  };
4788
4398
 
4789
4399
  // src/commands/optimize/index.ts
4790
- import yargs15 from "yargs";
4400
+ import yargs14 from "yargs";
4791
4401
 
4792
4402
  // src/commands/optimize/manifest.ts
4793
- import yargs14 from "yargs";
4403
+ import yargs13 from "yargs";
4794
4404
 
4795
4405
  // src/commands/optimize/manifest/download.ts
4796
4406
  import { gray as gray4, green as green3, red as red5, yellow as yellow2 } from "colorette";
@@ -4805,7 +4415,7 @@ var UniformBaseUrl = "https://uniform.app";
4805
4415
  var module = {
4806
4416
  command: "download [output]",
4807
4417
  describe: "Download intent manifest",
4808
- builder: (yargs23) => yargs23.option("apiKey", {
4418
+ builder: (yargs21) => yargs21.option("apiKey", {
4809
4419
  alias: "k",
4810
4420
  demandOption: true,
4811
4421
  string: true,
@@ -4906,10 +4516,10 @@ var module2 = {
4906
4516
  command: "manifest <command>",
4907
4517
  describe: "Intent manifest commands",
4908
4518
  builder: () => {
4909
- return yargs14.command(download_default);
4519
+ return yargs13.command(download_default);
4910
4520
  },
4911
4521
  handler: () => {
4912
- yargs14.showHelp();
4522
+ yargs13.showHelp();
4913
4523
  }
4914
4524
  };
4915
4525
  var manifest_default = module2;
@@ -4920,30 +4530,28 @@ var OptimizeCommand = {
4920
4530
  aliases: ["opt"],
4921
4531
  describe: "Uniform Optimize commands",
4922
4532
  builder: () => {
4923
- return yargs15.command(manifest_default);
4533
+ return yargs14.command(manifest_default);
4924
4534
  },
4925
4535
  handler: () => {
4926
- yargs15.showHelp();
4536
+ yargs14.showHelp();
4927
4537
  }
4928
4538
  };
4929
4539
 
4930
4540
  // src/commands/project-map/index.ts
4931
- import yargs18 from "yargs";
4541
+ import yargs17 from "yargs";
4932
4542
 
4933
4543
  // src/commands/project-map/commands/projectMapDefinition.ts
4934
- import yargs16 from "yargs";
4544
+ import yargs15 from "yargs";
4935
4545
 
4936
4546
  // src/commands/project-map/commands/ProjectMapDefinition/get.ts
4937
4547
  import { UncachedProjectMapClient } from "@uniformdev/project-map";
4938
4548
  var ProjectMapDefinitionGetModule = {
4939
4549
  command: "get <id>",
4940
4550
  describe: "Fetch a project map",
4941
- builder: (yargs23) => withFormatOptions(
4942
- withConfiguration(
4943
- withApiOptions(
4944
- withProjectOptions(
4945
- yargs23.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
4946
- )
4551
+ builder: (yargs21) => withFormatOptions(
4552
+ withApiOptions(
4553
+ withProjectOptions(
4554
+ yargs21.positional("id", { demandOption: true, describe: "ProjectMap UUID to fetch" })
4947
4555
  )
4948
4556
  )
4949
4557
  ),
@@ -4966,7 +4574,7 @@ var ProjectMapDefinitionListModule = {
4966
4574
  command: "list",
4967
4575
  describe: "List of project maps",
4968
4576
  aliases: ["ls"],
4969
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23)))),
4577
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21))),
4970
4578
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
4971
4579
  const fetch3 = nodeFetchProxy(proxy);
4972
4580
  const client = new UncachedProjectMapClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5023,32 +4631,30 @@ function createProjectMapDefinitionEngineDataSource({
5023
4631
  var ProjectMapDefinitionPullModule = {
5024
4632
  command: "pull <directory>",
5025
4633
  describe: "Pulls all project maps to local files in a directory",
5026
- builder: (yargs23) => withConfiguration(
5027
- withApiOptions(
5028
- withProjectOptions(
5029
- withDiffOptions(
5030
- yargs23.positional("directory", {
5031
- 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.",
5032
- type: "string"
5033
- }).option("format", {
5034
- alias: ["f"],
5035
- describe: "Output format",
5036
- default: "yaml",
5037
- choices: ["yaml", "json"],
5038
- type: "string"
5039
- }).option("what-if", {
5040
- alias: ["w"],
5041
- describe: "What-if mode reports what would be done but changes no files",
5042
- default: false,
5043
- type: "boolean"
5044
- }).option("mode", {
5045
- alias: ["m"],
5046
- 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',
5047
- choices: ["create", "createOrUpdate", "mirror"],
5048
- default: "mirror",
5049
- type: "string"
5050
- })
5051
- )
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
+ })
5052
4658
  )
5053
4659
  )
5054
4660
  ),
@@ -5102,26 +4708,24 @@ import { UncachedProjectMapClient as UncachedProjectMapClient4 } from "@uniformd
5102
4708
  var ProjectMapDefinitionPushModule = {
5103
4709
  command: "push <directory>",
5104
4710
  describe: "Pushes all project maps from files in a directory or package to Uniform",
5105
- builder: (yargs23) => withConfiguration(
5106
- withApiOptions(
5107
- withProjectOptions(
5108
- withDiffOptions(
5109
- yargs23.positional("directory", {
5110
- describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
5111
- type: "string"
5112
- }).option("what-if", {
5113
- alias: ["w"],
5114
- describe: "What-if mode reports what would be done but changes nothing",
5115
- default: false,
5116
- type: "boolean"
5117
- }).option("mode", {
5118
- alias: ["m"],
5119
- 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',
5120
- choices: ["create", "createOrUpdate", "mirror"],
5121
- default: "mirror",
5122
- type: "string"
5123
- })
5124
- )
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
+ })
5125
4729
  )
5126
4730
  )
5127
4731
  ),
@@ -5170,10 +4774,8 @@ var ProjectMapDefinitionRemoveModule = {
5170
4774
  command: "remove <id>",
5171
4775
  aliases: ["delete", "rm"],
5172
4776
  describe: "Delete a project map",
5173
- builder: (yargs23) => withConfiguration(
5174
- withApiOptions(
5175
- withProjectOptions(yargs23.positional("id", { demandOption: true, describe: " UUID to delete" }))
5176
- )
4777
+ builder: (yargs21) => withApiOptions(
4778
+ withProjectOptions(yargs21.positional("id", { demandOption: true, describe: " UUID to delete" }))
5177
4779
  ),
5178
4780
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
5179
4781
  const fetch3 = nodeFetchProxy(proxy);
@@ -5188,11 +4790,9 @@ var ProjectMapDefinitionUpdateModule = {
5188
4790
  command: "update <filename>",
5189
4791
  aliases: ["put"],
5190
4792
  describe: "Insert or update a project map",
5191
- builder: (yargs23) => withConfiguration(
5192
- withApiOptions(
5193
- withProjectOptions(
5194
- yargs23.positional("filename", { demandOption: true, describe: "Project map file to put" })
5195
- )
4793
+ builder: (yargs21) => withApiOptions(
4794
+ withProjectOptions(
4795
+ yargs21.positional("filename", { demandOption: true, describe: "Project map file to put" })
5196
4796
  )
5197
4797
  ),
5198
4798
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -5207,26 +4807,24 @@ var ProjectMapDefinitionUpdateModule = {
5207
4807
  var ProjectMapDefinitionModule = {
5208
4808
  command: "definition <command>",
5209
4809
  describe: "Commands for ProjectMap Definitions",
5210
- 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(),
5211
4811
  handler: () => {
5212
- yargs16.help();
4812
+ yargs15.help();
5213
4813
  }
5214
4814
  };
5215
4815
 
5216
4816
  // src/commands/project-map/commands/projectMapNode.ts
5217
- import yargs17 from "yargs";
4817
+ import yargs16 from "yargs";
5218
4818
 
5219
4819
  // src/commands/project-map/commands/ProjectMapNode/get.ts
5220
4820
  import { UncachedProjectMapClient as UncachedProjectMapClient7 } from "@uniformdev/project-map";
5221
4821
  var ProjectMapNodeGetModule = {
5222
4822
  command: "get <id> <projectMapId>",
5223
4823
  describe: "Fetch a project map node",
5224
- builder: (yargs23) => withConfiguration(
5225
- withFormatOptions(
5226
- withApiOptions(
5227
- withProjectOptions(
5228
- yargs23.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to fetch" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
5229
- )
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" })
5230
4828
  )
5231
4829
  )
5232
4830
  ),
@@ -5251,15 +4849,10 @@ var ProjectMapNodeListModule = {
5251
4849
  command: "list <projectMapId>",
5252
4850
  describe: "List project map nodes",
5253
4851
  aliases: ["ls"],
5254
- builder: (yargs23) => withConfiguration(
5255
- withFormatOptions(
5256
- withApiOptions(
5257
- withProjectOptions(
5258
- yargs23.positional("projectMapId", {
5259
- demandOption: true,
5260
- describe: "ProjectMap UUID to fetch from"
5261
- })
5262
- )
4852
+ builder: (yargs21) => withFormatOptions(
4853
+ withApiOptions(
4854
+ withProjectOptions(
4855
+ yargs21.positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to fetch from" })
5263
4856
  )
5264
4857
  )
5265
4858
  ),
@@ -5326,32 +4919,30 @@ function createProjectMapNodeEngineDataSource({
5326
4919
  var ProjectMapNodePullModule = {
5327
4920
  command: "pull <directory>",
5328
4921
  describe: "Pulls all project maps nodes to local files in a directory",
5329
- builder: (yargs23) => withConfiguration(
5330
- withApiOptions(
5331
- withProjectOptions(
5332
- withDiffOptions(
5333
- yargs23.positional("directory", {
5334
- 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.",
5335
- type: "string"
5336
- }).option("format", {
5337
- alias: ["f"],
5338
- describe: "Output format",
5339
- default: "yaml",
5340
- choices: ["yaml", "json"],
5341
- type: "string"
5342
- }).option("what-if", {
5343
- alias: ["w"],
5344
- describe: "What-if mode reports what would be done but changes no files",
5345
- default: false,
5346
- type: "boolean"
5347
- }).option("mode", {
5348
- alias: ["m"],
5349
- 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',
5350
- choices: ["create", "createOrUpdate", "mirror"],
5351
- default: "mirror",
5352
- type: "string"
5353
- })
5354
- )
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
+ })
5355
4946
  )
5356
4947
  )
5357
4948
  ),
@@ -5409,26 +5000,24 @@ import { UncachedProjectMapClient as UncachedProjectMapClient10 } from "@uniform
5409
5000
  var ProjectMapNodePushModule = {
5410
5001
  command: "push <directory>",
5411
5002
  describe: "Pushes all project maps nodes from files in a directory or package to Uniform",
5412
- builder: (yargs23) => withConfiguration(
5413
- withApiOptions(
5414
- withProjectOptions(
5415
- withDiffOptions(
5416
- yargs23.positional("directory", {
5417
- describe: "Directory to read project maps from. If a filename is used, a package will be read instead.",
5418
- type: "string"
5419
- }).option("what-if", {
5420
- alias: ["w"],
5421
- describe: "What-if mode reports what would be done but changes nothing",
5422
- default: false,
5423
- type: "boolean"
5424
- }).option("mode", {
5425
- alias: ["m"],
5426
- 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',
5427
- choices: ["create", "createOrUpdate", "mirror"],
5428
- default: "mirror",
5429
- type: "string"
5430
- })
5431
- )
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
+ })
5432
5021
  )
5433
5022
  )
5434
5023
  ),
@@ -5486,11 +5075,9 @@ var ProjectMapNodeRemoveModule = {
5486
5075
  command: "remove <id> <projectMapId>",
5487
5076
  aliases: ["delete", "rm"],
5488
5077
  describe: "Delete a project map node",
5489
- builder: (yargs23) => withConfiguration(
5490
- withApiOptions(
5491
- withProjectOptions(
5492
- yargs23.positional("id", { demandOption: true, describe: "ProjectMap Node UUID to delete" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to delete from" })
5493
- )
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" })
5494
5081
  )
5495
5082
  ),
5496
5083
  handler: async ({ apiHost, apiKey, proxy, projectMapId, id, project: projectId }) => {
@@ -5506,11 +5093,9 @@ var ProjectMapNodeUpdateModule = {
5506
5093
  command: "update <filename> <projectMapId>",
5507
5094
  aliases: ["put"],
5508
5095
  describe: "Insert or update a project map node",
5509
- builder: (yargs23) => withConfiguration(
5510
- withApiOptions(
5511
- withProjectOptions(
5512
- yargs23.positional("filename", { demandOption: true, describe: "ProjectMap node file with nodes data" }).positional("projectMapId", { demandOption: true, describe: "ProjectMap UUID to put into" })
5513
- )
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" })
5514
5099
  )
5515
5100
  ),
5516
5101
  handler: async ({ apiHost, apiKey, proxy, projectMapId, filename, project: projectId }) => {
@@ -5525,9 +5110,9 @@ var ProjectMapNodeUpdateModule = {
5525
5110
  var ProjectMapNodeModule = {
5526
5111
  command: "node <command>",
5527
5112
  describe: "Commands for ProjectMap Nodes",
5528
- 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(),
5529
5114
  handler: () => {
5530
- yargs17.help();
5115
+ yargs16.help();
5531
5116
  }
5532
5117
  };
5533
5118
 
@@ -5536,30 +5121,26 @@ var ProjectMapCommand = {
5536
5121
  command: "project-map <command>",
5537
5122
  aliases: ["prm"],
5538
5123
  describe: "Uniform ProjectMap commands",
5539
- builder: (yargs23) => yargs23.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
5124
+ builder: (yargs21) => yargs21.command(ProjectMapNodeModule).command(ProjectMapDefinitionModule).demandCommand(),
5540
5125
  handler: () => {
5541
- yargs18.showHelp();
5126
+ yargs17.showHelp();
5542
5127
  }
5543
5128
  };
5544
5129
 
5545
5130
  // src/commands/redirect/index.ts
5546
- import yargs20 from "yargs";
5131
+ import yargs19 from "yargs";
5547
5132
 
5548
5133
  // src/commands/redirect/commands/redirect.ts
5549
- import yargs19 from "yargs";
5134
+ import yargs18 from "yargs";
5550
5135
 
5551
5136
  // src/commands/redirect/commands/RedirectDefinition/get.ts
5552
5137
  import { UncachedRedirectClient } from "@uniformdev/redirect";
5553
5138
  var RedirectDefinitionGetModule = {
5554
5139
  command: "get <id>",
5555
5140
  describe: "Fetch a redirect",
5556
- builder: (yargs23) => withConfiguration(
5557
- withFormatOptions(
5558
- withApiOptions(
5559
- withProjectOptions(
5560
- yargs23.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" })
5561
- )
5562
- )
5141
+ builder: (yargs21) => withFormatOptions(
5142
+ withApiOptions(
5143
+ withProjectOptions(yargs21.positional("id", { demandOption: true, describe: "Redirect UUID to fetch" }))
5563
5144
  )
5564
5145
  ),
5565
5146
  handler: async ({ apiHost, apiKey, proxy, id, format, project: projectId, filename }) => {
@@ -5581,7 +5162,7 @@ var RedirectDefinitionListModule = {
5581
5162
  command: "list",
5582
5163
  describe: "List of redirects",
5583
5164
  aliases: ["ls"],
5584
- builder: (yargs23) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs23)))),
5165
+ builder: (yargs21) => withFormatOptions(withApiOptions(withProjectOptions(yargs21))),
5585
5166
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
5586
5167
  const fetch3 = nodeFetchProxy(proxy);
5587
5168
  const client = new UncachedRedirectClient2({ apiKey, apiHost, fetch: fetch3, projectId });
@@ -5647,32 +5228,30 @@ function createRedirectDefinitionEngineDataSource({
5647
5228
  var RedirectDefinitionPullModule = {
5648
5229
  command: "pull <directory>",
5649
5230
  describe: "Pulls all redirects to local files in a directory",
5650
- builder: (yargs23) => withConfiguration(
5651
- withApiOptions(
5652
- withProjectOptions(
5653
- withDiffOptions(
5654
- yargs23.positional("directory", {
5655
- 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.",
5656
- type: "string"
5657
- }).option("format", {
5658
- alias: ["f"],
5659
- describe: "Output format",
5660
- default: "yaml",
5661
- choices: ["yaml", "json"],
5662
- type: "string"
5663
- }).option("what-if", {
5664
- alias: ["w"],
5665
- describe: "What-if mode reports what would be done but changes no files",
5666
- default: false,
5667
- type: "boolean"
5668
- }).option("mode", {
5669
- alias: ["m"],
5670
- 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',
5671
- choices: ["create", "createOrUpdate", "mirror"],
5672
- default: "mirror",
5673
- type: "string"
5674
- })
5675
- )
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
+ })
5676
5255
  )
5677
5256
  )
5678
5257
  ),
@@ -5727,26 +5306,24 @@ import { UncachedRedirectClient as UncachedRedirectClient4 } from "@uniformdev/r
5727
5306
  var RedirectDefinitionPushModule = {
5728
5307
  command: "push <directory>",
5729
5308
  describe: "Pushes all redirects from files in a directory or package to Uniform",
5730
- builder: (yargs23) => withConfiguration(
5731
- withApiOptions(
5732
- withProjectOptions(
5733
- withDiffOptions(
5734
- yargs23.positional("directory", {
5735
- describe: "Directory to read redirects from. If a filename is used, a package will be read instead.",
5736
- type: "string"
5737
- }).option("what-if", {
5738
- alias: ["w"],
5739
- describe: "What-if mode reports what would be done but changes nothing",
5740
- default: false,
5741
- type: "boolean"
5742
- }).option("mode", {
5743
- alias: ["m"],
5744
- 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',
5745
- choices: ["create", "createOrUpdate", "mirror"],
5746
- default: "mirror",
5747
- type: "string"
5748
- })
5749
- )
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
+ })
5750
5327
  )
5751
5328
  )
5752
5329
  ),
@@ -5795,10 +5372,8 @@ var RedirectDefinitionRemoveModule = {
5795
5372
  command: "remove <id>",
5796
5373
  aliases: ["delete", "rm"],
5797
5374
  describe: "Delete a redirect",
5798
- builder: (yargs23) => withConfiguration(
5799
- withApiOptions(
5800
- withProjectOptions(yargs23.positional("id", { demandOption: true, describe: " UUID to delete" }))
5801
- )
5375
+ builder: (yargs21) => withApiOptions(
5376
+ withProjectOptions(yargs21.positional("id", { demandOption: true, describe: " UUID to delete" }))
5802
5377
  ),
5803
5378
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
5804
5379
  const fetch3 = nodeFetchProxy(proxy);
@@ -5813,11 +5388,9 @@ var RedirectDefinitionUpdateModule = {
5813
5388
  command: "update <filename>",
5814
5389
  aliases: ["put"],
5815
5390
  describe: "Insert or update a redirect",
5816
- builder: (yargs23) => withConfiguration(
5817
- withApiOptions(
5818
- withProjectOptions(
5819
- yargs23.positional("filename", { demandOption: true, describe: "Redirect file to put" })
5820
- )
5391
+ builder: (yargs21) => withApiOptions(
5392
+ withProjectOptions(
5393
+ yargs21.positional("filename", { demandOption: true, describe: "Redirect file to put" })
5821
5394
  )
5822
5395
  ),
5823
5396
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -5832,9 +5405,9 @@ var RedirectDefinitionUpdateModule = {
5832
5405
  var RedirectDefinitionModule = {
5833
5406
  command: "definition <command>",
5834
5407
  describe: "Commands for Redirect Definitions",
5835
- 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(),
5836
5409
  handler: () => {
5837
- yargs19.help();
5410
+ yargs18.help();
5838
5411
  }
5839
5412
  };
5840
5413
 
@@ -5843,161 +5416,9 @@ var RedirectCommand = {
5843
5416
  command: "redirect <command>",
5844
5417
  aliases: ["red"],
5845
5418
  describe: "Uniform Redirect commands",
5846
- builder: (yargs23) => yargs23.command(RedirectDefinitionModule).demandCommand(),
5847
- handler: () => {
5848
- yargs20.showHelp();
5849
- }
5850
- };
5851
-
5852
- // src/commands/sync/index.ts
5853
- import yargs21 from "yargs";
5854
-
5855
- // src/commands/sync/commands/pull.ts
5856
- var SyncPullModule = {
5857
- command: "pull",
5858
- describe: "Pulls whole project to local files in a directory",
5859
- builder: (yargs23) => withConfiguration(
5860
- withApiOptions(
5861
- withProjectOptions(
5862
- withDiffOptions(
5863
- yargs23.option("what-if", {
5864
- alias: ["w"],
5865
- describe: "What-if mode reports what would be done but changes no files",
5866
- default: false,
5867
- type: "boolean"
5868
- })
5869
- )
5870
- )
5871
- )
5872
- ),
5873
- handler: async ({ serialization, ...otherParams }) => {
5874
- const config2 = serialization;
5875
- const enabledEntities = Object.entries({
5876
- category: CategoryPullModule,
5877
- dataType: DataTypePullModule,
5878
- quirk: QuirkPullModule,
5879
- test: TestPullModule,
5880
- signal: SignalPullModule,
5881
- enrichment: EnrichmentPullModule,
5882
- aggregate: AggregatePullModule,
5883
- component: ComponentPullModule,
5884
- pattern: PatternPullModule,
5885
- composition: CompositionPullModule,
5886
- projectMapDefinition: ProjectMapDefinitionPullModule,
5887
- projectMapNode: ProjectMapNodePullModule,
5888
- redirect: RedirectDefinitionPullModule
5889
- }).filter(([entityType]) => {
5890
- var _a, _b, _c, _d, _e, _f;
5891
- 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;
5892
- });
5893
- for (const [entityType, module3] of enabledEntities) {
5894
- await module3.handler({
5895
- ...otherParams,
5896
- state: 0,
5897
- onlyCompositions: entityType === "composition" ? true : void 0,
5898
- onlyPatterns: entityType === "pattern" ? true : void 0,
5899
- mode: getPullMode(entityType, config2),
5900
- directory: getPullFilename(entityType, config2)
5901
- });
5902
- }
5903
- }
5904
- };
5905
- var getPullMode = (entityType, config2) => {
5906
- return getEntityOption({
5907
- optionName: "mode",
5908
- operation: "pull",
5909
- config: config2,
5910
- entityType
5911
- });
5912
- };
5913
- var getPullFilename = (entityType, config2) => {
5914
- return getDirectoryOrFilename({
5915
- operation: "pull",
5916
- config: config2,
5917
- entityType
5918
- });
5919
- };
5920
-
5921
- // src/commands/sync/commands/push.ts
5922
- var SyncPushModule = {
5923
- command: "push",
5924
- describe: "Pushes whole project data from files in a directory or package to Uniform",
5925
- builder: (yargs23) => withConfiguration(
5926
- withApiOptions(
5927
- withProjectOptions(
5928
- withDiffOptions(
5929
- yargs23.option("what-if", {
5930
- alias: ["w"],
5931
- describe: "What-if mode reports what would be done but changes nothing",
5932
- default: false,
5933
- type: "boolean"
5934
- })
5935
- )
5936
- )
5937
- )
5938
- ),
5939
- handler: async ({ serialization, ...otherParams }) => {
5940
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
5941
- const config2 = serialization;
5942
- const enabledEntities = Object.entries({
5943
- category: CategoryPushModule,
5944
- dataType: DataTypePushModule,
5945
- quirk: QuirkPushModule,
5946
- test: TestPushModule,
5947
- signal: SignalPushModule,
5948
- enrichment: EnrichmentPushModule,
5949
- aggregate: AggregatePushModule,
5950
- component: ComponentPushModule,
5951
- pattern: PatternPushModule,
5952
- composition: CompositionPushModule,
5953
- projectMapDefinition: ProjectMapDefinitionPushModule,
5954
- projectMapNode: ProjectMapNodePushModule,
5955
- redirect: RedirectDefinitionPushModule
5956
- }).filter(([entityType]) => {
5957
- var _a2, _b2, _c2, _d2, _e2, _f2;
5958
- 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;
5959
- });
5960
- for (const [entityType, module3] of enabledEntities) {
5961
- await module3.handler({
5962
- ...otherParams,
5963
- state: 0,
5964
- onlyCompositions: entityType === "composition" ? true : void 0,
5965
- onlyPatterns: entityType === "pattern" ? true : void 0,
5966
- mode: getPushMode(entityType, config2),
5967
- directory: getPushFilename(entityType, config2)
5968
- });
5969
- }
5970
- 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)) {
5971
- await PatternPublishModule.handler({ ...otherParams, all: true });
5972
- }
5973
- 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)) {
5974
- await CompositionPublishModule.handler({ ...otherParams, all: true });
5975
- }
5976
- }
5977
- };
5978
- var getPushMode = (entityType, config2) => {
5979
- return getEntityOption({
5980
- optionName: "mode",
5981
- operation: "push",
5982
- config: config2,
5983
- entityType
5984
- });
5985
- };
5986
- var getPushFilename = (entityType, config2) => {
5987
- return getDirectoryOrFilename({
5988
- operation: "push",
5989
- config: config2,
5990
- entityType
5991
- });
5992
- };
5993
-
5994
- // src/commands/sync/index.ts
5995
- var SyncCommand = {
5996
- command: "sync <command>",
5997
- describe: "Uniform Sync commands",
5998
- builder: (yargs23) => yargs23.command(SyncPullModule).command(SyncPushModule).demandCommand(),
5419
+ builder: (yargs21) => yargs21.command(RedirectDefinitionModule).demandCommand(),
5999
5420
  handler: () => {
6000
- yargs21.showHelp();
5421
+ yargs19.showHelp();
6001
5422
  }
6002
5423
  };
6003
5424
 
@@ -6113,30 +5534,9 @@ First found was: v${firstVersion}`;
6113
5534
 
6114
5535
  // src/index.ts
6115
5536
  dotenv.config();
6116
- var yarggery = yargs22(hideBin(process.argv));
6117
- var moduleName = "uniform";
6118
- var syncCosmicExplorer = cosmiconfigSync("uniform", {
6119
- searchPlaces: [`${moduleName}.config.js`, `${moduleName}.config.ts`, `${moduleName}.config.json`],
6120
- loaders: {
6121
- ".ts": TypeScriptLoader()
6122
- }
6123
- });
6124
- var searchedForm = syncCosmicExplorer.search();
6125
- var cosmicConfig = applyDefaultSyncConfiguration((searchedForm == null ? void 0 : searchedForm.config) ?? {});
5537
+ var yarggery = yargs20(hideBin(process.argv));
6126
5538
  yarggery.option("verbose", {
6127
5539
  describe: "Include verbose logging",
6128
5540
  default: false,
6129
5541
  type: "boolean"
6130
- }).scriptName("uniform").config(cosmicConfig).config("config", function(configPath) {
6131
- if (!fs5.existsSync(configPath)) {
6132
- throw new Error(`Invalid configuration file path: ${configPath}. File does not exist.`);
6133
- }
6134
- const config2 = syncCosmicExplorer.load(configPath);
6135
- if (!(config2 == null ? void 0 : config2.config.serialization)) {
6136
- throw new Error(
6137
- `Invalid configuration file: ${configPath}. Missing config.serialization configuration.`
6138
- );
6139
- }
6140
- const configuration = applyDefaultSyncConfiguration((config2 == null ? void 0 : config2.config) ?? {});
6141
- return { serialization: configuration.serialization };
6142
- }).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;