@sanity/cli 7.13.0 → 7.15.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 (47) hide show
  1. package/README.md +24 -14
  2. package/dist/SanityHelp.js +10 -0
  3. package/dist/SanityHelp.js.map +1 -1
  4. package/dist/actions/auth/getProviderName.js +13 -0
  5. package/dist/actions/auth/getProviderName.js.map +1 -1
  6. package/dist/actions/debug/types.js.map +1 -1
  7. package/dist/actions/deploy/deployApp.js +1 -0
  8. package/dist/actions/deploy/deployApp.js.map +1 -1
  9. package/dist/actions/deploy/deployChecks.js +25 -4
  10. package/dist/actions/deploy/deployChecks.js.map +1 -1
  11. package/dist/actions/deploy/resolveDeployTarget.js +23 -4
  12. package/dist/actions/deploy/resolveDeployTarget.js.map +1 -1
  13. package/dist/actions/init/initAction.js +3 -3
  14. package/dist/actions/init/initAction.js.map +1 -1
  15. package/dist/commands/cors/add.js +13 -7
  16. package/dist/commands/cors/add.js.map +1 -1
  17. package/dist/commands/datasets/copy.js +6 -3
  18. package/dist/commands/datasets/copy.js.map +1 -1
  19. package/dist/commands/debug.js +1 -1
  20. package/dist/commands/debug.js.map +1 -1
  21. package/dist/commands/login.js +12 -11
  22. package/dist/commands/login.js.map +1 -1
  23. package/dist/exports/invokeSanityCli/commandPolicies/index.js +6 -0
  24. package/dist/exports/invokeSanityCli/commandPolicies/index.js.map +1 -0
  25. package/dist/exports/invokeSanityCli/commandPolicies/mcpPolicy.js +174 -0
  26. package/dist/exports/invokeSanityCli/commandPolicies/mcpPolicy.js.map +1 -0
  27. package/dist/exports/invokeSanityCli/commandPolicies/policy.js +46 -0
  28. package/dist/exports/invokeSanityCli/commandPolicies/policy.js.map +1 -0
  29. package/dist/exports/invokeSanityCli/help.js +153 -0
  30. package/dist/exports/invokeSanityCli/help.js.map +1 -0
  31. package/dist/exports/invokeSanityCli/index.d.ts +73 -0
  32. package/dist/exports/invokeSanityCli/index.js +186 -0
  33. package/dist/exports/invokeSanityCli/index.js.map +1 -0
  34. package/dist/exports/invokeSanityCli/prettyPrintError.js +39 -0
  35. package/dist/exports/invokeSanityCli/prettyPrintError.js.map +1 -0
  36. package/dist/server/devServer.js +16 -2
  37. package/dist/server/devServer.js.map +1 -1
  38. package/dist/util/getProjectDefaults.js +4 -1
  39. package/dist/util/getProjectDefaults.js.map +1 -1
  40. package/dist/util/getSanityEnv.js +6 -1
  41. package/dist/util/getSanityEnv.js.map +1 -1
  42. package/dist/util/packageManager/preferredPm.js +45 -6
  43. package/dist/util/packageManager/preferredPm.js.map +1 -1
  44. package/dist/util/warnAboutMissingAppId.js +2 -1
  45. package/dist/util/warnAboutMissingAppId.js.map +1 -1
  46. package/oclif.manifest.json +54 -54
  47. package/package.json +17 -12
@@ -1013,6 +1013,10 @@
1013
1013
  "command": "<%= config.bin %> <%= command.id %>",
1014
1014
  "description": "Log in using default settings"
1015
1015
  },
1016
+ {
1017
+ "command": "<%= config.bin %> <%= command.id %> --with-token < token.txt",
1018
+ "description": "Log in using a token from standard input"
1019
+ },
1016
1020
  {
1017
1021
  "command": "<%= config.bin %> <%= command.id %> --provider github --no-open",
1018
1022
  "description": "Login with GitHub provider, but do not open a browser window automatically"
@@ -1024,13 +1028,19 @@
1024
1028
  {
1025
1029
  "command": "<%= config.bin %> <%= command.id %> --sso my-organization --sso-provider \"Okta SSO\"",
1026
1030
  "description": "Log in using a specific SSO provider within an organization"
1027
- },
1028
- {
1029
- "command": "<%= config.bin %> <%= command.id %> --with-token < token.txt",
1030
- "description": "Log in using a token from standard input"
1031
1031
  }
1032
1032
  ],
