UNPKG

koatty_serve

Version:

Provide http1/2/3, websocket, gRPC server for Koatty.

146 lines (123 loc) 11.6 kB
 > koatty_serve@3.2.0 build /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-serve > pnpm run build:js && pnpm run build:dts && pnpm run build:doc && pnpm run build:cp > koatty_serve@3.2.0 build:js /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-serve > tsup CLI Building entry: src/index.ts CLI Using tsconfig: tsconfig.json CLI tsup v8.5.1 CLI Using tsup config: /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-serve/tsup.config.ts CLI Target: node18 CLI Cleaning output folder CJS Build start ESM Build start ESM dist/index.mjs 312.86 KB ESM dist/index.mjs.map 768.31 KB ESM ⚡️ Build success in 893ms CJS dist/index.js 314.49 KB CJS dist/index.js.map 768.38 KB CJS ⚡️ Build success in 893ms > koatty_serve@3.2.0 build:dts /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-serve > bash ../../scripts/build-dts.sh 🔨 Building type declarations for koatty-serve... Waiting for dependencies to be ready... 🔍 Checking dependencies: koatty_container, koatty_core, koatty_exception, koatty_lib, koatty_logger, koatty_proto, koatty_validation koatty_container type declarations ready koatty_core type declarations ready koatty_exception type declarations ready koatty_lib type declarations ready koatty_logger type declarations ready koatty_proto type declarations ready koatty_validation type declarations ready All dependencies ready (waited 1ms) 📝 Running TypeScript compiler... src/server/grpc.ts:510:21 - error TS2339: Property 'emit' does not exist on type 'Server'. 510 this.server.emit('error', err);    ~~~~ src/server/http2.ts:50:32 - error TS2345: Argument of type 'Http2ServerRequest' is not assignable to parameter of type 'IncomingMessage'. Type 'Http2ServerRequest' is missing the following properties from type 'IncomingMessage': headersDistinct, trailersDistinct 50 await healthMiddleware(req, res, async () => {    ~~~ Found 2 errors in 2 files. Errors Files 1 src/server/grpc.ts:510 1 src/server/http2.ts:50 ⚠️ TypeScript compilation had errors, but continuing... 📦 Running API Extractor...  api-extractor 7.55.2  - https://api-extractor.com/  Using configuration from ./api-extractor.json Analysis will use the bundled TypeScript version 5.8.2 *** The target project appears to use TypeScript 5.9.3 which is newer than the bundled compiler engine; consider upgrading API Extractor. Writing: /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-serve/temp/koatty_serve.api.json Writing package typings: /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-serve/dist/index.d.ts Warning: src/ServeComponent.ts:104:38 - (tsdoc-characters-after-block-tag) The token "@OnEvent" looks like a TSDoc tag but contains an invalid character "("; if it is not a tag, use a backslash to escape the "@" Warning: src/config/config.ts:83:4 - (tsdoc-undefined-tag) The TSDoc tag "@interface" is not defined in this configuration Warning: src/config/config.ts:90:3 - (ae-forgotten-export) The symbol "BaseSSLConfig" needs to be exported by the entry point index.d.ts Warning: src/config/config.ts:103:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration Warning: src/config/config.ts:104:4 - (tsdoc-undefined-tag) The TSDoc tag "@interface" is not defined in this configuration Warning: src/pools/http3.ts:75:7 - (tsdoc-at-sign-in-word) The "@" character looks like part of a TSDoc tag; use a backslash to escape it Warning: src/pools/pool-metrics-integration.ts:12:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' Warning: src/pools/pool-metrics-integration.ts:13:18 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag Warning: src/pools/pool-metrics-integration.ts:13:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" Warning: src/pools/pool-metrics-integration.ts:26:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' Warning: src/pools/pool-metrics-integration.ts:27:18 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag Warning: src/pools/pool-metrics-integration.ts:27:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" Warning: src/server/base.ts:52:4 - (tsdoc-undefined-tag) The TSDoc tag "@template" is not defined in this configuration Warning: src/server/base.ts:53:4 - (tsdoc-undefined-tag) The TSDoc tag "@template" is not defined in this configuration Warning: src/server/grpc.ts:32:4 - (tsdoc-undefined-tag) The TSDoc tag "@interface" is not defined in this configuration Warning: src/server/grpc.ts:42:4 - (tsdoc-undefined-tag) The TSDoc tag "@interface" is not defined in this configuration Warning: src/server/grpc.ts:48:1 - (ae-forgotten-export) The symbol "BaseServer" needs to be exported by the entry point index.d.ts Warning: src/server/grpc.ts:48:1 - (ae-forgotten-export) The symbol "GrpcServerOptions" needs to be exported by the entry point index.d.ts Warning: src/server/grpc.ts:49:3 - (ae-forgotten-export) The symbol "GrpcConnectionPoolManager" needs to be exported by the entry point index.d.ts Warning: src/server/grpc.ts:113:3 - (ae-forgotten-export) The symbol "ConfigChangeAnalysis" needs to be exported by the entry point index.d.ts Warning: src/server/grpc.ts:412:6 - (tsdoc-undefined-tag) The TSDoc tag "@private" is not defined in this configuration Warning: src/server/grpc.ts:559:6 - (tsdoc-undefined-tag) The TSDoc tag "@private" is not defined in this configuration Warning: src/server/grpc.ts:571:3 - (ae-forgotten-export) The symbol "ServiceImplementation" needs to be exported by the entry point index.d.ts Warning: src/server/grpc.ts:765:3 - (ae-forgotten-export) The symbol "ConnectionStats" needs to be exported by the entry point index.d.ts Warning: src/server/grpc.ts:779:3 - (ae-forgotten-export) The symbol "ConnectionPoolHealth" needs to be exported by the entry point index.d.ts Warning: src/server/grpc.ts:786:3 - (ae-forgotten-export) The symbol "ConnectionPoolMetrics" needs to be exported by the entry point index.d.ts Warning: src/server/http.ts:22:1 - (ae-forgotten-export) The symbol "HttpServerOptions" needs to be exported by the entry point index.d.ts Warning: src/server/http.ts:23:3 - (ae-forgotten-export) The symbol "HttpConnectionPoolManager" needs to be exported by the entry point index.d.ts Warning: src/server/http2.ts:22:1 - (ae-forgotten-export) The symbol "Http2ServerOptions" needs to be exported by the entry point index.d.ts Warning: src/server/http2.ts:23:3 - (ae-forgotten-export) The symbol "Http2ConnectionPoolManager" needs to be exported by the entry point index.d.ts Warning: src/server/http2.ts:556:7 - (ae-forgotten-export) The symbol "ConnectionPoolConfig" needs to be exported by the entry point index.d.ts Warning: src/server/http3.ts:50:1 - (ae-forgotten-export) The symbol "Http3ServerOptions" needs to be exported by the entry point index.d.ts Warning: src/server/http3.ts:51:3 - (ae-forgotten-export) The symbol "Http3ConnectionPoolManager" needs to be exported by the entry point index.d.ts Warning: src/server/http3.ts:73:23 - (tsdoc-characters-after-block-tag) The token "@matrixai" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" Warning: src/server/http3.ts:74:9 - (tsdoc-at-sign-in-word) The "@" character looks like part of a TSDoc tag; use a backslash to escape it Warning: src/server/https.ts:23:1 - (ae-forgotten-export) The symbol "HttpsServerOptions" needs to be exported by the entry point index.d.ts Warning: src/server/https.ts:24:3 - (ae-forgotten-export) The symbol "HttpsConnectionPoolManager" needs to be exported by the entry point index.d.ts Warning: src/server/serve.ts:483:4 - (tsdoc-undefined-tag) The TSDoc tag "@export" is not defined in this configuration Warning: src/server/serve.ts:484:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' Warning: src/server/serve.ts:485:30 - (tsdoc-param-tag-with-invalid-optional-name) The @param should not include a JSDoc-style optional name; it must not be enclosed in '[ ]' brackets. Warning: src/server/serve.ts:485:11 - (tsdoc-param-tag-with-invalid-type) The @param block should not include a JSDoc-style '{type}' Warning: src/server/serve.ts:486:15 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag Warning: src/server/serve.ts:486:31 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag Warning: src/server/serve.ts:486:13 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" Warning: src/server/serve.ts:486:18 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" Warning: src/server/ws.ts:24:1 - (ae-forgotten-export) The symbol "WebSocketServerOptions" needs to be exported by the entry point index.d.ts Warning: src/server/ws.ts:25:3 - (ae-forgotten-export) The symbol "WebSocketConnectionPoolManager" needs to be exported by the entry point index.d.ts API Extractor completed successfully  Type declarations built successfully > koatty_serve@3.2.0 build:doc /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-serve > api-documenter markdown --input temp --output docs/api api-documenter 7.28.2  - https://api-extractor.com/  Reading koatty_serve.api.json Deleting old output from docs/api Writing koatty_serve package Unsupported block tag: @interface Unsupported block tag: @export Unsupported block tag: @export Unsupported block tag: @interface > koatty_serve@3.2.0 build:cp /Volumes/ExternalSSD/Users/richen/Workspace/nodejs/koatty-monorepo/packages/koatty-serve > node ../../scripts/postBuild.js 📦 postBuild: koatty-serve Copied package.json to dist/ Copied LICENSE to dist/ Copied README.md to dist/ Fixed paths in dist/package.json Cleaned DTS declarations Done