@squadbase/vite-server 0.1.3 → 0.1.4-dev.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 (50) hide show
  1. package/dist/cli/index.js +265 -71
  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 +487 -110
  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 +265 -71
  48. package/dist/main.js +265 -71
  49. package/dist/vite-plugin.js +265 -71
  50. package/package.json +1 -1
@@ -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
  });
@@ -648,6 +648,14 @@ function resolveEnvVarOptional(entry, key) {
648
648
  import { getContext } from "hono/context-storage";
649
649
  import { getCookie } from "hono/cookie";
650
650
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
651
+ function normalizeHeaders(input) {
652
+ const out = {};
653
+ if (!input) return out;
654
+ new Headers(input).forEach((value, key) => {
655
+ out[key] = value;
656
+ });
657
+ return out;
658
+ }
651
659
  function createSandboxProxyFetch(connectionId) {
652
660
  return async (input, init) => {
653
661
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -671,6 +679,7 @@ function createSandboxProxyFetch(connectionId) {
671
679
  body: JSON.stringify({
672
680
  url: originalUrl,
673
681
  method: originalMethod,
682
+ headers: normalizeHeaders(init?.headers),
674
683
  body: originalBody
675
684
  })
676
685
  });
@@ -705,6 +714,7 @@ function createDeployedAppProxyFetch(connectionId) {
705
714
  body: JSON.stringify({
706
715
  url: originalUrl,
707
716
  method: originalMethod,
717
+ headers: normalizeHeaders(init?.headers),
708
718
  body: originalBody
709
719
  })
710
720
  });
@@ -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
  });
