sliftutils 0.37.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/storage/DiskCollection.d.ts +1 -1
- package/storage/DiskCollection.ts +2 -2
package/index.d.ts
CHANGED
|
@@ -473,7 +473,7 @@ declare module "sliftutils/storage/DiskCollection" {
|
|
|
473
473
|
constructor(collectionName: string, config?: {
|
|
474
474
|
writeDelay?: number | undefined;
|
|
475
475
|
cbor?: boolean | undefined;
|
|
476
|
-
|
|
476
|
+
noPrompt?: boolean | undefined;
|
|
477
477
|
} | undefined);
|
|
478
478
|
transactionStorage: TransactionStorage | undefined;
|
|
479
479
|
initStorage(): Promise<IStorage<T>>;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ export declare class DiskCollection<T> implements IStorageSync<T> {
|
|
|
9
9
|
constructor(collectionName: string, config?: {
|
|
10
10
|
writeDelay?: number | undefined;
|
|
11
11
|
cbor?: boolean | undefined;
|
|
12
|
-
|
|
12
|
+
noPrompt?: boolean | undefined;
|
|
13
13
|
} | undefined);
|
|
14
14
|
transactionStorage: TransactionStorage | undefined;
|
|
15
15
|
initStorage(): Promise<IStorage<T>>;
|
|
@@ -17,7 +17,7 @@ export class DiskCollection<T> implements IStorageSync<T> {
|
|
|
17
17
|
private config?: {
|
|
18
18
|
writeDelay?: number;
|
|
19
19
|
cbor?: boolean;
|
|
20
|
-
|
|
20
|
+
noPrompt?: boolean;
|
|
21
21
|
}
|
|
22
22
|
) {
|
|
23
23
|
}
|
|
@@ -26,7 +26,7 @@ export class DiskCollection<T> implements IStorageSync<T> {
|
|
|
26
26
|
// If a Chrome extension, just return null.
|
|
27
27
|
if (isInChromeExtension()) return null as any;
|
|
28
28
|
let curCollection: IStorageRaw;
|
|
29
|
-
if (this.config?.
|
|
29
|
+
if (this.config?.noPrompt && !isNode()) {
|
|
30
30
|
curCollection = await new PrivateFileSystemStorage(`collections/${this.collectionName}`);
|
|
31
31
|
} else {
|
|
32
32
|
let fileStorage = await getFileStorage();
|