mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-04 11:03:27 +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:
|
save-cache:
|
||||||
description: Whether to save the Rust cache
|
description: Whether to save the Rust cache
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: 'false'
|
||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
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`
|
# Protobuf compiler - https://github.com/archlinux/svntogit-packages/blob/packages/protobuf/trunk/PKGBUILD provides `libprotoc`
|
||||||
ARCH_LIBP2P_DEPS="protobuf"
|
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
|
sudo pacman -S --needed $ARCH_TAURI_DEPS $ARCH_FFMPEG_DEPS $ARCH_BINDGEN_DEPS $ARCH_LIBP2P_DEPS
|
||||||
elif command -v dnf >/dev/null; then
|
elif command -v dnf >/dev/null; then
|
||||||
echo "Detected dnf!"
|
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
|
- uses: ./.github/actions/setup
|
||||||
with:
|
with:
|
||||||
save-cache: "true"
|
save-cache: 'true'
|
||||||
|
|
||||||
- name: Compile workspace with stable Rust
|
- name: Compile workspace with stable Rust
|
||||||
run: cargo test --workspace --all-features --no-run
|
run: cargo test --workspace --all-features --no-run
|
||||||
|
|
1
.npmrc
1
.npmrc
|
@ -5,3 +5,4 @@ prefer-symlinked-executables=false
|
||||||
; necessary for metro + mobile
|
; necessary for metro + mobile
|
||||||
strict-peer-dependencies=false
|
strict-peer-dependencies=false
|
||||||
node-linker=hoisted
|
node-linker=hoisted
|
||||||
|
auto-install-peers=true
|
||||||
|
|
|
@ -17,7 +17,7 @@ export default defineConfig({
|
||||||
svg({ svgrOptions: { icon: true } }),
|
svg({ svgrOptions: { icon: true } }),
|
||||||
createHtmlPlugin({
|
createHtmlPlugin({
|
||||||
minify: true
|
minify: true
|
||||||
}),
|
})
|
||||||
],
|
],
|
||||||
css: {
|
css: {
|
||||||
modules: {
|
modules: {
|
||||||
|
|
|
@ -22,7 +22,7 @@ export default defineConfig({
|
||||||
visualizer({
|
visualizer({
|
||||||
gzipSize: true,
|
gzipSize: true,
|
||||||
brotliSize: true
|
brotliSize: true
|
||||||
}),
|
})
|
||||||
],
|
],
|
||||||
css: {
|
css: {
|
||||||
modules: {
|
modules: {
|
||||||
|
|
|
@ -3,17 +3,17 @@ import settingsRoutes from './settings';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
lazy: () => import("./PageLayout"),
|
lazy: () => import('./PageLayout'),
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: 'overview',
|
path: 'overview',
|
||||||
lazy: () => import('./overview')
|
lazy: () => import('./overview')
|
||||||
},
|
},
|
||||||
{ path: 'people', lazy: () => import('./people')},
|
{ path: 'people', lazy: () => import('./people') },
|
||||||
{ path: 'media', lazy: () => import('./media') },
|
{ path: 'media', lazy: () => import('./media') },
|
||||||
{ path: 'spaces', lazy: () => import('./spaces') },
|
{ path: 'spaces', lazy: () => import('./spaces') },
|
||||||
{ path: 'debug', lazy: () => import('./debug') },
|
{ path: 'debug', lazy: () => import('./debug') },
|
||||||
{ path: 'spacedrop', lazy: () => import('./spacedrop') },
|
{ path: 'spacedrop', lazy: () => import('./spacedrop') }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ path: 'location/:id', lazy: () => import('./location/$id') },
|
{ path: 'location/:id', lazy: () => import('./location/$id') },
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { RouteObject } from "react-router";
|
import { RouteObject } from 'react-router';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{ path: 'general', lazy: () => import('./general') },
|
{ path: 'general', lazy: () => import('./general') },
|
||||||
{ path: 'appearance', lazy: () => import('./appearance') },
|
{ path: 'appearance', lazy: () => import('./appearance') },
|
||||||
{ path: 'keybindings', lazy: () => import('./keybindings') },
|
{ path: 'keybindings', lazy: () => import('./keybindings') },
|
||||||
{ path: 'extensions', lazy: () => import('./extensions') },
|
{ path: 'extensions', lazy: () => import('./extensions') },
|
||||||
{ path: 'privacy', lazy: () => import('./privacy') },
|
{ path: 'privacy', lazy: () => import('./privacy') }
|
||||||
] satisfies RouteObject[]
|
] satisfies RouteObject[];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { RouteObject } from "react-router";
|
import { RouteObject } from 'react-router';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{ path: 'p2p', lazy: () => import('./p2p') },
|
{ path: 'p2p', lazy: () => import('./p2p') },
|
||||||
{ path: 'libraries', lazy: () => import('./libraries') },
|
{ path: 'libraries', lazy: () => import('./libraries') }
|
||||||
] satisfies RouteObject[]
|
] satisfies RouteObject[];
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { RouteObject } from "react-router";
|
import { RouteObject } from 'react-router';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{ path: 'about', lazy: () => import('./about') },
|
{ path: 'about', lazy: () => import('./about') },
|
||||||
{ path: 'changelog', lazy: () => import('./changelog') },
|
{ path: 'changelog', lazy: () => import('./changelog') },
|
||||||
{ path: 'dependencies', lazy: () => import('./dependencies') },
|
{ path: 'dependencies', lazy: () => import('./dependencies') },
|
||||||
{ path: 'support', lazy: () => import('./support') },
|
{ path: 'support', lazy: () => import('./support') }
|
||||||
] satisfies RouteObject[]
|
] satisfies RouteObject[];
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { Navigate, Outlet, RouteObject } from 'react-router-dom';
|
import { Navigate, Outlet, RouteObject } from 'react-router-dom';
|
||||||
import { currentLibraryCache, useCachedLibraries, useInvalidateQuery } from '@sd/client';
|
import { currentLibraryCache, useCachedLibraries, useInvalidateQuery } from '@sd/client';
|
||||||
|
import { useKeybindHandler } from '~/hooks/useKeyboardHandler';
|
||||||
import libraryRoutes from './$libraryId';
|
import libraryRoutes from './$libraryId';
|
||||||
import onboardingRoutes from './onboarding';
|
import onboardingRoutes from './onboarding';
|
||||||
import './style.scss';
|
import './style.scss';
|
||||||
import { useKeybindHandler } from '~/hooks/useKeyboardHandler';
|
|
||||||
|
|
||||||
const Index = () => {
|
const Index = () => {
|
||||||
const libraries = useCachedLibraries();
|
const libraries = useCachedLibraries();
|
||||||
|
@ -19,33 +19,35 @@ const Index = () => {
|
||||||
return <Navigate to={`${libraryId}/overview`} />;
|
return <Navigate to={`${libraryId}/overview`} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const Wrapper = () => {
|
const Wrapper = () => {
|
||||||
useKeybindHandler();
|
useKeybindHandler();
|
||||||
useInvalidateQuery();
|
useInvalidateQuery();
|
||||||
|
|
||||||
return <Outlet/>
|
return <Outlet />;
|
||||||
}
|
};
|
||||||
|
|
||||||
// NOTE: all route `Layout`s below should contain
|
// NOTE: all route `Layout`s below should contain
|
||||||
// the `usePlausiblePageViewMonitor` hook, as early as possible (ideally within the layout itself).
|
// 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)
|
// the hook should only be included if there's a valid `ClientContext` (so not onboarding)
|
||||||
|
|
||||||
export const routes = [{
|
export const routes = [
|
||||||
element: <Wrapper/>,
|
|
||||||
children: [
|
|
||||||
{
|
{
|
||||||
index: true,
|
element: <Wrapper />,
|
||||||
element: <Index />
|
children: [
|
||||||
},
|
{
|
||||||
{
|
index: true,
|
||||||
path: 'onboarding',
|
element: <Index />
|
||||||
lazy: () => import('./onboarding/Layout'),
|
},
|
||||||
children: onboardingRoutes
|
{
|
||||||
},
|
path: 'onboarding',
|
||||||
{
|
lazy: () => import('./onboarding/Layout'),
|
||||||
path: ':libraryId',
|
children: onboardingRoutes
|
||||||
lazy: () => import('./$libraryId/Layout'),
|
},
|
||||||
children: libraryRoutes,
|
{
|
||||||
}]
|
path: ':libraryId',
|
||||||
}] satisfies RouteObject[];
|
lazy: () => import('./$libraryId/Layout'),
|
||||||
|
children: libraryRoutes
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
] satisfies RouteObject[];
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
"react-json-view": "^1.21.3",
|
"react-json-view": "^1.21.3",
|
||||||
"react-loading-skeleton": "^3.1.0",
|
"react-loading-skeleton": "^3.1.0",
|
||||||
"react-qr-code": "^2.0.11",
|
"react-qr-code": "^2.0.11",
|
||||||
"react-responsive": "^9.0.2",
|
"react-responsive": "^9.0.2",
|
||||||
"react-router": "6.9.0",
|
"react-router": "6.9.0",
|
||||||
"react-router-dom": "6.9.0",
|
"react-router-dom": "6.9.0",
|
||||||
"rooks": "^5.14.0",
|
"rooks": "^5.14.0",
|
||||||
|
|
|
@ -33,11 +33,11 @@
|
||||||
"@babel/plugin-syntax-import-assertions": "^7.20.0",
|
"@babel/plugin-syntax-import-assertions": "^7.20.0",
|
||||||
"@cspell/dict-rust": "^2.0.1",
|
"@cspell/dict-rust": "^2.0.1",
|
||||||
"@cspell/dict-typescript": "^2.0.2",
|
"@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",
|
"cspell": "^6.12.0",
|
||||||
"markdown-link-check": "^3.10.3",
|
"markdown-link-check": "^3.10.3",
|
||||||
"prettier": "^2.8.3",
|
"prettier": "^2.8.4",
|
||||||
"prettier-plugin-tailwindcss": "^0.2.2",
|
"prettier-plugin-tailwindcss": "^0.2.5",
|
||||||
"rimraf": "^4.1.1",
|
"rimraf": "^4.1.1",
|
||||||
"turbo": "^1.5.5",
|
"turbo": "^1.5.5",
|
||||||
"turbo-ignore": "^0.3.0",
|
"turbo-ignore": "^0.3.0",
|
||||||
|
|
|
@ -2,13 +2,13 @@ import { z } from 'zod';
|
||||||
import { HashingAlgorithm } from '../core';
|
import { HashingAlgorithm } from '../core';
|
||||||
|
|
||||||
export const hashingAlgoSlugSchema = z.union([
|
export const hashingAlgoSlugSchema = z.union([
|
||||||
z.literal("Argon2id-s"),
|
z.literal('Argon2id-s'),
|
||||||
z.literal("Argon2id-h"),
|
z.literal('Argon2id-h'),
|
||||||
z.literal("Argon2id-p"),
|
z.literal('Argon2id-p'),
|
||||||
z.literal("BalloonBlake3-s"),
|
z.literal('BalloonBlake3-s'),
|
||||||
z.literal("BalloonBlake3-h"),
|
z.literal('BalloonBlake3-h'),
|
||||||
z.literal("BalloonBlake3-p"),
|
z.literal('BalloonBlake3-p')
|
||||||
])
|
]);
|
||||||
|
|
||||||
export type HashingAlgoSlug = z.infer<typeof hashingAlgoSlugSchema>;
|
export type HashingAlgoSlug = z.infer<typeof hashingAlgoSlugSchema>;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ export const HASHING_ALGOS = {
|
||||||
'BalloonBlake3-p': { name: 'BalloonBlake3', params: 'Paranoid' }
|
'BalloonBlake3-p': { name: 'BalloonBlake3', params: 'Paranoid' }
|
||||||
} as const satisfies Record<HashingAlgoSlug, HashingAlgorithm>;
|
} as const satisfies Record<HashingAlgoSlug, HashingAlgorithm>;
|
||||||
|
|
||||||
export const slugFromHashingAlgo = (hashingAlgorithm: HashingAlgorithm): HashingAlgoSlug =>
|
export const slugFromHashingAlgo = (hashingAlgorithm: HashingAlgorithm): HashingAlgoSlug =>
|
||||||
Object.entries(HASHING_ALGOS).find(
|
Object.entries(HASHING_ALGOS).find(
|
||||||
([_, hashAlg]) =>
|
([_, hashAlg]) =>
|
||||||
hashAlg.name === hashingAlgorithm.name && hashAlg.params === hashingAlgorithm.params
|
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