-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3.1.0 Emote management & Bug fixes (#1042)
Co-authored-by: Troy Benson <[email protected]> Co-authored-by: Lennart <[email protected]> Co-authored-by: Philip <[email protected]> Co-authored-by: pimothyxd <[email protected]> Co-authored-by: Adam Irlik <[email protected]> Co-authored-by: loczek <[email protected]> Co-authored-by: John Friend <[email protected]> Co-authored-by: John <[email protected]> Co-authored-by: Junsu Park <[email protected]> Co-authored-by: ByteZ1337 <[email protected]> Co-authored-by: Nikolai Ammosov <[email protected]>
- Loading branch information
1 parent
a98e365
commit 51549be
Showing
101 changed files
with
3,601 additions
and
643 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Jobs | ||
|
||
## Build job (`ci`) | ||
|
||
- Builds the chrome extension with `yarn build:prod` and firefox extension with `[email protected] MV2=true yarn build:prod` | ||
- Both builds get zipped | ||
- For chrome: Create CRX from zip with action `cardinalby/webext-buildtools-chrome-crx-action@v2` and private key `secrets.WEB_EXTENSION_CRX` | ||
- For Firefox: Create XPI from zip with action `kewisch/action-web-ext@v1` | ||
- CRX and XPI files uploaded as artifact `installable` | ||
- Chrome zip and Firefox zip uploaded as artifact `build` | ||
- Both manifest jsons uploaded as artifact `manifest` | ||
|
||
## Release job (`release`) | ||
|
||
- Creates Github releases and tags | ||
|
||
## Side loading deploy job (`deploy`) | ||
|
||
- Builds with `yarn build-hosted:prod` | ||
- Uploads to Cloudflare R2 with action `shallwefootball/s3-upload-action@master` | ||
- Endpoint: `secrets.R2_API_ENDPOINT` | ||
- Access Key: `secrets.R2_API_AK` | ||
- Secret Key: `secrets.R2_API_SECRET` | ||
- Bucket: `7tv-extension` | ||
|
||
## Push job (`push`) | ||
|
||
- Upload zip file (not crx) to chrome web store (cws) with npm package `chrome-webstore-upload-cli` | ||
- Extension id: `ammjkodgmmoknidbanneddgankgfejfh` | ||
- Client id, client secret, refresh token in `secrets.CWS` | ||
- Sign XPI file with action `kewisch/action-web-ext@v1` | ||
- API key: `secrets.AMO_API_KEY` | ||
- API secret: `secrets.AMO_API_SECRET` | ||
- upload signed XPI as artifact `installable` | ||
- Update Github release |
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
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,13 +1,32 @@ | ||
import { ApolloClient, InMemoryCache, createHttpLink } from "@apollo/client/core"; | ||
import { decodeJWT } from "@/common/Jwt"; | ||
import { useConfig } from "@/composable/useSettings"; | ||
import { ApolloClient, ApolloLink, InMemoryCache, createHttpLink } from "@apollo/client/core"; | ||
|
||
export const httpLink = createHttpLink({ | ||
uri: import.meta.env.VITE_APP_API_GQL, | ||
credentials: "include", | ||
}); | ||
|
||
const token = useConfig<string>("app.7tv.token"); | ||
const authLink = new ApolloLink((op, next) => { | ||
const jwt = decodeJWT(token.value); | ||
if (!jwt || jwt.exp * 1000 < Date.now()) { | ||
token.value = ""; | ||
return next(op); | ||
} | ||
op.setContext({ | ||
headers: { | ||
Authorization: `Bearer ${token.value}`, | ||
}, | ||
}); | ||
return next(op); | ||
}); | ||
|
||
const link = ApolloLink.from([authLink, httpLink]); | ||
|
||
const cache = new InMemoryCache(); | ||
|
||
export const apolloClient = new ApolloClient({ | ||
link: httpLink, | ||
link, | ||
cache, | ||
}); |
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
Oops, something went wrong.