autumn-js 1.3.42 → 1.3.44

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 (42) hide show
  1. package/dist/backend/adapters/express.js +17 -0
  2. package/dist/backend/adapters/express.mjs +8 -8
  3. package/dist/backend/adapters/fetch.js +17 -0
  4. package/dist/backend/adapters/fetch.mjs +8 -8
  5. package/dist/backend/adapters/hono.js +17 -0
  6. package/dist/backend/adapters/hono.mjs +8 -8
  7. package/dist/backend/adapters/index.js +17 -0
  8. package/dist/backend/adapters/index.mjs +11 -11
  9. package/dist/backend/adapters/next.js +17 -0
  10. package/dist/backend/adapters/next.mjs +8 -8
  11. package/dist/backend/{chunk-4AGFUGRP.mjs → chunk-4S63ZJ56.mjs} +1 -1
  12. package/dist/backend/{chunk-JYAPGFIY.mjs → chunk-FKYHGK3J.mjs} +1 -1
  13. package/dist/backend/{chunk-A5LJMVGG.mjs → chunk-IDGAWOWG.mjs} +4 -4
  14. package/dist/backend/{chunk-G7WBIK4N.mjs → chunk-JN27ZIEU.mjs} +1 -1
  15. package/dist/backend/{chunk-KQUDJM2H.mjs → chunk-POJBSIOX.mjs} +17 -0
  16. package/dist/backend/{chunk-QBZRROJC.mjs → chunk-UNI5JBUD.mjs} +6 -6
  17. package/dist/backend/{chunk-VNTWMMJ4.mjs → chunk-WNSOQEDD.mjs} +1 -1
  18. package/dist/backend/core/handlers/coreHandler.js +17 -0
  19. package/dist/backend/core/handlers/coreHandler.mjs +6 -6
  20. package/dist/backend/core/handlers/executeRoute.mjs +4 -4
  21. package/dist/backend/core/handlers/handleRouteByName.js +17 -0
  22. package/dist/backend/core/handlers/handleRouteByName.mjs +6 -6
  23. package/dist/backend/core/handlers/index.js +17 -0
  24. package/dist/backend/core/handlers/index.mjs +10 -10
  25. package/dist/backend/core/index.js +17 -0
  26. package/dist/backend/core/index.mjs +9 -9
  27. package/dist/backend/core/routes/index.mjs +1 -1
  28. package/dist/backend/core/routes/routeConfigs.mjs +1 -1
  29. package/dist/backend/core/utils/index.mjs +3 -3
  30. package/dist/backend/index.js +17 -0
  31. package/dist/backend/index.mjs +9 -9
  32. package/dist/better-auth/{chunk-55SS3VYE.mjs → chunk-CBB6UDNH.mjs} +17 -0
  33. package/dist/better-auth/index.js +17 -0
  34. package/dist/better-auth/index.mjs +1 -1
  35. package/dist/better-auth/utils/handleBetterAuthRoute.js +17 -0
  36. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +1 -1
  37. package/dist/better-auth/utils/index.js +17 -0
  38. package/dist/better-auth/utils/index.mjs +1 -1
  39. package/dist/sdk/index.js +17 -0
  40. package/dist/sdk/index.mjs +17 -0
  41. package/package.json +2 -2
  42. package/dist/backend/{chunk-IXUCY7AU.mjs → chunk-MOHYGUMA.mjs} +3 -3
@@ -56653,6 +56653,22 @@ var FailOpenHook = class {
56653
56653
  }
56654
56654
  };
56655
56655
 
56656
+ // ../sdk/src/hooks/redactDebugLogHook.ts
56657
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
56658
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
56659
+ var redactingLogger = (logger) => ({
56660
+ group: (label) => logger.group(label),
56661
+ groupEnd: () => logger.groupEnd(),
56662
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
56663
+ });
56664
+ var RedactDebugLogHook = class {
56665
+ sdkInit(opts) {
56666
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
56667
+ if (!logger) return opts;
56668
+ return { ...opts, debugLogger: redactingLogger(logger) };
56669
+ }
56670
+ };
56671
+
56656
56672
  // ../sdk/src/hooks/timeoutFixHook.ts
56657
56673
  var DEFAULT_TIMEOUT_MS = 5e3;
56658
56674
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -56676,6 +56692,7 @@ function initHooks(hooks) {
56676
56692
  const failOpenHook = new FailOpenHook();
56677
56693
  const timeoutFixHook = new TimeoutFixHook();
56678
56694
  hooks.registerSDKInitHook(failOpenHook);
56695
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
56679
56696
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
56680
56697
  hooks.registerAfterErrorHook(failOpenHook);
56681
56698
  }
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-4AGFUGRP.mjs";
3
+ } from "../chunk-4S63ZJ56.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-A5LJMVGG.mjs";
7
- import "../chunk-QBZRROJC.mjs";
6
+ import "../chunk-IDGAWOWG.mjs";
7
+ import "../chunk-UNI5JBUD.mjs";
8
+ import "../chunk-POJBSIOX.mjs";
9
+ import "../chunk-MOHYGUMA.mjs";
10
+ import "../chunk-TBQ27LIK.mjs";
11
+ import "../chunk-J44WR3QZ.mjs";
8
12
  import "../chunk-TSF4YCUO.mjs";
9
13
  import "../chunk-UAR3TMWI.mjs";
10
- import "../chunk-KQUDJM2H.mjs";
11
14
  import "../chunk-IQQQ5P6R.mjs";
12
- import "../chunk-IXUCY7AU.mjs";
13
15
  import "../chunk-OTXV5FY7.mjs";
14
- import "../chunk-I7CD6EB6.mjs";
15
16
  import "../chunk-VZIMT7AO.mjs";
16
- import "../chunk-TBQ27LIK.mjs";
17
- import "../chunk-J44WR3QZ.mjs";
17
+ import "../chunk-I7CD6EB6.mjs";
18
18
  import "../chunk-N7NFYY54.mjs";
19
19
  export {
20
20
  autumnHandler
@@ -56653,6 +56653,22 @@ var FailOpenHook = class {
56653
56653
  }
56654
56654
  };
