mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-02 10:03:28 +00:00
Fix pnpm format
command failing with some files (#622)
* Fix `pnpm format` command failure - Update prettier and plugins dependencies - Add auto-install-peers to .npmrc - Fix formating of previously failing files - Some basic security mitigations (`pnpm audit --fix`) * setup-system.sh: Don't do a full system update on ArchLinux * Revert "Some basic security mitigations (`pnpm audit --fix`)"
This commit is contained in:
parent
249d5b5534
commit
a6a57bbd50
2
.github/actions/setup/action.yml
vendored
2
.github/actions/setup/action.yml
vendored
|
@ -4,7 +4,7 @@ inputs:
|
|||
save-cache:
|
||||
description: Whether to save the Rust cache
|
||||
required: false
|
||||
default: "false"
|
||||
default: 'false'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
|
|
2
.github/scripts/setup-system.sh
vendored
2
.github/scripts/setup-system.sh
vendored
|
@ -121,7 +121,7 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|||
# Protobuf compiler - https://github.com/archlinux/svntogit-packages/blob/packages/protobuf/trunk/PKGBUILD provides `libprotoc`
|
||||
ARCH_LIBP2P_DEPS="protobuf"
|
||||
|
||||
sudo pacman -Syu
|
||||
sudo pacman -Sy
|
||||
sudo pacman -S --needed $ARCH_TAURI_DEPS $ARCH_FFMPEG_DEPS $ARCH_BINDGEN_DEPS $ARCH_LIBP2P_DEPS
|
||||
elif command -v dnf >/dev/null; then
|
||||
echo "Detected dnf!"
|
||||
|
|
2
.github/workflows/cache-factory.yaml
vendored
2
.github/workflows/cache-factory.yaml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
|||
|
||||
- uses: ./.github/actions/setup
|
||||
with:
|
||||
save-cache: "true"
|
||||
save-cache: 'true'
|
||||
|
||||
- name: Compile workspace with stable Rust
|
||||
run: cargo test --workspace --all-features --no-run
|
||||
|
|
1
.npmrc
1
.npmrc
|
@ -5,3 +5,4 @@ prefer-symlinked-executables=false
|
|||
; necessary for metro + mobile
|
||||
strict-peer-dependencies=false
|
||||
node-linker=hoisted
|
||||
auto-install-peers=true
|
||||
|
|
|
@ -17,7 +17,7 @@ export default defineConfig({
|
|||
svg({ svgrOptions: { icon: true } }),
|
||||
createHtmlPlugin({
|
||||
minify: true
|
||||
}),
|
||||
})
|
||||
],
|
||||
css: {
|
||||
modules: {
|
||||
|
|
|
@ -22,7 +22,7 @@ export default defineConfig({
|
|||
visualizer({
|
||||
gzipSize: true,
|
||||
brotliSize: true
|
||||
}),
|
||||
})
|
||||
],
|
||||
css: {
|
||||
modules: {
|
||||
|
|
|
@ -3,17 +3,17 @@ import settingsRoutes from './settings';
|
|||
|
||||
export default [
|
||||
{
|
||||
lazy: () => import("./PageLayout"),
|
||||
lazy: () => import('./PageLayout'),
|
||||
children: [
|
||||
{
|
||||
path: 'overview',
|
||||
lazy: () => import('./overview')
|
||||
},
|
||||
{ path: 'people', lazy: () => import('./people')},
|
||||
{ path: 'people', lazy: () => import('./people') },
|
||||
{ path: 'media', lazy: () => import('./media') },
|
||||
{ path: 'spaces', lazy: () => import('./spaces') },
|
||||
{ path: 'debug', lazy: () => import('./debug') },
|
||||
{ path: 'spacedrop', lazy: () => import('./spacedrop') },
|
||||
{ path: 'spacedrop', lazy: () => import('./spacedrop') }
|
||||
]
|
||||
},
|
||||
{ path: 'location/:id', lazy: () => import('./location/$id') },
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { RouteObject } from "react-router";
|
||||
import { RouteObject } from 'react-router';
|
||||
|
||||
export default [
|
||||
{ path: 'general', lazy: () => import('./general') },
|
||||
{ path: 'appearance', lazy: () => import('./appearance') },
|
||||
{ path: 'keybindings', lazy: () => import('./keybindings') },
|
||||
{ path: 'extensions', lazy: () => import('./extensions') },
|
||||
{ path: 'privacy', lazy: () => import('./privacy') },
|
||||
] satisfies RouteObject[]
|
||||
{ path: 'privacy', lazy: () => import('./privacy') }
|
||||
] satisfies RouteObject[];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { RouteObject } from "react-router";
|
||||
import { RouteObject } from 'react-router';
|
||||
|
||||
export default [
|
||||
{ path: 'p2p', lazy: () => import('./p2p') },
|
||||
{ path: 'libraries', lazy: () => import('./libraries') },
|
||||
] satisfies RouteObject[]
|
||||
{ path: 'libraries', lazy: () => import('./libraries') }
|
||||
] satisfies RouteObject[];
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { RouteObject } from "react-router";
|
||||
import { RouteObject } from 'react-router';
|
||||
|
||||
export default [
|
||||
{ path: 'about', lazy: () => import('./about') },
|
||||
{ path: 'changelog', lazy: () => import('./changelog') },
|
||||
{ path: 'dependencies', lazy: () => import('./dependencies') },
|
||||
{ path: 'support', lazy: () => import('./support') },
|
||||
] satisfies RouteObject[]
|
||||
{ path: 'support', lazy: () => import('./support') }
|
||||
] satisfies RouteObject[];
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Navigate, Outlet, RouteObject } from 'react-router-dom';
|
||||
import { currentLibraryCache, useCachedLibraries, useInvalidateQuery } from '@sd/client';
|
||||
import { useKeybindHandler } from '~/hooks/useKeyboardHandler';
|
||||
import libraryRoutes from './$libraryId';
|
||||
import onboardingRoutes from './onboarding';
|
||||
import './style.scss';
|
||||
import { useKeybindHandler } from '~/hooks/useKeyboardHandler';
|
||||
|
||||
const Index = () => {
|
||||
const libraries = useCachedLibraries();
|
||||
|
@ -19,33 +19,35 @@ const Index = () => {
|
|||
return <Navigate to={`${libraryId}/overview`} />;
|
||||
};
|
||||
|
||||
|
||||
const Wrapper = () => {
|
||||
useKeybindHandler();
|
||||
useInvalidateQuery();
|
||||
|
||||
return <Outlet/>
|
||||
}
|
||||
return <Outlet />;
|
||||
};
|
||||
|
||||
// NOTE: all route `Layout`s below should contain
|
||||
// the `usePlausiblePageViewMonitor` hook, as early as possible (ideally within the layout itself).
|
||||
// the hook should only be included if there's a valid `ClientContext` (so not onboarding)
|
||||
|
||||
export const routes = [{
|
||||
element: <Wrapper/>,
|
||||
children: [
|
||||
export const routes = [
|
||||
{
|
||||
index: true,
|
||||
element: <Index />
|
||||
},
|
||||
{
|
||||
path: 'onboarding',
|
||||
lazy: () => import('./onboarding/Layout'),
|
||||
children: onboardingRoutes
|
||||
},
|
||||
{
|
||||
path: ':libraryId',
|
||||
lazy: () => import('./$libraryId/Layout'),
|
||||
children: libraryRoutes,
|
||||
}]
|
||||
}] satisfies RouteObject[];
|
||||
element: <Wrapper />,
|
||||
children: [
|
||||
{
|
||||
index: true,
|
||||
element: <Index />
|
||||
},
|
||||
{
|
||||
path: 'onboarding',
|
||||
lazy: () => import('./onboarding/Layout'),
|
||||
children: onboardingRoutes
|
||||
},
|
||||
{
|
||||
path: ':libraryId',
|
||||
lazy: () => import('./$libraryId/Layout'),
|
||||
children: libraryRoutes
|
||||
}
|
||||
]
|
||||
}
|
||||
] satisfies RouteObject[];
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
"react-json-view": "^1.21.3",
|
||||
"react-loading-skeleton": "^3.1.0",
|
||||
"react-qr-code": "^2.0.11",
|
||||
"react-responsive": "^9.0.2",
|
||||
"react-responsive": "^9.0.2",
|
||||
"react-router": "6.9.0",
|
||||
"react-router-dom": "6.9.0",
|
||||
"rooks": "^5.14.0",
|
||||
|
|
|
@ -33,11 +33,11 @@
|
|||
"@babel/plugin-syntax-import-assertions": "^7.20.0",
|
||||
"@cspell/dict-rust": "^2.0.1",
|
||||
"@cspell/dict-typescript": "^2.0.2",
|
||||
"@trivago/prettier-plugin-sort-imports": "^3.4.0",
|
||||
"@trivago/prettier-plugin-sort-imports": "^4.1.1",
|
||||
"cspell": "^6.12.0",
|
||||
"markdown-link-check": "^3.10.3",
|
||||
"prettier": "^2.8.3",
|
||||
"prettier-plugin-tailwindcss": "^0.2.2",
|
||||
"prettier": "^2.8.4",
|
||||
"prettier-plugin-tailwindcss": "^0.2.5",
|
||||
"rimraf": "^4.1.1",
|
||||
"turbo": "^1.5.5",
|
||||
"turbo-ignore": "^0.3.0",
|
||||
|
|
|
@ -2,13 +2,13 @@ import { z } from 'zod';
|
|||
import { HashingAlgorithm } from '../core';
|
||||
|
||||
export const hashingAlgoSlugSchema = z.union([
|
||||
z.literal("Argon2id-s"),
|
||||
z.literal("Argon2id-h"),
|
||||
z.literal("Argon2id-p"),
|
||||
z.literal("BalloonBlake3-s"),
|
||||
z.literal("BalloonBlake3-h"),
|
||||
z.literal("BalloonBlake3-p"),
|
||||
])
|
||||
z.literal('Argon2id-s'),
|
||||
z.literal('Argon2id-h'),
|
||||
z.literal('Argon2id-p'),
|
||||
z.literal('BalloonBlake3-s'),
|
||||
z.literal('BalloonBlake3-h'),
|
||||
z.literal('BalloonBlake3-p')
|
||||
]);
|
||||
|
||||
export type HashingAlgoSlug = z.infer<typeof hashingAlgoSlugSchema>;
|
||||
|
||||
|
@ -21,7 +21,7 @@ export const HASHING_ALGOS = {
|
|||
'BalloonBlake3-p': { name: 'BalloonBlake3', params: 'Paranoid' }
|
||||
} as const satisfies Record<HashingAlgoSlug, HashingAlgorithm>;
|
||||
|
||||
export const slugFromHashingAlgo = (hashingAlgorithm: HashingAlgorithm): HashingAlgoSlug =>
|
||||
export const slugFromHashingAlgo = (hashingAlgorithm: HashingAlgorithm): HashingAlgoSlug =>
|
||||
Object.entries(HASHING_ALGOS).find(
|
||||
([_, hashAlg]) =>
|
||||
hashAlg.name === hashingAlgorithm.name && hashAlg.params === hashingAlgorithm.params
|
||||
|
|
2717
pnpm-lock.yaml
2717
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue