@fgv/ts-web-extras 5.0.2 → 5.1.0-1
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/.rush/temp/chunked-rush-logs/ts-web-extras.build.chunks.jsonl +58 -25
- package/.rush/temp/chunked-rush-logs/ts-web-extras.test.chunks.jsonl +70 -0
- package/.rush/temp/operation/build/all.log +58 -25
- package/.rush/temp/operation/build/error.log +18 -0
- package/.rush/temp/operation/build/log-chunks.jsonl +58 -25
- package/.rush/temp/operation/build/state.json +1 -1
- package/.rush/temp/operation/test/all.log +70 -0
- package/.rush/temp/operation/test/error.log +16 -0
- package/.rush/temp/operation/test/log-chunks.jsonl +70 -0
- package/.rush/temp/operation/test/state.json +3 -0
- package/.rush/temp/shrinkwrap-deps.json +175 -163
- package/config/jest.config.json +4 -1
- package/config/typedoc.json +6 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/packlets/crypto-utils/browserCryptoProvider.js +254 -0
- package/dist/packlets/crypto-utils/browserCryptoProvider.js.map +1 -0
- package/dist/packlets/crypto-utils/browserHashProvider.js.map +1 -0
- package/dist/packlets/{crypto → crypto-utils}/index.js +1 -0
- package/dist/packlets/crypto-utils/index.js.map +1 -0
- package/dist/packlets/file-api-types/index.js +27 -3
- package/dist/packlets/file-api-types/index.js.map +1 -1
- package/dist/packlets/file-tree/directoryHandleStore.js +124 -0
- package/dist/packlets/file-tree/directoryHandleStore.js.map +1 -0
- package/dist/packlets/file-tree/fileApiTreeAccessors.js +91 -0
- package/dist/packlets/file-tree/fileApiTreeAccessors.js.map +1 -1
- package/dist/packlets/file-tree/fileSystemAccessTreeAccessors.js +414 -0
- package/dist/packlets/file-tree/fileSystemAccessTreeAccessors.js.map +1 -0
- package/dist/packlets/file-tree/httpTreeAccessors.js +279 -0
- package/dist/packlets/file-tree/httpTreeAccessors.js.map +1 -0
- package/dist/packlets/file-tree/index.js +4 -0
- package/dist/packlets/file-tree/index.js.map +1 -1
- package/dist/packlets/file-tree/localStorageTreeAccessors.js +359 -0
- package/dist/packlets/file-tree/localStorageTreeAccessors.js.map +1 -0
- package/dist/test/mocks/idb-keyval.js +6 -0
- package/dist/test/mocks/idb-keyval.js.map +1 -0
- package/dist/test/unit/browserHashProvider.test.js +1 -1
- package/dist/test/unit/browserHashProvider.test.js.map +1 -1
- package/dist/test/unit/directoryHandleStore.test.js +190 -0
- package/dist/test/unit/directoryHandleStore.test.js.map +1 -0
- package/dist/test/unit/fileApiTreeAccessors.test.js +51 -0
- package/dist/test/unit/fileApiTreeAccessors.test.js.map +1 -1
- package/dist/test/unit/fileApiTypes.test.js +30 -0
- package/dist/test/unit/fileApiTypes.test.js.map +1 -1
- package/dist/test/unit/fileSystemAccessTreeAccessors.test.js +622 -0
- package/dist/test/unit/fileSystemAccessTreeAccessors.test.js.map +1 -0
- package/dist/test/unit/httpTreeAccessors.test.js +1000 -0
- package/dist/test/unit/httpTreeAccessors.test.js.map +1 -0
- package/dist/test/unit/localStorageTreeAccessors.test.js +812 -0
- package/dist/test/unit/localStorageTreeAccessors.test.js.map +1 -0
- package/dist/test/utils/fileSystemAccessMocks.js +271 -0
- package/dist/test/utils/fileSystemAccessMocks.js.map +1 -0
- package/dist/ts-web-extras.d.ts +584 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/docs/@fgv/namespaces/CryptoUtils/README.md +18 -0
- package/docs/@fgv/namespaces/CryptoUtils/classes/BrowserCryptoProvider.md +203 -0
- package/docs/@fgv/namespaces/CryptoUtils/classes/BrowserHashProvider.md +63 -0
- package/docs/@fgv/namespaces/CryptoUtils/functions/createBrowserCryptoProvider.md +18 -0
- package/docs/@fgv/namespaces/FileTreeHelpers/README.md +19 -0
- package/docs/@fgv/namespaces/FileTreeHelpers/functions/extractFileListMetadata.md +23 -0
- package/docs/@fgv/namespaces/FileTreeHelpers/functions/extractFileMetadata.md +23 -0
- package/docs/@fgv/namespaces/FileTreeHelpers/functions/fromDirectoryUpload.md +33 -0
- package/docs/@fgv/namespaces/FileTreeHelpers/functions/fromFileList.md +33 -0
- package/docs/@fgv/namespaces/FileTreeHelpers/functions/getOriginalFile.md +25 -0
- package/docs/@fgv/namespaces/FileTreeHelpers/variables/defaultFileApiTreeInitParams.md +11 -0
- package/docs/README.md +78 -0
- package/docs/classes/DirectoryHandleStore.md +116 -0
- package/docs/classes/FileApiTreeAccessors.md +286 -0
- package/docs/classes/FileSystemAccessTreeAccessors.md +557 -0
- package/docs/classes/HttpTreeAccessors.md +508 -0
- package/docs/classes/LocalStorageTreeAccessors.md +520 -0
- package/docs/functions/exportAsJson.md +23 -0
- package/docs/functions/exportUsingFileSystemAPI.md +26 -0
- package/docs/functions/extractDirectoryPath.md +23 -0
- package/docs/functions/isDirectoryHandle.md +23 -0
- package/docs/functions/isFileHandle.md +23 -0
- package/docs/functions/isFilePath.md +21 -0
- package/docs/functions/parseContextFilter.md +22 -0
- package/docs/functions/parseQualifierDefaults.md +22 -0
- package/docs/functions/parseResourceTypes.md +22 -0
- package/docs/functions/parseUrlParameters.md +15 -0
- package/docs/functions/safeShowDirectoryPicker.md +24 -0
- package/docs/functions/safeShowOpenFilePicker.md +24 -0
- package/docs/functions/safeShowSaveFilePicker.md +24 -0
- package/docs/functions/supportsFileSystemAccess.md +23 -0
- package/docs/interfaces/FilePickerAcceptType.md +16 -0
- package/docs/interfaces/FileSystemCreateWritableOptions.md +15 -0
- package/docs/interfaces/FileSystemDirectoryHandle.md +187 -0
- package/docs/interfaces/FileSystemFileHandle.md +106 -0
- package/docs/interfaces/FileSystemGetDirectoryOptions.md +15 -0
- package/docs/interfaces/FileSystemGetFileOptions.md +15 -0
- package/docs/interfaces/FileSystemHandle.md +69 -0
- package/docs/interfaces/FileSystemHandlePermissionDescriptor.md +15 -0
- package/docs/interfaces/FileSystemRemoveOptions.md +15 -0
- package/docs/interfaces/FileSystemWritableFileStream.md +127 -0
- package/docs/interfaces/IDirectoryHandleTreeInitializer.md +17 -0
- package/docs/interfaces/IFileHandleTreeInitializer.md +16 -0
- package/docs/interfaces/IFileListTreeInitializer.md +15 -0
- package/docs/interfaces/IFileMetadata.md +19 -0
- package/docs/interfaces/IFileSystemAccessTreeParams.md +30 -0
- package/docs/interfaces/IFsAccessApis.md +57 -0
- package/docs/interfaces/IHttpTreeParams.md +32 -0
- package/docs/interfaces/ILocalStorageTreeParams.md +30 -0
- package/docs/interfaces/IUrlConfigOptions.md +27 -0
- package/docs/interfaces/ShowDirectoryPickerOptions.md +17 -0
- package/docs/interfaces/ShowOpenFilePickerOptions.md +19 -0
- package/docs/interfaces/ShowSaveFilePickerOptions.md +19 -0
- package/docs/type-aliases/TreeInitializer.md +11 -0
- package/docs/type-aliases/WellKnownDirectory.md +11 -0
- package/docs/type-aliases/WindowWithFsAccess.md +11 -0
- package/docs/variables/DEFAULT_DIRECTORY_HANDLE_DB.md +11 -0
- package/docs/variables/DEFAULT_DIRECTORY_HANDLE_STORE.md +11 -0
- package/etc/ts-web-extras.api.md +124 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +25 -2
- package/lib/index.js.map +1 -1
- package/lib/packlets/crypto-utils/browserCryptoProvider.d.ts +77 -0
- package/lib/packlets/crypto-utils/browserCryptoProvider.d.ts.map +1 -0
- package/lib/packlets/crypto-utils/browserCryptoProvider.js +259 -0
- package/lib/packlets/crypto-utils/browserCryptoProvider.js.map +1 -0
- package/lib/packlets/crypto-utils/browserHashProvider.d.ts.map +1 -0
- package/lib/packlets/crypto-utils/browserHashProvider.js.map +1 -0
- package/lib/packlets/{crypto → crypto-utils}/index.d.ts +1 -0
- package/lib/packlets/crypto-utils/index.d.ts.map +1 -0
- package/lib/packlets/{crypto → crypto-utils}/index.js +1 -0
- package/lib/packlets/crypto-utils/index.js.map +1 -0
- package/lib/packlets/file-api-types/index.d.ts.map +1 -1
- package/lib/packlets/file-api-types/index.js +27 -3
- package/lib/packlets/file-api-types/index.js.map +1 -1
- package/lib/packlets/file-tree/directoryHandleStore.d.ts +59 -0
- package/lib/packlets/file-tree/directoryHandleStore.d.ts.map +1 -0
- package/lib/packlets/file-tree/directoryHandleStore.js +128 -0
- package/lib/packlets/file-tree/directoryHandleStore.js.map +1 -0
- package/lib/packlets/file-tree/fileApiTreeAccessors.d.ts +66 -0
- package/lib/packlets/file-tree/fileApiTreeAccessors.d.ts.map +1 -1
- package/lib/packlets/file-tree/fileApiTreeAccessors.js +91 -0
- package/lib/packlets/file-tree/fileApiTreeAccessors.js.map +1 -1
- package/lib/packlets/file-tree/fileSystemAccessTreeAccessors.d.ts +152 -0
- package/lib/packlets/file-tree/fileSystemAccessTreeAccessors.d.ts.map +1 -0
- package/lib/packlets/file-tree/fileSystemAccessTreeAccessors.js +418 -0
- package/lib/packlets/file-tree/fileSystemAccessTreeAccessors.js.map +1 -0
- package/lib/packlets/file-tree/httpTreeAccessors.d.ts +88 -0
- package/lib/packlets/file-tree/httpTreeAccessors.d.ts.map +1 -0
- package/lib/packlets/file-tree/httpTreeAccessors.js +283 -0
- package/lib/packlets/file-tree/httpTreeAccessors.js.map +1 -0
- package/lib/packlets/file-tree/index.d.ts +4 -0
- package/lib/packlets/file-tree/index.d.ts.map +1 -1
- package/lib/packlets/file-tree/index.js +4 -0
- package/lib/packlets/file-tree/index.js.map +1 -1
- package/lib/packlets/file-tree/localStorageTreeAccessors.d.ts +141 -0
- package/lib/packlets/file-tree/localStorageTreeAccessors.d.ts.map +1 -0
- package/lib/packlets/file-tree/localStorageTreeAccessors.js +363 -0
- package/lib/packlets/file-tree/localStorageTreeAccessors.js.map +1 -0
- package/lib/test/mocks/idb-keyval.d.ts +6 -0
- package/lib/test/mocks/idb-keyval.d.ts.map +1 -0
- package/lib/test/mocks/idb-keyval.js +9 -0
- package/lib/test/mocks/idb-keyval.js.map +1 -0
- package/lib/test/unit/browserHashProvider.test.js +21 -21
- package/lib/test/unit/browserHashProvider.test.js.map +1 -1
- package/lib/test/unit/directoryHandleStore.test.d.ts +2 -0
- package/lib/test/unit/directoryHandleStore.test.d.ts.map +1 -0
- package/lib/test/unit/directoryHandleStore.test.js +192 -0
- package/lib/test/unit/directoryHandleStore.test.js.map +1 -0
- package/lib/test/unit/fileApiTreeAccessors.test.js +51 -0
- package/lib/test/unit/fileApiTreeAccessors.test.js.map +1 -1
- package/lib/test/unit/fileApiTypes.test.js +30 -0
- package/lib/test/unit/fileApiTypes.test.js.map +1 -1
- package/lib/test/unit/fileSystemAccessTreeAccessors.test.d.ts +2 -0
- package/lib/test/unit/fileSystemAccessTreeAccessors.test.d.ts.map +1 -0
- package/lib/test/unit/fileSystemAccessTreeAccessors.test.js +624 -0
- package/lib/test/unit/fileSystemAccessTreeAccessors.test.js.map +1 -0
- package/lib/test/unit/httpTreeAccessors.test.d.ts +2 -0
- package/lib/test/unit/httpTreeAccessors.test.d.ts.map +1 -0
- package/lib/test/unit/httpTreeAccessors.test.js +1002 -0
- package/lib/test/unit/httpTreeAccessors.test.js.map +1 -0
- package/lib/test/unit/localStorageTreeAccessors.test.d.ts +2 -0
- package/lib/test/unit/localStorageTreeAccessors.test.d.ts.map +1 -0
- package/lib/test/unit/localStorageTreeAccessors.test.js +814 -0
- package/lib/test/unit/localStorageTreeAccessors.test.js.map +1 -0
- package/lib/test/utils/fileSystemAccessMocks.d.ts +53 -0
- package/lib/test/utils/fileSystemAccessMocks.d.ts.map +1 -0
- package/lib/test/utils/fileSystemAccessMocks.js +277 -0
- package/lib/test/utils/fileSystemAccessMocks.js.map +1 -0
- package/package.json +41 -34
- package/rush-logs/ts-web-extras.build.cache.log +0 -1
- package/rush-logs/ts-web-extras.build.error.log +18 -0
- package/rush-logs/ts-web-extras.build.log +58 -25
- package/rush-logs/ts-web-extras.test.cache.log +1 -0
- package/rush-logs/ts-web-extras.test.error.log +16 -0
- package/rush-logs/ts-web-extras.test.log +70 -0
- package/src/index.ts +2 -2
- package/src/packlets/crypto-utils/browserCryptoProvider.ts +311 -0
- package/src/packlets/{crypto → crypto-utils}/index.ts +1 -0
- package/src/packlets/file-api-types/index.ts +24 -3
- package/src/packlets/file-tree/directoryHandleStore.ts +136 -0
- package/src/packlets/file-tree/fileApiTreeAccessors.ts +108 -0
- package/src/packlets/file-tree/fileSystemAccessTreeAccessors.ts +519 -0
- package/src/packlets/file-tree/httpTreeAccessors.ts +381 -0
- package/src/packlets/file-tree/index.ts +4 -0
- package/src/packlets/file-tree/localStorageTreeAccessors.ts +430 -0
- package/src/test/mocks/idb-keyval.ts +5 -0
- package/src/test/unit/browserHashProvider.test.ts +1 -1
- package/src/test/unit/directoryHandleStore.test.ts +251 -0
- package/src/test/unit/fileApiTreeAccessors.test.ts +69 -0
- package/src/test/unit/fileApiTypes.test.ts +36 -0
- package/src/test/unit/fileSystemAccessTreeAccessors.test.ts +885 -0
- package/src/test/unit/httpTreeAccessors.test.ts +1278 -0
- package/src/test/unit/localStorageTreeAccessors.test.ts +1014 -0
- package/src/test/utils/fileSystemAccessMocks.ts +353 -0
- package/temp/build/typescript/ts_8nwakTlr.json +1 -0
- package/temp/coverage/crypto/browserHashProvider.ts.html +1 -1
- package/temp/coverage/crypto/index.html +1 -1
- package/temp/coverage/crypto-utils/browserCryptoProvider.ts.html +1018 -0
- package/temp/coverage/crypto-utils/browserHashProvider.ts.html +304 -0
- package/temp/coverage/crypto-utils/index.html +131 -0
- package/temp/coverage/file-tree/directoryHandleStore.ts.html +493 -0
- package/temp/coverage/file-tree/fileApiTreeAccessors.ts.html +330 -6
- package/temp/coverage/file-tree/fileSystemAccessTreeAccessors.ts.html +1642 -0
- package/temp/coverage/file-tree/httpTreeAccessors.ts.html +1228 -0
- package/temp/coverage/file-tree/index.html +69 -9
- package/temp/coverage/file-tree/localStorageTreeAccessors.ts.html +1375 -0
- package/temp/coverage/helpers/fileTreeHelpers.ts.html +1 -1
- package/temp/coverage/helpers/index.html +1 -1
- package/temp/coverage/index.html +13 -13
- package/temp/coverage/lcov-report/crypto/browserHashProvider.ts.html +1 -1
- package/temp/coverage/lcov-report/crypto/index.html +1 -1
- package/temp/coverage/lcov-report/crypto-utils/browserCryptoProvider.ts.html +1018 -0
- package/temp/coverage/lcov-report/crypto-utils/browserHashProvider.ts.html +304 -0
- package/temp/coverage/lcov-report/crypto-utils/index.html +131 -0
- package/temp/coverage/lcov-report/file-tree/directoryHandleStore.ts.html +493 -0
- package/temp/coverage/lcov-report/file-tree/fileApiTreeAccessors.ts.html +330 -6
- package/temp/coverage/lcov-report/file-tree/fileSystemAccessTreeAccessors.ts.html +1642 -0
- package/temp/coverage/lcov-report/file-tree/httpTreeAccessors.ts.html +1228 -0
- package/temp/coverage/lcov-report/file-tree/index.html +69 -9
- package/temp/coverage/lcov-report/file-tree/localStorageTreeAccessors.ts.html +1375 -0
- package/temp/coverage/lcov-report/helpers/fileTreeHelpers.ts.html +1 -1
- package/temp/coverage/lcov-report/helpers/index.html +1 -1
- package/temp/coverage/lcov-report/index.html +13 -13
- package/temp/coverage/lcov-report/url-utils/index.html +1 -1
- package/temp/coverage/lcov-report/url-utils/urlParams.ts.html +1 -1
- package/temp/coverage/lcov.info +2829 -428
- package/temp/coverage/url-utils/index.html +1 -1
- package/temp/coverage/url-utils/urlParams.ts.html +1 -1
- package/temp/test/jest/haste-map-b931e4e63102f86c5bd4949f7dced44f-9d713eb41149188b4e5c0ae3d86d0a57-2ad8e16b24e391b8cdbe50b55c137169 +0 -0
- package/temp/test/jest/perf-cache-b931e4e63102f86c5bd4949f7dced44f-da39a3ee5e6b4b0d3255bfef95601890 +1 -0
- package/temp/ts-web-extras.api.json +5282 -1472
- package/temp/ts-web-extras.api.md +124 -1
- package/dist/packlets/crypto/browserHashProvider.js.map +0 -1
- package/dist/packlets/crypto/index.js.map +0 -1
- package/docs/index.md +0 -34
- package/docs/ts-web-extras.browserhashprovider.hashparts.md +0 -88
- package/docs/ts-web-extras.browserhashprovider.hashstring.md +0 -72
- package/docs/ts-web-extras.browserhashprovider.md +0 -66
- package/docs/ts-web-extras.exportasjson.md +0 -70
- package/docs/ts-web-extras.exportusingfilesystemapi.md +0 -104
- package/docs/ts-web-extras.extractdirectorypath.md +0 -52
- package/docs/ts-web-extras.fileapitreeaccessors.create.md +0 -72
- package/docs/ts-web-extras.fileapitreeaccessors.extractfilemetadata.md +0 -54
- package/docs/ts-web-extras.fileapitreeaccessors.fromdirectoryupload.md +0 -72
- package/docs/ts-web-extras.fileapitreeaccessors.fromfilelist.md +0 -72
- package/docs/ts-web-extras.fileapitreeaccessors.getoriginalfile.md +0 -72
- package/docs/ts-web-extras.fileapitreeaccessors.md +0 -114
- package/docs/ts-web-extras.filepickeraccepttype.accept.md +0 -11
- package/docs/ts-web-extras.filepickeraccepttype.description.md +0 -11
- package/docs/ts-web-extras.filepickeraccepttype.md +0 -75
- package/docs/ts-web-extras.filesystemcreatewritableoptions_2.keepexistingdata.md +0 -11
- package/docs/ts-web-extras.filesystemcreatewritableoptions_2.md +0 -58
- package/docs/ts-web-extras.filesystemdirectoryhandle_2._symbol.asynciterator_.md +0 -15
- package/docs/ts-web-extras.filesystemdirectoryhandle_2.entries.md +0 -15
- package/docs/ts-web-extras.filesystemdirectoryhandle_2.getdirectoryhandle.md +0 -66
- package/docs/ts-web-extras.filesystemdirectoryhandle_2.getfilehandle.md +0 -66
- package/docs/ts-web-extras.filesystemdirectoryhandle_2.keys.md +0 -15
- package/docs/ts-web-extras.filesystemdirectoryhandle_2.kind.md +0 -11
- package/docs/ts-web-extras.filesystemdirectoryhandle_2.md +0 -146
- package/docs/ts-web-extras.filesystemdirectoryhandle_2.removeentry.md +0 -66
- package/docs/ts-web-extras.filesystemdirectoryhandle_2.resolve.md +0 -50
- package/docs/ts-web-extras.filesystemdirectoryhandle_2.values.md +0 -15
- package/docs/ts-web-extras.filesystemfilehandle_2.createwritable.md +0 -52
- package/docs/ts-web-extras.filesystemfilehandle_2.getfile.md +0 -15
- package/docs/ts-web-extras.filesystemfilehandle_2.kind.md +0 -11
- package/docs/ts-web-extras.filesystemfilehandle_2.md +0 -92
- package/docs/ts-web-extras.filesystemgetdirectoryoptions_2.create.md +0 -11
- package/docs/ts-web-extras.filesystemgetdirectoryoptions_2.md +0 -58
- package/docs/ts-web-extras.filesystemgetfileoptions_2.create.md +0 -11
- package/docs/ts-web-extras.filesystemgetfileoptions_2.md +0 -58
- package/docs/ts-web-extras.filesystemhandle_2.issameentry.md +0 -50
- package/docs/ts-web-extras.filesystemhandle_2.kind.md +0 -11
- package/docs/ts-web-extras.filesystemhandle_2.md +0 -119
- package/docs/ts-web-extras.filesystemhandle_2.name.md +0 -11
- package/docs/ts-web-extras.filesystemhandle_2.querypermission.md +0 -52
- package/docs/ts-web-extras.filesystemhandle_2.requestpermission.md +0 -52
- package/docs/ts-web-extras.filesystemhandlepermissiondescriptor.md +0 -58
- package/docs/ts-web-extras.filesystemhandlepermissiondescriptor.mode.md +0 -11
- package/docs/ts-web-extras.filesystemremoveoptions_2.md +0 -58
- package/docs/ts-web-extras.filesystemremoveoptions_2.recursive.md +0 -11
- package/docs/ts-web-extras.filesystemwritablefilestream_2.md +0 -57
- package/docs/ts-web-extras.filesystemwritablefilestream_2.seek.md +0 -50
- package/docs/ts-web-extras.filesystemwritablefilestream_2.truncate.md +0 -50
- package/docs/ts-web-extras.filesystemwritablefilestream_2.write.md +0 -50
- package/docs/ts-web-extras.filetreehelpers.defaultfileapitreeinitparams.md +0 -13
- package/docs/ts-web-extras.filetreehelpers.extractfilelistmetadata.md +0 -56
- package/docs/ts-web-extras.filetreehelpers.extractfilemetadata.md +0 -56
- package/docs/ts-web-extras.filetreehelpers.fromdirectoryupload.md +0 -76
- package/docs/ts-web-extras.filetreehelpers.fromfilelist.md +0 -76
- package/docs/ts-web-extras.filetreehelpers.getoriginalfile.md +0 -72
- package/docs/ts-web-extras.filetreehelpers.md +0 -102
- package/docs/ts-web-extras.idirectoryhandletreeinitializer.dirhandles.md +0 -11
- package/docs/ts-web-extras.idirectoryhandletreeinitializer.md +0 -100
- package/docs/ts-web-extras.idirectoryhandletreeinitializer.nonrecursive.md +0 -11
- package/docs/ts-web-extras.idirectoryhandletreeinitializer.prefix.md +0 -11
- package/docs/ts-web-extras.ifilehandletreeinitializer.filehandles.md +0 -11
- package/docs/ts-web-extras.ifilehandletreeinitializer.md +0 -79
- package/docs/ts-web-extras.ifilehandletreeinitializer.prefix.md +0 -11
- package/docs/ts-web-extras.ifilelisttreeinitializer.filelist.md +0 -11
- package/docs/ts-web-extras.ifilelisttreeinitializer.md +0 -58
- package/docs/ts-web-extras.ifilemetadata.lastmodified.md +0 -11
- package/docs/ts-web-extras.ifilemetadata.md +0 -124
- package/docs/ts-web-extras.ifilemetadata.name.md +0 -11
- package/docs/ts-web-extras.ifilemetadata.path.md +0 -11
- package/docs/ts-web-extras.ifilemetadata.size.md +0 -11
- package/docs/ts-web-extras.ifilemetadata.type.md +0 -11
- package/docs/ts-web-extras.ifsaccessapis.md +0 -56
- package/docs/ts-web-extras.ifsaccessapis.showdirectorypicker.md +0 -52
- package/docs/ts-web-extras.ifsaccessapis.showopenfilepicker.md +0 -52
- package/docs/ts-web-extras.ifsaccessapis.showsavefilepicker.md +0 -52
- package/docs/ts-web-extras.isdirectoryhandle.md +0 -56
- package/docs/ts-web-extras.isfilehandle.md +0 -56
- package/docs/ts-web-extras.isfilepath.md +0 -52
- package/docs/ts-web-extras.iurlconfigoptions.config.md +0 -13
- package/docs/ts-web-extras.iurlconfigoptions.configstartdir.md +0 -13
- package/docs/ts-web-extras.iurlconfigoptions.contextfilter.md +0 -13
- package/docs/ts-web-extras.iurlconfigoptions.input.md +0 -13
- package/docs/ts-web-extras.iurlconfigoptions.inputstartdir.md +0 -13
- package/docs/ts-web-extras.iurlconfigoptions.interactive.md +0 -13
- package/docs/ts-web-extras.iurlconfigoptions.loadzip.md +0 -13
- package/docs/ts-web-extras.iurlconfigoptions.maxdistance.md +0 -13
- package/docs/ts-web-extras.iurlconfigoptions.md +0 -286
- package/docs/ts-web-extras.iurlconfigoptions.qualifierdefaults.md +0 -13
- package/docs/ts-web-extras.iurlconfigoptions.reducequalifiers.md +0 -13
- package/docs/ts-web-extras.iurlconfigoptions.resourcetypes.md +0 -13
- package/docs/ts-web-extras.iurlconfigoptions.zipfile.md +0 -13
- package/docs/ts-web-extras.iurlconfigoptions.zippath.md +0 -13
- package/docs/ts-web-extras.md +0 -512
- package/docs/ts-web-extras.parsecontextfilter.md +0 -52
- package/docs/ts-web-extras.parsequalifierdefaults.md +0 -52
- package/docs/ts-web-extras.parseresourcetypes.md +0 -52
- package/docs/ts-web-extras.parseurlparameters.md +0 -17
- package/docs/ts-web-extras.safeshowdirectorypicker.md +0 -72
- package/docs/ts-web-extras.safeshowopenfilepicker.md +0 -72
- package/docs/ts-web-extras.safeshowsavefilepicker.md +0 -72
- package/docs/ts-web-extras.showdirectorypickeroptions.id.md +0 -11
- package/docs/ts-web-extras.showdirectorypickeroptions.md +0 -96
- package/docs/ts-web-extras.showdirectorypickeroptions.mode.md +0 -11
- package/docs/ts-web-extras.showdirectorypickeroptions.startin.md +0 -11
- package/docs/ts-web-extras.showopenfilepickeroptions.excludeacceptalloption.md +0 -11
- package/docs/ts-web-extras.showopenfilepickeroptions.id.md +0 -11
- package/docs/ts-web-extras.showopenfilepickeroptions.md +0 -134
- package/docs/ts-web-extras.showopenfilepickeroptions.multiple.md +0 -11
- package/docs/ts-web-extras.showopenfilepickeroptions.startin.md +0 -11
- package/docs/ts-web-extras.showopenfilepickeroptions.types.md +0 -11
- package/docs/ts-web-extras.showsavefilepickeroptions.excludeacceptalloption.md +0 -11
- package/docs/ts-web-extras.showsavefilepickeroptions.id.md +0 -11
- package/docs/ts-web-extras.showsavefilepickeroptions.md +0 -134
- package/docs/ts-web-extras.showsavefilepickeroptions.startin.md +0 -11
- package/docs/ts-web-extras.showsavefilepickeroptions.suggestedname.md +0 -11
- package/docs/ts-web-extras.showsavefilepickeroptions.types.md +0 -11
- package/docs/ts-web-extras.supportsfilesystemaccess.md +0 -56
- package/docs/ts-web-extras.treeinitializer.md +0 -15
- package/docs/ts-web-extras.wellknowndirectory.md +0 -13
- package/docs/ts-web-extras.windowwithfsaccess.md +0 -15
- package/lib/packlets/crypto/browserHashProvider.d.ts.map +0 -1
- package/lib/packlets/crypto/browserHashProvider.js.map +0 -1
- package/lib/packlets/crypto/index.d.ts.map +0 -1
- package/lib/packlets/crypto/index.js.map +0 -1
- package/temp/build/typescript/ts_vnCx6LlY.json +0 -1
- package/temp/test/jest/haste-map-7492f1b44480e0cdd1f220078fb3afd8-c8dd6c3430605adeb2f1cadf4f75e791-8c9336785555d572065b28c111982ba4 +0 -0
- package/temp/test/jest/perf-cache-7492f1b44480e0cdd1f220078fb3afd8-da39a3ee5e6b4b0d3255bfef95601890 +0 -1
- /package/dist/packlets/{crypto → crypto-utils}/browserHashProvider.js +0 -0
- /package/lib/packlets/{crypto → crypto-utils}/browserHashProvider.d.ts +0 -0
- /package/lib/packlets/{crypto → crypto-utils}/browserHashProvider.js +0 -0
- /package/src/packlets/{crypto → crypto-utils}/browserHashProvider.ts +0 -0
- /package/temp/test/jest/{jest-transform-cache-7492f1b44480e0cdd1f220078fb3afd8-79ef2876fae7ca75eedb2aa53dc48338/0e/package_0eb6535f5987849d93ea51ef33a14cf6 → jest-transform-cache-b931e4e63102f86c5bd4949f7dced44f-79ef2876fae7ca75eedb2aa53dc48338/b5/package_b5f57afc9ec2c011239b1608ee5bdfa5} +0 -0
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<title>Code coverage report for file-tree/directoryHandleStore.ts</title>
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
+
<style type='text/css'>
|
|
13
|
+
.coverage-summary .sorter {
|
|
14
|
+
background-image: url(../sort-arrow-sprite.png);
|
|
15
|
+
}
|
|
16
|
+
</style>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<div class='wrapper'>
|
|
21
|
+
<div class='pad1'>
|
|
22
|
+
<h1><a href="../index.html">All files</a> / <a href="index.html">file-tree</a> directoryHandleStore.ts</h1>
|
|
23
|
+
<div class='clearfix'>
|
|
24
|
+
|
|
25
|
+
<div class='fl pad1y space-right2'>
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
|
+
<span class="quiet">Statements</span>
|
|
28
|
+
<span class='fraction'>136/136</span>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div class='fl pad1y space-right2'>
|
|
33
|
+
<span class="strong">100% </span>
|
|
34
|
+
<span class="quiet">Branches</span>
|
|
35
|
+
<span class='fraction'>18/18</span>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
<div class='fl pad1y space-right2'>
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
|
+
<span class="quiet">Functions</span>
|
|
42
|
+
<span class='fraction'>6/6</span>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div class='fl pad1y space-right2'>
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
|
+
<span class="quiet">Lines</span>
|
|
49
|
+
<span class='fraction'>136/136</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<p class="quiet">
|
|
55
|
+
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
|
+
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
63
|
+
</div>
|
|
64
|
+
<div class='status-line high'></div>
|
|
65
|
+
<pre><table class="coverage">
|
|
66
|
+
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
|
+
<a name='L2'></a><a href='#L2'>2</a>
|
|
68
|
+
<a name='L3'></a><a href='#L3'>3</a>
|
|
69
|
+
<a name='L4'></a><a href='#L4'>4</a>
|
|
70
|
+
<a name='L5'></a><a href='#L5'>5</a>
|
|
71
|
+
<a name='L6'></a><a href='#L6'>6</a>
|
|
72
|
+
<a name='L7'></a><a href='#L7'>7</a>
|
|
73
|
+
<a name='L8'></a><a href='#L8'>8</a>
|
|
74
|
+
<a name='L9'></a><a href='#L9'>9</a>
|
|
75
|
+
<a name='L10'></a><a href='#L10'>10</a>
|
|
76
|
+
<a name='L11'></a><a href='#L11'>11</a>
|
|
77
|
+
<a name='L12'></a><a href='#L12'>12</a>
|
|
78
|
+
<a name='L13'></a><a href='#L13'>13</a>
|
|
79
|
+
<a name='L14'></a><a href='#L14'>14</a>
|
|
80
|
+
<a name='L15'></a><a href='#L15'>15</a>
|
|
81
|
+
<a name='L16'></a><a href='#L16'>16</a>
|
|
82
|
+
<a name='L17'></a><a href='#L17'>17</a>
|
|
83
|
+
<a name='L18'></a><a href='#L18'>18</a>
|
|
84
|
+
<a name='L19'></a><a href='#L19'>19</a>
|
|
85
|
+
<a name='L20'></a><a href='#L20'>20</a>
|
|
86
|
+
<a name='L21'></a><a href='#L21'>21</a>
|
|
87
|
+
<a name='L22'></a><a href='#L22'>22</a>
|
|
88
|
+
<a name='L23'></a><a href='#L23'>23</a>
|
|
89
|
+
<a name='L24'></a><a href='#L24'>24</a>
|
|
90
|
+
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
|
+
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
|
+
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
+
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
+
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
+
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
+
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
+
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
+
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
+
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
|
+
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
|
+
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
+
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
+
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
+
<a name='L39'></a><a href='#L39'>39</a>
|
|
105
|
+
<a name='L40'></a><a href='#L40'>40</a>
|
|
106
|
+
<a name='L41'></a><a href='#L41'>41</a>
|
|
107
|
+
<a name='L42'></a><a href='#L42'>42</a>
|
|
108
|
+
<a name='L43'></a><a href='#L43'>43</a>
|
|
109
|
+
<a name='L44'></a><a href='#L44'>44</a>
|
|
110
|
+
<a name='L45'></a><a href='#L45'>45</a>
|
|
111
|
+
<a name='L46'></a><a href='#L46'>46</a>
|
|
112
|
+
<a name='L47'></a><a href='#L47'>47</a>
|
|
113
|
+
<a name='L48'></a><a href='#L48'>48</a>
|
|
114
|
+
<a name='L49'></a><a href='#L49'>49</a>
|
|
115
|
+
<a name='L50'></a><a href='#L50'>50</a>
|
|
116
|
+
<a name='L51'></a><a href='#L51'>51</a>
|
|
117
|
+
<a name='L52'></a><a href='#L52'>52</a>
|
|
118
|
+
<a name='L53'></a><a href='#L53'>53</a>
|
|
119
|
+
<a name='L54'></a><a href='#L54'>54</a>
|
|
120
|
+
<a name='L55'></a><a href='#L55'>55</a>
|
|
121
|
+
<a name='L56'></a><a href='#L56'>56</a>
|
|
122
|
+
<a name='L57'></a><a href='#L57'>57</a>
|
|
123
|
+
<a name='L58'></a><a href='#L58'>58</a>
|
|
124
|
+
<a name='L59'></a><a href='#L59'>59</a>
|
|
125
|
+
<a name='L60'></a><a href='#L60'>60</a>
|
|
126
|
+
<a name='L61'></a><a href='#L61'>61</a>
|
|
127
|
+
<a name='L62'></a><a href='#L62'>62</a>
|
|
128
|
+
<a name='L63'></a><a href='#L63'>63</a>
|
|
129
|
+
<a name='L64'></a><a href='#L64'>64</a>
|
|
130
|
+
<a name='L65'></a><a href='#L65'>65</a>
|
|
131
|
+
<a name='L66'></a><a href='#L66'>66</a>
|
|
132
|
+
<a name='L67'></a><a href='#L67'>67</a>
|
|
133
|
+
<a name='L68'></a><a href='#L68'>68</a>
|
|
134
|
+
<a name='L69'></a><a href='#L69'>69</a>
|
|
135
|
+
<a name='L70'></a><a href='#L70'>70</a>
|
|
136
|
+
<a name='L71'></a><a href='#L71'>71</a>
|
|
137
|
+
<a name='L72'></a><a href='#L72'>72</a>
|
|
138
|
+
<a name='L73'></a><a href='#L73'>73</a>
|
|
139
|
+
<a name='L74'></a><a href='#L74'>74</a>
|
|
140
|
+
<a name='L75'></a><a href='#L75'>75</a>
|
|
141
|
+
<a name='L76'></a><a href='#L76'>76</a>
|
|
142
|
+
<a name='L77'></a><a href='#L77'>77</a>
|
|
143
|
+
<a name='L78'></a><a href='#L78'>78</a>
|
|
144
|
+
<a name='L79'></a><a href='#L79'>79</a>
|
|
145
|
+
<a name='L80'></a><a href='#L80'>80</a>
|
|
146
|
+
<a name='L81'></a><a href='#L81'>81</a>
|
|
147
|
+
<a name='L82'></a><a href='#L82'>82</a>
|
|
148
|
+
<a name='L83'></a><a href='#L83'>83</a>
|
|
149
|
+
<a name='L84'></a><a href='#L84'>84</a>
|
|
150
|
+
<a name='L85'></a><a href='#L85'>85</a>
|
|
151
|
+
<a name='L86'></a><a href='#L86'>86</a>
|
|
152
|
+
<a name='L87'></a><a href='#L87'>87</a>
|
|
153
|
+
<a name='L88'></a><a href='#L88'>88</a>
|
|
154
|
+
<a name='L89'></a><a href='#L89'>89</a>
|
|
155
|
+
<a name='L90'></a><a href='#L90'>90</a>
|
|
156
|
+
<a name='L91'></a><a href='#L91'>91</a>
|
|
157
|
+
<a name='L92'></a><a href='#L92'>92</a>
|
|
158
|
+
<a name='L93'></a><a href='#L93'>93</a>
|
|
159
|
+
<a name='L94'></a><a href='#L94'>94</a>
|
|
160
|
+
<a name='L95'></a><a href='#L95'>95</a>
|
|
161
|
+
<a name='L96'></a><a href='#L96'>96</a>
|
|
162
|
+
<a name='L97'></a><a href='#L97'>97</a>
|
|
163
|
+
<a name='L98'></a><a href='#L98'>98</a>
|
|
164
|
+
<a name='L99'></a><a href='#L99'>99</a>
|
|
165
|
+
<a name='L100'></a><a href='#L100'>100</a>
|
|
166
|
+
<a name='L101'></a><a href='#L101'>101</a>
|
|
167
|
+
<a name='L102'></a><a href='#L102'>102</a>
|
|
168
|
+
<a name='L103'></a><a href='#L103'>103</a>
|
|
169
|
+
<a name='L104'></a><a href='#L104'>104</a>
|
|
170
|
+
<a name='L105'></a><a href='#L105'>105</a>
|
|
171
|
+
<a name='L106'></a><a href='#L106'>106</a>
|
|
172
|
+
<a name='L107'></a><a href='#L107'>107</a>
|
|
173
|
+
<a name='L108'></a><a href='#L108'>108</a>
|
|
174
|
+
<a name='L109'></a><a href='#L109'>109</a>
|
|
175
|
+
<a name='L110'></a><a href='#L110'>110</a>
|
|
176
|
+
<a name='L111'></a><a href='#L111'>111</a>
|
|
177
|
+
<a name='L112'></a><a href='#L112'>112</a>
|
|
178
|
+
<a name='L113'></a><a href='#L113'>113</a>
|
|
179
|
+
<a name='L114'></a><a href='#L114'>114</a>
|
|
180
|
+
<a name='L115'></a><a href='#L115'>115</a>
|
|
181
|
+
<a name='L116'></a><a href='#L116'>116</a>
|
|
182
|
+
<a name='L117'></a><a href='#L117'>117</a>
|
|
183
|
+
<a name='L118'></a><a href='#L118'>118</a>
|
|
184
|
+
<a name='L119'></a><a href='#L119'>119</a>
|
|
185
|
+
<a name='L120'></a><a href='#L120'>120</a>
|
|
186
|
+
<a name='L121'></a><a href='#L121'>121</a>
|
|
187
|
+
<a name='L122'></a><a href='#L122'>122</a>
|
|
188
|
+
<a name='L123'></a><a href='#L123'>123</a>
|
|
189
|
+
<a name='L124'></a><a href='#L124'>124</a>
|
|
190
|
+
<a name='L125'></a><a href='#L125'>125</a>
|
|
191
|
+
<a name='L126'></a><a href='#L126'>126</a>
|
|
192
|
+
<a name='L127'></a><a href='#L127'>127</a>
|
|
193
|
+
<a name='L128'></a><a href='#L128'>128</a>
|
|
194
|
+
<a name='L129'></a><a href='#L129'>129</a>
|
|
195
|
+
<a name='L130'></a><a href='#L130'>130</a>
|
|
196
|
+
<a name='L131'></a><a href='#L131'>131</a>
|
|
197
|
+
<a name='L132'></a><a href='#L132'>132</a>
|
|
198
|
+
<a name='L133'></a><a href='#L133'>133</a>
|
|
199
|
+
<a name='L134'></a><a href='#L134'>134</a>
|
|
200
|
+
<a name='L135'></a><a href='#L135'>135</a>
|
|
201
|
+
<a name='L136'></a><a href='#L136'>136</a>
|
|
202
|
+
<a name='L137'></a><a href='#L137'>137</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
203
|
+
<span class="cline-any cline-yes">1x</span>
|
|
204
|
+
<span class="cline-any cline-yes">1x</span>
|
|
205
|
+
<span class="cline-any cline-yes">1x</span>
|
|
206
|
+
<span class="cline-any cline-yes">1x</span>
|
|
207
|
+
<span class="cline-any cline-yes">1x</span>
|
|
208
|
+
<span class="cline-any cline-yes">1x</span>
|
|
209
|
+
<span class="cline-any cline-yes">1x</span>
|
|
210
|
+
<span class="cline-any cline-yes">1x</span>
|
|
211
|
+
<span class="cline-any cline-yes">1x</span>
|
|
212
|
+
<span class="cline-any cline-yes">1x</span>
|
|
213
|
+
<span class="cline-any cline-yes">1x</span>
|
|
214
|
+
<span class="cline-any cline-yes">1x</span>
|
|
215
|
+
<span class="cline-any cline-yes">1x</span>
|
|
216
|
+
<span class="cline-any cline-yes">1x</span>
|
|
217
|
+
<span class="cline-any cline-yes">1x</span>
|
|
218
|
+
<span class="cline-any cline-yes">1x</span>
|
|
219
|
+
<span class="cline-any cline-yes">1x</span>
|
|
220
|
+
<span class="cline-any cline-yes">1x</span>
|
|
221
|
+
<span class="cline-any cline-yes">1x</span>
|
|
222
|
+
<span class="cline-any cline-yes">1x</span>
|
|
223
|
+
<span class="cline-any cline-yes">1x</span>
|
|
224
|
+
<span class="cline-any cline-yes">1x</span>
|
|
225
|
+
<span class="cline-any cline-yes">1x</span>
|
|
226
|
+
<span class="cline-any cline-yes">1x</span>
|
|
227
|
+
<span class="cline-any cline-yes">1x</span>
|
|
228
|
+
<span class="cline-any cline-yes">1x</span>
|
|
229
|
+
<span class="cline-any cline-yes">1x</span>
|
|
230
|
+
<span class="cline-any cline-yes">1x</span>
|
|
231
|
+
<span class="cline-any cline-yes">1x</span>
|
|
232
|
+
<span class="cline-any cline-yes">1x</span>
|
|
233
|
+
<span class="cline-any cline-yes">1x</span>
|
|
234
|
+
<span class="cline-any cline-yes">1x</span>
|
|
235
|
+
<span class="cline-any cline-yes">1x</span>
|
|
236
|
+
<span class="cline-any cline-yes">1x</span>
|
|
237
|
+
<span class="cline-any cline-yes">1x</span>
|
|
238
|
+
<span class="cline-any cline-yes">1x</span>
|
|
239
|
+
<span class="cline-any cline-yes">1x</span>
|
|
240
|
+
<span class="cline-any cline-yes">1x</span>
|
|
241
|
+
<span class="cline-any cline-yes">1x</span>
|
|
242
|
+
<span class="cline-any cline-yes">1x</span>
|
|
243
|
+
<span class="cline-any cline-yes">1x</span>
|
|
244
|
+
<span class="cline-any cline-yes">1x</span>
|
|
245
|
+
<span class="cline-any cline-yes">1x</span>
|
|
246
|
+
<span class="cline-any cline-yes">1x</span>
|
|
247
|
+
<span class="cline-any cline-yes">1x</span>
|
|
248
|
+
<span class="cline-any cline-yes">1x</span>
|
|
249
|
+
<span class="cline-any cline-yes">1x</span>
|
|
250
|
+
<span class="cline-any cline-yes">1x</span>
|
|
251
|
+
<span class="cline-any cline-yes">1x</span>
|
|
252
|
+
<span class="cline-any cline-yes">1x</span>
|
|
253
|
+
<span class="cline-any cline-yes">17x</span>
|
|
254
|
+
<span class="cline-any cline-yes">17x</span>
|
|
255
|
+
<span class="cline-any cline-yes">17x</span>
|
|
256
|
+
<span class="cline-any cline-yes">17x</span>
|
|
257
|
+
<span class="cline-any cline-yes">17x</span>
|
|
258
|
+
<span class="cline-any cline-yes">1x</span>
|
|
259
|
+
<span class="cline-any cline-yes">1x</span>
|
|
260
|
+
<span class="cline-any cline-yes">1x</span>
|
|
261
|
+
<span class="cline-any cline-yes">1x</span>
|
|
262
|
+
<span class="cline-any cline-yes">1x</span>
|
|
263
|
+
<span class="cline-any cline-yes">1x</span>
|
|
264
|
+
<span class="cline-any cline-yes">1x</span>
|
|
265
|
+
<span class="cline-any cline-yes">1x</span>
|
|
266
|
+
<span class="cline-any cline-yes">2x</span>
|
|
267
|
+
<span class="cline-any cline-yes">2x</span>
|
|
268
|
+
<span class="cline-any cline-yes">1x</span>
|
|
269
|
+
<span class="cline-any cline-yes">1x</span>
|
|
270
|
+
<span class="cline-any cline-yes">1x</span>
|
|
271
|
+
<span class="cline-any cline-yes">1x</span>
|
|
272
|
+
<span class="cline-any cline-yes">2x</span>
|
|
273
|
+
<span class="cline-any cline-yes">1x</span>
|
|
274
|
+
<span class="cline-any cline-yes">1x</span>
|
|
275
|
+
<span class="cline-any cline-yes">1x</span>
|
|
276
|
+
<span class="cline-any cline-yes">1x</span>
|
|
277
|
+
<span class="cline-any cline-yes">1x</span>
|
|
278
|
+
<span class="cline-any cline-yes">1x</span>
|
|
279
|
+
<span class="cline-any cline-yes">1x</span>
|
|
280
|
+
<span class="cline-any cline-yes">8x</span>
|
|
281
|
+
<span class="cline-any cline-yes">8x</span>
|
|
282
|
+
<span class="cline-any cline-yes">6x</span>
|
|
283
|
+
<span class="cline-any cline-yes">8x</span>
|
|
284
|
+
<span class="cline-any cline-yes">2x</span>
|
|
285
|
+
<span class="cline-any cline-yes">2x</span>
|
|
286
|
+
<span class="cline-any cline-yes">8x</span>
|
|
287
|
+
<span class="cline-any cline-yes">1x</span>
|
|
288
|
+
<span class="cline-any cline-yes">1x</span>
|
|
289
|
+
<span class="cline-any cline-yes">1x</span>
|
|
290
|
+
<span class="cline-any cline-yes">1x</span>
|
|
291
|
+
<span class="cline-any cline-yes">1x</span>
|
|
292
|
+
<span class="cline-any cline-yes">1x</span>
|
|
293
|
+
<span class="cline-any cline-yes">1x</span>
|
|
294
|
+
<span class="cline-any cline-yes">2x</span>
|
|
295
|
+
<span class="cline-any cline-yes">2x</span>
|
|
296
|
+
<span class="cline-any cline-yes">1x</span>
|
|
297
|
+
<span class="cline-any cline-yes">1x</span>
|
|
298
|
+
<span class="cline-any cline-yes">1x</span>
|
|
299
|
+
<span class="cline-any cline-yes">1x</span>
|
|
300
|
+
<span class="cline-any cline-yes">2x</span>
|
|
301
|
+
<span class="cline-any cline-yes">1x</span>
|
|
302
|
+
<span class="cline-any cline-yes">1x</span>
|
|
303
|
+
<span class="cline-any cline-yes">1x</span>
|
|
304
|
+
<span class="cline-any cline-yes">1x</span>
|
|
305
|
+
<span class="cline-any cline-yes">1x</span>
|
|
306
|
+
<span class="cline-any cline-yes">1x</span>
|
|
307
|
+
<span class="cline-any cline-yes">8x</span>
|
|
308
|
+
<span class="cline-any cline-yes">8x</span>
|
|
309
|
+
<span class="cline-any cline-yes">6x</span>
|
|
310
|
+
<span class="cline-any cline-yes">8x</span>
|
|
311
|
+
<span class="cline-any cline-yes">2x</span>
|
|
312
|
+
<span class="cline-any cline-yes">2x</span>
|
|
313
|
+
<span class="cline-any cline-yes">8x</span>
|
|
314
|
+
<span class="cline-any cline-yes">1x</span>
|
|
315
|
+
<span class="cline-any cline-yes">1x</span>
|
|
316
|
+
<span class="cline-any cline-yes">1x</span>
|
|
317
|
+
<span class="cline-any cline-yes">1x</span>
|
|
318
|
+
<span class="cline-any cline-yes">1x</span>
|
|
319
|
+
<span class="cline-any cline-yes">1x</span>
|
|
320
|
+
<span class="cline-any cline-yes">5x</span>
|
|
321
|
+
<span class="cline-any cline-yes">5x</span>
|
|
322
|
+
<span class="cline-any cline-yes">1x</span>
|
|
323
|
+
<span class="cline-any cline-yes">1x</span>
|
|
324
|
+
<span class="cline-any cline-yes">4x</span>
|
|
325
|
+
<span class="cline-any cline-yes">4x</span>
|
|
326
|
+
<span class="cline-any cline-yes">5x</span>
|
|
327
|
+
<span class="cline-any cline-yes">5x</span>
|
|
328
|
+
<span class="cline-any cline-yes">5x</span>
|
|
329
|
+
<span class="cline-any cline-yes">1x</span>
|
|
330
|
+
<span class="cline-any cline-yes">1x</span>
|
|
331
|
+
<span class="cline-any cline-yes">5x</span>
|
|
332
|
+
<span class="cline-any cline-yes">3x</span>
|
|
333
|
+
<span class="cline-any cline-yes">3x</span>
|
|
334
|
+
<span class="cline-any cline-yes">5x</span>
|
|
335
|
+
<span class="cline-any cline-yes">3x</span>
|
|
336
|
+
<span class="cline-any cline-yes">3x</span>
|
|
337
|
+
<span class="cline-any cline-yes">1x</span>
|
|
338
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">// Copyright (c) 2026 Erik Fortune
|
|
339
|
+
//
|
|
340
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
341
|
+
// of this software and associated documentation files (the "Software"), to deal
|
|
342
|
+
// in the Software without restriction, including without limitation the rights
|
|
343
|
+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
344
|
+
// copies of the Software, and to permit persons to whom the Software is
|
|
345
|
+
// furnished to do so, subject to the following conditions:
|
|
346
|
+
//
|
|
347
|
+
// The above copyright notice and this permission notice shall be included in all
|
|
348
|
+
// copies or substantial portions of the Software.
|
|
349
|
+
//
|
|
350
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
351
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
352
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
353
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
354
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
355
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
356
|
+
// SOFTWARE.
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Persistent storage for FileSystemDirectoryHandle objects using IndexedDB.
|
|
360
|
+
* Allows directory handles to survive page reloads without re-prompting the user.
|
|
361
|
+
* @packageDocumentation
|
|
362
|
+
*/
|
|
363
|
+
|
|
364
|
+
import { fail, Result, succeed } from '@fgv/ts-utils';
|
|
365
|
+
import { createStore, del, get, keys, set } from 'idb-keyval';
|
|
366
|
+
import { FileSystemDirectoryHandle } from '../file-api-types';
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Default IndexedDB database name for directory handles.
|
|
370
|
+
* @public
|
|
371
|
+
*/
|
|
372
|
+
export const DEFAULT_DIRECTORY_HANDLE_DB = 'chocolate-lab-storage';
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Default IndexedDB store name for directory handles.
|
|
376
|
+
* @public
|
|
377
|
+
*/
|
|
378
|
+
export const DEFAULT_DIRECTORY_HANDLE_STORE = 'directory-handles';
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Manages persistence of {@link FileSystemDirectoryHandle} objects in IndexedDB.
|
|
382
|
+
* Keyed by a label (typically the directory name).
|
|
383
|
+
* @public
|
|
384
|
+
*/
|
|
385
|
+
export class DirectoryHandleStore {
|
|
386
|
+
private readonly _store: ReturnType<typeof createStore>;
|
|
387
|
+
|
|
388
|
+
public constructor(
|
|
389
|
+
dbName: string = DEFAULT_DIRECTORY_HANDLE_DB,
|
|
390
|
+
storeName: string = DEFAULT_DIRECTORY_HANDLE_STORE
|
|
391
|
+
) {
|
|
392
|
+
this._store = createStore(dbName, storeName);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Saves a directory handle to IndexedDB under the given label.
|
|
397
|
+
* @param label - Key to store the handle under (typically dirHandle.name)
|
|
398
|
+
* @param handle - The FileSystemDirectoryHandle to persist
|
|
399
|
+
* @returns Success or Failure
|
|
400
|
+
*/
|
|
401
|
+
public async save(label: string, handle: FileSystemDirectoryHandle): Promise<Result<void>> {
|
|
402
|
+
try {
|
|
403
|
+
await set(label, handle, this._store);
|
|
404
|
+
return succeed(undefined);
|
|
405
|
+
} catch (e) {
|
|
406
|
+
return fail(`DirectoryHandleStore.save "${label}": ${String(e)}`);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Retrieves a directory handle by label.
|
|
412
|
+
* @param label - Key to look up
|
|
413
|
+
* @returns Success with handle (or undefined if not found), or Failure on error
|
|
414
|
+
*/
|
|
415
|
+
public async load(label: string): Promise<Result<FileSystemDirectoryHandle | undefined>> {
|
|
416
|
+
try {
|
|
417
|
+
const handle = await get<FileSystemDirectoryHandle>(label, this._store);
|
|
418
|
+
return succeed(handle);
|
|
419
|
+
} catch (e) {
|
|
420
|
+
return fail(`DirectoryHandleStore.load "${label}": ${String(e)}`);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Removes a directory handle from IndexedDB.
|
|
426
|
+
* @param label - Key to remove
|
|
427
|
+
* @returns Success or Failure
|
|
428
|
+
*/
|
|
429
|
+
public async remove(label: string): Promise<Result<void>> {
|
|
430
|
+
try {
|
|
431
|
+
await del(label, this._store);
|
|
432
|
+
return succeed(undefined);
|
|
433
|
+
} catch (e) {
|
|
434
|
+
return fail(`DirectoryHandleStore.remove "${label}": ${String(e)}`);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Returns all stored labels (keys).
|
|
440
|
+
* @returns Success with array of labels, or Failure
|
|
441
|
+
*/
|
|
442
|
+
public async getAllLabels(): Promise<Result<string[]>> {
|
|
443
|
+
try {
|
|
444
|
+
const allKeys = await keys<string>(this._store);
|
|
445
|
+
return succeed(allKeys);
|
|
446
|
+
} catch (e) {
|
|
447
|
+
return fail(`DirectoryHandleStore.getAllLabels: ${String(e)}`);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Returns all stored handles as label/handle pairs.
|
|
453
|
+
* @returns Success with array of entries, or Failure
|
|
454
|
+
*/
|
|
455
|
+
public async getAll(): Promise<Result<Array<{ label: string; handle: FileSystemDirectoryHandle }>>> {
|
|
456
|
+
const labelsResult = await this.getAllLabels();
|
|
457
|
+
if (labelsResult.isFailure()) {
|
|
458
|
+
return fail(labelsResult.message);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
const entries: Array<{ label: string; handle: FileSystemDirectoryHandle }> = [];
|
|
462
|
+
for (const label of labelsResult.value) {
|
|
463
|
+
const handleResult = await this.load(label);
|
|
464
|
+
if (handleResult.isFailure()) {
|
|
465
|
+
return fail(handleResult.message);
|
|
466
|
+
}
|
|
467
|
+
if (handleResult.value !== undefined) {
|
|
468
|
+
entries.push({ label, handle: handleResult.value });
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
return succeed(entries);
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
</pre></td></tr></table></pre>
|
|
475
|
+
|
|
476
|
+
<div class='push'></div><!-- for sticky footer -->
|
|
477
|
+
</div><!-- /wrapper -->
|
|
478
|
+
<div class='footer quiet pad2 space-top1 center small'>
|
|
479
|
+
Code coverage generated by
|
|
480
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
481
|
+
at 2026-03-24T10:54:34.254Z
|
|
482
|
+
</div>
|
|
483
|
+
<script src="../prettify.js"></script>
|
|
484
|
+
<script>
|
|
485
|
+
window.onload = function () {
|
|
486
|
+
prettyPrint();
|
|
487
|
+
};
|
|
488
|
+
</script>
|
|
489
|
+
<script src="../sorter.js"></script>
|
|
490
|
+
<script src="../block-navigation.js"></script>
|
|
491
|
+
</body>
|
|
492
|
+
</html>
|
|
493
|
+
|