@fgv/ts-web-extras 5.1.0-2 → 5.1.0-21
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/dist/packlets/crypto-utils/browserCryptoProvider.js +208 -18
- package/dist/packlets/crypto-utils/browserCryptoProvider.js.map +1 -1
- package/dist/packlets/file-tree/fileApiTreeAccessors.js +1 -1
- package/dist/packlets/file-tree/fileApiTreeAccessors.js.map +1 -1
- package/dist/packlets/file-tree/httpTreeAccessors.js +72 -42
- package/dist/packlets/file-tree/httpTreeAccessors.js.map +1 -1
- package/dist/ts-web-extras.d.ts +59 -7
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/packlets/crypto-utils/browserCryptoProvider.d.ts +52 -5
- package/lib/packlets/crypto-utils/browserCryptoProvider.d.ts.map +1 -1
- package/lib/packlets/crypto-utils/browserCryptoProvider.js +207 -17
- package/lib/packlets/crypto-utils/browserCryptoProvider.js.map +1 -1
- package/lib/packlets/file-tree/fileApiTreeAccessors.d.ts +1 -1
- package/lib/packlets/file-tree/fileApiTreeAccessors.js +1 -1
- package/lib/packlets/file-tree/fileApiTreeAccessors.js.map +1 -1
- package/lib/packlets/file-tree/httpTreeAccessors.d.ts +6 -0
- package/lib/packlets/file-tree/httpTreeAccessors.d.ts.map +1 -1
- package/lib/packlets/file-tree/httpTreeAccessors.js +72 -42
- package/lib/packlets/file-tree/httpTreeAccessors.js.map +1 -1
- package/package.json +27 -26
- package/.rush/temp/chunked-rush-logs/ts-web-extras.build.chunks.jsonl +0 -75
- package/.rush/temp/chunked-rush-logs/ts-web-extras.test.chunks.jsonl +0 -75
- package/.rush/temp/operation/build/all.log +0 -75
- package/.rush/temp/operation/build/error.log +0 -18
- package/.rush/temp/operation/build/log-chunks.jsonl +0 -75
- package/.rush/temp/operation/build/state.json +0 -3
- package/.rush/temp/operation/test/all.log +0 -75
- package/.rush/temp/operation/test/error.log +0 -18
- package/.rush/temp/operation/test/log-chunks.jsonl +0 -75
- package/.rush/temp/operation/test/state.json +0 -3
- package/.rush/temp/shrinkwrap-deps.json +0 -635
- package/CHANGELOG.md +0 -23
- package/config/api-extractor.json +0 -343
- package/config/jest.config.json +0 -19
- package/config/rig.json +0 -16
- package/config/typedoc.json +0 -6
- package/dist/test/mocks/idb-keyval.js +0 -6
- package/dist/test/mocks/idb-keyval.js.map +0 -1
- package/dist/test/setupTests.js +0 -74
- package/dist/test/setupTests.js.map +0 -1
- package/dist/test/unit/browserHashProvider.test.js +0 -140
- package/dist/test/unit/browserHashProvider.test.js.map +0 -1
- package/dist/test/unit/directoryHandleStore.test.js +0 -190
- package/dist/test/unit/directoryHandleStore.test.js.map +0 -1
- package/dist/test/unit/fileApiTreeAccessors.test.js +0 -1188
- package/dist/test/unit/fileApiTreeAccessors.test.js.map +0 -1
- package/dist/test/unit/fileApiTypes.test.js +0 -472
- package/dist/test/unit/fileApiTypes.test.js.map +0 -1
- package/dist/test/unit/fileSystemAccessTreeAccessors.test.js +0 -622
- package/dist/test/unit/fileSystemAccessTreeAccessors.test.js.map +0 -1
- package/dist/test/unit/fileTreeHelpers.test.js +0 -590
- package/dist/test/unit/fileTreeHelpers.test.js.map +0 -1
- package/dist/test/unit/httpTreeAccessors.test.js +0 -1229
- package/dist/test/unit/httpTreeAccessors.test.js.map +0 -1
- package/dist/test/unit/localStorageTreeAccessors.test.js +0 -812
- package/dist/test/unit/localStorageTreeAccessors.test.js.map +0 -1
- package/dist/test/unit/urlParams.test.js +0 -393
- package/dist/test/unit/urlParams.test.js.map +0 -1
- package/dist/test/utils/fileSystemAccessMocks.js +0 -271
- package/dist/test/utils/fileSystemAccessMocks.js.map +0 -1
- package/dist/test/utils/testHelpers.js +0 -124
- package/dist/test/utils/testHelpers.js.map +0 -1
- package/docs/@fgv/namespaces/CryptoUtils/README.md +0 -18
- package/docs/@fgv/namespaces/CryptoUtils/classes/BrowserCryptoProvider.md +0 -203
- package/docs/@fgv/namespaces/CryptoUtils/classes/BrowserHashProvider.md +0 -63
- package/docs/@fgv/namespaces/CryptoUtils/functions/createBrowserCryptoProvider.md +0 -18
- package/docs/@fgv/namespaces/FileTreeHelpers/README.md +0 -19
- package/docs/@fgv/namespaces/FileTreeHelpers/functions/extractFileListMetadata.md +0 -23
- package/docs/@fgv/namespaces/FileTreeHelpers/functions/extractFileMetadata.md +0 -23
- package/docs/@fgv/namespaces/FileTreeHelpers/functions/fromDirectoryUpload.md +0 -33
- package/docs/@fgv/namespaces/FileTreeHelpers/functions/fromFileList.md +0 -33
- package/docs/@fgv/namespaces/FileTreeHelpers/functions/getOriginalFile.md +0 -25
- package/docs/@fgv/namespaces/FileTreeHelpers/variables/defaultFileApiTreeInitParams.md +0 -11
- package/docs/README.md +0 -78
- package/docs/classes/DirectoryHandleStore.md +0 -116
- package/docs/classes/FileApiTreeAccessors.md +0 -286
- package/docs/classes/FileSystemAccessTreeAccessors.md +0 -557
- package/docs/classes/HttpTreeAccessors.md +0 -508
- package/docs/classes/LocalStorageTreeAccessors.md +0 -520
- package/docs/functions/exportAsJson.md +0 -23
- package/docs/functions/exportUsingFileSystemAPI.md +0 -26
- package/docs/functions/extractDirectoryPath.md +0 -23
- package/docs/functions/isDirectoryHandle.md +0 -23
- package/docs/functions/isFileHandle.md +0 -23
- package/docs/functions/isFilePath.md +0 -21
- package/docs/functions/parseContextFilter.md +0 -22
- package/docs/functions/parseQualifierDefaults.md +0 -22
- package/docs/functions/parseResourceTypes.md +0 -22
- package/docs/functions/parseUrlParameters.md +0 -15
- package/docs/functions/safeShowDirectoryPicker.md +0 -24
- package/docs/functions/safeShowOpenFilePicker.md +0 -24
- package/docs/functions/safeShowSaveFilePicker.md +0 -24
- package/docs/functions/supportsFileSystemAccess.md +0 -23
- package/docs/interfaces/FilePickerAcceptType.md +0 -16
- package/docs/interfaces/FileSystemCreateWritableOptions.md +0 -15
- package/docs/interfaces/FileSystemDirectoryHandle.md +0 -187
- package/docs/interfaces/FileSystemFileHandle.md +0 -106
- package/docs/interfaces/FileSystemGetDirectoryOptions.md +0 -15
- package/docs/interfaces/FileSystemGetFileOptions.md +0 -15
- package/docs/interfaces/FileSystemHandle.md +0 -69
- package/docs/interfaces/FileSystemHandlePermissionDescriptor.md +0 -15
- package/docs/interfaces/FileSystemRemoveOptions.md +0 -15
- package/docs/interfaces/FileSystemWritableFileStream.md +0 -127
- package/docs/interfaces/IDirectoryHandleTreeInitializer.md +0 -17
- package/docs/interfaces/IFileHandleTreeInitializer.md +0 -16
- package/docs/interfaces/IFileListTreeInitializer.md +0 -15
- package/docs/interfaces/IFileMetadata.md +0 -19
- package/docs/interfaces/IFileSystemAccessTreeParams.md +0 -30
- package/docs/interfaces/IFsAccessApis.md +0 -57
- package/docs/interfaces/IHttpTreeParams.md +0 -32
- package/docs/interfaces/ILocalStorageTreeParams.md +0 -30
- package/docs/interfaces/IUrlConfigOptions.md +0 -27
- package/docs/interfaces/ShowDirectoryPickerOptions.md +0 -17
- package/docs/interfaces/ShowOpenFilePickerOptions.md +0 -19
- package/docs/interfaces/ShowSaveFilePickerOptions.md +0 -19
- package/docs/type-aliases/TreeInitializer.md +0 -11
- package/docs/type-aliases/WellKnownDirectory.md +0 -11
- package/docs/type-aliases/WindowWithFsAccess.md +0 -11
- package/docs/variables/DEFAULT_DIRECTORY_HANDLE_DB.md +0 -11
- package/docs/variables/DEFAULT_DIRECTORY_HANDLE_STORE.md +0 -11
- package/etc/ts-web-extras.api.md +0 -433
- package/lib/test/mocks/idb-keyval.d.ts +0 -6
- package/lib/test/mocks/idb-keyval.d.ts.map +0 -1
- package/lib/test/mocks/idb-keyval.js +0 -9
- package/lib/test/mocks/idb-keyval.js.map +0 -1
- package/lib/test/setupTests.d.ts +0 -2
- package/lib/test/setupTests.d.ts.map +0 -1
- package/lib/test/setupTests.js +0 -76
- package/lib/test/setupTests.js.map +0 -1
- package/lib/test/unit/browserHashProvider.test.d.ts +0 -2
- package/lib/test/unit/browserHashProvider.test.d.ts.map +0 -1
- package/lib/test/unit/browserHashProvider.test.js +0 -142
- package/lib/test/unit/browserHashProvider.test.js.map +0 -1
- package/lib/test/unit/directoryHandleStore.test.d.ts +0 -2
- package/lib/test/unit/directoryHandleStore.test.d.ts.map +0 -1
- package/lib/test/unit/directoryHandleStore.test.js +0 -192
- package/lib/test/unit/directoryHandleStore.test.js.map +0 -1
- package/lib/test/unit/fileApiTreeAccessors.test.d.ts +0 -2
- package/lib/test/unit/fileApiTreeAccessors.test.d.ts.map +0 -1
- package/lib/test/unit/fileApiTreeAccessors.test.js +0 -1190
- package/lib/test/unit/fileApiTreeAccessors.test.js.map +0 -1
- package/lib/test/unit/fileApiTypes.test.d.ts +0 -2
- package/lib/test/unit/fileApiTypes.test.d.ts.map +0 -1
- package/lib/test/unit/fileApiTypes.test.js +0 -474
- package/lib/test/unit/fileApiTypes.test.js.map +0 -1
- package/lib/test/unit/fileSystemAccessTreeAccessors.test.d.ts +0 -2
- package/lib/test/unit/fileSystemAccessTreeAccessors.test.d.ts.map +0 -1
- package/lib/test/unit/fileSystemAccessTreeAccessors.test.js +0 -624
- package/lib/test/unit/fileSystemAccessTreeAccessors.test.js.map +0 -1
- package/lib/test/unit/fileTreeHelpers.test.d.ts +0 -2
- package/lib/test/unit/fileTreeHelpers.test.d.ts.map +0 -1
- package/lib/test/unit/fileTreeHelpers.test.js +0 -592
- package/lib/test/unit/fileTreeHelpers.test.js.map +0 -1
- package/lib/test/unit/httpTreeAccessors.test.d.ts +0 -2
- package/lib/test/unit/httpTreeAccessors.test.d.ts.map +0 -1
- package/lib/test/unit/httpTreeAccessors.test.js +0 -1231
- package/lib/test/unit/httpTreeAccessors.test.js.map +0 -1
- package/lib/test/unit/localStorageTreeAccessors.test.d.ts +0 -2
- package/lib/test/unit/localStorageTreeAccessors.test.d.ts.map +0 -1
- package/lib/test/unit/localStorageTreeAccessors.test.js +0 -814
- package/lib/test/unit/localStorageTreeAccessors.test.js.map +0 -1
- package/lib/test/unit/urlParams.test.d.ts +0 -2
- package/lib/test/unit/urlParams.test.d.ts.map +0 -1
- package/lib/test/unit/urlParams.test.js +0 -395
- package/lib/test/unit/urlParams.test.js.map +0 -1
- package/lib/test/utils/fileSystemAccessMocks.d.ts +0 -53
- package/lib/test/utils/fileSystemAccessMocks.d.ts.map +0 -1
- package/lib/test/utils/fileSystemAccessMocks.js +0 -277
- package/lib/test/utils/fileSystemAccessMocks.js.map +0 -1
- package/lib/test/utils/testHelpers.d.ts +0 -51
- package/lib/test/utils/testHelpers.d.ts.map +0 -1
- package/lib/test/utils/testHelpers.js +0 -133
- package/lib/test/utils/testHelpers.js.map +0 -1
- package/rush-logs/ts-web-extras.build.cache.log +0 -0
- package/rush-logs/ts-web-extras.build.error.log +0 -18
- package/rush-logs/ts-web-extras.build.log +0 -75
- package/rush-logs/ts-web-extras.test.cache.log +0 -1
- package/rush-logs/ts-web-extras.test.error.log +0 -18
- package/rush-logs/ts-web-extras.test.log +0 -75
- package/src/index.browser.ts +0 -24
- package/src/index.ts +0 -47
- package/src/packlets/crypto-utils/browserCryptoProvider.ts +0 -311
- package/src/packlets/crypto-utils/browserHashProvider.ts +0 -73
- package/src/packlets/crypto-utils/index.ts +0 -29
- package/src/packlets/file-api-types/index.ts +0 -366
- package/src/packlets/file-tree/directoryHandleStore.ts +0 -136
- package/src/packlets/file-tree/fileApiTreeAccessors.ts +0 -528
- package/src/packlets/file-tree/fileSystemAccessTreeAccessors.ts +0 -519
- package/src/packlets/file-tree/httpTreeAccessors.ts +0 -448
- package/src/packlets/file-tree/index.ts +0 -32
- package/src/packlets/file-tree/localStorageTreeAccessors.ts +0 -430
- package/src/packlets/helpers/fileTreeHelpers.ts +0 -107
- package/src/packlets/helpers/index.ts +0 -28
- package/src/packlets/url-utils/index.ts +0 -28
- package/src/packlets/url-utils/urlParams.ts +0 -245
- package/src/test/mocks/idb-keyval.ts +0 -5
- package/src/test/setupTests.ts +0 -87
- package/src/test/unit/browserHashProvider.test.ts +0 -155
- package/src/test/unit/browserHashProvider.test.ts.bak +0 -376
- package/src/test/unit/directoryHandleStore.test.ts +0 -251
- package/src/test/unit/fileApiTreeAccessors.test.ts +0 -1387
- package/src/test/unit/fileApiTypes.test.ts +0 -587
- package/src/test/unit/fileSystemAccessTreeAccessors.test.ts +0 -885
- package/src/test/unit/fileTreeHelpers.test.ts +0 -694
- package/src/test/unit/httpTreeAccessors.test.ts +0 -1571
- package/src/test/unit/localStorageTreeAccessors.test.ts +0 -1014
- package/src/test/unit/urlParams.test.ts +0 -464
- package/src/test/utils/fileSystemAccessMocks.ts +0 -353
- package/src/test/utils/testHelpers.ts +0 -155
- package/temp/build/typescript/ts_8nwakTlr.json +0 -1
- package/temp/coverage/base.css +0 -224
- package/temp/coverage/block-navigation.js +0 -87
- package/temp/coverage/crypto/browserHashProvider.ts.html +0 -304
- package/temp/coverage/crypto/index.html +0 -116
- package/temp/coverage/crypto-utils/browserCryptoProvider.ts.html +0 -1018
- package/temp/coverage/crypto-utils/browserHashProvider.ts.html +0 -304
- package/temp/coverage/crypto-utils/index.html +0 -131
- package/temp/coverage/favicon.png +0 -0
- package/temp/coverage/file-tree/directoryHandleStore.ts.html +0 -493
- package/temp/coverage/file-tree/fileApiTreeAccessors.ts.html +0 -1669
- package/temp/coverage/file-tree/fileSystemAccessTreeAccessors.ts.html +0 -1642
- package/temp/coverage/file-tree/httpTreeAccessors.ts.html +0 -1429
- package/temp/coverage/file-tree/index.html +0 -176
- package/temp/coverage/file-tree/localStorageTreeAccessors.ts.html +0 -1375
- package/temp/coverage/helpers/fileTreeHelpers.ts.html +0 -406
- package/temp/coverage/helpers/index.html +0 -116
- package/temp/coverage/index.html +0 -161
- package/temp/coverage/lcov-report/base.css +0 -224
- package/temp/coverage/lcov-report/block-navigation.js +0 -87
- package/temp/coverage/lcov-report/crypto/browserHashProvider.ts.html +0 -304
- package/temp/coverage/lcov-report/crypto/index.html +0 -116
- package/temp/coverage/lcov-report/crypto-utils/browserCryptoProvider.ts.html +0 -1018
- package/temp/coverage/lcov-report/crypto-utils/browserHashProvider.ts.html +0 -304
- package/temp/coverage/lcov-report/crypto-utils/index.html +0 -131
- package/temp/coverage/lcov-report/favicon.png +0 -0
- package/temp/coverage/lcov-report/file-tree/directoryHandleStore.ts.html +0 -493
- package/temp/coverage/lcov-report/file-tree/fileApiTreeAccessors.ts.html +0 -1669
- package/temp/coverage/lcov-report/file-tree/fileSystemAccessTreeAccessors.ts.html +0 -1642
- package/temp/coverage/lcov-report/file-tree/httpTreeAccessors.ts.html +0 -1429
- package/temp/coverage/lcov-report/file-tree/index.html +0 -176
- package/temp/coverage/lcov-report/file-tree/localStorageTreeAccessors.ts.html +0 -1375
- package/temp/coverage/lcov-report/helpers/fileTreeHelpers.ts.html +0 -406
- package/temp/coverage/lcov-report/helpers/index.html +0 -116
- package/temp/coverage/lcov-report/index.html +0 -161
- package/temp/coverage/lcov-report/prettify.css +0 -1
- package/temp/coverage/lcov-report/prettify.js +0 -2
- package/temp/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/temp/coverage/lcov-report/sorter.js +0 -210
- package/temp/coverage/lcov-report/url-utils/index.html +0 -116
- package/temp/coverage/lcov-report/url-utils/urlParams.ts.html +0 -820
- package/temp/coverage/lcov.info +0 -3597
- package/temp/coverage/prettify.css +0 -1
- package/temp/coverage/prettify.js +0 -2
- package/temp/coverage/sort-arrow-sprite.png +0 -0
- package/temp/coverage/sorter.js +0 -210
- package/temp/coverage/url-utils/index.html +0 -116
- package/temp/coverage/url-utils/urlParams.ts.html +0 -820
- package/temp/test/jest/haste-map-b931e4e63102f86c5bd4949f7dced44f-9d713eb41149188b4e5c0ae3d86d0a57-2ad8e16b24e391b8cdbe50b55c137169 +0 -0
- package/temp/test/jest/jest-transform-cache-b931e4e63102f86c5bd4949f7dced44f-79ef2876fae7ca75eedb2aa53dc48338/b5/package_b5f57afc9ec2c011239b1608ee5bdfa5 +0 -53
- package/temp/test/jest/perf-cache-b931e4e63102f86c5bd4949f7dced44f-da39a3ee5e6b4b0d3255bfef95601890 +0 -1
- package/temp/ts-web-extras.api.json +0 -8850
- package/temp/ts-web-extras.api.md +0 -433
- package/tsconfig.json +0 -7
package/etc/ts-web-extras.api.md
DELETED
|
@@ -1,433 +0,0 @@
|
|
|
1
|
-
## API Report File for "@fgv/ts-web-extras"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import { CryptoUtils as CryptoUtils_2 } from '@fgv/ts-extras';
|
|
8
|
-
import { DetailedResult } from '@fgv/ts-utils';
|
|
9
|
-
import { FileTree } from '@fgv/ts-json-base';
|
|
10
|
-
import { Logging } from '@fgv/ts-utils';
|
|
11
|
-
import { Result } from '@fgv/ts-utils';
|
|
12
|
-
|
|
13
|
-
// Warning: (ae-forgotten-export) The symbol "ICryptoProvider" needs to be exported by the entry point index.d.ts
|
|
14
|
-
//
|
|
15
|
-
// @public
|
|
16
|
-
class BrowserCryptoProvider implements ICryptoProvider {
|
|
17
|
-
// Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver
|
|
18
|
-
constructor(cryptoApi?: Crypto);
|
|
19
|
-
decrypt(encryptedData: Uint8Array, key: Uint8Array, iv: Uint8Array, authTag: Uint8Array): Promise<Result<string>>;
|
|
20
|
-
deriveKey(password: string, salt: Uint8Array, iterations: number): Promise<Result<Uint8Array>>;
|
|
21
|
-
// Warning: (ae-forgotten-export) The symbol "IEncryptionResult" needs to be exported by the entry point index.d.ts
|
|
22
|
-
encrypt(plaintext: string, key: Uint8Array): Promise<Result<IEncryptionResult>>;
|
|
23
|
-
fromBase64(base64: string): Result<Uint8Array>;
|
|
24
|
-
generateKey(): Promise<Result<Uint8Array>>;
|
|
25
|
-
generateRandomBytes(length: number): Result<Uint8Array>;
|
|
26
|
-
toBase64(data: Uint8Array): string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// @public
|
|
30
|
-
class BrowserHashProvider {
|
|
31
|
-
static hashParts(parts: string[], algorithm?: string, separator?: string): Promise<Result<string>>;
|
|
32
|
-
static hashString(data: string, algorithm?: string): Promise<Result<string>>;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Warning: (ae-unresolved-link) The @link reference could not be resolved: This type of declaration is not supported yet by the resolver
|
|
36
|
-
//
|
|
37
|
-
// @public
|
|
38
|
-
function createBrowserCryptoProvider(): Result<BrowserCryptoProvider>;
|
|
39
|
-
|
|
40
|
-
declare namespace CryptoUtils {
|
|
41
|
-
export {
|
|
42
|
-
BrowserHashProvider,
|
|
43
|
-
createBrowserCryptoProvider,
|
|
44
|
-
BrowserCryptoProvider
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
export { CryptoUtils }
|
|
48
|
-
|
|
49
|
-
// @public
|
|
50
|
-
export const DEFAULT_DIRECTORY_HANDLE_DB = "chocolate-lab-storage";
|
|
51
|
-
|
|
52
|
-
// @public
|
|
53
|
-
export const DEFAULT_DIRECTORY_HANDLE_STORE = "directory-handles";
|
|
54
|
-
|
|
55
|
-
// @public
|
|
56
|
-
const defaultFileApiTreeInitParams: FileTree.IFileTreeInitParams<string>;
|
|
57
|
-
|
|
58
|
-
// @public
|
|
59
|
-
export class DirectoryHandleStore {
|
|
60
|
-
constructor(dbName?: string, storeName?: string);
|
|
61
|
-
getAll(): Promise<Result<Array<{
|
|
62
|
-
label: string;
|
|
63
|
-
handle: FileSystemDirectoryHandle_2;
|
|
64
|
-
}>>>;
|
|
65
|
-
getAllLabels(): Promise<Result<string[]>>;
|
|
66
|
-
load(label: string): Promise<Result<FileSystemDirectoryHandle_2 | undefined>>;
|
|
67
|
-
remove(label: string): Promise<Result<void>>;
|
|
68
|
-
save(label: string, handle: FileSystemDirectoryHandle_2): Promise<Result<void>>;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// @public
|
|
72
|
-
export function exportAsJson(data: unknown, filename: string): void;
|
|
73
|
-
|
|
74
|
-
// @public
|
|
75
|
-
export function exportUsingFileSystemAPI(data: unknown, suggestedName: string, description?: string, window?: Window): Promise<boolean>;
|
|
76
|
-
|
|
77
|
-
// @public
|
|
78
|
-
export function extractDirectoryPath(path: string): string;
|
|
79
|
-
|
|
80
|
-
// @public
|
|
81
|
-
function extractFileListMetadata(fileList: FileList): Array<IFileMetadata>;
|
|
82
|
-
|
|
83
|
-
// @public
|
|
84
|
-
function extractFileMetadata(file: File): IFileMetadata;
|
|
85
|
-
|
|
86
|
-
// @public
|
|
87
|
-
export class FileApiTreeAccessors<TCT extends string = string> {
|
|
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>>>;
|
|
90
|
-
static createFromLocalStorage<TCT extends string = string>(params: ILocalStorageTreeParams<TCT>): Result<FileTree.FileTree<TCT>>;
|
|
91
|
-
static createPersistent<TCT extends string = string>(dirHandle: FileSystemDirectoryHandle_2, params?: IFileSystemAccessTreeParams<TCT>): Promise<Result<FileTree.FileTree<TCT>>>;
|
|
92
|
-
static createPersistentFromFile<TCT extends string = string>(fileHandle: FileSystemFileHandle_2, params?: IFileSystemAccessTreeParams<TCT>): Promise<Result<FileTree.FileTree<TCT>>>;
|
|
93
|
-
static extractFileMetadata(file: File): IFileMetadata;
|
|
94
|
-
static fromDirectoryUpload<TCT extends string = string>(fileList: FileList, params?: FileTree.IFileTreeInitParams<TCT>): Promise<Result<FileTree.FileTree<TCT>>>;
|
|
95
|
-
static fromFileList<TCT extends string = string>(fileList: FileList, params?: FileTree.IFileTreeInitParams<TCT>): Promise<Result<FileTree.FileTree<TCT>>>;
|
|
96
|
-
static getOriginalFile(fileList: FileList, targetPath: string): Result<File>;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// @public
|
|
100
|
-
export interface FilePickerAcceptType {
|
|
101
|
-
// (undocumented)
|
|
102
|
-
accept: Record<string, string | string[]>;
|
|
103
|
-
// (undocumented)
|
|
104
|
-
description?: string;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// @public
|
|
108
|
-
export class FileSystemAccessTreeAccessors<TCT extends string = string> extends FileTree.InMemoryTreeAccessors<TCT> implements FileTree.IPersistentFileTreeAccessors<TCT> {
|
|
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>;
|
|
111
|
-
fileIsMutable(path: string): DetailedResult<boolean, FileTree.SaveDetail>;
|
|
112
|
-
static fromDirectoryHandle<TCT extends string = string>(dirHandle: FileSystemDirectoryHandle_2, params?: IFileSystemAccessTreeParams<TCT>): Promise<Result<FileSystemAccessTreeAccessors<TCT>>>;
|
|
113
|
-
static fromFileHandle<TCT extends string = string>(fileHandle: FileSystemFileHandle_2, params?: IFileSystemAccessTreeParams<TCT>): Promise<Result<FileSystemAccessTreeAccessors<TCT>>>;
|
|
114
|
-
getDirtyPaths(): string[];
|
|
115
|
-
isDirty(): boolean;
|
|
116
|
-
saveFileContents(path: string, contents: string): Result<string>;
|
|
117
|
-
syncToDisk(): Promise<Result<void>>;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// @public
|
|
121
|
-
interface FileSystemCreateWritableOptions_2 {
|
|
122
|
-
// (undocumented)
|
|
123
|
-
keepExistingData?: boolean;
|
|
124
|
-
}
|
|
125
|
-
export { FileSystemCreateWritableOptions_2 as FileSystemCreateWritableOptions }
|
|
126
|
-
|
|
127
|
-
// @public
|
|
128
|
-
interface FileSystemDirectoryHandle_2 extends FileSystemHandle_2 {
|
|
129
|
-
// (undocumented)
|
|
130
|
-
[Symbol.asyncIterator](): AsyncIterableIterator<[string, FileSystemHandle_2]>;
|
|
131
|
-
// (undocumented)
|
|
132
|
-
entries(): AsyncIterableIterator<[string, FileSystemHandle_2]>;
|
|
133
|
-
// (undocumented)
|
|
134
|
-
getDirectoryHandle(name: string, options?: FileSystemGetDirectoryOptions_2): Promise<FileSystemDirectoryHandle_2>;
|
|
135
|
-
// (undocumented)
|
|
136
|
-
getFileHandle(name: string, options?: FileSystemGetFileOptions_2): Promise<FileSystemFileHandle_2>;
|
|
137
|
-
// (undocumented)
|
|
138
|
-
keys(): AsyncIterableIterator<string>;
|
|
139
|
-
// (undocumented)
|
|
140
|
-
readonly kind: 'directory';
|
|
141
|
-
// (undocumented)
|
|
142
|
-
removeEntry(name: string, options?: FileSystemRemoveOptions_2): Promise<void>;
|
|
143
|
-
// (undocumented)
|
|
144
|
-
resolve(possibleDescendant: FileSystemHandle_2): Promise<string[] | null>;
|
|
145
|
-
// (undocumented)
|
|
146
|
-
values(): AsyncIterableIterator<FileSystemHandle_2>;
|
|
147
|
-
}
|
|
148
|
-
export { FileSystemDirectoryHandle_2 as FileSystemDirectoryHandle }
|
|
149
|
-
|
|
150
|
-
// @public
|
|
151
|
-
interface FileSystemFileHandle_2 extends FileSystemHandle_2 {
|
|
152
|
-
// (undocumented)
|
|
153
|
-
createWritable(options?: FileSystemCreateWritableOptions_2): Promise<FileSystemWritableFileStream_2>;
|
|
154
|
-
// (undocumented)
|
|
155
|
-
getFile(): Promise<File>;
|
|
156
|
-
// (undocumented)
|
|
157
|
-
readonly kind: 'file';
|
|
158
|
-
}
|
|
159
|
-
export { FileSystemFileHandle_2 as FileSystemFileHandle }
|
|
160
|
-
|
|
161
|
-
// @public
|
|
162
|
-
interface FileSystemGetDirectoryOptions_2 {
|
|
163
|
-
// (undocumented)
|
|
164
|
-
create?: boolean;
|
|
165
|
-
}
|
|
166
|
-
export { FileSystemGetDirectoryOptions_2 as FileSystemGetDirectoryOptions }
|
|
167
|
-
|
|
168
|
-
// @public
|
|
169
|
-
interface FileSystemGetFileOptions_2 {
|
|
170
|
-
// (undocumented)
|
|
171
|
-
create?: boolean;
|
|
172
|
-
}
|
|
173
|
-
export { FileSystemGetFileOptions_2 as FileSystemGetFileOptions }
|
|
174
|
-
|
|
175
|
-
// @public
|
|
176
|
-
interface FileSystemHandle_2 {
|
|
177
|
-
// (undocumented)
|
|
178
|
-
isSameEntry(other: FileSystemHandle_2): Promise<boolean>;
|
|
179
|
-
// (undocumented)
|
|
180
|
-
readonly kind: 'file' | 'directory';
|
|
181
|
-
// (undocumented)
|
|
182
|
-
readonly name: string;
|
|
183
|
-
// (undocumented)
|
|
184
|
-
queryPermission(descriptor?: FileSystemHandlePermissionDescriptor): Promise<PermissionState>;
|
|
185
|
-
// (undocumented)
|
|
186
|
-
requestPermission(descriptor?: FileSystemHandlePermissionDescriptor): Promise<PermissionState>;
|
|
187
|
-
}
|
|
188
|
-
export { FileSystemHandle_2 as FileSystemHandle }
|
|
189
|
-
|
|
190
|
-
// @public
|
|
191
|
-
export interface FileSystemHandlePermissionDescriptor {
|
|
192
|
-
// (undocumented)
|
|
193
|
-
mode?: 'read' | 'readwrite';
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// @public
|
|
197
|
-
interface FileSystemRemoveOptions_2 {
|
|
198
|
-
// (undocumented)
|
|
199
|
-
recursive?: boolean;
|
|
200
|
-
}
|
|
201
|
-
export { FileSystemRemoveOptions_2 as FileSystemRemoveOptions }
|
|
202
|
-
|
|
203
|
-
// @public
|
|
204
|
-
interface FileSystemWritableFileStream_2 extends WritableStream {
|
|
205
|
-
// (undocumented)
|
|
206
|
-
seek(position: number): Promise<void>;
|
|
207
|
-
// (undocumented)
|
|
208
|
-
truncate(size: number): Promise<void>;
|
|
209
|
-
// (undocumented)
|
|
210
|
-
write(data: BufferSource | Blob | string): Promise<void>;
|
|
211
|
-
}
|
|
212
|
-
export { FileSystemWritableFileStream_2 as FileSystemWritableFileStream }
|
|
213
|
-
|
|
214
|
-
declare namespace FileTreeHelpers {
|
|
215
|
-
export {
|
|
216
|
-
fromFileList,
|
|
217
|
-
fromDirectoryUpload,
|
|
218
|
-
getOriginalFile,
|
|
219
|
-
extractFileListMetadata,
|
|
220
|
-
extractFileMetadata,
|
|
221
|
-
defaultFileApiTreeInitParams
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// @public
|
|
226
|
-
function fromDirectoryUpload(fileList: FileList, params?: FileTree.IFileTreeInitParams<string>): Promise<Result<FileTree.FileTree<string>>>;
|
|
227
|
-
|
|
228
|
-
// @public
|
|
229
|
-
function fromFileList(fileList: FileList, params?: FileTree.IFileTreeInitParams<string>): Promise<Result<FileTree.FileTree<string>>>;
|
|
230
|
-
|
|
231
|
-
// @public
|
|
232
|
-
function getOriginalFile(fileList: FileList, path: string): Result<File>;
|
|
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
|
-
|
|
246
|
-
// @public
|
|
247
|
-
export interface IDirectoryHandleTreeInitializer {
|
|
248
|
-
// (undocumented)
|
|
249
|
-
readonly dirHandles: FileSystemDirectoryHandle_2[];
|
|
250
|
-
// (undocumented)
|
|
251
|
-
readonly nonRecursive?: boolean;
|
|
252
|
-
// (undocumented)
|
|
253
|
-
readonly prefix?: string;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
// @public
|
|
257
|
-
export interface IFileHandleTreeInitializer {
|
|
258
|
-
// (undocumented)
|
|
259
|
-
readonly fileHandles: FileSystemFileHandle_2[];
|
|
260
|
-
// (undocumented)
|
|
261
|
-
readonly prefix?: string;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
// @public
|
|
265
|
-
export interface IFileListTreeInitializer {
|
|
266
|
-
// (undocumented)
|
|
267
|
-
readonly fileList: FileList;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
// @public
|
|
271
|
-
export interface IFileMetadata {
|
|
272
|
-
// (undocumented)
|
|
273
|
-
lastModified: number;
|
|
274
|
-
// (undocumented)
|
|
275
|
-
name: string;
|
|
276
|
-
// (undocumented)
|
|
277
|
-
path: string;
|
|
278
|
-
// (undocumented)
|
|
279
|
-
size: number;
|
|
280
|
-
// (undocumented)
|
|
281
|
-
type: string;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
// @public
|
|
285
|
-
export interface IFileSystemAccessTreeParams<TCT extends string = string> extends FileTree.IFileTreeInitParams<TCT> {
|
|
286
|
-
autoSync?: boolean;
|
|
287
|
-
filePath?: string;
|
|
288
|
-
logger?: Logging.LogReporter<unknown>;
|
|
289
|
-
requireWritePermission?: boolean;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
// @public
|
|
293
|
-
export interface IFsAccessApis {
|
|
294
|
-
// (undocumented)
|
|
295
|
-
showDirectoryPicker(options?: ShowDirectoryPickerOptions): Promise<FileSystemDirectoryHandle_2>;
|
|
296
|
-
// (undocumented)
|
|
297
|
-
showOpenFilePicker(options?: ShowOpenFilePickerOptions): Promise<FileSystemFileHandle_2[]>;
|
|
298
|
-
// (undocumented)
|
|
299
|
-
showSaveFilePicker(options?: ShowSaveFilePickerOptions): Promise<FileSystemFileHandle_2>;
|
|
300
|
-
}
|
|
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
|
-
|
|
318
|
-
// @public
|
|
319
|
-
export interface ILocalStorageTreeParams<TCT extends string = string> extends FileTree.IFileTreeInitParams<TCT> {
|
|
320
|
-
autoSync?: boolean;
|
|
321
|
-
pathToKeyMap: Record<string, string>;
|
|
322
|
-
storage?: Storage;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
// @public
|
|
326
|
-
export function isDirectoryHandle(handle: FileSystemHandle_2): handle is FileSystemDirectoryHandle_2;
|
|
327
|
-
|
|
328
|
-
// @public
|
|
329
|
-
export function isFileHandle(handle: FileSystemHandle_2): handle is FileSystemFileHandle_2;
|
|
330
|
-
|
|
331
|
-
// @public
|
|
332
|
-
export function isFilePath(path: string): boolean;
|
|
333
|
-
|
|
334
|
-
// @public
|
|
335
|
-
export interface IUrlConfigOptions {
|
|
336
|
-
config?: string;
|
|
337
|
-
configStartDir?: string;
|
|
338
|
-
contextFilter?: string;
|
|
339
|
-
input?: string;
|
|
340
|
-
inputStartDir?: string;
|
|
341
|
-
interactive?: boolean;
|
|
342
|
-
loadZip?: boolean;
|
|
343
|
-
maxDistance?: number;
|
|
344
|
-
qualifierDefaults?: string;
|
|
345
|
-
reduceQualifiers?: boolean;
|
|
346
|
-
resourceTypes?: string;
|
|
347
|
-
zipFile?: string;
|
|
348
|
-
zipPath?: string;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
// @public
|
|
352
|
-
export class LocalStorageTreeAccessors<TCT extends string = string> extends FileTree.InMemoryTreeAccessors<TCT> implements FileTree.IPersistentFileTreeAccessors<TCT> {
|
|
353
|
-
deleteFile(path: string): Result<boolean>;
|
|
354
|
-
fileIsMutable(path: string): DetailedResult<boolean, FileTree.SaveDetail>;
|
|
355
|
-
static fromStorage<TCT extends string = string>(params: ILocalStorageTreeParams<TCT>): Result<LocalStorageTreeAccessors<TCT>>;
|
|
356
|
-
getDirtyPaths(): string[];
|
|
357
|
-
isDirty(): boolean;
|
|
358
|
-
saveFileContents(path: string, contents: string): Result<string>;
|
|
359
|
-
syncToDisk(): Promise<Result<void>>;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
// @public
|
|
363
|
-
export function parseContextFilter(contextFilter: string): Record<string, string>;
|
|
364
|
-
|
|
365
|
-
// @public
|
|
366
|
-
export function parseQualifierDefaults(qualifierDefaults: string): Record<string, string[]>;
|
|
367
|
-
|
|
368
|
-
// @public
|
|
369
|
-
export function parseResourceTypes(resourceTypes: string): string[];
|
|
370
|
-
|
|
371
|
-
// @public
|
|
372
|
-
export function parseUrlParameters(): IUrlConfigOptions;
|
|
373
|
-
|
|
374
|
-
// @public
|
|
375
|
-
export function safeShowDirectoryPicker(window: Window, options?: ShowDirectoryPickerOptions): Promise<FileSystemDirectoryHandle_2 | null>;
|
|
376
|
-
|
|
377
|
-
// @public
|
|
378
|
-
export function safeShowOpenFilePicker(window: Window, options?: ShowOpenFilePickerOptions): Promise<FileSystemFileHandle_2[] | null>;
|
|
379
|
-
|
|
380
|
-
// @public
|
|
381
|
-
export function safeShowSaveFilePicker(window: Window, options?: ShowSaveFilePickerOptions): Promise<FileSystemFileHandle_2 | null>;
|
|
382
|
-
|
|
383
|
-
// @public
|
|
384
|
-
export interface ShowDirectoryPickerOptions {
|
|
385
|
-
// (undocumented)
|
|
386
|
-
id?: string;
|
|
387
|
-
// (undocumented)
|
|
388
|
-
mode?: 'read' | 'readwrite';
|
|
389
|
-
// (undocumented)
|
|
390
|
-
startIn?: FileSystemHandle_2 | WellKnownDirectory;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
// @public
|
|
394
|
-
export interface ShowOpenFilePickerOptions {
|
|
395
|
-
// (undocumented)
|
|
396
|
-
excludeAcceptAllOption?: boolean;
|
|
397
|
-
// (undocumented)
|
|
398
|
-
id?: string;
|
|
399
|
-
// (undocumented)
|
|
400
|
-
multiple?: boolean;
|
|
401
|
-
// (undocumented)
|
|
402
|
-
startIn?: FileSystemHandle_2 | WellKnownDirectory;
|
|
403
|
-
// (undocumented)
|
|
404
|
-
types?: FilePickerAcceptType[];
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
// @public
|
|
408
|
-
export interface ShowSaveFilePickerOptions {
|
|
409
|
-
// (undocumented)
|
|
410
|
-
excludeAcceptAllOption?: boolean;
|
|
411
|
-
// (undocumented)
|
|
412
|
-
id?: string;
|
|
413
|
-
// (undocumented)
|
|
414
|
-
startIn?: FileSystemHandle_2 | WellKnownDirectory;
|
|
415
|
-
// (undocumented)
|
|
416
|
-
suggestedName?: string;
|
|
417
|
-
// (undocumented)
|
|
418
|
-
types?: FilePickerAcceptType[];
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
// @public
|
|
422
|
-
export function supportsFileSystemAccess(window: Window): window is WindowWithFsAccess;
|
|
423
|
-
|
|
424
|
-
// @public
|
|
425
|
-
export type TreeInitializer = IFileListTreeInitializer | IFileHandleTreeInitializer | IDirectoryHandleTreeInitializer;
|
|
426
|
-
|
|
427
|
-
// @public
|
|
428
|
-
export type WellKnownDirectory = 'desktop' | 'documents' | 'downloads' | 'music' | 'pictures' | 'videos';
|
|
429
|
-
|
|
430
|
-
// @public
|
|
431
|
-
export type WindowWithFsAccess = Window & IFsAccessApis;
|
|
432
|
-
|
|
433
|
-
```
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const createStore: jest.Mock<{}, [], any>;
|
|
2
|
-
export declare const get: jest.Mock<any, any, any>;
|
|
3
|
-
export declare const set: jest.Mock<any, any, any>;
|
|
4
|
-
export declare const del: jest.Mock<any, any, any>;
|
|
5
|
-
export declare const keys: jest.Mock<any, any, any>;
|
|
6
|
-
//# sourceMappingURL=idb-keyval.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"idb-keyval.d.ts","sourceRoot":"","sources":["../../../src/test/mocks/idb-keyval.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,wBAAsB,CAAC;AAC/C,eAAO,MAAM,GAAG,0BAAY,CAAC;AAC7B,eAAO,MAAM,GAAG,0BAAY,CAAC;AAC7B,eAAO,MAAM,GAAG,0BAAY,CAAC;AAC7B,eAAO,MAAM,IAAI,0BAAY,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.keys = exports.del = exports.set = exports.get = exports.createStore = void 0;
|
|
4
|
-
exports.createStore = jest.fn(() => ({}));
|
|
5
|
-
exports.get = jest.fn();
|
|
6
|
-
exports.set = jest.fn();
|
|
7
|
-
exports.del = jest.fn();
|
|
8
|
-
exports.keys = jest.fn();
|
|
9
|
-
//# sourceMappingURL=idb-keyval.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"idb-keyval.js","sourceRoot":"","sources":["../../../src/test/mocks/idb-keyval.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAClC,QAAA,GAAG,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAChB,QAAA,GAAG,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAChB,QAAA,GAAG,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAChB,QAAA,IAAI,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC","sourcesContent":["export const createStore = jest.fn(() => ({}));\nexport const get = jest.fn();\nexport const set = jest.fn();\nexport const del = jest.fn();\nexport const keys = jest.fn();\n"]}
|
package/lib/test/setupTests.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setupTests.d.ts","sourceRoot":"","sources":["../../src/test/setupTests.ts"],"names":[],"mappings":""}
|
package/lib/test/setupTests.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2025 Erik Fortune
|
|
4
|
-
*
|
|
5
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
* in the Software without restriction, including without limitation the rights
|
|
8
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
* furnished to do so, subject to the following conditions:
|
|
11
|
-
*
|
|
12
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
* copies or substantial portions of the Software.
|
|
14
|
-
*
|
|
15
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
* SOFTWARE.
|
|
22
|
-
*/
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
const crypto_1 = require("crypto");
|
|
25
|
-
const util_1 = require("util");
|
|
26
|
-
// Setup Web Crypto API using Node.js webcrypto
|
|
27
|
-
Object.defineProperty(global, 'crypto', {
|
|
28
|
-
value: crypto_1.webcrypto,
|
|
29
|
-
writable: true,
|
|
30
|
-
configurable: true
|
|
31
|
-
});
|
|
32
|
-
// Setup TextEncoder/TextDecoder for Node environment
|
|
33
|
-
Object.defineProperty(global, 'TextEncoder', {
|
|
34
|
-
value: util_1.TextEncoder,
|
|
35
|
-
writable: true,
|
|
36
|
-
configurable: true
|
|
37
|
-
});
|
|
38
|
-
Object.defineProperty(global, 'TextDecoder', {
|
|
39
|
-
value: util_1.TextDecoder,
|
|
40
|
-
writable: true,
|
|
41
|
-
configurable: true
|
|
42
|
-
});
|
|
43
|
-
// Mock DataTransfer for File API testing
|
|
44
|
-
class MockDataTransfer {
|
|
45
|
-
constructor() {
|
|
46
|
-
const fileArray = [];
|
|
47
|
-
this.items = {
|
|
48
|
-
add: (file) => {
|
|
49
|
-
fileArray.push(file);
|
|
50
|
-
this.files = createFileList(fileArray);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
this.files = createFileList([]);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function createFileList(files) {
|
|
57
|
-
const fileList = {
|
|
58
|
-
length: files.length,
|
|
59
|
-
item: (index) => files[index] || null,
|
|
60
|
-
[Symbol.iterator]: function* () {
|
|
61
|
-
for (const file of files) {
|
|
62
|
-
yield file;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
for (let i = 0; i < files.length; i++) {
|
|
67
|
-
fileList[i] = files[i];
|
|
68
|
-
}
|
|
69
|
-
return fileList;
|
|
70
|
-
}
|
|
71
|
-
Object.defineProperty(global, 'DataTransfer', {
|
|
72
|
-
value: MockDataTransfer,
|
|
73
|
-
writable: true,
|
|
74
|
-
configurable: true
|
|
75
|
-
});
|
|
76
|
-
//# sourceMappingURL=setupTests.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setupTests.js","sourceRoot":"","sources":["../../src/test/setupTests.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;AAEH,mCAAmC;AACnC,+BAAgD;AAEhD,+CAA+C;AAC/C,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE;IACtC,KAAK,EAAE,kBAAS;IAChB,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE,IAAI;CACnB,CAAC,CAAC;AAEH,qDAAqD;AACrD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE;IAC3C,KAAK,EAAE,kBAAW;IAClB,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE,IAAI;CACnB,CAAC,CAAC;AAEH,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE;IAC3C,KAAK,EAAE,kBAAW;IAClB,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE,IAAI;CACnB,CAAC,CAAC;AAEH,yCAAyC;AACzC,MAAM,gBAAgB;IAIpB;QACE,MAAM,SAAS,GAAW,EAAE,CAAC;QAE7B,IAAI,CAAC,KAAK,GAAG;YACX,GAAG,EAAE,CAAC,IAAU,EAAE,EAAE;gBAClB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACrB,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;YACzC,CAAC;SACF,CAAC;QAEF,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;CACF;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,MAAM,QAAQ,GAAG;QACf,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI;QAC7C,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;YAC1B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,IAAI,CAAC;YACb,CAAC;QACH,CAAC;KACF,CAAC;IAEF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,QAA4C,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,QAA+B,CAAC;AACzC,CAAC;AAED,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE;IAC5C,KAAK,EAAE,gBAAgB;IACvB,QAAQ,EAAE,IAAI;IACd,YAAY,EAAE,IAAI;CACnB,CAAC,CAAC","sourcesContent":["/*\n * Copyright (c) 2025 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { webcrypto } from 'crypto';\nimport { TextEncoder, TextDecoder } from 'util';\n\n// Setup Web Crypto API using Node.js webcrypto\nObject.defineProperty(global, 'crypto', {\n value: webcrypto,\n writable: true,\n configurable: true\n});\n\n// Setup TextEncoder/TextDecoder for Node environment\nObject.defineProperty(global, 'TextEncoder', {\n value: TextEncoder,\n writable: true,\n configurable: true\n});\n\nObject.defineProperty(global, 'TextDecoder', {\n value: TextDecoder,\n writable: true,\n configurable: true\n});\n\n// Mock DataTransfer for File API testing\nclass MockDataTransfer {\n items: { add: (file: File) => void };\n files: FileList;\n\n constructor() {\n const fileArray: File[] = [];\n\n this.items = {\n add: (file: File) => {\n fileArray.push(file);\n this.files = createFileList(fileArray);\n }\n };\n\n this.files = createFileList([]);\n }\n}\n\nfunction createFileList(files: File[]): FileList {\n const fileList = {\n length: files.length,\n item: (index: number) => files[index] || null,\n [Symbol.iterator]: function* () {\n for (const file of files) {\n yield file;\n }\n }\n };\n\n for (let i = 0; i < files.length; i++) {\n (fileList as unknown as Record<number, File>)[i] = files[i];\n }\n\n return fileList as unknown as FileList;\n}\n\nObject.defineProperty(global, 'DataTransfer', {\n value: MockDataTransfer,\n writable: true,\n configurable: true\n});\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browserHashProvider.test.d.ts","sourceRoot":"","sources":["../../../src/test/unit/browserHashProvider.test.ts"],"names":[],"mappings":"AAsBA,OAAO,oBAAoB,CAAC"}
|