/** * @module node-filesystem-space-types * * mostly interfaces, some constants */ import { IbGibRel8ns_V1 } from '@ibgib/ts-gib/dist/V1/index.mjs'; import { FilesystemSpaceData_V1, FilesystemSpaceOptionsData, FilesystemSpaceOptionsIbGib, FilesystemSpaceOptionsRel8ns, FilesystemSpaceResultData, FilesystemSpaceResultIbGib, FilesystemSpaceResultRel8ns } from '@ibgib/core-gib/dist/witness/space/filesystem-space/filesystem-space-v1.mjs'; /** * This is the shape of data about this space itself (not the contained ibgibs' spaces). */ export interface WebFilesystemSpaceData_V1 extends FilesystemSpaceData_V1 { } /** * Used in bootstrapping. * * If you change this, please bump the version * * (but of course won't be the end of the world when this doesn't happen). * * ## notes * * This is a terrible kluge port from NodeFilesystemSpaceData_V1. I am just * moving "as fast as I can" (I can't move fast these days). Little of the * filesystem internal details reallly matter I think, as this is just meant to * be a local space living on indexeddb. The main thing is segregation of local * spaces from each other, but I think this is covered to begin with via the * space name used in the path somewhere. */ export declare const DEFAULT_WEB_FILESYSTEM_SPACE_DATA_V1: WebFilesystemSpaceData_V1; /** Marker interface atm */ export interface WebFilesystemSpaceRel8ns_V1 extends IbGibRel8ns_V1 { } /** * Space options involve whether we're getting/putting ibgibs categorized as * meta, bin, dna. * * We'll leverage the fact that we don't need to get dna very often, and that * meta ibgibs act differently and are recorded differently. * * For example, we don't necessarily want to keep the past of certain meta * objects, because it may change (and thus grow) too quickly. */ export interface WebFilesystemSpaceOptionsData extends FilesystemSpaceOptionsData { } export interface WebFilesystemSpaceOptionsRel8ns extends FilesystemSpaceOptionsRel8ns { } /** Marker interface atm */ export interface WebFilesystemSpaceOptionsIbGib extends FilesystemSpaceOptionsIbGib { } /** Marker interface atm */ export interface WebFilesystemSpaceResultData extends FilesystemSpaceResultData { } export interface WebFilesystemSpaceResultRel8ns extends FilesystemSpaceResultRel8ns { } export interface WebFilesystemSpaceResultIbGib extends FilesystemSpaceResultIbGib { } /** * currently i'm just taking this from the definition of node's `Buffer` type. * * ## notes * * * using this with handle-reify-file.mts when reading the file. * * 'binary' may resolve to 'latin1' per SO * * https://stackoverflow.com/questions/46441667/reading-binary-data-in-node-js */ export type FileEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex'; export declare const FileEncoding: { ascii: FileEncoding; utf8: FileEncoding; utf_8: FileEncoding; "utf-8": FileEncoding; utf16le: FileEncoding; ucs2: FileEncoding; ucs_2: FileEncoding; "ucs-2": FileEncoding; base64: FileEncoding; base64url: FileEncoding; latin1: FileEncoding; binary: FileEncoding; hex: FileEncoding; }; /** * valid file encoding values per {@link FileEncoding} */ export declare const FILE_ENCODINGS: FileEncoding[]; export interface FileDataInfo { inputPath: string; detectedEncoding?: FileEncoding | undefined; dataString?: string | undefined; dataBuffer?: Uint8Array | undefined; } export declare const B2TFS_DEFAULT_ENCODINGS_TO_TRY: (FileEncoding | undefined)[]; //# sourceMappingURL=web-filesystem-space-types.d.mts.map