@aura-stack/auth 0.2.0 → 0.4.0-rc.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.
Files changed (79) hide show
  1. package/dist/@types/index.d.ts +3 -2
  2. package/dist/@types/router.d.d.ts +3 -2
  3. package/dist/actions/callback/access-token.cjs +52 -41
  4. package/dist/actions/callback/access-token.d.ts +5 -4
  5. package/dist/actions/callback/access-token.js +3 -2
  6. package/dist/actions/callback/callback.cjs +69 -52
  7. package/dist/actions/callback/callback.d.ts +26 -3
  8. package/dist/actions/callback/callback.js +6 -5
  9. package/dist/actions/callback/userinfo.cjs +54 -43
  10. package/dist/actions/callback/userinfo.d.ts +3 -2
  11. package/dist/actions/callback/userinfo.js +3 -2
  12. package/dist/actions/csrfToken/csrfToken.cjs +2 -2
  13. package/dist/actions/csrfToken/csrfToken.d.ts +3 -1
  14. package/dist/actions/csrfToken/csrfToken.js +2 -2
  15. package/dist/actions/index.cjs +93 -71
  16. package/dist/actions/index.d.ts +3 -2
  17. package/dist/actions/index.js +15 -14
  18. package/dist/actions/session/session.d.ts +3 -1
  19. package/dist/actions/session/session.js +2 -2
  20. package/dist/actions/signIn/authorization.cjs +40 -40
  21. package/dist/actions/signIn/authorization.d.ts +3 -2
  22. package/dist/actions/signIn/authorization.js +2 -2
  23. package/dist/actions/signIn/signIn.cjs +63 -50
  24. package/dist/actions/signIn/signIn.d.ts +25 -3
  25. package/dist/actions/signIn/signIn.js +4 -3
  26. package/dist/actions/signOut/signOut.cjs +66 -66
  27. package/dist/actions/signOut/signOut.d.ts +9 -1
  28. package/dist/actions/signOut/signOut.js +4 -4
  29. package/dist/assert.d.ts +3 -2
  30. package/dist/{chunk-2RXNXMCZ.js → chunk-3EUWD5BB.js} +15 -7
  31. package/dist/{chunk-NEVKX6K2.js → chunk-A3N4PVAT.js} +3 -3
  32. package/dist/chunk-B737EUJV.js +22 -0
  33. package/dist/{chunk-7H3OR6UU.js → chunk-EMKJA2GJ.js} +18 -10
  34. package/dist/{chunk-4V4JNXVF.js → chunk-GA2SMTJO.js} +9 -6
  35. package/dist/chunk-HP34YGGJ.js +22 -0
  36. package/dist/{chunk-QDO2KSRJ.js → chunk-HT4YLL7N.js} +1 -1
  37. package/dist/{chunk-ZLR3LI6X.js → chunk-IVET23KF.js} +7 -4
  38. package/dist/{chunk-PTJUYB33.js → chunk-JVFTCTTE.js} +1 -1
  39. package/dist/{chunk-UEH3LVON.js → chunk-KSWLO5ZU.js} +21 -16
  40. package/dist/{chunk-QEZL7EYN.js → chunk-N4SX7TZT.js} +3 -3
  41. package/dist/{chunk-IMICRJ5U.js → chunk-W6LG7BFW.js} +14 -14
  42. package/dist/{chunk-WD7AUHQ5.js → chunk-YRCB5FLE.js} +8 -8
  43. package/dist/chunk-ZNCZVF6U.js +14 -0
  44. package/dist/cookie.cjs +14 -14
  45. package/dist/cookie.d.ts +3 -2
  46. package/dist/cookie.js +1 -1
  47. package/dist/errors.d.ts +3 -2
  48. package/dist/{index-EqsoyjrF.d.ts → index-B8jeIElf.d.ts} +57 -8
  49. package/dist/index.cjs +159 -95
  50. package/dist/index.d.ts +66 -5
  51. package/dist/index.js +23 -19
  52. package/dist/jose.cjs +2 -2
  53. package/dist/oauth/bitbucket.d.ts +3 -2
  54. package/dist/oauth/discord.d.ts +3 -2
  55. package/dist/oauth/figma.d.ts +3 -2
  56. package/dist/oauth/github.d.ts +3 -2
  57. package/dist/oauth/gitlab.d.ts +3 -2
  58. package/dist/oauth/index.cjs +85 -41
  59. package/dist/oauth/index.d.ts +3 -2
  60. package/dist/oauth/index.js +16 -8
  61. package/dist/oauth/mailchimp.cjs +46 -0
  62. package/dist/oauth/mailchimp.d.ts +7 -0
  63. package/dist/oauth/mailchimp.js +6 -0
  64. package/dist/oauth/pinterest.cjs +46 -0
  65. package/dist/oauth/pinterest.d.ts +7 -0
  66. package/dist/oauth/pinterest.js +6 -0
  67. package/dist/oauth/spotify.d.ts +3 -2
  68. package/dist/oauth/strava.d.ts +3 -2
  69. package/dist/oauth/x.d.ts +3 -2
  70. package/dist/request.cjs +38 -0
  71. package/dist/request.d.ts +13 -0
  72. package/dist/request.js +6 -0
  73. package/dist/schemas.cjs +40 -40
  74. package/dist/schemas.d.ts +15 -15
  75. package/dist/schemas.js +1 -1
  76. package/dist/secure.cjs +5 -5
  77. package/dist/secure.d.ts +3 -2
  78. package/dist/utils.d.ts +3 -3
  79. package/package.json +7 -5
