@squadbase/vite-server 0.1.4-dev.0 → 0.1.4

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 (50) hide show
  1. package/dist/cli/index.js +26 -16
  2. package/dist/connectors/airtable-oauth.js +10 -0
  3. package/dist/connectors/airtable.js +10 -0
  4. package/dist/connectors/amplitude.js +10 -0
  5. package/dist/connectors/anthropic.js +10 -0
  6. package/dist/connectors/asana.js +10 -0
  7. package/dist/connectors/attio.js +10 -0
  8. package/dist/connectors/backlog-api-key.js +10 -0
  9. package/dist/connectors/customerio.js +10 -0
  10. package/dist/connectors/dbt.js +10 -0
  11. package/dist/connectors/gamma.js +10 -0
  12. package/dist/connectors/gemini.js +10 -0
  13. package/dist/connectors/gmail-oauth.js +10 -0
  14. package/dist/connectors/gmail.js +14 -4
  15. package/dist/connectors/google-ads.js +10 -0
  16. package/dist/connectors/google-analytics-oauth.js +10 -0
  17. package/dist/connectors/google-analytics.js +10 -0
  18. package/dist/connectors/google-calendar-oauth.js +10 -0
  19. package/dist/connectors/google-calendar.js +14 -6
  20. package/dist/connectors/google-docs.js +10 -0
  21. package/dist/connectors/google-drive.js +10 -0
  22. package/dist/connectors/google-sheets.js +10 -0
  23. package/dist/connectors/google-slides.js +10 -0
  24. package/dist/connectors/grafana.js +10 -0
  25. package/dist/connectors/hubspot-oauth.js +10 -0
  26. package/dist/connectors/hubspot.js +10 -0
  27. package/dist/connectors/intercom-oauth.js +10 -0
  28. package/dist/connectors/intercom.js +10 -0
  29. package/dist/connectors/jira-api-key.js +10 -0
  30. package/dist/connectors/kintone-api-token.js +10 -0
  31. package/dist/connectors/kintone.js +10 -0
  32. package/dist/connectors/linkedin-ads.js +10 -0
  33. package/dist/connectors/mailchimp-oauth.js +10 -0
  34. package/dist/connectors/mailchimp.js +10 -0
  35. package/dist/connectors/mixpanel.js +10 -0
  36. package/dist/connectors/notion-oauth.js +10 -0
  37. package/dist/connectors/notion.js +10 -0
  38. package/dist/connectors/openai.js +10 -0
  39. package/dist/connectors/sentry.js +10 -0
  40. package/dist/connectors/shopify-oauth.js +10 -0
  41. package/dist/connectors/shopify.js +10 -0
  42. package/dist/connectors/stripe-api-key.js +10 -0
  43. package/dist/connectors/stripe-oauth.js +10 -0
  44. package/dist/connectors/wix-store.js +10 -0
  45. package/dist/connectors/zendesk-oauth.js +10 -0
  46. package/dist/connectors/zendesk.js +10 -0
  47. package/dist/index.js +26 -16
  48. package/dist/main.js +26 -16
  49. package/dist/vite-plugin.js +26 -16
  50. package/package.json +1 -1