56655
56655
 
56656
+ // ../sdk/src/hooks/redactDebugLogHook.ts
56657
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
56658
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
56659
+ var redactingLogger = (logger) => ({
56660
+ group: (label) => logger.group(label),
56661
+ groupEnd: () => logger.groupEnd(),
56662
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
56663
+ });
56664
+ var RedactDebugLogHook = class {
56665
+ sdkInit(opts) {
56666
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
56667
+ if (!logger) return opts;
56668
+ return { ...opts, debugLogger: redactingLogger(logger) };
56669
+ }
56670
+ };
56671
+
56656
56672
  // ../sdk/src/hooks/timeoutFixHook.ts
56657
56673
  var DEFAULT_TIMEOUT_MS = 5e3;
56658
56674
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -56676,6 +56692,7 @@ function initHooks(hooks) {
56676
56692
  const failOpenHook = new FailOpenHook();
56677
56693
  const timeoutFixHook = new TimeoutFixHook();
56678
56694
  hooks.registerSDKInitHook(failOpenHook);
56695
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
56679
56696
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
56680
56697
  hooks.registerAfterErrorHook(failOpenHook);
56681
56698
  }
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-G7WBIK4N.mjs";
3
+ } from "../chunk-JN27ZIEU.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-A5LJMVGG.mjs";
7
- import "../chunk-QBZRROJC.mjs";
6
+ import "../chunk-IDGAWOWG.mjs";
7
+ import "../chunk-UNI5JBUD.mjs";
8
+ import "../chunk-POJBSIOX.mjs";
9
+ import "../chunk-MOHYGUMA.mjs";
10
+ import "../chunk-TBQ27LIK.mjs";
11
+ import "../chunk-J44WR3QZ.mjs";
8
12
  import "../chunk-TSF4YCUO.mjs";
9
13
  import "../chunk-UAR3TMWI.mjs";
10
- import "../chunk-KQUDJM2H.mjs";
11
14
  import "../chunk-IQQQ5P6R.mjs";
12
- import "../chunk-IXUCY7AU.mjs";
13
15
  import "../chunk-OTXV5FY7.mjs";
14
- import "../chunk-I7CD6EB6.mjs";
15
16
  import "../chunk-VZIMT7AO.mjs";
16
- import "../chunk-TBQ27LIK.mjs";
17
- import "../chunk-J44WR3QZ.mjs";
17
+ import "../chunk-I7CD6EB6.mjs";
18
18
  import "../chunk-N7NFYY54.mjs";
19
19
  export {
20
20
  autumnHandler
@@ -56653,6 +56653,22 @@ var FailOpenHook = class {
56653
56653
  }
56654
56654
  };
56655
56655
 
56656
+ // ../sdk/src/hooks/redactDebugLogHook.ts
56657
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
56658
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
56659
+ var redactingLogger = (logger) => ({
56660
+ group: (label) => logger.group(label),
56661
+ groupEnd: () => logger.groupEnd(),
56662
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
56663
+ });
56664
+ var RedactDebugLogHook = class {
56665
+ sdkInit(opts) {
56666
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
56667
+ if (!logger) return opts;
56668
+ return { ...opts, debugLogger: redactingLogger(logger) };
56669
+ }
56670
+ };
56671
+
56656
56672
  // ../sdk/src/hooks/timeoutFixHook.ts
56657
56673
  var DEFAULT_TIMEOUT_MS = 5e3;
56658
56674
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -56676,6 +56692,7 @@ function initHooks(hooks) {
56676
56692
  const failOpenHook = new FailOpenHook();
56677
56693
  const timeoutFixHook = new TimeoutFixHook();
56678
56694
  hooks.registerSDKInitHook(failOpenHook);
56695
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
56679
56696
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
56680
56697
  hooks.registerAfterErrorHook(failOpenHook);
56681
56698
  }
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-VNTWMMJ4.mjs";
3
+ } from "../chunk-WNSOQEDD.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-A5LJMVGG.mjs";
7
- import "../chunk-QBZRROJC.mjs";
6
+ import "../chunk-IDGAWOWG.mjs";
7
+ import "../chunk-UNI5JBUD.mjs";
8
+ import "../chunk-POJBSIOX.mjs";
9
+ import "../chunk-MOHYGUMA.mjs";
10
+ import "../chunk-TBQ27LIK.mjs";
11
+ import "../chunk-J44WR3QZ.mjs";
8
12
  import "../chunk-TSF4YCUO.mjs";
9
13
  import "../chunk-UAR3TMWI.mjs";
10
- import "../chunk-KQUDJM2H.mjs";
11
14
  import "../chunk-IQQQ5P6R.mjs";
12
- import "../chunk-IXUCY7AU.mjs";
13
15
  import "../chunk-OTXV5FY7.mjs";
14
- import "../chunk-I7CD6EB6.mjs";
15
16
  import "../chunk-VZIMT7AO.mjs";
16
- import "../chunk-TBQ27LIK.mjs";
17
- import "../chunk-J44WR3QZ.mjs";
17
+ import "../chunk-I7CD6EB6.mjs";
18
18
  import "../chunk-N7NFYY54.mjs";
19
19
  export {
20
20
  autumnHandler
@@ -56656,6 +56656,22 @@ var FailOpenHook = class {
56656
56656
  }
56657
56657
  };
56658
56658
 
56659
+ // ../sdk/src/hooks/redactDebugLogHook.ts
56660
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
56661
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
56662
+ var redactingLogger = (logger) => ({
56663
+ group: (label) => logger.group(label),
56664
+ groupEnd: () => logger.groupEnd(),
56665
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
56666
+ });
56667
+ var RedactDebugLogHook = class {
56668
+ sdkInit(opts) {
56669
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
56670
+ if (!logger) return opts;
56671
+ return { ...opts, debugLogger: redactingLogger(logger) };
56672
+ }
56673
+ };
56674
+
56659
56675
  // ../sdk/src/hooks/timeoutFixHook.ts
56660
56676
  var DEFAULT_TIMEOUT_MS = 5e3;