1033
1033
  "flags": {
1034
+ "with-token": {
1035
+ "description": "Read token from standard input",
1036
+ "exclusive": [
1037
+ "provider",
1038
+ "sso"
1039
+ ],
1040
+ "name": "with-token",
1041
+ "allowNo": false,
1042
+ "type": "boolean"
1043
+ },
1034
1044
  "experimental": {
1035
1045
  "hidden": true,
1036
1046
  "name": "experimental",
@@ -1077,16 +1087,6 @@
1077
1087
  "helpValue": "<name>",
1078
1088
  "multiple": false,
1079
1089
  "type": "option"
1080
- },
1081
- "with-token": {
1082
- "description": "Read token from standard input",
1083
- "exclusive": [
1084
- "provider",
1085
- "sso"
1086
- ],
1087
- "name": "with-token",
1088
- "allowNo": false,
1089
- "type": "boolean"
1090
1090
  }
1091
1091
  },
1092
1092
  "hasDynamicHelp": false,
@@ -3409,45 +3409,6 @@
3409
3409
  "logs.js"
3410
3410
  ]
3411
3411
  },
3412
- "manifest:extract": {
3413
- "aliases": [],
3414
- "args": {},
3415
- "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.",
3416
- "examples": [
3417
- {
3418
- "command": "<%= config.bin %> <%= command.id %>",
3419
- "description": "Extracts manifests"
3420
- },
3421
- {
3422
- "command": "<%= config.bin %> <%= command.id %> --path /public/static",
3423
- "description": "Extracts manifests into /public/static"
3424
- }
3425
- ],
3426
- "flags": {
3427
- "path": {
3428
- "description": "Optional path to specify destination directory of the manifest files",
3429
- "name": "path",
3430
- "default": "dist/static",
3431
- "hasDynamicHelp": false,
3432
- "multiple": false,
3433
- "type": "option"
3434
- }
3435
- },
3436
- "hasDynamicHelp": false,
3437
- "hiddenAliases": [],
3438
- "id": "manifest:extract",
3439
- "pluginAlias": "@sanity/cli",
3440
- "pluginName": "@sanity/cli",
3441
- "pluginType": "core",
3442
- "strict": true,
3443
- "isESM": true,
3444
- "relativePath": [
3445
- "dist",
3446
- "commands",
3447
- "manifest",
3448
- "extract.js"
3449
- ]
3450
- },
3451
3412
  "mcp:configure": {
3452
3413
  "aliases": [],
3453
3414
  "args": {},
@@ -5313,6 +5274,45 @@
5313
5274
  "list.js"
5314
5275
  ]
5315
5276
  },
5277
+ "manifest:extract": {
5278
+ "aliases": [],
5279
+ "args": {},
5280
+ "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.",
5281
+ "examples": [
5282
+ {
5283
+ "command": "<%= config.bin %> <%= command.id %>",
5284
+ "description": "Extracts manifests"
5285
+ },
5286
+ {
5287
+ "command": "<%= config.bin %> <%= command.id %> --path /public/static",
5288
+ "description": "Extracts manifests into /public/static"
5289
+ }
5290
+ ],
5291
+ "flags": {
5292
+ "path": {
5293
+ "description": "Optional path to specify destination directory of the manifest files",
5294
+ "name": "path",
5295
+ "default": "dist/static",
5296
+ "hasDynamicHelp": false,
5297
+ "multiple": false,
5298
+ "type": "option"
5299
+ }
5300
+ },
5301
+ "hasDynamicHelp": false,
5302
+ "hiddenAliases": [],
5303
+ "id": "manifest:extract",
5304
+ "pluginAlias": "@sanity/cli",
5305
+ "pluginName": "@sanity/cli",
5306
+ "pluginType": "core",
5307
+ "strict": true,
5308
+ "isESM": true,
5309
+ "relativePath": [
5310
+ "dist",
5311
+ "commands",
5312
+ "manifest",
5313
+ "extract.js"
5314
+ ]
5315
+ },
5316
5316
  "datasets:alias:create": {
5317
5317
  "aliases": [],
5318
5318
  "args": {
@@ -5830,5 +5830,5 @@
5830
5830
  ]
5831
5831
  }
