From 5d8ac6a51d77964bd22111b2b9adb3fe82c73e43 Mon Sep 17 00:00:00 2001 From: "street-side-software-automation[bot]" <74785433+street-side-software-automation[bot]@users.noreply.github.com> Date: Sat, 30 Jul 2022 21:14:04 +0200 Subject: [PATCH] feat: Update CSpell to (6.5.0) (main) (#859) fix: Update CSpell to (6.5.0) Co-authored-by: Jason3S --- action-src/package.json | 2 +- .../@cspell/cspell-bundled-dicts/package.json | 14 +- .../@cspell/cspell-service-bus/LICENSE | 21 +++ .../@cspell/cspell-service-bus/README.md | 3 + .../dist/SystemServiceBus.js | 91 +++++++++++++ .../@cspell/cspell-service-bus/dist/assert.js | 11 ++ .../@cspell/cspell-service-bus/dist/bus.js | 95 +++++++++++++ .../@cspell/cspell-service-bus/dist/index.js | 16 +++ .../cspell-service-bus/dist/request.js | 39 ++++++ .../cspell-service-bus/dist/requestFactory.js | 21 +++ .../@cspell/cspell-service-bus/package.json | 78 +++++++++++ .../@cspell/cspell-types/cspell.schema.json | 4 + .../@cspell/cspell-types/package.json | 4 +- .../@cspell/dict-sql/package.json | 4 +- .../node_modules/@cspell/dict-sql/sql.txt.gz | Bin 7661 -> 7768 bytes .../cspell-gitignore/package.json | 4 +- .../node_modules/cspell-grammar/package.json | 6 +- .../node_modules/cspell-io/dist/CSpellIO.js | 3 + .../cspell-io/dist/CSpellIONode.js | 63 +++++++++ .../cspell-io/dist/CSpellIOWeb.js | 27 ++++ .../cspell-io/dist/common/stat.js | 19 +++ .../dist/errors/ErrorNotImplemented.js | 11 ++ .../cspell-io/dist/errors/error.js | 14 ++ .../cspell-io/dist/errors/index.js | 8 ++ .../node_modules/cspell-io/dist/file/index.js | 20 +-- .../cspell-io/dist/handlers/node/file.js | 127 ++++++++++++++++++ action/node_modules/cspell-io/dist/index.js | 30 ++--- .../cspell-io/dist/models/BufferEncoding.js | 3 + .../cspell-io/dist/models/Stats.js | 6 + .../cspell-io/dist/models/index.js | 3 + .../cspell-io/dist/node/dataUrl.js | 62 +++++++++ .../dist/{ => node}/file/FetchError.js | 0 .../cspell-io/dist/{ => node}/file/fetch.js | 11 +- .../dist/{ => node}/file/fileReader.js | 0 .../dist/{ => node}/file/fileWriter.js | 0 .../cspell-io/dist/node/file/index.js | 14 ++ .../cspell-io/dist/{ => node}/file/stat.js | 20 ++- .../cspell-io/dist/{ => node}/file/util.js | 8 +- .../dist/requests/RequestFsReadBinaryFile.js | 9 ++ .../dist/requests/RequestFsReadFile.js | 7 + .../dist/requests/RequestFsReadFileSync.js | 7 + .../cspell-io/dist/requests/RequestFsStat.js | 9 ++ .../dist/requests/RequestFsWriteFile.js | 7 + .../dist/requests/RequestZlibInflate.js | 7 + .../cspell-io/dist/requests/index.js | 18 +++ .../cspell-io/dist/test/helper.js | 65 +++++++++ action/node_modules/cspell-io/package.json | 5 +- .../SpellingDictionaryFromTrie.js | 16 +++ .../dist/SpellingDictionary/charset.js | 16 +++ action/node_modules/cspell-lib/package.json | 16 +-- .../node_modules/cspell-trie-lib/package.json | 6 +- action/node_modules/cspell/package.json | 14 +- action/package.json | 2 +- yarn.lock | 104 +++++++------- 54 files changed, 1047 insertions(+), 123 deletions(-) create mode 100644 action/node_modules/@cspell/cspell-service-bus/LICENSE create mode 100644 action/node_modules/@cspell/cspell-service-bus/README.md create mode 100644 action/node_modules/@cspell/cspell-service-bus/dist/SystemServiceBus.js create mode 100644 action/node_modules/@cspell/cspell-service-bus/dist/assert.js create mode 100644 action/node_modules/@cspell/cspell-service-bus/dist/bus.js create mode 100644 action/node_modules/@cspell/cspell-service-bus/dist/index.js create mode 100644 action/node_modules/@cspell/cspell-service-bus/dist/request.js create mode 100644 action/node_modules/@cspell/cspell-service-bus/dist/requestFactory.js create mode 100644 action/node_modules/@cspell/cspell-service-bus/package.json create mode 100644 action/node_modules/cspell-io/dist/CSpellIO.js create mode 100644 action/node_modules/cspell-io/dist/CSpellIONode.js create mode 100644 action/node_modules/cspell-io/dist/CSpellIOWeb.js create mode 100644 action/node_modules/cspell-io/dist/common/stat.js create mode 100644 action/node_modules/cspell-io/dist/errors/ErrorNotImplemented.js create mode 100644 action/node_modules/cspell-io/dist/errors/error.js create mode 100644 action/node_modules/cspell-io/dist/errors/index.js create mode 100644 action/node_modules/cspell-io/dist/handlers/node/file.js create mode 100644 action/node_modules/cspell-io/dist/models/BufferEncoding.js create mode 100644 action/node_modules/cspell-io/dist/models/Stats.js create mode 100644 action/node_modules/cspell-io/dist/models/index.js create mode 100644 action/node_modules/cspell-io/dist/node/dataUrl.js rename action/node_modules/cspell-io/dist/{ => node}/file/FetchError.js (100%) rename action/node_modules/cspell-io/dist/{ => node}/file/fetch.js (57%) rename action/node_modules/cspell-io/dist/{ => node}/file/fileReader.js (100%) rename action/node_modules/cspell-io/dist/{ => node}/file/fileWriter.js (100%) create mode 100644 action/node_modules/cspell-io/dist/node/file/index.js rename action/node_modules/cspell-io/dist/{ => node}/file/stat.js (70%) rename action/node_modules/cspell-io/dist/{ => node}/file/util.js (77%) create mode 100644 action/node_modules/cspell-io/dist/requests/RequestFsReadBinaryFile.js create mode 100644 action/node_modules/cspell-io/dist/requests/RequestFsReadFile.js create mode 100644 action/node_modules/cspell-io/dist/requests/RequestFsReadFileSync.js create mode 100644 action/node_modules/cspell-io/dist/requests/RequestFsStat.js create mode 100644 action/node_modules/cspell-io/dist/requests/RequestFsWriteFile.js create mode 100644 action/node_modules/cspell-io/dist/requests/RequestZlibInflate.js create mode 100644 action/node_modules/cspell-io/dist/requests/index.js create mode 100644 action/node_modules/cspell-io/dist/test/helper.js create mode 100644 action/node_modules/cspell-lib/dist/SpellingDictionary/charset.js diff --git a/action-src/package.json b/action-src/package.json index e544310d9..146980ece 100644 --- a/action-src/package.json +++ b/action-src/package.json @@ -40,7 +40,7 @@ "@octokit/core": "^3.6.0", "@octokit/plugin-rest-endpoint-methods": "^5.16.2", "@octokit/rest": "^18.12.0", - "cspell": "^6.4.2", + "cspell": "^6.5.0", "cspell-glob": "^6.4.2", "vscode-uri": "^3.0.3" } diff --git a/action/node_modules/@cspell/cspell-bundled-dicts/package.json b/action/node_modules/@cspell/cspell-bundled-dicts/package.json index 5b5dadc17..d075d284f 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.4.2", + "version": "6.5.0", "description": "Dictionaries bundled with cspell", "publishConfig": { "access": "public" @@ -46,7 +46,7 @@ "@cspell/dict-ada": "^2.0.1", "@cspell/dict-aws": "^2.0.0", "@cspell/dict-bash": "^2.0.4", - "@cspell/dict-companies": "^2.0.7", + "@cspell/dict-companies": "^2.0.9", "@cspell/dict-cpp": "^3.2.1", "@cspell/dict-cryptocurrencies": "^2.0.0", "@cspell/dict-csharp": "^3.0.1", @@ -80,8 +80,8 @@ "@cspell/dict-ruby": "^2.0.2", "@cspell/dict-rust": "^2.0.1", "@cspell/dict-scala": "^2.0.0", - "@cspell/dict-software-terms": "^2.2.0", - "@cspell/dict-sql": "^1.0.3", + "@cspell/dict-software-terms": "^2.2.1", + "@cspell/dict-sql": "^1.0.4", "@cspell/dict-swift": "^1.0.3", "@cspell/dict-typescript": "^2.0.1", "@cspell/dict-vue": "^2.0.2" @@ -90,8 +90,8 @@ "node": ">=14" }, "devDependencies": { - "@cspell/cspell-tools": "^6.4.2", - "@cspell/cspell-types": "^6.4.2" + "@cspell/cspell-tools": "^6.5.0", + "@cspell/cspell-types": "^6.5.0" }, - "gitHead": "1f7481fd7d6a561de92ba49870da6eb1441a9d20" + "gitHead": "65c80b01e17bb0d74b57ef8b29309684a8588e27" } diff --git a/action/node_modules/@cspell/cspell-service-bus/LICENSE b/action/node_modules/@cspell/cspell-service-bus/LICENSE new file mode 100644 index 000000000..04a247e2b --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Jason Dent + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/action/node_modules/@cspell/cspell-service-bus/README.md b/action/node_modules/@cspell/cspell-service-bus/README.md new file mode 100644 index 000000000..734236536 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/README.md @@ -0,0 +1,3 @@ +# `@cspell/cspell-service-bus` + +A Library for connecting requests to services that can fulfill them. diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/SystemServiceBus.js b/action/node_modules/@cspell/cspell-service-bus/dist/SystemServiceBus.js new file mode 100644 index 000000000..7e8bfc3cc --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/SystemServiceBus.js @@ -0,0 +1,91 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.createSubsystemServiceBus = exports.RequestCreateSubsystemFactory = exports.RequestRegisterHandlerFactory = exports.createSystemServiceBus = void 0; +const assert_1 = require("./assert"); +const bus_1 = require("./bus"); +const request_1 = require("./request"); +const requestFactory_1 = require("./requestFactory"); +class SystemServiceBusImpl { + constructor() { + this.serviceBus = (0, bus_1.createServiceBus)(); + this._subsystems = []; + this.bindDefaultHandlers(); + this.createSubsystem('Default Subsystem', '' /* match everything */); + } + bindDefaultHandlers() { + this.serviceBus.addHandler((0, bus_1.createRequestHandler)(exports.RequestCreateSubsystemFactory, (req) => { + const { name, requestPattern } = req.params; + const sub = createSubsystemServiceBus(name, requestPattern); + this._subsystems.push(sub); + this.serviceBus.addHandler(sub.handler); + return (0, request_1.createResponse)(sub); + })); + } + dispatch(request) { + return this.serviceBus.dispatch(request); + } + createSubsystem(name, requestPattern) { + const res = this.dispatch(exports.RequestCreateSubsystemFactory.create({ name, requestPattern })); + (0, assert_1.assert)(res?.value); + return res.value; + } + registerHandler(requestPrefix, handler) { + const request = exports.RequestRegisterHandlerFactory.create({ requestPrefix, handler }); + this.serviceBus.dispatch(request); + } + registerRequestHandler(requestDef, fn, name, description) { + this.registerHandler(requestDef.type, (0, bus_1.createRequestHandler)(requestDef, fn, name, description)); + } + get subsystems() { + return [...this._subsystems]; + } +} +function createSystemServiceBus() { + return new SystemServiceBusImpl(); +} +exports.createSystemServiceBus = createSystemServiceBus; +const TypeRequestRegisterHandler = 'System:RegisterHandler'; +exports.RequestRegisterHandlerFactory = (0, requestFactory_1.requestFactory)(TypeRequestRegisterHandler); +const TypeRequestCreateSubsystem = 'System:CreateSubsystem'; +exports.RequestCreateSubsystemFactory = (0, requestFactory_1.requestFactory)(TypeRequestCreateSubsystem); +class SubsystemServiceBusImpl extends bus_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, bus_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_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/assert.js b/action/node_modules/@cspell/cspell-service-bus/dist/assert.js new file mode 100644 index 000000000..6464475df --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/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/bus.js b/action/node_modules/@cspell/cspell-service-bus/dist/bus.js new file mode 100644 index 000000000..0839db39f --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/bus.js @@ -0,0 +1,95 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.UnhandledHandlerError = exports.ErrorServiceRequestDepthExceeded = exports.ErrorUnhandledRequest = exports.createRequestHandler = exports.createIsRequestHandler = exports.createIsRequestHandlerFn = exports.createServiceBus = exports.ServiceBus = void 0; +const request_1 = require("./request"); +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 }); + } + 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_1.createResponseFail)(request, new ErrorServiceRequestDepthExceeded(request, depth)); + } + const response = handler(request); + --depth; + return response; + } + return dispatch(request); + } + defaultHandler(request) { + return (0, request_1.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 (0, request_1.createResponseFail)(request, new UnhandledHandlerError(h.name, h.description, e)); + } + }; + }, defaultHandler); + return handler; + } +} +exports.ServiceBus = ServiceBus; +function createServiceBus(handlers = []) { + return new ServiceBus(handlers); +} +exports.createServiceBus = createServiceBus; +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; +function createRequestHandler(requestDef, fn, name, description) { + return createIsRequestHandler(requestDef.is, fn, name ?? requestDef.type, description); +} +exports.createRequestHandler = createRequestHandler; +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; +//# sourceMappingURL=bus.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/index.js b/action/node_modules/@cspell/cspell-service-bus/dist/index.js new file mode 100644 index 000000000..2a0a2cc25 --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/index.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.requestFactory = exports.ServiceRequest = exports.isServiceResponseSuccess = exports.isServiceResponseFailure = exports.createResponseFail = exports.createResponse = exports.ServiceBus = exports.createServiceBus = exports.createRequestHandler = void 0; +var bus_1 = require("./bus"); +Object.defineProperty(exports, "createRequestHandler", { enumerable: true, get: function () { return bus_1.createRequestHandler; } }); +Object.defineProperty(exports, "createServiceBus", { enumerable: true, get: function () { return bus_1.createServiceBus; } }); +Object.defineProperty(exports, "ServiceBus", { enumerable: true, get: function () { return bus_1.ServiceBus; } }); +var request_1 = require("./request"); +Object.defineProperty(exports, "createResponse", { enumerable: true, get: function () { return request_1.createResponse; } }); +Object.defineProperty(exports, "createResponseFail", { enumerable: true, get: function () { return request_1.createResponseFail; } }); +Object.defineProperty(exports, "isServiceResponseFailure", { enumerable: true, get: function () { return request_1.isServiceResponseFailure; } }); +Object.defineProperty(exports, "isServiceResponseSuccess", { enumerable: true, get: function () { return request_1.isServiceResponseSuccess; } }); +Object.defineProperty(exports, "ServiceRequest", { enumerable: true, get: function () { return request_1.ServiceRequest; } }); +var requestFactory_1 = require("./requestFactory"); +Object.defineProperty(exports, "requestFactory", { enumerable: true, get: function () { return requestFactory_1.requestFactory; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/@cspell/cspell-service-bus/dist/request.js b/action/node_modules/@cspell/cspell-service-bus/dist/request.js new file mode 100644 index 000000000..a9a47855c --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/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.ServiceRequest = void 0; +class BaseServiceRequest { + constructor(type, params) { + this.type = type; + this.params = params; + } +} +class ServiceRequest extends BaseServiceRequest { + constructor(type, params) { + super(type, params); + } +} +exports.ServiceRequest = ServiceRequest; +function createResponse(value) { + 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/requestFactory.js b/action/node_modules/@cspell/cspell-service-bus/dist/requestFactory.js new file mode 100644 index 000000000..89132944a --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/dist/requestFactory.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.requestFactory = void 0; +const request_1 = require("./request"); +function requestFactory(requestType) { + class RequestClass extends request_1.ServiceRequest { + constructor(params) { + super(requestType, params); + } + static is(req) { + return req instanceof RequestClass && req.type === requestType; + } + static create(params) { + return new RequestClass(params); + } + } + 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/package.json b/action/node_modules/@cspell/cspell-service-bus/package.json new file mode 100644 index 000000000..a38f5c3dc --- /dev/null +++ b/action/node_modules/@cspell/cspell-service-bus/package.json @@ -0,0 +1,78 @@ +{ + "name": "@cspell/cspell-service-bus", + "publishConfig": { + "access": "public" + }, + "version": "6.5.0", + "description": "A Library for connecting requests to services that can fulfill them.", + "keywords": [ + "cspell" + ], + "author": "Jason Dent ", + "homepage": "https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell-service-bus#readme", + "license": "MIT", + "main": "dist/index.js", + "directories": { + "dist": "dist" + }, + "exports": { + ".": { + "require": "./dist/index.js" + }, + "./*": { + "require": "./dist/*.js" + }, + "./index": "./dist/index.js", + "./index.js": "./dist/index.js", + "./index.d.ts": "./dist/index.d.ts" + }, + "typings": "dist/index.d.ts", + "typesVersions": { + "*": { + "index.d.ts": [ + "dist/index.d.ts" + ], + "dist/index.d.ts": [ + "dist/index.d.ts" + ], + "*": [ + "dist/*", + "dist/*/index.d.ts" + ] + } + }, + "files": [ + "dist", + "!**/__mocks__", + "!**/*.spec.*", + "!**/*.test.*", + "!**/test/**", + "!**/*.map" + ], + "scripts": { + "build": "tsc -p .", + "build-dev": "tsc -p tsconfig.dev.json", + "watch": "tsc -p . -w", + "clean": "rimraf dist coverage .tsbuildinfo", + "clean-build": "npm run clean && npm run build", + "coverage": "jest --coverage", + "test-watch": "jest --watch", + "test": "jest" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/streetsidesoftware/cspell.git" + }, + "bugs": { + "url": "https://github.com/streetsidesoftware/cspell/labels/cspell-service-bus" + }, + "engines": { + "node": ">=14" + }, + "devDependencies": { + "@types/node": "^18.6.1", + "jest": "^28.1.3", + "rimraf": "^3.0.2" + }, + "gitHead": "65c80b01e17bb0d74b57ef8b29309684a8588e27" +} diff --git a/action/node_modules/@cspell/cspell-types/cspell.schema.json b/action/node_modules/@cspell/cspell-types/cspell.schema.json index b15eb5e55..dd179fa5c 100644 --- a/action/node_modules/@cspell/cspell-types/cspell.schema.json +++ b/action/node_modules/@cspell/cspell-types/cspell.schema.json @@ -434,6 +434,10 @@ "$ref": "#/definitions/HunspellInformation", "description": "Used by dictionary authors" }, + "ignore": { + "$ref": "#/definitions/CharacterSet", + "description": "An optional set of characters that can possibly be removed from a word before checking it.\n\nThis is useful in languages like Arabic where Harakat accents are optional.\n\nNote: All matching characters are removed or none. Partial removal is not supported." + }, "locale": { "description": "The locale of the dictionary. Example: `nl,nl-be`", "type": "string" diff --git a/action/node_modules/@cspell/cspell-types/package.json b/action/node_modules/@cspell/cspell-types/package.json index e30c86bbe..32b7556d9 100644 --- a/action/node_modules/@cspell/cspell-types/package.json +++ b/action/node_modules/@cspell/cspell-types/package.json @@ -3,7 +3,7 @@ "publishConfig": { "access": "public" }, - "version": "6.4.2", + "version": "6.5.0", "description": "Types for cspell and cspell-lib", "type": "commonjs", "main": "dist/index.js", @@ -69,5 +69,5 @@ "ts-json-schema-generator": "^1.0.0", "typescript": "^4.7.4" }, - "gitHead": "1f7481fd7d6a561de92ba49870da6eb1441a9d20" + "gitHead": "65c80b01e17bb0d74b57ef8b29309684a8588e27" } diff --git a/action/node_modules/@cspell/dict-sql/package.json b/action/node_modules/@cspell/dict-sql/package.json index 250001cb6..b4236376c 100644 --- a/action/node_modules/@cspell/dict-sql/package.json +++ b/action/node_modules/@cspell/dict-sql/package.json @@ -1,6 +1,6 @@ { "name": "@cspell/dict-sql", - "version": "1.0.3", + "version": "1.0.4", "description": "SQL dictionary for cspell.", "publishConfig": { "access": "public" @@ -41,5 +41,5 @@ "*.js", "*.d.ts" ], - "gitHead": "42046d713c01b57e567ab80e56bc48b1c4e685df" + "gitHead": "85f6a2a663c879cbd1e45fd702989c4b1ab4296c" } diff --git a/action/node_modules/@cspell/dict-sql/sql.txt.gz b/action/node_modules/@cspell/dict-sql/sql.txt.gz index ea9fdd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>lg$mz(F9knmo)zao&xU&ELo!#@yx$A^ zGXSCR`I7}t7Wz(i_y97XgIz)m;Ua&aZVvUM?6cs7R9M%FHKZ3`4Tich`vt&N+MmFX zf3M{-hB{n90qOQ=sJTM5t#v^>)Sfd8HC>B6>iJg-!SEV4r5H{p&83s!89F1a(ZWAa z=@RcO+JE!NCjFOs6aHW8!#3zicu5L3^gB0sM0R!p^7HVz-3>Gwy2J#bsKwOG5lz1z z8nKStKS!TGMxXzp=wrMUaPVbB{?{A&vnAP;fUM7V%^M2xs6UPvKbpT*ym@)meJNY< zwn85;?DOKA{T15?ObRT7ua0jrBBZ6Fcp#eYw-@WK+V?NT#mM$RCalxE!c zFaF7ZCHWa7vYdc@PZTp<_`yG>`}lD@Y@eTvU;Mccia}I>b~p&aUsDL%pGN@h8-A right; -1 left < right + */ +function compareStats(left, right) { + if (left === right) + return 0; + if (left.eTag || right.eTag) + return left.eTag === right.eTag ? 0 : (left.eTag || '') < (right.eTag || '') ? -1 : 1; + const diff = left.size - right.size || left.mtimeMs - right.mtimeMs; + return diff < 0 ? -1 : diff > 0 ? 1 : 0; +} +exports.compareStats = compareStats; +//# sourceMappingURL=stat.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/errors/ErrorNotImplemented.js b/action/node_modules/cspell-io/dist/errors/ErrorNotImplemented.js new file mode 100644 index 000000000..24b90242f --- /dev/null +++ b/action/node_modules/cspell-io/dist/errors/ErrorNotImplemented.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ErrorNotImplemented = void 0; +class ErrorNotImplemented extends Error { + constructor(method) { + super(`Method ${method} is not supported.`); + this.method = method; + } +} +exports.ErrorNotImplemented = ErrorNotImplemented; +//# sourceMappingURL=ErrorNotImplemented.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/errors/error.js b/action/node_modules/cspell-io/dist/errors/error.js new file mode 100644 index 000000000..36f526353 --- /dev/null +++ b/action/node_modules/cspell-io/dist/errors/error.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.toError = void 0; +function toError(e) { + if (e instanceof Error) + return e; + if (typeof e === 'object' && e && typeof e.message === 'string') { + return e; + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + return Error(e && e.toString()); +} +exports.toError = toError; +//# sourceMappingURL=error.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/errors/index.js b/action/node_modules/cspell-io/dist/errors/index.js new file mode 100644 index 000000000..6305869b4 --- /dev/null +++ b/action/node_modules/cspell-io/dist/errors/index.js @@ -0,0 +1,8 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ErrorNotImplemented = exports.toError = void 0; +var error_1 = require("./error"); +Object.defineProperty(exports, "toError", { enumerable: true, get: function () { return error_1.toError; } }); +var ErrorNotImplemented_1 = require("./ErrorNotImplemented"); +Object.defineProperty(exports, "ErrorNotImplemented", { enumerable: true, get: function () { return ErrorNotImplemented_1.ErrorNotImplemented; } }); +//# sourceMappingURL=index.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 b4994e136..a35f19729 100644 --- a/action/node_modules/cspell-io/dist/file/index.js +++ b/action/node_modules/cspell-io/dist/file/index.js @@ -1,14 +1,14 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getStatSync = exports.getStat = exports.writeToFileIterableP = 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; } }); +var file_1 = require("./../node/file"); +Object.defineProperty(exports, "readFile", { enumerable: true, get: function () { return file_1.readFile; } }); +Object.defineProperty(exports, "readFileSync", { enumerable: true, get: function () { return file_1.readFileSync; } }); +var file_2 = require("./../node/file"); +Object.defineProperty(exports, "writeToFile", { enumerable: true, get: function () { return file_2.writeToFile; } }); +Object.defineProperty(exports, "writeToFileIterable", { enumerable: true, get: function () { return file_2.writeToFileIterable; } }); +Object.defineProperty(exports, "writeToFileIterableP", { enumerable: true, get: function () { return file_2.writeToFileIterableP; } }); +var file_3 = require("./../node/file"); +Object.defineProperty(exports, "getStat", { enumerable: true, get: function () { return file_3.getStat; } }); +Object.defineProperty(exports, "getStatSync", { enumerable: true, get: function () { return file_3.getStatSync; } }); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/handlers/node/file.js b/action/node_modules/cspell-io/dist/handlers/node/file.js new file mode 100644 index 000000000..90fca8e8f --- /dev/null +++ b/action/node_modules/cspell-io/dist/handlers/node/file.js @@ -0,0 +1,127 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.registerHandlers = void 0; +const cspell_service_bus_1 = require("@cspell/cspell-service-bus"); +const assert_1 = __importDefault(require("assert")); +const fs_1 = require("fs"); +const zlib_1 = require("zlib"); +const errors_1 = require("../../errors"); +const fetch_1 = require("../../node/file/fetch"); +const stat_1 = require("../../node/file/stat"); +const requests_1 = require("../../requests"); +const isGzFileRegExp = /\.gz($|[?#])/; +function isGzFile(url) { + return isGzFileRegExp.test(url.pathname); +} +/** + * Handle Binary File Reads + */ +const handleRequestFsReadBinaryFile = (0, cspell_service_bus_1.createRequestHandler)(requests_1.RequestFsReadBinaryFile, ({ params }) => (0, cspell_service_bus_1.createResponse)(fs_1.promises.readFile(params.url)), undefined, 'Node: Read Binary File.'); +/** + * Handle Binary File Sync Reads + */ +const handleRequestFsReadBinaryFileSync = (0, cspell_service_bus_1.createRequestHandler)(requests_1.RequestFsReadBinaryFileSync, ({ params }) => (0, cspell_service_bus_1.createResponse)((0, fs_1.readFileSync)(params.url)), undefined, 'Node: Sync Read Binary File.'); +/** + * Handle UTF-8 Text File Reads + */ +const handleRequestFsReadFile = (0, cspell_service_bus_1.createRequestHandler)(requests_1.RequestFsReadFile, (req, _, dispatcher) => { + const { url, encoding } = req.params; + const res = dispatcher.dispatch(requests_1.RequestFsReadBinaryFile.create({ url })); + if (!(0, cspell_service_bus_1.isServiceResponseSuccess)(res)) { + (0, assert_1.default)((0, cspell_service_bus_1.isServiceResponseFailure)(res)); + return (0, cspell_service_bus_1.createResponseFail)(req, res.error); + } + return (0, cspell_service_bus_1.createResponse)(res.value.then((buf) => bufferToText(buf, encoding))); +}, undefined, 'Node: Read Text File.'); +/** + * Handle UTF-8 Text File Reads + */ +const handleRequestFsReadFileSync = (0, cspell_service_bus_1.createRequestHandler)(requests_1.RequestFsReadFileSync, (req, _, dispatcher) => { + const { url, encoding } = req.params; + const res = dispatcher.dispatch(requests_1.RequestFsReadBinaryFileSync.create({ url })); + if (!(0, cspell_service_bus_1.isServiceResponseSuccess)(res)) { + (0, assert_1.default)((0, cspell_service_bus_1.isServiceResponseFailure)(res)); + return (0, cspell_service_bus_1.createResponseFail)(req, res.error); + } + return (0, cspell_service_bus_1.createResponse)(bufferToText(res.value, encoding)); +}, undefined, 'Node: Sync Read Text File.'); +/** + * Handle deflating gzip data + */ +const handleRequestZlibInflate = (0, cspell_service_bus_1.createRequestHandler)(requests_1.RequestZlibInflate, ({ params }) => (0, cspell_service_bus_1.createResponse)((0, zlib_1.gunzipSync)(params.data).toString('utf-8')), undefined, 'Node: gz deflate.'); +const supportedFetchProtocols = { 'http:': true, 'https:': true }; +/** + * Handle reading gzip'ed text files. + */ +const handleRequestFsReadBinaryFileHttp = (0, cspell_service_bus_1.createRequestHandler)(requests_1.RequestFsReadBinaryFile, (req, next) => { + const { url } = req.params; + if (!(url.protocol in supportedFetchProtocols)) + return next(req); + return (0, cspell_service_bus_1.createResponse)((0, fetch_1.fetchURL)(url)); +}, undefined, 'Node: Read Http(s) file.'); +function bufferToText(buf, encoding) { + return buf[0] === 0x1f && buf[1] === 0x8b ? bufferToText((0, zlib_1.gunzipSync)(buf), encoding) : buf.toString(encoding); +} +/** + * Handle fs:stat + */ +const handleRequestFsStat = (0, cspell_service_bus_1.createRequestHandler)(requests_1.RequestFsStat, ({ params }) => (0, cspell_service_bus_1.createResponse)(fs_1.promises.stat(params.url)), undefined, 'Node: fs.stat.'); +/** + * Handle fs:statSync + */ +const handleRequestFsStatSync = (0, cspell_service_bus_1.createRequestHandler)(requests_1.RequestFsStatSync, (req) => { + const { params } = req; + try { + return (0, cspell_service_bus_1.createResponse)((0, fs_1.statSync)(params.url)); + } + catch (e) { + return (0, cspell_service_bus_1.createResponseFail)(req, (0, errors_1.toError)(e)); + } +}, undefined, 'Node: fs.stat.'); +/** + * Handle deflating gzip data + */ +const handleRequestFsStatHttp = (0, cspell_service_bus_1.createRequestHandler)(requests_1.RequestFsStat, (req, next) => { + const { url } = req.params; + if (!(url.protocol in supportedFetchProtocols)) + return next(req); + return (0, cspell_service_bus_1.createResponse)((0, stat_1.getStatHttp)(url)); +}, undefined, 'Node: http get stat'); +/** + * Handle fs:writeFile + */ +const handleRequestFsWriteFile = (0, cspell_service_bus_1.createRequestHandler)(requests_1.RequestFsWriteFile, ({ params }) => (0, cspell_service_bus_1.createResponse)(fs_1.promises.writeFile(params.url, params.content)), undefined, 'Node: fs.writeFile'); +/** + * Handle fs:writeFile compressed + */ +const handleRequestFsWriteFileGz = (0, cspell_service_bus_1.createRequestHandler)(requests_1.RequestFsWriteFile, (req, next) => { + const { url, content } = req.params; + if (!isGzFile(url)) + return next(req); + return (0, cspell_service_bus_1.createResponse)(fs_1.promises.writeFile(url, (0, zlib_1.gzipSync)(content))); +}, undefined, 'Node: http get stat'); +function registerHandlers(serviceBus) { + /** + * Handlers are in order of low to high level + * Order is VERY important. + */ + const handlers = [ + handleRequestFsWriteFile, + handleRequestFsWriteFileGz, + handleRequestFsReadBinaryFile, + handleRequestFsReadBinaryFileSync, + handleRequestFsReadBinaryFileHttp, + handleRequestFsReadFile, + handleRequestFsReadFileSync, + handleRequestZlibInflate, + handleRequestFsStatSync, + handleRequestFsStat, + handleRequestFsStatHttp, + ]; + handlers.forEach((handler) => serviceBus.addHandler(handler)); +} +exports.registerHandlers = registerHandlers; +//# sourceMappingURL=file.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/index.js b/action/node_modules/cspell-io/dist/index.js index 68ffbc43f..f0738062b 100644 --- a/action/node_modules/cspell-io/dist/index.js +++ b/action/node_modules/cspell-io/dist/index.js @@ -1,21 +1,19 @@ "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 __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; Object.defineProperty(exports, "__esModule", { value: true }); -exports.asyncIterableToArray = void 0; -__exportStar(require("./file"), exports); +exports.toDataUrl = exports.encodeDataUrl = exports.CSpellIONode = exports.writeToFileIterableP = exports.writeToFileIterable = exports.writeToFile = exports.readFileSync = exports.readFile = exports.getStatSync = exports.getStat = exports.asyncIterableToArray = void 0; var asyncIterable_1 = require("./async/asyncIterable"); Object.defineProperty(exports, "asyncIterableToArray", { enumerable: true, get: function () { return asyncIterable_1.toArray; } }); +var file_1 = require("./file"); +Object.defineProperty(exports, "getStat", { enumerable: true, get: function () { return file_1.getStat; } }); +Object.defineProperty(exports, "getStatSync", { enumerable: true, get: function () { return file_1.getStatSync; } }); +Object.defineProperty(exports, "readFile", { enumerable: true, get: function () { return file_1.readFile; } }); +Object.defineProperty(exports, "readFileSync", { enumerable: true, get: function () { return file_1.readFileSync; } }); +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; } }); +var CSpellIONode_1 = require("./CSpellIONode"); +Object.defineProperty(exports, "CSpellIONode", { enumerable: true, get: function () { return CSpellIONode_1.CSpellIONode; } }); +var dataUrl_1 = require("./node/dataUrl"); +Object.defineProperty(exports, "encodeDataUrl", { enumerable: true, get: function () { return dataUrl_1.encodeDataUrl; } }); +Object.defineProperty(exports, "toDataUrl", { enumerable: true, get: function () { return dataUrl_1.toDataUrl; } }); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/models/BufferEncoding.js b/action/node_modules/cspell-io/dist/models/BufferEncoding.js new file mode 100644 index 000000000..adf87bf0d --- /dev/null +++ b/action/node_modules/cspell-io/dist/models/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/models/Stats.js b/action/node_modules/cspell-io/dist/models/Stats.js new file mode 100644 index 000000000..aa2f93b54 --- /dev/null +++ b/action/node_modules/cspell-io/dist/models/Stats.js @@ -0,0 +1,6 @@ +"use strict"; +/** + * Subset of definition from the Node definition to avoid a dependency upon a specific version of Node + */ +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=Stats.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/models/index.js b/action/node_modules/cspell-io/dist/models/index.js new file mode 100644 index 000000000..aa219d8f2 --- /dev/null +++ b/action/node_modules/cspell-io/dist/models/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-io/dist/node/dataUrl.js b/action/node_modules/cspell-io/dist/node/dataUrl.js new file mode 100644 index 000000000..3a20c1fd5 --- /dev/null +++ b/action/node_modules/cspell-io/dist/node/dataUrl.js @@ -0,0 +1,62 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decodeDataUrl = exports.toDataUrl = exports.encodeDataUrl = void 0; +/** + * Generates a string of the following format: + * + * `data:[mediaType][;charset=[;base64],` + * + * - `encoding` - defaults to `utf8` for text data + * @param data + * @param mediaType - The mediaType is a [MIME](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) type string + * @param attributes - Additional attributes + */ +function encodeDataUrl(data, mediaType, attributes) { + if (typeof data === 'string') + return encodeString(data, mediaType, attributes); + const attribs = encodeAttributes(attributes || []); + return `data:${mediaType}${attribs};base64,${data.toString('base64url')}`; +} +exports.encodeDataUrl = encodeDataUrl; +function toDataUrl(data, mediaType, attributes) { + return new URL(encodeDataUrl(data, mediaType, attributes)); +} +exports.toDataUrl = toDataUrl; +function encodeString(data, mediaType, attributes) { + mediaType = mediaType || 'text/plain'; + attributes = attributes || []; + const asUrlComp = encodeURIComponent(data); + const asBase64 = Buffer.from(data).toString('base64url'); + const useBase64 = asBase64.length < asUrlComp.length - 7; + const encoded = useBase64 ? asBase64 : asUrlComp; + // Ensure charset is first. + const attribMap = new Map([['charset', 'utf8']].concat([...attributes])); + attribMap.set('charset', 'utf8'); // Make sure it is always `utf8`. + const attribs = encodeAttributes(attribMap); + return `data:${mediaType}${attribs}${useBase64 ? ';base64' : ''},${encoded}`; +} +function encodeAttributes(attributes) { + return [...attributes].map(([key, value]) => `;${key}=${encodeURIComponent(value)}`).join(''); +} +const dataUrlRegExHead = /^data:(?[^;,]*)(?(?:;[^=]+=[^;,]*)*)(?;base64)?$/; +function decodeDataUrl(url) { + const [head, encodedData] = url.split(',', 2); + if (!head || encodedData === undefined) + throw Error('Not a data url'); + const match = head.match(dataUrlRegExHead); + if (!match || !match.groups) + throw Error('Not a data url'); + const mediaType = match.groups['mediaType'] || ''; + const rawAttributes = (match.groups['attributes'] || '') + .split(';') + .filter((a) => !!a) + .map((entry) => entry.split('=', 2)) + .map(([key, value]) => [key, decodeURIComponent(value)]); + const attributes = new Map(rawAttributes); + const encoding = attributes.get('charset'); + const isBase64 = !!match.groups['base64']; + const data = isBase64 ? Buffer.from(encodedData, 'base64url') : Buffer.from(decodeURIComponent(encodedData)); + return { mediaType, data, encoding, attributes }; +} +exports.decodeDataUrl = decodeDataUrl; +//# sourceMappingURL=dataUrl.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/file/FetchError.js b/action/node_modules/cspell-io/dist/node/file/FetchError.js similarity index 100% rename from action/node_modules/cspell-io/dist/file/FetchError.js rename to action/node_modules/cspell-io/dist/node/file/FetchError.js diff --git a/action/node_modules/cspell-io/dist/file/fetch.js b/action/node_modules/cspell-io/dist/node/file/fetch.js similarity index 57% rename from action/node_modules/cspell-io/dist/file/fetch.js rename to action/node_modules/cspell-io/dist/node/file/fetch.js index 7b45ba5b0..021958076 100644 --- a/action/node_modules/cspell-io/dist/file/fetch.js +++ b/action/node_modules/cspell-io/dist/node/file/fetch.js @@ -3,12 +3,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.fetchHead = exports.fetch = void 0; +exports.fetchURL = exports.fetchHead = exports.fetch = void 0; const node_fetch_1 = __importDefault(require("node-fetch")); +const FetchError_1 = require("./FetchError"); exports.fetch = node_fetch_1.default; async function fetchHead(request) { const r = await (0, exports.fetch)(request, { method: 'HEAD' }); return r.headers; } exports.fetchHead = fetchHead; +async function fetchURL(url) { + const response = await (0, exports.fetch)(url); + if (!response.ok) { + throw FetchError_1.FetchUrlError.create(url, response.status); + } + return Buffer.from(await response.arrayBuffer()); +} +exports.fetchURL = fetchURL; //# sourceMappingURL=fetch.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/file/fileReader.js b/action/node_modules/cspell-io/dist/node/file/fileReader.js similarity index 100% rename from action/node_modules/cspell-io/dist/file/fileReader.js rename to action/node_modules/cspell-io/dist/node/file/fileReader.js diff --git a/action/node_modules/cspell-io/dist/file/fileWriter.js b/action/node_modules/cspell-io/dist/node/file/fileWriter.js similarity index 100% rename from action/node_modules/cspell-io/dist/file/fileWriter.js rename to action/node_modules/cspell-io/dist/node/file/fileWriter.js diff --git a/action/node_modules/cspell-io/dist/node/file/index.js b/action/node_modules/cspell-io/dist/node/file/index.js new file mode 100644 index 000000000..b4994e136 --- /dev/null +++ b/action/node_modules/cspell-io/dist/node/file/index.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getStatSync = exports.getStat = exports.writeToFileIterableP = 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; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/file/stat.js b/action/node_modules/cspell-io/dist/node/file/stat.js similarity index 70% rename from action/node_modules/cspell-io/dist/file/stat.js rename to action/node_modules/cspell-io/dist/node/file/stat.js index 6a535a26c..f849984df 100644 --- a/action/node_modules/cspell-io/dist/file/stat.js +++ b/action/node_modules/cspell-io/dist/node/file/stat.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getStatSync = exports.getStat = void 0; +exports.getStatHttp = exports.getStatSync = exports.getStat = void 0; const fs_1 = require("fs"); const util_1 = require("util"); const fetch_1 = require("./fetch"); @@ -10,12 +10,7 @@ async function getStat(filenameOrUri) { const url = (0, util_2.toURL)(filenameOrUri); if (!(0, util_2.isFileURL)(url)) { try { - const headers = await (0, fetch_1.fetchHead)(url); - return { - size: Number.parseInt(headers.get('content-length') || '0', 10), - mtimeMs: 0, - eTag: headers.get('etag') || undefined, - }; + return await getStatHttp(url); } catch (e) { return toError(e); @@ -34,6 +29,17 @@ function getStatSync(uri) { } } exports.getStatSync = getStatSync; +async function getStatHttp(url) { + const headers = await (0, fetch_1.fetchHead)(url); + const eTag = headers.get('etag') || undefined; + const guessSize = Number.parseInt(headers.get('content-length') || '0', 10); + return { + size: eTag ? -1 : guessSize, + mtimeMs: 0, + eTag, + }; +} +exports.getStatHttp = getStatHttp; function toError(e) { if (isErrnoException(e) || e instanceof Error) return e; diff --git a/action/node_modules/cspell-io/dist/file/util.js b/action/node_modules/cspell-io/dist/node/file/util.js similarity index 77% rename from action/node_modules/cspell-io/dist/file/util.js rename to action/node_modules/cspell-io/dist/node/file/util.js index 8956e6557..01cf4df04 100644 --- a/action/node_modules/cspell-io/dist/file/util.js +++ b/action/node_modules/cspell-io/dist/node/file/util.js @@ -11,7 +11,7 @@ function isZipped(filename) { } exports.isZipped = isZipped; function isUrlLike(filename) { - return filename instanceof url_1.URL || isURLRegExp.test(filename); + return filename instanceof URL || isURLRegExp.test(filename); } exports.isUrlLike = isUrlLike; function isSupportedURL(url) { @@ -23,7 +23,11 @@ function isFileURL(url) { } exports.isFileURL = isFileURL; function toURL(filename) { - return filename instanceof url_1.URL ? filename : isUrlLike(filename) ? new url_1.URL(filename) : (0, url_1.pathToFileURL)(filename); + return filename instanceof URL || typeof filename !== 'string' + ? filename + : isUrlLike(filename) + ? new URL(filename) + : (0, url_1.pathToFileURL)(filename); } exports.toURL = toURL; //# sourceMappingURL=util.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/requests/RequestFsReadBinaryFile.js b/action/node_modules/cspell-io/dist/requests/RequestFsReadBinaryFile.js new file mode 100644 index 000000000..ea746a3df --- /dev/null +++ b/action/node_modules/cspell-io/dist/requests/RequestFsReadBinaryFile.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RequestFsReadBinaryFileSync = exports.RequestFsReadBinaryFile = void 0; +const cspell_service_bus_1 = require("@cspell/cspell-service-bus"); +const RequestType = 'fs:readBinaryFile'; +exports.RequestFsReadBinaryFile = (0, cspell_service_bus_1.requestFactory)(RequestType); +const RequestTypeSync = 'fs:readBinaryFileSync'; +exports.RequestFsReadBinaryFileSync = (0, cspell_service_bus_1.requestFactory)(RequestTypeSync); +//# sourceMappingURL=RequestFsReadBinaryFile.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/requests/RequestFsReadFile.js b/action/node_modules/cspell-io/dist/requests/RequestFsReadFile.js new file mode 100644 index 000000000..00925e906 --- /dev/null +++ b/action/node_modules/cspell-io/dist/requests/RequestFsReadFile.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RequestFsReadFile = void 0; +const cspell_service_bus_1 = require("@cspell/cspell-service-bus"); +const RequestType = 'fs:readFile'; +exports.RequestFsReadFile = (0, cspell_service_bus_1.requestFactory)(RequestType); +//# sourceMappingURL=RequestFsReadFile.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/requests/RequestFsReadFileSync.js b/action/node_modules/cspell-io/dist/requests/RequestFsReadFileSync.js new file mode 100644 index 000000000..cdf062dc7 --- /dev/null +++ b/action/node_modules/cspell-io/dist/requests/RequestFsReadFileSync.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RequestFsReadFileSync = void 0; +const cspell_service_bus_1 = require("@cspell/cspell-service-bus"); +const RequestType = 'fs:readFileSync'; +exports.RequestFsReadFileSync = (0, cspell_service_bus_1.requestFactory)(RequestType); +//# sourceMappingURL=RequestFsReadFileSync.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/requests/RequestFsStat.js b/action/node_modules/cspell-io/dist/requests/RequestFsStat.js new file mode 100644 index 000000000..521b61b7e --- /dev/null +++ b/action/node_modules/cspell-io/dist/requests/RequestFsStat.js @@ -0,0 +1,9 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RequestFsStatSync = exports.RequestFsStat = void 0; +const cspell_service_bus_1 = require("@cspell/cspell-service-bus"); +const RequestTypeStat = 'fs:stat'; +exports.RequestFsStat = (0, cspell_service_bus_1.requestFactory)(RequestTypeStat); +const RequestTypeStatSync = 'fs:statSync'; +exports.RequestFsStatSync = (0, cspell_service_bus_1.requestFactory)(RequestTypeStatSync); +//# sourceMappingURL=RequestFsStat.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/requests/RequestFsWriteFile.js b/action/node_modules/cspell-io/dist/requests/RequestFsWriteFile.js new file mode 100644 index 000000000..2cf166580 --- /dev/null +++ b/action/node_modules/cspell-io/dist/requests/RequestFsWriteFile.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RequestFsWriteFile = void 0; +const cspell_service_bus_1 = require("@cspell/cspell-service-bus"); +const RequestType = 'fs:writeFile'; +exports.RequestFsWriteFile = (0, cspell_service_bus_1.requestFactory)(RequestType); +//# sourceMappingURL=RequestFsWriteFile.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/requests/RequestZlibInflate.js b/action/node_modules/cspell-io/dist/requests/RequestZlibInflate.js new file mode 100644 index 000000000..72866d7bc --- /dev/null +++ b/action/node_modules/cspell-io/dist/requests/RequestZlibInflate.js @@ -0,0 +1,7 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RequestZlibInflate = void 0; +const cspell_service_bus_1 = require("@cspell/cspell-service-bus"); +const RequestType = 'zlib:inflate'; +exports.RequestZlibInflate = (0, cspell_service_bus_1.requestFactory)(RequestType); +//# sourceMappingURL=RequestZlibInflate.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/requests/index.js b/action/node_modules/cspell-io/dist/requests/index.js new file mode 100644 index 000000000..ed4b70c84 --- /dev/null +++ b/action/node_modules/cspell-io/dist/requests/index.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.RequestFsWriteFile = exports.RequestZlibInflate = exports.RequestFsStatSync = exports.RequestFsStat = exports.RequestFsReadFileSync = exports.RequestFsReadFile = exports.RequestFsReadBinaryFileSync = exports.RequestFsReadBinaryFile = void 0; +var RequestFsReadBinaryFile_1 = require("./RequestFsReadBinaryFile"); +Object.defineProperty(exports, "RequestFsReadBinaryFile", { enumerable: true, get: function () { return RequestFsReadBinaryFile_1.RequestFsReadBinaryFile; } }); +Object.defineProperty(exports, "RequestFsReadBinaryFileSync", { enumerable: true, get: function () { return RequestFsReadBinaryFile_1.RequestFsReadBinaryFileSync; } }); +var RequestFsReadFile_1 = require("./RequestFsReadFile"); +Object.defineProperty(exports, "RequestFsReadFile", { enumerable: true, get: function () { return RequestFsReadFile_1.RequestFsReadFile; } }); +var RequestFsReadFileSync_1 = require("./RequestFsReadFileSync"); +Object.defineProperty(exports, "RequestFsReadFileSync", { enumerable: true, get: function () { return RequestFsReadFileSync_1.RequestFsReadFileSync; } }); +var RequestFsStat_1 = require("./RequestFsStat"); +Object.defineProperty(exports, "RequestFsStat", { enumerable: true, get: function () { return RequestFsStat_1.RequestFsStat; } }); +Object.defineProperty(exports, "RequestFsStatSync", { enumerable: true, get: function () { return RequestFsStat_1.RequestFsStatSync; } }); +var RequestZlibInflate_1 = require("./RequestZlibInflate"); +Object.defineProperty(exports, "RequestZlibInflate", { enumerable: true, get: function () { return RequestZlibInflate_1.RequestZlibInflate; } }); +var RequestFsWriteFile_1 = require("./RequestFsWriteFile"); +Object.defineProperty(exports, "RequestFsWriteFile", { enumerable: true, get: function () { return RequestFsWriteFile_1.RequestFsWriteFile; } }); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/dist/test/helper.js b/action/node_modules/cspell-io/dist/test/helper.js new file mode 100644 index 000000000..ff8bbf329 --- /dev/null +++ b/action/node_modules/cspell-io/dist/test/helper.js @@ -0,0 +1,65 @@ +"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.pathToTemp = exports.testNameToDir = exports.makePathToFile = exports.pathToRoot = exports.pathToSample = void 0; +const path = __importStar(require("path")); +const fs_extra_1 = require("fs-extra"); +const pathPackageRoot = path.join(__dirname, '../..'); +const pathSamples = path.join(pathPackageRoot, 'samples'); +const pathTemp = path.join(pathPackageRoot, 'temp'); +function pathToSample(...parts) { + return path.resolve(pathSamples, ...parts); +} +exports.pathToSample = pathToSample; +function pathToRoot(...parts) { + return path.resolve(pathPackageRoot, ...parts); +} +exports.pathToRoot = pathToRoot; +function makePathToFile(file) { + return (0, fs_extra_1.mkdirp)(path.dirname(file)); +} +exports.makePathToFile = makePathToFile; +function testNameToDir(testName) { + return `test_${testName.replace(/\s/g, '-').replace(/[^\w.-]/gi, '_')}_test`; +} +exports.testNameToDir = testNameToDir; +/** + * Calculate a Uri for a path to a temporary directory that will be unique to the current test. + * Note: if a text is not currently running, then it is the path for the test file. + * @param baseFilename - name of file / directory wanted + * @param testFilename - optional full path to a test file. + * @returns full path to the requested temp file. + */ +function pathToTemp(...parts) { + const testState = expect.getState(); + const callerFile = testState.testPath || '.'; + const testFile = path.relative(pathPackageRoot, callerFile); + expect.getState(); + const testName = testState.currentTestName || '.'; + const testDirName = testNameToDir(testName); + return path.resolve(pathTemp, testFile, testDirName, ...parts); +} +exports.pathToTemp = pathToTemp; +//# sourceMappingURL=helper.js.map \ No newline at end of file diff --git a/action/node_modules/cspell-io/package.json b/action/node_modules/cspell-io/package.json index 4c5b4446f..954469471 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.4.2", + "version": "6.5.0", "description": "A library of useful I/O functions used across various cspell tools.", "main": "dist/index.js", "typings": "dist/index.d.ts", @@ -46,8 +46,9 @@ "rimraf": "^3.0.2" }, "dependencies": { + "@cspell/cspell-service-bus": "^6.5.0", "@types/node-fetch": "^2.6.2", "node-fetch": "^2.6.7" }, - "gitHead": "1f7481fd7d6a561de92ba49870da6eb1441a9d20" + "gitHead": "65c80b01e17bb0d74b57ef8b29309684a8588e27" } diff --git a/action/node_modules/cspell-lib/dist/SpellingDictionary/SpellingDictionaryFromTrie.js b/action/node_modules/cspell-lib/dist/SpellingDictionary/SpellingDictionaryFromTrie.js index e32a1f5a0..ec3095672 100644 --- a/action/node_modules/cspell-lib/dist/SpellingDictionary/SpellingDictionaryFromTrie.js +++ b/action/node_modules/cspell-lib/dist/SpellingDictionary/SpellingDictionaryFromTrie.js @@ -6,6 +6,7 @@ const Settings_1 = require("../Settings"); const Memorizer_1 = require("../util/Memorizer"); const repMap_1 = require("../util/repMap"); const util_1 = require("../util/util"); +const charset_1 = require("./charset"); const SpellingDictionaryMethods_1 = require("./SpellingDictionaryMethods"); class SpellingDictionaryFromTrie { constructor(trie, name, options, source = 'from trie', size) { @@ -23,6 +24,7 @@ class SpellingDictionaryFromTrie { this.containsNoSuggestWords = options.noSuggest || false; this._size = size || 0; this.weightMap = options.weightMap || (0, SpellingDictionaryMethods_1.createWeightMapFromDictionaryInformation)(options.dictionaryInformation); + this.ignoreCharactersRegExp = (0, charset_1.charsetToRegExp)(this.options.dictionaryInformation?.ignore); } get size() { if (!this._size) { @@ -60,6 +62,20 @@ class SpellingDictionaryFromTrie { return { useCompounds, ignoreCase }; } findAnyForm(word, useCompounds, ignoreCase) { + const outerForms = new Set([word]); + if (this.ignoreCharactersRegExp) { + outerForms.add(word.replace(this.ignoreCharactersRegExp, '')); + outerForms.add(word.normalize('NFD').replace(this.ignoreCharactersRegExp, '')); + outerForms.add(word.normalize('NFC').replace(this.ignoreCharactersRegExp, '')); + } + for (const form of outerForms) { + const r = this._findAnyForm(form, useCompounds, ignoreCase); + if (r) + return r; + } + return undefined; + } + _findAnyForm(word, useCompounds, ignoreCase) { const mWord = this.mapWord(word.normalize('NFC')); const opts = { caseSensitive: !ignoreCase }; const findResult = this.trie.findWord(mWord, opts); diff --git a/action/node_modules/cspell-lib/dist/SpellingDictionary/charset.js b/action/node_modules/cspell-lib/dist/SpellingDictionary/charset.js new file mode 100644 index 000000000..ab30889a7 --- /dev/null +++ b/action/node_modules/cspell-lib/dist/SpellingDictionary/charset.js @@ -0,0 +1,16 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.charsetToRegExp = void 0; +function charsetToRegExp(charset) { + if (!charset) + return undefined; + try { + const reg = `[${charset.replace(/[\][\\]/g, '\\$&')}]`; + return new RegExp(reg, 'g'); + } + catch (e) { + return undefined; + } +} +exports.charsetToRegExp = charsetToRegExp; +//# sourceMappingURL=charset.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 f5b2270a5..79793bad7 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.4.2", + "version": "6.5.0", "description": "A library of useful functions used across various cspell tools.", "main": "dist/index.js", "typings": "dist/index.d.ts", @@ -48,17 +48,17 @@ }, "homepage": "https://github.com/streetsidesoftware/cspell#readme", "dependencies": { - "@cspell/cspell-bundled-dicts": "^6.4.2", + "@cspell/cspell-bundled-dicts": "^6.5.0", "@cspell/cspell-pipe": "^6.4.2", - "@cspell/cspell-types": "^6.4.2", + "@cspell/cspell-types": "^6.5.0", "clear-module": "^4.1.2", "comment-json": "^4.2.2", "configstore": "^5.0.1", "cosmiconfig": "^7.0.1", "cspell-glob": "^6.4.2", - "cspell-grammar": "^6.4.2", - "cspell-io": "^6.4.2", - "cspell-trie-lib": "^6.4.2", + "cspell-grammar": "^6.5.0", + "cspell-io": "^6.5.0", + "cspell-trie-lib": "^6.5.0", "fast-equals": "^4.0.1", "find-up": "^5.0.0", "fs-extra": "^10.1.0", @@ -89,9 +89,9 @@ "jest": "^28.1.3", "lorem-ipsum": "^2.0.8", "rimraf": "^3.0.2", - "rollup": "^2.77.0", + "rollup": "^2.77.1", "rollup-plugin-dts": "^4.2.2", "ts-jest": "^28.0.7" }, - "gitHead": "1f7481fd7d6a561de92ba49870da6eb1441a9d20" + "gitHead": "65c80b01e17bb0d74b57ef8b29309684a8588e27" } diff --git a/action/node_modules/cspell-trie-lib/package.json b/action/node_modules/cspell-trie-lib/package.json index e1ae374e7..f73fdb94d 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.4.2", + "version": "6.5.0", "description": "Trie Data Structure to support cspell.", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -45,7 +45,7 @@ "node": ">=14" }, "devDependencies": { - "@cspell/cspell-types": "^6.4.2", + "@cspell/cspell-types": "^6.5.0", "@cspell/dict-en_us": "^2.3.0", "@cspell/dict-es-es": "^2.2.0", "@types/fs-extra": "^9.0.13", @@ -53,5 +53,5 @@ "jest": "^28.1.3", "rimraf": "^3.0.2" }, - "gitHead": "1f7481fd7d6a561de92ba49870da6eb1441a9d20" + "gitHead": "65c80b01e17bb0d74b57ef8b29309684a8588e27" } diff --git a/action/node_modules/cspell/package.json b/action/node_modules/cspell/package.json index eb1407e76..f1f5f0cf1 100644 --- a/action/node_modules/cspell/package.json +++ b/action/node_modules/cspell/package.json @@ -1,6 +1,6 @@ { "name": "cspell", - "version": "6.4.2", + "version": "6.5.0", "description": "A Spelling Checker for Code!", "funding": "https://github.com/streetsidesoftware/cspell?sponsor=1", "main": "dist/index.js", @@ -73,9 +73,9 @@ "@cspell/cspell-pipe": "^6.4.2", "chalk": "^4.1.2", "commander": "^9.4.0", - "cspell-gitignore": "^6.4.2", + "cspell-gitignore": "^6.5.0", "cspell-glob": "^6.4.2", - "cspell-lib": "^6.4.2", + "cspell-lib": "^6.5.0", "fast-json-stable-stringify": "^2.1.0", "file-entry-cache": "^6.0.1", "fs-extra": "^10.1.0", @@ -90,8 +90,8 @@ "node": ">=14" }, "devDependencies": { - "@cspell/cspell-json-reporter": "^6.4.2", - "@cspell/cspell-types": "^6.4.2", + "@cspell/cspell-json-reporter": "^6.5.0", + "@cspell/cspell-types": "^6.5.0", "@types/file-entry-cache": "^5.0.2", "@types/fs-extra": "^9.0.13", "@types/glob": "^7.2.0", @@ -103,8 +103,8 @@ "micromatch": "^4.0.5", "minimatch": "^5.1.0", "rimraf": "^3.0.2", - "rollup": "^2.77.0", + "rollup": "^2.77.1", "rollup-plugin-dts": "^4.2.2" }, - "gitHead": "1f7481fd7d6a561de92ba49870da6eb1441a9d20" + "gitHead": "65c80b01e17bb0d74b57ef8b29309684a8588e27" } diff --git a/action/package.json b/action/package.json index a0f667602..c0e5fa69f 100644 --- a/action/package.json +++ b/action/package.json @@ -14,7 +14,7 @@ "@octokit/core": "^3.6.0", "@octokit/plugin-rest-endpoint-methods": "^5.16.2", "@octokit/rest": "^18.12.0", - "cspell": "^6.4.2", + "cspell": "^6.5.0", "cspell-glob": "^6.4.2", "vscode-uri": "^3.0.3" } diff --git a/yarn.lock b/yarn.lock index ecc0770c2..e2a182187 100644 --- a/yarn.lock +++ b/yarn.lock @@ -308,15 +308,15 @@ resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@cspell/cspell-bundled-dicts@^6.4.2": - version "6.4.2" - resolved "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-6.4.2.tgz#c44355547fc3f222cce3aa8575ee857f7b16578e" - integrity sha512-/WHvAx/xsDAzpabfIJlfEvmQRLUO9pdBDPb4coKxJnAEYsvPvj7Gl8cHCz2FOd3VkAMuYM0OvJXzJQy4lwJggQ== +"@cspell/cspell-bundled-dicts@^6.5.0": + version "6.5.0" + resolved "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-6.5.0.tgz#0475ab927dacdfd3d3335e07c5db27145ca773dd" + integrity sha512-rY1d9zNlMlhoOzN/S22zO6Z5171lAg0OX5ZtYepgyurnrrf6VL3tb31PD7pTC4N2aqCGXzk5DJql//vreg5buw== dependencies: "@cspell/dict-ada" "^2.0.1" "@cspell/dict-aws" "^2.0.0" "@cspell/dict-bash" "^2.0.4" - "@cspell/dict-companies" "^2.0.7" + "@cspell/dict-companies" "^2.0.9" "@cspell/dict-cpp" "^3.2.1" "@cspell/dict-cryptocurrencies" "^2.0.0" "@cspell/dict-csharp" "^3.0.1" @@ -350,8 +350,8 @@ "@cspell/dict-ruby" "^2.0.2" "@cspell/dict-rust" "^2.0.1" "@cspell/dict-scala" "^2.0.0" - "@cspell/dict-software-terms" "^2.2.0" - "@cspell/dict-sql" "^1.0.3" + "@cspell/dict-software-terms" "^2.2.1" + "@cspell/dict-sql" "^1.0.4" "@cspell/dict-swift" "^1.0.3" "@cspell/dict-typescript" "^2.0.1" "@cspell/dict-vue" "^2.0.2" @@ -361,10 +361,15 @@ resolved "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-6.4.2.tgz#9ecc52a139e57f2649e2198f8e13e8e9a10d43c6" integrity sha512-GlKhGXpWcD01fda+PouAOat8ey+HOOiqb5oFyFOcZBV6Dv2nXl4fKt+RgLvX1XrlJ0GL+BRKWUokwJ/xt38eIQ== -"@cspell/cspell-types@^6.4.2": - version "6.4.2" - resolved "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-6.4.2.tgz#a8c6820dfd53b6a0a9c3bff4cd6be1eb74234c8c" - integrity sha512-JBA/4ZctAU+DoEWAb0X8LN3RPkimW/wRsrYEot7njRlJ9RjkgwnFEeOYAhAjV9sbji6Sz6xmADl3VdA2YktqxQ== +"@cspell/cspell-service-bus@^6.5.0": + version "6.5.0" + resolved "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-6.5.0.tgz#af7facae0b22fa1232812174ddbfb259df47e377" + integrity sha512-ZcQ3IZ/GHusKtHYn1BYKMauF/GhDby2uBsPfjCMwhvtSHaJy34tWS8i0xh8+awX2nKYGcyEm3Nsh5dazof3EzA== + +"@cspell/cspell-types@^6.5.0": + version "6.5.0" + resolved "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-6.5.0.tgz#5836b4f1b0508dbea4caec23d9473f1b4f58c4e9" + integrity sha512-vm+HlY+prf9G4s926QS3rZlajtBBnV+lDsjf4v7+7vYmRzic8KATGsUR2zrfTP0H9rH9eeQqd2rPoHhn2iiAlQ== "@cspell/dict-ada@^2.0.1": version "2.0.1" @@ -381,7 +386,7 @@ resolved "https://registry.npmjs.org/@cspell/dict-bash/-/dict-bash-2.0.4.tgz#93f0ff159d96b8823fed9282f803e4f3447af33d" integrity sha512-uK/ehmp5LYrmRH2Gv3nbvdPswpkybJUn34WYKLpeuYHQktmi+pOI1A9uPdBPnSbMDffSvwQlQohIyKawz+X8Ag== -"@cspell/dict-companies@^2.0.7": +"@cspell/dict-companies@^2.0.9": version "2.0.9" resolved "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-2.0.9.tgz#bec117997a8a7a82a18f87b3a63ca4e1c7ae2bd5" integrity sha512-4YHVjHnTsYv+el/H35AXzS8+YDAX4BNiIC9ZqK9c927e8HhxX8p9RtkerT2sFFJH2xDzqMArWC4LP5wkbl3ROw== @@ -551,15 +556,15 @@ resolved "https://registry.npmjs.org/@cspell/dict-scala/-/dict-scala-2.0.0.tgz#b8098103bb03a13406c1c79f1769052353aafac4" integrity sha512-MUwA2YKpqaQOSR4V1/CVGRNk8Ii5kf6I8Ch+4/BhRZRQXuwWbi21rDRYWPqdQWps7VNzAbbMA+PQDWsD5YY38g== -"@cspell/dict-software-terms@^2.2.0": +"@cspell/dict-software-terms@^2.2.1": version "2.2.1" resolved "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-2.2.1.tgz#7bcee23f50b9d1df3d69396c436e3af29619ccce" integrity sha512-r5nmNOxfBc4kmQ2fxUpAbkFKJFfI/gfN0bi7P3TbQ7S+yDzkhMJ+thdWr9YDkVVv8YUoxaSH/K6NsVcnVQg/uA== -"@cspell/dict-sql@^1.0.3": - version "1.0.3" - resolved "https://registry.npmjs.org/@cspell/dict-sql/-/dict-sql-1.0.3.tgz#51b12037ded96bb39a2a9b9c55a1ba76bf1714f8" - integrity sha512-Q7e5EebwjkUlAC5hU1uBeoE7/7YWArnuiQgWkwmSiXq4/qmiULGXJJOn/dY+54dSIlOIMVxtbTjfiG9q3u1Z+A== +"@cspell/dict-sql@^1.0.4": + version "1.0.4" + resolved "https://registry.npmjs.org/@cspell/dict-sql/-/dict-sql-1.0.4.tgz#109fb8b65ab125af1b4d66654626592fd1f23330" + integrity sha512-+9nMcwsCzdYH0tyv2LeuVvQ+DdecS2C1N+hw6sl0FTHWI5GwULHAGW840RBwcKw0s+dl7sc0WpZhS1EW7b0pXg== "@cspell/dict-swift@^1.0.3": version "1.0.3" @@ -1995,10 +2000,10 @@ 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-gitignore@^6.4.2: - version "6.4.2" - resolved "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-6.4.2.tgz#43e77727bee9dcfda5ef8e71eca7539d4469fb18" - integrity sha512-lpeQYcf5VJVJ5WkztwmnQgJXg9DgTHUIpbs+jj5zA+RB95wiSjDWvOw9QxObvEjmahShGGyrg5Ay1A5Unp8b3Q== +cspell-gitignore@^6.5.0: + version "6.5.0" + resolved "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-6.5.0.tgz#ff19f2b588ba994e0a3d1c79c53985dc4afb402d" + integrity sha512-mk8yQjUAVHcaEc5wgdoZlI8gD4ApcAqpf+uoV9MsNgCuvoaWi6HLBxkoWCUbPmUBvvhaSBJRPlUIX+LvvN/0BA== dependencies: cspell-glob "^6.4.2" find-up "^5.0.0" @@ -2010,38 +2015,39 @@ cspell-glob@^6.4.2: dependencies: micromatch "^4.0.5" -cspell-grammar@^6.4.2: - version "6.4.2" - resolved "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-6.4.2.tgz#38b5ef08ecd0911de61f63a4d39da22f558db9c9" - integrity sha512-Cg9DHGd6IIIibpeF6KY5u/zZHpw455+RsZnJyLFkx43Uqdfgjxkl9k5N0A+Ac3fPAXc3Y8limtBtQosZ9W4HMw== +cspell-grammar@^6.5.0: + version "6.5.0" + resolved "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-6.5.0.tgz#42b08c1e2790a3cd1aa2a48bc3484361c9db1bc1" + integrity sha512-wq6xtSL+C4JY+pMavUBDZhpKIWLW8pPgoR520r87qei14dgEbfpZuujqqWoHUV565sc0Zh7alOVYoQk+QKqvrQ== dependencies: "@cspell/cspell-pipe" "^6.4.2" - "@cspell/cspell-types" "^6.4.2" + "@cspell/cspell-types" "^6.5.0" -cspell-io@^6.4.2: - version "6.4.2" - resolved "https://registry.npmjs.org/cspell-io/-/cspell-io-6.4.2.tgz#4044e38a9526eb5cd419869fe6ab343048a3719a" - integrity sha512-Hm/d1xG/Br7m11WpRROcMuL+ywJSogwuJxHlNoyO4+e/QTO4C/4BQ9p/c0xZO/lKGJerOUImfuy8t0XVl7xB7Q== +cspell-io@^6.5.0: + version "6.5.0" + resolved "https://registry.npmjs.org/cspell-io/-/cspell-io-6.5.0.tgz#bbd88ada6fd0ab16563fb001aba62c8f94de1140" + integrity sha512-Vm/Ra3bIDGL6P4CUeTwlQtpyep/rEli8W//tMxo+8Or5ya9hZBFZOa0//QlZSyUU7UjzrG83lPaZrs4XVsVZFw== dependencies: + "@cspell/cspell-service-bus" "^6.5.0" "@types/node-fetch" "^2.6.2" node-fetch "^2.6.7" -cspell-lib@^6.4.2: - version "6.4.2" - resolved "https://registry.npmjs.org/cspell-lib/-/cspell-lib-6.4.2.tgz#a450e11c5390c0654d2fe337b0ff678f0875d520" - integrity sha512-Lbf0hmUifNPtjFfD+HJ3uGtMwGMc3xAKYQgmmT2QGQt9xhVeJ6upmvgcPmVjxcgoB/tl0+KQ2FJ1/FSwY7APfg== +cspell-lib@^6.5.0: + version "6.5.0" + resolved "https://registry.npmjs.org/cspell-lib/-/cspell-lib-6.5.0.tgz#3f1ad73280137603ea0a14fd9ab9a2806b25ecf5" + integrity sha512-sSjTy+N9w5Hhn9czg26WuPLEKeVcv7NIHDTVQEK4JHBqB6y+I6NhrJZ3Zr3WA7ME2/1U6FyZzumNLru6PDPk6w== dependencies: - "@cspell/cspell-bundled-dicts" "^6.4.2" + "@cspell/cspell-bundled-dicts" "^6.5.0" "@cspell/cspell-pipe" "^6.4.2" - "@cspell/cspell-types" "^6.4.2" + "@cspell/cspell-types" "^6.5.0" clear-module "^4.1.2" comment-json "^4.2.2" configstore "^5.0.1" cosmiconfig "^7.0.1" cspell-glob "^6.4.2" - cspell-grammar "^6.4.2" - cspell-io "^6.4.2" - cspell-trie-lib "^6.4.2" + cspell-grammar "^6.5.0" + cspell-io "^6.5.0" + cspell-trie-lib "^6.5.0" fast-equals "^4.0.1" find-up "^5.0.0" fs-extra "^10.1.0" @@ -2052,26 +2058,26 @@ cspell-lib@^6.4.2: vscode-languageserver-textdocument "^1.0.5" vscode-uri "^3.0.3" -cspell-trie-lib@^6.4.2: - version "6.4.2" - resolved "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-6.4.2.tgz#a25f4e3c7901b825a79c8fbd4b3b42ad6f2b6038" - integrity sha512-6LpWNzVDO5M1OfJwjj0y1M2oUU+QKMOGPZre9VxcIBKM+F20Ndb6HfUflmsKZnN5RJx425r4JGvs7duhjRwZxQ== +cspell-trie-lib@^6.5.0: + version "6.5.0" + resolved "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-6.5.0.tgz#3924ca3ccb4181daa8065cb168a5d199deeaa7d6" + integrity sha512-bXc/YpbHA/xbtRJV7ocNyo3RFSAOLaz3iR+8KyWFNrIQqGOuaCslHkpRfkdZPOBYiOE8z3tjVoVQkrUYUuYWcQ== dependencies: "@cspell/cspell-pipe" "^6.4.2" fs-extra "^10.1.0" gensequence "^3.1.1" -cspell@^6.4.2: - version "6.4.2" - resolved "https://registry.npmjs.org/cspell/-/cspell-6.4.2.tgz#f9ae9276332d7d19351a401637e8396c302b7771" - integrity sha512-SEWd9CSZB9sMQVDN5g3aJczIULt/LFDNuAgEfl/tdceQwBNW95cVPBRe9heNF+cdIcDao1jnlEbNXPo8FNmYvA== +cspell@^6.5.0: + version "6.5.0" + resolved "https://registry.npmjs.org/cspell/-/cspell-6.5.0.tgz#077152c290598c6a22a5932467f3d9991935ec10" + integrity sha512-xdEs8e4X2bPgrZBfM5L/0f7TRY7/3SnYwMlPOVvbswb+gJ+hUkZkxRmv8F+IMKW0tKWdoHZH6bCiYrmV0Y8Hdg== dependencies: "@cspell/cspell-pipe" "^6.4.2" chalk "^4.1.2" commander "^9.4.0" - cspell-gitignore "^6.4.2" + cspell-gitignore "^6.5.0" cspell-glob "^6.4.2" - cspell-lib "^6.4.2" + cspell-lib "^6.5.0" fast-json-stable-stringify "^2.1.0" file-entry-cache "^6.0.1" fs-extra "^10.1.0"