fix: bun format

This commit is contained in:
Daniel 2026-03-21 16:56:05 -05:00
parent c40cd952a2
commit 6728b17efe
11 changed files with 8523 additions and 168 deletions

View file

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

View file

@ -1,14 +1,18 @@
### Description ### Description
### Type of Change ### Type of Change
- [ ] Bug fix - [ ] Bug fix
- [ ] New feature - [ ] New feature
- [ ] Style/UI update - [ ] Style/UI update
- [ ] Docs only - [ ] Docs only
### Checklist ### Checklist
- [ ] **I have read the [Contributing Guidelines](https://github.com/monochrome-music/monochrome/blob/main/CONTRIBUTING.md).** - [ ] **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 understand every line of code I am submitting.**
- [ ] I have tested these changes locally, and they work as expected. - [ ] 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 name: Desktop Build
on: on:
push: push:
branches: [main, neutralino] branches: [main, neutralino]
workflow_dispatch: workflow_dispatch:
permissions: permissions:
contents: write contents: write
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- os: windows-latest - os: windows-latest
platform: windows platform: windows
binary_source: Monochrome-win_x64.exe binary_source: Monochrome-win_x64.exe
binary_dest: Monochrome.exe binary_dest: Monochrome.exe
archive_name: monochrome-windows.zip archive_name: monochrome-windows.zip
- os: ubuntu-latest - os: ubuntu-latest
platform: linux platform: linux
binary_source: Monochrome-linux_x64 binary_source: Monochrome-linux_x64
binary_dest: Monochrome binary_dest: Monochrome
archive_name: monochrome-linux.zip archive_name: monochrome-linux.zip
- os: macos-latest - os: macos-latest
platform: macos platform: macos
binary_source: Monochrome-mac_universal binary_source: Monochrome-mac_universal
binary_dest: Monochrome binary_dest: Monochrome
archive_name: monochrome-mac.zip archive_name: monochrome-mac.zip
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 1 fetch-depth: 1
- name: Setup Bun - name: Setup Bun
uses: oven-sh/setup-bun@v2 uses: oven-sh/setup-bun@v2
with: with:
bun-version: latest bun-version: latest
- name: Install dependencies - name: Install dependencies
run: bun install run: bun install
- name: Download Neutralino binaries - name: Download Neutralino binaries
run: bun x neu update run: bun x neu update
- name: Auto-Bump Version - name: Auto-Bump Version
run: | run: |
$json = Get-Content neutralino.config.json -Raw | ConvertFrom-Json $json = Get-Content neutralino.config.json -Raw | ConvertFrom-Json
$v = $json.version.Split('.') $v = $json.version.Split('.')
if ($v.Count -lt 2) { $v += "0" } if ($v.Count -lt 2) { $v += "0" }
$newVersion = "{0}.{1}.{2}" -f $v[0], $v[1], ${{ github.run_number }} $newVersion = "{0}.{1}.{2}" -f $v[0], $v[1], ${{ github.run_number }}
$json.version = $newVersion $json.version = $newVersion
$json | ConvertTo-Json -Depth 5 | Set-Content neutralino.config.json $json | ConvertTo-Json -Depth 5 | Set-Content neutralino.config.json
shell: pwsh shell: pwsh
- name: Build application - name: Build application
run: bun run build run: bun run build
- name: Prepare Release Folder - name: Prepare Release Folder
run: | run: |
mkdir release mkdir release
cp dist/Monochrome/resources.neu release/ cp dist/Monochrome/resources.neu release/
cp neutralino.config.json release/ cp neutralino.config.json release/
cp -r dist/Monochrome/extensions release/ cp -r dist/Monochrome/extensions release/
cp dist/Monochrome/${{ matrix.binary_source }} release/${{ matrix.binary_dest }} cp dist/Monochrome/${{ matrix.binary_source }} release/${{ matrix.binary_dest }}
shell: bash shell: bash
- name: Set Permissions (Linux/macOS) - name: Set Permissions (Linux/macOS)
if: matrix.platform != 'windows' if: matrix.platform != 'windows'
run: chmod +x release/${{ matrix.binary_dest }} run: chmod +x release/${{ matrix.binary_dest }}
- name: Zip for R2 (Windows) - name: Zip for R2 (Windows)
if: matrix.platform == 'windows' if: matrix.platform == 'windows'
run: Compress-Archive -Path release/* -DestinationPath ${{ matrix.archive_name }} -Force run: Compress-Archive -Path release/* -DestinationPath ${{ matrix.archive_name }} -Force
shell: pwsh shell: pwsh
- name: Zip for R2 (Linux/macOS) - name: Zip for R2 (Linux/macOS)
if: matrix.platform != 'windows' if: matrix.platform != 'windows'
run: | run: |
cd release cd release
zip -r ../${{ matrix.archive_name }} . zip -r ../${{ matrix.archive_name }} .
shell: bash shell: bash
- name: Isolate Zip File - name: Isolate Zip File
run: | run: |
mkdir out_delivery mkdir out_delivery
mv ${{ matrix.archive_name }} out_delivery/ mv ${{ matrix.archive_name }} out_delivery/
shell: bash shell: bash
- name: Generate Update Manifest - name: Generate Update Manifest
run: | run: |
$config = Get-Content neutralino.config.json | ConvertFrom-Json $config = Get-Content neutralino.config.json | ConvertFrom-Json
$version = $config.version $version = $config.version
$platform = "${{ matrix.platform }}" $platform = "${{ matrix.platform }}"
$archive = "${{ matrix.archive_name }}" $archive = "${{ matrix.archive_name }}"
$json = @{ $json = @{
version = $version version = $version
url = "https://downloads.samidy.com/out_delivery/$archive" url = "https://downloads.samidy.com/out_delivery/$archive"
notes = "Update $version is available." notes = "Update $version is available."
} }
$json | ConvertTo-Json | Set-Content "out_delivery/update-$platform.json" $json | ConvertTo-Json | Set-Content "out_delivery/update-$platform.json"
shell: pwsh shell: pwsh
- name: Upload to R2 - name: Upload to R2
uses: ryand56/r2-upload-action@latest uses: ryand56/r2-upload-action@latest
with: with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
r2-bucket: ${{ secrets.R2_BUCKET }} r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: 'out_delivery' source-dir: 'out_delivery'
destination-dir: 'out_delivery' destination-dir: 'out_delivery'
- name: Upload Artifact (GH Internal) - name: Upload Artifact (GH Internal)
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Monochrome-${{ matrix.platform }} name: Monochrome-${{ matrix.platform }}
path: release/ path: release/
retention-days: 30 retention-days: 30

View file

@ -1,43 +1,43 @@
name: Update Lock File name: Update Lock File
on: on:
workflow_dispatch: workflow_dispatch:
permissions: permissions:
contents: write contents: write
jobs: jobs:
update-lock: update-lock:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 1 fetch-depth: 1
- name: Configure Git - name: Configure Git
uses: DanTheMan827/config-git-user-action@v1 uses: DanTheMan827/config-git-user-action@v1
- name: Setup Bun - name: Setup Bun
uses: oven-sh/setup-bun@v1 uses: oven-sh/setup-bun@v1
with: with:
bun-version: latest bun-version: latest
- name: Cache dependencies - name: Cache dependencies
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: | path: |
./bun_modules ./bun_modules
./node_modules ./node_modules
./bun.lock ./bun.lock
key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }} key: ${{ runner.os }}-bun-${{ hashFiles('bun.lock') }}
- name: Install dependencies - name: Install dependencies
run: bun install run: bun install
- name: Commit changes - name: Commit changes
run: | run: |
git add -A . || true git add -A . || true
git commit "update lockfile" || true git commit "update lockfile" || true
git push || 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: These instances provide the tidal-ui web interface, not monochrome:
| Provider | URL | Status | | Provider | URL | Status |
| ------------------- | ---------------------------------------------- | --------- | | ------------- | ------------------------------------------- | --------- |
| **squid.wtf** | [tidal.squid.wtf](https://tidal.squid.wtf) | Community | | **squid.wtf** | [tidal.squid.wtf](https://tidal.squid.wtf) | Community |
| **QQDL** | [tidal.qqdl.site](https://tidal.qqdl.site/) | 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 ### Official & Community APIs
| Provider | URL | Notes | | Provider | URL | Notes |
| ----------------- | ----------------------------------- | ---------------- | | ----------------- | ----------------------------------- | ----------------------------------------------------------------------- |
| **Monochrome** | `https://monochrome-api.samidy.com` | Official API | | **Monochrome** | `https://monochrome-api.samidy.com` | Official API |
| | `https://api.monochrome.tf` | Official API | | | `https://api.monochrome.tf` | Official API |
| | `https://arran.monochrome.tf` | Official API | | | `https://arran.monochrome.tf` | Official API |
| **squid.wtf** | `https://triton.squid.wtf` | Community hosted | | **squid.wtf** | `https://triton.squid.wtf` | Community hosted |
| **Lucida (QQDL)** | `https://wolf.qqdl.site` | Community hosted | | **Lucida (QQDL)** | `https://wolf.qqdl.site` | Community hosted |
| | `https://maus.qqdl.site` | Community hosted | | | `https://maus.qqdl.site` | Community hosted |
| | `https://vogel.qqdl.site` | Community hosted | | | `https://vogel.qqdl.site` | Community hosted |
| | `https://katze.qqdl.site` | Community hosted | | | `https://katze.qqdl.site` | Community hosted |
| | `https://hund.qqdl.site` | Community hosted | | | `https://hund.qqdl.site` | Community hosted |
| **Kinoplus** | `https://tidal.kinoplus.online` | Community hosted - [Limited/No-Sub](https://rentry.co/limitedtidalaccs) | | **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)** **[monochrome.tf](https://monochrome.tf)** / **[monochrome.samidy.com](https://monochrome.samidy.com)**
For alternative instances, check [INSTANCES.md](INSTANCES.md). 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" /> <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=monochrome-music/monochrome&type=date&logscale&legend=top-left" />
</picture> </picture>
</a> </a>

View file

@ -5,7 +5,8 @@ import { authManager } from './auth.js';
const PUBLIC_COLLECTION = 'public_playlists'; const PUBLIC_COLLECTION = 'public_playlists';
const DEFAULT_POCKETBASE_URL = 'https://data.samidy.xyz'; 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); console.log('[PocketBase] Using URL:', POCKETBASE_URL);

View file

@ -33,7 +33,10 @@ function trackHasAsianText(track) {
function cleanTrackerSearch(text) { function cleanTrackerSearch(text) {
if (!text) return ''; if (!text) return '';
// chud emojis will NOT be tolerated in my precious genius lyrics worker // 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(/[\u2600-\u27BF\u2B50\u2B06\u2194\u21AA\u2934\u203C\u2049\u3030\u303D\u3297\u3299]/g, '');

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 mime from 'mime';
import { createHash } from 'crypto'; import { createHash } from 'crypto';
function hashString(input: string, algorithm = "sha256"): string { function hashString(input: string, algorithm = 'sha256'): string {
return createHash(algorithm) return createHash(algorithm)
.update(input, "utf8") // specify string encoding .update(input, 'utf8') // specify string encoding
.digest("hex"); // return as hex .digest('hex'); // return as hex
} }
/** /**