@aura-stack/auth 0.1.0-rc.9 → 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.
Files changed (116) hide show
  1. package/dist/@types/index.cjs +15 -15
  2. package/dist/@types/index.d.ts +7 -31
  3. package/dist/@types/index.js +1 -1
  4. package/dist/@types/router.d.cjs +1 -1
  5. package/dist/@types/router.d.d.ts +7 -7
  6. package/dist/@types/utility.cjs +15 -15
  7. package/dist/@types/utility.d.ts +6 -6
  8. package/dist/@types/utility.js +1 -1
  9. package/dist/actions/callback/access-token.cjs +143 -143
  10. package/dist/actions/callback/access-token.d.ts +15 -20
  11. package/dist/actions/callback/access-token.js +8 -4
  12. package/dist/actions/callback/callback.cjs +437 -455
  13. package/dist/actions/callback/callback.d.ts +10 -12
  14. package/dist/actions/callback/callback.js +16 -12
  15. package/dist/actions/callback/userinfo.cjs +131 -134
  16. package/dist/actions/callback/userinfo.d.ts +9 -9
  17. package/dist/actions/callback/userinfo.js +10 -6
  18. package/dist/actions/csrfToken/csrfToken.cjs +162 -171
  19. package/dist/actions/csrfToken/csrfToken.d.ts +3 -3
  20. package/dist/actions/csrfToken/csrfToken.js +12 -8
  21. package/dist/actions/index.cjs +746 -773
  22. package/dist/actions/index.d.ts +13 -13
  23. package/dist/actions/index.js +34 -18
  24. package/dist/actions/session/session.cjs +149 -155
  25. package/dist/actions/session/session.d.ts +3 -3
  26. package/dist/actions/session/session.js +11 -7
  27. package/dist/actions/signIn/authorization.cjs +231 -249
  28. package/dist/actions/signIn/authorization.d.ts +12 -18
  29. package/dist/actions/signIn/authorization.js +16 -6
  30. package/dist/actions/signIn/signIn.cjs +396 -423
  31. package/dist/actions/signIn/signIn.d.ts +10 -10
  32. package/dist/actions/signIn/signIn.js +14 -10
  33. package/dist/actions/signOut/signOut.cjs +417 -440
  34. package/dist/actions/signOut/signOut.d.ts +3 -3
  35. package/dist/actions/signOut/signOut.js +15 -11
  36. package/dist/assert.cjs +35 -36
  37. package/dist/assert.d.ts +4 -4
  38. package/dist/assert.js +10 -2
  39. package/dist/chunk-256KIVJL.js +85 -96
  40. package/dist/chunk-42XB3YCW.js +19 -17
  41. package/dist/chunk-6SM22VVJ.js +13 -10
  42. package/dist/chunk-CAKJT3KS.js +84 -69
  43. package/dist/chunk-E3OXBRYF.js +19 -17
  44. package/dist/chunk-EBPE35JT.js +28 -26
  45. package/dist/chunk-FIPU4MLT.js +18 -16
  46. package/dist/chunk-FJUDBLCP.js +50 -43
  47. package/dist/chunk-FKRDCWBF.js +19 -17
  48. package/dist/chunk-GZU3RBTB.js +51 -40
  49. package/dist/chunk-HGJ4TXY4.js +132 -100
  50. package/dist/chunk-HMRKN75I.js +63 -63
  51. package/dist/chunk-IKHPGFCW.js +11 -9
  52. package/dist/chunk-JAPMIE6S.js +7 -5
  53. package/dist/chunk-KRNOMBXQ.js +19 -17
  54. package/dist/chunk-LLR722CL.js +91 -70
  55. package/dist/chunk-RLT4RFKV.js +39 -30
  56. package/dist/chunk-SJPDVKUS.js +107 -88
  57. package/dist/chunk-SMQO5WD7.js +26 -16
  58. package/dist/chunk-STHEPPUZ.js +8 -6
  59. package/dist/chunk-UJJ7R56J.js +47 -37
  60. package/dist/chunk-UTDLUEEG.js +27 -21
  61. package/dist/chunk-VFTYH33W.js +54 -37
  62. package/dist/chunk-XXJKNKGQ.js +33 -23
  63. package/dist/chunk-ZV4BH47P.js +132 -134
  64. package/dist/cookie.cjs +169 -175
  65. package/dist/cookie.d.ts +23 -51
  66. package/dist/cookie.js +34 -34
  67. package/dist/error.cjs +75 -75
  68. package/dist/error.d.ts +30 -30
  69. package/dist/error.js +15 -8
  70. package/dist/headers.cjs +28 -28
  71. package/dist/headers.d.ts +2 -2
  72. package/dist/headers.js +6 -2
  73. package/dist/index-DpfbvTZ_.d.ts +249 -298
  74. package/dist/index.cjs +936 -969
  75. package/dist/index.d.ts +10 -31
  76. package/dist/index.js +70 -50
  77. package/dist/jose.cjs +61 -64
  78. package/dist/jose.d.ts +8 -8
  79. package/dist/jose.js +9 -5
  80. package/dist/oauth/bitbucket.cjs +38 -38
  81. package/dist/oauth/bitbucket.d.ts +7 -7
  82. package/dist/oauth/bitbucket.js +6 -2
  83. package/dist/oauth/discord.cjs +48 -48
  84. package/dist/oauth/discord.d.ts +7 -7
  85. package/dist/oauth/discord.js +6 -2
  86. package/dist/oauth/figma.cjs +39 -39
  87. package/dist/oauth/figma.d.ts +7 -7
  88. package/dist/oauth/figma.js +6 -2
  89. package/dist/oauth/github.cjs +31 -31
  90. package/dist/oauth/github.d.ts +7 -7
  91. package/dist/oauth/github.js +6 -2
  92. package/dist/oauth/gitlab.cjs +39 -39
  93. package/dist/oauth/gitlab.d.ts +7 -7
  94. package/dist/oauth/gitlab.js +6 -2
  95. package/dist/oauth/index.cjs +180 -180
  96. package/dist/oauth/index.d.ts +7 -26
  97. package/dist/oauth/index.js +36 -9
  98. package/dist/oauth/spotify.cjs +39 -39
  99. package/dist/oauth/spotify.d.ts +7 -7
  100. package/dist/oauth/spotify.js +6 -2
  101. package/dist/oauth/x.cjs +39 -39
  102. package/dist/oauth/x.d.ts +7 -7
  103. package/dist/oauth/x.js +6 -2
  104. package/dist/response.cjs +27 -27
  105. package/dist/response.d.ts +2 -2
  106. package/dist/response.js +6 -2
  107. package/dist/schemas.cjs +91 -91
  108. package/dist/schemas.d.ts +93 -126
  109. package/dist/schemas.js +18 -18
  110. package/dist/secure.cjs +95 -98
  111. package/dist/secure.d.ts +17 -17
  112. package/dist/secure.js +18 -4
  113. package/dist/utils.cjs +119 -132
  114. package/dist/utils.d.ts +11 -26
  115. package/dist/utils.js +21 -21
  116. package/package.json +2 -2
