@bridge-ds/visual 0.3.14 → 0.3.16

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -82,7 +82,7 @@ var DEFAULT_PRODUCTS = [
82
82
  ];
83
83
  var KEY = /^[a-z0-9][a-z0-9-]*$/;
84
84
  var REPO = /^[\w.-]+\/[\w.-]+$/;
85
- var FIELDS = ["key", "name", "repo", "path", "preview", "framework", "default"];
85
+ var FIELDS = ["key", "name", "repo", "path", "preview", "production", "framework", "default"];
86
86
  function productProblems(raw) {
87
87
  if (raw === void 0) return [];
88
88
  if (!Array.isArray(raw)) return ['"products" must be a list of { "key", "name" } objects'];
@@ -108,6 +108,7 @@ function productProblems(raw) {
108
108
  if (bad) problems.push(`${at}.path" must be a folder relative to the repository root, without a leading "/" or "..", such as "apps/admin"`);
109
109
  }
110
110
  if (o.preview !== void 0 && (typeof o.preview !== "string" || !/^https?:\/\//.test(o.preview))) problems.push(`${at}.preview" must be an http(s) URL template, such as "https://app-git-{branch}.vercel.app"`);
111
+ if (o.production !== void 0 && (typeof o.production !== "string" || !/^https?:\/\/[^{}\s]+$/.test(o.production))) problems.push(`${at}.production" must be the product's production URL, without placeholders, such as "https://shop.example.com"`);
111
112
  if (o.framework !== void 0 && (typeof o.framework !== "string" || !o.framework.trim())) problems.push(`${at}.framework" must be a name such as "react", "vue" or "other"`);
112
113
  if (o.default !== void 0 && typeof o.default !== "boolean") problems.push(`${at}.default" must be true or false`);
113
114
  if (o.default === true) defaults++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bridge-ds/visual",
3
- "version": "0.3.14",
3
+ "version": "0.3.16",
4
4
  "type": "module",
5
5
  "description": "Bridge visual impact analysis: screenshots the stories and app screens a design system change touches, at the base and head refs, and pixel-diffs them into before/after/diff images and a JSON manifest.",
6
6
  "license": "FSL-1.1-MIT",
@@ -47,7 +47,7 @@
47
47
  "build:package": "node ../../scripts/build-packages.mjs visual"
48
48
  },
49
49
  "dependencies": {
50
- "@bridge-ds/core": "^0.20.0",
50
+ "@bridge-ds/core": "^0.22.0",
51
51
  "pixelmatch": "7.1.0",
52
52
  "playwright-core": "1.63.0",
53
53
  "pngjs": "7.0.0"