@datadog/datadog-ci-plugin-synthetics 5.16.1 → 5.17.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 +20 -22
- package/dist/bundle.js +58 -60
- package/dist/bundle.js.map +1 -1
- package/package.json +2 -2
package/dist/bundle.d.ts
CHANGED
|
@@ -2267,26 +2267,6 @@ declare class SyntheticsDeployTestsCommand extends BaseCommand {
|
|
|
2267
2267
|
execute(): Promise<number | void>;
|
|
2268
2268
|
}
|
|
2269
2269
|
//#endregion
|
|
2270
|
-
//#region ../base/dist/helpers/logger.d.ts
|
|
2271
|
-
declare enum LogLevel {
|
|
2272
|
-
DEBUG = 1,
|
|
2273
|
-
INFO = 2,
|
|
2274
|
-
WARN = 3,
|
|
2275
|
-
ERROR = 4
|
|
2276
|
-
}
|
|
2277
|
-
declare class Logger {
|
|
2278
|
-
private loglevel;
|
|
2279
|
-
private writeMessage;
|
|
2280
|
-
private shouldIncludeTimestamp;
|
|
2281
|
-
constructor(writeMessage: (s: string) => void, loglevel: LogLevel, shouldIncludeTimestamp?: boolean);
|
|
2282
|
-
setLogLevel(newLogLevel: LogLevel): void;
|
|
2283
|
-
setShouldIncludeTime(newShouldIncludeTimestamp: boolean): void;
|
|
2284
|
-
error(s: string): void;
|
|
2285
|
-
warn(s: string): void;
|
|
2286
|
-
info(s: string): void;
|
|
2287
|
-
debug(s: string): void;
|
|
2288
|
-
}
|
|
2289
|
-
//#endregion
|
|
2290
2270
|
//#region src/commands/deploy-tests.d.ts
|
|
2291
2271
|
declare class PluginCommand$3 extends SyntheticsDeployTestsCommand {
|
|
2292
2272
|
protected reporter: MainReporter;
|
|
@@ -2295,7 +2275,6 @@ declare class PluginCommand$3 extends SyntheticsDeployTestsCommand {
|
|
|
2295
2275
|
fips: boolean;
|
|
2296
2276
|
fipsIgnoreError: boolean;
|
|
2297
2277
|
};
|
|
2298
|
-
protected logger: Logger;
|
|
2299
2278
|
static getDefaultConfig(): DeployTestsCommandConfig;
|
|
2300
2279
|
protected setup(): Promise<void>;
|
|
2301
2280
|
protected resolveConfig(): Promise<void>;
|
|
@@ -2328,7 +2307,6 @@ declare class PluginCommand$2 extends SyntheticsImportTestsCommand {
|
|
|
2328
2307
|
fips: boolean;
|
|
2329
2308
|
fipsIgnoreError: boolean;
|
|
2330
2309
|
};
|
|
2331
|
-
protected logger: Logger;
|
|
2332
2310
|
static getDefaultConfig(): ImportTestsCommandConfig;
|
|
2333
2311
|
protected setup(): Promise<void>;
|
|
2334
2312
|
protected resolveConfig(): Promise<void>;
|
|
@@ -2403,6 +2381,26 @@ declare class SyntheticsUploadApplicationCommand extends BaseCommand {
|
|
|
2403
2381
|
execute(): Promise<number | void>;
|
|
2404
2382
|
}
|
|
2405
2383
|
//#endregion
|
|
2384
|
+
//#region ../base/dist/helpers/logger.d.ts
|
|
2385
|
+
declare enum LogLevel {
|
|
2386
|
+
DEBUG = 1,
|
|
2387
|
+
INFO = 2,
|
|
2388
|
+
WARN = 3,
|
|
2389
|
+
ERROR = 4
|
|
2390
|
+
}
|
|
2391
|
+
declare class Logger {
|
|
2392
|
+
private loglevel;
|
|
2393
|
+
private writeMessage;
|
|
2394
|
+
private shouldIncludeTimestamp;
|
|
2395
|
+
constructor(writeMessage: (s: string) => void, loglevel: LogLevel, shouldIncludeTimestamp?: boolean);
|
|
2396
|
+
setLogLevel(newLogLevel: LogLevel): void;
|
|
2397
|
+
setShouldIncludeTime(newShouldIncludeTimestamp: boolean): void;
|
|
2398
|
+
error(s: string): void;
|
|
2399
|
+
warn(s: string): void;
|
|
2400
|
+
info(s: string): void;
|
|
2401
|
+
debug(s: string): void;
|
|
2402
|
+
}
|
|
2403
|
+
//#endregion
|
|
2406
2404
|
//#region src/commands/upload-application.d.ts
|
|
2407
2405
|
declare class PluginCommand extends SyntheticsUploadApplicationCommand {
|
|
2408
2406
|
protected config: UploadApplicationCommandConfig;
|
package/dist/bundle.js
CHANGED
|
@@ -5761,7 +5761,7 @@ var require_glob = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5761
5761
|
var require_package$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5762
5762
|
module.exports = {
|
|
5763
5763
|
"name": "@datadog/datadog-ci-base",
|
|
5764
|
-
"version": "5.
|
|
5764
|
+
"version": "5.17.0",
|
|
5765
5765
|
"description": "Base package for Datadog CI",
|
|
5766
5766
|
"license": "Apache-2.0",
|
|
5767
5767
|
"keywords": ["datadog", "datadog-ci"],
|
|
@@ -5856,7 +5856,7 @@ var require_package$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5856
5856
|
"datadog-metrics": "^0.9.3",
|
|
5857
5857
|
"debug": "^4.4.1",
|
|
5858
5858
|
"deep-extend": "^0.6.0",
|
|
5859
|
-
"fast-xml-parser": "^5.
|
|
5859
|
+
"fast-xml-parser": "^5.7.2",
|
|
5860
5860
|
"form-data": "^4.0.4",
|
|
5861
5861
|
"glob": "^13.0.6",
|
|
5862
5862
|
"inquirer": "^8.2.7",
|
|
@@ -138899,57 +138899,11 @@ var require_fips = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
138899
138899
|
exports.enableFips = enableFips;
|
|
138900
138900
|
}));
|
|
138901
138901
|
//#endregion
|
|
138902
|
-
//#region ../base/dist/helpers/logger.js
|
|
138903
|
-
var require_logger = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
138904
|
-
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
138905
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
138906
|
-
};
|
|
138907
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
138908
|
-
exports.Logger = exports.LogLevel = void 0;
|
|
138909
|
-
const chalk_1 = __importDefault(require_source$3());
|
|
138910
|
-
var LogLevel;
|
|
138911
|
-
(function(LogLevel) {
|
|
138912
|
-
LogLevel[LogLevel["DEBUG"] = 1] = "DEBUG";
|
|
138913
|
-
LogLevel[LogLevel["INFO"] = 2] = "INFO";
|
|
138914
|
-
LogLevel[LogLevel["WARN"] = 3] = "WARN";
|
|
138915
|
-
LogLevel[LogLevel["ERROR"] = 4] = "ERROR";
|
|
138916
|
-
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
138917
|
-
var Logger = class {
|
|
138918
|
-
constructor(writeMessage, loglevel, shouldIncludeTimestamp) {
|
|
138919
|
-
this.shouldIncludeTimestamp = shouldIncludeTimestamp !== null && shouldIncludeTimestamp !== void 0 ? shouldIncludeTimestamp : false;
|
|
138920
|
-
this.writeMessage = (s) => {
|
|
138921
|
-
return writeMessage(this.shouldIncludeTimestamp ? `${(/* @__PURE__ */ new Date()).toISOString()}: ${s}` : s);
|
|
138922
|
-
};
|
|
138923
|
-
this.loglevel = loglevel;
|
|
138924
|
-
}
|
|
138925
|
-
setLogLevel(newLogLevel) {
|
|
138926
|
-
this.loglevel = newLogLevel;
|
|
138927
|
-
}
|
|
138928
|
-
setShouldIncludeTime(newShouldIncludeTimestamp) {
|
|
138929
|
-
this.shouldIncludeTimestamp = newShouldIncludeTimestamp;
|
|
138930
|
-
}
|
|
138931
|
-
error(s) {
|
|
138932
|
-
if (this.loglevel <= LogLevel.ERROR) this.writeMessage(chalk_1.default.red(s) + "\n");
|
|
138933
|
-
}
|
|
138934
|
-
warn(s) {
|
|
138935
|
-
if (this.loglevel <= LogLevel.WARN) this.writeMessage(chalk_1.default.yellow(s) + "\n");
|
|
138936
|
-
}
|
|
138937
|
-
info(s) {
|
|
138938
|
-
if (this.loglevel <= LogLevel.INFO) this.writeMessage(s + "\n");
|
|
138939
|
-
}
|
|
138940
|
-
debug(s) {
|
|
138941
|
-
if (this.loglevel <= LogLevel.DEBUG) this.writeMessage(s + "\n");
|
|
138942
|
-
}
|
|
138943
|
-
};
|
|
138944
|
-
exports.Logger = Logger;
|
|
138945
|
-
}));
|
|
138946
|
-
//#endregion
|
|
138947
138902
|
//#region ../../node_modules/get-value/dist/index.mjs
|
|
138948
138903
|
var import_constants = require_constants$3();
|
|
138949
138904
|
var import_api = require_api();
|
|
138950
138905
|
var import_deploy_tests = require_deploy_tests();
|
|
138951
138906
|
var import_fips = require_fips();
|
|
138952
|
-
var import_logger = require_logger();
|
|
138953
138907
|
var __defProp = Object.defineProperty;
|
|
138954
138908
|
var __name = (target, value) => __defProp(target, "name", {
|
|
138955
138909
|
value,
|
|
@@ -139220,9 +139174,6 @@ var PluginCommand$3 = class PluginCommand$3 extends import_deploy_tests.Syntheti
|
|
|
139220
139174
|
fips: (0, import_env.toBoolean)(process.env[import_constants.FIPS_ENV_VAR]) ?? false,
|
|
139221
139175
|
fipsIgnoreError: (0, import_env.toBoolean)(process.env[import_constants.FIPS_IGNORE_ERROR_ENV_VAR]) ?? false
|
|
139222
139176
|
};
|
|
139223
|
-
this.logger = new import_logger.Logger((s) => {
|
|
139224
|
-
this.context.stdout.write(s);
|
|
139225
|
-
}, import_logger.LogLevel.INFO);
|
|
139226
139177
|
}
|
|
139227
139178
|
static getDefaultConfig() {
|
|
139228
139179
|
return {
|
|
@@ -139256,7 +139207,7 @@ var PluginCommand$3 = class PluginCommand$3 extends import_deploy_tests.Syntheti
|
|
|
139256
139207
|
try {
|
|
139257
139208
|
await deployTests(this.reporter, this.config);
|
|
139258
139209
|
} catch (error) {
|
|
139259
|
-
this.
|
|
139210
|
+
this.reporter.error(`Error: ${error.message}`);
|
|
139260
139211
|
return 1;
|
|
139261
139212
|
}
|
|
139262
139213
|
return 0;
|
|
@@ -139402,20 +139353,18 @@ var PluginCommand$2 = class PluginCommand$2 extends import_import_tests.Syntheti
|
|
|
139402
139353
|
fips: (0, import_env.toBoolean)(process.env[import_constants.FIPS_ENV_VAR]) ?? false,
|
|
139403
139354
|
fipsIgnoreError: (0, import_env.toBoolean)(process.env[import_constants.FIPS_IGNORE_ERROR_ENV_VAR]) ?? false
|
|
139404
139355
|
};
|
|
139405
|
-
this.logger = new import_logger.Logger((s) => {
|
|
139406
|
-
this.context.stdout.write(s);
|
|
139407
|
-
}, import_logger.LogLevel.INFO);
|
|
139408
139356
|
}
|
|
139409
139357
|
static getDefaultConfig() {
|
|
139410
139358
|
return {
|
|
139411
139359
|
...getDefaultConfig$1(),
|
|
139412
|
-
files: [],
|
|
139360
|
+
files: ["local-test-definitions.json"],
|
|
139413
139361
|
publicIds: [],
|
|
139414
139362
|
testSearchQuery: ""
|
|
139415
139363
|
};
|
|
139416
139364
|
}
|
|
139417
139365
|
async setup() {
|
|
139418
139366
|
(0, import_fips.enableFips)(this.fips || this.fipsConfig.fips, this.fipsIgnoreError || this.fipsConfig.fipsIgnoreError);
|
|
139367
|
+
this.reporter = getReporter([new DefaultReporter(this)]);
|
|
139419
139368
|
await this.resolveConfig();
|
|
139420
139369
|
}
|
|
139421
139370
|
async resolveConfig() {
|
|
@@ -139436,7 +139385,7 @@ var PluginCommand$2 = class PluginCommand$2 extends import_import_tests.Syntheti
|
|
|
139436
139385
|
try {
|
|
139437
139386
|
await importTests(this.reporter, this.config);
|
|
139438
139387
|
} catch (error) {
|
|
139439
|
-
this.
|
|
139388
|
+
this.reporter.error(`Error: ${error.message}`);
|
|
139440
139389
|
return 1;
|
|
139441
139390
|
}
|
|
139442
139391
|
return 0;
|
|
@@ -140069,8 +140018,8 @@ var PluginCommand$1 = class extends import_run_tests.SyntheticsRunTestsCommand {
|
|
|
140069
140018
|
}
|
|
140070
140019
|
};
|
|
140071
140020
|
//#endregion
|
|
140072
|
-
//#region
|
|
140073
|
-
var
|
|
140021
|
+
//#region ../base/dist/commands/synthetics/upload-application.js
|
|
140022
|
+
var require_upload_application = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
140074
140023
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
140075
140024
|
function adopt(value) {
|
|
140076
140025
|
return value instanceof P ? value : new P(function(resolve) {
|
|
@@ -140139,7 +140088,56 @@ var import_upload_application = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
140139
140088
|
`,
|
|
140140
140089
|
examples: [["Upload version `example 1.0` and mark it as latest", "datadog-ci synthetics upload-application --mobileApplicationId '123-123-123' --mobileApplicationVersionFilePath example/test.apk --versionName 'example 1.0' --latest"]]
|
|
140141
140090
|
});
|
|
140142
|
-
}))
|
|
140091
|
+
}));
|
|
140092
|
+
//#endregion
|
|
140093
|
+
//#region ../base/dist/helpers/logger.js
|
|
140094
|
+
var require_logger = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
140095
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
140096
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
140097
|
+
};
|
|
140098
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
140099
|
+
exports.Logger = exports.LogLevel = void 0;
|
|
140100
|
+
const chalk_1 = __importDefault(require_source$3());
|
|
140101
|
+
var LogLevel;
|
|
140102
|
+
(function(LogLevel) {
|
|
140103
|
+
LogLevel[LogLevel["DEBUG"] = 1] = "DEBUG";
|
|
140104
|
+
LogLevel[LogLevel["INFO"] = 2] = "INFO";
|
|
140105
|
+
LogLevel[LogLevel["WARN"] = 3] = "WARN";
|
|
140106
|
+
LogLevel[LogLevel["ERROR"] = 4] = "ERROR";
|
|
140107
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
140108
|
+
var Logger = class {
|
|
140109
|
+
constructor(writeMessage, loglevel, shouldIncludeTimestamp) {
|
|
140110
|
+
this.shouldIncludeTimestamp = shouldIncludeTimestamp !== null && shouldIncludeTimestamp !== void 0 ? shouldIncludeTimestamp : false;
|
|
140111
|
+
this.writeMessage = (s) => {
|
|
140112
|
+
return writeMessage(this.shouldIncludeTimestamp ? `${(/* @__PURE__ */ new Date()).toISOString()}: ${s}` : s);
|
|
140113
|
+
};
|
|
140114
|
+
this.loglevel = loglevel;
|
|
140115
|
+
}
|
|
140116
|
+
setLogLevel(newLogLevel) {
|
|
140117
|
+
this.loglevel = newLogLevel;
|
|
140118
|
+
}
|
|
140119
|
+
setShouldIncludeTime(newShouldIncludeTimestamp) {
|
|
140120
|
+
this.shouldIncludeTimestamp = newShouldIncludeTimestamp;
|
|
140121
|
+
}
|
|
140122
|
+
error(s) {
|
|
140123
|
+
if (this.loglevel <= LogLevel.ERROR) this.writeMessage(chalk_1.default.red(s) + "\n");
|
|
140124
|
+
}
|
|
140125
|
+
warn(s) {
|
|
140126
|
+
if (this.loglevel <= LogLevel.WARN) this.writeMessage(chalk_1.default.yellow(s) + "\n");
|
|
140127
|
+
}
|
|
140128
|
+
info(s) {
|
|
140129
|
+
if (this.loglevel <= LogLevel.INFO) this.writeMessage(s + "\n");
|
|
140130
|
+
}
|
|
140131
|
+
debug(s) {
|
|
140132
|
+
if (this.loglevel <= LogLevel.DEBUG) this.writeMessage(s + "\n");
|
|
140133
|
+
}
|
|
140134
|
+
};
|
|
140135
|
+
exports.Logger = Logger;
|
|
140136
|
+
}));
|
|
140137
|
+
//#endregion
|
|
140138
|
+
//#region src/commands/upload-application.ts
|
|
140139
|
+
var import_upload_application = require_upload_application();
|
|
140140
|
+
var import_logger = require_logger();
|
|
140143
140141
|
var PluginCommand = class PluginCommand extends import_upload_application.SyntheticsUploadApplicationCommand {
|
|
140144
140142
|
constructor(..._args) {
|
|
140145
140143
|
super(..._args);
|