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
+11 -1
View File
@@ -33,7 +33,17 @@ jobs:
uses: actions/checkout@v4
- name: Install Worker Dependencies
run: npm install
run: npm ci
- run: npm run deploy
- run: npm pack
- run: mv twitch-cloud-ebs*tgz twitch-cloud-ebs.tgz
- run: git log $(git describe --tags --abbrev=0 HEAD~1)..HEAD --oneline > changelog.txt
- uses: softprops/action-gh-release@v2
with:
make_latest: true
body_path: changelog.txt
files: '*.tgz'
- name: Compile Worker
run: npx selflare compile
+3 -1
View File
@@ -175,4 +175,6 @@ Dockerfile
# typescript output
static/*.js
static/*.js.map
static/*.js.map
static/*.d.ts
static/*.d.ts.map
+1 -114
View File
@@ -11,7 +11,7 @@
"@sugoidogo/selflare": "^1.1.3",
"@twurple/auth": "^7.4.0",
"fetch-retry": "^6.0.0",
"typescript": "^5.5.2",
"typescript": "^5.9.3",
"wrangler": "^4.43.0"
}
},
@@ -44,96 +44,6 @@
}
}
},
"node_modules/@cloudflare/workerd-darwin-64": {
"version": "1.20251024.0",
"resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20251024.0.tgz",
"integrity": "sha512-WOB1y6XFfUbGCaWz+EcSvdU+tm0I3enIt1+jsQNovddWSO903nmHQcaX1xLmQK8NmZz1/hodCCZkOQgb08/uGA==",
"cpu": [
"x64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"darwin"
],
"peer": true,
"engines": {
"node": ">=16"
}
},
"node_modules/@cloudflare/workerd-darwin-arm64": {
"version": "1.20251024.0",
"resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20251024.0.tgz",
"integrity": "sha512-vHhFUQf42pwOVg05L9uNBcNKoE9ZUNkbfDjC6J0brQqEgm32udyn/1dDR3tt6HajXijVYHmY5u/ir1+Y5r+ZjQ==",
"cpu": [
"arm64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"darwin"
],
"peer": true,
"engines": {
"node": ">=16"
}
},
"node_modules/@cloudflare/workerd-linux-64": {
"version": "1.20251024.0",
"resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20251024.0.tgz",
"integrity": "sha512-SA62TYclyApShlckJotmm+mgekTKd04Nkh5HYuYhW0yBiugN3HbQBIPPCYxC/oc4tPMwpocCqwk+uP8p8hWDog==",
"cpu": [
"x64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"peer": true,
"engines": {
"node": ">=16"
}
},
"node_modules/@cloudflare/workerd-linux-arm64": {
"version": "1.20251024.0",
"resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20251024.0.tgz",
"integrity": "sha512-7oLQ04m3n/3BEI+BLc6cOkg6+fbtAFZht1ieTi9IJ8b7rcE6o7Pf+Nz5Mg3kEAIbnT94cHwgTLXgB9oh21ssRQ==",
"cpu": [
"arm64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
],
"peer": true,
"engines": {
"node": ">=16"
}
},
"node_modules/@cloudflare/workerd-windows-64": {
"version": "1.20251024.0",
"resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20251024.0.tgz",
"integrity": "sha512-H0CeOA1NgLSuNrxBufObczGjl7xoXZvFlAOCHmSRyluZ6jSdm8Tb3FjPyMPLPyOF2jAeoKBTS6xzEK3Nmkq7sA==",
"cpu": [
"x64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"win32"
],
"peer": true,
"engines": {
"node": ">=16"
}
},
"node_modules/@cspotcode/source-map-support": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz",
@@ -2750,29 +2660,6 @@
"webidl-conversions": "^3.0.0"
}
},
"node_modules/workerd": {
"version": "1.20251024.0",
"resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20251024.0.tgz",
"integrity": "sha512-OfGf6pZEtE4syaHBA0Mmt2cLp8TRIoeV3XJufvrw3bC9l3STIwuTdrH5zT+K8r2hS/CBjNnCnmpj3YIPSN7T9A==",
"dev": true,
"hasInstallScript": true,
"license": "Apache-2.0",
"optional": true,
"peer": true,
"bin": {
"workerd": "bin/workerd"
},
"engines": {
"node": ">=16"
},
"optionalDependencies": {
"@cloudflare/workerd-darwin-64": "1.20251024.0",
"@cloudflare/workerd-darwin-arm64": "1.20251024.0",
"@cloudflare/workerd-linux-64": "1.20251024.0",
"@cloudflare/workerd-linux-arm64": "1.20251024.0",
"@cloudflare/workerd-windows-64": "1.20251024.0"
}
},
"node_modules/wrangler": {
"version": "4.45.0",
"resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.45.0.tgz",
+6 -2
View File
@@ -1,7 +1,11 @@
{
"name": "twitch-cloud-ebs",
"version": "0.0.0",
"private": true,
"files": [
"static",
"static_src"
],
"main": "static/index.js",
"scripts": {
"deploy": "wrangler deploy",
"dev": "wrangler dev",
@@ -11,7 +15,7 @@
"@sugoidogo/selflare": "^1.1.3",
"@twurple/auth": "^7.4.0",
"fetch-retry": "^6.0.0",
"typescript": "^5.5.2",
"typescript": "^5.9.3",
"wrangler": "^4.43.0"
}
}
+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"
}
}
+1 -1
View File
@@ -35,6 +35,6 @@
}
],
"build": {
"command": "esbuild static_src/*.ts --outdir=static --bundle --format=esm --minify --sourcemap --target=es2020"
"command": "tsc -p static_src/ && esbuild static_src/*.ts --outdir=static --bundle --format=esm --minify --sourcemap --target=es2020"
}
}