package/dist/utils.d.ts CHANGED
@@ -1,14 +1,9 @@
1
- import { RouterConfig } from "@aura-stack/router"
1
+ import { RouterConfig } from '@aura-stack/router';
2
2
 
3
- declare const toSnakeCase: (str: string) => string
4
- declare const toUpperCase: (str: string) => string
5
- declare const toCastCase: <Obj extends Record<string, any>, Type extends "snake" | "upper">(
6
- obj: Obj,
7
- type?: Type
8
- ) => Type extends "snake"
9
- ? { [K in keyof Obj as `${string & K}`]: Obj[K] }
10
- : { [K in keyof Obj as Uppercase<string & K>]: Obj[K] }
11
- declare const equals: (a: string | number | undefined | null, b: string | number | undefined | null) => boolean
3
+ declare const toSnakeCase: (str: string) => string;
4
+ declare const toUpperCase: (str: string) => string;
5
+ declare const toCastCase: <Obj extends Record<string, any>, Type extends "snake" | "upper">(obj: Obj, type?: Type) => Type extends "snake" ? { [K in keyof Obj as `${string & K}`]: Obj[K]; } : { [K in keyof Obj as Uppercase<string & K>]: Obj[K]; };
6
+ declare const equals: (a: string | number | undefined | null, b: string | number | undefined | null) => boolean;
12
7
  /**
13
8
  * Sanitizes a URL by removing dangerous patterns that could be used for path traversal
14
9
  * or other attacks. This function:
@@ -21,7 +16,7 @@ declare const equals: (a: string | number | undefined | null, b: string | number
21
16
  * @param url - The URL or path to sanitize
22
17
  * @returns The sanitized URL or path
23
18
  */
