@authdog/node-commons 0.0.8 → 0.0.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.
package/dist/index.d.mts CHANGED
@@ -1,7 +1,9 @@
1
1
  interface PublicKeyPayload {
2
2
  environmentId: string;
3
3
  identityHost: string;
4
+ version?: string;
5
+ region?: "EU" | "US";
4
6
  }
5
7
  declare const getPublicKeyPayload: (publicKey: string) => PublicKeyPayload;
6
8
 
7
- export { type PublicKeyPayload, getPublicKeyPayload };
9
+ export { getPublicKeyPayload };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  interface PublicKeyPayload {
2
2
  environmentId: string;
3
3
  identityHost: string;
4
+ version?: string;
5
+ region?: "EU" | "US";
4
6
  }
5
7
  declare const getPublicKeyPayload: (publicKey: string) => PublicKeyPayload;
6
8
 
7
- export { type PublicKeyPayload, getPublicKeyPayload };
9
+ export { getPublicKeyPayload };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var o=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(r,e)=>{for(var i in e)o(r,i,{get:e[i],enumerable:!0})},d=(r,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of s(e))!l.call(r,t)&&t!==i&&o(r,t,{get:()=>e[t],enumerable:!(n=a(e,t))||n.enumerable});return r};var y=r=>d(o({},"__esModule",{value:!0}),r);var p={};c(p,{getPublicKeyPayload:()=>f});module.exports=y(p);var f=r=>{if(!r)throw new Error("Public key is not defined");if(!r.startsWith("pk_"))throw new Error("Invalid public key");try{return JSON.parse(Buffer.from(r.replace("pk_",""),"base64").toString("utf-8"))}catch{throw new Error("Failed to parse public key")}};0&&(module.exports={getPublicKeyPayload});
1
+ "use strict";var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var c=(r,e)=>{for(var i in e)o(r,i,{get:e[i],enumerable:!0})},d=(r,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of l(e))!y.call(r,t)&&t!==i&&o(r,t,{get:()=>e[t],enumerable:!(n=s(e,t))||n.enumerable});return r};var f=r=>d(o({},"__esModule",{value:!0}),r);var P={};c(P,{getPublicKeyPayload:()=>a});module.exports=f(P);var a=r=>{if(!r)throw new Error("Public key is not defined");if(!r.startsWith("pk_"))throw new Error("Invalid public key");try{return JSON.parse(Buffer.from(r.replace("pk_",""),"base64").toString("utf-8"))}catch{throw new Error("Failed to parse public key")}};0&&(module.exports={getPublicKeyPayload});
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export interface PublicKeyPayload {\n environmentId: string;\n identityHost: string;\n};\n\nexport const getPublicKeyPayload = (publicKey: string): PublicKeyPayload => {\n if (!publicKey) {\n throw new Error(\"Public key is not defined\");\n }\n \n if (!publicKey.startsWith(\"pk_\")) {\n throw new Error(\"Invalid public key\");\n }\n \n try {\n return JSON.parse(Buffer.from(publicKey.replace(\"pk_\", \"\"), \"base64\").toString(\"utf-8\"));\n } catch (e) {\n throw new Error(\"Failed to parse public key\");\n }\n };\n "],"mappings":"4ZAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,IAAA,eAAAC,EAAAH,GAKO,IAAME,EAAuBE,GAAwC,CACxE,GAAI,CAACA,EACH,MAAM,IAAI,MAAM,2BAA2B,EAG7C,GAAI,CAACA,EAAU,WAAW,KAAK,EAC7B,MAAM,IAAI,MAAM,oBAAoB,EAGtC,GAAI,CACF,OAAO,KAAK,MAAM,OAAO,KAAKA,EAAU,QAAQ,MAAO,EAAE,EAAG,QAAQ,EAAE,SAAS,OAAO,CAAC,CACzF,MAAY,CACV,MAAM,IAAI,MAAM,4BAA4B,CAC9C,CACF","names":["index_exports","__export","getPublicKeyPayload","__toCommonJS","publicKey"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/platform-public-key/index.ts"],"sourcesContent":["export {\n getPublicKeyPayload\n} from \"./platform-public-key\";","export interface PublicKeyPayload {\n environmentId: string;\n identityHost: string;\n version?: string;\n region?: \"EU\" | \"US\"\n}\nexport const getPublicKeyPayload = (publicKey: string): PublicKeyPayload => {\n if (!publicKey) {\n throw new Error(\"Public key is not defined\");\n }\n if (!publicKey.startsWith(\"pk_\")) {\n throw new Error(\"Invalid public key\");\n }\n try {\n return JSON.parse(\n Buffer.from(publicKey.replace(\"pk_\", \"\"), \"base64\").toString(\"utf-8\"),\n );\n } catch (e) {\n throw new Error(\"Failed to parse public key\");\n }\n};\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yBAAAE,IAAA,eAAAC,EAAAH,GCMO,IAAMI,EAAuBC,GAAwC,CAC1E,GAAI,CAACA,EACH,MAAM,IAAI,MAAM,2BAA2B,EAE7C,GAAI,CAACA,EAAU,WAAW,KAAK,EAC7B,MAAM,IAAI,MAAM,oBAAoB,EAEtC,GAAI,CACF,OAAO,KAAK,MACV,OAAO,KAAKA,EAAU,QAAQ,MAAO,EAAE,EAAG,QAAQ,EAAE,SAAS,OAAO,CACtE,CACF,MAAY,CACV,MAAM,IAAI,MAAM,4BAA4B,CAC9C,CACF","names":["index_exports","__export","getPublicKeyPayload","__toCommonJS","getPublicKeyPayload","publicKey"]}
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- var t=r=>{if(!r)throw new Error("Public key is not defined");if(!r.startsWith("pk_"))throw new Error("Invalid public key");try{return JSON.parse(Buffer.from(r.replace("pk_",""),"base64").toString("utf-8"))}catch{throw new Error("Failed to parse public key")}};export{t as getPublicKeyPayload};
1
+ var e=r=>{if(!r)throw new Error("Public key is not defined");if(!r.startsWith("pk_"))throw new Error("Invalid public key");try{return JSON.parse(Buffer.from(r.replace("pk_",""),"base64").toString("utf-8"))}catch{throw new Error("Failed to parse public key")}};export{e as getPublicKeyPayload};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export interface PublicKeyPayload {\n environmentId: string;\n identityHost: string;\n};\n\nexport const getPublicKeyPayload = (publicKey: string): PublicKeyPayload => {\n if (!publicKey) {\n throw new Error(\"Public key is not defined\");\n }\n \n if (!publicKey.startsWith(\"pk_\")) {\n throw new Error(\"Invalid public key\");\n }\n \n try {\n return JSON.parse(Buffer.from(publicKey.replace(\"pk_\", \"\"), \"base64\").toString(\"utf-8\"));\n } catch (e) {\n throw new Error(\"Failed to parse public key\");\n }\n };\n "],"mappings":"AAKO,IAAMA,EAAuBC,GAAwC,CACxE,GAAI,CAACA,EACH,MAAM,IAAI,MAAM,2BAA2B,EAG7C,GAAI,CAACA,EAAU,WAAW,KAAK,EAC7B,MAAM,IAAI,MAAM,oBAAoB,EAGtC,GAAI,CACF,OAAO,KAAK,MAAM,OAAO,KAAKA,EAAU,QAAQ,MAAO,EAAE,EAAG,QAAQ,EAAE,SAAS,OAAO,CAAC,CACzF,MAAY,CACV,MAAM,IAAI,MAAM,4BAA4B,CAC9C,CACF","names":["getPublicKeyPayload","publicKey"]}
1
+ {"version":3,"sources":["../src/platform-public-key/index.ts"],"sourcesContent":["export interface PublicKeyPayload {\n environmentId: string;\n identityHost: string;\n version?: string;\n region?: \"EU\" | \"US\"\n}\nexport const getPublicKeyPayload = (publicKey: string): PublicKeyPayload => {\n if (!publicKey) {\n throw new Error(\"Public key is not defined\");\n }\n if (!publicKey.startsWith(\"pk_\")) {\n throw new Error(\"Invalid public key\");\n }\n try {\n return JSON.parse(\n Buffer.from(publicKey.replace(\"pk_\", \"\"), \"base64\").toString(\"utf-8\"),\n );\n } catch (e) {\n throw new Error(\"Failed to parse public key\");\n }\n};\n"],"mappings":"AAMO,IAAMA,EAAuBC,GAAwC,CAC1E,GAAI,CAACA,EACH,MAAM,IAAI,MAAM,2BAA2B,EAE7C,GAAI,CAACA,EAAU,WAAW,KAAK,EAC7B,MAAM,IAAI,MAAM,oBAAoB,EAEtC,GAAI,CACF,OAAO,KAAK,MACV,OAAO,KAAKA,EAAU,QAAQ,MAAO,EAAE,EAAG,QAAQ,EAAE,SAAS,OAAO,CACtE,CACF,MAAY,CACV,MAAM,IAAI,MAAM,4BAA4B,CAC9C,CACF","names":["getPublicKeyPayload","publicKey"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authdog/node-commons",
3
- "version": "0.0.8",
3
+ "version": "0.0.16",
4
4
  "description": "Authdog Next.js SDK",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -9,13 +9,8 @@
9
9
  "files": [
10
10
  "dist/"
11
11
  ],
12
- "dependencies": {
13
- "next": "^15.1.0",
14
- "react": "^19.1.0"
15
- },
16
12
  "devDependencies": {
17
- "@types/next": "^9.0.0",
18
- "@types/node": "^22.10.5",
13
+ "@types/node": "^22.10.7",
19
14
  "@types/react": "^19.1.0",
20
15
  "dotenv": "^16.4.7",
21
16
  "prettier": "^3.4.2",