veryfront 0.1.15 → 0.1.16

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.
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/serve/command.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB;AAsFD,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAcvE"}
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/serve/command.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,GAAG,OAAO,GAAG,YAAY,CAAC;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB;AAgGD,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAcvE"}
@@ -21,7 +21,15 @@ async function runProxy(options) {
21
21
  const { setEnv } = await import("../../../src/platform/index.js");
22
22
  setEnv("PORT", String(options.port));
23
23
  setEnv("HOST", options.bindAddress);
24
+ registerTerminationSignals((signal) => {
25
+ cliLogger.info(`Received ${signal}, shutting down proxy server...`);
26
+ exitProcess(0);
27
+ });
28
+ // DenoHttpServer.serve() blocks until the server stops,
29
+ // so this import keeps the process alive.
24
30
  await import("../../../src/proxy/main.js");
31
+ // Keep the process alive (Deno.serve returns immediately in compiled binaries)
32
+ await new Promise(() => { });
25
33
  }
26
34
  async function runProductionServer(options) {
27
35
  showLogo();
package/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "nodeModulesDir": "auto",
5
5
  "exclude": [
6
6
  "npm/",
@@ -1 +1 @@
1
- {"version":3,"file":"deno-server.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/http/deno-server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGpE,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,eAAe,CAAC,CAAkB;IAEpC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAsCxE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAIvB"}
1
+ {"version":3,"file":"deno-server.d.ts","sourceRoot":"","sources":["../../../../../src/src/platform/compat/http/deno-server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAGpE,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,eAAe,CAAC,CAAkB;IAEpC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IA2CxE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAIvB"}
@@ -28,7 +28,11 @@ export class DenoHttpServer {
28
28
  headers: r.headers,
29
29
  });
30
30
  };
31
- await nativeDeno.serve({ port, hostname, signal: serveSignal }, wrappedHandler);
31
+ const httpServer = nativeDeno.serve({ port, hostname, signal: serveSignal }, wrappedHandler);
32
+ // Block until the server stops (e.g. via signal abort).
33
+ // Deno.serve() returns synchronously; without awaiting .finished
34
+ // the event loop drains and the process exits in compiled binaries.
35
+ await httpServer.finished;
32
36
  }
33
37
  close() {
34
38
  this.abortController?.abort();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",
@@ -37,7 +37,17 @@ async function runProxy(options: ServeOptions): Promise<void> {
37
37
  setEnv("PORT", String(options.port));
38
38
  setEnv("HOST", options.bindAddress);
39
39
 
40
+ registerTerminationSignals((signal) => {
41
+ cliLogger.info(`Received ${signal}, shutting down proxy server...`);
42
+ exitProcess(0);
43
+ });
44
+
45
+ // DenoHttpServer.serve() blocks until the server stops,
46
+ // so this import keeps the process alive.
40
47
  await import("../../../src/proxy/main.js");
48
+
49
+ // Keep the process alive (Deno.serve returns immediately in compiled binaries)
50
+ await new Promise(() => {});
41
51
  }
42
52
 
43
53
  async function runProductionServer(options: ServeOptions): Promise<void> {
package/src/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "nodeModulesDir": "auto",
5
5
  "exclude": [
6
6
  "npm/",
@@ -37,10 +37,15 @@ export class DenoHttpServer implements HttpServer {
37
37
  });
38
38
  };
39
39
 
40
- await nativeDeno.serve(
40
+ const httpServer = nativeDeno.serve(
41
41
  { port, hostname, signal: serveSignal },
42
42
  wrappedHandler,
43
43
  );
44
+
45
+ // Block until the server stops (e.g. via signal abort).
46
+ // Deno.serve() returns synchronously; without awaiting .finished
47
+ // the event loop drains and the process exits in compiled binaries.
48
+ await httpServer.finished;
44
49
  }
45
50
 
46
51
  close(): Promise<void> {