@sanity/workbench-cli 2.20.0 → 2.22.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.
Files changed (77) hide show
  1. package/dist/_exports/build.d.ts +10 -2
  2. package/dist/_exports/build.js +2 -0
  3. package/dist/_exports/build.js.map +1 -1
  4. package/dist/_exports/defineApp-DUi9ZfpT.d.ts +377 -0
  5. package/dist/_exports/deploy.d.ts +25 -43
  6. package/dist/_exports/deploy.js +3 -1
  7. package/dist/_exports/deploy.js.map +1 -1
  8. package/dist/_exports/{summarizeInterfaces-BKIMEFzw.d.ts → deploySummary-BPgEW1qt.d.ts} +47 -4
  9. package/dist/_exports/dev.d.ts +2 -2
  10. package/dist/_exports/index.d.ts +22 -4
  11. package/dist/_exports/index.js +2 -1
  12. package/dist/_exports/index.js.map +1 -1
  13. package/dist/_exports/preview.d.ts +1 -1
  14. package/dist/_exports/{registry-BI8kZVpy.d.ts → registry-DysyB1F6.d.ts} +11 -7
  15. package/dist/_exports/{resolveWorkbenchConfig-Eex64aAA.d.ts → resolveWorkbenchApp-C_rqQBQP.d.ts} +5 -20
  16. package/dist/_exports/resolveWorkbenchConfig-C_o8npN0.d.ts +10 -0
  17. package/dist/_exports/undeploy.d.ts +6 -6
  18. package/dist/_exports/undeploy.js +1 -0
  19. package/dist/_exports/undeploy.js.map +1 -1
  20. package/dist/actions/build/artifact.js +20 -1
  21. package/dist/actions/build/artifact.js.map +1 -1
  22. package/dist/actions/build/buildSummary.js +34 -0
  23. package/dist/actions/build/buildSummary.js.map +1 -0
  24. package/dist/actions/build/configs/artifact.js +10 -50
  25. package/dist/actions/build/configs/artifact.js.map +1 -1
  26. package/dist/actions/build/dashboardConfig/artifact.js +25 -0
  27. package/dist/actions/build/dashboardConfig/artifact.js.map +1 -0
  28. package/dist/actions/build/hotConfigListeners.js +34 -0
  29. package/dist/actions/build/hotConfigListeners.js.map +1 -0
  30. package/dist/actions/build/vite/optimize-deps.js +2 -1
  31. package/dist/actions/build/vite/optimize-deps.js.map +1 -1
  32. package/dist/actions/build/vite/plugins/plugin-sanity-extension-artifacts.js +3 -1
  33. package/dist/actions/build/vite/plugins/plugin-sanity-extension-artifacts.js.map +1 -1
  34. package/dist/actions/deploy/deployConfig.js +9 -7
  35. package/dist/actions/deploy/deployConfig.js.map +1 -1
  36. package/dist/actions/deploy/deployPayload.js.map +1 -1
  37. package/dist/actions/deploy/deploySummary.js +46 -10
  38. package/dist/actions/deploy/deploySummary.js.map +1 -1
  39. package/dist/actions/deploy/uploadDashboardConfig.js +34 -0
  40. package/dist/actions/deploy/uploadDashboardConfig.js.map +1 -0
  41. package/dist/actions/dev/deriveConfigs.js +17 -13
  42. package/dist/actions/dev/deriveConfigs.js.map +1 -1
  43. package/dist/actions/dev/devSummary.js +12 -0
  44. package/dist/actions/dev/devSummary.js.map +1 -1
  45. package/dist/actions/dev/registry.js +34 -20
  46. package/dist/actions/dev/registry.js.map +1 -1
  47. package/dist/actions/dev/startDevServerRegistration.js +9 -5
  48. package/dist/actions/dev/startDevServerRegistration.js.map +1 -1
  49. package/dist/actions/dev/startWorkbenchDev.js +4 -17
  50. package/dist/actions/dev/startWorkbenchDev.js.map +1 -1
  51. package/dist/actions/preview/startWorkbenchPreview.js +67 -18
  52. package/dist/actions/preview/startWorkbenchPreview.js.map +1 -1
  53. package/dist/actions/summary.js +3 -4
  54. package/dist/actions/summary.js.map +1 -1
  55. package/dist/actions/undeploy/workbenchUndeployAdapter.js +57 -5
  56. package/dist/actions/undeploy/workbenchUndeployAdapter.js.map +1 -1
  57. package/dist/contract.js +14 -0
  58. package/dist/contract.js.map +1 -1
  59. package/dist/dashboardConfig.js +5 -0
  60. package/dist/dashboardConfig.js.map +1 -0
  61. package/dist/defineApp.js +25 -2
  62. package/dist/defineApp.js.map +1 -1
  63. package/dist/deriveInterfaces.js +2 -2
  64. package/dist/deriveInterfaces.js.map +1 -1
  65. package/dist/resolveWorkbenchApp.js +3 -2
  66. package/dist/resolveWorkbenchApp.js.map +1 -1
  67. package/dist/resolveWorkbenchConfig.js +11 -16
  68. package/dist/resolveWorkbenchConfig.js.map +1 -1
  69. package/dist/services/applications.js +10 -5
  70. package/dist/services/applications.js.map +1 -1
  71. package/dist/services/dashboard-configs.js +54 -0
  72. package/dist/services/dashboard-configs.js.map +1 -0
  73. package/dist/services/organizations.js +2 -1
  74. package/dist/services/organizations.js.map +1 -1
  75. package/package.json +8 -8
  76. package/dist/_exports/contract-BeAds4Yi.d.ts +0 -191
  77. package/dist/_exports/defineApp-DSXAAr3V.d.ts +0 -177
@@ -1,5 +1,13 @@
1
- import { a as resolveAppEntry, i as WorkbenchExposes, n as resolveWorkbenchConfig, o as resolveWorkbenchApp, r as ResolvedWorkbenchApp, t as ResolvedMediaLibraryConfig } from "./resolveWorkbenchConfig-Eex64aAA.js";
1
+ import { _ as DASHBOARD_CONFIG_CONTRACT_VERSION } from "./defineApp-DUi9ZfpT.js";
2
+ import { i as resolveWorkbenchApp, n as WorkbenchExposes, r as resolveAppEntry, t as ResolvedWorkbenchApp } from "./resolveWorkbenchApp-C_rqQBQP.js";
3
+ import { t as resolveWorkbenchConfig } from "./resolveWorkbenchConfig-C_o8npN0.js";
4
+ import { CliConfig } from "@sanity/cli-core";
2
5
  import { InlineConfig, PluginOption } from "vite";