@@ -757,6 +757,14 @@ function resolveEnvVarOptional(entry, key) {
757
757
  import { getContext } from "hono/context-storage";
758
758
  import { getCookie } from "hono/cookie";
759
759
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
760
+ function normalizeHeaders(input) {
761
+ const out = {};
762
+ if (!input) return out;
763
+ new Headers(input).forEach((value, key) => {
764
+ out[key] = value;
765
+ });
766
+ return out;
767
+ }
760
768
  function createSandboxProxyFetch(connectionId) {
761
769
  return async (input, init) => {
762
770
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -780,6 +788,7 @@ function createSandboxProxyFetch(connectionId) {
780
788
  body: JSON.stringify({
781
789
  url: originalUrl,
782
790
  method: originalMethod,
791
+ headers: normalizeHeaders(init?.headers),
783
792
  body: originalBody
784
793
  })
785
794
  });
@@ -814,6 +823,7 @@ function createDeployedAppProxyFetch(connectionId) {
814
823
  body: JSON.stringify({
815
824
  url: originalUrl,
816
825
  method: originalMethod,
826
+ headers: normalizeHeaders(init?.headers),
817
827
  body: originalBody
818
828
  })
819
829
  });
@@ -561,10 +561,9 @@ var googleCalendarOnboarding = new ConnectorOnboarding({
561
561
  ja: `\u4EE5\u4E0B\u306E\u624B\u9806\u3067Google Calendar\u30B3\u30CD\u30AF\u30B7\u30E7\u30F3\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002\u63A5\u7D9A\u4F5C\u6210\u6642\u306B\u306F\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8JSON\u306E\u307F\u304C\u8A2D\u5B9A\u6E08\u307F\u3067\u3001\u5BFE\u8C61\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3084\u30AB\u30EC\u30F3\u30C0\u30FCID\u306F\u3053\u306E\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u4E2D\u306B\u53D6\u5F97\u3057\u307E\u3059\u3002
562
562
 
563
563
  1. \`askUserQuestion\` \u3067\u30E6\u30FC\u30B6\u30FC\u306B\u3001\u30B5\u30FC\u30D3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u304CDomain-wide Delegation\u3067\u4EE3\u7406\u30A2\u30AF\u30BB\u30B9\u3059\u308BGoogle Workspace\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u30D2\u30A2\u30EA\u30F3\u30B0\u3059\u308B:
564
+ - \`type\`: \`"freeText"\`
564
565
  - \`question\`: \u300C\u30A2\u30AF\u30BB\u30B9\u3057\u305F\u3044\u30AB\u30EC\u30F3\u30C0\u30FC\u3092\u6301\u3064\u30E6\u30FC\u30B6\u30FC\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\uFF08\u8907\u6570\u3042\u308B\u5834\u5408\u306F\u30AB\u30F3\u30DE\u533A\u5207\u308A\u3067\u5165\u529B\u53EF\uFF09\u300D
565
- - \`header\`: \u300C\u30E1\u30FC\u30EB\u5165\u529B\u300D
566
- - \`options\`: \`[]\`\uFF08\u9078\u629E\u80A2\u306A\u3057\u30FB\u81EA\u7531\u5165\u529B\u306E\u307F\uFF09
567
- - \`allowFreeText\`: \`true\`
566
+ - \`placeholder\`: \`"user@example.com, admin@example.com"\`
568
567
  2. \u30E6\u30FC\u30B6\u30FC\u304B\u3089\u53D7\u3051\u53D6\u3063\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\u5BFE\u5FDC\uFF09\u3092 \`updateConnectionParameters\` \u3067\u4FDD\u5B58\u3059\u308B:
569
568
  - \`parameterSlug\`: \`"impersonate-email"\`
570
569
  - \`options\`: \`[{ value: <\u5165\u529B\u3055\u308C\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u6587\u5B57\u5217>, label: <\u540C\u3058\u5024> }]\`\uFF081\u4EF6\u306E\u307F\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u81EA\u52D5\u9078\u629E\u3055\u308C\u308B\uFF09
@@ -589,10 +588,9 @@ var googleCalendarOnboarding = new ConnectorOnboarding({
589
588
  en: `Follow these steps to set up the Google Calendar connection. Only the service account JSON is provided at connection creation time \u2014 the target user email and calendar ID are collected during this setup flow.
590
589
 
591
590
  1. Call \`askUserQuestion\` to ask the user for the Google Workspace user email the service account will impersonate via Domain-wide Delegation:
591
+ - \`type\`: \`"freeText"\`
592
592
  - \`question\`: "Please enter the email address of the user whose calendar you want to access (comma-separated list allowed for multiple users)"
593
- - \`header\`: "Email input"
594
- - \`options\`: \`[]\` (no preset choices \u2014 free text only)
595
- - \`allowFreeText\`: \`true\`
593
+ - \`placeholder\`: \`"user@example.com, admin@example.com"\`
596
594
  2. Save the email(s) the user provided (comma-separated supported) via \`updateConnectionParameters\`:
597
595
  - \`parameterSlug\`: \`"impersonate-email"\`
598
596
  - \`options\`: \`[{ value: <the email string entered>, label: <same value> }]\` (a single option is auto-selected)
@@ -931,6 +929,14 @@ function resolveEnvVarOptional(entry, key) {
931
929
  import { getContext } from "hono/context-storage";
932
930
  import { getCookie } from "hono/cookie";
933
931
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
932
+ function normalizeHeaders(input) {
933
+ const out = {};
934
+ if (!input) return out;
935
+ new Headers(input).forEach((value, key) => {
936
+ out[key] = value;
937
+ });
938
+ return out;
939
+ }
934
940
  function createSandboxProxyFetch(connectionId) {
935
941
  return async (input, init) => {
936
942
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -954,6 +960,7 @@ function createSandboxProxyFetch(connectionId) {
954
960
  body: JSON.stringify({
955
961
  url: originalUrl,
956
962
  method: originalMethod,
963
+ headers: normalizeHeaders(init?.headers),
957
964
  body: originalBody
958
965
  })
959
966
  });
@@ -988,6 +995,7 @@ function createDeployedAppProxyFetch(connectionId) {
988
995
  body: JSON.stringify({
989
996
  url: originalUrl,
990
997
  method: originalMethod,
998
+ headers: normalizeHeaders(init?.headers),
991
999
  body: originalBody
992
1000
  })
993
1001
  });
@@ -518,6 +518,14 @@ function resolveEnvVarOptional(entry, key) {
518
518
  import { getContext } from "hono/context-storage";
519
519
  import { getCookie } from "hono/cookie";
520
520
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
521
+ function normalizeHeaders(input) {
522
+ const out = {};
523
+ if (!input) return out;
524
+ new Headers(input).forEach((value, key) => {
525
+ out[key] = value;
526
+ });
527
+ return out;
528
+ }
521
529
  function createSandboxProxyFetch(connectionId) {
522
530
  return async (input, init) => {
523
531
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -541,6 +549,7 @@ function createSandboxProxyFetch(connectionId) {
541
549
  body: JSON.stringify({
542
550
  url: originalUrl,
543
551
  method: originalMethod,
552
+ headers: normalizeHeaders(init?.headers),
544
553
  body: originalBody
545
554
  })
546
555
  });
@@ -575,6 +584,7 @@ function createDeployedAppProxyFetch(connectionId) {
575
584
  body: JSON.stringify({
576
585
  url: originalUrl,
577
586
  method: originalMethod,
587
+ headers: normalizeHeaders(init?.headers),
578
588
  body: originalBody
579
589
  })
580
590
  });
@@ -762,6 +762,14 @@ function resolveEnvVarOptional(entry, key) {
762
762
  import { getContext } from "hono/context-storage";
763
763
  import { getCookie } from "hono/cookie";
764
764
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
765
+ function normalizeHeaders(input) {
766
+ const out = {};
767
+ if (!input) return out;
768
+ new Headers(input).forEach((value, key) => {
769
+ out[key] = value;
770
+ });
771
+ return out;
772
+ }
765
773
  function createSandboxProxyFetch(connectionId) {
766
774
  return async (input, init) => {
767
775
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -785,6 +793,7 @@ function createSandboxProxyFetch(connectionId) {
785
793
  body: JSON.stringify({
786
794
  url: originalUrl,
787
795
  method: originalMethod,
796
+ headers: normalizeHeaders(init?.headers),
788
797
  body: originalBody
789
798
  })
790
799
  });
@@ -819,6 +828,7 @@ function createDeployedAppProxyFetch(connectionId) {
819
828
  body: JSON.stringify({
820
829
  url: originalUrl,
821
830
  method: originalMethod,
831
+ headers: normalizeHeaders(init?.headers),
822
832
  body: originalBody
823
833
  })
824
834
  });
@@ -576,6 +576,14 @@ function resolveEnvVarOptional(entry, key) {
576
576
  import { getContext } from "hono/context-storage";
577
577
  import { getCookie } from "hono/cookie";
578
578
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
579
+ function normalizeHeaders(input) {
580
+ const out = {};
581
+ if (!input) return out;
582
+ new Headers(input).forEach((value, key) => {
583
+ out[key] = value;
584
+ });
585
+ return out;
586
+ }
579
587
  function createSandboxProxyFetch(connectionId) {
580
588
  return async (input, init) => {
581
589
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -599,6 +607,7 @@ function createSandboxProxyFetch(connectionId) {
599
607
  body: JSON.stringify({
600
608
  url: originalUrl,
601
609
  method: originalMethod,
610
+ headers: normalizeHeaders(init?.headers),
602
611
  body: originalBody
603
612
  })
604
613
  });
@@ -633,6 +642,7 @@ function createDeployedAppProxyFetch(connectionId) {
633
642
  body: JSON.stringify({
634
643
  url: originalUrl,
635
644
  method: originalMethod,
645
+ headers: normalizeHeaders(init?.headers),
636
646
  body: originalBody
637
647
  })
638
648
  });
@@ -550,6 +550,14 @@ function resolveEnvVarOptional(entry, key) {
550
550
  import { getContext } from "hono/context-storage";
551
551
  import { getCookie } from "hono/cookie";
552
552
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
553
+ function normalizeHeaders(input) {
554
+ const out = {};
555
+ if (!input) return out;
556
+ new Headers(input).forEach((value, key) => {
557
+ out[key] = value;
558
+ });
559
+ return out;
560
+ }
553
561
  function createSandboxProxyFetch(connectionId) {
554
562
  return async (input, init) => {
555
563
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -573,6 +581,7 @@ function createSandboxProxyFetch(connectionId) {
573
581
  body: JSON.stringify({
574
582
  url: originalUrl,
575
583
  method: originalMethod,
584
+ headers: normalizeHeaders(init?.headers),
576
585
  body: originalBody
577
586
  })
578
587
  });
@@ -607,6 +616,7 @@ function createDeployedAppProxyFetch(connectionId) {
607
616
  body: JSON.stringify({
608
617
  url: originalUrl,
609
618
  method: originalMethod,
619
+ headers: normalizeHeaders(init?.headers),
610
620
  body: originalBody
611
621
  })
612
622
  });
@@ -562,6 +562,14 @@ function resolveEnvVarOptional(entry, key) {
562
562
  import { getContext } from "hono/context-storage";
563
563
  import { getCookie } from "hono/cookie";
564
564
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
565
+ function normalizeHeaders(input) {
566
+ const out = {};
567
+ if (!input) return out;
568
+ new Headers(input).forEach((value, key) => {
569
+ out[key] = value;
570
+ });
571
+ return out;
572
+ }
565
573
  function createSandboxProxyFetch(connectionId) {
566
574
  return async (input, init) => {
567
575
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -585,6 +593,7 @@ function createSandboxProxyFetch(connectionId) {
585
593
  body: JSON.stringify({
586
594
  url: originalUrl,
587
595
  method: originalMethod,
596
+ headers: normalizeHeaders(init?.headers),
588
597
  body: originalBody
589
598
  })
590
599
  });
@@ -619,6 +628,7 @@ function createDeployedAppProxyFetch(connectionId) {
619
628
  body: JSON.stringify({
620
629
  url: originalUrl,
621
630
  method: originalMethod,
631
+ headers: normalizeHeaders(init?.headers),
622
632
  body: originalBody
623
633
  })
624
634
  });
@@ -476,6 +476,14 @@ function resolveEnvVarOptional(entry, key) {
476
476
  import { getContext } from "hono/context-storage";
477
477
  import { getCookie } from "hono/cookie";
478
478
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
479
+ function normalizeHeaders(input) {
480
+ const out = {};
481
+ if (!input) return out;
482
+ new Headers(input).forEach((value, key) => {
483
+ out[key] = value;
484
+ });
485
+ return out;
486
+ }
479
487
  function createSandboxProxyFetch(connectionId) {
480
488
  return async (input, init) => {
481
489
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -499,6 +507,7 @@ function createSandboxProxyFetch(connectionId) {
499
507
  body: JSON.stringify({
500
508
  url: originalUrl,
501
509
  method: originalMethod,
510
+ headers: normalizeHeaders(init?.headers),
502
511
  body: originalBody
503
512
  })
504
513
  });
@@ -533,6 +542,7 @@ function createDeployedAppProxyFetch(connectionId) {
533
542
  body: JSON.stringify({
534
543
  url: originalUrl,
535
544
  method: originalMethod,
545
+ headers: normalizeHeaders(init?.headers),
536
546
  body: originalBody
537
547
  })
538
548
  });
@@ -548,6 +548,14 @@ function resolveEnvVarOptional(entry, key) {
548
548
  import { getContext } from "hono/context-storage";
549
549
  import { getCookie } from "hono/cookie";
550
550
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
551
+ function normalizeHeaders(input) {
552
+ const out = {};
553
+ if (!input) return out;
554
+ new Headers(input).forEach((value, key) => {
555
+ out[key] = value;
556
+ });
557
+ return out;
558
+ }
551
559
  function createSandboxProxyFetch(connectionId) {
552
560
  return async (input, init) => {
553
561
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -571,6 +579,7 @@ function createSandboxProxyFetch(connectionId) {
571
579
  body: JSON.stringify({
572
580
  url: originalUrl,
573
581
  method: originalMethod,
582
+ headers: normalizeHeaders(init?.headers),
574
583
  body: originalBody
575
584
  })
576
585
  });
@@ -605,6 +614,7 @@ function createDeployedAppProxyFetch(connectionId) {
605
614
  body: JSON.stringify({
606
615
  url: originalUrl,
607
616
  method: originalMethod,
617
+ headers: normalizeHeaders(init?.headers),
608
618
  body: originalBody
609
619
  })
610
620
  });
@@ -508,6 +508,14 @@ function resolveEnvVarOptional(entry, key) {
508
508
  import { getContext } from "hono/context-storage";
509
509
  import { getCookie } from "hono/cookie";
510
510
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
511
+ function normalizeHeaders(input) {
512
+ const out = {};
513
+ if (!input) return out;
514
+ new Headers(input).forEach((value, key) => {
515
+ out[key] = value;
516
+ });
517
+ return out;
518
+ }
511
519
  function createSandboxProxyFetch(connectionId) {
512
520
  return async (input, init) => {
513
521
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -531,6 +539,7 @@ function createSandboxProxyFetch(connectionId) {
531
539
  body: JSON.stringify({
532
540
  url: originalUrl,
533
541
  method: originalMethod,
542
+ headers: normalizeHeaders(init?.headers),
534
543
  body: originalBody
535
544
  })
536
545
  });
@@ -565,6 +574,7 @@ function createDeployedAppProxyFetch(connectionId) {
565
574
  body: JSON.stringify({
566
575
  url: originalUrl,
567
576
  method: originalMethod,
577
+ headers: normalizeHeaders(init?.headers),
568
578
  body: originalBody
569
579
  })
570
580
  });
@@ -634,6 +634,14 @@ function resolveEnvVarOptional(entry, key) {
634
634
  import { getContext } from "hono/context-storage";
635
635
  import { getCookie } from "hono/cookie";
636
636
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
637
+ function normalizeHeaders(input) {
638
+ const out = {};
639
+ if (!input) return out;
640
+ new Headers(input).forEach((value, key) => {
641
+ out[key] = value;
642
+ });
643
+ return out;
644
+ }
637
645
  function createSandboxProxyFetch(connectionId) {
638
646
  return async (input, init) => {
639
647
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -657,6 +665,7 @@ function createSandboxProxyFetch(connectionId) {
657
665
  body: JSON.stringify({
658
666
  url: originalUrl,
659
667
  method: originalMethod,
668
+ headers: normalizeHeaders(init?.headers),
660
669
  body: originalBody
661
670
  })
662
671
  });
@@ -691,6 +700,7 @@ function createDeployedAppProxyFetch(connectionId) {
691
700
  body: JSON.stringify({
692
701
  url: originalUrl,
693
702
  method: originalMethod,
703
+ headers: normalizeHeaders(init?.headers),
694
704
  body: originalBody
695
705
  })
696
706
  });
@@ -522,6 +522,14 @@ function resolveEnvVarOptional(entry, key) {
522
522
  import { getContext } from "hono/context-storage";
523
523
  import { getCookie } from "hono/cookie";
524
524
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
525
+ function normalizeHeaders(input) {
526
+ const out = {};
527
+ if (!input) return out;
528
+ new Headers(input).forEach((value, key) => {
529
+ out[key] = value;
530
+ });
531
+ return out;
532
+ }
525
533
  function createSandboxProxyFetch(connectionId) {
526
534
  return async (input, init) => {
527
535
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -545,6 +553,7 @@ function createSandboxProxyFetch(connectionId) {
545
553
  body: JSON.stringify({
546
554
  url: originalUrl,
547
555
  method: originalMethod,
556
+ headers: normalizeHeaders(init?.headers),
548
557
  body: originalBody
549
558
  })
550
559
  });
@@ -579,6 +588,7 @@ function createDeployedAppProxyFetch(connectionId) {
579
588
  body: JSON.stringify({
580
589
  url: originalUrl,
581
590
  method: originalMethod,
591
+ headers: normalizeHeaders(init?.headers),
582
592
  body: originalBody
583
593
  })
584
594
  });
@@ -587,6 +587,14 @@ function resolveEnvVarOptional(entry, key) {
587
587
  import { getContext } from "hono/context-storage";
588
588
  import { getCookie } from "hono/cookie";
589
589
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
590
+ function normalizeHeaders(input) {
591
+ const out = {};
592
+ if (!input) return out;
593
+ new Headers(input).forEach((value, key) => {
594
+ out[key] = value;
595
+ });
596
+ return out;
597
+ }
590
598
  function createSandboxProxyFetch(connectionId) {
591
599
  return async (input, init) => {
592
600
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -610,6 +618,7 @@ function createSandboxProxyFetch(connectionId) {
610
618
  body: JSON.stringify({
611
619
  url: originalUrl,
612
620
  method: originalMethod,
621
+ headers: normalizeHeaders(init?.headers),
613
622
  body: originalBody
614
623
  })
615
624
  });
@@ -644,6 +653,7 @@ function createDeployedAppProxyFetch(connectionId) {
644
653
  body: JSON.stringify({
645
654
  url: originalUrl,
646
655
  method: originalMethod,
656
+ headers: normalizeHeaders(init?.headers),
647
657
  body: originalBody
648
658
  })
649
659
  });
@@ -549,6 +549,14 @@ function resolveEnvVarOptional(entry, key) {
549
549
  import { getContext } from "hono/context-storage";
550
550
  import { getCookie } from "hono/cookie";
551
551
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
552
+ function normalizeHeaders(input) {
553
+ const out = {};
554
+ if (!input) return out;
555
+ new Headers(input).forEach((value, key) => {
556
+ out[key] = value;
557
+ });
558
+ return out;
559
+ }
552
560
  function createSandboxProxyFetch(connectionId) {
553
561
  return async (input, init) => {
554
562
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -572,6 +580,7 @@ function createSandboxProxyFetch(connectionId) {
572
580
  body: JSON.stringify({
573
581
  url: originalUrl,
574
582
  method: originalMethod,
583
+ headers: normalizeHeaders(init?.headers),
575
584
  body: originalBody
576
585
  })
577
586
  });
@@ -606,6 +615,7 @@ function createDeployedAppProxyFetch(connectionId) {
606
615
  body: JSON.stringify({
607
616
  url: originalUrl,
608
617
  method: originalMethod,
618
+ headers: normalizeHeaders(init?.headers),
609
619
  body: originalBody
610
620
  })
611
621
  });
@@ -772,6 +772,14 @@ function resolveEnvVarOptional(entry, key) {
772
772
  import { getContext } from "hono/context-storage";
773
773
  import { getCookie } from "hono/cookie";
774
774
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
775
+ function normalizeHeaders(input) {
776
+ const out = {};
777
+ if (!input) return out;
778
+ new Headers(input).forEach((value, key) => {
779
+ out[key] = value;
780
+ });
781
+ return out;
782
+ }
775
783
  function createSandboxProxyFetch(connectionId) {
776
784
  return async (input, init) => {
777
785
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -795,6 +803,7 @@ function createSandboxProxyFetch(connectionId) {
795
803
  body: JSON.stringify({
796
804
  url: originalUrl,
797
805
  method: originalMethod,
806
+ headers: normalizeHeaders(init?.headers),
798
807
  body: originalBody
799
808
  })
800
809
  });
@@ -829,6 +838,7 @@ function createDeployedAppProxyFetch(connectionId) {
829
838
  body: JSON.stringify({
830
839
  url: originalUrl,
831
840
  method: originalMethod,
841
+ headers: normalizeHeaders(init?.headers),
832
842
  body: originalBody
833
843
  })
834
844
  });
@@ -537,6 +537,14 @@ function resolveEnvVarOptional(entry, key) {
537
537
  import { getContext } from "hono/context-storage";
538
538
  import { getCookie } from "hono/cookie";
539
539
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
540
+ function normalizeHeaders(input) {
541
+ const out = {};
542
+ if (!input) return out;
543
+ new Headers(input).forEach((value, key) => {
544
+ out[key] = value;
545
+ });
546
+ return out;
547
+ }
540
548
  function createSandboxProxyFetch(connectionId) {
541
549
  return async (input, init) => {
542
550
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -560,6 +568,7 @@ function createSandboxProxyFetch(connectionId) {
560
568
  body: JSON.stringify({
561
569
  url: originalUrl,
562
570
  method: originalMethod,
571
+ headers: normalizeHeaders(init?.headers),
563
572
  body: originalBody
564
573
  })
565
574
  });
@@ -594,6 +603,7 @@ function createDeployedAppProxyFetch(connectionId) {
594
603
  body: JSON.stringify({
595
604
  url: originalUrl,
596
605
  method: originalMethod,
606
+ headers: normalizeHeaders(init?.headers),
597
607
  body: originalBody
598
608
  })
599
609
  });
@@ -653,6 +653,14 @@ function resolveEnvVarOptional(entry, key) {
653
653
  import { getContext } from "hono/context-storage";
654
654
  import { getCookie } from "hono/cookie";
655
655
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
656
+ function normalizeHeaders(input) {
657
+ const out = {};
658
+ if (!input) return out;
659
+ new Headers(input).forEach((value, key) => {
660
+ out[key] = value;
661
+ });
662
+ return out;
663
+ }
656
664
  function createSandboxProxyFetch(connectionId) {
657
665
  return async (input, init) => {
658
666
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -676,6 +684,7 @@ function createSandboxProxyFetch(connectionId) {
676
684
  body: JSON.stringify({
677
685
  url: originalUrl,
678
686
  method: originalMethod,
687
+ headers: normalizeHeaders(init?.headers),
679
688
  body: originalBody
680
689
  })
681
690
  });
@@ -710,6 +719,7 @@ function createDeployedAppProxyFetch(connectionId) {
710
719
  body: JSON.stringify({
711
720
  url: originalUrl,
712
721
  method: originalMethod,
722
+ headers: normalizeHeaders(init?.headers),
713
723
  body: originalBody
714
724
  })
715
725
  });
@@ -666,6 +666,14 @@ function resolveEnvVarOptional(entry, key) {
666
666
  import { getContext } from "hono/context-storage";
667
667
  import { getCookie } from "hono/cookie";
668
668
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
669
+ function normalizeHeaders(input) {
670
+ const out = {};
671
+ if (!input) return out;
672
+ new Headers(input).forEach((value, key) => {
673
+ out[key] = value;
674
+ });
675
+ return out;
676
+ }
669
677
  function createSandboxProxyFetch(connectionId) {
670
678
  return async (input, init) => {
671
679
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -689,6 +697,7 @@ function createSandboxProxyFetch(connectionId) {
689
697
  body: JSON.stringify({
690
698
  url: originalUrl,
691
699
  method: originalMethod,
700
+ headers: normalizeHeaders(init?.headers),
692
701
  body: originalBody
693
702
  })
694
703
  });
@@ -723,6 +732,7 @@ function createDeployedAppProxyFetch(connectionId) {
723
732
  body: JSON.stringify({
724
733
  url: originalUrl,
725
734
  method: originalMethod,
735
+ headers: normalizeHeaders(init?.headers),
726
736
  body: originalBody
727
737
  })
728
738
  });
@@ -491,6 +491,14 @@ function resolveEnvVarOptional(entry, key) {
491
491
  import { getContext } from "hono/context-storage";
492
492
  import { getCookie } from "hono/cookie";
493
493
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
494
+ function normalizeHeaders(input) {
495
+ const out = {};
496
+ if (!input) return out;
497
+ new Headers(input).forEach((value, key) => {
498
+ out[key] = value;
499
+ });
500
+ return out;
501
+ }
494
502
  function createSandboxProxyFetch(connectionId) {
495
503
  return async (input, init) => {
496
504
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -514,6 +522,7 @@ function createSandboxProxyFetch(connectionId) {
514
522
  body: JSON.stringify({
515
523
  url: originalUrl,
516
524
  method: originalMethod,
525
+ headers: normalizeHeaders(init?.headers),
517
526
  body: originalBody
518
527
  })
519
528
  });
@@ -548,6 +557,7 @@ function createDeployedAppProxyFetch(connectionId) {
548
557
  body: JSON.stringify({
549
558
  url: originalUrl,
550
559
  method: originalMethod,
560
+ headers: normalizeHeaders(init?.headers),
551
561
  body: originalBody
552
562
  })
553
563
  });
@@ -587,6 +587,14 @@ function resolveEnvVarOptional(entry, key) {
587
587
  import { getContext } from "hono/context-storage";
588
588
  import { getCookie } from "hono/cookie";
589
589
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
590
+ function normalizeHeaders(input) {
591
+ const out = {};
592
+ if (!input) return out;
593
+ new Headers(input).forEach((value, key) => {
594
+ out[key] = value;
595
+ });
596
+ return out;
597
+ }
590
598
  function createSandboxProxyFetch(connectionId) {
591
599
  return async (input, init) => {
592
600
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -610,6 +618,7 @@ function createSandboxProxyFetch(connectionId) {
610
618
  body: JSON.stringify({
611
619
  url: originalUrl,
612
620
  method: originalMethod,
621
+ headers: normalizeHeaders(init?.headers),
613
622
  body: originalBody
614
623
  })
615
624
  });
@@ -644,6 +653,7 @@ function createDeployedAppProxyFetch(connectionId) {
644
653
  body: JSON.stringify({
645
654
  url: originalUrl,
646
655
  method: originalMethod,
656
+ headers: normalizeHeaders(init?.headers),
647
657
  body: originalBody
648
658
  })
649
659
  });
@@ -258,6 +258,14 @@ function resolveEnvVarOptional(entry, key) {
258
258
  import { getContext } from "hono/context-storage";
259
259
  import { getCookie } from "hono/cookie";
260
260
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
261
+ function normalizeHeaders(input) {
262
+ const out = {};
263
+ if (!input) return out;
264
+ new Headers(input).forEach((value, key) => {
265
+ out[key] = value;
266
+ });
267
+ return out;
268
+ }
261
269
  function createSandboxProxyFetch(connectionId) {
262
270
  return async (input, init) => {
263
271
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -281,6 +289,7 @@ function createSandboxProxyFetch(connectionId) {
281
289
  body: JSON.stringify({
282
290
  url: originalUrl,
283
291
  method: originalMethod,
292
+ headers: normalizeHeaders(init?.headers),
284
293
  body: originalBody
285
294
  })
286
295
  });
@@ -315,6 +324,7 @@ function createDeployedAppProxyFetch(connectionId) {
315
324
  body: JSON.stringify({
316
325
  url: originalUrl,
317
326
  method: originalMethod,
327
+ headers: normalizeHeaders(init?.headers),
318
328
  body: originalBody
319
329
  })
320
330
  });