@sanity/cli 3.81.1-sdk-295.36 → 3.83.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/_chunks-cjs/cli.js +34 -6
- package/lib/_chunks-cjs/cli.js.map +1 -1
- package/lib/index.d.mts +10 -6
- package/lib/index.d.ts +10 -6
- package/package.json +10 -9
- package/src/actions/init-project/bootstrapLocalTemplate.ts +1 -1
- package/src/actions/init-project/createAppCliConfig.ts +3 -3
- package/src/actions/init-project/determineAppTemplate.ts +1 -1
- package/src/actions/init-project/initProject.ts +1 -1
- package/src/actions/init-project/templates/appQuickstart.ts +1 -1
- package/src/actions/init-project/templates/appSanityUi.ts +32 -0
- package/src/actions/init-project/templates/index.ts +2 -0
- package/src/studioDependencies.ts +1 -1
- package/src/types.ts +10 -6
- package/templates/app-quickstart/src/ExampleComponent.css +60 -2
- package/templates/app-quickstart/src/ExampleComponent.tsx +20 -5
- package/templates/app-sanity-ui/src/App.tsx +30 -0
- package/templates/app-sanity-ui/src/ExampleComponent.tsx +33 -0
- package/bin/xdg-open +0 -1066
- package/lib/index.esm.js +0 -391
- package/lib/index.esm.js.map +0 -1
package/lib/_chunks-cjs/cli.js
CHANGED
@@ -27274,7 +27274,7 @@ const studioDependencies = {
|
|
27274
27274
|
// Non-Sanity dependencies
|
27275
27275
|
react: "^18.2.0",
|
27276
27276
|
"react-dom": "^18.2.0",
|
27277
|
-
"styled-components": "^6.1.
|
27277
|
+
"styled-components": "^6.1.15"
|
27278
27278
|
},
|
27279
27279
|
devDependencies: {
|
27280
27280
|
// Linting/tooling
|
@@ -46741,9 +46741,9 @@ const defaultAppTemplate = `
|
|
46741
46741
|
import {defineCliConfig} from 'sanity/cli'
|
46742
46742
|
|
46743
46743
|
export default defineCliConfig({
|
46744
|
-
|
46744
|
+
app: {
|
46745
46745
|
organizationId: '%organizationId%',
|
46746
|
-
|
46746
|
+
entry: '%entry%',
|
46747
46747
|
},
|
46748
46748
|
})
|
46749
46749
|
`;
|
@@ -46917,7 +46917,7 @@ function createStudioConfig(options2) {
|
|
46917
46917
|
variables
|
46918
46918
|
});
|
46919
46919
|
}
|
46920
|
-
const appTemplates = ["app-quickstart"];
|
46920
|
+
const appTemplates = ["app-quickstart", "app-sanity-ui"];
|
46921
46921
|
function determineAppTemplate(templateName) {
|
46922
46922
|
return appTemplates.includes(templateName);
|
46923
46923
|
}
|
@@ -46940,7 +46940,34 @@ const appTemplate = {
|
|
46940
46940
|
sanity: "^3",
|
46941
46941
|
typescript: "^5.1.6"
|
46942
46942
|
},
|
46943
|
-
|
46943
|
+
entry: "./src/App.tsx",
|
46944
|
+
scripts: {
|
46945
|
+
dev: "sanity dev",
|
46946
|
+
build: "sanity build",
|
46947
|
+
start: "sanity start"
|
46948
|
+
}
|
46949
|
+
}, appSanityUiTemplate = {
|
46950
|
+
dependencies: {
|
46951
|
+
"@sanity/sdk": "^0.0.0-rc",
|
46952
|
+
"@sanity/sdk-react": "^0.0.0-rc",
|
46953
|
+
"@sanity/ui": "^2",
|
46954
|
+
react: "^19",
|
46955
|
+
"react-dom": "^19",
|
46956
|
+
"styled-components": "^6.1.17"
|
46957
|
+
},
|
46958
|
+
devDependencies: {
|
46959
|
+
/*
|
46960
|
+
* this will be changed to eslint-config sanity,
|
46961
|
+
* eslint.config generation will be a fast follow
|
46962
|
+
*/
|
46963
|
+
"@sanity/eslint-config-studio": "^5.0.1",
|
46964
|
+
"@types/react": "^18.0.25",
|
46965
|
+
eslint: "^9.9.0",
|
46966
|
+
prettier: "^3.0.2",
|
46967
|
+
sanity: "^3",
|
46968
|
+
typescript: "^5.1.6"
|
46969
|
+
},
|
46970
|
+
entry: "./src/App.tsx",
|
46944
46971
|
scripts: {
|
46945
46972
|
dev: "sanity dev",
|
46946
46973
|
build: "sanity build",
|
@@ -47125,6 +47152,7 @@ export default defineConfig({
|
|
47125
47152
|
blog: blogTemplate,
|
47126
47153
|
clean: cleanTemplate,
|
47127
47154
|
"app-quickstart": appTemplate,
|
47155
|
+
"app-sanity-ui": appSanityUiTemplate,
|
47128
47156
|
"get-started": getStartedTemplate,
|
47129
47157
|
moviedb: movieTemplate,
|
47130
47158
|
shopify: shopifyTemplate$1,
|
@@ -47190,7 +47218,7 @@ async function bootstrapLocalTemplate(opts, context) {
|
|
47190
47218
|
template: template.configTemplate,
|
47191
47219
|
variables
|
47192
47220
|
}), cliConfig = isAppTemplate ? createAppCliConfig({
|
47193
|
-
|
47221
|
+
entry: template.entry,
|
47194
47222
|
organizationId: variables.organizationId
|
47195
47223
|
}) : createCliConfig({
|
47196
47224
|
projectId: variables.projectId,
|