serverless-vpc-discovery 4.0.1 → 4.0.2
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/CHANGELOG.md +6 -1
- package/dist/src/globals.js +21 -24
- package/dist/src/index.js +4 -1
- package/package-lock.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -4,9 +4,14 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [4.0.2] - 2022-04-11
|
8
|
+
### Changed
|
9
|
+
- Add integration with serverless 3 logging
|
10
|
+
- Change Github workflows to run tests both with sls 2 and 3
|
11
|
+
|
7
12
|
## [4.0.1] - 2022-04-08
|
8
13
|
### Changed
|
9
|
-
- Fixed audit issues. Added dependabot config
|
14
|
+
- Fixed audit issues. Added dependabot config
|
10
15
|
|
11
16
|
## [4.0.0] - 2022-04-08
|
12
17
|
### Changed
|
package/dist/src/globals.js
CHANGED
@@ -5,39 +5,36 @@ class Globals {
|
|
5
5
|
Globals.serverless.cli.log(`${prefix} ${message}`, Globals.pluginName);
|
6
6
|
}
|
7
7
|
/**
|
8
|
-
* Logs
|
9
|
-
* @param message: message to be printed
|
10
|
-
* @param debug: if true then show log only if SLS_DEBUG enabled on else anytime.
|
11
|
-
* By default debug mode off and a message printed for each call.
|
8
|
+
* Logs error message
|
12
9
|
*/
|
13
|
-
static
|
14
|
-
|
15
|
-
|
16
|
-
|
10
|
+
static logError(message) {
|
11
|
+
if (Globals.v3Utils) {
|
12
|
+
Globals.v3Utils.log.error(message);
|
13
|
+
}
|
14
|
+
else {
|
15
|
+
Globals.cliLog("[Error]", message);
|
17
16
|
}
|
18
17
|
}
|
19
18
|
/**
|
20
|
-
* Logs
|
21
|
-
* @param message: message to be printed
|
22
|
-
* @param debug: if true then show log only if SLS_DEBUG enabled on else anytime.
|
23
|
-
* By default debug mode off and a message printed for each call.
|
19
|
+
* Logs info message
|
24
20
|
*/
|
25
|
-
static
|
26
|
-
|
27
|
-
|
28
|
-
|
21
|
+
static logInfo(message) {
|
22
|
+
if (Globals.v3Utils) {
|
23
|
+
Globals.v3Utils.log.verbose(message);
|
24
|
+
}
|
25
|
+
else {
|
26
|
+
Globals.cliLog("[Info]", message);
|
29
27
|
}
|
30
28
|
}
|
31
29
|
/**
|
32
|
-
* Logs
|
33
|
-
* @param message: message to be printed
|
34
|
-
* @param debug: if true then show log only if SLS_DEBUG enabled on else anytime.
|
35
|
-
* By default debug mode off and a message printed for each call.
|
30
|
+
* Logs warning message
|
36
31
|
*/
|
37
|
-
static
|
38
|
-
|
39
|
-
|
40
|
-
|
32
|
+
static logWarning(message) {
|
33
|
+
if (Globals.v3Utils) {
|
34
|
+
Globals.v3Utils.log.warning(message);
|
35
|
+
}
|
36
|
+
else {
|
37
|
+
Globals.cliLog("[WARNING]", message);
|
41
38
|
}
|
42
39
|
}
|
43
40
|
}
|
package/dist/src/index.js
CHANGED
@@ -16,9 +16,12 @@ const globals_1 = __importDefault(require("./globals"));
|
|
16
16
|
const validation_1 = require("./validation");
|
17
17
|
const schema_1 = require("./schema");
|
18
18
|
class VPCPlugin {
|
19
|
-
constructor(serverless) {
|
19
|
+
constructor(serverless, options, v3Utils) {
|
20
20
|
this.serverless = serverless;
|
21
21
|
globals_1.default.serverless = serverless;
|
22
|
+
if (v3Utils) {
|
23
|
+
globals_1.default.v3Utils = v3Utils;
|
24
|
+
}
|
22
25
|
/* hooks are the actual code that will run when called */
|
23
26
|
this.hooks = {
|
24
27
|
"before:package:initialize": this.hookWrapper.bind(this, this.updateFunctionsVpcConfig)
|
package/package-lock.json
CHANGED