Conversation
babel.config.js unused — build uses tsup (esbuild), test uses esbuild-jest. .eslintrc.js unused — ESLint v9 uses eslint.config.js (flat config). test.mjs unused — leftover scratch file. Remove orphaned @babel/preset-env and @babel/preset-typescript devDependencies.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PROXY_STATIC_FILE_WISEmode — serve static files first, proxy all other requests to--proxyTarget. Supports WebSocket upgrade (for HMR/dev servers), strips proxy-fingerprint headers (x-forwarded-*,via), rewritesorigin/refererto match the target, and auto-rewrites upstream redirectLocationheaders to the proxy origin.--https,--httpsKey,--httpsCertCLI flags. Falls back to bundledserver.key/server.certwhen no custom path given. HTTPS server shares the same routing as HTTP.--proxyStaticFileWise,--https,--httpsKey,--httpsCertrun.ts— split monolithicrun()intocreateLegacyServer,createProxyStaticFirstServer,createHttpOrHttpsServer,normalizeProxyRequest,rewriteReferer,resolveHttpsPath,parsePort,validateArguments. Useshttp-proxy-middlewarev3 API directly (was lazy-required before).modeliteral type toModeunion, drop removedlogLeveloption, castDuplextonet.Socketfor proxy upgrade.bin.ts— extractedmain()andrunIfMain()for clean error handling and testability.runerrors now log to stderr and exit with code 1 instead of crashing.src/run-https.ts— usepath.resolve(__dirname, ...)for cert/key paths so the binary can find them when packaged.Files changed
src/run.tstest/test.spec.tsREADME.mdtest/bin.spec.tssrc/bin.tssrc/run-https.tspackage.jsonTest plan
npm test— 27 tests pass, 100% branch/function/line/statement coveragenpx tsc -p tsconfig.json --emitDeclarationOnly— zero errors