@datadog/datadog-ci 2.18.1 → 2.19.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/dist/cli.d.ts +3 -1
- package/dist/cli.js +9 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/cloud-run/flare.d.ts +38 -7
- package/dist/commands/cloud-run/flare.js +304 -39
- package/dist/commands/cloud-run/flare.js.map +1 -1
- package/dist/commands/cloud-run/renderer.js +5 -1
- package/dist/commands/cloud-run/renderer.js.map +1 -1
- package/dist/commands/dsyms/renderer.js +6 -6
- package/dist/commands/dsyms/renderer.js.map +1 -1
- package/dist/commands/dsyms/upload.d.ts +5 -5
- package/dist/commands/dsyms/upload.js +66 -42
- package/dist/commands/dsyms/upload.js.map +1 -1
- package/dist/commands/dsyms/utils.d.ts +1 -1
- package/dist/commands/dsyms/utils.js +3 -3
- package/dist/commands/dsyms/utils.js.map +1 -1
- package/dist/commands/flutter-symbols/helpers.js +8 -4
- package/dist/commands/flutter-symbols/helpers.js.map +1 -1
- package/dist/commands/flutter-symbols/renderer.js +2 -2
- package/dist/commands/flutter-symbols/renderer.js.map +1 -1
- package/dist/commands/flutter-symbols/upload.d.ts +13 -13
- package/dist/commands/flutter-symbols/upload.js +66 -66
- package/dist/commands/flutter-symbols/upload.js.map +1 -1
- package/dist/commands/gate/api.js +4 -2
- package/dist/commands/gate/api.js.map +1 -1
- package/dist/commands/gate/evaluate.d.ts +18 -6
- package/dist/commands/gate/evaluate.js +116 -40
- package/dist/commands/gate/evaluate.js.map +1 -1
- package/dist/commands/gate/interfaces.d.ts +5 -0
- package/dist/commands/gate/renderer.js +16 -14
- package/dist/commands/gate/renderer.js.map +1 -1
- package/dist/commands/gate/utils.d.ts +1 -0
- package/dist/commands/gate/utils.js +8 -4
- package/dist/commands/gate/utils.js.map +1 -1
- package/dist/commands/git-metadata/git.d.ts +1 -1
- package/dist/commands/git-metadata/git.js +7 -3
- package/dist/commands/git-metadata/git.js.map +1 -1
- package/dist/commands/git-metadata/gitdb.d.ts +1 -1
- package/dist/commands/git-metadata/gitdb.js +7 -7
- package/dist/commands/git-metadata/gitdb.js.map +1 -1
- package/dist/commands/git-metadata/index.js +5 -1
- package/dist/commands/git-metadata/index.js.map +1 -1
- package/dist/commands/git-metadata/library.d.ts +1 -1
- package/dist/commands/git-metadata/library.js +13 -13
- package/dist/commands/git-metadata/library.js.map +1 -1
- package/dist/commands/git-metadata/upload.d.ts +5 -5
- package/dist/commands/git-metadata/upload.js +30 -32
- package/dist/commands/git-metadata/upload.js.map +1 -1
- package/dist/commands/junit/api.js +4 -4
- package/dist/commands/junit/api.js.map +1 -1
- package/dist/commands/junit/id.js +1 -1
- package/dist/commands/junit/id.js.map +1 -1
- package/dist/commands/junit/renderer.d.ts +1 -1
- package/dist/commands/junit/renderer.js +3 -3
- package/dist/commands/junit/renderer.js.map +1 -1
- package/dist/commands/junit/upload.d.ts +12 -11
- package/dist/commands/junit/upload.js +74 -63
- package/dist/commands/junit/upload.js.map +1 -1
- package/dist/commands/junit/utils.d.ts +1 -2
- package/dist/commands/junit/utils.js +5 -10
- package/dist/commands/junit/utils.js.map +1 -1
- package/dist/commands/lambda/constants.d.ts +3 -3
- package/dist/commands/lambda/constants.js +4 -49
- package/dist/commands/lambda/constants.js.map +1 -1
- package/dist/commands/lambda/flare.d.ts +16 -30
- package/dist/commands/lambda/flare.js +90 -146
- package/dist/commands/lambda/flare.js.map +1 -1
- package/dist/commands/lambda/functions/commons.d.ts +3 -3
- package/dist/commands/lambda/functions/commons.js +19 -14
- package/dist/commands/lambda/functions/commons.js.map +1 -1
- package/dist/commands/lambda/functions/instrument.js +28 -28
- package/dist/commands/lambda/functions/instrument.js.map +1 -1
- package/dist/commands/lambda/functions/uninstrument.js +9 -9
- package/dist/commands/lambda/functions/uninstrument.js.map +1 -1
- package/dist/commands/lambda/functions/versionChecker.d.ts +2 -2
- package/dist/commands/lambda/instrument.d.ts +22 -20
- package/dist/commands/lambda/instrument.js +66 -60
- package/dist/commands/lambda/instrument.js.map +1 -1
- package/dist/commands/lambda/loggroup.js +8 -8
- package/dist/commands/lambda/loggroup.js.map +1 -1
- package/dist/commands/lambda/prompt.d.ts +1 -2
- package/dist/commands/lambda/prompt.js +20 -38
- package/dist/commands/lambda/prompt.js.map +1 -1
- package/dist/commands/lambda/renderers/__mocks__/instrument-uninstrument-renderer.d.ts +2 -0
- package/dist/commands/lambda/renderers/__mocks__/instrument-uninstrument-renderer.js +11 -0
- package/dist/commands/lambda/renderers/__mocks__/instrument-uninstrument-renderer.js.map +1 -0
- package/dist/commands/lambda/renderers/common-renderer.js +2 -2
- package/dist/commands/lambda/renderers/common-renderer.js.map +1 -1
- package/dist/commands/lambda/renderers/instrument-uninstrument-renderer.d.ts +2 -2
- package/dist/commands/lambda/renderers/instrument-uninstrument-renderer.js +50 -42
- package/dist/commands/lambda/renderers/instrument-uninstrument-renderer.js.map +1 -1
- package/dist/commands/lambda/tags.js +7 -7
- package/dist/commands/lambda/tags.js.map +1 -1
- package/dist/commands/lambda/uninstrument.d.ts +25 -7
- package/dist/commands/lambda/uninstrument.js +53 -45
- package/dist/commands/lambda/uninstrument.js.map +1 -1
- package/dist/commands/metric/metric.d.ts +4 -3
- package/dist/commands/metric/metric.js +10 -9
- package/dist/commands/metric/metric.js.map +1 -1
- package/dist/commands/react-native/codepush.d.ts +11 -10
- package/dist/commands/react-native/codepush.js +17 -19
- package/dist/commands/react-native/codepush.js.map +1 -1
- package/dist/commands/react-native/interfaces.d.ts +1 -1
- package/dist/commands/react-native/renderer.js +6 -6
- package/dist/commands/react-native/renderer.js.map +1 -1
- package/dist/commands/react-native/upload.d.ts +12 -12
- package/dist/commands/react-native/upload.js +67 -45
- package/dist/commands/react-native/upload.js.map +1 -1
- package/dist/commands/react-native/utils.js +2 -1
- package/dist/commands/react-native/utils.js.map +1 -1
- package/dist/commands/react-native/validation.js +1 -1
- package/dist/commands/react-native/validation.js.map +1 -1
- package/dist/commands/react-native/xcode.d.ts +6 -6
- package/dist/commands/react-native/xcode.js +25 -29
- package/dist/commands/react-native/xcode.js.map +1 -1
- package/dist/commands/sarif/api.js +5 -5
- package/dist/commands/sarif/api.js.map +1 -1
- package/dist/commands/sarif/renderer.d.ts +1 -1
- package/dist/commands/sarif/renderer.js +1 -1
- package/dist/commands/sarif/renderer.js.map +1 -1
- package/dist/commands/sarif/upload.d.ts +6 -6
- package/dist/commands/sarif/upload.js +46 -37
- package/dist/commands/sarif/upload.js.map +1 -1
- package/dist/commands/sbom/api.d.ts +7 -0
- package/dist/commands/sbom/api.js +49 -0
- package/dist/commands/sbom/api.js.map +1 -0
- package/dist/commands/sbom/cli.d.ts +1 -0
- package/dist/commands/sbom/cli.js +5 -0
- package/dist/commands/sbom/cli.js.map +1 -0
- package/dist/commands/sbom/constants.d.ts +2 -0
- package/dist/commands/sbom/constants.js +6 -0
- package/dist/commands/sbom/constants.js.map +1 -0
- package/dist/commands/sbom/json-schema/cyclonedx/bom-1.4.schema.json +1687 -0
- package/dist/commands/sbom/json-schema/jsf/jsf-0.82.schema.json +244 -0
- package/dist/commands/sbom/json-schema/spdx/spdx.schema.json +507 -0
- package/dist/commands/sbom/protobuf/bom-1.4.d.ts +11788 -0
- package/dist/commands/sbom/protobuf/bom-1.4.js +5161 -0
- package/dist/commands/sbom/protobuf/bom-1.4.js.map +1 -0
- package/dist/commands/sbom/protobuf/custom_message.d.ts +11 -0
- package/dist/commands/sbom/protobuf/custom_message.js +3 -0
- package/dist/commands/sbom/protobuf/custom_message.js.map +1 -0
- package/dist/commands/sbom/protobuf/google/protobuf/duration.d.ts +110 -0
- package/dist/commands/sbom/protobuf/google/protobuf/duration.js +126 -0
- package/dist/commands/sbom/protobuf/google/protobuf/duration.js.map +1 -0
- package/dist/commands/sbom/protobuf/google/protobuf/timestamp.d.ts +139 -0
- package/dist/commands/sbom/protobuf/google/protobuf/timestamp.js +126 -0
- package/dist/commands/sbom/protobuf/google/protobuf/timestamp.js.map +1 -0
- package/dist/commands/sbom/protobuf/sbom_intake.d.ts +53 -0
- package/dist/commands/sbom/protobuf/sbom_intake.js +383 -0
- package/dist/commands/sbom/protobuf/sbom_intake.js.map +1 -0
- package/dist/commands/sbom/types.d.ts +4 -0
- package/dist/commands/sbom/types.js +3 -0
- package/dist/commands/sbom/types.js.map +1 -0
- package/dist/commands/sbom/upload.d.ts +16 -0
- package/dist/commands/sbom/upload.js +134 -0
- package/dist/commands/sbom/upload.js.map +1 -0
- package/dist/commands/sbom/validation.d.ts +12 -0
- package/dist/commands/sbom/validation.js +51 -0
- package/dist/commands/sbom/validation.js.map +1 -0
- package/dist/commands/sourcemaps/renderer.js +6 -6
- package/dist/commands/sourcemaps/renderer.js.map +1 -1
- package/dist/commands/sourcemaps/upload.d.ts +10 -10
- package/dist/commands/sourcemaps/upload.js +61 -38
- package/dist/commands/sourcemaps/upload.js.map +1 -1
- package/dist/commands/sourcemaps/validation.js +4 -4
- package/dist/commands/sourcemaps/validation.js.map +1 -1
- package/dist/commands/stepfunctions/awsCommands.js +10 -10
- package/dist/commands/stepfunctions/awsCommands.js.map +1 -1
- package/dist/commands/stepfunctions/helpers.d.ts +4 -4
- package/dist/commands/stepfunctions/helpers.js +4 -4
- package/dist/commands/stepfunctions/helpers.js.map +1 -1
- package/dist/commands/stepfunctions/instrument.d.ts +5 -4
- package/dist/commands/stepfunctions/instrument.js +30 -31
- package/dist/commands/stepfunctions/instrument.js.map +1 -1
- package/dist/commands/stepfunctions/uninstrument.d.ts +6 -1
- package/dist/commands/stepfunctions/uninstrument.js +23 -23
- package/dist/commands/stepfunctions/uninstrument.js.map +1 -1
- package/dist/commands/synthetics/api.d.ts +1 -1
- package/dist/commands/synthetics/api.js +11 -11
- package/dist/commands/synthetics/api.js.map +1 -1
- package/dist/commands/synthetics/errors.d.ts +3 -3
- package/dist/commands/synthetics/index.js +5 -1
- package/dist/commands/synthetics/index.js.map +1 -1
- package/dist/commands/synthetics/interfaces.d.ts +6 -6
- package/dist/commands/synthetics/interfaces.js +2 -2
- package/dist/commands/synthetics/interfaces.js.map +1 -1
- package/dist/commands/synthetics/mobile.d.ts +1 -1
- package/dist/commands/synthetics/mobile.js +26 -20
- package/dist/commands/synthetics/mobile.js.map +1 -1
- package/dist/commands/synthetics/reporters/default.d.ts +2 -2
- package/dist/commands/synthetics/reporters/default.js +14 -14
- package/dist/commands/synthetics/reporters/default.js.map +1 -1
- package/dist/commands/synthetics/reporters/junit.d.ts +2 -2
- package/dist/commands/synthetics/reporters/junit.js +11 -11
- package/dist/commands/synthetics/reporters/junit.js.map +1 -1
- package/dist/commands/synthetics/run-tests-command.d.ts +21 -19
- package/dist/commands/synthetics/run-tests-command.js +108 -42
- package/dist/commands/synthetics/run-tests-command.js.map +1 -1
- package/dist/commands/synthetics/run-tests-lib.d.ts +1 -1
- package/dist/commands/synthetics/run-tests-lib.js +16 -16
- package/dist/commands/synthetics/run-tests-lib.js.map +1 -1
- package/dist/commands/synthetics/tunnel/crypto.js +3 -3
- package/dist/commands/synthetics/tunnel/crypto.js.map +1 -1
- package/dist/commands/synthetics/tunnel/tunnel.js +11 -11
- package/dist/commands/synthetics/tunnel/tunnel.js.map +1 -1
- package/dist/commands/synthetics/tunnel/websocket.d.ts +1 -0
- package/dist/commands/synthetics/tunnel/websocket.js +7 -3
- package/dist/commands/synthetics/tunnel/websocket.js.map +1 -1
- package/dist/commands/synthetics/upload-application-command.d.ts +10 -8
- package/dist/commands/synthetics/upload-application-command.js +36 -13
- package/dist/commands/synthetics/upload-application-command.js.map +1 -1
- package/dist/commands/synthetics/utils.d.ts +12 -12
- package/dist/commands/synthetics/utils.js +51 -47
- package/dist/commands/synthetics/utils.js.map +1 -1
- package/dist/commands/tag/tag.d.ts +4 -3
- package/dist/commands/tag/tag.js +10 -9
- package/dist/commands/tag/tag.js.map +1 -1
- package/dist/commands/trace/api.js +4 -4
- package/dist/commands/trace/api.js.map +1 -1
- package/dist/commands/trace/interfaces.d.ts +1 -1
- package/dist/commands/trace/trace.d.ts +5 -4
- package/dist/commands/trace/trace.js +11 -10
- package/dist/commands/trace/trace.js.map +1 -1
- package/dist/commands/version/cli.js +6 -5
- package/dist/commands/version/cli.js.map +1 -1
- package/dist/constants.d.ts +7 -0
- package/dist/constants.js +52 -1
- package/dist/constants.js.map +1 -1
- package/dist/helpers/api.d.ts +5 -0
- package/dist/helpers/api.js +16 -0
- package/dist/helpers/api.js.map +1 -0
- package/dist/helpers/base-intake-url.d.ts +1 -1
- package/dist/helpers/ci.d.ts +13 -13
- package/dist/helpers/ci.js +17 -17
- package/dist/helpers/ci.js.map +1 -1
- package/dist/helpers/config.d.ts +5 -0
- package/dist/helpers/config.js +3 -0
- package/dist/helpers/config.js.map +1 -0
- package/dist/helpers/flare.d.ts +22 -0
- package/dist/helpers/flare.js +118 -8
- package/dist/helpers/flare.js.map +1 -1
- package/dist/helpers/git/format-git-sourcemaps-data.js +7 -3
- package/dist/helpers/git/format-git-sourcemaps-data.js.map +1 -1
- package/dist/helpers/git/format-git-span-data.js +6 -6
- package/dist/helpers/git/format-git-span-data.js.map +1 -1
- package/dist/helpers/git/get-git-data.js +3 -3
- package/dist/helpers/git/get-git-data.js.map +1 -1
- package/dist/helpers/interfaces.d.ts +9 -3
- package/dist/helpers/logger.js +1 -1
- package/dist/helpers/logger.js.map +1 -1
- package/dist/helpers/plist.d.ts +1 -1
- package/dist/helpers/plist.js +1 -1
- package/dist/helpers/plist.js.map +1 -1
- package/dist/helpers/prompt.d.ts +1 -0
- package/dist/helpers/prompt.js +20 -2
- package/dist/helpers/prompt.js.map +1 -1
- package/dist/helpers/renderer.d.ts +24 -0
- package/dist/helpers/renderer.js +60 -9
- package/dist/helpers/renderer.js.map +1 -1
- package/dist/helpers/retry.d.ts +1 -1
- package/dist/helpers/retry.js +3 -3
- package/dist/helpers/retry.js.map +1 -1
- package/dist/helpers/tags.d.ts +8 -0
- package/dist/helpers/tags.js +27 -1
- package/dist/helpers/tags.js.map +1 -1
- package/dist/helpers/upload.js +3 -3
- package/dist/helpers/upload.js.map +1 -1
- package/dist/helpers/user-provided-git.js +6 -6
- package/dist/helpers/user-provided-git.js.map +1 -1
- package/dist/helpers/utils.d.ts +4 -5
- package/dist/helpers/utils.js +18 -25
- package/dist/helpers/utils.js.map +1 -1
- package/dist/helpers/validation.d.ts +3 -1
- package/dist/helpers/validation.js +27 -1
- package/dist/helpers/validation.js.map +1 -1
- package/dist/helpers/version.d.ts +4 -0
- package/dist/helpers/version.js +9 -0
- package/dist/helpers/version.js.map +1 -0
- package/dist/index.d.ts +4 -4
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/package.json +22 -13
|
@@ -12,8 +12,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
16
|
-
const chalk_1 = require("chalk");
|
|
15
|
+
exports.requestFunctionSelection = exports.requestEnvServiceVersion = exports.requestDatadogEnvVars = exports.requestAWSRegion = exports.requestAWSCredentials = exports.functionSelectionQuestion = exports.datadogEnvVarsQuestions = exports.datadogApiKeyTypeQuestion = exports.awsProfileQuestion = void 0;
|
|
16
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
17
17
|
const fuzzy_1 = require("fuzzy");
|
|
18
18
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
19
19
|
const constants_1 = require("../../constants");
|
|
@@ -42,7 +42,7 @@ const awsCredentialsQuestions = [
|
|
|
42
42
|
name: constants_2.AWS_ACCESS_KEY_ID_ENV_VAR,
|
|
43
43
|
type: 'input',
|
|
44
44
|
validate: (value) => {
|
|
45
|
-
if (!value || !commons_1.sentenceMatchesRegEx(value, constants_2.AWS_ACCESS_KEY_ID_REG_EXP)) {
|
|
45
|
+
if (!value || !(0, commons_1.sentenceMatchesRegEx)(value, constants_2.AWS_ACCESS_KEY_ID_REG_EXP)) {
|
|
46
46
|
return 'Enter a valid AWS Access Key ID.';
|
|
47
47
|
}
|
|
48
48
|
return true;
|
|
@@ -55,7 +55,7 @@ const awsCredentialsQuestions = [
|
|
|
55
55
|
name: constants_2.AWS_SECRET_ACCESS_KEY_ENV_VAR,
|
|
56
56
|
type: 'password',
|
|
57
57
|
validate: (value) => {
|
|
58
|
-
if (!value || !commons_1.sentenceMatchesRegEx(value, constants_2.AWS_SECRET_ACCESS_KEY_REG_EXP)) {
|
|
58
|
+
if (!value || !(0, commons_1.sentenceMatchesRegEx)(value, constants_2.AWS_SECRET_ACCESS_KEY_REG_EXP)) {
|
|
59
59
|
return 'Enter a valid AWS Secret Access Key.';
|
|
60
60
|
}
|
|
61
61
|
return true;
|
|
@@ -78,7 +78,7 @@ const awsRegionQuestion = (defaultRegion) => ({
|
|
|
78
78
|
const datadogApiKeyTypeQuestion = (datadogSite) => ({
|
|
79
79
|
choices: [
|
|
80
80
|
{
|
|
81
|
-
name: `Plain text ${chalk_1.bold('API Key')} (Recommended for trial users) `,
|
|
81
|
+
name: `Plain text ${chalk_1.default.bold('API Key')} (Recommended for trial users) `,
|
|
82
82
|
value: {
|
|
83
83
|
envVar: constants_1.CI_API_KEY_ENV_VAR,
|
|
84
84
|
message: 'API Key:',
|
|
@@ -86,21 +86,21 @@ const datadogApiKeyTypeQuestion = (datadogSite) => ({
|
|
|
86
86
|
},
|
|
87
87
|
new inquirer_1.default.Separator(),
|
|
88
88
|
{
|
|
89
|
-
name: `API key encrypted with AWS Key Management Service ${chalk_1.bold('(KMS) API Key')}`,
|
|
89
|
+
name: `API key encrypted with AWS Key Management Service ${chalk_1.default.bold('(KMS) API Key')}`,
|
|
90
90
|
value: {
|
|
91
91
|
envVar: constants_2.CI_KMS_API_KEY_ENV_VAR,
|
|
92
92
|
message: 'KMS Encrypted API Key:',
|
|
93
93
|
},
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
|
-
name: `AWS Secrets Manager ${chalk_1.bold('API Key Secret ARN')}`,
|
|
96
|
+
name: `AWS Secrets Manager ${chalk_1.default.bold('API Key Secret ARN')}`,
|
|
97
97
|
value: {
|
|
98
98
|
envVar: constants_2.CI_API_KEY_SECRET_ARN_ENV_VAR,
|
|
99
99
|
message: 'API Key Secret ARN:',
|
|
100
100
|
},
|
|
101
101
|
},
|
|
102
102
|
],
|
|
103
|
-
message: `Which type of Datadog API Key you want to set? \nLearn more at ${chalk_1.blueBright(`https://app.${datadogSite}/organization-settings/api-keys`)}`,
|
|
103
|
+
message: `Which type of Datadog API Key you want to set? \nLearn more at ${chalk_1.default.blueBright(`https://app.${datadogSite}/organization-settings/api-keys`)}`,
|
|
104
104
|
name: 'type',
|
|
105
105
|
type: 'list',
|
|
106
106
|
});
|
|
@@ -108,28 +108,28 @@ exports.datadogApiKeyTypeQuestion = datadogApiKeyTypeQuestion;
|
|
|
108
108
|
const datadogSiteQuestion = {
|
|
109
109
|
// DATADOG SITE
|
|
110
110
|
choices: constants_1.DATADOG_SITES,
|
|
111
|
-
message: `Select the Datadog site to send data. \nLearn more at ${chalk_1.blueBright('https://docs.datadoghq.com/getting_started/site/')}`,
|
|
111
|
+
message: `Select the Datadog site to send data. \nLearn more at ${chalk_1.default.blueBright('https://docs.datadoghq.com/getting_started/site/')}`,
|
|
112
112
|
name: constants_1.CI_SITE_ENV_VAR,
|
|
113
113
|
type: 'list',
|
|
114
114
|
};
|
|
115
115
|
const envQuestion = {
|
|
116
116
|
default: undefined,
|
|
117
117
|
message: 'Enter a value for the environment variable DD_ENV',
|
|
118
|
-
suffix: chalk_1.dim(' (recommended)'),
|
|
118
|
+
suffix: chalk_1.default.dim(' (recommended)'),
|
|
119
119
|
name: constants_1.ENVIRONMENT_ENV_VAR,
|
|
120
120
|
type: 'input',
|
|
121
121
|
};
|
|
122
122
|
const serviceQuestion = {
|
|
123
123
|
default: undefined,
|
|
124
124
|
message: 'Enter a value for the environment variable DD_SERVICE',
|
|
125
|
-
suffix: chalk_1.dim(' (recommended)'),
|
|
125
|
+
suffix: chalk_1.default.dim(' (recommended)'),
|
|
126
126
|
name: constants_1.SERVICE_ENV_VAR,
|
|
127
127
|
type: 'input',
|
|
128
128
|
};
|
|
129
129
|
const versionQuestion = {
|
|
130
130
|
default: undefined,
|
|
131
131
|
message: 'Enter a value for the environment variable DD_VERSION',
|
|
132
|
-
suffix: chalk_1.dim(' (recommended)'),
|
|
132
|
+
suffix: chalk_1.default.dim(' (recommended)'),
|
|
133
133
|
name: constants_1.VERSION_ENV_VAR,
|
|
134
134
|
type: 'input',
|
|
135
135
|
};
|
|
@@ -144,11 +144,11 @@ const datadogEnvVarsQuestions = (datadogApiKeyType) => ({
|
|
|
144
144
|
if (!value) {
|
|
145
145
|
return INVALID_KEY_MESSAGE;
|
|
146
146
|
}
|
|
147
|
-
if (datadogApiKeyType.envVar === constants_1.CI_API_KEY_ENV_VAR && !commons_1.sentenceMatchesRegEx(value, constants_2.DATADOG_API_KEY_REG_EXP)) {
|
|
147
|
+
if (datadogApiKeyType.envVar === constants_1.CI_API_KEY_ENV_VAR && !(0, commons_1.sentenceMatchesRegEx)(value, constants_2.DATADOG_API_KEY_REG_EXP)) {
|
|
148
148
|
return INVALID_KEY_MESSAGE;
|
|
149
149
|
}
|
|
150
150
|
if (datadogApiKeyType.envVar === constants_2.CI_API_KEY_SECRET_ARN_ENV_VAR &&
|
|
151
|
-
!commons_1.sentenceMatchesRegEx(value, constants_2.AWS_SECRET_ARN_REG_EXP)) {
|
|
151
|
+
!(0, commons_1.sentenceMatchesRegEx)(value, constants_2.AWS_SECRET_ARN_REG_EXP)) {
|
|
152
152
|
return INVALID_KEY_MESSAGE;
|
|
153
153
|
}
|
|
154
154
|
return true;
|
|
@@ -165,7 +165,7 @@ const functionSelectionQuestion = (functionNames) => ({
|
|
|
165
165
|
source: (answersSoFar, input) => {
|
|
166
166
|
input = input || '';
|
|
167
167
|
return new Promise((resolve) => {
|
|
168
|
-
const fuzzyResult = fuzzy_1.filter(input, functionNames);
|
|
168
|
+
const fuzzyResult = (0, fuzzy_1.filter)(input, functionNames);
|
|
169
169
|
const data = fuzzyResult.map((element) => element.original);
|
|
170
170
|
resolve(data);
|
|
171
171
|
});
|
|
@@ -211,15 +211,15 @@ const requestDatadogEnvVars = () => __awaiter(void 0, void 0, void 0, function*
|
|
|
211
211
|
try {
|
|
212
212
|
const envSite = process.env[constants_1.CI_SITE_ENV_VAR];
|
|
213
213
|
let selectedDatadogSite = envSite;
|
|
214
|
-
if (!validation_1.isValidDatadogSite(envSite)) {
|
|
214
|
+
if (!(0, validation_1.isValidDatadogSite)(envSite)) {
|
|
215
215
|
const datadogSiteAnswer = yield inquirer_1.default.prompt(datadogSiteQuestion);
|
|
216
216
|
selectedDatadogSite = datadogSiteAnswer[constants_1.CI_SITE_ENV_VAR];
|
|
217
217
|
process.env[constants_1.CI_SITE_ENV_VAR] = selectedDatadogSite;
|
|
218
218
|
}
|
|
219
|
-
if (commons_1.isMissingAnyDatadogApiKeyEnvVar()) {
|
|
220
|
-
const datadogApiKeyTypeAnswer = yield inquirer_1.default.prompt(exports.datadogApiKeyTypeQuestion(selectedDatadogSite));
|
|
219
|
+
if ((0, commons_1.isMissingAnyDatadogApiKeyEnvVar)()) {
|
|
220
|
+
const datadogApiKeyTypeAnswer = yield inquirer_1.default.prompt((0, exports.datadogApiKeyTypeQuestion)(selectedDatadogSite));
|
|
221
221
|
const datadogApiKeyType = datadogApiKeyTypeAnswer.type;
|
|
222
|
-
const datadogEnvVars = yield inquirer_1.default.prompt(exports.datadogEnvVarsQuestions(datadogApiKeyType));
|
|
222
|
+
const datadogEnvVars = yield inquirer_1.default.prompt((0, exports.datadogEnvVarsQuestions)(datadogApiKeyType));
|
|
223
223
|
const selectedDatadogApiKeyEnvVar = datadogApiKeyType.envVar;
|
|
224
224
|
process.env[selectedDatadogApiKeyEnvVar] = datadogEnvVars[selectedDatadogApiKeyEnvVar];
|
|
225
225
|
}
|
|
@@ -252,7 +252,7 @@ const requestEnvServiceVersion = () => __awaiter(void 0, void 0, void 0, functio
|
|
|
252
252
|
exports.requestEnvServiceVersion = requestEnvServiceVersion;
|
|
253
253
|
const requestFunctionSelection = (functionNames) => __awaiter(void 0, void 0, void 0, function* () {
|
|
254
254
|
try {
|
|
255
|
-
const selectedFunctionsAnswer = yield inquirer_1.default.prompt(exports.functionSelectionQuestion(functionNames));
|
|
255
|
+
const selectedFunctionsAnswer = yield inquirer_1.default.prompt((0, exports.functionSelectionQuestion)(functionNames));
|
|
256
256
|
return selectedFunctionsAnswer.functions;
|
|
257
257
|
}
|
|
258
258
|
catch (e) {
|
|
@@ -262,22 +262,4 @@ const requestFunctionSelection = (functionNames) => __awaiter(void 0, void 0, vo
|
|
|
262
262
|
}
|
|
263
263
|
});
|
|
264
264
|
exports.requestFunctionSelection = requestFunctionSelection;
|
|
265
|
-
const requestFilePath = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
266
|
-
try {
|
|
267
|
-
const filePathAnswer = yield inquirer_1.default.prompt([
|
|
268
|
-
{
|
|
269
|
-
type: 'input',
|
|
270
|
-
name: 'filePath',
|
|
271
|
-
message: 'Please enter a file path, or press Enter to finish:',
|
|
272
|
-
},
|
|
273
|
-
]);
|
|
274
|
-
return filePathAnswer.filePath;
|
|
275
|
-
}
|
|
276
|
-
catch (e) {
|
|
277
|
-
if (e instanceof Error) {
|
|
278
|
-
throw Error(`Couldn't receive file path. ${e.message}`);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
});
|
|
282
|
-
exports.requestFilePath = requestFilePath;
|
|
283
265
|
//# sourceMappingURL=prompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../src/commands/lambda/prompt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../src/commands/lambda/prompt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAAyB;AACzB,iCAA4B;A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GAAG,MAAM,kBAAQ,CAAC,MAAM,CAAC,eAAe,CAAC,CAAA;QACpE,MAAM,4BAA4B,GAAG,qBAAqB,CAAC,2BAAe,CAAC,CAAA;QAC3E,OAAO,CAAC,GAAG,CAAC,2BAAe,CAAC,GAAG,4BAA4B,CAAA;KAC5D;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,YAAY,KAAK,EAAE;YACtB,MAAM,KAAK,CAAC,8EAA8E,CAAC,CAAC,OAAO,EAAE,CAAC,CAAA;SACvG;KACF;AACH,CAAC,CAAA,CAAA;AAlBY,QAAA,wBAAwB,4BAkBpC;AAEM,MAAM,wBAAwB,GAAG,CAAO,aAAuB,EAAE,EAAE;IACxE,IAAI;QACF,MAAM,uBAAuB,GAAQ,MAAM,kBAAQ,CAAC,MAAM,CAAC,IAAA,iCAAyB,EAAC,aAAa,CAAC,CAAC,CAAA;QAEpG,OAAO,uBAAuB,CAAC,SAAS,CAAA;KACzC;IAAC,OAAO,CAAC,EAAE;QACV,IAAI,CAAC,YAAY,KAAK,EAAE;YACtB,MAAM,KAAK,CAAC,wCAAwC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAA;SACjE;KACF;AACH,CAAC,CAAA,CAAA;AAVY,QAAA,wBAAwB,4BAUpC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const makeMockSpinner = () => {
|
|
3
|
+
return () => ({
|
|
4
|
+
fail: jest.fn(),
|
|
5
|
+
start: jest.fn(),
|
|
6
|
+
succeed: jest.fn(),
|
|
7
|
+
warn: jest.fn(),
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
module.exports = Object.assign(Object.assign({}, jest.requireActual('../instrument-uninstrument-renderer')), { fetchingFunctionsConfigSpinner: makeMockSpinner(), fetchingFunctionsSpinner: makeMockSpinner(), updatingFunctionsConfigFromRegionSpinner: makeMockSpinner(), updatingFunctionsSpinner: makeMockSpinner() });
|
|
11
|
+
//# sourceMappingURL=instrument-uninstrument-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrument-uninstrument-renderer.js","sourceRoot":"","sources":["../../../../../src/commands/lambda/renderers/__mocks__/instrument-uninstrument-renderer.ts"],"names":[],"mappings":";AAAA,MAAM,eAAe,GAAG,GAAG,EAAE;IAC3B,OAAO,GAAG,EAAE,CAAC,CAAC;QACZ,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;QACf,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE;QAChB,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE;QAClB,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;KAChB,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,iDACK,IAAI,CAAC,aAAa,CAAC,qCAAqC,CAAC,KAC5D,8BAA8B,EAAE,eAAe,EAAE,EACjD,wBAAwB,EAAE,eAAe,EAAE,EAC3C,wCAAwC,EAAE,eAAe,EAAE,EAC3D,wBAAwB,EAAE,eAAe,EAAE,IAC5C"}
|
|
@@ -9,7 +9,7 @@ const renderer_1 = require("../../../helpers/renderer");
|
|
|
9
9
|
* [Error] No default region specified. [-r,--region]'
|
|
10
10
|
* ```
|
|
11
11
|
*/
|
|
12
|
-
const renderNoDefaultRegionSpecifiedError = () => renderer_1.renderError('No default region specified. [-r,--region]');
|
|
12
|
+
const renderNoDefaultRegionSpecifiedError = () => (0, renderer_1.renderError)('No default region specified. [-r,--region]');
|
|
13
13
|
exports.renderNoDefaultRegionSpecifiedError = renderNoDefaultRegionSpecifiedError;
|
|
14
14
|
/**
|
|
15
15
|
* @returns a message indicating that no AWS credentials where found.
|
|
@@ -18,6 +18,6 @@ exports.renderNoDefaultRegionSpecifiedError = renderNoDefaultRegionSpecifiedErro
|
|
|
18
18
|
* [!] No AWS credentials found, lets set them up! Or you can re-run the command and supply the AWS credentials in the same way when you invoke the AWS CLI.
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
const renderNoAWSCredentialsFound = () => `${renderer_1.renderSoftWarning("No AWS credentials found, let's set them up! Or you can re-run the command and supply the AWS credentials in the same way when you invoke the AWS CLI.")}`;
|
|
21
|
+
const renderNoAWSCredentialsFound = () => `${(0, renderer_1.renderSoftWarning)("No AWS credentials found, let's set them up! Or you can re-run the command and supply the AWS credentials in the same way when you invoke the AWS CLI.")}`;
|
|
22
22
|
exports.renderNoAWSCredentialsFound = renderNoAWSCredentialsFound;
|
|
23
23
|
//# sourceMappingURL=common-renderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-renderer.js","sourceRoot":"","sources":["../../../../src/commands/lambda/renderers/common-renderer.ts"],"names":[],"mappings":";;;AAAA,wDAAwE;AAExE;;;;;;GAMG;AACI,MAAM,mCAAmC,GAAG,GAAG,EAAE,CAAC,sBAAW,
|
|
1
|
+
{"version":3,"file":"common-renderer.js","sourceRoot":"","sources":["../../../../src/commands/lambda/renderers/common-renderer.ts"],"names":[],"mappings":";;;AAAA,wDAAwE;AAExE;;;;;;GAMG;AACI,MAAM,mCAAmC,GAAG,GAAG,EAAE,CAAC,IAAA,sBAAW,EAAC,4CAA4C,CAAC,CAAA;AAArG,QAAA,mCAAmC,uCAAkE;AAElH;;;;;;GAMG;AACI,MAAM,2BAA2B,GAAG,GAAG,EAAE,CAC9C,GAAG,IAAA,4BAAiB,EAClB,wJAAwJ,CACzJ,EAAE,CAAA;AAHQ,QAAA,2BAA2B,+BAGnC"}
|
|
@@ -202,7 +202,7 @@ export declare const renderExtraTagsDontComplyError: () => string;
|
|
|
202
202
|
* [Error] Invalid layer version "provided value".
|
|
203
203
|
* ```
|
|
204
204
|
*/
|
|
205
|
-
export declare const renderInvalidLayerVersionError: (layerVersion?: string
|
|
205
|
+
export declare const renderInvalidLayerVersionError: (layerVersion?: string) => string;
|
|
206
206
|
/**
|
|
207
207
|
* @returns a message indicating that the `--extensionVersion` argument provided is invalid.
|
|
208
208
|
*
|
|
@@ -210,7 +210,7 @@ export declare const renderInvalidLayerVersionError: (layerVersion?: string | un
|
|
|
210
210
|
* [Error] Invalid extension version "provided value".
|
|
211
211
|
* ```
|
|
212
212
|
*/
|
|
213
|
-
export declare const renderInvalidExtensionVersionError: (extensionVersion?: string
|
|
213
|
+
export declare const renderInvalidExtensionVersionError: (extensionVersion?: string) => string;
|
|
214
214
|
/**
|
|
215
215
|
* @returns a message indicating that the provided argument for a specific string boolean
|
|
216
216
|
* field was invalid.
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.updatingFunctionsConfigFromRegionSpinner = exports.updatingFunctionsSpinner = exports.fetchingFunctionsConfigSpinner = exports.fetchingFunctionsSpinner = exports.renderFailedUpdatingEveryLambdaFunctionFromRegion = exports.renderFailedUpdatingEveryLambdaFunction = exports.renderFailedUpdatingLambdaFunctions = exports.renderFailedUpdatingLambdaFunction = exports.renderFailedFetchingLambdaConfigurationsFromRegion = exports.renderFailedFetchingLambdaFunctions = exports.renderUpdatedLambdaFunctionsFromRegion = exports.renderUpdatedLambdaFunctions = exports.renderFetchedLambdaConfigurationsFromRegion = exports.renderFetchedLambdaFunctions = exports.renderUninstrumentingFunctionsSoftWarning = exports.renderInstrumentingFunctionsSoftWarning = exports.renderConfirmationNeededSoftWarning = exports.renderWillApplyUpdates = exports.renderNoUpdatesApplied = exports.renderInvalidStringBooleanSpecifiedError = exports.renderInvalidExtensionVersionError = exports.renderInvalidLayerVersionError = exports.renderExtraTagsDontComplyError = exports.renderTagsNotConfiguredWarning = exports.renderCouldntFetchLambdaFunctionsError = exports.renderCouldntFindLambdaFunctionsInRegionError = exports.renderConfigureDatadog = exports.renderConfigureAWSRegion = exports.renderEnsureToLockLayerVersionsWarning = exports.renderFunctionsToBeUpdated = exports.renderInstrumentInStagingFirst = exports.renderSourceCodeIntegrationWarning = exports.renderFail = exports.renderSuccess = exports.renderWarning = exports.renderFailureDuringUpdateError = exports.renderCouldntGroupFunctionsError = exports.renderRegexSetWithARNError = exports.renderFunctionsAndFunctionsRegexOptionsBothSetError = exports.renderMissingDatadogApiKeyError = exports.renderExtensionAndForwarderOptionsBothSetError = exports.renderNoFunctionsSpecifiedError = exports.renderLambdaHeader = void 0;
|
|
7
|
-
const chalk_1 = require("chalk");
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const ora_1 = __importDefault(require("ora"));
|
|
9
9
|
const renderer_1 = require("../../../helpers/renderer");
|
|
10
10
|
const uninstrument_1 = require("../uninstrument");
|
|
@@ -40,7 +40,7 @@ const renderNoFunctionsSpecifiedError = (commandType) => {
|
|
|
40
40
|
if (commandType === uninstrument_1.UninstrumentCommand.prototype) {
|
|
41
41
|
commandWords = 'remove instrumentation';
|
|
42
42
|
}
|
|
43
|
-
return renderer_1.renderError(`No functions specified to ${commandWords}.`);
|
|
43
|
+
return (0, renderer_1.renderError)(`No functions specified to ${commandWords}.`);
|
|
44
44
|
};
|
|
45
45
|
exports.renderNoFunctionsSpecifiedError = renderNoFunctionsSpecifiedError;
|
|
46
46
|
/**
|
|
@@ -50,7 +50,7 @@ exports.renderNoFunctionsSpecifiedError = renderNoFunctionsSpecifiedError;
|
|
|
50
50
|
* [Error] "extensionVersion" and "forwarder" should not be used at the same time.
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
|
-
const renderExtensionAndForwarderOptionsBothSetError = () => renderer_1.renderError('"extensionVersion" and "forwarder" should not be used at the same time.');
|
|
53
|
+
const renderExtensionAndForwarderOptionsBothSetError = () => (0, renderer_1.renderError)('"extensionVersion" and "forwarder" should not be used at the same time.');
|
|
54
54
|
exports.renderExtensionAndForwarderOptionsBothSetError = renderExtensionAndForwarderOptionsBothSetError;
|
|
55
55
|
/**
|
|
56
56
|
* @returns a message indicating that the environment variable `DATADOG_API_KEY` is missing.
|
|
@@ -59,7 +59,7 @@ exports.renderExtensionAndForwarderOptionsBothSetError = renderExtensionAndForwa
|
|
|
59
59
|
* [Error] Missing DATADOG_API_KEY in your environment.
|
|
60
60
|
* ```
|
|
61
61
|
*/
|
|
62
|
-
const renderMissingDatadogApiKeyError = () => renderer_1.renderError('Missing DATADOG_API_KEY in your environment.');
|
|
62
|
+
const renderMissingDatadogApiKeyError = () => (0, renderer_1.renderError)('Missing DATADOG_API_KEY in your environment.');
|
|
63
63
|
exports.renderMissingDatadogApiKeyError = renderMissingDatadogApiKeyError;
|
|
64
64
|
/**
|
|
65
65
|
* @param functionsCommandUsed a boolean indicating which command was used for the specified functions.
|
|
@@ -75,7 +75,7 @@ exports.renderMissingDatadogApiKeyError = renderMissingDatadogApiKeyError;
|
|
|
75
75
|
*/
|
|
76
76
|
const renderFunctionsAndFunctionsRegexOptionsBothSetError = (functionsCommandUsed) => {
|
|
77
77
|
const usedCommand = functionsCommandUsed ? '"--functions"' : 'Functions in config file';
|
|
78
|
-
return renderer_1.renderError(`${usedCommand} and "--functions-regex" should not be used at the same time.`);
|
|
78
|
+
return (0, renderer_1.renderError)(`${usedCommand} and "--functions-regex" should not be used at the same time.`);
|
|
79
79
|
};
|
|
80
80
|
exports.renderFunctionsAndFunctionsRegexOptionsBothSetError = renderFunctionsAndFunctionsRegexOptionsBothSetError;
|
|
81
81
|
/**
|
|
@@ -85,7 +85,7 @@ exports.renderFunctionsAndFunctionsRegexOptionsBothSetError = renderFunctionsAnd
|
|
|
85
85
|
* [Error] "--functions-regex" isn't meant to be used with ARNs.
|
|
86
86
|
* ```
|
|
87
87
|
*/
|
|
88
|
-
const renderRegexSetWithARNError = () => renderer_1.renderError(`"--functions-regex" isn't meant to be used with ARNs.`);
|
|
88
|
+
const renderRegexSetWithARNError = () => (0, renderer_1.renderError)(`"--functions-regex" isn't meant to be used with ARNs.`);
|
|
89
89
|
exports.renderRegexSetWithARNError = renderRegexSetWithARNError;
|
|
90
90
|
/**
|
|
91
91
|
* @param error an error message or an object of type `unknown`*.
|
|
@@ -97,7 +97,7 @@ exports.renderRegexSetWithARNError = renderRegexSetWithARNError;
|
|
|
97
97
|
* [Error] Couldn't group functions. The provided error goes here!
|
|
98
98
|
* ```
|
|
99
99
|
*/
|
|
100
|
-
const renderCouldntGroupFunctionsError = (error) => renderer_1.renderError(`Couldn't group functions. ${error}`);
|
|
100
|
+
const renderCouldntGroupFunctionsError = (error) => (0, renderer_1.renderError)(`Couldn't group functions. ${error}`);
|
|
101
101
|
exports.renderCouldntGroupFunctionsError = renderCouldntGroupFunctionsError;
|
|
102
102
|
/**
|
|
103
103
|
* @param error an error message or an object of type `unknown`*.
|
|
@@ -109,7 +109,7 @@ exports.renderCouldntGroupFunctionsError = renderCouldntGroupFunctionsError;
|
|
|
109
109
|
* [Error] Failure during update. The provided error goes here!
|
|
110
110
|
* ```
|
|
111
111
|
*/
|
|
112
|
-
const renderFailureDuringUpdateError = (error) => renderer_1.renderError(`Failure during update. ${error}`);
|
|
112
|
+
const renderFailureDuringUpdateError = (error) => (0, renderer_1.renderError)(`Failure during update. ${error}`);
|
|
113
113
|
exports.renderFailureDuringUpdateError = renderFailureDuringUpdateError;
|
|
114
114
|
/**
|
|
115
115
|
* @param warning the message to warn about.
|
|
@@ -149,7 +149,7 @@ exports.renderFail = renderFail;
|
|
|
149
149
|
* [Warning] Couldn't add source code integration. The provided error goes here!
|
|
150
150
|
* ```
|
|
151
151
|
*/
|
|
152
|
-
const renderSourceCodeIntegrationWarning = (sourceCodeIntegrationError) => `\n${exports.renderWarning(`Couldn't add source code integration, continuing without it. ${sourceCodeIntegrationError}.`)}`;
|
|
152
|
+
const renderSourceCodeIntegrationWarning = (sourceCodeIntegrationError) => `\n${(0, exports.renderWarning)(`Couldn't add source code integration, continuing without it. ${sourceCodeIntegrationError}.`)}`;
|
|
153
153
|
exports.renderSourceCodeIntegrationWarning = renderSourceCodeIntegrationWarning;
|
|
154
154
|
/**
|
|
155
155
|
* @returns a message suggesting to instrument in dev or staging environment first.
|
|
@@ -158,7 +158,9 @@ exports.renderSourceCodeIntegrationWarning = renderSourceCodeIntegrationWarning;
|
|
|
158
158
|
* [Warning] Instrument your Lambda functions in a dev or staging environment first. Should the instrumentation result be unsatisfactory, run `uninstrument` with the same arguments to revert the changes.
|
|
159
159
|
* ```
|
|
160
160
|
*/
|
|
161
|
-
const renderInstrumentInStagingFirst = () => `\n${exports.renderWarning(`Instrument your ${chalk_1.
|
|
161
|
+
const renderInstrumentInStagingFirst = () => `\n${(0, exports.renderWarning)(`Instrument your ${chalk_1.default
|
|
162
|
+
.hex('#FF9900')
|
|
163
|
+
.bold('Lambda')} functions in a dev or staging environment first. Should the instrumentation result be unsatisfactory, run \`${chalk_1.default.bold('uninstrument')}\` with the same arguments to revert the changes.`)}`;
|
|
162
164
|
exports.renderInstrumentInStagingFirst = renderInstrumentInStagingFirst;
|
|
163
165
|
/**
|
|
164
166
|
* @returns a soft warning message indicating that functions are going to be updated.
|
|
@@ -167,7 +169,7 @@ exports.renderInstrumentInStagingFirst = renderInstrumentInStagingFirst;
|
|
|
167
169
|
* Functions to be updated:
|
|
168
170
|
* ```
|
|
169
171
|
*/
|
|
170
|
-
const renderFunctionsToBeUpdated = () => `\n${renderer_1.renderSoftWarning('Functions to be updated:')}`;
|
|
172
|
+
const renderFunctionsToBeUpdated = () => `\n${(0, renderer_1.renderSoftWarning)('Functions to be updated:')}`;
|
|
171
173
|
exports.renderFunctionsToBeUpdated = renderFunctionsToBeUpdated;
|
|
172
174
|
/**
|
|
173
175
|
* @returns a warning message reminding the user to lock versions for production.
|
|
@@ -176,7 +178,7 @@ exports.renderFunctionsToBeUpdated = renderFunctionsToBeUpdated;
|
|
|
176
178
|
* [Warning] At least one latest layer version is being used. Ensure to lock in versions for production applications using `--layerVersion` and `--extensionVersion`.
|
|
177
179
|
* ```
|
|
178
180
|
*/
|
|
179
|
-
const renderEnsureToLockLayerVersionsWarning = () => `\t${exports.renderWarning('At least one latest layer version is being used. Ensure to lock in versions for production applications using `--layerVersion` and `--extensionVersion`.')}`;
|
|
181
|
+
const renderEnsureToLockLayerVersionsWarning = () => `\t${(0, exports.renderWarning)('At least one latest layer version is being used. Ensure to lock in versions for production applications using `--layerVersion` and `--extensionVersion`.')}`;
|
|
180
182
|
exports.renderEnsureToLockLayerVersionsWarning = renderEnsureToLockLayerVersionsWarning;
|
|
181
183
|
/**
|
|
182
184
|
* @returns a message indicating to configure AWS region.
|
|
@@ -185,7 +187,7 @@ exports.renderEnsureToLockLayerVersionsWarning = renderEnsureToLockLayerVersions
|
|
|
185
187
|
* [!] Configure AWS region.
|
|
186
188
|
* ```
|
|
187
189
|
*/
|
|
188
|
-
const renderConfigureAWSRegion = () => `\n${renderer_1.renderSoftWarning('Configure AWS region.')}`;
|
|
190
|
+
const renderConfigureAWSRegion = () => `\n${(0, renderer_1.renderSoftWarning)('Configure AWS region.')}`;
|
|
189
191
|
exports.renderConfigureAWSRegion = renderConfigureAWSRegion;
|
|
190
192
|
/**
|
|
191
193
|
* @returns a message indicating to configure Datadog settings.
|
|
@@ -194,7 +196,7 @@ exports.renderConfigureAWSRegion = renderConfigureAWSRegion;
|
|
|
194
196
|
* [!] Configure Datadog settings.
|
|
195
197
|
* ```
|
|
196
198
|
*/
|
|
197
|
-
const renderConfigureDatadog = () => `\n${renderer_1.renderSoftWarning('Configure Datadog settings.')}`;
|
|
199
|
+
const renderConfigureDatadog = () => `\n${(0, renderer_1.renderSoftWarning)('Configure Datadog settings.')}`;
|
|
198
200
|
exports.renderConfigureDatadog = renderConfigureDatadog;
|
|
199
201
|
/**
|
|
200
202
|
* @returns a message indicating that no Lambda functions were found
|
|
@@ -204,7 +206,7 @@ exports.renderConfigureDatadog = renderConfigureDatadog;
|
|
|
204
206
|
* [Error] Couldn't find any Lambda functions in the specified region.
|
|
205
207
|
* ```
|
|
206
208
|
*/
|
|
207
|
-
const renderCouldntFindLambdaFunctionsInRegionError = () => renderer_1.renderError("Couldn't find any Lambda functions in the specified region.");
|
|
209
|
+
const renderCouldntFindLambdaFunctionsInRegionError = () => (0, renderer_1.renderError)("Couldn't find any Lambda functions in the specified region.");
|
|
208
210
|
exports.renderCouldntFindLambdaFunctionsInRegionError = renderCouldntFindLambdaFunctionsInRegionError;
|
|
209
211
|
/**
|
|
210
212
|
* @param error an error message or an object of type `unknown`*.
|
|
@@ -216,7 +218,7 @@ exports.renderCouldntFindLambdaFunctionsInRegionError = renderCouldntFindLambdaF
|
|
|
216
218
|
* [Error] Couldn't fetch Lambda functions. The provided error goes here!
|
|
217
219
|
* ```
|
|
218
220
|
*/
|
|
219
|
-
const renderCouldntFetchLambdaFunctionsError = (error) => renderer_1.renderError(`Couldn't fetch Lambda functions. ${error}`);
|
|
221
|
+
const renderCouldntFetchLambdaFunctionsError = (error) => (0, renderer_1.renderError)(`Couldn't fetch Lambda functions. ${error}`);
|
|
220
222
|
exports.renderCouldntFetchLambdaFunctionsError = renderCouldntFetchLambdaFunctionsError;
|
|
221
223
|
/**
|
|
222
224
|
* @param tagsMissing an array containing the tags that are not configured
|
|
@@ -230,7 +232,7 @@ exports.renderCouldntFetchLambdaFunctionsError = renderCouldntFetchLambdaFunctio
|
|
|
230
232
|
const renderTagsNotConfiguredWarning = (tagsMissing) => {
|
|
231
233
|
const tags = tagsMissing.join(', ').replace(/, ([^,]*)$/, ' and $1');
|
|
232
234
|
const plural = tagsMissing.length > 1;
|
|
233
|
-
return `\n${exports.renderWarning(`The ${tags} tag${plural ? 's have' : ' has'} not been configured. Learn more about Datadog unified service tagging: ${chalk_1.underline(chalk_1.blueBright('https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging/#serverless-environment'))}.`)}`;
|
|
235
|
+
return `\n${(0, exports.renderWarning)(`The ${tags} tag${plural ? 's have' : ' has'} not been configured. Learn more about Datadog unified service tagging: ${chalk_1.default.underline(chalk_1.default.blueBright('https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging/#serverless-environment'))}.`)}`;
|
|
234
236
|
};
|
|
235
237
|
exports.renderTagsNotConfiguredWarning = renderTagsNotConfiguredWarning;
|
|
236
238
|
/**
|
|
@@ -241,7 +243,7 @@ exports.renderTagsNotConfiguredWarning = renderTagsNotConfiguredWarning;
|
|
|
241
243
|
* [Error] Extra tags do not comply with the <key>:<value> array.
|
|
242
244
|
* ```
|
|
243
245
|
*/
|
|
244
|
-
const renderExtraTagsDontComplyError = () => renderer_1.renderError('Extra tags do not comply with the <key>:<value> array.');
|
|
246
|
+
const renderExtraTagsDontComplyError = () => (0, renderer_1.renderError)('Extra tags do not comply with the <key>:<value> array.');
|
|
245
247
|
exports.renderExtraTagsDontComplyError = renderExtraTagsDontComplyError;
|
|
246
248
|
/**
|
|
247
249
|
* @returns a message indicating that the `--layerVersion` argument provided is invalid.
|
|
@@ -250,7 +252,7 @@ exports.renderExtraTagsDontComplyError = renderExtraTagsDontComplyError;
|
|
|
250
252
|
* [Error] Invalid layer version "provided value".
|
|
251
253
|
* ```
|
|
252
254
|
*/
|
|
253
|
-
const renderInvalidLayerVersionError = (layerVersion) => renderer_1.renderError(`Invalid layer version "${layerVersion}".`);
|
|
255
|
+
const renderInvalidLayerVersionError = (layerVersion) => (0, renderer_1.renderError)(`Invalid layer version "${layerVersion}".`);
|
|
254
256
|
exports.renderInvalidLayerVersionError = renderInvalidLayerVersionError;
|
|
255
257
|
/**
|
|
256
258
|
* @returns a message indicating that the `--extensionVersion` argument provided is invalid.
|
|
@@ -259,7 +261,7 @@ exports.renderInvalidLayerVersionError = renderInvalidLayerVersionError;
|
|
|
259
261
|
* [Error] Invalid extension version "provided value".
|
|
260
262
|
* ```
|
|
261
263
|
*/
|
|
262
|
-
const renderInvalidExtensionVersionError = (extensionVersion) => renderer_1.renderError(`Invalid extension version "${extensionVersion}".`);
|
|
264
|
+
const renderInvalidExtensionVersionError = (extensionVersion) => (0, renderer_1.renderError)(`Invalid extension version "${extensionVersion}".`);
|
|
263
265
|
exports.renderInvalidExtensionVersionError = renderInvalidExtensionVersionError;
|
|
264
266
|
/**
|
|
265
267
|
* @returns a message indicating that the provided argument for a specific string boolean
|
|
@@ -269,7 +271,7 @@ exports.renderInvalidExtensionVersionError = renderInvalidExtensionVersionError;
|
|
|
269
271
|
* [Error] Invalid boolean specified for "string boolean field".
|
|
270
272
|
* ```
|
|
271
273
|
*/
|
|
272
|
-
const renderInvalidStringBooleanSpecifiedError = (stringBoolean) => renderer_1.renderError(`Invalid boolean specified for ${stringBoolean}.`);
|
|
274
|
+
const renderInvalidStringBooleanSpecifiedError = (stringBoolean) => (0, renderer_1.renderError)(`Invalid boolean specified for ${stringBoolean}.`);
|
|
273
275
|
exports.renderInvalidStringBooleanSpecifiedError = renderInvalidStringBooleanSpecifiedError;
|
|
274
276
|
/**
|
|
275
277
|
* @param isDryRun a boolean to define if a prefix should be added.
|
|
@@ -308,7 +310,7 @@ exports.renderWillApplyUpdates = renderWillApplyUpdates;
|
|
|
308
310
|
* [!] Confirmation needed.
|
|
309
311
|
* ```
|
|
310
312
|
*/
|
|
311
|
-
const renderConfirmationNeededSoftWarning = () => renderer_1.renderSoftWarning('Confirmation needed.');
|
|
313
|
+
const renderConfirmationNeededSoftWarning = () => (0, renderer_1.renderSoftWarning)('Confirmation needed.');
|
|
312
314
|
exports.renderConfirmationNeededSoftWarning = renderConfirmationNeededSoftWarning;
|
|
313
315
|
/**
|
|
314
316
|
* @returns a soft warning message indicating that functions are being instrumented.
|
|
@@ -317,7 +319,7 @@ exports.renderConfirmationNeededSoftWarning = renderConfirmationNeededSoftWarnin
|
|
|
317
319
|
* [!] Instrumenting functions.
|
|
318
320
|
* ```
|
|
319
321
|
*/
|
|
320
|
-
const renderInstrumentingFunctionsSoftWarning = () => renderer_1.renderSoftWarning('Instrumenting functions.');
|
|
322
|
+
const renderInstrumentingFunctionsSoftWarning = () => (0, renderer_1.renderSoftWarning)('Instrumenting functions.');
|
|
321
323
|
exports.renderInstrumentingFunctionsSoftWarning = renderInstrumentingFunctionsSoftWarning;
|
|
322
324
|
/**
|
|
323
325
|
* @returns a soft warning message indicating the removal of instrumentation
|
|
@@ -327,7 +329,7 @@ exports.renderInstrumentingFunctionsSoftWarning = renderInstrumentingFunctionsSo
|
|
|
327
329
|
* [!] Uninstrumenting functions.
|
|
328
330
|
* ```
|
|
329
331
|
*/
|
|
330
|
-
const renderUninstrumentingFunctionsSoftWarning = () => renderer_1.renderSoftWarning('Uninstrumenting functions.');
|
|
332
|
+
const renderUninstrumentingFunctionsSoftWarning = () => (0, renderer_1.renderSoftWarning)('Uninstrumenting functions.');
|
|
331
333
|
exports.renderUninstrumentingFunctionsSoftWarning = renderUninstrumentingFunctionsSoftWarning;
|
|
332
334
|
/**
|
|
333
335
|
* @param functionsLength the number of Lambda functions that were fetched.
|
|
@@ -339,7 +341,7 @@ exports.renderUninstrumentingFunctionsSoftWarning = renderUninstrumentingFunctio
|
|
|
339
341
|
*/
|
|
340
342
|
const renderFetchedLambdaFunctions = (functionsLength) => {
|
|
341
343
|
const plural = functionsLength > 1;
|
|
342
|
-
return `Fetched ${chalk_1.bold(functionsLength)} ${chalk_1.hex('#FF9900').bold('Lambda')} function${plural ? 's' : ''}.\n`;
|
|
344
|
+
return `Fetched ${chalk_1.default.bold(functionsLength)} ${chalk_1.default.hex('#FF9900').bold('Lambda')} function${plural ? 's' : ''}.\n`;
|
|
343
345
|
};
|
|
344
346
|
exports.renderFetchedLambdaFunctions = renderFetchedLambdaFunctions;
|
|
345
347
|
/**
|
|
@@ -351,7 +353,9 @@ exports.renderFetchedLambdaFunctions = renderFetchedLambdaFunctions;
|
|
|
351
353
|
* [us-east-1] Fetched 42 Lambda configurations.
|
|
352
354
|
* ```
|
|
353
355
|
*/
|
|
354
|
-
const renderFetchedLambdaConfigurationsFromRegion = (region, configsLength) => `${chalk_1.bold(`[${region}]`)} Fetched ${chalk_1.bold(configsLength)} ${chalk_1.
|
|
356
|
+
const renderFetchedLambdaConfigurationsFromRegion = (region, configsLength) => `${chalk_1.default.bold(`[${region}]`)} Fetched ${chalk_1.default.bold(configsLength)} ${chalk_1.default
|
|
357
|
+
.hex('#FF9900')
|
|
358
|
+
.bold('Lambda')} configurations.\n`;
|
|
355
359
|
exports.renderFetchedLambdaConfigurationsFromRegion = renderFetchedLambdaConfigurationsFromRegion;
|
|
356
360
|
/**
|
|
357
361
|
* @param functionsLength the number of Lambda functions that were updated.
|
|
@@ -363,7 +367,7 @@ exports.renderFetchedLambdaConfigurationsFromRegion = renderFetchedLambdaConfigu
|
|
|
363
367
|
*/
|
|
364
368
|
const renderUpdatedLambdaFunctions = (functionsLength) => {
|
|
365
369
|
const plural = functionsLength > 1;
|
|
366
|
-
return `Updated ${chalk_1.bold(functionsLength)} ${chalk_1.hex('#FF9900').bold('Lambda')} function${plural ? 's' : ''}.\n`;
|
|
370
|
+
return `Updated ${chalk_1.default.bold(functionsLength)} ${chalk_1.default.hex('#FF9900').bold('Lambda')} function${plural ? 's' : ''}.\n`;
|
|
367
371
|
};
|
|
368
372
|
exports.renderUpdatedLambdaFunctions = renderUpdatedLambdaFunctions;
|
|
369
373
|
/**
|
|
@@ -377,7 +381,9 @@ exports.renderUpdatedLambdaFunctions = renderUpdatedLambdaFunctions;
|
|
|
377
381
|
*/
|
|
378
382
|
const renderUpdatedLambdaFunctionsFromRegion = (region, functionsLength) => {
|
|
379
383
|
const plural = functionsLength > 1;
|
|
380
|
-
return `${chalk_1.bold(`[${region}]`)} Updated ${chalk_1.bold(functionsLength)} ${chalk_1.
|
|
384
|
+
return `${chalk_1.default.bold(`[${region}]`)} Updated ${chalk_1.default.bold(functionsLength)} ${chalk_1.default
|
|
385
|
+
.hex('#FF9900')
|
|
386
|
+
.bold('Lambda')} function${plural ? 's' : ''}.\n`;
|
|
381
387
|
};
|
|
382
388
|
exports.renderUpdatedLambdaFunctionsFromRegion = renderUpdatedLambdaFunctionsFromRegion;
|
|
383
389
|
/**
|
|
@@ -387,7 +393,7 @@ exports.renderUpdatedLambdaFunctionsFromRegion = renderUpdatedLambdaFunctionsFro
|
|
|
387
393
|
* Failed fetching Lambda functions.
|
|
388
394
|
* ```
|
|
389
395
|
*/
|
|
390
|
-
const renderFailedFetchingLambdaFunctions = () => `Failed fetching ${chalk_1.hex('#FF9900').bold('Lambda')} configurations.\n`;
|
|
396
|
+
const renderFailedFetchingLambdaFunctions = () => `Failed fetching ${chalk_1.default.hex('#FF9900').bold('Lambda')} configurations.\n`;
|
|
391
397
|
exports.renderFailedFetchingLambdaFunctions = renderFailedFetchingLambdaFunctions;
|
|
392
398
|
/**
|
|
393
399
|
* @param region the AWS region where the Lambda configs belong to.
|
|
@@ -398,7 +404,7 @@ exports.renderFailedFetchingLambdaFunctions = renderFailedFetchingLambdaFunction
|
|
|
398
404
|
* [us-east-1] Failed fetching Lambda configurations.
|
|
399
405
|
* ```
|
|
400
406
|
*/
|
|
401
|
-
const renderFailedFetchingLambdaConfigurationsFromRegion = (region) => `${chalk_1.bold(`[${region}]`)} Failed fetching ${chalk_1.hex('#FF9900').bold('Lambda')} configurations.\n`;
|
|
407
|
+
const renderFailedFetchingLambdaConfigurationsFromRegion = (region) => `${chalk_1.default.bold(`[${region}]`)} Failed fetching ${chalk_1.default.hex('#FF9900').bold('Lambda')} configurations.\n`;
|
|
402
408
|
exports.renderFailedFetchingLambdaConfigurationsFromRegion = renderFailedFetchingLambdaConfigurationsFromRegion;
|
|
403
409
|
/**
|
|
404
410
|
* @param f the Lambda function which failed to update.
|
|
@@ -412,7 +418,7 @@ exports.renderFailedFetchingLambdaConfigurationsFromRegion = renderFailedFetchin
|
|
|
412
418
|
* [us-east-1] Failed updating ARN Provided error goes here..
|
|
413
419
|
* ```
|
|
414
420
|
*/
|
|
415
|
-
const renderFailedUpdatingLambdaFunction = (f, error) => renderer_1.renderError(`Failed updating ${chalk_1.bold(f)} ${error}`);
|
|
421
|
+
const renderFailedUpdatingLambdaFunction = (f, error) => (0, renderer_1.renderError)(`Failed updating ${chalk_1.default.bold(f)} ${error}`);
|
|
416
422
|
exports.renderFailedUpdatingLambdaFunction = renderFailedUpdatingLambdaFunction;
|
|
417
423
|
/**
|
|
418
424
|
* @returns a message indicating that it failed to update Lambda functions.
|
|
@@ -421,7 +427,7 @@ exports.renderFailedUpdatingLambdaFunction = renderFailedUpdatingLambdaFunction;
|
|
|
421
427
|
* Failed updating Lambda functions.
|
|
422
428
|
* ```
|
|
423
429
|
*/
|
|
424
|
-
const renderFailedUpdatingLambdaFunctions = () => `Failed updating ${chalk_1.hex('#FF9900').bold('Lambda')} functions.\n`;
|
|
430
|
+
const renderFailedUpdatingLambdaFunctions = () => `Failed updating ${chalk_1.default.hex('#FF9900').bold('Lambda')} functions.\n`;
|
|
425
431
|
exports.renderFailedUpdatingLambdaFunctions = renderFailedUpdatingLambdaFunctions;
|
|
426
432
|
/**
|
|
427
433
|
* @returns a message indicating that it failed to update all Lambda functions.
|
|
@@ -430,7 +436,7 @@ exports.renderFailedUpdatingLambdaFunctions = renderFailedUpdatingLambdaFunction
|
|
|
430
436
|
* Failed updating every Lambda function.
|
|
431
437
|
* ```
|
|
432
438
|
*/
|
|
433
|
-
const renderFailedUpdatingEveryLambdaFunction = () => `Failed updating every ${chalk_1.hex('#FF9900').bold('Lambda')} function.\n`;
|
|
439
|
+
const renderFailedUpdatingEveryLambdaFunction = () => `Failed updating every ${chalk_1.default.hex('#FF9900').bold('Lambda')} function.\n`;
|
|
434
440
|
exports.renderFailedUpdatingEveryLambdaFunction = renderFailedUpdatingEveryLambdaFunction;
|
|
435
441
|
/**
|
|
436
442
|
* @param region the AWS region where the Lambda configs belong to.
|
|
@@ -441,7 +447,7 @@ exports.renderFailedUpdatingEveryLambdaFunction = renderFailedUpdatingEveryLambd
|
|
|
441
447
|
* [us-east-1] Failed updating every Lambda function.
|
|
442
448
|
* ```
|
|
443
449
|
*/
|
|
444
|
-
const renderFailedUpdatingEveryLambdaFunctionFromRegion = (region) => `${chalk_1.bold(`[${region}]`)} Failed updating every ${chalk_1.hex('#FF9900').bold('Lambda')} function.\n`;
|
|
450
|
+
const renderFailedUpdatingEveryLambdaFunctionFromRegion = (region) => `${chalk_1.default.bold(`[${region}]`)} Failed updating every ${chalk_1.default.hex('#FF9900').bold('Lambda')} function.\n`;
|
|
445
451
|
exports.renderFailedUpdatingEveryLambdaFunctionFromRegion = renderFailedUpdatingEveryLambdaFunctionFromRegion;
|
|
446
452
|
/**
|
|
447
453
|
* Returns a spinner instance with text for lambda functions fetching.
|
|
@@ -452,10 +458,10 @@ exports.renderFailedUpdatingEveryLambdaFunctionFromRegion = renderFailedUpdating
|
|
|
452
458
|
* ⠋ Fetching Lambda functions.
|
|
453
459
|
* ```
|
|
454
460
|
*/
|
|
455
|
-
const fetchingFunctionsSpinner = () => ora_1.default({
|
|
461
|
+
const fetchingFunctionsSpinner = () => (0, ora_1.default)({
|
|
456
462
|
color: 'magenta',
|
|
457
463
|
discardStdin: false,
|
|
458
|
-
text: `Fetching ${chalk_1.hex('#FF9900').bold('Lambda')} functions.\n`,
|
|
464
|
+
text: `Fetching ${chalk_1.default.hex('#FF9900').bold('Lambda')} functions.\n`,
|
|
459
465
|
});
|
|
460
466
|
exports.fetchingFunctionsSpinner = fetchingFunctionsSpinner;
|
|
461
467
|
/**
|
|
@@ -467,10 +473,10 @@ exports.fetchingFunctionsSpinner = fetchingFunctionsSpinner;
|
|
|
467
473
|
* ⠋ [us-east-1] Fetching Lambda configurations.
|
|
468
474
|
* ```
|
|
469
475
|
*/
|
|
470
|
-
const fetchingFunctionsConfigSpinner = (region) => ora_1.default({
|
|
476
|
+
const fetchingFunctionsConfigSpinner = (region) => (0, ora_1.default)({
|
|
471
477
|
color: 'magenta',
|
|
472
478
|
discardStdin: false,
|
|
473
|
-
text: `${chalk_1.bold(`[${region}]`)} Fetching ${chalk_1.hex('#FF9900').bold('Lambda')} configurations.\n`,
|
|
479
|
+
text: `${chalk_1.default.bold(`[${region}]`)} Fetching ${chalk_1.default.hex('#FF9900').bold('Lambda')} configurations.\n`,
|
|
474
480
|
});
|
|
475
481
|
exports.fetchingFunctionsConfigSpinner = fetchingFunctionsConfigSpinner;
|
|
476
482
|
/**
|
|
@@ -482,10 +488,10 @@ exports.fetchingFunctionsConfigSpinner = fetchingFunctionsConfigSpinner;
|
|
|
482
488
|
* ⠋ Updating 5 Lambda functions.
|
|
483
489
|
* ```
|
|
484
490
|
*/
|
|
485
|
-
const updatingFunctionsSpinner = (functions) => ora_1.default({
|
|
491
|
+
const updatingFunctionsSpinner = (functions) => (0, ora_1.default)({
|
|
486
492
|
color: 'magenta',
|
|
487
493
|
discardStdin: false,
|
|
488
|
-
text: `Updating ${chalk_1.bold(functions)} ${chalk_1.hex('#FF9900').bold('Lambda')} functions.\n`,
|
|
494
|
+
text: `Updating ${chalk_1.default.bold(functions)} ${chalk_1.default.hex('#FF9900').bold('Lambda')} functions.\n`,
|
|
489
495
|
});
|
|
490
496
|
exports.updatingFunctionsSpinner = updatingFunctionsSpinner;
|
|
491
497
|
/**
|
|
@@ -498,10 +504,12 @@ exports.updatingFunctionsSpinner = updatingFunctionsSpinner;
|
|
|
498
504
|
* ⠋ [us-east-1] Updating Lambda functions.
|
|
499
505
|
* ```
|
|
500
506
|
*/
|
|
501
|
-
const updatingFunctionsConfigFromRegionSpinner = (region, functions) => ora_1.default({
|
|
507
|
+
const updatingFunctionsConfigFromRegionSpinner = (region, functions) => (0, ora_1.default)({
|
|
502
508
|
color: 'magenta',
|
|
503
509
|
discardStdin: false,
|
|
504
|
-
text: `${chalk_1.bold(`[${region}]`)} Updating ${chalk_1.bold(functions)} ${chalk_1.
|
|
510
|
+
text: `${chalk_1.default.bold(`[${region}]`)} Updating ${chalk_1.default.bold(functions)} ${chalk_1.default
|
|
511
|
+
.hex('#FF9900')
|
|
512
|
+
.bold('Lambda')} functions.\n`,
|
|
505
513
|
});
|
|
506
514
|
exports.updatingFunctionsConfigFromRegionSpinner = updatingFunctionsConfigFromRegionSpinner;
|
|
507
515
|
//# sourceMappingURL=instrument-uninstrument-renderer.js.map
|