agent-web-os 0.3.0 → 0.3.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.
@@ -0,0 +1,98 @@
1
+ import {
2
+ DEMO_PACKAGES,
3
+ DevServer,
4
+ NextDevServer,
5
+ PACKAGE_JSON,
6
+ PackageManager,
7
+ Runtime,
8
+ SANDBOX_SETUP_INSTRUCTIONS,
9
+ SandboxRuntime,
10
+ ServerBridge,
11
+ VirtualFS,
12
+ ViteDevServer,
13
+ WorkerRuntime,
14
+ assert$1,
15
+ chokidarShim,
16
+ createContainer,
17
+ createConvexAppProject,
18
+ createFsShim,
19
+ createProcess,
20
+ createRuntime,
21
+ esbuildShim,
22
+ events$1,
23
+ execute,
24
+ fseventsShim,
25
+ generateSandboxFiles,
26
+ getSandboxHtml,
27
+ getSandboxVercelConfig,
28
+ getServerBridge,
29
+ httpShim,
30
+ index,
31
+ initConvexAppDemo,
32
+ install,
33
+ moduleShim,
34
+ netShim,
35
+ pathShim,
36
+ perfHooksShim,
37
+ querystringShim,
38
+ readdirpShim,
39
+ resetServerBridge,
40
+ rollupShim,
41
+ startConvexAppDevServer,
42
+ stream,
43
+ urlShim,
44
+ utilShim,
45
+ workerThreadsShim,
46
+ wsShim
47
+ } from "./chunk-YMOX2CWB.js";
48
+ import "./chunk-JTZ3QUCT.js";
49
+ import "./chunk-PR4QN5HX.js";
50
+ export {
51
+ DEMO_PACKAGES as CONVEX_APP_DEMO_PACKAGES,
52
+ PACKAGE_JSON as CONVEX_APP_PACKAGE_JSON,
53
+ DevServer,
54
+ NextDevServer,
55
+ PackageManager,
56
+ Runtime,
57
+ SANDBOX_SETUP_INSTRUCTIONS,
58
+ SandboxRuntime,
59
+ ServerBridge,
60
+ VirtualFS,
61
+ ViteDevServer,
62
+ WorkerRuntime,
63
+ assert$1 as assert,
64
+ chokidarShim as chokidar,
65
+ createContainer,
66
+ createConvexAppProject,
67
+ createFsShim,
68
+ createProcess,
69
+ createRuntime,
70
+ createContainer as default,
71
+ esbuildShim as esbuild,
72
+ events$1 as events,
73
+ execute,
74
+ fseventsShim as fsevents,
75
+ generateSandboxFiles,
76
+ getSandboxHtml,
77
+ getSandboxVercelConfig,
78
+ getServerBridge,
79
+ httpShim as http,
80
+ initConvexAppDemo,
81
+ install,
82
+ moduleShim as module,
83
+ netShim as net,
84
+ index as npm,
85
+ pathShim as path,
86
+ perfHooksShim as perf_hooks,
87
+ querystringShim as querystring,
88
+ readdirpShim as readdirp,
89
+ resetServerBridge,
90
+ rollupShim as rollup,
91
+ startConvexAppDevServer,
92
+ stream,
93
+ urlShim as url,
94
+ utilShim as util,
95
+ workerThreadsShim as worker_threads,
96
+ wsShim as ws
97
+ };
98
+ //# sourceMappingURL=dist-2XQJWZPX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/index.cjs CHANGED
@@ -41176,6 +41176,55 @@ var init_index_web = __esm({
41176
41176
  });
41177
41177
 
41178
41178
  // node_modules/almostnode/dist/index.mjs
