@dotcom-tool-kit/serverless 2.2.10 → 2.2.11

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;CA2C3B"}
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;AAK/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;CAiD3B"}
@@ -4,6 +4,7 @@ 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
6
  const doppler_1 = require("@dotcom-tool-kit/doppler");
7
+ const options_1 = require("@dotcom-tool-kit/options");
7
8
  const child_process_1 = require("child_process");
8
9
  class ServerlessDeploy extends types_1.Task {
9
10
  async run() {
@@ -13,7 +14,13 @@ class ServerlessDeploy extends types_1.Task {
13
14
  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
15
  }
15
16
  let vaultEnv = {};
16
- if (useVault) {
17
+ // HACK:20231124:IM We need to call Vault to check whether a project has
18
+ // migrated to Doppler yet, and sync Vault secrets if it hasn't, but this
19
+ // logic should be removed entirely once we drop support for Vault. We can
20
+ // skip this call if we find the project has already added options for
21
+ // doppler in the Tool Kit configuration.
22
+ const migratedToolKitToDoppler = Boolean((0, options_1.getOptions)('@dotcom-tool-kit/doppler')?.project);
23
+ if (useVault && !migratedToolKitToDoppler) {
17
24
  const dopplerCi = new doppler_1.DopplerEnvVars(this.logger, 'ci');
18
25
  const vaultCi = await dopplerCi.fallbackToVault();
19
26
  // HACK:20231023:IM don't read secrets when the project has already
@@ -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;CAiD3B"}
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;AAK/E,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,IAAI,CAAC,OAAO,gBAAgB,CAAC;IAC5E,MAAM,CAAC,WAAW,SAA4B;IAExC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAuD3B"}
@@ -5,6 +5,7 @@ const logger_1 = require("@dotcom-tool-kit/logger");
5
5
  const types_1 = require("@dotcom-tool-kit/types");
6
6
  const doppler_1 = require("@dotcom-tool-kit/doppler");
7
7
  const child_process_1 = require("child_process");
8
+ const options_1 = require("@dotcom-tool-kit/options");
8
9
  class ServerlessProvision extends types_1.Task {
9
10
  async run() {
10
11
  const { useVault, configPath, buildNumVariable, systemCode, regions } = this.options;
@@ -13,7 +14,13 @@ class ServerlessProvision extends types_1.Task {
13
14
  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
15
  }
15
16
  let vaultEnv = {};
16
- if (useVault) {
17
+ // HACK:20231124:IM We need to call Vault to check whether a project has
18
+ // migrated to Doppler yet, and sync Vault secrets if it hasn't, but this
19
+ // logic should be removed entirely once we drop support for Vault. We can
20
+ // skip this call if we find the project has already added options for
21
+ // doppler in the Tool Kit configuration.
22
+ const migratedToolKitToDoppler = Boolean((0, options_1.getOptions)('@dotcom-tool-kit/doppler')?.project);
23
+ if (useVault && !migratedToolKitToDoppler) {
17
24
  const dopplerCi = new doppler_1.DopplerEnvVars(this.logger, 'ci');
18
25
  const vaultCi = await dopplerCi.fallbackToVault();
19
26
  // HACK:20231023:IM don't read secrets when the project has already
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcom-tool-kit/serverless",
3
- "version": "2.2.10",
3
+ "version": "2.2.11",
4
4
  "description": "a plugin to manage and deploy apps using AWS Serverless",
5
5
  "main": "lib",
6
6
  "scripts": {
@@ -25,10 +25,11 @@
25
25
  "serverless-offline": "^12.0.4"
26
26
  },
27
27
  "dependencies": {
28
+ "@dotcom-tool-kit/doppler": "^1.0.7",
28
29
  "@dotcom-tool-kit/error": "^3.1.0",
30
+ "@dotcom-tool-kit/options": "^3.1.5",
29
31
  "@dotcom-tool-kit/state": "^3.1.1",
30
32
  "@dotcom-tool-kit/types": "^3.4.1",
31
- "@dotcom-tool-kit/doppler": "^1.0.7",
32
33
  "get-port": "^5.1.1",
33
34
  "tslib": "^2.3.1",
34
35
  "wait-port": "^0.2.9"