@epcc-sdk/sdks-shopper 0.0.36 → 0.0.37

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 (43) hide show
  1. package/dist/auth/configure-client.cjs +94 -0
  2. package/dist/auth/configure-client.cjs.map +1 -0
  3. package/dist/auth/configure-client.d.cts +59 -0
  4. package/dist/auth/configure-client.d.ts +59 -0
  5. package/dist/auth/configure-client.mjs +74 -0
  6. package/dist/auth/configure-client.mjs.map +1 -0
  7. package/dist/auth/kit.cjs +97 -0
  8. package/dist/auth/kit.cjs.map +1 -0
  9. package/dist/auth/kit.d.cts +15 -0
  10. package/dist/auth/kit.d.ts +15 -0
  11. package/dist/auth/kit.mjs +73 -0
  12. package/dist/auth/kit.mjs.map +1 -0
  13. package/dist/auth/make-auth-fetch.cjs +53 -0
  14. package/dist/auth/make-auth-fetch.cjs.map +1 -0
  15. package/dist/auth/make-auth-fetch.d.cts +16 -0
  16. package/dist/auth/make-auth-fetch.d.ts +16 -0
  17. package/dist/auth/make-auth-fetch.mjs +29 -0
  18. package/dist/auth/make-auth-fetch.mjs.map +1 -0
  19. package/dist/auth/storage.cjs +118 -0
  20. package/dist/auth/storage.cjs.map +1 -0
  21. package/dist/auth/storage.d.cts +23 -0
  22. package/dist/auth/storage.d.ts +23 -0
  23. package/dist/auth/storage.mjs +92 -0
  24. package/dist/auth/storage.mjs.map +1 -0
  25. package/dist/auth/token-providers.cjs +82 -0
  26. package/dist/auth/token-providers.cjs.map +1 -0
  27. package/dist/auth/token-providers.d.cts +28 -0
  28. package/dist/auth/token-providers.d.ts +28 -0
  29. package/dist/auth/token-providers.mjs +57 -0
  30. package/dist/auth/token-providers.mjs.map +1 -0
  31. package/dist/index.cjs +5 -0
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.cts +3 -0
  34. package/dist/index.d.ts +3 -0
  35. package/dist/index.mjs +3 -0
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/test/utils.cjs +38 -0
  38. package/dist/test/utils.cjs.map +1 -0
  39. package/dist/test/utils.d.cts +10 -0
  40. package/dist/test/utils.d.ts +10 -0
  41. package/dist/test/utils.mjs +13 -0
  42. package/dist/test/utils.mjs.map +1 -0
  43. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Helper to craft a JWT with exp in seconds from now
3
+ */
4
+ declare const makeJwtExpIn: (sec: number) => string;
5
+ /**
6
+ * Type assertion helper for mocks
7
+ */
8
+ declare const asAny: (fn: any) => any;
9
+
10
+ export { asAny, makeJwtExpIn };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Helper to craft a JWT with exp in seconds from now
3
+ */
4
+ declare const makeJwtExpIn: (sec: number) => string;
5
+ /**
6
+ * Type assertion helper for mocks
7
+ */
8
+ declare const asAny: (fn: any) => any;
9
+
10
+ export { asAny, makeJwtExpIn };
@@ -0,0 +1,13 @@
1
+ const makeJwtExpIn = (sec) => {
2
+ const header = { alg: "none", typ: "JWT" };
3
+ const now = Math.floor(Date.now() / 1e3);
4
+ const payload = { exp: now + sec };
5
+ const b64 = (o) => btoa(JSON.stringify(o)).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
6
+ return `${b64(header)}.${b64(payload)}.`;
7
+ };
8
+ const asAny = (fn) => fn;
9
+ export {
10
+ asAny,
11
+ makeJwtExpIn
12
+ };
13
+ //# sourceMappingURL=utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/test/utils.ts"],"sourcesContent":["/**\n * Helper to craft a JWT with exp in seconds from now\n */\nexport const makeJwtExpIn = (sec: number) => {\n const header = { alg: \"none\", typ: \"JWT\" }\n const now = Math.floor(Date.now() / 1000)\n const payload = { exp: now + sec }\n const b64 = (o: any) =>\n btoa(JSON.stringify(o))\n .replace(/\\+/g, \"-\")\n .replace(/\\//g, \"_\")\n .replace(/=+$/, \"\")\n return `${b64(header)}.${b64(payload)}.`\n}\n\n/**\n * Type assertion helper for mocks\n */\nexport const asAny = (fn: any): any => fn\n"],"mappings":"AAGO,MAAM,eAAe,CAAC,QAAgB;AAC3C,QAAM,SAAS,EAAE,KAAK,QAAQ,KAAK,MAAM;AACzC,QAAM,MAAM,KAAK,MAAM,KAAK,IAAI,IAAI,GAAI;AACxC,QAAM,UAAU,EAAE,KAAK,MAAM,IAAI;AACjC,QAAM,MAAM,CAAC,MACX,KAAK,KAAK,UAAU,CAAC,CAAC,EACnB,QAAQ,OAAO,GAAG,EAClB,QAAQ,OAAO,GAAG,EAClB,QAAQ,OAAO,EAAE;AACtB,SAAO,GAAG,IAAI,MAAM,CAAC,IAAI,IAAI,OAAO,CAAC;AACvC;AAKO,MAAM,QAAQ,CAAC,OAAiB;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epcc-sdk/sdks-shopper",
3
- "version": "0.0.36",
3
+ "version": "0.0.37",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",