@uselay/sdk 0.1.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.
@@ -0,0 +1,3 @@
1
+ declare function createUserHash(userId: string): string;
2
+
3
+ export { createUserHash };
@@ -0,0 +1,3 @@
1
+ declare function createUserHash(userId: string): string;
2
+
3
+ export { createUserHash };
@@ -0,0 +1,2 @@
1
+ "use strict";var c=Object.create;var n=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var p=(e,r)=>{for(var t in r)n(e,t,{get:r[t],enumerable:!0})},s=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of y(r))!h.call(e,i)&&i!==t&&n(e,i,{get:()=>r[i],enumerable:!(o=d(r,i))||o.enumerable});return e};var u=(e,r,t)=>(t=e!=null?c(E(e)):{},s(r||!e||!e.__esModule?n(t,"default",{value:e,enumerable:!0}):t,e)),f=e=>s(n({},"__esModule",{value:!0}),e);var m={};p(m,{createUserHash:()=>g});module.exports=f(m);var a=u(require("crypto"));function g(e){let r=process.env.LAY_SECRET_KEY;if(!r)throw new Error("Lay: LAY_SECRET_KEY environment variable is required for identity verification. Find your secret key in the Lay dashboard under project settings.");return a.default.createHmac("sha256",r).update(e).digest("hex")}0&&(module.exports={createUserHash});
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/server/index.ts"],"sourcesContent":["import crypto from 'crypto';\n\nexport function createUserHash(userId: string): string {\n const key = process.env.LAY_SECRET_KEY;\n if (!key) {\n throw new Error(\n 'Lay: LAY_SECRET_KEY environment variable is required for identity verification. ' +\n 'Find your secret key in the Lay dashboard under project settings.'\n );\n }\n return crypto.createHmac('sha256', key).update(userId).digest('hex');\n}\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAmB,qBAEZ,SAASF,EAAeG,EAAwB,CACrD,IAAMC,EAAM,QAAQ,IAAI,eACxB,GAAI,CAACA,EACH,MAAM,IAAI,MACR,mJAEF,EAEF,OAAO,EAAAC,QAAO,WAAW,SAAUD,CAAG,EAAE,OAAOD,CAAM,EAAE,OAAO,KAAK,CACrE","names":["server_exports","__export","createUserHash","__toCommonJS","import_crypto","userId","key","crypto"]}
@@ -0,0 +1,2 @@
1
+ import t from"crypto";function n(r){let e=process.env.LAY_SECRET_KEY;if(!e)throw new Error("Lay: LAY_SECRET_KEY environment variable is required for identity verification. Find your secret key in the Lay dashboard under project settings.");return t.createHmac("sha256",e).update(r).digest("hex")}export{n as createUserHash};
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/server/index.ts"],"sourcesContent":["import crypto from 'crypto';\n\nexport function createUserHash(userId: string): string {\n const key = process.env.LAY_SECRET_KEY;\n if (!key) {\n throw new Error(\n 'Lay: LAY_SECRET_KEY environment variable is required for identity verification. ' +\n 'Find your secret key in the Lay dashboard under project settings.'\n );\n }\n return crypto.createHmac('sha256', key).update(userId).digest('hex');\n}\n"],"mappings":"AAAA,OAAOA,MAAY,SAEZ,SAASC,EAAeC,EAAwB,CACrD,IAAMC,EAAM,QAAQ,IAAI,eACxB,GAAI,CAACA,EACH,MAAM,IAAI,MACR,mJAEF,EAEF,OAAOH,EAAO,WAAW,SAAUG,CAAG,EAAE,OAAOD,CAAM,EAAE,OAAO,KAAK,CACrE","names":["crypto","createUserHash","userId","key"]}
package/package.json ADDED
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "@uselay/sdk",
3
+ "version": "0.1.0",
4
+ "description": "The feedback layer for React",
5
+ "author": "Jide Lambo",
6
+ "license": "MIT",
7
+ "sideEffects": false,
8
+ "main": "dist/index.js",
9
+ "module": "dist/index.mjs",
10
+ "types": "dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.mjs",
15
+ "require": "./dist/index.js"
16
+ },
17
+ "./server": {
18
+ "types": "./dist/server/index.d.ts",
19
+ "import": "./dist/server/index.mjs",
20
+ "require": "./dist/server/index.js"
21
+ }
22
+ },
23
+ "files": [
24
+ "dist"
25
+ ],
26
+ "scripts": {
27
+ "build": "tsup",
28
+ "dev": "tsup --watch",
29
+ "lint": "eslint src/",
30
+ "typecheck": "tsc --noEmit",
31
+ "test": "vitest run",
32
+ "test:watch": "vitest"
33
+ },
34
+ "dependencies": {
35
+ "html-to-image": "^1.11.11"
36
+ },
37
+ "peerDependencies": {
38
+ "react": ">=18.0.0",
39
+ "react-dom": ">=18.0.0"
40
+ },
41
+ "devDependencies": {
42
+ "@testing-library/jest-dom": "^6.9.1",
43
+ "@testing-library/react": "^16.3.2",
44
+ "@types/node": "^25.2.3",
45
+ "@types/react": "^19.2.14",
46
+ "@types/react-dom": "^19.2.3",
47
+ "jsdom": "^28.1.0",
48
+ "next": "16.1.6",
49
+ "react": "^19.2.4",
50
+ "react-dom": "^19.2.4",
51
+ "tsup": "^8.0.0",
52
+ "typescript": "^5.3.0",
53
+ "vitest": "^4.0.18"
54
+ },
55
+ "keywords": [
56
+ "feedback",
57
+ "comments",
58
+ "react",
59
+ "design",
60
+ "collaboration",
61
+ "prototype",
62
+ "review"
63
+ ],
64
+ "repository": {
65
+ "type": "git",
66
+ "url": "https://github.com/Wonderstand-AI/feedback-layer.git"
67
+ },
68
+ "bugs": {
69
+ "url": "https://github.com/Wonderstand-AI/feedback-layer/issues"
70
+ }
71
+ }