@sanity/cli 3.44.1-canary.30 → 3.45.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.
package/lib/index.d.mts CHANGED
@@ -109,7 +109,6 @@ export declare interface CliConfig {
109
109
  }
110
110
  graphql?: GraphQLAPIConfig[]
111
111
  vite?: UserViteConfig
112
- autoUpdates?: boolean
113
112
  }
114
113
 
115
114
  declare type CliConfigResult =
package/lib/index.d.ts CHANGED
@@ -109,7 +109,6 @@ export declare interface CliConfig {
109
109
  }
110
110
  graphql?: GraphQLAPIConfig[]
111
111
  vite?: UserViteConfig
112
- autoUpdates?: boolean
113
112
  }
114
113
 
115
114
  declare type CliConfigResult =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli",
3
- "version": "3.44.1-canary.30+a154d9ea75",
3
+ "version": "3.45.0",
4
4
  "description": "Sanity CLI tool for managing Sanity installations, managing plugins, schemas and datasets",
5
5
  "keywords": [
6
6
  "sanity",
@@ -58,9 +58,9 @@
58
58
  "dependencies": {
59
59
  "@babel/traverse": "^7.23.5",
60
60
  "@sanity/client": "^6.19.1",
61
- "@sanity/codegen": "3.44.1-canary.30+a154d9ea75",
61
+ "@sanity/codegen": "3.45.0",
62
62
  "@sanity/telemetry": "^0.7.7",
63
- "@sanity/util": "3.44.1-canary.30+a154d9ea75",
63
+ "@sanity/util": "3.45.0",
64
64
  "chalk": "^4.1.2",
65
65
  "debug": "^4.3.4",
66
66
  "decompress": "^4.2.0",
@@ -77,12 +77,12 @@
77
77
  },
78
78
  "devDependencies": {
79
79
  "@jest/globals": "^29.7.0",
80
- "@repo/package.config": "3.44.0",
80
+ "@repo/package.config": "3.45.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.44.1-canary.30+a154d9ea75",
85
+ "@sanity/types": "3.45.0",
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": "a154d9ea757f553d108217bb3dfe76af4bda4e19"
138
+ "gitHead": "4ad7613258304e6134a58cfd0399409d9c5b4705"
139
139
  }
@@ -543,6 +543,24 @@ export default async function initSanity(
543
543
  // Bootstrap Sanity, creating required project files, manifests etc
544
544
  await bootstrapTemplate(templateOptions, context)
545
545
 
546
+ // update that files were initialized locally; do not halt flow for request
547
+ apiClient({api: {projectId: projectId}})
548
+ .request<SanityProject>({uri: `/projects/${projectId}`})
549
+ .then((project: SanityProject) => {
550
+ if (!project?.metadata?.cliInitializedAt) {
551
+ return apiClient({api: {projectId}}).request({
552
+ method: 'PATCH',
553
+ uri: `/projects/${projectId}`,
554
+ body: {metadata: {cliInitializedAt: new Date().toISOString()}},
555
+ })
556
+ }
557
+ return Promise.resolve()
558
+ })
559
+ .catch(() => {
560
+ // Non-critical update
561
+ debug('Failed to update cliInitializedAt metadata')
562
+ })
563
+
546
564
  let pkgManager: PackageManager
547
565
 
548
566
  // If the user has specified a package manager, and it's allowed use that
@@ -625,21 +643,6 @@ export default async function initSanity(
625
643
  print(`sanity help - to explore the CLI manual`)
626
644
  }
627
645
 
628
- try {
629
- const client = apiClient({api: {projectId: projectId}})
630
- const project = await client.request<SanityProject>({uri: `/projects/${projectId}`})
631
- if (!project?.metadata?.cliInitializedAt) {
632
- await apiClient({api: {projectId}}).request({
633
- method: 'PATCH',
634
- uri: `/projects/${projectId}`,
635
- body: {metadata: {cliInitializedAt: new Date().toISOString()}},
636
- })
637
- }
638
- } catch (err: unknown) {
639
- // Non-critical update
640
- debug('Failed to update cliInitializedAt metadata')
641
- }
642
-
643
646
  const sendInvite =
644
647
  isFirstProject &&
645
648
  (await prompt.single({
package/src/types.ts CHANGED
@@ -310,8 +310,6 @@ export interface CliConfig {
310
310
  graphql?: GraphQLAPIConfig[]
311
311
 
312
312
  vite?: UserViteConfig
313
-
314
- autoUpdates?: boolean
315
313
  }
316
314
 
317
315
  export type UserViteConfig =