6
+ /** Starts the organization and deployment lookup beside a `sanity build`; `undefined` outside the Dashboard. */
7
+ declare function startBuildSummary({ cliConfig, isApp }: {
8
+ cliConfig: CliConfig;
9
+ isApp: boolean;
10
+ }): (() => Promise<string>) | undefined;
3
11
  /**
4
12
  * Resolves to the parsed federation manifest in `sourceDir`. A workbench build
5
13
  * may also emit a standalone `index.html`, so the manifest, not `index.html`,
@@ -128,5 +136,5 @@ declare function workbenchVitePlugins(options: WorkbenchViteOptions): Promise<Pl
128
136
  * its own id from the applications API.
129
137
  */
130
138
  declare function buildAppId(app: ResolvedWorkbenchApp): Promise<string>;
131
- export { RESOURCE_BINDINGS_CHUNK_NAME, RESOURCE_BINDINGS_ENTRY_IMPORT, RESOURCE_BINDINGS_FILENAME, RESOURCE_BINDINGS_MODULE_SOURCE, RESOURCE_BINDINGS_TOKEN, type ResolvedMediaLibraryConfig, type WorkbenchExposes, buildAppId, buildFederatedApp, readBuiltManifest, resolveAppEntry, resolveWorkbenchApp, resolveWorkbenchConfig, resourceBindingsChunkFileName, resourceBindingsCodeSplittingGroup, workbenchOptimizeDeps, workbenchVitePlugins };
139
+ export { DASHBOARD_CONFIG_CONTRACT_VERSION, RESOURCE_BINDINGS_CHUNK_NAME, RESOURCE_BINDINGS_ENTRY_IMPORT, RESOURCE_BINDINGS_FILENAME, RESOURCE_BINDINGS_MODULE_SOURCE, RESOURCE_BINDINGS_TOKEN, type WorkbenchExposes, buildAppId, buildFederatedApp, readBuiltManifest, resolveAppEntry, resolveWorkbenchApp, resolveWorkbenchConfig, resourceBindingsChunkFileName, resourceBindingsCodeSplittingGroup, startBuildSummary, workbenchOptimizeDeps, workbenchVitePlugins };
132
140
  //# sourceMappingURL=build.d.ts.map
@@ -3,12 +3,14 @@
3
3
  // resolver the build reads declared views/web workers from. The build needs no
4
4
  // deploy-time guards, so it takes the bare `resolveWorkbenchApp` — the guarded
5
5
  // view (`getWorkbench`) is the deploy entry's export.
6
+ export { startBuildSummary } from '../actions/build/buildSummary.js';
6
7
  export { readBuiltManifest } from '../actions/build/readBuiltManifest.js';
7
8
  export { RESOURCE_BINDINGS_CHUNK_NAME, RESOURCE_BINDINGS_ENTRY_IMPORT, RESOURCE_BINDINGS_FILENAME, RESOURCE_BINDINGS_MODULE_SOURCE, RESOURCE_BINDINGS_TOKEN, resourceBindingsChunkFileName, resourceBindingsCodeSplittingGroup } from '../actions/build/resource-bindings.js';
8
9
  export { buildFederatedApp } from '../actions/build/vite/discover-shared-dependencies.js';
9
10
  export { workbenchOptimizeDeps } from '../actions/build/vite/optimize-deps.js';
10
11
  export { workbenchVitePlugins } from '../actions/build/vite/workbench-vite-plugins.js';
11
12
  export { buildAppId } from '../appId.js';
13
+ export { DASHBOARD_CONFIG_CONTRACT_VERSION } from '../contract.js';
12
14
  export { resolveAppEntry, resolveWorkbenchApp } from '../resolveWorkbenchApp.js';
13
15
  export { resolveWorkbenchConfig } from '../resolveWorkbenchConfig.js';
