@sanity/workbench-cli 2.19.1 → 2.21.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/build.d.ts +3 -2
- package/dist/_exports/build.js.map +1 -1
- package/dist/_exports/defineApp-COehpvlC.d.ts +376 -0
- package/dist/_exports/deploy.d.ts +22 -44
- package/dist/_exports/deploy.js +2 -0
- package/dist/_exports/deploy.js.map +1 -1
- package/dist/_exports/{summarizeInterfaces-AM-QbtIA.d.ts → deploySummary-DU7_Vcyq.d.ts} +30 -4
- package/dist/_exports/dev.d.ts +1 -1
- package/dist/_exports/index.d.ts +22 -4
- package/dist/_exports/index.js +2 -1
- package/dist/_exports/index.js.map +1 -1
- package/dist/_exports/preview.d.ts +1 -1
- package/dist/_exports/{registry-DZWnj09G.d.ts → registry-Da2PAcT1.d.ts} +17 -11
- package/dist/_exports/{resolveWorkbenchConfig-_iD6fVUH.d.ts → resolveWorkbenchApp-Bn0tsSDM.d.ts} +5 -20
- package/dist/_exports/resolveWorkbenchConfig-DkrkqN9H.d.ts +10 -0
- package/dist/_exports/undeploy.d.ts +6 -6
- package/dist/_exports/undeploy.js +1 -0
- package/dist/_exports/undeploy.js.map +1 -1
- package/dist/actions/build/artifact.js +20 -1
- package/dist/actions/build/artifact.js.map +1 -1
- package/dist/actions/build/configs/artifact.js +10 -50
- package/dist/actions/build/configs/artifact.js.map +1 -1
- package/dist/actions/build/dashboardConfig/artifact.js +25 -0
- package/dist/actions/build/dashboardConfig/artifact.js.map +1 -0
- package/dist/actions/build/hotConfigListeners.js +34 -0
- package/dist/actions/build/hotConfigListeners.js.map +1 -0
- package/dist/actions/build/vite/optimize-deps.js +2 -1
- package/dist/actions/build/vite/optimize-deps.js.map +1 -1
- package/dist/actions/build/vite/plugins/plugin-sanity-extension-artifacts.js +3 -1
- package/dist/actions/build/vite/plugins/plugin-sanity-extension-artifacts.js.map +1 -1
- package/dist/actions/deploy/deployConfig.js +9 -7
- package/dist/actions/deploy/deployConfig.js.map +1 -1
- package/dist/actions/deploy/deployPayload.js.map +1 -1
- package/dist/actions/deploy/deploySummary.js +24 -5
- package/dist/actions/deploy/deploySummary.js.map +1 -1
- package/dist/actions/deploy/deployWorkbenchApp.js +31 -13
- package/dist/actions/deploy/deployWorkbenchApp.js.map +1 -1
- package/dist/actions/deploy/uploadDashboardConfig.js +34 -0
- package/dist/actions/deploy/uploadDashboardConfig.js.map +1 -0
- package/dist/actions/dev/deriveConfigs.js +17 -13
- package/dist/actions/dev/deriveConfigs.js.map +1 -1
- package/dist/actions/dev/registry.js +34 -20
- package/dist/actions/dev/registry.js.map +1 -1
- package/dist/actions/dev/startDevServerRegistration.js +20 -11
- package/dist/actions/dev/startDevServerRegistration.js.map +1 -1
- package/dist/actions/dev/startWorkbenchDev.js +2 -2
- package/dist/actions/dev/startWorkbenchDev.js.map +1 -1
- package/dist/actions/preview/serveBuiltApplication.js +9 -7
- package/dist/actions/preview/serveBuiltApplication.js.map +1 -1
- package/dist/actions/preview/startWorkbenchPreview.js +52 -19
- package/dist/actions/preview/startWorkbenchPreview.js.map +1 -1
- package/dist/actions/undeploy/workbenchUndeployAdapter.js +50 -3
- package/dist/actions/undeploy/workbenchUndeployAdapter.js.map +1 -1
- package/dist/contract.js +20 -3
- package/dist/contract.js.map +1 -1
- package/dist/dashboardConfig.js +5 -0
- package/dist/dashboardConfig.js.map +1 -0
- package/dist/defineApp.js +25 -2
- package/dist/defineApp.js.map +1 -1
- package/dist/deriveInterfaces.js +24 -13
- package/dist/deriveInterfaces.js.map +1 -1
- package/dist/readAppIcon.js +3 -3
- package/dist/readAppIcon.js.map +1 -1
- package/dist/resolveWorkbenchApp.js +3 -2
- package/dist/resolveWorkbenchApp.js.map +1 -1
- package/dist/resolveWorkbenchConfig.js +11 -16
- package/dist/resolveWorkbenchConfig.js.map +1 -1
- package/dist/services/applications.js +12 -1
- package/dist/services/applications.js.map +1 -1
- package/dist/services/dashboard-configs.js +54 -0
- package/dist/services/dashboard-configs.js.map +1 -0
- package/package.json +8 -8
- package/dist/_exports/contract-WrU3aOYd.d.ts +0 -187
- package/dist/_exports/defineApp-9ppP3UQR.d.ts +0 -175
package/dist/_exports/build.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as resolveWorkbenchApp, n as WorkbenchExposes, r as resolveAppEntry, t as ResolvedWorkbenchApp } from "./resolveWorkbenchApp-Bn0tsSDM.js";
|
|
2
|
+
import { t as resolveWorkbenchConfig } from "./resolveWorkbenchConfig-DkrkqN9H.js";
|
|
2
3
|
import { InlineConfig, PluginOption } from "vite";
|
|
3
4
|
/**
|
|
4
5
|
* Resolves to the parsed federation manifest in `sourceDir`. A workbench build
|
|
@@ -128,5 +129,5 @@ declare function workbenchVitePlugins(options: WorkbenchViteOptions): Promise<Pl
|
|
|
128
129
|
* its own id from the applications API.
|
|
129
130
|
*/
|
|
130
131
|
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
|
|
132
|
+
export { 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, workbenchOptimizeDeps, workbenchVitePlugins };
|
|
132
133
|
//# sourceMappingURL=build.d.ts.map
|
|
@@ -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 {
|
|
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 {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,SAAQC,sBAAsB,QAAO,+BAA8B"}
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import { z } from "zod/mini";
|
|
2
|
+
/** @internal */
|
|
3
|
+
declare const WEB_WORKER_CONTRACT_VERSION = 1;
|
|
4
|
+
/**
|
|
5
|
+
* A view component. The return is opaque so the runtime helpers carry no React
|
|
6
|
+
* dependency — the generated artifact renders it with the app's own React.
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
type ViewComponent<TProps> = (props: TProps) => unknown;
|
|
10
|
+
/** @public */
|
|
11
|
+
interface ViewComponentBaseProps<TView> {
|
|
12
|
+
view: TView;
|
|
13
|
+
}
|
|
14
|
+
/** Component slots per view surface; windows load outside the component artifact path. @internal */
|
|
15
|
+
declare const VIEW_COMPONENTS: {
|
|
16
|
+
readonly asset_source: readonly ["asset_source"];
|
|
17
|
+
readonly panel: readonly ["title", "panel"];
|
|
18
|
+
readonly tile: readonly ["tile"];
|
|
19
|
+
readonly window: readonly [];
|
|
20
|
+
};
|
|
21
|
+
/** @public */
|
|
22
|
+
type ViewSurface = keyof typeof VIEW_COMPONENTS;
|
|
23
|
+
/**
|
|
24
|
+
* A tile's footprint family — the shape it occupies on the dashboard. Modelled
|
|
25
|
+
* on iOS WidgetKit families, not a linear scale: `banner` is full-width and
|
|
26
|
+
* shallow, which a `small`→`large` magnitude can't express. The host maps a
|
|
27
|
+
* family to a layout slot; the component reads it to render per footprint.
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
declare const TileSizeSchema: z.ZodMiniEnum<{
|
|
31
|
+
small: "small";
|
|
32
|
+
large: "large";
|
|
33
|
+
banner: "banner";
|
|
34
|
+
}>;
|
|
35
|
+
/** @public */
|
|
36
|
+
type TileSize = z.infer<typeof TileSizeSchema>;
|
|
37
|
+
/** @public */
|
|
38
|
+
type WebWorkerType = 'worker';
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated Use `WebWorkerType`.
|
|
41
|
+
* @public
|
|
42
|
+
*/
|
|
43
|
+
type ServiceType = WebWorkerType;
|
|
44
|
+
declare const DockGroupSchema: z.ZodMiniEnum<{
|
|
45
|
+
system: "system";
|
|
46
|
+
applications: "applications";
|
|
47
|
+
}>;
|
|
48
|
+
/** @public */
|
|
49
|
+
type DockGroup = z.output<typeof DockGroupSchema>;
|
|
50
|
+
declare const PanelViewSchema: z.ZodMiniObject<{
|
|
51
|
+
dock: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
52
|
+
order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
53
|
+
}, z.core.$strip>>;
|
|
54
|
+
icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
55
|
+
title: z.ZodMiniString<string>;
|
|
56
|
+
name: z.ZodMiniString<string>;
|
|
57
|
+
src: z.ZodMiniString<string>;
|
|
58
|
+
surface: z.ZodMiniLiteral<"panel">;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
/** @public */
|
|
61
|
+
type PanelViewDeclaration = z.output<typeof PanelViewSchema>;
|
|
62
|
+
/** @public */
|
|
63
|
+
type DefinePanelViewInput = Omit<PanelViewDeclaration, 'surface'>;
|
|
64
|
+
/** @public */
|
|
65
|
+
declare function definePanelView(view: DefinePanelViewInput): PanelViewDeclaration;
|
|
66
|
+
declare const WindowViewSchema: z.ZodMiniObject<{
|
|
67
|
+
dock: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
68
|
+
group: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
69
|
+
system: "system";
|
|
70
|
+
applications: "applications";
|
|
71
|
+
}>>;
|
|
72
|
+
order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
75
|
+
title: z.ZodMiniString<string>;
|
|
76
|
+
name: z.ZodMiniString<string>;
|
|
77
|
+
src: z.ZodMiniString<string>;
|
|
78
|
+
surface: z.ZodMiniLiteral<"window">;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
/** @public */
|
|
81
|
+
type WindowViewDeclaration = z.output<typeof WindowViewSchema>;
|
|
82
|
+
/** @public */
|
|
83
|
+
type DefineWindowViewInput = Omit<WindowViewDeclaration, 'surface'>;
|
|
84
|
+
/** @public */
|
|
85
|
+
declare function defineWindowView(view: DefineWindowViewInput): WindowViewDeclaration;
|
|
86
|
+
declare const AssetSourceViewSchema: z.ZodMiniObject<{
|
|
87
|
+
title: z.ZodMiniString<string>;
|
|
88
|
+
name: z.ZodMiniString<string>;
|
|
89
|
+
src: z.ZodMiniString<string>;
|
|
90
|
+
surface: z.ZodMiniLiteral<"asset_source">;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
/** @public */
|
|
93
|
+
type AssetSourceViewDeclaration = z.output<typeof AssetSourceViewSchema>;
|
|
94
|
+
/** @public */
|
|
95
|
+
type DefineAssetSourceViewInput = Omit<AssetSourceViewDeclaration, 'surface'>;
|
|
96
|
+
/** @public */
|
|
97
|
+
declare function defineAssetSourceView(view: DefineAssetSourceViewInput): AssetSourceViewDeclaration;
|
|
98
|
+
declare const TileViewSchema: z.ZodMiniObject<{
|
|
99
|
+
order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
100
|
+
size: z.ZodMiniEnum<{
|
|
101
|
+
small: "small";
|
|
102
|
+
large: "large";
|
|
103
|
+
banner: "banner";
|
|
104
|
+
}>;
|
|
105
|
+
title: z.ZodMiniString<string>;
|
|
106
|
+
name: z.ZodMiniString<string>;
|
|
107
|
+
src: z.ZodMiniString<string>;
|
|
108
|
+
surface: z.ZodMiniLiteral<"tile">;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
/** @public */
|
|
111
|
+
type TileViewDeclaration = z.output<typeof TileViewSchema>;
|
|
112
|
+
/** @public */
|
|
113
|
+
type DefineTileViewInput = Omit<TileViewDeclaration, 'surface'>;
|
|
114
|
+
/** @public */
|
|
115
|
+
declare function defineTileView(view: DefineTileViewInput): TileViewDeclaration;
|
|
116
|
+
/** @internal */
|
|
117
|
+
declare const InterfaceDeclarationSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
118
|
+
dock: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
119
|
+
group: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
120
|
+
system: "system";
|
|
121
|
+
applications: "applications";
|
|
122
|
+
}>>;
|
|
123
|
+
order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
124
|
+
}, z.core.$strip>>;
|
|
125
|
+
icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
126
|
+
title: z.ZodMiniString<string>;
|
|
127
|
+
name: z.ZodMiniString<string>;
|
|
128
|
+
src: z.ZodMiniString<string>;
|
|
129
|
+
surface: z.ZodMiniLiteral<"window">;
|
|
130
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
131
|
+
dock: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
132
|
+
order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
133
|
+
}, z.core.$strip>>;
|
|
134
|
+
icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
135
|
+
title: z.ZodMiniString<string>;
|
|
136
|
+
name: z.ZodMiniString<string>;
|
|
137
|
+
src: z.ZodMiniString<string>;
|
|
138
|
+
surface: z.ZodMiniLiteral<"panel">;
|
|
139
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
140
|
+
title: z.ZodMiniString<string>;
|
|
141
|
+
name: z.ZodMiniString<string>;
|
|
142
|
+
src: z.ZodMiniString<string>;
|
|
143
|
+
surface: z.ZodMiniLiteral<"asset_source">;
|
|
144
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
145
|
+
order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
146
|
+
size: z.ZodMiniEnum<{
|
|
147
|
+
small: "small";
|
|
148
|
+
large: "large";
|
|
149
|
+
banner: "banner";
|
|
150
|
+
}>;
|
|
151
|
+
title: z.ZodMiniString<string>;
|
|
152
|
+
name: z.ZodMiniString<string>;
|
|
153
|
+
src: z.ZodMiniString<string>;
|
|
154
|
+
surface: z.ZodMiniLiteral<"tile">;
|
|
155
|
+
}, z.core.$strip>], "surface">;
|
|
156
|
+
/** @public */
|
|
157
|
+
type ViewDeclaration = z.output<typeof InterfaceDeclarationSchema>;
|
|
158
|
+
declare const WebWorkerSchema: z.ZodMiniObject<{
|
|
159
|
+
title: z.ZodMiniString<string>;
|
|
160
|
+
name: z.ZodMiniString<string>;
|
|
161
|
+
src: z.ZodMiniString<string>;
|
|
162
|
+
type: z.ZodMiniLiteral<"worker">;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
/** @public */
|
|
165
|
+
type WebWorkerDeclaration = z.output<typeof WebWorkerSchema>;
|
|
166
|
+
/** @public */
|
|
167
|
+
type DefineWebWorkerInput = Omit<WebWorkerDeclaration, 'type'>;
|
|
168
|
+
/** @public */
|
|
169
|
+
declare function defineWebWorker(webWorker: DefineWebWorkerInput): WebWorkerDeclaration;
|
|
170
|
+
/**
|
|
171
|
+
* A workbench config's built value, keyed by `appType`; deploys as a versioned
|
|
172
|
+
* snapshot, not an interface.
|
|
173
|
+
* @internal
|
|
174
|
+
*/
|
|
175
|
+
declare const ConfigSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
176
|
+
appType: z.ZodMiniLiteral<"dashboard">;
|
|
177
|
+
src: z.ZodMiniString<string>;
|
|
178
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
179
|
+
appType: z.ZodMiniLiteral<"media-library">;
|
|
180
|
+
fields: z.ZodMiniArray<z.ZodMiniObject<{
|
|
181
|
+
public: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
182
|
+
title: z.ZodMiniString<string>;
|
|
183
|
+
name: z.ZodMiniString<string>;
|
|
184
|
+
src: z.ZodMiniString<string>;
|
|
185
|
+
}, z.core.$strip>>;
|
|
186
|
+
}, z.core.$strip>], "appType">;
|
|
187
|
+
/**
|
|
188
|
+
* The config value, keyed by `appType`, the build expands into a federation
|
|
189
|
+
* remote and the deploy summarizes.
|
|
190
|
+
* @internal
|
|
191
|
+
*/
|
|
192
|
+
type WorkbenchConfigValue = z.output<typeof ConfigSchema>;
|
|
193
|
+
/**
|
|
194
|
+
* Runtime-validation schema for `defineApplication`.
|
|
195
|
+
* @internal
|
|
196
|
+
*/
|
|
197
|
+
declare const DefineAppInputSchema: z.ZodMiniObject<{
|
|
198
|
+
applicationType: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
199
|
+
dashboard: "dashboard";
|
|
200
|
+
coreApp: "coreApp";
|
|
201
|
+
studio: "studio";
|
|
202
|
+
canvas: "canvas";
|
|
203
|
+
}>>;
|
|
204
|
+
dock: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
205
|
+
group: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
206
|
+
system: "system";
|
|
207
|
+
applications: "applications";
|
|
208
|
+
}>>;
|
|
209
|
+
order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
210
|
+
}, z.core.$strip>>;
|
|
211
|
+
entry: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
212
|
+
icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
213
|
+
isSingleton: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
214
|
+
name: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
215
|
+
organizationId: z.ZodMiniString<string>;
|
|
216
|
+
slug: z.ZodMiniString<string>;
|
|
217
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
218
|
+
views: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
219
|
+
dock: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
220
|
+
group: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
221
|
+
system: "system";
|
|
222
|
+
applications: "applications";
|
|
223
|
+
}>>;
|
|
224
|
+
order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
225
|
+
}, z.core.$strip>>;
|
|
226
|
+
icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
227
|
+
title: z.ZodMiniString<string>;
|
|
228
|
+
name: z.ZodMiniString<string>;
|
|
229
|
+
src: z.ZodMiniString<string>;
|
|
230
|
+
surface: z.ZodMiniLiteral<"window">;
|
|
231
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
232
|
+
dock: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
233
|
+
order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
234
|
+
}, z.core.$strip>>;
|
|
235
|
+
icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
236
|
+
title: z.ZodMiniString<string>;
|
|
237
|
+
name: z.ZodMiniString<string>;
|
|
238
|
+
src: z.ZodMiniString<string>;
|
|
239
|
+
surface: z.ZodMiniLiteral<"panel">;
|
|
240
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
241
|
+
title: z.ZodMiniString<string>;
|
|
242
|
+
name: z.ZodMiniString<string>;
|
|
243
|
+
src: z.ZodMiniString<string>;
|
|
244
|
+
surface: z.ZodMiniLiteral<"asset_source">;
|
|
245
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
246
|
+
order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
247
|
+
size: z.ZodMiniEnum<{
|
|
248
|
+
small: "small";
|
|
249
|
+
large: "large";
|
|
250
|
+
banner: "banner";
|
|
251
|
+
}>;
|
|
252
|
+
title: z.ZodMiniString<string>;
|
|
253
|
+
name: z.ZodMiniString<string>;
|
|
254
|
+
src: z.ZodMiniString<string>;
|
|
255
|
+
surface: z.ZodMiniLiteral<"tile">;
|
|
256
|
+
}, z.core.$strip>], "surface">>>;
|
|
257
|
+
visibility: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
258
|
+
default: "default";
|
|
259
|
+
unlisted: "unlisted";
|
|
260
|
+
disabled: "disabled";
|
|
261
|
+
}>>;
|
|
262
|
+
webWorkers: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
|
|
263
|
+
title: z.ZodMiniString<string>;
|
|
264
|
+
name: z.ZodMiniString<string>;
|
|
265
|
+
src: z.ZodMiniString<string>;
|
|
266
|
+
type: z.ZodMiniLiteral<"worker">;
|
|
267
|
+
}, z.core.$strip>], "type">>>;
|
|
268
|
+
}, z.core.$strip>;
|
|
269
|
+
/**
|
|
270
|
+
* User-facing input for `defineApplication`. Excludes the internal
|
|
271
|
+
* `applicationType` and `isSingleton`.
|
|
272
|
+
* @public
|
|
273
|
+
*/
|
|
274
|
+
type DefineAppInput = Omit<z.output<typeof DefineAppInputSchema>, 'applicationType' | 'isSingleton'>;
|
|
275
|
+
/**
|
|
276
|
+
* The app's display title. Without one, `name` (or `slug`) in start case, as
|
|
277
|
+
* Studio's `startCase(name)` does: `my-app-v2` becomes `My App V 2`.
|
|
278
|
+
* @internal
|
|
279
|
+
*/
|
|
280
|
+
declare function resolveAppTitle(app: Pick<DefineAppInput, 'name' | 'slug' | 'title'>): string;
|
|
281
|
+
/**
|
|
282
|
+
* Nominal brand the CLI discriminates on to enable the workbench build/deploy
|
|
283
|
+
* codepath. Registered via `Symbol.for` so the marker survives module-realm
|
|
284
|
+
* boundaries — `@sanity/cli-core` re-derives the same global symbol with
|
|
285
|
+
* `Symbol.for` rather than importing it, so it stays internal to this module.
|
|
286
|
+
*/
|
|
287
|
+
declare const WORKBENCH_APP: unique symbol;
|
|
288
|
+
/**
|
|
289
|
+
* The branded result of `defineApplication`. Carries the same fields as the
|
|
290
|
+
* input plus the internal brand — users only ever see `DefineAppInput`.
|
|
291
|
+
* @public
|
|
292
|
+
*/
|
|
293
|
+
type DefineAppResult = { [K in keyof DefineAppInput]: Exclude<DefineAppInput[K], undefined>; } & {
|
|
294
|
+
readonly [WORKBENCH_APP]: true;
|
|
295
|
+
};
|
|
296
|
+
/**
|
|
297
|
+
* A branded app as the CLI reads it — the full schema shape, including the
|
|
298
|
+
* internal fields `DefineAppInput` omits. Schema-derived so the narrowing
|
|
299
|
+
* can't drift from what the schema validates.
|
|
300
|
+
* @public
|
|
301
|
+
*/
|
|
302
|
+
type WorkbenchApp = DefineAppResult & z.output<typeof DefineAppInputSchema>;
|
|
303
|
+
/**
|
|
304
|
+
* Whether `app` is a branded `defineApplication(...)` result — the sole
|
|
305
|
+
* workbench opt-in.
|
|
306
|
+
* @public
|
|
307
|
+
*/
|
|
308
|
+
declare function isWorkbenchApp(app: unknown): app is WorkbenchApp;
|
|
309
|
+
/**
|
|
310
|
+
* Declare a Sanity Dashboard application. Identity at runtime — returns the same
|
|
311
|
+
* object reference, tagged with the Dashboard brand. Field validation (the
|
|
312
|
+
* `slug` pattern etc.) runs at build time in the CLI via `DefineAppInputSchema`;
|
|
313
|
+
* this helper stays a thin, pure identity wrapper.
|
|
314
|
+
* @public
|
|
315
|
+
*/
|
|
316
|
+
declare function defineApplication(input: DefineAppInput): DefineAppResult;
|
|
317
|
+
/**
|
|
318
|
+
* One custom field a media library exposes. `src` default-exports a `defineField(...)` schema type.
|
|
319
|
+
* @public
|
|
320
|
+
*/
|
|
321
|
+
type MediaLibraryField = MediaLibraryConfig['fields'][number];
|
|
322
|
+
/**
|
|
323
|
+
* Sanity-owned singleton, so authors don't name or title the app — only `organizationId` is required.
|
|
324
|
+
* @public
|
|
325
|
+
*/
|
|
326
|
+
interface DefineMediaLibraryInput {
|
|
327
|
+
/** Organization that owns the media library — the CLI runs and deploys against it. */
|
|
328
|
+
organizationId: string;
|
|
329
|
+
fields?: MediaLibraryField[];
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Nominal brand the CLI discriminates a config on. A config is *not* an app: it
|
|
333
|
+
* carries no `slug`/`title`/application identity, only a target `appType`, its
|
|
334
|
+
* owning `organizationId`, and its `fields`. Registered via `Symbol.for` so the
|
|
335
|
+
* marker survives module-realm boundaries — `@sanity/cli-core` re-derives the
|
|
336
|
+
* same global symbol rather than importing it.
|
|
337
|
+
*/
|
|
338
|
+
declare const WORKBENCH_CONFIG: unique symbol;
|
|
339
|
+
/**
|
|
340
|
+
* A branded workbench config as the CLI reads it: bound to its target app by
|
|
341
|
+
* `appType`, not carrying its own app identity. The deploy/undeploy/build paths
|
|
342
|
+
* discriminate it via {@link isWorkbenchConfig}.
|
|
343
|
+
* @public
|
|
344
|
+
*/
|
|
345
|
+
type WorkbenchConfig = WorkbenchConfigValue & {
|
|
346
|
+
organizationId: string;
|
|
347
|
+
readonly [WORKBENCH_CONFIG]: true;
|
|
348
|
+
};
|
|
349
|
+
/** @public */
|
|
350
|
+
type MediaLibraryConfig = Extract<WorkbenchConfig, {
|
|
351
|
+
appType: 'media-library';
|
|
352
|
+
}>;
|
|
353
|
+
/** @public */
|
|
354
|
+
type DashboardConfig = Extract<WorkbenchConfig, {
|
|
355
|
+
appType: 'dashboard';
|
|
356
|
+
}>;
|
|
357
|
+
/** @public */
|
|
358
|
+
type DefineDashboardInput = Omit<DashboardConfig, 'appType' | typeof WORKBENCH_CONFIG>;
|
|
359
|
+
/**
|
|
360
|
+
* Whether `app` is a branded `unstable_defineMediaLibrary(...)` or `defineDashboard(...)` config — a
|
|
361
|
+
* config-carrier rather than an app. Configs live in `cliConfig.app` alongside
|
|
362
|
+
* apps but resolve through `resolveWorkbenchConfig`, not `resolveWorkbenchApp`.
|
|
363
|
+
* @public
|
|
364
|
+
*/
|
|
365
|
+
declare function isWorkbenchConfig(app: unknown): app is WorkbenchConfig;
|
|
366
|
+
/**
|
|
367
|
+
* Declare the Sanity Media Library config. The Media Library is a Sanity-owned
|
|
368
|
+
* singleton, so this is not an app — it carries no slug or title, only the
|
|
369
|
+
* target `appType`, its owning organization, and the `fields` it contributes to
|
|
370
|
+
* the installation's config.
|
|
371
|
+
* @public
|
|
372
|
+
*/
|
|
373
|
+
declare function unstable_defineMediaLibrary(input: DefineMediaLibraryInput): MediaLibraryConfig;
|
|
374
|
+
declare function defineDashboard(input: DefineDashboardInput): DashboardConfig;
|
|
375
|
+
export { ViewSurface as A, defineWindowView as B, PanelViewDeclaration as C, ViewComponent as D, TileViewDeclaration as E, WorkbenchConfigValue as F, defineAssetSourceView as I, definePanelView as L, WebWorkerDeclaration as M, WebWorkerType as N, ViewComponentBaseProps as O, WindowViewDeclaration as P, defineTileView as R, DockGroup as S, TileSize as T, DefineAssetSourceViewInput as _, DefineMediaLibraryInput as a, DefineWebWorkerInput as b, WorkbenchApp as c, defineDashboard as d, isWorkbenchApp as f, AssetSourceViewDeclaration as g, unstable_defineMediaLibrary as h, DefineDashboardInput as i, WEB_WORKER_CONTRACT_VERSION as j, ViewDeclaration 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, DefinePanelViewInput as v, ServiceType as w, DefineWindowViewInput as x, DefineTileViewInput as y, defineWebWorker as z };
|
|
376
|
+
//# sourceMappingURL=defineApp-COehpvlC.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import {
|
|
3
|
-
import { a as DeployableWorkbenchApp, i as
|
|
4
|
-
import { AppVisibility, CliConfig
|
|
1
|
+
import { F as WorkbenchConfigValue } from "./defineApp-COehpvlC.js";
|
|
2
|
+
import { t as resolveWorkbenchConfig } from "./resolveWorkbenchConfig-DkrkqN9H.js";
|
|
3
|
+
import { a as DeployedView, c as DeployableWorkbenchApp, i as DeployedInterface, l as getWorkbench, n as formatDeploySummary, o as DeployedWebWorker, s as summarizeInterfaces, t as fetchDeploySummaryDetails } from "./deploySummary-DU7_Vcyq.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
|
-
/**
|
|
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
|
-
|
|
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).
|
|
@@ -153,7 +121,7 @@ declare function createStudio(options: {
|
|
|
153
121
|
* then sync its mutable metadata (`title`, and `slug`/`visibility` when set)
|
|
154
122
|
* and its icon from config. The deploy endpoint ignores these, so a redeploy
|
|
155
123
|
* patches them here alongside the new deployment. No `icon` removes the
|
|
156
|
-
* application's icon.
|
|
124
|
+
* application's icon. Each interface's `icon` goes on the interface Brett created for it.
|
|
157
125
|
*
|
|
158
126
|
* `onDeployed` fires the instant the deployment is live, before the metadata
|
|
159
127
|
* sync — so a caller can disarm a create-time rollback that must not delete an
|
|
@@ -183,6 +151,7 @@ declare function deployWorkbenchApp(options: {
|
|
|
183
151
|
title: string;
|
|
184
152
|
version: string;
|
|
185
153
|
visibility?: AppVisibility;
|
|
154
|
+
workDir: string;
|
|
186
155
|
workspaces?: readonly BrettWorkspace[];
|
|
187
156
|
}): Promise<void>;
|
|
188
157
|
/**
|
|
@@ -199,8 +168,17 @@ declare function selectWorkbenchAppId({ appId, flags, organizationId, type }: {
|
|
|
199
168
|
organizationId: string | undefined;
|
|
200
169
|
type: ApplicationType;
|
|
201
170
|
}): Promise<string | undefined>;
|
|
171
|
+
interface Dashboard {
|
|
172
|
+
id: string;
|
|
173
|
+
}
|
|
174
|
+
declare function getOrganizationDashboard(organizationId: string): Promise<Dashboard | undefined>;
|
|
175
|
+
declare function uploadDashboardConfig(options: {
|
|
176
|
+
dashboard: Dashboard | undefined;
|
|
177
|
+
organizationId: string;
|
|
178
|
+
sourceDir: string;
|
|
179
|
+
}): Promise<void>;
|
|
202
180
|
/**
|
|
203
|
-
* An app's `icon` image, read from its project.
|
|
181
|
+
* An app's or view's `icon` image, read from its project.
|
|
204
182
|
* @internal
|
|
205
183
|
*/
|
|
206
184
|
interface AppIcon extends ImageFile {
|
|
@@ -208,10 +186,10 @@ interface AppIcon extends ImageFile {
|
|
|
208
186
|
file: string;
|
|
209
187
|
}
|
|
210
188
|
/**
|
|
211
|
-
* Read the image `
|
|
189
|
+
* Read the image an `icon` path points at. The path is relative to the project
|
|
212
190
|
* root and must stay inside it.
|
|
213
191
|
* @internal
|
|
214
192
|
*/
|
|
215
193
|
declare function readAppIcon(workDir: string, iconPath: string): Promise<AppIcon>;
|
|
216
|
-
export { type Application, type BrettAccess, type BrettWorkspace, type CreatedApplication, type DeployedInterface, type DeployedView, type DeployedWebWorker, type
|
|
194
|
+
export { type Application, type BrettAccess, type BrettWorkspace, type CreatedApplication, type DeployedInterface, type DeployedView, type DeployedWebWorker, type WorkbenchDeployPayload, createCoreApp, createStudio, deployConfig, deployWorkbenchApp, fetchDeploySummaryDetails, formatDeploySummary, getApplication, getApplicationUrl, getOrganizationDashboard, getWorkbench, getWorkbenchUrl, listApplications, readAppIcon, resolveInstallationId, resolveWorkbenchConfig, selectWorkbenchAppId, summarizeConfig, summarizeInterfaces, toWorkbenchPayload, uploadDashboardConfig };
|
|
217
195
|
//# sourceMappingURL=deploy.d.ts.map
|
package/dist/_exports/deploy.js
CHANGED
|
@@ -5,8 +5,10 @@ export { createCoreApp, createStudio, deployWorkbenchApp } from '../actions/depl
|
|
|
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 {
|
|
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 {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","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,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,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 {
|
|
2
|
-
import {
|
|
1
|
+
import { A as ViewSurface, N as WebWorkerType } from "./defineApp-COehpvlC.js";
|
|
2
|
+
import { n as WorkbenchExposes, t as ResolvedWorkbenchApp } from "./resolveWorkbenchApp-Bn0tsSDM.js";
|
|
3
3
|
import { CliConfig } from "@sanity/cli-core";
|
|
4
4
|
import { z } from "zod/mini";
|
|
5
5
|
/**
|
|
@@ -61,5 +61,31 @@ declare function summarizeInterfaces({ views, webWorkers }: WorkbenchExposes): {
|
|
|
61
61
|
services: DeployedWebWorker[];
|
|
62
62
|
views: DeployedView[];
|
|
63
63
|
};
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
declare function fetchDeploySummaryDetails(organizationId: string): Promise<{
|
|
65
|
+
organizationName: string | null;
|
|
66
|
+
userName: string | null;
|
|
67
|
+
}>;
|
|
68
|
+
declare function formatDeploySummary(options: ({
|
|
69
|
+
applicationId: string;
|
|
70
|
+
showAppIdHint: boolean;
|
|
71
|
+
type: 'coreApp' | 'studio';
|
|
72
|
+
} | {
|
|
73
|
+
type: 'config';
|
|
74
|
+
}) & {
|
|
75
|
+
created: boolean;
|
|
76
|
+
durationMs: number;
|
|
77
|
+
organizationId: string;
|
|
78
|
+
organizationName?: string | null;
|
|
79
|
+
title: string;
|
|
80
|
+
url: string;
|
|
81
|
+
userName?: string | null;
|
|
82
|
+
}): string;
|
|
83
|
+
declare function formatUndeploySummary(options: {
|
|
84
|
+
durationMs: number;
|
|
85
|
+
organizationId: string;
|
|
86
|
+
organizationName?: string | null;
|
|
87
|
+
title: string;
|
|
88
|
+
url: string;
|
|
89
|
+
}): string;
|
|
90
|
+
export { DeployedView as a, DeployableWorkbenchApp as c, DeployedInterface as i, getWorkbench as l, formatDeploySummary as n, DeployedWebWorker as o, formatUndeploySummary as r, summarizeInterfaces as s, fetchDeploySummaryDetails as t };
|
|
91
|
+
//# sourceMappingURL=deploySummary-DU7_Vcyq.d.ts.map
|
package/dist/_exports/dev.d.ts
CHANGED
package/dist/_exports/index.d.ts
CHANGED
|
@@ -1,7 +1,25 @@
|
|
|
1
|
-
import { C as defineTileView, S as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { A as ViewSurface, B as defineWindowView, C as PanelViewDeclaration, D as ViewComponent, E as TileViewDeclaration, I as defineAssetSourceView, L as definePanelView, M as WebWorkerDeclaration, N as WebWorkerType, O as ViewComponentBaseProps, P as WindowViewDeclaration, R as defineTileView, S as DockGroup, T as TileSize, _ as DefineAssetSourceViewInput, a as DefineMediaLibraryInput, b as DefineWebWorkerInput, c as WorkbenchApp, d as defineDashboard, f as isWorkbenchApp, g as AssetSourceViewDeclaration, h as unstable_defineMediaLibrary, i as DefineDashboardInput, j as WEB_WORKER_CONTRACT_VERSION, k as ViewDeclaration, l as WorkbenchConfig, m as resolveAppTitle, n as DefineAppInput, o as MediaLibraryConfig, p as isWorkbenchConfig, r as DefineAppResult, s as MediaLibraryField, t as DashboardConfig, u as defineApplication, v as DefinePanelViewInput, w as ServiceType, x as DefineWindowViewInput, y as DefineTileViewInput, z as defineWebWorker } from "./defineApp-COehpvlC.js";
|
|
2
|
+
import { View, ViewApplication, WebWorkerProps, WebWorkerProps as WebWorkerProps$1 } from "@sanity/sdk/dashboard";
|
|
3
|
+
import { CurrentUser } from "@sanity/sdk";
|
|
4
4
|
import { AssetSourceComponentProps } from "@sanity/types";
|
|
5
|
+
interface ApplicationsContext {
|
|
6
|
+
applications: readonly (ViewApplication & {
|
|
7
|
+
views: readonly View<{
|
|
8
|
+
includeApplication: false;
|
|
9
|
+
}>[];
|
|
10
|
+
})[];
|
|
11
|
+
currentUser: CurrentUser;
|
|
12
|
+
}
|
|
13
|
+
interface DefineDashboardConfigInput {
|
|
14
|
+
applications?: {
|
|
15
|
+
hidden?: (references: readonly ViewApplication['reference'][], context: ApplicationsContext) => readonly ViewApplication['reference'][];
|
|
16
|
+
visible?: (references: readonly ViewApplication['reference'][], context: ApplicationsContext) => readonly ViewApplication['reference'][];
|
|
17
|
+
};
|
|
18
|
+
views?: (views: readonly View[], context: {
|
|
19
|
+
currentUser: CurrentUser;
|
|
20
|
+
}) => readonly View[];
|
|
21
|
+
}
|
|
22
|
+
declare function defineDashboardConfig(config: DefineDashboardConfigInput): DefineDashboardConfigInput;
|
|
5
23
|
/** @public */
|
|
6
24
|
type WindowViewProps = ViewComponentBaseProps<{
|
|
7
25
|
name: string;
|
|
@@ -177,5 +195,5 @@ type ServiceBus = WebWorkerProps$1['bus'];
|
|
|
177
195
|
* @public
|
|
178
196
|
*/
|
|
179
197
|
type ServiceInfo = WebWorkerProps$1['worker'];
|
|
180
|
-
export { type AssetSourceComponent, type
|
|
198
|
+
export { type AssetSourceComponent, type AssetSourceViewComponents, type AssetSourceViewDeclaration, type DashboardConfig, type DefineAppInput, type DefineAppResult, type DefineAssetSourceViewInput, type DefineDashboardInput, type DefineMediaLibraryInput, type DefinePanelViewInput, type DefineTileViewInput, type DefineWebWorkerInput, type DefineWindowViewInput, type DefinedService, type DefinedView, type DockGroup, type MediaLibraryConfig, type MediaLibraryField, type PanelComponent, type PanelViewComponents, type PanelViewDeclaration, type PanelViewProps, type ServiceBus, type ServiceCallback, type ServiceContext, type ServiceInfo, type ServiceType, type TileComponent, type TileSize, type TileViewComponents, type TileViewDeclaration, type TileViewProps, type ViewComponentsBySurface, type ViewDeclaration, type ViewSurface, type WebWorkerBus, type WebWorkerDeclaration, type WebWorkerInfo, type WebWorkerProps, type WebWorkerType, type WindowViewDeclaration, type WindowViewProps, type WorkbenchApp, type WorkbenchConfig, defineApplication, defineAssetSourceView, defineDashboard, defineDashboardConfig, definePanelView, defineTileView, defineWebWorker, defineWindowView, isWorkbenchApp, isWorkbenchConfig, resolveAppTitle, unstable_defineMediaLibrary, unstable_defineService, unstable_defineView };
|
|
181
199
|
//# sourceMappingURL=index.d.ts.map
|