@cdot65/prisma-airs-cli 5.8.0 → 5.8.2

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/index.js CHANGED
@@ -9770,11 +9770,13 @@ async function backupDlpResources(api, tsgId, options = {}) {
9770
9770
  profiles2.push(structuredClone(profile));
9771
9771
  } catch (error) {
9772
9772
  const reason = error instanceof Error ? error.message : "unsupported rule";
9773
- if (!options.skipUnsupported)
9774
- throw new Error(`Profile cannot be exported: ${name} ${reason}`);
9775
9773
  skipped.push({ profile: name, reason });
9776
9774
  }
9777
9775
  }
9776
+ if (skipped.length && !options.skipUnsupported)
9777
+ throw new Error(
9778
+ `Profiles cannot be exported: ${skipped.map((item) => `${item.profile} (${item.reason})`).join("; ")}; exclude unsupported profiles explicitly with --skip-unsupported`
9779
+ );
9778
9780
  }
9779
9781
  const byName = (a, b) => (a.name ?? "").localeCompare(b.name ?? "");
9780
9782
  const dictionaryRecords = [...dictionaries.values()].sort(byName);
@@ -9958,10 +9960,12 @@ async function planDlpResourcesRestore(api, input2, destinationTsgId, options =
9958
9960
  for (const source of backup.patterns) {
9959
9961
  if (!source.id || !source.name) throw new Error("Backup data pattern lacks identity");
9960
9962
  const retired = (record) => RETIRED_PATTERN.has(record.status ?? "active");
9961
- if (source.type === "predefined") {
9963
+ if (source.type === "predefined" && !Object.hasOwn(patternMap2, source.name)) {
9962
9964
  const match2 = matchByName(destination.patterns, source.name, retired, "data pattern");
9963
9965
  if (!match2?.id || match2.type !== "predefined")
9964
- throw new Error(`Missing predefined destination data pattern: ${source.name}`);
9966
+ throw new Error(
9967
+ `Missing predefined destination data pattern: ${source.name}; bind an equivalent destination pattern with --pattern-map "${source.name}=<destination-name>"`
9968
+ );
9965
9969
  patternPlans.push({
9966
9970
  sourceId: source.id,
9967
9971
  name: source.name,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cdot65/prisma-airs-cli",
3
3
  "packageManager": "pnpm@10.6.5",
4
- "version": "5.8.0",
4
+ "version": "5.8.2",
5
5
  "description": "CLI and library for Palo Alto Prisma AIRS — guardrail refinement, AI red teaming, model security scanning, profile audits",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",