56661
56677
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -56679,6 +56695,7 @@ function initHooks(hooks) {
56679
56695
  const failOpenHook = new FailOpenHook();
56680
56696
  const timeoutFixHook = new TimeoutFixHook();
56681
56697
  hooks.registerSDKInitHook(failOpenHook);
56698
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
56682
56699
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
56683
56700
  hooks.registerAfterErrorHook(failOpenHook);
56684
56701
  }
@@ -1,29 +1,29 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-4AGFUGRP.mjs";
3
+ } from "../chunk-4S63ZJ56.mjs";
4
4
  import {
5
5
  autumnHandler as autumnHandler2
6
- } from "../chunk-G7WBIK4N.mjs";
6
+ } from "../chunk-JN27ZIEU.mjs";
7
7
  import {
8
8
  autumnHandler as autumnHandler3
9
- } from "../chunk-VNTWMMJ4.mjs";
9
+ } from "../chunk-WNSOQEDD.mjs";
10
10
  import {
11
11
  autumnHandler as autumnHandler4
12
- } from "../chunk-JYAPGFIY.mjs";
12
+ } from "../chunk-FKYHGK3J.mjs";
13
13
  import "../chunk-WYDGEDEU.mjs";
14
14
  import "../chunk-VXND2UDT.mjs";
15
- import "../chunk-A5LJMVGG.mjs";
16
- import "../chunk-QBZRROJC.mjs";
15
+ import "../chunk-IDGAWOWG.mjs";
16
+ import "../chunk-UNI5JBUD.mjs";
17
+ import "../chunk-POJBSIOX.mjs";
18
+ import "../chunk-MOHYGUMA.mjs";
19
+ import "../chunk-TBQ27LIK.mjs";
20
+ import "../chunk-J44WR3QZ.mjs";
17
21
  import "../chunk-TSF4YCUO.mjs";
18
22
  import "../chunk-UAR3TMWI.mjs";
19
- import "../chunk-KQUDJM2H.mjs";
20
23
  import "../chunk-IQQQ5P6R.mjs";
21
- import "../chunk-IXUCY7AU.mjs";
22
24
  import "../chunk-OTXV5FY7.mjs";
23
- import "../chunk-I7CD6EB6.mjs";
24
25
  import "../chunk-VZIMT7AO.mjs";
25
- import "../chunk-TBQ27LIK.mjs";
26
- import "../chunk-J44WR3QZ.mjs";
26
+ import "../chunk-I7CD6EB6.mjs";
27
27
  import "../chunk-N7NFYY54.mjs";
28
28
  export {
29
29
  autumnHandler as expressAutumnHandler,
@@ -56654,6 +56654,22 @@ var FailOpenHook = class {
56654
56654
  }
56655
56655
  };
56656
56656
 
56657
+ // ../sdk/src/hooks/redactDebugLogHook.ts
56658
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
56659
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
56660
+ var redactingLogger = (logger) => ({
56661
+ group: (label) => logger.group(label),
56662
+ groupEnd: () => logger.groupEnd(),
56663
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
56664
+ });
56665
+ var RedactDebugLogHook = class {
56666
+ sdkInit(opts) {
56667
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
56668
+ if (!logger) return opts;
56669
+ return { ...opts, debugLogger: redactingLogger(logger) };
56670
+ }
56671
+ };
56672
+
56657
56673
  // ../sdk/src/hooks/timeoutFixHook.ts
56658
56674
  var DEFAULT_TIMEOUT_MS = 5e3;
56659
56675
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -56677,6 +56693,7 @@ function initHooks(hooks) {
56677
56693
  const failOpenHook = new FailOpenHook();
56678
56694
  const timeoutFixHook = new TimeoutFixHook();
56679
56695
  hooks.registerSDKInitHook(failOpenHook);
56696
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
56680
56697
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
56681
56698
  hooks.registerAfterErrorHook(failOpenHook);
56682
56699
  }
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-JYAPGFIY.mjs";
3
+ } from "../chunk-FKYHGK3J.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-A5LJMVGG.mjs";
7
- import "../chunk-QBZRROJC.mjs";
6
+ import "../chunk-IDGAWOWG.mjs";
7
+ import "../chunk-UNI5JBUD.mjs";
8
+ import "../chunk-POJBSIOX.mjs";
9
+ import "../chunk-MOHYGUMA.mjs";
10
+ import "../chunk-TBQ27LIK.mjs";
11
+ import "../chunk-J44WR3QZ.mjs";
8
12
  import "../chunk-TSF4YCUO.mjs";
9
13
  import "../chunk-UAR3TMWI.mjs";
10
- import "../chunk-KQUDJM2H.mjs";
11
14
  import "../chunk-IQQQ5P6R.mjs";
12
- import "../chunk-IXUCY7AU.mjs";
13
15
  import "../chunk-OTXV5FY7.mjs";
14
- import "../chunk-I7CD6EB6.mjs";
15
16
  import "../chunk-VZIMT7AO.mjs";
16
- import "../chunk-TBQ27LIK.mjs";
17
- import "../chunk-J44WR3QZ.mjs";
17
+ import "../chunk-I7CD6EB6.mjs";
18
18
  import "../chunk-N7NFYY54.mjs";
19
19
  export {
20
20
  autumnHandler
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCoreHandler
3
- } from "./chunk-QBZRROJC.mjs";
3
+ } from "./chunk-UNI5JBUD.mjs";
4
4
 
5
5
  // src/backend/adapters/express.ts
6
6
  function autumnHandler(options) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCoreHandler
3
- } from "./chunk-QBZRROJC.mjs";
3
+ } from "./chunk-UNI5JBUD.mjs";
4
4
 
5
5
  // src/backend/adapters/next.ts
6
6
  import { NextResponse } from "next/server";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Autumn
3
- } from "./chunk-KQUDJM2H.mjs";
3
+ } from "./chunk-POJBSIOX.mjs";
4
+ import {
5
+ executeRoute
6
+ } from "./chunk-MOHYGUMA.mjs";
4
7
  import {
5
8
  routeConfigs
6
9
  } from "./chunk-IQQQ5P6R.mjs";
