npm packaging and gitea publishing
Docker / build (push) Failing after 4m11s

This commit is contained in:
2025-12-15 23:02:51 -08:00
parent a92e575c48
commit 8c5ef76367
9 changed files with 39 additions and 122 deletions
+2 -1
View File
@@ -31,8 +31,9 @@ export default class SugoiAuthProvider implements AuthProvider {
#token: Token
clientId: string;
constructor(client_id: string) {
constructor(client_id: string, proxy_origin = import.meta.url) {
this.clientId = client_id
TwitchAuth.setProxyOrigin(proxy_origin)
}
#setToken = (token: Token) => {
+9 -1
View File
@@ -22,7 +22,15 @@ export interface AuthCode {
}
const redirect_uri = location.origin + location.pathname
const proxy_uri = new URL('/oauth2/token', import.meta.url)
let proxy_uri = new URL('/oauth2/token', import.meta.url)
/**
* Changes the origin used for proxying oauth requests
* Required when using this as an npm module
*/
export function setProxyOrigin(proxy_origin: string) {
proxy_uri = new URL('/oauth2/token', proxy_origin)
}
/**
* Timestamp and return the token
+2
View File
@@ -0,0 +1,2 @@
export * as SugoiAuth from './SugoiAuthProvider'
export * as WebStorage from './WebStorage'
+4 -1
View File
@@ -4,6 +4,9 @@
"module": "es2020",
"moduleResolution": "node",
"allowImportingTsExtensions": true,
"noEmit": true,
"emitDeclarationOnly": true,
"declaration": true,
"declarationMap": true,
"declarationDir": "../static"
}
}