sanity 4.7.0-next.5 → 4.7.0-next.6
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.
@@ -31,8 +31,13 @@ async function undeployAppAction(_, context) {
|
|
31
31
|
if (output.print(""), !!await prompt.single({
|
32
32
|
type: "confirm",
|
33
33
|
default: !1,
|
34
|
-
message: `This will undeploy
|
35
|
-
|
34
|
+
message: `This will undeploy the following application:
|
35
|
+
|
36
|
+
Title: ${chalk.yellow(userApplication.title)}
|
37
|
+
ID: ${chalk.yellow(userApplication.id)}
|
38
|
+
|
39
|
+
The application will no longer be available for any of your users if you proceed.
|
40
|
+
|
36
41
|
Are you ${chalk.red("sure")} you want to undeploy?`.trim()
|
37
42
|
})) {
|
38
43
|
spinner = output.spinner("Undeploying application").start();
|
@@ -45,7 +50,7 @@ async function undeployAppAction(_, context) {
|
|
45
50
|
} catch (err) {
|
46
51
|
throw spinner.fail(), debug("Error undeploying application", err), err;
|
47
52
|
}
|
48
|
-
output.print(`Application undeploy scheduled. It might take a few minutes before ${chalk.yellow(userApplication.
|
53
|
+
output.print(`Application undeploy scheduled. It might take a few minutes before ${chalk.yellow(userApplication.title)} is unavailable.`);
|
49
54
|
}
|
50
55
|
}
|
51
56
|
exports.default = undeployAppAction;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"undeployAction.js","sources":["../../src/_internal/cli/actions/app/undeployAction.ts"],"sourcesContent":["import {type CliCommandArguments, type CliCommandContext} from '@sanity/cli'\n\nimport {debug as debugIt} from '../../debug'\nimport {deleteUserApplication, getUserApplication} from '../deploy/helpers'\nimport {type UndeployStudioActionFlags} from '../deploy/undeployAction'\n\nconst debug = debugIt.extend('undeploy')\n\nexport default async function undeployAppAction(\n _: CliCommandArguments<UndeployStudioActionFlags>,\n context: CliCommandContext,\n): Promise<void> {\n const {apiClient, chalk, output, prompt, cliConfig} = context\n\n const client = apiClient({\n requireUser: true,\n requireProject: false,\n }).withConfig({apiVersion: 'v2024-08-01'})\n\n // Check that the project has an application ID\n let spinner = output.spinner('Checking application info').start()\n\n const appId = cliConfig && 'app' in cliConfig ? cliConfig.app?.id : undefined\n\n if (!appId) {\n spinner.fail()\n output.print(`No application ID provided.`)\n output.print('Please set id in `app` in sanity.cli.js or sanity.cli.ts.')\n output.print('Nothing to undeploy.')\n return\n }\n\n const userApplication = await getUserApplication({\n client,\n appId,\n })\n\n spinner.succeed()\n\n if (!userApplication) {\n spinner.fail()\n output.print('Application with the given ID does not exist.')\n output.print('Nothing to undeploy.')\n return\n }\n\n // Double-check\n output.print('')\n\n const shouldUndeploy = await prompt.single({\n type: 'confirm',\n default: false,\n message
|
1
|
+
{"version":3,"file":"undeployAction.js","sources":["../../src/_internal/cli/actions/app/undeployAction.ts"],"sourcesContent":["import {type CliCommandArguments, type CliCommandContext} from '@sanity/cli'\n\nimport {debug as debugIt} from '../../debug'\nimport {deleteUserApplication, getUserApplication} from '../deploy/helpers'\nimport {type UndeployStudioActionFlags} from '../deploy/undeployAction'\n\nconst debug = debugIt.extend('undeploy')\n\nexport default async function undeployAppAction(\n _: CliCommandArguments<UndeployStudioActionFlags>,\n context: CliCommandContext,\n): Promise<void> {\n const {apiClient, chalk, output, prompt, cliConfig} = context\n\n const client = apiClient({\n requireUser: true,\n requireProject: false,\n }).withConfig({apiVersion: 'v2024-08-01'})\n\n // Check that the project has an application ID\n let spinner = output.spinner('Checking application info').start()\n\n const appId = cliConfig && 'app' in cliConfig ? cliConfig.app?.id : undefined\n\n if (!appId) {\n spinner.fail()\n output.print(`No application ID provided.`)\n output.print('Please set id in `app` in sanity.cli.js or sanity.cli.ts.')\n output.print('Nothing to undeploy.')\n return\n }\n\n const userApplication = await getUserApplication({\n client,\n appId,\n })\n\n spinner.succeed()\n\n if (!userApplication) {\n spinner.fail()\n output.print('Application with the given ID does not exist.')\n output.print('Nothing to undeploy.')\n return\n }\n\n // Double-check\n output.print('')\n\n const shouldUndeploy = await prompt.single({\n type: 'confirm',\n default: false,\n message: `This will undeploy the following application:\n\n Title: ${chalk.yellow(userApplication.title)}\n ID: ${chalk.yellow(userApplication.id)}\n\n The application will no longer be available for any of your users if you proceed.\n\n Are you ${chalk.red('sure')} you want to undeploy?`.trim(),\n })\n\n if (!shouldUndeploy) {\n return\n }\n\n spinner = output.spinner('Undeploying application').start()\n try {\n await deleteUserApplication({\n client,\n applicationId: userApplication.id,\n appType: 'coreApp',\n })\n spinner.succeed()\n } catch (err) {\n spinner.fail()\n debug('Error undeploying application', err)\n throw err\n }\n\n output.print(\n `Application undeploy scheduled. It might take a few minutes before ${chalk.yellow(userApplication.title)} is unavailable.`,\n )\n}\n"],"names":["debug","debugIt","extend","undeployAppAction","_","context","apiClient","chalk","output","prompt","cliConfig","client","requireUser","requireProject","withConfig","apiVersion","spinner","start","appId","app","id","undefined","fail","print","userApplication","getUserApplication","succeed","single","type","default","message","yellow","title","red","trim","deleteUserApplication","applicationId","appType","err"],"mappings":";;AAMA,MAAMA,QAAQC,UAAAA,MAAQC,OAAO,UAAU;AAEvC,eAA8BC,kBAC5BC,GACAC,SACe;AACf,QAAM;AAAA,IAACC;AAAAA,IAAWC;AAAAA,IAAOC;AAAAA,IAAQC;AAAAA,IAAQC;AAAAA,EAAAA,IAAaL,SAEhDM,SAASL,UAAU;AAAA,IACvBM,aAAa;AAAA,IACbC,gBAAgB;AAAA,EAAA,CACjB,EAAEC,WAAW;AAAA,IAACC,YAAY;AAAA,EAAA,CAAc;AAGzC,MAAIC,UAAUR,OAAOQ,QAAQ,2BAA2B,EAAEC,MAAAA;AAE1D,QAAMC,QAAQR,aAAa,SAASA,YAAYA,UAAUS,KAAKC,KAAKC;AAEpE,MAAI,CAACH,OAAO;AACVF,YAAQM,KAAAA,GACRd,OAAOe,MAAM,6BAA6B,GAC1Cf,OAAOe,MAAM,2DAA2D,GACxEf,OAAOe,MAAM,sBAAsB;AACnC;AAAA,EACF;AAEA,QAAMC,kBAAkB,MAAMC,2BAAmB;AAAA,IAC/Cd;AAAAA,IACAO;AAAAA,EAAAA,CACD;AAID,MAFAF,QAAQU,WAEJ,CAACF,iBAAiB;AACpBR,YAAQM,KAAAA,GACRd,OAAOe,MAAM,+CAA+C,GAC5Df,OAAOe,MAAM,sBAAsB;AACnC;AAAA,EACF;AAkBA,MAfAf,OAAOe,MAAM,EAAE,GAeX,CAAA,CAbmB,MAAMd,OAAOkB,OAAO;AAAA,IACzCC,MAAM;AAAA,IACNC,SAAS;AAAA,IACTC,SAAS;AAAA;AAAA,aAEAvB,MAAMwB,OAAOP,gBAAgBQ,KAAK,CAAC;AAAA,aACnCzB,MAAMwB,OAAOP,gBAAgBJ,EAAE,CAAC;AAAA;AAAA;AAAA;AAAA,YAIjCb,MAAM0B,IAAI,MAAM,CAAC,yBAAyBC,KAAAA;AAAAA,EAAK,CACxD,GAMDlB;AAAAA,cAAUR,OAAOQ,QAAQ,yBAAyB,EAAEC,MAAAA;AACpD,QAAI;AACF,YAAMkB,8BAAsB;AAAA,QAC1BxB;AAAAA,QACAyB,eAAeZ,gBAAgBJ;AAAAA,QAC/BiB,SAAS;AAAA,MAAA,CACV,GACDrB,QAAQU,QAAAA;AAAAA,IACV,SAASY,KAAK;AACZtB,YAAAA,QAAQM,KAAAA,GACRtB,MAAM,iCAAiCsC,GAAG,GACpCA;AAAAA,IACR;AAEA9B,WAAOe,MACL,sEAAsEhB,MAAMwB,OAAOP,gBAAgBQ,KAAK,CAAC,kBAC3G;AAAA,EAAA;AACF;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "sanity",
|
3
|
-
"version": "4.7.0-next.
|
3
|
+
"version": "4.7.0-next.6+f6809b4b33",
|
4
4
|
"description": "Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches",
|
5
5
|
"keywords": [
|
6
6
|
"sanity",
|
@@ -265,13 +265,13 @@
|
|
265
265
|
"which": "^5.0.0",
|
266
266
|
"xstate": "^5.21.0",
|
267
267
|
"yargs": "^17.7.2",
|
268
|
-
"@sanity/cli": "4.7.0-next.
|
269
|
-
"@sanity/
|
270
|
-
"@sanity/
|
271
|
-
"@sanity/mutator": "4.7.0-next.
|
272
|
-
"@sanity/schema": "4.7.0-next.
|
273
|
-
"@sanity/types": "4.7.0-next.
|
274
|
-
"@sanity/util": "4.7.0-next.
|
268
|
+
"@sanity/cli": "4.7.0-next.6+f6809b4b33",
|
269
|
+
"@sanity/migrate": "4.7.0-next.6+f6809b4b33",
|
270
|
+
"@sanity/diff": "4.7.0-next.6+f6809b4b33",
|
271
|
+
"@sanity/mutator": "4.7.0-next.6+f6809b4b33",
|
272
|
+
"@sanity/schema": "4.7.0-next.6+f6809b4b33",
|
273
|
+
"@sanity/types": "4.7.0-next.6+f6809b4b33",
|
274
|
+
"@sanity/util": "4.7.0-next.6+f6809b4b33"
|
275
275
|
},
|
276
276
|
"devDependencies": {
|
277
277
|
"@playwright/experimental-ct-react": "1.55.0",
|
@@ -314,12 +314,12 @@
|
|
314
314
|
"swr": "2.2.5",
|
315
315
|
"vitest": "^3.2.4",
|
316
316
|
"vitest-package-exports": "^0.1.1",
|
317
|
-
"@repo/eslint-config": "4.7.0-next.
|
318
|
-
"@repo/
|
319
|
-
"@repo/package.bundle": "4.7.0-next.
|
320
|
-
"@
|
321
|
-
"@
|
322
|
-
"@repo/
|
317
|
+
"@repo/eslint-config": "4.7.0-next.6+f6809b4b33",
|
318
|
+
"@repo/package.config": "4.7.0-next.6+f6809b4b33",
|
319
|
+
"@repo/package.bundle": "4.7.0-next.6+f6809b4b33",
|
320
|
+
"@sanity/codegen": "4.7.0-next.6+f6809b4b33",
|
321
|
+
"@repo/test-config": "4.7.0-next.6+f6809b4b33",
|
322
|
+
"@repo/dev-aliases": "4.7.0-next.6+f6809b4b33"
|
323
323
|
},
|
324
324
|
"peerDependencies": {
|
325
325
|
"react": "^18 || ^19",
|