sanity 3.72.2-coreui.15 → 3.72.2-server-side-schemas.17
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/lib/_chunks-cjs/_internal.js +111 -69
- package/lib/_chunks-cjs/_internal.js.map +1 -1
- package/lib/_chunks-cjs/deployAction.js +10 -3
- package/lib/_chunks-cjs/deployAction.js.map +1 -1
- package/lib/_chunks-cjs/fetchSchemaAction.js +18 -0
- package/lib/_chunks-cjs/fetchSchemaAction.js.map +1 -0
- package/lib/_chunks-cjs/runtime.js +2 -6
- package/lib/_chunks-cjs/runtime.js.map +1 -1
- package/lib/_chunks-cjs/storeManifestSchemasAction.js +52 -0
- package/lib/_chunks-cjs/storeManifestSchemasAction.js.map +1 -0
- package/lib/_chunks-cjs/storeSchemaAction.js +7 -0
- package/lib/_chunks-cjs/storeSchemaAction.js.map +1 -0
- package/lib/_chunks-cjs/version.js +1 -1
- package/lib/_chunks-es/version.mjs +1 -1
- package/lib/_legacy/version.esm.js +1 -1
- package/package.json +10 -10
- package/src/_internal/cli/actions/deploy/deployAction.ts +14 -2
- package/src/_internal/cli/actions/manifest/storeManifestSchemasAction.ts +88 -0
- package/src/_internal/cli/actions/schema/fetchSchemaAction.ts +36 -0
- package/src/_internal/cli/actions/schema/storeSchemaAction.ts +17 -0
- package/src/_internal/cli/commands/build/buildCommand.ts +2 -0
- package/src/_internal/cli/commands/deploy/deployCommand.ts +1 -0
- package/src/_internal/cli/commands/index.ts +4 -0
- package/src/_internal/cli/commands/schema/fetchSchemaCommand.ts +32 -0
- package/src/_internal/cli/commands/schema/storeSchemaCommand.ts +33 -0
- package/src/_internal/cli/server/renderDocument.tsx +0 -12
- package/src/_internal/cli/server/runtime.ts +9 -12
@@ -99,7 +99,7 @@ async function resolveApiClient(context, datasetName, apiVersion) {
|
|
99
99
|
client
|
100
100
|
};
|
101
101
|
}
|
102
|
-
const helpText$
|
102
|
+
const helpText$B = `
|
103
103
|
Examples
|
104
104
|
sanity backup disable DATASET_NAME
|
105
105
|
`, disableDatasetBackupCommand = {
|
@@ -107,7 +107,7 @@ Examples
|
|
107
107
|
group: "backup",
|
108
108
|
signature: "[DATASET_NAME]",
|
109
109
|
description: "Disable backup for a dataset.",
|
110
|
-
helpText: helpText$
|
110
|
+
helpText: helpText$B,
|
111
111
|
action: async (args, context) => {
|
112
112
|
const {
|
113
113
|
output,
|
@@ -316,7 +316,7 @@ function humanFileSize(size2) {
|
|
316
316
|
function isPathDirName(filepath) {
|
317
317
|
return !/\.\w+$/.test(filepath);
|
318
318
|
}
|
319
|
-
const debug = debug__default.default("sanity:backup"), DEFAULT_DOWNLOAD_CONCURRENCY = 10, MAX_DOWNLOAD_CONCURRENCY = 24, helpText$
|
319
|
+
const debug = debug__default.default("sanity:backup"), DEFAULT_DOWNLOAD_CONCURRENCY = 10, MAX_DOWNLOAD_CONCURRENCY = 24, helpText$A = `
|
320
320
|
Options
|
321
321
|
--backup-id <string> The backup ID to download. (required)
|
322
322
|
--out <string> The file or directory path the backup should download to.
|
@@ -346,7 +346,7 @@ const downloadBackupCommand = {
|
|
346
346
|
group: "backup",
|
347
347
|
signature: "[DATASET_NAME]",
|
348
348
|
description: "Download a dataset backup to a local file.",
|
349
|
-
helpText: helpText$
|
349
|
+
helpText: helpText$A,
|
350
350
|
// eslint-disable-next-line max-statements
|
351
351
|
action: async (args, context) => {
|
352
352
|
const {
|
@@ -474,7 +474,7 @@ async function prepareBackupOptions(context, args) {
|
|
474
474
|
concurrency: flags.concurrency || DEFAULT_DOWNLOAD_CONCURRENCY
|
475
475
|
}];
|
476
476
|
}
|
477
|
-
const helpText$
|
477
|
+
const helpText$z = `
|
478
478
|
Examples
|
479
479
|
sanity backup enable DATASET_NAME
|
480
480
|
`, enableDatasetBackupCommand = {
|
@@ -482,7 +482,7 @@ Examples
|
|
482
482
|
group: "backup",
|
483
483
|
signature: "[DATASET_NAME]",
|
484
484
|
description: "Enable backup for a dataset.",
|
485
|
-
helpText: helpText$
|
485
|
+
helpText: helpText$z,
|
486
486
|
action: async (args, context) => {
|
487
487
|
const {
|
488
488
|
output,
|
@@ -515,7 +515,7 @@ Please note that it may take up to 24 hours before the first backup is created.
|
|
515
515
|
`);
|
516
516
|
}
|
517
517
|
}
|
518
|
-
}, DEFAULT_LIST_BACKUP_LIMIT = 30, helpText$
|
518
|
+
}, DEFAULT_LIST_BACKUP_LIMIT = 30, helpText$y = `
|
519
519
|
Options
|
520
520
|
--limit <int> Maximum number of backups returned. Default 30.
|
521
521
|
--after <string> Only return backups after this date (inclusive)
|
@@ -543,7 +543,7 @@ const listDatasetBackupCommand = {
|
|
543
543
|
group: "backup",
|
544
544
|
signature: "[DATASET_NAME]",
|
545
545
|
description: "List available backups for a dataset.",
|
546
|
-
helpText: helpText$
|
546
|
+
helpText: helpText$y,
|
547
547
|
action: async (args, context) => {
|
548
548
|
const {
|
549
549
|
output,
|
@@ -629,12 +629,14 @@ function processDateFlags(date) {
|
|
629
629
|
return parsedDate;
|
630
630
|
throw new Error(`Invalid ${date} date format. Use YYYY-MM-DD`);
|
631
631
|
}
|
632
|
-
const helpText$
|
632
|
+
const helpText$x = `
|
633
633
|
Options
|
634
634
|
--source-maps Enable source maps for built bundles (increases size of bundle)
|
635
635
|
--auto-updates / --no-auto-updates Enable/disable auto updates of studio versions
|
636
636
|
--no-minify Skip minifying built JavaScript (speeds up build, increases size of bundle)
|
637
|
+
--work
|
637
638
|
-y, --yes Unattended mode, answers "yes" to any "yes/no" prompt and otherwise uses defaults
|
639
|
+
--schema-path If you are storing your schemas in a different path than the default one, you need to specify it here.
|
638
640
|
|
639
641
|
Examples
|
640
642
|
sanity build
|
@@ -644,7 +646,7 @@ Examples
|
|
644
646
|
signature: "[OUTPUT_DIR]",
|
645
647
|
description: "Builds the Sanity Studio configuration into a static bundle",
|
646
648
|
action: async (args, context, overrides) => (await getBuildAction())(args, context, overrides),
|
647
|
-
helpText: helpText$
|
649
|
+
helpText: helpText$x
|
648
650
|
};
|
649
651
|
async function getBuildAction() {
|
650
652
|
return (await Promise.resolve().then(function() {
|
@@ -753,7 +755,7 @@ function filterAndValidateOrigin(givenOrigin) {
|
|
753
755
|
throw new Error("Invalid origin");
|
754
756
|
return origin;
|
755
757
|
}
|
756
|
-
const helpText$
|
758
|
+
const helpText$w = `
|
757
759
|
Options
|
758
760
|
--credentials Allow credentials (token/cookie) to be sent from this origin
|
759
761
|
--no-credentials Disallow credentials (token/cookie) to be sent from this origin
|
@@ -765,7 +767,7 @@ Examples
|
|
765
767
|
name: "add",
|
766
768
|
group: "cors",
|
767
769
|
signature: "[ORIGIN]",
|
768
|
-
helpText: helpText$
|
770
|
+
helpText: helpText$w,
|
769
771
|
description: "Allow a new origin to use your project API through CORS",
|
770
772
|
action: async (args, context) => {
|
771
773
|
const {
|
@@ -781,7 +783,7 @@ Examples
|
|
781
783
|
signature: "[COMMAND]",
|
782
784
|
isGroupRoot: !0,
|
783
785
|
description: "Configures CORS settings for Sanity projects"
|
784
|
-
}, helpText$
|
786
|
+
}, helpText$v = `
|
785
787
|
Examples
|
786
788
|
sanity cors delete
|
787
789
|
sanity cors delete http://localhost:3000
|
@@ -789,7 +791,7 @@ Examples
|
|
789
791
|
name: "delete",
|
790
792
|
group: "cors",
|
791
793
|
signature: "[ORIGIN]",
|
792
|
-
helpText: helpText$
|
794
|
+
helpText: helpText$v,
|
793
795
|
description: "Delete an existing CORS-origin from your project",
|
794
796
|
action: async (args, context) => {
|
795
797
|
const {
|
@@ -836,14 +838,14 @@ async function promptForOrigin(specified, context) {
|
|
836
838
|
choices
|
837
839
|
});
|
838
840
|
}
|
839
|
-
const helpText$
|
841
|
+
const helpText$u = `
|
840
842
|
Examples
|
841
843
|
sanity cors list
|
842
844
|
`, listCorsOriginsCommand = {
|
843
845
|
name: "list",
|
844
846
|
group: "cors",
|
845
847
|
signature: "",
|
846
|
-
helpText: helpText$
|
848
|
+
helpText: helpText$u,
|
847
849
|
description: "List all origins allowed to access the API for this project",
|
848
850
|
action: async (args, context) => {
|
849
851
|
const {
|
@@ -1039,7 +1041,7 @@ const unlinkAliasHandler = async (args, context) => {
|
|
1039
1041
|
throw new Error(`Dataset alias unlink failed:
|
1040
1042
|
${err.message}`);
|
1041
1043
|
}
|
1042
|
-
}, helpText$
|
1044
|
+
}, helpText$t = `
|
1043
1045
|
Below are examples of the alias subcommand
|
1044
1046
|
|
1045
1047
|
Create Alias
|
@@ -1077,7 +1079,7 @@ Un-link Alias
|
|
1077
1079
|
name: "alias",
|
1078
1080
|
group: "dataset",
|
1079
1081
|
signature: "SUBCOMMAND [ALIAS_NAME, TARGET_DATASET]",
|
1080
|
-
helpText: helpText$
|
1082
|
+
helpText: helpText$t,
|
1081
1083
|
description: "You can manage your dataset alias using this command.",
|
1082
1084
|
action: async (args, context) => {
|
1083
1085
|
const [verb] = args.argsWithoutOptions;
|
@@ -1202,7 +1204,7 @@ ${error.message}`)}
|
|
1202
1204
|
const getClientUrl = (client, uri, useCdn = !1) => {
|
1203
1205
|
const config = client.config();
|
1204
1206
|
return `${useCdn ? config.cdnUrl : config.url}/${uri.replace(/^\//, "")}`;
|
1205
|
-
}, helpText$
|
1207
|
+
}, helpText$s = `
|
1206
1208
|
Options
|
1207
1209
|
--detach Start the copy without waiting for it to finish
|
1208
1210
|
--attach <job-id> Attach to the running copy process to show progress
|
@@ -1275,7 +1277,7 @@ const progress = (url2) => new rxjs.Observable((observer) => {
|
|
1275
1277
|
name: "copy",
|
1276
1278
|
group: "dataset",
|
1277
1279
|
signature: "[SOURCE_DATASET] [TARGET_DATASET]",
|
1278
|
-
helpText: helpText$
|
1280
|
+
helpText: helpText$s,
|
1279
1281
|
description: "Manages dataset copying, including starting a new copy job, listing copy jobs and following the progress of a running copy job",
|
1280
1282
|
action: async (args, context) => {
|
1281
1283
|
const {
|
@@ -1331,7 +1333,7 @@ ${error.message}`)}
|
|
1331
1333
|
`);
|
1332
1334
|
}
|
1333
1335
|
}
|
1334
|
-
}, helpText$
|
1336
|
+
}, helpText$r = `
|
1335
1337
|
Options
|
1336
1338
|
--visibility <mode> Set visibility for this dataset (public/private)
|
1337
1339
|
|
@@ -1343,7 +1345,7 @@ Examples
|
|
1343
1345
|
name: "create",
|
1344
1346
|
group: "dataset",
|
1345
1347
|
signature: "[NAME]",
|
1346
|
-
helpText: helpText$
|
1348
|
+
helpText: helpText$r,
|
1347
1349
|
description: "Create a new dataset within your project",
|
1348
1350
|
action: async (args, context) => {
|
1349
1351
|
const {
|
@@ -1436,7 +1438,7 @@ const datasetVisibilityCommand = {
|
|
1436
1438
|
aclMode
|
1437
1439
|
}), output.print("Dataset visibility changed");
|
1438
1440
|
}
|
1439
|
-
}, helpText$
|
1441
|
+
}, helpText$q = `
|
1440
1442
|
Options
|
1441
1443
|
--force Do not prompt for delete confirmation - forcefully delete
|
1442
1444
|
|
@@ -1453,7 +1455,7 @@ function parseCliFlags$2(args) {
|
|
1453
1455
|
const deleteDatasetCommand = {
|
1454
1456
|
name: "delete",
|
1455
1457
|
group: "dataset",
|
1456
|
-
helpText: helpText$
|
1458
|
+
helpText: helpText$q,
|
1457
1459
|
signature: "[datasetName]",
|
1458
1460
|
description: "Delete a dataset within your project",
|
1459
1461
|
action: async (args, context) => {
|
@@ -1477,7 +1479,7 @@ const deleteDatasetCommand = {
|
|
1477
1479
|
validate: (input) => input === dataset || "Incorrect dataset name. Ctrl + C to cancel delete."
|
1478
1480
|
}), await apiClient().datasets.delete(dataset), output.print("Dataset deleted successfully");
|
1479
1481
|
}
|
1480
|
-
}, noop = () => null, helpText$
|
1482
|
+
}, noop = () => null, helpText$p = `
|
1481
1483
|
Options
|
1482
1484
|
--raw Extract only documents, without rewriting asset references
|
1483
1485
|
--no-assets Export only non-asset documents and remove references to image assets
|
@@ -1503,7 +1505,7 @@ const exportDatasetCommand = {
|
|
1503
1505
|
group: "dataset",
|
1504
1506
|
signature: "[NAME] [DESTINATION]",
|
1505
1507
|
description: "Export dataset to local filesystem as a gzipped tarball",
|
1506
|
-
helpText: helpText$
|
1508
|
+
helpText: helpText$p,
|
1507
1509
|
action: async (args, context) => {
|
1508
1510
|
const {
|
1509
1511
|
apiClient,
|
@@ -1575,7 +1577,7 @@ async function getOutputPath(destination, dataset, prompt, flags) {
|
|
1575
1577
|
default: !1
|
1576
1578
|
}) ? !1 : finalPath;
|
1577
1579
|
}
|
1578
|
-
const yellow = (str) => `\x1B[33m${str}\x1B[39m`, helpText$
|
1580
|
+
const yellow = (str) => `\x1B[33m${str}\x1B[39m`, helpText$o = `
|
1579
1581
|
Options
|
1580
1582
|
--missing On duplicate document IDs, skip importing document in question
|
1581
1583
|
--replace On duplicate document IDs, replace existing document with imported document
|
@@ -1624,7 +1626,7 @@ const importDatasetCommand = {
|
|
1624
1626
|
group: "dataset",
|
1625
1627
|
signature: "[FILE | FOLDER | URL] [TARGET_DATASET]",
|
1626
1628
|
description: "Import documents to given dataset from either an ndjson file or a gzipped tarball",
|
1627
|
-
helpText: helpText$
|
1629
|
+
helpText: helpText$o,
|
1628
1630
|
// eslint-disable-next-line max-statements
|
1629
1631
|
action: async (args, context) => {
|
1630
1632
|
const {
|
@@ -1805,10 +1807,11 @@ const listAliasesHandler = async (args, context) => {
|
|
1805
1807
|
output.print(datasets.map((set) => set.name).join(`
|
1806
1808
|
`)), await listAliasesHandler(args, context);
|
1807
1809
|
}
|
1808
|
-
}, helpText$
|
1810
|
+
}, helpText$n = `
|
1809
1811
|
Options
|
1810
1812
|
--source-maps Enable source maps for built bundles (increases size of bundle)
|
1811
1813
|
--auto-updates / --no-auto-updates Enable/disable auto updates of studio versions
|
1814
|
+
--schema-path / path to schema folder if custom schema folder is used
|
1812
1815
|
--no-minify Skip minifying built JavaScript (speeds up build, increases size of bundle)
|
1813
1816
|
--no-build Don't build the studio prior to deploy, instead deploying the version currently in \`dist/\`
|
1814
1817
|
-y, --yes Unattended mode, answers "yes" to any "yes/no" prompt and otherwise uses defaults
|
@@ -1823,8 +1826,8 @@ Examples
|
|
1823
1826
|
action: async (args, context) => (await Promise.resolve().then(function() {
|
1824
1827
|
return require("./deployAction.js");
|
1825
1828
|
})).default(args, context),
|
1826
|
-
helpText: helpText$
|
1827
|
-
}, helpText$
|
1829
|
+
helpText: helpText$n
|
1830
|
+
}, helpText$m = `
|
1828
1831
|
Examples
|
1829
1832
|
sanity undeploy
|
1830
1833
|
`, undeployCommand = {
|
@@ -1834,8 +1837,8 @@ Examples
|
|
1834
1837
|
action: async (args, context) => (await Promise.resolve().then(function() {
|
1835
1838
|
return require("./undeployAction.js");
|
1836
1839
|
})).default(args, context),
|
1837
|
-
helpText: helpText$
|
1838
|
-
}, helpText$
|
1840
|
+
helpText: helpText$m
|
1841
|
+
}, helpText$l = `
|
1839
1842
|
Notes
|
1840
1843
|
Changing the hostname or port number might require a new entry to the CORS-origins allow list.
|
1841
1844
|
|
@@ -1851,14 +1854,14 @@ Examples
|
|
1851
1854
|
signature: "[--port <port>] [--host <host>]",
|
1852
1855
|
description: "Starts a local dev server for Sanity Studio with live reloading",
|
1853
1856
|
action: async (args, context) => (await getDevAction())(args, context),
|
1854
|
-
helpText: helpText$
|
1857
|
+
helpText: helpText$l
|
1855
1858
|
};
|
1856
1859
|
async function getDevAction() {
|
1857
1860
|
return (await Promise.resolve().then(function() {
|
1858
1861
|
return require("./devAction.js");
|
1859
1862
|
})).default;
|
1860
1863
|
}
|
1861
|
-
const helpText$
|
1864
|
+
const helpText$k = `
|
1862
1865
|
Options
|
1863
1866
|
--replace On duplicate document IDs, replace existing document with specified document(s)
|
1864
1867
|
--missing On duplicate document IDs, don't modify the target document(s)
|
@@ -1886,7 +1889,7 @@ Examples
|
|
1886
1889
|
name: "create",
|
1887
1890
|
group: "documents",
|
1888
1891
|
signature: "[FILE]",
|
1889
|
-
helpText: helpText$
|
1892
|
+
helpText: helpText$k,
|
1890
1893
|
description: "Create one or more documents",
|
1891
1894
|
// eslint-disable-next-line complexity
|
1892
1895
|
action: async (args, context) => {
|
@@ -2020,7 +2023,7 @@ function getEditor() {
|
|
2020
2023
|
args
|
2021
2024
|
};
|
2022
2025
|
}
|
2023
|
-
const helpText$
|
2026
|
+
const helpText$j = `
|
2024
2027
|
Delete a document from the projects configured dataset
|
2025
2028
|
|
2026
2029
|
Options
|
@@ -2042,7 +2045,7 @@ Example
|
|
2042
2045
|
name: "delete",
|
2043
2046
|
group: "documents",
|
2044
2047
|
signature: "[ID] [...IDS]",
|
2045
|
-
helpText: helpText$
|
2048
|
+
helpText: helpText$j,
|
2046
2049
|
description: "Delete a document by ID",
|
2047
2050
|
action: async (args, context) => {
|
2048
2051
|
const {
|
@@ -2090,7 +2093,7 @@ function colorizeJson(input, chalk) {
|
|
2090
2093
|
} : token;
|
2091
2094
|
}).map((token) => (formatters[token.type] || identity)(token.raw)).join("");
|
2092
2095
|
}
|
2093
|
-
const helpText$
|
2096
|
+
const helpText$i = `
|
2094
2097
|
Get and print a document from the projects configured dataset
|
2095
2098
|
|
2096
2099
|
Options
|
@@ -2107,7 +2110,7 @@ Examples
|
|
2107
2110
|
name: "get",
|
2108
2111
|
group: "documents",
|
2109
2112
|
signature: "[DOCUMENT_ID]",
|
2110
|
-
helpText: helpText$
|
2113
|
+
helpText: helpText$i,
|
2111
2114
|
description: "Get and print a document by ID",
|
2112
2115
|
action: async (args, context) => {
|
2113
2116
|
const {
|
@@ -2133,7 +2136,7 @@ Examples
|
|
2133
2136
|
${err.message}`);
|
2134
2137
|
}
|
2135
2138
|
}
|
2136
|
-
}, defaultApiVersion = "v2022-06-01", helpText$
|
2139
|
+
}, defaultApiVersion = "v2022-06-01", helpText$h = `
|
2137
2140
|
Run a query against the projects configured dataset
|
2138
2141
|
|
2139
2142
|
Options
|
@@ -2161,7 +2164,7 @@ var queryDocumentsCommand = {
|
|
2161
2164
|
name: "query",
|
2162
2165
|
group: "documents",
|
2163
2166
|
signature: "[QUERY]",
|
2164
|
-
helpText: helpText$
|
2167
|
+
helpText: helpText$h,
|
2165
2168
|
description: "Query for documents",
|
2166
2169
|
action: async (args, context) => {
|
2167
2170
|
const {
|
@@ -2223,7 +2226,7 @@ function parseCliFlags$1(args) {
|
|
2223
2226
|
default: fallbackApiVersion
|
2224
2227
|
}).argv;
|
2225
2228
|
}
|
2226
|
-
const description$
|
2229
|
+
const description$5 = "Downloads and validates all document specified in a workspace", helpText$g = `
|
2227
2230
|
Options
|
2228
2231
|
-y, --yes Skips the first confirmation prompt.
|
2229
2232
|
--workspace <name> The name of the workspace to use when downloading and validating all documents.
|
@@ -2250,12 +2253,12 @@ Examples
|
|
2250
2253
|
name: "validate",
|
2251
2254
|
group: "documents",
|
2252
2255
|
signature: "",
|
2253
|
-
description: description$
|
2254
|
-
helpText: helpText$
|
2256
|
+
description: description$5,
|
2257
|
+
helpText: helpText$g,
|
2255
2258
|
action: async (args, context) => (await Promise.resolve().then(function() {
|
2256
2259
|
return require("./validateAction2.js");
|
2257
2260
|
})).default(args, context)
|
2258
|
-
}, helpText$
|
2261
|
+
}, helpText$f = `
|
2259
2262
|
Options
|
2260
2263
|
--with-user-token Prime access token from CLI config into getCliClient()
|
2261
2264
|
--mock-browser-env Mocks a browser-like environment using jsdom
|
@@ -2280,11 +2283,11 @@ Examples
|
|
2280
2283
|
name: "exec",
|
2281
2284
|
signature: "SCRIPT",
|
2282
2285
|
description: "Executes a script within the Sanity Studio context",
|
2283
|
-
helpText: helpText$
|
2286
|
+
helpText: helpText$f,
|
2284
2287
|
action: async (args, context) => (await Promise.resolve().then(function() {
|
2285
2288
|
return require("./execScript.js");
|
2286
2289
|
})).default(args, context)
|
2287
|
-
}, helpText$
|
2290
|
+
}, helpText$e = `
|
2288
2291
|
Options
|
2289
2292
|
--api <api-id> Undeploy API with this ID (project, dataset and tag flags takes preference)
|
2290
2293
|
--project <projectId> Project ID to delete GraphQL API for
|
@@ -2305,8 +2308,8 @@ Examples
|
|
2305
2308
|
action: async (args, context) => (await Promise.resolve().then(function() {
|
2306
2309
|
return require("./deleteApiAction.js");
|
2307
2310
|
})).default(args, context),
|
2308
|
-
helpText: helpText$
|
2309
|
-
}, helpText$
|
2311
|
+
helpText: helpText$e
|
2312
|
+
}, helpText$d = `
|
2310
2313
|
Options
|
2311
2314
|
--dry-run Validate defined APIs, exiting with an error on breaking changes
|
2312
2315
|
--force Deploy API without confirming breaking changes
|
@@ -2344,13 +2347,13 @@ Examples
|
|
2344
2347
|
action: async (args, context) => (await Promise.resolve().then(function() {
|
2345
2348
|
return require("./deployApiAction.js");
|
2346
2349
|
})).default(args, context),
|
2347
|
-
helpText: helpText$
|
2350
|
+
helpText: helpText$d
|
2348
2351
|
}, graphqlGroup = {
|
2349
2352
|
name: "graphql",
|
2350
2353
|
signature: "[COMMAND]",
|
2351
2354
|
isGroupRoot: !0,
|
2352
2355
|
description: "Deploys changes to your project's GraphQL API(s)"
|
2353
|
-
}, helpText$
|
2356
|
+
}, helpText$c = `
|
2354
2357
|
Examples
|
2355
2358
|
sanity graphql list
|
2356
2359
|
`, listGraphQLAPIsCommand = {
|
@@ -2361,7 +2364,7 @@ Examples
|
|
2361
2364
|
action: async (args, context) => (await Promise.resolve().then(function() {
|
2362
2365
|
return require("./listApisAction.js");
|
2363
2366
|
})).default(args, context),
|
2364
|
-
helpText: helpText$
|
2367
|
+
helpText: helpText$c
|
2365
2368
|
}, createHookCommand = {
|
2366
2369
|
name: "create",
|
2367
2370
|
group: "hook",
|
@@ -2606,7 +2609,7 @@ ${err.message}`);
|
|
2606
2609
|
output.print(`Name: ${hook.name}`), output.print(`Dataset: ${hook.dataset}`), output.print(`URL: ${hook.url}`), hook.type === "document" && (output.print(`HTTP method: ${hook.httpMethod}`), hook.description && output.print(`Description: ${hook.description}`)), output.print("");
|
2607
2610
|
});
|
2608
2611
|
}
|
2609
|
-
}, description$
|
2612
|
+
}, description$4 = "Extracts the studio configuration as one or more JSON manifest files.", helpText$b = `
|
2610
2613
|
**Note**: This command is experimental and subject to change. It is currently intended for use with Create only.
|
2611
2614
|
|
2612
2615
|
Options
|
@@ -2622,8 +2625,8 @@ Examples
|
|
2622
2625
|
name: "extract",
|
2623
2626
|
group: "manifest",
|
2624
2627
|
signature: "",
|
2625
|
-
description: description$
|
2626
|
-
helpText: helpText$
|
2628
|
+
description: description$4,
|
2629
|
+
helpText: helpText$b,
|
2627
2630
|
action: async (args, context) => {
|
2628
2631
|
const {
|
2629
2632
|
extractManifestSafe
|
@@ -2799,7 +2802,7 @@ ${documentTypes.length > 0 ? ` documentTypes: [${documentTypes.map((t) => JSON.
|
|
2799
2802
|
},
|
2800
2803
|
},
|
2801
2804
|
})
|
2802
|
-
`, helpText$
|
2805
|
+
`, helpText$a = `
|
2803
2806
|
Examples:
|
2804
2807
|
# Create a new migration, prompting for title and options
|
2805
2808
|
sanity migration create
|
@@ -2825,7 +2828,7 @@ Examples:
|
|
2825
2828
|
name: "create",
|
2826
2829
|
group: "migration",
|
2827
2830
|
signature: "[TITLE]",
|
2828
|
-
helpText: helpText$
|
2831
|
+
helpText: helpText$a,
|
2829
2832
|
description: "Create a new migration within your project",
|
2830
2833
|
action: async (args, context) => {
|
2831
2834
|
const {
|
@@ -2894,11 +2897,11 @@ function isLoadableMigrationScript(script) {
|
|
2894
2897
|
const mod = script.mod.default;
|
2895
2898
|
return typeof mod.title == "string" && mod.migrate !== void 0;
|
2896
2899
|
}
|
2897
|
-
const helpText$
|
2900
|
+
const helpText$9 = "", listMigrationCommand = {
|
2898
2901
|
name: "list",
|
2899
2902
|
group: "migration",
|
2900
2903
|
signature: "",
|
2901
|
-
helpText: helpText$
|
2904
|
+
helpText: helpText$9,
|
2902
2905
|
description: "List available migrations",
|
2903
2906
|
action: async (_, context) => {
|
2904
2907
|
const {
|
@@ -3140,7 +3143,7 @@ function indent(subject, size2 = 2) {
|
|
3140
3143
|
`).map((line) => padding + line).join(`
|
3141
3144
|
`);
|
3142
3145
|
}
|
3143
|
-
const helpText$
|
3146
|
+
const helpText$8 = `
|
3144
3147
|
Options
|
3145
3148
|
--no-dry-run By default the migration runs in dry mode. Pass this option to migrate dataset.
|
3146
3149
|
--concurrency <concurrent> How many mutation requests to run in parallel. Must be between 1 and ${migrate.MAX_MUTATION_CONCURRENCY}. Default: ${migrate.DEFAULT_MUTATION_CONCURRENCY}.
|
@@ -3186,7 +3189,7 @@ const runMigrationCommand = {
|
|
3186
3189
|
name: "run",
|
3187
3190
|
group: "migration",
|
3188
3191
|
signature: "ID",
|
3189
|
-
helpText: helpText$
|
3192
|
+
helpText: helpText$8,
|
3190
3193
|
description: "Run a migration against a dataset",
|
3191
3194
|
// eslint-disable-next-line max-statements
|
3192
3195
|
action: async (args, context) => {
|
@@ -3337,7 +3340,7 @@ ${chalk.yellow(chalk.bold("Note: During migrations, your webhooks stay active.")
|
|
3337
3340
|
})));
|
3338
3341
|
}
|
3339
3342
|
}
|
3340
|
-
}, helpText$
|
3343
|
+
}, helpText$7 = `
|
3341
3344
|
Notes
|
3342
3345
|
Changing the hostname or port number might require a new entry to the CORS-origins allow list.
|
3343
3346
|
|
@@ -3354,14 +3357,14 @@ Examples
|
|
3354
3357
|
signature: "[BUILD_OUTPUT_DIR] [--port <port>] [--host <host>]",
|
3355
3358
|
description: "Starts a server to preview a production build of Sanity Studio",
|
3356
3359
|
action: async (args, context) => (await getPreviewAction$1())(args, context),
|
3357
|
-
helpText: helpText$
|
3360
|
+
helpText: helpText$7
|
3358
3361
|
};
|
3359
3362
|
async function getPreviewAction$1() {
|
3360
3363
|
return (await Promise.resolve().then(function() {
|
3361
3364
|
return require("./previewAction.js");
|
3362
3365
|
})).default;
|
3363
3366
|
}
|
3364
|
-
const description$
|
3367
|
+
const description$3 = "Extracts a JSON representation of a Sanity schema within a Studio context.", helpText$6 = `
|
3365
3368
|
**Note**: This command is experimental and subject to change.
|
3366
3369
|
|
3367
3370
|
Options
|
@@ -3377,11 +3380,30 @@ Examples
|
|
3377
3380
|
name: "extract",
|
3378
3381
|
group: "schema",
|
3379
3382
|
signature: "",
|
3380
|
-
description: description$
|
3381
|
-
helpText: helpText$
|
3383
|
+
description: description$3,
|
3384
|
+
helpText: helpText$6,
|
3382
3385
|
action: async (args, context) => (await Promise.resolve().then(function() {
|
3383
3386
|
return require("./extractAction.js");
|
3384
3387
|
})).default(args, context)
|
3388
|
+
}, description$2 = "Extracts a JSON representation of a Sanity schema within a Studio context.", helpText$5 = `
|
3389
|
+
**Note**: This command is experimental and subject to change.
|
3390
|
+
|
3391
|
+
Options
|
3392
|
+
--workspace-name The name of the workspace to fetch the stored schema for
|
3393
|
+
--dataset The dataset to fetch the schema from
|
3394
|
+
|
3395
|
+
Examples
|
3396
|
+
# Fetch the stored schema for the workspace 'default' in the dataset 'sanity-test'
|
3397
|
+
sanity schema fetch --workspaceName default --dataset sanity-test
|
3398
|
+
`, fetchSchemaCommand = {
|
3399
|
+
name: "fetch",
|
3400
|
+
group: "schema",
|
3401
|
+
signature: "",
|
3402
|
+
description: description$2,
|
3403
|
+
helpText: helpText$5,
|
3404
|
+
action: async (args, context) => (await Promise.resolve().then(function() {
|
3405
|
+
return require("./fetchSchemaAction.js");
|
3406
|
+
})).default(args, context)
|
3385
3407
|
};
|
3386
3408
|
var schemaGroup = {
|
3387
3409
|
name: "schema",
|
@@ -3389,7 +3411,27 @@ var schemaGroup = {
|
|
3389
3411
|
isGroupRoot: !0,
|
3390
3412
|
description: "Interacts with Sanity Studio schema configurations"
|
3391
3413
|
};
|
3392
|
-
const description = "
|
3414
|
+
const description$1 = "", helpText$4 = `
|
3415
|
+
**Note**: This command is experimental and subject to change.
|
3416
|
+
|
3417
|
+
Required options:
|
3418
|
+
--workspace-name The name of the workspace to fetch the stored schema for
|
3419
|
+
Optional options:
|
3420
|
+
--schema-path If you want to store the schema in a different path than the default one, you can specify it here.
|
3421
|
+
|
3422
|
+
Examples
|
3423
|
+
# Store the schema for the workspace 'default'
|
3424
|
+
sanity schema store --workspace-name default
|
3425
|
+
`, storeSchemaCommand = {
|
3426
|
+
name: "store",
|
3427
|
+
group: "schema",
|
3428
|
+
signature: "",
|
3429
|
+
description: description$1,
|
3430
|
+
helpText: helpText$4,
|
3431
|
+
action: async (args, context) => (await Promise.resolve().then(function() {
|
3432
|
+
return require("./storeSchemaAction.js");
|
3433
|
+
})).default(args, context)
|
3434
|
+
}, description = "Validates all schema types specified in a workspace.", helpText$3 = `
|
3393
3435
|
Options
|
3394
3436
|
--workspace <name> The name of the workspace to use when validating all schema types.
|
3395
3437
|
--format <pretty|ndjson|json> The output format used to print schema errors and warnings.
|
@@ -3620,7 +3662,7 @@ const usersGroup = {
|
|
3620
3662
|
signature: "[COMMAND]",
|
3621
3663
|
isGroupRoot: !0,
|
3622
3664
|
description: "Manages users of your Sanity project"
|
3623
|
-
}, commands = [buildCommand, datasetGroup, deployCommand, undeployCommand, listDatasetsCommand, createDatasetCommand, datasetVisibilityCommand, exportDatasetCommand, importDatasetCommand, deleteDatasetCommand, copyDatasetCommand, aliasCommand, datasetBackupGroup, listDatasetBackupCommand, downloadBackupCommand, disableDatasetBackupCommand, enableDatasetBackupCommand, corsGroup, listCorsOriginsCommand, addCorsOriginCommand, deleteCorsOriginCommand, usersGroup, inviteUserCommand, listUsersCommand, hookGroup, listHooksCommand, createHookCommand, migrationGroup, createMigrationCommand, runMigrationCommand, listMigrationCommand, deleteHookCommand, listHookLogsCommand, printHookAttemptCommand, documentsGroup, getDocumentsCommand, queryDocumentsCommand, deleteDocumentsCommand, createDocumentsCommand, validateDocumentsCommand$1, graphqlGroup, listGraphQLAPIsCommand, deployGraphQLAPICommand, deleteGraphQLAPICommand, devCommand, startCommand, schemaGroup, validateDocumentsCommand, extractSchemaCommand, previewCommand, execCommand, manifestGroup, extractManifestCommand], cliProjectCommands = {
|
3665
|
+
}, commands = [buildCommand, datasetGroup, deployCommand, undeployCommand, listDatasetsCommand, createDatasetCommand, datasetVisibilityCommand, exportDatasetCommand, importDatasetCommand, deleteDatasetCommand, copyDatasetCommand, aliasCommand, datasetBackupGroup, listDatasetBackupCommand, downloadBackupCommand, disableDatasetBackupCommand, enableDatasetBackupCommand, corsGroup, listCorsOriginsCommand, addCorsOriginCommand, deleteCorsOriginCommand, usersGroup, inviteUserCommand, listUsersCommand, hookGroup, listHooksCommand, createHookCommand, migrationGroup, createMigrationCommand, runMigrationCommand, listMigrationCommand, deleteHookCommand, listHookLogsCommand, printHookAttemptCommand, documentsGroup, getDocumentsCommand, queryDocumentsCommand, deleteDocumentsCommand, createDocumentsCommand, validateDocumentsCommand$1, graphqlGroup, listGraphQLAPIsCommand, deployGraphQLAPICommand, deleteGraphQLAPICommand, devCommand, startCommand, schemaGroup, validateDocumentsCommand, extractSchemaCommand, previewCommand, fetchSchemaCommand, storeSchemaCommand, execCommand, manifestGroup, extractManifestCommand], cliProjectCommands = {
|
3624
3666
|
requiredCliVersionRange: "^3.0.0",
|
3625
3667
|
commands
|
3626
3668
|
};
|