├── apps └── hyper-express-test-app │ ├── dist │ ├── src │ │ ├── main.d.ts │ │ ├── app.module.d.ts │ │ ├── app.service.d.ts │ │ ├── errors.controller.d.ts │ │ ├── app.controller.d.ts │ │ ├── app.service.js.map │ │ ├── main.js.map │ │ ├── app.module.js.map │ │ ├── app.controller.js.map │ │ ├── main.js │ │ ├── errors.controller.js.map │ │ ├── app.service.js │ │ ├── app.module.js │ │ └── app.controller.js │ └── tests │ │ ├── cors │ │ └── src │ │ │ ├── app.module.d.ts │ │ │ ├── app.controller.d.ts │ │ │ ├── app.module.js.map │ │ │ ├── app.controller.js.map │ │ │ ├── app.module.js │ │ │ └── app.controller.js │ │ ├── hello-world │ │ └── src │ │ │ ├── app.module.d.ts │ │ │ ├── hello │ │ │ ├── hello.module.d.ts │ │ │ ├── hello.service.d.ts │ │ │ ├── dto │ │ │ │ ├── test.dto.d.ts │ │ │ │ ├── test.dto.js.map │ │ │ │ └── test.dto.js │ │ │ ├── users │ │ │ │ ├── users.service.d.ts │ │ │ │ ├── users.service.js.map │ │ │ │ ├── user-by-id.pipe.d.ts │ │ │ │ ├── user-by-id.pipe.js.map │ │ │ │ ├── users.service.js │ │ │ │ └── user-by-id.pipe.js │ │ │ ├── hello.service.js.map │ │ │ ├── hello.controller.d.ts │ │ │ ├── hello.module.js.map │ │ │ ├── hello.controller.js.map │ │ │ ├── hello.service.js │ │ │ └── hello.module.js │ │ │ ├── host │ │ │ ├── host.module.d.ts │ │ │ ├── host.service.d.ts │ │ │ ├── dto │ │ │ │ ├── test.dto.d.ts │ │ │ │ ├── test.dto.js.map │ │ │ │ └── test.dto.js │ │ │ ├── users │ │ │ │ ├── users.service.d.ts │ │ │ │ ├── users.service.js.map │ │ │ │ ├── user-by-id.pipe.d.ts │ │ │ │ ├── user-by-id.pipe.js.map │ │ │ │ ├── users.service.js │ │ │ │ └── user-by-id.pipe.js │ │ │ ├── host.service.js.map │ │ │ ├── host.module.js.map │ │ │ ├── host.controller.d.ts │ │ │ ├── host.service.js │ │ │ ├── host.controller.js.map │ │ │ └── host.module.js │ │ │ ├── host-array │ │ │ ├── host-array.module.d.ts │ │ │ ├── host-array.service.d.ts │ │ │ ├── dto │ │ │ │ ├── test.dto.d.ts │ │ │ │ ├── test.dto.js.map │ │ │ │ └── test.dto.js │ │ │ ├── users │ │ │ │ ├── users.service.d.ts │ │ │ │ ├── users.service.js.map │ │ │ │ ├── user-by-id.pipe.d.ts │ │ │ │ ├── user-by-id.pipe.js.map │ │ │ │ ├── users.service.js │ │ │ │ └── user-by-id.pipe.js │ │ │ ├── host-array.service.js.map │ │ │ ├── host-array.module.js.map │ │ │ ├── host-array.controller.d.ts │ │ │ ├── host-array.service.js │ │ │ ├── host-array.controller.js.map │ │ │ └── host-array.module.js │ │ │ ├── errors │ │ │ ├── errors.controller.d.ts │ │ │ └── errors.controller.js.map │ │ │ ├── app.module.js.map │ │ │ └── app.module.js │ │ ├── send-files │ │ ├── src │ │ │ ├── app.module.d.ts │ │ │ ├── non-file.d.ts │ │ │ ├── non-file.js.map │ │ │ ├── non-file.js │ │ │ ├── app.module.js.map │ │ │ ├── app.service.d.ts │ │ │ ├── app.controller.d.ts │ │ │ ├── app.module.js │ │ │ ├── app.controller.js.map │ │ │ └── app.service.js.map │ │ └── e2e │ │ │ ├── utils.d.ts │ │ │ ├── utils.js.map │ │ │ └── utils.js │ │ ├── nest-application │ │ ├── sse │ │ │ └── src │ │ │ │ ├── app.module.d.ts │ │ │ │ ├── app.controller.d.ts │ │ │ │ ├── app.module.js.map │ │ │ │ ├── app.controller.js.map │ │ │ │ ├── app.module.js │ │ │ │ └── app.controller.js │ │ ├── get-url │ │ │ ├── src │ │ │ │ ├── app.module.d.ts │ │ │ │ ├── app.service.d.ts │ │ │ │ ├── app.controller.d.ts │ │ │ │ ├── app.service.js.map │ │ │ │ ├── app.module.js.map │ │ │ │ ├── app.controller.js.map │ │ │ │ ├── app.service.js │ │ │ │ ├── app.module.js │ │ │ │ └── app.controller.js │ │ │ └── e2e │ │ │ │ ├── utils.d.ts │ │ │ │ ├── utils.js.map │ │ │ │ └── utils.js │ │ ├── listen │ │ │ └── src │ │ │ │ ├── app.module.d.ts │ │ │ │ ├── app.service.d.ts │ │ │ │ ├── app.controller.d.ts │ │ │ │ ├── app.service.js.map │ │ │ │ ├── app.module.js.map │ │ │ │ ├── app.controller.js.map │ │ │ │ ├── app.service.js │ │ │ │ └── app.module.js │ │ ├── app-locals │ │ │ └── src │ │ │ │ ├── app.module.d.ts │ │ │ │ ├── app.controller.d.ts │ │ │ │ ├── app.module.js.map │ │ │ │ ├── app.controller.js.map │ │ │ │ ├── app.module.js │ │ │ │ └── app.controller.js │ │ ├── raw-body │ │ │ └── src │ │ │ │ ├── express.module.d.ts │ │ │ │ ├── express.controller.d.ts │ │ │ │ ├── express.module.js.map │ │ │ │ ├── express.controller.js.map │ │ │ │ └── express.module.js │ │ ├── use-body-parser │ │ │ └── src │ │ │ │ ├── app.module.d.ts │ │ │ │ ├── app.controller.d.ts │ │ │ │ ├── app.module.js.map │ │ │ │ ├── app.controller.js.map │ │ │ │ └── app.module.js │ │ └── global-prefix │ │ │ └── src │ │ │ ├── app.controller.d.ts │ │ │ ├── app.module.d.ts │ │ │ ├── app.controller.js.map │ │ │ └── app.module.js.map │ │ └── websockets │ │ └── src │ │ ├── app.module.d.ts │ │ ├── ack.gateway.d.ts │ │ ├── error.gateway.d.ts │ │ ├── core.gateway.d.ts │ │ ├── ws-path.gateway.d.ts │ │ ├── ws-path2.gateway.d.ts │ │ ├── namespace.gateway.d.ts │ │ ├── example-path.gateway.d.ts │ │ ├── request.interceptor.d.ts │ │ ├── request.filter.d.ts │ │ ├── server.gateway.d.ts │ │ ├── app.module.js.map │ │ ├── app.gateway.d.ts │ │ ├── ack.gateway.js.map │ │ ├── ws-path.gateway.js.map │ │ ├── ws-path2.gateway.js.map │ │ ├── error.gateway.js.map │ │ ├── example-path.gateway.js.map │ │ ├── namespace.gateway.js.map │ │ ├── core.gateway.js.map │ │ ├── request.interceptor.js.map │ │ ├── request.filter.js.map │ │ ├── server.gateway.js.map │ │ ├── app.gateway.js.map │ │ ├── app.module.js │ │ ├── request.interceptor.js │ │ ├── request.filter.js │ │ ├── ack.gateway.js │ │ ├── error.gateway.js │ │ ├── ws-path.gateway.js │ │ ├── ws-path2.gateway.js │ │ ├── namespace.gateway.js │ │ └── example-path.gateway.js │ ├── tsconfig.build.json │ ├── tests │ ├── send-files │ │ ├── src │ │ │ ├── non-file.ts │ │ │ ├── app.module.ts │ │ │ └── app.controller.ts │ │ ├── tsconfig.json │ │ └── e2e │ │ │ └── utils.ts │ ├── cors │ │ └── src │ │ │ ├── app.controller.ts │ │ │ └── app.module.ts │ ├── hello-world │ │ ├── src │ │ │ ├── hello │ │ │ │ ├── hello.service.ts │ │ │ │ ├── users │ │ │ │ │ ├── users.service.ts │ │ │ │ │ └── user-by-id.pipe.ts │ │ │ │ ├── dto │ │ │ │ │ └── test.dto.ts │ │ │ │ ├── hello.module.ts │ │ │ │ └── hello.controller.ts │ │ │ ├── host │ │ │ │ ├── host.service.ts │ │ │ │ ├── users │ │ │ │ │ ├── users.service.ts │ │ │ │ │ └── user-by-id.pipe.ts │ │ │ │ ├── dto │ │ │ │ │ └── test.dto.ts │ │ │ │ ├── host.module.ts │ │ │ │ └── host.controller.ts │ │ │ ├── host-array │ │ │ │ ├── host-array.service.ts │ │ │ │ ├── users │ │ │ │ │ ├── users.service.ts │ │ │ │ │ └── user-by-id.pipe.ts │ │ │ │ ├── dto │ │ │ │ │ └── test.dto.ts │ │ │ │ ├── host-array.module.ts │ │ │ │ └── host-array.controller.ts │ │ │ ├── app.module.ts │ │ │ └── errors │ │ │ │ └── errors.controller.ts │ │ ├── tsconfig.json │ │ └── e2e │ │ │ ├── guards.spec.ts │ │ │ ├── hyper-express-instance.spec.ts │ │ │ ├── local-pipes.spec.ts │ │ │ └── middleware-execute-order.spec.ts │ ├── nest-application │ │ ├── get-url │ │ │ ├── src │ │ │ │ ├── app.service.ts │ │ │ │ ├── app.module.ts │ │ │ │ └── app.controller.ts │ │ │ ├── e2e │ │ │ │ └── utils.ts │ │ │ └── tsconfig.json │ │ ├── listen │ │ │ ├── src │ │ │ │ ├── app.service.ts │ │ │ │ ├── app.module.ts │ │ │ │ └── app.controller.ts │ │ │ └── e2e │ │ │ │ └── hyper-express-listen.spec.ts │ │ ├── sse │ │ │ ├── src │ │ │ │ ├── app.module.ts │ │ │ │ └── app.controller.ts │ │ │ └── tsconfig.json │ │ ├── app-locals │ │ │ ├── src │ │ │ │ ├── app.module.ts │ │ │ │ └── app.controller.ts │ │ │ ├── e2e │ │ │ │ └── hyper-express-locals.spec.ts │ │ │ └── tsconfig.json │ │ ├── use-body-parser │ │ │ ├── src │ │ │ │ ├── app.module.ts │ │ │ │ └── app.controller.ts │ │ │ └── tsconfig.json │ │ ├── raw-body │ │ │ ├── src │ │ │ │ ├── express.module.ts │ │ │ │ └── express.controller.ts │ │ │ └── tsconfig.json │ │ └── global-prefix │ │ │ ├── src │ │ │ ├── app.controller.ts │ │ │ └── app.module.ts │ │ │ └── tsconfig.json │ ├── websockets │ │ ├── src │ │ │ ├── app.module.ts │ │ │ ├── ack.gateway.ts │ │ │ ├── ws-path.gateway.ts │ │ │ ├── ws-path2.gateway.ts │ │ │ ├── example-path.gateway.ts │ │ │ ├── namespace.gateway.ts │ │ │ ├── error.gateway.ts │ │ │ ├── core.gateway.ts │ │ │ ├── request.interceptor.ts │ │ │ ├── request.filter.ts │ │ │ ├── server.gateway.ts │ │ │ └── app.gateway.ts │ │ ├── tsconfig.json │ │ └── e2e │ │ │ ├── error-gateway.spec.ts │ │ │ └── gateway-ack.spec.ts │ ├── jest-config.json │ └── utils │ │ └── app-init.ts │ ├── src │ ├── app.service.ts │ ├── app.controller.ts │ ├── app.module.ts │ ├── main.ts │ ├── errors.controller.ts │ └── app.controller.spec.ts │ ├── nest-cli.json │ └── tsconfig.json ├── .prettierrc ├── libs ├── platform-hyper-express-ws │ ├── adapters │ │ └── index.ts │ ├── tsconfig.build.json │ ├── index.ts │ ├── tsconfig.json │ └── package.json └── platform-hyper-express │ ├── src │ ├── adapters │ │ ├── index.ts │ │ └── utils │ │ │ └── get-body-parser-options.util.ts │ └── interfaces │ │ ├── index.ts │ │ ├── nest-hyper-express-body-parser.interface.ts │ │ └── nest-hyper-express-body-parser-options.interface.ts │ ├── test │ └── tsconfig.json │ ├── dist │ ├── index.d.ts │ └── index.js │ ├── tsconfig.build.json │ ├── index.ts │ ├── tsconfig.json │ └── package.json ├── .gitmodules ├── renovate.json ├── common ├── config │ └── rush │ │ ├── repo-state.json │ │ ├── cobuild.json │ │ ├── custom-tips.json │ │ ├── rush-plugins.json │ │ ├── .npmrc │ │ ├── .npmrc-publish │ │ └── .pnpmfile.cjs ├── git-hooks │ └── commit-msg.sample └── scripts │ ├── install-run-rushx.js │ └── install-run-rush-pnpm.js ├── .eslintrc.js ├── .gitattributes ├── .github └── workflows │ └── ci.yml └── .gitignore /apps/hyper-express-test-app/dist/src/main.d.ts: -------------------------------------------------------------------------------- 1 | export {}; 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/src/app.module.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AppModule { 2 | } 3 | -------------------------------------------------------------------------------- /libs/platform-hyper-express-ws/adapters/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hyper-express-ws-adapter'; 2 | -------------------------------------------------------------------------------- /libs/platform-hyper-express/src/adapters/index.ts: -------------------------------------------------------------------------------- 1 | export * from './hyper-express-adapter'; 2 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/cors/src/app.module.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AppModule { 2 | } 3 | -------------------------------------------------------------------------------- /libs/platform-hyper-express/test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.spec.json" 3 | } 4 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/app.module.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AppModule { 2 | } 3 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/send-files/src/app.module.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AppModule { 2 | } 3 | -------------------------------------------------------------------------------- /libs/platform-hyper-express/dist/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './src/adapters'; 2 | export * from './src/interfaces'; 3 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/hello.module.d.ts: -------------------------------------------------------------------------------- 1 | export declare class HelloModule { 2 | } 3 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/host.module.d.ts: -------------------------------------------------------------------------------- 1 | export declare class HostModule { 2 | } 3 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/sse/src/app.module.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AppModule { 2 | } 3 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/app.module.d.ts: -------------------------------------------------------------------------------- 1 | export declare class ApplicationModule { 2 | } 3 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/src/app.service.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AppService { 2 | getHello(): string; 3 | } 4 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/get-url/src/app.module.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AppModule { 2 | } 3 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/listen/src/app.module.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AppModule { 2 | } 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "libs/hyper-express"] 2 | path = libs/hyper-express 3 | url = https://github.com/smolinari/hyper-express 4 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/app-locals/src/app.module.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AppModule { 2 | } 3 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/host-array.module.d.ts: -------------------------------------------------------------------------------- 1 | export declare class HostArrayModule { 2 | } 3 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/raw-body/src/express.module.d.ts: -------------------------------------------------------------------------------- 1 | export declare class ExpressModule { 2 | } 3 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/use-body-parser/src/app.module.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AppModule { 2 | } 3 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/ack.gateway.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AckGateway { 2 | onPush(): string; 3 | } 4 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/cors/src/app.controller.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AppController { 2 | getGlobals(): string; 3 | } 4 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/hello.service.d.ts: -------------------------------------------------------------------------------- 1 | export declare class HelloService { 2 | greeting(): string; 3 | } 4 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/host.service.d.ts: -------------------------------------------------------------------------------- 1 | export declare class HostService { 2 | greeting(): string; 3 | } 4 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:recommended" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/get-url/src/app.service.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AppService { 2 | sayHello(): string; 3 | } 4 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/listen/src/app.service.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AppService { 2 | sayHello(): string; 3 | } 4 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /libs/platform-hyper-express-ws/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /libs/platform-hyper-express/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/dto/test.dto.d.ts: -------------------------------------------------------------------------------- 1 | export declare class TestDto { 2 | string: string; 3 | number: number; 4 | } 5 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/host-array.service.d.ts: -------------------------------------------------------------------------------- 1 | export declare class HostArrayService { 2 | greeting(): string; 3 | } 4 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/dto/test.dto.d.ts: -------------------------------------------------------------------------------- 1 | export declare class TestDto { 2 | string: string; 3 | number: number; 4 | } 5 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/dto/test.dto.d.ts: -------------------------------------------------------------------------------- 1 | export declare class TestDto { 2 | string: string; 3 | number: number; 4 | } 5 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/get-url/e2e/utils.d.ts: -------------------------------------------------------------------------------- 1 | export declare let port: number; 2 | export declare function randomPort(): Promise; 3 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/error.gateway.d.ts: -------------------------------------------------------------------------------- 1 | export declare class ErrorGateway { 2 | onPush(client: any, data: any): import("rxjs").Observable; 3 | } 4 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/users/users.service.d.ts: -------------------------------------------------------------------------------- 1 | export declare class UsersService { 2 | findById(id: string): { 3 | id: string; 4 | }; 5 | } 6 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/send-files/src/non-file.d.ts: -------------------------------------------------------------------------------- 1 | export declare class NonFile { 2 | private readonly value; 3 | constructor(value: string); 4 | pipe(): string; 5 | } 6 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/send-files/src/non-file.ts: -------------------------------------------------------------------------------- 1 | export class NonFile { 2 | constructor(private readonly value: string) {} 3 | 4 | pipe() { 5 | return this.value; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /libs/platform-hyper-express-ws/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Nest @platform-ws 3 | * Copyright(c) 2017 - 2023 Kamil Mysliwiec 4 | * https://nestjs.com 5 | * MIT Licensed 6 | */ 7 | 8 | export * from './adapters'; 9 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/core.gateway.d.ts: -------------------------------------------------------------------------------- 1 | export declare class CoreGateway { 2 | onPush(client: any, data: any): { 3 | event: string; 4 | data: any; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | getHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/users/users.service.d.ts: -------------------------------------------------------------------------------- 1 | export declare class UsersService { 2 | findById(id: string): { 3 | id: string; 4 | host: boolean; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/ws-path.gateway.d.ts: -------------------------------------------------------------------------------- 1 | export declare class WsPathGateway { 2 | onPush(client: any, data: any): { 3 | event: string; 4 | data: any; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/ws-path2.gateway.d.ts: -------------------------------------------------------------------------------- 1 | export declare class WsPathGateway2 { 2 | onPush(client: any, data: any): { 3 | event: string; 4 | data: any; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/users/users.service.d.ts: -------------------------------------------------------------------------------- 1 | export declare class UsersService { 2 | findById(id: string): { 3 | id: string; 4 | host: boolean; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/app-locals/src/app.controller.d.ts: -------------------------------------------------------------------------------- 1 | import { Request } from 'express'; 2 | export declare class AppController { 3 | getGlobals(req: Request): Record; 4 | } 5 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/namespace.gateway.d.ts: -------------------------------------------------------------------------------- 1 | export declare class NamespaceGateway { 2 | onPush(client: any, data: any): { 3 | event: string; 4 | data: any; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/src/errors.controller.d.ts: -------------------------------------------------------------------------------- 1 | export declare class ErrorsController { 2 | synchronous(): void; 3 | asynchronous(): Promise; 4 | unexpectedError(): void; 5 | throwError(): void; 6 | } 7 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/example-path.gateway.d.ts: -------------------------------------------------------------------------------- 1 | export declare class ExamplePathGateway { 2 | onPush(client: any, data: any): { 3 | event: string; 4 | data: any; 5 | }; 6 | } 7 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "deleteOutDir": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/cors/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | 3 | @Controller() 4 | export class AppController { 5 | @Get() 6 | getGlobals() { 7 | return ''; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/cors/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | 4 | @Module({ 5 | controllers: [AppController], 6 | }) 7 | export class AppModule {} 8 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/hello/hello.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class HelloService { 5 | greeting(): string { 6 | return 'Hello world!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/hello/users/users.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class UsersService { 5 | findById(id: string) { 6 | return { id }; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/host/host.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class HostService { 5 | greeting(): string { 6 | return 'Host Greeting!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/get-url/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | sayHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/listen/src/app.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class AppService { 5 | sayHello(): string { 6 | return 'Hello World!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/src/app.controller.d.ts: -------------------------------------------------------------------------------- 1 | import { AppService } from './app.service'; 2 | export declare class AppController { 3 | private readonly appService; 4 | constructor(appService: AppService); 5 | getHello(): string; 6 | } 7 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/errors/errors.controller.d.ts: -------------------------------------------------------------------------------- 1 | export declare class ErrorsController { 2 | synchronous(): void; 3 | asynchronous(): Promise; 4 | unexpectedError(): void; 5 | throwError(): void; 6 | } 7 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/sse/src/app.controller.d.ts: -------------------------------------------------------------------------------- 1 | import { MessageEvent } from '@nestjs/common'; 2 | import { Observable } from 'rxjs'; 3 | export declare class AppController { 4 | sse(): Observable; 5 | } 6 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/host/users/users.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class UsersService { 5 | findById(id: string) { 6 | return { id, host: true }; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/sse/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | 4 | @Module({ 5 | controllers: [AppController], 6 | }) 7 | export class AppModule {} 8 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/host-array/host-array.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class HostArrayService { 5 | greeting(): string { 6 | return 'Host Greeting!'; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/host-array/users/users.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class UsersService { 5 | findById(id: string) { 6 | return { id, host: true }; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { ApplicationGateway } from './app.gateway'; 3 | 4 | @Module({ 5 | providers: [ApplicationGateway], 6 | }) 7 | export class ApplicationModule {} 8 | -------------------------------------------------------------------------------- /libs/platform-hyper-express/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Nest @platform-express 3 | * Copyright(c) 2017 - 2023 Kamil Mysliwiec 4 | * https://nestjs.com 5 | * MIT Licensed 6 | */ 7 | 8 | export * from './src/adapters'; 9 | export * from './src/interfaces'; 10 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/app-locals/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | 4 | @Module({ 5 | controllers: [AppController], 6 | }) 7 | export class AppModule {} 8 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/use-body-parser/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | 4 | @Module({ 5 | controllers: [AppController], 6 | }) 7 | export class AppModule {} 8 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/raw-body/src/express.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { ExpressController } from './express.controller'; 3 | 4 | @Module({ 5 | controllers: [ExpressController], 6 | }) 7 | export class ExpressModule {} 8 | -------------------------------------------------------------------------------- /common/config/rush/repo-state.json: -------------------------------------------------------------------------------- 1 | // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. 2 | { 3 | "pnpmShrinkwrapHash": "69767f2f88d488fbed7cc70ebabe492d40af49e2", 4 | "preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f" 5 | } 6 | -------------------------------------------------------------------------------- /libs/platform-hyper-express/src/interfaces/index.ts: -------------------------------------------------------------------------------- 1 | export * from './nest-hyper-express-application.interface'; 2 | export { NestHyperExpressBodyParserOptions } from './nest-hyper-express-body-parser-options.interface'; 3 | export * from './nest-hyper-express-body-parser.interface'; 4 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/get-url/src/app.controller.d.ts: -------------------------------------------------------------------------------- 1 | import { AppService } from './app.service'; 2 | export declare class AppController { 3 | private readonly appService; 4 | constructor(appService: AppService); 5 | getHello(): string; 6 | } 7 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/listen/src/app.controller.d.ts: -------------------------------------------------------------------------------- 1 | import { AppService } from './app.service'; 2 | export declare class AppController { 3 | private readonly appService; 4 | constructor(appService: AppService); 5 | getHello(): string; 6 | } 7 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/global-prefix/src/app.controller.d.ts: -------------------------------------------------------------------------------- 1 | export declare class AppController { 2 | getHello(req: any): string; 3 | getParams(req: any): any; 4 | getHealth(): string; 5 | getTest(): string; 6 | postTest(): string; 7 | } 8 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/request.interceptor.d.ts: -------------------------------------------------------------------------------- 1 | import { CallHandler, ExecutionContext } from '@nestjs/common'; 2 | export declare class RequestInterceptor { 3 | intercept(context: ExecutionContext, next: CallHandler): import("rxjs").Observable; 4 | } 5 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/hello/dto/test.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsString, IsNotEmpty, IsNumber } from 'class-validator'; 2 | 3 | export class TestDto { 4 | @IsString() 5 | @IsNotEmpty() 6 | string: string; 7 | 8 | @IsNumber() 9 | number: number; 10 | } 11 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/host/dto/test.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsString, IsNotEmpty, IsNumber } from 'class-validator'; 2 | 3 | export class TestDto { 4 | @IsString() 5 | @IsNotEmpty() 6 | string: string; 7 | 8 | @IsNumber() 9 | number: number; 10 | } 11 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/host-array/dto/test.dto.ts: -------------------------------------------------------------------------------- 1 | import { IsString, IsNotEmpty, IsNumber } from 'class-validator'; 2 | 3 | export class TestDto { 4 | @IsString() 5 | @IsNotEmpty() 6 | string: string; 7 | 8 | @IsNumber() 9 | number: number; 10 | } 11 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/jest-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": [ 3 | "js", 4 | "json", 5 | "ts" 6 | ], 7 | "rootDir": ".", 8 | "testEnvironment": "node", 9 | "testRegex": ".spec.ts$", 10 | "transform": { 11 | "^.+\\.(t)s$": "ts-jest" 12 | } 13 | } -------------------------------------------------------------------------------- /libs/platform-hyper-express/src/interfaces/nest-hyper-express-body-parser.interface.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Interface defining possible body parser types, to be used with `NestExpressApplication.useBodyParser()`. 3 | */ 4 | export type NestHyperExpressBodyParserType = 'json' | 'urlencoded' | 'text' | 'raw'; 5 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/src/ack.gateway.ts: -------------------------------------------------------------------------------- 1 | 2 | import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets'; 3 | 4 | @WebSocketGateway(8080) 5 | export class AckGateway { 6 | @SubscribeMessage('push') 7 | onPush() { 8 | return 'pong'; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/src/app.service.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.service.js","sourceRoot":"","sources":["../../src/app.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,QAAQ;QACN,OAAO,cAAc,CAAC;IACxB,CAAC;CACF,CAAA;AAJY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;GACA,UAAU,CAItB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/request.filter.d.ts: -------------------------------------------------------------------------------- 1 | import { ArgumentsHost, ExceptionFilter } from '@nestjs/common'; 2 | import { WsException } from '@nestjs/websockets'; 3 | export declare class RequestFilter implements ExceptionFilter { 4 | catch(exception: WsException, host: ArgumentsHost): void; 5 | } 6 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/send-files/src/non-file.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"non-file.js","sourceRoot":"","sources":["../../../../tests/send-files/src/non-file.ts"],"names":[],"mappings":";;;AAAA,MAAa,OAAO;IAClB,YAA6B,KAAa;QAAb,UAAK,GAAL,KAAK,CAAQ;IAAG,CAAC;IAE9C,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AAND,0BAMC"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/send-files/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | 5 | @Module({ 6 | controllers: [AppController], 7 | providers: [AppService], 8 | }) 9 | export class AppModule {} 10 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/raw-body/src/express.controller.d.ts: -------------------------------------------------------------------------------- 1 | import { RawBodyRequest } from '@nestjs/common'; 2 | import { Request } from 'express'; 3 | export declare class ExpressController { 4 | getRawBody(req: RawBodyRequest): { 5 | parsed: any; 6 | raw: string; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/server.gateway.d.ts: -------------------------------------------------------------------------------- 1 | export declare class ServerGateway { 2 | onPush(client: any, data: any): { 3 | event: string; 4 | data: any; 5 | }; 6 | getPathCalled(client: any, data: any): { 7 | event: string; 8 | data: any; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/get-url/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | 5 | @Module({ 6 | controllers: [AppController], 7 | providers: [AppService], 8 | }) 9 | export class AppModule {} 10 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/listen/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | 5 | @Module({ 6 | controllers: [AppController], 7 | providers: [AppService], 8 | }) 9 | export class AppModule {} 10 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/use-body-parser/src/app.controller.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | import { RawBodyRequest } from '@nestjs/common'; 3 | import { IncomingMessage } from 'http'; 4 | export declare class AppController { 5 | index(req: RawBodyRequest): { 6 | raw: string; 7 | }; 8 | } 9 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/app-locals/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get, Req } from '@nestjs/common'; 2 | import { Request } from 'express'; 3 | 4 | @Controller() 5 | export class AppController { 6 | @Get() 7 | getGlobals(@Req() req: Request): Record { 8 | return req.app.locals; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/cors/src/app.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../../../tests/cors/src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AAK1C,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAHrB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,8BAAa,CAAC;KAC7B,CAAC;GACW,SAAS,CAAG"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/dto/test.dto.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"test.dto.js","sourceRoot":"","sources":["../../../../../../tests/hello-world/src/host/dto/test.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AAEjE,MAAa,OAAO;CAOnB;AAPD,0BAOC;AAJC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uCACE;AAGf;IADC,IAAA,0BAAQ,GAAE;;uCACI"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/global-prefix/src/app.module.d.ts: -------------------------------------------------------------------------------- 1 | import { MiddlewareConsumer } from '@nestjs/common'; 2 | export declare const MIDDLEWARE_VALUE = "middleware"; 3 | export declare const MIDDLEWARE_PARAM_VALUE = "middleware_param"; 4 | export declare class AppModule { 5 | configure(consumer: MiddlewareConsumer): void; 6 | } 7 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/src/main.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":";;AAAA,uCAA2C;AAC3C,6CAAyC;AACzC,mEAGgC;AAEhC,KAAK,UAAU,SAAS;IACtB,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAClC,sBAAS,EACT,IAAI,4CAAmB,EAAE,CAC1B,CAAC;IACF,MAAM,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AACD,SAAS,EAAE,CAAC"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/dto/test.dto.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"test.dto.js","sourceRoot":"","sources":["../../../../../../tests/hello-world/src/hello/dto/test.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AAEjE,MAAa,OAAO;CAOnB;AAPD,0BAOC;AAJC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uCACE;AAGf;IADC,IAAA,0BAAQ,GAAE;;uCACI"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/dto/test.dto.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"test.dto.js","sourceRoot":"","sources":["../../../../../../tests/hello-world/src/host-array/dto/test.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AAEjE,MAAa,OAAO;CAOnB;AAPD,0BAOC;AAJC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;uCACE;AAGf;IADC,IAAA,0BAAQ,GAAE;;uCACI"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller() 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get('hello') 9 | getHello(): string { 10 | return this.appService.getHello(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/host.service.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"host.service.js","sourceRoot":"","sources":["../../../../../tests/hello-world/src/host/host.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,QAAQ;QACN,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF,CAAA;AAJY,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAU,GAAE;GACA,WAAW,CAIvB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/app.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../../../tests/websockets/src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAmD;AAK5C,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAAG,CAAA;AAApB,8CAAiB;4BAAjB,iBAAiB;IAH7B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,gCAAkB,CAAC;KAChC,CAAC;GACW,iBAAiB,CAAG"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/src/ws-path.gateway.ts: -------------------------------------------------------------------------------- 1 | import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets'; 2 | 3 | @WebSocketGateway({ 4 | path: '/ws-path', 5 | }) 6 | export class WsPathGateway { 7 | @SubscribeMessage('push') 8 | onPush(client, data) { 9 | return { 10 | event: 'pop', 11 | data, 12 | }; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/src/ws-path2.gateway.ts: -------------------------------------------------------------------------------- 1 | import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets'; 2 | 3 | @WebSocketGateway({ 4 | path: '/ws-path', 5 | }) 6 | export class WsPathGateway2 { 7 | @SubscribeMessage('push') 8 | onPush(client, data) { 9 | return { 10 | event: 'pop', 11 | data, 12 | }; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/hello.service.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"hello.service.js","sourceRoot":"","sources":["../../../../../tests/hello-world/src/hello/hello.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,QAAQ;QACN,OAAO,cAAc,CAAC;IACxB,CAAC;CACF,CAAA;AAJY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;GACA,YAAY,CAIxB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/app.gateway.d.ts: -------------------------------------------------------------------------------- 1 | export declare class ApplicationGateway { 2 | onPush(data: any): { 3 | event: string; 4 | data: any; 5 | }; 6 | getPathCalled(client: any, data: any): { 7 | event: string; 8 | data: any; 9 | }; 10 | getPathCalledWithError(): import("rxjs").Observable; 11 | } 12 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/get-url/src/app.service.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.service.js","sourceRoot":"","sources":["../../../../../tests/nest-application/get-url/src/app.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,QAAQ;QACN,OAAO,cAAc,CAAC;IACxB,CAAC;CACF,CAAA;AAJY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;GACA,UAAU,CAItB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/listen/src/app.service.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.service.js","sourceRoot":"","sources":["../../../../../tests/nest-application/listen/src/app.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,UAAU,GAAhB,MAAM,UAAU;IACrB,QAAQ;QACN,OAAO,cAAc,CAAC;IACxB,CAAC;CACF,CAAA;AAJY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;GACA,UAAU,CAItB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/sse/src/app.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../../../../tests/nest-application/sse/src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AAK1C,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAHrB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,8BAAa,CAAC;KAC7B,CAAC;GACW,SAAS,CAAG"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/src/example-path.gateway.ts: -------------------------------------------------------------------------------- 1 | import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets'; 2 | 3 | @WebSocketGateway({ 4 | path: '/example', 5 | }) 6 | export class ExamplePathGateway { 7 | @SubscribeMessage('push') 8 | onPush(client, data) { 9 | return { 10 | event: 'pop', 11 | data, 12 | }; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/src/namespace.gateway.ts: -------------------------------------------------------------------------------- 1 | import { WebSocketGateway, SubscribeMessage } from '@nestjs/websockets'; 2 | 3 | @WebSocketGateway(8080, { 4 | namespace: 'test', 5 | }) 6 | export class NamespaceGateway { 7 | @SubscribeMessage('push') 8 | onPush(client, data) { 9 | return { 10 | event: 'pop', 11 | data, 12 | }; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/cors/src/app.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../../../tests/cors/src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AAG1C,IAAM,aAAa,GAAnB,MAAM,aAAa;IAExB,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;CACF,CAAA;AALY,sCAAa;AAExB;IADC,IAAA,YAAG,GAAE;;;;+CAGL;wBAJU,aAAa;IADzB,IAAA,mBAAU,GAAE;GACA,aAAa,CAKzB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { HelloModule } from './hello/hello.module'; 3 | import { HostArrayModule } from './host-array/host-array.module'; 4 | import { HostModule } from './host/host.module'; 5 | 6 | @Module({ 7 | imports: [HelloModule, HostModule, HostArrayModule], 8 | }) 9 | export class AppModule {} 10 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/send-files/src/non-file.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.NonFile = void 0; 4 | class NonFile { 5 | constructor(value) { 6 | this.value = value; 7 | } 8 | pipe() { 9 | return this.value; 10 | } 11 | } 12 | exports.NonFile = NonFile; 13 | //# sourceMappingURL=non-file.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/get-url/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller() 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get() 9 | getHello(): string { 10 | return this.appService.sayHello(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/listen/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | import { AppService } from './app.service'; 3 | 4 | @Controller() 5 | export class AppController { 6 | constructor(private readonly appService: AppService) {} 7 | 8 | @Get() 9 | getHello(): string { 10 | return this.appService.sayHello(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/app-locals/src/app.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../../../../tests/nest-application/app-locals/src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AAK1C,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAHrB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,8BAAa,CAAC;KAC7B,CAAC;GACW,SAAS,CAAG"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/send-files/src/app.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../../../tests/send-files/src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AACjD,+CAA2C;AAMpC,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAJrB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,CAAC;KACxB,CAAC;GACW,SAAS,CAAG"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | import { ErrorsController } from './errors.controller'; 5 | 6 | @Module({ 7 | imports: [], 8 | controllers: [AppController, ErrorsController], 9 | providers: [AppService], 10 | }) 11 | export class AppModule {} 12 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/src/app.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AACjD,+CAA2C;AAC3C,2DAAuD;AAOhD,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IALrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,CAAC,8BAAa,EAAE,oCAAgB,CAAC;QAC9C,SAAS,EAAE,CAAC,wBAAU,CAAC;KACxB,CAAC;GACW,SAAS,CAAG"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/app.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../../../tests/hello-world/src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,uDAAmD;AACnD,sEAAiE;AACjE,oDAAgD;AAKzC,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAHrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,0BAAW,EAAE,wBAAU,EAAE,mCAAe,CAAC;KACpD,CAAC;GACW,SAAS,CAAG"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/raw-body/src/express.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"express.module.js","sourceRoot":"","sources":["../../../../../tests/nest-application/raw-body/src/express.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6DAAyD;AAKlD,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAHzB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,sCAAiB,CAAC;KACjC,CAAC;GACW,aAAa,CAAG"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/use-body-parser/src/app.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../../../../tests/nest-application/use-body-parser/src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AAK1C,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAHrB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,8BAAa,CAAC;KAC7B,CAAC;GACW,SAAS,CAAG"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/host/host.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { HostController } from './host.controller'; 3 | import { HostService } from './host.service'; 4 | import { UsersService } from './users/users.service'; 5 | 6 | @Module({ 7 | controllers: [HostController], 8 | providers: [HostService, UsersService], 9 | }) 10 | export class HostModule {} 11 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/use-body-parser/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Post, Req, RawBodyRequest } from '@nestjs/common'; 2 | import { IncomingMessage } from 'http'; 3 | 4 | @Controller() 5 | export class AppController { 6 | @Post() 7 | index(@Req() req: RawBodyRequest) { 8 | return { 9 | raw: req.rawBody?.toString(), 10 | }; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/src/error.gateway.ts: -------------------------------------------------------------------------------- 1 | import { 2 | SubscribeMessage, 3 | WebSocketGateway, 4 | WsException, 5 | } from '@nestjs/websockets'; 6 | import { throwError } from 'rxjs'; 7 | 8 | @WebSocketGateway(8080) 9 | export class ErrorGateway { 10 | @SubscribeMessage('push') 11 | onPush(client, data) { 12 | return throwError(() => new WsException('test')); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/users/users.service.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"users.service.js","sourceRoot":"","sources":["../../../../../../tests/hello-world/src/hello/users/users.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,QAAQ,CAAC,EAAU;QACjB,OAAO,EAAE,EAAE,EAAE,CAAC;IAChB,CAAC;CACF,CAAA;AAJY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;GACA,YAAY,CAIxB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/host-array.service.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"host-array.service.js","sourceRoot":"","sources":["../../../../../tests/hello-world/src/host-array/host-array.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,QAAQ;QACN,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF,CAAA;AAJY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;GACA,gBAAgB,CAI5B"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/ack.gateway.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ack.gateway.js","sourceRoot":"","sources":["../../../../tests/websockets/src/ack.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mDAAwE;AAGjE,IAAM,UAAU,GAAhB,MAAM,UAAU;IAErB,MAAM;QACJ,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AALY,gCAAU;AAErB;IADC,IAAA,6BAAgB,EAAC,MAAM,CAAC;;;;wCAGxB;qBAJU,UAAU;IADtB,IAAA,6BAAgB,EAAC,IAAI,CAAC;GACV,UAAU,CAKtB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/hello/hello.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { HelloController } from './hello.controller'; 3 | import { HelloService } from './hello.service'; 4 | import { UsersService } from './users/users.service'; 5 | 6 | @Module({ 7 | controllers: [HelloController], 8 | providers: [HelloService, UsersService], 9 | }) 10 | export class HelloModule {} 11 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/users/users.service.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"users.service.js","sourceRoot":"","sources":["../../../../../../tests/hello-world/src/host/users/users.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,QAAQ,CAAC,EAAU;QACjB,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;CACF,CAAA;AAJY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;GACA,YAAY,CAIxB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/raw-body/src/express.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Post, RawBodyRequest, Req } from '@nestjs/common'; 2 | import { Request } from 'express'; 3 | 4 | @Controller() 5 | export class ExpressController { 6 | @Post() 7 | getRawBody(@Req() req: RawBodyRequest) { 8 | return { 9 | parsed: req.body, 10 | raw: req.rawBody.toString(), 11 | }; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/listen/src/app.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../../../../tests/nest-application/listen/src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AACjD,+CAA2C;AAMpC,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAJrB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,CAAC;KACxB,CAAC;GACW,SAAS,CAAG"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/sse/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, MessageEvent, Sse } from '@nestjs/common'; 2 | import { interval, map, Observable } from 'rxjs'; 3 | 4 | @Controller() 5 | export class AppController { 6 | @Sse('sse') 7 | sse(): Observable { 8 | return interval(1000).pipe( 9 | map(_ => ({ data: { hello: 'world' } }) as MessageEvent), 10 | ); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/get-url/src/app.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../../../../tests/nest-application/get-url/src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AACjD,+CAA2C;AAMpC,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAJrB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,8BAAa,CAAC;QAC5B,SAAS,EAAE,CAAC,wBAAU,CAAC;KACxB,CAAC;GACW,SAAS,CAAG"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/src/core.gateway.ts: -------------------------------------------------------------------------------- 1 | import { 2 | ConnectedSocket, 3 | MessageBody, 4 | SubscribeMessage, 5 | WebSocketGateway, 6 | } from '@nestjs/websockets'; 7 | 8 | @WebSocketGateway(8090) 9 | export class CoreGateway { 10 | @SubscribeMessage('push') 11 | onPush(@ConnectedSocket() client, @MessageBody() data) { 12 | return { 13 | event: 'pop', 14 | data, 15 | }; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/users/users.service.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"users.service.js","sourceRoot":"","sources":["../../../../../../tests/hello-world/src/host-array/users/users.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,QAAQ,CAAC,EAAU;QACjB,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5B,CAAC;CACF,CAAA;AAJY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;GACA,YAAY,CAIxB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/hello.controller.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import { HelloService } from './hello.service'; 3 | export declare class HelloController { 4 | private readonly helloService; 5 | constructor(helloService: HelloService); 6 | greeting(): string; 7 | asyncGreeting(): Promise; 8 | streamGreeting(): Observable; 9 | localPipe(user: any): any; 10 | } 11 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/host.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"host.module.js","sourceRoot":"","sources":["../../../../../tests/hello-world/src/host/host.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,uDAAmD;AACnD,iDAA6C;AAC7C,yDAAqD;AAM9C,IAAM,UAAU,GAAhB,MAAM,UAAU;CAAG,CAAA;AAAb,gCAAU;qBAAV,UAAU;IAJtB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,gCAAc,CAAC;QAC7B,SAAS,EAAE,CAAC,0BAAW,EAAE,4BAAY,CAAC;KACvC,CAAC;GACW,UAAU,CAAG"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/hello.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"hello.module.js","sourceRoot":"","sources":["../../../../../tests/hello-world/src/hello/hello.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,yDAAqD;AACrD,mDAA+C;AAC/C,yDAAqD;AAM9C,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAG,CAAA;AAAd,kCAAW;sBAAX,WAAW;IAJvB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,kCAAe,CAAC;QAC9B,SAAS,EAAE,CAAC,4BAAY,EAAE,4BAAY,CAAC;KACxC,CAAC;GACW,WAAW,CAAG"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/host-array/host-array.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { HostArrayController } from './host-array.controller'; 3 | import { HostArrayService } from './host-array.service'; 4 | import { UsersService } from './users/users.service'; 5 | 6 | @Module({ 7 | controllers: [HostArrayController], 8 | providers: [HostArrayService, UsersService], 9 | }) 10 | export class HostArrayModule {} 11 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/src/request.interceptor.ts: -------------------------------------------------------------------------------- 1 | import { CallHandler, ExecutionContext, Injectable } from '@nestjs/common'; 2 | 3 | @Injectable() 4 | export class RequestInterceptor { 5 | intercept(context: ExecutionContext, next: CallHandler) { 6 | const client = context.switchToWs().getClient(); 7 | const pattern = context.switchToWs().getPattern(); 8 | client.pattern = pattern; 9 | return next.handle(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/users/user-by-id.pipe.d.ts: -------------------------------------------------------------------------------- 1 | import { PipeTransform, ArgumentMetadata } from '@nestjs/common'; 2 | import { UsersService } from './users.service'; 3 | export declare class UserByIdPipe implements PipeTransform { 4 | private readonly usersService; 5 | constructor(usersService: UsersService); 6 | transform(value: string, metadata: ArgumentMetadata): { 7 | id: string; 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/src/main.ts: -------------------------------------------------------------------------------- 1 | import { NestFactory } from '@nestjs/core'; 2 | import { AppModule } from './app.module'; 3 | import { 4 | HyperExpressAdapter, 5 | NestHyperExpressApplication, 6 | } from 'platform-hyper-express'; 7 | 8 | async function bootstrap() { 9 | const app = await NestFactory.create( 10 | AppModule, 11 | new HyperExpressAdapter(), 12 | ); 13 | await app.listen(3001); 14 | } 15 | bootstrap(); 16 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/src/app.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,+CAA2C;AAGpC,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAGvD,QAAQ;QACN,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;CACF,CAAA;AAPY,sCAAa;AAIxB;IADC,IAAA,YAAG,EAAC,OAAO,CAAC;;;;6CAGZ;wBANU,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAE8B,wBAAU;GADxC,aAAa,CAOzB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/host-array.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"host-array.module.js","sourceRoot":"","sources":["../../../../../tests/hello-world/src/host-array/host-array.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,mEAA8D;AAC9D,6DAAwD;AACxD,yDAAqD;AAM9C,IAAM,eAAe,GAArB,MAAM,eAAe;CAAG,CAAA;AAAlB,0CAAe;0BAAf,eAAe;IAJ3B,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,2CAAmB,CAAC;QAClC,SAAS,EAAE,CAAC,qCAAgB,EAAE,4BAAY,CAAC;KAC5C,CAAC;GACW,eAAe,CAAG"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/users/user-by-id.pipe.d.ts: -------------------------------------------------------------------------------- 1 | import { PipeTransform, ArgumentMetadata } from '@nestjs/common'; 2 | import { UsersService } from './users.service'; 3 | export declare class UserByIdPipe implements PipeTransform { 4 | private readonly usersService; 5 | constructor(usersService: UsersService); 6 | transform(value: string, metadata: ArgumentMetadata): { 7 | id: string; 8 | host: boolean; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/hello/users/user-by-id.pipe.ts: -------------------------------------------------------------------------------- 1 | import { PipeTransform, Injectable, ArgumentMetadata } from '@nestjs/common'; 2 | import { UsersService } from './users.service'; 3 | 4 | @Injectable() 5 | export class UserByIdPipe implements PipeTransform { 6 | constructor(private readonly usersService: UsersService) {} 7 | 8 | transform(value: string, metadata: ArgumentMetadata) { 9 | return this.usersService.findById(value); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/host/users/user-by-id.pipe.ts: -------------------------------------------------------------------------------- 1 | import { PipeTransform, Injectable, ArgumentMetadata } from '@nestjs/common'; 2 | import { UsersService } from './users.service'; 3 | 4 | @Injectable() 5 | export class UserByIdPipe implements PipeTransform { 6 | constructor(private readonly usersService: UsersService) {} 7 | 8 | transform(value: string, metadata: ArgumentMetadata) { 9 | return this.usersService.findById(value); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/users/user-by-id.pipe.d.ts: -------------------------------------------------------------------------------- 1 | import { PipeTransform, ArgumentMetadata } from '@nestjs/common'; 2 | import { UsersService } from './users.service'; 3 | export declare class UserByIdPipe implements PipeTransform { 4 | private readonly usersService; 5 | constructor(usersService: UsersService); 6 | transform(value: string, metadata: ArgumentMetadata): { 7 | id: string; 8 | host: boolean; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/send-files/e2e/utils.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | import { INestApplication } from '@nestjs/common'; 4 | import { IncomingMessage } from 'http'; 5 | import { URL } from 'url'; 6 | export declare const getHttpBaseOptions: (app: INestApplication) => Promise; 7 | export declare const sendCanceledHttpRequest: (url: URL) => Promise; 8 | export declare const sendHttpRequest: (url: URL) => Promise; 9 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/host-array/users/user-by-id.pipe.ts: -------------------------------------------------------------------------------- 1 | import { PipeTransform, Injectable, ArgumentMetadata } from '@nestjs/common'; 2 | import { UsersService } from './users.service'; 3 | 4 | @Injectable() 5 | export class UserByIdPipe implements PipeTransform { 6 | constructor(private readonly usersService: UsersService) {} 7 | 8 | transform(value: string, metadata: ArgumentMetadata) { 9 | return this.usersService.findById(value); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/host.controller.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import { HostService } from './host.service'; 3 | export declare class HostController { 4 | private readonly hostService; 5 | constructor(hostService: HostService); 6 | greeting(tenant: string): string; 7 | asyncGreeting(tenant: string): Promise; 8 | streamGreeting(tenant: string): Observable; 9 | localPipe(user: any, tenant: string): any; 10 | } 11 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/ws-path.gateway.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ws-path.gateway.js","sourceRoot":"","sources":["../../../../tests/websockets/src/ws-path.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAwE;AAKjE,IAAM,aAAa,GAAnB,MAAM,aAAa;IAExB,MAAM,CAAC,MAAM,EAAE,IAAI;QACjB,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,IAAI;SACL,CAAC;IACJ,CAAC;CACF,CAAA;AARY,sCAAa;AAExB;IADC,IAAA,6BAAgB,EAAC,MAAM,CAAC;;;;2CAMxB;wBAPU,aAAa;IAHzB,IAAA,6BAAgB,EAAC;QAChB,IAAI,EAAE,UAAU;KACjB,CAAC;GACW,aAAa,CAQzB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/app-locals/src/app.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../../../../tests/nest-application/app-locals/src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAsD;AAI/C,IAAM,aAAa,GAAnB,MAAM,aAAa;IAExB,UAAU,CAAQ,GAAY;QAC5B,OAAO,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC;IACxB,CAAC;CACF,CAAA;AALY,sCAAa;AAExB;IADC,IAAA,YAAG,GAAE;IACM,WAAA,IAAA,YAAG,GAAE,CAAA;;;;+CAEhB;wBAJU,aAAa;IADzB,IAAA,mBAAU,GAAE;GACA,aAAa,CAKzB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/ws-path2.gateway.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"ws-path2.gateway.js","sourceRoot":"","sources":["../../../../tests/websockets/src/ws-path2.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAwE;AAKjE,IAAM,cAAc,GAApB,MAAM,cAAc;IAEzB,MAAM,CAAC,MAAM,EAAE,IAAI;QACjB,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,IAAI;SACL,CAAC;IACJ,CAAC;CACF,CAAA;AARY,wCAAc;AAEzB;IADC,IAAA,6BAAgB,EAAC,MAAM,CAAC;;;;4CAMxB;yBAPU,cAAc;IAH1B,IAAA,6BAAgB,EAAC;QAChB,IAAI,EAAE,UAAU;KACjB,CAAC;GACW,cAAc,CAQ1B"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/error.gateway.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"error.gateway.js","sourceRoot":"","sources":["../../../../tests/websockets/src/error.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAI4B;AAC5B,+BAAkC;AAG3B,IAAM,YAAY,GAAlB,MAAM,YAAY;IAEvB,MAAM,CAAC,MAAM,EAAE,IAAI;QACjB,OAAO,IAAA,iBAAU,EAAC,GAAG,EAAE,CAAC,IAAI,wBAAW,CAAC,MAAM,CAAC,CAAC,CAAC;IACnD,CAAC;CACF,CAAA;AALY,oCAAY;AAEvB;IADC,IAAA,6BAAgB,EAAC,MAAM,CAAC;;;;0CAGxB;uBAJU,YAAY;IADxB,IAAA,6BAAgB,EAAC,IAAI,CAAC;GACV,YAAY,CAKxB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/get-url/e2e/utils.ts: -------------------------------------------------------------------------------- 1 | import * as net from 'net'; 2 | 3 | export let port: number; 4 | 5 | export async function randomPort(): Promise { 6 | const server = net.createServer(); 7 | return new Promise((resolve, reject) => { 8 | if (port) { 9 | resolve(port); 10 | } 11 | server.listen(0, () => { 12 | port = (server.address() as net.AddressInfo).port; 13 | server.close(); 14 | resolve(port); 15 | }); 16 | }); 17 | } 18 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/example-path.gateway.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"example-path.gateway.js","sourceRoot":"","sources":["../../../../tests/websockets/src/example-path.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAwE;AAKjE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAE7B,MAAM,CAAC,MAAM,EAAE,IAAI;QACjB,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,IAAI;SACL,CAAC;IACJ,CAAC;CACF,CAAA;AARY,gDAAkB;AAE7B;IADC,IAAA,6BAAgB,EAAC,MAAM,CAAC;;;;gDAMxB;6BAPU,kBAAkB;IAH9B,IAAA,6BAAgB,EAAC;QAChB,IAAI,EAAE,UAAU;KACjB,CAAC;GACW,kBAAkB,CAQ9B"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/namespace.gateway.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"namespace.gateway.js","sourceRoot":"","sources":["../../../../tests/websockets/src/namespace.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAwE;AAKjE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAE3B,MAAM,CAAC,MAAM,EAAE,IAAI;QACjB,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,IAAI;SACL,CAAC;IACJ,CAAC;CACF,CAAA;AARY,4CAAgB;AAE3B;IADC,IAAA,6BAAgB,EAAC,MAAM,CAAC;;;;8CAMxB;2BAPU,gBAAgB;IAH5B,IAAA,6BAAgB,EAAC,IAAI,EAAE;QACtB,SAAS,EAAE,MAAM;KAClB,CAAC;GACW,gBAAgB,CAQ5B"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/src/main.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | const core_1 = require("@nestjs/core"); 4 | const app_module_1 = require("./app.module"); 5 | const platform_hyper_express_1 = require("platform-hyper-express"); 6 | async function bootstrap() { 7 | const app = await core_1.NestFactory.create(app_module_1.AppModule, new platform_hyper_express_1.HyperExpressAdapter()); 8 | await app.listen(3001); 9 | } 10 | bootstrap(); 11 | //# sourceMappingURL=main.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/host-array.controller.d.ts: -------------------------------------------------------------------------------- 1 | import { Observable } from 'rxjs'; 2 | import { HostArrayService } from './host-array.service'; 3 | export declare class HostArrayController { 4 | private readonly hostService; 5 | constructor(hostService: HostArrayService); 6 | greeting(tenant: string): string; 7 | asyncGreeting(tenant: string): Promise; 8 | streamGreeting(tenant: string): Observable; 9 | localPipe(user: any, tenant: string): any; 10 | } 11 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/listen/src/app.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../../../../tests/nest-application/listen/src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,+CAA2C;AAGpC,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAGvD,QAAQ;QACN,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;CACF,CAAA;AAPY,sCAAa;AAIxB;IADC,IAAA,YAAG,GAAE;;;;6CAGL;wBANU,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAE8B,wBAAU;GADxC,aAAa,CAOzB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/users/user-by-id.pipe.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"user-by-id.pipe.js","sourceRoot":"","sources":["../../../../../../tests/hello-world/src/hello/users/user-by-id.pipe.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA6E;AAC7E,mDAA+C;AAGxC,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAE3D,SAAS,CAAC,KAAa,EAAE,QAA0B;QACjD,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;CACF,CAAA;AANY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAEgC,4BAAY;GAD5C,YAAY,CAMxB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/users/user-by-id.pipe.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"user-by-id.pipe.js","sourceRoot":"","sources":["../../../../../../tests/hello-world/src/host/users/user-by-id.pipe.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA6E;AAC7E,mDAA+C;AAGxC,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAE3D,SAAS,CAAC,KAAa,EAAE,QAA0B;QACjD,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;CACF,CAAA;AANY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAEgC,4BAAY;GAD5C,YAAY,CAMxB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/get-url/src/app.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../../../../tests/nest-application/get-url/src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,+CAA2C;AAGpC,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAGvD,QAAQ;QACN,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;IACpC,CAAC;CACF,CAAA;AAPY,sCAAa;AAIxB;IADC,IAAA,YAAG,GAAE;;;;6CAGL;wBANU,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAE8B,wBAAU;GADxC,aAAa,CAOzB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/use-body-parser/src/app.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../../../../tests/nest-application/use-body-parser/src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAuE;AAIhE,IAAM,aAAa,GAAnB,MAAM,aAAa;IAExB,KAAK,CAAQ,GAAoC;QAC/C,OAAO;YACL,GAAG,EAAE,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE;SAC7B,CAAC;IACJ,CAAC;CACF,CAAA;AAPY,sCAAa;AAExB;IADC,IAAA,aAAI,GAAE;IACA,WAAA,IAAA,YAAG,GAAE,CAAA;;;;0CAIX;wBANU,aAAa;IADzB,IAAA,mBAAU,GAAE;GACA,aAAa,CAOzB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/core.gateway.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"core.gateway.js","sourceRoot":"","sources":["../../../../tests/websockets/src/core.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAK4B;AAGrB,IAAM,WAAW,GAAjB,MAAM,WAAW;IAEtB,MAAM,CAAoB,MAAM,EAAiB,IAAI;QACnD,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,IAAI;SACL,CAAC;IACJ,CAAC;CACF,CAAA;AARY,kCAAW;AAEtB;IADC,IAAA,6BAAgB,EAAC,MAAM,CAAC;IACjB,WAAA,IAAA,4BAAe,GAAE,CAAA;IAAU,WAAA,IAAA,wBAAW,GAAE,CAAA;;;;yCAK/C;sBAPU,WAAW;IADvB,IAAA,6BAAgB,EAAC,IAAI,CAAC;GACV,WAAW,CAQvB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/users/user-by-id.pipe.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"user-by-id.pipe.js","sourceRoot":"","sources":["../../../../../../tests/hello-world/src/host-array/users/user-by-id.pipe.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA6E;AAC7E,mDAA+C;AAGxC,IAAM,YAAY,GAAlB,MAAM,YAAY;IACvB,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAE3D,SAAS,CAAC,KAAa,EAAE,QAA0B;QACjD,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;CACF,CAAA;AANY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;qCAEgC,4BAAY;GAD5C,YAAY,CAMxB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/src/request.filter.ts: -------------------------------------------------------------------------------- 1 | import { ArgumentsHost, Catch, ExceptionFilter } from '@nestjs/common'; 2 | import { WsException } from '@nestjs/websockets'; 3 | 4 | @Catch(WsException) 5 | export class RequestFilter implements ExceptionFilter { 6 | catch(exception: WsException, host: ArgumentsHost) { 7 | const wsCtx = host.switchToWs(); 8 | const pattern = wsCtx.getPattern(); 9 | const client = wsCtx.getClient(); 10 | client.emit('exception', { pattern, message: exception.message }); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": false, 5 | "noImplicitAny": false, 6 | "removeComments": true, 7 | "noLib": false, 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "ES2021", 11 | "sourceMap": true, 12 | "allowJs": true, 13 | "outDir": "./dist" 14 | }, 15 | "include": [ 16 | "src/**/*", 17 | "e2e/**/*" 18 | ], 19 | "exclude": [ 20 | "node_modules", 21 | ] 22 | } -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": false, 5 | "noImplicitAny": false, 6 | "removeComments": true, 7 | "noLib": false, 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "ES2021", 11 | "sourceMap": true, 12 | "allowJs": true, 13 | "outDir": "./dist" 14 | }, 15 | "include": [ 16 | "src/**/*", 17 | "e2e/**/*" 18 | ], 19 | "exclude": [ 20 | "node_modules", 21 | ] 22 | } -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/send-files/src/app.service.d.ts: -------------------------------------------------------------------------------- 1 | import { StreamableFile } from '@nestjs/common'; 2 | import { Observable } from 'rxjs'; 3 | import { NonFile } from './non-file'; 4 | export declare class AppService { 5 | private readonly MAX_BITES; 6 | getReadStream(): StreamableFile; 7 | getBuffer(): StreamableFile; 8 | getNonFile(): NonFile; 9 | getRxJSFile(): Observable; 10 | getFileWithHeaders(): StreamableFile; 11 | getFileThatDoesNotExist(): StreamableFile; 12 | getSlowStream(): StreamableFile; 13 | } 14 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/raw-body/src/express.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"express.controller.js","sourceRoot":"","sources":["../../../../../tests/nest-application/raw-body/src/express.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAuE;AAIhE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAE5B,UAAU,CAAQ,GAA4B;QAC5C,OAAO;YACL,MAAM,EAAE,GAAG,CAAC,IAAI;YAChB,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE;SAC5B,CAAC;IACJ,CAAC;CACF,CAAA;AARY,8CAAiB;AAE5B;IADC,IAAA,aAAI,GAAE;IACK,WAAA,IAAA,YAAG,GAAE,CAAA;;;;mDAKhB;4BAPU,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAQ7B"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/request.interceptor.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"request.interceptor.js","sourceRoot":"","sources":["../../../../tests/websockets/src/request.interceptor.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA2E;AAGpE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC7B,SAAS,CAAC,OAAyB,EAAE,IAAiB;QACpD,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,SAAS,EAAE,CAAC;QAChD,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,UAAU,EAAE,CAAC;QAClD,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;CACF,CAAA;AAPY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;GACA,kBAAkB,CAO9B"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/sse/src/app.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../../../../tests/nest-application/sse/src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA+D;AAC/D,+BAAiD;AAG1C,IAAM,aAAa,GAAnB,MAAM,aAAa;IAExB,GAAG;QACD,OAAO,IAAA,eAAQ,EAAC,IAAI,CAAC,CAAC,IAAI,CACxB,IAAA,UAAG,EAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAAiB,CAAC,CACzD,CAAC;IACJ,CAAC;CACF,CAAA;AAPY,sCAAa;AAExB;IADC,IAAA,YAAG,EAAC,KAAK,CAAC;;;oCACJ,iBAAU;wCAIhB;wBANU,aAAa;IADzB,IAAA,mBAAU,GAAE;GACA,aAAa,CAOzB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/use-body-parser/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": false, 5 | "noImplicitAny": false, 6 | "removeComments": true, 7 | "lib": ["dom"], 8 | "noLib": false, 9 | "emitDecoratorMetadata": true, 10 | "experimentalDecorators": true, 11 | "target": "ES2021", 12 | "sourceMap": true, 13 | "allowJs": true, 14 | "outDir": "./dist" 15 | }, 16 | "include": [ 17 | "src/**/*", 18 | "e2e/**/*" 19 | ], 20 | "exclude": [ 21 | "node_modules" 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/request.filter.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"request.filter.js","sourceRoot":"","sources":["../../../../tests/websockets/src/request.filter.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAuE;AACvE,mDAAiD;AAG1C,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,KAAK,CAAC,SAAsB,EAAE,IAAmB;QAC/C,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAChC,MAAM,OAAO,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC;QACnC,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QACjC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;CACF,CAAA;AAPY,sCAAa;wBAAb,aAAa;IADzB,IAAA,cAAK,EAAC,wBAAW,CAAC;GACN,aAAa,CAOzB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/get-url/e2e/utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../tests/nest-application/get-url/e2e/utils.ts"],"names":[],"mappings":";;;AAAA,2BAA2B;AAIpB,KAAK,UAAU,UAAU;IAC9B,MAAM,MAAM,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC;IAClC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,YAAI,EAAE,CAAC;YACT,OAAO,CAAC,YAAI,CAAC,CAAC;QAChB,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE;YACpB,YAAI,GAAI,MAAM,CAAC,OAAO,EAAsB,CAAC,IAAI,CAAC;YAClD,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,YAAI,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAZD,gCAYC"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/utils/app-init.ts: -------------------------------------------------------------------------------- 1 | import { NestHyperExpressApplication } from '@m8a/platform-hyper-express'; 2 | import { request } from 'pactum'; 3 | 4 | export async function appInit( 5 | app: NestHyperExpressApplication, 6 | port: number = 9999, 7 | host?: string, 8 | callback: () => void = () => {}, 9 | ) { 10 | // console.log('we are calling app to listen', port); 11 | await app.listen(port, host, callback); 12 | // console.log('app is listening'); 13 | const url = await app.getUrl(); 14 | request.setBaseUrl( 15 | url.replace('::1', '127.0.0.1').replace('+unix', '').replace('%3A', ':'), 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/send-files/src/app.controller.d.ts: -------------------------------------------------------------------------------- 1 | import { StreamableFile } from '@nestjs/common'; 2 | import { Observable } from 'rxjs'; 3 | import { AppService } from './app.service'; 4 | import { NonFile } from './non-file'; 5 | export declare class AppController { 6 | private readonly appService; 7 | constructor(appService: AppService); 8 | getFile(): StreamableFile; 9 | getBuffer(): StreamableFile; 10 | getNonFile(): NonFile; 11 | getRxJSFile(): Observable; 12 | getFileWithHeaders(): StreamableFile; 13 | getNonExistantFile(): StreamableFile; 14 | getSlowFile(): StreamableFile; 15 | } 16 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": true, 5 | "removeComments": true, 6 | "emitDecoratorMetadata": true, 7 | "experimentalDecorators": true, 8 | "allowSyntheticDefaultImports": true, 9 | "target": "ES2021", 10 | "sourceMap": true, 11 | "outDir": "./dist", 12 | "baseUrl": "./", 13 | "incremental": true, 14 | "skipLibCheck": true, 15 | "strictNullChecks": false, 16 | "noImplicitAny": false, 17 | "strictBindCallApply": false, 18 | "forceConsistentCasingInFileNames": false, 19 | "noFallthroughCasesInSwitch": false 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /libs/platform-hyper-express-ws/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": true, 5 | "removeComments": true, 6 | "emitDecoratorMetadata": true, 7 | "experimentalDecorators": true, 8 | "allowSyntheticDefaultImports": true, 9 | "target": "ES2021", 10 | "sourceMap": true, 11 | "outDir": "./dist", 12 | "baseUrl": "./", 13 | "incremental": true, 14 | "skipLibCheck": true, 15 | "strictNullChecks": false, 16 | "noImplicitAny": false, 17 | "strictBindCallApply": false, 18 | "forceConsistentCasingInFileNames": false, 19 | "noFallthroughCasesInSwitch": false 20 | } 21 | } -------------------------------------------------------------------------------- /libs/platform-hyper-express/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": true, 5 | "removeComments": true, 6 | "emitDecoratorMetadata": true, 7 | "experimentalDecorators": true, 8 | "allowSyntheticDefaultImports": true, 9 | "target": "ES2021", 10 | "sourceMap": true, 11 | "outDir": "./dist", 12 | "baseUrl": "./", 13 | "incremental": true, 14 | "skipLibCheck": true, 15 | "strictNullChecks": false, 16 | "noImplicitAny": false, 17 | "strictBindCallApply": false, 18 | "forceConsistentCasingInFileNames": false, 19 | "noFallthroughCasesInSwitch": false 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/global-prefix/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get, Post, Req } from '@nestjs/common'; 2 | 3 | @Controller() 4 | export class AppController { 5 | @Get('hello/:name') 6 | getHello(@Req() req): string { 7 | return 'Hello: ' + req.extras?.data; 8 | } 9 | 10 | @Get('params') 11 | getParams(@Req() req): any { 12 | return req.middlewareParams; 13 | } 14 | 15 | @Get('health') 16 | getHealth(): string { 17 | return 'up'; 18 | } 19 | 20 | @Get('test') 21 | getTest(): string { 22 | return 'test'; 23 | } 24 | 25 | @Post('test') 26 | postTest(): string { 27 | return 'test'; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/src/errors.controller.ts: -------------------------------------------------------------------------------- 1 | import { BadRequestException, Controller, Get, Header } from '@nestjs/common'; 2 | 3 | @Controller() 4 | export class ErrorsController { 5 | @Get('sync') 6 | synchronous() { 7 | this.throwError(); 8 | } 9 | 10 | @Get('async') 11 | async asynchronous() { 12 | this.throwError(); 13 | } 14 | 15 | @Get('unexpected-error') 16 | @Header('Content-Type', 'application/pdf') 17 | unexpectedError() { 18 | throw new Error(); 19 | } 20 | 21 | throwError() { 22 | throw new BadRequestException({ 23 | statusCode: 400, 24 | error: 'Bad Request', 25 | message: 'Integration test', 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/src/server.gateway.ts: -------------------------------------------------------------------------------- 1 | import { UseInterceptors } from '@nestjs/common'; 2 | import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets'; 3 | import { RequestInterceptor } from './request.interceptor'; 4 | 5 | @WebSocketGateway() 6 | export class ServerGateway { 7 | @SubscribeMessage('push') 8 | onPush(client, data) { 9 | return { 10 | event: 'pop', 11 | data, 12 | }; 13 | } 14 | 15 | @UseInterceptors(RequestInterceptor) 16 | @SubscribeMessage('getClient') 17 | getPathCalled(client, data) { 18 | return { 19 | event: 'popClient', 20 | data: { ...data, path: client.pattern }, 21 | }; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/get-url/e2e/utils.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.randomPort = exports.port = void 0; 4 | const net = require("net"); 5 | async function randomPort() { 6 | const server = net.createServer(); 7 | return new Promise((resolve, reject) => { 8 | if (exports.port) { 9 | resolve(exports.port); 10 | } 11 | server.listen(0, () => { 12 | exports.port = server.address().port; 13 | server.close(); 14 | resolve(exports.port); 15 | }); 16 | }); 17 | } 18 | exports.randomPort = randomPort; 19 | //# sourceMappingURL=utils.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/server.gateway.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"server.gateway.js","sourceRoot":"","sources":["../../../../tests/websockets/src/server.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,mDAAwE;AACxE,+DAA2D;AAGpD,IAAM,aAAa,GAAnB,MAAM,aAAa;IAExB,MAAM,CAAC,MAAM,EAAE,IAAI;QACjB,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,IAAI;SACL,CAAC;IACJ,CAAC;IAID,aAAa,CAAC,MAAM,EAAE,IAAI;QACxB,OAAO;YACL,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE;SACxC,CAAC;IACJ,CAAC;CACF,CAAA;AAjBY,sCAAa;AAExB;IADC,IAAA,6BAAgB,EAAC,MAAM,CAAC;;;;2CAMxB;AAID;IAFC,IAAA,wBAAe,EAAC,wCAAkB,CAAC;IACnC,IAAA,6BAAgB,EAAC,WAAW,CAAC;;;;kDAM7B;wBAhBU,aAAa;IADzB,IAAA,6BAAgB,GAAE;GACN,aAAa,CAiBzB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/errors/errors.controller.ts: -------------------------------------------------------------------------------- 1 | import { BadRequestException, Controller, Get, Header } from '@nestjs/common'; 2 | 3 | @Controller() 4 | export class ErrorsController { 5 | @Get('sync') 6 | synchronous() { 7 | this.throwError(); 8 | } 9 | 10 | @Get('async') 11 | async asynchronous() { 12 | this.throwError(); 13 | } 14 | 15 | @Get('unexpected-error') 16 | @Header('Content-Type', 'application/pdf') 17 | unexpectedError() { 18 | throw new Error(); 19 | } 20 | 21 | throwError() { 22 | throw new BadRequestException({ 23 | statusCode: 400, 24 | error: 'Bad Request', 25 | message: 'Integration test', 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/src/app.controller.spec.ts: -------------------------------------------------------------------------------- 1 | import { Test, TestingModule } from '@nestjs/testing'; 2 | import { AppController } from './app.controller'; 3 | import { AppService } from './app.service'; 4 | 5 | describe('AppController', () => { 6 | let appController: AppController; 7 | 8 | beforeEach(async () => { 9 | const app: TestingModule = await Test.createTestingModule({ 10 | controllers: [AppController], 11 | providers: [AppService], 12 | }).compile(); 13 | 14 | appController = app.get(AppController); 15 | }); 16 | 17 | describe('root', () => { 18 | it('should return "Hello World!"', () => { 19 | expect(appController.getHello()).toBe('Hello World!'); 20 | }); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: '@typescript-eslint/parser', 3 | parserOptions: { 4 | project: 'tsconfig.json', 5 | tsconfigRootDir: __dirname, 6 | sourceType: 'module', 7 | }, 8 | plugins: ['@typescript-eslint/eslint-plugin'], 9 | extends: [ 10 | 'plugin:@typescript-eslint/recommended', 11 | 'plugin:prettier/recommended', 12 | ], 13 | root: true, 14 | env: { 15 | node: true, 16 | jest: true, 17 | }, 18 | ignorePatterns: ['.eslintrc.js'], 19 | rules: { 20 | '@typescript-eslint/interface-name-prefix': 'off', 21 | '@typescript-eslint/explicit-function-return-type': 'off', 22 | '@typescript-eslint/explicit-module-boundary-types': 'off', 23 | '@typescript-eslint/no-explicit-any': 'off', 24 | }, 25 | }; 26 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/src/errors.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"errors.controller.js","sourceRoot":"","sources":["../../src/errors.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA8E;AAGvE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAE3B,WAAW;QACT,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAGK,AAAN,KAAK,CAAC,YAAY;QAChB,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAID,eAAe;QACb,MAAM,IAAI,KAAK,EAAE,CAAC;IACpB,CAAC;IAED,UAAU;QACR,MAAM,IAAI,4BAAmB,CAAC;YAC5B,UAAU,EAAE,GAAG;YACf,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,kBAAkB;SAC5B,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAxBY,4CAAgB;AAE3B;IADC,IAAA,YAAG,EAAC,MAAM,CAAC;;;;mDAGX;AAGK;IADL,IAAA,YAAG,EAAC,OAAO,CAAC;;;;oDAGZ;AAID;IAFC,IAAA,YAAG,EAAC,kBAAkB,CAAC;IACvB,IAAA,eAAM,EAAC,cAAc,EAAE,iBAAiB,CAAC;;;;uDAGzC;2BAfU,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;GACA,gBAAgB,CAwB5B"} -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Don't allow people to merge changes to these generated files, because the result 2 | # may be invalid. You need to run "rush update" again. 3 | pnpm-lock.yaml merge=text 4 | shrinkwrap.yaml merge=binary 5 | npm-shrinkwrap.json merge=binary 6 | yarn.lock merge=binary 7 | 8 | # Rush's JSON config files use JavaScript-style code comments. The rule below prevents pedantic 9 | # syntax highlighters such as GitHub's from highlighting these comments as errors. Your text editor 10 | # may also require a special configuration to allow comments in JSON. 11 | # 12 | # For more information, see this issue: https://github.com/microsoft/rushstack/issues/1088 13 | # 14 | *.json linguist-language=JSON-with-Comments 15 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/errors/errors.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"errors.controller.js","sourceRoot":"","sources":["../../../../../tests/hello-world/src/errors/errors.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA8E;AAGvE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAE3B,WAAW;QACT,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAGK,AAAN,KAAK,CAAC,YAAY;QAChB,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAID,eAAe;QACb,MAAM,IAAI,KAAK,EAAE,CAAC;IACpB,CAAC;IAED,UAAU;QACR,MAAM,IAAI,4BAAmB,CAAC;YAC5B,UAAU,EAAE,GAAG;YACf,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,kBAAkB;SAC5B,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAxBY,4CAAgB;AAE3B;IADC,IAAA,YAAG,EAAC,MAAM,CAAC;;;;mDAGX;AAGK;IADL,IAAA,YAAG,EAAC,OAAO,CAAC;;;;oDAGZ;AAID;IAFC,IAAA,YAAG,EAAC,kBAAkB,CAAC;IACvB,IAAA,eAAM,EAAC,cAAc,EAAE,iBAAiB,CAAC;;;;uDAGzC;2BAfU,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;GACA,gBAAgB,CAwB5B"} -------------------------------------------------------------------------------- /common/config/rush/cobuild.json: -------------------------------------------------------------------------------- 1 | /** 2 | * This configuration file manages Rush's cobuild feature. 3 | * More documentation is available on the Rush website: https://rushjs.io 4 | */ 5 | { 6 | "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/cobuild.schema.json", 7 | 8 | /** 9 | * (Required) EXPERIMENTAL - Set this to true to enable the cobuild feature. 10 | * RUSH_COBUILD_CONTEXT_ID should always be specified as an environment variable with an non-empty string, 11 | * otherwise the cobuild feature will be disabled. 12 | */ 13 | "cobuildFeatureEnabled": false, 14 | 15 | /** 16 | * (Required) Choose where cobuild lock will be acquired. 17 | * 18 | * The lock provider is registered by the rush plugins. 19 | * For example, @rushstack/rush-redis-cobuild-plugin registers the "redis" lock provider. 20 | */ 21 | "cobuildLockProvider": "redis" 22 | } 23 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | branches: [ "main" ] 5 | pull_request: 6 | branches: [ "main" ] 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v4 12 | with: 13 | fetch-depth: 2 14 | - name: Git config user 15 | uses: snow-actions/git-config-user@v1.0.0 16 | with: 17 | name: # Service Account's Name 18 | email: # Service Account's Email Address 19 | - uses: actions/setup-node@v4 20 | with: 21 | node-version: 16 22 | - name: Verify Change Logs 23 | run: node common/scripts/install-run-rush.js change --verify 24 | - name: Rush Install 25 | run: node common/scripts/install-run-rush.js install 26 | - name: Rush rebuild 27 | run: node common/scripts/install-run-rush.js rebuild --verbose --production 28 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/global-prefix/src/app.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../../../../tests/nest-application/global-prefix/src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4D;AAGrD,IAAM,aAAa,GAAnB,MAAM,aAAa;IAExB,QAAQ,CAAQ,GAAG;QACjB,OAAO,SAAS,GAAG,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC;IACtC,CAAC;IAGD,SAAS,CAAQ,GAAG;QAClB,OAAO,GAAG,CAAC,gBAAgB,CAAC;IAC9B,CAAC;IAGD,SAAS;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IAGD,OAAO;QACL,OAAO,MAAM,CAAC;IAChB,CAAC;IAGD,QAAQ;QACN,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AAzBY,sCAAa;AAExB;IADC,IAAA,YAAG,EAAC,aAAa,CAAC;IACT,WAAA,IAAA,YAAG,GAAE,CAAA;;;;6CAEd;AAGD;IADC,IAAA,YAAG,EAAC,QAAQ,CAAC;IACH,WAAA,IAAA,YAAG,GAAE,CAAA;;;;8CAEf;AAGD;IADC,IAAA,YAAG,EAAC,QAAQ,CAAC;;;;8CAGb;AAGD;IADC,IAAA,YAAG,EAAC,MAAM,CAAC;;;;4CAGX;AAGD;IADC,IAAA,aAAI,EAAC,MAAM,CAAC;;;;6CAGZ;wBAxBU,aAAa;IADzB,IAAA,mBAAU,GAAE;GACA,aAAa,CAyBzB"} -------------------------------------------------------------------------------- /libs/platform-hyper-express/src/adapters/utils/get-body-parser-options.util.ts: -------------------------------------------------------------------------------- 1 | import type { RawBodyRequest } from '@nestjs/common'; 2 | import type { IncomingMessage, ServerResponse } from 'http'; 3 | import type { NestHyperExpressBodyParserOptions } from '../../interfaces'; 4 | 5 | const rawBodyParser = ( 6 | req: RawBodyRequest, 7 | _res: ServerResponse, 8 | buffer: Buffer, 9 | ) => { 10 | if (Buffer.isBuffer(buffer)) { 11 | req.rawBody = buffer; 12 | } 13 | return true; 14 | }; 15 | 16 | export function getBodyParserOptions( 17 | rawBody: boolean, 18 | options?: Omit | undefined, 19 | ): Options { 20 | let parserOptions: Options = (options || {}) as Options; 21 | 22 | if (rawBody === true) { 23 | parserOptions = { 24 | ...parserOptions, 25 | verify: rawBodyParser, 26 | }; 27 | } 28 | 29 | return parserOptions; 30 | } 31 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/app.gateway.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.gateway.js","sourceRoot":"","sources":["../../../../tests/websockets/src/app.gateway.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA6D;AAC7D,mDAK4B;AAC5B,+DAA2D;AAC3D,+BAAkC;AAClC,qDAAiD;AAG1C,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAE7B,MAAM,CAAgB,IAAI;QACxB,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,IAAI;SACL,CAAC;IACJ,CAAC;IAID,aAAa,CAAC,MAAM,EAAE,IAAI;QACxB,OAAO;YACL,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE;SACxC,CAAC;IACJ,CAAC;IAID,sBAAsB;QACpB,OAAO,IAAA,iBAAU,EAAC,GAAG,EAAE,CAAC,IAAI,wBAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC/D,CAAC;CACF,CAAA;AAvBY,gDAAkB;AAE7B;IADC,IAAA,6BAAgB,EAAC,MAAM,CAAC;IACjB,WAAA,IAAA,wBAAW,GAAE,CAAA;;;;gDAKpB;AAID;IAFC,IAAA,wBAAe,EAAC,wCAAkB,CAAC;IACnC,IAAA,6BAAgB,EAAC,WAAW,CAAC;;;;uDAM7B;AAID;IAFC,IAAA,mBAAU,EAAC,8BAAa,CAAC;IACzB,IAAA,6BAAgB,EAAC,oBAAoB,CAAC;;;;gEAGtC;6BAtBU,kBAAkB;IAD9B,IAAA,6BAAgB,EAAC,IAAI,CAAC;GACV,kBAAkB,CAuB9B"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/hello/hello.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get, Header, Param } from '@nestjs/common'; 2 | import { Observable, of } from 'rxjs'; 3 | import { HelloService } from './hello.service'; 4 | import { UserByIdPipe } from './users/user-by-id.pipe'; 5 | 6 | @Controller('hello') 7 | export class HelloController { 8 | constructor(private readonly helloService: HelloService) {} 9 | 10 | @Get() 11 | @Header('Authorization', 'Bearer') 12 | greeting (): string { 13 | return this.helloService.greeting(); 14 | } 15 | 16 | @Get('async') 17 | async asyncGreeting(): Promise { 18 | return this.helloService.greeting(); 19 | } 20 | 21 | @Get('stream') 22 | streamGreeting(): Observable { 23 | return of(this.helloService.greeting()); 24 | } 25 | 26 | @Get('local-pipe/:id') 27 | localPipe( 28 | @Param('id', UserByIdPipe) 29 | user: any, 30 | ): any { 31 | return user; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /libs/platform-hyper-express/dist/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | var desc = Object.getOwnPropertyDescriptor(m, k); 5 | if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { 6 | desc = { enumerable: true, get: function() { return m[k]; } }; 7 | } 8 | Object.defineProperty(o, k2, desc); 9 | }) : (function(o, m, k, k2) { 10 | if (k2 === undefined) k2 = k; 11 | o[k2] = m[k]; 12 | })); 13 | var __exportStar = (this && this.__exportStar) || function(m, exports) { 14 | for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); 15 | }; 16 | Object.defineProperty(exports, "__esModule", { value: true }); 17 | __exportStar(require("./src/adapters"), exports); 18 | __exportStar(require("./src/interfaces"), exports); 19 | //# sourceMappingURL=index.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/hello.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"hello.controller.js","sourceRoot":"","sources":["../../../../../tests/hello-world/src/hello/hello.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAgE;AAChE,+BAAsC;AACtC,mDAA+C;AAC/C,6DAAuD;AAGhD,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,YAA6B,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAI3D,QAAQ;QACN,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC;IAGK,AAAN,KAAK,CAAC,aAAa;QACjB,OAAO,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC;IAGD,cAAc;QACZ,OAAO,IAAA,SAAE,EAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC1C,CAAC;IAGD,SAAS,CAEP,IAAS;QAET,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AA1BY,0CAAe;AAK1B;IAFC,IAAA,YAAG,GAAE;IACL,IAAA,eAAM,EAAC,eAAe,EAAE,QAAQ,CAAC;;;;+CAGjC;AAGK;IADL,IAAA,YAAG,EAAC,OAAO,CAAC;;;;oDAGZ;AAGD;IADC,IAAA,YAAG,EAAC,QAAQ,CAAC;;;oCACI,iBAAU;qDAE3B;AAGD;IADC,IAAA,YAAG,EAAC,gBAAgB,CAAC;IAEnB,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,8BAAY,CAAC,CAAA;;;;gDAI3B;0BAzBU,eAAe;IAD3B,IAAA,mBAAU,EAAC,OAAO,CAAC;qCAEyB,4BAAY;GAD5C,eAAe,CA0B3B"} -------------------------------------------------------------------------------- /common/git-hooks/commit-msg.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This is an example Git hook for use with Rush. To enable this hook, rename this file 4 | # to "commit-msg" and then run "rush install", which will copy it from common/git-hooks 5 | # to the .git/hooks folder. 6 | # 7 | # TO LEARN MORE ABOUT GIT HOOKS 8 | # 9 | # The Git documentation is here: https://git-scm.com/docs/githooks 10 | # Some helpful resources: https://githooks.com 11 | # 12 | # ABOUT THIS EXAMPLE 13 | # 14 | # The commit-msg hook is called by "git commit" with one argument, the name of the file 15 | # that has the commit message. The hook should exit with non-zero status after issuing 16 | # an appropriate message if it wants to stop the commit. The hook is allowed to edit 17 | # the commit message file. 18 | 19 | # This example enforces that commit message should contain a minimum amount of 20 | # description text. 21 | if [ `cat $1 | wc -w` -lt 3 ]; then 22 | echo "" 23 | echo "Invalid commit message: The message must contain at least 3 words." 24 | exit 1 25 | fi 26 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/src/app.gateway.ts: -------------------------------------------------------------------------------- 1 | import { UseFilters, UseInterceptors } from '@nestjs/common'; 2 | import { 3 | MessageBody, 4 | SubscribeMessage, 5 | WebSocketGateway, 6 | WsException, 7 | } from '@nestjs/websockets'; 8 | import { RequestInterceptor } from './request.interceptor'; 9 | import { throwError } from 'rxjs'; 10 | import { RequestFilter } from './request.filter'; 11 | 12 | @WebSocketGateway(8080) 13 | export class ApplicationGateway { 14 | @SubscribeMessage('push') 15 | onPush(@MessageBody() data) { 16 | return { 17 | event: 'pop', 18 | data, 19 | }; 20 | } 21 | 22 | @UseInterceptors(RequestInterceptor) 23 | @SubscribeMessage('getClient') 24 | getPathCalled(client, data) { 25 | return { 26 | event: 'popClient', 27 | data: { ...data, path: client.pattern }, 28 | }; 29 | } 30 | 31 | @UseFilters(RequestFilter) 32 | @SubscribeMessage('getClientWithError') 33 | getPathCalledWithError() { 34 | return throwError(() => new WsException('This is an error')); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/src/app.service.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.AppService = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | let AppService = class AppService { 12 | getHello() { 13 | return 'Hello World!'; 14 | } 15 | }; 16 | exports.AppService = AppService; 17 | exports.AppService = AppService = __decorate([ 18 | (0, common_1.Injectable)() 19 | ], AppService); 20 | //# sourceMappingURL=app.service.js.map -------------------------------------------------------------------------------- /libs/platform-hyper-express-ws/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@m8a/platform-hyper-express-ws", 3 | "version": "0.0.1", 4 | "description": "Nest - modern, fast, powerful node.js web framework (@platform-ws)", 5 | "author": "Scott Molinari", 6 | "license": "MIT", 7 | "homepage": "https://nestjs.com", 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/nestjs/nest.git", 11 | "directory": "packages/platform-ws" 12 | }, 13 | "publishConfig": { 14 | "access": "public" 15 | }, 16 | "main": "dist/index.js", 17 | "scripts": { 18 | "build": "nest build", 19 | "build:watch": "nest build --watch" 20 | }, 21 | "dependencies": { 22 | "tslib": "2.6.2", 23 | "ws": "8.16.0" 24 | }, 25 | "devDependencies": { 26 | "@nestjs/common": "10.3.1", 27 | "@nestjs/core": "10.3.1", 28 | "reflect-metadata": "0.2.1", 29 | "rxjs": "7.8.1", 30 | "@nestjs/websockets": "10.3.1" 31 | }, 32 | "peerDependencies": { 33 | "@nestjs/common": "^10.0.0", 34 | "@nestjs/websockets": "^10.0.0", 35 | "rxjs": "^7.1.0" 36 | } 37 | } -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/listen/src/app.service.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.AppService = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | let AppService = class AppService { 12 | sayHello() { 13 | return 'Hello World!'; 14 | } 15 | }; 16 | exports.AppService = AppService; 17 | exports.AppService = AppService = __decorate([ 18 | (0, common_1.Injectable)() 19 | ], AppService); 20 | //# sourceMappingURL=app.service.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/host.service.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.HostService = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | let HostService = class HostService { 12 | greeting() { 13 | return 'Host Greeting!'; 14 | } 15 | }; 16 | exports.HostService = HostService; 17 | exports.HostService = HostService = __decorate([ 18 | (0, common_1.Injectable)() 19 | ], HostService); 20 | //# sourceMappingURL=host.service.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/get-url/src/app.service.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.AppService = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | let AppService = class AppService { 12 | sayHello() { 13 | return 'Hello World!'; 14 | } 15 | }; 16 | exports.AppService = AppService; 17 | exports.AppService = AppService = __decorate([ 18 | (0, common_1.Injectable)() 19 | ], AppService); 20 | //# sourceMappingURL=app.service.js.map -------------------------------------------------------------------------------- /common/config/rush/custom-tips.json: -------------------------------------------------------------------------------- 1 | /** 2 | * This configuration file allows repo maintainers to configure extra details to be 3 | * printed alongside certain Rush messages. More documentation is available on the 4 | * Rush website: https://rushjs.io 5 | */ 6 | { 7 | "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/custom-tips.schema.json", 8 | 9 | /** 10 | * Specifies the custom tips to be displayed by Rush. 11 | */ 12 | "customTips": [ 13 | // { 14 | // /** 15 | // * (REQUIRED) An identifier indicating a message that may be printed by Rush. 16 | // * If that message is printed, then this custom tip will be shown. 17 | // * Consult the Rush documentation for the current list of possible identifiers. 18 | // */ 19 | // "tipId": "TIP_RUSH_INCONSISTENT_VERSIONS", 20 | // 21 | // /** 22 | // * (REQUIRED) The message text to be displayed for this tip. 23 | // */ 24 | // "message": "For additional troubleshooting information, refer this wiki article:\n\nhttps://intranet.contoso.com/docs/pnpm-mismatch" 25 | // } 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/hello.service.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.HelloService = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | let HelloService = class HelloService { 12 | greeting() { 13 | return 'Hello world!'; 14 | } 15 | }; 16 | exports.HelloService = HelloService; 17 | exports.HelloService = HelloService = __decorate([ 18 | (0, common_1.Injectable)() 19 | ], HelloService); 20 | //# sourceMappingURL=hello.service.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/users/users.service.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.UsersService = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | let UsersService = class UsersService { 12 | findById(id) { 13 | return { id }; 14 | } 15 | }; 16 | exports.UsersService = UsersService; 17 | exports.UsersService = UsersService = __decorate([ 18 | (0, common_1.Injectable)() 19 | ], UsersService); 20 | //# sourceMappingURL=users.service.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/users/users.service.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.UsersService = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | let UsersService = class UsersService { 12 | findById(id) { 13 | return { id, host: true }; 14 | } 15 | }; 16 | exports.UsersService = UsersService; 17 | exports.UsersService = UsersService = __decorate([ 18 | (0, common_1.Injectable)() 19 | ], UsersService); 20 | //# sourceMappingURL=users.service.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/cors/src/app.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.AppModule = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const app_controller_1 = require("./app.controller"); 12 | let AppModule = class AppModule { 13 | }; 14 | exports.AppModule = AppModule; 15 | exports.AppModule = AppModule = __decorate([ 16 | (0, common_1.Module)({ 17 | controllers: [app_controller_1.AppController], 18 | }) 19 | ], AppModule); 20 | //# sourceMappingURL=app.module.js.map -------------------------------------------------------------------------------- /common/config/rush/rush-plugins.json: -------------------------------------------------------------------------------- 1 | /** 2 | * This configuration file manages Rush's plugin feature. 3 | */ 4 | { 5 | "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-plugins.schema.json", 6 | "plugins": [ 7 | /** 8 | * Each item configures a plugin to be loaded by Rush. 9 | */ 10 | // { 11 | // /** 12 | // * The name of the NPM package that provides the plugin. 13 | // */ 14 | // "packageName": "@scope/my-rush-plugin", 15 | // /** 16 | // * The name of the plugin. This can be found in the "pluginName" 17 | // * field of the "rush-plugin-manifest.json" file in the NPM package folder. 18 | // */ 19 | // "pluginName": "my-plugin-name", 20 | // /** 21 | // * The name of a Rush autoinstaller that will be used for installation, which 22 | // * can be created using "rush init-autoinstaller". Add the plugin's NPM package 23 | // * to the package.json "dependencies" of your autoinstaller, then run 24 | // * "rush update-autoinstaller". 25 | // */ 26 | // "autoinstallerName": "rush-plugins" 27 | // } 28 | ] 29 | } -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/users/users.service.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.UsersService = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | let UsersService = class UsersService { 12 | findById(id) { 13 | return { id, host: true }; 14 | } 15 | }; 16 | exports.UsersService = UsersService; 17 | exports.UsersService = UsersService = __decorate([ 18 | (0, common_1.Injectable)() 19 | ], UsersService); 20 | //# sourceMappingURL=users.service.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/sse/src/app.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.AppModule = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const app_controller_1 = require("./app.controller"); 12 | let AppModule = class AppModule { 13 | }; 14 | exports.AppModule = AppModule; 15 | exports.AppModule = AppModule = __decorate([ 16 | (0, common_1.Module)({ 17 | controllers: [app_controller_1.AppController], 18 | }) 19 | ], AppModule); 20 | //# sourceMappingURL=app.module.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/app-locals/src/app.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.AppModule = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const app_controller_1 = require("./app.controller"); 12 | let AppModule = class AppModule { 13 | }; 14 | exports.AppModule = AppModule; 15 | exports.AppModule = AppModule = __decorate([ 16 | (0, common_1.Module)({ 17 | controllers: [app_controller_1.AppController], 18 | }) 19 | ], AppModule); 20 | //# sourceMappingURL=app.module.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/use-body-parser/src/app.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.AppModule = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const app_controller_1 = require("./app.controller"); 12 | let AppModule = class AppModule { 13 | }; 14 | exports.AppModule = AppModule; 15 | exports.AppModule = AppModule = __decorate([ 16 | (0, common_1.Module)({ 17 | controllers: [app_controller_1.AppController], 18 | }) 19 | ], AppModule); 20 | //# sourceMappingURL=app.module.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/host-array.service.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.HostArrayService = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | let HostArrayService = class HostArrayService { 12 | greeting() { 13 | return 'Host Greeting!'; 14 | } 15 | }; 16 | exports.HostArrayService = HostArrayService; 17 | exports.HostArrayService = HostArrayService = __decorate([ 18 | (0, common_1.Injectable)() 19 | ], HostArrayService); 20 | //# sourceMappingURL=host-array.service.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/app.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.ApplicationModule = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const app_gateway_1 = require("./app.gateway"); 12 | let ApplicationModule = class ApplicationModule { 13 | }; 14 | exports.ApplicationModule = ApplicationModule; 15 | exports.ApplicationModule = ApplicationModule = __decorate([ 16 | (0, common_1.Module)({ 17 | providers: [app_gateway_1.ApplicationGateway], 18 | }) 19 | ], ApplicationModule); 20 | //# sourceMappingURL=app.module.js.map -------------------------------------------------------------------------------- /libs/platform-hyper-express/src/interfaces/nest-hyper-express-body-parser-options.interface.ts: -------------------------------------------------------------------------------- 1 | import type { IncomingMessage } from 'http'; 2 | 3 | /** 4 | * Type alias to keep compatibility with @types/body-parser 5 | * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/dcd1673c4fa18a15ea8cd8ff8af7d563bb6dc8e6/types/body-parser/index.d.ts#L48-L66#L48-L66 6 | * @publicApi 7 | */ 8 | export interface NestHyperExpressBodyParserOptions { 9 | /** When set to true, then deflated (compressed) bodies will be inflated; when false, deflated bodies are rejected. Defaults to true. */ 10 | inflate?: boolean | undefined; 11 | 12 | /** 13 | * Controls the maximum request body size. If this is a number, 14 | * then the value specifies the number of bytes; if it is a string, 15 | * the value is passed to the bytes library for parsing. Defaults to '100kb'. 16 | */ 17 | limit?: number | string | undefined; 18 | 19 | /** 20 | * The type option is used to determine what media type the middleware will parse 21 | */ 22 | type?: string | string[] | ((req: IncomingMessage) => any) | undefined; 23 | 24 | // Catch-all for body-parser type specific options 25 | [key: string]: unknown; 26 | } 27 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/raw-body/src/express.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.ExpressModule = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const express_controller_1 = require("./express.controller"); 12 | let ExpressModule = class ExpressModule { 13 | }; 14 | exports.ExpressModule = ExpressModule; 15 | exports.ExpressModule = ExpressModule = __decorate([ 16 | (0, common_1.Module)({ 17 | controllers: [express_controller_1.ExpressController], 18 | }) 19 | ], ExpressModule); 20 | //# sourceMappingURL=express.module.js.map -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | *.log 3 | npm-debug.log* 4 | yarn-debug.log* 5 | yarn-error.log* 6 | *.tsbuildinfo 7 | 8 | # Runtime data 9 | *.pid 10 | *.seed 11 | *.pid.lock 12 | 13 | # Directory for instrumented libs generated by jscoverage/JSCover 14 | lib-cov 15 | 16 | # Coverage directory used by tools like istanbul 17 | coverage 18 | 19 | # Dependency directories 20 | node_modules/ 21 | 22 | # Optional npm cache directory 23 | .npm 24 | 25 | # Optional eslint cache 26 | .eslintcache 27 | 28 | # Optional REPL history 29 | .node_repl_history 30 | 31 | # Output of 'npm pack' 32 | *.tgz 33 | 34 | # Yarn Integrity file 35 | .yarn-integrity 36 | 37 | # dotenv environment variables file 38 | .env 39 | 40 | # next.js build output 41 | .next 42 | 43 | # OS X temporary files 44 | .DS_Store 45 | 46 | # IntelliJ IDEA project files; if you want to commit IntelliJ settings, this recipe may be helpful: 47 | # https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 48 | .idea/ 49 | *.iml 50 | 51 | # Rush temporary files 52 | common/deploy/ 53 | common/temp/ 54 | common/autoinstallers/*/.npmrc 55 | **/.rush/temp/ 56 | *.lock 57 | 58 | # Heft temporary files 59 | .cache 60 | .heft 61 | 62 | # temp build directories 63 | dist/ 64 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/e2e/error-gateway.spec.ts: -------------------------------------------------------------------------------- 1 | //TODO: rewrite test for hyper-express, if needed 2 | // import { INestApplication } from '@nestjs/common'; 3 | // import { Test } from '@nestjs/testing'; 4 | // import { expect } from 'chai'; 5 | // import { io } from 'socket.io-client'; 6 | // import { ErrorGateway } from '../src/error.gateway'; 7 | 8 | // describe('ErrorGateway', () => { 9 | // let app: INestApplication; 10 | 11 | // beforeEach(async () => { 12 | // const testingModule = await Test.createTestingModule({ 13 | // providers: [ErrorGateway], 14 | // }).compile(); 15 | // app = await testingModule.createNestApplication(); 16 | // await app.listen(3000); 17 | // }); 18 | 19 | // it(`should handle error`, async () => { 20 | // const ws = io('http://localhost:8080'); 21 | // ws.emit('push', { 22 | // test: 'test', 23 | // }); 24 | // await new Promise(resolve => 25 | // ws.on('exception', data => { 26 | // expect(data).to.be.eql({ 27 | // status: 'error', 28 | // message: 'test', 29 | // }); 30 | // resolve(); 31 | // }), 32 | // ); 33 | // }); 34 | 35 | // afterEach(() => app.close()); 36 | // }); 37 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/send-files/src/app.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.AppModule = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const app_controller_1 = require("./app.controller"); 12 | const app_service_1 = require("./app.service"); 13 | let AppModule = class AppModule { 14 | }; 15 | exports.AppModule = AppModule; 16 | exports.AppModule = AppModule = __decorate([ 17 | (0, common_1.Module)({ 18 | controllers: [app_controller_1.AppController], 19 | providers: [app_service_1.AppService], 20 | }) 21 | ], AppModule); 22 | //# sourceMappingURL=app.module.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/host/host.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get, Header, HostParam, Param } from '@nestjs/common'; 2 | import { Observable, of } from 'rxjs'; 3 | import { HostService } from './host.service'; 4 | import { UserByIdPipe } from './users/user-by-id.pipe'; 5 | 6 | @Controller({ 7 | path: 'host', 8 | host: ':tenant.example.com', 9 | }) 10 | export class HostController { 11 | constructor(private readonly hostService: HostService) {} 12 | 13 | @Get() 14 | @Header('Authorization', 'Bearer') 15 | greeting(@HostParam('tenant') tenant: string): string { 16 | return `${this.hostService.greeting()} tenant=${tenant}`; 17 | } 18 | 19 | @Get('async') 20 | async asyncGreeting(@HostParam('tenant') tenant: string): Promise { 21 | return `${await this.hostService.greeting()} tenant=${tenant}`; 22 | } 23 | 24 | @Get('stream') 25 | streamGreeting(@HostParam('tenant') tenant: string): Observable { 26 | return of(`${this.hostService.greeting()} tenant=${tenant}`); 27 | } 28 | 29 | @Get('local-pipe/:id') 30 | localPipe( 31 | @Param('id', UserByIdPipe) 32 | user: any, 33 | @HostParam('tenant') tenant: string, 34 | ): any { 35 | return { ...user, tenant }; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/get-url/src/app.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.AppModule = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const app_controller_1 = require("./app.controller"); 12 | const app_service_1 = require("./app.service"); 13 | let AppModule = class AppModule { 14 | }; 15 | exports.AppModule = AppModule; 16 | exports.AppModule = AppModule = __decorate([ 17 | (0, common_1.Module)({ 18 | controllers: [app_controller_1.AppController], 19 | providers: [app_service_1.AppService], 20 | }) 21 | ], AppModule); 22 | //# sourceMappingURL=app.module.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/listen/src/app.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.AppModule = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const app_controller_1 = require("./app.controller"); 12 | const app_service_1 = require("./app.service"); 13 | let AppModule = class AppModule { 14 | }; 15 | exports.AppModule = AppModule; 16 | exports.AppModule = AppModule = __decorate([ 17 | (0, common_1.Module)({ 18 | controllers: [app_controller_1.AppController], 19 | providers: [app_service_1.AppService], 20 | }) 21 | ], AppModule); 22 | //# sourceMappingURL=app.module.js.map -------------------------------------------------------------------------------- /common/config/rush/.npmrc: -------------------------------------------------------------------------------- 1 | # Rush uses this file to configure the NPM package registry during installation. It is applicable 2 | # to PNPM, NPM, and Yarn package managers. It is used by operations such as "rush install", 3 | # "rush update", and the "install-run.js" scripts. 4 | # 5 | # NOTE: The "rush publish" command uses .npmrc-publish instead. 6 | # 7 | # Before invoking the package manager, Rush will copy this file to the folder where installation 8 | # is performed. The copied file will omit any config lines that reference environment variables 9 | # that are undefined in that session; this avoids problems that would otherwise result due to 10 | # a missing variable being replaced by an empty string. 11 | # 12 | # * * * SECURITY WARNING * * * 13 | # 14 | # It is NOT recommended to store authentication tokens in a text file on a lab machine, because 15 | # other unrelated processes may be able to read the file. Also, the file may persist indefinitely, 16 | # for example if the machine loses power. A safer practice is to pass the token via an 17 | # environment variable, which can be referenced from .npmrc using ${} expansion. For example: 18 | # 19 | # //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} 20 | # 21 | registry=https://registry.npmjs.org/ 22 | always-auth=false 23 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/send-files/src/app.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../../../tests/send-files/src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiE;AACjE,+BAAkC;AAClC,+CAA2C;AAC3C,yCAAqC;AAG9B,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAGvD,OAAO;QACL,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC;IACzC,CAAC;IAGD,SAAS;QACP,OAAO,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;IACrC,CAAC;IAGD,UAAU;QACR,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;IACtC,CAAC;IAGD,WAAW;QACT,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;IACvC,CAAC;IAGD,kBAAkB;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC;IAC9C,CAAC;IAGD,kBAAkB;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC;IACnD,CAAC;IAGD,WAAW;QACT,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,CAAC;IACzC,CAAC;CACF,CAAA;AArCY,sCAAa;AAIxB;IADC,IAAA,YAAG,EAAC,aAAa,CAAC;;;oCACR,uBAAc;4CAExB;AAGD;IADC,IAAA,YAAG,EAAC,aAAa,CAAC;;;oCACN,uBAAc;8CAE1B;AAGD;IADC,IAAA,YAAG,EAAC,sBAAsB,CAAC;;;oCACd,kBAAO;+CAEpB;AAGD;IADC,IAAA,YAAG,EAAC,kBAAkB,CAAC;;;oCACT,iBAAU;gDAExB;AAGD;IADC,IAAA,YAAG,EAAC,mBAAmB,CAAC;;;oCACH,uBAAc;uDAEnC;AAGD;IADC,IAAA,YAAG,EAAC,gBAAgB,CAAC;;;oCACA,uBAAc;uDAEnC;AAGD;IADC,IAAA,YAAG,EAAC,YAAY,CAAC;;;oCACH,uBAAc;gDAE5B;wBApCU,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAE8B,wBAAU;GADxC,aAAa,CAqCzB"} -------------------------------------------------------------------------------- /common/config/rush/.npmrc-publish: -------------------------------------------------------------------------------- 1 | # This config file is very similar to common/config/rush/.npmrc, except that .npmrc-publish 2 | # is used by the "rush publish" command, as publishing often involves different credentials 3 | # and registries than other operations. 4 | # 5 | # Before invoking the package manager, Rush will copy this file to "common/temp/publish-home/.npmrc" 6 | # and then temporarily map that folder as the "home directory" for the current user account. 7 | # This enables the same settings to apply for each project folder that gets published. The copied file 8 | # will omit any config lines that reference environment variables that are undefined in that session; 9 | # this avoids problems that would otherwise result due to a missing variable being replaced by 10 | # an empty string. 11 | # 12 | # * * * SECURITY WARNING * * * 13 | # 14 | # It is NOT recommended to store authentication tokens in a text file on a lab machine, because 15 | # other unrelated processes may be able to read the file. Also, the file may persist indefinitely, 16 | # for example if the machine loses power. A safer practice is to pass the token via an 17 | # environment variable, which can be referenced from .npmrc using ${} expansion. For example: 18 | # 19 | # //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} 20 | # 21 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/send-files/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get, StreamableFile } from '@nestjs/common'; 2 | import { Observable } from 'rxjs'; 3 | import { AppService } from './app.service'; 4 | import { NonFile } from './non-file'; 5 | 6 | @Controller() 7 | export class AppController { 8 | constructor(private readonly appService: AppService) {} 9 | 10 | @Get('file/stream') 11 | getFile(): StreamableFile { 12 | return this.appService.getReadStream(); 13 | } 14 | 15 | @Get('file/buffer') 16 | getBuffer(): StreamableFile { 17 | return this.appService.getBuffer(); 18 | } 19 | 20 | @Get('non-file/pipe-method') 21 | getNonFile(): NonFile { 22 | return this.appService.getNonFile(); 23 | } 24 | 25 | @Get('file/rxjs/stream') 26 | getRxJSFile(): Observable { 27 | return this.appService.getRxJSFile(); 28 | } 29 | 30 | @Get('file/with/headers') 31 | getFileWithHeaders(): StreamableFile { 32 | return this.appService.getFileWithHeaders(); 33 | } 34 | 35 | @Get('file/not/exist') 36 | getNonExistantFile(): StreamableFile { 37 | return this.appService.getFileThatDoesNotExist(); 38 | } 39 | 40 | @Get('/file/slow') 41 | getSlowFile(): StreamableFile { 42 | return this.appService.getSlowStream(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/send-files/e2e/utils.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../tests/send-files/e2e/utils.ts"],"names":[],"mappings":";;;AACA,+BAAgE;AAChE,6BAA0B;AAEnB,MAAM,kBAAkB,GAAG,KAAK,EACrC,GAAqB,EACP,EAAE;IAChB,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC;IAC/B,OAAO,IAAI,SAAG,CAAC,GAAG,CAAC,CAAC;AACtB,CAAC,CAAC;AALW,QAAA,kBAAkB,sBAK7B;AAEK,MAAM,uBAAuB,GAAG,KAAK,EAAE,GAAQ,EAAE,EAAE;IACxD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,GAAG,GAAG,IAAA,cAAO,EAAC,GAAG,EAAE,GAAG,CAAC,EAAE;YAE7B,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;gBAClB,GAAG,CAAC,OAAO,EAAE,CAAC;YAChB,CAAC,CAAC,CAAC;YAEH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;QAEH,GAAG,CAAC,GAAG,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAbW,QAAA,uBAAuB,2BAalC;AAEK,MAAM,eAAe,GAAG,KAAK,EAAE,GAAQ,EAAE,EAAE;IAChD,OAAO,IAAI,OAAO,CAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtD,MAAM,GAAG,GAAG,IAAA,cAAO,EAAC,GAAG,EAAE,GAAG,CAAC,EAAE;YAG7B,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE;YAEvB,CAAC,CAAC,CAAC;YAEH,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE;gBACpB,MAAM,CAAC,GAAG,CAAC,CAAC;YACd,CAAC,CAAC,CAAC;YAEH,GAAG,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBACjB,OAAO,CAAC,GAAG,CAAC,CAAC;YACf,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,GAAG,CAAC,GAAG,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AApBW,QAAA,eAAe,mBAoB1B"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/src/host-array/host-array.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get, Header, HostParam, Param } from '@nestjs/common'; 2 | import { Observable, of } from 'rxjs'; 3 | import { HostArrayService } from './host-array.service'; 4 | import { UserByIdPipe } from './users/user-by-id.pipe'; 5 | 6 | @Controller({ 7 | path: 'host-array', 8 | host: [':tenant.example1.com', ':tenant.example2.com'], 9 | }) 10 | export class HostArrayController { 11 | constructor(private readonly hostService: HostArrayService) {} 12 | 13 | @Get() 14 | @Header('Authorization', 'Bearer') 15 | greeting(@HostParam('tenant') tenant: string): string { 16 | return `${this.hostService.greeting()} tenant=${tenant}`; 17 | } 18 | 19 | @Get('async') 20 | async asyncGreeting(@HostParam('tenant') tenant: string): Promise { 21 | return `${await this.hostService.greeting()} tenant=${tenant}`; 22 | } 23 | 24 | @Get('stream') 25 | streamGreeting(@HostParam('tenant') tenant: string): Observable { 26 | return of(`${this.hostService.greeting()} tenant=${tenant}`); 27 | } 28 | 29 | @Get('local-pipe/:id') 30 | localPipe( 31 | @Param('id', UserByIdPipe) 32 | user: any, 33 | @HostParam('tenant') tenant: string, 34 | ): any { 35 | return { ...user, tenant }; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/app.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.AppModule = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const hello_module_1 = require("./hello/hello.module"); 12 | const host_array_module_1 = require("./host-array/host-array.module"); 13 | const host_module_1 = require("./host/host.module"); 14 | let AppModule = class AppModule { 15 | }; 16 | exports.AppModule = AppModule; 17 | exports.AppModule = AppModule = __decorate([ 18 | (0, common_1.Module)({ 19 | imports: [hello_module_1.HelloModule, host_module_1.HostModule, host_array_module_1.HostArrayModule], 20 | }) 21 | ], AppModule); 22 | //# sourceMappingURL=app.module.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/host.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"host.controller.js","sourceRoot":"","sources":["../../../../../tests/hello-world/src/host/host.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA2E;AAC3E,+BAAsC;AACtC,iDAA6C;AAC7C,6DAAuD;AAMhD,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YAA6B,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;IAAG,CAAC;IAIzD,QAAQ,CAAsB,MAAc;QAC1C,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,WAAW,MAAM,EAAE,CAAC;IAC3D,CAAC;IAGK,AAAN,KAAK,CAAC,aAAa,CAAsB,MAAc;QACrD,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,WAAW,MAAM,EAAE,CAAC;IACjE,CAAC;IAGD,cAAc,CAAsB,MAAc;QAChD,OAAO,IAAA,SAAE,EAAC,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,WAAW,MAAM,EAAE,CAAC,CAAC;IAC/D,CAAC;IAGD,SAAS,CAEP,IAAS,EACY,MAAc;QAEnC,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC;IAC7B,CAAC;CACF,CAAA;AA3BY,wCAAc;AAKzB;IAFC,IAAA,YAAG,GAAE;IACL,IAAA,eAAM,EAAC,eAAe,EAAE,QAAQ,CAAC;IACxB,WAAA,IAAA,kBAAS,EAAC,QAAQ,CAAC,CAAA;;;;8CAE5B;AAGK;IADL,IAAA,YAAG,EAAC,OAAO,CAAC;IACQ,WAAA,IAAA,kBAAS,EAAC,QAAQ,CAAC,CAAA;;;;mDAEvC;AAGD;IADC,IAAA,YAAG,EAAC,QAAQ,CAAC;IACE,WAAA,IAAA,kBAAS,EAAC,QAAQ,CAAC,CAAA;;;oCAAkB,iBAAU;oDAE9D;AAGD;IADC,IAAA,YAAG,EAAC,gBAAgB,CAAC;IAEnB,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,8BAAY,CAAC,CAAA;IAEzB,WAAA,IAAA,kBAAS,EAAC,QAAQ,CAAC,CAAA;;;;+CAGrB;yBA1BU,cAAc;IAJ1B,IAAA,mBAAU,EAAC;QACV,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,qBAAqB;KAC5B,CAAC;qCAE0C,0BAAW;GAD1C,cAAc,CA2B1B"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/request.interceptor.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.RequestInterceptor = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | let RequestInterceptor = class RequestInterceptor { 12 | intercept(context, next) { 13 | const client = context.switchToWs().getClient(); 14 | const pattern = context.switchToWs().getPattern(); 15 | client.pattern = pattern; 16 | return next.handle(); 17 | } 18 | }; 19 | exports.RequestInterceptor = RequestInterceptor; 20 | exports.RequestInterceptor = RequestInterceptor = __decorate([ 21 | (0, common_1.Injectable)() 22 | ], RequestInterceptor); 23 | //# sourceMappingURL=request.interceptor.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/app-locals/e2e/hyper-express-locals.spec.ts: -------------------------------------------------------------------------------- 1 | import { Test, TestingModule } from '@nestjs/testing'; 2 | import { AppModule } from '../src/app.module'; 3 | import { appInit } from '../../../utils/app-init'; 4 | import { spec } from 'pactum'; 5 | import { 6 | HyperExpressAdapter, 7 | NestHyperExpressApplication, 8 | } from '@m8a/platform-hyper-express'; 9 | 10 | describe('App-level globals (Express Application)', () => { 11 | let module: TestingModule; 12 | let app: NestHyperExpressApplication; 13 | 14 | beforeEach(async () => { 15 | module = await Test.createTestingModule({ 16 | imports: [AppModule], 17 | }).compile(); 18 | 19 | app = module.createNestApplication( 20 | new HyperExpressAdapter(), 21 | ); 22 | 23 | await appInit(app); 24 | }); 25 | 26 | it('should get "title" from "app.locals"', async () => { 27 | app.setLocal('title', 'My Website'); 28 | await spec().get('/').expectStatus(200).expectBodyContains('My Website'); 29 | }); 30 | 31 | it('should get "email" from "app.locals"', async () => { 32 | app.setLocal('email', 'admin@example.com'); 33 | spec().get('/').expectStatus(200).expectBodyContains('admin@example.com'); 34 | }); 35 | 36 | afterEach(async () => { 37 | await app.close(); 38 | }); 39 | }); 40 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/src/app.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.AppModule = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const app_controller_1 = require("./app.controller"); 12 | const app_service_1 = require("./app.service"); 13 | const errors_controller_1 = require("./errors.controller"); 14 | let AppModule = class AppModule { 15 | }; 16 | exports.AppModule = AppModule; 17 | exports.AppModule = AppModule = __decorate([ 18 | (0, common_1.Module)({ 19 | imports: [], 20 | controllers: [app_controller_1.AppController, errors_controller_1.ErrorsController], 21 | providers: [app_service_1.AppService], 22 | }) 23 | ], AppModule); 24 | //# sourceMappingURL=app.module.js.map -------------------------------------------------------------------------------- /common/scripts/install-run-rushx.js: -------------------------------------------------------------------------------- 1 | // THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED. 2 | // 3 | // This script is intended for usage in an automated build environment where the Rush command may not have 4 | // been preinstalled, or may have an unpredictable version. This script will automatically install the version of Rush 5 | // specified in the rush.json configuration file (if not already installed), and then pass a command-line to the 6 | // rushx command. 7 | // 8 | // An example usage would be: 9 | // 10 | // node common/scripts/install-run-rushx.js custom-command 11 | // 12 | // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ 13 | 14 | /******/ (() => { // webpackBootstrap 15 | /******/ "use strict"; 16 | var __webpack_exports__ = {}; 17 | /*!*************************************************!*\ 18 | !*** ./lib-esnext/scripts/install-run-rushx.js ***! 19 | \*************************************************/ 20 | 21 | // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. 22 | // See LICENSE in the project root for license information. 23 | require('./install-run-rush'); 24 | //# sourceMappingURL=install-run-rushx.js.map 25 | module.exports = __webpack_exports__; 26 | /******/ })() 27 | ; 28 | //# sourceMappingURL=install-run-rushx.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/host.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.HostModule = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const host_controller_1 = require("./host.controller"); 12 | const host_service_1 = require("./host.service"); 13 | const users_service_1 = require("./users/users.service"); 14 | let HostModule = class HostModule { 15 | }; 16 | exports.HostModule = HostModule; 17 | exports.HostModule = HostModule = __decorate([ 18 | (0, common_1.Module)({ 19 | controllers: [host_controller_1.HostController], 20 | providers: [host_service_1.HostService, users_service_1.UsersService], 21 | }) 22 | ], HostModule); 23 | //# sourceMappingURL=host.module.js.map -------------------------------------------------------------------------------- /libs/platform-hyper-express/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@m8a/platform-hyper-express", 3 | "version": "0.0.1", 4 | "description": "Nest - modern, fast, powerful node.js web framework (@platform-hyper-express)", 5 | "author": "Scott Molinari and Kamil Myśliwiec, et al", 6 | "license": "MIT", 7 | "homepage": "https://nestjs.com", 8 | "funding": { 9 | "type": "opencollective", 10 | "url": "https://opencollective.com/nest" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/nestjs/nest.git", 15 | "directory": "packages/platform-express" 16 | }, 17 | "publishConfig": { 18 | "access": "public" 19 | }, 20 | "main": "dist/index.js", 21 | "scripts": { 22 | "build": "nest build", 23 | "build:watch": "nest build --watch" 24 | }, 25 | "dependencies": { 26 | "body-parser": "1.20.2", 27 | "content-type": "1.0.5", 28 | "cors": "2.8.5", 29 | "hyper-express": "workspace:*", 30 | "live-directory": "3.0.3", 31 | "rxjs": "7.8.1", 32 | "tslib": "2.6.2", 33 | "reflect-metadata": "^0.2.0" 34 | }, 35 | "devDependencies": { 36 | "@nestjs/common": "10.3.1", 37 | "@nestjs/core": "10.3.1", 38 | "@types/cors": "~2.8.17", 39 | "@types/content-type": "~1.1.8" 40 | }, 41 | "peerDependencies": { 42 | "@nestjs/common": "^10.0.0", 43 | "@nestjs/core": "^10.0.0" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/hello.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.HelloModule = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const hello_controller_1 = require("./hello.controller"); 12 | const hello_service_1 = require("./hello.service"); 13 | const users_service_1 = require("./users/users.service"); 14 | let HelloModule = class HelloModule { 15 | }; 16 | exports.HelloModule = HelloModule; 17 | exports.HelloModule = HelloModule = __decorate([ 18 | (0, common_1.Module)({ 19 | controllers: [hello_controller_1.HelloController], 20 | providers: [hello_service_1.HelloService, users_service_1.UsersService], 21 | }) 22 | ], HelloModule); 23 | //# sourceMappingURL=hello.module.js.map -------------------------------------------------------------------------------- /common/scripts/install-run-rush-pnpm.js: -------------------------------------------------------------------------------- 1 | // THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED. 2 | // 3 | // This script is intended for usage in an automated build environment where the Rush command may not have 4 | // been preinstalled, or may have an unpredictable version. This script will automatically install the version of Rush 5 | // specified in the rush.json configuration file (if not already installed), and then pass a command-line to the 6 | // rush-pnpm command. 7 | // 8 | // An example usage would be: 9 | // 10 | // node common/scripts/install-run-rush-pnpm.js pnpm-command 11 | // 12 | // For more information, see: https://rushjs.io/pages/maintainer/setup_new_repo/ 13 | 14 | /******/ (() => { // webpackBootstrap 15 | /******/ "use strict"; 16 | var __webpack_exports__ = {}; 17 | /*!*****************************************************!*\ 18 | !*** ./lib-esnext/scripts/install-run-rush-pnpm.js ***! 19 | \*****************************************************/ 20 | 21 | // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. 22 | // See LICENSE in the project root for license information. 23 | require('./install-run-rush'); 24 | //# sourceMappingURL=install-run-rush-pnpm.js.map 25 | module.exports = __webpack_exports__; 26 | /******/ })() 27 | ; 28 | //# sourceMappingURL=install-run-rush-pnpm.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/request.filter.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.RequestFilter = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const websockets_1 = require("@nestjs/websockets"); 12 | let RequestFilter = class RequestFilter { 13 | catch(exception, host) { 14 | const wsCtx = host.switchToWs(); 15 | const pattern = wsCtx.getPattern(); 16 | const client = wsCtx.getClient(); 17 | client.emit('exception', { pattern, message: exception.message }); 18 | } 19 | }; 20 | exports.RequestFilter = RequestFilter; 21 | exports.RequestFilter = RequestFilter = __decorate([ 22 | (0, common_1.Catch)(websockets_1.WsException) 23 | ], RequestFilter); 24 | //# sourceMappingURL=request.filter.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/host-array.controller.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"host-array.controller.js","sourceRoot":"","sources":["../../../../../tests/hello-world/src/host-array/host-array.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA2E;AAC3E,+BAAsC;AACtC,6DAAwD;AACxD,6DAAuD;AAMhD,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YAA6B,WAA6B;QAA7B,gBAAW,GAAX,WAAW,CAAkB;IAAG,CAAC;IAI9D,QAAQ,CAAsB,MAAc;QAC1C,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,WAAW,MAAM,EAAE,CAAC;IAC3D,CAAC;IAGK,AAAN,KAAK,CAAC,aAAa,CAAsB,MAAc;QACrD,OAAO,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,WAAW,MAAM,EAAE,CAAC;IACjE,CAAC;IAGD,cAAc,CAAsB,MAAc;QAChD,OAAO,IAAA,SAAE,EAAC,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,WAAW,MAAM,EAAE,CAAC,CAAC;IAC/D,CAAC;IAGD,SAAS,CAEP,IAAS,EACY,MAAc;QAEnC,OAAO,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC;IAC7B,CAAC;CACF,CAAA;AA3BY,kDAAmB;AAK9B;IAFC,IAAA,YAAG,GAAE;IACL,IAAA,eAAM,EAAC,eAAe,EAAE,QAAQ,CAAC;IACxB,WAAA,IAAA,kBAAS,EAAC,QAAQ,CAAC,CAAA;;;;mDAE5B;AAGK;IADL,IAAA,YAAG,EAAC,OAAO,CAAC;IACQ,WAAA,IAAA,kBAAS,EAAC,QAAQ,CAAC,CAAA;;;;wDAEvC;AAGD;IADC,IAAA,YAAG,EAAC,QAAQ,CAAC;IACE,WAAA,IAAA,kBAAS,EAAC,QAAQ,CAAC,CAAA;;;oCAAkB,iBAAU;yDAE9D;AAGD;IADC,IAAA,YAAG,EAAC,gBAAgB,CAAC;IAEnB,WAAA,IAAA,cAAK,EAAC,IAAI,EAAE,8BAAY,CAAC,CAAA;IAEzB,WAAA,IAAA,kBAAS,EAAC,QAAQ,CAAC,CAAA;;;;oDAGrB;8BA1BU,mBAAmB;IAJ/B,IAAA,mBAAU,EAAC;QACV,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;KACvD,CAAC;qCAE0C,qCAAgB;GAD/C,mBAAmB,CA2B/B"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/dto/test.dto.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.TestDto = void 0; 13 | const class_validator_1 = require("class-validator"); 14 | class TestDto { 15 | } 16 | exports.TestDto = TestDto; 17 | __decorate([ 18 | (0, class_validator_1.IsString)(), 19 | (0, class_validator_1.IsNotEmpty)(), 20 | __metadata("design:type", String) 21 | ], TestDto.prototype, "string", void 0); 22 | __decorate([ 23 | (0, class_validator_1.IsNumber)(), 24 | __metadata("design:type", Number) 25 | ], TestDto.prototype, "number", void 0); 26 | //# sourceMappingURL=test.dto.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/dto/test.dto.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.TestDto = void 0; 13 | const class_validator_1 = require("class-validator"); 14 | class TestDto { 15 | } 16 | exports.TestDto = TestDto; 17 | __decorate([ 18 | (0, class_validator_1.IsString)(), 19 | (0, class_validator_1.IsNotEmpty)(), 20 | __metadata("design:type", String) 21 | ], TestDto.prototype, "string", void 0); 22 | __decorate([ 23 | (0, class_validator_1.IsNumber)(), 24 | __metadata("design:type", Number) 25 | ], TestDto.prototype, "number", void 0); 26 | //# sourceMappingURL=test.dto.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/dto/test.dto.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.TestDto = void 0; 13 | const class_validator_1 = require("class-validator"); 14 | class TestDto { 15 | } 16 | exports.TestDto = TestDto; 17 | __decorate([ 18 | (0, class_validator_1.IsString)(), 19 | (0, class_validator_1.IsNotEmpty)(), 20 | __metadata("design:type", String) 21 | ], TestDto.prototype, "string", void 0); 22 | __decorate([ 23 | (0, class_validator_1.IsNumber)(), 24 | __metadata("design:type", Number) 25 | ], TestDto.prototype, "number", void 0); 26 | //# sourceMappingURL=test.dto.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/send-files/e2e/utils.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.sendHttpRequest = exports.sendCanceledHttpRequest = exports.getHttpBaseOptions = void 0; 4 | const http_1 = require("http"); 5 | const url_1 = require("url"); 6 | const getHttpBaseOptions = async (app) => { 7 | const url = await app.getUrl(); 8 | return new url_1.URL(url); 9 | }; 10 | exports.getHttpBaseOptions = getHttpBaseOptions; 11 | const sendCanceledHttpRequest = async (url) => { 12 | return new Promise((resolve, reject) => { 13 | const req = (0, http_1.request)(url, res => { 14 | res.on('data', () => { 15 | req.destroy(); 16 | }); 17 | res.on('close', resolve); 18 | }); 19 | req.end(); 20 | }); 21 | }; 22 | exports.sendCanceledHttpRequest = sendCanceledHttpRequest; 23 | const sendHttpRequest = async (url) => { 24 | return new Promise((resolve, reject) => { 25 | const req = (0, http_1.request)(url, res => { 26 | res.on('data', chunk => { 27 | }); 28 | res.on('error', err => { 29 | reject(err); 30 | }); 31 | res.on('end', () => { 32 | resolve(res); 33 | }); 34 | }); 35 | req.end(); 36 | }); 37 | }; 38 | exports.sendHttpRequest = sendHttpRequest; 39 | //# sourceMappingURL=utils.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/e2e/guards.spec.ts: -------------------------------------------------------------------------------- 1 | import { Injectable, UnauthorizedException } from '@nestjs/common'; 2 | import { APP_GUARD } from '@nestjs/core'; 3 | import { Test, TestingModule } from '@nestjs/testing'; 4 | import { AppModule } from '../src/app.module'; 5 | import { 6 | HyperExpressAdapter, 7 | NestHyperExpressApplication, 8 | } from '@m8a/platform-hyper-express'; 9 | import { spec } from 'pactum'; 10 | import { appInit } from '../../utils/app-init'; 11 | 12 | @Injectable() 13 | export class AuthGuard { 14 | canActivate() { 15 | const x = true; 16 | if (x) { 17 | throw new UnauthorizedException(); 18 | } 19 | } 20 | } 21 | 22 | async function createTestModule(guard): Promise { 23 | return await Test.createTestingModule({ 24 | imports: [AppModule], 25 | providers: [ 26 | { 27 | provide: APP_GUARD, 28 | useValue: guard, 29 | }, 30 | ], 31 | }).compile(); 32 | } 33 | 34 | describe('Guards', () => { 35 | let app: NestHyperExpressApplication; 36 | 37 | it(`should prevent access (unauthorized)`, async () => { 38 | const testModule = await createTestModule(new AuthGuard()) 39 | app = testModule.createNestApplication( 40 | new HyperExpressAdapter(), 41 | ); 42 | await appInit(app); 43 | return spec().get('/hello').expectStatus(401); 44 | }); 45 | 46 | afterEach(async () => { 47 | await app.close(); 48 | }); 49 | }); 50 | -------------------------------------------------------------------------------- /common/config/rush/.pnpmfile.cjs: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * When using the PNPM package manager, you can use pnpmfile.js to workaround 5 | * dependencies that have mistakes in their package.json file. (This feature is 6 | * functionally similar to Yarn's "resolutions".) 7 | * 8 | * For details, see the PNPM documentation: 9 | * https://pnpm.js.org/docs/en/hooks.html 10 | * 11 | * IMPORTANT: SINCE THIS FILE CONTAINS EXECUTABLE CODE, MODIFYING IT IS LIKELY TO INVALIDATE 12 | * ANY CACHED DEPENDENCY ANALYSIS. After any modification to pnpmfile.js, it's recommended to run 13 | * "rush update --full" so that PNPM will recalculate all version selections. 14 | */ 15 | module.exports = { 16 | hooks: { 17 | readPackage 18 | } 19 | }; 20 | 21 | /** 22 | * This hook is invoked during installation before a package's dependencies 23 | * are selected. 24 | * The `packageJson` parameter is the deserialized package.json 25 | * contents for the package that is about to be installed. 26 | * The `context` parameter provides a log() function. 27 | * The return value is the updated object. 28 | */ 29 | function readPackage(packageJson, context) { 30 | 31 | // // The karma types have a missing dependency on typings from the log4js package. 32 | // if (packageJson.name === '@types/karma') { 33 | // context.log('Fixed up dependencies for @types/karma'); 34 | // packageJson.dependencies['log4js'] = '0.6.38'; 35 | // } 36 | 37 | return packageJson; 38 | } 39 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/host-array.module.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | Object.defineProperty(exports, "__esModule", { value: true }); 9 | exports.HostArrayModule = void 0; 10 | const common_1 = require("@nestjs/common"); 11 | const host_array_controller_1 = require("./host-array.controller"); 12 | const host_array_service_1 = require("./host-array.service"); 13 | const users_service_1 = require("./users/users.service"); 14 | let HostArrayModule = class HostArrayModule { 15 | }; 16 | exports.HostArrayModule = HostArrayModule; 17 | exports.HostArrayModule = HostArrayModule = __decorate([ 18 | (0, common_1.Module)({ 19 | controllers: [host_array_controller_1.HostArrayController], 20 | providers: [host_array_service_1.HostArrayService, users_service_1.UsersService], 21 | }) 22 | ], HostArrayModule); 23 | //# sourceMappingURL=host-array.module.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/global-prefix/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { MiddlewareConsumer, Module, RequestMethod } from '@nestjs/common'; 2 | import { AppController } from './app.controller'; 3 | 4 | export const MIDDLEWARE_VALUE = 'middleware'; 5 | export const MIDDLEWARE_PARAM_VALUE = 'middleware_param'; 6 | 7 | @Module({ 8 | controllers: [AppController], 9 | }) 10 | export class AppModule { 11 | configure(consumer: MiddlewareConsumer) { 12 | consumer 13 | .apply((req, res, next) => res.end(MIDDLEWARE_VALUE)) 14 | .forRoutes({ path: MIDDLEWARE_VALUE, method: RequestMethod.GET }) 15 | .apply((req, res, next) => res.status(201).end(MIDDLEWARE_VALUE)) 16 | .forRoutes({ path: MIDDLEWARE_VALUE, method: RequestMethod.POST }) 17 | .apply((req, res, next) => res.end(MIDDLEWARE_PARAM_VALUE)) 18 | .forRoutes({ path: MIDDLEWARE_VALUE + '/*', method: RequestMethod.GET }) 19 | .apply((req, res, next) => res.status(201).end(MIDDLEWARE_PARAM_VALUE)) 20 | .forRoutes({ path: MIDDLEWARE_VALUE + '/*', method: RequestMethod.POST }) 21 | .apply((req, res, next) => { 22 | req.extras = { data: 'Data attached in middleware' }; 23 | next(); 24 | }) 25 | .forRoutes({ path: '*', method: RequestMethod.GET }) 26 | .apply((req, res, next) => { 27 | req.middlewareParams = req.params; 28 | next(); 29 | }) 30 | .forRoutes({ path: '*', method: RequestMethod.GET }); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/send-files/src/app.service.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.service.js","sourceRoot":"","sources":["../../../../tests/send-files/src/app.service.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4D;AAC5D,mCAAqC;AACrC,2BAAoD;AACpD,+BAA4B;AAC5B,+BAAsC;AACtC,mCAAkC;AAClC,yCAAqC;AAG9B,IAAM,UAAU,GAAhB,MAAM,UAAU;IAAhB;QAEY,cAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;IA2CnD,CAAC;IAzCC,aAAa;QACX,OAAO,IAAI,uBAAc,CACvB,IAAA,qBAAgB,EAAC,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC,CACnD,CAAC;IACJ,CAAC;IAED,SAAS;QACP,OAAO,IAAI,uBAAc,CAAC,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IAC5E,CAAC;IAED,UAAU;QACR,OAAO,IAAI,kBAAO,CAAC,aAAa,CAAC,CAAC;IACpC,CAAC;IAED,WAAW;QACT,OAAO,IAAA,SAAE,EAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;IAClC,CAAC;IAED,kBAAkB;QAChB,MAAM,IAAI,GAAG,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC,CAAC;QAC5D,OAAO,IAAI,uBAAc,CACvB,IAAA,qBAAgB,EAAC,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC,EAClD;YACE,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,kCAAkC;YAC/C,MAAM,EAAE,IAAI,CAAC,UAAU;SACxB,CACF,CAAC;IACJ,CAAC;IAED,uBAAuB;QACrB,OAAO,IAAI,uBAAc,CAAC,IAAA,qBAAgB,EAAC,oBAAoB,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,aAAa;QACX,MAAM,MAAM,GAAG,IAAI,iBAAQ,EAAE,CAAC;QAC9B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAA,oBAAW,EAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAEtD,MAAM,CAAC,KAAK,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;QACxB,OAAO,IAAI,uBAAc,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;CACF,CAAA;AA7CY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;GACA,UAAU,CA6CtB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/listen/e2e/hyper-express-listen.spec.ts: -------------------------------------------------------------------------------- 1 | import { Test, TestingModule } from '@nestjs/testing'; 2 | import { AppModule } from '../src/app.module'; 3 | import { INestApplication } from '@nestjs/common'; 4 | import { HyperExpressAdapter } from '@m8a/platform-hyper-express'; 5 | 6 | describe('Listen (Express Application)', () => { 7 | let testModule: TestingModule; 8 | let app: INestApplication; 9 | 10 | beforeEach(async () => { 11 | testModule = await Test.createTestingModule({ 12 | imports: [AppModule], 13 | }).compile(); 14 | app = testModule.createNestApplication(new HyperExpressAdapter()); 15 | }); 16 | 17 | afterEach(async () => { 18 | app.close(); 19 | }); 20 | 21 | it('should resolve with httpServer on success', async () => { 22 | const response = await app.listen(9999); 23 | expect(response).toEqual(app.getHttpServer()); 24 | }); 25 | 26 | it('should reject if the port is not available', async () => { 27 | await app.listen(9999); 28 | const secondApp = testModule.createNestApplication( 29 | new HyperExpressAdapter(), 30 | ); 31 | try { 32 | await secondApp.listen(9999); 33 | } catch (error) { 34 | expect(error.code).toEqual('EADDRINUSE'); 35 | } 36 | }); 37 | 38 | it('should reject if there is an invalid host', async () => { 39 | try { 40 | await app.listen(9999, '1'); 41 | } catch (error) { 42 | expect(error.code).toEqual('EADDRNOTAVAIL'); 43 | } 44 | }); 45 | }); 46 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/cors/src/app.controller.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.AppController = void 0; 13 | const common_1 = require("@nestjs/common"); 14 | let AppController = class AppController { 15 | getGlobals() { 16 | return ''; 17 | } 18 | }; 19 | exports.AppController = AppController; 20 | __decorate([ 21 | (0, common_1.Get)(), 22 | __metadata("design:type", Function), 23 | __metadata("design:paramtypes", []), 24 | __metadata("design:returntype", void 0) 25 | ], AppController.prototype, "getGlobals", null); 26 | exports.AppController = AppController = __decorate([ 27 | (0, common_1.Controller)() 28 | ], AppController); 29 | //# sourceMappingURL=app.controller.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/ack.gateway.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.AckGateway = void 0; 13 | const websockets_1 = require("@nestjs/websockets"); 14 | let AckGateway = class AckGateway { 15 | onPush() { 16 | return 'pong'; 17 | } 18 | }; 19 | exports.AckGateway = AckGateway; 20 | __decorate([ 21 | (0, websockets_1.SubscribeMessage)('push'), 22 | __metadata("design:type", Function), 23 | __metadata("design:paramtypes", []), 24 | __metadata("design:returntype", void 0) 25 | ], AckGateway.prototype, "onPush", null); 26 | exports.AckGateway = AckGateway = __decorate([ 27 | (0, websockets_1.WebSocketGateway)(8080) 28 | ], AckGateway); 29 | //# sourceMappingURL=ack.gateway.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/hello/users/user-by-id.pipe.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.UserByIdPipe = void 0; 13 | const common_1 = require("@nestjs/common"); 14 | const users_service_1 = require("./users.service"); 15 | let UserByIdPipe = class UserByIdPipe { 16 | constructor(usersService) { 17 | this.usersService = usersService; 18 | } 19 | transform(value, metadata) { 20 | return this.usersService.findById(value); 21 | } 22 | }; 23 | exports.UserByIdPipe = UserByIdPipe; 24 | exports.UserByIdPipe = UserByIdPipe = __decorate([ 25 | (0, common_1.Injectable)(), 26 | __metadata("design:paramtypes", [users_service_1.UsersService]) 27 | ], UserByIdPipe); 28 | //# sourceMappingURL=user-by-id.pipe.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host/users/user-by-id.pipe.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.UserByIdPipe = void 0; 13 | const common_1 = require("@nestjs/common"); 14 | const users_service_1 = require("./users.service"); 15 | let UserByIdPipe = class UserByIdPipe { 16 | constructor(usersService) { 17 | this.usersService = usersService; 18 | } 19 | transform(value, metadata) { 20 | return this.usersService.findById(value); 21 | } 22 | }; 23 | exports.UserByIdPipe = UserByIdPipe; 24 | exports.UserByIdPipe = UserByIdPipe = __decorate([ 25 | (0, common_1.Injectable)(), 26 | __metadata("design:paramtypes", [users_service_1.UsersService]) 27 | ], UserByIdPipe); 28 | //# sourceMappingURL=user-by-id.pipe.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/hello-world/src/host-array/users/user-by-id.pipe.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.UserByIdPipe = void 0; 13 | const common_1 = require("@nestjs/common"); 14 | const users_service_1 = require("./users.service"); 15 | let UserByIdPipe = class UserByIdPipe { 16 | constructor(usersService) { 17 | this.usersService = usersService; 18 | } 19 | transform(value, metadata) { 20 | return this.usersService.findById(value); 21 | } 22 | }; 23 | exports.UserByIdPipe = UserByIdPipe; 24 | exports.UserByIdPipe = UserByIdPipe = __decorate([ 25 | (0, common_1.Injectable)(), 26 | __metadata("design:paramtypes", [users_service_1.UsersService]) 27 | ], UserByIdPipe); 28 | //# sourceMappingURL=user-by-id.pipe.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/send-files/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": false, 5 | "noImplicitAny": false, 6 | "removeComments": true, 7 | "noLib": false, 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "ES2021", 11 | "sourceMap": true, 12 | "allowJs": true, 13 | "outDir": "./dist", 14 | "paths": { 15 | "@nestjs/common": ["../../packages/common"], 16 | "@nestjs/common/*": ["../../packages/common/*"], 17 | "@nestjs/core": ["../../packages/core"], 18 | "@nestjs/core/*": ["../../packages/core/*"], 19 | "@nestjs/microservices": ["../../packages/microservices"], 20 | "@nestjs/microservices/*": ["../../packages/microservices/*"], 21 | "@nestjs/websockets": ["../../packages/websockets"], 22 | "@nestjs/websockets/*": ["../../packages/websockets/*"], 23 | "@nestjs/testing": ["../../packages/testing"], 24 | "@nestjs/testing/*": ["../../packages/testing/*"], 25 | "@nestjs/platform-express": ["../../packages/platform-express"], 26 | "@nestjs/platform-express/*": ["../../packages/platform-express/*"], 27 | "@nestjs/platform-socket.io": ["../../packages/platform-socket.io"], 28 | "@nestjs/platform-socket.io/*": ["../../packages/platform-socket.io/*"], 29 | "@nestjs/platform-ws": ["../../packages/platform-ws"], 30 | "@nestjs/platform-ws/*": ["../../packages/platform-ws/*"] 31 | } 32 | }, 33 | "include": [ 34 | "src/**/*", 35 | "e2e/**/*" 36 | ], 37 | "exclude": [ 38 | "node_modules", 39 | ] 40 | } -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/websockets/e2e/gateway-ack.spec.ts: -------------------------------------------------------------------------------- 1 | //TODO: rewrite test for hyper-express, if needed 2 | // import { INestApplication } from '@nestjs/common'; 3 | // import { Test } from '@nestjs/testing'; 4 | // import { expect } from 'chai'; 5 | // import { io } from 'socket.io-client'; 6 | // import { AckGateway } from '../src/ack.gateway'; 7 | 8 | // async function createNestApp(...gateways): Promise { 9 | // const testingModule = await Test.createTestingModule({ 10 | // providers: gateways, 11 | // }).compile(); 12 | // const app = testingModule.createNestApplication(); 13 | // return app; 14 | // } 15 | 16 | // describe('WebSocketGateway (ack)', () => { 17 | // let ws, app; 18 | 19 | // it(`should handle message with ack (http)`, async () => { 20 | // app = await createNestApp(AckGateway); 21 | // await app.listen(3000); 22 | 23 | // ws = io('http://localhost:8080'); 24 | // await new Promise(resolve => 25 | // ws.emit('push', { test: 'test' }, data => { 26 | // expect(data).to.be.eql('pong'); 27 | // resolve(); 28 | // }), 29 | // ); 30 | // }); 31 | 32 | // it(`should handle message with ack & without data (http)`, async () => { 33 | // app = await createNestApp(AckGateway); 34 | // await app.listen(3000); 35 | 36 | // ws = io('http://localhost:8080'); 37 | // await new Promise(resolve => 38 | // ws.emit('push', data => { 39 | // expect(data).to.be.eql('pong'); 40 | // resolve(); 41 | // }), 42 | // ); 43 | // }); 44 | 45 | // afterEach(() => app.close()); 46 | // }); 47 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/sse/src/app.controller.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.AppController = void 0; 13 | const common_1 = require("@nestjs/common"); 14 | const rxjs_1 = require("rxjs"); 15 | let AppController = class AppController { 16 | sse() { 17 | return (0, rxjs_1.interval)(1000).pipe((0, rxjs_1.map)(_ => ({ data: { hello: 'world' } }))); 18 | } 19 | }; 20 | exports.AppController = AppController; 21 | __decorate([ 22 | (0, common_1.Sse)('sse'), 23 | __metadata("design:type", Function), 24 | __metadata("design:paramtypes", []), 25 | __metadata("design:returntype", rxjs_1.Observable) 26 | ], AppController.prototype, "sse", null); 27 | exports.AppController = AppController = __decorate([ 28 | (0, common_1.Controller)() 29 | ], AppController); 30 | //# sourceMappingURL=app.controller.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/send-files/e2e/utils.ts: -------------------------------------------------------------------------------- 1 | import { INestApplication } from '@nestjs/common'; 2 | import { IncomingMessage, request, RequestOptions } from 'http'; 3 | import { URL } from 'url'; 4 | 5 | export const getHttpBaseOptions = async ( 6 | app: INestApplication, 7 | ): Promise => { 8 | const url = await app.getUrl(); 9 | return new URL(url); 10 | }; 11 | 12 | export const sendCanceledHttpRequest = async (url: URL) => { 13 | return new Promise((resolve, reject) => { 14 | const req = request(url, res => { 15 | // close the request once we get the first response of data 16 | res.on('data', () => { 17 | req.destroy(); 18 | }); 19 | // response is closed, move on to next request and verify it's doable 20 | res.on('close', resolve); 21 | }); 22 | // fire the request 23 | req.end(); 24 | }); 25 | }; 26 | 27 | export const sendHttpRequest = async (url: URL) => { 28 | return new Promise((resolve, reject) => { 29 | const req = request(url, res => { 30 | // this makes sure that the response actually starts and is read. We could verify this value against the same 31 | // that is in an earlier test, but all we care about in _this_ test is that the status code is 200 32 | res.on('data', chunk => { 33 | // no op 34 | }); 35 | // fail the test if something goes wrong 36 | res.on('error', err => { 37 | reject(err); 38 | }); 39 | // pass the response back so we can verify values in the test 40 | res.on('end', () => { 41 | resolve(res); 42 | }); 43 | }); 44 | // fire the request 45 | req.end(); 46 | }); 47 | }; 48 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/error.gateway.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.ErrorGateway = void 0; 13 | const websockets_1 = require("@nestjs/websockets"); 14 | const rxjs_1 = require("rxjs"); 15 | let ErrorGateway = class ErrorGateway { 16 | onPush(client, data) { 17 | return (0, rxjs_1.throwError)(() => new websockets_1.WsException('test')); 18 | } 19 | }; 20 | exports.ErrorGateway = ErrorGateway; 21 | __decorate([ 22 | (0, websockets_1.SubscribeMessage)('push'), 23 | __metadata("design:type", Function), 24 | __metadata("design:paramtypes", [Object, Object]), 25 | __metadata("design:returntype", void 0) 26 | ], ErrorGateway.prototype, "onPush", null); 27 | exports.ErrorGateway = ErrorGateway = __decorate([ 28 | (0, websockets_1.WebSocketGateway)(8080) 29 | ], ErrorGateway); 30 | //# sourceMappingURL=error.gateway.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/app-locals/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": false, 5 | "noImplicitAny": false, 6 | "removeComments": true, 7 | "noLib": false, 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "ES2021", 11 | "sourceMap": true, 12 | "allowJs": true, 13 | "outDir": "./dist", 14 | "paths": { 15 | "@nestjs/common": ["../../../packages/common"], 16 | "@nestjs/common/*": ["../../../packages/common/*"], 17 | "@nestjs/core": ["../../../packages/core"], 18 | "@nestjs/core/*": ["../../../packages/core/*"], 19 | "@nestjs/microservices": ["../../../packages/microservices"], 20 | "@nestjs/microservices/*": ["../../../packages/microservices/*"], 21 | "@nestjs/websockets": ["../../../packages/websockets"], 22 | "@nestjs/websockets/*": ["../../../packages/websockets/*"], 23 | "@nestjs/testing": ["../../../packages/websockets"], 24 | "@nestjs/testing/*": ["../../../packages/websockets/*"], 25 | "@nestjs/platform-express": ["../../../packages/platform-express"], 26 | "@nestjs/platform-express/*": ["../../../packages/platform-express/*"], 27 | "@nestjs/platform-socket.io": ["../../../packages/platform-socket.io"], 28 | "@nestjs/platform-socket.io/*": ["../../../packages/platform-socket.io/*"], 29 | "@nestjs/platform-ws": ["../../../packages/platform-ws"], 30 | "@nestjs/platform-ws/*": ["../../../packages/platform-ws/*"] 31 | } 32 | }, 33 | "include": [ 34 | "src/**/*", 35 | "e2e/**/*" 36 | ], 37 | "exclude": [ 38 | "node_modules", 39 | ] 40 | } -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/get-url/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": false, 5 | "noImplicitAny": false, 6 | "removeComments": true, 7 | "noLib": false, 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "ES2021", 11 | "sourceMap": true, 12 | "allowJs": true, 13 | "outDir": "./dist", 14 | "paths": { 15 | "@nestjs/common": ["../../../packages/common"], 16 | "@nestjs/common/*": ["../../../packages/common/*"], 17 | "@nestjs/core": ["../../../packages/core"], 18 | "@nestjs/core/*": ["../../../packages/core/*"], 19 | "@nestjs/microservices": ["../../../packages/microservices"], 20 | "@nestjs/microservices/*": ["../../../packages/microservices/*"], 21 | "@nestjs/websockets": ["../../../packages/websockets"], 22 | "@nestjs/websockets/*": ["../../../packages/websockets/*"], 23 | "@nestjs/testing": ["../../../packages/websockets"], 24 | "@nestjs/testing/*": ["../../../packages/websockets/*"], 25 | "@nestjs/platform-express": ["../../../packages/platform-express"], 26 | "@nestjs/platform-express/*": ["../../../packages/platform-express/*"], 27 | "@nestjs/platform-socket.io": ["../../../packages/platform-socket.io"], 28 | "@nestjs/platform-socket.io/*": ["../../../packages/platform-socket.io/*"], 29 | "@nestjs/platform-ws": ["../../../packages/platform-ws"], 30 | "@nestjs/platform-ws/*": ["../../../packages/platform-ws/*"] 31 | } 32 | }, 33 | "include": [ 34 | "src/**/*", 35 | "e2e/**/*" 36 | ], 37 | "exclude": [ 38 | "node_modules", 39 | ] 40 | } -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/raw-body/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": false, 5 | "noImplicitAny": false, 6 | "removeComments": true, 7 | "noLib": false, 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "ES2021", 11 | "sourceMap": true, 12 | "allowJs": true, 13 | "outDir": "./dist", 14 | "paths": { 15 | "@nestjs/common": ["../../../packages/common"], 16 | "@nestjs/common/*": ["../../../packages/common/*"], 17 | "@nestjs/core": ["../../../packages/core"], 18 | "@nestjs/core/*": ["../../../packages/core/*"], 19 | "@nestjs/microservices": ["../../../packages/microservices"], 20 | "@nestjs/microservices/*": ["../../../packages/microservices/*"], 21 | "@nestjs/websockets": ["../../../packages/websockets"], 22 | "@nestjs/websockets/*": ["../../../packages/websockets/*"], 23 | "@nestjs/testing": ["../../../packages/websockets"], 24 | "@nestjs/testing/*": ["../../../packages/websockets/*"], 25 | "@nestjs/platform-express": ["../../../packages/platform-express"], 26 | "@nestjs/platform-express/*": ["../../../packages/platform-express/*"], 27 | "@nestjs/platform-socket.io": ["../../../packages/platform-socket.io"], 28 | "@nestjs/platform-socket.io/*": ["../../../packages/platform-socket.io/*"], 29 | "@nestjs/platform-ws": ["../../../packages/platform-ws"], 30 | "@nestjs/platform-ws/*": ["../../../packages/platform-ws/*"] 31 | } 32 | }, 33 | "include": [ 34 | "src/**/*", 35 | "e2e/**/*" 36 | ], 37 | "exclude": [ 38 | "node_modules", 39 | ] 40 | } -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/e2e/hyper-express-instance.spec.ts: -------------------------------------------------------------------------------- 1 | import { Test } from '@nestjs/testing'; 2 | import { AppModule } from '../src/app.module'; 3 | import { spec } from 'pactum'; 4 | import { 5 | HyperExpressAdapter, 6 | NestHyperExpressApplication, 7 | } from '@m8a/platform-hyper-express'; 8 | import { appInit } from '../../utils/app-init'; 9 | 10 | describe('Hello world (hyper-express instance)', () => { 11 | let app: NestHyperExpressApplication; 12 | beforeEach(async () => { 13 | const module = await Test.createTestingModule({ 14 | imports: [AppModule], 15 | }).compile(); 16 | 17 | app = module.createNestApplication( 18 | new HyperExpressAdapter(), 19 | ); 20 | 21 | await appInit(app); 22 | }); 23 | 24 | it(`/GET`, async () => { 25 | return await spec() 26 | .get('/hello') 27 | .expectStatus(200) 28 | .expectBody('Hello world!'); 29 | }); 30 | 31 | it(`/GET (Promise/async)`, async () => { 32 | return await spec() 33 | .get('/hello/async') 34 | .expectStatus(200) 35 | .expectBody('Hello world!'); 36 | }); 37 | 38 | it(`/GET (Observable stream)`, async () => { 39 | return await spec() 40 | .get('/hello/stream') 41 | .expectStatus(200) 42 | .expectBody('Hello world!'); 43 | }); 44 | 45 | it(`/GET { host: ":tenant.example.com" } not matched`, async () => { 46 | return await spec().get('/host').expectStatus(404).expectJson({ 47 | statusCode: 404, 48 | error: 'Not Found', 49 | message: 'Cannot GET /host', 50 | }); 51 | }); 52 | 53 | afterEach(async () => { 54 | await app.close(); 55 | }); 56 | }); 57 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/global-prefix/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": false, 5 | "noImplicitAny": false, 6 | "removeComments": true, 7 | "noLib": false, 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "ES2021", 11 | "sourceMap": true, 12 | "allowJs": true, 13 | "outDir": "./dist", 14 | "paths": { 15 | "@nestjs/common": ["../../../packages/common"], 16 | "@nestjs/common/*": ["../../../packages/common/*"], 17 | "@nestjs/core": ["../../../packages/core"], 18 | "@nestjs/core/*": ["../../../packages/core/*"], 19 | "@nestjs/microservices": ["../../../packages/microservices"], 20 | "@nestjs/microservices/*": ["../../../packages/microservices/*"], 21 | "@nestjs/websockets": ["../../../packages/websockets"], 22 | "@nestjs/websockets/*": ["../../../packages/websockets/*"], 23 | "@nestjs/testing": ["../../../packages/websockets"], 24 | "@nestjs/testing/*": ["../../../packages/websockets/*"], 25 | "@nestjs/platform-express": ["../../../packages/platform-express"], 26 | "@nestjs/platform-express/*": ["../../../packages/platform-express/*"], 27 | "@nestjs/platform-socket.io": ["../../../packages/platform-socket.io"], 28 | "@nestjs/platform-socket.io/*": ["../../../packages/platform-socket.io/*"], 29 | "@nestjs/platform-ws": ["../../../packages/platform-ws"], 30 | "@nestjs/platform-ws/*": ["../../../packages/platform-ws/*"] 31 | } 32 | }, 33 | "include": [ 34 | "src/**/*", 35 | "e2e/**/*" 36 | ], 37 | "exclude": [ 38 | "node_modules", 39 | ] 40 | } -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/global-prefix/src/app.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../../../../tests/nest-application/global-prefix/src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA2E;AAC3E,qDAAiD;AAEpC,QAAA,gBAAgB,GAAG,YAAY,CAAC;AAChC,QAAA,sBAAsB,GAAG,kBAAkB,CAAC;AAKlD,IAAM,SAAS,GAAf,MAAM,SAAS;IACpB,SAAS,CAAC,QAA4B;QACpC,QAAQ;aACL,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,wBAAgB,CAAC,CAAC;aACpD,SAAS,CAAC,EAAE,IAAI,EAAE,wBAAgB,EAAE,MAAM,EAAE,sBAAa,CAAC,GAAG,EAAE,CAAC;aAChE,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,wBAAgB,CAAC,CAAC;aAChE,SAAS,CAAC,EAAE,IAAI,EAAE,wBAAgB,EAAE,MAAM,EAAE,sBAAa,CAAC,IAAI,EAAE,CAAC;aACjE,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,8BAAsB,CAAC,CAAC;aAC1D,SAAS,CAAC,EAAE,IAAI,EAAE,wBAAgB,GAAG,IAAI,EAAE,MAAM,EAAE,sBAAa,CAAC,GAAG,EAAE,CAAC;aACvE,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,8BAAsB,CAAC,CAAC;aACtE,SAAS,CAAC,EAAE,IAAI,EAAE,wBAAgB,GAAG,IAAI,EAAE,MAAM,EAAE,sBAAa,CAAC,IAAI,EAAE,CAAC;aACxE,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACxB,GAAG,CAAC,MAAM,GAAG,EAAE,IAAI,EAAE,6BAA6B,EAAE,CAAC;YACrD,IAAI,EAAE,CAAC;QACT,CAAC,CAAC;aACD,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,sBAAa,CAAC,GAAG,EAAE,CAAC;aACnD,KAAK,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;YACxB,GAAG,CAAC,gBAAgB,GAAG,GAAG,CAAC,MAAM,CAAC;YAClC,IAAI,EAAE,CAAC;QACT,CAAC,CAAC;aACD,SAAS,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,sBAAa,CAAC,GAAG,EAAE,CAAC,CAAC;IACzD,CAAC;CACF,CAAA;AAtBY,8BAAS;oBAAT,SAAS;IAHrB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,8BAAa,CAAC;KAC7B,CAAC;GACW,SAAS,CAsBrB"} -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/ws-path.gateway.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.WsPathGateway = void 0; 13 | const websockets_1 = require("@nestjs/websockets"); 14 | let WsPathGateway = class WsPathGateway { 15 | onPush(client, data) { 16 | return { 17 | event: 'pop', 18 | data, 19 | }; 20 | } 21 | }; 22 | exports.WsPathGateway = WsPathGateway; 23 | __decorate([ 24 | (0, websockets_1.SubscribeMessage)('push'), 25 | __metadata("design:type", Function), 26 | __metadata("design:paramtypes", [Object, Object]), 27 | __metadata("design:returntype", void 0) 28 | ], WsPathGateway.prototype, "onPush", null); 29 | exports.WsPathGateway = WsPathGateway = __decorate([ 30 | (0, websockets_1.WebSocketGateway)({ 31 | path: '/ws-path', 32 | }) 33 | ], WsPathGateway); 34 | //# sourceMappingURL=ws-path.gateway.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/nest-application/sse/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": false, 5 | "noImplicitAny": false, 6 | "removeComments": true, 7 | "noLib": false, 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "target": "ES2021", 11 | "sourceMap": true, 12 | "allowJs": true, 13 | "lib": ["dom"], 14 | "outDir": "./dist", 15 | "paths": { 16 | "@nestjs/common": ["../../../packages/common"], 17 | "@nestjs/common/*": ["../../../packages/common/*"], 18 | "@nestjs/core": ["../../../packages/core"], 19 | "@nestjs/core/*": ["../../../packages/core/*"], 20 | "@nestjs/microservices": ["../../../packages/microservices"], 21 | "@nestjs/microservices/*": ["../../../packages/microservices/*"], 22 | "@nestjs/websockets": ["../../../packages/websockets"], 23 | "@nestjs/websockets/*": ["../../../packages/websockets/*"], 24 | "@nestjs/testing": ["../../../packages/websockets"], 25 | "@nestjs/testing/*": ["../../../packages/websockets/*"], 26 | "@nestjs/platform-express": ["../../../packages/platform-express"], 27 | "@nestjs/platform-express/*": ["../../../packages/platform-express/*"], 28 | "@nestjs/platform-socket.io": ["../../../packages/platform-socket.io"], 29 | "@nestjs/platform-socket.io/*": ["../../../packages/platform-socket.io/*"], 30 | "@nestjs/platform-ws": ["../../../packages/platform-ws"], 31 | "@nestjs/platform-ws/*": ["../../../packages/platform-ws/*"] 32 | } 33 | }, 34 | "include": [ 35 | "src/**/*", 36 | "e2e/**/*" 37 | ], 38 | "exclude": [ 39 | "node_modules", 40 | ] 41 | } -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/e2e/local-pipes.spec.ts: -------------------------------------------------------------------------------- 1 | import { Test } from '@nestjs/testing'; 2 | import { AppModule } from '../src/app.module'; 3 | import { spec } from 'pactum'; 4 | import { 5 | HyperExpressAdapter, 6 | NestHyperExpressApplication, 7 | } from '@m8a/platform-hyper-express'; 8 | import { appInit } from '../../utils/app-init'; 9 | 10 | describe('Hello world (default adapter)', () => { 11 | let app: NestHyperExpressApplication; 12 | 13 | beforeEach(async () => { 14 | const module = await Test.createTestingModule({ 15 | imports: [AppModule], 16 | }).compile(); 17 | 18 | app = module.createNestApplication( 19 | new HyperExpressAdapter(), 20 | ); 21 | 22 | await appInit(app); 23 | }); 24 | 25 | it(`host=example.com should execute locally injected pipe by HelloController`, () => { 26 | return spec().get('/hello/local-pipe/1').expectStatus(200).expectBody({ 27 | id: '1', 28 | }); 29 | }); 30 | 31 | it(`host=host.example.com should execute locally injected pipe by HostController`, () => { 32 | return spec() 33 | .get('/host/local-pipe/1') 34 | .withHeaders('Host', 'acme.example.com') 35 | .expectStatus(200) 36 | .expectBody({ 37 | id: '1', 38 | host: true, 39 | tenant: 'acme', 40 | }); 41 | }); 42 | 43 | it(`should return 404 for mismatched host`, () => { 44 | return spec().get('/host/local-pipe/1').expectStatus(404).expectBody({ 45 | error: 'Not Found', 46 | message: 'Cannot GET /host/local-pipe/1', 47 | statusCode: 404, 48 | }); 49 | }); 50 | 51 | afterEach(async () => { 52 | await app.close(); 53 | }); 54 | }); 55 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/ws-path2.gateway.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.WsPathGateway2 = void 0; 13 | const websockets_1 = require("@nestjs/websockets"); 14 | let WsPathGateway2 = class WsPathGateway2 { 15 | onPush(client, data) { 16 | return { 17 | event: 'pop', 18 | data, 19 | }; 20 | } 21 | }; 22 | exports.WsPathGateway2 = WsPathGateway2; 23 | __decorate([ 24 | (0, websockets_1.SubscribeMessage)('push'), 25 | __metadata("design:type", Function), 26 | __metadata("design:paramtypes", [Object, Object]), 27 | __metadata("design:returntype", void 0) 28 | ], WsPathGateway2.prototype, "onPush", null); 29 | exports.WsPathGateway2 = WsPathGateway2 = __decorate([ 30 | (0, websockets_1.WebSocketGateway)({ 31 | path: '/ws-path', 32 | }) 33 | ], WsPathGateway2); 34 | //# sourceMappingURL=ws-path2.gateway.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/tests/hello-world/e2e/middleware-execute-order.spec.ts: -------------------------------------------------------------------------------- 1 | import { appInit } from '../../utils/app-init'; 2 | import { 3 | HyperExpressAdapter, 4 | NestHyperExpressApplication, 5 | } from '@m8a/platform-hyper-express'; 6 | import { MiddlewareConsumer, Module } from '@nestjs/common'; 7 | import { Test } from '@nestjs/testing'; 8 | import { spec } from 'pactum'; 9 | 10 | const RETURN_VALUE_A = 'test_A'; 11 | const RETURN_VALUE_B = 'test_B'; 12 | 13 | @Module({ 14 | imports: [], 15 | }) 16 | class ModuleA { 17 | configure(consumer: MiddlewareConsumer) { 18 | consumer 19 | .apply((req, res, next) => { 20 | res.send(RETURN_VALUE_A); 21 | }) 22 | .forRoutes('hello'); 23 | } 24 | } 25 | 26 | @Module({ 27 | imports: [ModuleA], 28 | }) 29 | class ModuleB { 30 | configure(consumer: MiddlewareConsumer) { 31 | consumer 32 | .apply((req, res, next) => { 33 | res.send(RETURN_VALUE_B); 34 | }) 35 | .forRoutes('hello'); 36 | } 37 | } 38 | 39 | @Module({ 40 | imports: [ModuleB], 41 | }) 42 | class TestModule {} 43 | 44 | describe('Middleware (execution order)', () => { 45 | let app: NestHyperExpressApplication; 46 | 47 | beforeEach(async () => { 48 | app = ( 49 | await Test.createTestingModule({ 50 | imports: [TestModule], 51 | }).compile() 52 | ).createNestApplication(new HyperExpressAdapter()); 53 | 54 | await appInit(app); 55 | }); 56 | 57 | it(`should execute middleware in topological order`, async () => { 58 | return await spec() 59 | .get('/hello') 60 | .expectStatus(200) 61 | .expectBody(RETURN_VALUE_B); 62 | }); 63 | 64 | afterEach(async () => { 65 | await app.close(); 66 | }); 67 | }); 68 | -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/namespace.gateway.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.NamespaceGateway = void 0; 13 | const websockets_1 = require("@nestjs/websockets"); 14 | let NamespaceGateway = class NamespaceGateway { 15 | onPush(client, data) { 16 | return { 17 | event: 'pop', 18 | data, 19 | }; 20 | } 21 | }; 22 | exports.NamespaceGateway = NamespaceGateway; 23 | __decorate([ 24 | (0, websockets_1.SubscribeMessage)('push'), 25 | __metadata("design:type", Function), 26 | __metadata("design:paramtypes", [Object, Object]), 27 | __metadata("design:returntype", void 0) 28 | ], NamespaceGateway.prototype, "onPush", null); 29 | exports.NamespaceGateway = NamespaceGateway = __decorate([ 30 | (0, websockets_1.WebSocketGateway)(8080, { 31 | namespace: 'test', 32 | }) 33 | ], NamespaceGateway); 34 | //# sourceMappingURL=namespace.gateway.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/src/app.controller.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.AppController = void 0; 13 | const common_1 = require("@nestjs/common"); 14 | const app_service_1 = require("./app.service"); 15 | let AppController = class AppController { 16 | constructor(appService) { 17 | this.appService = appService; 18 | } 19 | getHello() { 20 | return this.appService.getHello(); 21 | } 22 | }; 23 | exports.AppController = AppController; 24 | __decorate([ 25 | (0, common_1.Get)('hello'), 26 | __metadata("design:type", Function), 27 | __metadata("design:paramtypes", []), 28 | __metadata("design:returntype", String) 29 | ], AppController.prototype, "getHello", null); 30 | exports.AppController = AppController = __decorate([ 31 | (0, common_1.Controller)(), 32 | __metadata("design:paramtypes", [app_service_1.AppService]) 33 | ], AppController); 34 | //# sourceMappingURL=app.controller.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/websockets/src/example-path.gateway.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.ExamplePathGateway = void 0; 13 | const websockets_1 = require("@nestjs/websockets"); 14 | let ExamplePathGateway = class ExamplePathGateway { 15 | onPush(client, data) { 16 | return { 17 | event: 'pop', 18 | data, 19 | }; 20 | } 21 | }; 22 | exports.ExamplePathGateway = ExamplePathGateway; 23 | __decorate([ 24 | (0, websockets_1.SubscribeMessage)('push'), 25 | __metadata("design:type", Function), 26 | __metadata("design:paramtypes", [Object, Object]), 27 | __metadata("design:returntype", void 0) 28 | ], ExamplePathGateway.prototype, "onPush", null); 29 | exports.ExamplePathGateway = ExamplePathGateway = __decorate([ 30 | (0, websockets_1.WebSocketGateway)({ 31 | path: '/example', 32 | }) 33 | ], ExamplePathGateway); 34 | //# sourceMappingURL=example-path.gateway.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/app-locals/src/app.controller.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | var __param = (this && this.__param) || function (paramIndex, decorator) { 12 | return function (target, key) { decorator(target, key, paramIndex); } 13 | }; 14 | Object.defineProperty(exports, "__esModule", { value: true }); 15 | exports.AppController = void 0; 16 | const common_1 = require("@nestjs/common"); 17 | let AppController = class AppController { 18 | getGlobals(req) { 19 | return req.app.locals; 20 | } 21 | }; 22 | exports.AppController = AppController; 23 | __decorate([ 24 | (0, common_1.Get)(), 25 | __param(0, (0, common_1.Req)()), 26 | __metadata("design:type", Function), 27 | __metadata("design:paramtypes", [Object]), 28 | __metadata("design:returntype", Object) 29 | ], AppController.prototype, "getGlobals", null); 30 | exports.AppController = AppController = __decorate([ 31 | (0, common_1.Controller)() 32 | ], AppController); 33 | //# sourceMappingURL=app.controller.js.map -------------------------------------------------------------------------------- /apps/hyper-express-test-app/dist/tests/nest-application/get-url/src/app.controller.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 6 | return c > 3 && r && Object.defineProperty(target, key, r), r; 7 | }; 8 | var __metadata = (this && this.__metadata) || function (k, v) { 9 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 10 | }; 11 | Object.defineProperty(exports, "__esModule", { value: true }); 12 | exports.AppController = void 0; 13 | const common_1 = require("@nestjs/common"); 14 | const app_service_1 = require("./app.service"); 15 | let AppController = class AppController { 16 | constructor(appService) { 17 | this.appService = appService; 18 | } 19 | getHello() { 20 | return this.appService.sayHello(); 21 | } 22 | }; 23 | exports.AppController = AppController; 24 | __decorate([ 25 | (0, common_1.Get)(), 26 | __metadata("design:type", Function), 27 | __metadata("design:paramtypes", []), 28 | __metadata("design:returntype", String) 29 | ], AppController.prototype, "getHello", null); 30 | exports.AppController = AppController = __decorate([ 31 | (0, common_1.Controller)(), 32 | __metadata("design:paramtypes", [app_service_1.AppService]) 33 | ], AppController); 34 | //# sourceMappingURL=app.controller.js.map --------------------------------------------------------------------------------