@sanity/cli 3.57.2-manifests.74 → 3.57.2-manifests.75

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli",
3
- "version": "3.57.2-manifests.74+de125a7235",
3
+ "version": "3.57.2-manifests.75+c5f41c4789",
4
4
  "description": "Sanity CLI tool for managing Sanity installations, managing plugins, schemas and datasets",
5
5
  "keywords": [
6
6
  "sanity",
@@ -57,10 +57,10 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@babel/traverse": "^7.23.5",
60
- "@sanity/client": "^6.21.3",
61
- "@sanity/codegen": "3.57.2-manifests.74+de125a7235",
60
+ "@sanity/client": "^6.22.0",
61
+ "@sanity/codegen": "3.57.2-manifests.75+c5f41c4789",
62
62
  "@sanity/telemetry": "^0.7.7",
63
- "@sanity/util": "3.57.2-manifests.74+de125a7235",
63
+ "@sanity/util": "3.57.2-manifests.75+c5f41c4789",
64
64
  "chalk": "^4.1.2",
65
65
  "debug": "^4.3.4",
66
66
  "decompress": "^4.2.0",
@@ -76,13 +76,13 @@
76
76
  },
77
77
  "devDependencies": {
78
78
  "@jest/globals": "^29.7.0",
79
- "@repo/package.config": "3.58.0",
80
- "@repo/test-config": "3.57.4",
79
+ "@repo/package.config": "3.59.0",
80
+ "@repo/test-config": "3.59.0",
81
81
  "@rexxars/gitconfiglocal": "^3.0.1",
82
82
  "@rollup/plugin-node-resolve": "^15.2.3",
83
83
  "@sanity/eslint-config-studio": "^4.0.0",
84
84
  "@sanity/generate-help-url": "^3.0.0",
85
- "@sanity/types": "3.57.2-manifests.74+de125a7235",
85
+ "@sanity/types": "3.57.2-manifests.75+c5f41c4789",
86
86
  "@types/babel__traverse": "^7.20.5",
87
87
  "@types/configstore": "^5.0.1",
88
88
  "@types/cpx": "^1.5.2",
@@ -135,5 +135,5 @@
135
135
  "engines": {
136
136
  "node": ">=18"
137
137
  },
138
- "gitHead": "de125a7235550487b436568f2f1676a2facc9b83"
138
+ "gitHead": "c5f41c4789b88130c5e5d9de688aac38cd928989"
139
139
  }
@@ -594,26 +594,31 @@ export default async function initSanity(
594
594
 
595
595
  trace.log({step: 'importTemplateDataset', selectedOption: shouldImport ? 'yes' : 'no'})
596
596
 
597
- // Bootstrap Sanity, creating required project files, manifests etc
598
- await bootstrapTemplate(templateOptions, context)
599
-
600
- // update that files were initialized locally; do not halt flow for request
601
- apiClient({api: {projectId: projectId}})
602
- .request<SanityProject>({uri: `/projects/${projectId}`})
603
- .then((project: SanityProject) => {
604
- if (!project?.metadata?.cliInitializedAt) {
605
- return apiClient({api: {projectId}}).request({
606
- method: 'PATCH',
607
- uri: `/projects/${projectId}`,
608
- body: {metadata: {cliInitializedAt: new Date().toISOString()}},
609
- })
610
- }
611
- return Promise.resolve()
612
- })
613
- .catch(() => {
614
- // Non-critical update
615
- debug('Failed to update cliInitializedAt metadata')
616
- })
597
+ const [_, bootstrapPromise] = await Promise.allSettled([
598
+ // record template files attempted to be created locally
599
+ apiClient({api: {projectId: projectId}})
600
+ .request<SanityProject>({uri: `/projects/${projectId}`})
601
+ .then((project: SanityProject) => {
602
+ if (!project?.metadata?.cliInitializedAt) {
603
+ return apiClient({api: {projectId}}).request({
604
+ method: 'PATCH',
605
+ uri: `/projects/${projectId}`,
606
+ body: {metadata: {cliInitializedAt: new Date().toISOString()}},
607
+ })
608
+ }
609
+ return Promise.resolve()
610
+ })
611
+ .catch(() => {
612
+ // Non-critical update
613
+ debug('Failed to update cliInitializedAt metadata')
614
+ }),
615
+ // Bootstrap Sanity, creating required project files, manifests etc
616
+ bootstrapTemplate(templateOptions, context),
617
+ ])
618
+
619
+ if (bootstrapPromise.status === 'rejected' && bootstrapPromise.reason instanceof Error) {
620
+ throw bootstrapPromise.reason
621
+ }
617
622
 
618
623
  let pkgManager: PackageManager
619
624
 
@@ -37,9 +37,9 @@ const listProjectsCommand: CliCommandDefinition = {
37
37
 
38
38
  const projects = await client.projects.list()
39
39
  const ordered = sortBy(
40
- projects.map(({displayName, id, members = [], studioHost = '', createdAt}) => {
41
- const studio = studioHost ? `https://${studioHost}.sanity.studio` : 'Not deployed'
42
- return [id, members.length, displayName, studio, createdAt].map(String)
40
+ projects.map(({displayName, id, members = [], createdAt}) => {
41
+ const manage = `https://www.sanity.io/manage/project/${id}`
42
+ return [id, members.length, displayName, manage, createdAt].map(String)
43
43
  }),
44
44
  [headings.indexOf(flags.sort)],
45
45
  )