5832
5832
  },
5833
- "version": "7.13.0"
5833
+ "version": "7.15.0"
5834
5834
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli",
3
- "version": "7.13.0",
3
+ "version": "7.15.0",
4
4
  "description": "Sanity CLI tool for managing Sanity projects and organizations",
5
5
  "keywords": [
6
6
  "cli",
@@ -45,6 +45,10 @@
45
45
  "source": "./src/exports/_internal.ts",
46
46
  "default": "./dist/exports/_internal.js"
47
47
  },
48
+ "./invokeSanityCli": {
49
+ "source": "./src/exports/invokeSanityCli/index.ts",
50
+ "default": "./dist/exports/invokeSanityCli/index.js"
51
+ },
48
52
  "./runtime": {
49
53
  "source": "./src/exports/runtime.ts",
50
54
  "default": "./dist/exports/runtime.js"
@@ -65,12 +69,12 @@
65
69
  "@sanity/generate-help-url": "^4.0.0",
66
70
  "@sanity/id-utils": "^1.0.0",
67
71
  "@sanity/import": "^6.0.3",
68
- "@sanity/migrate": "^8.0.0",
69
- "@sanity/runtime-cli": "^17.1.0",
70
- "@sanity/schema": "^6.5.0",
72
+ "@sanity/migrate": "^8.0.1",
73
+ "@sanity/runtime-cli": "^17.3.0",
74
+ "@sanity/schema": "^6.7.0",
71
75
  "@sanity/telemetry": "^1.1.0",
72
76
  "@sanity/template-validator": "^3.1.0",
73
- "@sanity/types": "^6.5.0",
77
+ "@sanity/types": "^6.7.0",
74
78
  "@sanity/worker-channels": "^2.0.0",
75
79
  "@vercel/frameworks": "3.29.0",
76
80
  "chokidar": "^5.0.0",
@@ -108,6 +112,7 @@
108
112
  "semver": "^7.8.1",
109
113
  "skills": "^1.5.9",
110
114
  "smol-toml": "^1.6.1",
115
+ "string-argv": "^0.3.2",
111
116
  "tar": "^7.5.15",
112
117
  "tar-fs": "^3.1.2",
113
118
  "tar-stream": "^3.2.0",
@@ -118,14 +123,14 @@
118
123
  "which": "^6.0.1",
119
124
  "yaml": "^2.9.0",
120
125
  "zod": "^4.4.3",
121
- "@sanity/cli-build": "^5.0.0",
122
- "@sanity/workbench-cli": "^1.7.1",
123
- "@sanity/cli-core": "^2.5.1"
126
+ "@sanity/cli-core": "^2.7.0",
127
+ "@sanity/cli-build": "^5.1.0",
128
+ "@sanity/workbench-cli": "^1.8.0"
124
129
  },
125
130
  "devDependencies": {
126
131
  "@eslint/compat": "^2.1.0",
127
132
  "@sanity/pkg-utils": "^11.0.9",
128
- "@sanity/ui": "^3.3.5",
133
+ "@sanity/ui": "^3.5.0",
129
134
  "@swc/cli": "^0.8.1",
130
135
  "@swc/core": "^1.15.43",
131
136
  "@types/debug": "^4.1.13",
@@ -150,12 +155,12 @@
150
155
  "oclif": "^4.23.27",
151
156
  "publint": "^0.3.21",
152
157
  "rimraf": "^6.0.1",
153
- "sanity": "^6.5.0",
158
+ "sanity": "^6.7.0",
154
159
  "typescript": "^6.0.3",
155
160
  "vitest": "^4.1.10",
156
- "@repo/tsconfig": "3.70.0",
157
161
  "@repo/package.config": "0.0.1",
158
- "@sanity/cli-test": "6.0.1",
162
+ "@repo/tsconfig": "3.70.0",
163
+ "@sanity/cli-test": "8.0.0",
159
164
  "@sanity/eslint-config-cli": "1.1.3"
160
165
  },
161
166
  "peerDependencies": {