@datadog/datadog-ci-plugin-synthetics 5.12.0 → 5.13.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/bundle.d.ts +2392 -0
- package/dist/bundle.js +144530 -0
- package/dist/bundle.js.LEGAL.txt +2412 -0
- package/dist/bundle.js.map +1 -0
- package/dist/commands/deploy-tests.js +2 -125
- package/dist/commands/import-tests.js +2 -118
- package/dist/commands/run-tests.js +2 -319
- package/dist/commands/upload-application.js +2 -138
- package/package.json +19 -19
- package/dist/api.d.ts +0 -52
- package/dist/api.js +0 -333
- package/dist/api.js.map +0 -1
- package/dist/batch.d.ts +0 -9
- package/dist/batch.js +0 -325
- package/dist/batch.js.map +0 -1
- package/dist/build-and-test.d.ts +0 -25
- package/dist/build-and-test.js +0 -196
- package/dist/build-and-test.js.map +0 -1
- package/dist/commands/deploy-tests.d.ts +0 -19
- package/dist/commands/deploy-tests.js.map +0 -1
- package/dist/commands/import-tests.d.ts +0 -19
- package/dist/commands/import-tests.js.map +0 -1
- package/dist/commands/run-tests.d.ts +0 -19
- package/dist/commands/run-tests.js.map +0 -1
- package/dist/commands/upload-application.d.ts +0 -18
- package/dist/commands/upload-application.js.map +0 -1
- package/dist/deploy-tests-lib.d.ts +0 -2
- package/dist/deploy-tests-lib.js +0 -96
- package/dist/deploy-tests-lib.js.map +0 -1
- package/dist/errors.d.ts +0 -19
- package/dist/errors.js +0 -31
- package/dist/errors.js.map +0 -1
- package/dist/import-tests-lib.d.ts +0 -2
- package/dist/import-tests-lib.js +0 -71
- package/dist/import-tests-lib.js.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.js +0 -46
- package/dist/index.js.map +0 -1
- package/dist/interfaces.d.ts +0 -759
- package/dist/interfaces.js +0 -27
- package/dist/interfaces.js.map +0 -1
- package/dist/local-test-definition.d.ts +0 -2
- package/dist/local-test-definition.js +0 -16
- package/dist/local-test-definition.js.map +0 -1
- package/dist/mobile.d.ts +0 -28
- package/dist/mobile.js +0 -275
- package/dist/mobile.js.map +0 -1
- package/dist/multilocator.d.ts +0 -2
- package/dist/multilocator.js +0 -88
- package/dist/multilocator.js.map +0 -1
- package/dist/reporters/constants.d.ts +0 -6
- package/dist/reporters/constants.js +0 -14
- package/dist/reporters/constants.js.map +0 -1
- package/dist/reporters/default.d.ts +0 -33
- package/dist/reporters/default.js +0 -461
- package/dist/reporters/default.js.map +0 -1
- package/dist/reporters/junit.d.ts +0 -100
- package/dist/reporters/junit.js +0 -425
- package/dist/reporters/junit.js.map +0 -1
- package/dist/reporters/mobile/app-upload.d.ts +0 -14
- package/dist/reporters/mobile/app-upload.js +0 -54
- package/dist/reporters/mobile/app-upload.js.map +0 -1
- package/dist/run-tests-lib.d.ts +0 -28
- package/dist/run-tests-lib.js +0 -281
- package/dist/run-tests-lib.js.map +0 -1
- package/dist/test.d.ts +0 -29
- package/dist/test.js +0 -200
- package/dist/test.js.map +0 -1
- package/dist/tunnel/crypto.d.ts +0 -6
- package/dist/tunnel/crypto.js +0 -48
- package/dist/tunnel/crypto.js.map +0 -1
- package/dist/tunnel/index.d.ts +0 -1
- package/dist/tunnel/index.js +0 -6
- package/dist/tunnel/index.js.map +0 -1
- package/dist/tunnel/tunnel.d.ts +0 -49
- package/dist/tunnel/tunnel.js +0 -329
- package/dist/tunnel/tunnel.js.map +0 -1
- package/dist/tunnel/websocket.d.ts +0 -39
- package/dist/tunnel/websocket.js +0 -154
- package/dist/tunnel/websocket.js.map +0 -1
- package/dist/utils/internal.d.ts +0 -58
- package/dist/utils/internal.js +0 -317
- package/dist/utils/internal.js.map +0 -1
- package/dist/utils/public.d.ts +0 -81
- package/dist/utils/public.js +0 -524
- package/dist/utils/public.js.map +0 -1
|
@@ -1,138 +1,2 @@
|
|
|
1
|
-
"use strict"
|
|
2
|
-
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.PluginCommand = void 0;
|
|
16
|
-
const upload_application_1 = require("@datadog/datadog-ci-base/commands/synthetics/upload-application");
|
|
17
|
-
const constants_1 = require("@datadog/datadog-ci-base/constants");
|
|
18
|
-
const api_1 = require("@datadog/datadog-ci-base/helpers/api");
|
|
19
|
-
const env_1 = require("@datadog/datadog-ci-base/helpers/env");
|
|
20
|
-
const fips_1 = require("@datadog/datadog-ci-base/helpers/fips");
|
|
21
|
-
const logger_1 = require("@datadog/datadog-ci-base/helpers/logger");
|
|
22
|
-
const utils_1 = require("@datadog/datadog-ci-base/helpers/utils");
|
|
23
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
24
|
-
const deep_extend_1 = __importDefault(require("deep-extend"));
|
|
25
|
-
const api_2 = require("../api");
|
|
26
|
-
const errors_1 = require("../errors");
|
|
27
|
-
const mobile_1 = require("../mobile");
|
|
28
|
-
const app_upload_1 = require("../reporters/mobile/app-upload");
|
|
29
|
-
const internal_1 = require("../utils/internal");
|
|
30
|
-
class PluginCommand extends upload_application_1.SyntheticsUploadApplicationCommand {
|
|
31
|
-
constructor() {
|
|
32
|
-
var _a, _b;
|
|
33
|
-
super(...arguments);
|
|
34
|
-
this.config = PluginCommand.getDefaultConfig();
|
|
35
|
-
this.fipsConfig = {
|
|
36
|
-
fips: (_a = (0, env_1.toBoolean)(process.env[constants_1.FIPS_ENV_VAR])) !== null && _a !== void 0 ? _a : false,
|
|
37
|
-
fipsIgnoreError: (_b = (0, env_1.toBoolean)(process.env[constants_1.FIPS_IGNORE_ERROR_ENV_VAR])) !== null && _b !== void 0 ? _b : false,
|
|
38
|
-
};
|
|
39
|
-
this.logger = new logger_1.Logger((s) => {
|
|
40
|
-
this.context.stdout.write(s);
|
|
41
|
-
}, logger_1.LogLevel.INFO);
|
|
42
|
-
}
|
|
43
|
-
static getDefaultConfig() {
|
|
44
|
-
return Object.assign(Object.assign({}, (0, internal_1.getDefaultConfig)()), { mobileApplicationVersionFilePath: '', mobileApplicationId: '', versionName: '', latest: false });
|
|
45
|
-
}
|
|
46
|
-
setup() {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
(0, fips_1.enableFips)(this.fips || this.fipsConfig.fips, this.fipsIgnoreError || this.fipsConfig.fipsIgnoreError);
|
|
49
|
-
// Load config
|
|
50
|
-
yield this.resolveConfig();
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
resolveConfig() {
|
|
54
|
-
var _a, _b;
|
|
55
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
// Defaults < file < ENV < CLI
|
|
57
|
-
// Override with config file variables (e.g. datadog-ci.json)
|
|
58
|
-
try {
|
|
59
|
-
// Override Config Path with ENV variables
|
|
60
|
-
const overrideConfigPath = (_b = (_a = this.configPath) !== null && _a !== void 0 ? _a : process.env.DATADOG_SYNTHETICS_CONFIG_PATH) !== null && _b !== void 0 ? _b : 'datadog-ci.json';
|
|
61
|
-
this.config = yield (0, utils_1.resolveConfigFromFile)(this.config, {
|
|
62
|
-
configPath: overrideConfigPath,
|
|
63
|
-
defaultConfigPaths: [this.config.configPath],
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
catch (error) {
|
|
67
|
-
if (this.configPath) {
|
|
68
|
-
throw new errors_1.CiError('INVALID_CONFIG', error.message);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
// Override with ENV variables
|
|
72
|
-
this.config = (0, deep_extend_1.default)(this.config, (0, utils_1.recursivelyRemoveUndefinedValues)(this.resolveConfigFromEnv()));
|
|
73
|
-
// Override with CLI parameters
|
|
74
|
-
this.config = (0, deep_extend_1.default)(this.config, (0, utils_1.recursivelyRemoveUndefinedValues)(this.resolveConfigFromCli()));
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
execute() {
|
|
78
|
-
var _a;
|
|
79
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
-
yield this.setup();
|
|
81
|
-
const appUploadReporter = new app_upload_1.AppUploadReporter(this.context);
|
|
82
|
-
try {
|
|
83
|
-
const result = yield (0, mobile_1.uploadMobileApplicationVersion)(this.config, appUploadReporter);
|
|
84
|
-
const versionUuid = (_a = result.valid_app_result) === null || _a === void 0 ? void 0 : _a.app_version_uuid;
|
|
85
|
-
if (!versionUuid) {
|
|
86
|
-
this.logger.error('The upload was successful, but the version ID is missing.');
|
|
87
|
-
return 1;
|
|
88
|
-
}
|
|
89
|
-
this.logger.info(`\nThe new version has version ID: ${chalk_1.default.green(versionUuid)}\nPass it when triggering Synthetic tests to run tests against that version.`);
|
|
90
|
-
}
|
|
91
|
-
catch (error) {
|
|
92
|
-
if (error instanceof errors_1.CiError) {
|
|
93
|
-
this.logger.error(`A CI error occurred: [${error.code}] ${error.message}`);
|
|
94
|
-
}
|
|
95
|
-
else if (error instanceof api_2.EndpointError) {
|
|
96
|
-
this.logger.error(`A backend error occurred: ${error.message} (${error.status})`);
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
const e = error;
|
|
100
|
-
this.logger.error(`An unexpected error occurred: ${e.stack || e.message}`);
|
|
101
|
-
}
|
|
102
|
-
return 1;
|
|
103
|
-
}
|
|
104
|
-
return 0;
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
resolveConfigFromEnv() {
|
|
108
|
-
return {
|
|
109
|
-
// ...super.resolveConfigFromEnv(),
|
|
110
|
-
// BASE COMMAND START
|
|
111
|
-
apiKey: process.env.DATADOG_API_KEY || process.env.DD_API_KEY,
|
|
112
|
-
appKey: process.env.DATADOG_APP_KEY || process.env.DD_APP_KEY,
|
|
113
|
-
configPath: process.env.DATADOG_SYNTHETICS_CONFIG_PATH,
|
|
114
|
-
datadogSite: (0, api_1.getDatadogSiteFromEnv)(),
|
|
115
|
-
// BASE COMMAND END
|
|
116
|
-
mobileApplicationId: process.env.DATADOG_SYNTHETICS_MOBILE_APPLICATION_ID,
|
|
117
|
-
versionName: process.env.DATADOG_SYNTHETICS_VERSION_NAME,
|
|
118
|
-
latest: (0, env_1.toBoolean)(process.env.DATADOG_SYNTHETICS_LATEST),
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
resolveConfigFromCli() {
|
|
122
|
-
return {
|
|
123
|
-
// ...super.resolveConfigFromCli(),
|
|
124
|
-
// BASE COMMAND START
|
|
125
|
-
apiKey: this.apiKey,
|
|
126
|
-
appKey: this.appKey,
|
|
127
|
-
configPath: this.configPath,
|
|
128
|
-
datadogSite: this.datadogSite,
|
|
129
|
-
// BASE COMMAND END
|
|
130
|
-
mobileApplicationVersionFilePath: this.mobileApplicationVersionFilePath,
|
|
131
|
-
mobileApplicationId: this.mobileApplicationId,
|
|
132
|
-
versionName: this.versionName,
|
|
133
|
-
latest: this.latest,
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
exports.PluginCommand = PluginCommand;
|
|
138
|
-
//# sourceMappingURL=upload-application.js.map
|
|
1
|
+
"use strict"
|
|
2
|
+
module.exports = require("../bundle.js").commands["upload-application"]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datadog/datadog-ci-plugin-synthetics",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.13.0",
|
|
4
4
|
"description": "Datadog CI plugin for `synthetics` commands",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -14,12 +14,13 @@
|
|
|
14
14
|
"url": "https://github.com/DataDog/datadog-ci.git",
|
|
15
15
|
"directory": "packages/plugin-synthetics"
|
|
16
16
|
},
|
|
17
|
-
"main": "dist/
|
|
17
|
+
"main": "dist/bundle.js",
|
|
18
|
+
"types": "dist/bundle.d.ts",
|
|
18
19
|
"exports": {
|
|
19
20
|
"./package.json": "./package.json",
|
|
20
21
|
".": {
|
|
21
|
-
"
|
|
22
|
-
"default": "./dist/
|
|
22
|
+
"types": "./dist/bundle.d.ts",
|
|
23
|
+
"default": "./dist/bundle.js"
|
|
23
24
|
},
|
|
24
25
|
"./commands/*": {
|
|
25
26
|
"development": "./src/commands/*.ts",
|
|
@@ -27,7 +28,11 @@
|
|
|
27
28
|
}
|
|
28
29
|
},
|
|
29
30
|
"files": [
|
|
30
|
-
"dist
|
|
31
|
+
"dist/bundle.js",
|
|
32
|
+
"dist/bundle.js.map",
|
|
33
|
+
"dist/bundle.js.LEGAL.txt",
|
|
34
|
+
"dist/bundle.d.ts",
|
|
35
|
+
"dist/commands/*.js",
|
|
31
36
|
"README",
|
|
32
37
|
"LICENSE"
|
|
33
38
|
],
|
|
@@ -37,13 +42,16 @@
|
|
|
37
42
|
"scripts": {
|
|
38
43
|
"build": "yarn package:clean; yarn package:build",
|
|
39
44
|
"lint": "yarn package:lint",
|
|
40
|
-
"prepack": "yarn package:clean-dist"
|
|
45
|
+
"prepack": "yarn package:clean-dist; yarn package:bundle:npm"
|
|
41
46
|
},
|
|
42
|
-
"
|
|
43
|
-
"@datadog/datadog-ci-base": "5.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@datadog/datadog-ci-base": "5.13.0",
|
|
49
|
+
"@types/deep-extend": "0.4.31",
|
|
50
|
+
"@types/set-value": "4.0.3",
|
|
51
|
+
"@types/ssh2": "1.15.5",
|
|
52
|
+
"@types/sshpk": "1.10.7",
|
|
53
|
+
"@types/ws": "7.2.9",
|
|
54
|
+
"@types/xml2js": "0.4.14",
|
|
47
55
|
"chalk": "3.0.0",
|
|
48
56
|
"debug": "4.4.1",
|
|
49
57
|
"deep-extend": "0.6.0",
|
|
@@ -57,13 +65,5 @@
|
|
|
57
65
|
"ws": "7.5.10",
|
|
58
66
|
"xml2js": "0.5.0",
|
|
59
67
|
"yamux-js": "0.1.2"
|
|
60
|
-
},
|
|
61
|
-
"devDependencies": {
|
|
62
|
-
"@types/deep-extend": "0.4.31",
|
|
63
|
-
"@types/set-value": "4.0.3",
|
|
64
|
-
"@types/ssh2": "1.15.5",
|
|
65
|
-
"@types/sshpk": "1.10.7",
|
|
66
|
-
"@types/ws": "7.2.9",
|
|
67
|
-
"@types/xml2js": "0.4.14"
|
|
68
68
|
}
|
|
69
69
|
}
|
package/dist/api.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { APIConfiguration, APIHelperConfig, Batch, LocalTestDefinition, MobileAppUploadResult, MobileApplicationNewVersionParams, MobileApplicationUploadPart, MobileApplicationUploadPartResponse, MultipartPresignedUrlsResponse, Payload, PollResult, ServerTest, SyntheticsOrgSettings, TestSearchResult, ServerTrigger } from './interfaces';
|
|
3
|
-
import type { AxiosError, AxiosPromise, AxiosRequestConfig } from 'axios';
|
|
4
|
-
interface BackendError {
|
|
5
|
-
errors: string[];
|
|
6
|
-
}
|
|
7
|
-
export declare class EndpointError extends Error {
|
|
8
|
-
message: string;
|
|
9
|
-
status: number;
|
|
10
|
-
constructor(message: string, status: number);
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Extracts the public IDs from an error message like `Cannot write tests or results (test ids: ['aaa-aaa-aaa', 'bbb-bbb-bbb'])`.
|
|
14
|
-
*/
|
|
15
|
-
export declare const extractUnauthorizedTestPublicIds: (requestError: AxiosError<BackendError>) => Set<string> | undefined;
|
|
16
|
-
export declare const formatBackendErrors: (requestError: AxiosError<BackendError>, scopeName?: string) => string;
|
|
17
|
-
export declare const completeMultipartMobileApplicationUpload: (request: (args: AxiosRequestConfig) => AxiosPromise<{
|
|
18
|
-
job_id: string;
|
|
19
|
-
}>) => (applicationId: string, uploadId: string, key: string, uploadPartResponses: MobileApplicationUploadPartResponse[], newVersionParams?: MobileApplicationNewVersionParams) => Promise<string>;
|
|
20
|
-
export declare const pollMobileApplicationUploadResponse: (request: (args: AxiosRequestConfig) => AxiosPromise<MobileAppUploadResult>) => (jobId: string) => Promise<MobileAppUploadResult>;
|
|
21
|
-
export type RetryPolicy = {
|
|
22
|
-
retryOn404?: boolean | undefined;
|
|
23
|
-
retryOn429?: boolean | undefined;
|
|
24
|
-
};
|
|
25
|
-
export declare const determineRetryDelay: (retries: number, error: Error, retryPolicy?: RetryPolicy) => number | undefined;
|
|
26
|
-
export declare const getErrorHttpStatus: (error: Error) => number | undefined;
|
|
27
|
-
export declare const isForbiddenError: (error: Error) => boolean;
|
|
28
|
-
export declare const isNotFoundError: (error: Error) => boolean;
|
|
29
|
-
export declare const isTooManyRequestsError: (error: Error) => boolean;
|
|
30
|
-
export declare const isNodeError: (error: unknown) => error is NodeJS.ErrnoException;
|
|
31
|
-
export declare const is5xxError: (error: Error) => boolean;
|
|
32
|
-
export declare const apiConstructor: (configuration: APIConfiguration) => {
|
|
33
|
-
getBatch: (batchId: string) => Promise<Batch>;
|
|
34
|
-
getMobileApplicationPresignedURLs: (applicationId: string, appSize: number, parts: MobileApplicationUploadPart[]) => Promise<MultipartPresignedUrlsResponse>;
|
|
35
|
-
getTest: (testId: string, testType?: string) => Promise<ServerTest>;
|
|
36
|
-
getTestVersion: (testId: string, version: number) => Promise<void>;
|
|
37
|
-
getLocalTestDefinition: (testId: string, testType?: string) => Promise<LocalTestDefinition>;
|
|
38
|
-
editTest: (testId: string, data: ServerTest) => Promise<void>;
|
|
39
|
-
getSyntheticsOrgSettings: () => Promise<SyntheticsOrgSettings>;
|
|
40
|
-
getTunnelPresignedURL: (testIds: string[]) => Promise<{
|
|
41
|
-
url: string;
|
|
42
|
-
}>;
|
|
43
|
-
pollResults: (resultIds: string[]) => Promise<PollResult[]>;
|
|
44
|
-
searchTests: (query: string) => Promise<TestSearchResult>;
|
|
45
|
-
triggerTests: (data: Payload) => Promise<ServerTrigger>;
|
|
46
|
-
uploadMobileApplicationPart: (parts: MobileApplicationUploadPart[], multipartPresignedUrlsParams: MultipartPresignedUrlsResponse['multipart_presigned_urls_params']) => Promise<MobileApplicationUploadPartResponse[]>;
|
|
47
|
-
completeMultipartMobileApplicationUpload: (applicationId: string, uploadId: string, key: string, uploadPartResponses: MobileApplicationUploadPartResponse[], newVersionParams?: MobileApplicationNewVersionParams) => Promise<string>;
|
|
48
|
-
pollMobileApplicationUploadResponse: (jobId: string) => Promise<MobileAppUploadResult>;
|
|
49
|
-
};
|
|
50
|
-
export type APIHelper = ReturnType<typeof apiConstructor>;
|
|
51
|
-
export declare const getApiHelper: (config: APIHelperConfig) => APIHelper;
|
|
52
|
-
export {};
|
package/dist/api.js
DELETED
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getApiHelper = exports.apiConstructor = exports.is5xxError = exports.isNodeError = exports.isTooManyRequestsError = exports.isNotFoundError = exports.isForbiddenError = exports.getErrorHttpStatus = exports.determineRetryDelay = exports.pollMobileApplicationUploadResponse = exports.completeMultipartMobileApplicationUpload = exports.formatBackendErrors = exports.extractUnauthorizedTestPublicIds = exports.EndpointError = void 0;
|
|
13
|
-
const querystring_1 = require("querystring");
|
|
14
|
-
const utils_1 = require("@datadog/datadog-ci-base/helpers/utils");
|
|
15
|
-
const axios_1 = require("axios");
|
|
16
|
-
const errors_1 = require("./errors");
|
|
17
|
-
const test_1 = require("./test");
|
|
18
|
-
const public_1 = require("./utils/public");
|
|
19
|
-
const MAX_RETRIES = 3;
|
|
20
|
-
const DELAY_BETWEEN_RETRIES = 500; // In ms
|
|
21
|
-
const LARGE_DELAY_BETWEEN_RETRIES = 1000; // In ms
|
|
22
|
-
// TODO SYNTH-13709: Use the `Retry-After` header.
|
|
23
|
-
const DELAY_BETWEEN_429_RETRIES = 5000; // In ms
|
|
24
|
-
class EndpointError extends Error {
|
|
25
|
-
constructor(message, status) {
|
|
26
|
-
super(message);
|
|
27
|
-
this.message = message;
|
|
28
|
-
this.status = status;
|
|
29
|
-
Object.setPrototypeOf(this, EndpointError.prototype);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.EndpointError = EndpointError;
|
|
33
|
-
const LOWER_UNAMBIGUOUS_CHARS = 'abcdefghijkmnpqrstuvwxyz23456789';
|
|
34
|
-
const PUBLIC_ID_REGEX = `[${LOWER_UNAMBIGUOUS_CHARS}]{3}-[${LOWER_UNAMBIGUOUS_CHARS}]{3}-[${LOWER_UNAMBIGUOUS_CHARS}]{3}`;
|
|
35
|
-
/**
|
|
36
|
-
* Extracts the public IDs from an error message like `Cannot write tests or results (test ids: ['aaa-aaa-aaa', 'bbb-bbb-bbb'])`.
|
|
37
|
-
*/
|
|
38
|
-
const extractUnauthorizedTestPublicIds = (requestError) => {
|
|
39
|
-
var _a, _b, _c;
|
|
40
|
-
const unauthorizedMessage = (_c = (_b = (_a = requestError.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.errors) === null || _c === void 0 ? void 0 : _c.find((error) => error.includes('Cannot write tests or results (test ids:'));
|
|
41
|
-
if (!unauthorizedMessage) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const matchResult = unauthorizedMessage.match(new RegExp(PUBLIC_ID_REGEX, 'g'));
|
|
45
|
-
if (!matchResult) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
return new Set(matchResult);
|
|
49
|
-
};
|
|
50
|
-
exports.extractUnauthorizedTestPublicIds = extractUnauthorizedTestPublicIds;
|
|
51
|
-
const formatBackendErrors = (requestError, scopeName) => {
|
|
52
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
53
|
-
if ((_b = (_a = requestError.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.errors) {
|
|
54
|
-
const serverHead = `query on ${(_c = requestError.config) === null || _c === void 0 ? void 0 : _c.baseURL}${(_d = requestError.config) === null || _d === void 0 ? void 0 : _d.url} returned:`;
|
|
55
|
-
const errors = requestError.response.data.errors;
|
|
56
|
-
const reportMessage = [];
|
|
57
|
-
if (errors.length > 1) {
|
|
58
|
-
reportMessage.push(serverHead);
|
|
59
|
-
reportMessage.push(...errors.map((message) => ` - ${message}`));
|
|
60
|
-
}
|
|
61
|
-
else if (errors.length) {
|
|
62
|
-
reportMessage.push(`${serverHead} "${errors[0]}"`);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
reportMessage.push(`error querying ${(_e = requestError.config) === null || _e === void 0 ? void 0 : _e.baseURL}${(_f = requestError.config) === null || _f === void 0 ? void 0 : _f.url}`);
|
|
66
|
-
}
|
|
67
|
-
if (requestError.response.status === 403 && scopeName) {
|
|
68
|
-
reportMessage.push(`Is the App key granted the ${scopeName} scope?`);
|
|
69
|
-
}
|
|
70
|
-
return reportMessage.join('\n');
|
|
71
|
-
}
|
|
72
|
-
return `could not query ${(_g = requestError.config) === null || _g === void 0 ? void 0 : _g.baseURL}${(_h = requestError.config) === null || _h === void 0 ? void 0 : _h.url}\n${requestError.message}`;
|
|
73
|
-
};
|
|
74
|
-
exports.formatBackendErrors = formatBackendErrors;
|
|
75
|
-
const triggerTests = (request) => (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
76
|
-
const resp = yield retryRequest({
|
|
77
|
-
data,
|
|
78
|
-
headers: { 'X-Trigger-App': public_1.ciTriggerApp },
|
|
79
|
-
method: 'POST',
|
|
80
|
-
url: '/synthetics/tests/trigger/ci',
|
|
81
|
-
}, request, { retryOn429: true });
|
|
82
|
-
return resp.data;
|
|
83
|
-
});
|
|
84
|
-
const getTest = (request) => (testId, testType) => __awaiter(void 0, void 0, void 0, function* () {
|
|
85
|
-
const resp = yield retryRequest({
|
|
86
|
-
url: !!testType ? `/synthetics/tests/${testType}/${testId}` : `/synthetics/tests/${testId}`,
|
|
87
|
-
}, request, { retryOn429: true });
|
|
88
|
-
return resp.data;
|
|
89
|
-
});
|
|
90
|
-
const getTestVersion = (request) => (testId, version) => __awaiter(void 0, void 0, void 0, function* () {
|
|
91
|
-
yield retryRequest({
|
|
92
|
-
url: `/synthetics/tests/${testId}/version_history/${version}?only_check_existence=true`,
|
|
93
|
-
}, request, { retryOn429: true });
|
|
94
|
-
});
|
|
95
|
-
const getLocalTestDefinition = (request) => (testId, testType) => __awaiter(void 0, void 0, void 0, function* () {
|
|
96
|
-
const resp = yield retryRequest({
|
|
97
|
-
params: {
|
|
98
|
-
format: 'ltd',
|
|
99
|
-
},
|
|
100
|
-
url: !!testType ? `/synthetics/tests/${testType}/${testId}` : `/synthetics/tests/${testId}`,
|
|
101
|
-
}, request, { retryOn429: true });
|
|
102
|
-
return resp.data;
|
|
103
|
-
});
|
|
104
|
-
const editTest = (request) => (testId, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
105
|
-
yield retryRequest({
|
|
106
|
-
data,
|
|
107
|
-
method: 'PUT',
|
|
108
|
-
url: `/synthetics/tests/${testId}`,
|
|
109
|
-
}, request, { retryOn429: true });
|
|
110
|
-
});
|
|
111
|
-
const searchTests = (request) => (query) => __awaiter(void 0, void 0, void 0, function* () {
|
|
112
|
-
const resp = yield retryRequest({
|
|
113
|
-
params: {
|
|
114
|
-
// Search for one more test than limit to detect if too many tests are returned
|
|
115
|
-
count: test_1.MAX_TESTS_TO_TRIGGER + 1,
|
|
116
|
-
text: query,
|
|
117
|
-
},
|
|
118
|
-
url: '/synthetics/tests/search',
|
|
119
|
-
}, request);
|
|
120
|
-
return resp.data;
|
|
121
|
-
});
|
|
122
|
-
const getSyntheticsOrgSettings = (request) => () => __awaiter(void 0, void 0, void 0, function* () {
|
|
123
|
-
const resp = yield retryRequest({
|
|
124
|
-
url: '/synthetics/settings',
|
|
125
|
-
}, request);
|
|
126
|
-
return resp.data;
|
|
127
|
-
});
|
|
128
|
-
const getBatch = (request) => (batchId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
129
|
-
const resp = yield retryRequest({ url: `/synthetics/ci/batch/${batchId}` }, request, {
|
|
130
|
-
retryOn404: true,
|
|
131
|
-
retryOn429: true,
|
|
132
|
-
});
|
|
133
|
-
const serverBatch = resp.data.data;
|
|
134
|
-
return {
|
|
135
|
-
results: serverBatch.results.filter((r) => r.status !== 'skipped' || r.selective_rerun),
|
|
136
|
-
status: serverBatch.status,
|
|
137
|
-
};
|
|
138
|
-
});
|
|
139
|
-
const pollResults = (request) => (resultIds) => __awaiter(void 0, void 0, void 0, function* () {
|
|
140
|
-
var _a;
|
|
141
|
-
const resp = yield retryRequest({
|
|
142
|
-
params: {
|
|
143
|
-
result_ids: JSON.stringify(resultIds),
|
|
144
|
-
},
|
|
145
|
-
url: '/synthetics/tests/poll_results',
|
|
146
|
-
}, request, { retryOn404: true, retryOn429: true });
|
|
147
|
-
const includedTestsByID = new Map();
|
|
148
|
-
(_a = resp.data.included) === null || _a === void 0 ? void 0 : _a.forEach((r) => {
|
|
149
|
-
if (r.type === 'test') {
|
|
150
|
-
const test = Object.assign({ id: r.id }, r.attributes);
|
|
151
|
-
includedTestsByID.set(r.id, test);
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
const rawPollResults = resp.data.data;
|
|
155
|
-
const parsedPollResults = [];
|
|
156
|
-
for (const r of rawPollResults) {
|
|
157
|
-
const test = includedTestsByID.get(r.relationships.test.data.id);
|
|
158
|
-
if (!test) {
|
|
159
|
-
continue;
|
|
160
|
-
}
|
|
161
|
-
const pollResult = Object.assign(Object.assign({}, r.attributes), { test: parseIncludedTest(test), resultID: r.id });
|
|
162
|
-
parsedPollResults.push(pollResult);
|
|
163
|
-
}
|
|
164
|
-
return parsedPollResults;
|
|
165
|
-
});
|
|
166
|
-
const parseIncludedTest = (test) => {
|
|
167
|
-
var _a;
|
|
168
|
-
return {
|
|
169
|
-
public_id: test.id,
|
|
170
|
-
type: test.type,
|
|
171
|
-
subtype: test.subtype,
|
|
172
|
-
config: Object.assign(Object.assign({}, test.config), { request: Object.assign(Object.assign({}, test.config.request), { dnsServer: (_a = test.config.request) === null || _a === void 0 ? void 0 : _a.dns_server }) }),
|
|
173
|
-
};
|
|
174
|
-
};
|
|
175
|
-
const getTunnelPresignedURL = (request) => (testIds) => __awaiter(void 0, void 0, void 0, function* () {
|
|
176
|
-
const resp = yield retryRequest({
|
|
177
|
-
params: {
|
|
178
|
-
test_id: testIds,
|
|
179
|
-
},
|
|
180
|
-
paramsSerializer: (params) => (0, querystring_1.stringify)(params),
|
|
181
|
-
url: '/synthetics/ci/tunnel',
|
|
182
|
-
}, request);
|
|
183
|
-
return resp.data;
|
|
184
|
-
});
|
|
185
|
-
const getMobileApplicationPresignedURLs = (request) => (applicationId, appSize, parts) => __awaiter(void 0, void 0, void 0, function* () {
|
|
186
|
-
const partForRequest = (part) => ({
|
|
187
|
-
md5: part.md5,
|
|
188
|
-
partNumber: part.partNumber,
|
|
189
|
-
});
|
|
190
|
-
const resp = yield retryRequest({
|
|
191
|
-
data: {
|
|
192
|
-
appSize,
|
|
193
|
-
parts: parts.map(partForRequest),
|
|
194
|
-
},
|
|
195
|
-
method: 'POST',
|
|
196
|
-
url: `/synthetics/mobile/applications/${applicationId}/multipart-presigned-urls`,
|
|
197
|
-
}, request);
|
|
198
|
-
return resp.data;
|
|
199
|
-
});
|
|
200
|
-
const uploadMobileApplicationPart = (request) => (parts, multipartPresignedUrlsParams) => __awaiter(void 0, void 0, void 0, function* () {
|
|
201
|
-
const promises = Object.entries(multipartPresignedUrlsParams.urls).map(([partNumber, presignedUrl]) => __awaiter(void 0, void 0, void 0, function* () {
|
|
202
|
-
const resp = yield retryRequest({
|
|
203
|
-
data: parts[Number(partNumber) - 1].blob,
|
|
204
|
-
headers: {
|
|
205
|
-
'Content-MD5': parts[Number(partNumber) - 1].md5,
|
|
206
|
-
// Presigned URL *requires* unset content-type since it's used for signature
|
|
207
|
-
// We can clear axios default by setting to null
|
|
208
|
-
// https://github.com/axios/axios/pull/1845
|
|
209
|
-
// eslint-disable-next-line no-null/no-null
|
|
210
|
-
'Content-Type': null,
|
|
211
|
-
},
|
|
212
|
-
maxBodyLength: Infinity,
|
|
213
|
-
maxContentLength: Infinity,
|
|
214
|
-
method: 'PUT',
|
|
215
|
-
url: presignedUrl,
|
|
216
|
-
}, request);
|
|
217
|
-
// Azure part-upload does not return ETag headers, so our backend ignores it for Azure
|
|
218
|
-
const quotedEtag = isAzureUrl(presignedUrl) ? '' : resp.headers.etag;
|
|
219
|
-
return {
|
|
220
|
-
ETag: quotedEtag.replace(/"/g, ''),
|
|
221
|
-
PartNumber: Number(partNumber),
|
|
222
|
-
};
|
|
223
|
-
}));
|
|
224
|
-
return Promise.all(promises);
|
|
225
|
-
});
|
|
226
|
-
const completeMultipartMobileApplicationUpload = (request) => (applicationId, uploadId, key, uploadPartResponses, newVersionParams) => __awaiter(void 0, void 0, void 0, function* () {
|
|
227
|
-
const resp = yield retryRequest({
|
|
228
|
-
data: {
|
|
229
|
-
key,
|
|
230
|
-
newVersionParams,
|
|
231
|
-
parts: uploadPartResponses,
|
|
232
|
-
uploadId,
|
|
233
|
-
validateMode: newVersionParams ? 'validate-and-persist' : 'validate-only',
|
|
234
|
-
},
|
|
235
|
-
method: 'POST',
|
|
236
|
-
url: `/synthetics/mobile/applications/${applicationId}/multipart-upload-complete`,
|
|
237
|
-
}, request);
|
|
238
|
-
return resp.data.job_id;
|
|
239
|
-
});
|
|
240
|
-
exports.completeMultipartMobileApplicationUpload = completeMultipartMobileApplicationUpload;
|
|
241
|
-
const pollMobileApplicationUploadResponse = (request) => (jobId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
242
|
-
const response = yield retryRequest({
|
|
243
|
-
method: 'GET',
|
|
244
|
-
url: `/synthetics/mobile/applications/validation-job-status/${jobId}`,
|
|
245
|
-
}, request);
|
|
246
|
-
return response.data;
|
|
247
|
-
});
|
|
248
|
-
exports.pollMobileApplicationUploadResponse = pollMobileApplicationUploadResponse;
|
|
249
|
-
const retryWithJitter = (delay = DELAY_BETWEEN_429_RETRIES) => delay + Math.floor(Math.random() * delay);
|
|
250
|
-
const determineRetryDelay = (retries, error, retryPolicy = { retryOn404: false, retryOn429: false }) => {
|
|
251
|
-
// Always retry on Node.js errors
|
|
252
|
-
if (retries < MAX_RETRIES && (0, exports.isNodeError)(error)) {
|
|
253
|
-
return LARGE_DELAY_BETWEEN_RETRIES;
|
|
254
|
-
}
|
|
255
|
-
// Always retry on 5xx
|
|
256
|
-
if (retries < MAX_RETRIES && (0, exports.is5xxError)(error)) {
|
|
257
|
-
return DELAY_BETWEEN_RETRIES;
|
|
258
|
-
}
|
|
259
|
-
// Retry on 404
|
|
260
|
-
if (retryPolicy.retryOn404 && retries < MAX_RETRIES && (0, exports.isNotFoundError)(error)) {
|
|
261
|
-
return DELAY_BETWEEN_RETRIES;
|
|
262
|
-
}
|
|
263
|
-
// Retry on 429
|
|
264
|
-
if (retryPolicy.retryOn429 && retries < MAX_RETRIES && (0, exports.isTooManyRequestsError)(error)) {
|
|
265
|
-
return retryWithJitter(DELAY_BETWEEN_429_RETRIES);
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
exports.determineRetryDelay = determineRetryDelay;
|
|
269
|
-
const isEndpointError = (error) => error instanceof EndpointError;
|
|
270
|
-
const getErrorHttpStatus = (error) => { var _a; return isEndpointError(error) ? error.status : (0, axios_1.isAxiosError)(error) ? (_a = error.response) === null || _a === void 0 ? void 0 : _a.status : undefined; };
|
|
271
|
-
exports.getErrorHttpStatus = getErrorHttpStatus;
|
|
272
|
-
const isForbiddenError = (error) => (0, exports.getErrorHttpStatus)(error) === 403;
|
|
273
|
-
exports.isForbiddenError = isForbiddenError;
|
|
274
|
-
const isNotFoundError = (error) => (0, exports.getErrorHttpStatus)(error) === 404;
|
|
275
|
-
exports.isNotFoundError = isNotFoundError;
|
|
276
|
-
const isTooManyRequestsError = (error) => (0, exports.getErrorHttpStatus)(error) === 429;
|
|
277
|
-
exports.isTooManyRequestsError = isTooManyRequestsError;
|
|
278
|
-
const isNodeError = (error) => !!error && 'code' in error;
|
|
279
|
-
exports.isNodeError = isNodeError;
|
|
280
|
-
const is5xxError = (error) => {
|
|
281
|
-
const statusCode = (0, exports.getErrorHttpStatus)(error);
|
|
282
|
-
return statusCode && statusCode >= 500 && statusCode <= 599 ? true : false;
|
|
283
|
-
};
|
|
284
|
-
exports.is5xxError = is5xxError;
|
|
285
|
-
const retryRequest = (args, request, statusCodesToRetryOn) => (0, public_1.retry)(() => request(args), (retries, e) => (0, exports.determineRetryDelay)(retries, e, statusCodesToRetryOn));
|
|
286
|
-
const apiConstructor = (configuration) => {
|
|
287
|
-
const { baseV1Url, baseV2Url, baseIntakeUrl, baseUnstableUrl, apiKey, appKey, proxyOpts } = configuration;
|
|
288
|
-
const baseOptions = { apiKey, appKey, proxyOpts };
|
|
289
|
-
const requestV1 = (0, utils_1.getRequestBuilder)(Object.assign(Object.assign({}, baseOptions), { baseUrl: baseV1Url }));
|
|
290
|
-
const requestV2 = (0, utils_1.getRequestBuilder)(Object.assign(Object.assign({}, baseOptions), { baseUrl: baseV2Url }));
|
|
291
|
-
const requestUnstable = (0, utils_1.getRequestBuilder)(Object.assign(Object.assign({}, baseOptions), { baseUrl: baseUnstableUrl }));
|
|
292
|
-
const requestIntake = (0, utils_1.getRequestBuilder)(Object.assign(Object.assign({}, baseOptions), { baseUrl: baseIntakeUrl }));
|
|
293
|
-
return {
|
|
294
|
-
getBatch: getBatch(requestV1),
|
|
295
|
-
getMobileApplicationPresignedURLs: getMobileApplicationPresignedURLs(requestUnstable),
|
|
296
|
-
getTest: getTest(requestV1),
|
|
297
|
-
getTestVersion: getTestVersion(requestV2),
|
|
298
|
-
getLocalTestDefinition: getLocalTestDefinition(requestV1),
|
|
299
|
-
editTest: editTest(requestV1),
|
|
300
|
-
getSyntheticsOrgSettings: getSyntheticsOrgSettings(requestV1),
|
|
301
|
-
getTunnelPresignedURL: getTunnelPresignedURL(requestIntake),
|
|
302
|
-
pollResults: pollResults(requestV2),
|
|
303
|
-
searchTests: searchTests(requestV1),
|
|
304
|
-
triggerTests: triggerTests(requestIntake),
|
|
305
|
-
uploadMobileApplicationPart: uploadMobileApplicationPart(requestV1),
|
|
306
|
-
completeMultipartMobileApplicationUpload: (0, exports.completeMultipartMobileApplicationUpload)(requestUnstable),
|
|
307
|
-
pollMobileApplicationUploadResponse: (0, exports.pollMobileApplicationUploadResponse)(requestUnstable),
|
|
308
|
-
};
|
|
309
|
-
};
|
|
310
|
-
exports.apiConstructor = apiConstructor;
|
|
311
|
-
const getApiHelper = (config) => {
|
|
312
|
-
if (!config.appKey) {
|
|
313
|
-
throw new errors_1.CriticalError('MISSING_APP_KEY', 'App key is required');
|
|
314
|
-
}
|
|
315
|
-
if (!config.apiKey) {
|
|
316
|
-
throw new errors_1.CriticalError('MISSING_API_KEY', 'API key is required');
|
|
317
|
-
}
|
|
318
|
-
return (0, exports.apiConstructor)({
|
|
319
|
-
apiKey: config.apiKey,
|
|
320
|
-
appKey: config.appKey,
|
|
321
|
-
baseIntakeUrl: (0, public_1.getDatadogHost)({ useIntake: true, apiVersion: 'v1', config }),
|
|
322
|
-
baseUnstableUrl: (0, public_1.getDatadogHost)({ useIntake: false, apiVersion: 'unstable', config }),
|
|
323
|
-
baseV1Url: (0, public_1.getDatadogHost)({ useIntake: false, apiVersion: 'v1', config }),
|
|
324
|
-
baseV2Url: (0, public_1.getDatadogHost)({ useIntake: false, apiVersion: 'v2', config }),
|
|
325
|
-
proxyOpts: config.proxy,
|
|
326
|
-
});
|
|
327
|
-
};
|
|
328
|
-
exports.getApiHelper = getApiHelper;
|
|
329
|
-
const isAzureUrl = (presignedUrl) => {
|
|
330
|
-
// https://learn.microsoft.com/en-us/rest/api/storageservices/put-blob-from-url?tabs=microsoft-entra-id#request
|
|
331
|
-
return presignedUrl.includes('.blob.core.windows.net');
|
|
332
|
-
};
|
|
333
|
-
//# sourceMappingURL=api.js.map
|
package/dist/api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAqC;AAwBrC,kEAAwE;AACxE,iCAAkC;AAElC,qCAAsC;AACtC,iCAA2C;AAC3C,2CAAkE;AAElE,MAAM,WAAW,GAAG,CAAC,CAAA;AACrB,MAAM,qBAAqB,GAAG,GAAG,CAAA,CAAC,QAAQ;AAC1C,MAAM,2BAA2B,GAAG,IAAI,CAAA,CAAC,QAAQ;AACjD,kDAAkD;AAClD,MAAM,yBAAyB,GAAG,IAAI,CAAA,CAAC,QAAQ;AAM/C,MAAa,aAAc,SAAQ,KAAK;IACtC,YACS,OAAe,EACf,MAAc;QAErB,KAAK,CAAC,OAAO,CAAC,CAAA;QAHP,YAAO,GAAP,OAAO,CAAQ;QACf,WAAM,GAAN,MAAM,CAAQ;QAGrB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAA;IACtD,CAAC;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S,EAAE,IAAA,uBAAc,EAAC,EAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAC,CAAC;QACvE,SAAS,EAAE,MAAM,CAAC,KAAK;KACxB,CAAC,CAAA;AACJ,CAAC,CAAA;AAjBY,QAAA,YAAY,gBAiBxB;AAED,MAAM,UAAU,GAAG,CAAC,YAAoB,EAAE,EAAE;IAC1C,+GAA+G;IAC/G,OAAO,YAAY,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAA;AACxD,CAAC,CAAA"}
|
package/dist/batch.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { APIHelper } from './api';
|
|
2
|
-
import type { Batch, MainReporter, Result, ResultDisplayInfo, ResultInBatch, Test, TestPayload, TriggerInfo } from './interfaces';
|
|
3
|
-
import type { Tunnel } from './tunnel';
|
|
4
|
-
import type { Metadata } from '@datadog/datadog-ci-base/helpers/interfaces';
|
|
5
|
-
export declare const DEFAULT_BATCH_TIMEOUT: number;
|
|
6
|
-
export declare const runTests: (api: APIHelper, testsToTrigger: TestPayload[], reporter: MainReporter, metadata?: Metadata, failOnMissingTests?: boolean, selectiveRerun?: boolean, batchTimeout?: number) => Promise<TriggerInfo>;
|
|
7
|
-
export declare const waitForResults: (api: APIHelper, trigger: TriggerInfo, tests: Test[], options: ResultDisplayInfo['options'], reporter: MainReporter, tunnel?: Tunnel) => Promise<Result[]>;
|
|
8
|
-
export declare const getResultsToReport: (shouldContinuePolling: boolean, batch: Batch, newlyReceivedResults: ResultInBatch[], emittedResultIds: Set<string>, oldIncompleteResultIds: Set<string>, incompleteResultIds: Set<string>, reporter: MainReporter) => ResultInBatch[];
|
|
9
|
-
export declare const reportReceivedResults: (batch: Batch, emittedResultIds: Set<string>, reporter: MainReporter) => ResultInBatch[];
|