@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.
- package/dist/{chunk-VIJXUKCO.js → chunk-RS5CY75G.js} +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.js +1 -1
- package/dist/node.cjs +1 -0
- package/dist/node.js +1 -1
- package/package.json +2 -2
|
@@ -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
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixelatlarge/peanut-gallery-relay",
|
|
3
|
-
"version": "0.1.
|
|
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.
|
|
48
|
+
"@pixelatlarge/peanut-gallery-core": "0.1.1"
|
|
49
49
|
},
|
|
50
50
|
"license": "MIT",
|
|
51
51
|
"publishConfig": {
|