14
16
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/_exports/build.ts"],"sourcesContent":["// Node-only build entry: the module-federation Vite plugins that\n// `@sanity/cli-build`'s `getViteConfig` swaps in for a workbench app, plus the\n// resolver the build reads declared views/web workers from. The build needs no\n// deploy-time guards, so it takes the bare `resolveWorkbenchApp` — the guarded\n// view (`getWorkbench`) is the deploy entry's export.\n\nexport {readBuiltManifest} from '../actions/build/readBuiltManifest.js'\nexport {\n RESOURCE_BINDINGS_CHUNK_NAME,\n RESOURCE_BINDINGS_ENTRY_IMPORT,\n RESOURCE_BINDINGS_FILENAME,\n RESOURCE_BINDINGS_MODULE_SOURCE,\n RESOURCE_BINDINGS_TOKEN,\n resourceBindingsChunkFileName,\n resourceBindingsCodeSplittingGroup,\n} from '../actions/build/resource-bindings.js'\nexport {buildFederatedApp} from '../actions/build/vite/discover-shared-dependencies.js'\nexport {workbenchOptimizeDeps} from '../actions/build/vite/optimize-deps.js'\nexport {workbenchVitePlugins} from '../actions/build/vite/workbench-vite-plugins.js'\nexport {buildAppId} from '../appId.js'\nexport {\n resolveAppEntry,\n resolveWorkbenchApp,\n type WorkbenchExposes,\n} from '../resolveWorkbenchApp.js'\nexport {type ResolvedMediaLibraryConfig, resolveWorkbenchConfig} from '../resolveWorkbenchConfig.js'\n"],"names":["readBuiltManifest","RESOURCE_BINDINGS_CHUNK_NAME","RESOURCE_BINDINGS_ENTRY_IMPORT","RESOURCE_BINDINGS_FILENAME","RESOURCE_BINDINGS_MODULE_SOURCE","RESOURCE_BINDINGS_TOKEN","resourceBindingsChunkFileName","resourceBindingsCodeSplittingGroup","buildFederatedApp","workbenchOptimizeDeps","workbenchVitePlugins","buildAppId","resolveAppEntry","resolveWorkbenchApp","resolveWorkbenchConfig"],"mappings":"AAAA,iEAAiE;AACjE,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,sDAAsD;AAEtD,SAAQA,iBAAiB,QAAO,wCAAuC;AACvE,SACEC,4BAA4B,EAC5BC,8BAA8B,EAC9BC,0BAA0B,EAC1BC,+BAA+B,EAC/BC,uBAAuB,EACvBC,6BAA6B,EAC7BC,kCAAkC,QAC7B,wCAAuC;AAC9C,SAAQC,iBAAiB,QAAO,wDAAuD;AACvF,SAAQC,qBAAqB,QAAO,yCAAwC;AAC5E,SAAQC,oBAAoB,QAAO,kDAAiD;AACpF,SAAQC,UAAU,QAAO,cAAa;AACtC,SACEC,eAAe,EACfC,mBAAmB,QAEd,4BAA2B;AAClC,SAAyCC,sBAAsB,QAAO,+BAA8B"}
1
+ {"version":3,"sources":["../../src/_exports/build.ts"],"sourcesContent":["// Node-only build entry: the module-federation Vite plugins that\n// `@sanity/cli-build`'s `getViteConfig` swaps in for a workbench app, plus the\n// resolver the build reads declared views/web workers from. The build needs no\n// deploy-time guards, so it takes the bare `resolveWorkbenchApp` — the guarded\n// view (`getWorkbench`) is the deploy entry's export.\n\nexport {startBuildSummary} from '../actions/build/buildSummary.js'\nexport {readBuiltManifest} from '../actions/build/readBuiltManifest.js'\nexport {\n RESOURCE_BINDINGS_CHUNK_NAME,\n RESOURCE_BINDINGS_ENTRY_IMPORT,\n RESOURCE_BINDINGS_FILENAME,\n RESOURCE_BINDINGS_MODULE_SOURCE,\n RESOURCE_BINDINGS_TOKEN,\n resourceBindingsChunkFileName,\n resourceBindingsCodeSplittingGroup,\n} from '../actions/build/resource-bindings.js'\nexport {buildFederatedApp} from '../actions/build/vite/discover-shared-dependencies.js'\nexport {workbenchOptimizeDeps} from '../actions/build/vite/optimize-deps.js'\nexport {workbenchVitePlugins} from '../actions/build/vite/workbench-vite-plugins.js'\nexport {buildAppId} from '../appId.js'\nexport {DASHBOARD_CONFIG_CONTRACT_VERSION} from '../contract.js'\nexport {\n resolveAppEntry,\n resolveWorkbenchApp,\n type WorkbenchExposes,\n} from '../resolveWorkbenchApp.js'\nexport {resolveWorkbenchConfig} from '../resolveWorkbenchConfig.js'\n"],"names":["startBuildSummary","readBuiltManifest","RESOURCE_BINDINGS_CHUNK_NAME","RESOURCE_BINDINGS_ENTRY_IMPORT","RESOURCE_BINDINGS_FILENAME","RESOURCE_BINDINGS_MODULE_SOURCE","RESOURCE_BINDINGS_TOKEN","resourceBindingsChunkFileName","resourceBindingsCodeSplittingGroup","buildFederatedApp","workbenchOptimizeDeps","workbenchVitePlugins","buildAppId","DASHBOARD_CONFIG_CONTRACT_VERSION","resolveAppEntry","resolveWorkbenchApp","resolveWorkbenchConfig"],"mappings":"AAAA,iEAAiE;AACjE,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,sDAAsD;AAEtD,SAAQA,iBAAiB,QAAO,mCAAkC;AAClE,SAAQC,iBAAiB,QAAO,wCAAuC;AACvE,SACEC,4BAA4B,EAC5BC,8BAA8B,EAC9BC,0BAA0B,EAC1BC,+BAA+B,EAC/BC,uBAAuB,EACvBC,6BAA6B,EAC7BC,kCAAkC,QAC7B,wCAAuC;AAC9C,SAAQC,iBAAiB,QAAO,wDAAuD;AACvF,SAAQC,qBAAqB,QAAO,yCAAwC;AAC5E,SAAQC,oBAAoB,QAAO,kDAAiD;AACpF,SAAQC,UAAU,QAAO,cAAa;AACtC,SAAQC,iCAAiC,QAAO,iBAAgB;AAChE,SACEC,eAAe,EACfC,mBAAmB,QAEd,4BAA2B;AAClC,SAAQC,sBAAsB,QAAO,+BAA8B"}
@@ -0,0 +1,377 @@
1
+ import { z } from "zod/mini";
2
+ /** @internal */
3
+ declare const WEB_WORKER_CONTRACT_VERSION = 1;
4
+ declare const DASHBOARD_CONFIG_CONTRACT_VERSION = 1;
5
+ /**
6
+ * A view component. The return is opaque so the runtime helpers carry no React
7
+ * dependency — the generated artifact renders it with the app's own React.
8
+ * @public
9
+ */
10
+ type ViewComponent<TProps> = (props: TProps) => unknown;
11
+ /** @public */
12
+ interface ViewComponentBaseProps<TView> {
13
+ view: TView;
14
+ }
15
+ /** Component slots per view surface; windows load outside the component artifact path. @internal */
16
+ declare const VIEW_COMPONENTS: {
17
+ readonly asset_source: readonly ["asset_source"];
18
+ readonly panel: readonly ["title", "panel"];
19
+ readonly tile: readonly ["tile"];
20
+ readonly window: readonly [];
21
+ };
22
+ /** @public */
23
+ type ViewSurface = keyof typeof VIEW_COMPONENTS;
24
+ /**
25
+ * A tile's footprint family — the shape it occupies on the dashboard. Modelled
26
+ * on iOS WidgetKit families, not a linear scale: `banner` is full-width and
27
+ * shallow, which a `small`→`large` magnitude can't express. The host maps a
28
+ * family to a layout slot; the component reads it to render per footprint.
29
+ * @public
30
+ */
31
+ declare const TileSizeSchema: z.ZodMiniEnum<{
32
+ small: "small";
33
+ large: "large";
34
+ banner: "banner";
35
+ }>;
36
+ /** @public */
37
+ type TileSize = z.infer<typeof TileSizeSchema>;
38
+ /** @public */
39
+ type WebWorkerType = 'worker';
40
+ /**
41
+ * @deprecated Use `WebWorkerType`.
42
+ * @public
43
+ */
44
+ type ServiceType = WebWorkerType;
45
+ declare const DockGroupSchema: z.ZodMiniEnum<{
46
+ system: "system";
47
+ applications: "applications";
48
+ }>;
49
+ /** @public */
50
+ type DockGroup = z.output<typeof DockGroupSchema>;
51
+ declare const PanelViewSchema: z.ZodMiniObject<{
52
+ dock: z.ZodMiniOptional<z.ZodMiniObject<{
53
+ order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
54
+ }, z.core.$strip>>;
55
+ icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
56
+ title: z.ZodMiniString<string>;
57
+ name: z.ZodMiniString<string>;
58
+ src: z.ZodMiniString<string>;
59
+ surface: z.ZodMiniLiteral<"panel">;
60
+ }, z.core.$strip>;
61
+ /** @public */
62
+ type PanelViewDeclaration = z.output<typeof PanelViewSchema>;
63
+ /** @public */
64
+ type DefinePanelViewInput = Omit<PanelViewDeclaration, 'surface'>;
65
+ /** @public */
66
+ declare function definePanelView(view: DefinePanelViewInput): PanelViewDeclaration;
67
+ declare const WindowViewSchema: z.ZodMiniObject<{
68
+ dock: z.ZodMiniOptional<z.ZodMiniObject<{
69
+ group: z.ZodMiniOptional<z.ZodMiniEnum<{
70
+ system: "system";
71
+ applications: "applications";
72
+ }>>;
73
+ order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
74
+ }, z.core.$strip>>;
75
+ icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
76
+ title: z.ZodMiniString<string>;
77
+ name: z.ZodMiniString<string>;
78
+ src: z.ZodMiniString<string>;
79
+ surface: z.ZodMiniLiteral<"window">;
80
+ }, z.core.$strip>;
81
+ /** @public */
82
+ type WindowViewDeclaration = z.output<typeof WindowViewSchema>;
83
+ /** @public */
84
+ type DefineWindowViewInput = Omit<WindowViewDeclaration, 'surface'>;
85
+ /** @public */
86
+ declare function defineWindowView(view: DefineWindowViewInput): WindowViewDeclaration;
87
+ declare const AssetSourceViewSchema: z.ZodMiniObject<{
88
+ title: z.ZodMiniString<string>;
89
+ name: z.ZodMiniString<string>;
90
+ src: z.ZodMiniString<string>;
91
+ surface: z.ZodMiniLiteral<"asset_source">;
92
+ }, z.core.$strip>;
93
+ /** @public */
94
+ type AssetSourceViewDeclaration = z.output<typeof AssetSourceViewSchema>;
95
+ /** @public */
96
+ type DefineAssetSourceViewInput = Omit<AssetSourceViewDeclaration, 'surface'>;
97
+ /** @public */
98
+ declare function defineAssetSourceView(view: DefineAssetSourceViewInput): AssetSourceViewDeclaration;
99
+ declare const TileViewSchema: z.ZodMiniObject<{
100
+ order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
101
+ size: z.ZodMiniEnum<{
102
+ small: "small";
103
+ large: "large";
104
+ banner: "banner";
105
+ }>;
106
+ title: z.ZodMiniString<string>;
107
+ name: z.ZodMiniString<string>;
108
+ src: z.ZodMiniString<string>;
109
+ surface: z.ZodMiniLiteral<"tile">;
110
+ }, z.core.$strip>;
111
+ /** @public */
112
+ type TileViewDeclaration = z.output<typeof TileViewSchema>;
113
+ /** @public */
114
+ type DefineTileViewInput = Omit<TileViewDeclaration, 'surface'>;
115
+ /** @public */
116
+ declare function defineTileView(view: DefineTileViewInput): TileViewDeclaration;
117
+ /** @internal */
118
+ declare const InterfaceDeclarationSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
119
+ dock: z.ZodMiniOptional<z.ZodMiniObject<{
120
+ group: z.ZodMiniOptional<z.ZodMiniEnum<{
121
+ system: "system";
122
+ applications: "applications";
123
+ }>>;
124
+ order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
125
+ }, z.core.$strip>>;
126
+ icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
127
+ title: z.ZodMiniString<string>;
128
+ name: z.ZodMiniString<string>;
129
+ src: z.ZodMiniString<string>;
130
+ surface: z.ZodMiniLiteral<"window">;
131
+ }, z.core.$strip>, z.ZodMiniObject<{
132
+ dock: z.ZodMiniOptional<z.ZodMiniObject<{
133
+ order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
134
+ }, z.core.$strip>>;
135
+ icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
136
+ title: z.ZodMiniString<string>;
137
+ name: z.ZodMiniString<string>;
138
+ src: z.ZodMiniString<string>;
139
+ surface: z.ZodMiniLiteral<"panel">;
140
+ }, z.core.$strip>, z.ZodMiniObject<{
141
+ title: z.ZodMiniString<string>;
142
+ name: z.ZodMiniString<string>;
143
+ src: z.ZodMiniString<string>;
144
+ surface: z.ZodMiniLiteral<"asset_source">;
145
+ }, z.core.$strip>, z.ZodMiniObject<{
146
+ order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
147
+ size: z.ZodMiniEnum<{
148
+ small: "small";
149
+ large: "large";
150
+ banner: "banner";
151
+ }>;
152
+ title: z.ZodMiniString<string>;
153
+ name: z.ZodMiniString<string>;
154
+ src: z.ZodMiniString<string>;
155
+ surface: z.ZodMiniLiteral<"tile">;
156
+ }, z.core.$strip>], "surface">;
157
+ /** @public */
158
+ type ViewDeclaration = z.output<typeof InterfaceDeclarationSchema>;
159
+ declare const WebWorkerSchema: z.ZodMiniObject<{
160
+ title: z.ZodMiniString<string>;
161
+ name: z.ZodMiniString<string>;
162
+ src: z.ZodMiniString<string>;
163
+ type: z.ZodMiniLiteral<"worker">;
164
+ }, z.core.$strip>;
165
+ /** @public */
166
+ type WebWorkerDeclaration = z.output<typeof WebWorkerSchema>;
167
+ /** @public */
168
+ type DefineWebWorkerInput = Omit<WebWorkerDeclaration, 'type'>;
169
+ /** @public */
170
+ declare function defineWebWorker(webWorker: DefineWebWorkerInput): WebWorkerDeclaration;
171
+ /**
172
+ * A workbench config's built value, keyed by `appType`; deploys as a versioned
173
+ * snapshot, not an interface.
174
+ * @internal
175
+ */
176
+ declare const ConfigSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
177
+ appType: z.ZodMiniLiteral<"dashboard">;
178
+ src: z.ZodMiniString<string>;
179
+ }, z.core.$strip>, z.ZodMiniObject<{
180
+ appType: z.ZodMiniLiteral<"media-library">;
181
+ fields: z.ZodMiniArray<z.ZodMiniObject<{
182
+ public: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
183
+ title: z.ZodMiniString<string>;
184
+ name: z.ZodMiniString<string>;
185
+ src: z.ZodMiniString<string>;
186
+ }, z.core.$strip>>;
187
+ }, z.core.$strip>], "appType">;
188
+ /**
189
+ * The config value, keyed by `appType`, the build expands into a federation
190
+ * remote and the deploy summarizes.
191
+ * @internal
192
+ */
193
+ type WorkbenchConfigValue = z.output<typeof ConfigSchema>;
194
+ /**
195
+ * Runtime-validation schema for `defineApplication`.
196
+ * @internal
197
+ */
198
+ declare const DefineAppInputSchema: z.ZodMiniObject<{
199
+ applicationType: z.ZodMiniOptional<z.ZodMiniEnum<{
200
+ dashboard: "dashboard";
201
+ coreApp: "coreApp";
202
+ studio: "studio";
203
+ canvas: "canvas";
204
+ }>>;
205
+ dock: z.ZodMiniOptional<z.ZodMiniObject<{
206
+ group: z.ZodMiniOptional<z.ZodMiniEnum<{
207
+ system: "system";
208
+ applications: "applications";
209
+ }>>;
210
+ order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
211
+ }, z.core.$strip>>;
212
+ entry: z.ZodMiniOptional<z.ZodMiniString<string>>;
213
+ icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
214
+ isSingleton: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
215
+ name: z.ZodMiniOptional<z.ZodMiniString<string>>;
216
+ organizationId: z.ZodMiniString<string>;
217
+ slug: z.ZodMiniString<string>;
218
+ title: z.ZodMiniOptional<z.ZodMiniString<string>>;
219
+ views: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
220
+ dock: z.ZodMiniOptional<z.ZodMiniObject<{
221
+ group: z.ZodMiniOptional<z.ZodMiniEnum<{
222
+ system: "system";
223
+ applications: "applications";
224
+ }>>;
225
+ order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
226
+ }, z.core.$strip>>;
227
+ icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
228
+ title: z.ZodMiniString<string>;
229
+ name: z.ZodMiniString<string>;
230
+ src: z.ZodMiniString<string>;
231
+ surface: z.ZodMiniLiteral<"window">;
232
+ }, z.core.$strip>, z.ZodMiniObject<{
233
+ dock: z.ZodMiniOptional<z.ZodMiniObject<{
234
+ order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
235
+ }, z.core.$strip>>;
236
+ icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
237
+ title: z.ZodMiniString<string>;
238
+ name: z.ZodMiniString<string>;
239
+ src: z.ZodMiniString<string>;
240
+ surface: z.ZodMiniLiteral<"panel">;
241
+ }, z.core.$strip>, z.ZodMiniObject<{
242
+ title: z.ZodMiniString<string>;
243
+ name: z.ZodMiniString<string>;
244
+ src: z.ZodMiniString<string>;
245
+ surface: z.ZodMiniLiteral<"asset_source">;
246
+ }, z.core.$strip>, z.ZodMiniObject<{
247
+ order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
248
+ size: z.ZodMiniEnum<{
249
+ small: "small";
250
+ large: "large";
251
+ banner: "banner";
252
+ }>;
253
+ title: z.ZodMiniString<string>;
254
+ name: z.ZodMiniString<string>;
255
+ src: z.ZodMiniString<string>;
256
+ surface: z.ZodMiniLiteral<"tile">;
257
+ }, z.core.$strip>], "surface">>>;
258
+ visibility: z.ZodMiniOptional<z.ZodMiniEnum<{
259
+ default: "default";
260
+ unlisted: "unlisted";
261
+ disabled: "disabled";
262
+ }>>;
263
+ webWorkers: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
264
+ title: z.ZodMiniString<string>;
265
+ name: z.ZodMiniString<string>;
266
+ src: z.ZodMiniString<string>;
267
+ type: z.ZodMiniLiteral<"worker">;
268
+ }, z.core.$strip>], "type">>>;
269
+ }, z.core.$strip>;
270
+ /**
271
+ * User-facing input for `defineApplication`. Excludes the internal
272
+ * `applicationType` and `isSingleton`.
273
+ * @public
274
+ */
275
+ type DefineAppInput = Omit<z.output<typeof DefineAppInputSchema>, 'applicationType' | 'isSingleton'>;
276
+ /**
277
+ * The app's display title. Without one, `name` (or `slug`) in start case, as
278
+ * Studio's `startCase(name)` does: `my-app-v2` becomes `My App V 2`.
279
+ * @internal
280
+ */
281
+ declare function resolveAppTitle(app: Pick<DefineAppInput, 'name' | 'slug' | 'title'>): string;
282
+ /**
283
+ * Nominal brand the CLI discriminates on to enable the workbench build/deploy
284
+ * codepath. Registered via `Symbol.for` so the marker survives module-realm
285
+ * boundaries — `@sanity/cli-core` re-derives the same global symbol with
286
+ * `Symbol.for` rather than importing it, so it stays internal to this module.
287
+ */
288
+ declare const WORKBENCH_APP: unique symbol;
289
+ /**
290
+ * The branded result of `defineApplication`. Carries the same fields as the
291
+ * input plus the internal brand — users only ever see `DefineAppInput`.
292
+ * @public
293
+ */
294
+ type DefineAppResult = { [K in keyof DefineAppInput]: Exclude<DefineAppInput[K], undefined>; } & {
295
+ readonly [WORKBENCH_APP]: true;
296
+ };
297
+ /**
298
+ * A branded app as the CLI reads it — the full schema shape, including the
299
+ * internal fields `DefineAppInput` omits. Schema-derived so the narrowing
300
+ * can't drift from what the schema validates.
301
+ * @public
302
+ */
303
+ type WorkbenchApp = DefineAppResult & z.output<typeof DefineAppInputSchema>;
304
+ /**
305
+ * Whether `app` is a branded `defineApplication(...)` result — the sole
306
+ * workbench opt-in.
307
+ * @public
308
+ */
309
+ declare function isWorkbenchApp(app: unknown): app is WorkbenchApp;
310
+ /**
311
+ * Declare a Sanity Dashboard application. Identity at runtime — returns the same
312
+ * object reference, tagged with the Dashboard brand. Field validation (the
313
+ * `slug` pattern etc.) runs at build time in the CLI via `DefineAppInputSchema`;
314
+ * this helper stays a thin, pure identity wrapper.
315
+ * @public
316
+ */
317
+ declare function defineApplication(input: DefineAppInput): DefineAppResult;
318
+ /**
319
+ * One custom field a media library exposes. `src` default-exports a `defineField(...)` schema type.
320
+ * @public
321
+ */
322
+ type MediaLibraryField = MediaLibraryConfig['fields'][number];
323
+ /**
324
+ * Sanity-owned singleton, so authors don't name or title the app — only `organizationId` is required.
325
+ * @public
326
+ */
327
+ interface DefineMediaLibraryInput {
328
+ /** Organization that owns the media library — the CLI runs and deploys against it. */
329
+ organizationId: string;
330
+ fields?: MediaLibraryField[];
331
+ }
332
+ /**
333
+ * Nominal brand the CLI discriminates a config on. A config is *not* an app: it
334
+ * carries no `slug`/`title`/application identity, only a target `appType`, its
335
+ * owning `organizationId`, and its `fields`. Registered via `Symbol.for` so the
336
+ * marker survives module-realm boundaries — `@sanity/cli-core` re-derives the
337
+ * same global symbol rather than importing it.
338
+ */
339
+ declare const WORKBENCH_CONFIG: unique symbol;
340
+ /**
341
+ * A branded workbench config as the CLI reads it: bound to its target app by
342
+ * `appType`, not carrying its own app identity. The deploy/undeploy/build paths
343
+ * discriminate it via {@link isWorkbenchConfig}.
344
+ * @public
345
+ */
346
+ type WorkbenchConfig = WorkbenchConfigValue & {
347
+ organizationId: string;
348
+ readonly [WORKBENCH_CONFIG]: true;
349
+ };
350
+ /** @public */
351
+ type MediaLibraryConfig = Extract<WorkbenchConfig, {
352
+ appType: 'media-library';
353
+ }>;
354
+ /** @public */
355
+ type DashboardConfig = Extract<WorkbenchConfig, {
356
+ appType: 'dashboard';
357
+ }>;
358
+ /** @public */
359
+ type DefineDashboardInput = Omit<DashboardConfig, 'appType' | typeof WORKBENCH_CONFIG>;
360
+ /**
361
+ * Whether `app` is a branded `unstable_defineMediaLibrary(...)` or `defineDashboard(...)` config — a
362
+ * config-carrier rather than an app. Configs live in `cliConfig.app` alongside
363
+ * apps but resolve through `resolveWorkbenchConfig`, not `resolveWorkbenchApp`.
364
+ * @public
365
+ */
366
+ declare function isWorkbenchConfig(app: unknown): app is WorkbenchConfig;
367
+ /**
368
+ * Declare the Sanity Media Library config. The Media Library is a Sanity-owned
369
+ * singleton, so this is not an app — it carries no slug or title, only the
370
+ * target `appType`, its owning organization, and the `fields` it contributes to
371
+ * the installation's config.
372
+ * @public
373
+ */
374
+ declare function unstable_defineMediaLibrary(input: DefineMediaLibraryInput): MediaLibraryConfig;
375
+ declare function defineDashboard(input: DefineDashboardInput): DashboardConfig;
376
+ export { ViewDeclaration as A, defineWebWorker as B, DockGroup as C, TileViewDeclaration as D, TileSize as E, WindowViewDeclaration as F, WorkbenchConfigValue as I, defineAssetSourceView as L, WEB_WORKER_CONTRACT_VERSION as M, WebWorkerDeclaration as N, ViewComponent as O, WebWorkerType as P, definePanelView as R, DefineWindowViewInput as S, ServiceType as T, defineWindowView as V, DASHBOARD_CONFIG_CONTRACT_VERSION as _, DefineMediaLibraryInput as a, DefineTileViewInput as b, WorkbenchApp as c, defineDashboard as d, isWorkbenchApp as f, AssetSourceViewDeclaration as g, unstable_defineMediaLibrary as h, DefineDashboardInput as i, ViewSurface as j, ViewComponentBaseProps as k, WorkbenchConfig as l, resolveAppTitle as m, DefineAppInput as n, MediaLibraryConfig as o, isWorkbenchConfig as p, DefineAppResult as r, MediaLibraryField as s, DashboardConfig as t, defineApplication as u, DefineAssetSourceViewInput as v, PanelViewDeclaration as w, DefineWebWorkerInput as x, DefinePanelViewInput as y, defineTileView as z };
377
+ //# sourceMappingURL=defineApp-DUi9ZfpT.d.ts.map
@@ -1,9 +1,10 @@
1
- import "./contract-BeAds4Yi.js";
2
- import { n as resolveWorkbenchConfig, t as ResolvedMediaLibraryConfig } from "./resolveWorkbenchConfig-Eex64aAA.js";
3
- import { a as DeployableWorkbenchApp, i as summarizeInterfaces, n as DeployedView, o as getWorkbench, r as DeployedWebWorker, t as DeployedInterface } from "./summarizeInterfaces-BKIMEFzw.js";
4
- import { AppVisibility, CliConfig, Output } from "@sanity/cli-core";
1
+ import { I as WorkbenchConfigValue } from "./defineApp-DUi9ZfpT.js";
2
+ import { t as resolveWorkbenchConfig } from "./resolveWorkbenchConfig-C_o8npN0.js";
3
+ import { a as DeployedInterface, c as summarizeInterfaces, l as DeployableWorkbenchApp, n as fetchOrganizationSummary, o as DeployedView, r as formatDeploySummary, s as DeployedWebWorker, t as fetchDeploySummaryDetails, u as getWorkbench } from "./deploySummary-BPgEW1qt.js";
4
+ import { AppVisibility, CliConfig } from "@sanity/cli-core";
5
5
  import { ImageFile } from "@sanity/cli-core/images";
