@authhero/proxy 0.10.7 → 0.10.8
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.
- package/dist/proxy.cjs +1 -1
- package/dist/proxy.mjs +156 -152
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/proxy.mjs
CHANGED
|
@@ -617,22 +617,22 @@ e.object({
|
|
|
617
617
|
});
|
|
618
618
|
var Ie = /* @__PURE__ */ function(e) {
|
|
619
619
|
return e.TOKEN = "token", e.ID_TOKEN = "id_token", e.TOKEN_ID_TOKEN = "id_token token", e.CODE = "code", e.CODE_ID_TOKEN = "code id_token", e.CODE_TOKEN = "code token", e.CODE_ID_TOKEN_TOKEN = "code id_token token", e;
|
|
620
|
-
}({}), v = /* @__PURE__ */ function(e) {
|
|
621
|
-
return e.QUERY = "query", e.FRAGMENT = "fragment", e.FORM_POST = "form_post", e.WEB_MESSAGE = "web_message", e.SAML_POST = "saml_post", e;
|
|
622
620
|
}({}), Le = /* @__PURE__ */ function(e) {
|
|
621
|
+
return e.QUERY = "query", e.FRAGMENT = "fragment", e.FORM_POST = "form_post", e.WEB_MESSAGE = "web_message", e.SAML_POST = "saml_post", e;
|
|
622
|
+
}({}), Re = /* @__PURE__ */ function(e) {
|
|
623
623
|
return e.S256 = "S256", e.Plain = "plain", e;
|
|
624
|
-
}({}),
|
|
624
|
+
}({}), ze = e.union([e.null(), e.object({
|
|
625
625
|
essential: e.boolean().optional(),
|
|
626
626
|
value: e.unknown().optional(),
|
|
627
627
|
values: e.array(e.unknown()).optional()
|
|
628
|
-
})]).nullable(),
|
|
629
|
-
userinfo: e.record(e.string(),
|
|
630
|
-
id_token: e.record(e.string(),
|
|
631
|
-
}),
|
|
628
|
+
})]).nullable(), Be = e.object({
|
|
629
|
+
userinfo: e.record(e.string(), ze).optional(),
|
|
630
|
+
id_token: e.record(e.string(), ze).optional()
|
|
631
|
+
}), Ve = e.object({
|
|
632
632
|
client_id: e.string(),
|
|
633
633
|
act_as: e.string().optional(),
|
|
634
634
|
response_type: e.nativeEnum(Ie).optional(),
|
|
635
|
-
response_mode: e.nativeEnum(
|
|
635
|
+
response_mode: e.nativeEnum(Le).optional(),
|
|
636
636
|
redirect_uri: e.string().optional(),
|
|
637
637
|
audience: e.string().optional(),
|
|
638
638
|
organization: e.string().optional(),
|
|
@@ -640,13 +640,13 @@ var Ie = /* @__PURE__ */ function(e) {
|
|
|
640
640
|
nonce: e.string().optional(),
|
|
641
641
|
scope: e.string().optional(),
|
|
642
642
|
prompt: e.string().optional(),
|
|
643
|
-
code_challenge_method: e.nativeEnum(
|
|
643
|
+
code_challenge_method: e.nativeEnum(Re).optional(),
|
|
644
644
|
code_challenge: e.string().optional(),
|
|
645
645
|
username: e.string().optional(),
|
|
646
646
|
ui_locales: e.string().optional(),
|
|
647
647
|
max_age: e.number().optional(),
|
|
648
648
|
acr_values: e.string().optional(),
|
|
649
|
-
claims:
|
|
649
|
+
claims: Be.optional(),
|
|
650
650
|
vendor_id: e.string().optional()
|
|
651
651
|
});
|
|
652
652
|
e.object({
|
|
@@ -669,7 +669,7 @@ e.object({
|
|
|
669
669
|
"auto"
|
|
670
670
|
]).optional()
|
|
671
671
|
});
|
|
672
|
-
var
|
|
672
|
+
var He = e.enum([
|
|
673
673
|
"password_reset",
|
|
674
674
|
"email_verification",
|
|
675
675
|
"otp",
|
|
@@ -682,7 +682,7 @@ e.object({
|
|
|
682
682
|
code_id: e.string().openapi({ description: "The code that will be used in for instance an email verification flow" }),
|
|
683
683
|
login_id: e.string().openapi({ description: "The id of the login session that the code is connected to" }),
|
|
684
684
|
connection_id: e.string().optional().openapi({ description: "The connection that the code is connected to" }),
|
|
685
|
-
code_type:
|
|
685
|
+
code_type: He,
|
|
686
686
|
code_verifier: e.string().optional().openapi({ description: "The code verifier used in PKCE in outbound flows" }),
|
|
687
687
|
code_challenge: e.string().optional().openapi({ description: "The code challenge used in PKCE in outbound flows" }),
|
|
688
688
|
code_challenge_method: e.enum(["plain", "S256"]).optional().openapi({ description: "The code challenge method used in PKCE in outbound flows" }),
|
|
@@ -694,7 +694,7 @@ e.object({
|
|
|
694
694
|
used_at: e.string().optional(),
|
|
695
695
|
user_id: e.string().optional()
|
|
696
696
|
}).extend({ created_at: e.string() });
|
|
697
|
-
var
|
|
697
|
+
var Ue = e.object({
|
|
698
698
|
kid: e.string().optional(),
|
|
699
699
|
team_id: e.string().optional(),
|
|
700
700
|
realms: e.string().optional(),
|
|
@@ -814,26 +814,26 @@ var Ve = e.object({
|
|
|
814
814
|
"never_on_login"
|
|
815
815
|
]).optional()
|
|
816
816
|
});
|
|
817
|
-
function
|
|
817
|
+
function v(e) {
|
|
818
818
|
if (e !== null) {
|
|
819
|
-
if (Array.isArray(e)) return e.filter((e) => e !== null).map(
|
|
819
|
+
if (Array.isArray(e)) return e.filter((e) => e !== null).map(v);
|
|
820
820
|
if (e && typeof e == "object") {
|
|
821
821
|
let t = {};
|
|
822
|
-
for (let [n, r] of Object.entries(e)) r !== null && (t[n] =
|
|
822
|
+
for (let [n, r] of Object.entries(e)) r !== null && (t[n] = v(r));
|
|
823
823
|
return t;
|
|
824
824
|
}
|
|
825
825
|
return e;
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
|
-
var
|
|
828
|
+
var We = e.object({
|
|
829
829
|
id: e.string().optional(),
|
|
830
830
|
name: e.string(),
|
|
831
831
|
display_name: e.string().optional(),
|
|
832
832
|
strategy: e.string(),
|
|
833
|
-
options: e.preprocess((e) => e === null ? {} :
|
|
833
|
+
options: e.preprocess((e) => e === null ? {} : v(e), Ue).default({}),
|
|
834
834
|
enabled_clients: e.array(e.string()).default([]).optional(),
|
|
835
835
|
response_type: e.nativeEnum(Ie).optional(),
|
|
836
|
-
response_mode: e.nativeEnum(
|
|
836
|
+
response_mode: e.nativeEnum(Le).optional(),
|
|
837
837
|
is_domain_connection: e.boolean().optional(),
|
|
838
838
|
show_as_button: e.boolean().optional(),
|
|
839
839
|
metadata: e.record(e.string(), e.any()).optional(),
|
|
@@ -843,8 +843,8 @@ e.object({
|
|
|
843
843
|
id: e.string(),
|
|
844
844
|
created_at: e.string().transform((e) => e === null ? "" : e),
|
|
845
845
|
updated_at: e.string().transform((e) => e === null ? "" : e)
|
|
846
|
-
}).extend(
|
|
847
|
-
var
|
|
846
|
+
}).extend(We.shape);
|
|
847
|
+
var Ge = e.object({
|
|
848
848
|
domain: e.string(),
|
|
849
849
|
custom_domain_id: e.string().optional(),
|
|
850
850
|
type: e.enum(["auth0_managed_certs", "self_managed_certs"]),
|
|
@@ -858,7 +858,7 @@ var Ue = e.object({
|
|
|
858
858
|
"null"
|
|
859
859
|
]).optional(),
|
|
860
860
|
domain_metadata: e.record(e.string(), e.string().max(255)).optional()
|
|
861
|
-
}),
|
|
861
|
+
}), Ke = e.discriminatedUnion("name", [e.object({
|
|
862
862
|
name: e.literal("txt"),
|
|
863
863
|
record: e.string(),
|
|
864
864
|
domain: e.string()
|
|
@@ -866,7 +866,7 @@ var Ue = e.object({
|
|
|
866
866
|
name: e.literal("http"),
|
|
867
867
|
http_body: e.string(),
|
|
868
868
|
http_url: e.string()
|
|
869
|
-
})]),
|
|
869
|
+
})]), qe = Ge.extend({
|
|
870
870
|
custom_domain_id: e.string(),
|
|
871
871
|
primary: e.boolean(),
|
|
872
872
|
status: e.enum([
|
|
@@ -876,28 +876,28 @@ var Ue = e.object({
|
|
|
876
876
|
"ready"
|
|
877
877
|
]),
|
|
878
878
|
origin_domain_name: e.string().optional(),
|
|
879
|
-
verification: e.object({ methods: e.array(
|
|
879
|
+
verification: e.object({ methods: e.array(Ke) }).optional(),
|
|
880
880
|
tls_policy: e.string().optional()
|
|
881
881
|
});
|
|
882
|
-
|
|
882
|
+
Ge.pick({
|
|
883
883
|
tls_policy: !0,
|
|
884
884
|
custom_client_ip_header: !0,
|
|
885
885
|
domain_metadata: !0
|
|
886
|
-
}).strict(),
|
|
886
|
+
}).strict(), qe.extend({ tenant_id: e.string() }), e.object({
|
|
887
887
|
certificate: e.string().regex(/^-----BEGIN CERTIFICATE-----[\s\S]+-----END CERTIFICATE-----\s*$/, "must be PEM-encoded; include the full certificate chain in leaf-first order"),
|
|
888
888
|
private_key: e.string().regex(/-----BEGIN (RSA |EC |ENCRYPTED )?PRIVATE KEY-----[\s\S]+-----END \1PRIVATE KEY-----\s*$/, "must be a PEM-encoded private key")
|
|
889
889
|
});
|
|
890
|
-
var
|
|
890
|
+
var y = e.object({
|
|
891
891
|
id: e.string(),
|
|
892
892
|
order: e.number().optional(),
|
|
893
893
|
visible: e.boolean().optional().default(!0)
|
|
894
|
-
}),
|
|
894
|
+
}), b = y.extend({ category: e.literal("BLOCK").optional() }), Je = b.extend({
|
|
895
895
|
type: e.literal("DIVIDER"),
|
|
896
896
|
config: e.object({ text: e.string().optional() }).optional()
|
|
897
|
-
}),
|
|
897
|
+
}), Ye = b.extend({
|
|
898
898
|
type: e.literal("HTML"),
|
|
899
899
|
config: e.object({ content: e.string().optional() }).optional()
|
|
900
|
-
}),
|
|
900
|
+
}), Xe = b.extend({
|
|
901
901
|
type: e.literal("IMAGE"),
|
|
902
902
|
config: e.object({
|
|
903
903
|
src: e.string().optional(),
|
|
@@ -905,43 +905,43 @@ var x = e.object({
|
|
|
905
905
|
width: e.number().optional(),
|
|
906
906
|
height: e.number().optional()
|
|
907
907
|
}).optional()
|
|
908
|
-
}),
|
|
908
|
+
}), Ze = b.extend({
|
|
909
909
|
type: e.literal("JUMP_BUTTON"),
|
|
910
910
|
config: e.object({
|
|
911
911
|
text: e.string().optional(),
|
|
912
912
|
target_step: e.string().optional()
|
|
913
913
|
})
|
|
914
|
-
}),
|
|
914
|
+
}), Qe = b.extend({
|
|
915
915
|
type: e.literal("RESEND_BUTTON"),
|
|
916
916
|
config: e.object({
|
|
917
917
|
text: e.string().optional(),
|
|
918
918
|
resend_action: e.string().optional()
|
|
919
919
|
})
|
|
920
|
-
}),
|
|
920
|
+
}), $e = b.extend({
|
|
921
921
|
type: e.literal("NEXT_BUTTON"),
|
|
922
922
|
config: e.object({ text: e.string().optional() })
|
|
923
|
-
}),
|
|
923
|
+
}), et = b.extend({
|
|
924
924
|
type: e.literal("PREVIOUS_BUTTON"),
|
|
925
925
|
config: e.object({ text: e.string().optional() })
|
|
926
|
-
}),
|
|
926
|
+
}), tt = b.extend({
|
|
927
927
|
type: e.literal("RICH_TEXT"),
|
|
928
928
|
config: e.object({ content: e.string().optional() }).optional()
|
|
929
|
-
}),
|
|
929
|
+
}), x = y.extend({
|
|
930
930
|
category: e.literal("WIDGET").optional(),
|
|
931
931
|
label: e.string().min(1).optional(),
|
|
932
932
|
hint: e.string().min(1).max(500).optional(),
|
|
933
933
|
required: e.boolean().optional(),
|
|
934
934
|
sensitive: e.boolean().optional()
|
|
935
|
-
}),
|
|
935
|
+
}), nt = x.extend({
|
|
936
936
|
type: e.literal("AUTH0_VERIFIABLE_CREDENTIALS"),
|
|
937
937
|
config: e.object({ credential_type: e.string().optional() })
|
|
938
|
-
}),
|
|
938
|
+
}), rt = x.extend({
|
|
939
939
|
type: e.literal("GMAPS_ADDRESS"),
|
|
940
940
|
config: e.object({ api_key: e.string().optional() })
|
|
941
|
-
}),
|
|
941
|
+
}), it = x.extend({
|
|
942
942
|
type: e.literal("RECAPTCHA"),
|
|
943
943
|
config: e.object({ site_key: e.string().optional() })
|
|
944
|
-
}),
|
|
944
|
+
}), S = y.extend({
|
|
945
945
|
category: e.literal("FIELD").optional(),
|
|
946
946
|
label: e.string().min(1).optional(),
|
|
947
947
|
hint: e.string().min(1).max(500).optional(),
|
|
@@ -957,10 +957,10 @@ var x = e.object({
|
|
|
957
957
|
})).optional(),
|
|
958
958
|
required: e.boolean().optional(),
|
|
959
959
|
sensitive: e.boolean().optional()
|
|
960
|
-
}),
|
|
960
|
+
}), at = S.extend({
|
|
961
961
|
type: e.literal("BOOLEAN"),
|
|
962
962
|
config: e.object({ default_value: e.boolean().optional() }).optional()
|
|
963
|
-
}),
|
|
963
|
+
}), ot = S.extend({
|
|
964
964
|
type: e.literal("CARDS"),
|
|
965
965
|
config: e.object({
|
|
966
966
|
options: e.array(e.object({
|
|
@@ -971,7 +971,7 @@ var x = e.object({
|
|
|
971
971
|
})).optional(),
|
|
972
972
|
multi_select: e.boolean().optional()
|
|
973
973
|
}).optional()
|
|
974
|
-
}),
|
|
974
|
+
}), st = S.extend({
|
|
975
975
|
type: e.literal("CHOICE"),
|
|
976
976
|
config: e.object({
|
|
977
977
|
options: e.array(e.object({
|
|
@@ -982,7 +982,7 @@ var x = e.object({
|
|
|
982
982
|
multiple: e.boolean().optional(),
|
|
983
983
|
default_value: e.union([e.string(), e.array(e.string())]).optional()
|
|
984
984
|
}).optional()
|
|
985
|
-
}),
|
|
985
|
+
}), ct = S.extend({
|
|
986
986
|
type: e.literal("CODE"),
|
|
987
987
|
config: e.object({
|
|
988
988
|
length: e.number().int().positive().max(100).optional(),
|
|
@@ -999,7 +999,7 @@ var x = e.object({
|
|
|
999
999
|
message: "default_value is longer than the configured length",
|
|
1000
1000
|
path: ["default_value"]
|
|
1001
1001
|
}).optional()
|
|
1002
|
-
}),
|
|
1002
|
+
}), lt = S.extend({
|
|
1003
1003
|
type: e.literal("CUSTOM"),
|
|
1004
1004
|
config: e.object({
|
|
1005
1005
|
component: e.string().optional(),
|
|
@@ -1007,7 +1007,7 @@ var x = e.object({
|
|
|
1007
1007
|
schema: e.record(e.string(), e.any()).optional(),
|
|
1008
1008
|
code: e.string().optional()
|
|
1009
1009
|
})
|
|
1010
|
-
}),
|
|
1010
|
+
}), ut = S.extend({
|
|
1011
1011
|
type: e.literal("DATE"),
|
|
1012
1012
|
config: e.object({
|
|
1013
1013
|
format: e.string().optional(),
|
|
@@ -1015,7 +1015,7 @@ var x = e.object({
|
|
|
1015
1015
|
max: e.string().optional(),
|
|
1016
1016
|
default_value: e.string().optional()
|
|
1017
1017
|
}).optional()
|
|
1018
|
-
}),
|
|
1018
|
+
}), dt = S.extend({
|
|
1019
1019
|
type: e.literal("DROPDOWN"),
|
|
1020
1020
|
config: e.object({
|
|
1021
1021
|
options: e.array(e.object({
|
|
@@ -1027,7 +1027,7 @@ var x = e.object({
|
|
|
1027
1027
|
multiple: e.boolean().optional(),
|
|
1028
1028
|
default_value: e.union([e.string(), e.array(e.string())]).optional()
|
|
1029
1029
|
}).optional()
|
|
1030
|
-
}),
|
|
1030
|
+
}), ft = S.extend({
|
|
1031
1031
|
type: e.literal("EMAIL"),
|
|
1032
1032
|
config: e.object({
|
|
1033
1033
|
placeholder: e.string().optional(),
|
|
@@ -1035,20 +1035,20 @@ var x = e.object({
|
|
|
1035
1035
|
last_used: e.boolean().optional(),
|
|
1036
1036
|
last_used_label: e.string().optional()
|
|
1037
1037
|
}).optional()
|
|
1038
|
-
}),
|
|
1038
|
+
}), pt = S.extend({
|
|
1039
1039
|
type: e.literal("FILE"),
|
|
1040
1040
|
config: e.object({
|
|
1041
1041
|
accept: e.string().optional(),
|
|
1042
1042
|
max_size: e.number().optional(),
|
|
1043
1043
|
multiple: e.boolean().optional()
|
|
1044
1044
|
}).optional()
|
|
1045
|
-
}),
|
|
1045
|
+
}), mt = S.extend({
|
|
1046
1046
|
type: e.literal("LEGAL"),
|
|
1047
1047
|
config: e.object({
|
|
1048
1048
|
text: e.string(),
|
|
1049
1049
|
html: e.boolean().optional()
|
|
1050
1050
|
}).optional()
|
|
1051
|
-
}),
|
|
1051
|
+
}), ht = S.extend({
|
|
1052
1052
|
type: e.literal("NUMBER"),
|
|
1053
1053
|
config: e.object({
|
|
1054
1054
|
placeholder: e.string().optional(),
|
|
@@ -1057,7 +1057,7 @@ var x = e.object({
|
|
|
1057
1057
|
step: e.number().optional(),
|
|
1058
1058
|
default_value: e.string().optional()
|
|
1059
1059
|
}).optional()
|
|
1060
|
-
}),
|
|
1060
|
+
}), gt = S.extend({
|
|
1061
1061
|
type: e.literal("PASSWORD"),
|
|
1062
1062
|
config: e.object({
|
|
1063
1063
|
placeholder: e.string().optional(),
|
|
@@ -1066,13 +1066,13 @@ var x = e.object({
|
|
|
1066
1066
|
forgot_password_link: e.string().optional(),
|
|
1067
1067
|
default_value: e.string().optional()
|
|
1068
1068
|
}).optional()
|
|
1069
|
-
}),
|
|
1069
|
+
}), _t = S.extend({
|
|
1070
1070
|
type: e.literal("PAYMENT"),
|
|
1071
1071
|
config: e.object({
|
|
1072
1072
|
provider: e.string().optional(),
|
|
1073
1073
|
currency: e.string().optional()
|
|
1074
1074
|
}).optional()
|
|
1075
|
-
}),
|
|
1075
|
+
}), vt = S.extend({
|
|
1076
1076
|
type: e.literal("SOCIAL"),
|
|
1077
1077
|
config: e.object({
|
|
1078
1078
|
providers: e.array(e.string()).optional(),
|
|
@@ -1086,7 +1086,7 @@ var x = e.object({
|
|
|
1086
1086
|
last_used_label: e.string().optional()
|
|
1087
1087
|
})).optional()
|
|
1088
1088
|
}).optional()
|
|
1089
|
-
}),
|
|
1089
|
+
}), yt = S.extend({
|
|
1090
1090
|
type: e.literal("TEL"),
|
|
1091
1091
|
config: e.object({
|
|
1092
1092
|
placeholder: e.string().optional(),
|
|
@@ -1094,7 +1094,7 @@ var x = e.object({
|
|
|
1094
1094
|
default_value: e.string().optional(),
|
|
1095
1095
|
allow_email: e.boolean().optional()
|
|
1096
1096
|
}).optional()
|
|
1097
|
-
}),
|
|
1097
|
+
}), bt = S.extend({
|
|
1098
1098
|
type: e.literal("TEXT"),
|
|
1099
1099
|
config: e.object({
|
|
1100
1100
|
placeholder: e.string().optional(),
|
|
@@ -1104,39 +1104,37 @@ var x = e.object({
|
|
|
1104
1104
|
last_used: e.boolean().optional(),
|
|
1105
1105
|
last_used_label: e.string().optional()
|
|
1106
1106
|
}).optional()
|
|
1107
|
-
}),
|
|
1107
|
+
}), xt = S.extend({
|
|
1108
1108
|
type: e.literal("COUNTRY"),
|
|
1109
1109
|
config: e.object({
|
|
1110
1110
|
placeholder: e.string().optional(),
|
|
1111
1111
|
default_value: e.string().optional()
|
|
1112
1112
|
}).optional()
|
|
1113
|
-
}),
|
|
1113
|
+
}), St = S.extend({
|
|
1114
1114
|
type: e.literal("URL"),
|
|
1115
1115
|
config: e.object({
|
|
1116
1116
|
placeholder: e.string().optional(),
|
|
1117
1117
|
default_value: e.string().optional()
|
|
1118
1118
|
}).optional()
|
|
1119
|
-
}),
|
|
1120
|
-
Ke,
|
|
1121
|
-
qe,
|
|
1119
|
+
}), Ct = e.discriminatedUnion("type", [
|
|
1122
1120
|
Je,
|
|
1123
1121
|
Ye,
|
|
1124
1122
|
Xe,
|
|
1125
1123
|
Ze,
|
|
1126
1124
|
Qe,
|
|
1127
|
-
$e
|
|
1128
|
-
]), St = e.discriminatedUnion("type", [
|
|
1125
|
+
$e,
|
|
1129
1126
|
et,
|
|
1130
|
-
tt
|
|
1131
|
-
|
|
1132
|
-
|
|
1127
|
+
tt
|
|
1128
|
+
]), wt = e.discriminatedUnion("type", [
|
|
1129
|
+
nt,
|
|
1133
1130
|
rt,
|
|
1134
|
-
it
|
|
1131
|
+
it
|
|
1132
|
+
]), Tt = e.discriminatedUnion("type", [
|
|
1135
1133
|
at,
|
|
1136
1134
|
ot,
|
|
1137
|
-
yt,
|
|
1138
1135
|
st,
|
|
1139
1136
|
ct,
|
|
1137
|
+
xt,
|
|
1140
1138
|
lt,
|
|
1141
1139
|
ut,
|
|
1142
1140
|
dt,
|
|
@@ -1147,11 +1145,13 @@ var x = e.object({
|
|
|
1147
1145
|
gt,
|
|
1148
1146
|
_t,
|
|
1149
1147
|
vt,
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
Ct
|
|
1148
|
+
yt,
|
|
1149
|
+
bt,
|
|
1150
|
+
St
|
|
1151
|
+
]), C = e.union([
|
|
1152
|
+
Ct,
|
|
1153
|
+
wt,
|
|
1154
|
+
Tt
|
|
1155
1155
|
]);
|
|
1156
1156
|
new Set([
|
|
1157
1157
|
"BOOLEAN",
|
|
@@ -1178,22 +1178,22 @@ new Set([
|
|
|
1178
1178
|
visible: e.boolean().optional().default(!0),
|
|
1179
1179
|
customizations: e.record(e.string(), e.any()).optional()
|
|
1180
1180
|
});
|
|
1181
|
-
var
|
|
1181
|
+
var w = e.object({
|
|
1182
1182
|
x: e.number(),
|
|
1183
1183
|
y: e.number()
|
|
1184
|
-
}),
|
|
1184
|
+
}), Et = e.object({
|
|
1185
1185
|
id: e.string(),
|
|
1186
1186
|
type: e.literal("FLOW"),
|
|
1187
|
-
coordinates:
|
|
1187
|
+
coordinates: w,
|
|
1188
1188
|
alias: e.string().min(1).max(150).optional(),
|
|
1189
1189
|
config: e.object({
|
|
1190
1190
|
flow_id: e.string().max(30),
|
|
1191
1191
|
next_node: e.string().optional()
|
|
1192
1192
|
})
|
|
1193
|
-
}),
|
|
1193
|
+
}), Dt = e.object({
|
|
1194
1194
|
id: e.string(),
|
|
1195
1195
|
type: e.literal("ROUTER"),
|
|
1196
|
-
coordinates:
|
|
1196
|
+
coordinates: w,
|
|
1197
1197
|
alias: e.string().min(1).max(150),
|
|
1198
1198
|
config: e.object({
|
|
1199
1199
|
rules: e.array(e.object({
|
|
@@ -1204,20 +1204,20 @@ var T = e.object({
|
|
|
1204
1204
|
})),
|
|
1205
1205
|
fallback: e.string()
|
|
1206
1206
|
})
|
|
1207
|
-
}),
|
|
1207
|
+
}), Ot = e.object({
|
|
1208
1208
|
id: e.string(),
|
|
1209
1209
|
type: e.literal("STEP"),
|
|
1210
|
-
coordinates:
|
|
1210
|
+
coordinates: w,
|
|
1211
1211
|
alias: e.string().min(1).max(150).optional(),
|
|
1212
1212
|
config: e.object({
|
|
1213
|
-
components: e.array(
|
|
1213
|
+
components: e.array(C),
|
|
1214
1214
|
next_node: e.string().optional()
|
|
1215
1215
|
})
|
|
1216
|
-
}),
|
|
1217
|
-
Tt,
|
|
1216
|
+
}), kt = e.discriminatedUnion("type", [
|
|
1218
1217
|
Et,
|
|
1219
|
-
Dt
|
|
1220
|
-
|
|
1218
|
+
Dt,
|
|
1219
|
+
Ot
|
|
1220
|
+
]), At = e.object({
|
|
1221
1221
|
name: e.string().openapi({ description: "The name of the form" }),
|
|
1222
1222
|
messages: e.object({
|
|
1223
1223
|
errors: e.record(e.string(), e.any()).optional(),
|
|
@@ -1228,14 +1228,14 @@ var T = e.object({
|
|
|
1228
1228
|
default: e.string().optional()
|
|
1229
1229
|
}).optional(),
|
|
1230
1230
|
translations: e.record(e.string(), e.any()).optional(),
|
|
1231
|
-
nodes: e.array(
|
|
1231
|
+
nodes: e.array(kt).optional(),
|
|
1232
1232
|
start: e.object({
|
|
1233
1233
|
hidden_fields: e.array(e.object({
|
|
1234
1234
|
key: e.string(),
|
|
1235
1235
|
value: e.string()
|
|
1236
1236
|
})).optional(),
|
|
1237
1237
|
next_node: e.string().optional(),
|
|
1238
|
-
coordinates:
|
|
1238
|
+
coordinates: w.optional()
|
|
1239
1239
|
}).optional(),
|
|
1240
1240
|
ending: e.object({
|
|
1241
1241
|
redirection: e.object({
|
|
@@ -1243,7 +1243,7 @@ var T = e.object({
|
|
|
1243
1243
|
target: e.string().optional()
|
|
1244
1244
|
}).optional(),
|
|
1245
1245
|
after_submit: e.object({ flow_id: e.string().optional() }).optional(),
|
|
1246
|
-
coordinates:
|
|
1246
|
+
coordinates: w.optional(),
|
|
1247
1247
|
resume_flow: e.boolean().optional()
|
|
1248
1248
|
}).optional(),
|
|
1249
1249
|
style: e.object({ css: e.string().optional() }).optional(),
|
|
@@ -1252,8 +1252,8 @@ var T = e.object({
|
|
|
1252
1252
|
sdk_src: e.string().optional()
|
|
1253
1253
|
}).optional()
|
|
1254
1254
|
}).openapi({ description: "Schema for flow-based forms (matches Auth0 Forms structure)" });
|
|
1255
|
-
n.extend(
|
|
1256
|
-
var
|
|
1255
|
+
n.extend(At.shape).extend({ id: e.string() });
|
|
1256
|
+
var jt = e.object({
|
|
1257
1257
|
id: e.number().optional(),
|
|
1258
1258
|
text: e.string(),
|
|
1259
1259
|
type: e.enum([
|
|
@@ -1262,7 +1262,7 @@ var At = e.object({
|
|
|
1262
1262
|
"success",
|
|
1263
1263
|
"warning"
|
|
1264
1264
|
])
|
|
1265
|
-
}),
|
|
1265
|
+
}), Mt = e.object({
|
|
1266
1266
|
id: e.string().optional(),
|
|
1267
1267
|
text: e.string(),
|
|
1268
1268
|
href: e.string(),
|
|
@@ -1274,12 +1274,12 @@ e.object({
|
|
|
1274
1274
|
method: e.enum(["POST", "GET"]),
|
|
1275
1275
|
title: e.string().optional(),
|
|
1276
1276
|
description: e.string().optional(),
|
|
1277
|
-
components: e.array(
|
|
1278
|
-
messages: e.array(
|
|
1279
|
-
links: e.array(
|
|
1277
|
+
components: e.array(C),
|
|
1278
|
+
messages: e.array(jt).optional(),
|
|
1279
|
+
links: e.array(Mt).optional(),
|
|
1280
1280
|
footer: e.string().optional()
|
|
1281
1281
|
});
|
|
1282
|
-
var
|
|
1282
|
+
var T = e.enum([
|
|
1283
1283
|
"pre-user-registration",
|
|
1284
1284
|
"post-user-registration",
|
|
1285
1285
|
"post-user-login",
|
|
@@ -1287,19 +1287,19 @@ var E = e.enum([
|
|
|
1287
1287
|
"validate-registration-username",
|
|
1288
1288
|
"pre-user-deletion",
|
|
1289
1289
|
"post-user-deletion"
|
|
1290
|
-
]),
|
|
1290
|
+
]), E = e.enum(["post-user-login"]), D = e.enum([
|
|
1291
1291
|
"post-user-login",
|
|
1292
1292
|
"post-user-registration",
|
|
1293
1293
|
"post-user-update",
|
|
1294
1294
|
"credentials-exchange"
|
|
1295
|
-
]),
|
|
1295
|
+
]), O = e.enum([
|
|
1296
1296
|
"post-user-login",
|
|
1297
1297
|
"credentials-exchange",
|
|
1298
1298
|
"pre-user-registration",
|
|
1299
1299
|
"post-user-registration"
|
|
1300
|
-
]),
|
|
1301
|
-
E.options, D.options, O.options, k.options
|
|
1302
|
-
var
|
|
1300
|
+
]), k = e.enum(["post-user-login"]);
|
|
1301
|
+
T.options, E.options, D.options, O.options, k.options;
|
|
1302
|
+
var A = e.enum(["impersonate"]), Nt = e.enum([
|
|
1303
1303
|
"ensure-username",
|
|
1304
1304
|
"set-preferred-username",
|
|
1305
1305
|
"account-linking"
|
|
@@ -1311,24 +1311,24 @@ var Mt = e.enum(["impersonate"]), Nt = e.enum([
|
|
|
1311
1311
|
metadata: e.record(e.string(), e.unknown()).optional()
|
|
1312
1312
|
}, Pt = e.object({
|
|
1313
1313
|
...j,
|
|
1314
|
-
trigger_id:
|
|
1314
|
+
trigger_id: T,
|
|
1315
1315
|
url: e.string()
|
|
1316
1316
|
}), Ft = e.object({
|
|
1317
1317
|
...j,
|
|
1318
|
-
trigger_id:
|
|
1318
|
+
trigger_id: E,
|
|
1319
1319
|
form_id: e.string()
|
|
1320
1320
|
}), It = e.object({
|
|
1321
1321
|
...j,
|
|
1322
|
-
trigger_id:
|
|
1322
|
+
trigger_id: D,
|
|
1323
1323
|
template_id: Nt
|
|
1324
1324
|
}), Lt = e.object({
|
|
1325
1325
|
...j,
|
|
1326
|
-
trigger_id:
|
|
1326
|
+
trigger_id: O,
|
|
1327
1327
|
code_id: e.string()
|
|
1328
1328
|
}), Rt = e.object({
|
|
1329
1329
|
...j,
|
|
1330
|
-
trigger_id:
|
|
1331
|
-
page_id:
|
|
1330
|
+
trigger_id: k,
|
|
1331
|
+
page_id: A,
|
|
1332
1332
|
permission_required: e.string().optional()
|
|
1333
1333
|
});
|
|
1334
1334
|
e.union([
|
|
@@ -1340,34 +1340,34 @@ e.union([
|
|
|
1340
1340
|
]);
|
|
1341
1341
|
var zt = e.object({
|
|
1342
1342
|
...j,
|
|
1343
|
-
trigger_id:
|
|
1343
|
+
trigger_id: T
|
|
1344
1344
|
}).extend(n.shape).extend({
|
|
1345
1345
|
hook_id: e.string(),
|
|
1346
1346
|
url: e.string()
|
|
1347
1347
|
}), Bt = e.object({
|
|
1348
1348
|
...j,
|
|
1349
|
-
trigger_id:
|
|
1349
|
+
trigger_id: E
|
|
1350
1350
|
}).extend(n.shape).extend({
|
|
1351
1351
|
hook_id: e.string(),
|
|
1352
1352
|
form_id: e.string()
|
|
1353
1353
|
}), Vt = e.object({
|
|
1354
1354
|
...j,
|
|
1355
|
-
trigger_id:
|
|
1355
|
+
trigger_id: D
|
|
1356
1356
|
}).extend(n.shape).extend({
|
|
1357
1357
|
hook_id: e.string(),
|
|
1358
1358
|
template_id: Nt
|
|
1359
1359
|
}), Ht = e.object({
|
|
1360
1360
|
...j,
|
|
1361
|
-
trigger_id:
|
|
1361
|
+
trigger_id: O
|
|
1362
1362
|
}).extend(n.shape).extend({
|
|
1363
1363
|
hook_id: e.string(),
|
|
1364
1364
|
code_id: e.string()
|
|
1365
1365
|
}), Ut = e.object({
|
|
1366
1366
|
...j,
|
|
1367
|
-
trigger_id:
|
|
1367
|
+
trigger_id: k
|
|
1368
1368
|
}).extend(n.shape).extend({
|
|
1369
1369
|
hook_id: e.string(),
|
|
1370
|
-
page_id:
|
|
1370
|
+
page_id: A,
|
|
1371
1371
|
permission_required: e.string().optional()
|
|
1372
1372
|
});
|
|
1373
1373
|
e.union([
|
|
@@ -1482,7 +1482,7 @@ var Jt = /* @__PURE__ */ function(e) {
|
|
|
1482
1482
|
e.object({
|
|
1483
1483
|
csrf_token: e.string(),
|
|
1484
1484
|
auth0Client: e.string().optional(),
|
|
1485
|
-
authParams:
|
|
1485
|
+
authParams: Ve,
|
|
1486
1486
|
expires_at: e.string(),
|
|
1487
1487
|
deleted_at: e.string().optional(),
|
|
1488
1488
|
ip: e.string().optional(),
|
|
@@ -2276,6 +2276,10 @@ e.object({
|
|
|
2276
2276
|
}), e.object({
|
|
2277
2277
|
id: e.string(),
|
|
2278
2278
|
login_id: e.string(),
|
|
2279
|
+
session_id: e.string().optional(),
|
|
2280
|
+
organization: e.string().optional(),
|
|
2281
|
+
auth_connection: e.string().optional(),
|
|
2282
|
+
auth_strategy: Xt.optional(),
|
|
2279
2283
|
user_id: e.string(),
|
|
2280
2284
|
client_id: e.string(),
|
|
2281
2285
|
expires_at: e.string().optional(),
|
|
@@ -2642,7 +2646,7 @@ var Qn = e.enum([
|
|
|
2642
2646
|
friendly_name: e.string().optional(),
|
|
2643
2647
|
confirmed: e.boolean().default(!1)
|
|
2644
2648
|
});
|
|
2645
|
-
function
|
|
2649
|
+
function F(t, n) {
|
|
2646
2650
|
t.type === "phone" && !t.phone_number && n.addIssue({
|
|
2647
2651
|
code: e.ZodIssueCode.custom,
|
|
2648
2652
|
message: "phone_number is required when type is 'phone'",
|
|
@@ -2665,23 +2669,23 @@ function er(t, n) {
|
|
|
2665
2669
|
path: ["public_key"]
|
|
2666
2670
|
}));
|
|
2667
2671
|
}
|
|
2668
|
-
$n.superRefine(
|
|
2672
|
+
$n.superRefine(F), $n.extend({
|
|
2669
2673
|
id: e.string(),
|
|
2670
2674
|
created_at: e.string(),
|
|
2671
2675
|
updated_at: e.string()
|
|
2672
|
-
}).superRefine(
|
|
2676
|
+
}).superRefine(F), e.object({
|
|
2673
2677
|
id: e.string().optional(),
|
|
2674
2678
|
created_at: e.string().datetime({ offset: !0 }).optional(),
|
|
2675
2679
|
updated_at: e.string().datetime({ offset: !0 }).optional()
|
|
2676
2680
|
});
|
|
2677
2681
|
//#endregion
|
|
2678
2682
|
//#region src/data-plane/cache.ts
|
|
2679
|
-
var
|
|
2680
|
-
function
|
|
2683
|
+
var er = 1e4;
|
|
2684
|
+
function I(e, t, n) {
|
|
2681
2685
|
let r = typeof t == "number" ? {
|
|
2682
2686
|
freshTtlMs: t,
|
|
2683
2687
|
maxEntries: n
|
|
2684
|
-
} : t, i = r.freshTtlMs, a = r.staleTtlMs ?? 0, o = r.staleIfErrorTtlMs ?? 0, s = r.negativeTtlMs ?? i, c = r.maxEntries ??
|
|
2688
|
+
} : t, i = r.freshTtlMs, a = r.staleTtlMs ?? 0, o = r.staleIfErrorTtlMs ?? 0, s = r.negativeTtlMs ?? i, c = r.maxEntries ?? er, l = r.waitUntil, u = /* @__PURE__ */ new Map();
|
|
2685
2689
|
function d(e) {
|
|
2686
2690
|
for (let [t, n] of u) n.stale_if_error_until <= e && n.stale_until <= e && !n.refreshing && u.delete(t);
|
|
2687
2691
|
for (; u.size >= c;) {
|
|
@@ -2738,7 +2742,7 @@ function F(e, t, n) {
|
|
|
2738
2742
|
}
|
|
2739
2743
|
//#endregion
|
|
2740
2744
|
//#region src/data-plane/registry.ts
|
|
2741
|
-
var
|
|
2745
|
+
var L = class {
|
|
2742
2746
|
definitions = /* @__PURE__ */ new Map();
|
|
2743
2747
|
bindings;
|
|
2744
2748
|
constructor(e = {}) {
|
|
@@ -2758,29 +2762,29 @@ var I = class {
|
|
|
2758
2762
|
return n.build(r.data, { bindings: this.bindings });
|
|
2759
2763
|
}
|
|
2760
2764
|
};
|
|
2761
|
-
function
|
|
2765
|
+
function R(e) {
|
|
2762
2766
|
return e;
|
|
2763
2767
|
}
|
|
2764
2768
|
//#endregion
|
|
2765
2769
|
//#region src/data-plane/handlers/util.ts
|
|
2766
|
-
var
|
|
2770
|
+
var z = "__authhero_proxy_request__", B = "__authhero_proxy_tenant_id__", V = "__authhero_proxy_custom_domain_id__", H = "__authhero_proxy_domain__", tr = "x-authhero-proxy-mutability-probe";
|
|
2767
2771
|
function nr(e, t) {
|
|
2768
|
-
e.set(
|
|
2772
|
+
e.set(z, t);
|
|
2769
2773
|
}
|
|
2770
2774
|
function U(e) {
|
|
2771
|
-
return e.get(
|
|
2775
|
+
return e.get(z) ?? e.req.raw;
|
|
2772
2776
|
}
|
|
2773
2777
|
function rr(e, t) {
|
|
2774
|
-
e.set(
|
|
2778
|
+
e.set(B, t.tenant_id), e.set(V, t.custom_domain_id), e.set(H, t.domain);
|
|
2775
2779
|
}
|
|
2776
2780
|
function ir(e) {
|
|
2777
|
-
return e.get(
|
|
2781
|
+
return e.get(B);
|
|
2778
2782
|
}
|
|
2779
2783
|
function ar(e) {
|
|
2780
|
-
return e.get(
|
|
2784
|
+
return e.get(V);
|
|
2781
2785
|
}
|
|
2782
2786
|
function or(e) {
|
|
2783
|
-
return e.get(
|
|
2787
|
+
return e.get(H);
|
|
2784
2788
|
}
|
|
2785
2789
|
function sr(e, t) {
|
|
2786
2790
|
let n = U(e), r = new Headers(n.headers);
|
|
@@ -2789,7 +2793,7 @@ function sr(e, t) {
|
|
|
2789
2793
|
function W(e) {
|
|
2790
2794
|
let t = e.res;
|
|
2791
2795
|
try {
|
|
2792
|
-
t.headers.append(
|
|
2796
|
+
t.headers.append(tr, "1"), t.headers.delete(tr);
|
|
2793
2797
|
return;
|
|
2794
2798
|
} catch {
|
|
2795
2799
|
e.res = new Response(t.body, {
|
|
@@ -2813,7 +2817,7 @@ function lr(e, t) {
|
|
|
2813
2817
|
let n = new Headers(), r = e.origins ?? ["*"], i = r.includes("*");
|
|
2814
2818
|
return i && !e.allow_credentials ? n.set("Access-Control-Allow-Origin", "*") : t && (i || r.includes(t)) && (n.set("Access-Control-Allow-Origin", t), n.append("Vary", "Origin")), e.allow_credentials && n.set("Access-Control-Allow-Credentials", "true"), e.allow_methods?.length && n.set("Access-Control-Allow-Methods", e.allow_methods.join(", ")), e.allow_headers?.length && n.set("Access-Control-Allow-Headers", e.allow_headers.join(", ")), e.expose_headers?.length && n.set("Access-Control-Expose-Headers", e.expose_headers.join(", ")), e.max_age !== void 0 && n.set("Access-Control-Max-Age", String(e.max_age)), n;
|
|
2815
2819
|
}
|
|
2816
|
-
var ur =
|
|
2820
|
+
var ur = R({
|
|
2817
2821
|
type: "cors",
|
|
2818
2822
|
optionsSchema: cr,
|
|
2819
2823
|
build(e) {
|
|
@@ -2842,7 +2846,7 @@ function fr(e, t) {
|
|
|
2842
2846
|
let n = `${e}:${t}`;
|
|
2843
2847
|
return typeof btoa == "function" ? btoa(n) : Buffer.from(n, "utf-8").toString("base64");
|
|
2844
2848
|
}
|
|
2845
|
-
var pr =
|
|
2849
|
+
var pr = R({
|
|
2846
2850
|
type: "basic_auth",
|
|
2847
2851
|
optionsSchema: dr,
|
|
2848
2852
|
build(e) {
|
|
@@ -2862,7 +2866,7 @@ var pr = L({
|
|
|
2862
2866
|
});
|
|
2863
2867
|
};
|
|
2864
2868
|
}
|
|
2865
|
-
}), mr =
|
|
2869
|
+
}), mr = R({
|
|
2866
2870
|
type: "headers",
|
|
2867
2871
|
optionsSchema: e.object({
|
|
2868
2872
|
request: e.record(e.string(), e.string()).optional(),
|
|
@@ -2877,7 +2881,7 @@ var pr = L({
|
|
|
2877
2881
|
}), await n(), (e.response || e.remove_response) && (W(t), e.remove_response?.forEach((e) => t.res.headers.delete(e)), e.response)) for (let [n, r] of Object.entries(e.response)) t.res.headers.set(n, r);
|
|
2878
2882
|
};
|
|
2879
2883
|
}
|
|
2880
|
-
}), hr =
|
|
2884
|
+
}), hr = R({
|
|
2881
2885
|
type: "cache",
|
|
2882
2886
|
optionsSchema: e.object({ ttl_seconds: e.number().int().positive() }),
|
|
2883
2887
|
build(e) {
|
|
@@ -2994,7 +2998,7 @@ function wr(e) {
|
|
|
2994
2998
|
let t = br(e);
|
|
2995
2999
|
return t ? Sr.some((e) => Cr(t, e)) : !1;
|
|
2996
3000
|
}
|
|
2997
|
-
var Tr =
|
|
3001
|
+
var Tr = R({
|
|
2998
3002
|
type: "forwarded_headers",
|
|
2999
3003
|
optionsSchema: e.object({
|
|
3000
3004
|
client_ip_header: e.string().default("cf-connecting-ip"),
|
|
@@ -3023,7 +3027,7 @@ function Or(e) {
|
|
|
3023
3027
|
n.toLowerCase() === "set-cookie" && t.push(e);
|
|
3024
3028
|
}), t;
|
|
3025
3029
|
}
|
|
3026
|
-
var kr =
|
|
3030
|
+
var kr = R({
|
|
3027
3031
|
type: "rewrite_cookies",
|
|
3028
3032
|
optionsSchema: Er,
|
|
3029
3033
|
build(e) {
|
|
@@ -3038,7 +3042,7 @@ var kr = L({
|
|
|
3038
3042
|
for (let e of a) t.res.headers.append("set-cookie", e.replace(s, `Domain=${r}`));
|
|
3039
3043
|
};
|
|
3040
3044
|
}
|
|
3041
|
-
}), Ar =
|
|
3045
|
+
}), Ar = R({
|
|
3042
3046
|
type: "rewrite_location",
|
|
3043
3047
|
optionsSchema: e.object({ upstream_origin: e.string().optional() }),
|
|
3044
3048
|
build(e) {
|
|
@@ -3121,7 +3125,7 @@ function Lr(e, t) {
|
|
|
3121
3125
|
init: o
|
|
3122
3126
|
};
|
|
3123
3127
|
}
|
|
3124
|
-
var Rr =
|
|
3128
|
+
var Rr = R({
|
|
3125
3129
|
type: "http",
|
|
3126
3130
|
optionsSchema: Pr,
|
|
3127
3131
|
build(e) {
|
|
@@ -3148,7 +3152,7 @@ var Rr = L({
|
|
|
3148
3152
|
function Vr(e) {
|
|
3149
3153
|
return typeof e == "object" && !!e && typeof e.fetch == "function";
|
|
3150
3154
|
}
|
|
3151
|
-
var Hr =
|
|
3155
|
+
var Hr = R({
|
|
3152
3156
|
type: "service_binding",
|
|
3153
3157
|
optionsSchema: Br,
|
|
3154
3158
|
build(e, t) {
|
|
@@ -3185,7 +3189,7 @@ var J = /\{(tenant_id|custom_domain_id|domain|host)\}/g;
|
|
|
3185
3189
|
function Kr(e) {
|
|
3186
3190
|
return J.lastIndex = 0, J.test(e);
|
|
3187
3191
|
}
|
|
3188
|
-
var qr =
|
|
3192
|
+
var qr = R({
|
|
3189
3193
|
type: "dispatch_namespace",
|
|
3190
3194
|
optionsSchema: Wr,
|
|
3191
3195
|
build(e, t) {
|
|
@@ -3221,7 +3225,7 @@ var qr = L({
|
|
|
3221
3225
|
}
|
|
3222
3226
|
};
|
|
3223
3227
|
}
|
|
3224
|
-
}), Jr =
|
|
3228
|
+
}), Jr = R({
|
|
3225
3229
|
type: "redirect",
|
|
3226
3230
|
optionsSchema: e.object({
|
|
3227
3231
|
upstream_url: e.string().refine((e) => {
|
|
@@ -3250,7 +3254,7 @@ var qr = L({
|
|
|
3250
3254
|
});
|
|
3251
3255
|
};
|
|
3252
3256
|
}
|
|
3253
|
-
}), Yr =
|
|
3257
|
+
}), Yr = R({
|
|
3254
3258
|
type: "static",
|
|
3255
3259
|
optionsSchema: e.object({
|
|
3256
3260
|
status: e.number().int().default(200),
|
|
@@ -3311,16 +3315,16 @@ function ei(e) {
|
|
|
3311
3315
|
//#endregion
|
|
3312
3316
|
//#region src/data-plane/compile.ts
|
|
3313
3317
|
var ti = "forwarded_headers";
|
|
3314
|
-
function
|
|
3318
|
+
function Y(e) {
|
|
3315
3319
|
return e.some((e) => e.type === "forwarded_headers") ? [...e] : [{
|
|
3316
3320
|
type: ti,
|
|
3317
3321
|
options: {}
|
|
3318
3322
|
}, ...e];
|
|
3319
3323
|
}
|
|
3320
|
-
function
|
|
3321
|
-
return e.has("forwarded_headers") ?
|
|
3324
|
+
function X(e, t) {
|
|
3325
|
+
return e.has("forwarded_headers") ? Y(t) : [...t];
|
|
3322
3326
|
}
|
|
3323
|
-
var
|
|
3327
|
+
var ni = [
|
|
3324
3328
|
"GET",
|
|
3325
3329
|
"POST",
|
|
3326
3330
|
"PUT",
|
|
@@ -3338,11 +3342,11 @@ function Z(e, n, r, i) {
|
|
|
3338
3342
|
for (let e of o) {
|
|
3339
3343
|
let t = [];
|
|
3340
3344
|
t.push(ei(e.match));
|
|
3341
|
-
for (let r of
|
|
3342
|
-
let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) :
|
|
3345
|
+
for (let r of X(n, e.handlers)) t.push(n.build(r.type, r.options));
|
|
3346
|
+
let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) : ni, i = e.match.path || "/*";
|
|
3343
3347
|
a.on(r, [i], ...t);
|
|
3344
3348
|
}
|
|
3345
|
-
return i && i.length > 0 ? a.on(
|
|
3349
|
+
return i && i.length > 0 ? a.on(ni, ["*"], ...i) : a.all("*", (e) => e.text("No matching route", 404)), a.onError((e, t) => {
|
|
3346
3350
|
let n = G(e);
|
|
3347
3351
|
return t.text(n ? "Upstream timeout" : "Bad gateway", n ? 504 : 502, { "x-authhero-proxy-error": n ? "handler_timeout" : "handler_failed" });
|
|
3348
3352
|
}), a;
|
|
@@ -3351,15 +3355,15 @@ function Z(e, n, r, i) {
|
|
|
3351
3355
|
//#region src/data-plane/router.ts
|
|
3352
3356
|
var ri = 1e4;
|
|
3353
3357
|
function ii(e) {
|
|
3354
|
-
return e.resolver ? e.resolver : e.cache ?
|
|
3358
|
+
return e.resolver ? e.resolver : e.cache ? I(e.data, e.cache) : I(e.data, e.cacheTtlMs ?? 3e4);
|
|
3355
3359
|
}
|
|
3356
3360
|
function ai(e) {
|
|
3357
3361
|
if (e.registry) return e.registry;
|
|
3358
|
-
let t = new
|
|
3362
|
+
let t = new L(e.bindings ?? {});
|
|
3359
3363
|
return Xr(t), t;
|
|
3360
3364
|
}
|
|
3361
3365
|
function Q(e) {
|
|
3362
|
-
let t = ii(e), n = ai(e), r = /* @__PURE__ */ new WeakMap(), i = e.resolveHostTimeoutMs ?? ri, a = e.defaultHandlers && e.defaultHandlers.length > 0 ?
|
|
3366
|
+
let t = ii(e), n = ai(e), r = /* @__PURE__ */ new WeakMap(), i = e.resolveHostTimeoutMs ?? ri, a = e.defaultHandlers && e.defaultHandlers.length > 0 ? X(n, e.defaultHandlers).map((e) => n.build(e.type, e.options)) : void 0, o = a ? Z([], n, void 0, a) : void 0;
|
|
3363
3367
|
return async (e) => {
|
|
3364
3368
|
let s = e.req.header("host") ?? e.req.header("x-forwarded-host");
|
|
3365
3369
|
if (!s) return e.text("Missing host", 400);
|
|
@@ -3693,4 +3697,4 @@ function Oi(e) {
|
|
|
3693
3697
|
};
|
|
3694
3698
|
}
|
|
3695
3699
|
//#endregion
|
|
3696
|
-
export { Ti as DEFAULT_KV_HOST_KEY_PREFIX, ti as FORWARDED_HEADERS_HANDLER_TYPE,
|
|
3700
|
+
export { Ti as DEFAULT_KV_HOST_KEY_PREFIX, ti as FORWARDED_HEADERS_HANDLER_TYPE, L as HandlerRegistry, xi as PROXY_RESOLVE_HOST_SCOPE, pr as basicAuthHandler, _i as buildCacheAdapterKey, pi as buildCacheApiKey, Ei as buildKvHostKey, ei as buildMatchFilter, hr as cacheHandler, Z as compileHostApp, ur as corsHandler, gi as createCacheAdapterHostCache, fi as createCacheApiHostCache, Ci as createHttpProxyAdapter, I as createInMemoryHostCache, Oi as createKvProxyAdapter, si as createProxyApp, Q as createProxyDataPlaneHandler, oi as createProxyDataPlaneRouter, wi as createServiceBindingFetch, yi as createStaticProxyAdapter, R as defineHandler, qr as dispatchNamespaceHandler, Tr as forwardedHeadersHandler, En as handlerConfigSchema, mr as headersHandler, Rr as httpHandler, bi as httpRoute, wr as isCloudflareIp, Tn as matchSchema, $r as matchesAnyHost, Qr as matchesHost, P as proxyRouteInsertSchema, Dn as proxyRouteSchema, On as proxyRouteUpdateSchema, Jr as redirectHandler, Xr as registerBuiltinHandlers, kr as rewriteCookiesHandler, Ar as rewriteLocationHandler, Hr as serviceBindingHandler, Zr as sortRoutes, Yr as staticHandler, Y as withForwardedHeaders, X as withForwardedHeadersFor };
|