serverless-offline 8.2.0 → 8.3.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 +124 -111
- package/dist/ServerlessOffline.js +91 -24
- package/dist/config/constants.js +1 -1
- package/dist/events/http/Endpoint.js +27 -9
- package/dist/events/http/Http.js +3 -3
- package/dist/events/http/HttpServer.js +311 -76
- package/dist/events/http/authFunctionNameExtractor.js +14 -8
- package/dist/events/http/authJWTSettingsExtractor.js +14 -7
- package/dist/events/http/createAuthScheme.js +42 -8
- package/dist/events/http/createJWTAuthScheme.js +52 -13
- package/dist/events/http/lambda-events/LambdaIntegrationEvent.js +7 -6
- package/dist/events/http/lambda-events/LambdaProxyIntegrationEvent.js +18 -7
- package/dist/events/http/lambda-events/LambdaProxyIntegrationEventV2.js +17 -6
- package/dist/events/http/lambda-events/VelocityContext.js +4 -4
- package/dist/events/http/lambda-events/index.js +4 -4
- package/dist/events/http/lambda-events/renderVelocityTemplateObject.js +19 -7
- package/dist/events/schedule/Schedule.js +45 -10
- package/dist/events/websocket/HttpServer.js +24 -7
- package/dist/events/websocket/WebSocket.js +14 -6
- package/dist/events/websocket/WebSocketClients.js +65 -17
- package/dist/events/websocket/WebSocketServer.js +28 -6
- package/dist/events/websocket/http-routes/_catchAll/catchAllRoute.js +9 -2
- package/dist/events/websocket/http-routes/connections/ConnectionsController.js +1 -1
- package/dist/events/websocket/http-routes/connections/connectionsRoutes.js +28 -5
- package/dist/events/websocket/lambda-events/WebSocketConnectEvent.js +5 -5
- package/dist/events/websocket/lambda-events/WebSocketDisconnectEvent.js +1 -1
- package/dist/events/websocket/lambda-events/WebSocketEvent.js +3 -3
- package/dist/events/websocket/lambda-events/WebSocketRequestContext.js +4 -4
- package/dist/lambda/HttpServer.js +34 -10
- package/dist/lambda/Lambda.js +15 -7
- package/dist/lambda/LambdaContext.js +1 -1
- package/dist/lambda/LambdaFunction.js +40 -23
- package/dist/lambda/LambdaFunctionPool.js +9 -8
- package/dist/lambda/handler-runner/HandlerRunner.js +44 -16
- package/dist/lambda/handler-runner/child-process-runner/ChildProcessRunner.js +21 -8
- package/dist/lambda/handler-runner/child-process-runner/childProcessHelper.js +1 -10
- package/dist/lambda/handler-runner/docker-runner/DockerContainer.js +168 -69
- package/dist/lambda/handler-runner/docker-runner/DockerImage.js +21 -5
- package/dist/lambda/handler-runner/docker-runner/DockerRunner.js +4 -4
- package/dist/lambda/handler-runner/in-process-runner/InProcessRunner.js +9 -21
- package/dist/lambda/handler-runner/java-runner/JavaRunner.js +26 -14
- package/dist/lambda/handler-runner/python-runner/PythonRunner.js +20 -7
- package/dist/lambda/handler-runner/ruby-runner/RubyRunner.js +22 -24
- package/dist/lambda/handler-runner/worker-thread-runner/WorkerThreadRunner.js +2 -2
- package/dist/lambda/handler-runner/worker-thread-runner/workerThreadHelper.js +1 -11
- package/dist/lambda/routes/invocations/InvocationsController.js +30 -11
- package/dist/lambda/routes/invocations/invocationsRoute.js +2 -2
- package/dist/lambda/routes/invoke-async/InvokeAsyncController.js +2 -6
- package/dist/serverlessLog.js +1 -1
- package/dist/utils/getHttpApiCorsConfig.js +18 -5
- package/dist/utils/index.js +16 -16
- package/package.json +55 -35
|
@@ -30,16 +30,16 @@ const {
|
|
|
30
30
|
has
|
|
31
31
|
} = Reflect;
|
|
32
32
|
|
|
33
|
-
var _env = _classPrivateFieldLooseKey("env");
|
|
33
|
+
var _env = /*#__PURE__*/_classPrivateFieldLooseKey("env");
|
|
34
34
|
|
|
35
|
-
var _handlerName = _classPrivateFieldLooseKey("handlerName");
|
|
35
|
+
var _handlerName = /*#__PURE__*/_classPrivateFieldLooseKey("handlerName");
|
|
36
36
|
|
|
37
|
-
var _handlerPath = _classPrivateFieldLooseKey("handlerPath");
|
|
37
|
+
var _handlerPath = /*#__PURE__*/_classPrivateFieldLooseKey("handlerPath");
|
|
38
38
|
|
|
39
|
-
var _allowCache = _classPrivateFieldLooseKey("allowCache");
|
|
39
|
+
var _allowCache = /*#__PURE__*/_classPrivateFieldLooseKey("allowCache");
|
|
40
40
|
|
|
41
41
|
class RubyRunner {
|
|
42
|
-
constructor(funOptions, env, allowCache) {
|
|
42
|
+
constructor(funOptions, env, allowCache, v3Utils) {
|
|
43
43
|
Object.defineProperty(this, _env, {
|
|
44
44
|
writable: true,
|
|
45
45
|
value: null
|
|
@@ -64,6 +64,13 @@ class RubyRunner {
|
|
|
64
64
|
_classPrivateFieldLooseBase(this, _handlerName)[_handlerName] = handlerName;
|
|
65
65
|
_classPrivateFieldLooseBase(this, _handlerPath)[_handlerPath] = handlerPath;
|
|
66
66
|
_classPrivateFieldLooseBase(this, _allowCache)[_allowCache] = allowCache;
|
|
67
|
+
|
|
68
|
+
if (v3Utils) {
|
|
69
|
+
this.log = v3Utils.log;
|
|
70
|
+
this.progress = v3Utils.progress;
|
|
71
|
+
this.writeText = v3Utils.writeText;
|
|
72
|
+
this.v3Utils = v3Utils;
|
|
73
|
+
}
|
|
67
74
|
} // no-op
|
|
68
75
|
// () => void
|
|
69
76
|
|
|
@@ -84,6 +91,8 @@ class RubyRunner {
|
|
|
84
91
|
|
|
85
92
|
if (json && typeof json === 'object' && has(json, '__offline_payload__')) {
|
|
86
93
|
payload = json.__offline_payload__;
|
|
94
|
+
} else if (this.log) {
|
|
95
|
+
this.log.notice(item);
|
|
87
96
|
} else {
|
|
88
97
|
console.log(item); // log non-JSON stdout to console (puts, p, logger.info, ...)
|
|
89
98
|
}
|
|
@@ -116,16 +125,7 @@ class RubyRunner {
|
|
|
116
125
|
input // shell: true,
|
|
117
126
|
|
|
118
127
|
});
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
try {
|
|
122
|
-
result = await ruby;
|
|
123
|
-
} catch (err) {
|
|
124
|
-
// TODO
|
|
125
|
-
console.log(err);
|
|
126
|
-
throw err;
|
|
127
|
-
}
|
|
128
|
-
|
|
128
|
+
const result = await ruby;
|
|
129
129
|
const {
|
|
130
130
|
stderr,
|
|
131
131
|
stdout
|
|
@@ -133,18 +133,16 @@ class RubyRunner {
|
|
|
133
133
|
|
|
134
134
|
if (stderr) {
|
|
135
135
|
// TODO
|
|
136
|
-
|
|
136
|
+
if (this.log) {
|
|
137
|
+
this.log.notice(stderr);
|
|
138
|
+
} else {
|
|
139
|
+
console.log(stderr);
|
|
140
|
+
}
|
|
141
|
+
|
|
137
142
|
return stderr;
|
|
138
143
|
}
|
|
139
144
|
|
|
140
|
-
|
|
141
|
-
return this._parsePayload(stdout);
|
|
142
|
-
} catch (err) {
|
|
143
|
-
// TODO
|
|
144
|
-
console.log('No JSON'); // TODO return or re-throw?
|
|
145
|
-
|
|
146
|
-
return err;
|
|
147
|
-
}
|
|
145
|
+
return this._parsePayload(stdout);
|
|
148
146
|
}
|
|
149
147
|
|
|
150
148
|
}
|
|
@@ -18,9 +18,9 @@ function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + n
|
|
|
18
18
|
// eslint-disable-line import/no-unresolved
|
|
19
19
|
const workerThreadHelperPath = (0, _path.resolve)(__dirname, './workerThreadHelper.js');
|
|
20
20
|
|
|
21
|
-
var _workerThread = _classPrivateFieldLooseKey("workerThread");
|
|
21
|
+
var _workerThread = /*#__PURE__*/_classPrivateFieldLooseKey("workerThread");
|
|
22
22
|
|
|
23
|
-
var _allowCache = _classPrivateFieldLooseKey("allowCache");
|
|
23
|
+
var _allowCache = /*#__PURE__*/_classPrivateFieldLooseKey("allowCache");
|
|
24
24
|
|
|
25
25
|
class WorkerThreadRunner {
|
|
26
26
|
constructor(funOptions
|
|
@@ -23,17 +23,7 @@ _worker_threads.parentPort.on('message', async messageData => {
|
|
|
23
23
|
} = messageData; // TODO we could probably cache this in the module scope?
|
|
24
24
|
|
|
25
25
|
const inProcessRunner = new _index.default(functionKey, handlerPath, handlerName, process.env, timeout, allowCache);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
try {
|
|
29
|
-
result = await inProcessRunner.run(event, context);
|
|
30
|
-
} catch (err) {
|
|
31
|
-
// this only executes when we have an exception caused by synchronous code
|
|
32
|
-
// TODO logging
|
|
33
|
-
console.log(err);
|
|
34
|
-
throw err;
|
|
35
|
-
} // TODO check serializeability (contains function, symbol etc)
|
|
36
|
-
|
|
26
|
+
const result = await inProcessRunner.run(event, context); // TODO check serializeability (contains function, symbol etc)
|
|
37
27
|
|
|
38
28
|
port.postMessage(result);
|
|
39
29
|
});
|
|
@@ -15,15 +15,22 @@ var id = 0;
|
|
|
15
15
|
|
|
16
16
|
function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; }
|
|
17
17
|
|
|
18
|
-
var _lambda = _classPrivateFieldLooseKey("lambda");
|
|
18
|
+
var _lambda = /*#__PURE__*/_classPrivateFieldLooseKey("lambda");
|
|
19
19
|
|
|
20
20
|
class InvocationsController {
|
|
21
|
-
constructor(lambda) {
|
|
21
|
+
constructor(lambda, v3Utils) {
|
|
22
22
|
Object.defineProperty(this, _lambda, {
|
|
23
23
|
writable: true,
|
|
24
24
|
value: null
|
|
25
25
|
});
|
|
26
26
|
_classPrivateFieldLooseBase(this, _lambda)[_lambda] = lambda;
|
|
27
|
+
|
|
28
|
+
if (v3Utils) {
|
|
29
|
+
this.log = v3Utils.log;
|
|
30
|
+
this.progress = v3Utils.progress;
|
|
31
|
+
this.writeText = v3Utils.writeText;
|
|
32
|
+
this.v3Utils = v3Utils;
|
|
33
|
+
}
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
async invoke(functionName, invocationType, event, clientContext) {
|
|
@@ -31,9 +38,14 @@ class InvocationsController {
|
|
|
31
38
|
const functionNames = _classPrivateFieldLooseBase(this, _lambda)[_lambda].listFunctionNames();
|
|
32
39
|
|
|
33
40
|
if (functionNames.length === 0 || !functionNames.includes(functionName)) {
|
|
34
|
-
(
|
|
41
|
+
if (this.log) {
|
|
42
|
+
this.log.error(`Attempt to invoke function '${functionName}' failed. Function does not exists.`);
|
|
43
|
+
} else {
|
|
44
|
+
(0, _serverlessLog.default)(`Attempt to invoke function '${functionName}' failed. Function does not exists.`);
|
|
45
|
+
} // Conforms to the actual response from AWS Lambda when invoking a non-existent
|
|
35
46
|
// function. Details on the error are provided in the Payload.Message key
|
|
36
47
|
|
|
48
|
+
|
|
37
49
|
return {
|
|
38
50
|
FunctionError: 'ResourceNotFoundException',
|
|
39
51
|
Payload: {
|
|
@@ -51,11 +63,7 @@ class InvocationsController {
|
|
|
51
63
|
|
|
52
64
|
if (invocationType === 'Event') {
|
|
53
65
|
// don't await result!
|
|
54
|
-
lambdaFunction.runHandler()
|
|
55
|
-
// TODO handle error
|
|
56
|
-
console.log(err);
|
|
57
|
-
throw err;
|
|
58
|
-
});
|
|
66
|
+
lambdaFunction.runHandler();
|
|
59
67
|
return {
|
|
60
68
|
Payload: '',
|
|
61
69
|
StatusCode: 202
|
|
@@ -68,13 +76,18 @@ class InvocationsController {
|
|
|
68
76
|
try {
|
|
69
77
|
result = await lambdaFunction.runHandler();
|
|
70
78
|
} catch (err) {
|
|
71
|
-
(
|
|
72
|
-
|
|
79
|
+
if (this.log) {
|
|
80
|
+
this.log.error(`Unhandled Lambda Error during invoke of '${functionName}': ${err}`);
|
|
81
|
+
} else {
|
|
82
|
+
(0, _serverlessLog.default)(`Unhandled Lambda Error during invoke of '${functionName}'`);
|
|
83
|
+
console.log(err);
|
|
84
|
+
} // In most circumstances this is the correct error type/structure.
|
|
73
85
|
// The API returns a StreamingBody with status code of 200
|
|
74
86
|
// that eventually spits out the error and stack trace.
|
|
75
87
|
// When the request is synchronous, aws-sdk should buffer
|
|
76
88
|
// the whole error stream, however this has not been validated.
|
|
77
89
|
|
|
90
|
+
|
|
78
91
|
return {
|
|
79
92
|
Payload: {
|
|
80
93
|
errorType: 'Error',
|
|
@@ -107,7 +120,13 @@ class InvocationsController {
|
|
|
107
120
|
|
|
108
121
|
|
|
109
122
|
const errMsg = `invocationType: '${invocationType}' not supported by serverless-offline`;
|
|
110
|
-
|
|
123
|
+
|
|
124
|
+
if (this.log) {
|
|
125
|
+
this.log.error(errMsg);
|
|
126
|
+
} else {
|
|
127
|
+
console.log(errMsg);
|
|
128
|
+
}
|
|
129
|
+
|
|
111
130
|
return {
|
|
112
131
|
FunctionError: 'InvalidParameterValueException',
|
|
113
132
|
Payload: {
|
|
@@ -17,8 +17,8 @@ const {
|
|
|
17
17
|
parse
|
|
18
18
|
} = JSON; // https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html
|
|
19
19
|
|
|
20
|
-
function invocationsRoute(lambda, options) {
|
|
21
|
-
const invocationsController = new _InvocationsController.default(lambda);
|
|
20
|
+
function invocationsRoute(lambda, options, v3Utils) {
|
|
21
|
+
const invocationsController = new _InvocationsController.default(lambda, v3Utils);
|
|
22
22
|
return {
|
|
23
23
|
async handler(request, h) {
|
|
24
24
|
const {
|
|
@@ -11,7 +11,7 @@ var id = 0;
|
|
|
11
11
|
|
|
12
12
|
function _classPrivateFieldLooseKey(name) { return "__private_" + id++ + "_" + name; }
|
|
13
13
|
|
|
14
|
-
var _lambda = _classPrivateFieldLooseKey("lambda");
|
|
14
|
+
var _lambda = /*#__PURE__*/_classPrivateFieldLooseKey("lambda");
|
|
15
15
|
|
|
16
16
|
class InvokeAsyncController {
|
|
17
17
|
constructor(lambda) {
|
|
@@ -27,11 +27,7 @@ class InvokeAsyncController {
|
|
|
27
27
|
|
|
28
28
|
lambdaFunction.setEvent(event); // don't await result!
|
|
29
29
|
|
|
30
|
-
lambdaFunction.runHandler()
|
|
31
|
-
// TODO handle error
|
|
32
|
-
console.log(err);
|
|
33
|
-
throw err;
|
|
34
|
-
});
|
|
30
|
+
lambdaFunction.runHandler();
|
|
35
31
|
return {
|
|
36
32
|
StatusCode: 202
|
|
37
33
|
};
|
package/dist/serverlessLog.js
CHANGED
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = serverlessLog;
|
|
7
7
|
exports.logLayers = logLayers;
|
|
8
|
-
exports.setLog = setLog;
|
|
9
8
|
exports.logRoutes = logRoutes;
|
|
10
9
|
exports.logWarning = logWarning;
|
|
10
|
+
exports.setLog = setLog;
|
|
11
11
|
|
|
12
12
|
var _boxen = _interopRequireDefault(require("boxen"));
|
|
13
13
|
|
|
@@ -11,7 +11,9 @@ var _serverlessLog = require("../serverlessLog.js");
|
|
|
11
11
|
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
|
|
14
|
-
function getHttpApiCorsConfig(httpApiCors
|
|
14
|
+
function getHttpApiCorsConfig(httpApiCors, {
|
|
15
|
+
log
|
|
16
|
+
}) {
|
|
15
17
|
if (httpApiCors === true) {
|
|
16
18
|
// default values that should be set by serverless
|
|
17
19
|
// https://www.serverless.com/framework/docs/providers/aws/events/http-api/
|
|
@@ -20,12 +22,23 @@ function getHttpApiCorsConfig(httpApiCors) {
|
|
|
20
22
|
allowedHeaders: ['Content-Type', 'X-Amz-Date', 'Authorization', 'X-Api-Key', 'X-Amz-Security-Token', 'X-Amz-User-Agent'],
|
|
21
23
|
allowedMethods: ['OPTIONS', 'GET', 'POST', 'PUT', 'DELETE', 'PATCH']
|
|
22
24
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
|
|
26
|
+
if (log) {
|
|
27
|
+
log.warning(c);
|
|
28
|
+
} else {
|
|
29
|
+
(0, _debugLog.default)(c);
|
|
30
|
+
(0, _serverlessLog.logWarning)(c);
|
|
31
|
+
}
|
|
32
|
+
|
|
25
33
|
return c;
|
|
26
34
|
}
|
|
27
35
|
|
|
28
|
-
|
|
29
|
-
|
|
36
|
+
if (log) {
|
|
37
|
+
log.warning(httpApiCors);
|
|
38
|
+
} else {
|
|
39
|
+
(0, _debugLog.default)(httpApiCors);
|
|
40
|
+
(0, _serverlessLog.logWarning)(httpApiCors);
|
|
41
|
+
}
|
|
42
|
+
|
|
30
43
|
return httpApiCors;
|
|
31
44
|
}
|
package/dist/utils/index.js
CHANGED
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
Object.defineProperty(exports, "checkDockerDaemon", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _checkDockerDaemon.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
10
12
|
Object.defineProperty(exports, "createApiKey", {
|
|
11
13
|
enumerable: true,
|
|
12
14
|
get: function () {
|
|
@@ -19,6 +21,7 @@ Object.defineProperty(exports, "createUniqueId", {
|
|
|
19
21
|
return _createUniqueId.default;
|
|
20
22
|
}
|
|
21
23
|
});
|
|
24
|
+
exports.detectEncoding = detectEncoding;
|
|
22
25
|
Object.defineProperty(exports, "detectExecutable", {
|
|
23
26
|
enumerable: true,
|
|
24
27
|
get: function () {
|
|
@@ -31,18 +34,26 @@ Object.defineProperty(exports, "formatToClfTime", {
|
|
|
31
34
|
return _formatToClfTime.default;
|
|
32
35
|
}
|
|
33
36
|
});
|
|
37
|
+
Object.defineProperty(exports, "generateHapiPath", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () {
|
|
40
|
+
return _generateHapiPath.default;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
34
43
|
Object.defineProperty(exports, "getHttpApiCorsConfig", {
|
|
35
44
|
enumerable: true,
|
|
36
45
|
get: function () {
|
|
37
46
|
return _getHttpApiCorsConfig.default;
|
|
38
47
|
}
|
|
39
48
|
});
|
|
49
|
+
exports.isPlainObject = isPlainObject;
|
|
40
50
|
Object.defineProperty(exports, "jsonPath", {
|
|
41
51
|
enumerable: true,
|
|
42
52
|
get: function () {
|
|
43
53
|
return _jsonPath.default;
|
|
44
54
|
}
|
|
45
55
|
});
|
|
56
|
+
exports.nullIfEmpty = nullIfEmpty;
|
|
46
57
|
Object.defineProperty(exports, "parseHeaders", {
|
|
47
58
|
enumerable: true,
|
|
48
59
|
get: function () {
|
|
@@ -79,18 +90,7 @@ Object.defineProperty(exports, "splitHandlerPathAndName", {
|
|
|
79
90
|
return _splitHandlerPathAndName.default;
|
|
80
91
|
}
|
|
81
92
|
});
|
|
82
|
-
|
|
83
|
-
enumerable: true,
|
|
84
|
-
get: function () {
|
|
85
|
-
return _checkDockerDaemon.default;
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
Object.defineProperty(exports, "generateHapiPath", {
|
|
89
|
-
enumerable: true,
|
|
90
|
-
get: function () {
|
|
91
|
-
return _generateHapiPath.default;
|
|
92
|
-
}
|
|
93
|
-
});
|
|
93
|
+
exports.toPlainOrEmptyObject = toPlainOrEmptyObject;
|
|
94
94
|
|
|
95
95
|
var _createApiKey = _interopRequireDefault(require("./createApiKey.js"));
|
|
96
96
|
|
package/package.json
CHANGED
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dedicatedTo": "Blue, a great migrating bird.",
|
|
3
3
|
"name": "serverless-offline",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.3.0",
|
|
5
5
|
"description": "Emulate AWS λ and API Gateway locally when developing your Serverless project",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/main.js",
|
|
8
8
|
"type": "commonjs",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "rimraf dist && babel src --ignore \"**/__tests__/**/*\" --out-dir dist && copyfiles -u 1 \"src/**/*.{vm,py,rb}\" dist",
|
|
11
|
-
"lint": "eslint .",
|
|
12
11
|
"format": "eslint . --fix",
|
|
12
|
+
"lint": "eslint .",
|
|
13
|
+
"lint:updated": "pipe-git-updated --ext=js -- eslint",
|
|
13
14
|
"list-contributors": "echo 'clone https://github.com/mgechev/github-contributors-list.git first, then run npm install' && cd ../github-contributors-list && node bin/githubcontrib --owner dherault --repo serverless-offline --sortBy contributions --showlogin true --sortOrder desc > contributors.md",
|
|
14
15
|
"prepare": "npm run build",
|
|
15
16
|
"prepublishOnly": "npm run lint && npm run build",
|
|
17
|
+
"prettier-check": "prettier -c --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"",
|
|
18
|
+
"prettier-check:updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c",
|
|
19
|
+
"prettify": "prettier --write --ignore-path .gitignore \"**/*.{css,html,js,json,md,yaml,yml}\"",
|
|
20
|
+
"prettify:updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier --write",
|
|
16
21
|
"test": "npm run build && jest --verbose --silent --runInBand",
|
|
17
|
-
"test:unit": "jest --verbose --silent --runInBand --config jest.config.units.js",
|
|
18
22
|
"test:cov": "npm run build && jest --coverage --silent --runInBand --collectCoverageFrom=src/**/*.js",
|
|
19
23
|
"test:log": "npm run build && jest --verbose",
|
|
20
24
|
"test:noBuild": "jest --verbose --runInBand --bail",
|
|
25
|
+
"test:unit": "jest --verbose --silent --runInBand --config jest.config.units.js",
|
|
21
26
|
"test:watch": "SKIP_SETUP=true jest --verbose --watch"
|
|
22
27
|
},
|
|
23
28
|
"repository": {
|
|
@@ -151,63 +156,78 @@
|
|
|
151
156
|
"Justin Ng (https://github.com/njyjn)",
|
|
152
157
|
"Fernando Alvarez (https://github.com/jefer590)"
|
|
153
158
|
],
|
|
159
|
+
"husky": {
|
|
160
|
+
"hooks": {
|
|
161
|
+
"pre-commit": "lint-staged"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"lint-staged": {
|
|
165
|
+
"*.js": [
|
|
166
|
+
"eslint"
|
|
167
|
+
],
|
|
168
|
+
"*.{css,html,js,json,md,yaml,yml}": [
|
|
169
|
+
"prettier -c"
|
|
170
|
+
]
|
|
171
|
+
},
|
|
154
172
|
"engines": {
|
|
155
173
|
"node": ">=12.0.0"
|
|
156
174
|
},
|
|
157
175
|
"dependencies": {
|
|
158
|
-
"@hapi/boom": "^9.1.
|
|
159
|
-
"@hapi/h2o2": "^9.0
|
|
160
|
-
"@hapi/hapi": "^20.1
|
|
161
|
-
"aws-sdk": "^2.
|
|
162
|
-
"boxen": "^5.
|
|
163
|
-
"chalk": "^4.1.
|
|
176
|
+
"@hapi/boom": "^9.1.4",
|
|
177
|
+
"@hapi/h2o2": "^9.1.0",
|
|
178
|
+
"@hapi/hapi": "^20.2.1",
|
|
179
|
+
"aws-sdk": "^2.1032.0",
|
|
180
|
+
"boxen": "^5.1.2",
|
|
181
|
+
"chalk": "^4.1.2",
|
|
164
182
|
"cuid": "^2.1.8",
|
|
165
|
-
"execa": "^5.
|
|
183
|
+
"execa": "^5.1.1",
|
|
166
184
|
"extend": "^3.0.2",
|
|
167
185
|
"fs-extra": "^9.1.0",
|
|
168
186
|
"java-invoke-local": "0.0.6",
|
|
169
187
|
"js-string-escape": "^1.0.1",
|
|
170
|
-
"jsonpath-plus": "^5.0
|
|
188
|
+
"jsonpath-plus": "^5.1.0",
|
|
171
189
|
"jsonschema": "^1.4.0",
|
|
172
190
|
"jsonwebtoken": "^8.5.1",
|
|
173
|
-
"jszip": "^3.
|
|
174
|
-
"luxon": "^1.
|
|
175
|
-
"node-fetch": "^2.6.
|
|
191
|
+
"jszip": "^3.7.1",
|
|
192
|
+
"luxon": "^1.28.0",
|
|
193
|
+
"node-fetch": "^2.6.6",
|
|
176
194
|
"node-schedule": "^1.3.3",
|
|
177
|
-
"object.fromentries": "^2.0.
|
|
178
|
-
"p-memoize": "^4.0.
|
|
195
|
+
"object.fromentries": "^2.0.5",
|
|
196
|
+
"p-memoize": "^4.0.3",
|
|
179
197
|
"p-queue": "^6.6.2",
|
|
180
|
-
"p-retry": "^4.
|
|
198
|
+
"p-retry": "^4.6.1",
|
|
181
199
|
"please-upgrade-node": "^3.2.0",
|
|
182
200
|
"portfinder": "^1.0.28",
|
|
183
|
-
"semver": "^7.3.
|
|
184
|
-
"update-notifier": "^5.0
|
|
185
|
-
"velocityjs": "^2.0.
|
|
186
|
-
"ws": "^7.
|
|
201
|
+
"semver": "^7.3.5",
|
|
202
|
+
"update-notifier": "^5.1.0",
|
|
203
|
+
"velocityjs": "^2.0.5",
|
|
204
|
+
"ws": "^7.5.5"
|
|
187
205
|
},
|
|
188
206
|
"devDependencies": {
|
|
189
|
-
"@babel/cli": "^7.
|
|
190
|
-
"@babel/core": "^7.
|
|
191
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
192
|
-
"@babel/plugin-proposal-dynamic-import": "^7.
|
|
193
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.
|
|
194
|
-
"@babel/plugin-proposal-optional-chaining": "^7.
|
|
195
|
-
"@babel/plugin-transform-modules-commonjs": "^7.
|
|
196
|
-
"@babel/register": "^7.
|
|
197
|
-
"archiver": "^5.
|
|
207
|
+
"@babel/cli": "^7.16.0",
|
|
208
|
+
"@babel/core": "^7.16.0",
|
|
209
|
+
"@babel/plugin-proposal-class-properties": "^7.16.0",
|
|
210
|
+
"@babel/plugin-proposal-dynamic-import": "^7.16.0",
|
|
211
|
+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
|
|
212
|
+
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
|
|
213
|
+
"@babel/plugin-transform-modules-commonjs": "^7.16.0",
|
|
214
|
+
"@babel/register": "^7.16.0",
|
|
215
|
+
"archiver": "^5.3.0",
|
|
198
216
|
"babel-eslint": "^10.1.0",
|
|
199
217
|
"copyfiles": "^2.4.1",
|
|
200
|
-
"eslint": "^7.
|
|
218
|
+
"eslint": "^7.32.0",
|
|
201
219
|
"eslint-config-airbnb-base": "^14.2.1",
|
|
202
220
|
"eslint-config-prettier": "^7.2.0",
|
|
203
|
-
"eslint-plugin-import": "^2.
|
|
204
|
-
"eslint-plugin-prettier": "^3.
|
|
221
|
+
"eslint-plugin-import": "^2.25.3",
|
|
222
|
+
"eslint-plugin-prettier": "^3.4.1",
|
|
223
|
+
"git-list-updated": "^1.2.1",
|
|
205
224
|
"husky": "^4.3.8",
|
|
206
225
|
"jest": "^26.6.3",
|
|
226
|
+
"lint-staged": "^11.2.6",
|
|
207
227
|
"p-map": "^4.0.0",
|
|
208
|
-
"prettier": "^2.
|
|
228
|
+
"prettier": "^2.4.1",
|
|
209
229
|
"rimraf": "^3.0.2",
|
|
210
|
-
"serverless": "^2.2
|
|
230
|
+
"serverless": "^2.66.2"
|
|
211
231
|
},
|
|
212
232
|
"peerDependencies": {
|
|
213
233
|
"serverless": "^1.60.0 || 2"
|