@sanity/runtime-cli 13.4.0 → 14.0.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 (40) hide show
  1. package/README.md +41 -35
  2. package/dist/actions/blueprints/assets.js +7 -0
  3. package/dist/actions/blueprints/blueprint.js +2 -6
  4. package/dist/actions/blueprints/stacks.d.ts +1 -0
  5. package/dist/actions/blueprints/stacks.js +11 -0
  6. package/dist/baseCommands.d.ts +2 -0
  7. package/dist/baseCommands.js +6 -1
  8. package/dist/commands/blueprints/config.d.ts +1 -1
  9. package/dist/commands/blueprints/config.js +5 -5
  10. package/dist/commands/blueprints/deploy.d.ts +1 -0
  11. package/dist/commands/blueprints/deploy.js +2 -1
  12. package/dist/commands/blueprints/destroy.d.ts +1 -1
  13. package/dist/commands/blueprints/destroy.js +6 -6
  14. package/dist/commands/blueprints/info.d.ts +1 -1
  15. package/dist/commands/blueprints/info.js +4 -4
  16. package/dist/commands/blueprints/init.js +1 -1
  17. package/dist/commands/blueprints/logs.d.ts +1 -0
  18. package/dist/commands/blueprints/logs.js +2 -1
  19. package/dist/commands/blueprints/plan.d.ts +3 -0
  20. package/dist/commands/blueprints/plan.js +4 -1
  21. package/dist/commands/functions/logs.d.ts +1 -0
  22. package/dist/commands/functions/logs.js +2 -1
  23. package/dist/config.js +2 -5
  24. package/dist/cores/blueprints/config.d.ts +1 -1
  25. package/dist/cores/blueprints/config.js +17 -5
  26. package/dist/cores/blueprints/destroy.d.ts +1 -1
  27. package/dist/cores/blueprints/destroy.js +15 -10
  28. package/dist/cores/blueprints/info.d.ts +1 -3
  29. package/dist/cores/blueprints/info.js +5 -20
  30. package/dist/cores/blueprints/init.js +1 -1
  31. package/dist/cores/blueprints/plan.d.ts +1 -0
  32. package/dist/cores/blueprints/plan.js +20 -15
  33. package/dist/cores/index.d.ts +1 -0
  34. package/dist/cores/index.js +12 -7
  35. package/dist/server/static/index.html +2 -2
  36. package/dist/utils/functions/detect-native-modules.d.ts +6 -0
  37. package/dist/utils/functions/detect-native-modules.js +26 -0
  38. package/dist/utils/transpile/transpile-function.js +2 -2
  39. package/oclif.manifest.json +78 -20
  40. package/package.json +16 -16
package/dist/config.js CHANGED
@@ -1,17 +1,14 @@
1
1
  import { readFileSync } from 'node:fs';
2
2
  import { env } from 'node:process';
3
3
  import { fileURLToPath } from 'node:url';
4
- import { findUpSync } from 'find-up';
4
+ import * as pkg from 'empathic/package';
5
5
  import getToken from './utils/get-token.js';
6
6
  export const BLUEPRINT_CONFIG_VERSION = 'v2025-05-08';
7
7
  export const BLUEPRINT_CONFIG_DIR = '.sanity';
8
8
  export const BLUEPRINT_CONFIG_FILE = 'blueprint.config.json';
9
9
  export let RUNTIME_CLI_VERSION;
