@sanity/cli 3.87.0 → 3.87.1
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/lib/_chunks-cjs/cli.js +2800 -4723
- package/lib/_chunks-cjs/cli.js.map +1 -1
- package/package.json +8 -8
- package/src/actions/init-project/initProject.ts +19 -7
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sanity/cli",
|
3
|
-
"version": "3.87.
|
3
|
+
"version": "3.87.1",
|
4
4
|
"description": "Sanity CLI tool for managing Sanity installations, managing plugins, schemas and datasets",
|
5
5
|
"keywords": [
|
6
6
|
"sanity",
|
@@ -58,12 +58,12 @@
|
|
58
58
|
},
|
59
59
|
"dependencies": {
|
60
60
|
"@babel/traverse": "^7.23.5",
|
61
|
-
"@sanity/client": "^
|
62
|
-
"@sanity/codegen": "3.87.
|
61
|
+
"@sanity/client": "^7.0.0",
|
62
|
+
"@sanity/codegen": "3.87.1",
|
63
63
|
"@sanity/runtime-cli": "^3.0.0",
|
64
64
|
"@sanity/telemetry": "^0.8.0",
|
65
65
|
"@sanity/template-validator": "^2.4.3",
|
66
|
-
"@sanity/util": "3.87.
|
66
|
+
"@sanity/util": "3.87.1",
|
67
67
|
"chalk": "^4.1.2",
|
68
68
|
"debug": "^4.3.4",
|
69
69
|
"decompress": "^4.2.0",
|
@@ -77,13 +77,13 @@
|
|
77
77
|
"validate-npm-package-name": "^3.0.0"
|
78
78
|
},
|
79
79
|
"devDependencies": {
|
80
|
-
"@repo/package.config": "3.87.
|
81
|
-
"@repo/test-config": "3.87.
|
80
|
+
"@repo/package.config": "3.87.1",
|
81
|
+
"@repo/test-config": "3.87.1",
|
82
82
|
"@rexxars/gitconfiglocal": "^3.0.1",
|
83
83
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
84
84
|
"@sanity/eslint-config-studio": "^4.0.0",
|
85
85
|
"@sanity/generate-help-url": "^3.0.0",
|
86
|
-
"@sanity/types": "3.87.
|
86
|
+
"@sanity/types": "3.87.1",
|
87
87
|
"@types/babel__traverse": "^7.20.5",
|
88
88
|
"@types/configstore": "^5.0.1",
|
89
89
|
"@types/cpx": "^1.5.2",
|
@@ -135,5 +135,5 @@
|
|
135
135
|
"engines": {
|
136
136
|
"node": ">=18"
|
137
137
|
},
|
138
|
-
"gitHead": "
|
138
|
+
"gitHead": "64734627d11ac44ee8c989b5cc8554b84b5d3243"
|
139
139
|
}
|
@@ -686,7 +686,7 @@ export default async function initSanity(
|
|
686
686
|
)
|
687
687
|
} else {
|
688
688
|
print(`\n${chalk.green('Success!')} Now, use these commands to continue:\n`)
|
689
|
-
print(`First: ${chalk.cyan(`cd ${outputPath}`)} - to enter project
|
689
|
+
print(`First: ${chalk.cyan(`cd ${outputPath}`)} - to enter project's directory`)
|
690
690
|
print(
|
691
691
|
`Then: ${chalk.cyan(devCommand)} -to run ${isAppTemplate ? 'your Sanity application' : 'Sanity Studio'}\n`,
|
692
692
|
)
|
@@ -1408,12 +1408,24 @@ export default async function initSanity(
|
|
1408
1408
|
.clone()
|
1409
1409
|
.config({apiVersion: 'v2021-06-07'})
|
1410
1410
|
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
(
|
1415
|
-
resource
|
1416
|
-
|
1411
|
+
try {
|
1412
|
+
const grants = await client.request({uri: `organizations/${orgId}/grants`})
|
1413
|
+
const group: {grants: {name: string}[]}[] = grants[requiredGrantGroup] || []
|
1414
|
+
return group.some(
|
1415
|
+
(resource) =>
|
1416
|
+
resource.grants && resource.grants.some((grant) => grant.name === requiredGrant),
|
1417
|
+
)
|
1418
|
+
} catch (err) {
|
1419
|
+
// If we get a 401, it means we don't have access to this organization
|
1420
|
+
// probably because of implicit membership
|
1421
|
+
if (err.statusCode === 401) {
|
1422
|
+
debug('No access to organization %s (401)', orgId)
|
1423
|
+
return false
|
1424
|
+
}
|
1425
|
+
// For other errors, log them but still return false
|
1426
|
+
debug('Error checking grants for organization %s: %s', orgId, err.message)
|
1427
|
+
return false
|
1428
|
+
}
|
1417
1429
|
}
|
1418
1430
|
|
1419
1431
|
function getOrganizationsWithAttachGrantInfo(organizations: ProjectOrganization[]) {
|