6
6
  import "node:zlib";
7
+ import { ApplicationBase } from "@sanity/sdk";
7
8
  /**
8
9
  * The org's active installation for an app type, or `undefined` when none is
9
10
  * installed. Read-only, so `--dry-run` can report deployability.
@@ -18,14 +19,7 @@ declare function resolveInstallationId(options: {
18
19
  * one of potentially many shapes.
19
20
  * @internal
20
21
  */
21
- declare function summarizeConfig(config: {
22
- appType: string;
23
- fields: {
24
- name: string;
25
- src: string;
26
- title: string;
27
- }[];
28
- }): string;
22
+ declare function summarizeConfig(config: WorkbenchConfigValue): string;
29
23
  /**
30
24
  * Upload the built module-federation remote to the installation as its config
31
25
  * snapshot. `installationId` is resolved by the caller so `--dry-run` never
@@ -35,8 +29,6 @@ declare function summarizeConfig(config: {
35
29
  declare function deployConfig(options: {
36
30
  appType: string;
37
31
  installationId: string;
38
- organizationId: string;
39
- output: Output;
40
32
  sourceDir: string;
41
33
  version: string;
42
34
  }): Promise<void>;
@@ -44,7 +36,7 @@ declare function deployConfig(options: {
44
36
  interface WorkbenchDeployPayload {
45
37
  slug: string;
46
38
  title: string;
47
- /** Media-library config summary. */
39
+ /** Config summary. */
48
40
  config?: string;
