@datadog/datadog-ci-plugin-sarif 5.17.0 → 5.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/bundle.js +35 -16
- package/dist/bundle.js.map +1 -1
- package/package.json +5 -2
package/dist/bundle.js
CHANGED
|
@@ -5907,11 +5907,12 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5907
5907
|
var require_package$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5908
5908
|
module.exports = {
|
|
5909
5909
|
"name": "@datadog/datadog-ci-base",
|
|
5910
|
-
"version": "5.
|
|
5910
|
+
"version": "5.19.0",
|
|
5911
5911
|
"description": "Base package for Datadog CI",
|
|
5912
5912
|
"license": "Apache-2.0",
|
|
5913
5913
|
"keywords": ["datadog", "datadog-ci"],
|
|
5914
5914
|
"homepage": "https://github.com/DataDog/datadog-ci/tree/master/packages/base",
|
|
5915
|
+
"bugs": { "url": "https://github.com/DataDog/datadog-ci/issues" },
|
|
5915
5916
|
"repository": {
|
|
5916
5917
|
"type": "git",
|
|
5917
5918
|
"url": "https://github.com/DataDog/datadog-ci.git",
|
|
@@ -6085,6 +6086,7 @@ var require_is_standalone_binary = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6085
6086
|
const { isSea } = yield import("node:sea");
|
|
6086
6087
|
return isSea();
|
|
6087
6088
|
} catch (_a) {
|
|
6089
|
+
if (process.pkg !== void 0) return true;
|
|
6088
6090
|
return false;
|
|
6089
6091
|
}
|
|
6090
6092
|
});
|
|
@@ -7037,7 +7039,7 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7037
7039
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
7038
7040
|
};
|
|
7039
7041
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7040
|
-
exports.getTempPath = exports.VERSION_OVERRIDE_REGEX = exports.scopeToPackageName = exports.importInstallPkg = exports.installPlugin = exports.checkPlugin = exports.listAllPlugins = exports.executePluginCommand = void 0;
|
|
7042
|
+
exports.getTempPath = exports.VERSION_OVERRIDE_REGEX = exports.scopeToPackageName = exports.importInstallPkg = exports.installPlugin = exports.checkPlugin = exports.listAllPlugins = exports.normalizePluginSubmodule = exports.executePluginCommand = void 0;
|
|
7041
7043
|
const node_child_process_1 = require("node:child_process");
|
|
7042
7044
|
const node_path_1 = __importDefault(require("node:path"));
|
|
7043
7045
|
const node_url_1 = __importDefault(require("node:url"));
|
|
@@ -7078,6 +7080,15 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7078
7080
|
}
|
|
7079
7081
|
});
|
|
7080
7082
|
exports.executePluginCommand = executePluginCommand;
|
|
7083
|
+
const normalizePluginSubmodule = (submodule) => {
|
|
7084
|
+
if (isPluginSubmodule(submodule)) return submodule;
|
|
7085
|
+
if (typeof submodule === "object" && submodule && "default" in submodule) {
|
|
7086
|
+
const defaultExport = submodule.default;
|
|
7087
|
+
if (isPluginSubmodule(defaultExport)) return defaultExport;
|
|
7088
|
+
}
|
|
7089
|
+
return submodule;
|
|
7090
|
+
};
|
|
7091
|
+
exports.normalizePluginSubmodule = normalizePluginSubmodule;
|
|
7081
7092
|
const listAllPlugins = () => {
|
|
7082
7093
|
return Object.keys(package_json_1.peerDependencies);
|
|
7083
7094
|
};
|
|
@@ -7240,6 +7251,21 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7240
7251
|
}
|
|
7241
7252
|
patchModulePaths();
|
|
7242
7253
|
yield handlePluginAutoInstall(scope);
|
|
7254
|
+
const submoduleName = `@datadog/datadog-ci-plugin-${scope}/commands/${command}`;
|
|
7255
|
+
debug("Resolving submodule:", submoduleName);
|
|
7256
|
+
let submoduleResolveError;
|
|
7257
|
+
let resolvedSubmodulePath;
|
|
7258
|
+
try {
|
|
7259
|
+
resolvedSubmodulePath = require.resolve(submoduleName);
|
|
7260
|
+
} catch (error) {
|
|
7261
|
+
debug(`Could not require.resolve() the ${submoduleName} submodule: ${error}`);
|
|
7262
|
+
submoduleResolveError = error;
|
|
7263
|
+
}
|
|
7264
|
+
if (resolvedSubmodulePath) {
|
|
7265
|
+
const submodulePath = node_url_1.default.pathToFileURL(resolvedSubmodulePath).href;
|
|
7266
|
+
debug("Importing submodule:", submodulePath);
|
|
7267
|
+
return (0, exports.normalizePluginSubmodule)(yield import(submodulePath));
|
|
7268
|
+
}
|
|
7243
7269
|
const pluginPackage = `@datadog/datadog-ci-plugin-${scope}`;
|
|
7244
7270
|
try {
|
|
7245
7271
|
const submodule = (_b = require(pluginPackage).commands) === null || _b === void 0 ? void 0 : _b[command];
|
|
@@ -7248,19 +7274,9 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7248
7274
|
return submodule;
|
|
7249
7275
|
}
|
|
7250
7276
|
} catch (error) {
|
|
7251
|
-
debug("Plugin bundle load failed
|
|
7252
|
-
}
|
|
7253
|
-
const submoduleName = `@datadog/datadog-ci-plugin-${scope}/commands/${command}`;
|
|
7254
|
-
debug("Resolving submodule:", submoduleName);
|
|
7255
|
-
let submodulePath = submoduleName;
|
|
7256
|
-
try {
|
|
7257
|
-
const resolvedPath = require.resolve(submoduleName);
|
|
7258
|
-
submodulePath = node_url_1.default.pathToFileURL(resolvedPath).href;
|
|
7259
|
-
} catch (error) {
|
|
7260
|
-
debug(`Could not require.resolve() the ${submoduleName} submodule: ${error}`);
|
|
7277
|
+
debug("Plugin bundle load failed:", error);
|
|
7261
7278
|
}
|
|
7262
|
-
|
|
7263
|
-
return yield import(submodulePath);
|
|
7279
|
+
throw submoduleResolveError;
|
|
7264
7280
|
});
|
|
7265
7281
|
const scopeToPackageName = (scope) => {
|
|
7266
7282
|
if (scope.match(/^@datadog\/datadog-ci-plugin-[a-z-]+$/)) return scope;
|
|
@@ -7280,6 +7296,9 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7280
7296
|
const isValidScope = (scope) => {
|
|
7281
7297
|
return (0, exports.scopeToPackageName)(scope) in package_json_1.peerDependencies;
|
|
7282
7298
|
};
|
|
7299
|
+
const isPluginSubmodule = (submodule) => {
|
|
7300
|
+
return typeof submodule === "object" && !!submodule && "PluginCommand" in submodule && typeof submodule.PluginCommand === "function";
|
|
7301
|
+
};
|
|
7283
7302
|
/**
|
|
7284
7303
|
* @example "1.2.3"
|
|
7285
7304
|
* @example "file:./artifacts/@datadog-datadog-ci-base-20.tgz"
|
|
@@ -67239,8 +67258,6 @@ var require_datadog_route = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
67239
67258
|
exports.DATADOG_ROUTE_PATHS = [
|
|
67240
67259
|
"/api/intake/ci/custom_spans",
|
|
67241
67260
|
"/api/ui/support/serverless/flare",
|
|
67242
|
-
"/api/unstable/deployments/gates/evaluation",
|
|
67243
|
-
"/api/unstable/deployments/gates/evaluation/:evaluationId",
|
|
67244
67261
|
"/api/v1/validate",
|
|
67245
67262
|
"/api/v2/ci/deployments/correlate-image",
|
|
67246
67263
|
"/api/v2/ci/deployments/correlate",
|
|
@@ -67250,6 +67267,8 @@ var require_datadog_route = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
67250
67267
|
"/api/v2/cicovreprt",
|
|
67251
67268
|
"/api/v2/ciiac",
|
|
67252
67269
|
"/api/v2/cireport",
|
|
67270
|
+
"/api/v2/deployments/gates/evaluation",
|
|
67271
|
+
"/api/v2/deployments/gates/evaluation/:evaluationId",
|
|
67253
67272
|
"/api/v2/dora/deployment",
|
|
67254
67273
|
"/api/v2/git/repository/packfile",
|
|
67255
67274
|
"/api/v2/git/repository/search_commits",
|