@fgv/ts-web-extras 5.1.0-0 → 5.1.0-2
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 +56 -33
- package/.rush/temp/chunked-rush-logs/ts-web-extras.test.chunks.jsonl +75 -0
- package/.rush/temp/operation/build/all.log +56 -33
- package/.rush/temp/operation/build/error.log +18 -0
- package/.rush/temp/operation/build/log-chunks.jsonl +56 -33
- package/.rush/temp/operation/build/state.json +1 -1
- package/.rush/temp/operation/test/all.log +75 -0
- package/.rush/temp/operation/test/error.log +18 -0
- package/.rush/temp/operation/test/log-chunks.jsonl +75 -0
- package/.rush/temp/operation/test/state.json +3 -0
- package/dist/packlets/file-tree/fileApiTreeAccessors.js +15 -0
- package/dist/packlets/file-tree/fileApiTreeAccessors.js.map +1 -1
- package/dist/packlets/file-tree/fileSystemAccessTreeAccessors.js +79 -10
- package/dist/packlets/file-tree/fileSystemAccessTreeAccessors.js.map +1 -1
- package/dist/packlets/file-tree/httpTreeAccessors.js +336 -0
- package/dist/packlets/file-tree/httpTreeAccessors.js.map +1 -0
- package/dist/packlets/file-tree/index.js +1 -0
- package/dist/packlets/file-tree/index.js.map +1 -1
- package/dist/packlets/file-tree/localStorageTreeAccessors.js +51 -0
- package/dist/packlets/file-tree/localStorageTreeAccessors.js.map +1 -1
- package/dist/test/unit/fileApiTreeAccessors.test.js +51 -0
- package/dist/test/unit/fileApiTreeAccessors.test.js.map +1 -1
- package/dist/test/unit/fileSystemAccessTreeAccessors.test.js +265 -160
- package/dist/test/unit/fileSystemAccessTreeAccessors.test.js.map +1 -1
- package/dist/test/unit/httpTreeAccessors.test.js +1229 -0
- package/dist/test/unit/httpTreeAccessors.test.js.map +1 -0
- package/dist/test/unit/localStorageTreeAccessors.test.js +218 -1
- package/dist/test/unit/localStorageTreeAccessors.test.js.map +1 -1
- package/dist/ts-web-extras.d.ts +138 -0
- 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 +33 -0
- package/lib/packlets/file-tree/fileApiTreeAccessors.d.ts +9 -0
- package/lib/packlets/file-tree/fileApiTreeAccessors.d.ts.map +1 -1
- package/lib/packlets/file-tree/fileApiTreeAccessors.js +15 -0
- package/lib/packlets/file-tree/fileApiTreeAccessors.js.map +1 -1
- package/lib/packlets/file-tree/fileSystemAccessTreeAccessors.d.ts +17 -1
- package/lib/packlets/file-tree/fileSystemAccessTreeAccessors.d.ts.map +1 -1
- package/lib/packlets/file-tree/fileSystemAccessTreeAccessors.js +78 -9
- package/lib/packlets/file-tree/fileSystemAccessTreeAccessors.js.map +1 -1
- package/lib/packlets/file-tree/httpTreeAccessors.d.ts +102 -0
- package/lib/packlets/file-tree/httpTreeAccessors.d.ts.map +1 -0
- package/lib/packlets/file-tree/httpTreeAccessors.js +340 -0
- package/lib/packlets/file-tree/httpTreeAccessors.js.map +1 -0
- package/lib/packlets/file-tree/index.d.ts +1 -0
- package/lib/packlets/file-tree/index.d.ts.map +1 -1
- package/lib/packlets/file-tree/index.js +1 -0
- package/lib/packlets/file-tree/index.js.map +1 -1
- package/lib/packlets/file-tree/localStorageTreeAccessors.d.ts +12 -0
- package/lib/packlets/file-tree/localStorageTreeAccessors.d.ts.map +1 -1
- package/lib/packlets/file-tree/localStorageTreeAccessors.js +51 -0
- package/lib/packlets/file-tree/localStorageTreeAccessors.js.map +1 -1
- package/lib/test/unit/fileApiTreeAccessors.test.js +51 -0
- package/lib/test/unit/fileApiTreeAccessors.test.js.map +1 -1
- package/lib/test/unit/fileSystemAccessTreeAccessors.test.js +265 -160
- package/lib/test/unit/fileSystemAccessTreeAccessors.test.js.map +1 -1
- 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 +1231 -0
- package/lib/test/unit/httpTreeAccessors.test.js.map +1 -0
- package/lib/test/unit/localStorageTreeAccessors.test.js +218 -1
- package/lib/test/unit/localStorageTreeAccessors.test.js.map +1 -1
- package/package.json +25 -25
- package/rush-logs/ts-web-extras.build.cache.log +0 -3
- package/rush-logs/ts-web-extras.build.error.log +18 -0
- package/rush-logs/ts-web-extras.build.log +56 -33
- package/rush-logs/ts-web-extras.test.cache.log +1 -0
- package/rush-logs/ts-web-extras.test.error.log +18 -0
- package/rush-logs/ts-web-extras.test.log +75 -0
- package/src/packlets/file-tree/fileApiTreeAccessors.ts +18 -0
- package/src/packlets/file-tree/fileSystemAccessTreeAccessors.ts +100 -8
- package/src/packlets/file-tree/httpTreeAccessors.ts +448 -0
- package/src/packlets/file-tree/index.ts +1 -0
- package/src/packlets/file-tree/localStorageTreeAccessors.ts +53 -0
- package/src/test/unit/fileApiTreeAccessors.test.ts +69 -0
- package/src/test/unit/fileSystemAccessTreeAccessors.test.ts +341 -188
- package/src/test/unit/httpTreeAccessors.test.ts +1571 -0
- package/src/test/unit/localStorageTreeAccessors.test.ts +269 -1
- package/temp/build/typescript/ts_8nwakTlr.json +1 -1
- package/temp/coverage/crypto/browserHashProvider.ts.html +304 -0
- package/temp/coverage/crypto/index.html +116 -0
- package/temp/coverage/crypto-utils/browserCryptoProvider.ts.html +1 -1
- package/temp/coverage/crypto-utils/browserHashProvider.ts.html +1 -1
- package/temp/coverage/crypto-utils/index.html +1 -1
- package/temp/coverage/file-tree/directoryHandleStore.ts.html +1 -1
- package/temp/coverage/file-tree/fileApiTreeAccessors.ts.html +60 -6
- package/temp/coverage/file-tree/fileSystemAccessTreeAccessors.ts.html +410 -134
- package/temp/coverage/file-tree/httpTreeAccessors.ts.html +1429 -0
- package/temp/coverage/file-tree/index.html +35 -20
- package/temp/coverage/file-tree/localStorageTreeAccessors.ts.html +318 -159
- package/temp/coverage/helpers/fileTreeHelpers.ts.html +1 -1
- package/temp/coverage/helpers/index.html +1 -1
- package/temp/coverage/index.html +11 -11
- package/temp/coverage/lcov-report/crypto/browserHashProvider.ts.html +304 -0
- package/temp/coverage/lcov-report/crypto/index.html +116 -0
- package/temp/coverage/lcov-report/crypto-utils/browserCryptoProvider.ts.html +1 -1
- package/temp/coverage/lcov-report/crypto-utils/browserHashProvider.ts.html +1 -1
- package/temp/coverage/lcov-report/crypto-utils/index.html +1 -1
- package/temp/coverage/lcov-report/file-tree/directoryHandleStore.ts.html +1 -1
- package/temp/coverage/lcov-report/file-tree/fileApiTreeAccessors.ts.html +60 -6
- package/temp/coverage/lcov-report/file-tree/fileSystemAccessTreeAccessors.ts.html +410 -134
- package/temp/coverage/lcov-report/file-tree/httpTreeAccessors.ts.html +1429 -0
- package/temp/coverage/lcov-report/file-tree/index.html +35 -20
- package/temp/coverage/lcov-report/file-tree/localStorageTreeAccessors.ts.html +318 -159
- 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 +11 -11
- 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 +2021 -1197
- 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 +1313 -354
- package/temp/ts-web-extras.api.md +33 -0
- package/.rush/temp/81e0881271ff236956b2f52e8ca99da6574c6e1e.tar.log +0 -223
- package/docs/index.md +0 -34
- package/docs/ts-web-extras.cryptoutils.browsercryptoprovider._constructor_.md +0 -50
- package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.decrypt.md +0 -104
- package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.derivekey.md +0 -88
- package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.encrypt.md +0 -72
- package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.frombase64.md +0 -56
- package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.generatekey.md +0 -19
- package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.generaterandombytes.md +0 -56
- package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.md +0 -169
- package/docs/ts-web-extras.cryptoutils.browsercryptoprovider.tobase64.md +0 -56
- package/docs/ts-web-extras.cryptoutils.browserhashprovider.hashparts.md +0 -88
- package/docs/ts-web-extras.cryptoutils.browserhashprovider.hashstring.md +0 -72
- package/docs/ts-web-extras.cryptoutils.browserhashprovider.md +0 -66
- package/docs/ts-web-extras.cryptoutils.createbrowsercryptoprovider.md +0 -19
- package/docs/ts-web-extras.cryptoutils.md +0 -71
- 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.createfromlocalstorage.md +0 -74
- package/docs/ts-web-extras.fileapitreeaccessors.createpersistent.md +0 -76
- 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 -146
- 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.filesystemaccesstreeaccessors._constructor_.md +0 -114
- package/docs/ts-web-extras.filesystemaccesstreeaccessors.fileismutable.md +0 -52
- package/docs/ts-web-extras.filesystemaccesstreeaccessors.fromdirectoryhandle.md +0 -72
- package/docs/ts-web-extras.filesystemaccesstreeaccessors.getdirtypaths.md +0 -17
- package/docs/ts-web-extras.filesystemaccesstreeaccessors.isdirty.md +0 -17
- package/docs/ts-web-extras.filesystemaccesstreeaccessors.md +0 -159
- package/docs/ts-web-extras.filesystemaccesstreeaccessors.savefilecontents.md +0 -66
- package/docs/ts-web-extras.filesystemaccesstreeaccessors.synctodisk.md +0 -17
- 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.ifilesystemaccesstreeparams.autosync.md +0 -13
- package/docs/ts-web-extras.ifilesystemaccesstreeparams.md +0 -78
- package/docs/ts-web-extras.ifilesystemaccesstreeparams.requirewritepermission.md +0 -13
- 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.ilocalstoragetreeparams.autosync.md +0 -13
- package/docs/ts-web-extras.ilocalstoragetreeparams.md +0 -97
- package/docs/ts-web-extras.ilocalstoragetreeparams.pathtokeymap.md +0 -13
- package/docs/ts-web-extras.ilocalstoragetreeparams.storage.md +0 -13
- 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.localstoragetreeaccessors.fileismutable.md +0 -56
- package/docs/ts-web-extras.localstoragetreeaccessors.fromstorage.md +0 -56
- package/docs/ts-web-extras.localstoragetreeaccessors.getdirtypaths.md +0 -19
- package/docs/ts-web-extras.localstoragetreeaccessors.isdirty.md +0 -19
- package/docs/ts-web-extras.localstoragetreeaccessors.md +0 -131
- package/docs/ts-web-extras.localstoragetreeaccessors.savefilecontents.md +0 -72
- package/docs/ts-web-extras.localstoragetreeaccessors.synctodisk.md +0 -19
- package/docs/ts-web-extras.md +0 -558
- 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/temp/test/jest/haste-map-7492f1b44480e0cdd1f220078fb3afd8-c8dd6c3430605adeb2f1cadf4f75e791-8c9336785555d572065b28c111982ba4 +0 -0
- package/temp/test/jest/perf-cache-7492f1b44480e0cdd1f220078fb3afd8-da39a3ee5e6b4b0d3255bfef95601890 +0 -1
- /package/temp/test/jest/{jest-transform-cache-7492f1b44480e0cdd1f220078fb3afd8-79ef2876fae7ca75eedb2aa53dc48338/8d/package_8dcbedef69e4299f0f51fcda8f4f1c8e → jest-transform-cache-b931e4e63102f86c5bd4949f7dced44f-79ef2876fae7ca75eedb2aa53dc48338/b5/package_b5f57afc9ec2c011239b1608ee5bdfa5} +0 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / FileSystemWritableFileStream
|
|
6
|
+
|
|
7
|
+
# Interface: FileSystemWritableFileStream
|
|
8
|
+
|
|
9
|
+
Writable file stream interface
|
|
10
|
+
|
|
11
|
+
## Extends
|
|
12
|
+
|
|
13
|
+
- `WritableStream`
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
| Property | Modifier | Type | Description |
|
|
18
|
+
| ------ | ------ | ------ | ------ |
|
|
19
|
+
| <a id="locked"></a> `locked` | `readonly` | `boolean` | The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the `WritableStream` is locked to a writer. [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) |
|
|
20
|
+
|
|
21
|
+
## Methods
|
|
22
|
+
|
|
23
|
+
### abort()
|
|
24
|
+
|
|
25
|
+
> **abort**(`reason?`): `Promise`\<`void`\>
|
|
26
|
+
|
|
27
|
+
The **`abort()`** method of the WritableStream interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
|
|
28
|
+
|
|
29
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort)
|
|
30
|
+
|
|
31
|
+
#### Parameters
|
|
32
|
+
|
|
33
|
+
| Parameter | Type |
|
|
34
|
+
| ------ | ------ |
|
|
35
|
+
| `reason?` | `any` |
|
|
36
|
+
|
|
37
|
+
#### Returns
|
|
38
|
+
|
|
39
|
+
`Promise`\<`void`\>
|
|
40
|
+
|
|
41
|
+
#### Inherited from
|
|
42
|
+
|
|
43
|
+
`WritableStream.abort`
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### close()
|
|
48
|
+
|
|
49
|
+
> **close**(): `Promise`\<`void`\>
|
|
50
|
+
|
|
51
|
+
The **`close()`** method of the WritableStream interface closes the associated stream.
|
|
52
|
+
|
|
53
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close)
|
|
54
|
+
|
|
55
|
+
#### Returns
|
|
56
|
+
|
|
57
|
+
`Promise`\<`void`\>
|
|
58
|
+
|
|
59
|
+
#### Inherited from
|
|
60
|
+
|
|
61
|
+
`WritableStream.close`
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
### getWriter()
|
|
66
|
+
|
|
67
|
+
> **getWriter**(): `WritableStreamDefaultWriter`\<`any`\>
|
|
68
|
+
|
|
69
|
+
The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance.
|
|
70
|
+
|
|
71
|
+
[MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)
|
|
72
|
+
|
|
73
|
+
#### Returns
|
|
74
|
+
|
|
75
|
+
`WritableStreamDefaultWriter`\<`any`\>
|
|
76
|
+
|
|
77
|
+
#### Inherited from
|
|
78
|
+
|
|
79
|
+
`WritableStream.getWriter`
|
|
80
|
+
|
|
81
|
+
***
|
|
82
|
+
|
|
83
|
+
### seek()
|
|
84
|
+
|
|
85
|
+
> **seek**(`position`): `Promise`\<`void`\>
|
|
86
|
+
|
|
87
|
+
#### Parameters
|
|
88
|
+
|
|
89
|
+
| Parameter | Type |
|
|
90
|
+
| ------ | ------ |
|
|
91
|
+
| `position` | `number` |
|
|
92
|
+
|
|
93
|
+
#### Returns
|
|
94
|
+
|
|
95
|
+
`Promise`\<`void`\>
|
|
96
|
+
|
|
97
|
+
***
|
|
98
|
+
|
|
99
|
+
### truncate()
|
|
100
|
+
|
|
101
|
+
> **truncate**(`size`): `Promise`\<`void`\>
|
|
102
|
+
|
|
103
|
+
#### Parameters
|
|
104
|
+
|
|
105
|
+
| Parameter | Type |
|
|
106
|
+
| ------ | ------ |
|
|
107
|
+
| `size` | `number` |
|
|
108
|
+
|
|
109
|
+
#### Returns
|
|
110
|
+
|
|
111
|
+
`Promise`\<`void`\>
|
|
112
|
+
|
|
113
|
+
***
|
|
114
|
+
|
|
115
|
+
### write()
|
|
116
|
+
|
|
117
|
+
> **write**(`data`): `Promise`\<`void`\>
|
|
118
|
+
|
|
119
|
+
#### Parameters
|
|
120
|
+
|
|
121
|
+
| Parameter | Type |
|
|
122
|
+
| ------ | ------ |
|
|
123
|
+
| `data` | `string` \| `BufferSource` \| `Blob` |
|
|
124
|
+
|
|
125
|
+
#### Returns
|
|
126
|
+
|
|
127
|
+
`Promise`\<`void`\>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / IDirectoryHandleTreeInitializer
|
|
6
|
+
|
|
7
|
+
# Interface: IDirectoryHandleTreeInitializer
|
|
8
|
+
|
|
9
|
+
Tree initializer for File System Access API directory handles.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
| Property | Modifier | Type |
|
|
14
|
+
| ------ | ------ | ------ |
|
|
15
|
+
| <a id="dirhandles"></a> `dirHandles` | `readonly` | [`FileSystemDirectoryHandle`](FileSystemDirectoryHandle.md)[] |
|
|
16
|
+
| <a id="nonrecursive"></a> `nonRecursive?` | `readonly` | `boolean` |
|
|
17
|
+
| <a id="prefix"></a> `prefix?` | `readonly` | `string` |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / IFileHandleTreeInitializer
|
|
6
|
+
|
|
7
|
+
# Interface: IFileHandleTreeInitializer
|
|
8
|
+
|
|
9
|
+
Tree initializer for File System Access API file handles.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
| Property | Modifier | Type |
|
|
14
|
+
| ------ | ------ | ------ |
|
|
15
|
+
| <a id="filehandles"></a> `fileHandles` | `readonly` | [`FileSystemFileHandle`](FileSystemFileHandle.md)[] |
|
|
16
|
+
| <a id="prefix"></a> `prefix?` | `readonly` | `string` |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / IFileListTreeInitializer
|
|
6
|
+
|
|
7
|
+
# Interface: IFileListTreeInitializer
|
|
8
|
+
|
|
9
|
+
Tree initializer for FileList objects (from File API).
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
| Property | Modifier | Type |
|
|
14
|
+
| ------ | ------ | ------ |
|
|
15
|
+
| <a id="filelist"></a> `fileList` | `readonly` | `FileList` |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / IFileMetadata
|
|
6
|
+
|
|
7
|
+
# Interface: IFileMetadata
|
|
8
|
+
|
|
9
|
+
Interface for file metadata.
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
| Property | Type |
|
|
14
|
+
| ------ | ------ |
|
|
15
|
+
| <a id="lastmodified"></a> `lastModified` | `number` |
|
|
16
|
+
| <a id="name"></a> `name` | `string` |
|
|
17
|
+
| <a id="path"></a> `path` | `string` |
|
|
18
|
+
| <a id="size"></a> `size` | `number` |
|
|
19
|
+
| <a id="type"></a> `type` | `string` |
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / IFileSystemAccessTreeParams
|
|
6
|
+
|
|
7
|
+
# Interface: IFileSystemAccessTreeParams\<TCT\>
|
|
8
|
+
|
|
9
|
+
Options for creating persistent file trees.
|
|
10
|
+
|
|
11
|
+
## Extends
|
|
12
|
+
|
|
13
|
+
- [`IFileTreeInitParams`](https://github.com/ErikFortune/fgv/tree/main/libraries/ts-json-base/docs)\<`TCT`\>
|
|
14
|
+
|
|
15
|
+
## Type Parameters
|
|
16
|
+
|
|
17
|
+
| Type Parameter | Default type |
|
|
18
|
+
| ------ | ------ |
|
|
19
|
+
| `TCT` *extends* `string` | `string` |
|
|
20
|
+
|
|
21
|
+
## Properties
|
|
22
|
+
|
|
23
|
+
| Property | Type | Default value | Description |
|
|
24
|
+
| ------ | ------ | ------ | ------ |
|
|
25
|
+
| <a id="autosync"></a> `autoSync?` | `boolean` | `false` | Automatically sync changes to disk immediately after each save. If false, changes are batched and written on explicit syncToDisk() call. |
|
|
26
|
+
| <a id="filepath"></a> `filePath?` | `string` | `undefined` | Override the path at which the file is stored in the tree (for fromFileHandle). Must be an absolute path (e.g., '/data/confections/common.yaml'). If omitted, defaults to `/<filename>`. |
|
|
27
|
+
| <a id="infercontenttype"></a> `inferContentType?` | [`ContentTypeFactory`](https://github.com/ErikFortune/fgv/tree/main/libraries/ts-json-base/docs)\<`TCT`\> | `undefined` | - |
|
|
28
|
+
| <a id="mutable"></a> `mutable?` | `boolean` \| [`IFilterSpec`](https://github.com/ErikFortune/fgv/tree/main/libraries/ts-json-base/docs) | `undefined` | Controls mutability of the file tree. - `undefined` or `false`: No files are mutable. - `true`: All files are mutable. - `IFilterSpec`: Only files matching the filter are mutable. |
|
|
29
|
+
| <a id="prefix"></a> `prefix?` | `string` | `undefined` | - |
|
|
30
|
+
| <a id="requirewritepermission"></a> `requireWritePermission?` | `boolean` | `true` | Require write permission on the directory handle. If true, fails if write permission cannot be obtained. If false, falls back to read-only mode. |
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / IFsAccessApis
|
|
6
|
+
|
|
7
|
+
# Interface: IFsAccessApis
|
|
8
|
+
|
|
9
|
+
File System Access API methods available on Window
|
|
10
|
+
|
|
11
|
+
## Methods
|
|
12
|
+
|
|
13
|
+
### showDirectoryPicker()
|
|
14
|
+
|
|
15
|
+
> **showDirectoryPicker**(`options?`): `Promise`\<[`FileSystemDirectoryHandle`](FileSystemDirectoryHandle.md)\>
|
|
16
|
+
|
|
17
|
+
#### Parameters
|
|
18
|
+
|
|
19
|
+
| Parameter | Type |
|
|
20
|
+
| ------ | ------ |
|
|
21
|
+
| `options?` | [`ShowDirectoryPickerOptions`](ShowDirectoryPickerOptions.md) |
|
|
22
|
+
|
|
23
|
+
#### Returns
|
|
24
|
+
|
|
25
|
+
`Promise`\<[`FileSystemDirectoryHandle`](FileSystemDirectoryHandle.md)\>
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### showOpenFilePicker()
|
|
30
|
+
|
|
31
|
+
> **showOpenFilePicker**(`options?`): `Promise`\<[`FileSystemFileHandle`](FileSystemFileHandle.md)[]\>
|
|
32
|
+
|
|
33
|
+
#### Parameters
|
|
34
|
+
|
|
35
|
+
| Parameter | Type |
|
|
36
|
+
| ------ | ------ |
|
|
37
|
+
| `options?` | [`ShowOpenFilePickerOptions`](ShowOpenFilePickerOptions.md) |
|
|
38
|
+
|
|
39
|
+
#### Returns
|
|
40
|
+
|
|
41
|
+
`Promise`\<[`FileSystemFileHandle`](FileSystemFileHandle.md)[]\>
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### showSaveFilePicker()
|
|
46
|
+
|
|
47
|
+
> **showSaveFilePicker**(`options?`): `Promise`\<[`FileSystemFileHandle`](FileSystemFileHandle.md)\>
|
|
48
|
+
|
|
49
|
+
#### Parameters
|
|
50
|
+
|
|
51
|
+
| Parameter | Type |
|
|
52
|
+
| ------ | ------ |
|
|
53
|
+
| `options?` | [`ShowSaveFilePickerOptions`](ShowSaveFilePickerOptions.md) |
|
|
54
|
+
|
|
55
|
+
#### Returns
|
|
56
|
+
|
|
57
|
+
`Promise`\<[`FileSystemFileHandle`](FileSystemFileHandle.md)\>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / IHttpTreeParams
|
|
6
|
+
|
|
7
|
+
# Interface: IHttpTreeParams\<TCT\>
|
|
8
|
+
|
|
9
|
+
Configuration for creating HTTP-backed tree accessors.
|
|
10
|
+
|
|
11
|
+
## Extends
|
|
12
|
+
|
|
13
|
+
- [`IFileTreeInitParams`](https://github.com/ErikFortune/fgv/tree/main/libraries/ts-json-base/docs)\<`TCT`\>
|
|
14
|
+
|
|
15
|
+
## Type Parameters
|
|
16
|
+
|
|
17
|
+
| Type Parameter | Default type |
|
|
18
|
+
| ------ | ------ |
|
|
19
|
+
| `TCT` *extends* `string` | `string` |
|
|
20
|
+
|
|
21
|
+
## Properties
|
|
22
|
+
|
|
23
|
+
| Property | Modifier | Type | Description |
|
|
24
|
+
| ------ | ------ | ------ | ------ |
|
|
25
|
+
| <a id="autosync"></a> `autoSync?` | `readonly` | `boolean` | - |
|
|
26
|
+
| <a id="baseurl"></a> `baseUrl` | `readonly` | `string` | - |
|
|
27
|
+
| <a id="fetchimpl"></a> `fetchImpl?` | `readonly` | \{(`input`, `init?`): `Promise`\<`Response`\>; (`input`, `init?`): `Promise`\<`Response`\>; \} | - |
|
|
28
|
+
| <a id="infercontenttype"></a> `inferContentType?` | `public` | [`ContentTypeFactory`](https://github.com/ErikFortune/fgv/tree/main/libraries/ts-json-base/docs)\<`TCT`\> | - |
|
|
29
|
+
| <a id="mutable"></a> `mutable?` | `public` | `boolean` \| [`IFilterSpec`](https://github.com/ErikFortune/fgv/tree/main/libraries/ts-json-base/docs) | Controls mutability of the file tree. - `undefined` or `false`: No files are mutable. - `true`: All files are mutable. - `IFilterSpec`: Only files matching the filter are mutable. |
|
|
30
|
+
| <a id="namespace"></a> `namespace?` | `readonly` | `string` | - |
|
|
31
|
+
| <a id="prefix"></a> `prefix?` | `public` | `string` | - |
|
|
32
|
+
| <a id="userid"></a> `userId?` | `readonly` | `string` | - |
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / ILocalStorageTreeParams
|
|
6
|
+
|
|
7
|
+
# Interface: ILocalStorageTreeParams\<TCT\>
|
|
8
|
+
|
|
9
|
+
Configuration for LocalStorageTreeAccessors.
|
|
10
|
+
|
|
11
|
+
## Extends
|
|
12
|
+
|
|
13
|
+
- [`IFileTreeInitParams`](https://github.com/ErikFortune/fgv/tree/main/libraries/ts-json-base/docs)\<`TCT`\>
|
|
14
|
+
|
|
15
|
+
## Type Parameters
|
|
16
|
+
|
|
17
|
+
| Type Parameter | Default type |
|
|
18
|
+
| ------ | ------ |
|
|
19
|
+
| `TCT` *extends* `string` | `string` |
|
|
20
|
+
|
|
21
|
+
## Properties
|
|
22
|
+
|
|
23
|
+
| Property | Type | Description |
|
|
24
|
+
| ------ | ------ | ------ |
|
|
25
|
+
| <a id="autosync"></a> `autoSync?` | `boolean` | If true, automatically sync changes to localStorage on every modification. If false (default), changes are only synced when syncToDisk() is called. |
|
|
26
|
+
| <a id="infercontenttype"></a> `inferContentType?` | [`ContentTypeFactory`](https://github.com/ErikFortune/fgv/tree/main/libraries/ts-json-base/docs)\<`TCT`\> | - |
|
|
27
|
+
| <a id="mutable"></a> `mutable?` | `boolean` \| [`IFilterSpec`](https://github.com/ErikFortune/fgv/tree/main/libraries/ts-json-base/docs) | Controls mutability of the file tree. - `undefined` or `false`: No files are mutable. - `true`: All files are mutable. - `IFilterSpec`: Only files matching the filter are mutable. |
|
|
28
|
+
| <a id="pathtokeymap"></a> `pathToKeyMap` | `Record`\<`string`, `string`\> | Map of directory path prefixes to localStorage keys. Files under each prefix are stored in the corresponding localStorage key. Example: { '/data/ingredients': 'myapp:ingredients:v1' } |
|
|
29
|
+
| <a id="prefix"></a> `prefix?` | `string` | - |
|
|
30
|
+
| <a id="storage"></a> `storage?` | `Storage` | Storage instance to use. Defaults to window.localStorage. Can be overridden for testing with mock storage. |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / IUrlConfigOptions
|
|
6
|
+
|
|
7
|
+
# Interface: IUrlConfigOptions
|
|
8
|
+
|
|
9
|
+
Configuration options that can be passed via URL parameters
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
| Property | Type | Description |
|
|
14
|
+
| ------ | ------ | ------ |
|
|
15
|
+
| <a id="config"></a> `config?` | `string` | Configuration name or path |
|
|
16
|
+
| <a id="configstartdir"></a> `configStartDir?` | `string` | Starting directory for config file picker (derived from config path) |
|
|
17
|
+
| <a id="contextfilter"></a> `contextFilter?` | `string` | Context filter token (pipe-separated) |
|
|
18
|
+
| <a id="input"></a> `input?` | `string` | Input file path |
|
|
19
|
+
| <a id="inputstartdir"></a> `inputStartDir?` | `string` | Starting directory for input file picker (derived from input path) |
|
|
20
|
+
| <a id="interactive"></a> `interactive?` | `boolean` | Whether to launch in interactive mode |
|
|
21
|
+
| <a id="loadzip"></a> `loadZip?` | `boolean` | Whether to use ZIP loading mode |
|
|
22
|
+
| <a id="maxdistance"></a> `maxDistance?` | `number` | Maximum distance for language matching |
|
|
23
|
+
| <a id="qualifierdefaults"></a> `qualifierDefaults?` | `string` | Qualifier defaults token (pipe-separated) |
|
|
24
|
+
| <a id="reducequalifiers"></a> `reduceQualifiers?` | `boolean` | Whether to reduce qualifiers |
|
|
25
|
+
| <a id="resourcetypes"></a> `resourceTypes?` | `string` | Resource types filter (comma-separated) |
|
|
26
|
+
| <a id="zipfile"></a> `zipFile?` | `string` | Name of ZIP file to load from Downloads (filename only) |
|
|
27
|
+
| <a id="zippath"></a> `zipPath?` | `string` | Path to ZIP file to load (for CLI-generated ZIPs) |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / ShowDirectoryPickerOptions
|
|
6
|
+
|
|
7
|
+
# Interface: ShowDirectoryPickerOptions
|
|
8
|
+
|
|
9
|
+
Directory picker options
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
| Property | Type |
|
|
14
|
+
| ------ | ------ |
|
|
15
|
+
| <a id="id"></a> `id?` | `string` |
|
|
16
|
+
| <a id="mode"></a> `mode?` | `"readwrite"` \| `"read"` |
|
|
17
|
+
| <a id="startin"></a> `startIn?` | [`FileSystemHandle`](FileSystemHandle.md) \| [`WellKnownDirectory`](../type-aliases/WellKnownDirectory.md) |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / ShowOpenFilePickerOptions
|
|
6
|
+
|
|
7
|
+
# Interface: ShowOpenFilePickerOptions
|
|
8
|
+
|
|
9
|
+
File picker options
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
| Property | Type |
|
|
14
|
+
| ------ | ------ |
|
|
15
|
+
| <a id="excludeacceptalloption"></a> `excludeAcceptAllOption?` | `boolean` |
|
|
16
|
+
| <a id="id"></a> `id?` | `string` |
|
|
17
|
+
| <a id="multiple"></a> `multiple?` | `boolean` |
|
|
18
|
+
| <a id="startin"></a> `startIn?` | [`FileSystemHandle`](FileSystemHandle.md) \| [`WellKnownDirectory`](../type-aliases/WellKnownDirectory.md) |
|
|
19
|
+
| <a id="types"></a> `types?` | [`FilePickerAcceptType`](FilePickerAcceptType.md)[] |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / ShowSaveFilePickerOptions
|
|
6
|
+
|
|
7
|
+
# Interface: ShowSaveFilePickerOptions
|
|
8
|
+
|
|
9
|
+
Save file picker options
|
|
10
|
+
|
|
11
|
+
## Properties
|
|
12
|
+
|
|
13
|
+
| Property | Type |
|
|
14
|
+
| ------ | ------ |
|
|
15
|
+
| <a id="excludeacceptalloption"></a> `excludeAcceptAllOption?` | `boolean` |
|
|
16
|
+
| <a id="id"></a> `id?` | `string` |
|
|
17
|
+
| <a id="startin"></a> `startIn?` | [`FileSystemHandle`](FileSystemHandle.md) \| [`WellKnownDirectory`](../type-aliases/WellKnownDirectory.md) |
|
|
18
|
+
| <a id="suggestedname"></a> `suggestedName?` | `string` |
|
|
19
|
+
| <a id="types"></a> `types?` | [`FilePickerAcceptType`](FilePickerAcceptType.md)[] |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / TreeInitializer
|
|
6
|
+
|
|
7
|
+
# Type Alias: TreeInitializer
|
|
8
|
+
|
|
9
|
+
> **TreeInitializer** = [`IFileListTreeInitializer`](../interfaces/IFileListTreeInitializer.md) \| [`IFileHandleTreeInitializer`](../interfaces/IFileHandleTreeInitializer.md) \| [`IDirectoryHandleTreeInitializer`](../interfaces/IDirectoryHandleTreeInitializer.md)
|
|
10
|
+
|
|
11
|
+
Union type for all supported tree initializers.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / WellKnownDirectory
|
|
6
|
+
|
|
7
|
+
# Type Alias: WellKnownDirectory
|
|
8
|
+
|
|
9
|
+
> **WellKnownDirectory** = `"desktop"` \| `"documents"` \| `"downloads"` \| `"music"` \| `"pictures"` \| `"videos"`
|
|
10
|
+
|
|
11
|
+
Well-known directory type
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / WindowWithFsAccess
|
|
6
|
+
|
|
7
|
+
# Type Alias: WindowWithFsAccess
|
|
8
|
+
|
|
9
|
+
> **WindowWithFsAccess** = `Window` & [`IFsAccessApis`](../interfaces/IFsAccessApis.md)
|
|
10
|
+
|
|
11
|
+
Window interface extended with File System Access API
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / DEFAULT\_DIRECTORY\_HANDLE\_DB
|
|
6
|
+
|
|
7
|
+
# Variable: DEFAULT\_DIRECTORY\_HANDLE\_DB
|
|
8
|
+
|
|
9
|
+
> `const` **DEFAULT\_DIRECTORY\_HANDLE\_DB**: `"chocolate-lab-storage"` = `'chocolate-lab-storage'`
|
|
10
|
+
|
|
11
|
+
Default IndexedDB database name for directory handles.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
[**@fgv/ts-web-extras**](../README.md)
|
|
2
|
+
|
|
3
|
+
***
|
|
4
|
+
|
|
5
|
+
[@fgv/ts-web-extras](../README.md) / DEFAULT\_DIRECTORY\_HANDLE\_STORE
|
|
6
|
+
|
|
7
|
+
# Variable: DEFAULT\_DIRECTORY\_HANDLE\_STORE
|
|
8
|
+
|
|
9
|
+
> `const` **DEFAULT\_DIRECTORY\_HANDLE\_STORE**: `"directory-handles"` = `'directory-handles'`
|
|
10
|
+
|
|
11
|
+
Default IndexedDB store name for directory handles.
|
package/etc/ts-web-extras.api.md
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { CryptoUtils as CryptoUtils_2 } from '@fgv/ts-extras';
|
|
8
8
|
import { DetailedResult } from '@fgv/ts-utils';
|
|
9
9
|
import { FileTree } from '@fgv/ts-json-base';
|
|
10
|
+
import { Logging } from '@fgv/ts-utils';
|
|
10
11
|
import { Result } from '@fgv/ts-utils';
|
|
11
12
|
|
|
12
13
|
// Warning: (ae-forgotten-export) The symbol "ICryptoProvider" needs to be exported by the entry point index.d.ts
|
|
@@ -85,6 +86,7 @@ function extractFileMetadata(file: File): IFileMetadata;
|
|
|
85
86
|
// @public
|
|
86
87
|
export class FileApiTreeAccessors<TCT extends string = string> {
|
|
87
88
|
static create<TCT extends string = string>(initializers: TreeInitializer[], params?: FileTree.IFileTreeInitParams<TCT>): Promise<Result<FileTree.FileTree<TCT>>>;
|
|
89
|
+
static createFromHttp<TCT extends string = string>(params: IHttpTreeParams<TCT>): Promise<Result<FileTree.FileTree<TCT>>>;
|
|
88
90
|
static createFromLocalStorage<TCT extends string = string>(params: ILocalStorageTreeParams<TCT>): Result<FileTree.FileTree<TCT>>;
|
|
89
91
|
static createPersistent<TCT extends string = string>(dirHandle: FileSystemDirectoryHandle_2, params?: IFileSystemAccessTreeParams<TCT>): Promise<Result<FileTree.FileTree<TCT>>>;
|
|
90
92
|
static createPersistentFromFile<TCT extends string = string>(fileHandle: FileSystemFileHandle_2, params?: IFileSystemAccessTreeParams<TCT>): Promise<Result<FileTree.FileTree<TCT>>>;
|
|
@@ -105,6 +107,7 @@ export interface FilePickerAcceptType {
|
|
|
105
107
|
// @public
|
|
106
108
|
export class FileSystemAccessTreeAccessors<TCT extends string = string> extends FileTree.InMemoryTreeAccessors<TCT> implements FileTree.IPersistentFileTreeAccessors<TCT> {
|
|
107
109
|
protected constructor(files: FileTree.IInMemoryFile<TCT>[], rootDir: FileSystemDirectoryHandle_2, handles: Map<string, FileSystemFileHandle_2>, params: IFileSystemAccessTreeParams<TCT> | undefined, hasWritePermission: boolean);
|
|
110
|
+
deleteFile(path: string): Result<boolean>;
|
|
108
111
|
fileIsMutable(path: string): DetailedResult<boolean, FileTree.SaveDetail>;
|
|
109
112
|
static fromDirectoryHandle<TCT extends string = string>(dirHandle: FileSystemDirectoryHandle_2, params?: IFileSystemAccessTreeParams<TCT>): Promise<Result<FileSystemAccessTreeAccessors<TCT>>>;
|
|
110
113
|
static fromFileHandle<TCT extends string = string>(fileHandle: FileSystemFileHandle_2, params?: IFileSystemAccessTreeParams<TCT>): Promise<Result<FileSystemAccessTreeAccessors<TCT>>>;
|
|
@@ -228,6 +231,18 @@ function fromFileList(fileList: FileList, params?: FileTree.IFileTreeInitParams<
|
|
|
228
231
|
// @public
|
|
229
232
|
function getOriginalFile(fileList: FileList, path: string): Result<File>;
|
|
230
233
|
|
|
234
|
+
// @public
|
|
235
|
+
export class HttpTreeAccessors<TCT extends string = string> extends FileTree.InMemoryTreeAccessors<TCT> implements FileTree.IPersistentFileTreeAccessors<TCT> {
|
|
236
|
+
// (undocumented)
|
|
237
|
+
deleteFile(path: string): Result<boolean>;
|
|
238
|
+
fileIsMutable(path: string): DetailedResult<boolean, FileTree.SaveDetail>;
|
|
239
|
+
static fromHttp<TCT extends string = string>(params: IHttpTreeParams<TCT>): Promise<Result<HttpTreeAccessors<TCT>>>;
|
|
240
|
+
getDirtyPaths(): string[];
|
|
241
|
+
isDirty(): boolean;
|
|
242
|
+
saveFileContents(path: string, contents: string): Result<string>;
|
|
243
|
+
syncToDisk(): Promise<Result<void>>;
|
|
244
|
+
}
|
|
245
|
+
|
|
231
246
|
// @public
|
|
232
247
|
export interface IDirectoryHandleTreeInitializer {
|
|
233
248
|
// (undocumented)
|
|
@@ -270,6 +285,7 @@ export interface IFileMetadata {
|
|
|
270
285
|
export interface IFileSystemAccessTreeParams<TCT extends string = string> extends FileTree.IFileTreeInitParams<TCT> {
|
|
271
286
|
autoSync?: boolean;
|
|
272
287
|
filePath?: string;
|
|
288
|
+
logger?: Logging.LogReporter<unknown>;
|
|
273
289
|
requireWritePermission?: boolean;
|
|
274
290
|
}
|
|
275
291
|
|
|
@@ -283,6 +299,22 @@ export interface IFsAccessApis {
|
|
|
283
299
|
showSaveFilePicker(options?: ShowSaveFilePickerOptions): Promise<FileSystemFileHandle_2>;
|
|
284
300
|
}
|
|
285
301
|
|
|
302
|
+
// @public
|
|
303
|
+
export interface IHttpTreeParams<TCT extends string = string> extends FileTree.IFileTreeInitParams<TCT> {
|
|
304
|
+
// (undocumented)
|
|
305
|
+
readonly autoSync?: boolean;
|
|
306
|
+
// (undocumented)
|
|
307
|
+
readonly baseUrl: string;
|
|
308
|
+
// (undocumented)
|
|
309
|
+
readonly fetchImpl?: typeof fetch;
|
|
310
|
+
// (undocumented)
|
|
311
|
+
readonly logger?: Logging.LogReporter<unknown>;
|
|
312
|
+
// (undocumented)
|
|
313
|
+
readonly namespace?: string;
|
|
314
|
+
// (undocumented)
|
|
315
|
+
readonly userId?: string;
|
|
316
|
+
}
|
|
317
|
+
|
|
286
318
|
// @public
|
|
287
319
|
export interface ILocalStorageTreeParams<TCT extends string = string> extends FileTree.IFileTreeInitParams<TCT> {
|
|
288
320
|
autoSync?: boolean;
|
|
@@ -318,6 +350,7 @@ export interface IUrlConfigOptions {
|
|
|
318
350
|
|
|
319
351
|
// @public
|
|
320
352
|
export class LocalStorageTreeAccessors<TCT extends string = string> extends FileTree.InMemoryTreeAccessors<TCT> implements FileTree.IPersistentFileTreeAccessors<TCT> {
|
|
353
|
+
deleteFile(path: string): Result<boolean>;
|
|
321
354
|
fileIsMutable(path: string): DetailedResult<boolean, FileTree.SaveDetail>;
|
|
322
355
|
static fromStorage<TCT extends string = string>(params: ILocalStorageTreeParams<TCT>): Result<LocalStorageTreeAccessors<TCT>>;
|
|
323
356
|
getDirtyPaths(): string[];
|
|
@@ -2,6 +2,7 @@ import { Result } from '@fgv/ts-utils';
|
|
|
2
2
|
import { FileTree } from '@fgv/ts-json-base';
|
|
3
3
|
import { FileSystemFileHandle, FileSystemDirectoryHandle } from '../file-api-types';
|
|
4
4
|
import { IFileSystemAccessTreeParams } from './fileSystemAccessTreeAccessors';
|
|
5
|
+
import { IHttpTreeParams } from './httpTreeAccessors';
|
|
5
6
|
import { ILocalStorageTreeParams } from './localStorageTreeAccessors';
|
|
6
7
|
/**
|
|
7
8
|
* Tree initializer for FileList objects (from File API).
|
|
@@ -65,6 +66,14 @@ export declare class FileApiTreeAccessors<TCT extends string = string> {
|
|
|
65
66
|
* @public
|
|
66
67
|
*/
|
|
67
68
|
static createPersistent<TCT extends string = string>(dirHandle: FileSystemDirectoryHandle, params?: IFileSystemAccessTreeParams<TCT>): Promise<Result<FileTree.FileTree<TCT>>>;
|
|
69
|
+
/**
|
|
70
|
+
* Create a persistent FileTree from an HTTP storage service.
|
|
71
|
+
*
|
|
72
|
+
* @param params - Configuration including API base URL, namespace, and optional autoSync
|
|
73
|
+
* @returns Promise resolving to a FileTree with persistence capability
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
static createFromHttp<TCT extends string = string>(params: IHttpTreeParams<TCT>): Promise<Result<FileTree.FileTree<TCT>>>;
|
|
68
77
|
/**
|
|
69
78
|
* Create a persistent FileTree from a single File System Access API file handle.
|
|
70
79
|
* The tree contains exactly one file at `/<filename>`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fileApiTreeAccessors.d.ts","sourceRoot":"","sources":["../../../src/packlets/file-tree/fileApiTreeAccessors.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,MAAM,EAAiB,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAGL,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAiC,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OAAO,EAA6B,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAmBjG;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,oBAAoB,EAAE,CAAC;CAC9C;AAED;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,yBAAyB,EAAE,CAAC;IACjD,QAAQ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GACzC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IA0B1C;;;;;;;OAOG;WACW,eAAe,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IAUnF;;;;OAIG;WACW,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,aAAa;IAU5D;;;;;;OAMG;mBACkB,mBAAmB;IAoBxC;;;;;;OAMG;mBACkB,gBAAgB;IA8BrC;;;OAGG;mBACkB,mBAAmB;IA8BxC;;;;;;;;OAQG;mBACkB,wBAAwB;IAqB7C;;;;;;;;OAQG;mBACkB,uBAAuB;IAuC5C,OAAO,CAAC,MAAM,CAAC,cAAc;CAS9B"}
|
|
@@ -34,6 +34,7 @@ const ts_utils_1 = require("@fgv/ts-utils");
|
|
|
34
34
|
const ts_json_base_1 = require("@fgv/ts-json-base");
|
|
35
35
|
const file_api_types_1 = require("../file-api-types");
|
|
36
36
|
const fileSystemAccessTreeAccessors_1 = require("./fileSystemAccessTreeAccessors");
|
|
37
|
+
const httpTreeAccessors_1 = require("./httpTreeAccessors");
|
|
37
38
|
const localStorageTreeAccessors_1 = require("./localStorageTreeAccessors");
|
|
38
39
|
/**
|
|
39
40
|
* Helper function to safely get webkitRelativePath from a File object.
|
|
@@ -70,6 +71,20 @@ class FileApiTreeAccessors {
|
|
|
70
71
|
}
|
|
71
72
|
return ts_json_base_1.FileTree.FileTree.create(accessorsResult.value);
|
|
72
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Create a persistent FileTree from an HTTP storage service.
|
|
76
|
+
*
|
|
77
|
+
* @param params - Configuration including API base URL, namespace, and optional autoSync
|
|
78
|
+
* @returns Promise resolving to a FileTree with persistence capability
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
static async createFromHttp(params) {
|
|
82
|
+
const accessorsResult = await httpTreeAccessors_1.HttpTreeAccessors.fromHttp(params);
|
|
83
|
+
if (accessorsResult.isFailure()) {
|
|
84
|
+
return (0, ts_utils_1.fail)(accessorsResult.message);
|
|
85
|
+
}
|
|
86
|
+
return ts_json_base_1.FileTree.FileTree.create(accessorsResult.value);
|
|
87
|
+
}
|
|
73
88
|
/**
|
|
74
89
|
* Create a persistent FileTree from a single File System Access API file handle.
|
|
75
90
|
* The tree contains exactly one file at `/<filename>`.
|