cspell-io 10.4.0-alpha.1 → 10.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +22 -22
  2. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -67,7 +67,7 @@ interface CFileReferenceJson {
67
67
  baseFilename?: string | undefined;
68
68
  gz?: boolean | undefined;
69
69
  }
70
- declare class CFileReference implements FileReference {
70
+ export declare class CFileReference implements FileReference {
71
71
  readonly url: URL;
72
72
  readonly encoding: BufferEncoding | undefined;
73
73
  readonly baseFilename: string | undefined;
@@ -83,7 +83,7 @@ declare class CFileReference implements FileReference {
83
83
  static from(url: URL, encoding?: BufferEncoding, baseFilename?: string | undefined, gz?: boolean | undefined): CFileReference;
84
84
  toJson(): CFileReferenceJson;
85
85
  }
86
- declare function renameFileReference(ref: FileReference, newUrl: URL): FileReference;
86
+ export declare function renameFileReference(ref: FileReference, newUrl: URL): FileReference;
87
87
  //#endregion
88
88
  //#region src/common/CFileResource.d.ts
89
89
  interface CFileResourceJson {
@@ -93,7 +93,7 @@ interface CFileResourceJson {
93
93
  baseFilename?: string | undefined;
94
94
  gz: boolean;
95
95
  }
96
- declare class CFileResource implements TextFileResource {
96
+ export declare class CFileResource implements TextFileResource {
97
97
  #private;
98
98
  readonly baseFilename?: string | undefined;
99
99
  readonly url: URL;
@@ -111,7 +111,7 @@ declare class CFileResource implements TextFileResource {
111
111
  static from(url: URL, content: string | Uint8Array<ArrayBuffer>, encoding?: BufferEncoding | undefined, baseFilename?: string | undefined, gz?: boolean): CFileResource;
112
112
  }
113
113
  declare function fromFileResource(fileResource: FileResource, encoding?: BufferEncoding): TextFileResource;
114
- declare function renameFileResource(fileResource: FileResource, url: URL): FileResource;
114
+ export declare function renameFileResource(fileResource: FileResource, url: URL): FileResource;
115
115
  //#endregion
116
116
  //#region src/models/Stats.d.ts
117
117
  /**
@@ -166,7 +166,7 @@ interface DirEntry {
166
166
  * @param right - Stats
167
167
  * @returns 0 - equal; 1 - left > right; -1 left < right
168
168
  */
169
- declare function compareStats(left: Stats, right: Stats): number;
169
+ export declare function compareStats(left: Stats, right: Stats): number;
170
170
  //#endregion
171
171
  //#region src/models/disposable.d.ts
172
172
  type DisposableEx = LegacyDisposable & Disposable;
@@ -176,7 +176,7 @@ interface LegacyDisposable {
176
176
  //#endregion
177
177
  //#region src/common/urlOrReferenceToUrl.d.ts
178
178
  type UrlOrReference$1 = URL | FileReference;
179
- declare function urlOrReferenceToUrl(urlOrReference: UrlOrReference$1): URL;
179
+ export declare function urlOrReferenceToUrl(urlOrReference: UrlOrReference$1): URL;
180
180
  //#endregion
181
181
  //#region src/CSpellIO.d.ts
182
182
  interface ReadFileOptions$1 {
@@ -273,7 +273,7 @@ interface CSpellIO {
273
273
  }
274
274
  //#endregion
275
275
  //#region src/CSpellIONode.d.ts
276
- declare class CSpellIONode implements CSpellIO {
276
+ export declare class CSpellIONode implements CSpellIO {
277
277
  readonly serviceBus: ServiceBus;
278
278
  constructor(serviceBus?: ServiceBus);
279
279
  readFile(urlOrFilename: UrlOrReference$2, options?: ReadFileOptionsOrEncoding): Promise<TextFileResource>;
@@ -288,21 +288,21 @@ declare class CSpellIONode implements CSpellIO {
288
288
  urlBasename(urlOrFilename: UrlOrReference$2): string;
289
289
  urlDirname(urlOrFilename: UrlOrReference$2): URL;
290
290
  }
291
- declare function getDefaultCSpellIO(): CSpellIO;
291
+ export declare function getDefaultCSpellIO(): CSpellIO;
292
292
  //#endregion
293
293
  //#region src/common/BufferEncoding.d.ts
294
294
  type TextEncodingExtra = "utf-16be" | "utf-16le" | "utf16be" | "utf16le";
295
295
  type BufferEncodingExt = BufferEncoding | TextEncodingExtra;
296
296
  //#endregion
297
297
  //#region src/node/file/fileWriter.d.ts
298
- declare function writeToFile(filename: string, data: string | Iterable<string> | AsyncIterable<string>, encoding?: BufferEncoding): Promise<void>;
299
- declare function writeToFileIterable(filename: string, data: Iterable<string> | AsyncIterable<string>, encoding?: BufferEncodingExt): Promise<void>;
298
+ export declare function writeToFile(filename: string, data: string | Iterable<string> | AsyncIterable<string>, encoding?: BufferEncoding): Promise<void>;
299
+ export declare function writeToFileIterable(filename: string, data: Iterable<string> | AsyncIterable<string>, encoding?: BufferEncodingExt): Promise<void>;
300
300
  //#endregion
301
301
  //#region src/file/file.d.ts
302
- declare function readFileText(filename: string | URL, encoding?: BufferEncoding): Promise<string>;
303
- declare function readFileTextSync(filename: string | URL, encoding?: BufferEncoding): string;
304
- declare function getStat(filenameOrUri: string): Promise<Stats | Error>;
305
- declare function getStatSync(filenameOrUri: string): Stats | Error;
302
+ export declare function readFileText(filename: string | URL, encoding?: BufferEncoding): Promise<string>;
303
+ export declare function readFileTextSync(filename: string | URL, encoding?: BufferEncoding): string;
304
+ export declare function getStat(filenameOrUri: string): Promise<Stats | Error>;
305
+ export declare function getStatSync(filenameOrUri: string): Stats | Error;
306
306
  //#endregion
307
307
  //#region src/types.d.ts
308
308
  type TArrayBufferView<T extends ArrayBuffer = ArrayBuffer> = ArrayBufferView<T>;
@@ -318,15 +318,15 @@ type TArrayBufferView<T extends ArrayBuffer = ArrayBuffer> = ArrayBufferView<T>;
318
318
  * @param mediaType - The mediaType is a [MIME](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) type string
319
319
  * @param attributes - Additional attributes
320
320
  */
321
- declare function encodeDataUrl(data: string | TArrayBufferView | Uint8Array<ArrayBuffer>, mediaType: string, attributes?: Iterable<readonly [string, string]> | undefined): string;
322
- declare function toDataUrl(data: string | TArrayBufferView, mediaType: string, attributes?: Iterable<[string, string]> | undefined): URL;
321
+ export declare function encodeDataUrl(data: string | TArrayBufferView | Uint8Array<ArrayBuffer>, mediaType: string, attributes?: Iterable<readonly [string, string]> | undefined): string;
322
+ export declare function toDataUrl(data: string | TArrayBufferView, mediaType: string, attributes?: Iterable<[string, string]> | undefined): URL;
323
323
  //#endregion
324
324
  //#region src/VirtualFS/constants.d.ts
325
- declare const CSPELL_VFS_PROTOCOL: "cspell-vfs:";
325
+ export declare const CSPELL_VFS_PROTOCOL: "cspell-vfs:";
326
326
  //#endregion
327
327
  //#region src/VirtualFS/VFileSystem.d.ts
328
328
  type UrlOrReference = URL | FileReference;
329
- declare enum FSCapabilityFlags {
329
+ export declare enum FSCapabilityFlags {
330
330
  None = 0,
331
331
  Stat = 1,
332
332
  Read = 2,
@@ -485,8 +485,8 @@ interface VFileSystemProvider extends Partial<DisposableEx> {
485
485
  }
486
486
  //#endregion
487
487
  //#region src/VirtualFS/CVirtualFS.d.ts
488
- declare function createVirtualFS(cspellIO?: CSpellIO): VirtualFS;
489
- declare function getDefaultVirtualFs(): VirtualFS;
488
+ export declare function createVirtualFS(cspellIO?: CSpellIO): VirtualFS;
489
+ export declare function getDefaultVirtualFs(): VirtualFS;
490
490
  //#endregion
491
491
  //#region src/VirtualFS/redirectProvider.d.ts
492
492
  interface RedirectOptions {
@@ -519,7 +519,7 @@ interface RedirectOptions {
519
519
  * @param options - options for the provider.
520
520
  * @returns FileSystemProvider
521
521
  */
522
- declare function createRedirectProvider(name: string, publicRoot: URL, privateRoot: URL, options?: RedirectOptions): VFileSystemProvider;
522
+ export declare function createRedirectProvider(name: string, publicRoot: URL, privateRoot: URL, options?: RedirectOptions): VFileSystemProvider;
523
523
  //#endregion
524
- export { type BufferEncoding, CFileReference, CFileResource, CSPELL_VFS_PROTOCOL, type CSpellIO, CSpellIONode, FSCapabilityFlags, type FileReference, type FileResource, type Stats, type TextEncoding, type TextFileResource, type VFileSystem, type VFileSystemCore, type VFileSystemProvider, FileType as VFileType, type VFindEntryType, type VFindUpPredicate, type VFindUpURLOptions, type VProviderFileSystem, type VfsDirEntry, type VfsStat, type VirtualFS, toArray as asyncIterableToArray, compareStats, createRedirectProvider, fromFileResource as createTextFileResource, createVirtualFS, encodeDataUrl, getDefaultCSpellIO, getDefaultVirtualFs, getStat, getStatSync, isFileURL, isUrlLike, readFileText, readFileTextSync, renameFileReference, renameFileResource, toDataUrl, toFileURL, toURL, urlBasename, urlDirname, urlOrReferenceToUrl, writeToFile, writeToFileIterable, writeToFileIterable as writeToFileIterableP };
524
+ export { type BufferEncoding, type CSpellIO, type FileReference, type FileResource, type Stats, type TextEncoding, type TextFileResource, type VFileSystem, type VFileSystemCore, type VFileSystemProvider, FileType as VFileType, type VFindEntryType, type VFindUpPredicate, type VFindUpURLOptions, type VProviderFileSystem, type VfsDirEntry, type VfsStat, type VirtualFS, toArray as asyncIterableToArray, fromFileResource as createTextFileResource, isFileURL, isUrlLike, toFileURL, toURL, urlBasename, urlDirname, writeToFileIterable as writeToFileIterableP };
525
525
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cspell-io",
3
- "version": "10.4.0-alpha.1",
3
+ "version": "10.4.0",
4
4
  "description": "A library of useful I/O functions used across various cspell tools.",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -48,8 +48,8 @@
48
48
  "watch": "pnpm build:watch"
49
49
  },
50
50
  "dependencies": {
51
- "@cspell/cspell-service-bus": "10.4.0-alpha.1",
52
- "@cspell/url": "10.4.0-alpha.1"
51
+ "@cspell/cspell-service-bus": "10.4.0",
52
+ "@cspell/url": "10.4.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "lorem-ipsum": "^3.0.0",
@@ -59,5 +59,5 @@
59
59
  "engines": {
60
60
  "node": ">=22.18.0"
61
61
  },
62
- "gitHead": "628768a6e62b792e628189b41e63e12e5d3d8fe3"
62
+ "gitHead": "7e2bbb5e866c827ac5d2cf6b84bf3e1a016d0823"
63
63
  }