7
- import {
8
- executeRoute
9
- } from "./chunk-IXUCY7AU.mjs";
10
10
  import {
11
11
  secretKeyCheck
12
12
  } from "./chunk-VZIMT7AO.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCoreHandler
3
- } from "./chunk-QBZRROJC.mjs";
3
+ } from "./chunk-UNI5JBUD.mjs";
4
4
 
5
5
  // src/backend/adapters/fetch.ts
6
6
  function autumnHandler(options) {
@@ -56570,6 +56570,22 @@ var FailOpenHook = class {
56570
56570
  }
56571
56571
  };
56572
56572
 
56573
+ // ../sdk/src/hooks/redactDebugLogHook.ts
56574
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
56575
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
56576
+ var redactingLogger = (logger) => ({
56577
+ group: (label) => logger.group(label),
56578
+ groupEnd: () => logger.groupEnd(),
56579
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
56580
+ });
56581
+ var RedactDebugLogHook = class {
56582
+ sdkInit(opts) {
56583
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
56584
+ if (!logger) return opts;
56585
+ return { ...opts, debugLogger: redactingLogger(logger) };
56586
+ }
56587
+ };
56588
+
56573
56589
  // ../sdk/src/hooks/timeoutFixHook.ts
56574
56590
  var DEFAULT_TIMEOUT_MS = 5e3;
56575
56591
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -56593,6 +56609,7 @@ function initHooks(hooks) {
56593
56609
  const failOpenHook = new FailOpenHook();
56594
56610
  const timeoutFixHook = new TimeoutFixHook();
56595
56611
  hooks.registerSDKInitHook(failOpenHook);
56612
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
56596
56613
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
56597
56614
  hooks.registerAfterErrorHook(failOpenHook);
56598
56615
  }
@@ -1,15 +1,15 @@
1
+ import {
2
+ Autumn
3
+ } from "./chunk-POJBSIOX.mjs";
4
+ import {
5
+ executeRoute
6
+ } from "./chunk-MOHYGUMA.mjs";
1
7
  import {
2
8
  buildRouter
3
9
  } from "./chunk-UAR3TMWI.mjs";
4
- import {
5
- Autumn
6
- } from "./chunk-KQUDJM2H.mjs";
7
10
  import {
8
11
  routeConfigs
9
12
  } from "./chunk-IQQQ5P6R.mjs";
10
- import {
11
- executeRoute
12
- } from "./chunk-IXUCY7AU.mjs";
13
13
  import {
14
14
  secretKeyCheck
15
15
  } from "./chunk-VZIMT7AO.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCoreHandler
3
- } from "./chunk-QBZRROJC.mjs";
3
+ } from "./chunk-UNI5JBUD.mjs";
4
4
 
5
5
  // src/backend/adapters/hono.ts
6
6
  function autumnHandler(options) {
@@ -56653,6 +56653,22 @@ var FailOpenHook = class {
56653
56653
  }
56654
56654
  };
56655
56655
 
56656
+ // ../sdk/src/hooks/redactDebugLogHook.ts
56657
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
56658
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
56659
+ var redactingLogger = (logger) => ({
56660
+ group: (label) => logger.group(label),
56661
+ groupEnd: () => logger.groupEnd(),
56662
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
56663
+ });
56664
+ var RedactDebugLogHook = class {
56665
+ sdkInit(opts) {
56666
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
56667
+ if (!logger) return opts;
56668
+ return { ...opts, debugLogger: redactingLogger(logger) };
56669
+ }
56670
+ };
56671
+
56656
56672
  // ../sdk/src/hooks/timeoutFixHook.ts
56657
56673
  var DEFAULT_TIMEOUT_MS = 5e3;
56658
56674
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -56676,6 +56692,7 @@ function initHooks(hooks) {
56676
56692
  const failOpenHook = new FailOpenHook();
56677
56693
  const timeoutFixHook = new TimeoutFixHook();
56678
56694
  hooks.registerSDKInitHook(failOpenHook);
56695
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
56679
56696
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
56680
56697
  hooks.registerAfterErrorHook(failOpenHook);
56681
56698
  }
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createCoreHandler
3
- } from "../../chunk-QBZRROJC.mjs";
3
+ } from "../../chunk-UNI5JBUD.mjs";
4
+ import "../../chunk-POJBSIOX.mjs";
5
+ import "../../chunk-MOHYGUMA.mjs";
6
+ import "../../chunk-TBQ27LIK.mjs";
7
+ import "../../chunk-J44WR3QZ.mjs";
4
8
  import "../../chunk-TSF4YCUO.mjs";
5
9
  import "../../chunk-UAR3TMWI.mjs";
6
- import "../../chunk-KQUDJM2H.mjs";
7
10
  import "../../chunk-IQQQ5P6R.mjs";
8
- import "../../chunk-IXUCY7AU.mjs";
9
11
  import "../../chunk-OTXV5FY7.mjs";
10
- import "../../chunk-I7CD6EB6.mjs";
11
12
  import "../../chunk-VZIMT7AO.mjs";
12
- import "../../chunk-TBQ27LIK.mjs";
13
- import "../../chunk-J44WR3QZ.mjs";
13
+ import "../../chunk-I7CD6EB6.mjs";
14
14
  import "../../chunk-N7NFYY54.mjs";
15
15
  export {
16
16
  createCoreHandler
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  executeRoute
3
- } from "../../chunk-IXUCY7AU.mjs";
4
- import "../../chunk-OTXV5FY7.mjs";
5
- import "../../chunk-I7CD6EB6.mjs";
6
- import "../../chunk-VZIMT7AO.mjs";
3
+ } from "../../chunk-MOHYGUMA.mjs";
7
4
  import "../../chunk-TBQ27LIK.mjs";
8
5
  import "../../chunk-J44WR3QZ.mjs";
6
+ import "../../chunk-OTXV5FY7.mjs";
7
+ import "../../chunk-VZIMT7AO.mjs";
8
+ import "../../chunk-I7CD6EB6.mjs";
9
9
  import "../../chunk-N7NFYY54.mjs";