49
41
  services?: DeployedWebWorker[];
50
42
  views?: DeployedView[];
@@ -62,32 +54,8 @@ declare function toWorkbenchPayload(workbench: DeployableWorkbenchApp | null, {
62
54
  } | null;
63
55
  title: string;
64
56
  }): Partial<WorkbenchDeployPayload>;
65
- declare function fetchDeploySummaryDetails(organizationId: string): Promise<{
66
- organizationName: string | null;
67
- userName: string | null;
68
- }>;
69
- declare function formatDeploySummary(options: {
70
- applicationId: string;
71
- created: boolean;
72
- durationMs: number;
73
- isApp: boolean;
74
- organizationId: string;
75
- organizationName?: string | null;
76
- showAppIdHint: boolean;
77
- title: string;
78
- url: string;
79
- userName?: string | null;
80
- }): string;
81
57
  type ApplicationType = 'coreApp' | 'studio';
82
- interface Application {
83
- id: string;
84
- organizationId: string;
85
- slug: string | null;
86
- title: string;
87
- type: ApplicationType;
88
- /** Set when the customer serves the build; such an application never receives a tarball. */
89
- externalUrl?: string;
90
- }
58
+ type Application = ApplicationBase;
91
59
  /**
92
60
  * A resource a deployment may interact with, as Brett stores it. Per-deployment
93
61
  * and forbidden for singletons (the server 400s).
@@ -108,9 +76,14 @@ interface BrettWorkspace {
108
76
  subtitle?: string;
109
77
  title?: string;
110
78
  }
111
- declare function getWorkbenchUrl(organizationId: string): string;
79
+ /**
80
+ * The organization's Dashboard, on its host slug when it has one. Sessions are
81
+ * per origin and the org ID host redirects to the slug host, so a link to the
82
+ * org ID host would make the user sign in again.
83
+ */
84
+ declare function getWorkbenchUrl(organizationId: string, hostSlug?: string | null): string;
112
85
  /** Where a deployed application is served on its organization's workbench. */
