Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Cache apt packages
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: apt-gtk-${{ runner.os }}-${{ hashFiles('.github/workflows/ci.yml') }}
restore-keys: apt-gtk-${{ runner.os }}-

- name: Install GTK development dependencies
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf pkg-config
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf pkg-config

- name: Setup pnpm
uses: pnpm/action-setup@v4
Expand All @@ -36,17 +45,11 @@ jobs:
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Build
run: pnpm exec turbo run build

- name: Lint
run: pnpm exec turbo run lint

- name: Typecheck
run: pnpm exec turbo run typecheck

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-cli-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Install & bundle plugin-runtime
shell: bash
run: |
pnpm install --frozen-lockfile
pnpm install --frozen-lockfile --ignore-scripts
pnpm exec turbo run build --filter=@truenine/memory-sync-cli...
ls -la cli/dist/plugin-runtime.mjs

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-cli-napi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:

- name: Install & Build
run: |
pnpm install --frozen-lockfile
pnpm install --frozen-lockfile --ignore-scripts
pnpm exec turbo run build --filter=@truenine/memory-sync-cli...

- name: Publish to npm
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/release-gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
matrix:
include:
- platform: 'macos-14'
args: ''
args: '--target universal-apple-darwin'
rust_targets: 'aarch64-apple-darwin,x86_64-apple-darwin'
- platform: 'ubuntu-24.04'
args: ''
Expand Down Expand Up @@ -64,6 +64,7 @@ jobs:
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.rust_targets }}

- name: Get Cargo deps hash (exclude root package version for stable cache key)
Expand All @@ -86,14 +87,22 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-

- name: Cache apt packages
if: matrix.platform == 'ubuntu-24.04'
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: apt-gtk-${{ runner.os }}-${{ hashFiles('.github/workflows/release-gui.yml') }}
restore-keys: apt-gtk-${{ runner.os }}-

- name: Install dependencies (ubuntu x86_64)
if: matrix.platform == 'ubuntu-24.04'
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libgtk-3-dev libglib2.0-dev pkg-config libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

- name: Install workspace dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Sync Tauri version from CLI
shell: bash
Expand All @@ -118,7 +127,7 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: gui-${{ matrix.platform }}${{ matrix.args && format('-{0}', matrix.args) || '' }}
name: gui-${{ matrix.platform }}
path: |
gui/src-tauri/target/**/bundle/**/*.dmg
gui/src-tauri/target/**/bundle/**/*.exe
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,17 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Cache apt packages
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: apt-gtk-${{ runner.os }}-${{ hashFiles('.github/workflows/test.yml') }}
restore-keys: apt-gtk-${{ runner.os }}-

- name: Install GTK development dependencies
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf pkg-config
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf pkg-config

- name: Setup pnpm
uses: pnpm/action-setup@v4
Expand All @@ -36,7 +45,7 @@ jobs:
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: pnpm install --frozen-lockfile
run: pnpm install --frozen-lockfile --ignore-scripts

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
Expand All @@ -55,6 +64,9 @@ jobs:
- name: Generate Tauri icons
run: pnpm -F @truenine/memory-sync-gui run generate:icons

- name: Generate route tree
run: pnpm -F @truenine/memory-sync-gui run generate:routes

- name: Run tests
run: pnpm exec turbo run test

Expand Down
2 changes: 0 additions & 2 deletions gui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ Thumbs.db
# TypeScript
*.tsbuildinfo

# TanStack Router (auto-generated route tree)
src/routeTree.gen.ts

