serverless-offline 8.8.0 → 9.1.0
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/README.md +12 -11
- package/package.json +33 -58
- package/src/ServerlessOffline.js +409 -0
- package/src/config/commandOptions.js +159 -0
- package/src/config/constants.js +22 -0
- package/{dist → src}/config/defaultOptions.js +9 -17
- package/src/config/index.js +4 -0
- package/src/config/supportedRuntimes.js +47 -0
- package/src/events/authCanExecuteResource.js +35 -0
- package/src/events/authFunctionNameExtractor.js +75 -0
- package/src/events/authMatchPolicyResource.js +71 -0
- package/src/events/authValidateContext.js +51 -0
- package/src/events/http/Endpoint.js +135 -0
- package/src/events/http/Http.js +50 -0
- package/src/events/http/HttpEventDefinition.js +20 -0
- package/src/events/http/HttpServer.js +1242 -0
- package/src/events/http/OfflineEndpoint.js +33 -0
- package/src/events/http/authJWTSettingsExtractor.js +70 -0
- package/src/events/http/createAuthScheme.js +176 -0
- package/src/events/http/createJWTAuthScheme.js +106 -0
- package/src/events/http/index.js +1 -0
- package/src/events/http/javaHelpers.js +102 -0
- package/src/events/http/lambda-events/LambdaIntegrationEvent.js +57 -0
- package/src/events/http/lambda-events/LambdaProxyIntegrationEvent.js +233 -0
- package/src/events/http/lambda-events/LambdaProxyIntegrationEventV2.js +190 -0
- package/src/events/http/lambda-events/VelocityContext.js +147 -0
- package/src/events/http/lambda-events/index.js +4 -0
- package/src/events/http/lambda-events/renderVelocityTemplateObject.js +93 -0
- package/{dist → src}/events/http/parseResources.js +73 -78
- package/src/events/http/payloadSchemaValidator.js +13 -0
- package/{dist → src}/events/http/templates/offline-default.req.vm +0 -0
- package/{dist → src}/events/http/templates/offline-default.res.vm +0 -0
- package/src/events/schedule/Schedule.js +131 -0
- package/src/events/schedule/ScheduleEvent.js +18 -0
- package/src/events/schedule/ScheduleEventDefinition.js +21 -0
- package/src/events/schedule/index.js +1 -0
- package/src/events/websocket/HttpServer.js +69 -0
- package/src/events/websocket/WebSocket.js +52 -0
- package/src/events/websocket/WebSocketClients.js +462 -0
- package/src/events/websocket/WebSocketEventDefinition.js +18 -0
- package/src/events/websocket/WebSocketServer.js +73 -0
- package/src/events/websocket/http-routes/_catchAll/catchAllRoute.js +16 -0
- package/src/events/websocket/http-routes/_catchAll/index.js +1 -0
- package/src/events/websocket/http-routes/connections/ConnectionsController.js +28 -0
- package/src/events/websocket/http-routes/connections/connectionsRoutes.js +70 -0
- package/src/events/websocket/http-routes/connections/index.js +1 -0
- package/src/events/websocket/http-routes/index.js +2 -0
- package/src/events/websocket/index.js +1 -0
- package/src/events/websocket/lambda-events/WebSocketAuthorizerEvent.js +65 -0
- package/src/events/websocket/lambda-events/WebSocketConnectEvent.js +68 -0
- package/src/events/websocket/lambda-events/WebSocketDisconnectEvent.js +31 -0
- package/src/events/websocket/lambda-events/WebSocketEvent.js +29 -0
- package/src/events/websocket/lambda-events/WebSocketRequestContext.js +67 -0
- package/src/events/websocket/lambda-events/index.js +4 -0
- package/src/index.js +12 -0
- package/src/lambda/HttpServer.js +108 -0
- package/src/lambda/Lambda.js +68 -0
- package/src/lambda/LambdaContext.js +33 -0
- package/src/lambda/LambdaFunction.js +309 -0
- package/src/lambda/LambdaFunctionPool.js +109 -0
- package/src/lambda/__tests__/LambdaContext.test.js +30 -0
- package/src/lambda/__tests__/LambdaFunction.test.js +196 -0
- package/src/lambda/__tests__/fixtures/Lambda/LambdaFunctionThatReturnsJSONObject.fixture.js +47 -0
- package/src/lambda/__tests__/fixtures/Lambda/LambdaFunctionThatReturnsNativeString.fixture.js +46 -0
- package/src/lambda/__tests__/fixtures/Lambda/package.json +3 -0
- package/src/lambda/__tests__/fixtures/lambdaFunction.fixture.js +145 -0
- package/src/lambda/__tests__/fixtures/package.json +3 -0
- package/src/lambda/__tests__/routes/invocations/InvocationsController.test.js +42 -0
- package/src/lambda/handler-runner/HandlerRunner.js +136 -0
- package/src/lambda/handler-runner/child-process-runner/ChildProcessRunner.js +72 -0
- package/src/lambda/handler-runner/child-process-runner/childProcessHelper.js +42 -0
- package/src/lambda/handler-runner/child-process-runner/index.js +1 -0
- package/src/lambda/handler-runner/docker-runner/DockerContainer.js +417 -0
- package/src/lambda/handler-runner/docker-runner/DockerImage.js +35 -0
- package/src/lambda/handler-runner/docker-runner/DockerRunner.js +63 -0
- package/src/lambda/handler-runner/docker-runner/index.js +1 -0
- package/src/lambda/handler-runner/go-runner/GoRunner.js +167 -0
- package/src/lambda/handler-runner/go-runner/index.js +1 -0
- package/src/lambda/handler-runner/in-process-runner/InProcessRunner.js +125 -0
- package/src/lambda/handler-runner/in-process-runner/index.js +1 -0
- package/src/lambda/handler-runner/index.js +1 -0
- package/src/lambda/handler-runner/java-runner/JavaRunner.js +114 -0
- package/src/lambda/handler-runner/java-runner/index.js +1 -0
- package/src/lambda/handler-runner/python-runner/PythonRunner.js +138 -0
- package/src/lambda/handler-runner/python-runner/index.js +1 -0
- package/{dist → src}/lambda/handler-runner/python-runner/invoke.py +0 -0
- package/src/lambda/handler-runner/ruby-runner/RubyRunner.js +107 -0
- package/src/lambda/handler-runner/ruby-runner/index.js +1 -0
- package/{dist → src}/lambda/handler-runner/ruby-runner/invoke.rb +0 -0
- package/src/lambda/handler-runner/worker-thread-runner/WorkerThreadRunner.js +70 -0
- package/src/lambda/handler-runner/worker-thread-runner/index.js +1 -0
- package/src/lambda/handler-runner/worker-thread-runner/workerThreadHelper.js +29 -0
- package/src/lambda/index.js +1 -0
- package/src/lambda/routes/index.js +2 -0
- package/src/lambda/routes/invocations/InvocationsController.js +102 -0
- package/src/lambda/routes/invocations/index.js +1 -0
- package/src/lambda/routes/invocations/invocationsRoute.js +77 -0
- package/src/lambda/routes/invoke-async/InvokeAsyncController.js +20 -0
- package/src/lambda/routes/invoke-async/index.js +1 -0
- package/src/lambda/routes/invoke-async/invokeAsyncRoute.js +33 -0
- package/src/utils/__tests__/createUniqueId.test.js +18 -0
- package/src/utils/__tests__/formatToClfTime.test.js +14 -0
- package/src/utils/__tests__/generateHapiPath.test.js +46 -0
- package/src/utils/__tests__/lowerCaseKeys.test.js +30 -0
- package/src/utils/__tests__/parseHeaders.test.js +13 -0
- package/src/utils/__tests__/parseMultiValueHeaders.test.js +24 -0
- package/src/utils/__tests__/parseMultiValueQueryStringParameters.test.js +159 -0
- package/src/utils/__tests__/parseQueryStringParameters.test.js +15 -0
- package/src/utils/__tests__/splitHandlerPathAndName.test.js +54 -0
- package/src/utils/__tests__/unflatten.test.js +32 -0
- package/src/utils/checkDockerDaemon.js +19 -0
- package/src/utils/checkGoVersion.js +16 -0
- package/src/utils/createApiKey.js +5 -0
- package/src/utils/createUniqueId.js +5 -0
- package/src/utils/detectExecutable.js +11 -0
- package/{dist → src}/utils/formatToClfTime.js +6 -14
- package/src/utils/generateHapiPath.js +26 -0
- package/src/utils/getHttpApiCorsConfig.js +28 -0
- package/src/utils/index.js +42 -0
- package/src/utils/jsonPath.js +13 -0
- package/src/utils/logRoutes.js +64 -0
- package/src/utils/lowerCaseKeys.js +6 -0
- package/src/utils/parseHeaders.js +14 -0
- package/src/utils/parseMultiValueHeaders.js +27 -0
- package/src/utils/parseMultiValueQueryStringParameters.js +31 -0
- package/src/utils/parseQueryStringParameters.js +15 -0
- package/src/utils/splitHandlerPathAndName.js +31 -0
- package/src/utils/unflatten.js +11 -0
- package/dist/ServerlessOffline.js +0 -514
- package/dist/config/commandOptions.js +0 -149
- package/dist/config/constants.js +0 -30
- package/dist/config/index.js +0 -55
- package/dist/config/supportedRuntimes.js +0 -40
- package/dist/debugLog.js +0 -12
- package/dist/events/authCanExecuteResource.js +0 -35
- package/dist/events/authFunctionNameExtractor.js +0 -87
- package/dist/events/authMatchPolicyResource.js +0 -62
- package/dist/events/authValidateContext.js +0 -53
- package/dist/events/http/Endpoint.js +0 -173
- package/dist/events/http/Http.js +0 -77
- package/dist/events/http/HttpEventDefinition.js +0 -36
- package/dist/events/http/HttpServer.js +0 -1370
- package/dist/events/http/OfflineEndpoint.js +0 -38
- package/dist/events/http/authJWTSettingsExtractor.js +0 -76
- package/dist/events/http/createAuthScheme.js +0 -184
- package/dist/events/http/createJWTAuthScheme.js +0 -159
- package/dist/events/http/index.js +0 -15
- package/dist/events/http/javaHelpers.js +0 -99
- package/dist/events/http/lambda-events/LambdaIntegrationEvent.js +0 -87
- package/dist/events/http/lambda-events/LambdaProxyIntegrationEvent.js +0 -246
- package/dist/events/http/lambda-events/LambdaProxyIntegrationEventV2.js +0 -225
- package/dist/events/http/lambda-events/VelocityContext.js +0 -170
- package/dist/events/http/lambda-events/index.js +0 -39
- package/dist/events/http/lambda-events/renderVelocityTemplateObject.js +0 -111
- package/dist/events/http/payloadSchemaValidator.js +0 -13
- package/dist/events/schedule/Schedule.js +0 -183
- package/dist/events/schedule/ScheduleEvent.js +0 -27
- package/dist/events/schedule/ScheduleEventDefinition.js +0 -36
- package/dist/events/schedule/index.js +0 -15
- package/dist/events/websocket/HttpServer.js +0 -114
- package/dist/events/websocket/WebSocket.js +0 -78
- package/dist/events/websocket/WebSocketClients.js +0 -577
- package/dist/events/websocket/WebSocketEventDefinition.js +0 -32
- package/dist/events/websocket/WebSocketServer.js +0 -139
- package/dist/events/websocket/http-routes/_catchAll/catchAllRoute.js +0 -33
- package/dist/events/websocket/http-routes/_catchAll/index.js +0 -15
- package/dist/events/websocket/http-routes/connections/ConnectionsController.js +0 -45
- package/dist/events/websocket/http-routes/connections/connectionsRoutes.js +0 -95
- package/dist/events/websocket/http-routes/connections/index.js +0 -15
- package/dist/events/websocket/http-routes/index.js +0 -23
- package/dist/events/websocket/index.js +0 -15
- package/dist/events/websocket/lambda-events/WebSocketAuthorizerEvent.js +0 -99
- package/dist/events/websocket/lambda-events/WebSocketConnectEvent.js +0 -101
- package/dist/events/websocket/lambda-events/WebSocketDisconnectEvent.js +0 -47
- package/dist/events/websocket/lambda-events/WebSocketEvent.js +0 -54
- package/dist/events/websocket/lambda-events/WebSocketRequestContext.js +0 -98
- package/dist/events/websocket/lambda-events/index.js +0 -39
- package/dist/index.js +0 -15
- package/dist/lambda/HttpServer.js +0 -124
- package/dist/lambda/Lambda.js +0 -117
- package/dist/lambda/LambdaContext.js +0 -53
- package/dist/lambda/LambdaFunction.js +0 -390
- package/dist/lambda/LambdaFunctionPool.js +0 -127
- package/dist/lambda/handler-runner/HandlerRunner.js +0 -195
- package/dist/lambda/handler-runner/child-process-runner/ChildProcessRunner.js +0 -124
- package/dist/lambda/handler-runner/child-process-runner/childProcessHelper.js +0 -49
- package/dist/lambda/handler-runner/child-process-runner/index.js +0 -15
- package/dist/lambda/handler-runner/docker-runner/DockerContainer.js +0 -515
- package/dist/lambda/handler-runner/docker-runner/DockerImage.js +0 -67
- package/dist/lambda/handler-runner/docker-runner/DockerRunner.js +0 -74
- package/dist/lambda/handler-runner/docker-runner/index.js +0 -15
- package/dist/lambda/handler-runner/go-runner/GoRunner.js +0 -230
- package/dist/lambda/handler-runner/go-runner/index.js +0 -15
- package/dist/lambda/handler-runner/in-process-runner/InProcessRunner.js +0 -228
- package/dist/lambda/handler-runner/in-process-runner/index.js +0 -15
- package/dist/lambda/handler-runner/index.js +0 -15
- package/dist/lambda/handler-runner/java-runner/JavaRunner.js +0 -153
- package/dist/lambda/handler-runner/java-runner/index.js +0 -15
- package/dist/lambda/handler-runner/python-runner/PythonRunner.js +0 -185
- package/dist/lambda/handler-runner/python-runner/index.js +0 -15
- package/dist/lambda/handler-runner/ruby-runner/RubyRunner.js +0 -147
- package/dist/lambda/handler-runner/ruby-runner/index.js +0 -15
- package/dist/lambda/handler-runner/worker-thread-runner/WorkerThreadRunner.js +0 -92
- package/dist/lambda/handler-runner/worker-thread-runner/index.js +0 -15
- package/dist/lambda/handler-runner/worker-thread-runner/workerThreadHelper.js +0 -31
- package/dist/lambda/index.js +0 -15
- package/dist/lambda/routes/index.js +0 -23
- package/dist/lambda/routes/invocations/InvocationsController.js +0 -142
- package/dist/lambda/routes/invocations/index.js +0 -15
- package/dist/lambda/routes/invocations/invocationsRoute.js +0 -90
- package/dist/lambda/routes/invoke-async/InvokeAsyncController.js +0 -38
- package/dist/lambda/routes/invoke-async/index.js +0 -15
- package/dist/lambda/routes/invoke-async/invokeAsyncRoute.js +0 -43
- package/dist/main.js +0 -11
- package/dist/serverlessLog.js +0 -91
- package/dist/utils/checkDockerDaemon.js +0 -27
- package/dist/utils/checkGoVersion.js +0 -27
- package/dist/utils/createApiKey.js +0 -12
- package/dist/utils/createUniqueId.js +0 -14
- package/dist/utils/detectExecutable.js +0 -21
- package/dist/utils/generateHapiPath.js +0 -28
- package/dist/utils/getHttpApiCorsConfig.js +0 -40
- package/dist/utils/index.js +0 -165
- package/dist/utils/jsonPath.js +0 -21
- package/dist/utils/lowerCaseKeys.js +0 -14
- package/dist/utils/parseHeaders.js +0 -23
- package/dist/utils/parseMultiValueHeaders.js +0 -36
- package/dist/utils/parseMultiValueQueryStringParameters.js +0 -40
- package/dist/utils/parseQueryStringParameters.js +0 -26
- package/dist/utils/resolveJoins.js +0 -36
- package/dist/utils/satisfiesVersionRange.js +0 -20
- package/dist/utils/splitHandlerPathAndName.js +0 -37
- package/dist/utils/unflatten.js +0 -18
package/dist/config/index.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
commandOptions: true,
|
|
8
|
-
defaultOptions: true
|
|
9
|
-
};
|
|
10
|
-
Object.defineProperty(exports, "commandOptions", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _commandOptions.default;
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
Object.defineProperty(exports, "defaultOptions", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function () {
|
|
19
|
-
return _defaultOptions.default;
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
var _commandOptions = _interopRequireDefault(require("./commandOptions.js"));
|
|
24
|
-
|
|
25
|
-
var _constants = require("./constants.js");
|
|
26
|
-
|
|
27
|
-
Object.keys(_constants).forEach(function (key) {
|
|
28
|
-
if (key === "default" || key === "__esModule") return;
|
|
29
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
30
|
-
if (key in exports && exports[key] === _constants[key]) return;
|
|
31
|
-
Object.defineProperty(exports, key, {
|
|
32
|
-
enumerable: true,
|
|
33
|
-
get: function () {
|
|
34
|
-
return _constants[key];
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
var _defaultOptions = _interopRequireDefault(require("./defaultOptions.js"));
|
|
40
|
-
|
|
41
|
-
var _supportedRuntimes = require("./supportedRuntimes.js");
|
|
42
|
-
|
|
43
|
-
Object.keys(_supportedRuntimes).forEach(function (key) {
|
|
44
|
-
if (key === "default" || key === "__esModule") return;
|
|
45
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
46
|
-
if (key in exports && exports[key] === _supportedRuntimes[key]) return;
|
|
47
|
-
Object.defineProperty(exports, key, {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
get: function () {
|
|
50
|
-
return _supportedRuntimes[key];
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.supportedRuntimes = exports.supportedRuby = exports.supportedPython = exports.supportedProvided = exports.supportedNodejs = exports.supportedJava = exports.supportedGo = exports.supportedDotnetcore = void 0;
|
|
7
|
-
// native runtime support for AWS
|
|
8
|
-
// https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
|
|
9
|
-
// .NET CORE
|
|
10
|
-
const supportedDotnetcore = new Set([// deprecated
|
|
11
|
-
// 'dotnetcore1.0',
|
|
12
|
-
// 'dotnetcore2.0',
|
|
13
|
-
// supported
|
|
14
|
-
// 'dotnetcore2.1'
|
|
15
|
-
]); // GO
|
|
16
|
-
|
|
17
|
-
exports.supportedDotnetcore = supportedDotnetcore;
|
|
18
|
-
const supportedGo = new Set(['go1.x']); // JAVA
|
|
19
|
-
|
|
20
|
-
exports.supportedGo = supportedGo;
|
|
21
|
-
const supportedJava = new Set(['java8', 'java11']); // NODE.JS
|
|
22
|
-
|
|
23
|
-
exports.supportedJava = supportedJava;
|
|
24
|
-
const supportedNodejs = new Set([// deprecated, but still working
|
|
25
|
-
'nodejs4.3', 'nodejs6.10', 'nodejs8.10', // supported
|
|
26
|
-
'nodejs10.x', 'nodejs12.x', 'nodejs14.x', 'nodejs16.x']); // PROVIDED
|
|
27
|
-
|
|
28
|
-
exports.supportedNodejs = supportedNodejs;
|
|
29
|
-
const supportedProvided = new Set(['provided']); // PYTHON
|
|
30
|
-
|
|
31
|
-
exports.supportedProvided = supportedProvided;
|
|
32
|
-
const supportedPython = new Set(['python2.7', 'python3.6', 'python3.7', 'python3.8', 'python3.9']); // RUBY
|
|
33
|
-
|
|
34
|
-
exports.supportedPython = supportedPython;
|
|
35
|
-
const supportedRuby = new Set(['ruby2.5', 'ruby2.7']); // deprecated runtimes
|
|
36
|
-
// https://docs.aws.amazon.com/lambda/latest/dg/runtime-support-policy.html
|
|
37
|
-
|
|
38
|
-
exports.supportedRuby = supportedRuby;
|
|
39
|
-
const supportedRuntimes = new Set([...supportedDotnetcore, ...supportedGo, ...supportedJava, ...supportedNodejs, ...supportedProvided, ...supportedPython, ...supportedRuby]);
|
|
40
|
-
exports.supportedRuntimes = supportedRuntimes;
|
package/dist/debugLog.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _process = require("process");
|
|
9
|
-
|
|
10
|
-
var _default = typeof _process.env.SLS_DEBUG !== 'undefined' ? console.log.bind(null, '[offline]') : () => null;
|
|
11
|
-
|
|
12
|
-
exports.default = _default;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = authCanExecuteResource;
|
|
7
|
-
|
|
8
|
-
var _authMatchPolicyResource = _interopRequireDefault(require("./authMatchPolicyResource.js"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
const {
|
|
13
|
-
isArray
|
|
14
|
-
} = Array;
|
|
15
|
-
|
|
16
|
-
function checkStatementsAgainstResource(Statement, resource, effect) {
|
|
17
|
-
return Statement.some(statement => {
|
|
18
|
-
const resourceArray = isArray(statement.Resource) ? statement.Resource : [statement.Resource];
|
|
19
|
-
return statement.Effect.toLowerCase() === effect.toLowerCase() && resourceArray.some(policyResource => (0, _authMatchPolicyResource.default)(policyResource, resource));
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function authCanExecuteResource(policy, resource) {
|
|
24
|
-
const {
|
|
25
|
-
Statement
|
|
26
|
-
} = policy; // check for explicit deny
|
|
27
|
-
|
|
28
|
-
const denyStatementFound = checkStatementsAgainstResource(Statement, resource, 'Deny');
|
|
29
|
-
|
|
30
|
-
if (denyStatementFound) {
|
|
31
|
-
return false;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return checkStatementsAgainstResource(Statement, resource, 'Allow');
|
|
35
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = authFunctionNameExtractor;
|
|
7
|
-
|
|
8
|
-
var _serverlessLog2 = _interopRequireDefault(require("../serverlessLog.js"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
// FIXME "slessLog" param is only remaining for tests, should be removed
|
|
13
|
-
function authFunctionNameExtractor(endpoint, slessLog, v3Utils) {
|
|
14
|
-
const buildFailureResult = warningMessage => {
|
|
15
|
-
const log = v3Utils && v3Utils.log;
|
|
16
|
-
|
|
17
|
-
const _serverlessLog = slessLog || _serverlessLog2.default; // FIXME remove
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (log) {
|
|
21
|
-
log.warning(warningMessage);
|
|
22
|
-
} else {
|
|
23
|
-
_serverlessLog(`WARNING: ${warningMessage}`);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return {
|
|
27
|
-
unsupportedAuth: true
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const buildSuccessResult = authorizerName => ({
|
|
32
|
-
authorizerName
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
const handleStringAuthorizer = authorizerString => {
|
|
36
|
-
if (authorizerString.toUpperCase() === 'AWS_IAM') {
|
|
37
|
-
return buildFailureResult('Serverless Offline does not support the AWS_IAM authorization type');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return buildSuccessResult(authorizerString);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const handleObjectAuthorizer = authorizerObject => {
|
|
44
|
-
const {
|
|
45
|
-
arn,
|
|
46
|
-
authorizerId,
|
|
47
|
-
name,
|
|
48
|
-
type
|
|
49
|
-
} = authorizerObject;
|
|
50
|
-
|
|
51
|
-
if (type && type.toUpperCase() === 'AWS_IAM') {
|
|
52
|
-
return buildFailureResult('Serverless Offline does not support the AWS_IAM authorization type');
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (arn) {
|
|
56
|
-
return buildFailureResult(`Serverless Offline does not support non local authorizers (arn): ${arn}`);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
if (authorizerId) {
|
|
60
|
-
return buildFailureResult(`Serverless Offline does not support non local authorizers (authorizerId): ${authorizerId}`);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (!name) {
|
|
64
|
-
return buildFailureResult('Serverless Offline supports local authorizers but authorizer name is missing');
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
return buildSuccessResult(name);
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
const {
|
|
71
|
-
authorizer
|
|
72
|
-
} = endpoint;
|
|
73
|
-
|
|
74
|
-
if (!authorizer) {
|
|
75
|
-
return buildSuccessResult(null);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (typeof authorizer === 'string') {
|
|
79
|
-
return handleStringAuthorizer(authorizer);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (typeof authorizer === 'object') {
|
|
83
|
-
return handleObjectAuthorizer(authorizer);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return buildFailureResult('Serverless Offline supports only local authorizers defined as string or object');
|
|
87
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = authMatchPolicyResource;
|
|
7
|
-
|
|
8
|
-
function parseResource(resource) {
|
|
9
|
-
const [, region, accountId, restApiId, path] = resource.match(/arn:aws:execute-api:(.*?):(.*?):(.*?)\/(.*)/);
|
|
10
|
-
return {
|
|
11
|
-
accountId,
|
|
12
|
-
path,
|
|
13
|
-
region,
|
|
14
|
-
restApiId
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function authMatchPolicyResource(policyResource, resource) {
|
|
19
|
-
// resource and policyResource are ARNs
|
|
20
|
-
if (policyResource === resource) {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (policyResource === '*') {
|
|
25
|
-
return true;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (policyResource === 'arn:aws:execute-api:**') {
|
|
29
|
-
// better fix for #523
|
|
30
|
-
return true;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (policyResource === 'arn:aws:execute-api:*:*:*') {
|
|
34
|
-
return true;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (policyResource.includes('*') || policyResource.includes('?')) {
|
|
38
|
-
// Policy contains a wildcard resource
|
|
39
|
-
const parsedPolicyResource = parseResource(policyResource);
|
|
40
|
-
const parsedResource = parseResource(resource);
|
|
41
|
-
|
|
42
|
-
if (parsedPolicyResource.region !== '*' && parsedPolicyResource.region !== parsedResource.region) {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (parsedPolicyResource.accountId !== '*' && parsedPolicyResource.accountId !== parsedResource.accountId) {
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (parsedPolicyResource.restApiId !== '*' && parsedPolicyResource.restApiId !== parsedResource.restApiId) {
|
|
51
|
-
return false;
|
|
52
|
-
} // The path contains stage, method and the path
|
|
53
|
-
// for the requested resource and the resource defined in the policy
|
|
54
|
-
// Need to create a regex replacing ? with one character and * with any number of characters
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const regExp = new RegExp(parsedPolicyResource.path.replace(/\*/g, '.*').replace(/\?/g, '.'));
|
|
58
|
-
return regExp.test(parsedResource.path);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = authValidateContext;
|
|
7
|
-
|
|
8
|
-
var _boom = _interopRequireDefault(require("@hapi/boom"));
|
|
9
|
-
|
|
10
|
-
var _serverlessLog = _interopRequireDefault(require("../serverlessLog.js"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
keys,
|
|
16
|
-
values
|
|
17
|
-
} = Object;
|
|
18
|
-
|
|
19
|
-
function internalServerError(message) {
|
|
20
|
-
const errorType = 'AuthorizerConfigurationException';
|
|
21
|
-
|
|
22
|
-
const error = _boom.default.internal();
|
|
23
|
-
|
|
24
|
-
error.output.payload.message = message;
|
|
25
|
-
error.output.payload.error = errorType;
|
|
26
|
-
error.output.headers['x-amzn-ErrorType'] = errorType;
|
|
27
|
-
return error;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function isValidContext(context) {
|
|
31
|
-
return values(context).every(i => typeof i === 'string' || typeof i === 'boolean' || typeof i === 'number');
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function transform(context) {
|
|
35
|
-
keys(context).forEach(i => {
|
|
36
|
-
context[i] = context[i].toString();
|
|
37
|
-
});
|
|
38
|
-
return context;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function authValidateContext(context, authFunName) {
|
|
42
|
-
if (typeof context !== 'object') {
|
|
43
|
-
return internalServerError('Authorizer response context must be an object');
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (!isValidContext(context)) {
|
|
47
|
-
const error = 'Authorizer response context values must be of type string, number, or boolean';
|
|
48
|
-
(0, _serverlessLog.default)(`Detected invalid value types returned in authorizer context: (λ: ${authFunName}). ${error}. ` + 'More info: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-lambda-authorizer-output.html');
|
|
49
|
-
return internalServerError(error);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return transform(context);
|
|
53
|
-
}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _fs = require("fs");
|
|
9
|
-
|
|
10
|
-
var _path = require("path");
|
|
11
|
-
|
|
12
|
-
var _OfflineEndpoint = _interopRequireDefault(require("./OfflineEndpoint.js"));
|
|
13
|
-
|
|
14
|
-
var _debugLog = _interopRequireDefault(require("../../debugLog.js"));
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; }
|
|
19
|
-
|
|
20
|
-
var id = 0;
|
|
21
|
-
|
|
22
|
-
function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; }
|
|
23
|
-
|
|
24
|
-
const {
|
|
25
|
-
keys
|
|
26
|
-
} = Object;
|
|
27
|
-
|
|
28
|
-
function readFile(filePath) {
|
|
29
|
-
return (0, _fs.readFileSync)(filePath, 'utf8');
|
|
30
|
-
} // velocity template defaults
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const defaultRequestTemplate = readFile((0, _path.resolve)(__dirname, './templates/offline-default.req.vm'));
|
|
34
|
-
const defaultResponseTemplate = readFile((0, _path.resolve)(__dirname, './templates/offline-default.res.vm'));
|
|
35
|
-
|
|
36
|
-
function getResponseContentType(fep) {
|
|
37
|
-
if (fep.response && fep.response.headers['Content-Type']) {
|
|
38
|
-
return fep.response.headers['Content-Type'].replace(/'/gm, '');
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
return 'application/json';
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
var _handlerPath = /*#__PURE__*/_classPrivateFieldLooseKey("handlerPath");
|
|
45
|
-
|
|
46
|
-
var _http = /*#__PURE__*/_classPrivateFieldLooseKey("http");
|
|
47
|
-
|
|
48
|
-
class Endpoint {
|
|
49
|
-
constructor(handlerPath, http, v3Utils) {
|
|
50
|
-
Object.defineProperty(this, _handlerPath, {
|
|
51
|
-
writable: true,
|
|
52
|
-
value: null
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(this, _http, {
|
|
55
|
-
writable: true,
|
|
56
|
-
value: null
|
|
57
|
-
});
|
|
58
|
-
_classPrivateFieldLooseBase(this, _handlerPath)[_handlerPath] = handlerPath;
|
|
59
|
-
_classPrivateFieldLooseBase(this, _http)[_http] = http;
|
|
60
|
-
|
|
61
|
-
if (v3Utils) {
|
|
62
|
-
this.log = v3Utils.log;
|
|
63
|
-
this.progress = v3Utils.progress;
|
|
64
|
-
this.writeText = v3Utils.writeText;
|
|
65
|
-
this.v3Utils = v3Utils;
|
|
66
|
-
} // TODO FIXME
|
|
67
|
-
// eslint-disable-next-line no-constructor-return
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return this._generate();
|
|
71
|
-
} // determine whether we have function level overrides for velocity templates
|
|
72
|
-
// if not we will use defaults
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
_setVmTemplates(fullEndpoint) {
|
|
76
|
-
// determine requestTemplate
|
|
77
|
-
// first check if requestTemplate is set through serverless
|
|
78
|
-
const fep = fullEndpoint;
|
|
79
|
-
|
|
80
|
-
try {
|
|
81
|
-
// determine request template override
|
|
82
|
-
const reqFilename = `${_classPrivateFieldLooseBase(this, _handlerPath)[_handlerPath]}.req.vm`; // check if serverless framework populates the object itself
|
|
83
|
-
|
|
84
|
-
if (typeof _classPrivateFieldLooseBase(this, _http)[_http].request === 'object' && typeof _classPrivateFieldLooseBase(this, _http)[_http].request.template === 'object') {
|
|
85
|
-
const templatesConfig = _classPrivateFieldLooseBase(this, _http)[_http].request.template;
|
|
86
|
-
|
|
87
|
-
keys(templatesConfig).forEach(key => {
|
|
88
|
-
fep.requestTemplates[key] = templatesConfig[key];
|
|
89
|
-
});
|
|
90
|
-
} // load request template if exists if not use default from serverless offline
|
|
91
|
-
else if ((0, _fs.existsSync)(reqFilename)) {
|
|
92
|
-
fep.requestTemplates['application/json'] = readFile(reqFilename);
|
|
93
|
-
} else {
|
|
94
|
-
fep.requestTemplates['application/json'] = defaultRequestTemplate;
|
|
95
|
-
} // determine response template
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
const resFilename = `${_classPrivateFieldLooseBase(this, _handlerPath)[_handlerPath]}.res.vm`;
|
|
99
|
-
fep.responseContentType = getResponseContentType(fep);
|
|
100
|
-
|
|
101
|
-
if (this.log) {
|
|
102
|
-
this.log.debug('Response Content-Type ', fep.responseContentType);
|
|
103
|
-
} else {
|
|
104
|
-
(0, _debugLog.default)('Response Content-Type ', fep.responseContentType);
|
|
105
|
-
} // load response template from http response template, or load file if exists other use default
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
if (fep.response && fep.response.template) {
|
|
109
|
-
fep.responses.default.responseTemplates[fep.responseContentType] = fep.response.template;
|
|
110
|
-
} else if ((0, _fs.existsSync)(resFilename)) {
|
|
111
|
-
fep.responses.default.responseTemplates[fep.responseContentType] = readFile(resFilename);
|
|
112
|
-
} else {
|
|
113
|
-
fep.responses.default.responseTemplates[fep.responseContentType] = defaultResponseTemplate;
|
|
114
|
-
}
|
|
115
|
-
} catch (err) {
|
|
116
|
-
if (this.log) {
|
|
117
|
-
this.log.debug(`Error: ${err}`);
|
|
118
|
-
} else {
|
|
119
|
-
(0, _debugLog.default)(`Error: ${err}`);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return fep;
|
|
124
|
-
} // loosely based on:
|
|
125
|
-
// https://github.com/serverless/serverless/blob/v1.59.2/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js#L380
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
_getIntegration(http) {
|
|
129
|
-
const {
|
|
130
|
-
integration,
|
|
131
|
-
async: isAsync
|
|
132
|
-
} = http;
|
|
133
|
-
|
|
134
|
-
if (integration) {
|
|
135
|
-
const normalizedIntegration = integration.toUpperCase().replace('-', '_');
|
|
136
|
-
|
|
137
|
-
if (normalizedIntegration === 'LAMBDA') {
|
|
138
|
-
return 'AWS';
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
if (normalizedIntegration === 'LAMBDA_PROXY') {
|
|
142
|
-
return 'AWS_PROXY';
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
return normalizedIntegration;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (isAsync) {
|
|
149
|
-
return 'AWS';
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
return 'AWS_PROXY';
|
|
153
|
-
} // return fully generated Endpoint
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
_generate() {
|
|
157
|
-
const offlineEndpoint = new _OfflineEndpoint.default();
|
|
158
|
-
const fullEndpoint = { ...offlineEndpoint,
|
|
159
|
-
..._classPrivateFieldLooseBase(this, _http)[_http]
|
|
160
|
-
};
|
|
161
|
-
fullEndpoint.integration = this._getIntegration(_classPrivateFieldLooseBase(this, _http)[_http]);
|
|
162
|
-
|
|
163
|
-
if (fullEndpoint.integration === 'AWS') {
|
|
164
|
-
// determine request and response templates or use defaults
|
|
165
|
-
return this._setVmTemplates(fullEndpoint);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return fullEndpoint;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
exports.default = Endpoint;
|
package/dist/events/http/Http.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _HttpEventDefinition = _interopRequireDefault(require("./HttpEventDefinition.js"));
|
|
9
|
-
|
|
10
|
-
var _HttpServer = _interopRequireDefault(require("./HttpServer.js"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError("attempted to use private field on non-instance"); } return receiver; }
|
|
15
|
-
|
|
16
|
-
var id = 0;
|
|
17
|
-
|
|
18
|
-
function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; }
|
|
19
|
-
|
|
20
|
-
var _httpServer = /*#__PURE__*/_classPrivateFieldLooseKey("httpServer");
|
|
21
|
-
|
|
22
|
-
class Http {
|
|
23
|
-
constructor(serverless, options, lambda, v3Utils) {
|
|
24
|
-
Object.defineProperty(this, _httpServer, {
|
|
25
|
-
writable: true,
|
|
26
|
-
value: null
|
|
27
|
-
});
|
|
28
|
-
_classPrivateFieldLooseBase(this, _httpServer)[_httpServer] = new _HttpServer.default(serverless, options, lambda, v3Utils);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
start() {
|
|
32
|
-
return _classPrivateFieldLooseBase(this, _httpServer)[_httpServer].start();
|
|
33
|
-
} // stops the server
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
stop(timeout) {
|
|
37
|
-
return _classPrivateFieldLooseBase(this, _httpServer)[_httpServer].stop(timeout);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
_create(functionKey, rawHttpEventDefinition, handler) {
|
|
41
|
-
const httpEvent = new _HttpEventDefinition.default(rawHttpEventDefinition);
|
|
42
|
-
|
|
43
|
-
_classPrivateFieldLooseBase(this, _httpServer)[_httpServer].createRoutes(functionKey, httpEvent, handler);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
create(events) {
|
|
47
|
-
events.forEach(({
|
|
48
|
-
functionKey,
|
|
49
|
-
handler,
|
|
50
|
-
http
|
|
51
|
-
}) => {
|
|
52
|
-
this._create(functionKey, http, handler);
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
_classPrivateFieldLooseBase(this, _httpServer)[_httpServer].writeRoutesTerminal();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
createResourceRoutes() {
|
|
59
|
-
_classPrivateFieldLooseBase(this, _httpServer)[_httpServer].createResourceRoutes();
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
create404Route() {
|
|
63
|
-
_classPrivateFieldLooseBase(this, _httpServer)[_httpServer].create404Route();
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
registerPlugins() {
|
|
67
|
-
return _classPrivateFieldLooseBase(this, _httpServer)[_httpServer].registerPlugins();
|
|
68
|
-
} // TEMP FIXME quick fix to expose gateway server for testing, look for better solution
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
getServer() {
|
|
72
|
-
return _classPrivateFieldLooseBase(this, _httpServer)[_httpServer].getServer();
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
exports.default = Http;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
const {
|
|
8
|
-
assign
|
|
9
|
-
} = Object;
|
|
10
|
-
|
|
11
|
-
class HttpEventDefinition {
|
|
12
|
-
constructor(rawHttpEventDefinition) {
|
|
13
|
-
let method;
|
|
14
|
-
let path;
|
|
15
|
-
let rest;
|
|
16
|
-
|
|
17
|
-
if (typeof rawHttpEventDefinition === 'string') {
|
|
18
|
-
;
|
|
19
|
-
[method, path] = rawHttpEventDefinition.split(' ');
|
|
20
|
-
} else {
|
|
21
|
-
;
|
|
22
|
-
({
|
|
23
|
-
method,
|
|
24
|
-
path,
|
|
25
|
-
...rest
|
|
26
|
-
} = rawHttpEventDefinition);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
this.method = method;
|
|
30
|
-
this.path = path;
|
|
31
|
-
assign(this, rest);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
exports.default = HttpEventDefinition;
|