@@ -1,6 +1,7 @@
1
- export { F as FigmaProfile, q as figma } from '../index-EqsoyjrF.js';
2
- import 'zod/v4';
1
+ export { F as FigmaProfile, u as figma } from '../index-B8jeIElf.js';
2
+ import 'zod';
3
3
  import '../schemas.js';
4
4
  import '@aura-stack/router/cookie';
5
+ import '@aura-stack/jose';
5
6
  import '@aura-stack/jose/jose';
6
7
  import '../@types/utility.js';
@@ -1,6 +1,7 @@
1
- export { t as GitHubProfile, u as github } from '../index-EqsoyjrF.js';
2
- import 'zod/v4';
1
+ export { w as GitHubProfile, y as github } from '../index-B8jeIElf.js';
2
+ import 'zod';
3
3
  import '../schemas.js';
4
4
  import '@aura-stack/router/cookie';
5
+ import '@aura-stack/jose';
5
6
  import '@aura-stack/jose/jose';
6
7
  import '../@types/utility.js';
@@ -1,6 +1,7 @@
1
- export { G as GitLabProfile, o as gitlab } from '../index-EqsoyjrF.js';
2
- import 'zod/v4';
1
+ export { G as GitLabProfile, r as gitlab } from '../index-B8jeIElf.js';
2
+ import 'zod';
3
3
  import '../schemas.js';
4
4
  import '@aura-stack/router/cookie';
5
+ import '@aura-stack/jose';
5
6
  import '@aura-stack/jose/jose';
6
7
  import '../@types/utility.js';