113
- declare function getApplicationUrl(application: Pick<Application, 'id' | 'organizationId' | 'slug' | 'type'>): string;
86
+ declare function getApplicationUrl(application: Pick<Application, 'id' | 'organizationId' | 'slug' | 'type'>, hostSlug?: string | null): string;
114
87
  declare function getApplication(applicationId: string): Promise<Application | null>;
115
88
  /** Every application in an organization, in one page (`limit=none`). */
116
89
  declare function listApplications(organizationId: string): Promise<Application[]>;
@@ -200,6 +173,15 @@ declare function selectWorkbenchAppId({ appId, flags, organizationId, type }: {
200
173
  organizationId: string | undefined;
201
174
  type: ApplicationType;
202
175
  }): Promise<string | undefined>;
176
+ interface Dashboard {
177
+ id: string;
178
+ }
179
+ declare function getOrganizationDashboard(organizationId: string): Promise<Dashboard | undefined>;
180
+ declare function uploadDashboardConfig(options: {
181
+ dashboard: Dashboard | undefined;
182
+ organizationId: string;
183
+ sourceDir: string;
184
+ }): Promise<void>;
203
185
  /**
204
186
  * An app's or view's `icon` image, read from its project.
205
187
  * @internal
@@ -214,5 +196,5 @@ interface AppIcon extends ImageFile {
214
196
  * @internal
215
197
  */
