@uniformdev/cli 19.45.2-alpha.7 → 19.46.1-alpha.8
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 +132 -110
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -1519,7 +1519,7 @@ var extractAndDownloadUniformFilesForObject = async (object, options) => {
|
|
|
1519
1519
|
fileDownloadQueue.add(async () => {
|
|
1520
1520
|
try {
|
|
1521
1521
|
const fetchUrl = `${url.origin}${url.pathname}?format=original`;
|
|
1522
|
-
const fileName = urlToFileName(
|
|
1522
|
+
const fileName = urlToFileName(url.toString());
|
|
1523
1523
|
const fileAlreadyExists = await fsj.existsAsync(
|
|
1524
1524
|
join2(options.directory, FILES_DIRECTORY_NAME, fileName)
|
|
1525
1525
|
);
|
|
@@ -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) =>
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
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) =>
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
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) =>
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
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) =>
|
|
2244
|
-
|
|
2245
|
-
|
|
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) =>
|
|
2262
|
-
|
|
2263
|
-
|
|
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) =>
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
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) =>
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
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) =>
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
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) =>
|
|
2811
|
-
|
|
2812
|
-
|
|
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) =>
|
|
2829
|
-
|
|
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.
|
|
4717
|
+
version: "19.46.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.
|
|
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.
|
|
3
|
+
"version": "19.46.1-alpha.8+a2d89f62e",
|
|
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.
|
|
21
|
-
"@uniformdev/context": "19.
|
|
22
|
-
"@uniformdev/files": "19.
|
|
23
|
-
"@uniformdev/project-map": "19.
|
|
24
|
-
"@uniformdev/redirect": "19.
|
|
20
|
+
"@uniformdev/canvas": "19.46.1-alpha.8+a2d89f62e",
|
|
21
|
+
"@uniformdev/context": "19.46.1-alpha.8+a2d89f62e",
|
|
22
|
+
"@uniformdev/files": "19.46.1-alpha.8+a2d89f62e",
|
|
23
|
+
"@uniformdev/project-map": "19.46.1-alpha.8+a2d89f62e",
|
|
24
|
+
"@uniformdev/redirect": "19.46.1-alpha.8+a2d89f62e",
|
|
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.
|
|
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": "
|
|
69
|
+
"gitHead": "a2d89f62ed00cf0c7eaa8d557ad6a9f218215213"
|
|
70
70
|
}
|