@dotcom-tool-kit/serverless 2.1.3 → 2.2.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/tasks/deploy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAA;AAI/E,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,IAAI,CAAC,OAAO,gBAAgB,CAAC;IACzE,MAAM,CAAC,WAAW,SAAmB;IAE/B,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/tasks/deploy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAA;AAI/E,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,IAAI,CAAC,OAAO,gBAAgB,CAAC;IACzE,MAAM,CAAC,WAAW,SAAmB;IAE/B,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAoC3B"}
|
package/lib/tasks/deploy.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const error_1 = require("@dotcom-tool-kit/error");
|
|
4
4
|
const logger_1 = require("@dotcom-tool-kit/logger");
|
|
5
5
|
const types_1 = require("@dotcom-tool-kit/types");
|
|
6
|
-
const
|
|
6
|
+
const doppler_1 = require("@dotcom-tool-kit/doppler");
|
|
7
7
|
const child_process_1 = require("child_process");
|
|
8
8
|
class ServerlessDeploy extends types_1.Task {
|
|
9
9
|
async run() {
|
|
@@ -12,12 +12,10 @@ class ServerlessDeploy extends types_1.Task {
|
|
|
12
12
|
if (buildNum === undefined) {
|
|
13
13
|
throw new error_1.ToolKitError(`the ${logger_1.styles.task('ServerlessDeploy')} task requires the ${logger_1.styles.code(`$${buildNumVariable}`)} environment variable to be defined`);
|
|
14
14
|
}
|
|
15
|
-
let
|
|
15
|
+
let dopplerEnv = {};
|
|
16
16
|
if (useVault) {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
});
|
|
20
|
-
vaultEnv = await vault.get();
|
|
17
|
+
const doppler = new doppler_1.DopplerEnvVars(this.logger, 'prd');
|
|
18
|
+
dopplerEnv = await doppler.get();
|
|
21
19
|
}
|
|
22
20
|
regions.forEach((region) => {
|
|
23
21
|
this.logger.verbose('starting the child serverless process...');
|
|
@@ -27,8 +25,8 @@ class ServerlessDeploy extends types_1.Task {
|
|
|
27
25
|
}
|
|
28
26
|
const child = (0, child_process_1.spawn)('serverless', args, {
|
|
29
27
|
env: {
|
|
30
|
-
...
|
|
31
|
-
...
|
|
28
|
+
...process.env,
|
|
29
|
+
...dopplerEnv
|
|
32
30
|
}
|
|
33
31
|
});
|
|
34
32
|
(0, logger_1.hookFork)(this.logger, 'serverless', child);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provision.d.ts","sourceRoot":"","sources":["../../src/tasks/provision.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAA;AAI/E,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,IAAI,CAAC,OAAO,gBAAgB,CAAC;IAC5E,MAAM,CAAC,WAAW,SAA4B;IAExC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"provision.d.ts","sourceRoot":"","sources":["../../src/tasks/provision.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAA;AAI/E,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,IAAI,CAAC,OAAO,gBAAgB,CAAC;IAC5E,MAAM,CAAC,WAAW,SAA4B;IAExC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA0C3B"}
|
package/lib/tasks/provision.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const error_1 = require("@dotcom-tool-kit/error");
|
|
4
4
|
const logger_1 = require("@dotcom-tool-kit/logger");
|
|
5
5
|
const types_1 = require("@dotcom-tool-kit/types");
|
|
6
|
-
const
|
|
6
|
+
const doppler_1 = require("@dotcom-tool-kit/doppler");
|
|
7
7
|
const child_process_1 = require("child_process");
|
|
8
8
|
class ServerlessProvision extends types_1.Task {
|
|
9
9
|
async run() {
|
|
@@ -12,12 +12,10 @@ class ServerlessProvision extends types_1.Task {
|
|
|
12
12
|
if (buildNum === undefined) {
|
|
13
13
|
throw new error_1.ToolKitError(`the ${logger_1.styles.task('ServerlessProvision')} task requires the ${logger_1.styles.code(`$${buildNumVariable}`)} environment variable to be defined`);
|
|
14
14
|
}
|
|
15
|
-
let
|
|
15
|
+
let dopplerEnv = {};
|
|
16
16
|
if (useVault) {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
});
|
|
20
|
-
vaultEnv = await vault.get();
|
|
17
|
+
const doppler = new doppler_1.DopplerEnvVars(this.logger, 'dev');
|
|
18
|
+
dopplerEnv = await doppler.get();
|
|
21
19
|
}
|
|
22
20
|
this.logger.verbose('starting the child serverless process...');
|
|
23
21
|
const args = [
|
|
@@ -34,8 +32,8 @@ class ServerlessProvision extends types_1.Task {
|
|
|
34
32
|
}
|
|
35
33
|
const child = (0, child_process_1.spawn)('serverless', args, {
|
|
36
34
|
env: {
|
|
37
|
-
...
|
|
38
|
-
...
|
|
35
|
+
...process.env,
|
|
36
|
+
...dopplerEnv
|
|
39
37
|
}
|
|
40
38
|
});
|
|
41
39
|
(0, logger_1.hookFork)(this.logger, 'serverless', child);
|
package/lib/tasks/run.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/tasks/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAA;AAO/E,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,IAAI,CAAC,OAAO,gBAAgB,CAAC;IACtE,MAAM,CAAC,WAAW,SAAqC;IAEjD,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/tasks/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAA;AAO/E,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,IAAI,CAAC,OAAO,gBAAgB,CAAC;IACtE,MAAM,CAAC,WAAW,SAAqC;IAEjD,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CA2C3B"}
|
package/lib/tasks/run.js
CHANGED
|
@@ -3,19 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const types_1 = require("@dotcom-tool-kit/types");
|
|
5
5
|
const child_process_1 = require("child_process");
|
|
6
|
-
const
|
|
6
|
+
const doppler_1 = require("@dotcom-tool-kit/doppler");
|
|
7
7
|
const logger_1 = require("@dotcom-tool-kit/logger");
|
|
8
8
|
const get_port_1 = tslib_1.__importDefault(require("get-port"));
|
|
9
9
|
const wait_port_1 = tslib_1.__importDefault(require("wait-port"));
|
|
10
10
|
class ServerlessRun extends types_1.Task {
|
|
11
11
|
async run() {
|
|
12
12
|
const { useVault, ports, configPath } = this.options;
|
|
13
|
-
let
|
|
13
|
+
let dopplerEnv = {};
|
|
14
14
|
if (useVault) {
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
vaultEnv = await vault.get();
|
|
15
|
+
const doppler = new doppler_1.DopplerEnvVars(this.logger, 'dev');
|
|
16
|
+
dopplerEnv = await doppler.get();
|
|
19
17
|
}
|
|
20
18
|
const port = Number(process.env.PORT) ||
|
|
21
19
|
(await (0, get_port_1.default)({
|
|
@@ -28,7 +26,7 @@ class ServerlessRun extends types_1.Task {
|
|
|
28
26
|
}
|
|
29
27
|
const child = (0, child_process_1.spawn)('serverless', args, {
|
|
30
28
|
env: {
|
|
31
|
-
...
|
|
29
|
+
...dopplerEnv,
|
|
32
30
|
PORT: port.toString(),
|
|
33
31
|
...process.env
|
|
34
32
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotcom-tool-kit/serverless",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "a plugin to manage and deploy apps using AWS Serverless",
|
|
5
5
|
"main": "lib",
|
|
6
6
|
"scripts": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@dotcom-tool-kit/error": "^3.1.0",
|
|
29
29
|
"@dotcom-tool-kit/state": "^3.1.0",
|
|
30
|
-
"@dotcom-tool-kit/types": "^3.
|
|
31
|
-
"@dotcom-tool-kit/
|
|
30
|
+
"@dotcom-tool-kit/types": "^3.4.0",
|
|
31
|
+
"@dotcom-tool-kit/doppler": "^1.0.0",
|
|
32
32
|
"get-port": "^5.1.1",
|
|
33
33
|
"tslib": "^2.3.1",
|
|
34
34
|
"wait-port": "^0.2.9"
|