cspell-io 7.0.1 → 7.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/dist/esm/common/arrayBuffers.d.ts +1 -1
- package/dist/esm/node/dataUrl.d.ts +1 -1
- package/dist/esm/node/file/FetchError.d.ts +1 -1
- package/dist/esm/node/file/fetch.d.ts +3 -4
- package/dist/esm/node/file/fetch.js +5 -1
- package/dist/esm/requests/RequestFsReadFile.d.ts +1 -1
- package/dist/esm/requests/RequestFsReadFileSync.d.ts +1 -1
- package/dist/esm/requests/RequestZlibInflate.d.ts +1 -1
- package/package.json +10 -12
- package/dist/cjs/CSpellIO.d.ts +0 -69
- package/dist/cjs/CSpellIO.js +0 -3
- package/dist/cjs/CSpellIONode.d.ts +0 -20
- package/dist/cjs/CSpellIONode.js +0 -81
- package/dist/cjs/CSpellIOWeb.d.ts +0 -15
- package/dist/cjs/CSpellIOWeb.js +0 -36
- package/dist/cjs/async/asyncIterable.d.ts +0 -6
- package/dist/cjs/async/asyncIterable.js +0 -16
- package/dist/cjs/common/BufferEncoding.d.ts +0 -4
- package/dist/cjs/common/BufferEncoding.js +0 -3
- package/dist/cjs/common/arrayBuffers.d.ts +0 -17
- package/dist/cjs/common/arrayBuffers.js +0 -45
- package/dist/cjs/common/encode-decode.d.ts +0 -11
- package/dist/cjs/common/encode-decode.js +0 -85
- package/dist/cjs/common/stat.d.ts +0 -9
- package/dist/cjs/common/stat.js +0 -19
- package/dist/cjs/common/transformers.d.ts +0 -6
- package/dist/cjs/common/transformers.js +0 -71
- package/dist/cjs/errors/ErrorNotImplemented.d.ts +0 -5
- package/dist/cjs/errors/ErrorNotImplemented.js +0 -11
- package/dist/cjs/errors/error.d.ts +0 -2
- package/dist/cjs/errors/error.js +0 -14
- package/dist/cjs/errors/index.d.ts +0 -3
- package/dist/cjs/errors/index.js +0 -8
- package/dist/cjs/file/file.d.ts +0 -6
- package/dist/cjs/file/file.js +0 -29
- package/dist/cjs/file/index.d.ts +0 -3
- package/dist/cjs/file/index.js +0 -13
- package/dist/cjs/handlers/node/file.d.ts +0 -3
- package/dist/cjs/handlers/node/file.js +0 -173
- package/dist/cjs/index.d.ts +0 -7
- package/dist/cjs/index.js +0 -20
- package/dist/cjs/models/BufferEncoding.d.ts +0 -2
- package/dist/cjs/models/BufferEncoding.js +0 -3
- package/dist/cjs/models/FileResource.d.ts +0 -35
- package/dist/cjs/models/FileResource.js +0 -3
- package/dist/cjs/models/Stats.d.ts +0 -18
- package/dist/cjs/models/Stats.js +0 -6
- package/dist/cjs/models/index.d.ts +0 -2
- package/dist/cjs/models/index.js +0 -3
- package/dist/cjs/node/dataUrl.d.ts +0 -27
- package/dist/cjs/node/dataUrl.js +0 -116
- package/dist/cjs/node/file/FetchError.d.ts +0 -9
- package/dist/cjs/node/file/FetchError.js +0 -21
- package/dist/cjs/node/file/fetch.d.ts +0 -7
- package/dist/cjs/node/file/fetch.js +0 -23
- package/dist/cjs/node/file/fileReader.d.ts +0 -4
- package/dist/cjs/node/file/fileReader.js +0 -91
- package/dist/cjs/node/file/fileWriter.d.ts +0 -4
- package/dist/cjs/node/file/fileWriter.js +0 -43
- package/dist/cjs/node/file/index.d.ts +0 -4
- package/dist/cjs/node/file/index.js +0 -13
- package/dist/cjs/node/file/stat.d.ts +0 -5
- package/dist/cjs/node/file/stat.js +0 -54
- package/dist/cjs/node/file/util.d.ts +0 -9
- package/dist/cjs/node/file/util.js +0 -69
- package/dist/cjs/requests/RequestFsReadBinaryFile.d.ts +0 -11
- package/dist/cjs/requests/RequestFsReadBinaryFile.js +0 -9
- package/dist/cjs/requests/RequestFsReadFile.d.ts +0 -11
- package/dist/cjs/requests/RequestFsReadFile.js +0 -7
- package/dist/cjs/requests/RequestFsReadFileSync.d.ts +0 -11
- package/dist/cjs/requests/RequestFsReadFileSync.js +0 -7
- package/dist/cjs/requests/RequestFsStat.d.ts +0 -11
- package/dist/cjs/requests/RequestFsStat.js +0 -9
- package/dist/cjs/requests/RequestFsWriteFile.d.ts +0 -9
- package/dist/cjs/requests/RequestFsWriteFile.js +0 -7
- package/dist/cjs/requests/RequestZlibInflate.d.ts +0 -9
- package/dist/cjs/requests/RequestZlibInflate.js +0 -7
- package/dist/cjs/requests/index.d.ts +0 -7
- package/dist/cjs/requests/index.js +0 -18
- package/dist/cjs/test/test.helper.d.ts +0 -13
- package/dist/cjs/test/test.helper.js +0 -69
- package/dist/esm/CSpellIO.d.mts +0 -69
- package/dist/esm/CSpellIO.mjs +0 -1
- package/dist/esm/CSpellIONode.d.mts +0 -20
- package/dist/esm/CSpellIONode.mjs +0 -75
- package/dist/esm/CSpellIOWeb.d.mts +0 -15
- package/dist/esm/CSpellIOWeb.mjs +0 -31
- package/dist/esm/async/asyncIterable.d.mts +0 -6
- package/dist/esm/async/asyncIterable.mjs +0 -11
- package/dist/esm/common/BufferEncoding.d.mts +0 -4
- package/dist/esm/common/BufferEncoding.mjs +0 -1
- package/dist/esm/common/arrayBuffers.d.mts +0 -17
- package/dist/esm/common/arrayBuffers.mjs +0 -37
- package/dist/esm/common/encode-decode.d.mts +0 -11
- package/dist/esm/common/encode-decode.mjs +0 -72
- package/dist/esm/common/stat.d.mts +0 -9
- package/dist/esm/common/stat.mjs +0 -14
- package/dist/esm/common/transformers.d.mts +0 -6
- package/dist/esm/common/transformers.mjs +0 -65
- package/dist/esm/errors/ErrorNotImplemented.d.mts +0 -5
- package/dist/esm/errors/ErrorNotImplemented.mjs +0 -6
- package/dist/esm/errors/error.d.mts +0 -2
- package/dist/esm/errors/error.mjs +0 -9
- package/dist/esm/errors/index.d.mts +0 -3
- package/dist/esm/errors/index.mjs +0 -2
- package/dist/esm/file/file.d.mts +0 -6
- package/dist/esm/file/file.mjs +0 -21
- package/dist/esm/file/index.d.mts +0 -3
- package/dist/esm/file/index.mjs +0 -2
- package/dist/esm/handlers/node/file.d.mts +0 -3
- package/dist/esm/handlers/node/file.mjs +0 -165
- package/dist/esm/index.d.mts +0 -7
- package/dist/esm/index.mjs +0 -4
- package/dist/esm/models/BufferEncoding.d.mts +0 -2
- package/dist/esm/models/BufferEncoding.mjs +0 -1
- package/dist/esm/models/FileResource.d.mts +0 -35
- package/dist/esm/models/FileResource.mjs +0 -1
- package/dist/esm/models/Stats.d.mts +0 -18
- package/dist/esm/models/Stats.mjs +0 -4
- package/dist/esm/models/index.d.mts +0 -2
- package/dist/esm/models/index.mjs +0 -1
- package/dist/esm/node/dataUrl.d.mts +0 -27
- package/dist/esm/node/dataUrl.mjs +0 -84
- package/dist/esm/node/file/FetchError.d.mts +0 -9
- package/dist/esm/node/file/FetchError.mjs +0 -16
- package/dist/esm/node/file/fetch.d.mts +0 -7
- package/dist/esm/node/file/fetch.mjs +0 -14
- package/dist/esm/node/file/fileReader.d.mts +0 -4
- package/dist/esm/node/file/fileReader.mjs +0 -62
- package/dist/esm/node/file/fileWriter.d.mts +0 -4
- package/dist/esm/node/file/fileWriter.mjs +0 -14
- package/dist/esm/node/file/index.d.mts +0 -4
- package/dist/esm/node/file/index.mjs +0 -3
- package/dist/esm/node/file/stat.d.mts +0 -5
- package/dist/esm/node/file/stat.mjs +0 -47
- package/dist/esm/node/file/util.d.mts +0 -9
- package/dist/esm/node/file/util.mjs +0 -57
- package/dist/esm/requests/RequestFsReadBinaryFile.d.mts +0 -11
- package/dist/esm/requests/RequestFsReadBinaryFile.mjs +0 -5
- package/dist/esm/requests/RequestFsReadFile.d.mts +0 -11
- package/dist/esm/requests/RequestFsReadFile.mjs +0 -3
- package/dist/esm/requests/RequestFsReadFileSync.d.mts +0 -11
- package/dist/esm/requests/RequestFsReadFileSync.mjs +0 -3
- package/dist/esm/requests/RequestFsStat.d.mts +0 -11
- package/dist/esm/requests/RequestFsStat.mjs +0 -5
- package/dist/esm/requests/RequestFsWriteFile.d.mts +0 -9
- package/dist/esm/requests/RequestFsWriteFile.mjs +0 -3
- package/dist/esm/requests/RequestZlibInflate.d.mts +0 -9
- package/dist/esm/requests/RequestZlibInflate.mjs +0 -3
- package/dist/esm/requests/index.d.mts +0 -7
- package/dist/esm/requests/index.mjs +0 -6
- package/dist/esm/test/test.helper.d.mts +0 -13
- package/dist/esm/test/test.helper.mjs +0 -37
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { Headers } from 'node-fetch';
|
|
3
|
-
import nodeFetch from 'node-fetch';
|
|
4
|
-
export declare const fetch: typeof nodeFetch;
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
import type { Headers, RequestInit, Response } from 'node-fetch';
|
|
5
3
|
export declare function fetchHead(request: string | URL): Promise<Headers>;
|
|
6
4
|
export declare function fetchURL(url: URL): Promise<Buffer>;
|
|
5
|
+
export declare function fetch(url: string | URL, init?: RequestInit): Promise<Response>;
|
|
7
6
|
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import nodeFetch from 'node-fetch';
|
|
2
2
|
import { FetchUrlError } from './FetchError.js';
|
|
3
|
-
export const fetch = nodeFetch;
|
|
4
3
|
export async function fetchHead(request) {
|
|
5
4
|
const r = await fetch(request, { method: 'HEAD' });
|
|
6
5
|
return r.headers;
|
|
@@ -12,3 +11,8 @@ export async function fetchURL(url) {
|
|
|
12
11
|
}
|
|
13
12
|
return Buffer.from(await response.arrayBuffer());
|
|
14
13
|
}
|
|
14
|
+
export function fetch(url, init) {
|
|
15
|
+
/// This is a n issue with how TypeScript handles packages without `type` being set.
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
return nodeFetch(url, init);
|
|
18
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ServiceRequestFactoryRequestType } from '@cspell/cspell-service-bus';
|
|
2
|
-
import type { BufferEncoding } from '../models/BufferEncoding';
|
|
2
|
+
import type { BufferEncoding } from '../models/BufferEncoding.js';
|
|
3
3
|
import type { TextFileResource } from '../models/FileResource.js';
|
|
4
4
|
interface RequestParams {
|
|
5
5
|
readonly url: URL;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ServiceRequestFactoryRequestType } from '@cspell/cspell-service-bus';
|
|
2
|
-
import type { BufferEncoding } from '../models/BufferEncoding';
|
|
2
|
+
import type { BufferEncoding } from '../models/BufferEncoding.js';
|
|
3
3
|
import type { TextFileResource } from '../models/FileResource.js';
|
|
4
4
|
interface RequestParams {
|
|
5
5
|
readonly url: URL;
|
package/package.json
CHANGED
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cspell-io",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.2",
|
|
4
4
|
"description": "A library of useful I/O functions used across various cspell tools.",
|
|
5
|
-
"type": "
|
|
6
|
-
"module": "dist/esm/index.
|
|
7
|
-
"main": "dist/cjs/index.js",
|
|
8
|
-
"typings": "dist/cjs/index.d.ts",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
9
7
|
"exports": {
|
|
10
8
|
".": {
|
|
11
|
-
"import": "./dist/esm/index.
|
|
12
|
-
"require": "./dist/cjs/index.js"
|
|
9
|
+
"import": "./dist/esm/index.js"
|
|
13
10
|
}
|
|
14
11
|
},
|
|
15
12
|
"files": [
|
|
@@ -21,7 +18,7 @@
|
|
|
21
18
|
"!**/*.map"
|
|
22
19
|
],
|
|
23
20
|
"scripts": {
|
|
24
|
-
"build": "tsc -b .
|
|
21
|
+
"build": "tsc -b .",
|
|
25
22
|
"build:esm": "tsc -p tsconfig.esm.json",
|
|
26
23
|
"build:watch": "tsc -b . -w",
|
|
27
24
|
"watch": "pnpm build:watch",
|
|
@@ -49,11 +46,12 @@
|
|
|
49
46
|
},
|
|
50
47
|
"devDependencies": {
|
|
51
48
|
"@types/node-fetch": "^2.6.4",
|
|
52
|
-
"lorem-ipsum": "^2.0.8"
|
|
49
|
+
"lorem-ipsum": "^2.0.8",
|
|
50
|
+
"typescript": "^5.2.2"
|
|
53
51
|
},
|
|
54
52
|
"dependencies": {
|
|
55
|
-
"@cspell/cspell-service-bus": "7.0.
|
|
56
|
-
"node-fetch": "^2.
|
|
53
|
+
"@cspell/cspell-service-bus": "7.0.2",
|
|
54
|
+
"node-fetch": "^2.7.0"
|
|
57
55
|
},
|
|
58
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "25aa083421fc81e4d5b7cedb4755f9b327120cfc"
|
|
59
57
|
}
|
package/dist/cjs/CSpellIO.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { BufferEncoding } from './models/BufferEncoding.js';
|
|
2
|
-
import type { TextFileResource } from './models/FileResource.js';
|
|
3
|
-
import type { Stats } from './models/index.js';
|
|
4
|
-
export type UrlOrFilename = string | URL;
|
|
5
|
-
export interface CSpellIO {
|
|
6
|
-
/**
|
|
7
|
-
* Read a file
|
|
8
|
-
* @param uriOrFilename - uri of the file to read
|
|
9
|
-
* @param encoding - optional encoding.
|
|
10
|
-
* @returns A TextFileResource.
|
|
11
|
-
*/
|
|
12
|
-
readFile(uriOrFilename: UrlOrFilename, encoding?: BufferEncoding): Promise<TextFileResource>;
|
|
13
|
-
/**
|
|
14
|
-
* Read a file in Sync mode.
|
|
15
|
-
* Note: `http` requests will fail.
|
|
16
|
-
* @param uriOrFilename - uri of the file to read
|
|
17
|
-
* @param encoding - optional encoding.
|
|
18
|
-
* @returns A TextFileResource.
|
|
19
|
-
*/
|
|
20
|
-
readFileSync(uriOrFilename: UrlOrFilename, encoding?: BufferEncoding): TextFileResource;
|
|
21
|
-
/**
|
|
22
|
-
* Write content to a file using utf-8 encoding.
|
|
23
|
-
* It will fail to write to non-file uris.
|
|
24
|
-
* @param uriOrFilename - uri
|
|
25
|
-
* @param content - string to write.
|
|
26
|
-
*/
|
|
27
|
-
writeFile(uriOrFilename: UrlOrFilename, content: string): Promise<void>;
|
|
28
|
-
/**
|
|
29
|
-
* Get Stats on a uri.
|
|
30
|
-
* @param uriOrFilename - uri to fetch stats on
|
|
31
|
-
* @returns Stats if successful.
|
|
32
|
-
*/
|
|
33
|
-
getStat(uriOrFilename: UrlOrFilename): Promise<Stats>;
|
|
34
|
-
/**
|
|
35
|
-
* Get Stats on a uri.
|
|
36
|
-
* @param uriOrFilename - uri to fetch stats on
|
|
37
|
-
* @returns Stats if successful, otherwise it throws an error.
|
|
38
|
-
*/
|
|
39
|
-
getStatSync(uriOrFilename: UrlOrFilename): Stats;
|
|
40
|
-
/**
|
|
41
|
-
* Compare two Stats.
|
|
42
|
-
* @param left - left stat
|
|
43
|
-
* @param right - right stat
|
|
44
|
-
* @returns 0 if they are equal and non-zero if they are not.
|
|
45
|
-
*/
|
|
46
|
-
compareStats(left: Stats, right: Stats): number;
|
|
47
|
-
/**
|
|
48
|
-
* Convert a string to a URL
|
|
49
|
-
* @param uriOrFilename - string or URL to convert.
|
|
50
|
-
* If it is a URL, then it is just returned as is.
|
|
51
|
-
*/
|
|
52
|
-
toURL(uriOrFilename: UrlOrFilename): URL;
|
|
53
|
-
/**
|
|
54
|
-
* Try to determine the base name of a URL.
|
|
55
|
-
*
|
|
56
|
-
* Note: this handles `data:` URLs with `filename` attribute:
|
|
57
|
-
*
|
|
58
|
-
* Example: `data:text/plain;charset=utf8;filename=hello.txt,Hello` would have a filename of `hello.txt`
|
|
59
|
-
* @param uriOrFilename - string or URL to extract the basename from.
|
|
60
|
-
*/
|
|
61
|
-
uriBasename(uriOrFilename: UrlOrFilename): string;
|
|
62
|
-
/**
|
|
63
|
-
* Try to determine the directory URL of the uri.
|
|
64
|
-
*
|
|
65
|
-
* @param uriOrFilename - string or URL to extract the basename from.
|
|
66
|
-
*/
|
|
67
|
-
uriDirname(uriOrFilename: UrlOrFilename): URL;
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=CSpellIO.d.ts.map
|
package/dist/cjs/CSpellIO.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ServiceBus } from '@cspell/cspell-service-bus';
|
|
2
|
-
import type { CSpellIO } from './CSpellIO.js';
|
|
3
|
-
import type { BufferEncoding } from './models/BufferEncoding.js';
|
|
4
|
-
import type { TextFileResource } from './models/FileResource.js';
|
|
5
|
-
import type { Stats } from './models/Stats.js';
|
|
6
|
-
export declare class CSpellIONode implements CSpellIO {
|
|
7
|
-
readonly serviceBus: ServiceBus;
|
|
8
|
-
constructor(serviceBus?: ServiceBus);
|
|
9
|
-
readFile(uriOrFilename: string | URL, encoding?: BufferEncoding): Promise<TextFileResource>;
|
|
10
|
-
readFileSync(uriOrFilename: string | URL, encoding?: BufferEncoding): TextFileResource;
|
|
11
|
-
writeFile(uriOrFilename: string | URL, content: string): Promise<void>;
|
|
12
|
-
getStat(uriOrFilename: string | URL): Promise<Stats>;
|
|
13
|
-
getStatSync(uriOrFilename: string | URL): Stats;
|
|
14
|
-
compareStats(left: Stats, right: Stats): number;
|
|
15
|
-
toURL(uriOrFilename: string | URL): URL;
|
|
16
|
-
uriBasename(uriOrFilename: string | URL): string;
|
|
17
|
-
uriDirname(uriOrFilename: string | URL): URL;
|
|
18
|
-
}
|
|
19
|
-
export declare function getDefaultCSpellIO(): CSpellIO;
|
|
20
|
-
//# sourceMappingURL=CSpellIONode.d.ts.map
|
package/dist/cjs/CSpellIONode.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDefaultCSpellIO = exports.CSpellIONode = void 0;
|
|
4
|
-
const cspell_service_bus_1 = require("@cspell/cspell-service-bus");
|
|
5
|
-
const stat_js_1 = require("./common/stat.js");
|
|
6
|
-
const ErrorNotImplemented_js_1 = require("./errors/ErrorNotImplemented.js");
|
|
7
|
-
const file_js_1 = require("./handlers/node/file.js");
|
|
8
|
-
const util_js_1 = require("./node/file/util.js");
|
|
9
|
-
const index_js_1 = require("./requests/index.js");
|
|
10
|
-
let defaultCSpellIONode = undefined;
|
|
11
|
-
class CSpellIONode {
|
|
12
|
-
constructor(serviceBus = new cspell_service_bus_1.ServiceBus()) {
|
|
13
|
-
this.serviceBus = serviceBus;
|
|
14
|
-
(0, file_js_1.registerHandlers)(serviceBus);
|
|
15
|
-
}
|
|
16
|
-
readFile(uriOrFilename, encoding = 'utf8') {
|
|
17
|
-
const url = (0, util_js_1.toURL)(uriOrFilename);
|
|
18
|
-
const res = this.serviceBus.dispatch(index_js_1.RequestFsReadFile.create({ url, encoding }));
|
|
19
|
-
if (!(0, cspell_service_bus_1.isServiceResponseSuccess)(res)) {
|
|
20
|
-
throw genError(res.error, 'readFile');
|
|
21
|
-
}
|
|
22
|
-
return res.value;
|
|
23
|
-
}
|
|
24
|
-
readFileSync(uriOrFilename, encoding = 'utf8') {
|
|
25
|
-
const url = (0, util_js_1.toURL)(uriOrFilename);
|
|
26
|
-
const res = this.serviceBus.dispatch(index_js_1.RequestFsReadFileSync.create({ url, encoding }));
|
|
27
|
-
if (!(0, cspell_service_bus_1.isServiceResponseSuccess)(res)) {
|
|
28
|
-
throw genError(res.error, 'readFileSync');
|
|
29
|
-
}
|
|
30
|
-
return res.value;
|
|
31
|
-
}
|
|
32
|
-
writeFile(uriOrFilename, content) {
|
|
33
|
-
const url = (0, util_js_1.toURL)(uriOrFilename);
|
|
34
|
-
const res = this.serviceBus.dispatch(index_js_1.RequestFsWriteFile.create({ url, content }));
|
|
35
|
-
if (!(0, cspell_service_bus_1.isServiceResponseSuccess)(res)) {
|
|
36
|
-
throw genError(res.error, 'writeFile');
|
|
37
|
-
}
|
|
38
|
-
return res.value;
|
|
39
|
-
}
|
|
40
|
-
getStat(uriOrFilename) {
|
|
41
|
-
const url = (0, util_js_1.toURL)(uriOrFilename);
|
|
42
|
-
const res = this.serviceBus.dispatch(index_js_1.RequestFsStat.create({ url }));
|
|
43
|
-
if (!(0, cspell_service_bus_1.isServiceResponseSuccess)(res)) {
|
|
44
|
-
throw genError(res.error, 'getStat');
|
|
45
|
-
}
|
|
46
|
-
return res.value;
|
|
47
|
-
}
|
|
48
|
-
getStatSync(uriOrFilename) {
|
|
49
|
-
const url = (0, util_js_1.toURL)(uriOrFilename);
|
|
50
|
-
const res = this.serviceBus.dispatch(index_js_1.RequestFsStatSync.create({ url }));
|
|
51
|
-
if (!(0, cspell_service_bus_1.isServiceResponseSuccess)(res)) {
|
|
52
|
-
throw genError(res.error, 'getStatSync');
|
|
53
|
-
}
|
|
54
|
-
return res.value;
|
|
55
|
-
}
|
|
56
|
-
compareStats(left, right) {
|
|
57
|
-
return (0, stat_js_1.compareStats)(left, right);
|
|
58
|
-
}
|
|
59
|
-
toURL(uriOrFilename) {
|
|
60
|
-
return (0, util_js_1.toURL)(uriOrFilename);
|
|
61
|
-
}
|
|
62
|
-
uriBasename(uriOrFilename) {
|
|
63
|
-
return (0, util_js_1.urlBasename)(uriOrFilename);
|
|
64
|
-
}
|
|
65
|
-
uriDirname(uriOrFilename) {
|
|
66
|
-
return (0, util_js_1.urlDirname)(uriOrFilename);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
exports.CSpellIONode = CSpellIONode;
|
|
70
|
-
function genError(err, alt) {
|
|
71
|
-
return err || new ErrorNotImplemented_js_1.ErrorNotImplemented(alt);
|
|
72
|
-
}
|
|
73
|
-
function getDefaultCSpellIO() {
|
|
74
|
-
if (defaultCSpellIONode)
|
|
75
|
-
return defaultCSpellIONode;
|
|
76
|
-
const cspellIO = new CSpellIONode();
|
|
77
|
-
defaultCSpellIONode = cspellIO;
|
|
78
|
-
return cspellIO;
|
|
79
|
-
}
|
|
80
|
-
exports.getDefaultCSpellIO = getDefaultCSpellIO;
|
|
81
|
-
//# sourceMappingURL=CSpellIONode.js.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { CSpellIO } from './CSpellIO.js';
|
|
2
|
-
import type { TextFileResource } from './models/FileResource.js';
|
|
3
|
-
import type { Stats } from './models/Stats.js';
|
|
4
|
-
export declare class CSpellIOWeb implements CSpellIO {
|
|
5
|
-
readFile(_uriOrFilename: string | URL): Promise<TextFileResource>;
|
|
6
|
-
readFileSync(_uriOrFilename: string | URL): TextFileResource;
|
|
7
|
-
writeFile(_uriOrFilename: string | URL, _content: string): Promise<void>;
|
|
8
|
-
getStat(_uriOrFilename: string | URL): Promise<Stats>;
|
|
9
|
-
getStatSync(_uriOrFilename: string | URL): Stats;
|
|
10
|
-
compareStats(left: Stats, right: Stats): number;
|
|
11
|
-
toURL(_uriOrFilename: string | URL): URL;
|
|
12
|
-
uriBasename(_uriOrFilename: string | URL): string;
|
|
13
|
-
uriDirname(_uriOrFilename: string | URL): URL;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=CSpellIOWeb.d.ts.map
|
package/dist/cjs/CSpellIOWeb.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CSpellIOWeb = void 0;
|
|
4
|
-
const stat_js_1 = require("./common/stat.js");
|
|
5
|
-
const ErrorNotImplemented_js_1 = require("./errors/ErrorNotImplemented.js");
|
|
6
|
-
class CSpellIOWeb {
|
|
7
|
-
readFile(_uriOrFilename) {
|
|
8
|
-
throw new ErrorNotImplemented_js_1.ErrorNotImplemented('readFile');
|
|
9
|
-
}
|
|
10
|
-
readFileSync(_uriOrFilename) {
|
|
11
|
-
throw new ErrorNotImplemented_js_1.ErrorNotImplemented('readFileSync');
|
|
12
|
-
}
|
|
13
|
-
writeFile(_uriOrFilename, _content) {
|
|
14
|
-
throw new ErrorNotImplemented_js_1.ErrorNotImplemented('writeFile');
|
|
15
|
-
}
|
|
16
|
-
getStat(_uriOrFilename) {
|
|
17
|
-
throw new ErrorNotImplemented_js_1.ErrorNotImplemented('getStat');
|
|
18
|
-
}
|
|
19
|
-
getStatSync(_uriOrFilename) {
|
|
20
|
-
throw new ErrorNotImplemented_js_1.ErrorNotImplemented('getStatSync');
|
|
21
|
-
}
|
|
22
|
-
compareStats(left, right) {
|
|
23
|
-
return (0, stat_js_1.compareStats)(left, right);
|
|
24
|
-
}
|
|
25
|
-
toURL(_uriOrFilename) {
|
|
26
|
-
throw new ErrorNotImplemented_js_1.ErrorNotImplemented('toURL');
|
|
27
|
-
}
|
|
28
|
-
uriBasename(_uriOrFilename) {
|
|
29
|
-
throw new ErrorNotImplemented_js_1.ErrorNotImplemented('uriBasename');
|
|
30
|
-
}
|
|
31
|
-
uriDirname(_uriOrFilename) {
|
|
32
|
-
throw new ErrorNotImplemented_js_1.ErrorNotImplemented('uriDirname');
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.CSpellIOWeb = CSpellIOWeb;
|
|
36
|
-
//# sourceMappingURL=CSpellIOWeb.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Reads an entire iterable and converts it into a promise.
|
|
3
|
-
* @param asyncIterable the async iterable to wait for.
|
|
4
|
-
*/
|
|
5
|
-
export declare function toArray<T>(asyncIterable: AsyncIterable<T> | Iterable<T> | Iterable<Promise<T>>): Promise<T[]>;
|
|
6
|
-
//# sourceMappingURL=asyncIterable.d.ts.map
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toArray = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Reads an entire iterable and converts it into a promise.
|
|
6
|
-
* @param asyncIterable the async iterable to wait for.
|
|
7
|
-
*/
|
|
8
|
-
async function toArray(asyncIterable) {
|
|
9
|
-
const data = [];
|
|
10
|
-
for await (const item of asyncIterable) {
|
|
11
|
-
data.push(item);
|
|
12
|
-
}
|
|
13
|
-
return data;
|
|
14
|
-
}
|
|
15
|
-
exports.toArray = toArray;
|
|
16
|
-
//# sourceMappingURL=asyncIterable.js.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
export declare function toUint8Array(data: ArrayBufferView): Uint8Array;
|
|
3
|
-
export declare function arrayBufferViewToBuffer(data: ArrayBufferView): Buffer;
|
|
4
|
-
/**
|
|
5
|
-
* Copy the data buffer.
|
|
6
|
-
* @param data - source data
|
|
7
|
-
* @returns A copy of the data
|
|
8
|
-
*/
|
|
9
|
-
export declare function copyArrayBufferView(data: ArrayBufferView): ArrayBufferView;
|
|
10
|
-
/**
|
|
11
|
-
* Slice an existing data view. Returns a new view using the same underlying data.
|
|
12
|
-
* @param data - data view
|
|
13
|
-
* @param byteOffset - offset from the beginning of the view.
|
|
14
|
-
* @param byteLength - optional length
|
|
15
|
-
*/
|
|
16
|
-
export declare function sliceView(data: ArrayBufferView, byteOffset: number, byteLength?: number): ArrayBufferView;
|
|
17
|
-
//# sourceMappingURL=arrayBuffers.d.ts.map
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sliceView = exports.copyArrayBufferView = exports.arrayBufferViewToBuffer = exports.toUint8Array = void 0;
|
|
4
|
-
function toUint8Array(data) {
|
|
5
|
-
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);
|
|
6
|
-
}
|
|
7
|
-
exports.toUint8Array = toUint8Array;
|
|
8
|
-
function arrayBufferViewToBuffer(data) {
|
|
9
|
-
if (data instanceof Buffer) {
|
|
10
|
-
return data;
|
|
11
|
-
}
|
|
12
|
-
const buf = Buffer.from(data.buffer);
|
|
13
|
-
if (data.byteOffset === 0 && data.byteLength === data.buffer.byteLength) {
|
|
14
|
-
return buf;
|
|
15
|
-
}
|
|
16
|
-
return buf.subarray(data.byteOffset, data.byteOffset + data.byteLength);
|
|
17
|
-
}
|
|
18
|
-
exports.arrayBufferViewToBuffer = arrayBufferViewToBuffer;
|
|
19
|
-
/**
|
|
20
|
-
* Copy the data buffer.
|
|
21
|
-
* @param data - source data
|
|
22
|
-
* @returns A copy of the data
|
|
23
|
-
*/
|
|
24
|
-
function copyArrayBufferView(data) {
|
|
25
|
-
return new Uint8Array(data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength));
|
|
26
|
-
}
|
|
27
|
-
exports.copyArrayBufferView = copyArrayBufferView;
|
|
28
|
-
/**
|
|
29
|
-
* Slice an existing data view. Returns a new view using the same underlying data.
|
|
30
|
-
* @param data - data view
|
|
31
|
-
* @param byteOffset - offset from the beginning of the view.
|
|
32
|
-
* @param byteLength - optional length
|
|
33
|
-
*/
|
|
34
|
-
function sliceView(data, byteOffset, byteLength) {
|
|
35
|
-
const currentEnd = data.byteOffset + data.byteLength;
|
|
36
|
-
const start = Math.min(data.byteOffset + byteOffset, currentEnd);
|
|
37
|
-
const end = byteLength ? Math.min(currentEnd, start + byteLength) : currentEnd;
|
|
38
|
-
return {
|
|
39
|
-
buffer: data.buffer,
|
|
40
|
-
byteOffset: start,
|
|
41
|
-
byteLength: end - start,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
exports.sliceView = sliceView;
|
|
45
|
-
//# sourceMappingURL=arrayBuffers.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { BufferEncodingExt } from './BufferEncoding.js';
|
|
2
|
-
export declare function decodeUtf16LE(data: ArrayBufferView): string;
|
|
3
|
-
export declare function decodeUtf16BE(buf: ArrayBufferView): string;
|
|
4
|
-
export declare function decode(data: ArrayBufferView, encoding?: BufferEncodingExt): string;
|
|
5
|
-
export declare function swapBytesInPlace(data: ArrayBufferView): ArrayBufferView;
|
|
6
|
-
export declare function swapBytes(data: ArrayBufferView): ArrayBufferView;
|
|
7
|
-
export declare function encodeString(str: string, encoding?: BufferEncodingExt, bom?: boolean): ArrayBufferView;
|
|
8
|
-
export declare function encodeUtf16LE(str: string, bom?: boolean): ArrayBufferView;
|
|
9
|
-
export declare function encodeUtf16BE(str: string, bom?: boolean): ArrayBufferView;
|
|
10
|
-
export declare function calcEncodingFromBom(data: ArrayBufferView): 'utf16be' | 'utf16le' | undefined;
|
|
11
|
-
//# sourceMappingURL=encode-decode.d.ts.map
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.calcEncodingFromBom = exports.encodeUtf16BE = exports.encodeUtf16LE = exports.encodeString = exports.swapBytes = exports.swapBytesInPlace = exports.decode = exports.decodeUtf16BE = exports.decodeUtf16LE = void 0;
|
|
4
|
-
const arrayBuffers_js_1 = require("./arrayBuffers.js");
|
|
5
|
-
const BOM_BE = 0xfeff;
|
|
6
|
-
const BOM_LE = 0xfffe;
|
|
7
|
-
function decodeUtf16LE(data) {
|
|
8
|
-
let buf = (0, arrayBuffers_js_1.arrayBufferViewToBuffer)(data);
|
|
9
|
-
const bom = (buf[0] << 8) | buf[1];
|
|
10
|
-
buf = bom === BOM_LE ? buf.subarray(2) : buf;
|
|
11
|
-
return buf.toString('utf16le');
|
|
12
|
-
}
|
|
13
|
-
exports.decodeUtf16LE = decodeUtf16LE;
|
|
14
|
-
function decodeUtf16BE(buf) {
|
|
15
|
-
return decodeUtf16LE(swapBytes(buf));
|
|
16
|
-
}
|
|
17
|
-
exports.decodeUtf16BE = decodeUtf16BE;
|
|
18
|
-
function decode(data, encoding) {
|
|
19
|
-
const buf = (0, arrayBuffers_js_1.arrayBufferViewToBuffer)(data);
|
|
20
|
-
switch (encoding) {
|
|
21
|
-
case 'utf16be':
|
|
22
|
-
return decodeUtf16BE(buf);
|
|
23
|
-
case 'utf16le':
|
|
24
|
-
return decodeUtf16LE(buf);
|
|
25
|
-
}
|
|
26
|
-
if (buf.length < 2 || (encoding && !encoding.startsWith('utf')))
|
|
27
|
-
return buf.toString(encoding);
|
|
28
|
-
const bom = (buf[0] << 8) | buf[1];
|
|
29
|
-
if (bom === BOM_BE || (buf[0] === 0 && buf[1] !== 0))
|
|
30
|
-
return decodeUtf16BE(buf);
|
|
31
|
-
if (bom === BOM_LE || (buf[0] !== 0 && buf[1] === 0))
|
|
32
|
-
return decodeUtf16LE(buf);
|
|
33
|
-
return buf.toString(encoding);
|
|
34
|
-
}
|
|
35
|
-
exports.decode = decode;
|
|
36
|
-
function swapBytesInPlace(data) {
|
|
37
|
-
const buf = (0, arrayBuffers_js_1.arrayBufferViewToBuffer)(data);
|
|
38
|
-
buf.swap16();
|
|
39
|
-
return buf;
|
|
40
|
-
}
|
|
41
|
-
exports.swapBytesInPlace = swapBytesInPlace;
|
|
42
|
-
function swapBytes(data) {
|
|
43
|
-
const buf = (0, arrayBuffers_js_1.copyArrayBufferView)(data);
|
|
44
|
-
return swapBytesInPlace(buf);
|
|
45
|
-
}
|
|
46
|
-
exports.swapBytes = swapBytes;
|
|
47
|
-
function encodeString(str, encoding, bom) {
|
|
48
|
-
switch (encoding) {
|
|
49
|
-
case 'utf16be':
|
|
50
|
-
return encodeUtf16BE(str, bom);
|
|
51
|
-
case 'utf16le':
|
|
52
|
-
return encodeUtf16LE(str, bom);
|
|
53
|
-
}
|
|
54
|
-
return Buffer.from(str, encoding);
|
|
55
|
-
}
|
|
56
|
-
exports.encodeString = encodeString;
|
|
57
|
-
function encodeUtf16LE(str, bom = true) {
|
|
58
|
-
const buf = Buffer.from(str, 'utf16le');
|
|
59
|
-
if (bom) {
|
|
60
|
-
const target = Buffer.alloc(buf.length + 2);
|
|
61
|
-
target.writeUint16LE(BOM_BE);
|
|
62
|
-
buf.copy(target, 2);
|
|
63
|
-
return target;
|
|
64
|
-
}
|
|
65
|
-
return buf;
|
|
66
|
-
}
|
|
67
|
-
exports.encodeUtf16LE = encodeUtf16LE;
|
|
68
|
-
function encodeUtf16BE(str, bom = true) {
|
|
69
|
-
return swapBytesInPlace(encodeUtf16LE(str, bom));
|
|
70
|
-
}
|
|
71
|
-
exports.encodeUtf16BE = encodeUtf16BE;
|
|
72
|
-
function calcEncodingFromBom(data) {
|
|
73
|
-
const buf = (0, arrayBuffers_js_1.toUint8Array)(data);
|
|
74
|
-
if (buf.length < 2)
|
|
75
|
-
return undefined;
|
|
76
|
-
switch ((buf[0] << 8) | buf[1]) {
|
|
77
|
-
case BOM_BE:
|
|
78
|
-
return 'utf16be';
|
|
79
|
-
case BOM_LE:
|
|
80
|
-
return 'utf16le';
|
|
81
|
-
}
|
|
82
|
-
return undefined;
|
|
83
|
-
}
|
|
84
|
-
exports.calcEncodingFromBom = calcEncodingFromBom;
|
|
85
|
-
//# sourceMappingURL=encode-decode.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Stats } from '../models/Stats.js';
|
|
2
|
-
/**
|
|
3
|
-
* Compare two Stats to see if they have the same value.
|
|
4
|
-
* @param left - Stats
|
|
5
|
-
* @param right - Stats
|
|
6
|
-
* @returns 0 - equal; 1 - left > right; -1 left < right
|
|
7
|
-
*/
|
|
8
|
-
export declare function compareStats(left: Stats, right: Stats): number;
|
|
9
|
-
//# sourceMappingURL=stat.d.ts.map
|
package/dist/cjs/common/stat.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.compareStats = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Compare two Stats to see if they have the same value.
|
|
6
|
-
* @param left - Stats
|
|
7
|
-
* @param right - Stats
|
|
8
|
-
* @returns 0 - equal; 1 - left > right; -1 left < right
|
|
9
|
-
*/
|
|
10
|
-
function compareStats(left, right) {
|
|
11
|
-
if (left === right)
|
|
12
|
-
return 0;
|
|
13
|
-
if (left.eTag || right.eTag)
|
|
14
|
-
return left.eTag === right.eTag ? 0 : (left.eTag || '') < (right.eTag || '') ? -1 : 1;
|
|
15
|
-
const diff = left.size - right.size || left.mtimeMs - right.mtimeMs;
|
|
16
|
-
return diff < 0 ? -1 : diff > 0 ? 1 : 0;
|
|
17
|
-
}
|
|
18
|
-
exports.compareStats = compareStats;
|
|
19
|
-
//# sourceMappingURL=stat.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { BufferEncodingExt } from './BufferEncoding.js';
|
|
2
|
-
export declare function createDecoderTransformer(encoding?: BufferEncodingExt): (iterable: AsyncIterable<string | ArrayBufferView> | Iterable<string | ArrayBufferView>) => AsyncIterable<string>;
|
|
3
|
-
export declare function encoderTransformer(iterable: Iterable<string>, encoding?: BufferEncodingExt): Iterable<ArrayBufferView>;
|
|
4
|
-
export declare function encoderTransformer(iterable: AsyncIterable<string>, encoding?: BufferEncodingExt): AsyncIterable<ArrayBufferView>;
|
|
5
|
-
export declare function encoderTransformer(iterable: Iterable<string> | AsyncIterable<string>, encoding?: BufferEncodingExt): Iterable<ArrayBufferView> | AsyncIterable<ArrayBufferView>;
|
|
6
|
-
//# sourceMappingURL=transformers.d.ts.map
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.encoderTransformer = exports.createDecoderTransformer = void 0;
|
|
4
|
-
const arrayBuffers_js_1 = require("./arrayBuffers.js");
|
|
5
|
-
const encode_decode_js_1 = require("./encode-decode.js");
|
|
6
|
-
function createDecoderTransformer(encoding) {
|
|
7
|
-
function standardDecoder(buf) {
|
|
8
|
-
return (0, encode_decode_js_1.decode)(buf, encoding);
|
|
9
|
-
}
|
|
10
|
-
let decoder = undefined;
|
|
11
|
-
if (encoding && !encoding.startsWith('utf'))
|
|
12
|
-
return decoderNonUtf;
|
|
13
|
-
return decoderUtf;
|
|
14
|
-
async function* decoderNonUtf(iterable) {
|
|
15
|
-
for await (const buf of iterable) {
|
|
16
|
-
yield typeof buf === 'string' ? buf : (0, encode_decode_js_1.decode)(buf, encoding);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
async function* decoderUtf(iterable) {
|
|
20
|
-
for await (const sb of iterable) {
|
|
21
|
-
if (typeof sb === 'string') {
|
|
22
|
-
yield sb;
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
if (sb.byteLength < 2) {
|
|
26
|
-
yield standardDecoder(sb);
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
if (decoder) {
|
|
30
|
-
yield decoder(sb);
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
decoder = standardDecoder;
|
|
34
|
-
const _encoding = (0, encode_decode_js_1.calcEncodingFromBom)(sb);
|
|
35
|
-
if (_encoding === 'utf16le') {
|
|
36
|
-
decoder = encode_decode_js_1.decodeUtf16LE;
|
|
37
|
-
yield decoder((0, arrayBuffers_js_1.sliceView)(sb, 2));
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
if (_encoding === 'utf16be') {
|
|
41
|
-
decoder = encode_decode_js_1.decodeUtf16BE;
|
|
42
|
-
yield decoder((0, arrayBuffers_js_1.sliceView)(sb, 2));
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
yield decoder(sb);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
exports.createDecoderTransformer = createDecoderTransformer;
|
|
50
|
-
function encoderTransformer(iterable, encoding) {
|
|
51
|
-
return isAsyncIterable(iterable) ? encoderAsyncIterable(iterable, encoding) : encoderIterable(iterable, encoding);
|
|
52
|
-
}
|
|
53
|
-
exports.encoderTransformer = encoderTransformer;
|
|
54
|
-
function* encoderIterable(iterable, encoding) {
|
|
55
|
-
let useBom = true;
|
|
56
|
-
for (const chunk of iterable) {
|
|
57
|
-
yield (0, encode_decode_js_1.encodeString)(chunk, encoding, useBom);
|
|
58
|
-
useBom = false;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
async function* encoderAsyncIterable(iterable, encoding) {
|
|
62
|
-
let useBom = true;
|
|
63
|
-
for await (const chunk of iterable) {
|
|
64
|
-
yield (0, encode_decode_js_1.encodeString)(chunk, encoding, useBom);
|
|
65
|
-
useBom = false;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
function isAsyncIterable(v) {
|
|
69
|
-
return v && typeof v === 'object' && !!v[Symbol.asyncIterator];
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=transformers.js.map
|