mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-04-11 11:28:44 +00:00
- Some JWT notes have been added to the setting dialogue (#742). ### Fixed - No longer wrong values encoded into the QR code. - We can acknowledge why the QR codes have not been generated. ### Refactored - Some dependencies have been updated. - Internal functions have been modularised into `octagonal-wheels` packages and are well tested. - Fixed importing from the parent project in library codes. (#729).
70 lines
1.6 KiB
TypeScript
70 lines
1.6 KiB
TypeScript
import { type PluginManifest, TFile } from "../deps.ts";
|
|
import { type DatabaseEntry, type EntryBody, type FilePath } from "../lib/src/common/types.ts";
|
|
export type { CacheData, FileEventItem } from "../lib/src/common/types.ts";
|
|
|
|
export interface PluginDataEntry extends DatabaseEntry {
|
|
deviceVaultName: string;
|
|
mtime: number;
|
|
manifest: PluginManifest;
|
|
mainJs: string;
|
|
manifestJson: string;
|
|
styleCss?: string;
|
|
// it must be encrypted.
|
|
dataJson?: string;
|
|
_conflicts?: string[];
|
|
type: "plugin";
|
|
}
|
|
|
|
export interface PluginList {
|
|
[key: string]: PluginDataEntry[];
|
|
}
|
|
|
|
export interface DevicePluginList {
|
|
[key: string]: PluginDataEntry;
|
|
}
|
|
export const PERIODIC_PLUGIN_SWEEP = 60;
|
|
|
|
export interface InternalFileInfo {
|
|
path: FilePath;
|
|
mtime: number;
|
|
ctime: number;
|
|
size: number;
|
|
deleted?: boolean;
|
|
}
|
|
|
|
export interface FileInfo {
|
|
path: FilePath;
|
|
mtime: number;
|
|
ctime: number;
|
|
size: number;
|
|
deleted?: boolean;
|
|
file: TFile;
|
|
}
|
|
|
|
export type queueItem = {
|
|
entry: EntryBody;
|
|
missingChildren: string[];
|
|
timeout?: number;
|
|
done?: boolean;
|
|
warned?: boolean;
|
|
};
|
|
|
|
// Hidden items (Now means `chunk`)
|
|
export const CHeader = "h:";
|
|
|
|
// Plug-in Stored Container (Obsolete)
|
|
export const PSCHeader = "ps:";
|
|
export const PSCHeaderEnd = "ps;";
|
|
|
|
// Internal data Container
|
|
export const ICHeader = "i:";
|
|
export const ICHeaderEnd = "i;";
|
|
export const ICHeaderLength = ICHeader.length;
|
|
|
|
// Internal data Container (eXtended)
|
|
export const ICXHeader = "ix:";
|
|
|
|
export const FileWatchEventQueueMax = 10;
|
|
|
|
export { configURIBase, configURIBaseQR } from "../lib/src/common/types.ts";
|