@base44-preview/vite-plugin 1.0.43-pr.128.b491644 → 1.0.44-pr.130.574a59e

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 CHANGED
@@ -191,6 +191,27 @@ npm run build # TypeScript compilation (plugin)
191
191
  npm run build:bridge # tsup bundle (bridge ES module for browsers)
192
192
  ```
193
193
 
194
+ ## Server-side static-egress TCP
195
+
196
+ The server-only `base44:runtime` module exports `staticEgress.connect(address,
197
+ options?)`. It delegates to the TCP helper installed by Base44's full-stack
198
+ upload wrapper; Vite does not open sockets or read workspace configuration at
199
+ build time. A deployment missing that helper rejects with a rebuild/redeploy
200
+ error. Local development without the injected helper does not fall back to
201
+ direct TCP.
202
+
203
+ ```ts
204
+ import { staticEgress } from "base44:runtime";
205
+ const socket = await staticEgress.connect({ hostname: "sftp.example.com", port: 2222 });
206
+ // Use the streams with a compatible SSH client; preserve host-key verification.
207
+ await socket.close();
208
+ ```
209
+
210
+ Requires the companion platform TCP runtime and an enabled workspace static-egress
211
+ configuration. Rebuild after upgrading this plugin. Currently only raw TCP
212
+ (`secureTransport: "off"`, the default) is supported; SSH provides its own
213
+ encryption. TLS and STARTTLS options reject until explicitly supported.
214
+
194
215
  ## License
195
216
 
196
217
  MIT
@@ -1 +1 @@
1
- {"version":3,"file":"base44-runtime-plugin.d.ts","sourceRoot":"","sources":["../src/base44-runtime-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AA4EnC,wBAAgB,mBAAmB,IAAI,MAAM,CA0B5C"}
1
+ {"version":3,"file":"base44-runtime-plugin.d.ts","sourceRoot":"","sources":["../src/base44-runtime-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAsFnC,wBAAgB,mBAAmB,IAAI,MAAM,CA0B5C"}
@@ -12,13 +12,15 @@
12
12
  * is no runtime path to it, and no amount of wrapping the deployed entry creates
13
13
  * one.
14
14
  *
15
- * WHY NO ASYNCLOCALSTORAGE / NO WRAPPER ENTRY. Cloudflare now ships both
15
+ * SECRETS AND BACKGROUND WORK NEED NO EXTRA WRAPPER. Cloudflare now ships both
16
16
  * primitives ambiently from `cloudflare:workers` (`env` since 2025-03-17,
17
17
  * `waitUntil` since 2025-08-08), backed by workerd's own AsyncContextFrame and
18
18
  * IoContext. The backend-function bundler predates that and threads a context
19
19
  * through `globalThis.Base44` because it owns the generated entry; here the
20
20
  * framework owns the entry, and borrowing the platform's ambient accessors means
21
- * we never have to.
21
+ * we never have to for those APIs. Static-egress TCP delegates to the helper
22
+ * installed by Base44's deployed entry wrapper; this module only adapts the
23
+ * public import. Without that wrapper (including local dev), TCP fails closed.
22
24
  */
23
25
  const SPECIFIER = "base44:runtime";
24
26
  // Rollup convention: a resolved virtual id starts with NUL so no other plugin
@@ -66,6 +68,14 @@ export const secrets = {
66
68
  return typeof value === "string" ? value : undefined;
67
69
  },
68
70
  };
71
+
72
+ export const staticEgress = Object.freeze({
73
+ async connect(address, options) {
74
+ const api = globalThis.Base44?.staticEgress;
75
+ if (!api) throw new Error("Static egress TCP is unavailable; rebuild and redeploy with a supported runtime");
76
+ return api.connect(address, options);
77
+ },
78
+ });
69
79
  `;
70
80
  export function base44RuntimePlugin() {
71
81
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"base44-runtime-plugin.js","sourceRoot":"","sources":["../src/base44-runtime-plugin.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,SAAS,GAAG,gBAAgB,CAAC;AACnC,8EAA8E;AAC9E,gDAAgD;AAChD,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AAEpC,+EAA+E;AAC/E,iFAAiF;AACjF,sEAAsE;AACtE,MAAM,aAAa,GACjB,8EAA8E,CAAC;AAEjF,SAAS,iBAAiB,CAAC,EAAU;IACnC,IAAI,EAAE,KAAK,uBAA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E,KAAK,uBAAuB;QAAE,OAAO,aAAa,CAAC;IACzD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsBtB,CAAC;AAEF,MAAM,UAAU,mBAAmB;IACjC,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,0EAA0E;QAC1E,+BAA+B;QAC/B,OAAO,EAAE,KAAK;QAEd,SAAS,CAAC,EAAE;YACV,MAAM,MAAM,GAAG,iBAAiB,CAAC,EAAE,CAAC,CAAC;YACrC,IAAI,MAAM,EAAE,CAAC;gBACX,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,wCAAwC,MAAM,EAAE,CAAC,CAAC;YACrE,CAAC;YACD,IAAI,EAAE,KAAK,SAAS;gBAAE,OAAO,IAAI,CAAC;YAElC,0EAA0E;YAC1E,uEAAuE;YACvE,IAAI,IAAI,CAAC,WAAW,EAAE,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACxC,IAAI,CAAC,KAAK,CAAC,IAAI,SAAS,yDAAyD,CAAC,CAAC;YACrF,CAAC;YACD,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,IAAI,CAAC,EAAE;YACL,OAAO,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC;QACjD,CAAC;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44-preview/vite-plugin",
3
- "version": "1.0.43-pr.128.b491644",
3
+ "version": "1.0.44-pr.130.574a59e",
4
4
  "description": "The Vite plugin for base44 based applications",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -14,13 +14,15 @@ import type { Plugin } from "vite";
14
14
  * is no runtime path to it, and no amount of wrapping the deployed entry creates
15
15
  * one.
16
16
  *
17
- * WHY NO ASYNCLOCALSTORAGE / NO WRAPPER ENTRY. Cloudflare now ships both
17
+ * SECRETS AND BACKGROUND WORK NEED NO EXTRA WRAPPER. Cloudflare now ships both
18
18
  * primitives ambiently from `cloudflare:workers` (`env` since 2025-03-17,
19
19
  * `waitUntil` since 2025-08-08), backed by workerd's own AsyncContextFrame and
20
20
  * IoContext. The backend-function bundler predates that and threads a context
21
21
  * through `globalThis.Base44` because it owns the generated entry; here the
22
22
  * framework owns the entry, and borrowing the platform's ambient accessors means
23
- * we never have to.
23
+ * we never have to for those APIs. Static-egress TCP delegates to the helper
24
+ * installed by Base44's deployed entry wrapper; this module only adapts the
25
+ * public import. Without that wrapper (including local dev), TCP fails closed.
24
26
  */
25
27
 
26
28
  const SPECIFIER = "base44:runtime";
@@ -72,6 +74,14 @@ export const secrets = {
72
74
  return typeof value === "string" ? value : undefined;
73
75
  },
74
76
  };
77
+
78
+ export const staticEgress = Object.freeze({
79
+ async connect(address, options) {
80
+ const api = globalThis.Base44?.staticEgress;
81
+ if (!api) throw new Error("Static egress TCP is unavailable; rebuild and redeploy with a supported runtime");
82
+ return api.connect(address, options);
83
+ },
84
+ });
75
85
  `;
76
86
 
77
87
  export function base44RuntimePlugin(): Plugin {