10
10
  export {
11
11
  executeRoute
@@ -56653,6 +56653,22 @@ var FailOpenHook = class {
56653
56653
  }
56654
56654
  };
56655
56655
 
56656
+ // ../sdk/src/hooks/redactDebugLogHook.ts
56657
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
56658
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
56659
+ var redactingLogger = (logger) => ({
56660
+ group: (label) => logger.group(label),
56661
+ groupEnd: () => logger.groupEnd(),
56662
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
56663
+ });
56664
+ var RedactDebugLogHook = class {
56665
+ sdkInit(opts) {
56666
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
56667
+ if (!logger) return opts;
56668
+ return { ...opts, debugLogger: redactingLogger(logger) };
56669
+ }
56670
+ };
56671
+
56656
56672
  // ../sdk/src/hooks/timeoutFixHook.ts
56657
56673
  var DEFAULT_TIMEOUT_MS = 5e3;
56658
56674
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -56676,6 +56692,7 @@ function initHooks(hooks) {
56676
56692
  const failOpenHook = new FailOpenHook();
56677
56693
  const timeoutFixHook = new TimeoutFixHook();
56678
56694
  hooks.registerSDKInitHook(failOpenHook);
56695
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
56679
56696
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
56680
56697
  hooks.registerAfterErrorHook(failOpenHook);
56681
56698
  }
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  handleRouteByName
3
- } from "../../chunk-A5LJMVGG.mjs";
4
- import "../../chunk-KQUDJM2H.mjs";
3
+ } from "../../chunk-IDGAWOWG.mjs";
4
+ import "../../chunk-POJBSIOX.mjs";
5
+ import "../../chunk-MOHYGUMA.mjs";
6
+ import "../../chunk-TBQ27LIK.mjs";
7
+ import "../../chunk-J44WR3QZ.mjs";
5
8
  import "../../chunk-IQQQ5P6R.mjs";
6
- import "../../chunk-IXUCY7AU.mjs";
7
9
  import "../../chunk-OTXV5FY7.mjs";
8
- import "../../chunk-I7CD6EB6.mjs";
9
10
  import "../../chunk-VZIMT7AO.mjs";
10
- import "../../chunk-TBQ27LIK.mjs";
11
- import "../../chunk-J44WR3QZ.mjs";
11
+ import "../../chunk-I7CD6EB6.mjs";
12
12
  import "../../chunk-N7NFYY54.mjs";
13
13
  export {
14
14
  handleRouteByName
@@ -56657,6 +56657,22 @@ var FailOpenHook = class {
56657
56657
  }
56658
56658
  };
56659
56659
 
56660
+ // ../sdk/src/hooks/redactDebugLogHook.ts
56661
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
56662
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
56663
+ var redactingLogger = (logger) => ({
56664
+ group: (label) => logger.group(label),
56665
+ groupEnd: () => logger.groupEnd(),
56666
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
56667
+ });
56668
+ var RedactDebugLogHook = class {
56669
+ sdkInit(opts) {
56670
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
56671
+ if (!logger) return opts;
56672
+ return { ...opts, debugLogger: redactingLogger(logger) };
56673
+ }
56674
+ };
56675
+
56660
56676
  // ../sdk/src/hooks/timeoutFixHook.ts
56661
56677
  var DEFAULT_TIMEOUT_MS = 5e3;
56662
56678
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -56680,6 +56696,7 @@ function initHooks(hooks) {
56680
56696
  const failOpenHook = new FailOpenHook();
56681
56697
  const timeoutFixHook = new TimeoutFixHook();
56682
56698
  hooks.registerSDKInitHook(failOpenHook);
56699
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
56683
56700
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
56684
56701
  hooks.registerAfterErrorHook(failOpenHook);
56685
56702
  }
@@ -1,26 +1,26 @@
1
1
  import "../../chunk-VXND2UDT.mjs";
2
2
  import {
3
3
  handleRouteByName
4
- } from "../../chunk-A5LJMVGG.mjs";
4
+ } from "../../chunk-IDGAWOWG.mjs";
5
5
  import {
6
6
  createCoreHandler
7
- } from "../../chunk-QBZRROJC.mjs";
8
- import "../../chunk-TSF4YCUO.mjs";
9
- import "../../chunk-UAR3TMWI.mjs";
10
- import "../../chunk-KQUDJM2H.mjs";
11
- import "../../chunk-IQQQ5P6R.mjs";
7
+ } from "../../chunk-UNI5JBUD.mjs";
8
+ import "../../chunk-POJBSIOX.mjs";
12
9
  import {
13
10
  executeRoute
14
- } from "../../chunk-IXUCY7AU.mjs";
15
- import "../../chunk-OTXV5FY7.mjs";
16
- import "../../chunk-I7CD6EB6.mjs";
17
- import "../../chunk-VZIMT7AO.mjs";
11
+ } from "../../chunk-MOHYGUMA.mjs";
18
12
  import {
19
13
  resolveIdentity
20
14
  } from "../../chunk-TBQ27LIK.mjs";
21
15
  import {
22
16
  transformSdkError
23
17
  } from "../../chunk-J44WR3QZ.mjs";
18
+ import "../../chunk-TSF4YCUO.mjs";
19
+ import "../../chunk-UAR3TMWI.mjs";
20
+ import "../../chunk-IQQQ5P6R.mjs";
21
+ import "../../chunk-OTXV5FY7.mjs";
22
+ import "../../chunk-VZIMT7AO.mjs";
23
+ import "../../chunk-I7CD6EB6.mjs";
24
24
  import "../../chunk-N7NFYY54.mjs";
25
25
  export {
26
26
  createCoreHandler,
@@ -56661,6 +56661,22 @@ var FailOpenHook = class {
56661
56661
  }
56662
56662
  };
56663
56663
 
