From 5a107bee50ac3a02ce95564d3464fce7de1b144b Mon Sep 17 00:00:00 2001 From: Jerod Date: Sat, 24 Oct 2026 13:07:03 -0700 Subject: [PATCH 1/2] fix(tauri): repair AUR SSH and shared validation --- js/i18n/README.md | 38 +++---- js/i18n/src/viteConfig.ts | 7 +- js/inbound/README.md | 2 +- js/inbound/ReportWizard.svelte | 14 +-- js/updater.ts | 14 +-- packaging/tauri/README.md | 12 +++ packaging/tauri/aur/container-entrypoint.sh | 30 ++---- packaging/tauri/aur/container-publish.sh | 8 +- packaging/tauri/aur/container-ssh.test.sh | 8 ++ packaging/tauri/aur/prepare-home.sh | 34 ++++++ packaging/tauri/aur/publish.sh | 13 ++- packaging/tauri/aur/ssh-home.test.sh | 114 ++++++++++++++++++++ packaging/tauri/test.sh | 8 +- scripts/update-utils-submodules.mjs | 2 +- scripts/update-utils-submodules.test.mjs | 3 +- 15 files changed, 236 insertions(+), 71 deletions(-) create mode 100644 packaging/tauri/aur/container-ssh.test.sh create mode 100644 packaging/tauri/aur/prepare-home.sh create mode 100644 packaging/tauri/aur/ssh-home.test.sh diff --git a/js/i18n/README.md b/js/i18n/README.md index 229b14a..0ce6761 100644 --- a/js/i18n/README.md +++ b/js/i18n/README.md @@ -9,12 +9,12 @@ This package is consumed via pnpm `link:` (always-symlink), no publish: ```jsonc // in your app's package.json { - "dependencies": { - "@synthlabs/i18n": "link:../utils/js/i18n", - }, - "devDependencies": { - "@inlang/paraglide-js": "^2.16.0", - }, + "dependencies": { + "@synthlabs/i18n": "link:../utils/js/i18n" + }, + "devDependencies": { + "@inlang/paraglide-js": "^2.16.0" + } } ``` @@ -26,30 +26,30 @@ The `@inlang/paraglide-js` peerDep belongs to the consuming app - it owns the ge ```ts // vite.config.ts -import { sveltekit } from "@sveltejs/kit/vite"; -import { defineConfig } from "vite"; -import { defineParaglide } from "@synthlabs/i18n"; +import { sveltekit } from '@sveltejs/kit/vite'; +import { defineConfig } from 'vite'; +import { defineParaglide } from '@synthlabs/i18n'; export default defineConfig({ - plugins: [ - sveltekit(), - defineParaglide(), // defaults: project ./project.inlang, outdir ./src/lib/paraglide - ], + plugins: [ + sveltekit(), + defineParaglide() // defaults: project ./project.inlang, outdir ./src/lib/paraglide + ] }); ``` Default strategy is `['localStorage', 'preferredLanguage', 'baseLocale']` - right for desktop apps. Override for static sites with locale-prefixed URLs: ```ts -defineParaglide({ strategy: ["url", "cookie", "baseLocale"] }); +defineParaglide({ strategy: ['url', 'cookie', 'baseLocale'] }); ``` ### OS-locale detection ```ts -import { detectOsLocale } from "@synthlabs/i18n"; +import { detectOsLocale } from '@synthlabs/i18n'; -const locale = detectOsLocale(["en", "ru"], "en"); +const locale = detectOsLocale(['en', 'ru'], 'en'); // "en-US" → "en", "ru-RU" → "ru", "de-DE" → "en" (fallback) ``` @@ -104,9 +104,9 @@ Validates that every `messages/.json` has the same key set as the base l ```jsonc // package.json { - "scripts": { - "check": "svelte-kit sync && svelte-check && i18n-lint ./messages", - }, + "scripts": { + "check": "svelte-kit sync && svelte-check && i18n-lint ./messages" + } } ``` diff --git a/js/i18n/src/viteConfig.ts b/js/i18n/src/viteConfig.ts index 8550922..0d6f2d6 100644 --- a/js/i18n/src/viteConfig.ts +++ b/js/i18n/src/viteConfig.ts @@ -1,12 +1,7 @@ import { paraglideVitePlugin } from '@inlang/paraglide-js'; export type ParaglideStrategy = - | 'cookie' - | 'url' - | 'localStorage' - | 'preferredLanguage' - | 'baseLocale' - | 'globalVariable'; + 'cookie' | 'url' | 'localStorage' | 'preferredLanguage' | 'baseLocale' | 'globalVariable'; export interface DefineParaglideOptions { /** Path to the inlang project. Defaults to `./project.inlang`. */ diff --git a/js/inbound/README.md b/js/inbound/README.md index 07e0676..fa2a892 100644 --- a/js/inbound/README.md +++ b/js/inbound/README.md @@ -5,7 +5,7 @@ opt into custom presentation with `ErrorController` and `connectErrorCapture`. ```ts const errors = new ErrorController({ - log: error => logHandledError(error.message, error.target ?? 'app') + log: (error) => logHandledError(error.message, error.target ?? 'app') }); const unsubscribe = errors.subscribe(render); const stopTimers = errors.start(); diff --git a/js/inbound/ReportWizard.svelte b/js/inbound/ReportWizard.svelte index 276be37..048f5d3 100644 --- a/js/inbound/ReportWizard.svelte +++ b/js/inbound/ReportWizard.svelte @@ -1,5 +1,6 @@