@sanity/cli 8.10.0 → 8.11.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.
|
@@ -10,7 +10,7 @@ const debug = subdebug('login:getProvider');
|
|
|
10
10
|
* @param options - Options for the provider resolve operation
|
|
11
11
|
* @returns Promise that resolves to the selected login provider
|
|
12
12
|
* @internal
|
|
13
|
-
*/ export async function getProvider({
|
|
13
|
+
*/ export async function getProvider({ orgSlug, specifiedProvider, ssoProvider }) {
|
|
14
14
|
if (specifiedProvider === 'vercel') {
|
|
15
15
|
return {
|
|
16
16
|
name: 'vercel',
|
|
@@ -25,19 +25,8 @@ const debug = subdebug('login:getProvider');
|
|
|
25
25
|
}
|
|
26
26
|
spin = spinner('Fetching providers...').start();
|
|
27
27
|
// Fetch and prompt for login provider to use
|
|
28
|
-
|
|
29
|
-
if (experimental) {
|
|
30
|
-
providers = [
|
|
31
|
-
...providers,
|
|
32
|
-
{
|
|
33
|
-
name: 'sso',
|
|
34
|
-
title: 'SSO',
|
|
35
|
-
url: '_not_used_'
|
|
36
|
-
}
|
|
37
|
-
];
|
|
38
|
-
}
|
|
28
|
+
const { providers } = await getProviders();
|
|
39
29
|
spin.stop();
|
|
40
|
-
// Real providers excludes the synthetic SSO entry used by --experimental
|
|
41
30
|
const realProviderNames = providers.filter((p)=>p.name !== 'sso').map((p)=>p.name);
|
|
42
31
|
if (specifiedProvider) {
|
|
43
32
|
const provider = providers.find((prov)=>prov.name === specifiedProvider);
|
|
@@ -57,7 +46,14 @@ const debug = subdebug('login:getProvider');
|
|
|
57
46
|
throw new Error(`Multiple login providers available: ${realProviderNames.join(', ')}. ` + 'Use `--provider <name>` to select one in unattended mode.');
|
|
58
47
|
}
|
|
59
48
|
}
|
|
60
|
-
const provider = await promptForProviders(
|
|
49
|
+
const provider = await promptForProviders([
|
|
50
|
+
...providers,
|
|
51
|
+
{
|
|
52
|
+
name: 'sso',
|
|
53
|
+
title: 'SSO',
|
|
54
|
+
url: '_not_used_'
|
|
55
|
+
}
|
|
56
|
+
]);
|
|
61
57
|
if (provider.name === 'sso') {
|
|
62
58
|
const orgSlug = await input({
|
|
63
59
|
message: 'Organization slug:'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/actions/auth/login/getProvider.ts"],"sourcesContent":["import {isInteractive, subdebug} from '@sanity/cli-core'\nimport {input, spinner, type SpinnerInstance} from '@sanity/cli-core/ux'\n\nimport {promptForProviders} from '../../../prompts/promptForProviders.js'\nimport {getProviders, getVercelProviderUrl} from '../../../services/auth.js'\nimport {type LoginProvider} from '../types.js'\nimport {getSSOProvider} from './getSSOProvider.js'\n\nconst debug = subdebug('login:getProvider')\n\n/**\n * Prompt the user to select a login provider, or use the specified provider if given.\n *\n * @param options - Options for the provider resolve operation\n * @returns Promise that resolves to the selected login provider\n * @internal\n */\nexport async function getProvider({\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/actions/auth/login/getProvider.ts"],"sourcesContent":["import {isInteractive, subdebug} from '@sanity/cli-core'\nimport {input, spinner, type SpinnerInstance} from '@sanity/cli-core/ux'\n\nimport {promptForProviders} from '../../../prompts/promptForProviders.js'\nimport {getProviders, getVercelProviderUrl} from '../../../services/auth.js'\nimport {type LoginProvider} from '../types.js'\nimport {getSSOProvider} from './getSSOProvider.js'\n\nconst debug = subdebug('login:getProvider')\n\n/**\n * Prompt the user to select a login provider, or use the specified provider if given.\n *\n * @param options - Options for the provider resolve operation\n * @returns Promise that resolves to the selected login provider\n * @internal\n */\nexport async function getProvider({\n orgSlug,\n specifiedProvider,\n ssoProvider,\n}: {\n orgSlug: string | undefined\n specifiedProvider: string | undefined\n ssoProvider: string | undefined\n}): Promise<LoginProvider | undefined> {\n if (specifiedProvider === 'vercel') {\n return {\n name: 'vercel',\n title: 'Vercel',\n url: await getVercelProviderUrl(),\n }\n }\n\n let spin: SpinnerInstance | undefined\n\n try {\n if (orgSlug) {\n return getSSOProvider(orgSlug, ssoProvider)\n }\n\n spin = spinner('Fetching providers...').start()\n // Fetch and prompt for login provider to use\n const {providers} = await getProviders()\n spin.stop()\n\n const realProviderNames = providers.filter((p) => p.name !== 'sso').map((p) => p.name)\n\n if (specifiedProvider) {\n const provider = providers.find((prov) => prov.name === specifiedProvider)\n if (!provider) {\n throw new Error(\n `Cannot find login provider with name \"${specifiedProvider}\". ` +\n (realProviderNames.length > 0\n ? `Available providers: ${realProviderNames.join(', ')}`\n : 'No providers are available'),\n )\n }\n return provider\n }\n\n if (providers.length === 0) {\n return undefined\n }\n\n if (!isInteractive()) {\n if (realProviderNames.length === 1) {\n return providers.find((provider) => provider.name === realProviderNames[0])\n }\n\n if (realProviderNames.length > 1) {\n throw new Error(\n `Multiple login providers available: ${realProviderNames.join(', ')}. ` +\n 'Use `--provider <name>` to select one in unattended mode.',\n )\n }\n }\n\n const provider = await promptForProviders([\n ...providers,\n {name: 'sso', title: 'SSO', url: '_not_used_'},\n ])\n if (provider.name === 'sso') {\n const orgSlug = await input({message: 'Organization slug:'})\n return getSSOProvider(orgSlug)\n }\n\n return provider\n } catch (err) {\n spin?.stop()\n debug('Error retrieving providers', err)\n throw err\n }\n}\n"],"names":["isInteractive","subdebug","input","spinner","promptForProviders","getProviders","getVercelProviderUrl","getSSOProvider","debug","getProvider","orgSlug","specifiedProvider","ssoProvider","name","title","url","spin","start","providers","stop","realProviderNames","filter","p","map","provider","find","prov","Error","length","join","undefined","message","err"],"mappings":"AAAA,SAAQA,aAAa,EAAEC,QAAQ,QAAO,mBAAkB;AACxD,SAAQC,KAAK,EAAEC,OAAO,QAA6B,sBAAqB;AAExE,SAAQC,kBAAkB,QAAO,yCAAwC;AACzE,SAAQC,YAAY,EAAEC,oBAAoB,QAAO,4BAA2B;AAE5E,SAAQC,cAAc,QAAO,sBAAqB;AAElD,MAAMC,QAAQP,SAAS;AAEvB;;;;;;CAMC,GACD,OAAO,eAAeQ,YAAY,EAChCC,OAAO,EACPC,iBAAiB,EACjBC,WAAW,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AC3B,MAAMH,UAAU,MAAMR,MAAM;gBAAC6B,SAAS;YAAoB;YAC1D,OAAOxB,eAAeG;QACxB;QAEA,OAAOc;IACT,EAAE,OAAOQ,KAAK;QACZhB,MAAMG;QACNX,MAAM,8BAA8BwB;QACpC,MAAMA;IACR;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/actions/auth/login/login.ts"],"sourcesContent":["import {\n type CLITelemetryStore,\n getCliToken,\n getUserConfig,\n type Output,\n setCliUserConfig,\n subdebug,\n} from '@sanity/cli-core'\nimport {spinner} from '@sanity/cli-core/ux'\nimport {isHttpError} from '@sanity/client'\nimport open from 'open'\n\nimport {logout} from '../../../services/auth.js'\nimport {LoginTrace} from '../../../telemetry/login.telemetry.js'\nimport {canLaunchBrowser} from '../../../util/canLaunchBrowser.js'\nimport {startServerForTokenCallback} from '../authServer.js'\nimport {getProvider} from './getProvider.js'\nimport {isSanityApiToken, validateToken} from './validateToken.js'\n\nconst debug = subdebug('login')\n\ninterface LoginOptions {\n output: Output\n\n telemetry: CLITelemetryStore\n\n experimental?: boolean\n open?: boolean\n provider?: string\n sso?: string\n ssoProvider?: string\n token?: string\n}\n\n/**\n * Trigger the authentication flow for the CLI.\n *\n * NOTE: Without a token option, this uses terminal prompts and will not work for\n * non-interactive/programmatic uses.\n *\n * @param options - Options for the login operation\n * @returns Promise that resolves when the login operation is complete\n * @throws Will throw if login fails or is cancelled\n * @internal\n */\nexport async function login(options: LoginOptions) {\n const {output, telemetry} = options\n const previousToken = await getCliToken()\n\n const trace = telemetry.trace(LoginTrace)\n trace.start()\n\n if (typeof options.token === 'string') {\n try {\n const authToken = await validateToken(options.token)\n await storeAuthToken(authToken, previousToken, output)\n trace.complete()\n } catch (err: unknown) {\n trace.error(err as Error)\n throw err\n }\n return\n }\n\n const provider = await getProvider({\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/actions/auth/login/login.ts"],"sourcesContent":["import {\n type CLITelemetryStore,\n getCliToken,\n getUserConfig,\n type Output,\n setCliUserConfig,\n subdebug,\n} from '@sanity/cli-core'\nimport {spinner} from '@sanity/cli-core/ux'\nimport {isHttpError} from '@sanity/client'\nimport open from 'open'\n\nimport {logout} from '../../../services/auth.js'\nimport {LoginTrace} from '../../../telemetry/login.telemetry.js'\nimport {canLaunchBrowser} from '../../../util/canLaunchBrowser.js'\nimport {startServerForTokenCallback} from '../authServer.js'\nimport {getProvider} from './getProvider.js'\nimport {isSanityApiToken, validateToken} from './validateToken.js'\n\nconst debug = subdebug('login')\n\ninterface LoginOptions {\n output: Output\n\n telemetry: CLITelemetryStore\n\n experimental?: boolean\n open?: boolean\n provider?: string\n sso?: string\n ssoProvider?: string\n token?: string\n}\n\n/**\n * Trigger the authentication flow for the CLI.\n *\n * NOTE: Without a token option, this uses terminal prompts and will not work for\n * non-interactive/programmatic uses.\n *\n * @param options - Options for the login operation\n * @returns Promise that resolves when the login operation is complete\n * @throws Will throw if login fails or is cancelled\n * @internal\n */\nexport async function login(options: LoginOptions) {\n const {output, telemetry} = options\n const previousToken = await getCliToken()\n\n const trace = telemetry.trace(LoginTrace)\n trace.start()\n\n if (typeof options.token === 'string') {\n try {\n const authToken = await validateToken(options.token)\n await storeAuthToken(authToken, previousToken, output)\n trace.complete()\n } catch (err: unknown) {\n trace.error(err as Error)\n throw err\n }\n return\n }\n\n const provider = await getProvider({\n orgSlug: options.sso,\n specifiedProvider: options.provider,\n ssoProvider: options.ssoProvider,\n })\n\n trace.log({provider: provider?.name, step: 'selectProvider'})\n\n if (provider === undefined) {\n throw new Error('No authentication providers found')\n }\n\n const {loginUrl, server, token: tokenPromise} = await startServerForTokenCallback(provider.url)\n\n trace.log({step: 'waitForToken'})\n\n // Open a browser on the login page (or tell the user to)\n const shouldLaunchBrowser = canLaunchBrowser() && options.open !== false\n const actionText = shouldLaunchBrowser ? 'Opening browser at' : 'Please open a browser at'\n\n output.log(`\\n${actionText} ${loginUrl.href}\\n`)\n\n const spin = spinner({\n text: 'Waiting for browser login to complete... Press Ctrl + C to cancel',\n }).start()\n\n if (shouldLaunchBrowser) {\n open(loginUrl.href)\n }\n\n // Wait for a success/error on the HTTP callback server\n let authToken: string\n try {\n authToken = (await tokenPromise).token\n spin.stop()\n } catch (err: unknown) {\n spin.stop()\n trace.error(err as Error)\n debug('Error retrieving token: %O', err)\n throw err\n } finally {\n await new Promise<void>((resolve) => {\n server.close(() => resolve())\n })\n }\n\n await storeAuthToken(authToken, previousToken, output)\n\n trace.complete()\n}\n\nasync function storeAuthToken(\n authToken: string,\n previousToken: string | undefined,\n output: Output,\n) {\n setCliUserConfig('authToken', authToken)\n getUserConfig().delete('telemetryConsent')\n\n // If we had a session previously, attempt to clear it\n if (previousToken && previousToken !== authToken) {\n await invalidateAuthToken(previousToken, output)\n }\n}\n\nasync function invalidateAuthToken(token: string, output: Output) {\n try {\n if (await isSanityApiToken(token)) return\n } catch (err) {\n if (isHttpError(err) && err.statusCode === 401) return\n }\n\n try {\n await logout(token)\n } catch (err) {\n if (!isHttpError(err) || err.statusCode !== 401) {\n output.warn('Failed to invalidate previous session')\n }\n }\n}\n"],"names":["getCliToken","getUserConfig","setCliUserConfig","subdebug","spinner","isHttpError","open","logout","LoginTrace","canLaunchBrowser","startServerForTokenCallback","getProvider","isSanityApiToken","validateToken","debug","login","options","output","telemetry","previousToken","trace","start","token","authToken","storeAuthToken","complete","err","error","provider","orgSlug","sso","specifiedProvider","ssoProvider","log","name","step","undefined","Error","loginUrl","server","tokenPromise","url","shouldLaunchBrowser","actionText","href","spin","text","stop","Promise","resolve","close","delete","invalidateAuthToken","statusCode","warn"],"mappings":"AAAA,SAEEA,WAAW,EACXC,aAAa,EAEbC,gBAAgB,EAChBC,QAAQ,QACH,mBAAkB;AACzB,SAAQC,OAAO,QAAO,sBAAqB;AAC3C,SAAQC,WAAW,QAAO,iBAAgB;AAC1C,OAAOC,UAAU,OAAM;AAEvB,SAAQC,MAAM,QAAO,4BAA2B;AAChD,SAAQC,UAAU,QA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
|
3745
|
-
"args": {},
|
|
3746
|
-
"description": "Extract studio configuration as JSON manifest files.\n\nNote: This command is experimental and subject to change. It is currently intended for use with Create only.",
|
|
3747
|
-
"examples": [
|
|
3748
|
-
{
|
|
3749
|
-
"command": "<%= config.bin %> <%= command.id %>",
|
|
3750
|
-
"description": "Extracts manifests"
|
|
3751
|
-
},
|
|
3752
|
-
{
|
|
3753
|
-
"command": "<%= config.bin %> <%= command.id %> --path /public/static",
|
|
3754
|
-
"description": "Extracts manifests into /public/static"
|
|
3755
|
-
}
|
|
3756
|
-
],
|
|
3757
|
-
"flags": {
|
|
3758
|
-
"path": {
|
|
3759
|
-
"description": "Optional path to specify destination directory of the manifest files",
|
|
3760
|
-
"name": "path",
|
|
3761
|
-
"default": "dist/static",
|
|
3762
|
-
"hasDynamicHelp": false,
|
|
3763
|
-
"multiple": false,
|
|
3764
|
-
"type": "option"
|
|
3765
|
-
}
|
|
3766
|
-
},
|
|
3767
|
-
"hasDynamicHelp": false,
|
|
3768
|
-
"hiddenAliases": [],
|
|
3769
|
-
"id": "manifest:extract",
|
|
3770
|
-
"pluginAlias": "@sanity/cli",
|
|
3771
|
-
"pluginName": "@sanity/cli",
|
|
3772
|
-
"pluginType": "core",
|
|
3773
|
-
"strict": true,
|
|
3774
|
-
"isESM": true,
|
|
3775
|
-
"relativePath": [
|
|
3776
|
-
"dist",
|
|
3777
|
-
"commands",
|
|
3778
|
-
"manifest",
|
|
3779
|
-
"extract.js"
|
|
3780
|
-
]
|
|
3781
|
-
},
|
|
3782
|
-
"mcp:configure": {
|
|
3783
|
-
"aliases": [],
|
|
3784
|
-
"args": {},
|
|
3785
|
-
"description": "Configure Sanity MCP server for AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, MCPorter, OpenCode, VS Code, VS Code Insiders, Zed)",
|
|
3786
|
-
"examples": [
|
|
3787
|
-
{
|
|
3788
|
-
"command": "<%= config.bin %> <%= command.id %>",
|
|
3789
|
-
"description": "Configure Sanity MCP server for detected AI editors"
|
|
3790
|
-
}
|
|
3791
|
-
],
|
|
3792
|
-
"flags": {},
|
|
3793
|
-
"hasDynamicHelp": false,
|
|
3794
|
-
"hiddenAliases": [],
|
|
3795
|
-
"id": "mcp:configure",
|
|
3796
|
-
"pluginAlias": "@sanity/cli",
|
|
3797
|
-
"pluginName": "@sanity/cli",
|
|
3798
|
-
"pluginType": "core",
|
|
3799
|
-
"strict": true,
|
|
3800
|
-
"isESM": true,
|
|
3801
|
-
"relativePath": [
|
|
3802
|
-
"dist",
|
|
3803
|
-
"commands",
|
|
3804
|
-
"mcp",
|
|
3805
|
-
"configure.js"
|
|
3806
|
-
]
|
|
3807
|
-
},
|
|
3808
3743
|
"hooks:attempt": {
|
|
3809
3744
|
"aliases": [],
|
|
3810
3745
|
"args": {
|
|
@@ -4053,6 +3988,71 @@
|
|
|
4053
3988
|
"logs.js"
|
|
4054
3989
|
]
|
|
4055
3990
|
},
|
|
3991
|
+
"manifest:extract": {
|
|
3992
|
+
"aliases": [],
|
|
3993
|
+
"args": {},
|
|
3994
|
+
"description": "Extract studio configuration as JSON manifest files.\n\nNote: This command is experimental and subject to change. It is currently intended for use with Create only.",
|
|
3995
|
+
"examples": [
|
|
3996
|
+
{
|
|
3997
|
+
"command": "<%= config.bin %> <%= command.id %>",
|
|
3998
|
+
"description": "Extracts manifests"
|
|
3999
|
+
},
|
|
4000
|
+
{
|
|
4001
|
+
"command": "<%= config.bin %> <%= command.id %> --path /public/static",
|
|
4002
|
+
"description": "Extracts manifests into /public/static"
|
|
4003
|
+
}
|
|
4004
|
+
],
|
|
4005
|
+
"flags": {
|
|
4006
|
+
"path": {
|
|
4007
|
+
"description": "Optional path to specify destination directory of the manifest files",
|
|
4008
|
+
"name": "path",
|
|
4009
|
+
"default": "dist/static",
|
|
4010
|
+
"hasDynamicHelp": false,
|
|
4011
|
+
"multiple": false,
|
|
4012
|
+
"type": "option"
|
|
4013
|
+
}
|
|
4014
|
+
},
|
|
4015
|
+
"hasDynamicHelp": false,
|
|
4016
|
+
"hiddenAliases": [],
|
|
4017
|
+
"id": "manifest:extract",
|
|
4018
|
+
"pluginAlias": "@sanity/cli",
|
|
4019
|
+
"pluginName": "@sanity/cli",
|
|
4020
|
+
"pluginType": "core",
|
|
4021
|
+
"strict": true,
|
|
4022
|
+
"isESM": true,
|
|
4023
|
+
"relativePath": [
|
|
4024
|
+
"dist",
|
|
4025
|
+
"commands",
|
|
4026
|
+
"manifest",
|
|
4027
|
+
"extract.js"
|
|
4028
|
+
]
|
|
4029
|
+
},
|
|
4030
|
+
"mcp:configure": {
|
|
4031
|
+
"aliases": [],
|
|
4032
|
+
"args": {},
|
|
4033
|
+
"description": "Configure Sanity MCP server for AI editors (Antigravity, Claude Code, Cline, Cline CLI, Codex CLI, Cursor, Gemini CLI, GitHub Copilot CLI, MCPorter, OpenCode, VS Code, VS Code Insiders, Zed)",
|
|
4034
|
+
"examples": [
|
|
4035
|
+
{
|
|
4036
|
+
"command": "<%= config.bin %> <%= command.id %>",
|
|
4037
|
+
"description": "Configure Sanity MCP server for detected AI editors"
|
|
4038
|
+
}
|
|
4039
|
+
],
|
|
4040
|
+
"flags": {},
|
|
4041
|
+
"hasDynamicHelp": false,
|
|
4042
|
+
"hiddenAliases": [],
|
|
4043
|
+
"id": "mcp:configure",
|
|
4044
|
+
"pluginAlias": "@sanity/cli",
|
|
4045
|
+
"pluginName": "@sanity/cli",
|
|
4046
|
+
"pluginType": "core",
|
|
4047
|
+
"strict": true,
|
|
4048
|
+
"isESM": true,
|
|
4049
|
+
"relativePath": [
|
|
4050
|
+
"dist",
|
|
4051
|
+
"commands",
|
|
4052
|
+
"mcp",
|
|
4053
|
+
"configure.js"
|
|
4054
|
+
]
|
|
4055
|
+
},
|
|
4056
4056
|
"media:create-aspect": {
|
|
4057
4057
|
"aliases": [],
|
|
4058
4058
|
"args": {},
|
|
@@ -5490,6 +5490,84 @@
|
|
|
5490
5490
|
"install.js"
|
|
5491
5491
|
]
|
|
5492
5492
|
},
|
|
5493
|
+
"telemetry:disable": {
|
|
5494
|
+
"aliases": [],
|
|
5495
|
+
"args": {},
|
|
5496
|
+
"description": "Disable telemetry for your account",
|
|
5497
|
+
"examples": [
|
|
5498
|
+
{
|
|
5499
|
+
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
5500
|
+
"description": "Disable telemetry for your account"
|
|
5501
|
+
}
|
|
5502
|
+
],
|
|
5503
|
+
"flags": {},
|
|
5504
|
+
"hasDynamicHelp": false,
|
|
5505
|
+
"hiddenAliases": [],
|
|
5506
|
+
"id": "telemetry:disable",
|
|
5507
|
+
"pluginAlias": "@sanity/cli",
|
|
5508
|
+
"pluginName": "@sanity/cli",
|
|
5509
|
+
"pluginType": "core",
|
|
5510
|
+
"strict": true,
|
|
5511
|
+
"isESM": true,
|
|
5512
|
+
"relativePath": [
|
|
5513
|
+
"dist",
|
|
5514
|
+
"commands",
|
|
5515
|
+
"telemetry",
|
|
5516
|
+
"disable.js"
|
|
5517
|
+
]
|
|
5518
|
+
},
|
|
5519
|
+
"telemetry:enable": {
|
|
5520
|
+
"aliases": [],
|
|
5521
|
+
"args": {},
|
|
5522
|
+
"description": "Enable telemetry for your account",
|
|
5523
|
+
"examples": [
|
|
5524
|
+
{
|
|
5525
|
+
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
5526
|
+
"description": "Enable telemetry for your account"
|
|
5527
|
+
}
|
|
5528
|
+
],
|
|
5529
|
+
"flags": {},
|
|
5530
|
+
"hasDynamicHelp": false,
|
|
5531
|
+
"hiddenAliases": [],
|
|
5532
|
+
"id": "telemetry:enable",
|
|
5533
|
+
"pluginAlias": "@sanity/cli",
|
|
5534
|
+
"pluginName": "@sanity/cli",
|
|
5535
|
+
"pluginType": "core",
|
|
5536
|
+
"strict": true,
|
|
5537
|
+
"isESM": true,
|
|
5538
|
+
"relativePath": [
|
|
5539
|
+
"dist",
|
|
5540
|
+
"commands",
|
|
5541
|
+
"telemetry",
|
|
5542
|
+
"enable.js"
|
|
5543
|
+
]
|
|
5544
|
+
},
|
|
5545
|
+
"telemetry:status": {
|
|
5546
|
+
"aliases": [],
|
|
5547
|
+
"args": {},
|
|
5548
|
+
"description": "Check telemetry status for your account",
|
|
5549
|
+
"examples": [
|
|
5550
|
+
{
|
|
5551
|
+
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
5552
|
+
"description": "Check telemetry status for your account"
|
|
5553
|
+
}
|
|
5554
|
+
],
|
|
5555
|
+
"flags": {},
|
|
5556
|
+
"hasDynamicHelp": false,
|
|
5557
|
+
"hiddenAliases": [],
|
|
5558
|
+
"id": "telemetry:status",
|
|
5559
|
+
"pluginAlias": "@sanity/cli",
|
|
5560
|
+
"pluginName": "@sanity/cli",
|
|
5561
|
+
"pluginType": "core",
|
|
5562
|
+
"strict": true,
|
|
5563
|
+
"isESM": true,
|
|
5564
|
+
"relativePath": [
|
|
5565
|
+
"dist",
|
|
5566
|
+
"commands",
|
|
5567
|
+
"telemetry",
|
|
5568
|
+
"status.js"
|
|
5569
|
+
]
|
|
5570
|
+
},
|
|
5493
5571
|
"tokens:create": {
|
|
5494
5572
|
"aliases": [],
|
|
5495
5573
|
"args": {
|
|
@@ -5755,84 +5833,6 @@
|
|
|
5755
5833
|
"rotate.js"
|
|
5756
5834
|
]
|
|
5757
5835
|
},
|
|
5758
|
-
"telemetry:disable": {
|
|
5759
|
-
"aliases": [],
|
|
5760
|
-
"args": {},
|
|
5761
|
-
"description": "Disable telemetry for your account",
|
|
5762
|
-
"examples": [
|
|
5763
|
-
{
|
|
5764
|
-
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
5765
|
-
"description": "Disable telemetry for your account"
|
|
5766
|
-
}
|
|
5767
|
-
],
|
|
5768
|
-
"flags": {},
|
|
5769
|
-
"hasDynamicHelp": false,
|
|
5770
|
-
"hiddenAliases": [],
|
|
5771
|
-
"id": "telemetry:disable",
|
|
5772
|
-
"pluginAlias": "@sanity/cli",
|
|
5773
|
-
"pluginName": "@sanity/cli",
|
|
5774
|
-
"pluginType": "core",
|
|
5775
|
-
"strict": true,
|
|
5776
|
-
"isESM": true,
|
|
5777
|
-
"relativePath": [
|
|
5778
|
-
"dist",
|
|
5779
|
-
"commands",
|
|
5780
|
-
"telemetry",
|
|
5781
|
-
"disable.js"
|
|
5782
|
-
]
|
|
5783
|
-
},
|
|
5784
|
-
"telemetry:enable": {
|
|
5785
|
-
"aliases": [],
|
|
5786
|
-
"args": {},
|
|
5787
|
-
"description": "Enable telemetry for your account",
|
|
5788
|
-
"examples": [
|
|
5789
|
-
{
|
|
5790
|
-
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
5791
|
-
"description": "Enable telemetry for your account"
|
|
5792
|
-
}
|
|
5793
|
-
],
|
|
5794
|
-
"flags": {},
|
|
5795
|
-
"hasDynamicHelp": false,
|
|
5796
|
-
"hiddenAliases": [],
|
|
5797
|
-
"id": "telemetry:enable",
|
|
5798
|
-
"pluginAlias": "@sanity/cli",
|
|
5799
|
-
"pluginName": "@sanity/cli",
|
|
5800
|
-
"pluginType": "core",
|
|
5801
|
-
"strict": true,
|
|
5802
|
-
"isESM": true,
|
|
5803
|
-
"relativePath": [
|
|
5804
|
-
"dist",
|
|
5805
|
-
"commands",
|
|
5806
|
-
"telemetry",
|
|
5807
|
-
"enable.js"
|
|
5808
|
-
]
|
|
5809
|
-
},
|
|
5810
|
-
"telemetry:status": {
|
|
5811
|
-
"aliases": [],
|
|
5812
|
-
"args": {},
|
|
5813
|
-
"description": "Check telemetry status for your account",
|
|
5814
|
-
"examples": [
|
|
5815
|
-
{
|
|
5816
|
-
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
5817
|
-
"description": "Check telemetry status for your account"
|
|
5818
|
-
}
|
|
5819
|
-
],
|
|
5820
|
-
"flags": {},
|
|
5821
|
-
"hasDynamicHelp": false,
|
|
5822
|
-
"hiddenAliases": [],
|
|
5823
|
-
"id": "telemetry:status",
|
|
5824
|
-
"pluginAlias": "@sanity/cli",
|
|
5825
|
-
"pluginName": "@sanity/cli",
|
|
5826
|
-
"pluginType": "core",
|
|
5827
|
-
"strict": true,
|
|
5828
|
-
"isESM": true,
|
|
5829
|
-
"relativePath": [
|
|
5830
|
-
"dist",
|
|
5831
|
-
"commands",
|
|
5832
|
-
"telemetry",
|
|
5833
|
-
"status.js"
|
|
5834
|
-
]
|
|
5835
|
-
},
|
|
5836
5836
|
"typegen:generate": {
|
|
5837
5837
|
"aliases": [],
|
|
5838
5838
|
"args": {},
|
|
@@ -6964,5 +6964,5 @@
|
|
|
6964
6964
|
]
|
|
6965
6965
|
}
|
|
6966
6966
|
},
|
|
6967
|
-
"version": "8.
|
|
6967
|
+
"version": "8.11.0"
|
|
6968
6968
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.11.0",
|
|
4
4
|
"description": "Sanity CLI tool for managing Sanity projects and organizations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@sanity/telemetry": "^1.1.0",
|
|
78
78
|
"@sanity/template-validator": "^3.1.1",
|
|
79
79
|
"@sanity/types": "^6.12.0",
|
|
80
|
-
"@sanity/workbench-cli": "^2.
|
|
80
|
+
"@sanity/workbench-cli": "^2.5.0",
|
|
81
81
|
"@sanity/worker-channels": "^2.0.0",
|
|
82
82
|
"@sanity/workflow-cli": "0.31.0",
|
|
83
83
|
"@sanity/workflow-engine": "0.31.0",
|