@datadog/datadog-ci-plugin-sarif 5.16.1 → 5.18.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 CHANGED
@@ -5907,7 +5907,7 @@ 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.16.1",
5910
+ "version": "5.18.0",
5911
5911
  "description": "Base package for Datadog CI",
5912
5912
  "license": "Apache-2.0",
5913
5913
  "keywords": ["datadog", "datadog-ci"],
@@ -6002,7 +6002,7 @@ var require_package$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
6002
6002
  "datadog-metrics": "^0.9.3",
6003
6003
  "debug": "^4.4.1",
6004
6004
  "deep-extend": "^0.6.0",
6005
- "fast-xml-parser": "^5.5.12",
6005
+ "fast-xml-parser": "^5.7.2",
6006
6006
  "form-data": "^4.0.4",
6007
6007
  "glob": "^13.0.6",
6008
6008
  "inquirer": "^8.2.7",
@@ -6085,6 +6085,7 @@ var require_is_standalone_binary = /* @__PURE__ */ __commonJSMin(((exports) => {
6085
6085
  const { isSea } = yield import("node:sea");
6086
6086
  return isSea();
6087
6087
  } catch (_a) {
6088
+ if (process.pkg !== void 0) return true;
6088
6089
  return false;
6089
6090
  }
6090
6091
  });
@@ -7037,7 +7038,7 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports) => {
7037
7038
  return mod && mod.__esModule ? mod : { "default": mod };
7038
7039
  };
7039
7040
  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;
7041
+ exports.getTempPath = exports.VERSION_OVERRIDE_REGEX = exports.scopeToPackageName = exports.importInstallPkg = exports.installPlugin = exports.checkPlugin = exports.listAllPlugins = exports.normalizePluginSubmodule = exports.executePluginCommand = void 0;
7041
7042
  const node_child_process_1 = require("node:child_process");
7042
7043
  const node_path_1 = __importDefault(require("node:path"));
7043
7044
  const node_url_1 = __importDefault(require("node:url"));
@@ -7078,6 +7079,15 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports) => {
7078
7079
  }
7079
7080
  });
7080
7081
  exports.executePluginCommand = executePluginCommand;
7082
+ const normalizePluginSubmodule = (submodule) => {
7083
+ if (isPluginSubmodule(submodule)) return submodule;
7084
+ if (typeof submodule === "object" && submodule && "default" in submodule) {
7085
+ const defaultExport = submodule.default;
7086
+ if (isPluginSubmodule(defaultExport)) return defaultExport;
7087
+ }
7088
+ return submodule;
7089
+ };
7090
+ exports.normalizePluginSubmodule = normalizePluginSubmodule;
7081
7091
  const listAllPlugins = () => {
7082
7092
  return Object.keys(package_json_1.peerDependencies);
7083
7093
  };
@@ -7240,6 +7250,21 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports) => {
7240
7250
  }
7241
7251
  patchModulePaths();
7242
7252
  yield handlePluginAutoInstall(scope);
7253
+ const submoduleName = `@datadog/datadog-ci-plugin-${scope}/commands/${command}`;
7254
+ debug("Resolving submodule:", submoduleName);
7255
+ let submoduleResolveError;
7256
+ let resolvedSubmodulePath;
7257
+ try {
7258
+ resolvedSubmodulePath = require.resolve(submoduleName);
7259
+ } catch (error) {
7260
+ debug(`Could not require.resolve() the ${submoduleName} submodule: ${error}`);
7261
+ submoduleResolveError = error;
7262
+ }
7263
+ if (resolvedSubmodulePath) {
7264
+ const submodulePath = node_url_1.default.pathToFileURL(resolvedSubmodulePath).href;
7265
+ debug("Importing submodule:", submodulePath);
7266
+ return (0, exports.normalizePluginSubmodule)(yield import(submodulePath));
7267
+ }
7243
7268
  const pluginPackage = `@datadog/datadog-ci-plugin-${scope}`;
7244
7269
  try {
7245
7270
  const submodule = (_b = require(pluginPackage).commands) === null || _b === void 0 ? void 0 : _b[command];
@@ -7248,19 +7273,9 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports) => {
7248
7273
  return submodule;
7249
7274
  }
7250
7275
  } catch (error) {
7251
- debug("Plugin bundle load failed, trying submodule path:", error);
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}`);
7276
+ debug("Plugin bundle load failed:", error);
7261
7277
  }
7262
- debug("Importing submodule:", submodulePath);
7263
- return yield import(submodulePath);
7278
+ throw submoduleResolveError;
7264
7279
  });
7265
7280
  const scopeToPackageName = (scope) => {
7266
7281
  if (scope.match(/^@datadog\/datadog-ci-plugin-[a-z-]+$/)) return scope;
@@ -7280,6 +7295,9 @@ var require_plugin = /* @__PURE__ */ __commonJSMin(((exports) => {
7280
7295
  const isValidScope = (scope) => {
7281
7296
  return (0, exports.scopeToPackageName)(scope) in package_json_1.peerDependencies;
7282
7297
  };
7298
+ const isPluginSubmodule = (submodule) => {
7299
+ return typeof submodule === "object" && !!submodule && "PluginCommand" in submodule && typeof submodule.PluginCommand === "function";
7300
+ };
7283
7301
  /**
7284
7302
  * @example "1.2.3"
7285
7303
  * @example "file:./artifacts/@datadog-datadog-ci-base-20.tgz"
@@ -67239,8 +67257,6 @@ var require_datadog_route = /* @__PURE__ */ __commonJSMin(((exports) => {
67239
67257
  exports.DATADOG_ROUTE_PATHS = [
67240
67258
  "/api/intake/ci/custom_spans",
67241
67259
  "/api/ui/support/serverless/flare",
67242
- "/api/unstable/deployments/gates/evaluation",
67243
- "/api/unstable/deployments/gates/evaluation/:evaluationId",
67244
67260
  "/api/v1/validate",
67245
67261
  "/api/v2/ci/deployments/correlate-image",
67246
67262
  "/api/v2/ci/deployments/correlate",
@@ -67250,6 +67266,8 @@ var require_datadog_route = /* @__PURE__ */ __commonJSMin(((exports) => {
67250
67266
  "/api/v2/cicovreprt",
67251
67267
  "/api/v2/ciiac",
67252
67268
  "/api/v2/cireport",
67269
+ "/api/v2/deployments/gates/evaluation",
67270
+ "/api/v2/deployments/gates/evaluation/:evaluationId",
67253
67271
  "/api/v2/dora/deployment",
67254
67272
  "/api/v2/git/repository/packfile",
67255
67273
  "/api/v2/git/repository/search_commits",