@@ -729,6 +729,14 @@ function resolveEnvVarOptional(entry, key) {
729
729
  import { getContext } from "hono/context-storage";
730
730
  import { getCookie } from "hono/cookie";
731
731
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
732
+ function normalizeHeaders(input) {
733
+ const out = {};
734
+ if (!input) return out;
735
+ new Headers(input).forEach((value, key) => {
736
+ out[key] = value;
737
+ });
738
+ return out;
739
+ }
732
740
  function createSandboxProxyFetch(connectionId) {
733
741
  return async (input, init) => {
734
742
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -752,6 +760,7 @@ function createSandboxProxyFetch(connectionId) {
752
760
  body: JSON.stringify({
753
761
  url: originalUrl,
754
762
  method: originalMethod,
763
+ headers: normalizeHeaders(init?.headers),
755
764
  body: originalBody
756
765
  })
757
766
  });
@@ -786,6 +795,7 @@ function createDeployedAppProxyFetch(connectionId) {
786
795
  body: JSON.stringify({
787
796
  url: originalUrl,
788
797
  method: originalMethod,
798
+ headers: normalizeHeaders(init?.headers),
789
799
  body: originalBody
790
800
  })
791
801
  });
@@ -526,6 +526,14 @@ function resolveEnvVarOptional(entry, key) {
526
526
  import { getContext } from "hono/context-storage";
527
527
  import { getCookie } from "hono/cookie";
528
528
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
529
+ function normalizeHeaders(input) {
530
+ const out = {};
531
+ if (!input) return out;
532
+ new Headers(input).forEach((value, key) => {
533
+ out[key] = value;
534
+ });
535
+ return out;
536
+ }
529
537
  function createSandboxProxyFetch(connectionId) {
530
538
  return async (input, init) => {
531
539
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -549,6 +557,7 @@ function createSandboxProxyFetch(connectionId) {
549
557
  body: JSON.stringify({
550
558
  url: originalUrl,
551
559
  method: originalMethod,
560
+ headers: normalizeHeaders(init?.headers),
552
561
  body: originalBody
553
562
  })
554
563
  });
@@ -583,6 +592,7 @@ function createDeployedAppProxyFetch(connectionId) {
583
592
  body: JSON.stringify({
584
593
  url: originalUrl,
585
594
  method: originalMethod,
595
+ headers: normalizeHeaders(init?.headers),
586
596
  body: originalBody
587
597
  })
588
598
  });
@@ -483,6 +483,14 @@ function resolveEnvVarOptional(entry, key) {
483
483
  import { getContext } from "hono/context-storage";
484
484
  import { getCookie } from "hono/cookie";
485
485
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
486
+ function normalizeHeaders(input) {
487
+ const out = {};
488
+ if (!input) return out;
489
+ new Headers(input).forEach((value, key) => {
490
+ out[key] = value;
491
+ });
492
+ return out;
493
+ }
486
494
  function createSandboxProxyFetch(connectionId) {
487
495
  return async (input, init) => {
488
496
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -506,6 +514,7 @@ function createSandboxProxyFetch(connectionId) {
506
514
  body: JSON.stringify({
507
515
  url: originalUrl,
508
516
  method: originalMethod,
517
+ headers: normalizeHeaders(init?.headers),
509
518
  body: originalBody
510
519
  })
511
520
  });
@@ -540,6 +549,7 @@ function createDeployedAppProxyFetch(connectionId) {
540
549
  body: JSON.stringify({
541
550
  url: originalUrl,
542
551
  method: originalMethod,
552
+ headers: normalizeHeaders(init?.headers),
543
553
  body: originalBody
544
554
  })
545
555
  });
@@ -618,6 +618,14 @@ function resolveEnvVarOptional(entry, key) {
618
618
  import { getContext } from "hono/context-storage";
619
619
  import { getCookie } from "hono/cookie";
620
620
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
621
+ function normalizeHeaders(input) {
622
+ const out = {};
623
+ if (!input) return out;
624
+ new Headers(input).forEach((value, key) => {
625
+ out[key] = value;
626
+ });
627
+ return out;
628
+ }
621
629
  function createSandboxProxyFetch(connectionId) {
622
630
  return async (input, init) => {
623
631
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -641,6 +649,7 @@ function createSandboxProxyFetch(connectionId) {
641
649
  body: JSON.stringify({
642
650
  url: originalUrl,
643
651
  method: originalMethod,
652
+ headers: normalizeHeaders(init?.headers),
644
653
  body: originalBody
645
654
  })
646
655
  });
@@ -675,6 +684,7 @@ function createDeployedAppProxyFetch(connectionId) {
675
684
  body: JSON.stringify({
676
685
  url: originalUrl,
677
686
  method: originalMethod,
687
+ headers: normalizeHeaders(init?.headers),
678
688
  body: originalBody
679
689
  })
680
690
  });
@@ -503,6 +503,14 @@ function resolveEnvVarOptional(entry, key) {
503
503
  import { getContext } from "hono/context-storage";
504
504
  import { getCookie } from "hono/cookie";
505
505
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
506
+ function normalizeHeaders(input) {
507
+ const out = {};
508
+ if (!input) return out;
509
+ new Headers(input).forEach((value, key) => {
510
+ out[key] = value;
511
+ });
512
+ return out;
513
+ }
506
514
  function createSandboxProxyFetch(connectionId) {
507
515
  return async (input, init) => {
508
516
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -526,6 +534,7 @@ function createSandboxProxyFetch(connectionId) {
526
534
  body: JSON.stringify({
527
535
  url: originalUrl,
528
536
  method: originalMethod,
537
+ headers: normalizeHeaders(init?.headers),
529
538
  body: originalBody
530
539
  })
531
540
  });
@@ -560,6 +569,7 @@ function createDeployedAppProxyFetch(connectionId) {
560
569
  body: JSON.stringify({
561
570
  url: originalUrl,
562
571
  method: originalMethod,
572
+ headers: normalizeHeaders(init?.headers),
563
573
  body: originalBody
564
574
  })
565
575
  });
@@ -638,6 +638,14 @@ function resolveEnvVarOptional(entry, key) {
638
638
  import { getContext } from "hono/context-storage";
639
639
  import { getCookie } from "hono/cookie";
640
640
  var APP_SESSION_COOKIE_NAME = "__Host-squadbase-session";
641
+ function normalizeHeaders(input) {
642
+ const out = {};
643
+ if (!input) return out;
644
+ new Headers(input).forEach((value, key) => {
645
+ out[key] = value;
646
+ });
647
+ return out;
648
+ }
641
649
  function createSandboxProxyFetch(connectionId) {
642
650
  return async (input, init) => {
643
651
  const token = process.env.INTERNAL_SQUADBASE_OAUTH_MACHINE_CREDENTIAL;
@@ -661,6 +669,7 @@ function createSandboxProxyFetch(connectionId) {
661
669
  body: JSON.stringify({
662
670
  url: originalUrl,
663
671
  method: originalMethod,
672
+ headers: normalizeHeaders(init?.headers),
664
673
  body: originalBody
665
674
  })
666
675
  });
@@ -695,6 +704,7 @@ function createDeployedAppProxyFetch(connectionId) {
695
704
  body: JSON.stringify({
696
705
  url: originalUrl,
697
706
  method: originalMethod,
707
+ headers: normalizeHeaders(init?.headers),
698
708
  body: originalBody
699
709
  })
700
710
  });