@datadog/datadog-ci 2.18.0 → 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/cli.d.ts +1 -0
- package/dist/commands/cloud-run/cli.js +5 -0
- package/dist/commands/cloud-run/cli.js.map +1 -0
- package/dist/commands/cloud-run/constants.d.ts +1 -0
- package/dist/commands/cloud-run/constants.js +22 -0
- package/dist/commands/cloud-run/constants.js.map +1 -0
- package/dist/commands/cloud-run/flare.d.ts +91 -0
- package/dist/commands/cloud-run/flare.js +634 -0
- package/dist/commands/cloud-run/flare.js.map +1 -0
- package/dist/commands/cloud-run/interfaces.d.ts +27 -0
- package/dist/commands/cloud-run/interfaces.js +3 -0
- package/dist/commands/cloud-run/interfaces.js.map +1 -0
- package/dist/commands/cloud-run/renderer.d.ts +4 -0
- package/dist/commands/cloud-run/renderer.js +42 -0
- package/dist/commands/cloud-run/renderer.js.map +1 -0
- 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 +13 -11
- package/dist/commands/lambda/constants.js +41 -70
- package/dist/commands/lambda/constants.js.map +1 -1
- package/dist/commands/lambda/flare.d.ts +25 -74
- package/dist/commands/lambda/flare.js +182 -332
- package/dist/commands/lambda/flare.js.map +1 -1
- package/dist/commands/lambda/functions/commons.d.ts +8 -14
- package/dist/commands/lambda/functions/commons.js +57 -69
- package/dist/commands/lambda/functions/commons.js.map +1 -1
- package/dist/commands/lambda/functions/instrument.js +66 -65
- package/dist/commands/lambda/functions/instrument.js.map +1 -1
- package/dist/commands/lambda/functions/uninstrument.js +38 -37
- 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 +78 -69
- 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 -4
- package/dist/commands/lambda/prompt.js +34 -71
- 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.d.ts +0 -26
- package/dist/commands/lambda/renderers/common-renderer.js +4 -32
- 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 +57 -49
- 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 +59 -49
- 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 +6 -22
- 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 +8 -7
- 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 +17 -19
- 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 +52 -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 +17 -0
- package/dist/constants.js +65 -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 +41 -0
- package/dist/helpers/flare.js +191 -0
- package/dist/helpers/flare.js.map +1 -0
- package/dist/helpers/fs.d.ts +31 -0
- package/dist/helpers/fs.js +117 -0
- package/dist/helpers/fs.js.map +1 -0
- 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 +7 -0
- package/dist/helpers/prompt.js +57 -0
- package/dist/helpers/prompt.js.map +1 -0
- package/dist/helpers/renderer.d.ts +60 -0
- package/dist/helpers/renderer.js +98 -0
- package/dist/helpers/renderer.js.map +1 -0
- 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 +12 -5
- package/dist/helpers/utils.js +57 -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 +28 -13
- package/dist/commands/lambda/renderers/flare-renderer.d.ts +0 -9
- package/dist/commands/lambda/renderers/flare-renderer.js +0 -22
- package/dist/commands/lambda/renderers/flare-renderer.js.map +0 -1
- package/dist/helpers/file.d.ts +0 -1
- package/dist/helpers/file.js +0 -9
- package/dist/helpers/file.js.map +0 -1
|
@@ -4,10 +4,10 @@ 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
|
+
const renderer_1 = require("../../../helpers/renderer");
|
|
9
10
|
const uninstrument_1 = require("../uninstrument");
|
|
10
|
-
const common_renderer_1 = require("./common-renderer");
|
|
11
11
|
/**
|
|
12
12
|
* @returns a header indicating which `lambda` subcommand is running.
|
|
13
13
|
* @param command current selected lambda subcommand.
|
|
@@ -17,7 +17,7 @@ const common_renderer_1 = require("./common-renderer");
|
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
19
|
const renderLambdaHeader = (commandType, isDryRun) => {
|
|
20
|
-
const prefix = isDryRun ? `${
|
|
20
|
+
const prefix = isDryRun ? `${renderer_1.dryRunTag} ` : '';
|
|
21
21
|
let commandVerb = 'Instrumenting';
|
|
22
22
|
if (commandType === uninstrument_1.UninstrumentCommand.prototype) {
|
|
23
23
|
commandVerb = 'Uninstrumenting';
|
|
@@ -40,7 +40,7 @@ const renderNoFunctionsSpecifiedError = (commandType) => {
|
|
|
40
40
|
if (commandType === uninstrument_1.UninstrumentCommand.prototype) {
|
|
41
41
|
commandWords = 'remove instrumentation';
|
|
42
42
|
}
|
|
43
|
-
return
|
|
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 = () =>
|
|
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 = () =>
|
|
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
|
|
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 = () =>
|
|
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) =>
|
|
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) =>
|
|
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.
|
|
@@ -119,7 +119,7 @@ exports.renderFailureDuringUpdateError = renderFailureDuringUpdateError;
|
|
|
119
119
|
* [Warning] The provided warning goes here!
|
|
120
120
|
* ```
|
|
121
121
|
*/
|
|
122
|
-
const renderWarning = (warning) => `${
|
|
122
|
+
const renderWarning = (warning) => `${renderer_1.warningTag} ${warning}\n`;
|
|
123
123
|
exports.renderWarning = renderWarning;
|
|
124
124
|
/**
|
|
125
125
|
* @param message the message to set with the success tag.
|
|
@@ -129,7 +129,7 @@ exports.renderWarning = renderWarning;
|
|
|
129
129
|
* [✔] The provided message goes here!
|
|
130
130
|
* ```
|
|
131
131
|
*/
|
|
132
|
-
const renderSuccess = (message) => `${
|
|
132
|
+
const renderSuccess = (message) => `${renderer_1.successCheckmarkTag} ${message}\n`;
|
|
133
133
|
exports.renderSuccess = renderSuccess;
|
|
134
134
|
/**
|
|
135
135
|
* @param message the message to set with the fail tag.
|
|
@@ -139,7 +139,7 @@ exports.renderSuccess = renderSuccess;
|
|
|
139
139
|
* [✖] The provided message goes here!
|
|
140
140
|
* ```
|
|
141
141
|
*/
|
|
142
|
-
const renderFail = (message) => `${
|
|
142
|
+
const renderFail = (message) => `${renderer_1.failCrossTag} ${message}\n`;
|
|
143
143
|
exports.renderFail = renderFail;
|
|
144
144
|
/**
|
|
145
145
|
* @param sourceCodeIntegrationError the error encountered when trying to enable source code integration.
|
|
@@ -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${
|
|
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${
|
|
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${
|
|
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 = () =>
|
|
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) =>
|
|
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 = () =>
|
|
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) =>
|
|
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) =>
|
|
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) =>
|
|
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.
|
|
@@ -282,7 +284,7 @@ exports.renderInvalidStringBooleanSpecifiedError = renderInvalidStringBooleanSpe
|
|
|
282
284
|
* ```
|
|
283
285
|
*/
|
|
284
286
|
const renderNoUpdatesApplied = (isDryRun) => {
|
|
285
|
-
const prefix = isDryRun ? `${
|
|
287
|
+
const prefix = isDryRun ? `${renderer_1.dryRunTag} ` : '';
|
|
286
288
|
return `\n${prefix}No updates will be applied.\n`;
|
|
287
289
|
};
|
|
288
290
|
exports.renderNoUpdatesApplied = renderNoUpdatesApplied;
|
|
@@ -297,7 +299,7 @@ exports.renderNoUpdatesApplied = renderNoUpdatesApplied;
|
|
|
297
299
|
* ```
|
|
298
300
|
*/
|
|
299
301
|
const renderWillApplyUpdates = (isDryRun) => {
|
|
300
|
-
const prefix = isDryRun ? `${
|
|
302
|
+
const prefix = isDryRun ? `${renderer_1.dryRunTag} ` : '';
|
|
301
303
|
return `\n${prefix}Will apply the following updates:\n`;
|
|
302
304
|
};
|
|
303
305
|
exports.renderWillApplyUpdates = renderWillApplyUpdates;
|
|
@@ -308,7 +310,7 @@ exports.renderWillApplyUpdates = renderWillApplyUpdates;
|
|
|
308
310
|
* [!] Confirmation needed.
|
|
309
311
|
* ```
|
|
310
312
|
*/
|
|
311
|
-
const renderConfirmationNeededSoftWarning = () =>
|
|
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 = () =>
|
|
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 = () =>
|
|
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) =>
|
|
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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrument-uninstrument-renderer.js","sourceRoot":"","sources":["../../../../src/commands/lambda/renderers/instrument-uninstrument-renderer.ts"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"instrument-uninstrument-renderer.js","sourceRoot":"","sources":["../../../../src/commands/lambda/renderers/instrument-uninstrument-renderer.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,8CAAqB;AAErB,wDAOkC;AAGlC,kDAAmD;AAEnD;;;;;;;GAOG;AACI,MAAM,kBAAkB,GAAG,CAAC,WAAoD,EAAE,QAAiB,EAAE,EAAE;IAC5G,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,oBAAS,GAAG,CAAC,CAAC,CAAC,EAAE,CAAA;IAE9C,IAAI,WAAW,GAAG,eAAe,C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,EAAC;IACF,KAAK,EAAE,SAAS;IAChB,YAAY,EAAE,KAAK;IACnB,IAAI,EAAE,YAAY,eAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,eAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,eAAe;CAC9F,CAAC,CAAA;AALS,QAAA,wBAAwB,4BAKjC;AAEJ;;;;;;;;;GASG;AACI,MAAM,wCAAwC,GAAG,CAAC,MAAc,EAAE,SAAiB,EAAE,EAAE,CAC5F,IAAA,aAAG,EAAC;IACF,KAAK,EAAE,SAAS;IAChB,YAAY,EAAE,KAAK;IACnB,IAAI,EAAE,GAAG,eAAK,CAAC,IAAI,CAAC,IAAI,MAAM,GAAG,CAAC,aAAa,eAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,eAAK;SAC1E,GAAG,CAAC,SAAS,CAAC;SACd,IAAI,CAAC,QAAQ,CAAC,eAAe;CACjC,CAAC,CAAA;AAPS,QAAA,wCAAwC,4CAOjD"}
|
|
@@ -11,15 +11,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.hasVersionTag = exports.calculateTagRemoveRequest = exports.calculateTagUpdateRequest = exports.untagResource = exports.tagResource = exports.applyTagConfig = void 0;
|
|
13
13
|
const client_lambda_1 = require("@aws-sdk/client-lambda");
|
|
14
|
+
const version_1 = require("../../helpers/version");
|
|
14
15
|
const constants_1 = require("./constants");
|
|
15
|
-
const { version } = require('../../../package.json');
|
|
16
16
|
const applyTagConfig = (lambdaClient, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
17
|
const { tagResourceCommandInput, untagResourceCommandInput } = config;
|
|
18
18
|
if (tagResourceCommandInput !== undefined) {
|
|
19
|
-
yield exports.tagResource(lambdaClient, tagResourceCommandInput);
|
|
19
|
+
yield (0, exports.tagResource)(lambdaClient, tagResourceCommandInput);
|
|
20
20
|
}
|
|
21
21
|
if (untagResourceCommandInput !== undefined) {
|
|
22
|
-
yield exports.untagResource(lambdaClient, untagResourceCommandInput);
|
|
22
|
+
yield (0, exports.untagResource)(lambdaClient, untagResourceCommandInput);
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
exports.applyTagConfig = applyTagConfig;
|
|
@@ -35,12 +35,12 @@ const untagResource = (client, input) => __awaiter(void 0, void 0, void 0, funct
|
|
|
35
35
|
exports.untagResource = untagResource;
|
|
36
36
|
const calculateTagUpdateRequest = (lambdaClient, functionARN) => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
37
|
const config = {};
|
|
38
|
-
const versionTagPresent = yield exports.hasVersionTag(lambdaClient, functionARN);
|
|
38
|
+
const versionTagPresent = yield (0, exports.hasVersionTag)(lambdaClient, functionARN);
|
|
39
39
|
if (!versionTagPresent) {
|
|
40
40
|
config.tagResourceCommandInput = {
|
|
41
41
|
Resource: functionARN,
|
|
42
42
|
Tags: {
|
|
43
|
-
[constants_1.TAG_VERSION_NAME]: `v${version}`,
|
|
43
|
+
[constants_1.TAG_VERSION_NAME]: `v${version_1.version}`,
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
46
|
return config;
|
|
@@ -50,7 +50,7 @@ const calculateTagUpdateRequest = (lambdaClient, functionARN) => __awaiter(void
|
|
|
50
50
|
exports.calculateTagUpdateRequest = calculateTagUpdateRequest;
|
|
51
51
|
const calculateTagRemoveRequest = (lambdaClient, functionARN) => __awaiter(void 0, void 0, void 0, function* () {
|
|
52
52
|
const config = {};
|
|
53
|
-
const versionTagPresent = yield exports.hasVersionTag(lambdaClient, functionARN);
|
|
53
|
+
const versionTagPresent = yield (0, exports.hasVersionTag)(lambdaClient, functionARN);
|
|
54
54
|
if (versionTagPresent) {
|
|
55
55
|
config.untagResourceCommandInput = {
|
|
56
56
|
Resource: functionARN,
|
|
@@ -68,7 +68,7 @@ const hasVersionTag = (client, functionARN) => __awaiter(void 0, void 0, void 0,
|
|
|
68
68
|
const command = new client_lambda_1.ListTagsCommand(input);
|
|
69
69
|
const response = yield client.send(command);
|
|
70
70
|
const { Tags } = response;
|
|
71
|
-
return Tags !== undefined && Tags[constants_1.TAG_VERSION_NAME] === `v${version}`;
|
|
71
|
+
return Tags !== undefined && Tags[constants_1.TAG_VERSION_NAME] === `v${version_1.version}`;
|
|
72
72
|
});
|
|
73
73
|
exports.hasVersionTag = hasVersionTag;
|
|
74
74
|
//# sourceMappingURL=tags.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tags.js","sourceRoot":"","sources":["../../../src/commands/lambda/tags.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0DAQ+B;AAE/B,
|
|
1
|
+
{"version":3,"file":"tags.js","sourceRoot":"","sources":["../../../src/commands/lambda/tags.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0DAQ+B;AAE/B,mDAA6C;AAE7C,2CAA4C;AAGrC,MAAM,cAAc,GAAG,CAAO,YAA0B,EAAE,MAAwB,EAAE,EAAE;IAC3F,MAAM,EAAC,uBAAuB,EAAE,yBAAyB,EAAC,GAAG,MAAM,CAAA;IACnE,IAAI,uBAAuB,KAAK,SAAS,EAAE;QACzC,MAAM,IAAA,mBAAW,EAAC,YAAY,EAAE,uBAAuB,CAAC,CAAA;KACzD;IACD,IAAI,yBAAyB,KAAK,SAAS,EAAE;QAC3C,MAAM,IAAA,qBAAa,EAAC,YAAY,EAAE,yBAAyB,CAAC,CAAA;KAC7D;AACH,CAAC,CAAA,CAAA;AARY,QAAA,cAAc,kBAQ1B;AAEM,MAAM,WAAW,GAAG,CAAO,MAAoB,EAAE,KAA8B,EAAE,EAAE;IACxF,MAAM,OAAO,GAAG,IAAI,kCAAkB,CAAC,KAAK,CAAC,CAAA;IAC7C,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;AAC5B,CAAC,CAAA,CAAA;AAHY,QAAA,WAAW,eAGvB;AAEM,MAAM,aAA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,IAAI,+BAAe,CAAC,KAAK,CAAC,CAAA;IAC1C,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC3C,MAAM,EAAC,IAAI,EAAC,GAAG,QAAQ,CAAA;IAEvB,OAAO,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,4BAAgB,CAAC,KAAK,IAAI,iBAAO,EAAE,CAAA;AACvE,CAAC,CAAA,CAAA;AATY,QAAA,aAAa,iBASzB"}
|
|
@@ -1,15 +1,33 @@
|
|
|
1
1
|
import { Command } from 'clipanion';
|
|
2
2
|
export declare class UninstrumentCommand extends Command {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
static paths: string[][];
|
|
4
|
+
static usage: import("clipanion").Usage;
|
|
5
|
+
private configPath;
|
|
5
6
|
private dryRun;
|
|
6
|
-
private forwarder
|
|
7
|
+
private forwarder;
|
|
7
8
|
private functions;
|
|
8
9
|
private interactive;
|
|
9
|
-
private profile
|
|
10
|
-
private regExPattern
|
|
11
|
-
private region
|
|
10
|
+
private profile;
|
|
11
|
+
private regExPattern;
|
|
12
|
+
private region;
|
|
13
|
+
/**
|
|
14
|
+
* Arguments that are not really in use, but to
|
|
15
|
+
* make uninstrumentation easier for the user.
|
|
16
|
+
*/
|
|
17
|
+
private layerVersion;
|
|
18
|
+
private tracing;
|
|
19
|
+
private logLevel;
|
|
20
|
+
private service;
|
|
21
|
+
private environment;
|
|
22
|
+
private version;
|
|
23
|
+
private apmFlushDeadline;
|
|
24
|
+
private extraTags;
|
|
25
|
+
private extensionVersion;
|
|
26
|
+
private mergeXrayTraces;
|
|
27
|
+
private flushMetricsToLogs;
|
|
28
|
+
private captureLambdaPayload;
|
|
29
|
+
private config;
|
|
12
30
|
private credentials?;
|
|
13
|
-
execute(): Promise<
|
|
31
|
+
execute(): Promise<0 | 1>;
|
|
14
32
|
private printPlannedActions;
|
|
15
33
|
}
|