@hybridless/hybridless 0.0.82 → 0.0.83
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/core/DepsManager.js +90 -0
- package/core/DepsManager.js.map +1 -0
- package/core/Docker.js +76 -0
- package/core/Docker.js.map +1 -0
- package/core/Globals.js +97 -0
- package/core/Globals.js.map +1 -0
- package/core/Logger.js +82 -0
- package/core/Logger.js.map +1 -0
- package/index.js +397 -0
- package/index.js.map +1 -0
- package/options.js +72 -0
- package/options.js.map +1 -0
- package/options.json +6957 -6888
- package/package.json +1 -1
- package/resources/BaseEvents/FunctionBaseEvent.js +20 -0
- package/resources/BaseEvents/FunctionBaseEvent.js.map +1 -0
- package/resources/BaseEvents/FunctionContainerBaseEvent.js +187 -0
- package/resources/BaseEvents/FunctionContainerBaseEvent.js.map +1 -0
- package/resources/Function.js +225 -0
- package/resources/Function.js.map +1 -0
- package/resources/FunctionHttpdTaskEvent.js +116 -0
- package/resources/FunctionHttpdTaskEvent.js.map +1 -0
- package/resources/FunctionLambdaContainerEvent.js +201 -0
- package/resources/FunctionLambdaContainerEvent.js.map +1 -0
- package/resources/FunctionLambdaEvent.js +161 -0
- package/resources/FunctionLambdaEvent.js.map +1 -0
- package/resources/FunctionProcessTaskEvent.js +89 -0
- package/resources/FunctionProcessTaskEvent.js.map +1 -0
- package/resources/FunctionScheduledTaskEvent.js +89 -0
- package/resources/FunctionScheduledTaskEvent.js.map +1 -0
- package/resources/assets/lambda-container/Dockerfile-LambdaContainer-Java11 +8 -0
- package/resources/assets/lambda-container/Dockerfile-LambdaContainer-Java8 +8 -0
- package/resources/assets/lambda-container/Dockerfile-LambdaContainer-Java8al12 +8 -0
- package/resources/assets/lambda-container/Dockerfile-LambdaContainer-Nodejs10 +7 -0
- package/resources/assets/lambda-container/Dockerfile-LambdaContainer-Nodejs12 +7 -0
- package/resources/assets/lambda-container/Dockerfile-LambdaContainer-Nodejs14 +7 -0
- package/resources/assets/task-httpd/Dockerfile-Httpd-Nodejs10 +15 -0
- package/resources/assets/task-httpd/Dockerfile-Httpd-Nodejs13 +15 -0
- package/resources/assets/task-httpd/Dockerfile-Httpd-PHP5 +9 -0
- package/resources/assets/task-httpd/Dockerfile-Httpd-PHP7 +9 -0
- package/resources/assets/task-httpd/Index-Httpd-NodejsX +15 -0
- package/resources/assets/task-httpd/healthCheck.php +1 -0
- package/resources/assets/task-process/Dockerfile-Process-Nodejs10 +10 -0
- package/resources/assets/task-process/Dockerfile-Process-Nodejs13 +10 -0
- package/resources/assets/task-scheduled/Dockerfile-Scheduled-Nodejs10 +10 -0
- package/resources/assets/task-scheduled/Dockerfile-Scheduled-Nodejs13 +10 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const Globals_1 = require("./Globals");
|
|
13
|
+
const BPromise = require("bluebird");
|
|
14
|
+
const util = require("util");
|
|
15
|
+
const child = require("child_process");
|
|
16
|
+
const executor = util.promisify(child.exec);
|
|
17
|
+
class DepsManager {
|
|
18
|
+
constructor(plugin) {
|
|
19
|
+
this.plugin = plugin;
|
|
20
|
+
}
|
|
21
|
+
enableLogsRetention() { this.requiresLogsRetention = true; }
|
|
22
|
+
enableWebpack() { this.requiresWebpack = true; }
|
|
23
|
+
enableECSPlugin() { this.requiresECS = true; }
|
|
24
|
+
enableMvn() { this.requiresMvn = true; }
|
|
25
|
+
isLogsRetentionRequired() { return this.requiresWebpack; }
|
|
26
|
+
isWebpackRequired() { return this.requiresWebpack; }
|
|
27
|
+
isECSRequired() { return this.requiresECS; }
|
|
28
|
+
isMvnRequired() { return this.requiresMvn; }
|
|
29
|
+
loadDependecies() {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const pluginsList = this.plugin.service.plugins;
|
|
32
|
+
if (this.requiresWebpack && !this._isPluginInstalledServerless(pluginsList, Globals_1.default.Deps_Webpack)) {
|
|
33
|
+
this.plugin.logger.info('Webpack plugin is required, enabling it!');
|
|
34
|
+
yield this.plugin.serverless.pluginManager.addPlugin(require(Globals_1.default.Deps_Webpack));
|
|
35
|
+
}
|
|
36
|
+
if (this.requiresECS && !this._isPluginInstalledServerless(pluginsList, Globals_1.default.Deps_ECS)) {
|
|
37
|
+
this.plugin.logger.info('ECS plugin is required, enabling it!');
|
|
38
|
+
yield this.plugin.serverless.pluginManager.addPlugin(require(Globals_1.default.Deps_ECS));
|
|
39
|
+
}
|
|
40
|
+
if (this.requiresLogsRetention && !this._isPluginInstalledServerless(pluginsList, Globals_1.default.Deps_LambdaLogsRetention)) {
|
|
41
|
+
this.plugin.logger.info('Lambda logs retention plugin is required, enabling it!');
|
|
42
|
+
yield this.plugin.serverless.pluginManager.addPlugin(require(Globals_1.default.Deps_LambdaLogsRetention));
|
|
43
|
+
}
|
|
44
|
+
return BPromise.resolve();
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
compile() {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
return BPromise.resolve()
|
|
50
|
+
.then(() => (!this.isMvnRequired() ? BPromise.resolve() : this._compileJava()));
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
_isPluginInstalledServerless(pluginsList, dependency) {
|
|
54
|
+
if (!pluginsList || pluginsList.indexOf(dependency) == -1)
|
|
55
|
+
return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
_compileJava() {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
return new BPromise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
this.plugin.logger.info('MVN is required to compile Java code, compiling...');
|
|
62
|
+
const exec = yield this._runCommand(Globals_1.default.Mvn_Build_Command);
|
|
63
|
+
if (exec && exec.stderr && exec.stderr.toLowerCase().indexOf('error'))
|
|
64
|
+
reject(exec.stderr);
|
|
65
|
+
else {
|
|
66
|
+
resolve();
|
|
67
|
+
}
|
|
68
|
+
}));
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
_runCommand(command, params = []) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
return new BPromise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
if (!params)
|
|
75
|
+
params = [];
|
|
76
|
+
let formattedParams = params.join(' ');
|
|
77
|
+
try {
|
|
78
|
+
const resp = yield executor(command + ' ' + formattedParams, { maxBuffer: 1024 * 10000 });
|
|
79
|
+
resolve(resp);
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
this.plugin.logger.error('Error while running command', err.stdout.toString());
|
|
83
|
+
reject(err);
|
|
84
|
+
}
|
|
85
|
+
}));
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.default = DepsManager;
|
|
90
|
+
//# sourceMappingURL=DepsManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DepsManager.js","sourceRoot":"","sources":["../src/core/DepsManager.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,uCAAgC;AAEhC,qCAAsC;AACtC,6BAA8B;AAC9B,uCAAwC;AACxC,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC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AAC,MAAM,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;oBAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;qBACtF;oBAEH,OAAO,EAAE,CAAC;iBACX;YACH,CAAC,CAAA,CAAC,CAAC;QACL,CAAC;KAAA;IACa,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,EAAE;;YAC5C,OAAO,IAAI,QAAQ,CAAC,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;gBAC5C,IAAI,CAAC,MAAM;oBAAE,MAAM,GAAG,EAAE,CAAC;gBACzB,IAAI,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACvC,IAAI;oBAEF,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,OAAO,GAAG,GAAG,GAAG,eAAe,EAAE,EAAE,SAAS,EAAE,IAAI,GAAG,KAAK,EAAE,CAAC,CAAC;oBAC1F,OAAO,CAAC,IAAI,CAAC,CAAC;iBACf;gBAAC,OAAO,GAAG,EAAE;oBACZ,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,EAAE,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;oBAC/E,MAAM,CAAC,GAAG,CAAC,CAAC;iBACb;YACH,CAAC,CAAA,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AA/ED,8BA+EC"}
|
package/core/Docker.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const Dockerode = require("dockerode");
|
|
13
|
+
const BPromise = require("bluebird");
|
|
14
|
+
const tarFS = require("tar-fs");
|
|
15
|
+
class Docker {
|
|
16
|
+
constructor(plugin) {
|
|
17
|
+
this._d = this._newDocker();
|
|
18
|
+
this.plugin = plugin;
|
|
19
|
+
}
|
|
20
|
+
_newDocker() {
|
|
21
|
+
return new Dockerode({
|
|
22
|
+
socketPath: '/var/run/docker.sock'
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
buildImage(files, imageName, env) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
const chunks = [];
|
|
28
|
+
return new BPromise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
this.plugin.logger.info(`Building docker image.. (${env})`);
|
|
30
|
+
const tarData = yield this._packDocker(files);
|
|
31
|
+
yield this._d.buildImage(tarData, { t: imageName }, (err, response) => {
|
|
32
|
+
if (err)
|
|
33
|
+
reject(err);
|
|
34
|
+
else if (response) {
|
|
35
|
+
response.on('data', chunk => chunks.push(chunk));
|
|
36
|
+
response.on('error', (err) => reject(err));
|
|
37
|
+
response.on('end', () => {
|
|
38
|
+
const resp = Buffer.concat(chunks).toString('utf8');
|
|
39
|
+
if (resp.includes('Successfully built')) {
|
|
40
|
+
this.plugin.logger.info('Docker image built!');
|
|
41
|
+
resolve(resp);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
this.plugin.logger.info('Docker image build error!');
|
|
45
|
+
reject(resp);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
else
|
|
50
|
+
reject('Invalid response..');
|
|
51
|
+
});
|
|
52
|
+
}));
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
_packDocker(files) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
return new BPromise((resolve, reject) => {
|
|
58
|
+
resolve(tarFS.pack('/', {
|
|
59
|
+
entries: files.map((file) => file.dir + '/' + file.name),
|
|
60
|
+
map: (file) => {
|
|
61
|
+
for (let specFile of files) {
|
|
62
|
+
const source = specFile.dir + '/' + specFile.name;
|
|
63
|
+
if (file.name.includes(source)) {
|
|
64
|
+
file.name = file.name.replace(source, specFile.dest);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return file;
|
|
69
|
+
}
|
|
70
|
+
}));
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.default = Docker;
|
|
76
|
+
//# sourceMappingURL=Docker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Docker.js","sourceRoot":"","sources":["../src/core/Docker.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,uCAAwC;AACxC,qCAAsC;AACtC,gCAAiC;AAEjC,MAAqB,MAAM;IAIzB,YAAY,MAAkB;QAC5B,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IACO,UAAU;QAChB,OAAO,IAAI,SAAS,CAAC;YACnB,UAAU,EAAE,sBAAsB;SACnC,CAAC,CAAC;IACL,CAAC;IAEY,UAAU,CAAC,KAAkB,EAAE,SAAiB,EAAE,GAAW;;YACxE,MAAM,MAAM,GAAG,EAAE,CAAC;YAClB,OAAO,IAAI,QAAQ,CAAC,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;gBAC5C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,4BAA4B,GAAG,GAAG,CAAC,CAAC;gBAC5D,MAAM,OAAO,GAAG,MAAM,IAA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EAAE;oBACtB,OAAO,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC;oBACxD,GAAG,EAAE,CAAC,IAAS,EAAE,EAAE;wBAEjB,KAAK,IAAI,QAAQ,IAAI,KAAK,EAAE;4BAC1B,MAAM,MAAM,GAAG,QAAQ,CAAC,GAAG,GAAG,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC;4BAClD,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;gCAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;gCACrD,MAAM;6BACP;yBACF;wBAED,OAAO,IAAI,CAAC;oBACd,CAAC;iBACF,CAAC,CAAC,CAAC;YACN,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AAzDD,yBAyDC"}
|
package/core/Globals.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const options_1 = require("../options");
|
|
4
|
+
const uuid_1 = require("uuid");
|
|
5
|
+
class Globals {
|
|
6
|
+
static HTTPD_ImageByRuntime(environment) {
|
|
7
|
+
if (environment == options_1.OFunctionHttpdTaskRuntime.nodejs10) {
|
|
8
|
+
return 'task-httpd/Dockerfile-Httpd-Nodejs10';
|
|
9
|
+
}
|
|
10
|
+
else if (environment == options_1.OFunctionHttpdTaskRuntime.nodejs13) {
|
|
11
|
+
return 'task-httpd/Dockerfile-Httpd-Nodejs13';
|
|
12
|
+
}
|
|
13
|
+
else if (environment == options_1.OFunctionHttpdTaskRuntime.php5) {
|
|
14
|
+
return 'task-httpd/Dockerfile-Httpd-PHP5';
|
|
15
|
+
}
|
|
16
|
+
else if (environment == options_1.OFunctionHttpdTaskRuntime.php7) {
|
|
17
|
+
return 'task-httpd/Dockerfile-Httpd-PHP7';
|
|
18
|
+
}
|
|
19
|
+
else if (environment == options_1.OFunctionHttpdTaskRuntime.container) {
|
|
20
|
+
throw new Error(`Container environments requires dockerFile to be set!`);
|
|
21
|
+
}
|
|
22
|
+
throw new Error(`Unknown event *httpd* environment type! ${environment} is not a valid environment, can't continue!`);
|
|
23
|
+
}
|
|
24
|
+
static HTTPD_HealthCheckByRuntime(environment) {
|
|
25
|
+
return `/healthCheck/${(0, uuid_1.v4)()}`;
|
|
26
|
+
}
|
|
27
|
+
static Process_ImageByRuntime(environment) {
|
|
28
|
+
if (environment == options_1.OFunctionProcessTaskRuntime.nodejs10) {
|
|
29
|
+
return 'task-process/Dockerfile-Process-Nodejs10';
|
|
30
|
+
}
|
|
31
|
+
else if (environment == options_1.OFunctionProcessTaskRuntime.nodejs13) {
|
|
32
|
+
return 'task-process/Dockerfile-Process-Nodejs13';
|
|
33
|
+
}
|
|
34
|
+
else if (environment == options_1.OFunctionProcessTaskRuntime.container) {
|
|
35
|
+
throw new Error(`Container environments requires dockerFile to be set!`);
|
|
36
|
+
}
|
|
37
|
+
throw new Error(`Unknown event *process* environment type! ${environment} is not a valid environment, can't continue!`);
|
|
38
|
+
}
|
|
39
|
+
static Scheduled_ImageByRuntime(environment) {
|
|
40
|
+
if (environment == options_1.OFunctionScheduledTaskRuntime.nodejs10) {
|
|
41
|
+
return 'task-scheduled/Dockerfile-Scheduler-Nodejs10';
|
|
42
|
+
}
|
|
43
|
+
else if (environment == options_1.OFunctionScheduledTaskRuntime.nodejs13) {
|
|
44
|
+
return 'task-scheduled/Dockerfile-Scheduler-Nodejs13';
|
|
45
|
+
}
|
|
46
|
+
else if (environment == options_1.OFunctionScheduledTaskRuntime.container) {
|
|
47
|
+
throw new Error(`Container environments requires dockerFile to be set!`);
|
|
48
|
+
}
|
|
49
|
+
throw new Error(`Unknown event *scheduled* environment type! ${environment} is not a valid environment, can't continue!`);
|
|
50
|
+
}
|
|
51
|
+
static LambdaContainer_ImageByRuntime(environment) {
|
|
52
|
+
if (environment == options_1.OFunctionLambdaContainerRuntime.nodejs10) {
|
|
53
|
+
return 'lambda-container/Dockerfile-LambdaContainer-Nodejs10';
|
|
54
|
+
}
|
|
55
|
+
else if (environment == options_1.OFunctionLambdaContainerRuntime.nodejs12) {
|
|
56
|
+
return 'lambda-container/Dockerfile-LambdaContainer-Nodejs12';
|
|
57
|
+
}
|
|
58
|
+
else if (environment == options_1.OFunctionLambdaContainerRuntime.java11) {
|
|
59
|
+
return 'lambda-container/Dockerfile-LambdaContainer-Java11';
|
|
60
|
+
}
|
|
61
|
+
else if (environment == options_1.OFunctionLambdaContainerRuntime.java8) {
|
|
62
|
+
return 'lambda-container/Dockerfile-LambdaContainer-Java8';
|
|
63
|
+
}
|
|
64
|
+
else if (environment == options_1.OFunctionLambdaContainerRuntime.java8al12) {
|
|
65
|
+
return 'lambda-container/Dockerfile-LambdaContainer-Java8al12';
|
|
66
|
+
}
|
|
67
|
+
throw new Error(`Unknown event *process* environment type! ${environment} is not a valid environment, can't continue!`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.default = Globals;
|
|
71
|
+
Globals.PluginDefaultProvider = 'aws';
|
|
72
|
+
Globals.DockerLatestTag = 'latest';
|
|
73
|
+
Globals.DockerPreDeploymentTag = 'previous';
|
|
74
|
+
Globals.Deps_Webpack = 'serverless-webpack';
|
|
75
|
+
Globals.Deps_ECS = '@hybridless/serverless-ecs-plugin';
|
|
76
|
+
Globals.Deps_LambdaLogsRetention = 'serverless-plugin-log-retention';
|
|
77
|
+
Globals.Mvn_Build_Command = 'mvn clean install';
|
|
78
|
+
Globals.DefaultLogsMultilinePattern = '(([a-zA-Z0-9\-]* \[[a-zA-Za-]*\] )|(\[[a-zA-Za -]*\] ))';
|
|
79
|
+
Globals.DefaultHealthCheckInterval = 15;
|
|
80
|
+
Globals.DefaultHealthCheckTimeout = 10;
|
|
81
|
+
Globals.DefaultHealthCheckHealthyCount = 2;
|
|
82
|
+
Globals.DefaultHealthCheckUnhealthCount = 5;
|
|
83
|
+
Globals.DefaultLoadBalancerAdditionalTimeout = 1;
|
|
84
|
+
Globals.HTTPD_DefaultMemory = 1024;
|
|
85
|
+
Globals.HTTPD_DefaultCPU = 512;
|
|
86
|
+
Globals.HTTPD_DefaultTimeout = 30;
|
|
87
|
+
Globals.HTTPD_DefaultConcurrency = 2;
|
|
88
|
+
Globals.Process_DefaultMemory = 1024;
|
|
89
|
+
Globals.Process_DefaultCPU = 512;
|
|
90
|
+
Globals.Process_DefaultConcurrency = 1;
|
|
91
|
+
Globals.Scheduled_DefaultMemory = 1024;
|
|
92
|
+
Globals.Scheduled_DefaultCPU = 512;
|
|
93
|
+
Globals.Scheduled_DefaultConcurrency = 1;
|
|
94
|
+
Globals.LambdaContainer_DefaultMemory = 1024;
|
|
95
|
+
Globals.LambdaContainer_DefaultCPU = 512;
|
|
96
|
+
Globals.LambdaContainer_DefaultConcurrency = 1;
|
|
97
|
+
//# sourceMappingURL=Globals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Globals.js","sourceRoot":"","sources":["../src/core/Globals.ts"],"names":[],"mappings":";;AAAA,wCAAoJ;AAEpJ,+BAAoC;AAIpC,MAAqB,OAAO;IAsBnB,MAAM,CAAC,oBAAoB,CAAC,WAAsC;QACvE,IAAI,WAAW,IAAI,mCAAyB,CAAC,QAAQ,EAAE;YACrD,OAAO,sCAAsC,CAAA;SAC9C;aAAM,IAAI,WAAW,IAAI,mCAAyB,CAAC,QAAQ,EAAE;YAC5D,OAAO,sCAAsC,CAAA;SAC9C;aAAM,IAAI,WAAW,IAAI,mCAAyB,CAAC,IAAI,EAAE;YACxD,OAAO,kCAAkC,CAAA;SAC1C;aAAM,IAAI,WAAW,IAAI,mCAAyB,CAAC,IAAI,EAAE;YACxD,OAAO,kCAAkC,CAAA;SAC1C;aAAM,IAAI,WAAW,IAA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ACjC,0CAAkC,GAAG,CAAC,CAAC"}
|
package/core/Logger.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LOG_LEVELS = void 0;
|
|
4
|
+
const stackTrace = require("stack-trace");
|
|
5
|
+
const stringify = require("json-stringify-safe");
|
|
6
|
+
exports.LOG_LEVELS = { DEBUG: 0, INFO: 1, WARN: 2, ERROR: 3 };
|
|
7
|
+
var LOG_STRINGS;
|
|
8
|
+
(function (LOG_STRINGS) {
|
|
9
|
+
LOG_STRINGS[LOG_STRINGS["DEBUG"] = 0] = "DEBUG";
|
|
10
|
+
LOG_STRINGS[LOG_STRINGS["INFO"] = 1] = "INFO";
|
|
11
|
+
LOG_STRINGS[LOG_STRINGS["WARN"] = 2] = "WARN";
|
|
12
|
+
LOG_STRINGS[LOG_STRINGS["ERROR"] = 3] = "ERROR";
|
|
13
|
+
})(LOG_STRINGS || (LOG_STRINGS = {}));
|
|
14
|
+
;
|
|
15
|
+
class Logger {
|
|
16
|
+
constructor(serverless, _LOG_LEVEL) {
|
|
17
|
+
this._isOffline = function () { return process.env.IS_OFFLINE; };
|
|
18
|
+
this._toDoubleDigit = function (str) { return String("0" + str).slice(-2); };
|
|
19
|
+
if (!_LOG_LEVEL)
|
|
20
|
+
_LOG_LEVEL = exports.LOG_LEVELS.DEBUG;
|
|
21
|
+
else {
|
|
22
|
+
_LOG_LEVEL = Object.values(LOG_STRINGS).indexOf(_LOG_LEVEL);
|
|
23
|
+
if (_LOG_LEVEL == -1)
|
|
24
|
+
_LOG_LEVEL = exports.LOG_LEVELS.DEBUG;
|
|
25
|
+
}
|
|
26
|
+
this.serverless = serverless;
|
|
27
|
+
this._LOG_LEVEL = _LOG_LEVEL;
|
|
28
|
+
}
|
|
29
|
+
debug(...args) { this._processLog(exports.LOG_LEVELS.DEBUG, args); }
|
|
30
|
+
log(...args) { this._processLog(exports.LOG_LEVELS.INFO, args); }
|
|
31
|
+
info(...args) { this._processLog(exports.LOG_LEVELS.INFO, args); }
|
|
32
|
+
warning(...args) { this._processLog(exports.LOG_LEVELS.WARN, args); }
|
|
33
|
+
warn(...args) { this._processLog(exports.LOG_LEVELS.WARN, args); }
|
|
34
|
+
error(...args) { this._processLog(exports.LOG_LEVELS.ERROR, args); }
|
|
35
|
+
exception(exception) {
|
|
36
|
+
let msg = [];
|
|
37
|
+
msg.push(exception + " -");
|
|
38
|
+
for (let arg of arguments)
|
|
39
|
+
if (arg != exception)
|
|
40
|
+
msg.push(arg);
|
|
41
|
+
msg.push(exception.stack);
|
|
42
|
+
this._pushLog(exports.LOG_LEVELS.ERROR, this._formattedLog(exports.LOG_LEVELS.ERROR, msg, this._callerName(3)));
|
|
43
|
+
}
|
|
44
|
+
_timestamp() {
|
|
45
|
+
let d = new Date();
|
|
46
|
+
return [this._toDoubleDigit(d.getMonth() + 1), this._toDoubleDigit(d.getDate()), d.getFullYear()].join('/') + ' ' +
|
|
47
|
+
[this._toDoubleDigit(d.getHours()), this._toDoubleDigit(d.getMinutes()), this._toDoubleDigit(d.getSeconds())].join(':');
|
|
48
|
+
}
|
|
49
|
+
_formattedLog(level, msg, caller) {
|
|
50
|
+
if (this._isOffline()) {
|
|
51
|
+
return ` [${this._timestamp()} - ${LOG_STRINGS[level]}] [${caller}] ${msg.join(" ")}`;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return ` [${LOG_STRINGS[level]}] ${msg.join(" ")}`;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
_callerName(index) {
|
|
58
|
+
let safeIndex = Math.min(index, stackTrace.get().length);
|
|
59
|
+
if (stackTrace.get()[safeIndex]) {
|
|
60
|
+
let callerName = (stackTrace.get()[safeIndex] ? stackTrace.get()[safeIndex].getTypeName() : null);
|
|
61
|
+
if (!callerName) {
|
|
62
|
+
callerName = stackTrace.get()[safeIndex].getFileName().split("/");
|
|
63
|
+
callerName = callerName.slice(callerName.indexOf("src")).join("/");
|
|
64
|
+
}
|
|
65
|
+
return callerName + ":" + stackTrace.get()[safeIndex].getLineNumber();
|
|
66
|
+
}
|
|
67
|
+
return '';
|
|
68
|
+
}
|
|
69
|
+
_processLog(level, args) {
|
|
70
|
+
if (level < this._LOG_LEVEL)
|
|
71
|
+
return;
|
|
72
|
+
let msg = [];
|
|
73
|
+
for (let arg of args)
|
|
74
|
+
msg.push(((typeof arg === 'object' && !(arg instanceof Error)) ? stringify(arg, null, 2) : arg));
|
|
75
|
+
this._pushLog(level, this._formattedLog(level, msg, this._callerName(3)));
|
|
76
|
+
}
|
|
77
|
+
_pushLog(level, fMsg) {
|
|
78
|
+
this.serverless.serverless.cli.log(fMsg, 'hybridless');
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.default = Logger;
|
|
82
|
+
//# sourceMappingURL=Logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../src/core/Logger.ts"],"names":[],"mappings":";;;AAAA,0CAA2C;AAC3C,iDAAkD;AAErC,QAAA,UAAU,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AACnE,IAAK,WAAgD;AAArD,WAAK,WAAW;IAAG,+CAAO,CAAA;IAAE,6CAAM,CAAA;IAAE,6CAAM,CAAA;IAAE,+CAAO,CAAA;AAAC,CAAC,EAAhD,WAAW,KAAX,WAAW,QAAqC;AAAA,CAAC;AAEtD,MAAqB,MAAM;IAIzB,YAAY,UAAe,EAAE,UAAe;QAiC5C,eAAU,GAAG,cAAc,OAAO,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;QAC3D,mBAAc,GAAG,UAAU,GAAG,IAAI,OAAO,MAAM,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,C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