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 @@ -667,6 +667,7 @@ Examples:
667667- ✅ ` https://api.trigger.dev/custom-prefix `
668668- ✅ ` https://api.trigger.dev/custom-prefix/// ` (trimmed + normalized)
669669- ✅ ` https://api.trigger.dev/custom%20prefix ` (percent-encoded whitespace)
670+ - ✅ ` https://api.trigger.dev/custom%3Fprefix%23segment ` (percent-encoded ` ? ` / ` # ` )
670671- ❌ ` https://api.trigger.dev?foo=bar `
671672- ❌ ` https://api.trigger.dev#fragment `
672673- ❌ ` https://user:pass@api.trigger.dev `
Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ Examples:
174174- ✅ ` https://api.trigger.dev/custom-prefix `
175175- ✅ ` https://api.trigger.dev/custom-prefix/// ` (trimmed + normalized)
176176- ✅ ` https://api.trigger.dev/custom%20prefix ` (percent-encoded whitespace)
177+ - ✅ ` https://api.trigger.dev/custom%3Fprefix%23segment ` (percent-encoded ` ? ` / ` # ` )
177178- ❌ ` https://api.trigger.dev?foo=bar ` (query string)
178179- ❌ ` https://api.trigger.dev#fragment ` (hash fragment)
179180- ❌ ` https://user:pass@api.trigger.dev ` (credentials)
Original file line number Diff line number Diff line change @@ -984,6 +984,17 @@ describe("TriggerChatTransport", function () {
984984 } ) . not . toThrow ( ) ;
985985 } ) ;
986986
987+ it ( "accepts percent-encoded query and hash markers in baseURL paths" , function ( ) {
988+ expect ( function ( ) {
989+ new TriggerChatTransport ( {
990+ task : "chat-task" ,
991+ accessToken : "pk_trigger" ,
992+ baseURL : "https://api.trigger.dev/custom%3Fprefix%23segment" ,
993+ stream : "chat-stream" ,
994+ } ) ;
995+ } ) . not . toThrow ( ) ;
996+ } ) ;
997+
987998 it ( "accepts whitespace-wrapped uppercase http protocol in baseURL" , function ( ) {
988999 expect ( function ( ) {
9891000 new TriggerChatTransport ( {
@@ -3547,6 +3558,17 @@ describe("TriggerChatTransport", function () {
35473558 } ) . not . toThrow ( ) ;
35483559 } ) ;
35493560
3561+ it ( "accepts percent-encoded query and hash markers in baseURL paths from factory" , function ( ) {
3562+ expect ( function ( ) {
3563+ createTriggerChatTransport ( {
3564+ task : "chat-task" ,
3565+ accessToken : "pk_trigger" ,
3566+ baseURL : "https://api.trigger.dev/custom%3Fprefix%23segment" ,
3567+ stream : "chat-stream" ,
3568+ } ) ;
3569+ } ) . not . toThrow ( ) ;
3570+ } ) ;
3571+
35503572 it ( "accepts uppercase http protocol from factory without throwing" , function ( ) {
35513573 expect ( function ( ) {
35523574 createTriggerChatTransport ( {
You can’t perform that action at this time.
0 commit comments