Configure line-endings
This commit is contained in:
parent
087d38f570
commit
d885646f39
3 changed files with 24 additions and 17 deletions
|
|
@ -40,16 +40,22 @@ export class SyncClient {
|
|||
return this._database.length;
|
||||
}
|
||||
|
||||
public static async create(
|
||||
fs: FileSystemOperations,
|
||||
public static async create({
|
||||
fs,
|
||||
persistence,
|
||||
fetch = globalThis.fetch,
|
||||
nativeLineEndings = "\n"
|
||||
}: {
|
||||
fs: FileSystemOperations;
|
||||
persistence: PersistenceProvider<
|
||||
Partial<{
|
||||
settings: Partial<SyncSettings>;
|
||||
database: Partial<StoredDatabase>;
|
||||
}>
|
||||
>,
|
||||
fetch: typeof globalThis.fetch = globalThis.fetch
|
||||
): Promise<SyncClient> {
|
||||
>;
|
||||
fetch?: typeof globalThis.fetch;
|
||||
nativeLineEndings?: string;
|
||||
}): Promise<SyncClient> {
|
||||
const logger = new Logger();
|
||||
logger.info("Starting SyncClient");
|
||||
|
||||
|
|
@ -91,7 +97,7 @@ export class SyncClient {
|
|||
database,
|
||||
settings,
|
||||
syncService,
|
||||
new FileOperations(logger, database, fs),
|
||||
new FileOperations(logger, database, fs, nativeLineEndings),
|
||||
history
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue