@sanity/workbench-cli 2.13.0 → 2.14.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/dist/_exports/init.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
/** App scaffold — `entry` auto-declares the navigable app view. */
|
|
2
2
|
declare const workbenchAppConfigTemplate = "\nimport {defineApplication, defineCliConfig} from 'sanity/cli'\n\nexport default defineCliConfig({\n app: defineApplication({\n title: '%title%',\n name: '%slug%',\n slug: '%slug%',\n organizationId: '%organizationId%',\n entry: '%entry%',\n }),\n})\n";
|
|
3
|
+
/**
|
|
4
|
+
* Media Library config app scaffold — `unstable_defineMediaLibrary` declares
|
|
5
|
+
* field (aspect) definitions for an organization's Media Library; the
|
|
6
|
+
* workbench CLI wires the island build natively for this app shape. The
|
|
7
|
+
* `fields` entries must match the modules the template ships in
|
|
8
|
+
* `src/fields/`.
|
|
9
|
+
*/
|
|
10
|
+
declare const workbenchMediaLibraryConfigTemplate = "\nimport {defineCliConfig, unstable_defineMediaLibrary} from 'sanity/cli'\n\nexport default defineCliConfig({\n app: unstable_defineMediaLibrary({\n organizationId: '%organizationId%',\n fields: [\n {name: 'caption', src: './src/fields/caption.tsx', title: 'Caption'},\n {name: 'notes', src: './src/fields/notes.tsx', title: 'Notes'},\n ],\n }),\n})\n";
|
|
3
11
|
/**
|
|
4
12
|
* Studio scaffold — brands with name/slug/title only, no `entry` (studio app views
|
|
5
13
|
* aren't implemented yet).
|
|
6
14
|
*/
|
|
7
15
|
declare const workbenchStudioConfigTemplate = "\nimport {defineApplication, defineCliConfig} from 'sanity/cli'\n\nexport default defineCliConfig({\n api: {\n projectId: '%projectId%',\n dataset: '%dataset%'\n },\n app: defineApplication({\n title: '%title%',\n name: '%slug%',\n slug: '%slug%',\n organizationId: '%organizationId%',\n }),\n deployment: {\n /**\n * Enable auto-updates for studios.\n * Learn more at https://www.sanity.io/docs/studio/latest-version-of-sanity#k47faf43faf56\n */\n autoUpdates: __BOOL__autoUpdates__,\n },\n})\n";
|
|
8
16
|
declare function toAppSlug(value: string): string | null;
|
|
9
|
-
export { toAppSlug, workbenchAppConfigTemplate, workbenchStudioConfigTemplate };
|
|
17
|
+
export { toAppSlug, workbenchAppConfigTemplate, workbenchMediaLibraryConfigTemplate, workbenchStudioConfigTemplate };
|
|
10
18
|
//# sourceMappingURL=init.d.ts.map
|
package/dist/_exports/init.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Browser-safe `init` entry: the workbench `sanity.cli.ts` config templates the
|
|
2
2
|
// CLI's init scaffolding fills in, and the coercion that fills `%slug%`. No runtime deps.
|
|
3
|
-
export { workbenchAppConfigTemplate, workbenchStudioConfigTemplate } from '../actions/init/cliConfig.js';
|
|
3
|
+
export { workbenchAppConfigTemplate, workbenchMediaLibraryConfigTemplate, workbenchStudioConfigTemplate } from '../actions/init/cliConfig.js';
|
|
4
4
|
export { toAppSlug } from '../appSlug.js';
|
|
5
5
|
|
|
6
6
|
//# sourceMappingURL=init.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/_exports/init.ts"],"sourcesContent":["// Browser-safe `init` entry: the workbench `sanity.cli.ts` config templates the\n// CLI's init scaffolding fills in, and the coercion that fills `%slug%`. No runtime deps.\nexport {\n workbenchAppConfigTemplate,\n workbenchStudioConfigTemplate,\n} from '../actions/init/cliConfig.js'\nexport {toAppSlug} from '../appSlug.js'\n"],"names":["workbenchAppConfigTemplate","workbenchStudioConfigTemplate","toAppSlug"],"mappings":"AAAA,gFAAgF;AAChF,0FAA0F;AAC1F,SACEA,0BAA0B,EAC1BC,6BAA6B,QACxB,+BAA8B;AACrC,SAAQC,SAAS,QAAO,gBAAe"}
|
|
1
|
+
{"version":3,"sources":["../../src/_exports/init.ts"],"sourcesContent":["// Browser-safe `init` entry: the workbench `sanity.cli.ts` config templates the\n// CLI's init scaffolding fills in, and the coercion that fills `%slug%`. No runtime deps.\nexport {\n workbenchAppConfigTemplate,\n workbenchMediaLibraryConfigTemplate,\n workbenchStudioConfigTemplate,\n} from '../actions/init/cliConfig.js'\nexport {toAppSlug} from '../appSlug.js'\n"],"names":["workbenchAppConfigTemplate","workbenchMediaLibraryConfigTemplate","workbenchStudioConfigTemplate","toAppSlug"],"mappings":"AAAA,gFAAgF;AAChF,0FAA0F;AAC1F,SACEA,0BAA0B,EAC1BC,mCAAmC,EACnCC,6BAA6B,QACxB,+BAA8B;AACrC,SAAQC,SAAS,QAAO,gBAAe"}
|
|
@@ -17,6 +17,25 @@ export default defineCliConfig({
|
|
|
17
17
|
}),
|
|
18
18
|
})
|
|
19
19
|
`;
|
|
20
|
+
/**
|
|
21
|
+
* Media Library config app scaffold — `unstable_defineMediaLibrary` declares
|
|
22
|
+
* field (aspect) definitions for an organization's Media Library; the
|
|
23
|
+
* workbench CLI wires the island build natively for this app shape. The
|
|
24
|
+
* `fields` entries must match the modules the template ships in
|
|
25
|
+
* `src/fields/`.
|
|
26
|
+
*/ export const workbenchMediaLibraryConfigTemplate = `
|
|
27
|
+
import {defineCliConfig, unstable_defineMediaLibrary} from 'sanity/cli'
|
|
28
|
+
|
|
29
|
+
export default defineCliConfig({
|
|
30
|
+
app: unstable_defineMediaLibrary({
|
|
31
|
+
organizationId: '%organizationId%',
|
|
32
|
+
fields: [
|
|
33
|
+
{name: 'caption', src: './src/fields/caption.tsx', title: 'Caption'},
|
|
34
|
+
{name: 'notes', src: './src/fields/notes.tsx', title: 'Notes'},
|
|
35
|
+
],
|
|
36
|
+
}),
|
|
37
|
+
})
|
|
38
|
+
`;
|
|
20
39
|
/**
|
|
21
40
|
* Studio scaffold — brands with name/slug/title only, no `entry` (studio app views
|
|
22
41
|
* aren't implemented yet).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/init/cliConfig.ts"],"sourcesContent":["// `sanity.cli.ts` templates for workbench (`defineApplication`) projects,\n// consumed by the CLI's `init` scaffolding. The branded `defineApplication`\n// result is the sole workbench (module-federation) opt-in, so its config shape\n// is workbench's to own; the CLI keeps the non-workbench templates and the\n// `%placeholder%` substitution. `%slug%`/`%title%`/etc. are filled in by the\n// CLI's template processor.\n\n/** App scaffold — `entry` auto-declares the navigable app view. */\nexport const workbenchAppConfigTemplate = `\nimport {defineApplication, defineCliConfig} from 'sanity/cli'\n\nexport default defineCliConfig({\n app: defineApplication({\n title: '%title%',\n name: '%slug%',\n slug: '%slug%',\n organizationId: '%organizationId%',\n entry: '%entry%',\n }),\n})\n`\n\n/**\n * Studio scaffold — brands with name/slug/title only, no `entry` (studio app views\n * aren't implemented yet).\n */\nexport const workbenchStudioConfigTemplate = `\nimport {defineApplication, defineCliConfig} from 'sanity/cli'\n\nexport default defineCliConfig({\n api: {\n projectId: '%projectId%',\n dataset: '%dataset%'\n },\n app: defineApplication({\n title: '%title%',\n name: '%slug%',\n slug: '%slug%',\n organizationId: '%organizationId%',\n }),\n deployment: {\n /**\n * Enable auto-updates for studios.\n * Learn more at https://www.sanity.io/docs/studio/latest-version-of-sanity#k47faf43faf56\n */\n autoUpdates: __BOOL__autoUpdates__,\n },\n})\n`\n"],"names":["workbenchAppConfigTemplate","workbenchStudioConfigTemplate"],"mappings":"AAAA,0EAA0E;AAC1E,4EAA4E;AAC5E,+EAA+E;AAC/E,2EAA2E;AAC3E,6EAA6E;AAC7E,4BAA4B;AAE5B,iEAAiE,GACjE,OAAO,MAAMA,6BAA6B,CAAC;;;;;;;;;;;;AAY3C,CAAC,CAAA;AAED;;;CAGC,GACD,OAAO,MAAMC,gCAAgC,CAAC;;;;;;;;;;;;;;;;;;;;;;AAsB9C,CAAC,CAAA"}
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/init/cliConfig.ts"],"sourcesContent":["// `sanity.cli.ts` templates for workbench (`defineApplication`) projects,\n// consumed by the CLI's `init` scaffolding. The branded `defineApplication`\n// result is the sole workbench (module-federation) opt-in, so its config shape\n// is workbench's to own; the CLI keeps the non-workbench templates and the\n// `%placeholder%` substitution. `%slug%`/`%title%`/etc. are filled in by the\n// CLI's template processor.\n\n/** App scaffold — `entry` auto-declares the navigable app view. */\nexport const workbenchAppConfigTemplate = `\nimport {defineApplication, defineCliConfig} from 'sanity/cli'\n\nexport default defineCliConfig({\n app: defineApplication({\n title: '%title%',\n name: '%slug%',\n slug: '%slug%',\n organizationId: '%organizationId%',\n entry: '%entry%',\n }),\n})\n`\n\n/**\n * Media Library config app scaffold — `unstable_defineMediaLibrary` declares\n * field (aspect) definitions for an organization's Media Library; the\n * workbench CLI wires the island build natively for this app shape. The\n * `fields` entries must match the modules the template ships in\n * `src/fields/`.\n */\nexport const workbenchMediaLibraryConfigTemplate = `\nimport {defineCliConfig, unstable_defineMediaLibrary} from 'sanity/cli'\n\nexport default defineCliConfig({\n app: unstable_defineMediaLibrary({\n organizationId: '%organizationId%',\n fields: [\n {name: 'caption', src: './src/fields/caption.tsx', title: 'Caption'},\n {name: 'notes', src: './src/fields/notes.tsx', title: 'Notes'},\n ],\n }),\n})\n`\n\n/**\n * Studio scaffold — brands with name/slug/title only, no `entry` (studio app views\n * aren't implemented yet).\n */\nexport const workbenchStudioConfigTemplate = `\nimport {defineApplication, defineCliConfig} from 'sanity/cli'\n\nexport default defineCliConfig({\n api: {\n projectId: '%projectId%',\n dataset: '%dataset%'\n },\n app: defineApplication({\n title: '%title%',\n name: '%slug%',\n slug: '%slug%',\n organizationId: '%organizationId%',\n }),\n deployment: {\n /**\n * Enable auto-updates for studios.\n * Learn more at https://www.sanity.io/docs/studio/latest-version-of-sanity#k47faf43faf56\n */\n autoUpdates: __BOOL__autoUpdates__,\n },\n})\n`\n"],"names":["workbenchAppConfigTemplate","workbenchMediaLibraryConfigTemplate","workbenchStudioConfigTemplate"],"mappings":"AAAA,0EAA0E;AAC1E,4EAA4E;AAC5E,+EAA+E;AAC/E,2EAA2E;AAC3E,6EAA6E;AAC7E,4BAA4B;AAE5B,iEAAiE,GACjE,OAAO,MAAMA,6BAA6B,CAAC;;;;;;;;;;;;AAY3C,CAAC,CAAA;AAED;;;;;;CAMC,GACD,OAAO,MAAMC,sCAAsC,CAAC;;;;;;;;;;;;AAYpD,CAAC,CAAA;AAED;;;CAGC,GACD,OAAO,MAAMC,gCAAgC,CAAC;;;;;;;;;;;;;;;;;;;;;;AAsB9C,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/workbench-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.0",
|
|
4
4
|
"description": "Internal implementation detail of the Sanity CLI's unstable workbench support. Not intended for direct use.",
|
|
5
5
|
"homepage": "https://github.com/sanity-io/cli",
|
|
6
6
|
"bugs": "https://github.com/sanity-io/cli/issues",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@module-federation/runtime": "2.9.2",
|
|
65
65
|
"@module-federation/vite": "1.23.5",
|
|
66
|
-
"@sanity/cli-core": "^3.
|
|
66
|
+
"@sanity/cli-core": "^3.12.0",
|
|
67
67
|
"@sanity/sdk": "^3.8.0",
|
|
68
68
|
"@sanity/types": "^6.17.0",
|
|
69
69
|
"@vitejs/plugin-react": "^6.1.2",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@eslint/compat": "^2.1.0",
|
|
79
79
|
"@repo/package.config": "0.0.1",
|
|
80
80
|
"@repo/tsconfig": "3.70.0",
|
|
81
|
-
"@sanity/cli-test": "
|
|
81
|
+
"@sanity/cli-test": "22.0.0",
|
|
82
82
|
"@sanity/eslint-config-cli": "^1.1.3",
|
|
83
83
|
"@sanity/pkg-utils": "^12.3.4",
|
|
84
84
|
"@swc/cli": "^0.8.1",
|