├── .editorconfig ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── example ├── apps │ ├── Example.ts │ ├── Faker.ts │ ├── Twitter.ts │ └── WS.ts ├── client-socketio.html ├── client-websocket.html ├── hans.json ├── index.ts └── middleware │ ├── IsAuthenticated.ts │ └── LogRequestBody.ts ├── package.json ├── public └── a_random_hans.jpg ├── src ├── Adapter │ ├── AdapterInterface.ts │ ├── ExpressAdapter.ts │ ├── GraphqlAdapter.ts │ ├── SocketIOAdapter.ts │ ├── WebsocketAdapter.ts │ └── index.ts ├── Decorator │ ├── App.ts │ ├── Graphql.ts │ ├── Middleware.ts │ ├── Route.ts │ ├── Socket.ts │ ├── Websocket.ts │ └── index.ts ├── Hans.ts ├── Model │ ├── GraphqlRouteDefinition.ts │ ├── HttpMethod.ts │ ├── MetadataKey.ts │ ├── RouteDefinition.ts │ ├── SocketDefinition.ts │ └── index.ts ├── Response │ ├── FileResponse.ts │ ├── JsonResponse.ts │ ├── Response.ts │ ├── TemplateResponse.ts │ ├── XmlFromJsonResponse.ts │ └── index.ts ├── Utility │ ├── Container.ts │ ├── Helper.ts │ ├── Metadata.ts │ ├── State.ts │ ├── Type.ts │ └── index.ts ├── console.ts └── index.ts ├── test ├── Adapter │ ├── ExpressAdapter.test.ts │ ├── GraphqlAdapter.test.ts │ ├── SocketIOAdapter.test.ts │ └── WebSocketAdapter.test.ts ├── Decorator │ ├── App.test.ts │ ├── Graphql.test.ts │ ├── Middleware.test.ts │ └── Route.test.ts ├── Hans.test.ts ├── Response │ ├── FileResponse.test.ts │ ├── JsonRespose.test.ts │ ├── Response.test.ts │ ├── TemplateResponse.test.ts │ └── XmlFromJsonResponse.test.ts └── Utility │ ├── Container.test.ts │ ├── Helper.test.ts │ ├── Metadata.test.ts │ └── State.test.ts ├── tsconfig.json └── tslint.json /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/.editorconfig -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/.gitignore -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/.travis.yml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/README.md -------------------------------------------------------------------------------- /example/apps/Example.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/example/apps/Example.ts -------------------------------------------------------------------------------- /example/apps/Faker.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/example/apps/Faker.ts -------------------------------------------------------------------------------- /example/apps/Twitter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/example/apps/Twitter.ts -------------------------------------------------------------------------------- /example/apps/WS.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/example/apps/WS.ts -------------------------------------------------------------------------------- /example/client-socketio.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/example/client-socketio.html -------------------------------------------------------------------------------- /example/client-websocket.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/example/client-websocket.html -------------------------------------------------------------------------------- /example/hans.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/example/hans.json -------------------------------------------------------------------------------- /example/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/example/index.ts -------------------------------------------------------------------------------- /example/middleware/IsAuthenticated.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/example/middleware/IsAuthenticated.ts -------------------------------------------------------------------------------- /example/middleware/LogRequestBody.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/example/middleware/LogRequestBody.ts -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/package.json -------------------------------------------------------------------------------- /public/a_random_hans.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/public/a_random_hans.jpg -------------------------------------------------------------------------------- /src/Adapter/AdapterInterface.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Adapter/AdapterInterface.ts -------------------------------------------------------------------------------- /src/Adapter/ExpressAdapter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Adapter/ExpressAdapter.ts -------------------------------------------------------------------------------- /src/Adapter/GraphqlAdapter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Adapter/GraphqlAdapter.ts -------------------------------------------------------------------------------- /src/Adapter/SocketIOAdapter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Adapter/SocketIOAdapter.ts -------------------------------------------------------------------------------- /src/Adapter/WebsocketAdapter.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Adapter/WebsocketAdapter.ts -------------------------------------------------------------------------------- /src/Adapter/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Adapter/index.ts -------------------------------------------------------------------------------- /src/Decorator/App.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Decorator/App.ts -------------------------------------------------------------------------------- /src/Decorator/Graphql.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Decorator/Graphql.ts -------------------------------------------------------------------------------- /src/Decorator/Middleware.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Decorator/Middleware.ts -------------------------------------------------------------------------------- /src/Decorator/Route.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Decorator/Route.ts -------------------------------------------------------------------------------- /src/Decorator/Socket.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Decorator/Socket.ts -------------------------------------------------------------------------------- /src/Decorator/Websocket.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Decorator/Websocket.ts -------------------------------------------------------------------------------- /src/Decorator/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Decorator/index.ts -------------------------------------------------------------------------------- /src/Hans.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Hans.ts -------------------------------------------------------------------------------- /src/Model/GraphqlRouteDefinition.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Model/GraphqlRouteDefinition.ts -------------------------------------------------------------------------------- /src/Model/HttpMethod.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Model/HttpMethod.ts -------------------------------------------------------------------------------- /src/Model/MetadataKey.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Model/MetadataKey.ts -------------------------------------------------------------------------------- /src/Model/RouteDefinition.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Model/RouteDefinition.ts -------------------------------------------------------------------------------- /src/Model/SocketDefinition.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Model/SocketDefinition.ts -------------------------------------------------------------------------------- /src/Model/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Model/index.ts -------------------------------------------------------------------------------- /src/Response/FileResponse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Response/FileResponse.ts -------------------------------------------------------------------------------- /src/Response/JsonResponse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Response/JsonResponse.ts -------------------------------------------------------------------------------- /src/Response/Response.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Response/Response.ts -------------------------------------------------------------------------------- /src/Response/TemplateResponse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Response/TemplateResponse.ts -------------------------------------------------------------------------------- /src/Response/XmlFromJsonResponse.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Response/XmlFromJsonResponse.ts -------------------------------------------------------------------------------- /src/Response/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Response/index.ts -------------------------------------------------------------------------------- /src/Utility/Container.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Utility/Container.ts -------------------------------------------------------------------------------- /src/Utility/Helper.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Utility/Helper.ts -------------------------------------------------------------------------------- /src/Utility/Metadata.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Utility/Metadata.ts -------------------------------------------------------------------------------- /src/Utility/State.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Utility/State.ts -------------------------------------------------------------------------------- /src/Utility/Type.ts: -------------------------------------------------------------------------------- 1 | export interface Type { 2 | new(...args: any[]): T; 3 | } 4 | -------------------------------------------------------------------------------- /src/Utility/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/Utility/index.ts -------------------------------------------------------------------------------- /src/console.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/console.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/src/index.ts -------------------------------------------------------------------------------- /test/Adapter/ExpressAdapter.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Adapter/ExpressAdapter.test.ts -------------------------------------------------------------------------------- /test/Adapter/GraphqlAdapter.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Adapter/GraphqlAdapter.test.ts -------------------------------------------------------------------------------- /test/Adapter/SocketIOAdapter.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Adapter/SocketIOAdapter.test.ts -------------------------------------------------------------------------------- /test/Adapter/WebSocketAdapter.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Adapter/WebSocketAdapter.test.ts -------------------------------------------------------------------------------- /test/Decorator/App.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Decorator/App.test.ts -------------------------------------------------------------------------------- /test/Decorator/Graphql.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Decorator/Graphql.test.ts -------------------------------------------------------------------------------- /test/Decorator/Middleware.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Decorator/Middleware.test.ts -------------------------------------------------------------------------------- /test/Decorator/Route.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Decorator/Route.test.ts -------------------------------------------------------------------------------- /test/Hans.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Hans.test.ts -------------------------------------------------------------------------------- /test/Response/FileResponse.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Response/FileResponse.test.ts -------------------------------------------------------------------------------- /test/Response/JsonRespose.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Response/JsonRespose.test.ts -------------------------------------------------------------------------------- /test/Response/Response.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Response/Response.test.ts -------------------------------------------------------------------------------- /test/Response/TemplateResponse.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Response/TemplateResponse.test.ts -------------------------------------------------------------------------------- /test/Response/XmlFromJsonResponse.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Response/XmlFromJsonResponse.test.ts -------------------------------------------------------------------------------- /test/Utility/Container.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Utility/Container.test.ts -------------------------------------------------------------------------------- /test/Utility/Helper.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Utility/Helper.test.ts -------------------------------------------------------------------------------- /test/Utility/Metadata.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Utility/Metadata.test.ts -------------------------------------------------------------------------------- /test/Utility/State.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/test/Utility/State.test.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/tsconfig.json -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/loremipsum/mocking-hans/HEAD/tslint.json --------------------------------------------------------------------------------