41179
+ var dist_exports = {};
41180
+ __export(dist_exports, {
41181
+ CONVEX_APP_DEMO_PACKAGES: () => DEMO_PACKAGES,
41182
+ CONVEX_APP_PACKAGE_JSON: () => PACKAGE_JSON,
41183
+ DevServer: () => DevServer,
41184
+ NextDevServer: () => NextDevServer,
41185
+ PackageManager: () => PackageManager,
41186
+ Runtime: () => Runtime,
41187
+ SANDBOX_SETUP_INSTRUCTIONS: () => SANDBOX_SETUP_INSTRUCTIONS,
41188
+ SandboxRuntime: () => SandboxRuntime,
41189
+ ServerBridge: () => ServerBridge,
41190
+ VirtualFS: () => VirtualFS,
41191
+ ViteDevServer: () => ViteDevServer,
41192
+ WorkerRuntime: () => WorkerRuntime,
41193
+ assert: () => assert$1,
41194
+ chokidar: () => chokidarShim,
41195
+ createContainer: () => createContainer,
41196
+ createConvexAppProject: () => createConvexAppProject,
41197
+ createFsShim: () => createFsShim,
41198
+ createProcess: () => createProcess,
41199
+ createRuntime: () => createRuntime,
41200
+ default: () => createContainer,
41201
+ esbuild: () => esbuildShim,
41202
+ events: () => events$1,
41203
+ execute: () => execute,
41204
+ fsevents: () => fseventsShim,
41205
+ generateSandboxFiles: () => generateSandboxFiles,
41206
+ getSandboxHtml: () => getSandboxHtml,
41207
+ getSandboxVercelConfig: () => getSandboxVercelConfig,
41208
+ getServerBridge: () => getServerBridge,
41209
+ http: () => httpShim,
41210
+ initConvexAppDemo: () => initConvexAppDemo,
41211
+ install: () => install,
41212
+ module: () => moduleShim,
41213
+ net: () => netShim,
41214
+ npm: () => index,
41215
+ path: () => pathShim,
41216
+ perf_hooks: () => perfHooksShim,
41217
+ querystring: () => querystringShim,
41218
+ readdirp: () => readdirpShim,
41219
+ resetServerBridge: () => resetServerBridge,
41220
+ rollup: () => rollupShim,
41221
+ startConvexAppDevServer: () => startConvexAppDevServer,
41222
+ stream: () => stream,
41223
+ url: () => urlShim,
41224
+ util: () => utilShim,
41225
+ worker_threads: () => workerThreadsShim,
41226
+ ws: () => wsShim
41227
+ });
41179
41228
  function uint8ToBase64(bytes) {
41180
41229
  const parts = [];
41181
41230
  for (let i22 = 0; i22 < bytes.length; i22 += CHUNK) {
@@ -75249,6 +75298,31 @@ console.error(${JSON.stringify(message)});`;
75249
75298
  }
75250
75299
  });
75251
75300
 
75301
+ // src/server-bridge.ts
75302
+ function loadAlmostnode() {
75303
+ if (!almostnodePromise) {
75304
+ almostnodePromise = Promise.resolve().then(() => (init_dist2(), dist_exports));
75305
+ }
75306
+ return almostnodePromise;
75307
+ }
75308
+ async function getServerBridge2() {
75309
+ if (!globalBridge2) {
75310
+ const mod = await loadAlmostnode();
75311
+ globalBridge2 = mod.getServerBridge();
75312
+ }
75313
+ return globalBridge2;
75314
+ }
75315
+ function resetServerBridge2() {
75316
+ globalBridge2 = null;
75317
+ }
75318
+ var globalBridge2, almostnodePromise;
75319
+ var init_server_bridge = __esm({
75320
+ "src/server-bridge.ts"() {
75321
+ globalBridge2 = null;
75322
+ almostnodePromise = null;
75323
+ }
75324
+ });
75325
+
75252
75326
  // src/almostnode-session.ts
75253
75327
  var almostnode_session_exports = {};
75254
75328
  __export(almostnode_session_exports, {
@@ -75454,6 +75528,7 @@ var init_almostnode_session = __esm({
75454
75528
  "src/almostnode-session.ts"() {
75455
75529
  init_posix_path();
75456
75530
  init_dist2();
75531
+ init_server_bridge();
75457
75532
  ALMOSTNODE_INTERNAL_ROOT = "/.almostnode";
75458
75533
  ALMOSTNODE_NODE_VERSION = "v20.0.0";
75459
75534
  ALMOSTNODE_NPM_VERSION = "9.6.4";
@@ -75691,6 +75766,7 @@ var init_almostnode_session = __esm({
75691
75766
  vitePort = null;
75692
75767
  vitePreviewUrl = null;
75693
75768
  vitePreviewListener;
75769
+ serverBridge;
75694
75770
  parsedPackageJsonCache = /* @__PURE__ */ new Map();
75695
75771
  transformedTextCache = /* @__PURE__ */ new Map();
75696
75772
  dispose() {
@@ -75998,7 +76074,7 @@ var init_almostnode_session = __esm({
75998
76074
  }
75999
76075
  if (this.vitePort !== null) {
76000
76076
  try {
76001
- getServerBridge().unregisterServer(this.vitePort);
76077
+ this.serverBridge?.unregisterServer(this.vitePort);
76002
76078
  } catch {
76003
76079
  }
76004
76080
  }
@@ -77254,7 +77330,8 @@ ${packages.map(([name2, version2]) => `+-- ${name2}@${version2}`).join("\n")}
77254
77330
  }
77255
77331
  }
77256
77332
  this.stopViteServer();
77257
- const bridge = getServerBridge();
77333
+ const bridge = await getServerBridge2();
77334
+ this.serverBridge = bridge;
77258
77335
  await ensureEsbuildWasm();
77259
77336
  this.viteServer = new ViteDevServer(this.vfs, { port, root: cwd });
77260
77337
  this.viteServer.start();
@@ -78649,11 +78726,9 @@ async function executeBrowserBash(session, command, options2 = {}) {
78649
78726
 
78650
78727
  // src/index.ts
78651
78728
  init_browser();
78652
- init_dist2();
78653
- var AGENT_WEB_OS_VERSION = "0.3.0";
78729
+ init_server_bridge();
78730
+ var AGENT_WEB_OS_VERSION = "0.3.2";
78654
78731
  console.log(`[agent-web-os] v${AGENT_WEB_OS_VERSION}`);
78655
- var getServerBridge2 = getServerBridge;
78656
- var resetServerBridge2 = resetServerBridge;
78657
78732
  /*! Bundled license information:
78658
78733
 
78659
78734
  just-bash/dist/bundle/browser.js: