@uniformdev/cli 19.46.0 → 19.47.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.
Files changed (2) hide show
  1. package/dist/index.mjs +131 -109
  2. package/package.json +8 -8
package/dist/index.mjs CHANGED
@@ -2013,11 +2013,13 @@ import { ContentClient } from "@uniformdev/canvas";
2013
2013
  var ContentTypeGetModule = {
2014
2014
  command: "get <id>",
2015
2015
  describe: "Get a content type",
2016
- builder: (yargs25) => withFormatOptions(
2017
- withApiOptions(
2018
- withProjectOptions(
2019
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2020
- yargs25.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
2016
+ builder: (yargs25) => withConfiguration(
2017
+ withFormatOptions(
2018
+ withApiOptions(
2019
+ withProjectOptions(
2020
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2021
+ yargs25.positional("id", { demandOption: true, describe: "Content type public ID to fetch" })
2022
+ )
2021
2023
  )
2022
2024
  )
2023
2025
  ),
@@ -2038,7 +2040,7 @@ import { ContentClient as ContentClient2 } from "@uniformdev/canvas";
2038
2040
  var ContentTypeListModule = {
2039
2041
  command: "list",
2040
2042
  describe: "List content types",
2041
- builder: (yargs25) => withFormatOptions(withApiOptions(withProjectOptions(yargs25))),
2043
+ builder: (yargs25) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs25)))),
2042
2044
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2043
2045
  const fetch3 = nodeFetchProxy(proxy);
2044
2046
  const client = new ContentClient2({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -2085,30 +2087,32 @@ function createContentTypeEngineDataSource({
2085
2087
  var ContentTypePullModule = {
2086
2088
  command: "pull <directory>",
2087
2089
  describe: "Pulls all content types to local files in a directory",
2088
- builder: (yargs25) => withApiOptions(
2089
- withProjectOptions(
2090
- withDiffOptions(
2091
- yargs25.positional("directory", {
2092
- describe: "Directory to save the content types to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
2093
- type: "string"
2094
- }).option("format", {
2095
- alias: ["f"],
2096
- describe: "Output format",
2097
- default: "yaml",
2098
- choices: ["yaml", "json"],
2099
- type: "string"
2100
- }).option("what-if", {
2101
- alias: ["w"],
2102
- describe: "What-if mode reports what would be done but changes no files",
2103
- default: false,
2104
- type: "boolean"
2105
- }).option("mode", {
2106
- alias: ["m"],
2107
- 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',
2108
- choices: ["create", "createOrUpdate", "mirror"],
2109
- default: "mirror",
2110
- type: "string"
2111
- })
2090
+ builder: (yargs25) => withConfiguration(
2091
+ withApiOptions(
2092
+ withProjectOptions(
2093
+ withDiffOptions(
2094
+ yargs25.positional("directory", {
2095
+ describe: "Directory to save the content types to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
2096
+ type: "string"
2097
+ }).option("format", {
2098
+ alias: ["f"],
2099
+ describe: "Output format",
2100
+ default: "yaml",
2101
+ choices: ["yaml", "json"],
2102
+ type: "string"
2103
+ }).option("what-if", {
2104
+ alias: ["w"],
2105
+ describe: "What-if mode reports what would be done but changes no files",
2106
+ default: false,
2107
+ type: "boolean"
2108
+ }).option("mode", {
2109
+ alias: ["m"],
2110
+ 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',
2111
+ choices: ["create", "createOrUpdate", "mirror"],
2112
+ default: "mirror",
2113
+ type: "string"
2114
+ })
2115
+ )
2112
2116
  )
2113
2117
  )
2114
2118
  ),
@@ -2168,24 +2172,26 @@ import { ContentClient as ContentClient4 } from "@uniformdev/canvas";
2168
2172
  var ContentTypePushModule = {
2169
2173
  command: "push <directory>",
2170
2174
  describe: "Pushes all content types from files in a directory to Uniform",
2171
- builder: (yargs25) => withApiOptions(
2172
- withProjectOptions(
2173
- withDiffOptions(
2174
- yargs25.positional("directory", {
2175
- describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
2176
- type: "string"
2177
- }).option("what-if", {
2178
- alias: ["w"],
2179
- describe: "What-if mode reports what would be done but changes nothing",
2180
- default: false,
2181
- type: "boolean"
2182
- }).option("mode", {
2183
- alias: ["m"],
2184
- 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',
2185
- choices: ["create", "createOrUpdate", "mirror"],
2186
- default: "mirror",
2187
- type: "string"
2188
- })
2175
+ builder: (yargs25) => withConfiguration(
2176
+ withApiOptions(
2177
+ withProjectOptions(
2178
+ withDiffOptions(
2179
+ yargs25.positional("directory", {
2180
+ describe: "Directory to read the content types from. If a filename is used, a package will be read instead.",
2181
+ type: "string"
2182
+ }).option("what-if", {
2183
+ alias: ["w"],
2184
+ describe: "What-if mode reports what would be done but changes nothing",
2185
+ default: false,
2186
+ type: "boolean"
2187
+ }).option("mode", {
2188
+ alias: ["m"],
2189
+ 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',
2190
+ choices: ["create", "createOrUpdate", "mirror"],
2191
+ default: "mirror",
2192
+ type: "string"
2193
+ })
2194
+ )
2189
2195
  )
2190
2196
  )
2191
2197
  ),
@@ -2240,9 +2246,11 @@ var ContentTypeRemoveModule = {
2240
2246
  command: "remove <id>",
2241
2247
  aliases: ["delete", "rm"],
2242
2248
  describe: "Delete a content type",
2243
- builder: (yargs25) => withApiOptions(
2244
- withProjectOptions(
2245
- yargs25.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
2249
+ builder: (yargs25) => withConfiguration(
2250
+ withApiOptions(
2251
+ withProjectOptions(
2252
+ yargs25.positional("id", { demandOption: true, describe: "Content type public ID to delete" })
2253
+ )
2246
2254
  )
2247
2255
  ),
2248
2256
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -2258,9 +2266,11 @@ var ContentTypeUpdateModule = {
2258
2266
  command: "update <filename>",
2259
2267
  aliases: ["put"],
2260
2268
  describe: "Insert or update a content type",
2261
- builder: (yargs25) => withApiOptions(
2262
- withProjectOptions(
2263
- yargs25.positional("filename", { demandOption: true, describe: "Content type file to put" })
2269
+ builder: (yargs25) => withConfiguration(
2270
+ withApiOptions(
2271
+ withProjectOptions(
2272
+ yargs25.positional("filename", { demandOption: true, describe: "Content type file to put" })
2273
+ )
2264
2274
  )
2265
2275
  ),
2266
2276
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
@@ -2581,11 +2591,13 @@ import { ContentClient as ContentClient7 } from "@uniformdev/canvas";
2581
2591
  var EntryGetModule = {
2582
2592
  command: "get <id>",
2583
2593
  describe: "Get an entry",
2584
- builder: (yargs25) => withFormatOptions(
2585
- withApiOptions(
2586
- withProjectOptions(
2587
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
2588
- yargs25.positional("id", { demandOption: true, describe: "Entry public ID to fetch" })
2594
+ builder: (yargs25) => withConfiguration(
2595
+ withFormatOptions(
2596
+ withApiOptions(
2597
+ withProjectOptions(
2598
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2599
+ yargs25.positional("id", { demandOption: true, describe: "Entry public ID to fetch" })
2600
+ )
2589
2601
  )
2590
2602
  )
2591
2603
  ),
@@ -2605,7 +2617,7 @@ import { ContentClient as ContentClient8 } from "@uniformdev/canvas";
2605
2617
  var EntryListModule = {
2606
2618
  command: "list",
2607
2619
  describe: "List entries",
2608
- builder: (yargs25) => withFormatOptions(withApiOptions(withProjectOptions(yargs25))),
2620
+ builder: (yargs25) => withConfiguration(withFormatOptions(withApiOptions(withProjectOptions(yargs25)))),
2609
2621
  handler: async ({ apiHost, apiKey, proxy, format, filename, project: projectId }) => {
2610
2622
  const fetch3 = nodeFetchProxy(proxy);
2611
2623
  const client = new ContentClient8({ apiKey, apiHost, fetch: fetch3, projectId, bypassCache: true });
@@ -2652,30 +2664,32 @@ function createEntryEngineDataSource({
2652
2664
  var EntryPullModule = {
2653
2665
  command: "pull <directory>",
2654
2666
  describe: "Pulls all entries to local files in a directory",
2655
- builder: (yargs25) => withApiOptions(
2656
- withProjectOptions(
2657
- withDiffOptions(
2658
- yargs25.positional("directory", {
2659
- describe: "Directory to save the entries to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
2660
- type: "string"
2661
- }).option("format", {
2662
- alias: ["f"],
2663
- describe: "Output format",
2664
- default: "yaml",
2665
- choices: ["yaml", "json"],
2666
- type: "string"
2667
- }).option("what-if", {
2668
- alias: ["w"],
2669
- describe: "What-if mode reports what would be done but changes no files",
2670
- default: false,
2671
- type: "boolean"
2672
- }).option("mode", {
2673
- alias: ["m"],
2674
- 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',
2675
- choices: ["create", "createOrUpdate", "mirror"],
2676
- default: "mirror",
2677
- type: "string"
2678
- })
2667
+ builder: (yargs25) => withConfiguration(
2668
+ withApiOptions(
2669
+ withProjectOptions(
2670
+ withDiffOptions(
2671
+ yargs25.positional("directory", {
2672
+ describe: "Directory to save the entries to. If a filename ending in yaml or json is used, a package file will be created instead of files in the directory.",
2673
+ type: "string"
2674
+ }).option("format", {
2675
+ alias: ["f"],
2676
+ describe: "Output format",
2677
+ default: "yaml",
2678
+ choices: ["yaml", "json"],
2679
+ type: "string"
2680
+ }).option("what-if", {
2681
+ alias: ["w"],
2682
+ describe: "What-if mode reports what would be done but changes no files",
2683
+ default: false,
2684
+ type: "boolean"
2685
+ }).option("mode", {
2686
+ alias: ["m"],
2687
+ 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',
2688
+ choices: ["create", "createOrUpdate", "mirror"],
2689
+ default: "mirror",
2690
+ type: "string"
2691
+ })
2692
+ )
2679
2693
  )
2680
2694
  )
2681
2695
  ),
@@ -2735,24 +2749,26 @@ import { ContentClient as ContentClient10 } from "@uniformdev/canvas";
2735
2749
  var EntryPushModule = {
2736
2750
  command: "push <directory>",
2737
2751
  describe: "Pushes all entries from files in a directory to Uniform",
2738
- builder: (yargs25) => withApiOptions(
2739
- withProjectOptions(
2740
- withDiffOptions(
2741
- yargs25.positional("directory", {
2742
- describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
2743
- type: "string"
2744
- }).option("what-if", {
2745
- alias: ["w"],
2746
- describe: "What-if mode reports what would be done but changes nothing",
2747
- default: false,
2748
- type: "boolean"
2749
- }).option("mode", {
2750
- alias: ["m"],
2751
- 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',
2752
- choices: ["create", "createOrUpdate", "mirror"],
2753
- default: "mirror",
2754
- type: "string"
2755
- })
2752
+ builder: (yargs25) => withConfiguration(
2753
+ withApiOptions(
2754
+ withProjectOptions(
2755
+ withDiffOptions(
2756
+ yargs25.positional("directory", {
2757
+ describe: "Directory to read the entries from. If a filename is used, a package will be read instead.",
2758
+ type: "string"
2759
+ }).option("what-if", {
2760
+ alias: ["w"],
2761
+ describe: "What-if mode reports what would be done but changes nothing",
2762
+ default: false,
2763
+ type: "boolean"
2764
+ }).option("mode", {
2765
+ alias: ["m"],
2766
+ 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',
2767
+ choices: ["create", "createOrUpdate", "mirror"],
2768
+ default: "mirror",
2769
+ type: "string"
2770
+ })
2771
+ )
2756
2772
  )
2757
2773
  )
2758
2774
  ),
@@ -2807,9 +2823,11 @@ var EntryRemoveModule = {
2807
2823
  command: "remove <id>",
2808
2824
  aliases: ["delete", "rm"],
2809
2825
  describe: "Delete an entry",
2810
- builder: (yargs25) => withApiOptions(
2811
- withProjectOptions(
2812
- yargs25.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
2826
+ builder: (yargs25) => withConfiguration(
2827
+ withApiOptions(
2828
+ withProjectOptions(
2829
+ yargs25.positional("id", { demandOption: true, describe: "Entry public ID to delete" })
2830
+ )
2813
2831
  )
2814
2832
  ),
2815
2833
  handler: async ({ apiHost, apiKey, proxy, id, project: projectId }) => {
@@ -2825,8 +2843,12 @@ var EntryUpdateModule = {
2825
2843
  command: "update <filename>",
2826
2844
  aliases: ["put"],
2827
2845
  describe: "Insert or update an entry",
2828
- builder: (yargs25) => withApiOptions(
2829
- withProjectOptions(yargs25.positional("filename", { demandOption: true, describe: "Entry file to put" }))
2846
+ builder: (yargs25) => withConfiguration(
2847
+ withApiOptions(
2848
+ withProjectOptions(
2849
+ yargs25.positional("filename", { demandOption: true, describe: "Entry file to put" })
2850
+ )
2851
+ )
2830
2852
  ),
2831
2853
  handler: async ({ apiHost, apiKey, proxy, filename, project: projectId }) => {
2832
2854
  const fetch3 = nodeFetchProxy(proxy);
@@ -4692,7 +4714,7 @@ import { PostHog } from "posthog-node";
4692
4714
  // package.json
4693
4715
  var package_default = {
4694
4716
  name: "@uniformdev/cli",
4695
- version: "19.46.0",
4717
+ version: "19.47.0",
4696
4718
  description: "Uniform command line interface tool",
4697
4719
  license: "SEE LICENSE IN LICENSE.txt",
4698
4720
  main: "./cli.js",
@@ -4721,7 +4743,7 @@ var package_default = {
4721
4743
  dotenv: "^16.0.3",
4722
4744
  execa: "5.1.1",
4723
4745
  "fs-jetpack": "5.1.0",
4724
- graphql: "16.7.1",
4746
+ graphql: "16.8.0",
4725
4747
  "graphql-request": "6.1.0",
4726
4748
  "https-proxy-agent": "^7.0.0",
4727
4749
  "image-size": "^1.0.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/cli",
3
- "version": "19.46.0",
3
+ "version": "19.47.0",
4
4
  "description": "Uniform command line interface tool",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./cli.js",
@@ -17,11 +17,11 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@thi.ng/mime": "^2.2.23",
20
- "@uniformdev/canvas": "19.46.0",
21
- "@uniformdev/context": "19.46.0",
22
- "@uniformdev/files": "19.46.0",
23
- "@uniformdev/project-map": "19.46.0",
24
- "@uniformdev/redirect": "19.46.0",
20
+ "@uniformdev/canvas": "19.47.0",
21
+ "@uniformdev/context": "19.47.0",
22
+ "@uniformdev/files": "19.47.0",
23
+ "@uniformdev/project-map": "19.47.0",
24
+ "@uniformdev/redirect": "19.47.0",
25
25
  "colorette": "2.0.20",
26
26
  "cosmiconfig": "8.2.0",
27
27
  "cosmiconfig-typescript-loader": "5.0.0",
@@ -29,7 +29,7 @@
29
29
  "dotenv": "^16.0.3",
30
30
  "execa": "5.1.1",
31
31
  "fs-jetpack": "5.1.0",
32
- "graphql": "16.7.1",
32
+ "graphql": "16.8.0",
33
33
  "graphql-request": "6.1.0",
34
34
  "https-proxy-agent": "^7.0.0",
35
35
  "image-size": "^1.0.2",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "6adedbd963772fdfe3c43584a89704d58527719d"
69
+ "gitHead": "66bb196919cc178fc94f4d0490d0ac517193304a"
70
70
  }