24
- declare const sanitizeURL: (url: string) => string
19
+ declare const sanitizeURL: (url: string) => string;
25
20
  /**
26
21
  * Validates that a path is a safe relative path to prevent open redirect attacks.
27
22
  * A safe relative path must:
@@ -34,8 +29,8 @@ declare const sanitizeURL: (url: string) => string
34
29
  * @param path - The path to validate
35
30
  * @returns true if the path is safe, false otherwise
36
31
  */
37
- declare const isValidRelativePath: (path: string | undefined | null) => boolean
38
- declare const onErrorHandler: RouterConfig["onError"]
32
+ declare const isValidRelativePath: (path: string | undefined | null) => boolean;
33
+ declare const onErrorHandler: RouterConfig["onError"];
39
34
  /**
40
35
  * Extracts and normalizes the origin and pathname from a URL string.
41
36
  * Removes query parameters and hash fragments for a clean path.
@@ -44,17 +39,7 @@ declare const onErrorHandler: RouterConfig["onError"]
44
39
  * @param path - The URL or path string to process
45
40
  * @returns The normalized URL with origin and pathname, or the original path
46
41
  */
47
- declare const getNormalizedOriginPath: (path: string) => string
48
- declare const toISOString: (date: Date | string | number) => string
42
+ declare const getNormalizedOriginPath: (path: string) => string;
43
+ declare const toISOString: (date: Date | string | number) => string;
49
44
 
50
- export {
51
- equals,
52
- getNormalizedOriginPath,
53
- isValidRelativePath,
54
- onErrorHandler,
55
- sanitizeURL,
56
- toCastCase,
57
- toISOString,
58
- toSnakeCase,
59
- toUpperCase,
60
- }
45
+ export { equals, getNormalizedOriginPath, isValidRelativePath, onErrorHandler, sanitizeURL, toCastCase, toISOString, toSnakeCase, toUpperCase };
package/dist/utils.js CHANGED
@@ -1,23 +1,23 @@
1
1
  import {
2
- equals,
3
- getNormalizedOriginPath,
4
- isValidRelativePath,
5
- onErrorHandler,
6
- sanitizeURL,
7
- toCastCase,
8
- toISOString,
9
- toSnakeCase,
10
- toUpperCase,
11
- } from "./chunk-256KIVJL.js"
12
- import "./chunk-FJUDBLCP.js"
2
+ equals,
3
+ getNormalizedOriginPath,
4
+ isValidRelativePath,
5
+ onErrorHandler,
6
+ sanitizeURL,
7
+ toCastCase,
8
+ toISOString,
9
+ toSnakeCase,
10
+ toUpperCase
11
+ } from "./chunk-256KIVJL.js";
12
+ import "./chunk-FJUDBLCP.js";
13
13
  export {
14
- equals,
15
- getNormalizedOriginPath,
16
- isValidRelativePath,
17
- onErrorHandler,
18
- sanitizeURL,
19
- toCastCase,
20
- toISOString,
21
- toSnakeCase,
22
- toUpperCase,
23
- }
14
+ equals,
15
+ getNormalizedOriginPath,
16
+ isValidRelativePath,
17
+ onErrorHandler,
18
+ sanitizeURL,
19
+ toCastCase,
20
+ toISOString,
21
+ toSnakeCase,
22
+ toUpperCase
23
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aura-stack/auth",
3
- "version": "0.1.0-rc.9",
3
+ "version": "0.1.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Core auth for @aura-stack/auth",
@@ -48,7 +48,7 @@
48
48
  "cookie": "^1.0.2",
49
49
  "dotenv": "^17.2.3",
50
50
  "zod": "^4.1.12",
51
- "@aura-stack/jose": "0.1.0-rc.1"
51
+ "@aura-stack/jose": "0.1.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@aura-stack/tsconfig": "0.0.0",