sliftutils 0.47.0 → 0.48.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sliftutils",
3
- "version": "0.47.0",
3
+ "version": "0.48.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -10,6 +10,20 @@ import { getFileStorageIndexDB } from "./IndexedDBFileFolderAPI";
10
10
  import fs from "fs";
11
11
  import path from "path";
12
12
 
13
+ interface Window {
14
+ showSaveFilePicker(config?: {
15
+ types: {
16
+ description: string; accept: { [mimeType: string]: string[] }
17
+ }[];
18
+ }): Promise<FileSystemFileHandle>;
19
+ showDirectoryPicker(): Promise<FileSystemDirectoryHandle>;
20
+ showOpenFilePicker(config?: {
21
+ types: {
22
+ description: string; accept: { [mimeType: string]: string[] }
23
+ }[];
24
+ }): Promise<FileSystemFileHandle[]>;
25
+ }
26
+
13
27
  // NOTE: IndexedDB is required for iOS, at least. We MIGHT want to make
14
28
  // this a user supported toggle too, so they can choose during runtime if they want it.
15
29
  // DO NOT enable this is isNode
@@ -488,6 +488,7 @@ export class TransactionStorage implements IStorage<Buffer> {
488
488
  throw new Error(`Failed to verify transaction file ${file} in ${this.debugName}`);
489
489
  }
490
490
  }
491
+ // Delay, because we want to be absolutely certain that all the writes have finished before deleting the old files.
491
492
  await delay(5000);
492
493
  if (!isNode()) {
493
494
  localStorage.setItem(`${this.debugName}-last-compress`, JSON.stringify({