Change package manager to bun and etc
- give scripts their own folder - use bun as a package manager over pnpm - fix some errors in multi-scrobbler
This commit is contained in:
parent
7c810e127b
commit
c46b6a165f
10 changed files with 1609 additions and 232 deletions
24
.github/workflows/deploy.yml
vendored
24
.github/workflows/deploy.yml
vendored
|
|
@ -11,25 +11,19 @@ jobs:
|
|||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Prepare environment
|
||||
uses: actions/setup-node@v3
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
node-version: "18"
|
||||
bun-version: "latest"
|
||||
|
||||
- run: npm install --global pnpm
|
||||
|
||||
- name: Install deps
|
||||
run: pnpm m i
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Build plugin(s)
|
||||
run: node ./build.mjs
|
||||
run: bun run ./build.mjs
|
||||
|
||||
# Foolproof feature:
|
||||
# - Copies over README so that the root of the deployed website shows it
|
||||
# - Changes 404 page to README so that you don't get lost while clicking links
|
||||
# If you remove this step then you should probably remove the enable_jekyll option in the next one
|
||||
- name: Copy additional files
|
||||
run: |
|
||||
cp README.md dist/README.md
|
||||
|
|
@ -37,13 +31,9 @@ jobs:
|
|||
printf -- "> **Note:** You accessed a link that returned a 404, probably by clicking one of the plugin links. You're supposed to copy the link address and add it into Vendetta.\n\n" >> dist/404.md
|
||||
cat README.md >> dist/404.md
|
||||
|
||||
# Documentation: https://github.com/peaceiris/actions-gh-pages
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./dist
|
||||
# Makes it so the md files in the previous step get processed by GitHub Pages
|
||||
enable_jekyll: true
|
||||
# This creates the CNAME file required to host GitHub Pages on a custom domain
|
||||
# cname: example.com
|
||||
|
|
|
|||
35
package.json
35
package.json
|
|
@ -1,25 +1,25 @@
|
|||
{
|
||||
"scripts": {
|
||||
"build": "node build.mjs",
|
||||
"watch": "node build.mjs -w",
|
||||
"build": "node scripts/build.mjs",
|
||||
"watch": "node scripts/build.mjs -w",
|
||||
"lint": "eslint plugins",
|
||||
"make": "node make.mjs",
|
||||
"serve": "node serve.mjs"
|
||||
"serve": "node scripts/serve.mjs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-commonjs": "^28.0.6",
|
||||
"@rollup/plugin-node-resolve": "^16.0.2",
|
||||
"@swc/core": "^1.13.5",
|
||||
"@types/react": "^18.0.37",
|
||||
"@rollup/plugin-commonjs": "^29.0.0",
|
||||
"@rollup/plugin-node-resolve": "^16.0.3",
|
||||
"@swc/core": "^1.15.1",
|
||||
"@types/react": "^19.2.2",
|
||||
"@types/react-native": "^0.70.13",
|
||||
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
||||
"@typescript-eslint/parser": "^8.45.0",
|
||||
"esbuild": "^0.25.10",
|
||||
"eslint": "^9.37.0",
|
||||
"eslint-plugin-react": "^7.32.2",
|
||||
"rollup": "^4.24.4",
|
||||
"rollup-plugin-esbuild": "^6.1.1",
|
||||
"typescript": "^5.7.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
||||
"@typescript-eslint/parser": "^8.46.4",
|
||||
"esbuild": "^0.27.0",
|
||||
"eslint": "^9.39.1",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"rollup": "^4.53.2",
|
||||
"rollup-plugin-esbuild": "^6.2.1",
|
||||
"typescript": "^5.9.3",
|
||||
"vendetta-types": "^2.4.21"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
@ -27,6 +27,7 @@
|
|||
"serve": "^14.2.5"
|
||||
},
|
||||
"overrides": {
|
||||
"@types/react": "^18.0.37"
|
||||
}
|
||||
"@types/react": "^19.2.2"
|
||||
},
|
||||
"packageManager": "bun@1.3.2"
|
||||
}
|
||||
|
|
|
|||
24
plugins/defs.d.ts
vendored
24
plugins/defs.d.ts
vendored
|
|
@ -30,21 +30,25 @@ export type ActivityAssets = {
|
|||
export type ServiceType = "lastfm" | "librefm" | "listenbrainz";
|
||||
|
||||
export type LFMSettings = {
|
||||
appName: string;
|
||||
username: string;
|
||||
apiKey: string;
|
||||
showTimestamp: boolean;
|
||||
timeInterval: number | string;
|
||||
listeningTo: boolean;
|
||||
ignoreSpotify: boolean;
|
||||
ignoreYouTubeMusic: boolean;
|
||||
verboseLogging: boolean;
|
||||
service: ServiceType | undefined;
|
||||
// Service-specific settings
|
||||
librefmUsername?: string;
|
||||
librefmApiKey?: string;
|
||||
listenbrainzUsername?: string;
|
||||
listenbrainzToken?: string;
|
||||
appName: string;
|
||||
username: string;
|
||||
apiKey: string;
|
||||
// Display settings
|
||||
showTimestamp: boolean;
|
||||
timeInterval: number | string;
|
||||
listeningTo: boolean;
|
||||
ignoreSpotify: boolean;
|
||||
showLargeText: boolean;
|
||||
ignoreYouTubeMusic: boolean;
|
||||
// Verbose logging settings
|
||||
verboseLogging: boolean;
|
||||
// Main page
|
||||
service: ServiceType | undefined;
|
||||
};
|
||||
|
||||
export type Track = {
|
||||
|
|
|
|||
|
|
@ -10,8 +10,12 @@ import Settings from "./ui/pages/Settings";
|
|||
|
||||
const { FormSection, FormRow } = Forms;
|
||||
const { TableRowIcon } = findByProps("TableRowIcon");
|
||||
|
||||
const bunny = window.bunny;
|
||||
declare global {
|
||||
interface Window {
|
||||
bunny: any;
|
||||
}
|
||||
}
|
||||
|
||||
const tabsNavigationRef = bunny?.metro?.findByPropsLazy("getRootNavigationRef");
|
||||
const settingConstants = bunny?.metro?.findByPropsLazy(
|
||||
|
|
@ -141,8 +145,8 @@ function patchTabsUI(tabs, patches) {
|
|||
|
||||
patches.push(
|
||||
after("default", SettingsOverviewScreen, (args, ret) => {
|
||||
if (!args[0][firstRender]) {
|
||||
args[0][firstRender] = true;
|
||||
if (!(args[0] as { [key: symbol]: boolean })[firstRender]) {
|
||||
(args[0] as { [key: symbol]: boolean })[firstRender] = true;
|
||||
|
||||
const { sections } = findInReactTree(
|
||||
ret,
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export function setDebugInfo(
|
|||
key: keyof typeof debugInfo,
|
||||
value: (typeof debugInfo)[typeof key],
|
||||
) {
|
||||
debugInfo[key] = value;
|
||||
(debugInfo[key] as any) = value;
|
||||
|
||||
// log the important stuff
|
||||
if (key === "lastError" && value) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue