@sanity/runtime-cli 14.8.5 → 14.9.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/README.md +35 -30
- package/dist/actions/blueprints/blueprint.d.ts +4 -0
- package/dist/actions/blueprints/blueprint.js +6 -0
- package/dist/baseCommands.d.ts +21 -8
- package/dist/baseCommands.js +54 -15
- package/dist/commands/blueprints/add.js +3 -3
- package/dist/commands/blueprints/config.js +4 -4
- package/dist/commands/blueprints/deploy.js +5 -5
- package/dist/commands/blueprints/destroy.js +5 -5
- package/dist/commands/blueprints/doctor.d.ts +1 -1
- package/dist/commands/blueprints/doctor.js +7 -5
- package/dist/commands/blueprints/info.js +5 -5
- package/dist/commands/blueprints/init.js +4 -4
- package/dist/commands/blueprints/logs.js +6 -6
- package/dist/commands/blueprints/plan.js +5 -5
- package/dist/commands/blueprints/promote.js +8 -6
- package/dist/commands/blueprints/stacks.js +5 -5
- package/dist/commands/functions/add.js +3 -3
- package/dist/commands/functions/build.js +4 -4
- package/dist/commands/functions/dev.js +5 -5
- package/dist/commands/functions/env/add.js +4 -4
- package/dist/commands/functions/env/list.js +4 -4
- package/dist/commands/functions/env/remove.js +4 -4
- package/dist/commands/functions/logs.js +4 -4
- package/dist/commands/functions/test.js +4 -4
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/cores/blueprints/config.js +0 -1
- package/dist/cores/blueprints/deploy.js +44 -12
- package/dist/cores/blueprints/destroy.js +18 -3
- package/dist/cores/blueprints/doctor.js +9 -2
- package/dist/cores/blueprints/plan.js +21 -13
- package/dist/cores/blueprints/promote.js +11 -3
- package/dist/cores/blueprints/stacks.js +14 -3
- package/dist/cores/functions/add.js +1 -1
- package/dist/cores/functions/build.js +3 -5
- package/dist/cores/functions/logs.js +1 -1
- package/dist/cores/functions/test.js +10 -5
- package/dist/cores/index.d.ts +6 -0
- package/dist/cores/index.js +0 -3
- package/dist/server/handlers/invoke.js +3 -3
- package/dist/utils/display/blueprints-formatting.js +2 -1
- package/dist/utils/display/resources-formatting.js +8 -3
- package/dist/utils/find-function.d.ts +7 -6
- package/dist/utils/find-function.js +5 -3
- package/dist/utils/functions/detect-native-modules.js +5 -1
- package/dist/utils/invoke-local.js +1 -1
- package/dist/utils/types.d.ts +3 -3
- package/oclif.manifest.json +13 -10
- package/package.json +2 -2
|
@@ -127,7 +127,7 @@ export async function functionAddCore(options) {
|
|
|
127
127
|
}
|
|
128
128
|
try {
|
|
129
129
|
const fnName = flagResourceName || (await promptForFunctionName());
|
|
130
|
-
if (blueprint.
|
|
130
|
+
if (blueprint.resources.some((r) => r.name === fnName)) {
|
|
131
131
|
return {
|
|
132
132
|
success: false,
|
|
133
133
|
error: `Function "${styleText('bold', fnName)}" already exists.`,
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { pathToZip } from '../../actions/blueprints/assets.js';
|
|
4
|
-
import {
|
|
4
|
+
import { findFunctionInResources } from '../../utils/find-function.js';
|
|
5
5
|
import { prepareAsset } from '../../utils/functions/prepare-asset.js';
|
|
6
6
|
import { isLocalFunctionResource } from '../../utils/types.js';
|
|
7
7
|
export async function functionBuildCore(options) {
|
|
8
8
|
const { blueprint, log, args, flags } = options;
|
|
9
|
-
const
|
|
10
|
-
const allFunctions = (parsedBlueprint.resources ?? []).filter(isLocalFunctionResource);
|
|
9
|
+
const allFunctions = blueprint.resources.filter(isLocalFunctionResource);
|
|
11
10
|
if (allFunctions.length === 0) {
|
|
12
11
|
return { success: false, error: 'No functions found in blueprint.' };
|
|
13
12
|
}
|
|
14
13
|
let functions;
|
|
15
14
|
if (args.name) {
|
|
16
|
-
|
|
17
|
-
functions = [resource];
|
|
15
|
+
functions = [findFunctionInResources(blueprint.resources, args.name)];
|
|
18
16
|
}
|
|
19
17
|
else {
|
|
20
18
|
functions = allFunctions;
|
|
@@ -10,7 +10,7 @@ export async function functionLogsCore(options) {
|
|
|
10
10
|
const { name } = args;
|
|
11
11
|
const { delete: shouldDelete, watch: shouldWatch, force, limit, json, utc } = flags;
|
|
12
12
|
if (!name) {
|
|
13
|
-
const functionNames = getFunctionNames(blueprint.
|
|
13
|
+
const functionNames = getFunctionNames(blueprint.resources);
|
|
14
14
|
const validNames = functionNames.length > 0
|
|
15
15
|
? `Valid names are: ${functionNames.join(', ')}`
|
|
16
16
|
: 'No functions are defined in the blueprint.';
|
|
@@ -5,7 +5,7 @@ import { testAction } from '../../actions/functions/test.js';
|
|
|
5
5
|
import config from '../../config.js';
|
|
6
6
|
import { SANITY_FUNCTION_DOCUMENT, SANITY_FUNCTION_MEDIA_LIBRARY_ASSET } from '../../constants.js';
|
|
7
7
|
import buildPayload from '../../utils/build-payload.js';
|
|
8
|
-
import {
|
|
8
|
+
import { findFunctionInResources, getFunctionNames } from '../../utils/find-function.js';
|
|
9
9
|
import { fetchAsset, fetchDocument } from '../../utils/functions/fetch-document.js';
|
|
10
10
|
import { parseJsonObject } from '../../utils/parse-json-object.js';
|
|
11
11
|
import { isEventType, isGroqContextOptions, } from '../../utils/types.js';
|
|
@@ -13,10 +13,9 @@ export async function functionTestCore(options) {
|
|
|
13
13
|
const { blueprint, log, error, args, flags, helpText } = options;
|
|
14
14
|
const { name: fnName } = args;
|
|
15
15
|
const { data, event, file, timeout, api, dataset, 'document-id': documentId, 'with-user-token': withUserToken, 'data-before': dataBefore, 'data-after': dataAfter, 'file-before': fileBefore, 'file-after': fileAfter, 'document-id-before': documentIdBefore, 'document-id-after': documentIdAfter, 'media-library-id': mediaLibraryId, } = flags;
|
|
16
|
-
const { parsedBlueprint } = blueprint;
|
|
17
16
|
const { 'project-id': projectId = blueprint?.projectId, 'organization-id': organizationId = blueprint?.organizationId, } = flags;
|
|
18
17
|
if (!fnName) {
|
|
19
|
-
const functionNames = getFunctionNames(blueprint.
|
|
18
|
+
const functionNames = getFunctionNames(blueprint.resources);
|
|
20
19
|
const validNames = functionNames.length > 0
|
|
21
20
|
? `Valid names are: ${functionNames.join(', ')}`
|
|
22
21
|
: 'No functions are defined in the blueprint.';
|
|
@@ -38,7 +37,7 @@ export async function functionTestCore(options) {
|
|
|
38
37
|
};
|
|
39
38
|
}
|
|
40
39
|
try {
|
|
41
|
-
const resource =
|
|
40
|
+
const resource = findFunctionInResources(blueprint.resources, fnName); // throws if not found
|
|
42
41
|
const docFunction = resource.type === SANITY_FUNCTION_DOCUMENT;
|
|
43
42
|
const mediaFunction = resource.type === SANITY_FUNCTION_MEDIA_LIBRARY_ASSET;
|
|
44
43
|
const contextOptions = docFunction || mediaFunction
|
|
@@ -143,9 +142,15 @@ export async function functionTestCore(options) {
|
|
|
143
142
|
});
|
|
144
143
|
if (error) {
|
|
145
144
|
spinner.fail('Function execution failed.');
|
|
145
|
+
const errorMessage = error.stack || error.message || error.name;
|
|
146
|
+
const isTimeout = error.message?.includes('Timeout');
|
|
146
147
|
return {
|
|
147
148
|
success: false,
|
|
148
|
-
error:
|
|
149
|
+
error: errorMessage,
|
|
150
|
+
ref: isTimeout ? 'https://www.sanity.io/docs/help/functions-timeout' : undefined,
|
|
151
|
+
suggestions: isTimeout
|
|
152
|
+
? ['Increase the timeout in your Blueprint function configuration.']
|
|
153
|
+
: undefined,
|
|
149
154
|
};
|
|
150
155
|
}
|
|
151
156
|
spinner.succeed('Function execution succeeded.');
|
package/dist/cores/index.d.ts
CHANGED
|
@@ -35,6 +35,12 @@ export type CoreResult = {
|
|
|
35
35
|
success: false;
|
|
36
36
|
/** The error message, if the operation failed. */
|
|
37
37
|
error: string;
|
|
38
|
+
/** Actionable suggestions displayed to the user via oclif's PrettyPrintableError. */
|
|
39
|
+
suggestions?: string[];
|
|
40
|
+
/** A URL for more information about the error. */
|
|
41
|
+
ref?: string;
|
|
42
|
+
/** A machine-readable error code. */
|
|
43
|
+
code?: string;
|
|
38
44
|
streaming?: never;
|
|
39
45
|
json?: never;
|
|
40
46
|
} | {
|
package/dist/cores/index.js
CHANGED
|
@@ -42,7 +42,6 @@ export async function initDeployedBlueprintConfig(config) {
|
|
|
42
42
|
}
|
|
43
43
|
const { scopeType, scopeId, stackId: blueprintStackId } = config.blueprint;
|
|
44
44
|
if (!scopeType || !scopeId) {
|
|
45
|
-
config.log(`Incomplete configuration. Run \`${config.bin} blueprints doctor\` for diagnostics.`);
|
|
46
45
|
return { ok: false, error: 'Missing scope configuration for Blueprint' };
|
|
47
46
|
}
|
|
48
47
|
const auth = { token: config.token, scopeType, scopeId };
|
|
@@ -51,14 +50,12 @@ export async function initDeployedBlueprintConfig(config) {
|
|
|
51
50
|
stackId = await resolveStackIdByNameOrId(config.stackOverride, auth, config.log);
|
|
52
51
|
}
|
|
53
52
|
if (!stackId) {
|
|
54
|
-
config.log(`Incomplete configuration. Run \`${config.bin} blueprints doctor\` for diagnostics.`);
|
|
55
53
|
return { ok: false, error: 'Missing Stack deployment configuration for Blueprint' };
|
|
56
54
|
}
|
|
57
55
|
const spinner = config.log.ora('Loading Stack deployment...').start();
|
|
58
56
|
const stackResponse = await getStack({ stackId, auth, logger: config.log });
|
|
59
57
|
if (!stackResponse.ok) {
|
|
60
58
|
spinner.fail('Could not load Stack deployment');
|
|
61
|
-
config.log(`Run \`${config.bin} blueprints doctor\` for diagnostics.`);
|
|
62
59
|
return { ok: false, error: 'Missing Stack deployment' };
|
|
63
60
|
}
|
|
64
61
|
spinner.stop().clear();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { readLocalBlueprint } from '../../actions/blueprints/blueprint.js';
|
|
2
|
-
import {
|
|
2
|
+
import { findFunctionInResources } from '../../utils/find-function.js';
|
|
3
3
|
import invoke from '../../utils/invoke-local.js';
|
|
4
4
|
export async function handleInvokeRequest(functionName, event, metadata, context, logger, validateResources, executionOptions) {
|
|
5
5
|
const start = performance.now();
|
|
6
|
-
const
|
|
7
|
-
const resource =
|
|
6
|
+
const blueprint = await readLocalBlueprint(logger, { resources: validateResources });
|
|
7
|
+
const resource = findFunctionInResources(blueprint.resources, functionName);
|
|
8
8
|
const readBlueprintTime = performance.now() - start;
|
|
9
9
|
const payload = {
|
|
10
10
|
payload: event,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { treeify } from 'array-treeify';
|
|
2
|
-
import { SANITY_ACCESS_ROBOT, SANITY_ACCESS_ROLE, SANITY_FUNCTION_DOCUMENT, SANITY_FUNCTION_MEDIA_LIBRARY_ASSET, SANITY_FUNCTION_SCHEDULED, SANITY_PROJECT, SANITY_PROJECT_CORS, SANITY_PROJECT_DATASET, SANITY_PROJECT_WEBHOOK, } from '../../constants.js';
|
|
2
|
+
import { SANITY_ACCESS_ROBOT, SANITY_ACCESS_ROLE, SANITY_FUNCTION_DOCUMENT, SANITY_FUNCTION_MEDIA_LIBRARY_ASSET, SANITY_FUNCTION_SCHEDULED, SANITY_FUNCTION_SYNC_TAG_INVALIDATE, SANITY_PROJECT, SANITY_PROJECT_CORS, SANITY_PROJECT_DATASET, SANITY_PROJECT_WEBHOOK, } from '../../constants.js';
|
|
3
3
|
import { styleText } from '../style-text.js';
|
|
4
4
|
import { isCorsOriginResource, isDatasetResource, isRobotResource, isRoleResource, isWebhookResource, } from '../types.js';
|
|
5
5
|
import { formatDate, formatDuration } from './dates.js';
|
|
@@ -28,6 +28,7 @@ const RESOURCE_CATEGORIES = {
|
|
|
28
28
|
[SANITY_FUNCTION_DOCUMENT]: functionCategory,
|
|
29
29
|
[SANITY_FUNCTION_MEDIA_LIBRARY_ASSET]: functionCategory,
|
|
30
30
|
[SANITY_FUNCTION_SCHEDULED]: functionCategory,
|
|
31
|
+
[SANITY_FUNCTION_SYNC_TAG_INVALIDATE]: functionCategory,
|
|
31
32
|
[SANITY_PROJECT]: {
|
|
32
33
|
label: 'Projects',
|
|
33
34
|
displayNameAttribute: 'displayName',
|
|
@@ -19,15 +19,20 @@ function arrayifyEvent(event) {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
22
|
-
if (event.on) {
|
|
22
|
+
if ('on' in event && event.on) {
|
|
23
23
|
details.push(formatLabeledValue('on', event.on.map((o) => `"${o}"`).join(', ')));
|
|
24
24
|
}
|
|
25
|
-
if (event.filter) {
|
|
25
|
+
if ('filter' in event && event.filter) {
|
|
26
26
|
details.push(formatLabeledValue('filter', event.filter));
|
|
27
27
|
}
|
|
28
|
-
if (event.projection) {
|
|
28
|
+
if ('projection' in event && event.projection) {
|
|
29
29
|
details.push(formatLabeledValue('projection', event.projection));
|
|
30
30
|
}
|
|
31
|
+
// TODO: expose event.resource details once we are ready
|
|
32
|
+
// https://linear.app/sanity/issue/RUN-1246/cli-should-show-eventresource-details-in-blueprints-infoplans
|
|
33
|
+
// if (event.resource) {
|
|
34
|
+
// details.push(formatLabeledValue('resource', JSON.stringify(event.resource)))
|
|
35
|
+
// }
|
|
31
36
|
}
|
|
32
37
|
return details;
|
|
33
38
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BlueprintResource } from '@sanity/blueprints';
|
|
2
2
|
import { type DeployedResource, type FunctionResource, type Stack } from './types.js';
|
|
3
|
-
export declare function getFunctionNames(resources:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
export declare function getFunctionNames(resources: BlueprintResource[] | undefined): string[];
|
|
4
|
+
export declare function findFunctionInResources(resources: BlueprintResource[], name: string): FunctionResource;
|
|
5
|
+
/** @deprecated Use findFunctionInResources instead */
|
|
6
|
+
export declare const findFunctionInBlueprint: (blueprint: {
|
|
7
|
+
resources?: BlueprintResource[];
|
|
8
|
+
}, name: string) => FunctionResource;
|
|
8
9
|
export declare function findFunctionInStack(stack: Stack, name: string): DeployedResource;
|
|
@@ -2,16 +2,18 @@ import { SANITY_FUNCTION_PREFIX } from '../constants.js';
|
|
|
2
2
|
import { isLocalFunctionResource, } from './types.js';
|
|
3
3
|
export function getFunctionNames(resources) {
|
|
4
4
|
return (resources
|
|
5
|
-
?.filter((r) => r
|
|
5
|
+
?.filter((r) => r.type.startsWith(SANITY_FUNCTION_PREFIX))
|
|
6
6
|
.map((r) => r.name)
|
|
7
7
|
.filter((name) => typeof name === 'string') ?? []);
|
|
8
8
|
}
|
|
9
|
-
export function
|
|
10
|
-
const func =
|
|
9
|
+
export function findFunctionInResources(resources, name) {
|
|
10
|
+
const func = resources.filter(isLocalFunctionResource).find((r) => r.name === name);
|
|
11
11
|
if (!func)
|
|
12
12
|
throw Error(`Unable to find function ${name}`);
|
|
13
13
|
return func;
|
|
14
14
|
}
|
|
15
|
+
/** @deprecated Use findFunctionInResources instead */
|
|
16
|
+
export const findFunctionInBlueprint = (blueprint, name) => findFunctionInResources(blueprint?.resources ?? [], name);
|
|
15
17
|
export function findFunctionInStack(stack, name) {
|
|
16
18
|
const func = stack?.resources?.filter(isLocalFunctionResource).find((r) => r.name === name);
|
|
17
19
|
if (!func)
|
|
@@ -9,7 +9,11 @@ export const errorMessage = (elements) => `Native modules detected:\n${elements.
|
|
|
9
9
|
* Quick helper so we can recurse through pnpm symlinks if they exist
|
|
10
10
|
* Fallback to statSync if it's a symlink
|
|
11
11
|
*/
|
|
12
|
-
const isDirEntry = (dir, parent) =>
|
|
12
|
+
const isDirEntry = (dir, parent) => {
|
|
13
|
+
return (dir.isDirectory() ||
|
|
14
|
+
(dir.isSymbolicLink() &&
|
|
15
|
+
statSync(path.join(parent, dir.name), { throwIfNoEntry: false })?.isDirectory()));
|
|
16
|
+
};
|
|
13
17
|
/**
|
|
14
18
|
* Recursively checks a directory for files that match known native module patterns.
|
|
15
19
|
*/
|
|
@@ -150,7 +150,7 @@ export default async function invoke(resource, payload, context, options) {
|
|
|
150
150
|
});
|
|
151
151
|
timer = setTimeout(() => {
|
|
152
152
|
shutdown();
|
|
153
|
-
reject(new Error(`Timeout:
|
|
153
|
+
reject(new Error(`Timeout: Function exceeded the ${timeout}-second time limit.`));
|
|
154
154
|
}, timeout * 1000);
|
|
155
155
|
const payload = {
|
|
156
156
|
data: { ...filteredData },
|
package/dist/utils/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BlueprintCorsOriginResource, type BlueprintDatasetResource, type BlueprintDocumentFunctionResource, type BlueprintDocumentWebhookResource, type BlueprintMediaLibraryAssetFunctionResource, type BlueprintProjectResource, type BlueprintResource, type BlueprintRobotResource, type BlueprintRoleResource, type BlueprintScheduledFunctionResource } from '@sanity/blueprints';
|
|
1
|
+
import { type BlueprintCorsOriginResource, type BlueprintDatasetResource, type BlueprintDocumentFunctionResource, type BlueprintDocumentWebhookResource, type BlueprintMediaLibraryAssetFunctionResource, type BlueprintProjectResource, type BlueprintResource, type BlueprintRobotResource, type BlueprintRoleResource, type BlueprintScheduledFunctionResource, type BlueprintSyncTagInvalidateFunctionResource } from '@sanity/blueprints';
|
|
2
2
|
export type ScopeType = 'organization' | 'project';
|
|
3
3
|
/** Result utility type */
|
|
4
4
|
export type Result<T, E = string> = {
|
|
@@ -15,7 +15,7 @@ export interface ActionResponse {
|
|
|
15
15
|
}
|
|
16
16
|
/** @internal */
|
|
17
17
|
export type FunctionGroqResource = BlueprintDocumentFunctionResource | BlueprintMediaLibraryAssetFunctionResource;
|
|
18
|
-
export type FunctionResource = FunctionGroqResource | BlueprintScheduledFunctionResource;
|
|
18
|
+
export type FunctionResource = FunctionGroqResource | BlueprintScheduledFunctionResource | BlueprintSyncTagInvalidateFunctionResource;
|
|
19
19
|
export interface StudioResource extends BlueprintResource {
|
|
20
20
|
type: 'sanity.studio';
|
|
21
21
|
src: string;
|
|
@@ -79,7 +79,7 @@ export interface StackMutation {
|
|
|
79
79
|
scopeType: ScopeType;
|
|
80
80
|
scopeId: string;
|
|
81
81
|
document: {
|
|
82
|
-
resources?:
|
|
82
|
+
resources?: BlueprintResource[];
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
/** @internal */
|
package/oclif.manifest.json
CHANGED
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
"blueprints:deploy": {
|
|
315
315
|
"aliases": [],
|
|
316
316
|
"args": {},
|
|
317
|
-
"description": "
|
|
317
|
+
"description": "Applies your local Blueprint to the remote Stack, creating, updating, or removing resources as needed. This is the primary command for applying infrastructure changes.\n\nBefore deploying, run 'blueprints plan' to preview changes. After deployment, use 'blueprints info' to verify Stack status or 'blueprints logs' to monitor activity.\n\nUse --no-wait to queue the deployment and return immediately without waiting for completion.\n\nUse --fn-installer to force which package manager to use when deploying functions.\n\nSet SANITY_ASSET_TIMEOUT (seconds) to override the 60-second timeout for processing resource assets.",
|
|
318
318
|
"examples": [
|
|
319
319
|
"<%= config.bin %> <%= command.id %>",
|
|
320
320
|
"<%= config.bin %> <%= command.id %> --no-wait",
|
|
@@ -536,7 +536,7 @@
|
|
|
536
536
|
"pluginName": "@sanity/runtime-cli",
|
|
537
537
|
"pluginType": "core",
|
|
538
538
|
"strict": true,
|
|
539
|
-
"summary": "Destroy
|
|
539
|
+
"summary": "Destroy a remote Stack deployment and its resources",
|
|
540
540
|
"enableJsonFlag": true,
|
|
541
541
|
"isESM": true,
|
|
542
542
|
"relativePath": [
|
|
@@ -550,7 +550,10 @@
|
|
|
550
550
|
"aliases": [],
|
|
551
551
|
"args": {},
|
|
552
552
|
"description": "Analyzes your local Blueprint and remote Stack configuration for common issues, such as missing authentication, invalid project references, or misconfigured resources.\n\nRun this command when encountering errors with other Blueprint commands. Use --fix to interactively resolve detected issues.",
|
|
553
|
-
"examples": [
|
|
553
|
+
"examples": [
|
|
554
|
+
"<%= config.bin %> <%= command.id %>",
|
|
555
|
+
"<%= config.bin %> <%= command.id %> --fix"
|
|
556
|
+
],
|
|
554
557
|
"flags": {
|
|
555
558
|
"json": {
|
|
556
559
|
"description": "Format output as json",
|
|
@@ -681,7 +684,7 @@
|
|
|
681
684
|
"pluginName": "@sanity/runtime-cli",
|
|
682
685
|
"pluginType": "core",
|
|
683
686
|
"strict": true,
|
|
684
|
-
"summary": "
|
|
687
|
+
"summary": "Display the status and resources of the remote Stack deployment",
|
|
685
688
|
"enableJsonFlag": true,
|
|
686
689
|
"isESM": true,
|
|
687
690
|
"relativePath": [
|
|
@@ -841,7 +844,7 @@
|
|
|
841
844
|
"pluginName": "@sanity/runtime-cli",
|
|
842
845
|
"pluginType": "core",
|
|
843
846
|
"strict": true,
|
|
844
|
-
"summary": "Initialize a
|
|
847
|
+
"summary": "Initialize a Blueprint and create a remote Stack",
|
|
845
848
|
"enableJsonFlag": true,
|
|
846
849
|
"isESM": true,
|
|
847
850
|
"relativePath": [
|
|
@@ -998,7 +1001,7 @@
|
|
|
998
1001
|
"pluginName": "@sanity/runtime-cli",
|
|
999
1002
|
"pluginType": "core",
|
|
1000
1003
|
"strict": true,
|
|
1001
|
-
"summary": "
|
|
1004
|
+
"summary": "Preview changes that will be applied to the remote Stack",
|
|
1002
1005
|
"enableJsonFlag": true,
|
|
1003
1006
|
"isESM": true,
|
|
1004
1007
|
"relativePath": [
|
|
@@ -1011,7 +1014,7 @@
|
|
|
1011
1014
|
"blueprints:promote": {
|
|
1012
1015
|
"aliases": [],
|
|
1013
1016
|
"args": {},
|
|
1014
|
-
"description": "
|
|
1017
|
+
"description": "Promotes a deployed Stack to organization scope, enabling management of org-level resources. Promotion cannot be reversed.\n\nYour local Blueprint configuration will be updated to reflect the new scope.",
|
|
1015
1018
|
"examples": [
|
|
1016
1019
|
"<%= config.bin %> <%= command.id %>",
|
|
1017
1020
|
"<%= config.bin %> <%= command.id %> --stack <name-or-id>"
|
|
@@ -1081,7 +1084,7 @@
|
|
|
1081
1084
|
"pluginName": "@sanity/runtime-cli",
|
|
1082
1085
|
"pluginType": "core",
|
|
1083
1086
|
"strict": true,
|
|
1084
|
-
"summary": "Promote a Stack
|
|
1087
|
+
"summary": "Promote a Stack from project scope to organization scope",
|
|
1085
1088
|
"enableJsonFlag": true,
|
|
1086
1089
|
"isESM": true,
|
|
1087
1090
|
"relativePath": [
|
|
@@ -1177,7 +1180,7 @@
|
|
|
1177
1180
|
"pluginName": "@sanity/runtime-cli",
|
|
1178
1181
|
"pluginType": "core",
|
|
1179
1182
|
"strict": true,
|
|
1180
|
-
"summary": "List
|
|
1183
|
+
"summary": "List remote Stack deployments for your project or organization",
|
|
1181
1184
|
"enableJsonFlag": true,
|
|
1182
1185
|
"isESM": true,
|
|
1183
1186
|
"relativePath": [
|
|
@@ -2235,5 +2238,5 @@
|
|
|
2235
2238
|
]
|
|
2236
2239
|
}
|
|
2237
2240
|
},
|
|
2238
|
-
"version": "14.
|
|
2241
|
+
"version": "14.9.0"
|
|
2239
2242
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/runtime-cli",
|
|
3
3
|
"description": "Sanity's Runtime CLI for Blueprints and Functions",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.9.0",
|
|
5
5
|
"author": "Sanity Runtime Team",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"rollup": "^4.59.0",
|
|
146
146
|
"shx": "^0.4.0",
|
|
147
147
|
"ts-node": "^10.9.2",
|
|
148
|
-
"typescript": "^
|
|
148
|
+
"typescript": "^6.0.2",
|
|
149
149
|
"vitest": "4.1.0"
|
|
150
150
|
},
|
|
151
151
|
"oclif": {
|