10
10
  try {
11
- const packageJsonPath = findUpSync('package.json', {
12
- cwd: fileURLToPath(new URL('.', import.meta.url)),
13
- type: 'file',
14
- });
11
+ const packageJsonPath = pkg.up({ cwd: fileURLToPath(new URL('.', import.meta.url)) });
15
12
  if (packageJsonPath) {
16
13
  const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
17
14
  if (packageJson.name === '@sanity/runtime-cli') {
@@ -4,7 +4,7 @@ export interface BlueprintConfigOptions extends BlueprintConfig {
4
4
  edit?: boolean;
5
5
  'project-id'?: string;
6
6
  'organization-id'?: string;
7
- 'stack-id'?: string;
7
+ stack?: string;
8
8
  verbose?: boolean;
9
9
  };
10
10
  }
@@ -1,11 +1,12 @@
1
1
  import { patchConfigFile, writeConfigFile, } from '../../actions/blueprints/config.js';
2
+ import { resolveStackIdByNameOrId } from '../../actions/blueprints/stacks.js';
2
3
  import { filePathRelativeToCwd, labeledId, warn } from '../../utils/display/presenters.js';
3
4
  import { promptForProject, promptForStack } from '../../utils/display/prompt.js';
4
5
  import { styleText } from '../../utils/style-text.js';
5
6
  export async function blueprintConfigCore(options) {
6
7
  const { bin = 'sanity', blueprint, log, token, flags } = options;
7
- const { edit: editConfig = false, 'project-id': flagProjectId, 'organization-id': flagOrganizationId, 'stack-id': flagStackId, verbose: _v = false, } = flags;
8
- const providedConfigFlag = [flagProjectId, flagStackId, flagOrganizationId].some(Boolean);
8
+ const { edit: editConfig = false, 'project-id': flagProjectId, 'organization-id': flagOrganizationId, stack: flagStack, verbose: _v = false, } = flags;
9
+ const providedConfigFlag = [flagProjectId, flagStack, flagOrganizationId].some(Boolean);
9
10
  const { stackId: configStackId, scopeType: configScopeType, scopeId: configScopeId, blueprintConfig, fileInfo, } = blueprint;
10
11
  const blueprintFilePath = fileInfo.blueprintFilePath;
11
12
  if (!configStackId && !configScopeType && !configScopeId) {
@@ -34,8 +35,16 @@ export async function blueprintConfigCore(options) {
34
35
  const configUpdate = {};
35
36
  if (flagProjectId)
36
37
  configUpdate.projectId = flagProjectId;
37
- if (flagStackId)
38
- configUpdate.stackId = flagStackId;
38
+ if (flagStack) {
39
+ const scopeType = flagProjectId ? 'project' : configScopeType;
40
+ const scopeId = flagProjectId || configScopeId;
41
+ if (scopeType && scopeId) {
42
+ configUpdate.stackId = await resolveStackIdByNameOrId(flagStack, { token, scopeType, scopeId }, log);
43
+ }
44
+ else {
45
+ configUpdate.stackId = flagStack;
46
+ }
47
+ }
39
48
  if (flagOrganizationId)
40
49
  configUpdate.organizationId = flagOrganizationId;
41
50
  try {
@@ -60,7 +69,10 @@ export async function blueprintConfigCore(options) {
60
69
  }
61
70
  if (!updatedProjectId)
62
71
  return { success: false, error: 'Project ID is required.' };
63
- let updatedStackId = flagStackId;
72
+ let updatedStackId;
73
+ if (flagStack) {
74
+ updatedStackId = await resolveStackIdByNameOrId(flagStack, { token, scopeType: 'project', scopeId: updatedProjectId }, log);
75
+ }
64
76
  if (!updatedStackId) {
65
77
  const pickedStack = await promptForStack({ projectId: updatedProjectId, token, logger: log });
66
78
  updatedStackId = pickedStack.stackId;
@@ -4,7 +4,7 @@ export interface BlueprintDestroyOptions extends BlueprintConfig {
4
4
  force?: boolean;
5
5
  'project-id'?: string;
6
6
  'organization-id'?: string;
7
- 'stack-id'?: string;
7
+ stack?: string;
8
8
  'no-wait'?: boolean;
9
9
  verbose?: boolean;
10
10
  };
@@ -1,14 +1,14 @@
1
1
  import { setTimeout } from 'node:timers/promises';
2
2
  import { confirm } from '@inquirer/prompts';
3
3
  import { setupLogStreaming } from '../../actions/blueprints/logs-streaming.js';
4
- import { destroyStack, getStack } from '../../actions/blueprints/stacks.js';
4
+ import { destroyStack, getStack, resolveStackIdByNameOrId } from '../../actions/blueprints/stacks.js';
5
5
  import { niceId } from '../../utils/display/presenters.js';
6
6
  import { styleText } from '../../utils/style-text.js';
7
7
  export async function blueprintDestroyCore(options) {
8
8
  const { log, token, blueprint, flags } = options;
9
- const { force = false, 'project-id': flagProjectId, 'organization-id': flagOrganizationId, 'stack-id': flagStackId, 'no-wait': noWait = false, verbose: _verbose = false, } = flags;
9
+ const { force = false, 'project-id': flagProjectId, 'organization-id': flagOrganizationId, stack: flagStack, 'no-wait': noWait = false, verbose: _verbose = false, } = flags;
10
10
  // 3-flag combo: just destroy it
11
- if ((flagProjectId || flagOrganizationId) && flagStackId && force) {
11
+ if ((flagProjectId || flagOrganizationId) && flagStack && force) {
12
12
  let scopeType;
13
13
  let scopeId;
14
14
  if (flagOrganizationId) {
@@ -22,9 +22,11 @@ export async function blueprintDestroyCore(options) {
22
22
  else {
23
23
  return { success: false, error: 'Unable to determine scope for Blueprint Destroy' };
24
24
  }
25
+ const auth = { token, scopeType, scopeId };
26
+ const resolvedId = await resolveStackIdByNameOrId(flagStack, auth, log);
25
27
  const { ok, error, stack } = await destroyStack({
26
- stackId: flagStackId,
27
- auth: { token, scopeType, scopeId },
28
+ stackId: resolvedId,
29
+ auth,
28
30
  logger: log,
29
31
  });
30
32
  if (!ok)
@@ -36,13 +38,16 @@ export async function blueprintDestroyCore(options) {
36
38
  if (!scopeType || !scopeId)
37
39
  return { success: false, error: 'Scope is required' };
38
40
  const auth = { token, scopeType, scopeId };
41
+ const resolvedStackId = flagStack
42
+ ? await resolveStackIdByNameOrId(flagStack, auth, log)
43
+ : undefined;
39
44
  let stack;
40
45
  try {
41
- if (flagStackId) {
42
- const flagStack = await getStack({ stackId: flagStackId, auth, logger: log });
43
- if (!flagStack.ok)
44
- return { success: false, error: flagStack.error || 'Failed to get Stack' };
45
- stack = flagStack.stack;
46
+ if (resolvedStackId) {
47
+ const overrideStack = await getStack({ stackId: resolvedStackId, auth, logger: log });
48
+ if (!overrideStack.ok)
49
+ return { success: false, error: overrideStack.error || 'Failed to get Stack' };
50
+ stack = overrideStack.stack;
46
51
  }
47
52
  else if (stackId) {
48
53
  const blueprintStack = await getStack({ stackId, auth, logger: log });
@@ -1,11 +1,9 @@
1
- import type { AuthParams, Stack } from '../../utils/types.js';
1
+ import type { Stack } from '../../utils/types.js';
2
2
  import type { CoreConfig, CoreResult } from '../index.js';
3
3
  export interface BlueprintInfoOptions extends CoreConfig {
4
- auth: AuthParams;
5
4
  stackId: string;
6
5
  deployedStack: Stack;
7
6
  flags: {
8
- id?: string;
9
7
  verbose?: boolean;
10
8
  };
11
9
  }
@@ -1,26 +1,11 @@
1
- import { getStack } from '../../actions/blueprints/stacks.js';
2
1
  import { formatDeployedResourceTree, formatStackInfo, } from '../../utils/display/blueprints-formatting.js';
3
- import { niceId } from '../../utils/display/presenters.js';
4
2
  export async function blueprintInfoCore(options) {
5
- const { log, auth, stackId, flags, deployedStack } = options;
6
- const { id: flagStackId, verbose = false } = flags;
3
+ const { log, deployedStack, flags } = options;
4
+ const { verbose = false } = flags;
7
5
  try {
8
- const targetStackId = flagStackId || stackId;
9
- let stack = deployedStack;
10
- if (flagStackId) {
11
- const existingStackResponse = await getStack({ stackId: targetStackId, auth, logger: log });
12
- if (!existingStackResponse.ok) {
13
- log.error(`Could not retrieve Stack deployment info for ${niceId(targetStackId)}`);
14
- return {
15
- success: false,
16
- error: existingStackResponse.error || 'Failed to retrieve Stack deployment',
17
- };
18
- }
19
- stack = existingStackResponse.stack;
20
- }
21
- log(formatStackInfo(stack, true));
22
- if (stack.resources)
23
- log(formatDeployedResourceTree(stack.resources, verbose));
6
+ log(formatStackInfo(deployedStack, true));
7
+ if (deployedStack.resources)
8
+ log(formatDeployedResourceTree(deployedStack.resources, verbose));
24
9
  return { success: true };
25
10
  }
26
11
  catch (error) {
@@ -66,7 +66,7 @@ export async function blueprintInitCore(options) {
66
66
  edit: true,
67
67
  'project-id': flagProjectId,
68
68
  'organization-id': flagOrganizationId,
69
- 'stack-id': flagStackId,
69
+ stack: flagStackId,
70
70
  verbose: v,
71
71
  },
72
72
  });
@@ -4,6 +4,7 @@ export interface BlueprintPlanOptions extends CoreConfig {
4
4
  blueprint: ReadBlueprintResult;
5
5
  token?: string;
6
6
  flags: {
7
+ stack?: string;
7
8
  verbose?: boolean;
8
9
  };
9
10
  }
@@ -1,25 +1,30 @@
1
- import { getStack } from '../../actions/blueprints/stacks.js';
1
+ import { getStack, resolveStackIdByNameOrId } from '../../actions/blueprints/stacks.js';
2
2
  import { formatResourceTree, stackDeployDiff } from '../../utils/display/blueprints-formatting.js';
3
3
  import { styleText } from '../../utils/style-text.js';
4
4
  export async function blueprintPlanCore(options) {
5
5
  const { bin = 'sanity', log, blueprint, token, flags } = options;
6
6
  const { verbose: _verbose = false } = flags;
7
- const { scopeType, scopeId, stackId, parsedBlueprint, fileInfo } = blueprint;
7
+ const { scopeType, scopeId, stackId: blueprintStackId, parsedBlueprint, fileInfo } = blueprint;
8
8
  log(`${styleText(['bold', 'blueBright'], 'Blueprint Stack deployment plan')} ${styleText('dim', `(${fileInfo.fileName})`)}`);
9
9
  log(formatResourceTree(parsedBlueprint.resources));
10
- if (token && scopeType && scopeId && stackId) {
11
- const stackResponse = await getStack({
12
- auth: { token, scopeType, scopeId },
13
- stackId,
14
- logger: log,
15
- });
16
- if (!stackResponse.ok) {
17
- log(styleText('dim', 'Unable to retrieve live Stack deployment for comparison'));
18
- }
19
- else {
20
- const diff = stackDeployDiff(parsedBlueprint, stackResponse.stack);
21
- if (diff)
22
- log(diff);
10
+ if (token && scopeType && scopeId) {
11
+ const stackId = flags.stack
12
+ ? await resolveStackIdByNameOrId(flags.stack, { token, scopeType, scopeId }, log)
13
+ : blueprintStackId;
14
+ if (stackId) {
15
+ const stackResponse = await getStack({
16
+ auth: { token, scopeType, scopeId },
17
+ stackId,
18
+ logger: log,
19
+ });
20
+ if (!stackResponse.ok) {
21
+ log(styleText('dim', 'Unable to retrieve live Stack deployment for comparison'));
22
+ }
23
+ else {
24
+ const diff = stackDeployDiff(parsedBlueprint, stackResponse.stack);
25
+ if (diff)
26
+ log(diff);
27
+ }
23
28
  }
24
29
  }
25
30
  log(`\n Run "${styleText(['bold', 'magenta'], `${bin} blueprints deploy`)}" to deploy these Stack changes`);
@@ -50,4 +50,5 @@ type InitBlueprintConfigParams = CoreConfig & ({
50
50
  export declare function initBlueprintConfig({ bin, log, token, validateResources, validateToken, blueprintPath, }: InitBlueprintConfigParams): Promise<Result<BlueprintConfig>>;
51
51
  export declare function initDeployedBlueprintConfig(config: Partial<BlueprintConfig> & Pick<BlueprintConfig, 'bin' | 'log' | 'token' | 'validateResources'> & {
52
52
  validateToken?: boolean;
53
+ stackOverride?: string;
53
54
  }): Promise<Result<DeployedBlueprintConfig>>;
@@ -1,5 +1,5 @@
1
1
  import { readLocalBlueprint } from '../actions/blueprints/blueprint.js';
2
- import { getStack } from '../actions/blueprints/stacks.js';
2
+ import { getStack, resolveStackIdByNameOrId } from '../actions/blueprints/stacks.js';
3
3
  import { presentBlueprintParserErrors } from '../utils/display/errors.js';
4
4
  import { niceId } from '../utils/display/presenters.js';
5
5
  import { validTokenOrErrorMessage } from '../utils/validated-token.js';
@@ -41,15 +41,20 @@ export async function initDeployedBlueprintConfig(config) {
41
41
  config.blueprint = blueprintResult.value.blueprint;
42
42
  config.token = blueprintResult.value.token;
43
43
  }
44
- const { scopeType, scopeId, stackId } = config.blueprint;
45
- if (!(scopeType && scopeId && stackId)) {
44
+ const { scopeType, scopeId, stackId: blueprintStackId } = config.blueprint;
45
+ if (!scopeType || !scopeId) {
46
46
  config.log(`Incomplete configuration. Run \`${config.bin} blueprints doctor\` for diagnostics.`);
47
- if (!scopeType || !scopeId)
48
- return { ok: false, error: 'Missing scope configuration for Blueprint' };
49
- if (!stackId)
50
- return { ok: false, error: 'Missing Stack deployment configuration for Blueprint' };
47
+ return { ok: false, error: 'Missing scope configuration for Blueprint' };
51
48
  }
52
49
  const auth = { token: config.token, scopeType, scopeId };
50
+ let stackId = blueprintStackId;
51
+ if (config.stackOverride) {
52
+ stackId = await resolveStackIdByNameOrId(config.stackOverride, auth, config.log);
53
+ }
54
+ if (!stackId) {
55
+ config.log(`Incomplete configuration. Run \`${config.bin} blueprints doctor\` for diagnostics.`);
56
+ return { ok: false, error: 'Missing Stack deployment configuration for Blueprint' };
57
+ }
53
58
  const stackResponse = await getStack({ stackId, auth, logger: config.log });
54
59
  if (!stackResponse.ok) {
55
60
  config.log(`Could not retrieve Stack deployment info for ${niceId(stackId)}.`);
@@ -1,5 +1,5 @@
1
1
  <!DOCTYPE html>
2
- <html>
2
+ <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8">
5
5
  <title>Sanity Functions</title>
@@ -14,7 +14,7 @@
14
14
  <header data-slot="header">
15
15
  <div class="flex items-center gap-25 pad-2">
16
16
  <div class="logo-image">
17
- <svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 400 400" fill="none">
17
+ <svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 400 400" fill="none" role="img" aria-label="Sanity Logo">
18
18
  <rect width="400" height="400" fill="light-dark(#0B0B0B, #FFFFFF)"/>
19
19
  <g clip-path="url(#clip0_2001_278)">
20
20
  <path d="M304.798 227.286L296.218 212.355L254.714 237.632L300.812 178.943L307.781 174.853L306.057 172.263L309.223 168.217L294.677 156.11L288.019 164.594L153.627 243.22L203.315 183.468L295.864 132.739L287.072 115.742L236.662 143.362L261.485 113.53L247.265 101L191.399 168.174L135.915 198.603L178.394 142.445L205.012 128.591L196.558 111.405L119.008 151.773L140.155 123.789L125.383 111.958L80.7414 171.041L81.4341 171.594L89.7744 188.576L139.265 162.804L94.1565 222.425L101.55 228.348L105.946 236.846L158.052 208.28L100.673 277.288L114.894 289.817L117.75 286.383L256.17 205.137L210.214 263.667L210.963 264.292L210.892 264.336L220.42 280.911L281.545 243.672L258.008 281.653L273.784 292L311.259 231.535L304.798 227.286Z" fill="light-dark(white, #0B0B0B)"/>
@@ -0,0 +1,6 @@
1
+ import type AdmZip from 'adm-zip';
2
+ /**
3
+ * Scan zip entries of dependencies for native modules.
4
+ * Native modules built on one platform may not work on another (e.g., macOS vs Linux)
5
+ */
6
+ export declare const detectNativeModules: (zip: AdmZip) => string[];
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Patterns to identify native modules based on common file types and build configurations.
3
+ */
4
+ const KNOWN_MODULE_PATTERNS = [/binding\.gyp$/, /\.node$/];
5
+ /**
6
+ * Scan zip entries of dependencies for native modules.
7
+ * Native modules built on one platform may not work on another (e.g., macOS vs Linux)
8
+ */
9
+ export const detectNativeModules = (zip) => {
10
+ try {
11
+ const zippedEntries = zip.getEntries();
12
+ const moduleNames = zippedEntries
13
+ // Filter entries that match known native module patterns
14
+ .filter((entry) => KNOWN_MODULE_PATTERNS.some((pattern) => pattern.test(entry.entryName)))
15
+ // Extract package names from the entry paths
16
+ .map((entry) => entry.entryName.match(/node_modules[\\/](.+?)[\\/]/)?.[1])
17
+ // Filter out undefined results (in case the regex didn't match)
18
+ .filter((name) => name !== undefined);
19
+ // return a unique list of module names
20
+ return [...new Set(moduleNames)];
21
+ }
22
+ catch (error) {
23
+ const message = error instanceof Error ? error.message : String(error);
24
+ throw new Error(`Failed to scan zip for native modules: ${message}`);
25
+ }
26
+ };
@@ -2,11 +2,11 @@ import { mkdir, readFile, rm, stat, writeFile } from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
  import { performance } from 'node:perf_hooks';
4
4
  import { cwd } from 'node:process';
5
+ import * as find from 'empathic/find';
5
6
  import { build as viteBuild } from 'vite';
6
7
  import tsConfigPaths from 'vite-tsconfig-paths';
7
8
  import { findFunctionEntryPoint } from '../functions/find-entry-point.js';
8
9
  import { cleanupSourceMaps } from './cleanup-source-maps.js';
9
- import { findDirUp } from './find-up.js';
10
10
  import { verifyHandler } from './verify-handler.js';
11
11
  export async function transpileFunction(resource) {
12
12
  if (!resource.src)
@@ -25,7 +25,7 @@ export async function transpileFunction(resource) {
25
25
  const outputPathStart = performance.now();
26
26
  const outputDir = await getTranspileOutputPath(entryDir, resource.name);
27
27
  const outputFile = path.join(outputDir, getOutputFilename(entry));
28
- const fnRootDir = (await findDirUp('node_modules', entryDir)) || entryDir;
28
+ const fnRootDir = find.dir('node_modules', { cwd: entryDir }) ?? entryDir;
29
29
  timings['transpile:setupOutput'] = performance.now() - outputPathStart;
30
30
  async function cleanupTmpDir() {
31
31
  // Feel a certain way about leaving things uncleaned, but helps with debugging for now
@@ -197,12 +197,12 @@
197
197
  "blueprints:config": {
198
198
  "aliases": [],
199
199
  "args": {},
200
- "description": "Manages the local Blueprint configuration, which links your Blueprint to a Sanity project and Stack.\n\nWithout flags, displays the current configuration. Use --edit to interactively modify settings, or combine --edit with ID flags to update values directly (useful for scripting and automation).\n\nIf you need to switch your Blueprint to a different Stack, use --edit --stack-id.",
200
+ "description": "Manages the local Blueprint configuration, which links your Blueprint to a Sanity project and Stack.\n\nWithout flags, displays the current configuration. Use --edit to interactively modify settings, or combine --edit with ID flags to update values directly (useful for scripting and automation).\n\nIf you need to switch your Blueprint to a different Stack, use --edit --stack.",
201
201
  "examples": [
202
202
  "<%= config.bin %> <%= command.id %>",
203
203
  "<%= config.bin %> <%= command.id %> --edit",
204
204
  "<%= config.bin %> <%= command.id %> --edit --project-id <projectId>",
205
- "<%= config.bin %> <%= command.id %> --edit --project-id <projectId> --stack-id <stackId>"
205
+ "<%= config.bin %> <%= command.id %> --edit --project-id <projectId> --stack <name-or-id>"
206
206
  ],
207
207
  "flags": {
208
208
  "json": {
@@ -283,16 +283,16 @@
283
283
  "multiple": false,
284
284
  "type": "option"
285
285
  },
286
- "stack-id": {
286
+ "stack": {
287
287
  "aliases": [
288
- "stack",
288
+ "stack-id",
289
289
  "stackId"
290
290
  ],
291
291
  "dependsOn": [
292
292
  "edit"
293
293
  ],
294
- "description": "Directly set the Stack ID in the configuration. Requires --edit flag",
295
- "name": "stack-id",
294
+ "description": "Stack name or ID to set in the configuration. Requires --edit flag",
295
+ "name": "stack",
296
296
  "hasDynamicHelp": false,
297
297
  "multiple": false,
298
298
  "type": "option"
@@ -365,6 +365,14 @@
365
365
  "allowNo": false,
366
366
  "type": "boolean"
367
367
  },
368
+ "stack": {
369
+ "description": "Stack name or ID to use instead of the locally configured Stack",
370
+ "hidden": false,
371
+ "name": "stack",
372
+ "hasDynamicHelp": false,
373
+ "multiple": false,
374
+ "type": "option"
375
+ },
368
376
  "no-wait": {
369
377
  "description": "Do not wait for Stack deployment to complete",
370
378
  "name": "no-wait",
@@ -403,7 +411,7 @@
403
411
  "description": "Permanently removes the remote Stack and all its provisioned resources. Your local Blueprint files remain untouched, allowing you to redeploy later with 'blueprints init' + 'blueprints deploy'.\n\nThis is a destructive operation. You will be prompted to confirm unless --force is specified.\n\nUse this to clean up test environments or decommission a Stack you no longer need.",
404
412
  "examples": [
405
413
  "<%= config.bin %> <%= command.id %>",
406
- "<%= config.bin %> <%= command.id %> --stack-id <stackId> --project-id <projectId> --force --no-wait"
414
+ "<%= config.bin %> <%= command.id %> --stack <name-or-id> --project-id <projectId> --force --no-wait"
407
415
  ],
408
416
  "flags": {
409
417
  "json": {
@@ -462,7 +470,7 @@
462
470
  "project"
463
471
  ],
464
472
  "dependsOn": [
465
- "stack-id",
473
+ "stack",
466
474
  "force"
467
475
  ],
468
476
  "description": "Project associated with the Stack",
@@ -481,7 +489,7 @@
481
489
  "org"
482
490
  ],
483
491
  "dependsOn": [
484
- "stack-id",
492
+ "stack",
485
493
  "force"
486
494
  ],
487
495
  "description": "Organization associated with the Stack",
@@ -494,13 +502,13 @@
494
502
  "multiple": false,
495
503
  "type": "option"
496
504
  },
497
- "stack-id": {
505
+ "stack": {
498
506
  "aliases": [
499
- "stackId",
500
- "stack"
507
+ "stack-id",
508
+ "stackId"
501
509
  ],
502
- "description": "Stack ID to destroy (defaults to current Stack)",
503
- "name": "stack-id",
510
+ "description": "Stack name or ID to destroy (defaults to the locally configured Stack)",
511
+ "name": "stack",
504
512
  "hasDynamicHelp": false,
505
513
  "multiple": false,
506
514
  "type": "option"
@@ -606,7 +614,7 @@
606
614
  "description": "Displays the current state and metadata of your remote Stack deployment, including deployed resources, status, and configuration.\n\nUse this command to verify a deployment succeeded, check what resources are live, or confirm which Stack your local Blueprint is connected to.\n\nRun 'blueprints stacks' to see all available Stacks in your project or organization.",
607
615
  "examples": [
608
616
  "<%= config.bin %> <%= command.id %>",
609
- "<%= config.bin %> <%= command.id %> --id <stackId>"
617
+ "<%= config.bin %> <%= command.id %> --stack <name-or-id>"
610
618
  ],
611
619
  "flags": {
612
620
  "json": {
@@ -650,9 +658,12 @@
650
658
  "allowNo": false,
651
659
  "type": "boolean"
652
660
  },
653
- "id": {
654
- "description": "Stack ID to show info for (defaults to the current Stack)",
655
- "name": "id",
661
+ "stack": {
662
+ "aliases": [
663
+ "id"
664
+ ],
665
+ "description": "Stack name or ID to use instead of the locally configured Stack",
666
+ "name": "stack",
656
667
  "hasDynamicHelp": false,
657
668
  "multiple": false,
658
669
  "type": "option"
@@ -796,7 +807,6 @@
796
807
  },
797
808
  "stack-id": {
798
809
  "aliases": [
799
- "stack",
800
810
  "stackId"
801
811
  ],
802
812
  "dependsOn": [
@@ -892,6 +902,14 @@
892
902
  "allowNo": false,
893
903
  "type": "boolean"
894
904
  },
905
+ "stack": {
906
+ "description": "Stack name or ID to use instead of the locally configured Stack",
907
+ "hidden": false,
908
+ "name": "stack",
909
+ "hasDynamicHelp": false,
910
+ "multiple": false,
911
+ "type": "option"
912
+ },
895
913
  "watch": {
896
914
  "aliases": [
897
915
  "follow"
@@ -968,6 +986,14 @@
968
986
  "name": "verbose",
969
987
  "allowNo": false,
970
988
  "type": "boolean"
989
+ },
990
+ "stack": {
991
+ "description": "Stack name or ID to use instead of the locally configured Stack",
992
+ "hidden": false,
993
+ "name": "stack",
994
+ "hasDynamicHelp": false,
995
+ "multiple": false,
996
+ "type": "option"
971
997
  }
972
998
  },
973
999
  "hasDynamicHelp": false,
@@ -1412,6 +1438,14 @@
1412
1438
  "allowNo": false,
1413
1439
  "type": "boolean"
1414
1440
  },
1441
+ "stack": {
1442
+ "description": "Stack name or ID to use instead of the locally configured Stack",
1443
+ "hidden": false,
1444
+ "name": "stack",
1445
+ "hasDynamicHelp": false,
1446
+ "multiple": false,
1447
+ "type": "option"
1448
+ },
1415
1449
  "limit": {
1416
1450
  "char": "l",
1417
1451
  "description": "Total number of log entries to retrieve",
@@ -1852,6 +1886,14 @@
1852
1886
  "name": "verbose",
1853
1887
  "allowNo": false,
1854
1888
  "type": "boolean"
1889
+ },
1890
+ "stack": {
1891
+ "description": "Stack name or ID to use instead of the locally configured Stack",
1892
+ "hidden": true,
1893
+ "name": "stack",
1894
+ "hasDynamicHelp": false,
1895
+ "multiple": false,
1896
+ "type": "option"
1855
1897
  }
1856
1898
  },
1857
1899
  "hasDynamicHelp": false,
@@ -1926,6 +1968,14 @@
1926
1968
  "name": "verbose",
1927
1969
  "allowNo": false,
1928
1970
  "type": "boolean"
1971
+ },
1972
+ "stack": {
1973
+ "description": "Stack name or ID to use instead of the locally configured Stack",
1974
+ "hidden": true,
1975
+ "name": "stack",
1976
+ "hasDynamicHelp": false,
1977
+ "multiple": false,
1978
+ "type": "option"
1929
1979
  }
1930
1980
  },
1931
1981
  "hasDynamicHelp": false,
@@ -2005,6 +2055,14 @@
2005
2055
  "name": "verbose",
2006
2056
  "allowNo": false,
2007
2057
  "type": "boolean"
2058
+ },
2059
+ "stack": {
2060
+ "description": "Stack name or ID to use instead of the locally configured Stack",
2061
+ "hidden": true,
2062
+ "name": "stack",
2063
+ "hasDynamicHelp": false,
2064
+ "multiple": false,
2065
+ "type": "option"
2008
2066
  }
2009
2067
  },
2010
2068
  "hasDynamicHelp": false,
@@ -2026,5 +2084,5 @@
2026
2084
  ]
2027
2085
  }
2028
2086
  },
2029
- "version": "13.4.0"
2087
+ "version": "14.0.0"
2030
2088
  }