@@ -27,6 +27,8 @@ __export(oauth_exports, {
27
27
  figma: () => figma,
28
28
  github: () => github,
29
29
  gitlab: () => gitlab,
30
+ mailchimp: () => mailchimp,
31
+ pinterest: () => pinterest,
30
32
  spotify: () => spotify,
31
33
  strava: () => strava,
32
34
  x: () => x
@@ -184,29 +186,67 @@ var strava = {
184
186
  }
185
187
  };
186
188
 
189
+ // src/oauth/mailchimp.ts
190
+ var mailchimp = {
191
+ id: "mailchimp",
192
+ name: "Mailchimp",
193
+ authorizeURL: "https://login.mailchimp.com/oauth2/authorize",
194
+ accessToken: "https://login.mailchimp.com/oauth2/token",
195
+ userInfo: "https://login.mailchimp.com/oauth2/metadata",
196
+ scope: "",
197
+ responseType: "code",
198
+ profile(profile) {
199
+ return {
200
+ sub: profile.user_id,
201
+ name: profile.accountname,
202
+ email: profile.login.login_email,
203
+ image: null
204
+ };
205
+ }
206
+ };
207
+
208
+ // src/oauth/pinterest.ts
209
+ var pinterest = {
210
+ id: "pinterest",
211
+ name: "Pinterest",
212
+ authorizeURL: "https://api.pinterest.com/oauth/",
213
+ accessToken: "https://api.pinterest.com/v5/oauth/token",
214
+ userInfo: "https://api.pinterest.com/v5/user_account",
215
+ scope: "user_accounts:read",
216
+ responseType: "code",
217
+ profile(profile) {
218
+ return {
219
+ sub: profile.id,
220
+ name: profile.username,
221
+ email: null,
222
+ image: profile.profile_image
223
+ };
224
+ }
225
+ };
226
+
187
227
  // src/schemas.ts
188
- var import_v4 = require("zod/v4");
189
- var OAuthProviderConfigSchema = (0, import_v4.object)({
190
- authorizeURL: (0, import_v4.httpUrl)(),
191
- accessToken: (0, import_v4.httpUrl)(),
192
- scope: (0, import_v4.string)().optional(),
193
- userInfo: (0, import_v4.httpUrl)(),
194
- responseType: (0, import_v4.enum)(["code", "token", "id_token"]),
195
- clientId: (0, import_v4.string)(),
196
- clientSecret: (0, import_v4.string)()
228
+ var import_zod = require("zod");
229
+ var OAuthProviderConfigSchema = (0, import_zod.object)({
230
+ authorizeURL: (0, import_zod.string)().url(),
231
+ accessToken: (0, import_zod.string)().url(),
232
+ scope: (0, import_zod.string)().optional(),
233
+ userInfo: (0, import_zod.string)().url(),
234
+ responseType: (0, import_zod.enum)(["code", "token", "id_token"]),
235
+ clientId: (0, import_zod.string)(),
236
+ clientSecret: (0, import_zod.string)()
197
237
  });
198
238
  var OAuthAuthorization = OAuthProviderConfigSchema.extend({
199
- redirectURI: (0, import_v4.string)(),
200
- state: (0, import_v4.string)(),
201
- codeChallenge: (0, import_v4.string)(),
202
- codeChallengeMethod: (0, import_v4.enum)(["plain", "S256"])
239
+ redirectURI: (0, import_zod.string)(),
240
+ state: (0, import_zod.string)(),
241
+ codeChallenge: (0, import_zod.string)(),
242
+ codeChallengeMethod: (0, import_zod.enum)(["plain", "S256"])
203
243
  });
204
- var OAuthAuthorizationResponse = (0, import_v4.object)({
205
- state: (0, import_v4.string)("Missing state parameter in the OAuth authorization response."),
206
- code: (0, import_v4.string)("Missing code parameter in the OAuth authorization response.")
244
+ var OAuthAuthorizationResponse = (0, import_zod.object)({
245
+ state: (0, import_zod.string)({ message: "Missing state parameter in the OAuth authorization response." }),
246
+ code: (0, import_zod.string)({ message: "Missing code parameter in the OAuth authorization response." })
207
247
  });
208
- var OAuthAuthorizationErrorResponse = (0, import_v4.object)({
209
- error: (0, import_v4.enum)([
248
+ var OAuthAuthorizationErrorResponse = (0, import_zod.object)({
249
+ error: (0, import_zod.enum)([
210
250
  "invalid_request",
211
251
  "unauthorized_client",
212
252
  "access_denied",
@@ -215,24 +255,24 @@ var OAuthAuthorizationErrorResponse = (0, import_v4.object)({
215
255
  "server_error",
216
256
  "temporarily_unavailable"
217
257
  ]),
218
- error_description: (0, import_v4.string)().optional(),
219
- error_uri: (0, import_v4.string)().optional(),
220
- state: (0, import_v4.string)()
258
+ error_description: (0, import_zod.string)().optional(),
259
+ error_uri: (0, import_zod.string)().optional(),
260
+ state: (0, import_zod.string)()
221
261
  });
222
262
  var OAuthAccessToken = OAuthProviderConfigSchema.extend({
223
- redirectURI: (0, import_v4.string)(),
224
- code: (0, import_v4.string)(),
225
- codeVerifier: (0, import_v4.string)().min(43).max(128)
263
+ redirectURI: (0, import_zod.string)(),
264
+ code: (0, import_zod.string)(),
265
+ codeVerifier: (0, import_zod.string)().min(43).max(128)
226
266
  });
227
- var OAuthAccessTokenResponse = (0, import_v4.object)({
228
- access_token: (0, import_v4.string)(),
229
- token_type: (0, import_v4.string)(),
230
- expires_in: (0, import_v4.number)().optional(),
231
- refresh_token: (0, import_v4.string)().optional(),
232
- scope: (0, import_v4.string)().optional()
267
+ var OAuthAccessTokenResponse = (0, import_zod.object)({
268
+ access_token: (0, import_zod.string)(),
269
+ token_type: (0, import_zod.string)().optional(),
270
+ expires_in: (0, import_zod.number)().optional(),
271
+ refresh_token: (0, import_zod.string)().optional(),
272
+ scope: (0, import_zod.string)().optional().or((0, import_zod.null)())
233
273
  });
234
- var OAuthAccessTokenErrorResponse = (0, import_v4.object)({
235
- error: (0, import_v4.enum)([
274
+ var OAuthAccessTokenErrorResponse = (0, import_zod.object)({
275
+ error: (0, import_zod.enum)([
236
276
  "invalid_request",
237
277
  "invalid_client",
238
278
  "invalid_grant",
@@ -240,16 +280,16 @@ var OAuthAccessTokenErrorResponse = (0, import_v4.object)({
240
280
  "unsupported_grant_type",
241
281
  "invalid_scope"
242
282
  ]),
243
- error_description: (0, import_v4.string)().optional(),
244
- error_uri: (0, import_v4.string)().optional()
283
+ error_description: (0, import_zod.string)().optional(),
284
+ error_uri: (0, import_zod.string)().optional()
245
285
  });
246
- var OAuthErrorResponse = (0, import_v4.object)({
247
- error: (0, import_v4.string)(),
248
- error_description: (0, import_v4.string)().optional()
286
+ var OAuthErrorResponse = (0, import_zod.object)({
287
+ error: (0, import_zod.string)(),
288
+ error_description: (0, import_zod.string)().optional()
249
289
  });
250
- var OAuthEnvSchema = (0, import_v4.object)({
251
- clientId: import_v4.z.string().min(1, "OAuth Client ID is required in the environment variables."),
252
- clientSecret: import_v4.z.string().min(1, "OAuth Client Secret is required in the environment variables.")
290
+ var OAuthEnvSchema = (0, import_zod.object)({
291
+ clientId: import_zod.z.string().min(1, "OAuth Client ID is required in the environment variables."),
292
+ clientSecret: import_zod.z.string().min(1, "OAuth Client Secret is required in the environment variables.")
253
293
  });
254
294
 
255
295
  // src/errors.ts
@@ -291,7 +331,9 @@ var builtInOAuthProviders = {
291
331
  gitlab,
292
332
  spotify,
293
333
  x,
294
- strava
334
+ strava,
335
+ mailchimp,
336
+ pinterest
295
337
  };
296
338
  var defineOAuthEnvironment = (oauth) => {
297
339
  const env = process.env;
@@ -333,6 +375,8 @@ var createBuiltInOAuthProviders = (oauth = []) => {
333
375
  figma,
334
376
  github,
335
377
  gitlab,
378
+ mailchimp,
379
+ pinterest,
336
380
  spotify,
337
381
  strava,
338
382
  x
@@ -1,6 +1,7 @@
1
- export { B as BitbucketProfile, y as BuiltInOAuthProvider, D as DiscordProfile, F as FigmaProfile, t as GitHubProfile, G as GitLabProfile, I as Image, N as Nameplate, m as SpotifyProfile, l as StravaProfile, j as SummaryClub, k as SummaryGear, X as XProfile, r as bitbucket, v as builtInOAuthProviders, w as createBuiltInOAuthProviders, p as discord, q as figma, u as github, o as gitlab, n as spotify, s as strava, x } from '../index-EqsoyjrF.js';
1
+ export { B as BitbucketProfile, K as BuiltInOAuthProvider, D as DiscordProfile, F as FigmaProfile, w as GitHubProfile, G as GitLabProfile, I as Image, L as Login, M as MailchimpProfile, N as Nameplate, P as PinterestProfile, o as SpotifyProfile, n as StravaProfile, k as SummaryClub, l as SummaryGear, X as XProfile, v as bitbucket, z as builtInOAuthProviders, H as createBuiltInOAuthProviders, t as discord, u as figma, y as github, r as gitlab, m as mailchimp, p as pinterest, q as spotify, s as strava, x } from '../index-B8jeIElf.js';
2
2
  import '../@types/utility.js';
3
- import 'zod/v4';
3
+ import 'zod';
4
4
  import '../schemas.js';
5
5
  import '@aura-stack/router/cookie';
6
+ import '@aura-stack/jose';
6
7
  import '@aura-stack/jose/jose';
@@ -1,34 +1,40 @@
1
1
  import {
2
2
  builtInOAuthProviders,
3
3
  createBuiltInOAuthProviders
4
- } from "../chunk-7H3OR6UU.js";
4
+ } from "../chunk-EMKJA2GJ.js";
5
+ import {
6
+ x
7
+ } from "../chunk-42XB3YCW.js";
8
+ import {
9
+ figma
10
+ } from "../chunk-FKRDCWBF.js";
5
11
  import {
6
12
  github
7
13
  } from "../chunk-IKHPGFCW.js";
8
14
  import {
9
15
  gitlab
10
16
  } from "../chunk-KRNOMBXQ.js";
17
+ import {
18
+ mailchimp
19
+ } from "../chunk-B737EUJV.js";
20
+ import {
21
+ pinterest
22
+ } from "../chunk-HP34YGGJ.js";
11
23
  import {
12
24
  spotify
13
25
  } from "../chunk-E3OXBRYF.js";
14
26
  import {
15
27
  strava
16
28
  } from "../chunk-6R2YZ4AC.js";
17
- import {
18
- x
19
- } from "../chunk-42XB3YCW.js";
20
29
  import {
21
30
  bitbucket
22
31
  } from "../chunk-FIPU4MLT.js";
23
32
  import {
24
33
  discord
25
34
  } from "../chunk-IUYZQTJV.js";
26
- import {
27
- figma
28
- } from "../chunk-FKRDCWBF.js";
29
- import "../chunk-WD7AUHQ5.js";
30
35
  import "../chunk-CXLATHS5.js";
31
36
  import "../chunk-RRLIF4PQ.js";
37
+ import "../chunk-YRCB5FLE.js";
32
38
  export {
33
39
  bitbucket,
34
40
  builtInOAuthProviders,
@@ -37,6 +43,8 @@ export {
37
43
  figma,
38
44
  github,
39
45
  gitlab,
46
+ mailchimp,
47
+ pinterest,
40
48
  spotify,
41
49
  strava,
42
50
  x
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/oauth/mailchimp.ts
21
+ var mailchimp_exports = {};
22
+ __export(mailchimp_exports, {
23
+ mailchimp: () => mailchimp
24
+ });
25
+ module.exports = __toCommonJS(mailchimp_exports);
26
+ var mailchimp = {
27
+ id: "mailchimp",
28
+ name: "Mailchimp",
29
+ authorizeURL: "https://login.mailchimp.com/oauth2/authorize",
30
+ accessToken: "https://login.mailchimp.com/oauth2/token",
31
+ userInfo: "https://login.mailchimp.com/oauth2/metadata",
32
+ scope: "",
33
+ responseType: "code",
34
+ profile(profile) {
35
+ return {
36
+ sub: profile.user_id,
37
+ name: profile.accountname,
38
+ email: profile.login.login_email,
39
+ image: null
40
+ };
41
+ }
42
+ };
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ mailchimp
46
+ });
@@ -0,0 +1,7 @@
1
+ export { L as Login, M as MailchimpProfile, m as mailchimp } from '../index-B8jeIElf.js';
2
+ import 'zod';
3
+ import '../schemas.js';
4
+ import '@aura-stack/router/cookie';
5
+ import '@aura-stack/jose';
6
+ import '@aura-stack/jose/jose';
7
+ import '../@types/utility.js';
@@ -0,0 +1,6 @@
1
+ import {
2
+ mailchimp
3
+ } from "../chunk-B737EUJV.js";
4
+ export {
5
+ mailchimp
6
+ };
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/oauth/pinterest.ts
21
+ var pinterest_exports = {};
22
+ __export(pinterest_exports, {
23
+ pinterest: () => pinterest
24
+ });
25
+ module.exports = __toCommonJS(pinterest_exports);
26
+ var pinterest = {
27
+ id: "pinterest",
28
+ name: "Pinterest",
29
+ authorizeURL: "https://api.pinterest.com/oauth/",
30
+ accessToken: "https://api.pinterest.com/v5/oauth/token",
31
+ userInfo: "https://api.pinterest.com/v5/user_account",
32
+ scope: "user_accounts:read",
33
+ responseType: "code",
34
+ profile(profile) {
35
+ return {
36
+ sub: profile.id,
37
+ name: profile.username,
38
+ email: null,
39
+ image: profile.profile_image
40
+ };
41
+ }
42
+ };
43
+ // Annotate the CommonJS export names for ESM import in node:
44
+ 0 && (module.exports = {
45
+ pinterest
46
+ });
@@ -0,0 +1,7 @@
1
+ export { P as PinterestProfile, p as pinterest } from '../index-B8jeIElf.js';
2
+ import '../@types/utility.js';
3
+ import 'zod';
4
+ import '../schemas.js';
5
+ import '@aura-stack/router/cookie';
6
+ import '@aura-stack/jose';
7
+ import '@aura-stack/jose/jose';
@@ -0,0 +1,6 @@
1
+ import {
2
+ pinterest
3
+ } from "../chunk-HP34YGGJ.js";
4
+ export {
5
+ pinterest
6
+ };
@@ -1,6 +1,7 @@
1
- export { I as Image, m as SpotifyProfile, n as spotify } from '../index-EqsoyjrF.js';
2
- import 'zod/v4';
1
+ export { I as Image, o as SpotifyProfile, q as spotify } from '../index-B8jeIElf.js';
2
+ import 'zod';
3
3
  import '../schemas.js';
4
4
  import '@aura-stack/router/cookie';
5
+ import '@aura-stack/jose';
5
6
  import '@aura-stack/jose/jose';
6
7
  import '../@types/utility.js';
@@ -1,6 +1,7 @@
1
- export { l as StravaProfile, j as SummaryClub, k as SummaryGear, s as strava } from '../index-EqsoyjrF.js';
2
- import 'zod/v4';
1
+ export { n as StravaProfile, k as SummaryClub, l as SummaryGear, s as strava } from '../index-B8jeIElf.js';
2
+ import 'zod';
3
3
  import '../schemas.js';
4
4
  import '@aura-stack/router/cookie';
5
+ import '@aura-stack/jose';
5
6
  import '@aura-stack/jose/jose';
6
7
  import '../@types/utility.js';
package/dist/oauth/x.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- export { X as XProfile, x } from '../index-EqsoyjrF.js';
2
- import 'zod/v4';
1
+ export { X as XProfile, x } from '../index-B8jeIElf.js';
2
+ import 'zod';
3
3
  import '../schemas.js';
4
4
  import '@aura-stack/router/cookie';
5
+ import '@aura-stack/jose';
5
6
  import '@aura-stack/jose/jose';
6
7
  import '../@types/utility.js';
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/request.ts
21
+ var request_exports = {};
22
+ __export(request_exports, {
23
+ fetchAsync: () => fetchAsync
24
+ });
25
+ module.exports = __toCommonJS(request_exports);
26
+ var fetchAsync = async (url, options = {}, timeout = 5e3) => {
27
+ const controller = new AbortController();
28
+ const timeoutId = setTimeout(() => controller.abort(), timeout);
29
+ const response = await fetch(url, {
30
+ ...options,
31
+ signal: controller.signal
32
+ }).finally(() => clearTimeout(timeoutId));
33
+ return response;
34
+ };
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ fetchAsync
38
+ });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Fetches a resource with a timeout mechanism.
3
+ *
4
+ * @param url - The URL or Request object to fetch
5
+ * @param options - Optional RequestInit configuration object
6
+ * @param timeout - Timeout duration in milliseconds (default: 5000ms)
7
+ * @returns A promise that resolves to the Response object
8
+ * @example
9
+ * const response = await fetchAsync('https://api.example.com/data', {}, 3000);
10
+ */
11
+ declare const fetchAsync: (url: string | Request, options?: RequestInit, timeout?: number) => Promise<Response>;
12
+
13
+ export { fetchAsync };
@@ -0,0 +1,6 @@
1
+ import {
2
+ fetchAsync
3
+ } from "./chunk-ZNCZVF6U.js";
4
+ export {
5
+ fetchAsync
6
+ };
package/dist/schemas.cjs CHANGED
@@ -31,28 +31,28 @@ __export(schemas_exports, {
31
31
  OAuthProviderConfigSchema: () => OAuthProviderConfigSchema
32
32
  });
33
33
  module.exports = __toCommonJS(schemas_exports);
34
- var import_v4 = require("zod/v4");
35
- var OAuthProviderConfigSchema = (0, import_v4.object)({
36
- authorizeURL: (0, import_v4.httpUrl)(),
37
- accessToken: (0, import_v4.httpUrl)(),
38
- scope: (0, import_v4.string)().optional(),
39
- userInfo: (0, import_v4.httpUrl)(),
40
- responseType: (0, import_v4.enum)(["code", "token", "id_token"]),
41
- clientId: (0, import_v4.string)(),
42
- clientSecret: (0, import_v4.string)()
34
+ var import_zod = require("zod");
35
+ var OAuthProviderConfigSchema = (0, import_zod.object)({
36
+ authorizeURL: (0, import_zod.string)().url(),
37
+ accessToken: (0, import_zod.string)().url(),
38
+ scope: (0, import_zod.string)().optional(),
39
+ userInfo: (0, import_zod.string)().url(),
40
+ responseType: (0, import_zod.enum)(["code", "token", "id_token"]),
41
+ clientId: (0, import_zod.string)(),
42
+ clientSecret: (0, import_zod.string)()
43
43
  });
44
44
  var OAuthAuthorization = OAuthProviderConfigSchema.extend({
45
- redirectURI: (0, import_v4.string)(),
46
- state: (0, import_v4.string)(),
47
- codeChallenge: (0, import_v4.string)(),
48
- codeChallengeMethod: (0, import_v4.enum)(["plain", "S256"])
45
+ redirectURI: (0, import_zod.string)(),
46
+ state: (0, import_zod.string)(),
47
+ codeChallenge: (0, import_zod.string)(),
48
+ codeChallengeMethod: (0, import_zod.enum)(["plain", "S256"])
49
49
  });
50
- var OAuthAuthorizationResponse = (0, import_v4.object)({
51
- state: (0, import_v4.string)("Missing state parameter in the OAuth authorization response."),
52
- code: (0, import_v4.string)("Missing code parameter in the OAuth authorization response.")
50
+ var OAuthAuthorizationResponse = (0, import_zod.object)({
51
+ state: (0, import_zod.string)({ message: "Missing state parameter in the OAuth authorization response." }),
52
+ code: (0, import_zod.string)({ message: "Missing code parameter in the OAuth authorization response." })
53
53
  });
54
- var OAuthAuthorizationErrorResponse = (0, import_v4.object)({
55
- error: (0, import_v4.enum)([
54
+ var OAuthAuthorizationErrorResponse = (0, import_zod.object)({
55
+ error: (0, import_zod.enum)([
56
56
  "invalid_request",
57
57
  "unauthorized_client",
58
58
  "access_denied",
@@ -61,24 +61,24 @@ var OAuthAuthorizationErrorResponse = (0, import_v4.object)({
61
61
  "server_error",
62
62
  "temporarily_unavailable"
63
63
  ]),
64
- error_description: (0, import_v4.string)().optional(),
65
- error_uri: (0, import_v4.string)().optional(),
66
- state: (0, import_v4.string)()
64
+ error_description: (0, import_zod.string)().optional(),
65
+ error_uri: (0, import_zod.string)().optional(),
66
+ state: (0, import_zod.string)()
67
67
  });
68
68
  var OAuthAccessToken = OAuthProviderConfigSchema.extend({
69
- redirectURI: (0, import_v4.string)(),
70
- code: (0, import_v4.string)(),
71
- codeVerifier: (0, import_v4.string)().min(43).max(128)
69
+ redirectURI: (0, import_zod.string)(),
70
+ code: (0, import_zod.string)(),
71
+ codeVerifier: (0, import_zod.string)().min(43).max(128)
72
72
  });
73
- var OAuthAccessTokenResponse = (0, import_v4.object)({
74
- access_token: (0, import_v4.string)(),
75
- token_type: (0, import_v4.string)(),
76
- expires_in: (0, import_v4.number)().optional(),
77
- refresh_token: (0, import_v4.string)().optional(),
78
- scope: (0, import_v4.string)().optional()
73
+ var OAuthAccessTokenResponse = (0, import_zod.object)({
74
+ access_token: (0, import_zod.string)(),
75
+ token_type: (0, import_zod.string)().optional(),
76
+ expires_in: (0, import_zod.number)().optional(),
77
+ refresh_token: (0, import_zod.string)().optional(),
78
+ scope: (0, import_zod.string)().optional().or((0, import_zod.null)())
79
79
  });
80
- var OAuthAccessTokenErrorResponse = (0, import_v4.object)({
81
- error: (0, import_v4.enum)([
80
+ var OAuthAccessTokenErrorResponse = (0, import_zod.object)({
81
+ error: (0, import_zod.enum)([
82
82
  "invalid_request",
83
83
  "invalid_client",
84
84
  "invalid_grant",
@@ -86,16 +86,16 @@ var OAuthAccessTokenErrorResponse = (0, import_v4.object)({
86
86
  "unsupported_grant_type",
87
87
  "invalid_scope"
88
88
  ]),
89
- error_description: (0, import_v4.string)().optional(),
90
- error_uri: (0, import_v4.string)().optional()
89
+ error_description: (0, import_zod.string)().optional(),
90
+ error_uri: (0, import_zod.string)().optional()
91
91
  });
92
- var OAuthErrorResponse = (0, import_v4.object)({
93
- error: (0, import_v4.string)(),
94
- error_description: (0, import_v4.string)().optional()
92
+ var OAuthErrorResponse = (0, import_zod.object)({
93
+ error: (0, import_zod.string)(),
94
+ error_description: (0, import_zod.string)().optional()
95
95
  });
96
- var OAuthEnvSchema = (0, import_v4.object)({
97
- clientId: import_v4.z.string().min(1, "OAuth Client ID is required in the environment variables."),
98
- clientSecret: import_v4.z.string().min(1, "OAuth Client Secret is required in the environment variables.")
96
+ var OAuthEnvSchema = (0, import_zod.object)({
97
+ clientId: import_zod.z.string().min(1, "OAuth Client ID is required in the environment variables."),
98
+ clientSecret: import_zod.z.string().min(1, "OAuth Client Secret is required in the environment variables.")
99
99
  });
100
100
  // Annotate the CommonJS export names for ESM import in node:
101
101
  0 && (module.exports = {