@sanity/workbench-cli 2.5.0 → 2.5.1
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.
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
* `render(rootElement, props, renderOptions?: {reactStrictMode?: boolean; moduleId?: string})`.
|
|
15
15
|
* `moduleId` is the host's canonical federation module id (e.g. `favorites/App`,
|
|
16
16
|
* `favorites/views/list/panel`, `favorites/workers/sync`). It is provided to
|
|
17
|
-
* `App` through a `React.Context<string | undefined>` keyed per React copy
|
|
18
|
-
* global slot (`Symbol.for('sanity.os.module')`),
|
|
19
|
-
* `getDashboardModuleContext()`.
|
|
17
|
+
* `App` through a `React.Context<string | undefined>` keyed per React copy (by
|
|
18
|
+
* `React.createContext`) on a global slot (`Symbol.for('sanity.os.module')`),
|
|
19
|
+
* which the SDK reads via `getDashboardModuleContext()`.
|
|
20
20
|
*/ /**
|
|
21
21
|
* Hot-reload: on an update, re-render every live root through the new module —
|
|
22
22
|
* so whatever it now binds `App` to (a recompiled component, a new studio
|
|
@@ -49,10 +49,14 @@ ${preamble}
|
|
|
49
49
|
${app ? `\nconst App = ${app}\n` : ''}${version ? `\nexport const version = ${version}\n` : ''}
|
|
50
50
|
// Module identity (the federation module id) is provided to App through a React
|
|
51
51
|
// context keyed per React copy on a global slot. The SDK reads this same slot
|
|
52
|
-
// via getDashboardModuleContext(), so the symbol and value type are
|
|
52
|
+
// via getDashboardModuleContext(), so the symbol, the key and the value type are
|
|
53
|
+
// a contract. The key is React.createContext rather than the React namespace:
|
|
54
|
+
// bundler interop (esbuild's __toESM in Vite dev pre-bundling) can hand two
|
|
55
|
+
// importers of the same React copy different namespace objects, whereas the
|
|
56
|
+
// createContext function is the same reference in both.
|
|
53
57
|
const moduleSlot = (globalThis[Symbol.for('sanity.os.module')] ??= new WeakMap())
|
|
54
|
-
if (!moduleSlot.has(React)) moduleSlot.set(React, React.createContext(undefined))
|
|
55
|
-
const ModuleContext = moduleSlot.get(React)
|
|
58
|
+
if (!moduleSlot.has(React.createContext)) moduleSlot.set(React.createContext, React.createContext(undefined))
|
|
59
|
+
const ModuleContext = moduleSlot.get(React.createContext)
|
|
56
60
|
const rootMap = new Map()
|
|
57
61
|
const renderArgs = new Map()
|
|
58
62
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/build/render-remote.ts"],"sourcesContent":["/**\n * Every entry the federation build generates — the studio/app remote entries\n * and the per-view-component artifacts — is the same thing: a *render-contract\n * module* that owns its own React, renders into a host node via\n * `render(rootElement, props, renderOptions)`, and returns a disposer.\n *\n * They differ only in *what* they render. So each module binds an `App` to that\n * (the SDK app, a `Studio` with config, a view component) and the render body —\n * identical everywhere — just renders `App`. {@link renderRemote} assembles a\n * module from a `preamble` (its imports), the `app` expression, and, optionally,\n * the shared HMR snippet.\n *\n * The render contract is\n * `render(rootElement, props, renderOptions?: {reactStrictMode?: boolean; moduleId?: string})`.\n * `moduleId` is the host's canonical federation module id (e.g. `favorites/App`,\n * `favorites/views/list/panel`, `favorites/workers/sync`). It is provided to\n * `App` through a `React.Context<string | undefined>` keyed per React copy
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/build/render-remote.ts"],"sourcesContent":["/**\n * Every entry the federation build generates — the studio/app remote entries\n * and the per-view-component artifacts — is the same thing: a *render-contract\n * module* that owns its own React, renders into a host node via\n * `render(rootElement, props, renderOptions)`, and returns a disposer.\n *\n * They differ only in *what* they render. So each module binds an `App` to that\n * (the SDK app, a `Studio` with config, a view component) and the render body —\n * identical everywhere — just renders `App`. {@link renderRemote} assembles a\n * module from a `preamble` (its imports), the `app` expression, and, optionally,\n * the shared HMR snippet.\n *\n * The render contract is\n * `render(rootElement, props, renderOptions?: {reactStrictMode?: boolean; moduleId?: string})`.\n * `moduleId` is the host's canonical federation module id (e.g. `favorites/App`,\n * `favorites/views/list/panel`, `favorites/workers/sync`). It is provided to\n * `App` through a `React.Context<string | undefined>` keyed per React copy (by\n * `React.createContext`) on a global slot (`Symbol.for('sanity.os.module')`),\n * which the SDK reads via `getDashboardModuleContext()`.\n */\n\n/**\n * Hot-reload: on an update, re-render every live root through the new module —\n * so whatever it now binds `App` to (a recompiled component, a new studio\n * config) takes effect without a full page reload. Stripped from prod builds.\n */\nconst HMR_REMOUNT = `if (import.meta.hot) {\n import.meta.hot.accept((next) => {\n if (!next) return\n for (const [rootElement, args] of renderArgs) {\n rootMap.get(rootElement)?.unmount()\n rootMap.delete(rootElement)\n next.render(rootElement, args.props, args.renderOptions)\n }\n })\n}`\n\n/**\n * Assemble a render-contract module: its `preamble` (imports), the `App` it\n * renders, the render body, and — when `hmr` — the shared HMR snippet.\n *\n * - `app` is the expression bound to `App`; omit it when the preamble imports an\n * `App` directly (the SDK-app entry).\n * - `version` is an expression the host reads to check contract compatibility;\n * omit it when the module carries no version (the studio/app entries).\n */\nexport function renderRemote({\n app,\n hmr = false,\n preamble,\n version,\n}: {\n app?: string\n hmr?: boolean\n preamble: string\n version?: string\n}): string {\n return `\\\n// This file is auto-generated on 'sanity build' / 'sanity dev'\n// Modifications to this file are automatically discarded\nimport * as React from 'react'\nimport { createRoot } from 'react-dom/client'\n${preamble}\n${app ? `\\nconst App = ${app}\\n` : ''}${version ? `\\nexport const version = ${version}\\n` : ''}\n// Module identity (the federation module id) is provided to App through a React\n// context keyed per React copy on a global slot. The SDK reads this same slot\n// via getDashboardModuleContext(), so the symbol, the key and the value type are\n// a contract. The key is React.createContext rather than the React namespace:\n// bundler interop (esbuild's __toESM in Vite dev pre-bundling) can hand two\n// importers of the same React copy different namespace objects, whereas the\n// createContext function is the same reference in both.\nconst moduleSlot = (globalThis[Symbol.for('sanity.os.module')] ??= new WeakMap())\nif (!moduleSlot.has(React.createContext)) moduleSlot.set(React.createContext, React.createContext(undefined))\nconst ModuleContext = moduleSlot.get(React.createContext)\nconst rootMap = new Map()\nconst renderArgs = new Map()\n\nfunction mount(rootElement, args) {\n let root = rootMap.get(rootElement)\n if (!root) {\n root = createRoot(rootElement)\n rootMap.set(rootElement, root)\n }\n const element = React.createElement(ModuleContext.Provider, { value: args?.renderOptions?.moduleId }, React.createElement(App, args.props))\n root.render(args?.renderOptions?.reactStrictMode ? React.createElement(React.StrictMode, null, element) : element)\n}\n\nexport function render(rootElement, props, renderOptions) {\n const args = { props, renderOptions }\n renderArgs.set(rootElement, args)\n mount(rootElement, args)\n return () => {\n const root = rootMap.get(rootElement)\n rootMap.delete(rootElement)\n renderArgs.delete(rootElement)\n root?.unmount()\n }\n}${hmr ? `\\n\\n${HMR_REMOUNT}` : ''}\n`\n}\n"],"names":["HMR_REMOUNT","renderRemote","app","hmr","preamble","version"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;CAmBC,GAED;;;;CAIC,GACD,MAAMA,cAAc,CAAC;;;;;;;;;CASpB,CAAC;AAEF;;;;;;;;CAQC,GACD,OAAO,SAASC,aAAa,EAC3BC,GAAG,EACHC,MAAM,KAAK,EACXC,QAAQ,EACRC,OAAO,EAMR;IACC,OAAO,CAAC;;;;;AAKV,EAAED,SAAS;AACX,EAAEF,MAAM,CAAC,cAAc,EAAEA,IAAI,EAAE,CAAC,GAAG,KAAKG,UAAU,CAAC,yBAAyB,EAAEA,QAAQ,EAAE,CAAC,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC9F,EAAEF,MAAM,CAAC,IAAI,EAAEH,aAAa,GAAG,GAAG;AACnC,CAAC;AACD"}
|
|
@@ -8,7 +8,7 @@ const REMOTE_ENTRY_FILE = `${FEDERATION_FILE_NAME}.jsx`;
|
|
|
8
8
|
// new module so a config edit takes effect. The `%RESOURCE_BINDINGS_IMPORT%`
|
|
9
9
|
// placeholder is filled in per-build (Blueprints only — see below).
|
|
10
10
|
const STUDIO_ENTRY = renderRemote({
|
|
11
|
-
app: `(props) => createElement(Studio, { config, ...props })`,
|
|
11
|
+
app: `(props) => React.createElement(Studio, { config, ...props })`,
|
|
12
12
|
hmr: true,
|
|
13
13
|
preamble: `%RESOURCE_BINDINGS_IMPORT%import { Studio } from 'sanity'
|
|
14
14
|
import config from %STUDIO_CONFIG%`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/actions/build/vite/plugins/plugin-sanity-federation-runtime.ts"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\n\nimport {type EnvironmentModuleNode, type Plugin} from 'vite'\n\nimport {renderRemote} from '../../render-remote.js'\nimport {\n RESOURCE_BINDINGS_ENTRY_IMPORT,\n RESOURCE_BINDINGS_FILENAME,\n RESOURCE_BINDINGS_MODULE_SOURCE,\n} from '../../resource-bindings.js'\nimport {FEDERATION_FILE_NAME, RUNTIME_DIR} from '../constants.js'\n\nconst REMOTE_ENTRY_FILE = `${FEDERATION_FILE_NAME}.jsx`\n\n// The studio wraps `Studio` with the user's config; HMR re-renders through the\n// new module so a config edit takes effect. The `%RESOURCE_BINDINGS_IMPORT%`\n// placeholder is filled in per-build (Blueprints only — see below).\nconst STUDIO_ENTRY = renderRemote({\n app: `(props) => createElement(Studio, { config, ...props })`,\n hmr: true,\n preamble: `%RESOURCE_BINDINGS_IMPORT%import { Studio } from 'sanity'\nimport config from %STUDIO_CONFIG%`,\n})\n\n// An SDK app's default export is the component; it Fast-Refreshes through its\n// own dev server, so the wrapper needs no HMR boundary.\nconst APP_ENTRY = renderRemote({\n preamble: `%RESOURCE_BINDINGS_IMPORT%import App from %APP_ENTRY%`,\n})\n\n// A branded app that declares no `entry` (e.g. a dock-only panel/worker app)\n// has no navigable full-page view, so there's no `App` to import. The runtime\n// still needs a valid module for the federation build input, but it exposes no\n// `./App` (see `plugin.ts`) — its `render` is unreachable and throws if reached.\nconst HEADLESS_APP_ENTRY = `\\\n// This file is auto-generated on 'sanity dev'\n// Modifications to this file are automatically discarded\n// This application declares no app view (no \\`entry\\`): it isn't navigable as a\n// full-page app, only its panels/web workers are exposed.\n%RESOURCE_BINDINGS_IMPORT%export function render() {\n throw new Error('This application has no app view: it declares no \\`entry\\`.')\n}\n`\n\nexport type FederationRuntimeOptions =\n | {appEntry?: string; isApp: true; isBlueprints?: boolean}\n | {isApp: false; isBlueprints?: boolean; studioConfigPath: string}\n\nexport function sanityFederationRuntime(options: FederationRuntimeOptions): Plugin {\n const {isBlueprints} = options\n\n let content: string\n if (options.isApp) {\n content = options.appEntry\n ? APP_ENTRY.replace(/%APP_ENTRY%/, JSON.stringify(options.appEntry))\n : HEADLESS_APP_ENTRY\n } else {\n content = STUDIO_ENTRY.replace(/%STUDIO_CONFIG%/, JSON.stringify(options.studioConfigPath))\n }\n\n // Blueprints only: the remote entry statically imports the resource-bindings\n // module first, so bindings evaluate before app code. Off Blueprints the\n // placeholder resolves to nothing and the module is neither imported nor\n // written below.\n content = content.replace(\n /%RESOURCE_BINDINGS_IMPORT%/,\n isBlueprints ? `${RESOURCE_BINDINGS_ENTRY_IMPORT}\\n` : '',\n )\n\n let entryFileAbsPath = ''\n\n return {\n configResolved(config) {\n const dir = path.resolve(config.root, RUNTIME_DIR)\n entryFileAbsPath = path.join(dir, REMOTE_ENTRY_FILE)\n\n fs.mkdirSync(dir, {recursive: true})\n fs.writeFileSync(entryFileAbsPath, content)\n\n if (isBlueprints) {\n // Brett bakes the resolved values into this module at deploy.\n fs.writeFileSync(\n path.join(dir, RESOURCE_BINDINGS_FILENAME),\n RESOURCE_BINDINGS_MODULE_SOURCE,\n )\n }\n },\n hotUpdate({file, modules, timestamp}) {\n if (options.isApp) return\n if (this.environment.name !== 'client') return\n\n const {moduleGraph} = this.environment\n const studioMods = moduleGraph.getModulesByFile(entryFileAbsPath)\n if (!studioMods?.size) return\n\n // Is the changed file reachable from the studio entry?\n const visited = new Set<EnvironmentModuleNode>()\n const queue: EnvironmentModuleNode[] = [...studioMods]\n while (queue.length > 0) {\n const mod = queue.pop()!\n if (visited.has(mod)) continue\n visited.add(mod)\n if (mod.file === file) {\n // The walk from `file` up through importers dead-ends at federation\n // gaps, so invalidate changed modules ourselves and route HMR to the\n // self-accepting studio entry.\n const seen = new Set<EnvironmentModuleNode>()\n for (const m of modules) {\n moduleGraph.invalidateModule(m, seen, timestamp, true)\n }\n return [...studioMods]\n }\n for (const dep of mod.importedModules) queue.push(dep)\n }\n },\n name: 'sanity/federation-runtime',\n }\n}\n"],"names":["fs","path","renderRemote","RESOURCE_BINDINGS_ENTRY_IMPORT","RESOURCE_BINDINGS_FILENAME","RESOURCE_BINDINGS_MODULE_SOURCE","FEDERATION_FILE_NAME","RUNTIME_DIR","REMOTE_ENTRY_FILE","STUDIO_ENTRY","app","hmr","preamble","APP_ENTRY","HEADLESS_APP_ENTRY","sanityFederationRuntime","options","isBlueprints","content","isApp","appEntry","replace","JSON","stringify","studioConfigPath","entryFileAbsPath","configResolved","config","dir","resolve","root","join","mkdirSync","recursive","writeFileSync","hotUpdate","file","modules","timestamp","environment","name","moduleGraph","studioMods","getModulesByFile","size","visited","Set","queue","length","mod","pop","has","add","seen","m","invalidateModule","dep","importedModules","push"],"mappings":"AAAA,OAAOA,QAAQ,UAAS;AACxB,OAAOC,UAAU,YAAW;AAI5B,SAAQC,YAAY,QAAO,yBAAwB;AACnD,SACEC,8BAA8B,EAC9BC,0BAA0B,EAC1BC,+BAA+B,QAC1B,6BAA4B;AACnC,SAAQC,oBAAoB,EAAEC,WAAW,QAAO,kBAAiB;AAEjE,MAAMC,oBAAoB,GAAGF,qBAAqB,IAAI,CAAC;AAEvD,+EAA+E;AAC/E,6EAA6E;AAC7E,oEAAoE;AACpE,MAAMG,eAAeP,aAAa;IAChCQ,KAAK,CAAC,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/actions/build/vite/plugins/plugin-sanity-federation-runtime.ts"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\n\nimport {type EnvironmentModuleNode, type Plugin} from 'vite'\n\nimport {renderRemote} from '../../render-remote.js'\nimport {\n RESOURCE_BINDINGS_ENTRY_IMPORT,\n RESOURCE_BINDINGS_FILENAME,\n RESOURCE_BINDINGS_MODULE_SOURCE,\n} from '../../resource-bindings.js'\nimport {FEDERATION_FILE_NAME, RUNTIME_DIR} from '../constants.js'\n\nconst REMOTE_ENTRY_FILE = `${FEDERATION_FILE_NAME}.jsx`\n\n// The studio wraps `Studio` with the user's config; HMR re-renders through the\n// new module so a config edit takes effect. The `%RESOURCE_BINDINGS_IMPORT%`\n// placeholder is filled in per-build (Blueprints only — see below).\nconst STUDIO_ENTRY = renderRemote({\n app: `(props) => React.createElement(Studio, { config, ...props })`,\n hmr: true,\n preamble: `%RESOURCE_BINDINGS_IMPORT%import { Studio } from 'sanity'\nimport config from %STUDIO_CONFIG%`,\n})\n\n// An SDK app's default export is the component; it Fast-Refreshes through its\n// own dev server, so the wrapper needs no HMR boundary.\nconst APP_ENTRY = renderRemote({\n preamble: `%RESOURCE_BINDINGS_IMPORT%import App from %APP_ENTRY%`,\n})\n\n// A branded app that declares no `entry` (e.g. a dock-only panel/worker app)\n// has no navigable full-page view, so there's no `App` to import. The runtime\n// still needs a valid module for the federation build input, but it exposes no\n// `./App` (see `plugin.ts`) — its `render` is unreachable and throws if reached.\nconst HEADLESS_APP_ENTRY = `\\\n// This file is auto-generated on 'sanity dev'\n// Modifications to this file are automatically discarded\n// This application declares no app view (no \\`entry\\`): it isn't navigable as a\n// full-page app, only its panels/web workers are exposed.\n%RESOURCE_BINDINGS_IMPORT%export function render() {\n throw new Error('This application has no app view: it declares no \\`entry\\`.')\n}\n`\n\nexport type FederationRuntimeOptions =\n | {appEntry?: string; isApp: true; isBlueprints?: boolean}\n | {isApp: false; isBlueprints?: boolean; studioConfigPath: string}\n\nexport function sanityFederationRuntime(options: FederationRuntimeOptions): Plugin {\n const {isBlueprints} = options\n\n let content: string\n if (options.isApp) {\n content = options.appEntry\n ? APP_ENTRY.replace(/%APP_ENTRY%/, JSON.stringify(options.appEntry))\n : HEADLESS_APP_ENTRY\n } else {\n content = STUDIO_ENTRY.replace(/%STUDIO_CONFIG%/, JSON.stringify(options.studioConfigPath))\n }\n\n // Blueprints only: the remote entry statically imports the resource-bindings\n // module first, so bindings evaluate before app code. Off Blueprints the\n // placeholder resolves to nothing and the module is neither imported nor\n // written below.\n content = content.replace(\n /%RESOURCE_BINDINGS_IMPORT%/,\n isBlueprints ? `${RESOURCE_BINDINGS_ENTRY_IMPORT}\\n` : '',\n )\n\n let entryFileAbsPath = ''\n\n return {\n configResolved(config) {\n const dir = path.resolve(config.root, RUNTIME_DIR)\n entryFileAbsPath = path.join(dir, REMOTE_ENTRY_FILE)\n\n fs.mkdirSync(dir, {recursive: true})\n fs.writeFileSync(entryFileAbsPath, content)\n\n if (isBlueprints) {\n // Brett bakes the resolved values into this module at deploy.\n fs.writeFileSync(\n path.join(dir, RESOURCE_BINDINGS_FILENAME),\n RESOURCE_BINDINGS_MODULE_SOURCE,\n )\n }\n },\n hotUpdate({file, modules, timestamp}) {\n if (options.isApp) return\n if (this.environment.name !== 'client') return\n\n const {moduleGraph} = this.environment\n const studioMods = moduleGraph.getModulesByFile(entryFileAbsPath)\n if (!studioMods?.size) return\n\n // Is the changed file reachable from the studio entry?\n const visited = new Set<EnvironmentModuleNode>()\n const queue: EnvironmentModuleNode[] = [...studioMods]\n while (queue.length > 0) {\n const mod = queue.pop()!\n if (visited.has(mod)) continue\n visited.add(mod)\n if (mod.file === file) {\n // The walk from `file` up through importers dead-ends at federation\n // gaps, so invalidate changed modules ourselves and route HMR to the\n // self-accepting studio entry.\n const seen = new Set<EnvironmentModuleNode>()\n for (const m of modules) {\n moduleGraph.invalidateModule(m, seen, timestamp, true)\n }\n return [...studioMods]\n }\n for (const dep of mod.importedModules) queue.push(dep)\n }\n },\n name: 'sanity/federation-runtime',\n }\n}\n"],"names":["fs","path","renderRemote","RESOURCE_BINDINGS_ENTRY_IMPORT","RESOURCE_BINDINGS_FILENAME","RESOURCE_BINDINGS_MODULE_SOURCE","FEDERATION_FILE_NAME","RUNTIME_DIR","REMOTE_ENTRY_FILE","STUDIO_ENTRY","app","hmr","preamble","APP_ENTRY","HEADLESS_APP_ENTRY","sanityFederationRuntime","options","isBlueprints","content","isApp","appEntry","replace","JSON","stringify","studioConfigPath","entryFileAbsPath","configResolved","config","dir","resolve","root","join","mkdirSync","recursive","writeFileSync","hotUpdate","file","modules","timestamp","environment","name","moduleGraph","studioMods","getModulesByFile","size","visited","Set","queue","length","mod","pop","has","add","seen","m","invalidateModule","dep","importedModules","push"],"mappings":"AAAA,OAAOA,QAAQ,UAAS;AACxB,OAAOC,UAAU,YAAW;AAI5B,SAAQC,YAAY,QAAO,yBAAwB;AACnD,SACEC,8BAA8B,EAC9BC,0BAA0B,EAC1BC,+BAA+B,QAC1B,6BAA4B;AACnC,SAAQC,oBAAoB,EAAEC,WAAW,QAAO,kBAAiB;AAEjE,MAAMC,oBAAoB,GAAGF,qBAAqB,IAAI,CAAC;AAEvD,+EAA+E;AAC/E,6EAA6E;AAC7E,oEAAoE;AACpE,MAAMG,eAAeP,aAAa;IAChCQ,KAAK,CAAC,4DAA4D,CAAC;IACnEC,KAAK;IACLC,UAAU,CAAC;kCACqB,CAAC;AACnC;AAEA,8EAA8E;AAC9E,wDAAwD;AACxD,MAAMC,YAAYX,aAAa;IAC7BU,UAAU,CAAC,qDAAqD,CAAC;AACnE;AAEA,6EAA6E;AAC7E,8EAA8E;AAC9E,+EAA+E;AAC/E,iFAAiF;AACjF,MAAME,qBAAqB,CAAC;;;;;;;;AAQ5B,CAAC;AAMD,OAAO,SAASC,wBAAwBC,OAAiC;IACvE,MAAM,EAACC,YAAY,EAAC,GAAGD;IAEvB,IAAIE;IACJ,IAAIF,QAAQG,KAAK,EAAE;QACjBD,UAAUF,QAAQI,QAAQ,GACtBP,UAAUQ,OAAO,CAAC,eAAeC,KAAKC,SAAS,CAACP,QAAQI,QAAQ,KAChEN;IACN,OAAO;QACLI,UAAUT,aAAaY,OAAO,CAAC,mBAAmBC,KAAKC,SAAS,CAACP,QAAQQ,gBAAgB;IAC3F;IAEA,6EAA6E;IAC7E,yEAAyE;IACzE,yEAAyE;IACzE,iBAAiB;IACjBN,UAAUA,QAAQG,OAAO,CACvB,8BACAJ,eAAe,GAAGd,+BAA+B,EAAE,CAAC,GAAG;IAGzD,IAAIsB,mBAAmB;IAEvB,OAAO;QACLC,gBAAeC,MAAM;YACnB,MAAMC,MAAM3B,KAAK4B,OAAO,CAACF,OAAOG,IAAI,EAAEvB;YACtCkB,mBAAmBxB,KAAK8B,IAAI,CAACH,KAAKpB;YAElCR,GAAGgC,SAAS,CAACJ,KAAK;gBAACK,WAAW;YAAI;YAClCjC,GAAGkC,aAAa,CAACT,kBAAkBP;YAEnC,IAAID,cAAc;gBAChB,8DAA8D;gBAC9DjB,GAAGkC,aAAa,CACdjC,KAAK8B,IAAI,CAACH,KAAKxB,6BACfC;YAEJ;QACF;QACA8B,WAAU,EAACC,IAAI,EAAEC,OAAO,EAAEC,SAAS,EAAC;YAClC,IAAItB,QAAQG,KAAK,EAAE;YACnB,IAAI,IAAI,CAACoB,WAAW,CAACC,IAAI,KAAK,UAAU;YAExC,MAAM,EAACC,WAAW,EAAC,GAAG,IAAI,CAACF,WAAW;YACtC,MAAMG,aAAaD,YAAYE,gBAAgB,CAAClB;YAChD,IAAI,CAACiB,YAAYE,MAAM;YAEvB,uDAAuD;YACvD,MAAMC,UAAU,IAAIC;YACpB,MAAMC,QAAiC;mBAAIL;aAAW;YACtD,MAAOK,MAAMC,MAAM,GAAG,EAAG;gBACvB,MAAMC,MAAMF,MAAMG,GAAG;gBACrB,IAAIL,QAAQM,GAAG,CAACF,MAAM;gBACtBJ,QAAQO,GAAG,CAACH;gBACZ,IAAIA,IAAIb,IAAI,KAAKA,MAAM;oBACrB,oEAAoE;oBACpE,qEAAqE;oBACrE,+BAA+B;oBAC/B,MAAMiB,OAAO,IAAIP;oBACjB,KAAK,MAAMQ,KAAKjB,QAAS;wBACvBI,YAAYc,gBAAgB,CAACD,GAAGD,MAAMf,WAAW;oBACnD;oBACA,OAAO;2BAAII;qBAAW;gBACxB;gBACA,KAAK,MAAMc,OAAOP,IAAIQ,eAAe,CAAEV,MAAMW,IAAI,CAACF;YACpD;QACF;QACAhB,MAAM;IACR;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/workbench-cli",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.1",
|
|
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",
|