File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -672,6 +672,7 @@ Examples:
672672- ❌ ` \u2060https://api.trigger.dev/custom-prefix/\u2060 ` (word-joiner wrappers are rejected)
673673- ❌ ` \u200Bhttps://api.trigger.dev/custom-prefix/\u200B ` (zero-width-space wrappers are rejected)
674674- ❌ ` \u200Chttps://api.trigger.dev/custom-prefix/\u200C ` (zero-width-non-joiner wrappers are rejected)
675+ - ❌ ` \u200Dhttps://api.trigger.dev/custom-prefix/\u200D ` (zero-width-joiner wrappers are rejected)
675676- ❌ ` https://api.trigger.dev?foo=bar `
676677- ❌ ` https://api.trigger.dev#fragment `
677678- ❌ ` https://user:pass@api.trigger.dev `
Original file line number Diff line number Diff line change @@ -179,6 +179,7 @@ Examples:
179179- ❌ ` \u2060https://api.trigger.dev/custom-prefix/\u2060 ` (word-joiner wrappers are rejected)
180180- ❌ ` \u200Bhttps://api.trigger.dev/custom-prefix/\u200B ` (zero-width-space wrappers are rejected)
181181- ❌ ` \u200Chttps://api.trigger.dev/custom-prefix/\u200C ` (zero-width-non-joiner wrappers are rejected)
182+ - ❌ ` \u200Dhttps://api.trigger.dev/custom-prefix/\u200D ` (zero-width-joiner wrappers are rejected)
182183- ❌ ` https://api.trigger.dev?foo=bar ` (query string)
183184- ❌ ` https://api.trigger.dev#fragment ` (hash fragment)
184185- ❌ ` https://user:pass@api.trigger.dev ` (credentials)
Original file line number Diff line number Diff line change @@ -863,6 +863,17 @@ describe("TriggerChatTransport", function () {
863863 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
864864 } ) ;
865865
866+ it ( "throws when baseURL is wrapped with zero-width-joiner characters" , function ( ) {
867+ expect ( function ( ) {
868+ new TriggerChatTransport ( {
869+ task : "chat-task" ,
870+ accessToken : "pk_trigger" ,
871+ baseURL : "\u200Dhttps://api.trigger.dev/custom-prefix/\u200D" ,
872+ stream : "chat-stream" ,
873+ } ) ;
874+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
875+ } ) ;
876+
866877 it ( "throws when baseURL contains internal zero-width-non-joiner characters" , function ( ) {
867878 expect ( function ( ) {
868879 new TriggerChatTransport ( {
@@ -3668,6 +3679,17 @@ describe("TriggerChatTransport", function () {
36683679 } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
36693680 } ) ;
36703681
3682+ it ( "throws from factory when baseURL is wrapped with zero-width-joiner characters" , function ( ) {
3683+ expect ( function ( ) {
3684+ createTriggerChatTransport ( {
3685+ task : "chat-task" ,
3686+ accessToken : "pk_trigger" ,
3687+ baseURL : "\u200Dhttps://api.trigger.dev/custom-prefix/\u200D" ,
3688+ stream : "chat-stream" ,
3689+ } ) ;
3690+ } ) . toThrowError ( "baseURL must not contain internal whitespace characters" ) ;
3691+ } ) ;
3692+
36713693 it ( "throws from factory when baseURL contains internal zero-width-non-joiner characters" , function ( ) {
36723694 expect ( function ( ) {
36733695 createTriggerChatTransport ( {
You can’t perform that action at this time.
0 commit comments