@ngrok/app-server 0.5.0 → 0.5.1
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/cli.js +3 -3
- package/dist/{compress-Cp5NfXCC.js → compress-2w3jqBh7.js} +1 -1
- package/dist/{create-server-B009JSjU.js → create-server-DVTZun6D.js} +5 -5
- package/dist/{create-server-DPGtaCfj.js → create-server-PA0qniaK.js} +1 -1
- package/dist/{entry-RBAY48md.js → entry-CMhX3yf8.js} +3 -3
- package/dist/entry-CvZ4U0ia.js +3 -0
- package/dist/{entry-avxtNCfq.d.ts → entry-DBq_3s8X.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/{load-entry-CxL1s32y.js → load-entry-Bgq1_HDV.js} +2 -2
- package/dist/{node-Dn1wImgK.js → node-DQPrMFyc.js} +1 -1
- package/dist/{node-CC15UYcj.js → node-DyKDFII0.js} +2 -2
- package/dist/node.d.ts +3 -3
- package/dist/node.js +2 -2
- package/dist/{response-edge-DTdOg-tm.js → response-edge-Ow5Pi5qF.js} +1 -1
- package/dist/{response-writer-DlwFKoE8.js → response-writer-Dd4Ey99f.js} +3 -3
- package/dist/{script-hashes-ko_nj9mw.js → script-hashes-BdvJ0QI_.js} +1 -1
- package/dist/{serve-BChY9E35.js → serve-AatMo9k6.js} +1 -1
- package/dist/{start-CTelU1-B.js → start-DYFyGKsM.js} +4 -4
- package/dist/{static-files-CFLmR_aJ.js → static-files-BdTPam5b.js} +1 -1
- package/dist/tanstack-start.d.ts +1 -1
- package/dist/{tcp-Cn1E_rM2.js → tcp-3v4pmnYU.js} +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +4 -4
- package/dist/vercel-vite.js +7 -7
- package/dist/vercel.d.ts +1 -1
- package/dist/vercel.js +3 -3
- package/dist/vite.js +2 -2
- package/package.json +12 -12
- package/dist/entry-B410KmVC.js +0 -3
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as parsePort } from "./tcp-
|
|
2
|
+
import { t as parsePort } from "./tcp-3v4pmnYU.js";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import { parseArgs } from "node:util";
|
|
@@ -43,12 +43,12 @@ try {
|
|
|
43
43
|
if (args?.help === true) process.stdout.write(`${USAGE}\n`);
|
|
44
44
|
else if (args?.command === "start") {
|
|
45
45
|
process.env.NODE_ENV ??= "development";
|
|
46
|
-
const { start } = await import("./start-
|
|
46
|
+
const { start } = await import("./start-DYFyGKsM.js");
|
|
47
47
|
await start();
|
|
48
48
|
} else if (args?.command === "serve") {
|
|
49
49
|
process.env.NODE_ENV ??= "production";
|
|
50
50
|
if (typeof process.setSourceMapsEnabled === "function") process.setSourceMapsEnabled(true);
|
|
51
|
-
const { DEFAULT_BUILD_PATHS, serve } = await import("./serve-
|
|
51
|
+
const { DEFAULT_BUILD_PATHS, serve } = await import("./serve-AatMo9k6.js");
|
|
52
52
|
const buildPath = args.buildPath ?? DEFAULT_BUILD_PATHS.find((each) => existsSync(each));
|
|
53
53
|
if (buildPath == null) fail(`No server build found. Build the app, or pass its path. Looked for: ${DEFAULT_BUILD_PATHS.join(", ")}.`);
|
|
54
54
|
else if (existsSync(buildPath)) await serve({ buildPath });
|
|
@@ -153,7 +153,7 @@ function take(pool, size) {
|
|
|
153
153
|
let best = -1;
|
|
154
154
|
let bestSize = -1;
|
|
155
155
|
for (let index = idle.length - 1; index >= 0; index -= 1) {
|
|
156
|
-
const each = idle[index]?.size ??
|
|
156
|
+
const each = idle[index]?.size ?? 1e400;
|
|
157
157
|
if (each <= size && each > bestSize) {
|
|
158
158
|
best = index;
|
|
159
159
|
bestSize = each;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { n as checkCount, t as MAX_TIMER_MS } from "./check-count-DQl5z_qe.js";
|
|
2
1
|
import { a as requestLogger, c as textSink, i as jsonSink, r as hookSink, t as asError } from "./log-DfC9D5_T.js";
|
|
3
|
-
import { c as withRequestContext, i as releaseContext, s as setProcessSink, t as currentShutdown } from "./request-context-Cslbrscf.js";
|
|
4
2
|
import { i as hookedView, o as replaceResponse, r as headerList, s as withBuiltInHeaderHook, t as bodyHooks } from "./header-hook-JfqaTt34.js";
|
|
5
3
|
import { c as checkOptionPlugins, d as perRequestHeadersOf, f as presenceHeaders, l as optionPlugin, o as checkHeaderName, p as presenceHeadersOf, r as buildId, s as checkHeaderValue, u as perRequestHeaders } from "./build-id-CwMbED1n.js";
|
|
6
|
-
import { n as finishResponse, r as onResponseSent } from "./response-edge-
|
|
4
|
+
import { n as finishResponse, r as onResponseSent } from "./response-edge-Ow5Pi5qF.js";
|
|
7
5
|
import { a as manifestKey, r as IMMUTABLE } from "./build-manifest-CoBztw_6.js";
|
|
6
|
+
import { c as withVary, i as isFilePath$1, n as findStaticFile, s as staticResponse, t as contentType } from "./static-files-BdTPam5b.js";
|
|
8
7
|
import { a as forbidsTransform, c as readIfQueued, n as MIN_COMPRESS_BYTES, o as isCompressible, s as preferredEncoding } from "./compression-uJxu0JVb.js";
|
|
9
|
-
import {
|
|
8
|
+
import { n as checkCount, t as MAX_TIMER_MS } from "./check-count-DQl5z_qe.js";
|
|
9
|
+
import { c as withRequestContext, i as releaseContext, s as setProcessSink, t as currentShutdown } from "./request-context-Cslbrscf.js";
|
|
10
10
|
import { Hono } from "hono";
|
|
11
11
|
import { getPath } from "hono/utils/url";
|
|
12
12
|
import { parseAccept } from "hono/utils/accept";
|
|
@@ -877,7 +877,7 @@ function compileRule({ from, to, status = 301 }, index) {
|
|
|
877
877
|
* `path`, with the values that it matched. With `before`, it tests only the
|
|
878
878
|
* rules before that position of the table.
|
|
879
879
|
*/
|
|
880
|
-
function firstMatch(rules, path, before =
|
|
880
|
+
function firstMatch(rules, path, before = 1e400) {
|
|
881
881
|
for (const rule of rules ?? NO_RULES) {
|
|
882
882
|
if (rule.index > before) break;
|
|
883
883
|
const groups = rule.pattern?.exec(path)?.groups;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as withForwardedProto, n as defaultPlugins, r as serverInternals, t as createServer } from "./create-server-
|
|
1
|
+
import { i as withForwardedProto, n as defaultPlugins, r as serverInternals, t as createServer } from "./create-server-DVTZun6D.js";
|
|
2
2
|
|
|
3
3
|
export { createServer, defaultPlugins, serverInternals, withForwardedProto };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as flushLogs, o as setLogWriter, s as sinkLogger, t as asError } from "./log-DfC9D5_T.js";
|
|
2
1
|
import { n as DEFAULT_ASSETS_PATH, o as readBuildManifest } from "./build-manifest-CoBztw_6.js";
|
|
3
|
-
import { a as abortShutdownSignal, r as serverInternals } from "./create-server-
|
|
4
|
-
import {
|
|
2
|
+
import { a as abortShutdownSignal, r as serverInternals } from "./create-server-DVTZun6D.js";
|
|
3
|
+
import { n as flushLogs, o as setLogWriter, s as sinkLogger, t as asError } from "./log-DfC9D5_T.js";
|
|
4
|
+
import { a as keptFiles } from "./static-files-BdTPam5b.js";
|
|
5
5
|
|
|
6
6
|
// src/core/static-pages.ts
|
|
7
7
|
/** The headers that the CDN sets for each file itself. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as FrameworkRuntime, g as Mode, r as FetchHandler, s as HostRuntime, t as AppServerEnv, u as ListenerBindings } from "./types-KsKRDwAv.js";
|
|
2
1
|
import { t as AppServer } from "./create-server-UVsHFQyK.js";
|
|
3
2
|
import { n as StaticPage } from "./static-pages-6IBHdYQc.js";
|
|
3
|
+
import { a as FrameworkRuntime, g as Mode, r as FetchHandler, s as HostRuntime, t as AppServerEnv, u as ListenerBindings } from "./types-KsKRDwAv.js";
|
|
4
4
|
import { MiddlewareHandler } from "hono";
|
|
5
5
|
/** The version of the contract between the CLI and the `appServer` export of a build. */
|
|
6
6
|
declare const ENTRY_PROTOCOL = 3;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as SentResponse, D as StaticFiles, E as StartedListener, O as ResponseEdge, S as ResponseHeaders, T as SetupInfo, _ as Plugin, a as FrameworkRuntime, b as RequestScope, c as Lifecycle, d as ListenerStartOptions, f as LogLevel, g as Mode, h as LogSink, i as FileInfo, l as Listener, m as LogOptions, n as ByteRange, o as HeaderHook, p as LogLine, r as FetchHandler, s as HostRuntime, t as AppServerEnv, u as ListenerBindings, v as RequestContext, w as ServerBindings, x as RequestStore, y as RequestLogger } from "./types-KsKRDwAv.js";
|
|
2
1
|
import { A as AccessLogOptions, C as redirects, D as health, E as HealthOptions, O as BuildIdOptions, S as RedirectsOptions, T as noindex, _ as SecurityHeaderValues, a as defaultPlugins, b as securityHeaders, c as prerendered, d as RuntimeEnvOptions, f as StandardSchemaV1, g as ContentSecurityPolicyOptions, h as requestId, i as createServer, j as accessLog, k as buildId, l as InferOutput, m as RequestIdOptions, n as CreateServerOptions, o as PrerenderedOptions, p as runtimeEnv, r as DefaultPluginsOptions, s as assets, t as AppServer, u as RuntimeEnv, v as SecurityHeadersOptions, w as NoindexOptions, x as RedirectRule, y as contentSecurityPolicy } from "./create-server-UVsHFQyK.js";
|
|
2
|
+
import { n as CreateEntryOptions, r as createEntry, t as AppServerEntry } from "./entry-DBq_3s8X.js";
|
|
3
|
+
import { C as SentResponse, D as StaticFiles, E as StartedListener, O as ResponseEdge, S as ResponseHeaders, T as SetupInfo, _ as Plugin, a as FrameworkRuntime, b as RequestScope, c as Lifecycle, d as ListenerStartOptions, f as LogLevel, g as Mode, h as LogSink, i as FileInfo, l as Listener, m as LogOptions, n as ByteRange, o as HeaderHook, p as LogLine, r as FetchHandler, s as HostRuntime, t as AppServerEnv, u as ListenerBindings, v as RequestContext, w as ServerBindings, x as RequestStore, y as RequestLogger } from "./types-KsKRDwAv.js";
|
|
3
4
|
import { n as TrailingSlashOptions, r as trailingSlash, t as TrailingSlash } from "./trailing-slash-C-yBKCib.js";
|
|
4
|
-
import { n as CreateEntryOptions, r as createEntry, t as AppServerEntry } from "./entry-avxtNCfq.js";
|
|
5
5
|
import { n as StaticPage, t as CdnPage } from "./static-pages-6IBHdYQc.js";
|
|
6
6
|
import { Context, Next } from "hono";
|
|
7
7
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { _ as assets, b as prefersMarkdown, c as requestId, d as redirects, f as privateDocuments, g as accessLog, h as bodyLimit, l as contentSecurityPolicy, m as health, n as defaultPlugins, o as shutdownSignal, p as noindex, s as streamingCompress, t as createServer, u as securityHeaders, v as prerendered, y as trailingSlash } from "./create-server-DVTZun6D.js";
|
|
2
|
+
import { t as createEntry } from "./entry-CMhX3yf8.js";
|
|
3
3
|
import { c as withHeaderHook, l as writableHeaders, o as replaceResponse } from "./header-hook-JfqaTt34.js";
|
|
4
|
+
import { i as jsonSink } from "./log-DfC9D5_T.js";
|
|
4
5
|
import { l as optionPlugin, r as buildId } from "./build-id-CwMbED1n.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as createEntry } from "./entry-RBAY48md.js";
|
|
6
|
+
import { o as rewritesHtmlWithEtagPart } from "./static-files-BdTPam5b.js";
|
|
7
|
+
import { a as requestContext, n as logger } from "./request-context-Cslbrscf.js";
|
|
8
|
+
import { t as ResponseEdge } from "./response-edge-Ow5Pi5qF.js";
|
|
9
9
|
|
|
10
10
|
// src/core/event-stream.ts
|
|
11
11
|
/** Why: `setInterval` turns a longer delay, and a delay under 1, into 1 ms. */
|
|
@@ -18,8 +18,8 @@ async function loadEntry(build) {
|
|
|
18
18
|
const known = plainEntries.get(build);
|
|
19
19
|
if (known != null) return known;
|
|
20
20
|
const [{ createServer }, { createEntry }, { host }, { runtime }, { environmentOptions }] = await Promise.all([
|
|
21
|
-
import("./create-server-
|
|
22
|
-
import("./entry-
|
|
21
|
+
import("./create-server-PA0qniaK.js"),
|
|
22
|
+
import("./entry-CvZ4U0ia.js"),
|
|
23
23
|
import("./node.js"),
|
|
24
24
|
import("./react-router.js"),
|
|
25
25
|
import("./entry-source-SHoE-DUP.js")
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as tcp } from "./tcp-Cn1E_rM2.js";
|
|
2
1
|
import { t as asError } from "./log-DfC9D5_T.js";
|
|
3
2
|
import { n as logger } from "./request-context-Cslbrscf.js";
|
|
4
3
|
import { r as logWriter, t as exitAfterFlush } from "./exit-Hh-O3gp4.js";
|
|
5
|
-
import { n as gzipStream, t as brotliStream } from "./compress-
|
|
4
|
+
import { n as gzipStream, t as brotliStream } from "./compress-2w3jqBh7.js";
|
|
5
|
+
import { n as tcp } from "./tcp-3v4pmnYU.js";
|
|
6
6
|
import { constants } from "node:fs";
|
|
7
7
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
8
8
|
import { access, open, readdir, stat } from "node:fs/promises";
|
package/dist/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as Listener, s as HostRuntime, u as ListenerBindings } from "./types-KsKRDwAv.js";
|
|
2
|
-
import
|
|
2
|
+
import "hono";
|
|
3
3
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
4
4
|
/** Options for {@link tcp}. */
|
|
5
5
|
type TcpOptions = {
|
|
@@ -59,5 +59,5 @@ type NodeBindings = ListenerBindings & {
|
|
|
59
59
|
* @example
|
|
60
60
|
* export const appServer = createEntry({ app, host, framework: (mode) => runtime(build, { mode }) });
|
|
61
61
|
*/
|
|
62
|
-
declare const host
|
|
63
|
-
export {
|
|
62
|
+
export declare const host: HostRuntime;
|
|
63
|
+
export type { NodeBindings, TcpOptions };
|
package/dist/node.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as asError } from "./log-DfC9D5_T.js";
|
|
2
1
|
import { a as listView, n as headerIndex, o as replaceResponse, r as headerList } from "./header-hook-JfqaTt34.js";
|
|
2
|
+
import { t as asError } from "./log-DfC9D5_T.js";
|
|
3
3
|
|
|
4
4
|
// src/core/response-edge.ts
|
|
5
5
|
function ignore() {}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as headerIndex, r as headerList } from "./header-hook-JfqaTt34.js";
|
|
2
|
-
import { t as ResponseEdge } from "./response-edge-DTdOg-tm.js";
|
|
3
1
|
import { c as readIfQueued } from "./compression-uJxu0JVb.js";
|
|
4
|
-
import { r as
|
|
2
|
+
import { n as headerIndex, r as headerList } from "./header-hook-JfqaTt34.js";
|
|
3
|
+
import { t as ResponseEdge } from "./response-edge-Ow5Pi5qF.js";
|
|
4
|
+
import { r as waitsForZlib } from "./compress-2w3jqBh7.js";
|
|
5
5
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
6
6
|
import { getRequestListener } from "@hono/node-server";
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as contentType } from "./static-files-
|
|
1
|
+
import { t as contentType } from "./static-files-BdTPam5b.js";
|
|
2
2
|
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
3
3
|
import { join, relative, resolve, sep } from "node:path";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as SERVER_ENTRY_FILE } from "./build-manifest-CoBztw_6.js";
|
|
2
|
-
import { t as loadEntry } from "./load-entry-
|
|
2
|
+
import { t as loadEntry } from "./load-entry-Bgq1_HDV.js";
|
|
3
3
|
import { resolve } from "node:path";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as parsePort } from "./tcp-Cn1E_rM2.js";
|
|
2
1
|
import { c as textSink, r as hookSink, t as asError } from "./log-DfC9D5_T.js";
|
|
2
|
+
import { t as publicScriptHashes } from "./script-hashes-BdvJ0QI_.js";
|
|
3
3
|
import { t as exitAfterFlush } from "./exit-Hh-O3gp4.js";
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
4
|
+
import { t as requestListener } from "./response-writer-Dd4Ey99f.js";
|
|
5
|
+
import { t as parsePort } from "./tcp-3v4pmnYU.js";
|
|
6
6
|
import { n as SERVER_ENTRY_ID } from "./entry-source-DSE5NAJu.js";
|
|
7
|
-
import { t as loadEntry } from "./load-entry-CxL1s32y.js";
|
|
8
7
|
import { t as listenerUrl } from "./listen-options-7TaXjyrk.js";
|
|
8
|
+
import { t as loadEntry } from "./load-entry-Bgq1_HDV.js";
|
|
9
9
|
import { styleText } from "node:util";
|
|
10
10
|
import { networkInterfaces } from "node:os";
|
|
11
11
|
import { IncomingMessage, ServerResponse, createServer } from "node:http";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as hookedView, t as bodyHooks } from "./header-hook-JfqaTt34.js";
|
|
2
1
|
import { a as forbidsTransform, i as copyPath, s as preferredEncoding, t as COPY_ENCODINGS } from "./compression-uJxu0JVb.js";
|
|
2
|
+
import { i as hookedView, t as bodyHooks } from "./header-hook-JfqaTt34.js";
|
|
3
3
|
import { getMimeType } from "hono/utils/mime";
|
|
4
4
|
|
|
5
5
|
// src/core/vary.ts
|
package/dist/tanstack-start.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as FrameworkRuntime, g as Mode } from "./types-KsKRDwAv.js";
|
|
2
1
|
import { t as TrailingSlash } from "./trailing-slash-C-yBKCib.js";
|
|
2
|
+
import { a as FrameworkRuntime, g as Mode } from "./types-KsKRDwAv.js";
|
|
3
3
|
import { AnyRouter, RegisteredRouter } from "@tanstack/react-router";
|
|
4
4
|
/**
|
|
5
5
|
* The `trailingSlash` mode of a TanStack router: the app's registered router
|
|
@@ -46,7 +46,7 @@ function tcp({ port, host, idleTimeoutMs = DEFAULT_IDLE_TIMEOUT_MS } = {}) {
|
|
|
46
46
|
try {
|
|
47
47
|
if ("Bun" in globalThis) return await (await import("./bun-BCz6K_Xv.js")).listen(fetch, options);
|
|
48
48
|
if ("Deno" in globalThis) return await (await import("./deno-aqhikNMG.js")).listen(fetch, options);
|
|
49
|
-
return await (await import("./node-
|
|
49
|
+
return await (await import("./node-DQPrMFyc.js")).listen(fetch, options);
|
|
50
50
|
} catch (error) {
|
|
51
51
|
const portInUse = !("Bun" in globalThis) && error instanceof Error && "code" in error && error.code === "EADDRINUSE";
|
|
52
52
|
if (envHost == null || portInUse) throw error;
|
package/dist/testing.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as FrameworkRuntime, v as RequestContext } from "./types-KsKRDwAv.js";
|
|
2
1
|
import { t as AppServer } from "./create-server-UVsHFQyK.js";
|
|
2
|
+
import { a as FrameworkRuntime, v as RequestContext } from "./types-KsKRDwAv.js";
|
|
3
3
|
/** Options for {@link createTestServer}. */
|
|
4
4
|
export type TestServerOptions = {
|
|
5
5
|
/**
|
package/dist/testing.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { t as BUILD_MANIFEST_FILE } from "./build-manifest-CoBztw_6.js";
|
|
2
|
+
import { t as createEntry } from "./entry-CMhX3yf8.js";
|
|
1
3
|
import { s as sinkLogger } from "./log-DfC9D5_T.js";
|
|
2
4
|
import { c as withRequestContext$1 } from "./request-context-Cslbrscf.js";
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { t as host } from "./node-CC15UYcj.js";
|
|
6
|
-
import { n as scriptHashesOf } from "./script-hashes-ko_nj9mw.js";
|
|
5
|
+
import { t as host } from "./node-DyKDFII0.js";
|
|
6
|
+
import { n as scriptHashesOf } from "./script-hashes-BdvJ0QI_.js";
|
|
7
7
|
import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
8
8
|
import { dirname, isAbsolute, join, normalize, sep } from "node:path";
|
|
9
9
|
import { tmpdir } from "node:os";
|
package/dist/vercel-vite.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as IMMUTABLE } from "./build-manifest-CoBztw_6.js";
|
|
2
2
|
import { r as copyName } from "./compression-uJxu0JVb.js";
|
|
3
|
-
import { r as hasDotSegment } from "./static-files-
|
|
3
|
+
import { r as hasDotSegment } from "./static-files-BdTPam5b.js";
|
|
4
4
|
import { t as FILE_LIST } from "./brotli-only-BVAagKt3.js";
|
|
5
5
|
import { copyFileSync, cpSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { basename, dirname, isAbsolute, join, relative, sep } from "node:path";
|
|
@@ -27,7 +27,7 @@ const MARKDOWN = "text/markdown".replaceAll(/[a-z]/gu, (letter) => `[${letter}${
|
|
|
27
27
|
/** The function's file, next to the server entry. */
|
|
28
28
|
const FUNCTION_FILE = "vercel-function.js";
|
|
29
29
|
/** A path with `/` separators, as Vercel's config reads it. */
|
|
30
|
-
function posix
|
|
30
|
+
function posix(path) {
|
|
31
31
|
return path.split(sep).join("/");
|
|
32
32
|
}
|
|
33
33
|
/** A regular expression source that matches `text` as it is. */
|
|
@@ -216,7 +216,7 @@ function writeOutput({ root, clientDirectory, entryFile, assetsPath, logger }, {
|
|
|
216
216
|
return inside;
|
|
217
217
|
};
|
|
218
218
|
const functionDirectory = join(output, "functions/index.func");
|
|
219
|
-
const isCdnFile = (file) => prefixes.some((prefix) => `/${posix
|
|
219
|
+
const isCdnFile = (file) => prefixes.some((prefix) => `/${posix(file)}`.startsWith(prefix));
|
|
220
220
|
const clientFiles = new Map(filesUnder(clientDirectory));
|
|
221
221
|
const list = {
|
|
222
222
|
builtAt: Date.now(),
|
|
@@ -239,9 +239,9 @@ function writeOutput({ root, clientDirectory, entryFile, assetsPath, logger }, {
|
|
|
239
239
|
if (!isCdnFile(file)) {
|
|
240
240
|
if (!brotliCopyOnly(file)) {
|
|
241
241
|
copyFile(from, join(functionDirectory, fromRoot(from)));
|
|
242
|
-
list.files[`/${posix
|
|
243
|
-
} else if (!basename(file).startsWith(".")) list.brotliOnly[`/${posix
|
|
244
|
-
} else if (!hasDotSegment(`/${posix
|
|
242
|
+
list.files[`/${posix(file)}`] = size;
|
|
243
|
+
} else if (!basename(file).startsWith(".")) list.brotliOnly[`/${posix(file)}`] = size;
|
|
244
|
+
} else if (!hasDotSegment(`/${posix(file)}`)) copyFile(from, join(output, "static", file));
|
|
245
245
|
}
|
|
246
246
|
const listFile = join(functionDirectory, fromRoot(clientDirectory), FILE_LIST);
|
|
247
247
|
mkdirSync(dirname(listFile), { recursive: true });
|
|
@@ -260,7 +260,7 @@ function writeOutput({ root, clientDirectory, entryFile, assetsPath, logger }, {
|
|
|
260
260
|
].join("\n"));
|
|
261
261
|
writeFileSync(join(functionDirectory, ".vc-config.json"), `${JSON.stringify({
|
|
262
262
|
runtime: `nodejs${process.versions.node.split(".")[0]}.x`,
|
|
263
|
-
handler: posix
|
|
263
|
+
handler: posix(fromRoot(functionFile)),
|
|
264
264
|
launcherType: "Nodejs",
|
|
265
265
|
supportsResponseStreaming: true,
|
|
266
266
|
...regions == null ? {} : { regions },
|
package/dist/vercel.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { t as AppServerEntry } from "./entry-DBq_3s8X.js";
|
|
1
2
|
import { s as HostRuntime } from "./types-KsKRDwAv.js";
|
|
2
|
-
import { t as AppServerEntry } from "./entry-avxtNCfq.js";
|
|
3
3
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
4
4
|
/**
|
|
5
5
|
* The vercel host: one Vercel Function on Node.js. It keeps
|
package/dist/vercel.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as withForwardedProto } from "./create-server-
|
|
1
|
+
import { i as withForwardedProto } from "./create-server-DVTZun6D.js";
|
|
2
|
+
import { n as listedFiles, r as nodeFiles, t as host$1 } from "./node-DyKDFII0.js";
|
|
3
|
+
import { t as requestListener } from "./response-writer-Dd4Ey99f.js";
|
|
2
4
|
import { n as flushLogs, r as logWriter } from "./exit-Hh-O3gp4.js";
|
|
3
|
-
import { n as listedFiles, r as nodeFiles, t as host$1 } from "./node-CC15UYcj.js";
|
|
4
|
-
import { t as requestListener } from "./response-writer-DlwFKoE8.js";
|
|
5
5
|
import { n as brotliOnlyOpen, t as FILE_LIST } from "./brotli-only-BVAagKt3.js";
|
|
6
6
|
|
|
7
7
|
// src/vercel/index.ts
|
package/dist/vite.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as manifestKey, i as SERVER_ENTRY_FILE, n as DEFAULT_ASSETS_PATH, t as BUILD_MANIFEST_FILE } from "./build-manifest-CoBztw_6.js";
|
|
2
2
|
import { n as MIN_COMPRESS_BYTES, o as isCompressible, r as copyName, t as COPY_ENCODINGS } from "./compression-uJxu0JVb.js";
|
|
3
|
-
import { t as contentType } from "./static-files-
|
|
3
|
+
import { t as contentType } from "./static-files-BdTPam5b.js";
|
|
4
|
+
import { n as scriptHashesOf } from "./script-hashes-BdvJ0QI_.js";
|
|
4
5
|
import { t as node } from "./vite-Brb8YR9I.js";
|
|
5
6
|
import { t as reactRouterAdapter } from "./vite-CHppJWp_.js";
|
|
6
7
|
import { t as tanstackStartAdapter } from "./vite-DjlHdyTM.js";
|
|
7
|
-
import { n as scriptHashesOf } from "./script-hashes-ko_nj9mw.js";
|
|
8
8
|
import { i as serverEntrySource, n as SERVER_ENTRY_ID, t as RESOLVED_SERVER_ENTRY_ID } from "./entry-source-DSE5NAJu.js";
|
|
9
9
|
import { isBuiltin } from "node:module";
|
|
10
10
|
import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrok/app-server",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "A composable Hono app server for React Router and TanStack Start: prerendered pages, streamed compression, structured logs, and clean shutdown on Node, Bun, Deno, and Vercel.",
|
|
5
5
|
"homepage": "https://github.com/ngrok/app-server#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"./package.json": "./package.json"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@hono/node-server": "2.1.
|
|
77
|
-
"@vercel/nft": "1.11.
|
|
76
|
+
"@hono/node-server": "2.1.8",
|
|
77
|
+
"@vercel/nft": "1.11.2"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@changesets/changelog-github": "1.0.1",
|
|
@@ -83,21 +83,21 @@
|
|
|
83
83
|
"@react-router/dev": "8.5.1",
|
|
84
84
|
"@react-router/serve": "8.5.1",
|
|
85
85
|
"@tanstack/react-router": "1.170.46",
|
|
86
|
-
"@tanstack/react-start": "1.169.
|
|
86
|
+
"@tanstack/react-start": "1.169.5",
|
|
87
87
|
"@types/node": "26.6.6",
|
|
88
|
-
"@vitejs/plugin-react": "6.
|
|
88
|
+
"@vitejs/plugin-react": "6.3.0",
|
|
89
89
|
"happy-dom": "20.14.6",
|
|
90
|
-
"hono": "4.13.
|
|
91
|
-
"oxfmt": "0.
|
|
92
|
-
"oxlint": "1.
|
|
93
|
-
"oxlint-tsgolint": "7.0.
|
|
90
|
+
"hono": "4.13.18",
|
|
91
|
+
"oxfmt": "0.78.0",
|
|
92
|
+
"oxlint": "1.93.0",
|
|
93
|
+
"oxlint-tsgolint": "7.0.2007",
|
|
94
94
|
"react": "19.3.1",
|
|
95
95
|
"react-dom": "19.3.1",
|
|
96
96
|
"react-router": "8.5.1",
|
|
97
|
-
"tsdown": "0.23.
|
|
97
|
+
"tsdown": "0.23.7",
|
|
98
98
|
"typescript": "7.0.2",
|
|
99
|
-
"vite": "8.3.
|
|
100
|
-
"vitest": "5.0
|
|
99
|
+
"vite": "8.3.8",
|
|
100
|
+
"vitest": "5.1.0",
|
|
101
101
|
"zod": "4.6.7"
|
|
102
102
|
},
|
|
103
103
|
"peerDependencies": {
|
package/dist/entry-B410KmVC.js
DELETED