@sanity/cli 3.80.2-sapp-2525.10 → 3.81.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/cli",
3
- "version": "3.80.2-sapp-2525.10+b099908d42",
3
+ "version": "3.81.0",
4
4
  "description": "Sanity CLI tool for managing Sanity installations, managing plugins, schemas and datasets",
5
5
  "keywords": [
6
6
  "sanity",
@@ -58,11 +58,11 @@
58
58
  "dependencies": {
59
59
  "@babel/traverse": "^7.23.5",
60
60
  "@sanity/client": "^6.28.3",
61
- "@sanity/codegen": "3.80.2-sapp-2525.10+b099908d42",
61
+ "@sanity/codegen": "3.81.0",
62
62
  "@sanity/runtime-cli": "^1.1.1",
63
63
  "@sanity/telemetry": "^0.7.7",
64
64
  "@sanity/template-validator": "^2.4.3",
65
- "@sanity/util": "3.80.2-sapp-2525.10+b099908d42",
65
+ "@sanity/util": "3.81.0",
66
66
  "chalk": "^4.1.2",
67
67
  "debug": "^4.3.4",
68
68
  "decompress": "^4.2.0",
@@ -76,13 +76,13 @@
76
76
  "validate-npm-package-name": "^3.0.0"
77
77
  },
78
78
  "devDependencies": {
79
- "@repo/package.config": "3.80.1",
80
- "@repo/test-config": "3.80.1",
79
+ "@repo/package.config": "3.81.0",
80
+ "@repo/test-config": "3.81.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.80.2-sapp-2525.10+b099908d42",
85
+ "@sanity/types": "3.81.0",
86
86
  "@types/babel__traverse": "^7.20.5",
87
87
  "@types/configstore": "^5.0.1",
88
88
  "@types/cpx": "^1.5.2",
@@ -126,7 +126,7 @@
126
126
  "semver": "^7.3.5",
127
127
  "semver-compare": "^1.0.0",
128
128
  "tar": "^6.1.11",
129
- "vite": "^6.2.0",
129
+ "vite": "^6.2.3",
130
130
  "vitest": "^3.0.8",
131
131
  "which": "^2.0.2",
132
132
  "xdg-basedir": "^4.0.0"
@@ -134,5 +134,5 @@
134
134
  "engines": {
135
135
  "node": ">=18"
136
136
  },
137
- "gitHead": "b099908d4210389bed3d0fbfcaf6db52b054ef4c"
137
+ "gitHead": "51129a382681b156e60fa58c02db483abec1580b"
138
138
  }
@@ -2,6 +2,7 @@ import fs from 'node:fs/promises'
2
2
  import path from 'node:path'
3
3
 
4
4
  import chalk from 'chalk'
5
+ import {deburr} from 'lodash'
5
6
 
6
7
  import {debug} from '../../debug'
7
8
  import {studioDependencies} from '../../studioDependencies'
@@ -113,10 +114,21 @@ export async function bootstrapLocalTemplate(
113
114
  {} as Record<string, string>,
114
115
  )
115
116
 
117
+ let packageJsonName: string = packageName
118
+
119
+ /**
120
+ * Currently app init doesn't ask for a name, so we use the last part of the path
121
+ */
122
+ if (isAppTemplate) {
123
+ packageJsonName = deburr(path.basename(outputPath).toLowerCase())
124
+ .replace(/\s+/g, '-')
125
+ .replace(/[^a-z0-9-]/g, '')
126
+ }
127
+
116
128
  // Now create a package manifest (`package.json`) with the merged dependencies
117
129
  spinner = output.spinner('Creating default project files').start()
118
130
  const packageManifest = await createPackageManifest({
119
- name: packageName,
131
+ name: packageJsonName,
120
132
  dependencies,
121
133
  devDependencies,
122
134
  scripts: template.scripts,