216
198
  declare function readAppIcon(workDir: string, iconPath: string): Promise<AppIcon>;
217
- export { type Application, type BrettAccess, type BrettWorkspace, type CreatedApplication, type DeployedInterface, type DeployedView, type DeployedWebWorker, type ResolvedMediaLibraryConfig, type WorkbenchDeployPayload, createCoreApp, createStudio, deployConfig, deployWorkbenchApp, fetchDeploySummaryDetails, formatDeploySummary, getApplication, getApplicationUrl, getWorkbench, getWorkbenchUrl, listApplications, readAppIcon, resolveInstallationId, resolveWorkbenchConfig, selectWorkbenchAppId, summarizeConfig, summarizeInterfaces, toWorkbenchPayload };
199
+ export { type Application, type BrettAccess, type BrettWorkspace, type CreatedApplication, type DeployedInterface, type DeployedView, type DeployedWebWorker, type WorkbenchDeployPayload, createCoreApp, createStudio, deployConfig, deployWorkbenchApp, fetchDeploySummaryDetails, fetchOrganizationSummary, formatDeploySummary, getApplication, getApplicationUrl, getOrganizationDashboard, getWorkbench, getWorkbenchUrl, listApplications, readAppIcon, resolveInstallationId, resolveWorkbenchConfig, selectWorkbenchAppId, summarizeConfig, summarizeInterfaces, toWorkbenchPayload, uploadDashboardConfig };
218
200
  //# sourceMappingURL=deploy.d.ts.map
@@ -1,12 +1,14 @@
1
1
  export { deployConfig, resolveInstallationId, summarizeConfig } from '../actions/deploy/deployConfig.js';
2
2
  export { toWorkbenchPayload } from '../actions/deploy/deployPayload.js';
3
- export { fetchDeploySummaryDetails, formatDeploySummary } from '../actions/deploy/deploySummary.js';
3
+ export { fetchDeploySummaryDetails, fetchOrganizationSummary, formatDeploySummary } from '../actions/deploy/deploySummary.js';
4
4
  export { createCoreApp, createStudio, deployWorkbenchApp } from '../actions/deploy/deployWorkbenchApp.js';
5
5
  export { getWorkbench } from '../actions/deploy/getWorkbench.js';
6
6
  export { selectWorkbenchAppId } from '../actions/deploy/selectWorkbenchAppId.js';
7
7
  export { summarizeInterfaces } from '../actions/deploy/summarizeInterfaces.js';
8
+ export { uploadDashboardConfig } from '../actions/deploy/uploadDashboardConfig.js';
8
9
  export { readAppIcon } from '../readAppIcon.js';
9
10
  export { resolveWorkbenchConfig } from '../resolveWorkbenchConfig.js';
10
11
  export { getApplication, getApplicationUrl, getWorkbenchUrl, listApplications } from '../services/applications.js';
12
+ export { getOrganizationDashboard } from '../services/dashboard-configs.js';
11
13
 
12
14
  //# sourceMappingURL=deploy.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/_exports/deploy.ts"],"sourcesContent":["export {\n deployConfig,\n resolveInstallationId,\n summarizeConfig,\n} from '../actions/deploy/deployConfig.js'\nexport {toWorkbenchPayload, type WorkbenchDeployPayload} from '../actions/deploy/deployPayload.js'\nexport {fetchDeploySummaryDetails, formatDeploySummary} from '../actions/deploy/deploySummary.js'\nexport {\n createCoreApp,\n type CreatedApplication,\n createStudio,\n deployWorkbenchApp,\n} from '../actions/deploy/deployWorkbenchApp.js'\nexport {getWorkbench} from '../actions/deploy/getWorkbench.js'\nexport {selectWorkbenchAppId} from '../actions/deploy/selectWorkbenchAppId.js'\nexport {\n type DeployedInterface,\n type DeployedView,\n type DeployedWebWorker,\n summarizeInterfaces,\n} from '../actions/deploy/summarizeInterfaces.js'\nexport {readAppIcon} from '../readAppIcon.js'\nexport {type ResolvedMediaLibraryConfig, resolveWorkbenchConfig} from '../resolveWorkbenchConfig.js'\nexport {\n type Application,\n type BrettAccess,\n type BrettWorkspace,\n getApplication,\n getApplicationUrl,\n getWorkbenchUrl,\n listApplications,\n} from '../services/applications.js'\n"],"names":["deployConfig","resolveInstallationId","summarizeConfig","toWorkbenchPayload","fetchDeploySummaryDetails","formatDeploySummary","createCoreApp","createStudio","deployWorkbenchApp","getWorkbench","selectWorkbenchAppId","summarizeInterfaces","readAppIcon","resolveWorkbenchConfig","getApplication","getApplicationUrl","getWorkbenchUrl","listApplications"],"mappings":"AAAA,SACEA,YAAY,EACZC,qBAAqB,EACrBC,eAAe,QACV,oCAAmC;AAC1C,SAAQC,kBAAkB,QAAoC,qCAAoC;AAClG,SAAQC,yBAAyB,EAAEC,mBAAmB,QAAO,qCAAoC;AACjG,SACEC,aAAa,EAEbC,YAAY,EACZC,kBAAkB,QACb,0CAAyC;AAChD,SAAQC,YAAY,QAAO,oCAAmC;AAC9D,SAAQC,oBAAoB,QAAO,4CAA2C;AAC9E,SAIEC,mBAAmB,QACd,2CAA0C;AACjD,SAAQC,WAAW,QAAO,oBAAmB;AAC7C,SAAyCC,sBAAsB,QAAO,+BAA8B;AACpG,SAIEC,cAAc,EACdC,iBAAiB,EACjBC,eAAe,EACfC,gBAAgB,QACX,8BAA6B"}
