-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): expose service url getter on AtpAgent class
- Loading branch information
1 parent
42101f2
commit 918774c
Showing
8 changed files
with
51 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export * from './atp-dispatcher' | ||
export * from './service-dispatcher' | ||
export * from './session-dispatcher' | ||
export * from './stateless-dispatcher' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { AtpDispatcher } from './atp-dispatcher' | ||
|
||
export type StatelessDispatcherOptions = { | ||
service: string | URL | ||
headers?: { [_ in string]?: null | string } | ||
} | ||
|
||
export class StatelessDispatcher extends AtpDispatcher { | ||
getServiceUrl: () => URL | PromiseLike<URL> | ||
|
||
constructor({ service, headers }: StatelessDispatcherOptions) { | ||
super({ service, headers }) | ||
this.getServiceUrl = () => new URL(service) | ||
} | ||
|
||
async getRepo(): Promise<string> { | ||
throw new Error('Not logged in') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters