@nimbus-sh/worker 0.8.0 → 0.10.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/esbuild-wasm-bundle.generated.d.ts +24 -24
- package/dist/esbuild-wasm-bundle.generated.d.ts.map +1 -1
- package/dist/esbuild-wasm-bundle.generated.js +24 -24
- package/dist/facets/cirrus-real.js +3 -3
- package/dist/facets/compose.d.ts +3 -0
- package/dist/facets/compose.d.ts.map +1 -1
- package/dist/facets/compose.js +10 -3
- package/dist/facets/esbuild-bundle-pool.d.ts +1 -1
- package/dist/facets/esbuild-bundle-pool.js +3 -3
- package/dist/facets/esbuild-transform.d.ts +6 -2
- package/dist/facets/esbuild-transform.d.ts.map +1 -1
- package/dist/facets/esbuild-transform.js +8 -4
- package/dist/facets/manager.d.ts +54 -15
- package/dist/facets/manager.d.ts.map +1 -1
- package/dist/facets/manager.js +227 -144
- package/dist/facets/real-vite-hmr.d.ts +2 -0
- package/dist/facets/real-vite-hmr.d.ts.map +1 -1
- package/dist/facets/real-vite-hmr.js +3 -2
- package/dist/git/commands.d.ts +17 -1
- package/dist/git/commands.d.ts.map +1 -1
- package/dist/git/commands.js +73 -9
- package/dist/git/network-facet.d.ts +2 -0
- package/dist/git/network-facet.d.ts.map +1 -1
- package/dist/git/network-facet.js +10 -5
- package/dist/hosted/commands.d.ts.map +1 -1
- package/dist/hosted/commands.js +28 -39
- package/dist/hosted/runtime.d.ts +24 -2
- package/dist/hosted/runtime.d.ts.map +1 -1
- package/dist/hosted/runtime.js +70 -13
- package/dist/hosted/services.d.ts +14 -2
- package/dist/hosted/services.d.ts.map +1 -1
- package/dist/hosted/services.js +15 -2
- package/dist/loaders/generated-workers.d.ts +2 -2
- package/dist/loaders/generated-workers.d.ts.map +1 -1
- package/dist/loaders/generated-workers.js +4 -4
- package/dist/loaders/pre-bundle-preamble.d.ts +6 -3
- package/dist/loaders/pre-bundle-preamble.d.ts.map +1 -1
- package/dist/loaders/pre-bundle-preamble.js +13 -8
- package/dist/node-shims-artifact.generated.js +3 -3
- package/dist/npm/cache.d.ts +6 -1
- package/dist/npm/cache.d.ts.map +1 -1
- package/dist/npm/cache.js +8 -6
- package/dist/npm/install-batch-facet.d.ts +2 -0
- package/dist/npm/install-batch-facet.d.ts.map +1 -1
- package/dist/npm/install-batch-facet.js +29 -15
- package/dist/npm/installer.d.ts +8 -4
- package/dist/npm/installer.d.ts.map +1 -1
- package/dist/npm/installer.js +173 -113
- package/dist/npm/npx-install.d.ts +3 -1
- package/dist/npm/npx-install.d.ts.map +1 -1
- package/dist/npm/npx-install.js +4 -1
- package/dist/npm/placement.d.ts +16 -0
- package/dist/npm/placement.d.ts.map +1 -0
- package/dist/npm/placement.js +33 -0
- package/dist/npm/r2-cache.d.ts +10 -6
- package/dist/npm/r2-cache.d.ts.map +1 -1
- package/dist/npm/r2-cache.js +32 -16
- package/dist/npm/resolve-one-facet.d.ts +3 -0
- package/dist/npm/resolve-one-facet.d.ts.map +1 -1
- package/dist/npm/resolve-one-facet.js +1 -0
- package/dist/npm/resolver.d.ts +11 -6
- package/dist/npm/resolver.d.ts.map +1 -1
- package/dist/npm/resolver.js +12 -3
- package/dist/runtime/bash-repl.d.ts +5 -3
- package/dist/runtime/bash-repl.d.ts.map +1 -1
- package/dist/runtime/bash-repl.js +8 -3
- package/dist/runtime/cpython-resident.d.ts.map +1 -1
- package/dist/runtime/cpython-resident.js +2 -10
- package/dist/runtime/esbuild-wasm-bytes.d.ts +25 -18
- package/dist/runtime/esbuild-wasm-bytes.d.ts.map +1 -1
- package/dist/runtime/esbuild-wasm-bytes.js +55 -30
- package/dist/runtime/facet-loader-host.d.ts.map +1 -1
- package/dist/runtime/facet-loader-host.js +0 -9
- package/dist/runtime/node-shims.d.ts.map +1 -1
- package/dist/runtime/node-shims.js +853 -181
- package/dist/runtime/python-repl.d.ts +4 -3
- package/dist/runtime/python-repl.d.ts.map +1 -1
- package/dist/runtime/python-repl.js +10 -39
- package/dist/runtime/ruby-repl.d.ts +3 -2
- package/dist/runtime/ruby-repl.d.ts.map +1 -1
- package/dist/runtime/ruby-repl.js +7 -6
- package/dist/runtime/ruby-resident.d.ts.map +1 -1
- package/dist/runtime/ruby-resident.js +5 -16
- package/dist/runtime/runtime-catalog.js +1 -1
- package/dist/runtime/wasi/preamble.d.ts +0 -22
- package/dist/runtime/wasi/preamble.d.ts.map +1 -1
- package/dist/runtime/wasi/preamble.js +160 -1445
- package/dist/runtime-catalog.generated.js +1 -1
- package/dist/session/hibernation.d.ts +45 -2
- package/dist/session/hibernation.d.ts.map +1 -1
- package/dist/session/hibernation.js +78 -1
- package/dist/session/init.d.ts.map +1 -1
- package/dist/session/init.js +1 -0
- package/dist/session/nimbus-session.d.ts +16 -23
- package/dist/session/nimbus-session.d.ts.map +1 -1
- package/dist/session/nimbus-session.js +25 -36
- package/dist/session/npm-install-port.d.ts.map +1 -1
- package/dist/session/npm-install-port.js +1 -0
- package/dist/session/port-capability.d.ts.map +1 -1
- package/dist/session/port-capability.js +11 -1
- package/dist/session/programmatic.js +2 -2
- package/dist/session/routes.d.ts.map +1 -1
- package/dist/session/routes.js +4 -2
- package/dist/session/rpc.d.ts +7 -44
- package/dist/session/rpc.d.ts.map +1 -1
- package/dist/session/rpc.js +17 -67
- package/dist/session/supervisor-op.d.ts +8 -3
- package/dist/session/supervisor-op.d.ts.map +1 -1
- package/dist/session/supervisor-op.js +10 -45
- package/dist/session/supervisor-rpc.d.ts +47 -22
- package/dist/session/supervisor-rpc.d.ts.map +1 -1
- package/dist/session/supervisor-rpc.js +64 -26
- package/dist/vfs/facet-resident-store.d.ts.map +1 -1
- package/dist/vfs/facet-resident-store.js +4 -2
- package/dist/workspace-host.d.ts +2 -1
- package/dist/workspace-host.d.ts.map +1 -1
- package/dist/wrangler/nimbus-wrangler.d.ts.map +1 -1
- package/dist/wrangler/nimbus-wrangler.js +3 -0
- package/package.json +30 -4
- package/public/_assets/esbuild-0.24.2.js +2380 -0
- package/public/_assets/runtime/{node-shims-8f8c64edd2a1f0f5.js → node-shims-7b4dd7a76d95d21e.js} +852 -180
- package/scripts/bundle-esbuild-wasm.mjs +55 -39
- package/scripts/bundle-facet-workers.mjs +45 -7
- package/scripts/bundle-runtime.mjs +35 -8
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
* fs shim is streaming VFS events.
|
|
36
36
|
*/
|
|
37
37
|
import { WorkerEntrypoint } from 'cloudflare:workers';
|
|
38
|
+
import type { HostRoute } from '@nimbus-sh/fabric/composition.js';
|
|
38
39
|
/**
|
|
39
40
|
* Supervisor-side registry of active HMR connections for a single
|
|
40
41
|
* real-vite session. One instance lives on each NimbusSession that has
|
|
@@ -110,6 +111,7 @@ export declare function registerHmrBridge(doId: string, holder: {
|
|
|
110
111
|
*/
|
|
111
112
|
export declare class CirrusHmrRPC extends WorkerEntrypoint<object, {
|
|
112
113
|
doId?: string;
|
|
114
|
+
route?: HostRoute;
|
|
113
115
|
}> {
|
|
114
116
|
private _bridge;
|
|
115
117
|
private _stub;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"real-vite-hmr.d.ts","sourceRoot":"","sources":["../../src/facets/real-vite-hmr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AASH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"real-vite-hmr.d.ts","sourceRoot":"","sources":["../../src/facets/real-vite-hmr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AASH,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAalE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,SAAS;IACpB,2BAA2B;IAC3B,OAAO,CAAC,OAAO,CAAgC;IAC/C,k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D,YAAY,CAAC,SAAS,GAAE,MAAe,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;CAO/D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CA2HjD;AAED;;;;;;;GAOG;AACH,wBAAgB,8BAA8B,IAAI,MAAM,CA0EvD"}
|
|
@@ -233,9 +233,10 @@ export class CirrusHmrRPC extends WorkerEntrypoint {
|
|
|
233
233
|
return null;
|
|
234
234
|
let stub = null;
|
|
235
235
|
try {
|
|
236
|
-
const
|
|
236
|
+
const route = this.ctx.props?.route;
|
|
237
|
+
const binding = hostNamespaceBinding(this.env, 'CirrusHmrRPC', route);
|
|
237
238
|
stub = binding.get(binding.idFromString(doId));
|
|
238
|
-
return { stub, dispatch: hostOpDispatch(stub, 'CirrusHmrRPC') };
|
|
239
|
+
return { stub, dispatch: hostOpDispatch(stub, 'CirrusHmrRPC', route) };
|
|
239
240
|
}
|
|
240
241
|
catch (error) {
|
|
241
242
|
disposeRpcResource(stub);
|
package/dist/git/commands.d.ts
CHANGED
|
@@ -23,6 +23,20 @@ type Ctx = {
|
|
|
23
23
|
cwd: string;
|
|
24
24
|
env: Record<string, string>;
|
|
25
25
|
};
|
|
26
|
+
export interface ParsedGitGlobals {
|
|
27
|
+
sub: string | undefined;
|
|
28
|
+
subArgs: string[];
|
|
29
|
+
/** The directory the subcommand runs in, after every `-C`. */
|
|
30
|
+
dir: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The options git accepts BEFORE the subcommand. `-C <path>` runs the
|
|
34
|
+
* command as if started from <path>; repeated, each is relative to the
|
|
35
|
+
* previous (`git -C a -C b` runs in `a/b`). `--no-pager` and `-P` are
|
|
36
|
+
* accepted and mean nothing here, there is no pager. Any other leading
|
|
37
|
+
* option is refused: swallowing it would run the next word as a subcommand.
|
|
38
|
+
*/
|
|
39
|
+
export declare function parseGitGlobals(args: string[], cwd: string): ParsedGitGlobals;
|
|
26
40
|
export interface ParsedCloneArgs {
|
|
27
41
|
url: string | undefined;
|
|
28
42
|
dest: string | undefined;
|
|
@@ -30,8 +44,10 @@ export interface ParsedCloneArgs {
|
|
|
30
44
|
noShallow: boolean;
|
|
31
45
|
isBg: boolean;
|
|
32
46
|
branch: string | undefined;
|
|
47
|
+
/** `-q`/`--quiet`: no progress on stdout; errors still reach stderr. */
|
|
48
|
+
quiet: boolean;
|
|
33
49
|
}
|
|
34
|
-
export declare const CLONE_USAGE = "usage: git clone [--depth <n>] [--no-shallow] [--branch <name> | -b <name>] [--bg] <url> [dir]";
|
|
50
|
+
export declare const CLONE_USAGE = "usage: git clone [-q | --quiet] [--depth <n>] [--no-shallow] [--branch <name> | -b <name>] [--bg] <url> [dir]";
|
|
35
51
|
/**
|
|
36
52
|
* Every flag is either handled or refused loudly. Silently skipping unknown
|
|
37
53
|
* flags corrupted positionals for value-taking ones (`--branch dev URL`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/git/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAmB,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAkB,KAAK,OAAO,EAAE,MAAM,yCAAyC,CAAC;AA8JvF,KAAK,GAAG,GAAG;IACT,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,EAAE;QAAE,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACnC,MAAM,EAAE;QAAE,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7B,CAAC;
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":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,GAAG,eAAe,CAiD9D;AAWD;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,SAAS,EACd,KAAK,CAAC,EAAE,kBAAkB,EAC1B,KAAK,CAAC,EAAE,GAAG,GACV,OAAO,CAAC,MAAM,CAAC,CA8cjB"}
|
package/dist/git/commands.js
CHANGED
|
@@ -176,6 +176,42 @@ function createGitFs(vfs) {
|
|
|
176
176
|
function getDir(ctx) {
|
|
177
177
|
return '/' + (ctx.cwd || '/home/user').replace(/^\/+/, '');
|
|
178
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* The options git accepts BEFORE the subcommand. `-C <path>` runs the
|
|
181
|
+
* command as if started from <path>; repeated, each is relative to the
|
|
182
|
+
* previous (`git -C a -C b` runs in `a/b`). `--no-pager` and `-P` are
|
|
183
|
+
* accepted and mean nothing here, there is no pager. Any other leading
|
|
184
|
+
* option is refused: swallowing it would run the next word as a subcommand.
|
|
185
|
+
*/
|
|
186
|
+
export function parseGitGlobals(args, cwd) {
|
|
187
|
+
let dir = cwd;
|
|
188
|
+
let i = 0;
|
|
189
|
+
for (; i < args.length; i++) {
|
|
190
|
+
const arg = args[i];
|
|
191
|
+
if (arg === '-C') {
|
|
192
|
+
const path = args[++i];
|
|
193
|
+
if (path === undefined)
|
|
194
|
+
throw new Error("option '-C' requires a value");
|
|
195
|
+
dir = path.startsWith('/') ? path : dir + '/' + path;
|
|
196
|
+
dir = '/' + dir.split('/').filter((seg) => seg && seg !== '.').join('/');
|
|
197
|
+
}
|
|
198
|
+
else if (arg.startsWith('-C') && arg.length > 2) {
|
|
199
|
+
const path = arg.slice(2);
|
|
200
|
+
dir = path.startsWith('/') ? path : dir + '/' + path;
|
|
201
|
+
dir = '/' + dir.split('/').filter((seg) => seg && seg !== '.').join('/');
|
|
202
|
+
}
|
|
203
|
+
else if (arg === '--no-pager' || arg === '-P') {
|
|
204
|
+
// no pager to disable
|
|
205
|
+
}
|
|
206
|
+
else if (arg.startsWith('-') && arg !== '--version' && arg !== '-v' && arg !== '--help' && arg !== '-h') {
|
|
207
|
+
throw new Error(`unknown option '${arg}'\nusage: git [-C <path>] [--no-pager] <command> [<args>]`);
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return { sub: args[i], subArgs: args.slice(i + 1), dir };
|
|
214
|
+
}
|
|
179
215
|
function getFlag(args, flag) {
|
|
180
216
|
const idx = args.indexOf(flag);
|
|
181
217
|
if (idx >= 0)
|
|
@@ -183,7 +219,7 @@ function getFlag(args, flag) {
|
|
|
183
219
|
const prefix = `${flag}=`;
|
|
184
220
|
return args.find((arg) => arg.startsWith(prefix))?.slice(prefix.length) || undefined;
|
|
185
221
|
}
|
|
186
|
-
export const CLONE_USAGE = 'usage: git clone [--depth <n>] [--no-shallow] [--branch <name> | -b <name>] [--bg] <url> [dir]';
|
|
222
|
+
export const CLONE_USAGE = 'usage: git clone [-q | --quiet] [--depth <n>] [--no-shallow] [--branch <name> | -b <name>] [--bg] <url> [dir]';
|
|
187
223
|
/**
|
|
188
224
|
* Every flag is either handled or refused loudly. Silently skipping unknown
|
|
189
225
|
* flags corrupted positionals for value-taking ones (`--branch dev URL`
|
|
@@ -195,6 +231,7 @@ export function parseCloneArgs(args) {
|
|
|
195
231
|
let branch;
|
|
196
232
|
let noShallow = false;
|
|
197
233
|
let isBg = false;
|
|
234
|
+
let quiet = false;
|
|
198
235
|
const positionals = [];
|
|
199
236
|
for (let i = 0; i < args.length; i++) {
|
|
200
237
|
const arg = args[i];
|
|
@@ -217,6 +254,10 @@ export function parseCloneArgs(args) {
|
|
|
217
254
|
noShallow = true;
|
|
218
255
|
else if (arg === '--bg' || arg === '&')
|
|
219
256
|
isBg = true;
|
|
257
|
+
else if (arg === '-q' || arg === '--quiet')
|
|
258
|
+
quiet = true;
|
|
259
|
+
// Progress is already the default; there is no more of it to ask for.
|
|
260
|
+
else if (arg === '-v' || arg === '--verbose') { /* accepted */ }
|
|
220
261
|
else if (name === '--filter') {
|
|
221
262
|
throw new Error("clone does not support '--filter': the bundled isomorphic-git has no " +
|
|
222
263
|
'partial-clone support, so a filter would silently download every object. ' +
|
|
@@ -236,6 +277,7 @@ export function parseCloneArgs(args) {
|
|
|
236
277
|
noShallow,
|
|
237
278
|
isBg,
|
|
238
279
|
branch,
|
|
280
|
+
quiet,
|
|
239
281
|
};
|
|
240
282
|
}
|
|
241
283
|
function getAuthor(ctx) {
|
|
@@ -254,10 +296,18 @@ function getAuthor(ctx) {
|
|
|
254
296
|
export async function runGitCommand(ctx, vfs, doCtx, doEnv) {
|
|
255
297
|
const credentialedVfs = vfs.as(requireVfsCred(ctx.cred, 'git'));
|
|
256
298
|
const fs = createGitFs(credentialedVfs);
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
299
|
+
let globals;
|
|
300
|
+
try {
|
|
301
|
+
globals = parseGitGlobals(ctx.args, getDir(ctx));
|
|
302
|
+
}
|
|
303
|
+
catch (e) {
|
|
304
|
+
ctx.stderr.write(`git: ${e?.message}\n`);
|
|
305
|
+
return 129;
|
|
306
|
+
}
|
|
307
|
+
const { sub, subArgs, dir } = globals;
|
|
308
|
+
// Every subcommand below reads `dir` and the clone's `getDir(ctx)`; `-C`
|
|
309
|
+
// moves both, exactly as `git -C <path>` runs the command from <path>.
|
|
310
|
+
ctx = { ...ctx, cwd: dir };
|
|
261
311
|
if (sub === '--version' || sub === '-v') {
|
|
262
312
|
ctx.stdout.write('git version 2.44.0 (isomorphic-git/cf-git)\n');
|
|
263
313
|
return 0;
|
|
@@ -299,7 +349,8 @@ export async function runGitCommand(ctx, vfs, doCtx, doEnv) {
|
|
|
299
349
|
return 0;
|
|
300
350
|
}
|
|
301
351
|
case 'clone': {
|
|
302
|
-
const { url, dest: destArg, depth, isBg, branch } = parseCloneArgs(subArgs);
|
|
352
|
+
const { url, dest: destArg, depth, isBg, branch, quiet } = parseCloneArgs(subArgs);
|
|
353
|
+
const progress = quiet ? { write() { } } : ctx.stdout;
|
|
303
354
|
if (!url) {
|
|
304
355
|
ctx.stderr.write(CLONE_USAGE + '\n');
|
|
305
356
|
return 1;
|
|
@@ -322,7 +373,7 @@ export async function runGitCommand(ctx, vfs, doCtx, doEnv) {
|
|
|
322
373
|
ctx.stderr.write('[git] clone requires DO ctx + env (internal configuration error)\n');
|
|
323
374
|
return 1;
|
|
324
375
|
}
|
|
325
|
-
|
|
376
|
+
progress.write(`Cloning into '${dest}'...${depth ? ' (shallow, depth=' + depth + ')' : ''}\n`);
|
|
326
377
|
// A clone's closed-world filesystem view is correct only while no
|
|
327
378
|
// other session surface can mutate its destination subtree. Acquire
|
|
328
379
|
// the lease before the facet performs its lstat/readdir emptiness
|
|
@@ -342,6 +393,7 @@ export async function runGitCommand(ctx, vfs, doCtx, doEnv) {
|
|
|
342
393
|
url,
|
|
343
394
|
ref: branch,
|
|
344
395
|
depth,
|
|
396
|
+
quiet,
|
|
345
397
|
exclusiveDestination: true,
|
|
346
398
|
exclusiveMutationRoot: mutationLease.root,
|
|
347
399
|
mutationOwner: mutationLease.owner,
|
|
@@ -357,7 +409,7 @@ export async function runGitCommand(ctx, vfs, doCtx, doEnv) {
|
|
|
357
409
|
},
|
|
358
410
|
});
|
|
359
411
|
if (result.success) {
|
|
360
|
-
|
|
412
|
+
progress.write(`\n[git] clone complete (${result.filesWritten} files, ` +
|
|
361
413
|
`${(result.bytesWritten / 1024).toFixed(1)}KB in ${(result.elapsed / 1000).toFixed(1)}s)\n`);
|
|
362
414
|
}
|
|
363
415
|
else {
|
|
@@ -372,7 +424,7 @@ export async function runGitCommand(ctx, vfs, doCtx, doEnv) {
|
|
|
372
424
|
if (isBg) {
|
|
373
425
|
const task = doClone();
|
|
374
426
|
doCtx.waitUntil(task);
|
|
375
|
-
|
|
427
|
+
progress.write('[git] clone running in background...\n');
|
|
376
428
|
return 0;
|
|
377
429
|
}
|
|
378
430
|
else {
|
|
@@ -458,6 +510,18 @@ export async function runGitCommand(ctx, vfs, doCtx, doEnv) {
|
|
|
458
510
|
return 0;
|
|
459
511
|
}
|
|
460
512
|
case 'branch': {
|
|
513
|
+
if (subArgs[0] === '--show-current') {
|
|
514
|
+
// Empty output on a detached HEAD, like git.
|
|
515
|
+
const current = await git.currentBranch({ fs, dir });
|
|
516
|
+
if (current)
|
|
517
|
+
ctx.stdout.write(`${current}\n`);
|
|
518
|
+
return 0;
|
|
519
|
+
}
|
|
520
|
+
const unknown = subArgs.find((a) => a.startsWith('-') && !['-a', '--list', '-d', '-D'].includes(a));
|
|
521
|
+
if (unknown) {
|
|
522
|
+
ctx.stderr.write(`error: unknown option '${unknown}'\nusage: git branch [-a | --list | --show-current | -d <name> | -D <name> | <name>]\n`);
|
|
523
|
+
return 129;
|
|
524
|
+
}
|
|
461
525
|
if (subArgs.length === 0 || subArgs[0] === '-a' || subArgs[0] === '--list') {
|
|
462
526
|
const branches = await git.listBranches({ fs, dir });
|
|
463
527
|
const current = await git.currentBranch({ fs, dir });
|
|
@@ -33,6 +33,8 @@ export interface GitNetworkOpts {
|
|
|
33
33
|
dir: string;
|
|
34
34
|
/** For clone: repository URL */
|
|
35
35
|
url?: string;
|
|
36
|
+
/** `git clone -q`: no progress on the terminal; the result is unchanged. */
|
|
37
|
+
quiet?: boolean;
|
|
36
38
|
/** For fetch/pull: remote name (default "origin") */
|
|
37
39
|
remote?: string;
|
|
38
40
|
/** For clone: branch to clone (default remote HEAD); for pull: branch name (default current) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network-facet.d.ts","sourceRoot":"","sources":["../../src/git/network-facet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAcH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,YAAY,CAAC;IACjB,8EAA8E;IA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gB,CAAC,CAoU3B;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,OAAO,EACjB,IAAI,CAAC,EAAE,mBAAmB,GACzB,OAAO,CAuDT;AAED;;;;;;GAMG;AACH,wBAAgB,6BAA6B,IAAI,MAAM,CAEtD"}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* See docs/analysis in git-network-facet plan — the canonical write-up lives
|
|
25
25
|
* in the PR that introduced this file.
|
|
26
26
|
*/
|
|
27
|
-
import { getCtxExports } from '@nimbus-sh/fabric/composition.js';
|
|
27
|
+
import { getCtxExports, hostRoute } from '@nimbus-sh/fabric/composition.js';
|
|
28
28
|
import { CF_COMPAT_DATE } from '@nimbus-sh/core/constants.js';
|
|
29
29
|
import { MAX_RPC_SAFE_PAYLOAD_BYTES } from '@nimbus-sh/platform/limits.js';
|
|
30
30
|
import { GIT_BUNDLE_CODE } from '../git-bundle.generated.js';
|
|
@@ -407,7 +407,7 @@ export async function execGitNetwork(ctx, env, opts) {
|
|
|
407
407
|
const ctxExports = getCtxExports();
|
|
408
408
|
const supervisorBinding = ctxExports?.SupervisorRPC
|
|
409
409
|
? ctxExports.SupervisorRPC({
|
|
410
|
-
props: { doId: ctx.id.toString(), pid: opts.pid, mutationOwner },
|
|
410
|
+
props: { doId: ctx.id.toString(), pid: opts.pid, mutationOwner, route: hostRoute() ?? undefined },
|
|
411
411
|
})
|
|
412
412
|
: undefined;
|
|
413
413
|
if (!supervisorBinding) {
|
|
@@ -482,7 +482,8 @@ export async function execGitNetwork(ctx, env, opts) {
|
|
|
482
482
|
? prepare.result.error
|
|
483
483
|
: 'clone-prepare returned an invalid result', prepare.diagnostic);
|
|
484
484
|
}
|
|
485
|
-
|
|
485
|
+
if (!opts.quiet)
|
|
486
|
+
await writeClonePhaseProgress(supervisorBinding, prepare.diagnostic);
|
|
486
487
|
let checkoutCursor = null;
|
|
487
488
|
let checkoutChunk = 0;
|
|
488
489
|
do {
|
|
@@ -513,7 +514,9 @@ export async function execGitNetwork(ctx, env, opts) {
|
|
|
513
514
|
budgetContext.chunksCompleted++;
|
|
514
515
|
budgetContext.processedEntries += progress.treeEntriesVisited;
|
|
515
516
|
budgetContext.decodedBytes += progress.decodedBytes;
|
|
516
|
-
|
|
517
|
+
if (!opts.quiet) {
|
|
518
|
+
await writeCloneChunkProgress(supervisorBinding, checkout.diagnostic, checkoutChunk, progress);
|
|
519
|
+
}
|
|
517
520
|
} while (checkoutCursor !== null);
|
|
518
521
|
return {
|
|
519
522
|
success: true,
|
|
@@ -550,7 +553,8 @@ export async function execGitNetwork(ctx, env, opts) {
|
|
|
550
553
|
const abort = await invokeFacet(entrypoint, 'clone-abort', crypto.randomUUID(), { ...facetOpts, jobId, optionsHash }, Date.now() + CLONE_ABORT_TIMEOUT_MS, CLONE_ABORT_TIMEOUT_MS);
|
|
551
554
|
phases.push(abort.diagnostic);
|
|
552
555
|
accountResult(abort.result);
|
|
553
|
-
|
|
556
|
+
if (!opts.quiet)
|
|
557
|
+
await writeClonePhaseProgress(supervisorBinding, abort.diagnostic);
|
|
554
558
|
if (abort.result.success !== true) {
|
|
555
559
|
cleanupError = typeof abort.result.error === 'string'
|
|
556
560
|
? abort.result.error
|
|
@@ -2185,6 +2189,7 @@ export default {
|
|
|
2185
2189
|
}
|
|
2186
2190
|
}
|
|
2187
2191
|
const log = (msg) => {
|
|
2192
|
+
if (opts.quiet) return;
|
|
2188
2193
|
stats.supervisorRpc.stdout++;
|
|
2189
2194
|
try { useRpcResult(supervisor.stdout(new TextEncoder().encode(msg)), () => undefined).catch(() => {}); } catch {}
|
|
2190
2195
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/hosted/commands.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../src/hosted/commands.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAuB5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAG9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGvE,oFAAoF;AACpF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,eAAe,EACnD,oBAAoB,GAAG,gBAAgB,GAAG,cAAc,GAAG,eAAe,GAAG,YAAY,GAAG,oBAAoB,GAAG,oBAAoB,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,cAAc,GAAG,cAAc,GAAG,WAAW,GAAG,iBAAiB,GAAG,UAAU,GAAG,cAAc,GAAG,eAAe,GAAG,0BAA0B,CAClV,GAAG;IACF,QAAQ,CAAC,GAAG,EAAE,kBAAkB,CAAC;IACjC,QAAQ,CAAC,GAAG,EAAE,iBAAiB,CAAC;IAChC,aAAa,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;IAChD,sBAAsB,EAAE,eAAe,CAAC,wBAAwB,CAAC,CAAC;CACnE,CAAC;AAEF,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,kBAAkB,EAAE,SAAS,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA8qDhH"}
|
package/dist/hosted/commands.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Shell, createCurlCommand, createNpmCommand, NPM_VERSION, createTopCommand, createWatchCommand, createHelpCommand, rehydrateGlobalPackages } from '@nimbus-sh/core/substrate/lifo/index.js';
|
|
2
2
|
import { createKillCommand } from '@nimbus-sh/core/substrate/lifo/commands/system/kill.js';
|
|
3
3
|
import { textSink } from '@nimbus-sh/core/_shared/bytes.js';
|
|
4
|
-
import { CRED_KERNEL, requireVfsCred } from '@nimbus-sh/core/runtime/os-contracts.js';
|
|
4
|
+
import { BASH_RUNNER, CRED_KERNEL, requireVfsCred } from '@nimbus-sh/core/runtime/os-contracts.js';
|
|
5
|
+
import { ExecutionFs } from '@nimbus-sh/core/shell/execution-fs.js';
|
|
5
6
|
import { EsbuildService } from '@nimbus-sh/core/runtime/esbuild-service.js';
|
|
6
7
|
import { runFresh } from '../runtime/node-runner.js';
|
|
7
8
|
import { runBunScript, BUN_VERSION } from '../runtime/bun-runner.js';
|
|
@@ -45,7 +46,7 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
45
46
|
});
|
|
46
47
|
self._setCpRegistry(registry);
|
|
47
48
|
registry.register('chsh', makeChshCommand({
|
|
48
|
-
isBashInstalled: (home) => listInstalledRuntimes(sqliteFs, home).some((runtime) => runtime.name === 'bash'),
|
|
49
|
+
isBashInstalled: async (home) => (await listInstalledRuntimes(sqliteFs, home)).some((runtime) => runtime.name === 'bash'),
|
|
49
50
|
}));
|
|
50
51
|
// ── Git integration (isomorphic-git) ──
|
|
51
52
|
// ctx + env are passed for clone/fetch/pull which run in a facet to avoid
|
|
@@ -67,7 +68,7 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
67
68
|
workspace.runtimes.registerRunner('clang-runner', (manifest, installRoot, binName, binKind) => async (ctx) => {
|
|
68
69
|
const { makeClangRunnerFactory } = await import('@nimbus-sh/core/runtime/clang-runner.js');
|
|
69
70
|
const { facetHostForManager } = await import('../runtime/facet-loader-host.js');
|
|
70
|
-
return await makeClangRunnerFactory({ facets: facetHostForManager(facetMgr),
|
|
71
|
+
return await makeClangRunnerFactory({ facets: facetHostForManager(facetMgr), filesystem: workspace.filesystem })(manifest, installRoot, binName, binKind)(ctx);
|
|
71
72
|
});
|
|
72
73
|
// Pyodide v1 — Python 3.13 via the same R2-package-manager
|
|
73
74
|
// substrate that ships clang. Manifest entrypoints `python` and
|
|
@@ -88,7 +89,7 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
88
89
|
const { runPythonRepl } = await import('../runtime/python-repl.js');
|
|
89
90
|
return await runPythonRepl({
|
|
90
91
|
facetMgr,
|
|
91
|
-
|
|
92
|
+
authority: workspace.filesystem,
|
|
92
93
|
terminal: terminal,
|
|
93
94
|
installRoot,
|
|
94
95
|
manifest,
|
|
@@ -108,7 +109,6 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
108
109
|
const { cpythonResidentStart } = await import('../runtime/cpython-resident.js');
|
|
109
110
|
return await makeCPythonRunnerFactory({
|
|
110
111
|
facets: facetHostForManager(facetMgr),
|
|
111
|
-
vfs: sqliteFs,
|
|
112
112
|
startResident: cpythonResidentStart(facetMgr),
|
|
113
113
|
})(manifest, installRoot, binName, binKind)(ctx);
|
|
114
114
|
});
|
|
@@ -127,7 +127,7 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
127
127
|
const { runRubyRepl } = await import('../runtime/ruby-repl.js');
|
|
128
128
|
return await runRubyRepl({
|
|
129
129
|
facetMgr,
|
|
130
|
-
|
|
130
|
+
authority: workspace.filesystem,
|
|
131
131
|
terminal: terminal,
|
|
132
132
|
installRoot,
|
|
133
133
|
});
|
|
@@ -135,19 +135,20 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
135
135
|
const { makeRubyRunnerFactory } = await import('@nimbus-sh/core/runtime/ruby-runner.js');
|
|
136
136
|
const { facetHostForManager } = await import('../runtime/facet-loader-host.js');
|
|
137
137
|
const { rubyResidentStart } = await import('../runtime/ruby-resident.js');
|
|
138
|
-
|
|
138
|
+
const runner = await makeRubyRunnerFactory({
|
|
139
139
|
facets: facetHostForManager(facetMgr),
|
|
140
|
-
|
|
140
|
+
filesystem: workspace.filesystem,
|
|
141
141
|
registry,
|
|
142
142
|
startResident: rubyResidentStart(facetMgr),
|
|
143
|
-
})(manifest, installRoot, binName, binKind)
|
|
143
|
+
})(manifest, installRoot, binName, binKind);
|
|
144
|
+
return runner(ctx);
|
|
144
145
|
});
|
|
145
146
|
// GNU bash 5.2.37 (wasm32-wasi, asyncified) — dedicated facet
|
|
146
147
|
// runner driving the fork/pipe/exec/setjmp scheduler (fork M1-M3
|
|
147
148
|
// mechanisms). Interactive terminal invocations use the shared
|
|
148
149
|
// ReplSession line editor; -c, scripts, and piped stdin retain the
|
|
149
150
|
// canonical one-shot handler.
|
|
150
|
-
workspace.runtimes.registerRunner(
|
|
151
|
+
workspace.runtimes.registerRunner(BASH_RUNNER, (manifest, installRoot, binName, binKind) => async (ctx) => {
|
|
151
152
|
const argv = ctx.args || [];
|
|
152
153
|
const explicitInteractive = argv.includes('-i');
|
|
153
154
|
const terminalStdin = ctx.isFdTerminal?.(0) ?? !ctx.stdin;
|
|
@@ -155,11 +156,13 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
155
156
|
const { runBashRepl } = await import('../runtime/bash-repl.js');
|
|
156
157
|
return await runBashRepl({
|
|
157
158
|
facetMgr,
|
|
158
|
-
|
|
159
|
+
authority: workspace.filesystem,
|
|
159
160
|
terminal: terminal,
|
|
160
161
|
installRoot,
|
|
161
162
|
manifest,
|
|
162
163
|
cred: ctx.cred,
|
|
164
|
+
pid: ctx.pid,
|
|
165
|
+
filesystem: workspace.filesystem.bind({ pid: ctx.pid, cred: ctx.cred, signal: ctx.signal }),
|
|
163
166
|
env: ctx.env,
|
|
164
167
|
cwd: ctx.cwd || '/home/user',
|
|
165
168
|
shell: shell ?? undefined,
|
|
@@ -167,7 +170,7 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
167
170
|
}
|
|
168
171
|
const { makeBashRunnerFactory } = await import('@nimbus-sh/core/runtime/bash-runner.js');
|
|
169
172
|
const { facetHostForManager } = await import('../runtime/facet-loader-host.js');
|
|
170
|
-
return await makeBashRunnerFactory({ facets: facetHostForManager(facetMgr),
|
|
173
|
+
return await makeBashRunnerFactory({ facets: facetHostForManager(facetMgr), filesystem: workspace.filesystem })(manifest, installRoot, binName, binKind)(ctx);
|
|
171
174
|
});
|
|
172
175
|
{
|
|
173
176
|
// Cast registry to the minimal package-manager shape. CommandRegistry
|
|
@@ -198,24 +201,16 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
198
201
|
const stderr = { write: (s) => { stderrText.push(String(s)); } };
|
|
199
202
|
const py = await registry.resolve('python');
|
|
200
203
|
if (py) {
|
|
201
|
-
const pid =
|
|
202
|
-
const
|
|
203
|
-
const runAs = 'runAs' in ctx ? ctx.runAs : undefined;
|
|
204
|
-
if (typeof pid !== 'number'
|
|
205
|
-
|| typeof setUmask !== 'function'
|
|
206
|
-
|| typeof runAs !== 'function'
|
|
207
|
-
|| kernel === null) {
|
|
208
|
-
throw new Error('python warm-up requires a process identity');
|
|
209
|
-
}
|
|
210
|
-
const cred = requireVfsCred('cred' in ctx ? ctx.cred : undefined, 'python warm-up');
|
|
204
|
+
const pid = ctx.pid;
|
|
205
|
+
const cred = requireVfsCred(ctx.cred, 'python warm-up');
|
|
211
206
|
const code = await py({
|
|
212
207
|
...ctx,
|
|
213
208
|
args: ['-c', 'pass'],
|
|
214
209
|
pid,
|
|
215
210
|
cred,
|
|
216
|
-
setUmask: (mask) => setUmask(mask),
|
|
217
|
-
runAs: (targetCred, argv) => runAs(targetCred, argv),
|
|
218
|
-
vfs:
|
|
211
|
+
setUmask: (mask) => ctx.setUmask(mask),
|
|
212
|
+
runAs: (targetCred, argv) => ctx.runAs(targetCred, argv),
|
|
213
|
+
vfs: new ExecutionFs(workspace.filesystem.bind({ pid, cred })),
|
|
219
214
|
signal: new AbortController().signal,
|
|
220
215
|
stdout,
|
|
221
216
|
stderr,
|
|
@@ -227,7 +222,7 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
227
222
|
const { warmPythonRepl } = await import('../runtime/python-repl.js');
|
|
228
223
|
await warmPythonRepl({
|
|
229
224
|
facetMgr,
|
|
230
|
-
|
|
225
|
+
authority: workspace.filesystem,
|
|
231
226
|
installRoot: target.root,
|
|
232
227
|
manifest: target.manifest,
|
|
233
228
|
});
|
|
@@ -284,7 +279,6 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
284
279
|
};
|
|
285
280
|
{
|
|
286
281
|
const oneShotNode = buildRuntimeHandler(nodeSpec, {
|
|
287
|
-
vfs: sqliteFs,
|
|
288
282
|
getEsbuild: () => {
|
|
289
283
|
if (!self.esbuildService) {
|
|
290
284
|
self.ensureSqliteFs();
|
|
@@ -418,9 +412,9 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
418
412
|
return 1;
|
|
419
413
|
}
|
|
420
414
|
}
|
|
421
|
-
const resolved = resolveRuntimeScriptPath(kernelFs, cwd, target, {
|
|
415
|
+
const resolved = (await resolveRuntimeScriptPath(kernelFs, cwd, target, {
|
|
422
416
|
preferModuleField: true,
|
|
423
|
-
});
|
|
417
|
+
}));
|
|
424
418
|
if (resolved === null) {
|
|
425
419
|
ctx.stderr.write(pathShaped
|
|
426
420
|
? `error: Module not found "${target}"\n`
|
|
@@ -433,7 +427,6 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
433
427
|
};
|
|
434
428
|
{
|
|
435
429
|
const oneShotBun = buildRuntimeHandler(bunSpec, {
|
|
436
|
-
vfs: sqliteFs,
|
|
437
430
|
getEsbuild: () => {
|
|
438
431
|
if (!self.esbuildService) {
|
|
439
432
|
self.ensureSqliteFs();
|
|
@@ -473,15 +466,11 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
473
466
|
const { wasmRunnerSpec } = await import('@nimbus-sh/core/runtime/wasm-runner.js');
|
|
474
467
|
const { loaderFacetHost } = await import('../runtime/facet-loader-host.js');
|
|
475
468
|
const wasmSpec = wasmRunnerSpec({
|
|
476
|
-
|
|
477
|
-
// wasm-runner snapshots a session subtree into the facet, flushes
|
|
478
|
-
// the diff back via this surface after _start returns.
|
|
479
|
-
vfs: sqliteFs,
|
|
469
|
+
filesystem: workspace.filesystem,
|
|
480
470
|
facets: loaderFacetHost(self.env, self.ctx),
|
|
481
471
|
processes: self.processes,
|
|
482
472
|
});
|
|
483
473
|
wasmHandler = buildRuntimeHandler(wasmSpec, {
|
|
484
|
-
vfs: sqliteFs,
|
|
485
474
|
getEsbuild: () => {
|
|
486
475
|
if (!self.esbuildService) {
|
|
487
476
|
self.ensureSqliteFs();
|
|
@@ -832,7 +821,7 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
832
821
|
await self.ensureNpmInstaller((msg) => {
|
|
833
822
|
ctx.stdout.write('[npm] ' + msg + '\n');
|
|
834
823
|
});
|
|
835
|
-
const result = await self.npmInstaller.install(cwd, { packages, pid: ctx.pid });
|
|
824
|
+
const result = await self.npmInstaller.install(cwd, { packages, pid: ctx.pid, registry: ctx.env?.NPM_REGISTRY });
|
|
836
825
|
if (result.failed.length > 0) {
|
|
837
826
|
ctx.stderr.write('\x1b[31mFailed: ' + result.failed.join(', ') + '\x1b[0m\n');
|
|
838
827
|
}
|
|
@@ -896,7 +885,7 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
896
885
|
try {
|
|
897
886
|
const identity = commandIdentityFor(childProcess.pid);
|
|
898
887
|
const terminal = new HeadlessTerminal();
|
|
899
|
-
const childShell = new Shell(terminal,
|
|
888
|
+
const childShell = new Shell(terminal, workspace.filesystem, registry, { ...env, ...(options?.env || {}) }, processRegistry, identity);
|
|
900
889
|
HeredocHandler.install(childShell, terminal);
|
|
901
890
|
if (options?.cwd)
|
|
902
891
|
childShell.setCwd(options.cwd);
|
|
@@ -918,7 +907,7 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
918
907
|
}
|
|
919
908
|
},
|
|
920
909
|
};
|
|
921
|
-
registerShellEntrypointCommands(registry, shellEntrypointExecutor
|
|
910
|
+
registerShellEntrypointCommands(registry, shellEntrypointExecutor);
|
|
922
911
|
// Shell scripts that execute through the local shell still need the same
|
|
923
912
|
// process-table and log-store contract as facet-backed processes.
|
|
924
913
|
const shellExecuteTracked = async (cmd, cmdCtx, opts = {}) => {
|
|
@@ -1385,7 +1374,7 @@ export async function registerHostedCommands(self, workspace) {
|
|
|
1385
1374
|
await self.ensureNpmInstaller((msg) => ctx.stdout.write('[npm] ' + msg + '\n'));
|
|
1386
1375
|
self.ensureSqliteFs();
|
|
1387
1376
|
const installer = self.npmInstaller;
|
|
1388
|
-
const resolveResult = await resolveNpxBinary(installer, sqliteFs.as(requireVfsCred(
|
|
1377
|
+
const resolveResult = await resolveNpxBinary(installer, sqliteFs.as(requireVfsCred(ctx.cred, 'npx')), ctx.cwd || '/home/user', npxArgs, (msg) => ctx.stdout.write(msg + '\n'), ctx.pid, ctx.env?.NPM_REGISTRY);
|
|
1389
1378
|
if (resolveResult.ok && resolveResult.binPath) {
|
|
1390
1379
|
const nodeCmd = await registry.resolve('node');
|
|
1391
1380
|
if (nodeCmd) {
|
package/dist/hosted/runtime.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import type { ProcessLogReadOptions } from '@nimbus-sh/core/runtime/process-logs
|
|
|
4
4
|
import type { VfsCred } from '@nimbus-sh/core/runtime/os-contracts.js';
|
|
5
5
|
import type { SandboxFs } from '@nimbus-sh/core/substrate/lifo/sandbox/types.js';
|
|
6
6
|
import { type SupervisorOpEnvelope } from '@nimbus-sh/core/workspace/supervisor-op.js';
|
|
7
|
+
import type { ComposedFacetManager, FacetManagerHostHooks } from '../facets/compose.js';
|
|
7
8
|
import { WebSocketTerminal } from '../facets/ws-terminal.js';
|
|
8
9
|
import * as operations from '../session/programmatic.js';
|
|
9
10
|
import * as services from './services.js';
|
|
@@ -25,6 +26,7 @@ export interface HostedRuntimeOptions {
|
|
|
25
26
|
env: services.HostedRuntimeEnv;
|
|
26
27
|
ports: PortRegistry;
|
|
27
28
|
lifecycle: HostedRuntimeLifecycle;
|
|
29
|
+
resolveWorkerLaunch?: FacetManagerHostHooks['resolveWorkerLaunch'];
|
|
28
30
|
basePath?: string;
|
|
29
31
|
origin?: string;
|
|
30
32
|
}
|
|
@@ -36,6 +38,7 @@ export declare function composeHostedRuntime(options: HostedRuntimeOptions): Pro
|
|
|
36
38
|
terminal: WebSocketTerminal;
|
|
37
39
|
files: RuntimeFiles;
|
|
38
40
|
runtimes: import("@nimbus-sh/core/runtime/runtime-manager.js").RuntimeManager;
|
|
41
|
+
facets: () => ComposedFacetManager;
|
|
39
42
|
ready: (options?: operations.ProgrammaticReadyOptions | undefined) => Promise<{
|
|
40
43
|
ok: true;
|
|
41
44
|
preinstalled: string[];
|
|
@@ -80,6 +83,25 @@ export declare function composeHostedRuntime(options: HostedRuntimeOptions): Pro
|
|
|
80
83
|
}>;
|
|
81
84
|
listPorts: () => Promise<operations.SerializedPort[]>;
|
|
82
85
|
listApps: () => Promise<operations.ListedApp[]>;
|
|
86
|
+
ensureDurableApp: (input: {
|
|
87
|
+
owner: string;
|
|
88
|
+
preferredPort?: number;
|
|
89
|
+
visibility?: "scoped" | "public";
|
|
90
|
+
name?: string;
|
|
91
|
+
}) => Promise<{
|
|
92
|
+
port: number;
|
|
93
|
+
capability: string | null;
|
|
94
|
+
visibility: "scoped" | "public";
|
|
95
|
+
}>;
|
|
96
|
+
unexposePort: (port: number) => Promise<{
|
|
97
|
+
port: number;
|
|
98
|
+
ok: boolean;
|
|
99
|
+
}>;
|
|
100
|
+
removeDurableApp: (owner: string) => Promise<{
|
|
101
|
+
owner: string;
|
|
102
|
+
removed: boolean;
|
|
103
|
+
port: number | null;
|
|
104
|
+
}>;
|
|
83
105
|
exposeApp: (target: operations.AppTarget, options?: {
|
|
84
106
|
visibility?: "scoped" | "public";
|
|
85
107
|
name?: string;
|
|
@@ -100,8 +122,8 @@ export declare function composeHostedRuntime(options: HostedRuntimeOptions): Pro
|
|
|
100
122
|
installed: import("@nimbus-sh/core/runtime/installed-runtimes.js").RuntimeSummary[];
|
|
101
123
|
available: import("@nimbus-sh/core/runtime/runtime-package.js").RuntimeAvailability[];
|
|
102
124
|
}>;
|
|
103
|
-
spawnWorker: (workerCode: string, command: string, cwd: string, opts?: import("../
|
|
104
|
-
routeCapabilityPort: (port: number, capability: string, request: Request<unknown, CfProperties<unknown>>,
|
|
125
|
+
spawnWorker: (workerCode: string, command: string, cwd: string, opts?: import("../workspace-host.js").LongRunningWorkerSpawnOptions | undefined) => Promise<import("../facets/manager.js").SpawnedWorker>;
|
|
126
|
+
routeCapabilityPort: (port: number, capability: string, request: Request<unknown, CfProperties<unknown>>, innerPath: string) => Promise<Response>;
|
|
105
127
|
supervisorOp: (envelope: SupervisorOpEnvelope) => Promise<unknown>;
|
|
106
128
|
onScheduled: (task: HostedRuntimeTask) => Promise<void>;
|
|
107
129
|
attachTerminal: (ws: WebSocket) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/hosted/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/hosted/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAC7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,KAAK,EAA6B,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAIlG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAC;AACjF,OAAO,EAAqD,KAAK,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAE1I,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AASxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAO7D,OAAO,KAAK,UAAU,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAI3B,QAAA,MAAM,UAAU;;;;EAA0D,CAAC;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