sandlot 0.1.1 → 0.1.2
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 +52 -155
- package/dist/build-emitter.d.ts +29 -0
- package/dist/build-emitter.d.ts.map +1 -0
- package/dist/bundler.d.ts +2 -2
- package/dist/bundler.d.ts.map +1 -1
- package/dist/fs.d.ts +18 -4
- package/dist/fs.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +60 -69
- package/dist/internal.d.ts +5 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +79 -24
- package/dist/sandbox-manager.d.ts +0 -12
- package/dist/sandbox-manager.d.ts.map +1 -1
- package/dist/sandbox.d.ts +0 -8
- package/dist/sandbox.d.ts.map +1 -1
- package/package.json +2 -7
- package/src/build-emitter.ts +61 -0
- package/src/bundler.ts +68 -27
- package/src/fs.ts +19 -6
- package/src/index.ts +18 -1
- package/src/internal.ts +5 -2
- package/src/sandbox-manager.ts +1 -82
- package/src/sandbox.ts +1 -75
- package/src/ts-libs.ts +1 -1
- package/src/react.tsx +0 -331
package/README.md
CHANGED
|
@@ -11,7 +11,6 @@ Sandlot provides a complete in-browser development environment with a virtual fi
|
|
|
11
11
|
- **esbuild Bundling** - Fast bundling with automatic npm import handling via esbuild-wasm
|
|
12
12
|
- **Package Management** - Install npm packages via esm.sh CDN
|
|
13
13
|
- **Bash Shell** - Familiar command interface (`tsc`, `build`, `install`, etc.) via just-bash
|
|
14
|
-
- **React Integration** - Share your React instance with dynamic components
|
|
15
14
|
|
|
16
15
|
## Installation
|
|
17
16
|
|
|
@@ -223,160 +222,6 @@ interface SandboxOptions {
|
|
|
223
222
|
|
|
224
223
|
---
|
|
225
224
|
|
|
226
|
-
## React Integration
|
|
227
|
-
|
|
228
|
-
Sandlot solves the "multiple React instances" problem by letting dynamic components use your host application's React.
|
|
229
|
-
|
|
230
|
-
### Setup
|
|
231
|
-
|
|
232
|
-
```typescript
|
|
233
|
-
import * as React from "react";
|
|
234
|
-
import * as ReactDOM from "react-dom/client";
|
|
235
|
-
import { registerSharedModules, createSandbox } from "sandlot";
|
|
236
|
-
import { DynamicMount } from "sandlot/react";
|
|
237
|
-
|
|
238
|
-
// Register your React instances (do this once at app startup)
|
|
239
|
-
registerSharedModules({
|
|
240
|
-
react: React,
|
|
241
|
-
"react-dom/client": ReactDOM,
|
|
242
|
-
});
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
### Generating React Components
|
|
246
|
-
|
|
247
|
-
```typescript
|
|
248
|
-
import { createSandbox, loadModule, BundleResult } from "sandlot";
|
|
249
|
-
|
|
250
|
-
const sandbox = await createSandbox({
|
|
251
|
-
fsOptions: {
|
|
252
|
-
initialFiles: {
|
|
253
|
-
"/tsconfig.json": JSON.stringify({
|
|
254
|
-
compilerOptions: {
|
|
255
|
-
target: "ES2020",
|
|
256
|
-
module: "ESNext",
|
|
257
|
-
jsx: "react-jsx",
|
|
258
|
-
strict: true,
|
|
259
|
-
},
|
|
260
|
-
}),
|
|
261
|
-
},
|
|
262
|
-
},
|
|
263
|
-
sharedModules: ["react", "react-dom/client"],
|
|
264
|
-
});
|
|
265
|
-
|
|
266
|
-
// Install React types for TypeScript compilation
|
|
267
|
-
// (sharedModules provides runtime React, but types are still needed)
|
|
268
|
-
await sandbox.bash.exec("install react react-dom");
|
|
269
|
-
|
|
270
|
-
await sandbox.fs.writeFile(
|
|
271
|
-
"/src/index.tsx",
|
|
272
|
-
`
|
|
273
|
-
import React, { useState } from "react";
|
|
274
|
-
import { createRoot } from "react-dom/client";
|
|
275
|
-
|
|
276
|
-
function Counter() {
|
|
277
|
-
const [count, setCount] = useState(0);
|
|
278
|
-
return (
|
|
279
|
-
<button onClick={() => setCount(c => c + 1)}>
|
|
280
|
-
Count: {count}
|
|
281
|
-
</button>
|
|
282
|
-
);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
export function render(container: HTMLElement) {
|
|
286
|
-
const root = createRoot(container);
|
|
287
|
-
root.render(<Counter />);
|
|
288
|
-
return () => root.unmount();
|
|
289
|
-
}
|
|
290
|
-
`,
|
|
291
|
-
);
|
|
292
|
-
|
|
293
|
-
// Capture build result
|
|
294
|
-
let bundle: BundleResult | null = null;
|
|
295
|
-
const unsubscribe = sandbox.onBuild((result) => {
|
|
296
|
-
bundle = result;
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
const buildResult = await sandbox.bash.exec("build /src/index.tsx");
|
|
300
|
-
unsubscribe();
|
|
301
|
-
|
|
302
|
-
if (buildResult.exitCode === 0 && bundle) {
|
|
303
|
-
// Load the module and call render
|
|
304
|
-
const mod = await loadModule<{ render: (el: HTMLElement) => () => void }>(
|
|
305
|
-
bundle,
|
|
306
|
-
);
|
|
307
|
-
// mod.render is ready to use
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
sandbox.close();
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
### Rendering Dynamic Components
|
|
314
|
-
|
|
315
|
-
Use `DynamicMount` to render the generated component:
|
|
316
|
-
|
|
317
|
-
```tsx
|
|
318
|
-
import { DynamicMount } from "sandlot/react";
|
|
319
|
-
|
|
320
|
-
function App() {
|
|
321
|
-
const [module, setModule] = useState(null);
|
|
322
|
-
|
|
323
|
-
const generate = async () => {
|
|
324
|
-
// ... build with sandbox, capture bundle via onBuild ...
|
|
325
|
-
setModule(bundle);
|
|
326
|
-
};
|
|
327
|
-
|
|
328
|
-
return (
|
|
329
|
-
<div>
|
|
330
|
-
<button onClick={generate}>Generate</button>
|
|
331
|
-
<DynamicMount
|
|
332
|
-
module={module}
|
|
333
|
-
props={{ name: "World" }}
|
|
334
|
-
fallback={<div>Click to generate...</div>}
|
|
335
|
-
onMount={() => console.log("Mounted")}
|
|
336
|
-
onError={(err) => console.error(err)}
|
|
337
|
-
/>
|
|
338
|
-
</div>
|
|
339
|
-
);
|
|
340
|
-
}
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
### Using the Hook
|
|
344
|
-
|
|
345
|
-
For more control, use `useDynamicComponent`:
|
|
346
|
-
|
|
347
|
-
```tsx
|
|
348
|
-
import { useDynamicComponent } from "sandlot/react";
|
|
349
|
-
|
|
350
|
-
function App() {
|
|
351
|
-
const { containerRef, isMounted, error, unmount } = useDynamicComponent(
|
|
352
|
-
module,
|
|
353
|
-
{ name: "World" },
|
|
354
|
-
);
|
|
355
|
-
|
|
356
|
-
return (
|
|
357
|
-
<div>
|
|
358
|
-
<div ref={containerRef} />
|
|
359
|
-
{isMounted && <button onClick={unmount}>Remove</button>}
|
|
360
|
-
{error && <div>Error: {error.message}</div>}
|
|
361
|
-
</div>
|
|
362
|
-
);
|
|
363
|
-
}
|
|
364
|
-
```
|
|
365
|
-
|
|
366
|
-
### Render Function Pattern
|
|
367
|
-
|
|
368
|
-
Dynamic components must export a `render` function:
|
|
369
|
-
|
|
370
|
-
```typescript
|
|
371
|
-
export function render(container: HTMLElement, props?: MyProps) {
|
|
372
|
-
const root = createRoot(container);
|
|
373
|
-
root.render(<MyComponent {...props} />);
|
|
374
|
-
return () => root.unmount(); // Cleanup function
|
|
375
|
-
}
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
---
|
|
379
|
-
|
|
380
225
|
## Package Management
|
|
381
226
|
|
|
382
227
|
Sandlot installs packages via esm.sh CDN and fetches TypeScript type definitions.
|
|
@@ -605,6 +450,58 @@ export type { DynamicRenderModule, DynamicMountProps } from "sandlot/react";
|
|
|
605
450
|
|
|
606
451
|
---
|
|
607
452
|
|
|
453
|
+
## Framework Setup
|
|
454
|
+
|
|
455
|
+
### Vite
|
|
456
|
+
|
|
457
|
+
For optimal performance, add cross-origin isolation headers to enable SharedArrayBuffer:
|
|
458
|
+
|
|
459
|
+
```typescript
|
|
460
|
+
// vite.config.ts
|
|
461
|
+
import { defineConfig } from "vite";
|
|
462
|
+
|
|
463
|
+
export default defineConfig({
|
|
464
|
+
plugins: [
|
|
465
|
+
// Add COOP/COEP headers for SharedArrayBuffer (recommended for esbuild-wasm)
|
|
466
|
+
{
|
|
467
|
+
name: "cross-origin-isolation",
|
|
468
|
+
configureServer: (server) => {
|
|
469
|
+
server.middlewares.use((_req, res, next) => {
|
|
470
|
+
res.setHeader("Cross-Origin-Embedder-Policy", "require-corp");
|
|
471
|
+
res.setHeader("Cross-Origin-Opener-Policy", "same-origin");
|
|
472
|
+
next();
|
|
473
|
+
});
|
|
474
|
+
},
|
|
475
|
+
},
|
|
476
|
+
],
|
|
477
|
+
});
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
> **Note:** Without these headers, sandlot will still work but may have reduced performance.
|
|
481
|
+
> The console will show a warning if cross-origin isolation is not enabled.
|
|
482
|
+
|
|
483
|
+
### Next.js
|
|
484
|
+
|
|
485
|
+
Add headers in `next.config.js`:
|
|
486
|
+
|
|
487
|
+
```javascript
|
|
488
|
+
module.exports = {
|
|
489
|
+
async headers() {
|
|
490
|
+
return [
|
|
491
|
+
{
|
|
492
|
+
source: "/(.*)",
|
|
493
|
+
headers: [
|
|
494
|
+
{ key: "Cross-Origin-Embedder-Policy", value: "require-corp" },
|
|
495
|
+
{ key: "Cross-Origin-Opener-Policy", value: "same-origin" },
|
|
496
|
+
],
|
|
497
|
+
},
|
|
498
|
+
];
|
|
499
|
+
},
|
|
500
|
+
};
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
---
|
|
504
|
+
|
|
608
505
|
## Requirements
|
|
609
506
|
|
|
610
507
|
- Modern browser with ES2020 support
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build event emitter for sandbox environments.
|
|
3
|
+
*
|
|
4
|
+
* Simple typed event emitter for build results.
|
|
5
|
+
* Caches the last result so waitFor() can be called after build completes.
|
|
6
|
+
*/
|
|
7
|
+
import type { BundleResult } from "./bundler";
|
|
8
|
+
/**
|
|
9
|
+
* Simple typed event emitter for build results.
|
|
10
|
+
* Caches the last result so waitFor() can be called after build completes.
|
|
11
|
+
*/
|
|
12
|
+
export declare class BuildEmitter {
|
|
13
|
+
private listeners;
|
|
14
|
+
private lastResult;
|
|
15
|
+
/**
|
|
16
|
+
* Emit a build result to all listeners and cache it
|
|
17
|
+
*/
|
|
18
|
+
emit: (result: BundleResult) => Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Subscribe to build events. Returns an unsubscribe function.
|
|
21
|
+
*/
|
|
22
|
+
on(callback: (result: BundleResult) => void | Promise<void>): () => void;
|
|
23
|
+
/**
|
|
24
|
+
* Get the last build result, or wait for the next one if none exists.
|
|
25
|
+
* Clears the cached result after returning, so subsequent calls wait for new builds.
|
|
26
|
+
*/
|
|
27
|
+
waitFor(): Promise<BundleResult>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=build-emitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-emitter.d.ts","sourceRoot":"","sources":["../src/build-emitter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C;;;GAGG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,SAAS,CAA6D;IAC9E,OAAO,CAAC,UAAU,CAA6B;IAE/C;;OAEG;IACH,IAAI,GAAU,QAAQ,YAAY,KAAG,OAAO,CAAC,IAAI,CAAC,CAUhD;IAEF;;OAEG;IACH,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,MAAM,IAAI;IAOxE;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,YAAY,CAAC;CAcjC"}
|
package/dist/bundler.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IFileSystem } from "just-bash/browser";
|
|
2
|
-
import * as
|
|
2
|
+
import type * as EsbuildTypes from "esbuild-wasm";
|
|
3
3
|
/**
|
|
4
4
|
* How to handle npm package imports (bare imports like "react").
|
|
5
5
|
*
|
|
@@ -81,7 +81,7 @@ export interface BundleResult {
|
|
|
81
81
|
/**
|
|
82
82
|
* Any warnings from esbuild
|
|
83
83
|
*/
|
|
84
|
-
warnings:
|
|
84
|
+
warnings: EsbuildTypes.Message[];
|
|
85
85
|
/**
|
|
86
86
|
* List of files that were included in the bundle
|
|
87
87
|
*/
|
package/dist/bundler.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../src/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../src/bundler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,KAAK,YAAY,MAAM,cAAc,CAAC;AA6BlD;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,EAAE,EAAE,WAAW,CAAC;IAEhB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IAEpB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;IAE5B;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAEzB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;IAEhC;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC,OAAO,EAAE,CAAC;IAEjC;;OAEG;IACH,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAsCD;;;GAGG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAmBjD;AA4OD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CA8D1E;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAIzE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,eAAe,CAAC,CAAC,GAAG,OAAO,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC,CAOrF"}
|
package/dist/fs.d.ts
CHANGED
|
@@ -10,9 +10,12 @@ interface ReadFileOptions {
|
|
|
10
10
|
encoding?: BufferEncoding | null;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Options for writing files
|
|
13
|
+
* Options for writing files.
|
|
14
|
+
* Note: In this browser-based filesystem, content is stored as-is.
|
|
15
|
+
* The encoding option is accepted for API compatibility but not used.
|
|
14
16
|
*/
|
|
15
17
|
interface WriteFileOptions {
|
|
18
|
+
/** Accepted for API compatibility but not used - content is stored as-is */
|
|
16
19
|
encoding?: BufferEncoding;
|
|
17
20
|
}
|
|
18
21
|
/**
|
|
@@ -77,7 +80,7 @@ export declare class IndexedDbFs implements IFileSystem {
|
|
|
77
80
|
close(): void;
|
|
78
81
|
readFile(path: string, options?: ReadFileOptions | BufferEncoding): Promise<string>;
|
|
79
82
|
readFileBuffer(path: string): Promise<Uint8Array>;
|
|
80
|
-
writeFile(path: string, content: FileContent,
|
|
83
|
+
writeFile(path: string, content: FileContent, _options?: WriteFileOptions | BufferEncoding): Promise<void>;
|
|
81
84
|
appendFile(path: string, content: FileContent, options?: WriteFileOptions | BufferEncoding): Promise<void>;
|
|
82
85
|
exists(path: string): Promise<boolean>;
|
|
83
86
|
stat(path: string): Promise<FsStat>;
|
|
@@ -118,8 +121,19 @@ export declare class IndexedDbFs implements IFileSystem {
|
|
|
118
121
|
private promisifyTransaction;
|
|
119
122
|
}
|
|
120
123
|
/**
|
|
121
|
-
*
|
|
124
|
+
* Synchronous factory function for creating an in-memory filesystem.
|
|
125
|
+
*
|
|
126
|
+
* Note: For IndexedDB-backed persistence, use `IndexedDbFs.create()` instead.
|
|
127
|
+
* This function exists for compatibility with sync factory patterns.
|
|
128
|
+
*
|
|
129
|
+
* @param initialFiles - Optional initial files to populate the filesystem
|
|
130
|
+
* @returns An in-memory filesystem (no persistence)
|
|
122
131
|
*/
|
|
123
|
-
export declare function
|
|
132
|
+
export declare function createInMemoryFs(initialFiles?: InitialFiles): IFileSystem;
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated Use `createInMemoryFs` for in-memory filesystems or
|
|
135
|
+
* `IndexedDbFs.create()` for IndexedDB-backed persistence.
|
|
136
|
+
*/
|
|
137
|
+
export declare const createIndexedDbFs: typeof createInMemoryFs;
|
|
124
138
|
export {};
|
|
125
139
|
//# sourceMappingURL=fs.d.ts.map
|
package/dist/fs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EAEX,MAAM,EACN,YAAY,EACZ,SAAS,EACT,SAAS,EACT,WAAW,EACX,YAAY,EAEb,MAAM,mBAAmB,CAAC;AAE3B;;GAEG;AACH,KAAK,cAAc,GAAG,MAAM,GAAG,OAAO,GAAG,O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IAWnB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,YAAY;IAoBpB,OAAO,CAAC,aAAa;IAOrB,OAAO,CAAC,MAAM,CAAC,aAAa;IAS5B,OAAO,CAAC,MAAM,CAAC,YAAY;mBAgBN,WAAW;IAiBhC,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAgB/B,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,oBAAoB;CAM7B;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,YAAY,CAAC,EAAE,YAAY,GAAG,WAAW,CAEzE;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,yBAAmB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { initBundler, bundle, bundleToUrl, bundleAndImport, type BundleOptions,
|
|
|
9
9
|
export { typecheck, formatDiagnostics, formatDiagnosticsForAgent, type TypecheckOptions, } from "./typechecker";
|
|
10
10
|
export { installPackage, uninstallPackage, listPackages, getPackageManifest, type InstallOptions, } from "./packages";
|
|
11
11
|
export { createSharedResources, getDefaultResources, clearDefaultResources, hasDefaultResources, type SharedResourcesOptions, type SharedResources, type TypesCache, } from "./shared-resources";
|
|
12
|
-
export { IndexedDbFs,
|
|
12
|
+
export { IndexedDbFs, createInMemoryFs, type IndexedDbFsOptions, } from "./fs";
|
|
13
13
|
export type { IFileSystem, FsEntry } from "just-bash/browser";
|
|
14
14
|
export { getDefaultBrowserLibs, fetchAndCacheLibs, } from "./ts-libs";
|
|
15
15
|
export { createTscCommand, createBuildCommand, createInstallCommand, createUninstallCommand, createListCommand, createRunCommand, createDefaultCommands, type CommandDeps, type RunContext, type RunOptions, type RunResult, } from "./commands";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAyBA,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,KAAK,OAAO,EACZ,KAAK,cAAc,GACpB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,cAAc,EACd,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,GAC3B,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EACL,UAAU,EACV,UAAU,EACV,WAAW,EACX,cAAc,EACd,SAAS,EACT,eAAe,EACf,mBAAmB,GACpB,MAAM,UAAU,CAAC;AAMlB,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAM1B,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACjE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAWjE,OAAO,EACL,WAAW,EACX,MAAM,EACN,WAAW,EACX,eAAe,EACf,KAAK,aAAa,EAClB,KAAK,cAAc,GACpB,MAAM,WAAW,CAAC;AAMnB,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,yBAAyB,EACzB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AAMvB,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,KAAK,cAAc,GACpB,MAAM,YAAY,CAAC;AAMpB,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,KAAK,UAAU,GAChB,MAAM,oBAAoB,CAAC;AAM5B,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,KAAK,kBAAkB,GACxB,MAAM,MAAM,CAAC;AAEd,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAM9D,OAAO,EACL,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAMnB,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,GACf,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -145,7 +145,7 @@ class IndexedDbFs {
|
|
|
145
145
|
}
|
|
146
146
|
return new TextEncoder().encode(content);
|
|
147
147
|
}
|
|
148
|
-
async writeFile(path, content,
|
|
148
|
+
async writeFile(path, content, _options) {
|
|
149
149
|
const normalizedPath = this.normalizePath(path);
|
|
150
150
|
this.checkSizeLimit(content);
|
|
151
151
|
this.ensureParentDirs(normalizedPath);
|
|
@@ -654,13 +654,10 @@ class IndexedDbFs {
|
|
|
654
654
|
});
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function createInMemoryFs(initialFiles) {
|
|
658
658
|
return IndexedDbFs.createInMemory({ initialFiles });
|
|
659
659
|
}
|
|
660
660
|
|
|
661
|
-
// src/bundler.ts
|
|
662
|
-
import * as esbuild from "esbuild-wasm";
|
|
663
|
-
|
|
664
661
|
// src/packages.ts
|
|
665
662
|
var ESM_CDN_BASE = "https://esm.sh";
|
|
666
663
|
var KNOWN_SUBPATHS = {
|
|
@@ -1197,11 +1194,35 @@ function getSharedModuleRuntimeCode(moduleId) {
|
|
|
1197
1194
|
}
|
|
1198
1195
|
|
|
1199
1196
|
// src/bundler.ts
|
|
1197
|
+
var esbuild = null;
|
|
1198
|
+
async function getEsbuild() {
|
|
1199
|
+
if (esbuild)
|
|
1200
|
+
return esbuild;
|
|
1201
|
+
const cdnUrl = `https://esm.sh/esbuild-wasm@${ESBUILD_VERSION}`;
|
|
1202
|
+
const mod = await import(cdnUrl);
|
|
1203
|
+
esbuild = mod.default ?? mod;
|
|
1204
|
+
if (typeof esbuild?.initialize !== "function") {
|
|
1205
|
+
console.error("esbuild-wasm module structure:", mod);
|
|
1206
|
+
throw new Error("Failed to load esbuild-wasm: initialize function not found");
|
|
1207
|
+
}
|
|
1208
|
+
return esbuild;
|
|
1209
|
+
}
|
|
1210
|
+
var ESBUILD_VERSION = "0.27.2";
|
|
1200
1211
|
var initialized = false;
|
|
1201
1212
|
var initPromise = null;
|
|
1202
1213
|
function getWasmUrl() {
|
|
1203
|
-
|
|
1204
|
-
|
|
1214
|
+
return `https://unpkg.com/esbuild-wasm@${ESBUILD_VERSION}/esbuild.wasm`;
|
|
1215
|
+
}
|
|
1216
|
+
function checkCrossOriginIsolation() {
|
|
1217
|
+
if (typeof window === "undefined")
|
|
1218
|
+
return;
|
|
1219
|
+
if (!window.crossOriginIsolated) {
|
|
1220
|
+
console.warn(`[sandlot] Cross-origin isolation is not enabled. esbuild-wasm may have reduced performance or fail on some browsers.
|
|
1221
|
+
To enable, add these headers to your dev server:
|
|
1222
|
+
Cross-Origin-Embedder-Policy: require-corp
|
|
1223
|
+
Cross-Origin-Opener-Policy: same-origin
|
|
1224
|
+
In Vite, add a plugin to configureServer. See sandlot README for details.`);
|
|
1225
|
+
}
|
|
1205
1226
|
}
|
|
1206
1227
|
async function initBundler() {
|
|
1207
1228
|
if (initialized)
|
|
@@ -1210,9 +1231,13 @@ async function initBundler() {
|
|
|
1210
1231
|
await initPromise;
|
|
1211
1232
|
return;
|
|
1212
1233
|
}
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1234
|
+
checkCrossOriginIsolation();
|
|
1235
|
+
initPromise = (async () => {
|
|
1236
|
+
const es = await getEsbuild();
|
|
1237
|
+
await es.initialize({
|
|
1238
|
+
wasmURL: getWasmUrl()
|
|
1239
|
+
});
|
|
1240
|
+
})();
|
|
1216
1241
|
await initPromise;
|
|
1217
1242
|
initialized = true;
|
|
1218
1243
|
}
|
|
@@ -1263,8 +1288,8 @@ function createVfsPlugin(options) {
|
|
|
1263
1288
|
} = options;
|
|
1264
1289
|
return {
|
|
1265
1290
|
name: "virtual-fs",
|
|
1266
|
-
setup(
|
|
1267
|
-
|
|
1291
|
+
setup(build) {
|
|
1292
|
+
build.onResolve({ filter: /.*/ }, async (args) => {
|
|
1268
1293
|
if (args.kind === "entry-point") {
|
|
1269
1294
|
return { path: entryPoint, namespace: "vfs" };
|
|
1270
1295
|
}
|
|
@@ -1320,28 +1345,18 @@ function createVfsPlugin(options) {
|
|
|
1320
1345
|
}
|
|
1321
1346
|
return { errors: [{ text: `Cannot resolve: ${args.path} from ${args.resolveDir}` }] };
|
|
1322
1347
|
});
|
|
1323
|
-
|
|
1324
|
-
const contents = `
|
|
1325
|
-
export * from ${JSON.stringify(args.path)};
|
|
1326
|
-
// Re-export all named exports by importing from registry
|
|
1327
|
-
const __mod__ = ${getSharedModuleRuntimeCode(args.path)};
|
|
1328
|
-
for (const __k__ in __mod__) {
|
|
1329
|
-
if (__k__ !== 'default') Object.defineProperty(exports, __k__, {
|
|
1330
|
-
enumerable: true,
|
|
1331
|
-
get: function() { return __mod__[__k__]; }
|
|
1332
|
-
});
|
|
1333
|
-
}`;
|
|
1334
|
-
const esmContents = `
|
|
1348
|
+
build.onLoad({ filter: /.*/, namespace: "sandlot-shared" }, (args) => {
|
|
1349
|
+
const contents = `
|
|
1335
1350
|
const __sandlot_mod__ = ${getSharedModuleRuntimeCode(args.path)};
|
|
1336
1351
|
export default __sandlot_mod__.default ?? __sandlot_mod__;
|
|
1337
1352
|
${generateNamedExports(args.path)}
|
|
1338
1353
|
`;
|
|
1339
1354
|
return {
|
|
1340
|
-
contents:
|
|
1355
|
+
contents: contents.trim(),
|
|
1341
1356
|
loader: "js"
|
|
1342
1357
|
};
|
|
1343
1358
|
});
|
|
1344
|
-
|
|
1359
|
+
build.onLoad({ filter: /.*/, namespace: "vfs" }, async (args) => {
|
|
1345
1360
|
try {
|
|
1346
1361
|
const contents = await fs.readFile(args.path);
|
|
1347
1362
|
includedFiles.add(args.path);
|
|
@@ -1440,7 +1455,8 @@ async function bundle(options) {
|
|
|
1440
1455
|
includedFiles,
|
|
1441
1456
|
sharedModuleIds
|
|
1442
1457
|
});
|
|
1443
|
-
const
|
|
1458
|
+
const es = await getEsbuild();
|
|
1459
|
+
const result = await es.build({
|
|
1444
1460
|
entryPoints: [normalizedEntry],
|
|
1445
1461
|
bundle: true,
|
|
1446
1462
|
write: false,
|
|
@@ -2578,7 +2594,7 @@ function hasDefaultResources() {
|
|
|
2578
2594
|
return defaultResourcesInstance !== null;
|
|
2579
2595
|
}
|
|
2580
2596
|
|
|
2581
|
-
// src/
|
|
2597
|
+
// src/build-emitter.ts
|
|
2582
2598
|
class BuildEmitter {
|
|
2583
2599
|
listeners = new Set;
|
|
2584
2600
|
lastResult = null;
|
|
@@ -2614,6 +2630,8 @@ class BuildEmitter {
|
|
|
2614
2630
|
});
|
|
2615
2631
|
}
|
|
2616
2632
|
}
|
|
2633
|
+
|
|
2634
|
+
// src/sandbox.ts
|
|
2617
2635
|
async function createSandbox(options = {}) {
|
|
2618
2636
|
const {
|
|
2619
2637
|
fsOptions = {},
|
|
@@ -2700,42 +2718,6 @@ async function createInMemorySandbox(options = {}) {
|
|
|
2700
2718
|
}
|
|
2701
2719
|
// src/sandbox-manager.ts
|
|
2702
2720
|
import { Bash as Bash2 } from "just-bash/browser";
|
|
2703
|
-
class BuildEmitter2 {
|
|
2704
|
-
listeners = new Set;
|
|
2705
|
-
lastResult = null;
|
|
2706
|
-
emit = async (result) => {
|
|
2707
|
-
this.lastResult = result;
|
|
2708
|
-
const promises = [];
|
|
2709
|
-
for (const listener of this.listeners) {
|
|
2710
|
-
const ret = listener(result);
|
|
2711
|
-
if (ret instanceof Promise) {
|
|
2712
|
-
promises.push(ret);
|
|
2713
|
-
}
|
|
2714
|
-
}
|
|
2715
|
-
await Promise.all(promises);
|
|
2716
|
-
};
|
|
2717
|
-
on(callback) {
|
|
2718
|
-
this.listeners.add(callback);
|
|
2719
|
-
return () => {
|
|
2720
|
-
this.listeners.delete(callback);
|
|
2721
|
-
};
|
|
2722
|
-
}
|
|
2723
|
-
waitFor() {
|
|
2724
|
-
if (this.lastResult) {
|
|
2725
|
-
const result = this.lastResult;
|
|
2726
|
-
this.lastResult = null;
|
|
2727
|
-
return Promise.resolve(result);
|
|
2728
|
-
}
|
|
2729
|
-
return new Promise((resolve) => {
|
|
2730
|
-
const unsub = this.on((result) => {
|
|
2731
|
-
unsub();
|
|
2732
|
-
this.lastResult = null;
|
|
2733
|
-
resolve(result);
|
|
2734
|
-
});
|
|
2735
|
-
});
|
|
2736
|
-
}
|
|
2737
|
-
}
|
|
2738
|
-
|
|
2739
2721
|
class SandboxManager {
|
|
2740
2722
|
resources = null;
|
|
2741
2723
|
sandboxes = new Map;
|
|
@@ -2792,7 +2774,7 @@ class SandboxManager {
|
|
|
2792
2774
|
maxSizeBytes: fsOptions.maxSizeBytes
|
|
2793
2775
|
});
|
|
2794
2776
|
}
|
|
2795
|
-
const buildEmitter = new
|
|
2777
|
+
const buildEmitter = new BuildEmitter;
|
|
2796
2778
|
if (onBuild) {
|
|
2797
2779
|
buildEmitter.on(onBuild);
|
|
2798
2780
|
}
|
|
@@ -2867,15 +2849,24 @@ class SandboxManager {
|
|
|
2867
2849
|
getResources() {
|
|
2868
2850
|
return this.resources;
|
|
2869
2851
|
}
|
|
2870
|
-
getLibFiles() {
|
|
2871
|
-
return this.resources?.libFiles ?? new Map;
|
|
2872
|
-
}
|
|
2873
2852
|
}
|
|
2874
2853
|
async function createSandboxManager(options = {}) {
|
|
2875
2854
|
const manager = new SandboxManager(options);
|
|
2876
2855
|
await manager.initialize();
|
|
2877
2856
|
return manager;
|
|
2878
2857
|
}
|
|
2858
|
+
|
|
2859
|
+
// src/index.ts
|
|
2860
|
+
if (typeof window !== "undefined" && typeof globalThis.process === "undefined") {
|
|
2861
|
+
globalThis.process = {
|
|
2862
|
+
env: {},
|
|
2863
|
+
platform: "browser",
|
|
2864
|
+
version: "v20.0.0",
|
|
2865
|
+
browser: true,
|
|
2866
|
+
cwd: () => "/",
|
|
2867
|
+
nextTick: (fn) => setTimeout(fn, 0)
|
|
2868
|
+
};
|
|
2869
|
+
}
|
|
2879
2870
|
export {
|
|
2880
2871
|
unregisterSharedModule,
|
|
2881
2872
|
uninstallPackage,
|
|
@@ -2904,8 +2895,8 @@ export {
|
|
|
2904
2895
|
createRunCommand,
|
|
2905
2896
|
createListCommand,
|
|
2906
2897
|
createInstallCommand,
|
|
2907
|
-
createIndexedDbFs,
|
|
2908
2898
|
createInMemorySandbox,
|
|
2899
|
+
createInMemoryFs,
|
|
2909
2900
|
createDefaultCommands,
|
|
2910
2901
|
createBuildCommand,
|
|
2911
2902
|
clearSharedModules,
|
package/dist/internal.d.ts
CHANGED
|
@@ -71,4 +71,9 @@ export { getSharedModuleRuntimeCode } from "./shared-modules";
|
|
|
71
71
|
* Format esbuild messages for display.
|
|
72
72
|
*/
|
|
73
73
|
export { formatEsbuildMessages } from "./commands";
|
|
74
|
+
/**
|
|
75
|
+
* Build event emitter for sandbox environments.
|
|
76
|
+
* Use this for custom build event handling in advanced use cases.
|
|
77
|
+
*/
|
|
78
|
+
export { BuildEmitter } from "./build-emitter";
|
|
74
79
|
//# sourceMappingURL=internal.d.ts.map
|
package/dist/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH;;;GAGG;AACH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAM5D;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C;;GAEG;AACH,OAAO,EAAE,eA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