@pixelatlarge/peanut-gallery-relay 0.1.0 → 0.1.1

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.
@@ -89,6 +89,7 @@ function validate(s, max) {
89
89
  if (typeof a.text !== "string" || a.text.length === 0 || a.text.length > 5e3) return "annotation text invalid";
90
90
  if (!a.anchor || typeof a.anchor.selector !== "string" || a.anchor.selector.length > 2e3) return "anchor invalid";
91
91
  if (typeof a.pageUrl !== "string" || a.pageUrl.length > 2e3) return "pageUrl invalid";
92
+ if (a.steps !== void 0 && (!Array.isArray(a.steps) || a.steps.length > 10 || a.steps.some((st) => !st || typeof st.selector !== "string" || st.selector.length > 2e3))) return "steps invalid";
92
93
  if (a.viewport !== void 0 && (typeof a.viewport !== "object" || !Number.isFinite(a.viewport?.width) || !Number.isFinite(a.viewport?.height))) return "viewport invalid";
93
94
  }
94
95
  return null;
package/dist/index.cjs CHANGED
@@ -113,6 +113,7 @@ function validate(s, max) {
113
113
  if (typeof a.text !== "string" || a.text.length === 0 || a.text.length > 5e3) return "annotation text invalid";
114
114
  if (!a.anchor || typeof a.anchor.selector !== "string" || a.anchor.selector.length > 2e3) return "anchor invalid";
115
115
  if (typeof a.pageUrl !== "string" || a.pageUrl.length > 2e3) return "pageUrl invalid";
116
+ if (a.steps !== void 0 && (!Array.isArray(a.steps) || a.steps.length > 10 || a.steps.some((st) => !st || typeof st.selector !== "string" || st.selector.length > 2e3))) return "steps invalid";
116
117
  if (a.viewport !== void 0 && (typeof a.viewport !== "object" || !Number.isFinite(a.viewport?.width) || !Number.isFinite(a.viewport?.height))) return "viewport invalid";
117
118
  }
118
119
  return null;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRelayHandler
3
- } from "./chunk-VIJXUKCO.js";
3
+ } from "./chunk-RS5CY75G.js";
4
4
  export {
5
5
  createRelayHandler
6
6
  };
package/dist/node.cjs CHANGED
@@ -118,6 +118,7 @@ function validate(s, max) {
118
118
  if (typeof a.text !== "string" || a.text.length === 0 || a.text.length > 5e3) return "annotation text invalid";
119
119
  if (!a.anchor || typeof a.anchor.selector !== "string" || a.anchor.selector.length > 2e3) return "anchor invalid";
120
120
  if (typeof a.pageUrl !== "string" || a.pageUrl.length > 2e3) return "pageUrl invalid";
121
+ if (a.steps !== void 0 && (!Array.isArray(a.steps) || a.steps.length > 10 || a.steps.some((st) => !st || typeof st.selector !== "string" || st.selector.length > 2e3))) return "steps invalid";
121
122
  if (a.viewport !== void 0 && (typeof a.viewport !== "object" || !Number.isFinite(a.viewport?.width) || !Number.isFinite(a.viewport?.height))) return "viewport invalid";
122
123
  }
123
124
  return null;
package/dist/node.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRelayHandler
3
- } from "./chunk-VIJXUKCO.js";
3
+ } from "./chunk-RS5CY75G.js";
4
4
 
5
5
  // src/node.ts
6
6
  import { createServer } from "http";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixelatlarge/peanut-gallery-relay",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Tiny serverless relay that turns peanut-gallery widget submissions into GitHub Issues. Deploy to Vercel, Cloudflare, Netlify or Node.",
5
5
  "keywords": [
6
6
  "github-issues",
@@ -45,7 +45,7 @@
45
45
  "typecheck": "tsc --noEmit"
46
46
  },
47
47
  "dependencies": {
48
- "@pixelatlarge/peanut-gallery-core": "0.1.0"
48
+ "@pixelatlarge/peanut-gallery-core": "0.1.1"
49
49
  },
50
50
  "license": "MIT",
51
51
  "publishConfig": {