56664
+ // ../sdk/src/hooks/redactDebugLogHook.ts
56665
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
56666
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
56667
+ var redactingLogger = (logger) => ({
56668
+ group: (label) => logger.group(label),
56669
+ groupEnd: () => logger.groupEnd(),
56670
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
56671
+ });
56672
+ var RedactDebugLogHook = class {
56673
+ sdkInit(opts) {
56674
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
56675
+ if (!logger) return opts;
56676
+ return { ...opts, debugLogger: redactingLogger(logger) };
56677
+ }
56678
+ };
56679
+
56664
56680
  // ../sdk/src/hooks/timeoutFixHook.ts
56665
56681
  var DEFAULT_TIMEOUT_MS = 5e3;
56666
56682
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -56684,6 +56700,7 @@ function initHooks(hooks) {
56684
56700
  const failOpenHook = new FailOpenHook();
56685
56701
  const timeoutFixHook = new TimeoutFixHook();
56686
56702
  hooks.registerSDKInitHook(failOpenHook);
56703
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
56687
56704
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
56688
56705
  hooks.registerAfterErrorHook(failOpenHook);
56689
56706
  }
@@ -2,28 +2,28 @@ import "../chunk-WYDGEDEU.mjs";
2
2
  import "../chunk-VXND2UDT.mjs";
3
3
  import {
4
4
  handleRouteByName
5
- } from "../chunk-A5LJMVGG.mjs";
5
+ } from "../chunk-IDGAWOWG.mjs";
6
6
  import {
7
7
  createCoreHandler
8
- } from "../chunk-QBZRROJC.mjs";
8
+ } from "../chunk-UNI5JBUD.mjs";
9
+ import "../chunk-POJBSIOX.mjs";
10
+ import "../chunk-MOHYGUMA.mjs";
11
+ import "../chunk-TBQ27LIK.mjs";
12
+ import "../chunk-J44WR3QZ.mjs";
9
13
  import "../chunk-TSF4YCUO.mjs";
10
14
  import {
11
15
  buildRouter
12
16
  } from "../chunk-UAR3TMWI.mjs";
13
- import "../chunk-KQUDJM2H.mjs";
14
17
  import {
15
18
  routeConfigs
16
19
  } from "../chunk-IQQQ5P6R.mjs";
17
- import "../chunk-IXUCY7AU.mjs";
18
20
  import "../chunk-OTXV5FY7.mjs";
19
- import {
20
- sanitizeBody
21
- } from "../chunk-I7CD6EB6.mjs";
22
21
  import {
23
22
  secretKeyCheck
24
23
  } from "../chunk-VZIMT7AO.mjs";
