@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../../../src/commands/synthetics/tunnel/websocket.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../../../src/commands/synthetics/tunnel/websocket.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAyC;AAIzC,yCAAoE;AAEpE,MAAa,SAAU,SAAQ,qBAAY;IAKzC,YAAoB,GAAW,EAAU,UAAkC;QACzE,KAAK,EAAE,CAAA;QADW,QAAG,GAAH,GAAG,CAAQ;QAAU,eAAU,GAAV,UAAU,CAAwB;IAE3E,CAAC;IAED;;OAEG;IACU,KAAK,CAAC,eAAe,GAAG,IAAI;;YACvC,IAAI,IAAI,CAAC,SAAS,EAAE;gBAClB,IAAI,CAAC,SAAS,CAAC,kBAAkB,EAAE,CAAA;gBACnC,IAAI,IAAI,CAAC,SAAS,CAAC,UAAU,KAAK,YAAe,CAAC,IAAI,EAAE;oBACtD,IAAI,eAAe,EAAE;wBACnB,8BAA8B;wBAC9B,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAA;wBACtB,MAAM,IAAA,aAAI,EAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;qBACpC;oBACD,iCAA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,MAAM,CAAC,KAAK,CAAC,0DAA0D,GAAG,CAAC,UAAU,MAAM,IAAI,EAAE,CAAC,CAAC,CAAA;YACrG,CAAC,CAAC,CAAA;YACF,GAAG,CAAC,GAAG,EAAE,CAAA;YACT,GAAG,CAAC,OAAO,EAAE,CAAA;QACf,CAAC,CAAC,CAAA;QAEF,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;YAC7B,OAAO,EAAE,CAAA;QACX,CAAC,CAAC,CAAA;IACJ,CAAC;CACF;AAlID,8BAkIC"}
|
|
@@ -2,15 +2,17 @@ import { Command } from 'clipanion';
|
|
|
2
2
|
import { UploadApplicationCommandConfig } from './interfaces';
|
|
3
3
|
export declare const DEFAULT_UPLOAD_COMMAND_CONFIG: UploadApplicationCommandConfig;
|
|
4
4
|
export declare class UploadApplicationCommand extends Command {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
private
|
|
5
|
+
static paths: string[][];
|
|
6
|
+
static usage: import("clipanion").Usage;
|
|
7
|
+
private apiKey;
|
|
8
|
+
private appKey;
|
|
9
|
+
private configPath;
|
|
10
|
+
private datadogSite;
|
|
11
|
+
private mobileApplicationVersionFilePath;
|
|
12
|
+
private mobileApplicationId;
|
|
13
|
+
private versionName;
|
|
14
|
+
private latest;
|
|
8
15
|
private config;
|
|
9
|
-
private datadogSite?;
|
|
10
|
-
private mobileApplicationVersionFilePath?;
|
|
11
|
-
private mobileApplicationId?;
|
|
12
|
-
private versionName?;
|
|
13
|
-
private latest?;
|
|
14
16
|
private logger;
|
|
15
17
|
execute(): Promise<1 | undefined>;
|
|
16
18
|
private resolveConfig;
|
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.UploadApplicationCommand = exports.DEFAULT_UPLOAD_COMMAND_CONFIG = void 0;
|
|
16
16
|
const clipanion_1 = require("clipanion");
|
|
17
17
|
const deep_extend_1 = __importDefault(require("deep-extend"));
|
|
18
|
+
const terminal_link_1 = __importDefault(require("terminal-link"));
|
|
18
19
|
const logger_1 = require("../../helpers/logger");
|
|
19
20
|
const utils_1 = require("../../helpers/utils");
|
|
20
21
|
const api_1 = require("./api");
|
|
@@ -31,9 +32,25 @@ exports.DEFAULT_UPLOAD_COMMAND_CONFIG = {
|
|
|
31
32
|
versionName: '',
|
|
32
33
|
latest: false,
|
|
33
34
|
};
|
|
35
|
+
const configurationLink = 'https://docs.datadoghq.com/continuous_testing/cicd_integrations/configuration';
|
|
36
|
+
const $1 = (text) => (0, terminal_link_1.default)(text, `${configurationLink}#global-configuration-file-options`);
|
|
34
37
|
class UploadApplicationCommand extends clipanion_1.Command {
|
|
35
38
|
constructor() {
|
|
36
39
|
super(...arguments);
|
|
40
|
+
this.apiKey = clipanion_1.Option.String('--apiKey', { description: 'The API key used to query the Datadog API.' });
|
|
41
|
+
this.appKey = clipanion_1.Option.String('--appKey', { description: 'The application key used to query the Datadog API.' });
|
|
42
|
+
this.configPath = clipanion_1.Option.String('--config', { description: `Pass a path to a ${$1('global configuration file')}.` });
|
|
43
|
+
this.datadogSite = clipanion_1.Option.String('--datadogSite', { description: 'The Datadog instance to which request is sent.' });
|
|
44
|
+
this.mobileApplicationVersionFilePath = clipanion_1.Option.String('--mobileApp,--mobileApplicationVersionFilePath', {
|
|
45
|
+
description: 'Override the application version for all Synthetic mobile application tests.',
|
|
46
|
+
});
|
|
47
|
+
this.mobileApplicationId = clipanion_1.Option.String('--mobileApplicationId', {
|
|
48
|
+
description: 'ID of the application you want to upload the new version to.',
|
|
49
|
+
});
|
|
50
|
+
this.versionName = clipanion_1.Option.String('--versionName', { description: 'Name of the new version. It has to be unique.' });
|
|
51
|
+
this.latest = clipanion_1.Option.Boolean('--latest', {
|
|
52
|
+
description: 'Marks the application as `latest`. Any tests that run on the latest version will use this version on their next run.',
|
|
53
|
+
});
|
|
37
54
|
this.config = JSON.parse(JSON.stringify(exports.DEFAULT_UPLOAD_COMMAND_CONFIG)); // Deep copy to avoid mutation during unit tests
|
|
38
55
|
this.logger = new logger_1.Logger((s) => {
|
|
39
56
|
this.context.stdout.write(s);
|
|
@@ -49,7 +66,7 @@ class UploadApplicationCommand extends clipanion_1.Command {
|
|
|
49
66
|
return 1;
|
|
50
67
|
}
|
|
51
68
|
try {
|
|
52
|
-
const version = yield mobile_1.uploadMobileApplicationVersion(this.config);
|
|
69
|
+
const version = yield (0, mobile_1.uploadMobileApplicationVersion)(this.config);
|
|
53
70
|
this.logger.info(`Created new version ${version.version_name}, with version ID: ${version.id}`);
|
|
54
71
|
}
|
|
55
72
|
catch (error) {
|
|
@@ -64,7 +81,7 @@ class UploadApplicationCommand extends clipanion_1.Command {
|
|
|
64
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
82
|
// Defaults < file < ENV < CLI
|
|
66
83
|
try {
|
|
67
|
-
this.config = yield utils_1.resolveConfigFromFile(this.config, {
|
|
84
|
+
this.config = yield (0, utils_1.resolveConfigFromFile)(this.config, {
|
|
68
85
|
configPath: this.configPath,
|
|
69
86
|
defaultConfigPaths: [this.config.configPath],
|
|
70
87
|
});
|
|
@@ -74,13 +91,13 @@ class UploadApplicationCommand extends clipanion_1.Command {
|
|
|
74
91
|
throw error;
|
|
75
92
|
}
|
|
76
93
|
}
|
|
77
|
-
this.config = deep_extend_1.default(this.config, utils_1.removeUndefinedValues({
|
|
94
|
+
this.config = (0, deep_extend_1.default)(this.config, (0, utils_1.removeUndefinedValues)({
|
|
78
95
|
apiKey: process.env.DATADOG_API_KEY,
|
|
79
96
|
appKey: process.env.DATADOG_APP_KEY,
|
|
80
97
|
datadogSite: process.env.DATADOG_SITE,
|
|
81
98
|
}));
|
|
82
99
|
// Override with CLI parameters
|
|
83
|
-
this.config = deep_extend_1.default(this.config, utils_1.removeUndefinedValues({
|
|
100
|
+
this.config = (0, deep_extend_1.default)(this.config, (0, utils_1.removeUndefinedValues)({
|
|
84
101
|
apiKey: this.apiKey,
|
|
85
102
|
appKey: this.appKey,
|
|
86
103
|
configPath: this.configPath,
|
|
@@ -94,13 +111,19 @@ class UploadApplicationCommand extends clipanion_1.Command {
|
|
|
94
111
|
}
|
|
95
112
|
}
|
|
96
113
|
exports.UploadApplicationCommand = UploadApplicationCommand;
|
|
97
|
-
UploadApplicationCommand.
|
|
98
|
-
UploadApplicationCommand.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
114
|
+
UploadApplicationCommand.paths = [['synthetics', 'upload-application']];
|
|
115
|
+
UploadApplicationCommand.usage = clipanion_1.Command.Usage({
|
|
116
|
+
category: 'Synthetics',
|
|
117
|
+
description: 'Upload a new version to an existing application in Datadog.',
|
|
118
|
+
details: `
|
|
119
|
+
This command will upload a \`.apk\` or \`.ipa\` file as a new version for a given application, which already exists in Datadog.\n
|
|
120
|
+
https://docs.datadoghq.com/mobile_app_testing/mobile_app_tests
|
|
121
|
+
`,
|
|
122
|
+
examples: [
|
|
123
|
+
[
|
|
124
|
+
'Upload version `example 1.0` and mark it as latest',
|
|
125
|
+
"datadog-ci synthetics upload-application --mobileApplicationId '123-123-123' --mobileApplicationVersionFilePath example/test.apk --versionName 'example 1.0' --latest",
|
|
126
|
+
],
|
|
127
|
+
],
|
|
128
|
+
});
|
|
106
129
|
//# sourceMappingURL=upload-application-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-application-command.js","sourceRoot":"","sources":["../../../src/commands/synthetics/upload-application-command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"upload-application-command.js","sourceRoot":"","sources":["../../../src/commands/synthetics/upload-application-command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yCAAyC;AACzC,8DAAoC;AACpC,kEAAwC;AAExC,iDAAqD;AACrD,+CAAgF;AAEhF,+BAAmC;AACnC,qCAA+C;AAE/C,qCAAuD;AAE1C,QAAA,6BAA6B,GAAmC;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
|
|
|
6
6
|
[key in Operator]: string;
|
|
7
7
|
};
|
|
8
8
|
export declare let ciTriggerApp: string;
|
|
9
|
-
export declare const getOverriddenConfig: (test: Test, publicId: string, reporter: MainReporter, config?: UserConfigOverride
|
|
9
|
+
export declare const getOverriddenConfig: (test: Test, publicId: string, reporter: MainReporter, config?: UserConfigOverride) => TestPayload;
|
|
10
10
|
export declare const setCiTriggerApp: (source: string) => void;
|
|
11
|
-
export declare const getExecutionRule: (test?: Test
|
|
12
|
-
export declare const getStrictestExecutionRule: (configRule: ExecutionRule, testRule?: ExecutionRule
|
|
11
|
+
export declare const getExecutionRule: (test?: Test, configOverride?: UserConfigOverride) => ExecutionRule;
|
|
12
|
+
export declare const getStrictestExecutionRule: (configRule: ExecutionRule, testRule?: ExecutionRule) => ExecutionRule;
|
|
13
13
|
export declare const isTestSupportedByTunnel: (test: Test) => boolean | undefined;
|
|
14
14
|
export declare const hasResultPassed: (result: ServerResult, hasTimedOut: boolean, failOnCriticalErrors: boolean, failOnTimeout: boolean) => boolean;
|
|
15
15
|
export declare const enum ResultOutcome {
|
|
@@ -29,24 +29,24 @@ export declare const waitForResults: (api: APIHelper, trigger: Trigger, tests: T
|
|
|
29
29
|
failOnTimeout?: boolean;
|
|
30
30
|
maxPollingTimeout: number;
|
|
31
31
|
subdomain: string;
|
|
32
|
-
}, reporter: MainReporter, tunnel?: Tunnel
|
|
33
|
-
export
|
|
32
|
+
}, reporter: MainReporter, tunnel?: Tunnel) => Promise<Result[]>;
|
|
33
|
+
export type InitialSummary = Omit<Summary, 'batchId'>;
|
|
34
34
|
export declare const createInitialSummary: () => InitialSummary;
|
|
35
35
|
export declare const getResultDuration: (result: ServerResult) => number;
|
|
36
36
|
export declare const getReporter: (reporters: Reporter[]) => MainReporter;
|
|
37
|
-
|
|
37
|
+
type NotFound = {
|
|
38
38
|
errorMessage: string;
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
type Skipped = {
|
|
41
41
|
overriddenConfig: TestPayload;
|
|
42
42
|
};
|
|
43
|
-
|
|
43
|
+
type TestWithOverride = {
|
|
44
44
|
test: Test;
|
|
45
45
|
overriddenConfig: TestPayload;
|
|
46
46
|
};
|
|
47
|
-
export declare const getTestAndOverrideConfig: (api: APIHelper, { config, id, suite }: TriggerConfig, reporter: MainReporter, summary: InitialSummary, isTunnelEnabled?: boolean
|
|
47
|
+
export declare const getTestAndOverrideConfig: (api: APIHelper, { config, id, suite }: TriggerConfig, reporter: MainReporter, summary: InitialSummary, isTunnelEnabled?: boolean) => Promise<NotFound | Skipped | TestWithOverride>;
|
|
48
48
|
export declare const isDeviceIdSet: (result: ServerResult) => result is Required<BrowserServerResult>;
|
|
49
|
-
export declare const getTestsToTrigger: (api: APIHelper, triggerConfigs: TriggerConfig[], reporter: MainReporter, triggerFromSearch?: boolean
|
|
49
|
+
export declare const getTestsToTrigger: (api: APIHelper, triggerConfigs: TriggerConfig[], reporter: MainReporter, triggerFromSearch?: boolean, failOnMissingTests?: boolean, isTunnelEnabled?: boolean) => Promise<{
|
|
50
50
|
tests: Test[];
|
|
51
51
|
overriddenTestsToTrigger: TestPayload[];
|
|
52
52
|
initialSummary: InitialSummary;
|
|
@@ -83,8 +83,8 @@ export declare const getExitReason: (config: Pick<RunTestsCommandConfig, 'failOn
|
|
|
83
83
|
results?: Result[] | undefined;
|
|
84
84
|
error?: unknown;
|
|
85
85
|
}) => "passed" | "failing-tests" | "missing-tests" | "critical-error";
|
|
86
|
-
export
|
|
87
|
-
export declare const toExitCode: (reason: ExitReason) =>
|
|
86
|
+
export type ExitReason = ReturnType<typeof getExitReason>;
|
|
87
|
+
export declare const toExitCode: (reason: ExitReason) => 0 | 1;
|
|
88
88
|
export declare const getDatadogHost: (hostConfig: {
|
|
89
89
|
apiVersion: 'v1' | 'unstable';
|
|
90
90
|
config: APIHelperConfig;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -71,7 +75,7 @@ exports.readableOperation = {
|
|
|
71
75
|
const template = (st, context) => st.replace(TEMPLATE_REGEX, (match, p1) => (p1 in context ? context[p1] : match));
|
|
72
76
|
exports.ciTriggerApp = process_1.default.env.DATADOG_SYNTHETICS_CI_TRIGGER_APP || 'npm_package';
|
|
73
77
|
const getOverriddenConfig = (test, publicId, reporter, config) => {
|
|
74
|
-
const executionRule = exports.getExecutionRule(test, config);
|
|
78
|
+
const executionRule = (0, exports.getExecutionRule)(test, config);
|
|
75
79
|
let overriddenConfig = {
|
|
76
80
|
executionRule,
|
|
77
81
|
public_id: publicId,
|
|
@@ -79,7 +83,7 @@ const getOverriddenConfig = (test, publicId, reporter, config) => {
|
|
|
79
83
|
if (!config || !Object.keys(config).length) {
|
|
80
84
|
return overriddenConfig;
|
|
81
85
|
}
|
|
82
|
-
overriddenConfig = Object.assign(Object.assign({}, overriddenConfig), utils_1.pick(config, [
|
|
86
|
+
overriddenConfig = Object.assign(Object.assign({}, overriddenConfig), (0, utils_1.pick)(config, [
|
|
83
87
|
'allowInsecureCertificates',
|
|
84
88
|
'basicAuth',
|
|
85
89
|
'body',
|
|
@@ -110,7 +114,7 @@ exports.setCiTriggerApp = setCiTriggerApp;
|
|
|
110
114
|
const getExecutionRule = (test, configOverride) => {
|
|
111
115
|
var _a, _b, _c, _d;
|
|
112
116
|
if (configOverride && configOverride.executionRule) {
|
|
113
|
-
return exports.getStrictestExecutionRule(configOverride.executionRule, (_b = (_a = test === null || test === void 0 ? void 0 : test.options) === null || _a === void 0 ? void 0 : _a.ci) === null || _b === void 0 ? void 0 : _b.executionRule);
|
|
117
|
+
return (0, exports.getStrictestExecutionRule)(configOverride.executionRule, (_b = (_a = test === null || test === void 0 ? void 0 : test.options) === null || _a === void 0 ? void 0 : _a.ci) === null || _b === void 0 ? void 0 : _b.executionRule);
|
|
114
118
|
}
|
|
115
119
|
return ((_d = (_c = test === null || test === void 0 ? void 0 : test.options) === null || _c === void 0 ? void 0 : _c.ci) === null || _d === void 0 ? void 0 : _d.executionRule) || interfaces_1.ExecutionRule.BLOCKING;
|
|
116
120
|
};
|
|
@@ -155,19 +159,19 @@ const getResultOutcome = (result) => {
|
|
|
155
159
|
const executionRule = result.executionRule;
|
|
156
160
|
if (result.passed) {
|
|
157
161
|
if (executionRule === interfaces_1.ExecutionRule.NON_BLOCKING) {
|
|
158
|
-
return "passed-non-blocking" /* PassedNonBlocking */;
|
|
162
|
+
return "passed-non-blocking" /* ResultOutcome.PassedNonBlocking */;
|
|
159
163
|
}
|
|
160
|
-
return "passed" /* Passed */;
|
|
164
|
+
return "passed" /* ResultOutcome.Passed */;
|
|
161
165
|
}
|
|
162
166
|
if (executionRule === interfaces_1.ExecutionRule.NON_BLOCKING) {
|
|
163
|
-
return "failed-non-blocking" /* FailedNonBlocking */;
|
|
167
|
+
return "failed-non-blocking" /* ResultOutcome.FailedNonBlocking */;
|
|
164
168
|
}
|
|
165
|
-
return "failed" /* Failed */;
|
|
169
|
+
return "failed" /* ResultOutcome.Failed */;
|
|
166
170
|
};
|
|
167
171
|
exports.getResultOutcome = getResultOutcome;
|
|
168
172
|
const getSuites = (GLOB, reporter) => __awaiter(void 0, void 0, void 0, function* () {
|
|
169
173
|
reporter.log(`Finding files in ${path.join(process_1.default.cwd(), GLOB)}\n`);
|
|
170
|
-
const files = yield util_1.promisify(glob_1.default)(GLOB);
|
|
174
|
+
const files = yield (0, util_1.promisify)(glob_1.default)(GLOB);
|
|
171
175
|
if (files.length) {
|
|
172
176
|
reporter.log(`\nGot test files:\n${files.map((file) => ` - ${file}\n`).join('')}\n`);
|
|
173
177
|
}
|
|
@@ -176,8 +180,8 @@ const getSuites = (GLOB, reporter) => __awaiter(void 0, void 0, void 0, function
|
|
|
176
180
|
}
|
|
177
181
|
return Promise.all(files.map((file) => __awaiter(void 0, void 0, void 0, function* () {
|
|
178
182
|
try {
|
|
179
|
-
const content = yield util_1.promisify(fs.readFile)(file, 'utf8');
|
|
180
|
-
const suiteName = yield exports.getFilePathRelativeToRepo(file);
|
|
183
|
+
const content = yield (0, util_1.promisify)(fs.readFile)(file, 'utf8');
|
|
184
|
+
const suiteName = yield (0, exports.getFilePathRelativeToRepo)(file);
|
|
181
185
|
return { name: suiteName, content: JSON.parse(content) };
|
|
182
186
|
}
|
|
183
187
|
catch (e) {
|
|
@@ -191,7 +195,7 @@ const getFilePathRelativeToRepo = (filePath) => __awaiter(void 0, void 0, void 0
|
|
|
191
195
|
const filename = path.basename(filePath);
|
|
192
196
|
let relativeDirectory;
|
|
193
197
|
try {
|
|
194
|
-
const { stdout } = yield util_1.promisify(child_process_1.exec)('git rev-parse --show-toplevel');
|
|
198
|
+
const { stdout } = yield (0, util_1.promisify)(child_process_1.exec)('git rev-parse --show-toplevel');
|
|
195
199
|
const repoTopLevel = stdout.trim();
|
|
196
200
|
relativeDirectory = path.relative(repoTopLevel, parentDirectory);
|
|
197
201
|
}
|
|
@@ -217,7 +221,7 @@ const getBatch = (api, emittedResultIndexes, trigger, reporter) => __awaiter(voi
|
|
|
217
221
|
return currentBatch;
|
|
218
222
|
}
|
|
219
223
|
catch (e) {
|
|
220
|
-
throw new api_1.EndpointError(`Failed to get batch: ${api_1.formatBackendErrors(e)}\n`, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status);
|
|
224
|
+
throw new api_1.EndpointError(`Failed to get batch: ${(0, api_1.formatBackendErrors)(e)}\n`, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status);
|
|
221
225
|
}
|
|
222
226
|
});
|
|
223
227
|
const getTestByPublicId = (id, tests) => tests.find((t) => t.public_id === id);
|
|
@@ -230,16 +234,16 @@ const getPollResultMap = (api, batch) => __awaiter(void 0, void 0, void 0, funct
|
|
|
230
234
|
return pollResultMap;
|
|
231
235
|
}
|
|
232
236
|
catch (e) {
|
|
233
|
-
throw new api_1.EndpointError(`Failed to poll results: ${api_1.formatBackendErrors(e)}\n`, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status);
|
|
237
|
+
throw new api_1.EndpointError(`Failed to poll results: ${(0, api_1.formatBackendErrors)(e)}\n`, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status);
|
|
234
238
|
}
|
|
235
239
|
});
|
|
236
240
|
const getOrgSettings = (reporter, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
237
|
-
const apiHelper = api_1.getApiHelper(config);
|
|
241
|
+
const apiHelper = (0, api_1.getApiHelper)(config);
|
|
238
242
|
try {
|
|
239
243
|
return yield apiHelper.getSyntheticsOrgSettings();
|
|
240
244
|
}
|
|
241
245
|
catch (e) {
|
|
242
|
-
reporter.error(`Failed to get settings: ${api_1.formatBackendErrors(e)}`);
|
|
246
|
+
reporter.error(`Failed to get settings: ${(0, api_1.formatBackendErrors)(e)}`);
|
|
243
247
|
}
|
|
244
248
|
});
|
|
245
249
|
exports.getOrgSettings = getOrgSettings;
|
|
@@ -251,7 +255,7 @@ const waitForBatchToFinish = (api, maxPollingTimeout, trigger, reporter) => __aw
|
|
|
251
255
|
// let's add a check to ensure it eventually times out.
|
|
252
256
|
let hasExceededMaxPollingDate = Date.now() >= maxPollingDate;
|
|
253
257
|
while (batch.status === 'in_progress' && !hasExceededMaxPollingDate) {
|
|
254
|
-
yield exports.wait(POLLING_INTERVAL);
|
|
258
|
+
yield (0, exports.wait)(POLLING_INTERVAL);
|
|
255
259
|
batch = yield getBatch(api, emittedResultIndexes, trigger, reporter);
|
|
256
260
|
hasExceededMaxPollingDate = Date.now() >= maxPollingDate;
|
|
257
261
|
}
|
|
@@ -268,10 +272,10 @@ const getResultFromBatch = (getLocation, hasExceededMaxPollingDate, failOnCritic
|
|
|
268
272
|
return {
|
|
269
273
|
executionRule: resultInBatch.execution_rule,
|
|
270
274
|
location: getLocation(resultInBatch.location, test),
|
|
271
|
-
passed: exports.hasResultPassed(pollResult.result, hasTimeout, failOnCriticalErrors, failOnTimeout),
|
|
275
|
+
passed: (0, exports.hasResultPassed)(pollResult.result, hasTimeout, failOnCriticalErrors, failOnTimeout),
|
|
272
276
|
result: pollResult.result,
|
|
273
277
|
resultId: resultInBatch.result_id,
|
|
274
|
-
test: deep_extend_1.default({}, test, pollResult.check),
|
|
278
|
+
test: (0, deep_extend_1.default)({}, test, pollResult.check),
|
|
275
279
|
timedOut: hasTimeout,
|
|
276
280
|
timestamp: pollResult.timestamp,
|
|
277
281
|
};
|
|
@@ -285,7 +289,7 @@ const waitForResults = (api, trigger, tests, options, reporter, tunnel) => __awa
|
|
|
285
289
|
.then(() => (isTunnelConnected = false))
|
|
286
290
|
.catch(() => (isTunnelConnected = false));
|
|
287
291
|
}
|
|
288
|
-
reporter.testsWait(tests, exports.getAppBaseURL(options), trigger.batch_id);
|
|
292
|
+
reporter.testsWait(tests, (0, exports.getAppBaseURL)(options), trigger.batch_id);
|
|
289
293
|
const { batch, hasExceededMaxPollingDate } = yield waitForBatchToFinish(api, options.maxPollingTimeout, trigger, reporter);
|
|
290
294
|
if (tunnel && !isTunnelConnected) {
|
|
291
295
|
reporter.error('The tunnel has stopped working, this may have affected the results.');
|
|
@@ -295,7 +299,7 @@ const waitForResults = (api, trigger, tests, options, reporter, tunnel) => __awa
|
|
|
295
299
|
return mapping;
|
|
296
300
|
}, {});
|
|
297
301
|
const getLocation = (dcId, test) => {
|
|
298
|
-
const hasTunnel = !!tunnel && exports.isTestSupportedByTunnel(test);
|
|
302
|
+
const hasTunnel = !!tunnel && (0, exports.isTestSupportedByTunnel)(test);
|
|
299
303
|
return hasTunnel ? 'Tunneled' : locationNames[dcId] || dcId;
|
|
300
304
|
};
|
|
301
305
|
const pollResultMap = yield getPollResultMap(api, batch);
|
|
@@ -406,11 +410,11 @@ const getTest = (api, { id, suite }) => __awaiter(void 0, void 0, void 0, functi
|
|
|
406
410
|
return { test };
|
|
407
411
|
}
|
|
408
412
|
catch (error) {
|
|
409
|
-
if (api_1.isNotFoundError(error)) {
|
|
410
|
-
const errorMessage = api_1.formatBackendErrors(error);
|
|
413
|
+
if ((0, api_1.isNotFoundError)(error)) {
|
|
414
|
+
const errorMessage = (0, api_1.formatBackendErrors)(error);
|
|
411
415
|
return { errorMessage: `[${chalk_1.default.bold.dim(id)}] ${chalk_1.default.yellow.bold('Test not found')}: ${errorMessage}` };
|
|
412
416
|
}
|
|
413
|
-
throw new api_1.EndpointError(`Failed to get test: ${api_1.formatBackendErrors(error)}\n`, (_d = error.response) === null || _d === void 0 ? void 0 : _d.status);
|
|
417
|
+
throw new api_1.EndpointError(`Failed to get test: ${(0, api_1.formatBackendErrors)(error)}\n`, (_d = error.response) === null || _d === void 0 ? void 0 : _d.status);
|
|
414
418
|
}
|
|
415
419
|
});
|
|
416
420
|
// XXX: We shouldn't export functions that take an `APIHelper` because the `utils` module is exported while `api` is not.
|
|
@@ -422,14 +426,14 @@ const getTestAndOverrideConfig = (api, { config, id, suite }, reporter, summary,
|
|
|
422
426
|
return { errorMessage: testResult.errorMessage };
|
|
423
427
|
}
|
|
424
428
|
const { test } = testResult;
|
|
425
|
-
const overriddenConfig = exports.getOverriddenConfig(test, normalizedId, reporter, config);
|
|
429
|
+
const overriddenConfig = (0, exports.getOverriddenConfig)(test, normalizedId, reporter, config);
|
|
426
430
|
reporter.testTrigger(test, normalizedId, overriddenConfig.executionRule, config);
|
|
427
431
|
if (overriddenConfig.executionRule === interfaces_1.ExecutionRule.SKIPPED) {
|
|
428
432
|
summary.skipped++;
|
|
429
433
|
return { overriddenConfig };
|
|
430
434
|
}
|
|
431
435
|
reporter.testWait(test);
|
|
432
|
-
if (isTunnelEnabled && !exports.isTestSupportedByTunnel(test)) {
|
|
436
|
+
if (isTunnelEnabled && !(0, exports.isTestSupportedByTunnel)(test)) {
|
|
433
437
|
const details = [`public ID: ${test.public_id}`, `type: ${test.type}`];
|
|
434
438
|
if (test.subtype) {
|
|
435
439
|
details.push(`sub-type: ${test.subtype}`);
|
|
@@ -457,8 +461,8 @@ const getTestsToTrigger = (api, triggerConfigs, reporter, triggerFromSearch, fai
|
|
|
457
461
|
const maxTests = chalk_1.default.bold(run_tests_command_1.MAX_TESTS_TO_TRIGGER);
|
|
458
462
|
errorMessages.push(chalk_1.default.yellow(`More than ${maxTests} tests returned by search query, only the first ${maxTests} were fetched.\n`));
|
|
459
463
|
}
|
|
460
|
-
const initialSummary = exports.createInitialSummary();
|
|
461
|
-
const testsAndConfigsOverride = yield Promise.all(triggerConfigs.map((triggerConfig) => exports.getTestAndOverrideConfig(api, triggerConfig, reporter, initialSummary, isTunnelEnabled)));
|
|
464
|
+
const initialSummary = (0, exports.createInitialSummary)();
|
|
465
|
+
const testsAndConfigsOverride = yield Promise.all(triggerConfigs.map((triggerConfig) => (0, exports.getTestAndOverrideConfig)(api, triggerConfig, reporter, initialSummary, isTunnelEnabled)));
|
|
462
466
|
// Keep track of uploaded applications to avoid uploading them twice.
|
|
463
467
|
const uploadedApplicationByPath = {};
|
|
464
468
|
for (const item of testsAndConfigsOverride) {
|
|
@@ -470,7 +474,7 @@ const getTestsToTrigger = (api, triggerConfigs, reporter, triggerFromSearch, fai
|
|
|
470
474
|
if (test.type === 'mobile') {
|
|
471
475
|
const { config: userConfigOverride } = triggerConfigs.find(({ id }) => id === test.public_id);
|
|
472
476
|
try {
|
|
473
|
-
yield mobile_1.uploadApplicationAndOverrideConfig(api, test, userConfigOverride, overriddenConfig, uploadedApplicationByPath);
|
|
477
|
+
yield (0, mobile_1.uploadApplicationAndOverrideConfig)(api, test, userConfigOverride, overriddenConfig, uploadedApplicationByPath);
|
|
474
478
|
}
|
|
475
479
|
catch (e) {
|
|
476
480
|
throw new errors_1.CriticalError('UPLOAD_MOBILE_APPLICATION_TESTS_FAILED', e.message);
|
|
@@ -512,7 +516,7 @@ const runTests = (api, testsToTrigger) => __awaiter(void 0, void 0, void 0, func
|
|
|
512
516
|
const tagsToLimit = {
|
|
513
517
|
[tags_1.GIT_COMMIT_MESSAGE]: 500,
|
|
514
518
|
};
|
|
515
|
-
const ciMetadata = ci_1.getCIMetadata(tagsToLimit);
|
|
519
|
+
const ciMetadata = (0, ci_1.getCIMetadata)(tagsToLimit);
|
|
516
520
|
if (ciMetadata) {
|
|
517
521
|
payload.metadata = ciMetadata;
|
|
518
522
|
}
|
|
@@ -520,7 +524,7 @@ const runTests = (api, testsToTrigger) => __awaiter(void 0, void 0, void 0, func
|
|
|
520
524
|
return yield api.triggerTests(payload);
|
|
521
525
|
}
|
|
522
526
|
catch (e) {
|
|
523
|
-
const errorMessage = api_1.formatBackendErrors(e);
|
|
527
|
+
const errorMessage = (0, api_1.formatBackendErrors)(e);
|
|
524
528
|
const testIds = testsToTrigger.map((t) => t.public_id).join(',');
|
|
525
529
|
// Rewrite error message
|
|
526
530
|
throw new api_1.EndpointError(`[${testIds}] Failed to trigger tests: ${errorMessage}\n`, (_e = e.response) === null || _e === void 0 ? void 0 : _e.status);
|
|
@@ -528,7 +532,7 @@ const runTests = (api, testsToTrigger) => __awaiter(void 0, void 0, void 0, func
|
|
|
528
532
|
});
|
|
529
533
|
exports.runTests = runTests;
|
|
530
534
|
const fetchTest = (publicId, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
531
|
-
const apiHelper = api_1.getApiHelper(config);
|
|
535
|
+
const apiHelper = (0, api_1.getApiHelper)(config);
|
|
532
536
|
return apiHelper.getTest(publicId);
|
|
533
537
|
});
|
|
534
538
|
exports.fetchTest = fetchTest;
|
|
@@ -540,7 +544,7 @@ const retry = (func, shouldRetryAfterWait) => __awaiter(void 0, void 0, void 0,
|
|
|
540
544
|
catch (e) {
|
|
541
545
|
const waiter = shouldRetryAfterWait(retries, e);
|
|
542
546
|
if (waiter) {
|
|
543
|
-
yield exports.wait(waiter);
|
|
547
|
+
yield (0, exports.wait)(waiter);
|
|
544
548
|
return trier(retries + 1);
|
|
545
549
|
}
|
|
546
550
|
throw e;
|
|
@@ -571,7 +575,7 @@ exports.parseVariablesFromCli = parseVariablesFromCli;
|
|
|
571
575
|
// XXX: `CommandConfig` should be replaced by `SyntheticsCIConfig` here because it's the smallest
|
|
572
576
|
// interface that we need, and it's better semantically.
|
|
573
577
|
const getAppBaseURL = ({ datadogSite, subdomain }) => {
|
|
574
|
-
return app_1.getCommonAppBaseURL(datadogSite, subdomain);
|
|
578
|
+
return (0, app_1.getCommonAppBaseURL)(datadogSite, subdomain);
|
|
575
579
|
};
|
|
576
580
|
exports.getAppBaseURL = getAppBaseURL;
|
|
577
581
|
const getBatchUrl = (baseUrl, batchId) => `${baseUrl}synthetics/explorer/ci?batchResultId=${batchId}`;
|
|
@@ -593,12 +597,12 @@ exports.getResultUrl = getResultUrl;
|
|
|
593
597
|
*/
|
|
594
598
|
const sortResultsByOutcome = () => {
|
|
595
599
|
const outcomeWeight = {
|
|
596
|
-
["passed-non-blocking" /* PassedNonBlocking */]: 1,
|
|
597
|
-
["passed" /* Passed */]: 2,
|
|
598
|
-
["failed-non-blocking" /* FailedNonBlocking */]: 3,
|
|
599
|
-
["failed" /* Failed */]: 4,
|
|
600
|
+
["passed-non-blocking" /* ResultOutcome.PassedNonBlocking */]: 1,
|
|
601
|
+
["passed" /* ResultOutcome.Passed */]: 2,
|
|
602
|
+
["failed-non-blocking" /* ResultOutcome.FailedNonBlocking */]: 3,
|
|
603
|
+
["failed" /* ResultOutcome.Failed */]: 4,
|
|
600
604
|
};
|
|
601
|
-
return (r1, r2) => outcomeWeight[exports.getResultOutcome(r1)] - outcomeWeight[exports.getResultOutcome(r2)];
|
|
605
|
+
return (r1, r2) => outcomeWeight[(0, exports.getResultOutcome)(r1)] - outcomeWeight[(0, exports.getResultOutcome)(r2)];
|
|
602
606
|
};
|
|
603
607
|
exports.sortResultsByOutcome = sortResultsByOutcome;
|
|
604
608
|
const renderResults = ({ config, orgSettings, reporter, results, startTime, summary, }) => {
|
|
@@ -613,7 +617,7 @@ const renderResults = ({ config, orgSettings, reporter, results, startTime, summ
|
|
|
613
617
|
summary.criticalErrors = 0;
|
|
614
618
|
}
|
|
615
619
|
}
|
|
616
|
-
const sortedResults = results.sort(exports.sortResultsByOutcome());
|
|
620
|
+
const sortedResults = results.sort((0, exports.sortResultsByOutcome)());
|
|
617
621
|
for (const result of sortedResults) {
|
|
618
622
|
if (!config.failOnTimeout && result.timedOut) {
|
|
619
623
|
summary.timedOut++;
|
|
@@ -621,19 +625,19 @@ const renderResults = ({ config, orgSettings, reporter, results, startTime, summ
|
|
|
621
625
|
if (result.result.unhealthy && !config.failOnCriticalErrors) {
|
|
622
626
|
summary.criticalErrors++;
|
|
623
627
|
}
|
|
624
|
-
const resultOutcome = exports.getResultOutcome(result);
|
|
625
|
-
if (["passed" /* Passed */, "passed-non-blocking" /* PassedNonBlocking */].includes(resultOutcome)) {
|
|
628
|
+
const resultOutcome = (0, exports.getResultOutcome)(result);
|
|
629
|
+
if (["passed" /* ResultOutcome.Passed */, "passed-non-blocking" /* ResultOutcome.PassedNonBlocking */].includes(resultOutcome)) {
|
|
626
630
|
summary.passed++;
|
|
627
631
|
}
|
|
628
|
-
else if (resultOutcome === "failed-non-blocking" /* FailedNonBlocking */) {
|
|
632
|
+
else if (resultOutcome === "failed-non-blocking" /* ResultOutcome.FailedNonBlocking */) {
|
|
629
633
|
summary.failedNonBlocking++;
|
|
630
634
|
}
|
|
631
635
|
else {
|
|
632
636
|
summary.failed++;
|
|
633
637
|
}
|
|
634
|
-
reporter.resultEnd(result, exports.getAppBaseURL(config));
|
|
638
|
+
reporter.resultEnd(result, (0, exports.getAppBaseURL)(config));
|
|
635
639
|
}
|
|
636
|
-
reporter.runEnd(summary, exports.getAppBaseURL(config), orgSettings);
|
|
640
|
+
reporter.runEnd(summary, (0, exports.getAppBaseURL)(config), orgSettings);
|
|
637
641
|
};
|
|
638
642
|
exports.renderResults = renderResults;
|
|
639
643
|
const reportExitLogs = (reporter, config, { results, error }) => {
|
|
@@ -646,12 +650,12 @@ const reportExitLogs = (reporter, config, { results, error }) => {
|
|
|
646
650
|
'Use `failOnCriticalErrors: true` to make it fail instead.\n'));
|
|
647
651
|
}
|
|
648
652
|
if (error instanceof errors_1.CiError) {
|
|
649
|
-
exports.reportCiError(error, reporter);
|
|
653
|
+
(0, exports.reportCiError)(error, reporter);
|
|
650
654
|
}
|
|
651
655
|
};
|
|
652
656
|
exports.reportExitLogs = reportExitLogs;
|
|
653
657
|
const getExitReason = (config, { results, error }) => {
|
|
654
|
-
if (results === null || results === void 0 ? void 0 : results.some((result) => exports.getResultOutcome(result) === "failed" /* Failed */)) {
|
|
658
|
+
if (results === null || results === void 0 ? void 0 : results.some((result) => (0, exports.getResultOutcome)(result) === "failed" /* ResultOutcome.Failed */)) {
|
|
655
659
|
return 'failing-tests';
|
|
656
660
|
}
|
|
657
661
|
if (error instanceof errors_1.CiError) {
|