@vite-hub/workspace 0.3.1 → 0.4.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.
- package/README.md +17 -13
- package/dist/blob-database.d.ts +1 -1
- package/dist/blob-database.js +6 -6
- package/dist/checkout.js +1 -1
- package/dist/cloudflare.d.ts +1 -1
- package/dist/cloudflare.js +1 -1
- package/dist/{config-BQKcPawI.d.ts → config-CDeGd0RB.d.ts} +1 -1
- package/dist/{config-BAgL2dtB.js → config-D1QENneP.js} +21 -21
- package/dist/durability.d.ts +1 -1
- package/dist/durability.js +2 -2
- package/dist/{error-diagnostics-CtKjGtGb.js → error-diagnostics-B5s9kNEA.js} +10 -6
- package/dist/{error-diagnostics-DSkCJC_L.js → error-diagnostics-CQ4BUqRe.js} +5 -1
- package/dist/{file-2pFYNtsU.js → file-CqG9zqiF.js} +1 -1
- package/dist/{files-BOo4SbwE.js → files-B6wpAhEx.js} +1 -1
- package/dist/files.d.ts +5 -5
- package/dist/files.js +4 -4
- package/dist/{github-CrYp4v8k.js → github-DKAlO0Vh.js} +3 -3
- package/dist/{glob-B8YGvTrZ.js → glob-BOqSKzSg.js} +1 -1
- package/dist/{host-BFBpXn0N.js → host-Bf1a2uo_.js} +4 -4
- package/dist/{hosted-vercel-blob-B3-wRdUm.js → hosted-vercel-blob-AbXG8fvR.js} +3 -3
- package/dist/hosted-vercel-blob.d.ts +1 -1
- package/dist/hosted-vercel-blob.js +1 -1
- package/dist/{hosted-KcUR_jPv.js → hosted-zG7HJaE4.js} +6 -6
- package/dist/hosted.d.ts +1 -1
- package/dist/hosted.js +1 -1
- package/dist/index.d.ts +12 -12
- package/dist/index.js +15 -15
- package/dist/{lifecycle-B-enk_4A.js → lifecycle-D8FdpBod.js} +4 -4
- package/dist/loader.d.ts +1 -1
- package/dist/loader.js +1 -1
- package/dist/{mcp-resources-DF0F5rcL.js → mcp-resources-DntxtmDU.js} +1 -1
- package/dist/{memory-BOexthyW.js → memory-D5jq9HZW.js} +1 -1
- package/dist/{metadata-target-CWz6KHKq.js → metadata-target-DDoOQNp1.js} +3 -3
- package/dist/{operation-definition-8gOe-ubD.d.ts → operation-definition-nmRu_O3V.d.ts} +5 -0
- package/dist/{operations-C6FpR8Rr.js → operations-D8uCpzhM.js} +4 -4
- package/dist/{operations-CE2drFih.js → operations-DsY2MQnG.js} +207 -141
- package/dist/operations.d.ts +2 -2
- package/dist/operations.js +1 -1
- package/dist/{path-AxMho1wo.d.ts → path-uxLkzrZm.d.ts} +1 -1
- package/dist/{plugins-C8C0auoW.d.ts → plugins-CsrXCA1Q.d.ts} +1 -1
- package/dist/{provider-9s4Ufkm5.js → provider-sm9uzkLg.js} +7 -6
- package/dist/providers/github/store.d.ts +1 -1
- package/dist/providers/github/store.js +1 -1
- package/dist/{registry-B3BBm4Ts.d.ts → registry-CFl1Htyc.d.ts} +1 -1
- package/dist/{registry-CYNN623b.d.ts → registry-CwryP59t.d.ts} +2 -2
- package/dist/{registry-CNphafBx.js → registry-DmVfUe4K.js} +2 -2
- package/dist/runtime/assets.d.ts +1 -1
- package/dist/runtime/empty-assets-registry.d.ts +1 -1
- package/dist/runtime/empty-registry.d.ts +2 -2
- package/dist/runtime/registry.d.ts +1 -1
- package/dist/runtime/state.d.ts +4 -4
- package/dist/runtime/state.js +6 -6
- package/dist/runtime/workspace.d.ts +1 -1
- package/dist/runtime/workspace.js +1 -1
- package/dist/runtime.d.ts +7 -7
- package/dist/runtime.js +13 -13
- package/dist/{server-8tGltlGz.js → server-Cd4-iCh5.js} +4 -4
- package/dist/server.d.ts +2 -2
- package/dist/server.js +1 -1
- package/dist/{shared-B3_EUk89.js → shared-ovXVSV3-.js} +9 -5
- package/dist/source-metadata.d.ts +2 -2
- package/dist/source-metadata.js +3 -3
- package/dist/{state-BISnUf1s.d.ts → state-C-YtsaiJ.d.ts} +4 -4
- package/dist/{state-DbrW-njQ.js → state-Cb_hIyAw.js} +4 -4
- package/dist/{store-ybhyD38Z.js → store-NZoRto-Y.js} +107 -7
- package/dist/{sync-CCD_VYC8.js → sync-CrT8zjwc.js} +3 -3
- package/dist/{target-jWhTdIuF.js → target-Dm9dHAVJ.js} +1 -1
- package/dist/test.d.ts +1 -1
- package/dist/test.js +1 -1
- package/dist/{types-BbtwmBZ5.d.ts → types-1Z-tKK3g.d.ts} +17 -2
- package/dist/{use-CSpT5W87.js → use-B0o5HoBl.js} +8 -8
- package/dist/{use-C6lV3-wC.d.ts → use-CjbF8EO9.d.ts} +1 -1
- package/dist/{utils-CgMZCHsX.js → utils-Dw-WULEZ.js} +10 -4
- package/dist/vite.d.ts +4 -2
- package/dist/vite.js +559 -354
- package/dist/{workspace-CYB2xZ1T.d.ts → workspace-CIXgHeyX.d.ts} +1 -1
- package/dist/{workspace-sPWn2Jxj.js → workspace-DvKu5PRa.js} +12 -12
- package/package.json +14 -14
|
@@ -1,144 +1,14 @@
|
|
|
1
1
|
import { t as workspaceCommitRequestBytes } from "./results-DgkZUmTL.js";
|
|
2
2
|
import { n as isRecordOrFunction, t as isRecord } from "./object-Da1zyPCR.js";
|
|
3
|
-
import { t as internalErrorDiagnostics } from "./error-diagnostics-
|
|
3
|
+
import { t as internalErrorDiagnostics } from "./error-diagnostics-CQ4BUqRe.js";
|
|
4
4
|
import { basename, dirname, join, parse, resolve } from "node:path";
|
|
5
|
-
import { readFileSync, realpathSync, statSync } from "node:fs";
|
|
5
|
+
import { mkdirSync, readFileSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
6
6
|
import "node:fs/promises";
|
|
7
7
|
import * as v from "valibot";
|
|
8
8
|
import { tmpdir } from "node:os";
|
|
9
9
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
10
10
|
import { createBirpc } from "birpc";
|
|
11
11
|
import { toJsonSchema } from "@valibot/to-json-schema";
|
|
12
|
-
//#region ../internal/src/build/vite.ts
|
|
13
|
-
const generatedViteHubFilesPattern = "**/.vitehub/**";
|
|
14
|
-
const projectRootDirectoryMarkers = [
|
|
15
|
-
["server", "agents"],
|
|
16
|
-
["server", "channels"],
|
|
17
|
-
["server", "connections"],
|
|
18
|
-
["server", "browsers"],
|
|
19
|
-
["server", "emails"],
|
|
20
|
-
["server", "schedules"],
|
|
21
|
-
["server", "workspaces"]
|
|
22
|
-
];
|
|
23
|
-
const projectRootFileMarkers = [
|
|
24
|
-
["package.json"],
|
|
25
|
-
["nuxt.config.ts"],
|
|
26
|
-
["nuxt.config.mts"],
|
|
27
|
-
["nuxt.config.js"],
|
|
28
|
-
["nuxt.config.mjs"]
|
|
29
|
-
];
|
|
30
|
-
const VITEHUB_ENV_PUBLIC_ID = "#vitehub/env/public";
|
|
31
|
-
const VITEHUB_ENV_SERVER_ID = "#vitehub/env/server";
|
|
32
|
-
const VITEHUB_ENV_DESCRIPTION_ID = "#vitehub/env/description";
|
|
33
|
-
function createNoExternalAddition(...packageNames) {
|
|
34
|
-
return (current) => {
|
|
35
|
-
if (current === true) return;
|
|
36
|
-
const values = Array.isArray(current) ? current : [current];
|
|
37
|
-
const missing = packageNames.filter((packageName) => !values.includes(packageName));
|
|
38
|
-
return missing.length ? missing : void 0;
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
function isServerEnvironment(name, config) {
|
|
42
|
-
return name === "ssr" || config.consumer === "server";
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Whether Node loads installed ViteHub packages directly in this environment, without Vite's SSR transform.
|
|
46
|
-
* This is the Nitro environment of `vite dev`. Generated Nitro plugins give these packages the registries and the
|
|
47
|
-
* `define` values that Vite gives to the code it transforms. Builds and other environments still inline the packages.
|
|
48
|
-
*/
|
|
49
|
-
function loadsViteHubPackagesNatively(name, env) {
|
|
50
|
-
return env.command === "serve" && name === "nitro";
|
|
51
|
-
}
|
|
52
|
-
const nativePackageDistFile = /\/node_modules\/@vite-hub\/(?:agent|connections|runtime|workspace)\/dist\/.+\.js$/;
|
|
53
|
-
/**
|
|
54
|
-
* Generated code imports the runtime files of its owner by path. Vite gives Node only bare package names, so in the
|
|
55
|
-
* Nitro environment of `vite dev` it would inline a second copy of a package that Node already loaded, with its own
|
|
56
|
-
* registries. This returns a module that lets Node load the file instead, so the app and the generated code share one
|
|
57
|
-
* instance. Use it as the `load` hook result for the file. It returns nothing for other files and environments.
|
|
58
|
-
*/
|
|
59
|
-
function loadNativePackageModule(id, environmentName, command) {
|
|
60
|
-
if (!environmentName || !loadsViteHubPackagesNatively(environmentName, { command })) return;
|
|
61
|
-
const file = id.startsWith("file:") ? fileURLToPath(id) : id;
|
|
62
|
-
if (!nativePackageDistFile.test(file.replace(/\\/g, "/"))) return;
|
|
63
|
-
const url = JSON.stringify(pathToFileURL(realpathSync(file)).href);
|
|
64
|
-
const hasDefault = /\bexport default\b|\bas default\b/.test(readFileSync(file, "utf8"));
|
|
65
|
-
const native = JSON.stringify(`data:text/javascript,${encodeURIComponent(`export * from ${url}${hasDefault ? `\nexport { default } from ${url}` : ""}`)}`);
|
|
66
|
-
return `export * from ${native}\n${hasDefault ? `export { default } from ${native}\n` : ""}`;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Server directories that ViteHub scans for Definitions. The first entry is the application.
|
|
70
|
-
* Later entries are Nuxt layers in Nuxt priority order.
|
|
71
|
-
*/
|
|
72
|
-
const VITEHUB_SERVER_DIRS = "__vitehubServerDirs";
|
|
73
|
-
function shouldSkipViteProviderBuild(command) {
|
|
74
|
-
return command === "serve";
|
|
75
|
-
}
|
|
76
|
-
function generatedViteHubWatchIgnoredAddition(ignored) {
|
|
77
|
-
return (Array.isArray(ignored) ? ignored : [ignored]).includes(generatedViteHubFilesPattern) ? void 0 : [generatedViteHubFilesPattern];
|
|
78
|
-
}
|
|
79
|
-
function resolveViteHubProjectRoot(root, options = {}) {
|
|
80
|
-
const resolvedRoot = resolve(root);
|
|
81
|
-
const temporaryRoot = resolve(tmpdir());
|
|
82
|
-
const sharedTemporaryRoot = dirname(temporaryRoot) === parse(temporaryRoot).root ? temporaryRoot : void 0;
|
|
83
|
-
if (options.projectRoot) return resolve(resolvedRoot, options.projectRoot);
|
|
84
|
-
if (basename(resolvedRoot) === "app") {
|
|
85
|
-
const parent = dirname(resolvedRoot);
|
|
86
|
-
if (parent !== sharedTemporaryRoot && (hasProjectRootDirectoryMarker(parent) || hasProjectRootFileMarker(parent, [
|
|
87
|
-
"nuxt.config.ts",
|
|
88
|
-
"nuxt.config.mts",
|
|
89
|
-
"nuxt.config.js",
|
|
90
|
-
"nuxt.config.mjs"
|
|
91
|
-
]))) return parent;
|
|
92
|
-
}
|
|
93
|
-
let current = resolvedRoot;
|
|
94
|
-
while (true) {
|
|
95
|
-
if (current === sharedTemporaryRoot && resolvedRoot !== current) return resolvedRoot;
|
|
96
|
-
if (hasProjectRootMarker(current)) return current;
|
|
97
|
-
const parent = dirname(current);
|
|
98
|
-
if (parent === current) return resolvedRoot;
|
|
99
|
-
current = parent;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
function hasProjectRootDirectoryMarker(root) {
|
|
103
|
-
for (const marker of projectRootDirectoryMarkers) try {
|
|
104
|
-
if (statSync(resolve(root, ...marker)).isDirectory()) return true;
|
|
105
|
-
} catch (error) {
|
|
106
|
-
if (error.code !== "ENOENT") throw error;
|
|
107
|
-
}
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
function hasProjectRootMarker(root) {
|
|
111
|
-
if (hasProjectRootDirectoryMarker(root)) return true;
|
|
112
|
-
return hasProjectRootFileMarker(root, projectRootFileMarkers.flat());
|
|
113
|
-
}
|
|
114
|
-
function hasProjectRootFileMarker(root, markers) {
|
|
115
|
-
for (const marker of markers) {
|
|
116
|
-
const path = Array.isArray(marker) ? marker : [marker];
|
|
117
|
-
try {
|
|
118
|
-
if (statSync(resolve(root, ...path)).isFile()) return true;
|
|
119
|
-
} catch (error) {
|
|
120
|
-
if (error.code !== "ENOENT") throw error;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return false;
|
|
124
|
-
}
|
|
125
|
-
function viteHubEnvPublicModulePath(root) {
|
|
126
|
-
return resolve(root, ".vitehub", "env", "public.mjs");
|
|
127
|
-
}
|
|
128
|
-
function viteHubEnvServerModulePath(root) {
|
|
129
|
-
return resolve(root, ".vitehub", "env", "server.mjs");
|
|
130
|
-
}
|
|
131
|
-
function viteHubEnvDescriptionModulePath(root) {
|
|
132
|
-
return resolve(root, ".vitehub", "env", "description.mjs");
|
|
133
|
-
}
|
|
134
|
-
function createViteHubEnvImportAliases(root) {
|
|
135
|
-
return {
|
|
136
|
-
[VITEHUB_ENV_PUBLIC_ID]: viteHubEnvPublicModulePath(root),
|
|
137
|
-
[VITEHUB_ENV_SERVER_ID]: viteHubEnvServerModulePath(root),
|
|
138
|
-
[VITEHUB_ENV_DESCRIPTION_ID]: viteHubEnvDescriptionModulePath(root)
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
//#endregion
|
|
142
12
|
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
143
13
|
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
144
14
|
function normalizeWindowsPath(input = "") {
|
|
@@ -304,9 +174,6 @@ function redactInspectionValue(value, key) {
|
|
|
304
174
|
}
|
|
305
175
|
return visit(value, key);
|
|
306
176
|
}
|
|
307
|
-
function resolveViteHubDevServerUrl(env) {
|
|
308
|
-
return env["VITEHUB_DEV_SERVER_URL"] || "http://localhost:5173";
|
|
309
|
-
}
|
|
310
177
|
function parseViteHubDevTimeout(value, error) {
|
|
311
178
|
if (!/^\d+$/.test(value)) throw error("--timeout must be an integer from 1 to 2147483647 milliseconds.");
|
|
312
179
|
const timeout = Number(value);
|
|
@@ -315,8 +182,8 @@ function parseViteHubDevTimeout(value, error) {
|
|
|
315
182
|
return timeout;
|
|
316
183
|
}
|
|
317
184
|
/**
|
|
318
|
-
* Reads one dev target option at `args[index]`: `--url <url>`, `--
|
|
319
|
-
* `--
|
|
185
|
+
* Reads one dev target option at `args[index]`: `--url <url>`, `--url=<url>`,
|
|
186
|
+
* `--timeout <ms>` or `--timeout=<ms>`. `--url` is always the app, and `--server` fails with the fix.
|
|
320
187
|
*
|
|
321
188
|
* Returns the number of extra arguments that the option used (`0` or `1`), or
|
|
322
189
|
* `undefined` when `args[index]` is not a dev target option.
|
|
@@ -329,7 +196,8 @@ function readViteHubDevTargetOption(args, index, target, errors) {
|
|
|
329
196
|
if (!value || value.startsWith("-")) throw errors.missingValue(`Missing value for ${arg}.`);
|
|
330
197
|
return value;
|
|
331
198
|
};
|
|
332
|
-
if (arg === "--
|
|
199
|
+
if (arg === "--server" || arg.startsWith("--server=")) throw errors.unknownOption("--server is now --url. Pass --url with the app URL, such as --url http://localhost:3000.");
|
|
200
|
+
if (arg === "--url") {
|
|
333
201
|
target.url = readValue();
|
|
334
202
|
return 1;
|
|
335
203
|
}
|
|
@@ -435,7 +303,8 @@ async function discoverViteHubDevServer(options) {
|
|
|
435
303
|
return;
|
|
436
304
|
}
|
|
437
305
|
if (!response.ok) {
|
|
438
|
-
|
|
306
|
+
const message = response.status >= 500 ? redactInspectionText((await response.text().catch(() => "")).trim()) : "";
|
|
307
|
+
options.stderr.write(message ? `The Vite Development Server at ${devServerDisplayUrl(options.serverUrl)} failed with HTTP ${response.status}: ${message}\n` : `No Compatible Vite Development Server found at ${devServerDisplayUrl(options.serverUrl)}.\n`);
|
|
439
308
|
return;
|
|
440
309
|
}
|
|
441
310
|
const payload = await response.json().catch(() => ({}));
|
|
@@ -460,6 +329,14 @@ async function discoverViteHubDevServer(options) {
|
|
|
460
329
|
}
|
|
461
330
|
/** File in the project root where the running dev server tells commands where it listens. */
|
|
462
331
|
const viteHubDevServerFile = ".vitehub/dev-server.json";
|
|
332
|
+
function writeViteHubDevServerFile(root, info) {
|
|
333
|
+
const file = join(root, viteHubDevServerFile);
|
|
334
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
335
|
+
writeFileSync(file, `${JSON.stringify(info)}\n`);
|
|
336
|
+
}
|
|
337
|
+
function removeViteHubDevServerFile(root) {
|
|
338
|
+
rmSync(join(root, viteHubDevServerFile), { force: true });
|
|
339
|
+
}
|
|
463
340
|
/** The dev server that runs in `root`, or undefined when there is no file or it is not valid. */
|
|
464
341
|
function readViteHubDevServerFile(root) {
|
|
465
342
|
try {
|
|
@@ -485,6 +362,195 @@ function findViteHubDevServerUrl(roots, env) {
|
|
|
485
362
|
}
|
|
486
363
|
return env["VITEHUB_DEV_SERVER_URL"] || void 0;
|
|
487
364
|
}
|
|
365
|
+
/**
|
|
366
|
+
* The dev server of the project, as {@link findViteHubDevServerUrl} finds it. Without one, it throws
|
|
367
|
+
* `INTERNAL_DEV_SERVER_NOT_FOUND` for `command`, such as `agent dev`, instead of guessing a port.
|
|
368
|
+
*/
|
|
369
|
+
function requireViteHubDevServerUrl(roots, env, command) {
|
|
370
|
+
const url = findViteHubDevServerUrl(roots, env);
|
|
371
|
+
if (!url) throw internalErrorDiagnostics.INTERNAL_DEV_SERVER_NOT_FOUND({ command });
|
|
372
|
+
return url;
|
|
373
|
+
}
|
|
374
|
+
//#endregion
|
|
375
|
+
//#region ../internal/src/build/vite.ts
|
|
376
|
+
const generatedViteHubFilesPattern = "**/.vitehub/**";
|
|
377
|
+
const projectRootDirectoryMarkers = [
|
|
378
|
+
["server", "agents"],
|
|
379
|
+
["server", "channels"],
|
|
380
|
+
["server", "connections"],
|
|
381
|
+
["server", "browsers"],
|
|
382
|
+
["server", "emails"],
|
|
383
|
+
["server", "schedules"],
|
|
384
|
+
["server", "workspaces"]
|
|
385
|
+
];
|
|
386
|
+
const projectRootFileMarkers = [
|
|
387
|
+
["package.json"],
|
|
388
|
+
["nuxt.config.ts"],
|
|
389
|
+
["nuxt.config.mts"],
|
|
390
|
+
["nuxt.config.js"],
|
|
391
|
+
["nuxt.config.mjs"]
|
|
392
|
+
];
|
|
393
|
+
const VITEHUB_ENV_PUBLIC_ID = "#vitehub/env/public";
|
|
394
|
+
const VITEHUB_ENV_SERVER_ID = "#vitehub/env/server";
|
|
395
|
+
const VITEHUB_ENV_DESCRIPTION_ID = "#vitehub/env/description";
|
|
396
|
+
function createNoExternalAddition(...packageNames) {
|
|
397
|
+
return (current) => {
|
|
398
|
+
if (current === true) return;
|
|
399
|
+
const values = Array.isArray(current) ? current : [current];
|
|
400
|
+
const missing = packageNames.filter((packageName) => !values.includes(packageName));
|
|
401
|
+
return missing.length ? missing : void 0;
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
function isServerEnvironment(name, config) {
|
|
405
|
+
return name === "ssr" || config.consumer === "server";
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Use one app's effective Nitro runner for both environment configuration and generated imports.
|
|
409
|
+
* `configureEnvironment` reads the runner after Nitro's `build:before` hooks and saves the decision for `load`.
|
|
410
|
+
*/
|
|
411
|
+
function createNativePackageLoading() {
|
|
412
|
+
let nitro;
|
|
413
|
+
let native = false;
|
|
414
|
+
return {
|
|
415
|
+
nitro: { setup(instance) {
|
|
416
|
+
nitro = instance;
|
|
417
|
+
} },
|
|
418
|
+
configureEnvironment(name, env) {
|
|
419
|
+
if (name !== "nitro") return false;
|
|
420
|
+
const runner = nitro?.options.devServer?.runner || process.env.NITRO_DEV_RUNNER || "node-worker";
|
|
421
|
+
native = env.command === "serve" && (runner === "node-worker" || runner === "node-process");
|
|
422
|
+
return native;
|
|
423
|
+
},
|
|
424
|
+
load(id, environmentName) {
|
|
425
|
+
if (environmentName === "nitro" && native) return loadNativePackageModule(id);
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
const nativePackageDistFile = /\/node_modules\/@vite-hub\/(?:agent|connections|runtime|workspace)\/dist\/.+\.js$/;
|
|
430
|
+
/**
|
|
431
|
+
* Generated code imports the runtime files of its owner by path. Vite gives Node only bare package names, so in the
|
|
432
|
+
* Nitro environment of `vite dev` it would inline a second copy of a package that Node already loaded, with its own
|
|
433
|
+
* registries. This returns a module that lets Node load the file instead, so the app and the generated code share one
|
|
434
|
+
* instance. Use it as the `load` hook result for the file. It returns nothing for other files and environments.
|
|
435
|
+
*/
|
|
436
|
+
function loadNativePackageModule(id) {
|
|
437
|
+
const file = id.startsWith("file:") ? fileURLToPath(id) : id;
|
|
438
|
+
if (!nativePackageDistFile.test(file.replace(/\\/g, "/"))) return;
|
|
439
|
+
const url = JSON.stringify(pathToFileURL(realpathSync(file)).href);
|
|
440
|
+
const hasDefault = /\bexport default\b|\bas default\b/.test(readFileSync(file, "utf8"));
|
|
441
|
+
const native = JSON.stringify(`data:text/javascript,${encodeURIComponent(`export * from ${url}${hasDefault ? `\nexport { default } from ${url}` : ""}`)}`);
|
|
442
|
+
return `export * from ${native}\n${hasDefault ? `export { default } from ${native}\n` : ""}`;
|
|
443
|
+
}
|
|
444
|
+
/**
|
|
445
|
+
* Server directories that ViteHub scans for Definitions. The first entry is the application.
|
|
446
|
+
* Later entries are Nuxt layers in Nuxt priority order.
|
|
447
|
+
*/
|
|
448
|
+
const VITEHUB_SERVER_DIRS = "__vitehubServerDirs";
|
|
449
|
+
/** Reports a Vite config hook call for a production build. `nuxt prepare` is not a build: it only writes types. */
|
|
450
|
+
function isProductionBuild(config, environment) {
|
|
451
|
+
return environment?.command === "build" && Reflect.get(config, "__vitehubPrepare") !== true;
|
|
452
|
+
}
|
|
453
|
+
function shouldSkipViteProviderBuild(command) {
|
|
454
|
+
return command === "serve";
|
|
455
|
+
}
|
|
456
|
+
function generatedViteHubWatchIgnoredAddition(ignored) {
|
|
457
|
+
return (Array.isArray(ignored) ? ignored : [ignored]).includes(generatedViteHubFilesPattern) ? void 0 : [generatedViteHubFilesPattern];
|
|
458
|
+
}
|
|
459
|
+
function resolveViteHubProjectRoot(root, options = {}) {
|
|
460
|
+
const resolvedRoot = resolve(root);
|
|
461
|
+
const temporaryRoot = resolve(tmpdir());
|
|
462
|
+
const sharedTemporaryRoot = dirname(temporaryRoot) === parse(temporaryRoot).root ? temporaryRoot : void 0;
|
|
463
|
+
if (options.projectRoot) return resolve(resolvedRoot, options.projectRoot);
|
|
464
|
+
if (basename(resolvedRoot) === "app") {
|
|
465
|
+
const parent = dirname(resolvedRoot);
|
|
466
|
+
if (parent !== sharedTemporaryRoot && (hasProjectRootDirectoryMarker(parent) || hasProjectRootFileMarker(parent, [
|
|
467
|
+
"nuxt.config.ts",
|
|
468
|
+
"nuxt.config.mts",
|
|
469
|
+
"nuxt.config.js",
|
|
470
|
+
"nuxt.config.mjs"
|
|
471
|
+
]))) return parent;
|
|
472
|
+
}
|
|
473
|
+
let current = resolvedRoot;
|
|
474
|
+
while (true) {
|
|
475
|
+
if (current === sharedTemporaryRoot && resolvedRoot !== current) return resolvedRoot;
|
|
476
|
+
if (hasProjectRootMarker(current)) return current;
|
|
477
|
+
const parent = dirname(current);
|
|
478
|
+
if (parent === current) return resolvedRoot;
|
|
479
|
+
current = parent;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
function hasProjectRootDirectoryMarker(root) {
|
|
483
|
+
for (const marker of projectRootDirectoryMarkers) try {
|
|
484
|
+
if (statSync(resolve(root, ...marker)).isDirectory()) return true;
|
|
485
|
+
} catch (error) {
|
|
486
|
+
if (error.code !== "ENOENT") throw error;
|
|
487
|
+
}
|
|
488
|
+
return false;
|
|
489
|
+
}
|
|
490
|
+
function hasProjectRootMarker(root) {
|
|
491
|
+
if (hasProjectRootDirectoryMarker(root)) return true;
|
|
492
|
+
return hasProjectRootFileMarker(root, projectRootFileMarkers.flat());
|
|
493
|
+
}
|
|
494
|
+
function hasProjectRootFileMarker(root, markers) {
|
|
495
|
+
for (const marker of markers) {
|
|
496
|
+
const path = Array.isArray(marker) ? marker : [marker];
|
|
497
|
+
try {
|
|
498
|
+
if (statSync(resolve(root, ...path)).isFile()) return true;
|
|
499
|
+
} catch (error) {
|
|
500
|
+
if (error.code !== "ENOENT") throw error;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
return false;
|
|
504
|
+
}
|
|
505
|
+
function viteHubEnvPublicModulePath(root) {
|
|
506
|
+
return resolve(root, ".vitehub", "env", "public.mjs");
|
|
507
|
+
}
|
|
508
|
+
function viteHubEnvServerModulePath(root) {
|
|
509
|
+
return resolve(root, ".vitehub", "env", "server.mjs");
|
|
510
|
+
}
|
|
511
|
+
function viteHubEnvDescriptionModulePath(root) {
|
|
512
|
+
return resolve(root, ".vitehub", "env", "description.mjs");
|
|
513
|
+
}
|
|
514
|
+
function createViteHubEnvImportAliases(root) {
|
|
515
|
+
return {
|
|
516
|
+
[VITEHUB_ENV_PUBLIC_ID]: viteHubEnvPublicModulePath(root),
|
|
517
|
+
[VITEHUB_ENV_SERVER_ID]: viteHubEnvServerModulePath(root),
|
|
518
|
+
[VITEHUB_ENV_DESCRIPTION_ID]: viteHubEnvDescriptionModulePath(root)
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
const publishedDevServers = /* @__PURE__ */ new WeakSet();
|
|
522
|
+
/**
|
|
523
|
+
* Tell `vitehub` commands where this dev server listens: `.vitehub/dev-server.json` in the project root, removed when
|
|
524
|
+
* the server closes. A host that runs Vite in middleware mode has no listening server and writes nothing.
|
|
525
|
+
*/
|
|
526
|
+
function publishViteHubDevServer(server) {
|
|
527
|
+
const http = server.httpServer;
|
|
528
|
+
if (!http || server.config.server.middlewareMode || publishedDevServers.has(http)) return;
|
|
529
|
+
publishedDevServers.add(http);
|
|
530
|
+
const root = resolve(server.config.root);
|
|
531
|
+
let publishedUrl;
|
|
532
|
+
const write = () => {
|
|
533
|
+
const address = http.address();
|
|
534
|
+
if (!address || typeof address === "string") return;
|
|
535
|
+
const host = address.address === "::" || address.address === "0.0.0.0" ? "localhost" : address.family === "IPv6" ? `[${address.address}]` : address.address;
|
|
536
|
+
const url = server.resolvedUrls?.local[0] ?? `${server.config.server.https ? "https" : "http"}://${host}:${address.port}${server.config.base}`;
|
|
537
|
+
try {
|
|
538
|
+
writeViteHubDevServerFile(root, {
|
|
539
|
+
root,
|
|
540
|
+
url
|
|
541
|
+
});
|
|
542
|
+
publishedUrl = url;
|
|
543
|
+
} catch {}
|
|
544
|
+
};
|
|
545
|
+
const remove = () => {
|
|
546
|
+
try {
|
|
547
|
+
if (publishedUrl && readViteHubDevServerFile(root)?.url === publishedUrl) removeViteHubDevServerFile(root);
|
|
548
|
+
} catch {}
|
|
549
|
+
};
|
|
550
|
+
if (http.listening) write();
|
|
551
|
+
else http.once("listening", write);
|
|
552
|
+
http.once("close", remove);
|
|
553
|
+
}
|
|
488
554
|
//#endregion
|
|
489
555
|
//#region ../internal/src/operation-rpc.ts
|
|
490
556
|
/** Path of the operation RPC under the app. Dev servers and deployed apps serve it the same way, one birpc call per POST. */
|
|
@@ -1009,7 +1075,7 @@ function table(rows) {
|
|
|
1009
1075
|
}
|
|
1010
1076
|
//#endregion
|
|
1011
1077
|
//#region src/operations.ts
|
|
1012
|
-
const runtime = () => import("./operations-
|
|
1078
|
+
const runtime = () => import("./operations-D8uCpzhM.js");
|
|
1013
1079
|
const name = v.pipe(v.string(), v.check((value) => value.trim() !== "", "Name a Workspace."));
|
|
1014
1080
|
const nonEmpty = (message) => v.pipe(v.string(), v.check((value) => value !== "", message));
|
|
1015
1081
|
function defineWorkspaceOperation(definition, kind = "read") {
|
|
@@ -1231,4 +1297,4 @@ const workspaceOperations = [
|
|
|
1231
1297
|
})
|
|
1232
1298
|
];
|
|
1233
1299
|
//#endregion
|
|
1234
|
-
export {
|
|
1300
|
+
export { resolve$1 as S, redactInspectionText as _, createNoExternalAddition as a, isAbsolute$1 as b, isProductionBuild as c, resolveViteHubProjectRoot as d, shouldSkipViteProviderBuild as f, requireViteHubDevServerUrl as g, readViteHubDevTargetOption as h, createNativePackageLoading as i, isServerEnvironment as l, fetchViteHubDevEndpoint as m, callOperationFromCli as n, createViteHubEnvImportAliases as o, discoverViteHubDevServer as p, VITEHUB_SERVER_DIRS as r, generatedViteHubWatchIgnoredAddition as s, workspaceOperations as t, publishViteHubDevServer as u, relativeDefinitionFile as v, relative$1 as x, dirname$1 as y };
|
package/dist/operations.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Mt as WorkspaceRevision } from "./types-1Z-tKK3g.js";
|
|
2
2
|
import { WorkspaceStaleFile } from "./lineage.js";
|
|
3
|
-
import { t as AnyOperation } from "./operation-definition-
|
|
3
|
+
import { t as AnyOperation } from "./operation-definition-nmRu_O3V.js";
|
|
4
4
|
//#region src/results.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* The largest `workspace.commit` request body: 4 MiB of JSON, with base64 for binary files. Vercel Functions accept
|
package/dist/operations.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as workspaceCommitRequestBytes } from "./results-DgkZUmTL.js";
|
|
2
|
-
import { t as workspaceOperations } from "./operations-
|
|
2
|
+
import { t as workspaceOperations } from "./operations-DsY2MQnG.js";
|
|
3
3
|
export { workspaceCommitRequestBytes, workspaceOperations };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dt as WorkspacePlugin } from "./types-1Z-tKK3g.js";
|
|
2
2
|
//#region src/core/plugins.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Add a plugin's rules and hooks to a Workspace by name, including discovered Workspaces the caller does not define.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as vitehubOwnedPrefix, t as createMemoryWorkspaceStore } from "./memory-
|
|
1
|
+
import { r as vitehubOwnedPrefix, t as createMemoryWorkspaceStore } from "./memory-D5jq9HZW.js";
|
|
2
2
|
import { n as assertWorkspaceDigest, o as workspaceConflictError, s as workspaceError } from "./path-DrSIenjj.js";
|
|
3
|
-
import { o as copyJsonFileMetadata, r as workspaceStoreTarget } from "./target-
|
|
3
|
+
import { o as copyJsonFileMetadata, r as workspaceStoreTarget } from "./target-Dm9dHAVJ.js";
|
|
4
4
|
import { a as isExcludedWorkspacePath, d as resolveInside, f as sha256, l as normalizeWorkspacePath, r as contentToBytes, t as contentStreamChunks } from "./path--wrT_Azm.js";
|
|
5
|
-
import { t as workspaceErrorDiagnostics } from "./error-diagnostics-
|
|
5
|
+
import { t as workspaceErrorDiagnostics } from "./error-diagnostics-B5s9kNEA.js";
|
|
6
6
|
import { t as createWorkspaceGlobMatcher } from "./glob-Cjxms1t7.js";
|
|
7
|
-
import {
|
|
8
|
-
import { t as createGitHubWorkspaceStore } from "./store-
|
|
7
|
+
import { M as readForgeEnv, j as forgeEnv, t as assertNoGitHubRepositoryKey } from "./shared-ovXVSV3-.js";
|
|
8
|
+
import { t as createGitHubWorkspaceStore } from "./store-NZoRto-Y.js";
|
|
9
9
|
import { t as getWorkspaceRuntimeConfig } from "./config-B-863EgC.js";
|
|
10
10
|
import { dirname, join, relative, resolve, sep } from "node:path";
|
|
11
11
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -1376,6 +1376,7 @@ function resolveVercelBlobWorkspaceStore(config = {}, env = process.env) {
|
|
|
1376
1376
|
};
|
|
1377
1377
|
}
|
|
1378
1378
|
function resolveGitHubWorkspaceStore(config = {}, env = process.env, input = {}) {
|
|
1379
|
+
assertNoGitHubRepositoryKey(config);
|
|
1379
1380
|
const branch = gitHubWorkspaceOption(config.branch) ?? readEnv(env, "VITEHUB_WORKSPACE_GITHUB_BRANCH");
|
|
1380
1381
|
const root = config.root === "" ? "" : gitHubWorkspaceOption(config.root) ?? readEnv(env, "VITEHUB_WORKSPACE_GITHUB_ROOT");
|
|
1381
1382
|
return {
|
|
@@ -1383,7 +1384,7 @@ function resolveGitHubWorkspaceStore(config = {}, env = process.env, input = {})
|
|
|
1383
1384
|
...config.database === void 0 ? {} : { database: config.database },
|
|
1384
1385
|
driver: "github",
|
|
1385
1386
|
...config.refs ? { refs: { ...config.refs } } : {},
|
|
1386
|
-
|
|
1387
|
+
repo: gitHubWorkspaceOption(config.repo) ?? readEnv(env, "VITEHUB_WORKSPACE_GITHUB_REPOSITORY"),
|
|
1387
1388
|
root: root ?? (input.runtime ? void 0 : ".vitehub/workspaces/<workspace>"),
|
|
1388
1389
|
token: input.runtime ? gitHubWorkspaceOption(config.token) ?? readForgeEnv(forgeEnv.github.token, env) ?? "********" : MASKED_WORKSPACE_RUNTIME_VALUE
|
|
1389
1390
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Sn as WorkspaceStore, s as GitHubWorkspaceStoreOptions } from "../../types-1Z-tKK3g.js";
|
|
2
2
|
//#region src/providers/github/store.d.ts
|
|
3
3
|
export declare function createGitHubWorkspaceStore(options: GitHubWorkspaceStoreOptions, workspaceName: string): WorkspaceStore;
|
|
4
4
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createGitHubWorkspaceStore } from "../../store-
|
|
1
|
+
import { t as createGitHubWorkspaceStore } from "../../store-NZoRto-Y.js";
|
|
2
2
|
export { createGitHubWorkspaceStore };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as WorkspaceDefinitionInput, v as ResolvedWorkspaceModuleOptions } from "./types-
|
|
1
|
+
import { L as WorkspaceDefinitionInput, v as ResolvedWorkspaceModuleOptions } from "./types-1Z-tKK3g.js";
|
|
2
2
|
//#region src/runtime/config.d.ts
|
|
3
3
|
declare function setWorkspaceRuntimeConfig(config: false | ResolvedWorkspaceModuleOptions): void;
|
|
4
4
|
declare function getWorkspaceRuntimeConfig(): false | ResolvedWorkspaceModuleOptions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as WorkspaceDefinition, L as WorkspaceDefinitionInput } from "./types-
|
|
2
|
-
import "./registry-
|
|
1
|
+
import { I as WorkspaceDefinition, L as WorkspaceDefinitionInput } from "./types-1Z-tKK3g.js";
|
|
2
|
+
import "./registry-CFl1Htyc.js";
|
|
3
3
|
//#region src/core/registry.d.ts
|
|
4
4
|
declare function registerWorkspace(name: string, definition: WorkspaceDefinitionInput): WorkspaceDefinition;
|
|
5
5
|
/** Replace one generated catalog's definitions without replacing application registrations. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as workspaceNotFoundError } from "./path-DrSIenjj.js";
|
|
2
|
-
import { t as workspaceErrorDiagnostics } from "./error-diagnostics-
|
|
3
|
-
import { t as createWorkspace } from "./workspace-
|
|
2
|
+
import { t as workspaceErrorDiagnostics } from "./error-diagnostics-B5s9kNEA.js";
|
|
3
|
+
import { t as createWorkspace } from "./workspace-DvKu5PRa.js";
|
|
4
4
|
import { setWorkspaceRuntimeRegistry, workspaceRuntimeRegistryState } from "./runtime/registry.js";
|
|
5
5
|
import { getViteHubErrorShape, isRuntimeDiagnostic } from "@vite-hub/runtime";
|
|
6
6
|
//#region src/core/registry.ts
|
package/dist/runtime/assets.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as WorkspaceAssets, N as WorkspaceContent } from "../types-
|
|
1
|
+
import { D as WorkspaceAssets, N as WorkspaceContent } from "../types-1Z-tKK3g.js";
|
|
2
2
|
//#region src/runtime/assets.d.ts
|
|
3
3
|
interface WorkspaceAssetFile {
|
|
4
4
|
load: () => Promise<WorkspaceContent>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as WorkspaceRegistry } from "../registry-
|
|
2
|
-
import "../registry-
|
|
1
|
+
import { t as WorkspaceRegistry } from "../registry-CFl1Htyc.js";
|
|
2
|
+
import "../registry-CwryP59t.js";
|
|
3
3
|
//#region src/runtime/empty-registry.d.ts
|
|
4
4
|
declare const registry: WorkspaceRegistry;
|
|
5
5
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as workspaceRuntimeRegistryState, i as setWorkspaceRuntimeRegistry, n as WorkspaceRegistryModule, r as resetWorkspaceRuntimeRegistry, s as setWorkspaceRuntimeConfig, t as WorkspaceRegistry } from "../registry-
|
|
1
|
+
import { a as workspaceRuntimeRegistryState, i as setWorkspaceRuntimeRegistry, n as WorkspaceRegistryModule, r as resetWorkspaceRuntimeRegistry, s as setWorkspaceRuntimeConfig, t as WorkspaceRegistry } from "../registry-CFl1Htyc.js";
|
|
2
2
|
export { WorkspaceRegistry, WorkspaceRegistryModule, resetWorkspaceRuntimeRegistry, setWorkspaceRuntimeConfig, setWorkspaceRuntimeRegistry, workspaceRuntimeRegistryState };
|
package/dist/runtime/state.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as WritableWorkspaceFiles, a as ReadonlyWorkspaceFiles, h as WritableWorkspaceFacade, i as ReadonlyWorkspaceFacade, s as UseWorkspaceOptions, x as useWorkspaceFiles } from "../use-
|
|
2
|
-
import { o as getWorkspaceRuntimeConfig, s as setWorkspaceRuntimeConfig } from "../registry-
|
|
3
|
-
import { n as resolveRegisteredWorkspaceDefinition, r as setWorkspaceRuntimeDefinitions, t as registerWorkspace } from "../registry-
|
|
4
|
-
import { c as resetWorkspaceStoreCache, l as useWorkspace, n as setWorkspaceRuntimeAssetsRegistry, o as getWorkspaceHostedStoreLoader, r as setWorkspaceRuntimeRegistry, s as setWorkspaceHostedStoreLoader, t as invalidateWorkspaceStore, u as setActiveCloudflareEnv } from "../state-
|
|
1
|
+
import { _ as WritableWorkspaceFiles, a as ReadonlyWorkspaceFiles, h as WritableWorkspaceFacade, i as ReadonlyWorkspaceFacade, s as UseWorkspaceOptions, x as useWorkspaceFiles } from "../use-CjbF8EO9.js";
|
|
2
|
+
import { o as getWorkspaceRuntimeConfig, s as setWorkspaceRuntimeConfig } from "../registry-CFl1Htyc.js";
|
|
3
|
+
import { n as resolveRegisteredWorkspaceDefinition, r as setWorkspaceRuntimeDefinitions, t as registerWorkspace } from "../registry-CwryP59t.js";
|
|
4
|
+
import { c as resetWorkspaceStoreCache, l as useWorkspace, n as setWorkspaceRuntimeAssetsRegistry, o as getWorkspaceHostedStoreLoader, r as setWorkspaceRuntimeRegistry, s as setWorkspaceHostedStoreLoader, t as invalidateWorkspaceStore, u as setActiveCloudflareEnv } from "../state-C-YtsaiJ.js";
|
|
5
5
|
export { type ReadonlyWorkspaceFacade, type ReadonlyWorkspaceFiles, type UseWorkspaceOptions, type WritableWorkspaceFacade, type WritableWorkspaceFiles, getWorkspaceHostedStoreLoader, getWorkspaceRuntimeConfig, invalidateWorkspaceStore, registerWorkspace, resetWorkspaceStoreCache, resolveRegisteredWorkspaceDefinition, setActiveCloudflareEnv, setWorkspaceHostedStoreLoader, setWorkspaceRuntimeAssetsRegistry, setWorkspaceRuntimeConfig, setWorkspaceRuntimeDefinitions, setWorkspaceRuntimeRegistry, useWorkspace, useWorkspaceFiles };
|
package/dist/runtime/state.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as setWorkspaceHostedStoreLoader, u as getWorkspaceHostedStoreLoader } from "../provider-
|
|
1
|
+
import { A as setActiveCloudflareEnv } from "../shared-ovXVSV3-.js";
|
|
2
|
+
import { d as setWorkspaceHostedStoreLoader, u as getWorkspaceHostedStoreLoader } from "../provider-sm9uzkLg.js";
|
|
3
3
|
import { n as setWorkspaceRuntimeConfig, t as getWorkspaceRuntimeConfig } from "../config-B-863EgC.js";
|
|
4
|
-
import { r as resetWorkspaceStoreCache } from "../workspace-
|
|
5
|
-
import { a as setWorkspaceRuntimeDefinitions, n as registerWorkspace, r as resolveRegisteredWorkspaceDefinition } from "../registry-
|
|
6
|
-
import { r as useWorkspaceFiles } from "../use-
|
|
7
|
-
import { i as useWorkspace, n as setWorkspaceRuntimeAssetsRegistry, r as setWorkspaceRuntimeRegistry, t as invalidateWorkspaceStore } from "../state-
|
|
4
|
+
import { r as resetWorkspaceStoreCache } from "../workspace-DvKu5PRa.js";
|
|
5
|
+
import { a as setWorkspaceRuntimeDefinitions, n as registerWorkspace, r as resolveRegisteredWorkspaceDefinition } from "../registry-DmVfUe4K.js";
|
|
6
|
+
import { r as useWorkspaceFiles } from "../use-B0o5HoBl.js";
|
|
7
|
+
import { i as useWorkspace, n as setWorkspaceRuntimeAssetsRegistry, r as setWorkspaceRuntimeRegistry, t as invalidateWorkspaceStore } from "../state-Cb_hIyAw.js";
|
|
8
8
|
export { getWorkspaceHostedStoreLoader, getWorkspaceRuntimeConfig, invalidateWorkspaceStore, registerWorkspace, resetWorkspaceStoreCache, resolveRegisteredWorkspaceDefinition, setActiveCloudflareEnv, setWorkspaceHostedStoreLoader, setWorkspaceRuntimeAssetsRegistry, setWorkspaceRuntimeConfig, setWorkspaceRuntimeDefinitions, setWorkspaceRuntimeRegistry, useWorkspace, useWorkspaceFiles };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createWorkspace } from "../workspace-
|
|
1
|
+
import { t as createWorkspace } from "../workspace-CIXgHeyX.js";
|
|
2
2
|
export { createWorkspace };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createWorkspace } from "../workspace-
|
|
1
|
+
import { t as createWorkspace } from "../workspace-DvKu5PRa.js";
|
|
2
2
|
export { createWorkspace };
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { B as WorkspaceEntry,
|
|
2
|
-
import { _ as WritableWorkspaceFiles, a as ReadonlyWorkspaceFiles, h as WritableWorkspaceFacade, i as ReadonlyWorkspaceFacade, o as ReadonlyWorkspaceFs, s as UseWorkspaceOptions, v as WritableWorkspaceFs, x as useWorkspaceFiles } from "./use-
|
|
3
|
-
import { t as registerWorkspacePlugin } from "./plugins-
|
|
4
|
-
import { o as getWorkspaceRuntimeConfig, s as setWorkspaceRuntimeConfig } from "./registry-
|
|
5
|
-
import { n as resolveRegisteredWorkspaceDefinition, r as setWorkspaceRuntimeDefinitions, t as registerWorkspace } from "./registry-
|
|
6
|
-
import { a as WorkspaceHostedStoreLoader, c as resetWorkspaceStoreCache, i as HostedWorkspaceStoreOptions, l as useWorkspace, n as setWorkspaceRuntimeAssetsRegistry, o as getWorkspaceHostedStoreLoader, r as setWorkspaceRuntimeRegistry, s as setWorkspaceHostedStoreLoader, t as invalidateWorkspaceStore } from "./state-
|
|
7
|
-
import { a as getWorkspaceSourceRequestDescriptor, i as workspaceSourceGrantPaths, n as normalizeWorkspaceSourceMetadata, o as isWorkspaceSourceRequestOnly, r as normalizeWorkspaceSourcesMetadata, s as workspaceSourceRequestDescriptorPath, t as WorkspaceSourceMetadata } from "./config-
|
|
1
|
+
import { B as WorkspaceEntry, Ct as WorkspaceName, I as WorkspaceDefinition, T as Workspace, an as WorkspaceSourceRequestExecutionResult, dn as WorkspaceSourceResolutionInvocation, gt as WorkspaceMaterializeSourcesResult, in as WorkspaceSourceRequestExecutionInput, qt as WorkspaceSource, rn as WorkspaceSourceRequestDescriptor, rt as WorkspaceHistoryReader, zt as WorkspaceSelectedScope } from "./types-1Z-tKK3g.js";
|
|
2
|
+
import { _ as WritableWorkspaceFiles, a as ReadonlyWorkspaceFiles, h as WritableWorkspaceFacade, i as ReadonlyWorkspaceFacade, o as ReadonlyWorkspaceFs, s as UseWorkspaceOptions, v as WritableWorkspaceFs, x as useWorkspaceFiles } from "./use-CjbF8EO9.js";
|
|
3
|
+
import { t as registerWorkspacePlugin } from "./plugins-CsrXCA1Q.js";
|
|
4
|
+
import { o as getWorkspaceRuntimeConfig, s as setWorkspaceRuntimeConfig } from "./registry-CFl1Htyc.js";
|
|
5
|
+
import { n as resolveRegisteredWorkspaceDefinition, r as setWorkspaceRuntimeDefinitions, t as registerWorkspace } from "./registry-CwryP59t.js";
|
|
6
|
+
import { a as WorkspaceHostedStoreLoader, c as resetWorkspaceStoreCache, i as HostedWorkspaceStoreOptions, l as useWorkspace, n as setWorkspaceRuntimeAssetsRegistry, o as getWorkspaceHostedStoreLoader, r as setWorkspaceRuntimeRegistry, s as setWorkspaceHostedStoreLoader, t as invalidateWorkspaceStore } from "./state-C-YtsaiJ.js";
|
|
7
|
+
import { a as getWorkspaceSourceRequestDescriptor, i as workspaceSourceGrantPaths, n as normalizeWorkspaceSourceMetadata, o as isWorkspaceSourceRequestOnly, r as normalizeWorkspaceSourcesMetadata, s as workspaceSourceRequestDescriptorPath, t as WorkspaceSourceMetadata } from "./config-CDeGd0RB.js";
|
|
8
8
|
//#region src/runtime/dependency-loaders.d.ts
|
|
9
9
|
interface WorkspaceDependencyRuntimeLoaders {
|
|
10
10
|
shellWorkspace: () => Promise<unknown>;
|