Merge pull request #379 from DanTheMan827/bun-format

fix: bun format
This commit is contained in:
edidealt 2026-03-21 23:57:57 +02:00 committed by GitHub
commit e69c32949b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 8523 additions and 168 deletions

View file

@ -6,7 +6,7 @@
version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
- package-ecosystem: 'devcontainers'
directory: '/'
schedule:
interval: weekly

View file

@ -1,14 +1,18 @@
### Description
### Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Style/UI update
- [ ] Docs only
### Checklist
- [ ] **I have read the [Contributing Guidelines](https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md).**
- [ ] **I understand every line of code I am submitting.**
- [ ] I have tested these changes locally, and they work as expected.
---
*By submitting this PR, I agree to follow the guidelines. I understand that the final decision to merge rests with the maintainers and that not all contributions can be accepted.*
_By submitting this PR, I agree to follow the guidelines. I understand that the final decision to merge rests with the maintainers and that not all contributions can be accepted._

View file

@ -1,125 +1,125 @@
name: Desktop Build
on:
push:
branches: [main, neutralino]
workflow_dispatch:
push:
branches: [main, neutralino]
workflow_dispatch:
permissions:
contents: write
contents: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
platform: windows
binary_source: Monochrome-win_x64.exe
binary_dest: Monochrome.exe
archive_name: monochrome-windows.zip
- os: ubuntu-latest
platform: linux
binary_source: Monochrome-linux_x64
binary_dest: Monochrome
archive_name: monochrome-linux.zip
- os: macos-latest
platform: macos
binary_source: Monochrome-mac_universal
binary_dest: Monochrome
archive_name: monochrome-mac.zip
build:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
platform: windows
binary_source: Monochrome-win_x64.exe
binary_dest: Monochrome.exe
archive_name: monochrome-windows.zip
- os: ubuntu-latest
platform: linux
binary_source: Monochrome-linux_x64
binary_dest: Monochrome
archive_name: monochrome-linux.zip
- os: macos-latest
platform: macos
binary_source: Monochrome-mac_universal
binary_dest: Monochrome
archive_name: monochrome-mac.zip
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install dependencies
run: bun install
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Download Neutralino binaries
run: bun x neu update
- name: Install dependencies
run: bun install
- name: Auto-Bump Version
run: |
$json = Get-Content neutralino.config.json -Raw | ConvertFrom-Json
$v = $json.version.Split('.')
if ($v.Count -lt 2) { $v += "0" }
$newVersion = "{0}.{1}.{2}" -f $v[0], $v[1], ${{ github.run_number }}
$json.version = $newVersion
$json | ConvertTo-Json -Depth 5 | Set-Content neutralino.config.json
shell: pwsh
- name: Download Neutralino binaries
run: bun x neu update
- name: Build application
run: bun run build
- name: Auto-Bump Version
run: |
$json = Get-Content neutralino.config.json -Raw | ConvertFrom-Json
$v = $json.version.Split('.')
if ($v.Count -lt 2) { $v += "0" }
$newVersion = "{0}.{1}.{2}" -f $v[0], $v[1], ${{ github.run_number }}
$json.version = $newVersion
$json | ConvertTo-Json -Depth 5 | Set-Content neutralino.config.json
shell: pwsh
- name: Prepare Release Folder
run: |
mkdir release
cp dist/Monochrome/resources.neu release/
cp neutralino.config.json release/
cp -r dist/Monochrome/extensions release/
cp dist/Monochrome/${{ matrix.binary_source }} release/${{ matrix.binary_dest }}
shell: bash
- name: Build application
run: bun run build
- name: Set Permissions (Linux/macOS)
if: matrix.platform != 'windows'
run: chmod +x release/${{ matrix.binary_dest }}
- name: Prepare Release Folder
run: |
mkdir release
cp dist/Monochrome/resources.neu release/
cp neutralino.config.json release/
cp -r dist/Monochrome/extensions release/
cp dist/Monochrome/${{ matrix.binary_source }} release/${{ matrix.binary_dest }}
shell: bash
- name: Zip for R2 (Windows)
if: matrix.platform == 'windows'
run: Compress-Archive -Path release/* -DestinationPath ${{ matrix.archive_name }} -Force
shell: pwsh
- name: Set Permissions (Linux/macOS)
if: matrix.platform != 'windows'
run: chmod +x release/${{ matrix.binary_dest }}
- name: Zip for R2 (Linux/macOS)
if: matrix.platform != 'windows'
run: |
cd release
zip -r ../${{ matrix.archive_name }} .
shell: bash
- name: Zip for R2 (Windows)
if: matrix.platform == 'windows'
run: Compress-Archive -Path release/* -DestinationPath ${{ matrix.archive_name }} -Force
shell: pwsh
- name: Isolate Zip File
run: |
mkdir out_delivery
mv ${{ matrix.archive_name }} out_delivery/
shell: bash
- name: Zip for R2 (Linux/macOS)
if: matrix.platform != 'windows'
run: |
cd release
zip -r ../${{ matrix.archive_name }} .
shell: bash
- name: Generate Update Manifest
run: |
$config = Get-Content neutralino.config.json | ConvertFrom-Json
$version = $config.version
$platform = "${{ matrix.platform }}"
$archive = "${{ matrix.archive_name }}"
$json = @{
version = $version
url = "https://downloads.samidy.com/out_delivery/$archive"
notes = "Update $version is available."
}
$json | ConvertTo-Json | Set-Content "out_delivery/update-$platform.json"
shell: pwsh
- name: Isolate Zip File
run: |
mkdir out_delivery
mv ${{ matrix.archive_name }} out_delivery/
shell: bash
- name: Upload to R2
uses: ryand56/r2-upload-action@latest
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: 'out_delivery'
destination-dir: 'out_delivery'
- name: Generate Update Manifest
run: |
$config = Get-Content neutralino.config.json | ConvertFrom-Json
$version = $config.version
$platform = "${{ matrix.platform }}"
$archive = "${{ matrix.archive_name }}"
$json = @{
version = $version
url = "https://downloads.samidy.com/out_delivery/$archive"
notes = "Update $version is available."
}
$json | ConvertTo-Json | Set-Content "out_delivery/update-$platform.json"
shell: pwsh
- name: Upload Artifact (GH Internal)
uses: actions/upload-artifact@v4
with:
name: Monochrome-${{ matrix.platform }}
path: release/
retention-days: 30
- name: Upload to R2
uses: ryand56/r2-upload-action@latest
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: 'out_delivery'
destination-dir: 'out_delivery'
- name: Upload Artifact (GH Internal)
uses: actions/upload-artifact@v4
with:
name: Monochrome-${{ matrix.platform }}
path: release/
retention-days: 30

View file

@ -1,43 +1,43 @@
name: Update Lock File
on:
workflow_dispatch:
workflow_dispatch:
permissions:
contents: write
contents: write
jobs:
update-lock:
runs-on: ubuntu-latest
update-lock:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Configure Git
uses: DanTheMan827/config-git-user-action@v1
- name: Configure Git
uses: DanTheMan827/config-git-user-action@v1
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
./bun_modules
./node_modules
./bun.lock
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
./bun_modules
./node_modules
./bun.lock
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
- name: Install dependencies
run: bun install
- name: Install dependencies
run: bun install
- name: Commit changes
run: |
git add -A . || true
git commit "update lockfile" || true
git push || true
- name: Commit changes
run: |
git add -A . || true
git commit "update lockfile" || true
git push || true

View file

@ -30,10 +30,10 @@ These instances are community instances of Monochrome & its WebUI:
These instances provide the tidal-ui web interface, not monochrome:
| Provider | URL | Status |
| ------------------- | ---------------------------------------------- | --------- |
| **squid.wtf** | [tidal.squid.wtf](https://tidal.squid.wtf) | Community |
| **QQDL** | [tidal.qqdl.site](https://tidal.qqdl.site/) | Community |
| Provider | URL | Status |
| ------------- | ------------------------------------------- | --------- |
| **squid.wtf** | [tidal.squid.wtf](https://tidal.squid.wtf) | Community |
| **QQDL** | [tidal.qqdl.site](https://tidal.qqdl.site/) | Community |
---
@ -48,17 +48,17 @@ These are available API endpoints that can be used with Monochrome or other Hi-F
### Official & Community APIs
| Provider | URL | Notes |
| ----------------- | ----------------------------------- | ---------------- |
| **Monochrome** | `https://monochrome-api.samidy.com` | Official API |
| | `https://api.monochrome.tf` | Official API |
| | `https://arran.monochrome.tf` | Official API |
| **squid.wtf** | `https://triton.squid.wtf` | Community hosted |
| **Lucida (QQDL)** | `https://wolf.qqdl.site` | Community hosted |
| | `https://maus.qqdl.site` | Community hosted |
| | `https://vogel.qqdl.site` | Community hosted |
| | `https://katze.qqdl.site` | Community hosted |
| | `https://hund.qqdl.site` | Community hosted |
| Provider | URL | Notes |
| ----------------- | ----------------------------------- | ----------------------------------------------------------------------- |
| **Monochrome** | `https://monochrome-api.samidy.com` | Official API |
| | `https://api.monochrome.tf` | Official API |
| | `https://arran.monochrome.tf` | Official API |
| **squid.wtf** | `https://triton.squid.wtf` | Community hosted |
| **Lucida (QQDL)** | `https://wolf.qqdl.site` | Community hosted |
| | `https://maus.qqdl.site` | Community hosted |
| | `https://vogel.qqdl.site` | Community hosted |
| | `https://katze.qqdl.site` | Community hosted |
| | `https://hund.qqdl.site` | Community hosted |
| **Kinoplus** | `https://tidal.kinoplus.online` | Community hosted - [Limited/No-Sub](https://rentry.co/limitedtidalaccs) |
---

View file

@ -110,7 +110,6 @@ Our Recommended way to use monochrome is through our official instance:
**[monochrome.tf](https://monochrome.tf)** / **[monochrome.samidy.com](https://monochrome.samidy.com)**
For alternative instances, check [INSTANCES.md](INSTANCES.md).
---
@ -282,4 +281,3 @@ We welcome contributions from the community! Please see our [Contributing Guide]
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=monochrome-music/monochrome&type=date&logscale&legend=top-left" />
</picture>
</a>

View file

@ -13,10 +13,10 @@ export async function onRequest(context) {
const POCKETBASE_URL = 'https://data.samidy.xyz';
const filter = `username="${username}"`;
const profileUrl = `${POCKETBASE_URL}/api/collections/DB_users/records?filter=${encodeURIComponent(filter)}&fields=username,display_name,avatar_url,banner,about,status`;
const response = await fetch(profileUrl);
if (!response.ok) throw new Error(`PocketBase error: ${response.status}`);
const data = await response.json();
const profile = data.items && data.items.length > 0 ? data.items[0] : null;
@ -24,7 +24,7 @@ export async function onRequest(context) {
const displayName = profile.display_name || profile.username;
const title = `${displayName} (@${profile.username})`;
let description = profile.about || `View ${displayName}'s profile on Monochrome.`;
if (profile.status) {
try {
const statusObj = JSON.parse(profile.status);

View file

@ -5,7 +5,8 @@ import { authManager } from './auth.js';
const PUBLIC_COLLECTION = 'public_playlists';
const DEFAULT_POCKETBASE_URL = 'https://data.samidy.xyz';
const POCKETBASE_URL = window.__POCKETBASE_URL__ || localStorage.getItem('monochrome-pocketbase-url') || DEFAULT_POCKETBASE_URL;
const POCKETBASE_URL =
window.__POCKETBASE_URL__ || localStorage.getItem('monochrome-pocketbase-url') || DEFAULT_POCKETBASE_URL;
console.log('[PocketBase] Using URL:', POCKETBASE_URL);

View file

@ -33,14 +33,17 @@ function trackHasAsianText(track) {
function cleanTrackerSearch(text) {
if (!text) return '';
// chud emojis will NOT be tolerated in my precious genius lyrics worker
let cleaned = text.replace(/[\p{Extended_Pictographic}\p{Emoji_Component}\p{Emoji_Presentation}\p{Emoji_Modifier}\p{Emoji_Modifier_Base}\p{Symbol}]/gu, '');
let cleaned = text.replace(
/[\p{Extended_Pictographic}\p{Emoji_Component}\p{Emoji_Presentation}\p{Emoji_Modifier}\p{Emoji_Modifier_Base}\p{Symbol}]/gu,
''
);
cleaned = cleaned.replace(/[\u2600-\u27BF\u2B50\u2B06\u2194\u21AA\u2934\u203C\u2049\u3030\u303D\u3297\u3299]/g, '');
cleaned = cleaned.replace(/\[v\s*\d+\s*\]/gi, '');
cleaned = cleaned.replace(/\s+/g, ' ');
return cleaned.trim();
}

File diff suppressed because one or more lines are too long

View file

@ -5,10 +5,10 @@ import type { Plugin } from 'vite';
import mime from 'mime';
import { createHash } from 'crypto';
function hashString(input: string, algorithm = "sha256"): string {
return createHash(algorithm)
.update(input, "utf8") // specify string encoding
.digest("hex"); // return as hex
function hashString(input: string, algorithm = 'sha256'): string {
return createHash(algorithm)
.update(input, 'utf8') // specify string encoding
.digest('hex'); // return as hex
}
/**