# Test
coverage/
Expand Down
2 changes: 2 additions & 0 deletions gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"tauri": "tauri",
"tauri:dev": "tauri dev",
"tauri:build": "tauri build",
"generate:routes": "tsx scripts/generate-routes.ts",
"typecheck": "tsc --noEmit",
"test:ui": "vitest --run",
"test:tauri": "cargo test --manifest-path src-tauri/Cargo.toml",
Expand All @@ -40,6 +41,7 @@
},
"devDependencies": {
"@tailwindcss/vite": "catalog:",
"@tanstack/router-generator": "^1.162.2",
"@tauri-apps/cli": "catalog:",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
Expand Down
16 changes: 16 additions & 0 deletions gui/scripts/generate-routes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env tsx
import { Generator, getConfig } from '@tanstack/router-generator'
import { resolve } from 'node:path'

const root = resolve(import.meta.dirname, '..')

const config = await getConfig({
routesDirectory: resolve(root, 'src/routes'),
generatedRouteTree: resolve(root, 'src/routeTree.gen.ts'),
quoteStyle: 'single',
routeFileIgnorePattern: '.*\.test\.tsx?$|.*\.spec\.tsx?$',
})

const gen = new Generator({ config, root })
await gen.run()
console.log('[generate-routes] routeTree.gen.ts updated')
189 changes: 189 additions & 0 deletions gui/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
/* eslint-disable */

// @ts-nocheck

// noinspection JSUnusedGlobalSymbols

// This file was automatically generated by TanStack Router.
// You should NOT make any changes in this file as it will be overwritten.
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.

import { Route as rootRouteImport } from './routes/__root'
import { Route as SettingsRouteImport } from './routes/settings'
import { Route as PluginsRouteImport } from './routes/plugins'
import { Route as PipelineRouteImport } from './routes/pipeline'
import { Route as LogsRouteImport } from './routes/logs'
import { Route as FilesRouteImport } from './routes/files'
import { Route as ConfigRouteImport } from './routes/config'
import { Route as IndexRouteImport } from './routes/index'

const SettingsRoute = SettingsRouteImport.update({
id: '/settings',
path: '/settings',
getParentRoute: () => rootRouteImport,
} as any)
const PluginsRoute = PluginsRouteImport.update({
id: '/plugins',
path: '/plugins',
getParentRoute: () => rootRouteImport,
} as any)
const PipelineRoute = PipelineRouteImport.update({
id: '/pipeline',
path: '/pipeline',
getParentRoute: () => rootRouteImport,
} as any)
const LogsRoute = LogsRouteImport.update({
id: '/logs',
path: '/logs',
getParentRoute: () => rootRouteImport,
} as any)
const FilesRoute = FilesRouteImport.update({
id: '/files',
path: '/files',
getParentRoute: () => rootRouteImport,
} as any)
const ConfigRoute = ConfigRouteImport.update({
id: '/config',
path: '/config',
getParentRoute: () => rootRouteImport,
} as any)
const IndexRoute = IndexRouteImport.update({
id: '/',
path: '/',
getParentRoute: () => rootRouteImport,
} as any)

export interface FileRoutesByFullPath {
'/': typeof IndexRoute
'/config': typeof ConfigRoute
'/files': typeof FilesRoute
'/logs': typeof LogsRoute
'/pipeline': typeof PipelineRoute
'/plugins': typeof PluginsRoute
'/settings': typeof SettingsRoute
}
export interface FileRoutesByTo {
'/': typeof IndexRoute
'/config': typeof ConfigRoute
'/files': typeof FilesRoute
'/logs': typeof LogsRoute
'/pipeline': typeof PipelineRoute
'/plugins': typeof PluginsRoute
'/settings': typeof SettingsRoute
}
export interface FileRoutesById {
__root__: typeof rootRouteImport
'/': typeof IndexRoute
'/config': typeof ConfigRoute
'/files': typeof FilesRoute
'/logs': typeof LogsRoute
'/pipeline': typeof PipelineRoute
'/plugins': typeof PluginsRoute
'/settings': typeof SettingsRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths:
| '/'
| '/config'
| '/files'
| '/logs'
| '/pipeline'
| '/plugins'
| '/settings'
fileRoutesByTo: FileRoutesByTo
to:
| '/'
| '/config'
| '/files'
| '/logs'
| '/pipeline'
| '/plugins'
| '/settings'
id:
| '__root__'
| '/'
| '/config'
| '/files'
| '/logs'
| '/pipeline'
| '/plugins'
| '/settings'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
IndexRoute: typeof IndexRoute
ConfigRoute: typeof ConfigRoute
FilesRoute: typeof FilesRoute
LogsRoute: typeof LogsRoute
PipelineRoute: typeof PipelineRoute
PluginsRoute: typeof PluginsRoute
SettingsRoute: typeof SettingsRoute
}

declare module '@tanstack/react-router' {
interface FileRoutesByPath {
'/settings': {
id: '/settings'
path: '/settings'
fullPath: '/settings'
preLoaderRoute: typeof SettingsRouteImport
parentRoute: typeof rootRouteImport
}
'/plugins': {
id: '/plugins'
path: '/plugins'
fullPath: '/plugins'
preLoaderRoute: typeof PluginsRouteImport
parentRoute: typeof rootRouteImport
}
'/pipeline': {
id: '/pipeline'
path: '/pipeline'
fullPath: '/pipeline'
preLoaderRoute: typeof PipelineRouteImport
parentRoute: typeof rootRouteImport
}
'/logs': {
id: '/logs'
path: '/logs'
fullPath: '/logs'
preLoaderRoute: typeof LogsRouteImport
parentRoute: typeof rootRouteImport
}
'/files': {
id: '/files'
path: '/files'
fullPath: '/files'
preLoaderRoute: typeof FilesRouteImport
parentRoute: typeof rootRouteImport
}
'/config': {
id: '/config'
path: '/config'
fullPath: '/config'
preLoaderRoute: typeof ConfigRouteImport
parentRoute: typeof rootRouteImport
}
'/': {
id: '/'
path: '/'
fullPath: '/'
preLoaderRoute: typeof IndexRouteImport
parentRoute: typeof rootRouteImport
}
}
}

const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
ConfigRoute: ConfigRoute,
FilesRoute: FilesRoute,
LogsRoute: LogsRoute,
PipelineRoute: PipelineRoute,
PluginsRoute: PluginsRoute,
SettingsRoute: SettingsRoute,
}
export const routeTree = rootRouteImport
._addFileChildren(rootRouteChildren)
._addFileTypes<FileRouteTypes>()
1 change: 1 addition & 0 deletions gui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default defineConfig({
routesDirectory: './src/routes',
generatedRouteTree: './src/routeTree.gen.ts',
quoteStyle: 'single',
routeFileIgnorePattern: '.*\.test\.tsx?$|.*\.spec\.tsx?$',
}),
tailwindcss(),
react(),
Expand Down
Loading
Loading