@sanity/cli 6.1.2 → 6.1.4
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 +79 -79
- package/dist/actions/auth/ensureAuthenticated.js +61 -0
- package/dist/actions/auth/ensureAuthenticated.js.map +1 -0
- package/dist/commands/init.js +29 -37
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/mcp/configure.js +40 -12
- package/dist/commands/mcp/configure.js.map +1 -1
- package/dist/errors/LoginError.js +11 -0
- package/dist/errors/LoginError.js.map +1 -0
- package/dist/util/getErrorMessage.js +9 -0
- package/dist/util/getErrorMessage.js.map +1 -1
- package/oclif.manifest.json +79 -79
- package/package.json +10 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/getErrorMessage.ts"],"sourcesContent":["import {isHttpError} from '@sanity/client'\n\n/**\n * Get the error message from an error object\n *\n * @param err - The error object\n * @returns The error message\n * @internal\n */\nexport function getErrorMessage(err: unknown): string {\n if (isHttpError(err)) {\n const body = err.response.body\n if (\n typeof body === 'object' &&\n body !== null &&\n 'message' in body &&\n typeof body.message === 'string'\n ) {\n return body.message\n }\n return err.message || 'HTTP error'\n }\n return err instanceof Error ? err.message : 'Unknown error'\n}\n"],"names":["isHttpError","getErrorMessage","err","body","response","message"
|
|
1
|
+
{"version":3,"sources":["../../src/util/getErrorMessage.ts"],"sourcesContent":["import {isHttpError} from '@sanity/client'\n\n/**\n * Coerce an unknown thrown value into an Error instance.\n *\n * @param value - The thrown value\n * @returns An Error instance (the original if already an Error, otherwise a new one)\n * @internal\n */\nexport function toError(value: unknown): Error {\n return value instanceof Error ? value : new Error(String(value))\n}\n\n/**\n * Get the error message from an error object\n *\n * @param err - The error object\n * @returns The error message\n * @internal\n */\nexport function getErrorMessage(err: unknown): string {\n if (isHttpError(err)) {\n const body = err.response.body\n if (\n typeof body === 'object' &&\n body !== null &&\n 'message' in body &&\n typeof body.message === 'string'\n ) {\n return body.message\n }\n return err.message || 'HTTP error'\n }\n return err instanceof Error ? err.message : 'Unknown error'\n}\n"],"names":["isHttpError","toError","value","Error","String","getErrorMessage","err","body","response","message"],"mappings":"AAAA,SAAQA,WAAW,QAAO,iBAAgB;AAE1C;;;;;;CAMC,GACD,OAAO,SAASC,QAAQC,KAAc;IACpC,OAAOA,iBAAiBC,QAAQD,QAAQ,IAAIC,MAAMC,OAAOF;AAC3D;AAEA;;;;;;CAMC,GACD,OAAO,SAASG,gBAAgBC,GAAY;IAC1C,IAAIN,YAAYM,MAAM;QACpB,MAAMC,OAAOD,IAAIE,QAAQ,CAACD,IAAI;QAC9B,IACE,OAAOA,SAAS,YAChBA,SAAS,QACT,aAAaA,QACb,OAAOA,KAAKE,OAAO,KAAK,UACxB;YACA,OAAOF,KAAKE,OAAO;QACrB;QACA,OAAOH,IAAIG,OAAO,IAAI;IACxB;IACA,OAAOH,eAAeH,QAAQG,IAAIG,OAAO,GAAG;AAC9C"}
|
package/oclif.manifest.json
CHANGED
|
@@ -3628,84 +3628,6 @@
|
|
|
3628
3628
|
"list.js"
|
|
3629
3629
|
]
|
|
3630
3630
|
},
|
|
3631
|
-
"telemetry:disable": {
|
|
3632
|
-
"aliases": [],
|
|
3633
|
-
"args": {},
|
|
3634
|
-
"description": "Disable telemetry for your logged in user",
|
|
3635
|
-
"examples": [
|
|
3636
|
-
{
|
|
3637
|
-
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
3638
|
-
"description": "Disable telemetry for your logged in user"
|
|
3639
|
-
}
|
|
3640
|
-
],
|
|
3641
|
-
"flags": {},
|
|
3642
|
-
"hasDynamicHelp": false,
|
|
3643
|
-
"hiddenAliases": [],
|
|
3644
|
-
"id": "telemetry:disable",
|
|
3645
|
-
"pluginAlias": "@sanity/cli",
|
|
3646
|
-
"pluginName": "@sanity/cli",
|
|
3647
|
-
"pluginType": "core",
|
|
3648
|
-
"strict": true,
|
|
3649
|
-
"isESM": true,
|
|
3650
|
-
"relativePath": [
|
|
3651
|
-
"dist",
|
|
3652
|
-
"commands",
|
|
3653
|
-
"telemetry",
|
|
3654
|
-
"disable.js"
|
|
3655
|
-
]
|
|
3656
|
-
},
|
|
3657
|
-
"telemetry:enable": {
|
|
3658
|
-
"aliases": [],
|
|
3659
|
-
"args": {},
|
|
3660
|
-
"description": "Enable telemetry for your logged in user",
|
|
3661
|
-
"examples": [
|
|
3662
|
-
{
|
|
3663
|
-
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
3664
|
-
"description": "Enable telemetry for your logged in user"
|
|
3665
|
-
}
|
|
3666
|
-
],
|
|
3667
|
-
"flags": {},
|
|
3668
|
-
"hasDynamicHelp": false,
|
|
3669
|
-
"hiddenAliases": [],
|
|
3670
|
-
"id": "telemetry:enable",
|
|
3671
|
-
"pluginAlias": "@sanity/cli",
|
|
3672
|
-
"pluginName": "@sanity/cli",
|
|
3673
|
-
"pluginType": "core",
|
|
3674
|
-
"strict": true,
|
|
3675
|
-
"isESM": true,
|
|
3676
|
-
"relativePath": [
|
|
3677
|
-
"dist",
|
|
3678
|
-
"commands",
|
|
3679
|
-
"telemetry",
|
|
3680
|
-
"enable.js"
|
|
3681
|
-
]
|
|
3682
|
-
},
|
|
3683
|
-
"telemetry:status": {
|
|
3684
|
-
"aliases": [],
|
|
3685
|
-
"args": {},
|
|
3686
|
-
"description": "Check telemetry consent status for your logged in user",
|
|
3687
|
-
"examples": [
|
|
3688
|
-
{
|
|
3689
|
-
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
3690
|
-
"description": "Check telemetry consent status for your logged in user"
|
|
3691
|
-
}
|
|
3692
|
-
],
|
|
3693
|
-
"flags": {},
|
|
3694
|
-
"hasDynamicHelp": false,
|
|
3695
|
-
"hiddenAliases": [],
|
|
3696
|
-
"id": "telemetry:status",
|
|
3697
|
-
"pluginAlias": "@sanity/cli",
|
|
3698
|
-
"pluginName": "@sanity/cli",
|
|
3699
|
-
"pluginType": "core",
|
|
3700
|
-
"strict": true,
|
|
3701
|
-
"isESM": true,
|
|
3702
|
-
"relativePath": [
|
|
3703
|
-
"dist",
|
|
3704
|
-
"commands",
|
|
3705
|
-
"telemetry",
|
|
3706
|
-
"status.js"
|
|
3707
|
-
]
|
|
3708
|
-
},
|
|
3709
3631
|
"schema:delete": {
|
|
3710
3632
|
"aliases": [],
|
|
3711
3633
|
"args": {},
|
|
@@ -4082,6 +4004,84 @@
|
|
|
4082
4004
|
"validate.js"
|
|
4083
4005
|
]
|
|
4084
4006
|
},
|
|
4007
|
+
"telemetry:disable": {
|
|
4008
|
+
"aliases": [],
|
|
4009
|
+
"args": {},
|
|
4010
|
+
"description": "Disable telemetry for your logged in user",
|
|
4011
|
+
"examples": [
|
|
4012
|
+
{
|
|
4013
|
+
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
4014
|
+
"description": "Disable telemetry for your logged in user"
|
|
4015
|
+
}
|
|
4016
|
+
],
|
|
4017
|
+
"flags": {},
|
|
4018
|
+
"hasDynamicHelp": false,
|
|
4019
|
+
"hiddenAliases": [],
|
|
4020
|
+
"id": "telemetry:disable",
|
|
4021
|
+
"pluginAlias": "@sanity/cli",
|
|
4022
|
+
"pluginName": "@sanity/cli",
|
|
4023
|
+
"pluginType": "core",
|
|
4024
|
+
"strict": true,
|
|
4025
|
+
"isESM": true,
|
|
4026
|
+
"relativePath": [
|
|
4027
|
+
"dist",
|
|
4028
|
+
"commands",
|
|
4029
|
+
"telemetry",
|
|
4030
|
+
"disable.js"
|
|
4031
|
+
]
|
|
4032
|
+
},
|
|
4033
|
+
"telemetry:enable": {
|
|
4034
|
+
"aliases": [],
|
|
4035
|
+
"args": {},
|
|
4036
|
+
"description": "Enable telemetry for your logged in user",
|
|
4037
|
+
"examples": [
|
|
4038
|
+
{
|
|
4039
|
+
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
4040
|
+
"description": "Enable telemetry for your logged in user"
|
|
4041
|
+
}
|
|
4042
|
+
],
|
|
4043
|
+
"flags": {},
|
|
4044
|
+
"hasDynamicHelp": false,
|
|
4045
|
+
"hiddenAliases": [],
|
|
4046
|
+
"id": "telemetry:enable",
|
|
4047
|
+
"pluginAlias": "@sanity/cli",
|
|
4048
|
+
"pluginName": "@sanity/cli",
|
|
4049
|
+
"pluginType": "core",
|
|
4050
|
+
"strict": true,
|
|
4051
|
+
"isESM": true,
|
|
4052
|
+
"relativePath": [
|
|
4053
|
+
"dist",
|
|
4054
|
+
"commands",
|
|
4055
|
+
"telemetry",
|
|
4056
|
+
"enable.js"
|
|
4057
|
+
]
|
|
4058
|
+
},
|
|
4059
|
+
"telemetry:status": {
|
|
4060
|
+
"aliases": [],
|
|
4061
|
+
"args": {},
|
|
4062
|
+
"description": "Check telemetry consent status for your logged in user",
|
|
4063
|
+
"examples": [
|
|
4064
|
+
{
|
|
4065
|
+
"command": "<%= config.bin %> telemetry <%= command.id %>",
|
|
4066
|
+
"description": "Check telemetry consent status for your logged in user"
|
|
4067
|
+
}
|
|
4068
|
+
],
|
|
4069
|
+
"flags": {},
|
|
4070
|
+
"hasDynamicHelp": false,
|
|
4071
|
+
"hiddenAliases": [],
|
|
4072
|
+
"id": "telemetry:status",
|
|
4073
|
+
"pluginAlias": "@sanity/cli",
|
|
4074
|
+
"pluginName": "@sanity/cli",
|
|
4075
|
+
"pluginType": "core",
|
|
4076
|
+
"strict": true,
|
|
4077
|
+
"isESM": true,
|
|
4078
|
+
"relativePath": [
|
|
4079
|
+
"dist",
|
|
4080
|
+
"commands",
|
|
4081
|
+
"telemetry",
|
|
4082
|
+
"status.js"
|
|
4083
|
+
]
|
|
4084
|
+
},
|
|
4085
4085
|
"tokens:add": {
|
|
4086
4086
|
"aliases": [],
|
|
4087
4087
|
"args": {
|
|
@@ -4943,5 +4943,5 @@
|
|
|
4943
4943
|
]
|
|
4944
4944
|
}
|
|
4945
4945
|
},
|
|
4946
|
-
"version": "6.1.
|
|
4946
|
+
"version": "6.1.4"
|
|
4947
4947
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/cli",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.4",
|
|
4
4
|
"description": "Sanity CLI tool for managing Sanity projects and organizations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@oclif/core": "^4.8.
|
|
54
|
+
"@oclif/core": "^4.8.4",
|
|
55
55
|
"@oclif/plugin-help": "^6.2.37",
|
|
56
56
|
"@oclif/plugin-not-found": "^3.2.74",
|
|
57
57
|
"@sanity/client": "^7.17.0",
|
|
58
|
-
"@sanity/codegen": "^6.0.
|
|
58
|
+
"@sanity/codegen": "^6.0.1",
|
|
59
59
|
"@sanity/descriptors": "^1.3.0",
|
|
60
60
|
"@sanity/export": "^6.1.0",
|
|
61
61
|
"@sanity/generate-help-url": "^4.0.0",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"@sanity/import": "^5.0.1",
|
|
64
64
|
"@sanity/migrate": "^6.0.0",
|
|
65
65
|
"@sanity/runtime-cli": "^14.5.0",
|
|
66
|
-
"@sanity/schema": "^5.
|
|
66
|
+
"@sanity/schema": "^5.15.0",
|
|
67
67
|
"@sanity/telemetry": "^0.8.1",
|
|
68
68
|
"@sanity/template-validator": "^3.0.0",
|
|
69
|
-
"@sanity/types": "^5.
|
|
69
|
+
"@sanity/types": "^5.15.0",
|
|
70
70
|
"@sanity/ui": "^3.1.13",
|
|
71
71
|
"@sanity/worker-channels": "^2.0.0",
|
|
72
72
|
"@vercel/frameworks": "3.8.4",
|
|
@@ -118,11 +118,11 @@
|
|
|
118
118
|
"which": "^6.0.1",
|
|
119
119
|
"yaml": "^2.8.2",
|
|
120
120
|
"zod": "^4.3.6",
|
|
121
|
-
"@sanity/cli-core": "1.1.
|
|
121
|
+
"@sanity/cli-core": "1.1.2"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
124
|
"@eslint/compat": "^2.0.3",
|
|
125
|
-
"@sanity/pkg-utils": "^10.4.
|
|
125
|
+
"@sanity/pkg-utils": "^10.4.9",
|
|
126
126
|
"@swc/cli": "^0.8.0",
|
|
127
127
|
"@swc/core": "^1.15.18",
|
|
128
128
|
"@types/debug": "^4.1.12",
|
|
@@ -142,16 +142,16 @@
|
|
|
142
142
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
143
143
|
"eslint": "^9.39.4",
|
|
144
144
|
"nock": "^14.0.11",
|
|
145
|
-
"oclif": "^4.22.
|
|
145
|
+
"oclif": "^4.22.87",
|
|
146
146
|
"publint": "^0.3.18",
|
|
147
147
|
"rimraf": "^6.0.1",
|
|
148
|
-
"sanity": "^5.
|
|
148
|
+
"sanity": "^5.15.0",
|
|
149
149
|
"typescript": "^5.9.3",
|
|
150
150
|
"vite-tsconfig-paths": "^6.1.1",
|
|
151
151
|
"vitest": "^4.0.18",
|
|
152
152
|
"@repo/package.config": "0.0.1",
|
|
153
153
|
"@repo/tsconfig": "3.70.0",
|
|
154
|
-
"@sanity/cli-test": "0.2.
|
|
154
|
+
"@sanity/cli-test": "0.2.4",
|
|
155
155
|
"@sanity/eslint-config-cli": "1.0.0"
|
|
156
156
|
},
|
|
157
157
|
"engines": {
|