@creator.co/wapi 1.2.4 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npmpublish.yml +1 -1
- package/README.md +216 -5
- package/dist/index.d.ts +15 -0
- package/dist/index.js.map +1 -1
- package/dist/jest.config.js +1 -1
- package/dist/jest.config.js.map +1 -1
- package/dist/package.json +13 -2
- package/dist/src/API/Request.d.ts +45 -82
- package/dist/src/API/Request.js +49 -77
- package/dist/src/API/Request.js.map +1 -1
- package/dist/src/API/Response.d.ts +94 -163
- package/dist/src/API/Response.js +101 -161
- package/dist/src/API/Response.js.map +1 -1
- package/dist/src/API/Utils.d.ts +21 -42
- package/dist/src/API/Utils.js +22 -43
- package/dist/src/API/Utils.js.map +1 -1
- package/dist/src/BaseEvent/EventProcessor.d.ts +32 -55
- package/dist/src/BaseEvent/EventProcessor.js +30 -38
- package/dist/src/BaseEvent/EventProcessor.js.map +1 -1
- package/dist/src/BaseEvent/Process.d.ts +20 -43
- package/dist/src/BaseEvent/Process.js +16 -27
- package/dist/src/BaseEvent/Process.js.map +1 -1
- package/dist/src/BaseEvent/Transaction.d.ts +104 -2
- package/dist/src/BaseEvent/Transaction.js +196 -41
- package/dist/src/BaseEvent/Transaction.js.map +1 -1
- package/dist/src/Config/Configuration.d.ts +48 -66
- package/dist/src/Config/Configuration.js +25 -42
- package/dist/src/Config/Configuration.js.map +1 -1
- package/dist/src/Config/EnvironmentVar.d.ts +30 -57
- package/dist/src/Config/EnvironmentVar.js +28 -41
- package/dist/src/Config/EnvironmentVar.js.map +1 -1
- package/dist/src/Crypto/Crypto.d.ts +17 -35
- package/dist/src/Crypto/Crypto.js +12 -21
- package/dist/src/Crypto/Crypto.js.map +1 -1
- package/dist/src/Crypto/JWT.d.ts +21 -32
- package/dist/src/Crypto/JWT.js +14 -22
- package/dist/src/Crypto/JWT.js.map +1 -1
- package/dist/src/Database/Database.d.ts +18 -0
- package/dist/src/Database/Database.js +18 -0
- package/dist/src/Database/Database.js.map +1 -0
- package/dist/src/Database/DatabaseManager.d.ts +32 -0
- package/dist/src/Database/DatabaseManager.js +50 -0
- package/dist/src/Database/DatabaseManager.js.map +1 -0
- package/dist/src/Database/DatabaseTransaction.d.ts +65 -0
- package/dist/src/Database/DatabaseTransaction.js +183 -0
- package/dist/src/Database/DatabaseTransaction.js.map +1 -0
- package/dist/src/Database/integrations/knex/KnexDatabase.d.ts +22 -0
- package/dist/src/Database/integrations/knex/KnexDatabase.js +108 -0
- package/dist/src/Database/integrations/knex/KnexDatabase.js.map +1 -0
- package/dist/src/Database/integrations/knex/KnexTransaction.d.ts +37 -0
- package/dist/src/Database/integrations/knex/KnexTransaction.js +60 -0
- package/dist/src/Database/integrations/knex/KnexTransaction.js.map +1 -0
- package/dist/src/Database/integrations/pgsql/PostgresDatabase.d.ts +30 -0
- package/dist/src/Database/integrations/pgsql/PostgresDatabase.js +108 -0
- package/dist/src/Database/integrations/pgsql/PostgresDatabase.js.map +1 -0
- package/dist/src/Database/integrations/pgsql/PostgresTransaction.d.ts +37 -0
- package/dist/src/Database/integrations/pgsql/PostgresTransaction.js +60 -0
- package/dist/src/Database/integrations/pgsql/PostgresTransaction.js.map +1 -0
- package/dist/src/Globals.d.ts +26 -94
- package/dist/src/Globals.js +26 -95
- package/dist/src/Globals.js.map +1 -1
- package/dist/src/Logger/Logger.d.ts +82 -105
- package/dist/src/Logger/Logger.js +111 -136
- package/dist/src/Logger/Logger.js.map +1 -1
- package/dist/src/Mailer/Mailer.d.ts +39 -75
- package/dist/src/Mailer/Mailer.js +36 -65
- package/dist/src/Mailer/Mailer.js.map +1 -1
- package/dist/src/Publisher/Publisher.d.ts +17 -25
- package/dist/src/Publisher/Publisher.js +21 -32
- package/dist/src/Publisher/Publisher.js.map +1 -1
- package/dist/src/Server/RouteResolver.d.ts +14 -22
- package/dist/src/Server/RouteResolver.js +21 -34
- package/dist/src/Server/RouteResolver.js.map +1 -1
- package/dist/src/Server/Router.d.ts +72 -51
- package/dist/src/Server/Router.js +8 -17
- package/dist/src/Server/Router.js.map +1 -1
- package/dist/src/Server/lib/ContainerServer.d.ts +15 -31
- package/dist/src/Server/lib/ContainerServer.js +13 -28
- package/dist/src/Server/lib/ContainerServer.js.map +1 -1
- package/dist/src/Server/lib/Server.d.ts +17 -32
- package/dist/src/Server/lib/Server.js +18 -28
- package/dist/src/Server/lib/Server.js.map +1 -1
- package/dist/src/Server/lib/container/GenericHandler.d.ts +5 -0
- package/dist/src/Server/lib/container/GenericHandler.js +16 -3
- package/dist/src/Server/lib/container/GenericHandler.js.map +1 -1
- package/dist/src/Server/lib/container/GenericHandlerEvent.d.ts +22 -37
- package/dist/src/Server/lib/container/GenericHandlerEvent.js +29 -41
- package/dist/src/Server/lib/container/GenericHandlerEvent.js.map +1 -1
- package/dist/src/Server/lib/container/HealthHandler.d.ts +6 -0
- package/dist/src/Server/lib/container/HealthHandler.js +6 -0
- package/dist/src/Server/lib/container/HealthHandler.js.map +1 -1
- package/dist/src/Server/lib/container/Proxy.d.ts +24 -52
- package/dist/src/Server/lib/container/Proxy.js +52 -52
- package/dist/src/Server/lib/container/Proxy.js.map +1 -1
- package/dist/src/Server/lib/container/Utils.d.ts +6 -10
- package/dist/src/Server/lib/container/Utils.js +6 -10
- package/dist/src/Server/lib/container/Utils.js.map +1 -1
- package/dist/src/Validation/Validator.d.ts +9 -13
- package/dist/src/Validation/Validator.js +8 -12
- package/dist/src/Validation/Validator.js.map +1 -1
- package/index.ts +15 -0
- package/jest.config.ts +1 -1
- package/package.json +13 -2
- package/src/API/Request.ts +66 -84
- package/src/API/Response.ts +144 -203
- package/src/API/Utils.ts +28 -44
- package/src/BaseEvent/EventProcessor.ts +52 -77
- package/src/BaseEvent/Process.ts +27 -52
- package/src/BaseEvent/Transaction.ts +147 -27
- package/src/Config/Configuration.ts +59 -76
- package/src/Config/EnvironmentVar.ts +39 -62
- package/src/Crypto/Crypto.ts +20 -36
- package/src/Crypto/JWT.ts +31 -35
- package/src/Database/Database.ts +19 -0
- package/src/Database/DatabaseManager.ts +51 -0
- package/src/Database/DatabaseTransaction.ts +118 -0
- package/src/Database/integrations/knex/KnexDatabase.ts +47 -0
- package/src/Database/integrations/knex/KnexTransaction.ts +51 -0
- package/src/Database/integrations/pgsql/PostgresDatabase.ts +49 -0
- package/src/Database/integrations/pgsql/PostgresTransaction.ts +54 -0
- package/src/Database/types.d.ts +49 -0
- package/src/Globals.ts +28 -96
- package/src/Logger/Logger.ts +141 -160
- package/src/Mailer/Mailer.ts +43 -76
- package/src/Publisher/Publisher.ts +31 -40
- package/src/Server/RouteResolver.ts +31 -52
- package/src/Server/Router.ts +75 -54
- package/src/Server/lib/ContainerServer.ts +20 -32
- package/src/Server/lib/Server.ts +19 -34
- package/src/Server/lib/container/GenericHandler.ts +17 -3
- package/src/Server/lib/container/GenericHandlerEvent.ts +44 -54
- package/src/Server/lib/container/HealthHandler.ts +6 -0
- package/src/Server/lib/container/Proxy.ts +39 -58
- package/src/Server/lib/container/Utils.ts +7 -10
- package/src/Validation/Validator.ts +11 -13
- package/tests/API/Response.test.ts +55 -56
- package/tests/BaseEvent/EventProcessor.test.ts +49 -50
- package/tests/BaseEvent/Process.test.ts +2 -2
- package/tests/BaseEvent/Transaction.test.ts +102 -44
- package/tests/Config/Config.test.ts +27 -27
- package/tests/Config/EnvironmentVar.test.ts +54 -18
- package/tests/Database/DatabaseManager.test.ts +55 -0
- package/tests/Database/integrations/knex/KnexDatabase.test.ts +53 -0
- package/tests/Database/integrations/knex/KnexTransaction.test.ts +133 -0
- package/tests/Database/integrations/pg/PostgresDatabase.test.ts +50 -0
- package/tests/Database/integrations/pg/PostgresTransaction.test.ts +51 -0
- package/tests/Publisher/Publisher.test.ts +3 -3
- package/tests/Server/lib/ContainerServer.test.ts +21 -22
- package/tests/Server/lib/container/GenericHandler.test.ts +31 -32
- package/tests/Server/lib/container/GenericHandlerEvent.test.ts +2 -2
- package/tests/Server/lib/container/HealthHandler.test.ts +6 -7
- package/tests/Server/lib/container/Proxy.test.ts +37 -35
- package/tsconfig.json +6 -1
|
@@ -1,104 +1,125 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Server as HTTPServer } from 'http';
|
|
3
|
+
import * as express from 'express';
|
|
1
4
|
import { z } from 'zod';
|
|
2
5
|
import { ResponseErrorType } from '../API/Response';
|
|
3
6
|
import Transaction, { TransactionConfig, TransactionExecution } from '../BaseEvent/Transaction';
|
|
4
7
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @
|
|
8
|
-
* @
|
|
9
|
-
* @
|
|
10
|
-
* @
|
|
11
|
-
* @
|
|
8
|
+
* Represents a route in an API.
|
|
9
|
+
* @template InputType - The type of the input data for the route.
|
|
10
|
+
* @template OutputType - The type of the output data for the route.
|
|
11
|
+
* @property {string} path - The path of the route.
|
|
12
|
+
* @property {string} method - The HTTP method of the route.
|
|
13
|
+
* @property {TransactionExecution<Transaction<InputType, OutputType | ResponseErrorType>, OutputType | ResponseErrorType>} handler - The handler function for the route.
|
|
14
|
+
* @property {z.ZodObject<any>} [inputSchema] - The input schema for validating the input data.
|
|
12
15
|
*/
|
|
13
16
|
export interface Route<InputType = any, OutputType = any> {
|
|
14
17
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* @
|
|
18
|
+
* Represents a file path as a string.
|
|
19
|
+
* @param {string} path - The file path.
|
|
20
|
+
* @returns None
|
|
18
21
|
*/
|
|
19
22
|
path: string;
|
|
20
23
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
24
|
+
* Represents the method used in an API request.
|
|
23
25
|
* @type {string}
|
|
24
26
|
*/
|
|
25
27
|
method: string;
|
|
26
28
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* @type
|
|
30
|
-
* Transaction<InputType, OutputType | ResponseErrorType>,
|
|
31
|
-
* OutputType | ResponseErrorType
|
|
32
|
-
* >}
|
|
29
|
+
* Represents a handler for executing a transaction with the given input type and output type.
|
|
30
|
+
* @param {Transaction<InputType, OutputType | ResponseErrorType>} transaction - The transaction to execute.
|
|
31
|
+
* @param {OutputType | ResponseErrorType} - The output type or response error type of the transaction.
|
|
33
32
|
*/
|
|
34
33
|
handler: TransactionExecution<Transaction<InputType, OutputType | ResponseErrorType>, OutputType | ResponseErrorType>;
|
|
35
34
|
/**
|
|
35
|
+
<<<<<<< HEAD
|
|
36
|
+
* An optional input schema for validating the structure of the input data.
|
|
37
|
+
* @type {z.ZodObject<any>}
|
|
38
|
+
=======
|
|
36
39
|
* Description placeholder
|
|
37
40
|
*
|
|
38
|
-
* @type {?z.ZodObject<any>}
|
|
41
|
+
* @type {?z.ZodObject<any> | z.ZodUnion<any>}
|
|
42
|
+
>>>>>>> 65ffb67 (Improve syntax with tighther eslint, fix lots of test errors, new proxy containerSetupHook and improved validation type)
|
|
39
43
|
*/
|
|
40
|
-
inputSchema?: z.ZodObject<any>;
|
|
44
|
+
inputSchema?: z.ZodObject<any> | z.ZodUnion<any>;
|
|
41
45
|
}
|
|
42
46
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
+
* Represents the configuration options for a router.
|
|
48
|
+
* @typedef {TransactionConfig & {
|
|
49
|
+
* routes: Route[]
|
|
50
|
+
* port?: number
|
|
51
|
+
* timeout?: number
|
|
52
|
+
* cors?: {
|
|
53
|
+
* origin?: string | string[]
|
|
54
|
+
* headers?: string[]
|
|
55
|
+
* allowCredentials?: boolean
|
|
56
|
+
* }
|
|
57
|
+
* healthCheckRoute?: string
|
|
58
|
+
* }} RouterConfig
|
|
59
|
+
* @property {Route[]} routes - The routes to be configured in the router.
|
|
60
|
+
* @property {number} [port] - The port number to listen on. If not specified, a default port will be used.
|
|
61
|
+
* @property {number} [timeout] - The timeout duration for requests in milliseconds. If not specified, a default timeout will be
|
|
47
62
|
*/
|
|
48
63
|
export type RouterConfig = TransactionConfig & {
|
|
64
|
+
/**
|
|
65
|
+
* An array of route objects representing the available routes in the application.
|
|
66
|
+
* @type {Route[]}
|
|
67
|
+
*/
|
|
49
68
|
routes: Route[];
|
|
69
|
+
/**
|
|
70
|
+
* The port number for the server to listen on.
|
|
71
|
+
* @type {number | undefined}
|
|
72
|
+
*/
|
|
50
73
|
port?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Optional timeout value in milliseconds.
|
|
76
|
+
* @type {number | undefined}
|
|
77
|
+
*/
|
|
51
78
|
timeout?: number;
|
|
79
|
+
/**
|
|
80
|
+
* Configuration options for Cross-Origin Resource Sharing (CORS).
|
|
81
|
+
* @property {string | string[]} [origin] - The allowed origin(s) for CORS requests.
|
|
82
|
+
* @property {string[]} [headers] - The allowed headers for CORS requests.
|
|
83
|
+
* @property {boolean} [allowCredentials] - Whether to allow credentials (cookies, HTTP authentication, and client-side SSL certificates) to be sent in CORS requests.
|
|
84
|
+
*/
|
|
52
85
|
cors?: {
|
|
53
86
|
origin?: string | string[];
|
|
54
87
|
headers?: string[];
|
|
55
88
|
allowCredentials?: boolean;
|
|
56
89
|
};
|
|
90
|
+
/**
|
|
91
|
+
* The route for the health check endpoint.
|
|
92
|
+
* @type {string | undefined}
|
|
93
|
+
*/
|
|
57
94
|
healthCheckRoute?: string;
|
|
95
|
+
containerSetupHook?: (server: HTTPServer, app: express.Express) => Promise<void>;
|
|
58
96
|
};
|
|
59
97
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* @export
|
|
63
|
-
* @class Router
|
|
64
|
-
* @typedef {Router}
|
|
98
|
+
* Represents a router that handles routing logic for a web application.
|
|
65
99
|
*/
|
|
66
100
|
export default class Router {
|
|
67
101
|
/**
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* @private
|
|
71
|
-
* @readonly
|
|
72
|
-
* @type {RouterConfig}
|
|
102
|
+
* The configuration object for the router.
|
|
73
103
|
*/
|
|
74
104
|
private readonly config;
|
|
75
105
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* @private
|
|
79
|
-
* @readonly
|
|
80
|
-
* @type {Server}
|
|
106
|
+
* The private readonly server instance.
|
|
81
107
|
*/
|
|
82
108
|
private readonly server;
|
|
83
109
|
/**
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* @
|
|
87
|
-
* @param {RouterConfig} config
|
|
110
|
+
* Constructs a new instance of the Router class.
|
|
111
|
+
* @param {RouterConfig} config - The configuration object for the router.
|
|
112
|
+
* @returns None
|
|
88
113
|
*/
|
|
89
114
|
constructor(config: RouterConfig);
|
|
90
115
|
/**
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* @public
|
|
94
|
-
* @returns {CallableFunction}
|
|
116
|
+
* Retrieves the export function from the server.
|
|
117
|
+
* @returns {CallableFunction} The export function from the server.
|
|
95
118
|
*/
|
|
96
119
|
getExport(): CallableFunction;
|
|
97
120
|
/**
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* @private
|
|
101
|
-
* @returns {boolean}
|
|
121
|
+
* Checks if the current element is a container.
|
|
122
|
+
* @returns {boolean} - True if the element is a container, false otherwise.
|
|
102
123
|
*/
|
|
103
124
|
private isContainer;
|
|
104
125
|
}
|
|
@@ -4,37 +4,28 @@ var ContainerServer_1 = require("./lib/ContainerServer");
|
|
|
4
4
|
var Server_1 = require("./lib/Server");
|
|
5
5
|
var Utils_1 = require("../API/Utils");
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* @export
|
|
10
|
-
* @class Router
|
|
11
|
-
* @typedef {Router}
|
|
7
|
+
* Represents a router that handles routing logic for a web application.
|
|
12
8
|
*/
|
|
13
9
|
var Router = /** @class */ (function () {
|
|
14
10
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* @
|
|
18
|
-
* @param {RouterConfig} config
|
|
11
|
+
* Constructs a new instance of the Router class.
|
|
12
|
+
* @param {RouterConfig} config - The configuration object for the router.
|
|
13
|
+
* @returns None
|
|
19
14
|
*/
|
|
20
15
|
function Router(config) {
|
|
21
16
|
this.config = config;
|
|
22
17
|
this.server = this.isContainer() ? new ContainerServer_1.default(config) : new Server_1.default(config);
|
|
23
18
|
}
|
|
24
19
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* @public
|
|
28
|
-
* @returns {CallableFunction}
|
|
20
|
+
* Retrieves the export function from the server.
|
|
21
|
+
* @returns {CallableFunction} The export function from the server.
|
|
29
22
|
*/
|
|
30
23
|
Router.prototype.getExport = function () {
|
|
31
24
|
return this.server.getExport();
|
|
32
25
|
};
|
|
33
26
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* @private
|
|
37
|
-
* @returns {boolean}
|
|
27
|
+
* Checks if the current element is a container.
|
|
28
|
+
* @returns {boolean} - True if the element is a container, false otherwise.
|
|
38
29
|
*/
|
|
39
30
|
Router.prototype.isContainer = function () {
|
|
40
31
|
return Utils_1.default.isHybridlessContainer();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Router.js","sourceRoot":"","sources":["../../../src/Server/Router.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"Router.js","sourceRoot":"","sources":["../../../src/Server/Router.ts"],"names":[],"mappings":";;AAKA,yDAAmD;AACnD,uCAAiC;AAEjC,sCAAgC;AAwGhC;;GAEG;AACH;IAUE;;;;OAIG;IACH,gBAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,yBAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,gBAAM,CAAC,MAAM,CAAC,CAAA;IACrF,CAAC;IAED;;;OAGG;IACI,0BAAS,GAAhB;QACE,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAA;IAChC,CAAC;IAED;;;OAGG;IACK,4BAAW,GAAnB;QACE,OAAO,eAAK,CAAC,qBAAqB,EAAE,CAAA;IACtC,CAAC;IACH,aAAC;AAAD,CAAC,AAnCD,IAmCC"}
|
|
@@ -2,57 +2,41 @@ import Proxy from './container/Proxy';
|
|
|
2
2
|
import Server from './Server';
|
|
3
3
|
import { RouterConfig } from '../Router';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @export
|
|
8
|
-
* @class ContainerServer
|
|
9
|
-
* @typedef {ContainerServer}
|
|
10
|
-
* @extends {Server}
|
|
5
|
+
* Represents a server container that extends the Server class and handles serverless events.
|
|
11
6
|
*/
|
|
12
7
|
export default class ContainerServer extends Server {
|
|
13
8
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* @protected
|
|
17
|
-
* @readonly
|
|
9
|
+
* The proxy object used for handling requests and responses.
|
|
18
10
|
* @type {Proxy}
|
|
11
|
+
* @protected
|
|
19
12
|
*/
|
|
20
13
|
protected readonly proxy: Proxy;
|
|
21
14
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* @
|
|
25
|
-
* @param {RouterConfig} config
|
|
15
|
+
* Constructs a new instance of the Router class.
|
|
16
|
+
* @param {RouterConfig} config - The configuration object for the router.
|
|
17
|
+
* @returns None
|
|
26
18
|
*/
|
|
27
19
|
constructor(config: RouterConfig);
|
|
28
20
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
* @returns {CallableFunction}
|
|
21
|
+
* Returns a callable function that can be used to export data.
|
|
22
|
+
* @returns {CallableFunction} - A callable function that can be used to export data.
|
|
33
23
|
*/
|
|
34
24
|
getExport(): CallableFunction;
|
|
35
25
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* @public
|
|
39
|
-
* @async
|
|
40
|
-
* @returns {*}
|
|
26
|
+
* Starts the application by loading the proxy.
|
|
27
|
+
* @returns {Promise<void>} - A promise that resolves when the proxy is loaded.
|
|
41
28
|
*/
|
|
42
29
|
start(): Promise<void>;
|
|
43
30
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* @
|
|
47
|
-
* @async
|
|
48
|
-
* @param {?*} [err]
|
|
49
|
-
* @returns {*}
|
|
31
|
+
* Stops the execution of the program and unloads the proxy.
|
|
32
|
+
* @param {any} [err] - Optional error object to pass to the unload method.
|
|
33
|
+
* @returns {Promise<void>} - A promise that resolves once the proxy is unloaded.
|
|
50
34
|
*/
|
|
51
35
|
stop(err?: any): Promise<void>;
|
|
52
36
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
37
|
+
* Listens for process events and handles them accordingly.
|
|
55
38
|
* @private
|
|
39
|
+
* @returns None
|
|
56
40
|
*/
|
|
57
41
|
private listenProcessEvents;
|
|
58
42
|
}
|
|
@@ -54,20 +54,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
54
54
|
var Proxy_1 = require("./container/Proxy");
|
|
55
55
|
var Server_1 = require("./Server");
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* @export
|
|
60
|
-
* @class ContainerServer
|
|
61
|
-
* @typedef {ContainerServer}
|
|
62
|
-
* @extends {Server}
|
|
57
|
+
* Represents a server container that extends the Server class and handles serverless events.
|
|
63
58
|
*/
|
|
64
59
|
var ContainerServer = /** @class */ (function (_super) {
|
|
65
60
|
__extends(ContainerServer, _super);
|
|
66
61
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* @
|
|
70
|
-
* @param {RouterConfig} config
|
|
62
|
+
* Constructs a new instance of the Router class.
|
|
63
|
+
* @param {RouterConfig} config - The configuration object for the router.
|
|
64
|
+
* @returns None
|
|
71
65
|
*/
|
|
72
66
|
function ContainerServer(config) {
|
|
73
67
|
var _this = _super.call(this, config) || this;
|
|
@@ -76,10 +70,8 @@ var ContainerServer = /** @class */ (function (_super) {
|
|
|
76
70
|
return _this;
|
|
77
71
|
}
|
|
78
72
|
/**
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* @public
|
|
82
|
-
* @returns {CallableFunction}
|
|
73
|
+
* Returns a callable function that can be used to export data.
|
|
74
|
+
* @returns {CallableFunction} - A callable function that can be used to export data.
|
|
83
75
|
*/
|
|
84
76
|
ContainerServer.prototype.getExport = function () {
|
|
85
77
|
// start server socket
|
|
@@ -87,13 +79,9 @@ var ContainerServer = /** @class */ (function (_super) {
|
|
|
87
79
|
// return empty function, we are all done
|
|
88
80
|
return function () { };
|
|
89
81
|
};
|
|
90
|
-
/* private */
|
|
91
82
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* @public
|
|
95
|
-
* @async
|
|
96
|
-
* @returns {*}
|
|
83
|
+
* Starts the application by loading the proxy.
|
|
84
|
+
* @returns {Promise<void>} - A promise that resolves when the proxy is loaded.
|
|
97
85
|
*/
|
|
98
86
|
ContainerServer.prototype.start = function () {
|
|
99
87
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -108,12 +96,9 @@ var ContainerServer = /** @class */ (function (_super) {
|
|
|
108
96
|
});
|
|
109
97
|
};
|
|
110
98
|
/**
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
* @
|
|
114
|
-
* @async
|
|
115
|
-
* @param {?*} [err]
|
|
116
|
-
* @returns {*}
|
|
99
|
+
* Stops the execution of the program and unloads the proxy.
|
|
100
|
+
* @param {any} [err] - Optional error object to pass to the unload method.
|
|
101
|
+
* @returns {Promise<void>} - A promise that resolves once the proxy is unloaded.
|
|
117
102
|
*/
|
|
118
103
|
ContainerServer.prototype.stop = function (err) {
|
|
119
104
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -128,9 +113,9 @@ var ContainerServer = /** @class */ (function (_super) {
|
|
|
128
113
|
});
|
|
129
114
|
};
|
|
130
115
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
116
|
+
* Listens for process events and handles them accordingly.
|
|
133
117
|
* @private
|
|
118
|
+
* @returns None
|
|
134
119
|
*/
|
|
135
120
|
ContainerServer.prototype.listenProcessEvents = function () {
|
|
136
121
|
// start process listeners
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContainerServer.js","sourceRoot":"","sources":["../../../../src/Server/lib/ContainerServer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAqC;AACrC,mCAA6B;AAG7B
|
|
1
|
+
{"version":3,"file":"ContainerServer.js","sourceRoot":"","sources":["../../../../src/Server/lib/ContainerServer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAqC;AACrC,mCAA6B;AAG7B;;GAEG;AACH;IAA6C,mCAAM;IAQjD;;;;OAIG;IACH,yBAAY,MAAoB;QAAhC,YACE,kBAAM,MAAM,CAAC,SAGd;QAFC,KAAI,CAAC,KAAK,GAAG,IAAI,eAAK,CAAC,MAAM,EAAE,KAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,KAAI,CAAC,CAAC,CAAA;QACrE,KAAI,CAAC,mBAAmB,EAAE,CAAA;;IAC5B,CAAC;IAED;;;OAGG;IACI,mCAAS,GAAhB;QACE,sBAAsB;QACtB,IAAI,CAAC,KAAK,EAAE,CAAA;QACZ,yCAAyC;QACzC,OAAO,cAAO,CAAC,CAAA;IACjB,CAAC;IAED;;;OAGG;IACU,+BAAK,GAAlB;;;;4BACE,qBAAM,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAA;;wBAAvB,SAAuB,CAAA;;;;;KACxB;IAED;;;;OAIG;IACU,8BAAI,GAAjB,UAAkB,GAAS;;;;4BACzB,qBAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAA;;wBAA5B,SAA4B,CAAA;;;;;KAC7B;IAED;;;;OAIG;IACK,6CAAmB,GAA3B;QACE,0BAA0B;QAC1B,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA,CAAC,uBAAuB;QAC9E,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA,CAAC,yDAAyD;IACtG,CAAC;IACH,sBAAC;AAAD,CAAC,AAzDD,CAA6C,gBAAM,GAyDlD"}
|
|
@@ -2,59 +2,44 @@ import { APIGatewayProxyEvent, Context } from 'aws-lambda';
|
|
|
2
2
|
import { RouterConfig } from '../Router';
|
|
3
3
|
import RouteResolver from '../RouteResolver';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @export
|
|
8
|
-
* @class Server
|
|
9
|
-
* @typedef {Server}
|
|
5
|
+
* Represents a server that handles serverless events and routes them to appropriate handlers.
|
|
10
6
|
*/
|
|
11
7
|
export default class Server {
|
|
12
8
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* @protected
|
|
9
|
+
* The configuration object for the router.
|
|
16
10
|
* @readonly
|
|
17
11
|
* @type {RouterConfig}
|
|
18
12
|
*/
|
|
19
13
|
protected readonly config: RouterConfig;
|
|
20
14
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* @protected
|
|
24
|
-
* @readonly
|
|
15
|
+
* A protected property that holds a RouteResolver object.
|
|
16
|
+
* The RouteResolver is responsible for resolving routes and returning the appropriate response.
|
|
25
17
|
* @type {RouteResolver}
|
|
26
18
|
*/
|
|
27
19
|
protected readonly routeResolver: RouteResolver;
|
|
28
20
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* @
|
|
32
|
-
* @param {RouterConfig} config
|
|
21
|
+
* Constructs a new instance of the Router class.
|
|
22
|
+
* @param {RouterConfig} config - The configuration object for the router.
|
|
23
|
+
* @returns None
|
|
33
24
|
*/
|
|
34
25
|
constructor(config: RouterConfig);
|
|
35
26
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* @public
|
|
39
|
-
* @returns {CallableFunction}
|
|
27
|
+
* Returns a callable function that is bound to the `handleServerlessEvent` method of the current object.
|
|
28
|
+
* @returns {CallableFunction} - A callable function that is bound to the `handleServerlessEvent` method.
|
|
40
29
|
*/
|
|
41
30
|
getExport(): CallableFunction;
|
|
42
31
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* @
|
|
46
|
-
* @
|
|
47
|
-
* @param {APIGatewayProxyEvent} event
|
|
48
|
-
* @param {Context} context
|
|
49
|
-
* @returns {*}
|
|
32
|
+
* Handles a serverless event by executing a transaction and resolving the route based on the event.
|
|
33
|
+
* @param {APIGatewayProxyEvent} event - The serverless event object.
|
|
34
|
+
* @param {Context} context - The serverless context object.
|
|
35
|
+
* @returns None
|
|
50
36
|
*/
|
|
51
37
|
handleServerlessEvent(event: APIGatewayProxyEvent, context: Context): Promise<void>;
|
|
52
38
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* @
|
|
56
|
-
* @
|
|
57
|
-
* @param {string} routePath
|
|
39
|
+
* Parses the path parameters from the request URL based on the given route path.
|
|
40
|
+
* @param {Request<any>} req - The request object.
|
|
41
|
+
* @param {string} routePath - The route path pattern to match against.
|
|
42
|
+
* @returns None
|
|
58
43
|
*/
|
|
59
44
|
private parsePathParams;
|
|
60
45
|
}
|
|
@@ -36,46 +36,36 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var
|
|
39
|
+
var path_to_regexp_1 = require("path-to-regexp");
|
|
40
40
|
var Response_1 = require("../../API/Response");
|
|
41
41
|
var Transaction_1 = require("../../BaseEvent/Transaction");
|
|
42
42
|
var Validator_1 = require("../../Validation/Validator");
|
|
43
43
|
var RouteResolver_1 = require("../RouteResolver");
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* @export
|
|
48
|
-
* @class Server
|
|
49
|
-
* @typedef {Server}
|
|
45
|
+
* Represents a server that handles serverless events and routes them to appropriate handlers.
|
|
50
46
|
*/
|
|
51
47
|
var Server = /** @class */ (function () {
|
|
52
48
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* @
|
|
56
|
-
* @param {RouterConfig} config
|
|
49
|
+
* Constructs a new instance of the Router class.
|
|
50
|
+
* @param {RouterConfig} config - The configuration object for the router.
|
|
51
|
+
* @returns None
|
|
57
52
|
*/
|
|
58
53
|
function Server(config) {
|
|
59
54
|
this.config = config;
|
|
60
55
|
this.routeResolver = new RouteResolver_1.default(config);
|
|
61
56
|
}
|
|
62
57
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* @public
|
|
66
|
-
* @returns {CallableFunction}
|
|
58
|
+
* Returns a callable function that is bound to the `handleServerlessEvent` method of the current object.
|
|
59
|
+
* @returns {CallableFunction} - A callable function that is bound to the `handleServerlessEvent` method.
|
|
67
60
|
*/
|
|
68
61
|
Server.prototype.getExport = function () {
|
|
69
62
|
return this.handleServerlessEvent.bind(this);
|
|
70
63
|
};
|
|
71
64
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* @
|
|
75
|
-
* @
|
|
76
|
-
* @param {APIGatewayProxyEvent} event
|
|
77
|
-
* @param {Context} context
|
|
78
|
-
* @returns {*}
|
|
65
|
+
* Handles a serverless event by executing a transaction and resolving the route based on the event.
|
|
66
|
+
* @param {APIGatewayProxyEvent} event - The serverless event object.
|
|
67
|
+
* @param {Context} context - The serverless context object.
|
|
68
|
+
* @returns None
|
|
79
69
|
*/
|
|
80
70
|
Server.prototype.handleServerlessEvent = function (event, context) {
|
|
81
71
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -119,17 +109,17 @@ var Server = /** @class */ (function () {
|
|
|
119
109
|
});
|
|
120
110
|
};
|
|
121
111
|
/**
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* @
|
|
125
|
-
* @
|
|
126
|
-
* @param {string} routePath
|
|
112
|
+
* Parses the path parameters from the request URL based on the given route path.
|
|
113
|
+
* @param {Request<any>} req - The request object.
|
|
114
|
+
* @param {string} routePath - The route path pattern to match against.
|
|
115
|
+
* @returns None
|
|
127
116
|
*/
|
|
128
117
|
Server.prototype.parsePathParams = function (req, routePath) {
|
|
129
118
|
var path = req.getPath();
|
|
130
119
|
var keys = [];
|
|
131
|
-
var result = pathToRegexp(routePath, keys).exec(path);
|
|
132
|
-
|
|
120
|
+
var result = (0, path_to_regexp_1.pathToRegexp)(routePath, keys).exec(path);
|
|
121
|
+
if (result)
|
|
122
|
+
req.setFixedPathParams(keys, result);
|
|
133
123
|
};
|
|
134
124
|
return Server;
|
|
135
125
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Server.js","sourceRoot":"","sources":["../../../../src/Server/lib/Server.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"Server.js","sourceRoot":"","sources":["../../../../src/Server/lib/Server.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iDAA6C;AAG7C,+CAAyC;AACzC,2DAAqD;AACrD,wDAAkD;AAElD,kDAA4C;AAE5C;;GAEG;AACH;IAcE;;;;OAIG;IACH,gBAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,aAAa,GAAG,IAAI,uBAAa,CAAC,MAAM,CAAC,CAAA;IAChD,CAAC;IAED;;;OAGG;IACI,0BAAS,GAAhB;QACE,OAAO,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC9C,CAAC;IAED;;;;;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AM,GAAG,IAAA,6BAAY,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACvD,IAAI,MAAM;YAAE,GAAG,CAAC,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAClD,CAAC;IACH,aAAC;AAAD,CAAC,AAxED,IAwEC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { Request, Response } from 'express';
|
|
2
2
|
import Server from '../Server';
|
|
3
|
+
/**
|
|
4
|
+
* Creates an async function that handles serverless events and sends a response.
|
|
5
|
+
* @param {Server['handleServerlessEvent']} serverlessHandler - The serverless handler function.
|
|
6
|
+
* @returns {Function} - An async function that handles the request and sends a response.
|
|
7
|
+
*/
|
|
3
8
|
declare const _default: (serverlessHandler: Server['handleServerlessEvent']) => (request: Request, res: Response) => Promise<void>;
|
|
4
9
|
export default _default;
|
|
@@ -61,7 +61,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
61
61
|
var GenericHandlerEvent_1 = require("./GenericHandlerEvent");
|
|
62
62
|
var Utils_1 = require("../../../API/Utils");
|
|
63
63
|
var Globals_1 = require("../../../Globals");
|
|
64
|
+
/**
|
|
65
|
+
* Creates an async function that handles serverless events and sends a response.
|
|
66
|
+
* @param {Server['handleServerlessEvent']} serverlessHandler - The serverless handler function.
|
|
67
|
+
* @returns {Function} - An async function that handles the request and sends a response.
|
|
68
|
+
*/
|
|
64
69
|
exports.default = (function (serverlessHandler) {
|
|
70
|
+
/**
|
|
71
|
+
* Handles an HTTP request by invoking a serverless function and processing the response.
|
|
72
|
+
* @param {Request} request - The HTTP request object.
|
|
73
|
+
* @param {Response} res - The HTTP response object.
|
|
74
|
+
* @returns None
|
|
75
|
+
*/
|
|
65
76
|
return function (request, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
66
77
|
var startTime, event_1, invokationResp, e_1;
|
|
67
78
|
return __generator(this, function (_a) {
|
|
@@ -94,9 +105,11 @@ exports.default = (function (serverlessHandler) {
|
|
|
94
105
|
}); };
|
|
95
106
|
});
|
|
96
107
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
|
|
108
|
+
* Processes the response received from a serverless function invocation and sends the appropriate response back to the client.
|
|
109
|
+
* @param {GenericHandlerEventResponse} invokation - The response object received from the serverless function invocation.
|
|
110
|
+
* @param {Response} res - The response object to send back to the client.
|
|
111
|
+
* @returns The response object to send back to the client.
|
|
112
|
+
*/
|
|
100
113
|
var processServerlessResponse = function (invokation, res) {
|
|
101
114
|
var e_2, _a;
|
|
102
115
|
// translate answer to http layer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericHandler.js","sourceRoot":"","sources":["../../../../../src/Server/lib/container/GenericHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,6DAAwF;AACxF,4CAAsC;AACtC,4CAAsC;AAGtC,mBAAe,UAAC,iBAAkD;IAChE,OAAO,UAAO,OAAgB,EAAE,GAAa;;;;;oBACrC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;;;;oBAGpB,UAAQ,IAAI,6BAAmB,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAA;oBAE1C,qBAAM,OAAK,CAAC,MAAM,EAAE;wBAC3C,UAAU;sBADiC;;oBAArC,cAAc,GAAG,SAAoB;oBAC3C,UAAU;oBACV,yBAAyB,CAAC,cAAc,EAAE,GAAG,CAAC,CAAA;;;;oBAE9C,OAAO,CAAC,KAAK,CAAC,uCAAuC,EAAE,GAAC,CAAC,CAAA;oBACzD,OAAO,CAAC,KAAK,CAAC,GAAC,CAAC,KAAK,CAAC,CAAA;oBACtB,GAAG,CAAC,MAAM,CAAC,iBAAO,CAAC,yBAAyB,CAAC,CAAC,IAAI,uBAC7C,GAAC,KACJ,GAAG,EAAE,iBAAO,CAAC,kBAAkB,EAC/B,OAAO,EAAE,iBAAO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