mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-04-17 04:58:25 -04:00
fix: tauri CI builds + macOS runners + spaceui-link
- Add missing @vitejs/plugin-react-swc to tauri devDependencies - Make spaceui/spacebot vite aliases conditional in tauri config - Use package export paths for @spacedrive/tokens CSS imports - Use regex aliases to prevent prefix-matching collisions - Switch macOS release runners to macos-26 (GitHub-hosted) - Fix spaceui-link to run bun link from workspace root Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -89,12 +89,12 @@ jobs:
|
||||
matrix:
|
||||
settings:
|
||||
# macOS builds
|
||||
- host: self-hosted
|
||||
- host: macos-26
|
||||
target: aarch64-apple-darwin
|
||||
bundles: dmg,app
|
||||
os: darwin
|
||||
arch: aarch64
|
||||
- host: self-hosted
|
||||
- host: macos-26-large
|
||||
target: x86_64-apple-darwin
|
||||
bundles: dmg,app
|
||||
os: darwin
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"devDependencies": {
|
||||
"@headlessui/tailwindcss": "^0.2.0",
|
||||
"@spacedrive/tokens": "^0.2.3",
|
||||
"@vitejs/plugin-react-swc": "^4.0.0",
|
||||
"@tailwindcss/forms": "^0.5.7",
|
||||
"@tailwindcss/typography": "^0.5.10",
|
||||
"@tailwindcss/vite": "^4.1.0",
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
import react from '@vitejs/plugin-react-swc';
|
||||
import {defineConfig} from 'vite';
|
||||
|
||||
const spaceui = path.resolve(__dirname, '../../../spaceui/packages');
|
||||
const hasSpaceui = fs.existsSync(spaceui);
|
||||
const spacebot = path.resolve(__dirname, '../../../spacebot/packages');
|
||||
const hasSpacebot = fs.existsSync(spacebot);
|
||||
|
||||
export default defineConfig(() => ({
|
||||
plugins: [react(), tailwindcss()],
|
||||
|
||||
@@ -51,41 +57,43 @@ export default defineConfig(() => ({
|
||||
'../../packages/interface/node_modules/openapi-fetch/dist/index.mjs'
|
||||
)
|
||||
},
|
||||
{
|
||||
find: '@spacedrive/tokens/src/css',
|
||||
replacement: path.resolve(
|
||||
__dirname,
|
||||
'../../../spaceui/packages/tokens/src/css'
|
||||
)
|
||||
},
|
||||
{
|
||||
find: '@spacedrive/tokens',
|
||||
replacement: path.resolve(
|
||||
__dirname,
|
||||
'../../../spaceui/packages/tokens'
|
||||
)
|
||||
},
|
||||
{
|
||||
find: '@spacedrive/ai',
|
||||
replacement: path.resolve(
|
||||
__dirname,
|
||||
'../../../spaceui/packages/ai/src/index.ts'
|
||||
)
|
||||
},
|
||||
{
|
||||
find: '@spacedrive/primitives',
|
||||
replacement: path.resolve(
|
||||
__dirname,
|
||||
'../../../spaceui/packages/primitives/src/index.ts'
|
||||
)
|
||||
},
|
||||
{
|
||||
find: '@spacebot/api-client',
|
||||
replacement: path.resolve(
|
||||
__dirname,
|
||||
'../../../spacebot/packages/api-client/src'
|
||||
)
|
||||
},
|
||||
// SpaceUI — resolve to source for HMR when available locally
|
||||
...(hasSpaceui
|
||||
? [
|
||||
{
|
||||
find: /^@spacedrive\/tokens\/css\/themes\/(.+)$/,
|
||||
replacement: `${spaceui}/tokens/src/css/themes/$1.css`,
|
||||
},
|
||||
{
|
||||
find: /^@spacedrive\/tokens\/theme$/,
|
||||
replacement: `${spaceui}/tokens/src/css/theme.css`,
|
||||
},
|
||||
{
|
||||
find: /^@spacedrive\/tokens\/css$/,
|
||||
replacement: `${spaceui}/tokens/src/css/base.css`,
|
||||
},
|
||||
{
|
||||
find: /^@spacedrive\/tokens$/,
|
||||
replacement: `${spaceui}/tokens`,
|
||||
},
|
||||
{
|
||||
find: /^@spacedrive\/ai$/,
|
||||
replacement: `${spaceui}/ai/src/index.ts`,
|
||||
},
|
||||
{
|
||||
find: /^@spacedrive\/primitives$/,
|
||||
replacement: `${spaceui}/primitives/src/index.ts`,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(hasSpacebot
|
||||
? [
|
||||
{
|
||||
find: /^@spacebot\/api-client$/,
|
||||
replacement: `${spacebot}/api-client/src`,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
find: '@sd/interface',
|
||||
replacement: path.resolve(
|
||||
@@ -114,7 +122,7 @@ export default defineConfig(() => ({
|
||||
fs: {
|
||||
allow: [
|
||||
path.resolve(__dirname, '../../..'),
|
||||
path.resolve(__dirname, '../../../spaceui')
|
||||
...(hasSpaceui ? [spaceui] : []),
|
||||
]
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -42,23 +42,23 @@ export default defineConfig({
|
||||
replacement: `${spaceui}/tokens/src/css/themes/$1.css`,
|
||||
},
|
||||
{
|
||||
find: "@spacedrive/tokens/theme",
|
||||
find: /^@spacedrive\/tokens\/theme$/,
|
||||
replacement: `${spaceui}/tokens/src/css/theme.css`,
|
||||
},
|
||||
{
|
||||
find: "@spacedrive/tokens/css",
|
||||
find: /^@spacedrive\/tokens\/css$/,
|
||||
replacement: `${spaceui}/tokens/src/css/base.css`,
|
||||
},
|
||||
{
|
||||
find: "@spacedrive/tokens",
|
||||
find: /^@spacedrive\/tokens$/,
|
||||
replacement: `${spaceui}/tokens`,
|
||||
},
|
||||
{
|
||||
find: "@spacedrive/ai",
|
||||
find: /^@spacedrive\/ai$/,
|
||||
replacement: `${spaceui}/ai/src/index.ts`,
|
||||
},
|
||||
{
|
||||
find: "@spacedrive/primitives",
|
||||
find: /^@spacedrive\/primitives$/,
|
||||
replacement: `${spaceui}/primitives/src/index.ts`,
|
||||
},
|
||||
]
|
||||
|
||||
2
justfile
2
justfile
@@ -68,7 +68,7 @@ spaceui-link:
|
||||
for pkg in primitives ai forms explorer tokens; do
|
||||
cd packages/$pkg && bun link && cd ../..
|
||||
done
|
||||
cd "{{justfile_directory()}}/packages/interface"
|
||||
cd "{{justfile_directory()}}"
|
||||
bun link @spacedrive/primitives @spacedrive/ai @spacedrive/forms @spacedrive/explorer @spacedrive/tokens
|
||||
echo "SpaceUI packages linked successfully."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user