1
+ {"version":3,"sources":["../../src/_exports/deploy.ts"],"sourcesContent":["export {\n deployConfig,\n resolveInstallationId,\n summarizeConfig,\n} from '../actions/deploy/deployConfig.js'\nexport {toWorkbenchPayload, type WorkbenchDeployPayload} from '../actions/deploy/deployPayload.js'\nexport {\n fetchDeploySummaryDetails,\n fetchOrganizationSummary,\n formatDeploySummary,\n} from '../actions/deploy/deploySummary.js'\nexport {\n createCoreApp,\n type CreatedApplication,\n createStudio,\n deployWorkbenchApp,\n} from '../actions/deploy/deployWorkbenchApp.js'\nexport {getWorkbench} from '../actions/deploy/getWorkbench.js'\nexport {selectWorkbenchAppId} from '../actions/deploy/selectWorkbenchAppId.js'\nexport {\n type DeployedInterface,\n type DeployedView,\n type DeployedWebWorker,\n summarizeInterfaces,\n} from '../actions/deploy/summarizeInterfaces.js'\nexport {uploadDashboardConfig} from '../actions/deploy/uploadDashboardConfig.js'\nexport {readAppIcon} from '../readAppIcon.js'\nexport {resolveWorkbenchConfig} from '../resolveWorkbenchConfig.js'\nexport {\n type Application,\n type BrettAccess,\n type BrettWorkspace,\n getApplication,\n getApplicationUrl,\n getWorkbenchUrl,\n listApplications,\n} from '../services/applications.js'\nexport {getOrganizationDashboard} from '../services/dashboard-configs.js'\n"],"names":["deployConfig","resolveInstallationId","summarizeConfig","toWorkbenchPayload","fetchDeploySummaryDetails","fetchOrganizationSummary","formatDeploySummary","createCoreApp","createStudio","deployWorkbenchApp","getWorkbench","selectWorkbenchAppId","summarizeInterfaces","uploadDashboardConfig","readAppIcon","resolveWorkbenchConfig","getApplication","getApplicationUrl","getWorkbenchUrl","listApplications","getOrganizationDashboard"],"mappings":"AAAA,SACEA,YAAY,EACZC,qBAAqB,EACrBC,eAAe,QACV,oCAAmC;AAC1C,SAAQC,kBAAkB,QAAoC,qCAAoC;AAClG,SACEC,yBAAyB,EACzBC,wBAAwB,EACxBC,mBAAmB,QACd,qCAAoC;AAC3C,SACEC,aAAa,EAEbC,YAAY,EACZC,kBAAkB,QACb,0CAAyC;AAChD,SAAQC,YAAY,QAAO,oCAAmC;AAC9D,SAAQC,oBAAoB,QAAO,4CAA2C;AAC9E,SAIEC,mBAAmB,QACd,2CAA0C;AACjD,SAAQC,qBAAqB,QAAO,6CAA4C;AAChF,SAAQC,WAAW,QAAO,oBAAmB;AAC7C,SAAQC,sBAAsB,QAAO,+BAA8B;AACnE,SAIEC,cAAc,EACdC,iBAAiB,EACjBC,eAAe,EACfC,gBAAgB,QACX,8BAA6B;AACpC,SAAQC,wBAAwB,QAAO,mCAAkC"}
@@ -1,5 +1,5 @@
1
- import { h as ViewSurface, v as WebWorkerType } from "./contract-BeAds4Yi.js";
2
- import { i as WorkbenchExposes, r as ResolvedWorkbenchApp } from "./resolveWorkbenchConfig-Eex64aAA.js";
1
+ import { P as WebWorkerType, j as ViewSurface } from "./defineApp-DUi9ZfpT.js";
2
+ import { n as WorkbenchExposes, t as ResolvedWorkbenchApp } from "./resolveWorkbenchApp-C_rqQBQP.js";
3
3
  import { CliConfig } from "@sanity/cli-core";
4
4
  import { z } from "zod/mini";
5
5
  /**
@@ -61,5 +61,48 @@ declare function summarizeInterfaces({ views, webWorkers }: WorkbenchExposes): {
61
61
  services: DeployedWebWorker[];
62
62
  views: DeployedView[];
63
63
  };
64
- export { DeployableWorkbenchApp as a, summarizeInterfaces as i, DeployedView as n, getWorkbench as o, DeployedWebWorker as r, DeployedInterface as t };
65
- //# sourceMappingURL=summarizeInterfaces-BKIMEFzw.d.ts.map
64
+ /**
65
+ * The organization's name, and its host slug for Dashboard URLs. A failed or
66
+ * slow (over 3s) lookup reads as `null`, so a deploy falls back to the org ID
67
+ * host instead of failing.
68
+ */
69
+ declare function fetchOrganizationSummary(organizationId: string): Promise<{
70
+ hostSlug: string | null;
71
+ organizationName: string | null;
72
+ }>;
73
+ /**
74
+ * The organization and deployer for a deploy's summary. Pass the command's
75
+ * {@link fetchOrganizationSummary} lookup to share it rather than look the org up again.
76
+ */
77
+ declare function fetchDeploySummaryDetails(organizationId: string, organization?: ReturnType<typeof fetchOrganizationSummary>): Promise<{
78
+ hostSlug: string | null;
79
+ organizationName: string | null;
80
+ userName: string | null;
81
+ }>;
82
+ declare function formatDeploySummary(options: ({
83
+ applicationId: string;
84
+ showAppIdHint: boolean;
85
+ type: 'coreApp' | 'studio';
86
+ } | {
87
+ type: 'config';
88
+ }) & {
89
+ created: boolean;
90
+ durationMs: number;
91
+ organizationId: string;
92
+ organizationName?: string | null;
93
+ title: string;
94
+ url: string;
95
+ userName?: string | null;
96
+ }): string;
97
+ declare function formatUndeploySummary(options: {
98
+ durationMs: number;
99
+ organizationId: string;
100
+ organizationName?: string | null;
101
+ title: string;
102
+ /** Omitted for a config, which has no app or studio of its own to name. */
103
+ type?: 'coreApp' | 'studio';
104
+ url: string;
105
+ userName?: string | null;
106
+ }): string;
107
+ export { DeployedInterface as a, summarizeInterfaces as c, formatUndeploySummary as i, DeployableWorkbenchApp as l, fetchOrganizationSummary as n, DeployedView as o, formatDeploySummary as r, DeployedWebWorker as s, fetchDeploySummaryDetails as t, getWorkbench as u };
108
+ //# sourceMappingURL=deploySummary-BPgEW1qt.d.ts.map
@@ -1,6 +1,6 @@
1
- import { t as DevServerManifest } from "./registry-BI8kZVpy.js";
2
- import { ViteDevServer } from "vite";
1
+ import { t as DevServerManifest } from "./registry-DysyB1F6.js";
3
2
  import { CliConfig, Output } from "@sanity/cli-core";
3
+ import { ViteDevServer } from "vite";
4
4
  /**
5
5
  * Minimal shape the supervisor needs back from a started app/studio dev server.
6
6
  * The not-started arm is reserved for expected early exits the server already