25
- import "../chunk-TBQ27LIK.mjs";
26
- import "../chunk-J44WR3QZ.mjs";
24
+ import {
25
+ sanitizeBody
26
+ } from "../chunk-I7CD6EB6.mjs";
27
27
  import {
28
28
  backendError,
29
29
  backendSuccess,
@@ -6,8 +6,8 @@ import {
6
6
  routeConfigs
7
7
  } from "../../chunk-IQQQ5P6R.mjs";
8
8
  import "../../chunk-OTXV5FY7.mjs";
9
- import "../../chunk-I7CD6EB6.mjs";
10
9
  import "../../chunk-VZIMT7AO.mjs";
10
+ import "../../chunk-I7CD6EB6.mjs";
11
11
  import "../../chunk-N7NFYY54.mjs";
12
12
  export {
13
13
  buildRouter,
@@ -2,8 +2,8 @@ import {
2
2
  routeConfigs
3
3
  } from "../../chunk-IQQQ5P6R.mjs";
4
4
  import "../../chunk-OTXV5FY7.mjs";
5
- import "../../chunk-I7CD6EB6.mjs";
6
5
  import "../../chunk-VZIMT7AO.mjs";
6
+ import "../../chunk-I7CD6EB6.mjs";
7
7
  import "../../chunk-N7NFYY54.mjs";
8
8
  export {
9
9
  routeConfigs
@@ -1,12 +1,12 @@
1
1
  import "../../chunk-OTXV5FY7.mjs";
2
+ import {
3
+ secretKeyCheck
4
+ } from "../../chunk-VZIMT7AO.mjs";
2
5
  import {
3
6
  CUSTOMER_PROTECTED_BODY_FIELDS,
4
7
  DEFAULT_PROTECTED_BODY_FIELDS,
5
8
  sanitizeBody
6
9
  } from "../../chunk-I7CD6EB6.mjs";
7
- import {
8
- secretKeyCheck
9
- } from "../../chunk-VZIMT7AO.mjs";
10
10
  import {
11
11
  backendError,
12
12
  backendSuccess,
@@ -56661,6 +56661,22 @@ var FailOpenHook = class {
56661
56661
  }
56662
56662
  };
56663
56663
 
56664
+ // ../sdk/src/hooks/redactDebugLogHook.ts
56665
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
56666
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
56667
+ var redactingLogger = (logger) => ({
56668
+ group: (label) => logger.group(label),
56669
+ groupEnd: () => logger.groupEnd(),
56670
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
56671
+ });
56672
+ var RedactDebugLogHook = class {
56673
+ sdkInit(opts) {
56674
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
56675
+ if (!logger) return opts;
56676
+ return { ...opts, debugLogger: redactingLogger(logger) };
56677
+ }
56678
+ };
56679
+
56664
56680
  // ../sdk/src/hooks/timeoutFixHook.ts
56665
56681
  var DEFAULT_TIMEOUT_MS = 5e3;
56666
56682
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -56684,6 +56700,7 @@ function initHooks(hooks) {
56684
56700
  const failOpenHook = new FailOpenHook();
56685
56701
  const timeoutFixHook = new TimeoutFixHook();
56686
56702
  hooks.registerSDKInitHook(failOpenHook);
56703
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
56687
56704
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
56688
56705
  hooks.registerAfterErrorHook(failOpenHook);
56689
56706
  }
@@ -1,27 +1,27 @@
1
1
  import "./chunk-WYDGEDEU.mjs";
2
2
  import "./chunk-VXND2UDT.mjs";
3
- import "./chunk-A5LJMVGG.mjs";
3
+ import "./chunk-IDGAWOWG.mjs";
4
4
  import {
5
5
  createCoreHandler
6
- } from "./chunk-QBZRROJC.mjs";
6
+ } from "./chunk-UNI5JBUD.mjs";
7
+ import "./chunk-POJBSIOX.mjs";
8
+ import "./chunk-MOHYGUMA.mjs";
9
+ import "./chunk-TBQ27LIK.mjs";
10
+ import "./chunk-J44WR3QZ.mjs";
7
11
  import "./chunk-TSF4YCUO.mjs";
8
12
  import {
9
13
  buildRouter
10
14
  } from "./chunk-UAR3TMWI.mjs";
11
- import "./chunk-KQUDJM2H.mjs";
12
15
  import {
13
16
  routeConfigs
14
17
  } from "./chunk-IQQQ5P6R.mjs";
15
- import "./chunk-IXUCY7AU.mjs";
16
18
  import "./chunk-OTXV5FY7.mjs";
17
- import {
18
- sanitizeBody
19
- } from "./chunk-I7CD6EB6.mjs";
20
19
  import {
21
20
  secretKeyCheck
22
21
  } from "./chunk-VZIMT7AO.mjs";
23
- import "./chunk-TBQ27LIK.mjs";
24
- import "./chunk-J44WR3QZ.mjs";
22
+ import {
23
+ sanitizeBody
24
+ } from "./chunk-I7CD6EB6.mjs";
25
25
  import {
26
26
  backendError,
27
27
  backendSuccess,
@@ -56635,6 +56635,22 @@ var FailOpenHook = class {
56635
56635
  }
56636
56636
  };
56637
56637
 
56638
+ // ../sdk/src/hooks/redactDebugLogHook.ts
56639
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
56640
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
56641
+ var redactingLogger = (logger) => ({
56642
+ group: (label) => logger.group(label),
56643
+ groupEnd: () => logger.groupEnd(),
56644
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
56645
+ });
56646
+ var RedactDebugLogHook = class {
56647
+ sdkInit(opts) {
56648
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
56649
+ if (!logger) return opts;
56650
+ return { ...opts, debugLogger: redactingLogger(logger) };
56651
+ }
56652
+ };
56653
+
56638
56654
  // ../sdk/src/hooks/timeoutFixHook.ts
56639
56655
  var DEFAULT_TIMEOUT_MS = 5e3;
56640
56656
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -56658,6 +56674,7 @@ function initHooks(hooks) {
56658
56674
  const failOpenHook = new FailOpenHook();
56659
56675
  const timeoutFixHook = new TimeoutFixHook();
56660
56676
  hooks.registerSDKInitHook(failOpenHook);
56677
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
56661
56678
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
56662
56679
  hooks.registerAfterErrorHook(failOpenHook);
56663
56680
  }
@@ -63483,6 +63483,22 @@ var FailOpenHook = class {
63483
63483
  }
63484
63484
  };
63485
63485
 
63486
+ // ../sdk/src/hooks/redactDebugLogHook.ts
63487
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
63488
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
63489
+ var redactingLogger = (logger) => ({
63490
+ group: (label) => logger.group(label),
63491
+ groupEnd: () => logger.groupEnd(),
63492
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
63493
+ });
63494
+ var RedactDebugLogHook = class {
63495
+ sdkInit(opts) {
63496
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
63497
+ if (!logger) return opts;
63498
+ return { ...opts, debugLogger: redactingLogger(logger) };
63499
+ }
63500
+ };
63501
+
63486
63502
  // ../sdk/src/hooks/timeoutFixHook.ts
63487
63503
  var DEFAULT_TIMEOUT_MS = 5e3;
63488
63504
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -63506,6 +63522,7 @@ function initHooks(hooks) {
63506
63522
  const failOpenHook = new FailOpenHook();
63507
63523
  const timeoutFixHook = new TimeoutFixHook();
63508
63524
  hooks.registerSDKInitHook(failOpenHook);
63525
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
63509
63526
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
63510
63527
  hooks.registerAfterErrorHook(failOpenHook);
63511
63528
  }
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-MODSHKUF.mjs";
5
5
  import {
6
6
  createHandleBetterAuthRoute
7
- } from "./chunk-55SS3VYE.mjs";
7
+ } from "./chunk-CBB6UDNH.mjs";
8
8
  import "./chunk-J2WYVGHS.mjs";
9
9
  import "./chunk-H6C42YK7.mjs";
10
10
  import "./chunk-BT3EAYVW.mjs";
@@ -56654,6 +56654,22 @@ var FailOpenHook = class {
56654
56654
  }
56655
56655
  };
56656
56656
 
56657
+ // ../sdk/src/hooks/redactDebugLogHook.ts
56658
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
56659
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
56660
+ var redactingLogger = (logger) => ({
56661
+ group: (label) => logger.group(label),
56662
+ groupEnd: () => logger.groupEnd(),
56663
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
56664
+ });
56665
+ var RedactDebugLogHook = class {
56666
+ sdkInit(opts) {
56667
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
56668
+ if (!logger) return opts;
56669
+ return { ...opts, debugLogger: redactingLogger(logger) };
56670
+ }
56671
+ };
56672
+
56657
56673
  // ../sdk/src/hooks/timeoutFixHook.ts
56658
56674
  var DEFAULT_TIMEOUT_MS = 5e3;
56659
56675
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -56677,6 +56693,7 @@ function initHooks(hooks) {
56677
56693
  const failOpenHook = new FailOpenHook();
56678
56694
  const timeoutFixHook = new TimeoutFixHook();
56679
56695
  hooks.registerSDKInitHook(failOpenHook);
56696
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
56680
56697
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
56681
56698
  hooks.registerAfterErrorHook(failOpenHook);
56682
56699
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createHandleBetterAuthRoute
3
- } from "../chunk-55SS3VYE.mjs";
3
+ } from "../chunk-CBB6UDNH.mjs";
4
4
  import "../chunk-J2WYVGHS.mjs";
5
5
  import "../chunk-H6C42YK7.mjs";
6
6
  import "../chunk-BT3EAYVW.mjs";
@@ -63487,6 +63487,22 @@ var FailOpenHook = class {
63487
63487
  }
