mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-04 11:03:27 +00:00
remove codegen'd files + update dev docs
This commit is contained in:
parent
b121f0fed6
commit
6cf3933b80
27
README.md
27
README.md
|
@ -103,13 +103,26 @@ All TypeScript packages are compiled automatically using Turborepo.
|
|||
- `native-android`: a [Kotlin]() native binary
|
||||
|
||||
|
||||
## Developer Info
|
||||
## Developer Installation Instructions
|
||||
This environment uses [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) and [pnpm](https://pnpm.io/installation). Ensure you have them installed before continuing.
|
||||
|
||||
- `$ cargo install prisma-client-rust-cli`
|
||||
- `$ git clone https://github.com/spacedriveapp/spacedrive`
|
||||
- `$ cd spacedrive`
|
||||
- `$ pnpm i`
|
||||
- `$ pnpm prepare` - This runs all necessary codegen.
|
||||
- `$ pnpm dev` - You must run this once, to build all required dependencies.
|
||||
|
||||
To quickly run only the desktop app after `prepare` you can use:
|
||||
- `$ pnpm desktop dev`
|
||||
|
||||
If you are making changes to any TS packages you must run their respective dev environments too, for example:
|
||||
- `$ pnpm core dev`
|
||||
- `$ pnpm ui dev`
|
||||
|
||||
Or to run everything specific to desktop app development just run:
|
||||
- `$ pnpm dev`
|
||||
|
||||
If you are having issues ensure you are using the following versions of Rust and Node:
|
||||
- Rust version: **1.58.1**
|
||||
- Node version: **17**
|
||||
|
||||
Install instructions:
|
||||
- `$ git clone https://github.com/jamiepine/spacedrive`
|
||||
- `$ cd spacedrive`
|
||||
- `$ yarn`
|
||||
- `$ yarn dev`
|
||||
|
|
4
core/.gitignore
vendored
4
core/.gitignore
vendored
|
@ -1,3 +1,5 @@
|
|||
/target
|
||||
/types
|
||||
*.db*
|
||||
*.db*
|
||||
/bindings
|
||||
/src/prisma.rs
|
|
@ -1,9 +1,9 @@
|
|||
[package]
|
||||
name = "sdcore"
|
||||
version = "0.1.0"
|
||||
description = "The next gen private virtual filesystem."
|
||||
authors = ["NerdHouse, Inc.", "Jamie Pine"]
|
||||
license = ""
|
||||
description = "A virtual distributed filesystem."
|
||||
authors = ["Jamie Pine"]
|
||||
license = "GNU GENERAL PUBLIC LICENSE"
|
||||
repository = "https://github.com/jamiepine/spacedrive"
|
||||
edition = "2018"
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
export type ClientCommand = { key: "FileRead", params: { id: number, } } | { key: "FileDelete", params: { id: number, } } | { key: "LibDelete", params: { id: number, } } | { key: "TagCreate", params: { name: string, color: string, } } | { key: "TagUpdate", params: { name: string, color: string, } } | { key: "TagAssign", params: { file_id: number, tag_id: number, } } | { key: "TagDelete", params: { id: number, } } | { key: "LocCreate", params: { path: string, } } | { key: "LocUpdate", params: { id: number, name: string | null, } } | { key: "LocDelete", params: { id: number, } } | { key: "SysVolumeUnmount", params: { id: number, } } | { key: "GenerateThumbsForLocation", params: { id: number, } };
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
export type ClientQuery = { key: "ClientGetState" } | { key: "SysGetVolumes" } | { key: "LibGetTags" } | { key: "JobGetRunning" } | { key: "JobGetHistory" } | { key: "SysGetLocation", params: { id: number, } } | { key: "LibGetExplorerDir", params: { path: string, limit: number, } };
|
|
@ -1,3 +0,0 @@
|
|||
import type { LibraryState } from "./LibraryState";
|
||||
|
||||
export interface ClientState { client_uuid: string, client_name: string, data_path: string, tcp_port: number, libraries: Array<LibraryState>, current_library_uuid: string, }
|
|
@ -1,4 +0,0 @@
|
|||
import type { ClientQuery } from "./ClientQuery";
|
||||
import type { CoreResource } from "./CoreResource";
|
||||
|
||||
export type CoreEvent = { key: "InvalidateQuery", data: ClientQuery } | { key: "InvalidateQueryDebounced", data: ClientQuery } | { key: "InvalidateResource", data: CoreResource } | { key: "Log", data: { message: string, } } | { key: "DatabaseDisconnected", data: { reason: string | null, } };
|
|
@ -1,5 +0,0 @@
|
|||
import type { File } from "./File";
|
||||
import type { JobReport } from "./JobReport";
|
||||
import type { LocationResource } from "./LocationResource";
|
||||
|
||||
export type CoreResource = "Client" | "Library" | { Location: LocationResource } | { File: File } | { Job: JobReport } | "Tag";
|
|
@ -1,7 +0,0 @@
|
|||
import type { ClientState } from "./ClientState";
|
||||
import type { DirectoryWithContents } from "./DirectoryWithContents";
|
||||
import type { JobReport } from "./JobReport";
|
||||
import type { LocationResource } from "./LocationResource";
|
||||
import type { Volume } from "./Volume";
|
||||
|
||||
export type CoreResponse = { key: "Success", data: null } | { key: "SysGetVolumes", data: Array<Volume> } | { key: "SysGetLocation", data: LocationResource } | { key: "LibGetExplorerDir", data: DirectoryWithContents } | { key: "ClientGetState", data: ClientState } | { key: "LocCreate", data: LocationResource } | { key: "JobGetRunning", data: Array<JobReport> } | { key: "JobGetHistory", data: Array<JobReport> };
|
|
@ -1,3 +0,0 @@
|
|||
import type { FileResource } from "./FileResource";
|
||||
|
||||
export interface Directory { directory: FileResource, contents: Array<FileResource>, }
|
|
@ -1,3 +0,0 @@
|
|||
import type { FilePath } from "./FilePath";
|
||||
|
||||
export interface DirectoryWithContents { directory: FilePath, contents: Array<FilePath>, }
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
export type EncryptionAlgorithm = "None" | "AES128" | "AES192" | "AES256";
|
|
@ -1,5 +0,0 @@
|
|||
import type { EncryptionAlgorithm } from "./EncryptionAlgorithm";
|
||||
import type { FilePath } from "./FilePath";
|
||||
import type { FileType } from "./FileType";
|
||||
|
||||
export interface File { id: number, partial_checksum: string, checksum: string | null, size_in_bytes: string, encryption: EncryptionAlgorithm, file_type: FileType, date_created: string, date_modified: string, date_indexed: string, ipfs_id: string | null, file_paths: Array<FilePath>, }
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
export interface FilePath { id: number, is_dir: boolean, location_id: number, materialized_path: string, file_id: number | null, parent_id: number | null, date_indexed: string, permissions: string | null, }
|
|
@ -1,3 +0,0 @@
|
|||
import type { LocationResource } from "./LocationResource";
|
||||
|
||||
export interface FileResource { id: bigint, is_dir: boolean, location_id: bigint, stem: string, name: string, extension: string | null, quick_checksum: string | null, full_checksum: string | null, size_in_bytes: string, encryption: bigint, date_created: string, date_modified: string, date_indexed: string, ipfs_id: string | null, location: LocationResource | null, parent_id: bigint | null, }
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
export type FileType = "Unknown" | "Directory" | "Package" | "Archive" | "Image" | "Video" | "Audio" | "Plaintext" | "Alias";
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
export type JobAction = "ScanLoc" | "GeneratePreviewMedia";
|
|
@ -1,3 +0,0 @@
|
|||
import type { JobStatus } from "./JobStatus";
|
||||
|
||||
export interface JobMetadata { id: bigint, client_id: bigint, date_created: string, date_modified: string, status: JobStatus, task_count: bigint, completed_task_count: bigint, message: string, }
|
|
@ -1,3 +0,0 @@
|
|||
import type { JobStatus } from "./JobStatus";
|
||||
|
||||
export interface JobReport { id: string, date_created: string, date_modified: string, status: JobStatus, task_count: number, completed_task_count: number, message: string, seconds_elapsed: string, }
|
|
@ -1,4 +0,0 @@
|
|||
import type { JobAction } from "./JobAction";
|
||||
import type { JobStatus } from "./JobStatus";
|
||||
|
||||
export interface JobResource { id: bigint, client_id: bigint, action: JobAction, status: JobStatus, percentage_complete: bigint, task_count: bigint, message: string, completed_task_count: bigint, date_created: string, date_modified: string, }
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
export type JobStatus = "Queued" | "Running" | "Completed" | "Canceled" | "Failed";
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
export interface LibraryState { library_uuid: string, library_path: string, offline: boolean, }
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
export interface LocationResource { id: number, name: string | null, path: string | null, total_capacity: number | null, available_capacity: number | null, is_removable: boolean, is_ejectable: boolean, is_root_filesystem: boolean, is_online: boolean, date_created: string, }
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
export interface Volume { name: string, mount_point: string, total_capacity: bigint, available_capacity: bigint, is_removable: boolean, disk_type: string | null, file_system: string | null, is_root_filesystem: boolean, }
|
|
@ -4,17 +4,12 @@ export * from './bindings/ClientState';
|
|||
export * from './bindings/CoreEvent';
|
||||
export * from './bindings/CoreResource';
|
||||
export * from './bindings/CoreResponse';
|
||||
export * from './bindings/Directory';
|
||||
export * from './bindings/DirectoryWithContents';
|
||||
export * from './bindings/EncryptionAlgorithm';
|
||||
export * from './bindings/File';
|
||||
export * from './bindings/FilePath';
|
||||
export * from './bindings/FileResource';
|
||||
export * from './bindings/FileType';
|
||||
export * from './bindings/JobAction';
|
||||
export * from './bindings/JobMetadata';
|
||||
export * from './bindings/JobReport';
|
||||
export * from './bindings/JobResource';
|
||||
export * from './bindings/JobStatus';
|
||||
export * from './bindings/LibraryState';
|
||||
export * from './bindings/LocationResource';
|
||||
|
|
28814
core/src/prisma.rs
28814
core/src/prisma.rs
File diff suppressed because one or more lines are too long
|
@ -21,8 +21,8 @@
|
|||
]
|
||||
},
|
||||
"scripts": {
|
||||
"prepare": "pnpm db:gen && pnpm core codegen",
|
||||
"build": "turbo run build",
|
||||
"setup": "pnpm i && pnpm db:gen && pnpm dev",
|
||||
"dev": "turbo run dev --parallel --scope=@sd/desktop --scope=@sd/client --scope=@sd/ui",
|
||||
"db:migrate": "cd packages/core && prisma migrate dev",
|
||||
"db:gen": "pnpm core prisma generate",
|
||||
|
|
Loading…
Reference in a new issue