63488
63488
  };
63489
63489
 
63490
+ // ../sdk/src/hooks/redactDebugLogHook.ts
63491
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
63492
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
63493
+ var redactingLogger = (logger) => ({
63494
+ group: (label) => logger.group(label),
63495
+ groupEnd: () => logger.groupEnd(),
63496
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
63497
+ });
63498
+ var RedactDebugLogHook = class {
63499
+ sdkInit(opts) {
63500
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
63501
+ if (!logger) return opts;
63502
+ return { ...opts, debugLogger: redactingLogger(logger) };
63503
+ }
63504
+ };
63505
+
63490
63506
  // ../sdk/src/hooks/timeoutFixHook.ts
63491
63507
  var DEFAULT_TIMEOUT_MS = 5e3;
63492
63508
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -63510,6 +63526,7 @@ function initHooks(hooks) {
63510
63526
  const failOpenHook = new FailOpenHook();
63511
63527
  const timeoutFixHook = new TimeoutFixHook();
63512
63528
  hooks.registerSDKInitHook(failOpenHook);
63529
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
63513
63530
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
63514
63531
  hooks.registerAfterErrorHook(failOpenHook);
63515
63532
  }
@@ -4,7 +4,7 @@ import {
4
4
  } from "../chunk-MODSHKUF.mjs";
5
5
  import {
6
6
  createHandleBetterAuthRoute
7
- } from "../chunk-55SS3VYE.mjs";
7
+ } from "../chunk-CBB6UDNH.mjs";
8
8
  import {
9
9
  resolveIdentityFromScope
10
10
  } from "../chunk-J2WYVGHS.mjs";
package/dist/sdk/index.js CHANGED
@@ -82340,6 +82340,22 @@ var FailOpenHook = class {
82340
82340
  }
82341
82341
  };
82342
82342
 
82343
+ // ../sdk/src/hooks/redactDebugLogHook.ts
82344
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
82345
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
82346
+ var redactingLogger = (logger) => ({
82347
+ group: (label) => logger.group(label),
82348
+ groupEnd: () => logger.groupEnd(),
82349
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
82350
+ });
82351
+ var RedactDebugLogHook = class {
82352
+ sdkInit(opts) {
82353
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
82354
+ if (!logger) return opts;
82355
+ return { ...opts, debugLogger: redactingLogger(logger) };
82356
+ }
82357
+ };
82358
+
82343
82359
  // ../sdk/src/hooks/timeoutFixHook.ts
82344
82360
  var DEFAULT_TIMEOUT_MS = 5e3;
82345
82361
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -82363,6 +82379,7 @@ function initHooks(hooks) {
82363
82379
  const failOpenHook = new FailOpenHook();
82364
82380
  const timeoutFixHook = new TimeoutFixHook();
82365
82381
  hooks.registerSDKInitHook(failOpenHook);
82382
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
82366
82383
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
82367
82384
  hooks.registerAfterErrorHook(failOpenHook);
82368
82385
  }
@@ -82317,6 +82317,22 @@ var FailOpenHook = class {
82317
82317
  }
82318
82318
  };
82319
82319
 
82320
+ // ../sdk/src/hooks/redactDebugLogHook.ts
82321
+ var AUTHORIZATION_LINE = /^(authorization:\s*).+$/i;
82322
+ var redactAuthorization = (value) => typeof value === "string" ? value.replace(AUTHORIZATION_LINE, "$1[REDACTED]") : value;
82323
+ var redactingLogger = (logger) => ({
82324
+ group: (label) => logger.group(label),
82325
+ groupEnd: () => logger.groupEnd(),
82326
+ log: (message, ...args) => logger.log(redactAuthorization(message), ...args)
82327
+ });
82328
+ var RedactDebugLogHook = class {
82329
+ sdkInit(opts) {
82330
+ const logger = opts.debugLogger ?? (env().AUTUMN_DEBUG ? console : null);
82331
+ if (!logger) return opts;
82332
+ return { ...opts, debugLogger: redactingLogger(logger) };
82333
+ }
82334
+ };
82335
+
82320
82336
  // ../sdk/src/hooks/timeoutFixHook.ts
82321
82337
  var DEFAULT_TIMEOUT_MS = 5e3;
82322
82338
  var AUTO_TIMEOUT_OPERATION_IDS = /* @__PURE__ */ new Set(["check", "track"]);
@@ -82340,6 +82356,7 @@ function initHooks(hooks) {
82340
82356
  const failOpenHook = new FailOpenHook();
82341
82357
  const timeoutFixHook = new TimeoutFixHook();
82342
82358
  hooks.registerSDKInitHook(failOpenHook);
82359
+ hooks.registerSDKInitHook(new RedactDebugLogHook());
82343
82360
  hooks.registerBeforeCreateRequestHook(timeoutFixHook);
82344
82361
  hooks.registerAfterErrorHook(failOpenHook);
82345
82362
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "autumn-js",
3
3
  "description": "Autumn JS Library",
4
- "version": "1.3.42",
4
+ "version": "1.3.44",
5
5
  "repository": "github:useautumn/autumn",
6
6
  "homepage": "https://docs.useautumn.com",
7
7
  "main": "./dist/sdk/index.js",
@@ -126,5 +126,5 @@
126
126
  "optional": true
127
127
  }
128
128
  },
129
- "gitHead": "775ccf4e526a57aa934b2af158705e83d9832ab3"
129
+ "gitHead": "12a489357626300e162846bafe0ae3e12b945734"
130
130
  }
@@ -1,12 +1,12 @@
1
- import {
2
- sanitizeBody
3
- } from "./chunk-I7CD6EB6.mjs";
4
1
  import {
5
2
  resolveIdentity
6
3
  } from "./chunk-TBQ27LIK.mjs";
7
4
  import {
8
5
  transformSdkError
9
6
  } from "./chunk-J44WR3QZ.mjs";
7
+ import {
8
+ sanitizeBody
9
+ } from "./chunk-I7CD6EB6.mjs";
10
10
  import {
11
11
  backendSuccess,
12
12
  isBackendResult