From f97db374203d70f2c223765636a87216f848b1e8 Mon Sep 17 00:00:00 2001 From: Kuruyia <8174691+Kuruyia@users.noreply.github.com> Date: Thu, 20 Apr 2023 10:15:07 +0200 Subject: [PATCH] Improve distribution of this package (#6) * chore: remove transpiled files * chore: update deps, configure typescript * chore: add eslint plugin and run linter * ci: add ci * ci: remove unneeded secrets --- .eslintignore | 16 + .eslintrc.json | 8 + .github/workflows/pull_request.workflow.yaml | 11 + .github/workflows/push_master.workflow.yaml | 55 + .github/workflows/tests_lint.yaml | 23 + .gitignore | 10 +- index.d.ts | 4 - index.js | 17 - index.js.map | 1 - lib/config/ConfigManager.d.ts | 91 - lib/config/ConfigManager.js | 143 - lib/config/ConfigManager.js.map | 1 - lib/config/ConfigManager.ts | 102 +- lib/config/index.d.ts | 1 - lib/config/index.js | 14 - lib/config/index.js.map | 1 - lib/config/index.ts | 2 +- lib/crud/CRUDController.d.ts | 35 - lib/crud/CRUDController.js | 70 - lib/crud/CRUDController.js.map | 1 - lib/crud/CRUDController.ts | 47 +- lib/crud/index.d.ts | 1 - lib/crud/index.js | 14 - lib/crud/index.js.map | 1 - lib/crud/index.ts | 2 +- lib/engine/AbstractEngine.d.ts | 48 - lib/engine/AbstractEngine.js | 100 - lib/engine/AbstractEngine.js.map | 1 - lib/engine/AbstractEngine.ts | 132 +- lib/engine/EngineContent.d.ts | 17 - lib/engine/EngineContent.js | 3 - lib/engine/EngineContent.js.map | 1 - lib/engine/EngineContent.ts | 2 +- lib/engine/EngineController.d.ts | 34 - lib/engine/EngineController.js | 75 - lib/engine/EngineController.js.map | 1 - lib/engine/EngineController.ts | 57 +- lib/engine/index.d.ts | 2 - lib/engine/index.js | 15 - lib/engine/index.js.map | 1 - lib/engine/index.ts | 4 +- lib/synchronizer/CollectionSynchronizer.d.ts | 31 - lib/synchronizer/CollectionSynchronizer.js | 113 - .../CollectionSynchronizer.js.map | 1 - lib/synchronizer/CollectionSynchronizer.ts | 130 +- lib/synchronizer/index.d.ts | 1 - lib/synchronizer/index.js | 14 - lib/synchronizer/index.js.map | 1 - lib/synchronizer/index.ts | 2 +- package-lock.json | 2601 +++++++++++++++-- package.json | 30 +- tsconfig.json | 3 +- 52 files changed, 2803 insertions(+), 1288 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.json create mode 100644 .github/workflows/pull_request.workflow.yaml create mode 100644 .github/workflows/push_master.workflow.yaml create mode 100644 .github/workflows/tests_lint.yaml delete mode 100644 index.d.ts delete mode 100644 index.js delete mode 100644 index.js.map delete mode 100644 lib/config/ConfigManager.d.ts delete mode 100644 lib/config/ConfigManager.js delete mode 100644 lib/config/ConfigManager.js.map delete mode 100644 lib/config/index.d.ts delete mode 100644 lib/config/index.js delete mode 100644 lib/config/index.js.map delete mode 100644 lib/crud/CRUDController.d.ts delete mode 100644 lib/crud/CRUDController.js delete mode 100644 lib/crud/CRUDController.js.map delete mode 100644 lib/crud/index.d.ts delete mode 100644 lib/crud/index.js delete mode 100644 lib/crud/index.js.map delete mode 100644 lib/engine/AbstractEngine.d.ts delete mode 100644 lib/engine/AbstractEngine.js delete mode 100644 lib/engine/AbstractEngine.js.map delete mode 100644 lib/engine/EngineContent.d.ts delete mode 100644 lib/engine/EngineContent.js delete mode 100644 lib/engine/EngineContent.js.map delete mode 100644 lib/engine/EngineController.d.ts delete mode 100644 lib/engine/EngineController.js delete mode 100644 lib/engine/EngineController.js.map delete mode 100644 lib/engine/index.d.ts delete mode 100644 lib/engine/index.js delete mode 100644 lib/engine/index.js.map delete mode 100644 lib/synchronizer/CollectionSynchronizer.d.ts delete mode 100644 lib/synchronizer/CollectionSynchronizer.js delete mode 100644 lib/synchronizer/CollectionSynchronizer.js.map delete mode 100644 lib/synchronizer/index.d.ts delete mode 100644 lib/synchronizer/index.js delete mode 100644 lib/synchronizer/index.js.map diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..d9cd204 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,16 @@ +# JS generated files from TS +app.js +app.d.ts +app.js.map +lib/**/*.d.ts +lib/**/*.js.map +lib/**/*.js +tests/**/*.d.ts +tests/**/*.js.map +tests/**/*.js +index.d.ts +index.js +index.js.map + +# Anything in the dist directory +dist/ diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..3cdcf99 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,8 @@ +{ + "plugins": ["kuzzle"], + "extends": [ + "plugin:kuzzle/default", + "plugin:kuzzle/node", + "plugin:kuzzle/typescript" + ] +} diff --git a/.github/workflows/pull_request.workflow.yaml b/.github/workflows/pull_request.workflow.yaml new file mode 100644 index 0000000..645971b --- /dev/null +++ b/.github/workflows/pull_request.workflow.yaml @@ -0,0 +1,11 @@ +name: Pull request + +on: + pull_request: + +jobs: + tests_lint: + name: Lint + uses: ./.github/workflows/tests_lint.yaml + secrets: inherit + diff --git a/.github/workflows/push_master.workflow.yaml b/.github/workflows/push_master.workflow.yaml new file mode 100644 index 0000000..fac846a --- /dev/null +++ b/.github/workflows/push_master.workflow.yaml @@ -0,0 +1,55 @@ +name: Push to master + +on: + push: + branches: + - master + +jobs: + tests_lint: + name: Lint + uses: ./.github/workflows/tests_lint.yaml + secrets: inherit + + npm-deploy: + name: Publish Package to NPM.js + runs-on: ubuntu-22.04 + needs: [functional-tests] + steps: + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_KEY }} + name: id_rsa + known_hosts: unnecessary + + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + path: | + ~/.cache/pip + ~/.npm + **/node_modules + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install nodejs version 16 + uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: Publish to NPM + run: | + npm install + npm run build + npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/tests_lint.yaml b/.github/workflows/tests_lint.yaml new file mode 100644 index 0000000..91a0fdc --- /dev/null +++ b/.github/workflows/tests_lint.yaml @@ -0,0 +1,23 @@ +name: Run linter tests + +on: + workflow_call: + +jobs: + lint: + name: Lint + runs-on: ubuntu-20.04 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install nodejs version 16 + uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: Lint project + run: | + npm install -g npm + npm install + npm run test:lint diff --git a/.gitignore b/.gitignore index 4e00e4c..9b13b5e 100644 --- a/.gitignore +++ b/.gitignore @@ -7,11 +7,5 @@ node_modules/ *# *~ -# Typescript related files -# index.js -# index.d.ts -# index.js.map - -# lib/**/*.d.ts -# lib/**/*.js.map -# lib/**/*.js \ No newline at end of file +# TypeScript output +dist/ diff --git a/index.d.ts b/index.d.ts deleted file mode 100644 index d7165b6..0000000 --- a/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './lib/engine'; -export * from './lib/synchronizer'; -export * from './lib/config'; -export * from './lib/crud'; diff --git a/index.js b/index.js deleted file mode 100644 index 9c59f64..0000000 --- a/index.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 }); -__exportStar(require("./lib/engine"), exports); -__exportStar(require("./lib/synchronizer"), exports); -__exportStar(require("./lib/config"), exports); -__exportStar(require("./lib/crud"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/index.js.map b/index.js.map deleted file mode 100644 index da3a4af..0000000 --- a/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA6B;AAE7B,qDAAmC;AAEnC,+CAA6B;AAE7B,6CAA2B"} \ No newline at end of file diff --git a/lib/config/ConfigManager.d.ts b/lib/config/ConfigManager.d.ts deleted file mode 100644 index 33129c1..0000000 --- a/lib/config/ConfigManager.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { JSONObject, Plugin, Backend } from 'kuzzle'; -export declare type ConfigManagerOptions = { - /** - * Name of the config collection - * - * @default "config" - */ - collection?: string; - /** - * Function that take the config document content as a parameter and return - * a kebab-case string to uniquely identify it. - * - * By default it will use the "name" property of config content. - */ - idGenerator?: (content: JSONObject) => string; - /** - * Additional mappings that will be merged - * - * @default - * { - * dynamic: 'strict', - * properties: { - * type: { type: 'keyword' }, - * group: { type: 'keyword' }, - * } - * } - */ - mappings?: JSONObject; - /** - * Config collection settings - * - * @default - * {} - */ - settings?: JSONObject; -}; -/** - * Manage config documents type. - * - * This class can register config document types with associated mappings and - * create the associated collection to store config documents. - */ -export declare class ConfigManager { - /** - * Name of the config collection - * - * @default "config" - */ - readonly collection: string; - /** - * Base mappings for the config collection - */ - baseMappings: JSONObject; - /** - * Base settings for the config collection - */ - baseSettings: JSONObject; - private idGenerator; - private appOrPlugin; - private configurations; - private get sdk(); - private get app(); - private get plugin(); - private get isApp(); - constructor(appOrPlugin: Backend | Plugin, options?: ConfigManagerOptions); - /** - * Register a new config document type - * - * @example - * - * configManager.register('engine', { - * properties: { - * index: { type: 'keyword' }, - * group: { type: 'keyword' }, - * } - * }); - */ - register(type: string, mappings: JSONObject): void; - /** - * Creates the config collection and apply mappings on the specified index. - */ - createCollection(index: string, mappingsOverride?: JSONObject, settingsOverride?: JSONObject): Promise; - get mappings(): any; - /** - * Pipe to generate specific IDs for config documents - * - * Config document must have a "name" property - */ - private generateID; - private registerPipe; -} diff --git a/lib/config/ConfigManager.js b/lib/config/ConfigManager.js deleted file mode 100644 index 36b0132..0000000 --- a/lib/config/ConfigManager.js +++ /dev/null @@ -1,143 +0,0 @@ -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ConfigManager = void 0; -const lodash_1 = __importDefault(require("lodash")); -const kuzzle_1 = require("kuzzle"); -/** - * Manage config documents type. - * - * This class can register config document types with associated mappings and - * create the associated collection to store config documents. - */ -class ConfigManager { - constructor(appOrPlugin, options = {}) { - /** - * Name of the config collection - * - * @default "config" - */ - this.collection = 'config'; - /** - * Base mappings for the config collection - */ - this.baseMappings = { - dynamic: 'strict', - properties: { - type: { type: 'keyword' }, - group: { type: 'keyword' }, - } - }; - /** - * Base settings for the config collection - */ - this.baseSettings = {}; - this.idGenerator = content => kuzzle_1.Inflector.kebabCase(content.name); - this.configurations = new Map(); - this.appOrPlugin = appOrPlugin; - this.collection = options.collection || this.collection; - this.idGenerator = options.idGenerator || this.idGenerator; - this.baseMappings = options.mappings ? lodash_1.default.merge({}, this.baseMappings, options.mappings) : this.baseMappings; - this.baseSettings = options.settings || this.baseSettings; - this.registerPipe(); - } - get sdk() { - if (this.isApp) { - return this.app.sdk; - } - return this.plugin.context.accessors.sdk; - } - get app() { - if (!this.isApp) { - throw new kuzzle_1.PluginImplementationError('ConfigManager was intantiated from a plugin'); - } - return this.appOrPlugin; - } - get plugin() { - if (this.isApp) { - throw new kuzzle_1.PluginImplementationError('ConfigManager was intantiated from an application'); - } - return this.appOrPlugin; - } - get isApp() { - return this.appOrPlugin instanceof kuzzle_1.Backend; - } - /** - * Register a new config document type - * - * @example - * - * configManager.register('engine', { - * properties: { - * index: { type: 'keyword' }, - * group: { type: 'keyword' }, - * } - * }); - */ - register(type, mappings) { - if (this.configurations.has(type)) { - throw new kuzzle_1.PluginImplementationError(`Config for "${type}" already registered.`); - } - this.configurations.set(type, mappings); - } - /** - * Creates the config collection and apply mappings on the specified index. - */ - async createCollection(index, mappingsOverride = {}, settingsOverride = {}) { - const fullMappings = lodash_1.default.merge({}, this.baseMappings, mappingsOverride); - const fullSettings = lodash_1.default.merge({}, this.baseSettings, settingsOverride); - for (const [type, mappings] of this.configurations.entries()) { - fullMappings.properties[type] = mappings; - } - await this.sdk.collection.create(index, this.collection, { - mappings: fullMappings, - settings: fullSettings, - }); - } - get mappings() { - const fullMappings = lodash_1.default.merge({}, this.baseMappings); - for (const [type, mappings] of this.configurations.entries()) { - fullMappings.properties[type] = mappings; - } - return fullMappings; - } - // @todo search with custom search result - /** - * Pipe to generate specific IDs for config documents - * - * Config document must have a "name" property - */ - async generateID(documents, request) { - if (request.getCollection() !== this.collection) { - return documents; - } - for (const document of documents) { - try { - if (!this.configurations.has(document._source.type) || document._id) { - continue; - } - const name = this.idGenerator(document._source[document._source.type]); - document._id = `${document._source.type}--${name}`; - } - catch (error) { - throw new kuzzle_1.PluginImplementationError(`Error when generating ID for config document of type "${document._source.type}": ${error}`); - } - } - return documents; - } - registerPipe() { - if (this.isApp) { - this.app.pipe.register('generic:document:beforeWrite', this.generateID.bind(this)); - return; - } - const beforeWritePipes = this.plugin.pipes['generic:document:beforeWrite']; - if (!lodash_1.default.isArray(this.plugin.pipes['generic:document:beforeWrite'])) { - throw new kuzzle_1.PluginImplementationError('Handler on "generic:document:beforeWrite" must be an array'); - } - beforeWritePipes.push(this.generateID.bind(this)); - } -} -exports.ConfigManager = ConfigManager; -//# sourceMappingURL=ConfigManager.js.map \ No newline at end of file diff --git a/lib/config/ConfigManager.js.map b/lib/config/ConfigManager.js.map deleted file mode 100644 index e14e030..0000000 --- a/lib/config/ConfigManager.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ConfigManager.js","sourceRoot":"","sources":["ConfigManager.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/lib/config/ConfigManager.ts b/lib/config/ConfigManager.ts index bc8ae3f..e724f17 100644 --- a/lib/config/ConfigManager.ts +++ b/lib/config/ConfigManager.ts @@ -1,5 +1,14 @@ -import _ from 'lodash'; -import { Document, EventHandler, Inflector, JSONObject, KuzzleRequest, PluginContext, PluginImplementationError, Plugin, Backend } from 'kuzzle'; +import _ from "lodash"; +import { + Document, + EventHandler, + Inflector, + JSONObject, + KuzzleRequest, + PluginImplementationError, + Plugin, + Backend, +} from "kuzzle"; export type ConfigManagerOptions = { /** @@ -7,7 +16,7 @@ export type ConfigManagerOptions = { * * @default "config" */ - collection?: string, + collection?: string; /** * Function that take the config document content as a parameter and return @@ -15,7 +24,7 @@ export type ConfigManagerOptions = { * * By default it will use the "name" property of config content. */ - idGenerator?: (content: JSONObject) => string, + idGenerator?: (content: JSONObject) => string; /** * Additional mappings that will be merged @@ -52,18 +61,17 @@ export class ConfigManager { * * @default "config" */ - public readonly collection: string = 'config'; + public readonly collection: string = "config"; /** * Base mappings for the config collection */ public baseMappings: JSONObject = { - dynamic: 'strict', + dynamic: "strict", properties: { - type: { type: 'keyword' }, - - group: { type: 'keyword' }, - } + group: { type: "keyword" }, + type: { type: "keyword" }, + }, }; /** @@ -71,44 +79,54 @@ export class ConfigManager { */ public baseSettings: JSONObject = {}; - private idGenerator: (content: JSONObject) => string = content => Inflector.kebabCase(content.name); + private idGenerator: (content: JSONObject) => string = (content) => + Inflector.kebabCase(content.name); private appOrPlugin: Backend | Plugin; private configurations = new Map(); - private get sdk () { + private get sdk() { if (this.isApp) { - return this.app.sdk + return this.app.sdk; } return this.plugin.context.accessors.sdk; } - private get app () { - if (! this.isApp) { - throw new PluginImplementationError('ConfigManager was intantiated from a plugin'); + private get app() { + if (!this.isApp) { + throw new PluginImplementationError( + "ConfigManager was intantiated from a plugin" + ); } return this.appOrPlugin as Backend; } - private get plugin () { + private get plugin() { if (this.isApp) { - throw new PluginImplementationError('ConfigManager was intantiated from an application'); + throw new PluginImplementationError( + "ConfigManager was intantiated from an application" + ); } return this.appOrPlugin as Plugin; } - private get isApp () { + private get isApp() { return this.appOrPlugin instanceof Backend; } - constructor (appOrPlugin: Backend | Plugin, options: ConfigManagerOptions = {}) { + constructor( + appOrPlugin: Backend | Plugin, + options: ConfigManagerOptions = {} + ) { this.appOrPlugin = appOrPlugin; this.collection = options.collection || this.collection; this.idGenerator = options.idGenerator || this.idGenerator; - this.baseMappings = options.mappings ? _.merge({}, this.baseMappings, options.mappings) : this.baseMappings; + this.baseMappings = options.mappings + ? _.merge({}, this.baseMappings, options.mappings) + : this.baseMappings; this.baseSettings = options.settings || this.baseSettings; this.registerPipe(); @@ -126,9 +144,11 @@ export class ConfigManager { * } * }); */ - register (type: string, mappings: JSONObject) { + register(type: string, mappings: JSONObject) { if (this.configurations.has(type)) { - throw new PluginImplementationError(`Config for "${type}" already registered.`); + throw new PluginImplementationError( + `Config for "${type}" already registered.` + ); } this.configurations.set(type, mappings); @@ -137,7 +157,11 @@ export class ConfigManager { /** * Creates the config collection and apply mappings on the specified index. */ - async createCollection (index: string, mappingsOverride: JSONObject = {}, settingsOverride: JSONObject = {}) { + async createCollection( + index: string, + mappingsOverride: JSONObject = {}, + settingsOverride: JSONObject = {} + ) { const fullMappings = _.merge({}, this.baseMappings, mappingsOverride); const fullSettings = _.merge({}, this.baseSettings, settingsOverride); @@ -151,7 +175,7 @@ export class ConfigManager { }); } - get mappings () { + get mappings() { const fullMappings = _.merge({}, this.baseMappings); for (const [type, mappings] of this.configurations.entries()) { @@ -168,39 +192,47 @@ export class ConfigManager { * * Config document must have a "name" property */ - private async generateID (documents: Document[], request: KuzzleRequest) { + private async generateID(documents: Document[], request: KuzzleRequest) { if (request.getCollection() !== this.collection) { return documents; } for (const document of documents) { try { - if (! this.configurations.has(document._source.type) || document._id) { + if (!this.configurations.has(document._source.type) || document._id) { continue; } const name = this.idGenerator(document._source[document._source.type]); document._id = `${document._source.type}--${name}`; - } - catch (error) { - throw new PluginImplementationError(`Error when generating ID for config document of type "${document._source.type}": ${error}`); + } catch (error) { + throw new PluginImplementationError( + `Error when generating ID for config document of type "${document._source.type}": ${error}` + ); } } return documents; } - private registerPipe () { + private registerPipe() { if (this.isApp) { - this.app.pipe.register('generic:document:beforeWrite', this.generateID.bind(this)); + this.app.pipe.register( + "generic:document:beforeWrite", + this.generateID.bind(this) + ); return; } - const beforeWritePipes = this.plugin.pipes['generic:document:beforeWrite'] as EventHandler[]; + const beforeWritePipes = this.plugin.pipes[ + "generic:document:beforeWrite" + ] as EventHandler[]; - if (! _.isArray(this.plugin.pipes['generic:document:beforeWrite'])) { - throw new PluginImplementationError('Handler on "generic:document:beforeWrite" must be an array'); + if (!_.isArray(this.plugin.pipes["generic:document:beforeWrite"])) { + throw new PluginImplementationError( + 'Handler on "generic:document:beforeWrite" must be an array' + ); } beforeWritePipes.push(this.generateID.bind(this)); diff --git a/lib/config/index.d.ts b/lib/config/index.d.ts deleted file mode 100644 index cd869b7..0000000 --- a/lib/config/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './ConfigManager'; diff --git a/lib/config/index.js b/lib/config/index.js deleted file mode 100644 index 020708a..0000000 --- a/lib/config/index.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 }); -__exportStar(require("./ConfigManager"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/config/index.js.map b/lib/config/index.js.map deleted file mode 100644 index eb334be..0000000 --- a/lib/config/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAAgC"} \ No newline at end of file diff --git a/lib/config/index.ts b/lib/config/index.ts index cd869b7..ad315f5 100644 --- a/lib/config/index.ts +++ b/lib/config/index.ts @@ -1 +1 @@ -export * from './ConfigManager'; +export * from "./ConfigManager"; diff --git a/lib/crud/CRUDController.d.ts b/lib/crud/CRUDController.d.ts deleted file mode 100644 index d5ba266..0000000 --- a/lib/crud/CRUDController.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { KuzzleRequest, PluginContext, JSONObject, ControllerDefinition, Plugin, EmbeddedSDK } from 'kuzzle'; -export declare class CRUDController { - protected context: PluginContext; - protected config: JSONObject; - protected collection: string; - definition: ControllerDefinition; - constructor(plugin: Plugin, collection: string); - protected get as(): (user: { - _id: string; - }) => EmbeddedSDK; - /** - * Create an asset or a device depending on the collection. - * - * @param request - */ - create(request: KuzzleRequest): Promise; - /** - * Delete an asset or a device depending on the collection. - * - * @param request - */ - delete(request: KuzzleRequest): Promise; - /** - * search assets or devices depending on the collection. - * - * @param request - */ - search(request: KuzzleRequest): Promise; - /** - * Create an asset or a device depending on the collection. - * - * @param request - */ - update(request: KuzzleRequest): Promise; -} diff --git a/lib/crud/CRUDController.js b/lib/crud/CRUDController.js deleted file mode 100644 index 1b59ea5..0000000 --- a/lib/crud/CRUDController.js +++ /dev/null @@ -1,70 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CRUDController = void 0; -class CRUDController { - constructor(plugin, collection) { - this.config = plugin.config; - this.context = plugin.context; - this.collection = collection; - } - get as() { - return user => { - if (user === null) { - return this.context.accessors.sdk; - } - return this.context.accessors.sdk.as(user, { checkRights: true }); - }; - } - /** - * Create an asset or a device depending on the collection. - * - * @param request - */ - async create(request) { - const index = request.getIndex(); - const asset = request.getBody(); - const id = request.input.resource._id; - return this.as(request.context.user).document.create(index, this.collection, asset, id, { ...request.input.args }); - } - /** - * Delete an asset or a device depending on the collection. - * - * @param request - */ - async delete(request) { - const index = request.getIndex(); - const id = request.getId(); - return this.as(request.context.user).document.delete(index, this.collection, id, { ...request.input.args }); - } - /** - * search assets or devices depending on the collection. - * - * @param request - */ - async search(request) { - const index = request.getIndex(); - const { searchBody } = request.getSearchParams(); - const res = await this.as(request.context.user).query({ - controller: 'document', - action: 'search', - index, - collection: this.collection, - body: searchBody, - ...request.input.args - }); - return res.result; - } - /** - * Create an asset or a device depending on the collection. - * - * @param request - */ - async update(request) { - const index = request.getIndex(); - const body = request.getBody(); - const id = request.getId(); - return this.as(request.context.user).document.update(index, this.collection, id, body, { ...request.input.args }); - } -} -exports.CRUDController = CRUDController; -//# sourceMappingURL=CRUDController.js.map \ No newline at end of file diff --git a/lib/crud/CRUDController.js.map b/lib/crud/CRUDController.js.map deleted file mode 100644 index 8ed6329..0000000 --- a/lib/crud/CRUDController.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CRUDController.js","sourceRoot":"","sources":["CRUDController.ts"],"names":[],"mappings":";;;AASA,MAAa,cAAc;IAOzB,YAAa,MAAc,EAAE,UAAkB;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC3B,CAAC;IAEL,IAAc,EAAE;QACd,OAAO,IAAI,CAAC,EAAE;YACZ,IAAI,IAAI,KAAK,IAAI,EAAE;gBACjB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC;aACnC;YAED,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;QACpE,CAAC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAE,OAAsB;QAClC,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;QAChC,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;QAEtC,OAAO,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAClD,KAAK,EACL,IAAI,CAAC,UAAU,EACf,KAAK,EACL,EAAE,EACF,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAE,OAAsB;QAClC,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QACjC,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;QAE3B,OAAO,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAClD,KAAK,EACL,IAAI,CAAC,UAAU,EACf,EAAE,EACF,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAE,OAAsB;QAClC,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QACjC,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;QAEjD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CACnD;YACE,UAAU,EAAE,UAAU;YACtB,MAAM,EAAE,QAAQ;YAChB,KAAK;YACL,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,IAAI,EAAE,UAAU;YAChB,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI;SACtB,CACF,CAAC;QAEF,OAAO,GAAG,CAAC,MAAM,CAAA;IACnB,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAE,OAAsB;QAClC,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QACjC,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;QAC/B,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;QAE3B,OAAO,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAClD,KAAK,EACL,IAAI,CAAC,UAAU,EACf,EAAE,EACF,IAAI,EACJ,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IAC/B,CAAC;CACF;AAjGD,wCAiGC"} \ No newline at end of file diff --git a/lib/crud/CRUDController.ts b/lib/crud/CRUDController.ts index 1f86f9a..9f66013 100644 --- a/lib/crud/CRUDController.ts +++ b/lib/crud/CRUDController.ts @@ -5,7 +5,7 @@ import { ControllerDefinition, Plugin, EmbeddedSDK, -} from 'kuzzle'; +} from "kuzzle"; export class CRUDController { protected context: PluginContext; @@ -14,14 +14,14 @@ export class CRUDController { public definition: ControllerDefinition; - constructor (plugin: Plugin, collection: string) { + constructor(plugin: Plugin, collection: string) { this.config = plugin.config; this.context = plugin.context; this.collection = collection; - } + } - protected get as (): (user: { _id: string }) => EmbeddedSDK { - return user => { + protected get as(): (user: { _id: string }) => EmbeddedSDK { + return (user) => { if (user === null) { return this.context.accessors.sdk; } @@ -35,7 +35,7 @@ export class CRUDController { * * @param request */ - async create (request: KuzzleRequest) { + async create(request: KuzzleRequest) { const index = request.getIndex(); const asset = request.getBody(); const id = request.input.resource._id; @@ -45,7 +45,8 @@ export class CRUDController { this.collection, asset, id, - { ...request.input.args }); + { ...request.input.args } + ); } /** @@ -53,7 +54,7 @@ export class CRUDController { * * @param request */ - async delete (request: KuzzleRequest) { + async delete(request: KuzzleRequest) { const index = request.getIndex(); const id = request.getId(); @@ -61,7 +62,8 @@ export class CRUDController { index, this.collection, id, - { ...request.input.args }); + { ...request.input.args } + ); } /** @@ -69,22 +71,20 @@ export class CRUDController { * * @param request */ - async search (request: KuzzleRequest) { + async search(request: KuzzleRequest) { const index = request.getIndex(); const { searchBody } = request.getSearchParams(); - const res = await this.as(request.context.user).query( - { - controller: 'document', - action: 'search', - index, - collection: this.collection, - body: searchBody, - ...request.input.args - } - ); + const res = await this.as(request.context.user).query({ + action: "search", + body: searchBody, + collection: this.collection, + controller: "document", + index, + ...request.input.args, + }); - return res.result + return res.result; } /** @@ -92,7 +92,7 @@ export class CRUDController { * * @param request */ - async update (request: KuzzleRequest) { + async update(request: KuzzleRequest) { const index = request.getIndex(); const body = request.getBody(); const id = request.getId(); @@ -102,6 +102,7 @@ export class CRUDController { this.collection, id, body, - { ...request.input.args }); + { ...request.input.args } + ); } } diff --git a/lib/crud/index.d.ts b/lib/crud/index.d.ts deleted file mode 100644 index 7c0f6d4..0000000 --- a/lib/crud/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './CRUDController'; diff --git a/lib/crud/index.js b/lib/crud/index.js deleted file mode 100644 index 164e963..0000000 --- a/lib/crud/index.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 }); -__exportStar(require("./CRUDController"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/crud/index.js.map b/lib/crud/index.js.map deleted file mode 100644 index 03030c1..0000000 --- a/lib/crud/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAiC"} \ No newline at end of file diff --git a/lib/crud/index.ts b/lib/crud/index.ts index 7c0f6d4..72f7562 100644 --- a/lib/crud/index.ts +++ b/lib/crud/index.ts @@ -1 +1 @@ -export * from './CRUDController'; +export * from "./CRUDController"; diff --git a/lib/engine/AbstractEngine.d.ts b/lib/engine/AbstractEngine.d.ts deleted file mode 100644 index 9db2521..0000000 --- a/lib/engine/AbstractEngine.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { PluginContext, EmbeddedSDK, Plugin, KuzzleRequest } from 'kuzzle'; -import { ConfigManager } from '../config'; -import { EngineContent } from './EngineContent'; -export declare abstract class AbstractEngine { - protected context: PluginContext; - protected config: TPlugin['config']; - protected pluginName: string; - protected adminIndex: string; - protected adminConfigManager: ConfigManager; - protected engineConfigManager: ConfigManager; - configType: string; - get sdk(): EmbeddedSDK; - /** - * @param pluginName Used to define http routes - * @param plugin Plugin instance - * @param index Name of admin index to store engine documents - * @param adminConfigManager ConfigManager instance for admin index - * @param engineConfigManager ConfigManager instance for engine index to create config collection - */ - constructor(pluginName: string, plugin: Plugin, adminIndex: string, adminConfigManager: ConfigManager, engineConfigManager: ConfigManager); - init(...args: any[]): Promise; - protected abstract onCreate(index: string, group: string, request?: KuzzleRequest): Promise<{ - collections: string[]; - }>; - protected abstract onUpdate(index: string, group: string, request?: KuzzleRequest): Promise<{ - collections: string[]; - }>; - protected abstract onDelete(index: string, request?: KuzzleRequest): Promise<{ - collections: string[]; - }>; - create(index: string, group?: string, request?: KuzzleRequest): Promise<{ - collections: string[]; - }>; - update(index: string, group?: string, request?: KuzzleRequest): Promise<{ - collections: string[]; - }>; - delete(index: string, request?: KuzzleRequest): Promise<{ - collections: string[]; - }>; - list(group?: string): Promise>; - exists(index: string): Promise; - /** - * Creates the engine index if it does not exists - */ - private createEngineIndex; - protected engineId(index: string): string; - protected logError(index: string, message: string, error: Error): void; -} diff --git a/lib/engine/AbstractEngine.js b/lib/engine/AbstractEngine.js deleted file mode 100644 index 3ba5558..0000000 --- a/lib/engine/AbstractEngine.js +++ /dev/null @@ -1,100 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AbstractEngine = void 0; -const kuzzle_1 = require("kuzzle"); -class AbstractEngine { - /** - * @param pluginName Used to define http routes - * @param plugin Plugin instance - * @param index Name of admin index to store engine documents - * @param adminConfigManager ConfigManager instance for admin index - * @param engineConfigManager ConfigManager instance for engine index to create config collection - */ - constructor(pluginName, plugin, adminIndex, adminConfigManager, engineConfigManager) { - this.pluginName = pluginName; - this.config = plugin.config; - this.context = plugin.context; - this.adminIndex = adminIndex; - this.adminConfigManager = adminConfigManager; - this.engineConfigManager = engineConfigManager; - this.configType = `engine-${this.pluginName}`; - } - get sdk() { - return this.context.accessors.sdk; - } - async init(...args) { - // Can be used to inject other services into the engine - } - async create(index, group = 'commons', request) { - if (await this.exists(index)) { - throw new kuzzle_1.BadRequestError(`${kuzzle_1.Inflector.upFirst(this.pluginName)} engine on index "${index}" already exists`); - } - this.context.log.info(`Create ${this.pluginName} engine on index "${index}"`); - await this.createEngineIndex(index); - await this.engineConfigManager.createCollection(index); - const { collections } = await this.onCreate(index, group, request); - await this.sdk.document.create(this.adminIndex, this.adminConfigManager.collection, { type: this.configType, engine: { index, group, name: this.pluginName } }, this.engineId(index), { refresh: 'wait_for' }); - return { collections }; - } - async update(index, group = 'commons', request) { - if (!await this.exists(index)) { - throw new kuzzle_1.NotFoundError(`${kuzzle_1.Inflector.upFirst(this.pluginName)} engine on index "${index}" does not exists`); - } - this.context.log.info(`Update ${this.pluginName} engine on index "${index}"`); - await this.engineConfigManager.createCollection(index); - const { collections } = await this.onUpdate(index, group, request); - return { collections }; - } - async delete(index, request) { - if (!await this.exists(index)) { - throw new kuzzle_1.NotFoundError(`${kuzzle_1.Inflector.upFirst(this.pluginName)} engine on index "${index}" does not exists`); - } - this.context.log.info(`Delete ${this.pluginName} engine on index "${index}"`); - try { - const { collections } = await this.onDelete(index, request); - return { collections }; - } - finally { - await this.sdk.document.delete(this.adminIndex, this.adminConfigManager.collection, this.engineId(index), { refresh: 'wait_for' }); - } - } - async list(group) { - const query = { - and: [ - { equals: { type: this.configType } }, - ], - }; - if (group) { - query.and.push({ equals: { 'engine.group': group } }); - } - const result = await this.sdk.document.search(this.adminIndex, this.adminConfigManager.collection, { query }, { size: 1000, lang: 'koncorde' }); - return result.hits.map(hit => hit._source.engine); - } - async exists(index) { - const exists = await this.sdk.document.exists(this.adminIndex, this.adminConfigManager.collection, this.engineId(index)); - return exists; - } - /** - * Creates the engine index if it does not exists - */ - async createEngineIndex(index) { - const mutex = new kuzzle_1.Mutex(`${this.pluginName}/initIndex/${index}`); - try { - await mutex.lock(); - if (!await this.sdk.index.exists(index)) { - await this.sdk.index.create(index); - } - } - finally { - await mutex.unlock(); - } - } - engineId(index) { - return `engine-${this.pluginName}--${index}`; - } - logError(index, message, error) { - this.context.log.error(`[${index}] ${message}: ${error}${error.stack}`); - } -} -exports.AbstractEngine = AbstractEngine; -//# sourceMappingURL=AbstractEngine.js.map \ No newline at end of file diff --git a/lib/engine/AbstractEngine.js.map b/lib/engine/AbstractEngine.js.map deleted file mode 100644 index ab6673b..0000000 --- a/lib/engine/AbstractEngine.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"AbstractEngine.js","sourceRoot":"","sources":["AbstractEngine.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/lib/engine/AbstractEngine.ts b/lib/engine/AbstractEngine.ts index 0f955a6..a8d2d04 100644 --- a/lib/engine/AbstractEngine.ts +++ b/lib/engine/AbstractEngine.ts @@ -6,15 +6,16 @@ import { Mutex, Inflector, Plugin, - JSONObject, KuzzleRequest, -} from 'kuzzle'; + JSONObject, + KuzzleRequest, +} from "kuzzle"; -import { ConfigManager } from '../config'; -import { EngineContent } from './EngineContent'; +import { ConfigManager } from "../config"; +import { EngineContent } from "./EngineContent"; export abstract class AbstractEngine { protected context: PluginContext; - protected config: TPlugin['config']; + protected config: TPlugin["config"]; protected pluginName: string; protected adminIndex: string; protected adminConfigManager: ConfigManager; @@ -22,7 +23,7 @@ export abstract class AbstractEngine { public configType: string; - get sdk (): EmbeddedSDK { + get sdk(): EmbeddedSDK { return this.context.accessors.sdk; } @@ -33,12 +34,12 @@ export abstract class AbstractEngine { * @param adminConfigManager ConfigManager instance for admin index * @param engineConfigManager ConfigManager instance for engine index to create config collection */ - constructor ( + constructor( pluginName: string, plugin: Plugin, adminIndex: string, adminConfigManager: ConfigManager, - engineConfigManager: ConfigManager, + engineConfigManager: ConfigManager ) { this.pluginName = pluginName; this.config = plugin.config; @@ -50,19 +51,40 @@ export abstract class AbstractEngine { this.configType = `engine-${this.pluginName}`; } - async init (...args): Promise { + async init(): Promise { // Can be used to inject other services into the engine } - protected abstract onCreate (index: string, group: string, request?: KuzzleRequest): Promise<{ collections: string[] }>; - protected abstract onUpdate (index: string, group: string, request?: KuzzleRequest): Promise<{ collections: string[] }>; - protected abstract onDelete (index: string, request?: KuzzleRequest): Promise<{ collections: string[] }>; - - async create (index: string, group = 'commons', request?: KuzzleRequest): Promise<{ collections: string[] }> { + protected abstract onCreate( + index: string, + group: string, + request?: KuzzleRequest + ): Promise<{ collections: string[] }>; + protected abstract onUpdate( + index: string, + group: string, + request?: KuzzleRequest + ): Promise<{ collections: string[] }>; + protected abstract onDelete( + index: string, + request?: KuzzleRequest + ): Promise<{ collections: string[] }>; + + async create( + index: string, + group = "commons", + request?: KuzzleRequest + ): Promise<{ collections: string[] }> { if (await this.exists(index)) { - throw new BadRequestError(`${Inflector.upFirst(this.pluginName)} engine on index "${index}" already exists`); + throw new BadRequestError( + `${Inflector.upFirst( + this.pluginName + )} engine on index "${index}" already exists` + ); } - this.context.log.info(`Create ${this.pluginName} engine on index "${index}"`); + this.context.log.info( + `Create ${this.pluginName} engine on index "${index}"` + ); await this.createEngineIndex(index); await this.engineConfigManager.createCollection(index); @@ -72,19 +94,33 @@ export abstract class AbstractEngine { await this.sdk.document.create( this.adminIndex, this.adminConfigManager.collection, - { type: this.configType, engine: { index, group, name: this.pluginName } }, + { + engine: { group, index, name: this.pluginName }, + type: this.configType, + }, this.engineId(index), - { refresh: 'wait_for' }); + { refresh: "wait_for" } + ); return { collections }; } - async update (index: string, group = 'commons', request?: KuzzleRequest): Promise<{ collections: string[] }> { - if (! await this.exists(index)) { - throw new NotFoundError(`${Inflector.upFirst(this.pluginName)} engine on index "${index}" does not exists`); + async update( + index: string, + group = "commons", + request?: KuzzleRequest + ): Promise<{ collections: string[] }> { + if (!(await this.exists(index))) { + throw new NotFoundError( + `${Inflector.upFirst( + this.pluginName + )} engine on index "${index}" does not exists` + ); } - this.context.log.info(`Update ${this.pluginName} engine on index "${index}"`); + this.context.log.info( + `Update ${this.pluginName} engine on index "${index}"` + ); await this.engineConfigManager.createCollection(index); @@ -93,52 +129,61 @@ export abstract class AbstractEngine { return { collections }; } - async delete (index: string, request?: KuzzleRequest): Promise<{ collections: string[] }> { - if (! await this.exists(index)) { - throw new NotFoundError(`${Inflector.upFirst(this.pluginName)} engine on index "${index}" does not exists`); + async delete( + index: string, + request?: KuzzleRequest + ): Promise<{ collections: string[] }> { + if (!(await this.exists(index))) { + throw new NotFoundError( + `${Inflector.upFirst( + this.pluginName + )} engine on index "${index}" does not exists` + ); } - this.context.log.info(`Delete ${this.pluginName} engine on index "${index}"`); + this.context.log.info( + `Delete ${this.pluginName} engine on index "${index}"` + ); try { const { collections } = await this.onDelete(index, request); return { collections }; - } - finally { + } finally { await this.sdk.document.delete( this.adminIndex, this.adminConfigManager.collection, this.engineId(index), - { refresh: 'wait_for' }); + { refresh: "wait_for" } + ); } } - async list (group?: string): Promise> { + async list(group?: string): Promise> { const query: JSONObject = { - and: [ - { equals: { type: this.configType } }, - ], + and: [{ equals: { type: this.configType } }], }; if (group) { - query.and.push({ equals: { 'engine.group': group } }); + query.and.push({ equals: { "engine.group": group } }); } const result = await this.sdk.document.search( this.adminIndex, this.adminConfigManager.collection, { query }, - { size: 1000, lang: 'koncorde' }); + { lang: "koncorde", size: 1000 } + ); - return result.hits.map(hit => hit._source.engine); + return result.hits.map((hit) => hit._source.engine); } - async exists (index: string): Promise { + async exists(index: string): Promise { const exists = await this.sdk.document.exists( this.adminIndex, this.adminConfigManager.collection, - this.engineId(index)); + this.engineId(index) + ); return exists; } @@ -146,26 +191,25 @@ export abstract class AbstractEngine { /** * Creates the engine index if it does not exists */ - private async createEngineIndex (index: string) { + private async createEngineIndex(index: string) { const mutex = new Mutex(`${this.pluginName}/initIndex/${index}`); try { await mutex.lock(); - if (! await this.sdk.index.exists(index)) { + if (!(await this.sdk.index.exists(index))) { await this.sdk.index.create(index); } - } - finally { + } finally { await mutex.unlock(); } } - protected engineId (index: string): string { + protected engineId(index: string): string { return `engine-${this.pluginName}--${index}`; } - protected logError (index: string, message: string, error: Error) { + protected logError(index: string, message: string, error: Error) { this.context.log.error(`[${index}] ${message}: ${error}${error.stack}`); } } diff --git a/lib/engine/EngineContent.d.ts b/lib/engine/EngineContent.d.ts deleted file mode 100644 index 9c7de71..0000000 --- a/lib/engine/EngineContent.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Represents the content of the engine configuration document - */ -export declare type EngineContent = { - /** - * Engine index - */ - index: string; - /** - * Engine group - */ - group: string; - /** - * Engine name - */ - name: string; -}; diff --git a/lib/engine/EngineContent.js b/lib/engine/EngineContent.js deleted file mode 100644 index 3226ba7..0000000 --- a/lib/engine/EngineContent.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -//# sourceMappingURL=EngineContent.js.map \ No newline at end of file diff --git a/lib/engine/EngineContent.js.map b/lib/engine/EngineContent.js.map deleted file mode 100644 index c268dfb..0000000 --- a/lib/engine/EngineContent.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EngineContent.js","sourceRoot":"","sources":["EngineContent.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/lib/engine/EngineContent.ts b/lib/engine/EngineContent.ts index 72130a0..b654ede 100644 --- a/lib/engine/EngineContent.ts +++ b/lib/engine/EngineContent.ts @@ -16,4 +16,4 @@ export type EngineContent = { * Engine name */ name: string; -}; \ No newline at end of file +}; diff --git a/lib/engine/EngineController.d.ts b/lib/engine/EngineController.d.ts deleted file mode 100644 index 6387d8c..0000000 --- a/lib/engine/EngineController.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { ControllerDefinition, KuzzleRequest, EmbeddedSDK, Plugin } from 'kuzzle'; -import { AbstractEngine } from './AbstractEngine'; -export declare class EngineController { - private engine; - private context; - private config; - private pluginName; - definition: ControllerDefinition; - get sdk(): EmbeddedSDK; - /** - * @param pluginName Used to define http routes - * @param plugin Plugin instance - * @param engine Engine used - */ - constructor(pluginName: string, plugin: Plugin, engine: AbstractEngine); - create(request: KuzzleRequest): Promise<{ - index: string; - collections: string[]; - }>; - update(request: KuzzleRequest): Promise<{ - index: string; - collections: string[]; - }>; - delete(request: KuzzleRequest): Promise<{ - index: string; - collections: string[]; - }>; - list(): Promise<{ - engines: import("./EngineContent").EngineContent[]; - }>; - exists(request: KuzzleRequest): Promise<{ - exists: boolean; - }>; -} diff --git a/lib/engine/EngineController.js b/lib/engine/EngineController.js deleted file mode 100644 index 4c68783..0000000 --- a/lib/engine/EngineController.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EngineController = void 0; -class EngineController { - /** - * @param pluginName Used to define http routes - * @param plugin Plugin instance - * @param engine Engine used - */ - constructor(pluginName, plugin, engine) { - this.pluginName = pluginName; - this.config = plugin.config; - this.context = plugin.context; - this.engine = engine; - this.definition = { - actions: { - create: { - handler: this.create.bind(this), - http: [{ verb: 'post', path: `${this.pluginName}/engine/:index` }], - }, - update: { - handler: this.update.bind(this), - http: [{ verb: 'put', path: `${this.pluginName}/engine/:index` }], - }, - delete: { - handler: this.delete.bind(this), - http: [{ verb: 'delete', path: `${this.pluginName}/engine/:index` }], - }, - list: { - handler: this.list.bind(this), - http: [{ verb: 'get', path: `${this.pluginName}/engines` }], - }, - exists: { - handler: this.exists.bind(this), - http: [{ verb: 'get', path: `${this.pluginName}/engine/:index/_exists` }], - } - }, - }; - if (!plugin.api) { - plugin.api = {}; - } - plugin.api[`${this.pluginName}/engine`] = this.definition; - } - get sdk() { - return this.context.accessors.sdk; - } - async create(request) { - const index = request.getIndex(); - const group = request.getString('group', 'commons'); - const { collections } = await this.engine.create(index, group, request); - return { index, collections }; - } - async update(request) { - const index = request.getIndex(); - const group = request.getString('group', 'commons'); - const { collections } = await this.engine.update(index, group, request); - return { index, collections }; - } - async delete(request) { - const index = request.getIndex(); - const { collections } = await this.engine.delete(index, request); - return { index, collections }; - } - async list() { - const engines = await this.engine.list(); - return { engines }; - } - async exists(request) { - const index = request.getIndex(); - const exists = await this.engine.exists(index); - return { exists }; - } -} -exports.EngineController = EngineController; -//# sourceMappingURL=EngineController.js.map \ No newline at end of file diff --git a/lib/engine/EngineController.js.map b/lib/engine/EngineController.js.map deleted file mode 100644 index a5b1c7a..0000000 --- a/lib/engine/EngineController.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"EngineController.js","sourceRoot":"","sources":["EngineController.ts"],"names":[],"mappings":"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"} \ No newline at end of file diff --git a/lib/engine/EngineController.ts b/lib/engine/EngineController.ts index a1d3ecb..d879ad7 100644 --- a/lib/engine/EngineController.ts +++ b/lib/engine/EngineController.ts @@ -3,22 +3,21 @@ import { PluginContext, KuzzleRequest, EmbeddedSDK, - JSONObject, Plugin, -} from 'kuzzle'; +} from "kuzzle"; -import { AbstractEngine } from './AbstractEngine'; +import { AbstractEngine } from "./AbstractEngine"; export class EngineController { private engine: AbstractEngine; private context: PluginContext; - private config: TPlugin['config']; + private config: TPlugin["config"]; private pluginName: string; public definition: ControllerDefinition; - get sdk (): EmbeddedSDK { + get sdk(): EmbeddedSDK { return this.context.accessors.sdk; } @@ -27,7 +26,7 @@ export class EngineController { * @param plugin Plugin instance * @param engine Engine used */ - constructor ( + constructor( pluginName: string, plugin: Plugin, engine: AbstractEngine @@ -41,67 +40,69 @@ export class EngineController { actions: { create: { handler: this.create.bind(this), - http: [{ verb: 'post', path: `${this.pluginName}/engine/:index` }], - }, - update: { - handler: this.update.bind(this), - http: [{ verb: 'put', path: `${this.pluginName}/engine/:index` }], + http: [{ path: `${this.pluginName}/engine/:index`, verb: "post" }], }, delete: { handler: this.delete.bind(this), - http: [{ verb: 'delete', path: `${this.pluginName}/engine/:index` }], + http: [{ path: `${this.pluginName}/engine/:index`, verb: "delete" }], + }, + exists: { + handler: this.exists.bind(this), + http: [ + { path: `${this.pluginName}/engine/:index/_exists`, verb: "get" }, + ], }, list: { handler: this.list.bind(this), - http: [{ verb: 'get', path: `${this.pluginName}/engines` }], + http: [{ path: `${this.pluginName}/engines`, verb: "get" }], + }, + update: { + handler: this.update.bind(this), + http: [{ path: `${this.pluginName}/engine/:index`, verb: "put" }], }, - exists: { - handler: this.exists.bind(this), - http: [{ verb: 'get', path: `${this.pluginName}/engine/:index/_exists` }], - } }, }; - if (! plugin.api) { + if (!plugin.api) { plugin.api = {}; } plugin.api[`${this.pluginName}/engine`] = this.definition; } - async create (request: KuzzleRequest) { + async create(request: KuzzleRequest) { const index = request.getIndex(); - const group = request.getString('group', 'commons'); + const group = request.getString("group", "commons"); const { collections } = await this.engine.create(index, group, request); - return { index, collections }; + return { collections, index }; } - async update (request: KuzzleRequest) { + async update(request: KuzzleRequest) { const index = request.getIndex(); - const group = request.getString('group', 'commons'); + const group = request.getString("group", "commons"); const { collections } = await this.engine.update(index, group, request); - return { index, collections }; + return { collections, index }; } - async delete (request: KuzzleRequest) { + async delete(request: KuzzleRequest) { const index = request.getIndex(); const { collections } = await this.engine.delete(index, request); - return { index, collections }; + return { collections, index }; } - async list () { + async list() { const engines = await this.engine.list(); return { engines }; } - async exists (request: KuzzleRequest) { + async exists(request: KuzzleRequest) { const index = request.getIndex(); const exists = await this.engine.exists(index); diff --git a/lib/engine/index.d.ts b/lib/engine/index.d.ts deleted file mode 100644 index bd77566..0000000 --- a/lib/engine/index.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './AbstractEngine'; -export * from './EngineController'; diff --git a/lib/engine/index.js b/lib/engine/index.js deleted file mode 100644 index 6c72cb6..0000000 --- a/lib/engine/index.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 }); -__exportStar(require("./AbstractEngine"), exports); -__exportStar(require("./EngineController"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/engine/index.js.map b/lib/engine/index.js.map deleted file mode 100644 index 1e97ca6..0000000 --- a/lib/engine/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAAiC;AAEjC,qDAAmC"} \ No newline at end of file diff --git a/lib/engine/index.ts b/lib/engine/index.ts index 3e3d270..4e3e0eb 100644 --- a/lib/engine/index.ts +++ b/lib/engine/index.ts @@ -1,3 +1,3 @@ -export * from './AbstractEngine'; +export * from "./AbstractEngine"; -export * from './EngineController'; +export * from "./EngineController"; diff --git a/lib/synchronizer/CollectionSynchronizer.d.ts b/lib/synchronizer/CollectionSynchronizer.d.ts deleted file mode 100644 index 84c2532..0000000 --- a/lib/synchronizer/CollectionSynchronizer.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Backend, JSONObject, KuzzleRequest } from 'kuzzle'; -/** - * This class allows to synchronize documents from one collection into an other. - * - */ -export declare abstract class CollectionSynchronizer { - protected app: Backend; - private srcCollection; - private dstCollection; - private enabled; - abstract convertId(srcDocument: SrcDoc, request?: KuzzleRequest): string; - abstract convertBody(srcDocument: SrcDoc, request?: KuzzleRequest): Promise; - constructor(app: Backend, srcCollection: string, dstCollection: string); - start(): void; - stop(): void; - filter(srcDocuments: SrcDoc[]): SrcDoc[]; - afterWriteDocuments(index: string, documents: Array<{ - _id: string; - body: DstDocContent; - }>): Promise; - afterDeleteDocuments(index: string, ids: string[]): Promise; - private pipeAfterWrite; - private pipeAfterUpdate; - private pipeBeforeDelete; - private getEntireDocuments; - private writeDocuments; - private shouldSkipPipe; -} diff --git a/lib/synchronizer/CollectionSynchronizer.js b/lib/synchronizer/CollectionSynchronizer.js deleted file mode 100644 index 9176910..0000000 --- a/lib/synchronizer/CollectionSynchronizer.js +++ /dev/null @@ -1,113 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.CollectionSynchronizer = void 0; -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/no-empty-function */ -/** - * This class allows to synchronize documents from one collection into an other. - * - */ -class CollectionSynchronizer { - constructor(app, srcCollection, dstCollection) { - this.enabled = false; - this.app = app; - this.srcCollection = srcCollection; - this.dstCollection = dstCollection; - this.app.pipe.register('generic:document:afterWrite', (documents, request) => this.pipeAfterWrite(documents, request)); - this.app.pipe.register('generic:document:afterUpdate', (documents, request) => this.pipeAfterUpdate(documents, request)); - this.app.pipe.register('generic:document:beforeDelete', (documents, request) => this.pipeBeforeDelete(documents, request)); - } - start() { - this.enabled = true; - } - stop() { - this.enabled = false; - } - filter(srcDocuments) { - return srcDocuments; - } - async afterWriteDocuments(index, documents) { - } - async afterDeleteDocuments(index, ids) { - } - async pipeAfterWrite(documents, request) { - if (this.shouldSkipPipe(request)) { - return documents; - } - const filteredDocs = this.filter(documents); - if (filteredDocs.length > 0) { - await this.writeDocuments(request, filteredDocs, 'create'); - } - return documents; - } - async pipeAfterUpdate(documents, request) { - if (this.shouldSkipPipe(request)) { - return documents; - } - const docs = await this.getEntireDocuments(request, documents); - const filteredDocs = this.filter(docs); - if (filteredDocs.length > 0) { - await this.writeDocuments(request, filteredDocs, 'update'); - } - return documents; - } - async pipeBeforeDelete(documents, request) { - if (this.shouldSkipPipe(request)) { - return documents; - } - const docs = await this.getEntireDocuments(request, documents); - const filteredDocs = this.filter(docs); - if (filteredDocs.length > 0) { - const ids = filteredDocs.map(doc => this.convertId(doc, request)); - await this.app.sdk.document.mDelete(request.getIndex(), this.dstCollection, ids); - await this.afterDeleteDocuments(request.getIndex(), ids); - } - return documents; - } - async getEntireDocuments(request, documents) { - const { successes } = await this.app.sdk.document.mGet(request.getIndex(), this.srcCollection, documents.map(({ _id }) => _id)); - return successes; - } - async writeDocuments(request, srcDocuments, action) { - const now = Date.now(); - const dstDocuments = await Promise.all(srcDocuments.map(doc => { - return this.convertBody(doc, request) - .then((body) => { - // Inject Kuzzle Metadata if not present - if (!body._kuzzle_info) { - if (action === 'create') { - body._kuzzle_info = { - creator: null, - createdAt: now, - }; - } - else { - body._kuzzle_info = { - updater: null, - updatedAt: now, - }; - } - } - return { - _id: this.convertId(doc, request), - body - }; - }); - })); - await this.app.sdk.bulk.mWrite(request.getIndex(), this.dstCollection, dstDocuments, { strict: true, notify: true }); - await this.afterWriteDocuments(request.getIndex(), dstDocuments); - } - shouldSkipPipe(request) { - if (!this.enabled) { - return true; - } - if (request.getCollection() !== this.srcCollection) { - return true; - } - return false; - } -} -exports.CollectionSynchronizer = CollectionSynchronizer; -/* eslint-enable @typescript-eslint/no-unused-vars */ -/* eslint-enable @typescript-eslint/no-empty-function */ -//# sourceMappingURL=CollectionSynchronizer.js.map \ No newline at end of file diff --git a/lib/synchronizer/CollectionSynchronizer.js.map b/lib/synchronizer/CollectionSynchronizer.js.map deleted file mode 100644 index bcd2f15..0000000 --- a/lib/synchronizer/CollectionSynchronizer.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"CollectionSynchronizer.js","sourceRoot":"","sources":["CollectionSynchronizer.ts"],"names":[],"mappings":";;;AAMA,sDAAsD;AACtD,yDAAyD;AAEzD;;;GAGG;AACH,MAAsB,sBAAsB;IAU1C,YAAa,GAAY,EAAE,aAAqB,EAAE,aAAqB;QAL/D,YAAO,GAAG,KAAK,CAAC;QAMtB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QAEnC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CACpB,6BAA6B,EAC7B,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;QAEnE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CACpB,8BAA8B,EAC9B,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;QAEpE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CACpB,+BAA+B,EAC/B,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,KAAK;QACH,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CAAC;IAED,IAAI;QACF,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,MAAM,CAAE,YAAsB;QAC5B,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,KAAK,CAAC,mBAAmB,CAAE,KAAa,EAAE,SAAsD;IAChG,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAE,KAAa,EAAE,GAAa;IACxD,CAAC;IAEO,KAAK,CAAC,cAAc,CAAE,SAAmB,EAAE,OAAsB;QACvE,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;YAChC,OAAO,SAAS,CAAC;SAClB;QAED,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAE5C,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;SAC5D;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,KAAK,CAAC,eAAe,CAAE,SAAmB,EAAE,OAAsB;QACxE,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;YAChC,OAAO,SAAS,CAAC;SAClB;QAED,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAE/D,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAEvC,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;SAC5D;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,KAAK,CAAC,gBAAgB,CAAE,SAAmB,EAAE,OAAsB;QACzE,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;YAChC,OAAO,SAAS,CAAC;SAClB;QAED,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAE/D,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAEvC,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE;YAC3B,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;YAElE,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CACjC,OAAO,CAAC,QAAQ,EAAE,EAClB,IAAI,CAAC,aAAa,EAClB,GAAG,CAAC,CAAC;YAEP,MAAM,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,GAAG,CAAC,CAAC;SAC1D;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,KAAK,CAAC,kBAAkB,CAAE,OAAsB,EAAE,SAAmB;QAC3E,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CACpD,OAAO,CAAC,QAAQ,EAAE,EAClB,IAAI,CAAC,aAAa,EAClB,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAEnC,OAAO,SAAqB,CAAC;IAC/B,CAAC;IAEO,KAAK,CAAC,cAAc,CAAE,OAAsB,EAAE,YAAsB,EAAE,MAA2B;QACvG,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAEvB,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,GAAG,CACpC,YAAY,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YACrB,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,OAAO,CAAC;iBAClC,IAAI,CAAC,CAAC,IAAS,EAAE,EAAE;gBAClB,wCAAwC;gBACxC,IAAI,CAAE,IAAI,CAAC,YAAY,EAAE;oBACvB,IAAI,MAAM,KAAK,QAAQ,EAAE;wBACvB,IAAI,CAAC,YAAY,GAAG;4BAClB,OAAO,EAAE,IAAI;4BACb,SAAS,EAAE,GAAG;yBACf,CAAC;qBACH;yBACI;wBACH,IAAI,CAAC,YAAY,GAAG;4BAClB,OAAO,EAAE,IAAI;4BACb,SAAS,EAAE,GAAG;yBACf,CAAC;qBACH;iBACF;gBAED,OAAO;oBACL,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC;oBACjC,IAAI;iBACL,CAAC;YACJ,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CACH,CAAA;QAED,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAC5B,OAAO,CAAC,QAAQ,EAAE,EAClB,IAAI,CAAC,aAAa,EAClB,YAAY,EACZ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;QAElC,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,YAAY,CAAC,CAAC;IACnE,CAAC;IAEO,cAAc,CAAE,OAAsB;QAC5C,IAAI,CAAE,IAAI,CAAC,OAAO,EAAE;YAClB,OAAO,IAAI,CAAC;SACb;QAED,IAAI,OAAO,CAAC,aAAa,EAAE,KAAK,IAAI,CAAC,aAAa,EAAE;YAClD,OAAO,IAAI,CAAC;SACb;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA/JD,wDA+JC;AAED,qDAAqD;AACrD,wDAAwD"} \ No newline at end of file diff --git a/lib/synchronizer/CollectionSynchronizer.ts b/lib/synchronizer/CollectionSynchronizer.ts index ac89355..3affa4f 100644 --- a/lib/synchronizer/CollectionSynchronizer.ts +++ b/lib/synchronizer/CollectionSynchronizer.ts @@ -1,8 +1,4 @@ -import { - Backend, - JSONObject, - KuzzleRequest, -} from 'kuzzle'; +import { Backend, JSONObject, KuzzleRequest } from "kuzzle"; /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-empty-function */ @@ -11,53 +7,63 @@ import { * This class allows to synchronize documents from one collection into an other. * */ -export abstract class CollectionSynchronizer { +export abstract class CollectionSynchronizer< + SrcDoc extends { _id: string; _source: JSONObject }, + DstDocContent +> { protected app: Backend; private srcCollection: string; private dstCollection: string; private enabled = false; - abstract convertId (srcDocument: SrcDoc, request?: KuzzleRequest): string; - abstract convertBody (srcDocument: SrcDoc, request?: KuzzleRequest): Promise; + abstract convertId(srcDocument: SrcDoc, request?: KuzzleRequest): string; + abstract convertBody( + srcDocument: SrcDoc, + request?: KuzzleRequest + ): Promise; - constructor (app: Backend, srcCollection: string, dstCollection: string) { + constructor(app: Backend, srcCollection: string, dstCollection: string) { this.app = app; this.srcCollection = srcCollection; this.dstCollection = dstCollection; this.app.pipe.register( - 'generic:document:afterWrite', - (documents, request) => this.pipeAfterWrite(documents, request)); + "generic:document:afterWrite", + (documents, request) => this.pipeAfterWrite(documents, request) + ); this.app.pipe.register( - 'generic:document:afterUpdate', - (documents, request) => this.pipeAfterUpdate(documents, request)); + "generic:document:afterUpdate", + (documents, request) => this.pipeAfterUpdate(documents, request) + ); this.app.pipe.register( - 'generic:document:beforeDelete', - (documents, request) => this.pipeBeforeDelete(documents, request)); + "generic:document:beforeDelete", + (documents, request) => this.pipeBeforeDelete(documents, request) + ); } - start () { + start() { this.enabled = true; } - stop () { + stop() { this.enabled = false; } - filter (srcDocuments: SrcDoc[]): SrcDoc[] { + filter(srcDocuments: SrcDoc[]): SrcDoc[] { return srcDocuments; } - async afterWriteDocuments (index: string, documents: Array<{ _id: string, body: DstDocContent }>) { - } + async afterWriteDocuments( + index: string, + documents: Array<{ _id: string; body: DstDocContent }> + ) {} - async afterDeleteDocuments (index: string, ids: string[]) { - } + async afterDeleteDocuments(index: string, ids: string[]) {} - private async pipeAfterWrite (documents: SrcDoc[], request: KuzzleRequest) { + private async pipeAfterWrite(documents: SrcDoc[], request: KuzzleRequest) { if (this.shouldSkipPipe(request)) { return documents; } @@ -65,13 +71,13 @@ export abstract class CollectionSynchronizer 0) { - await this.writeDocuments(request, filteredDocs, 'create'); + await this.writeDocuments(request, filteredDocs, "create"); } return documents; } - private async pipeAfterUpdate (documents: SrcDoc[], request: KuzzleRequest) { + private async pipeAfterUpdate(documents: SrcDoc[], request: KuzzleRequest) { if (this.shouldSkipPipe(request)) { return documents; } @@ -81,13 +87,13 @@ export abstract class CollectionSynchronizer 0) { - await this.writeDocuments(request, filteredDocs, 'update'); + await this.writeDocuments(request, filteredDocs, "update"); } return documents; } - private async pipeBeforeDelete (documents: SrcDoc[], request: KuzzleRequest) { + private async pipeBeforeDelete(documents: SrcDoc[], request: KuzzleRequest) { if (this.shouldSkipPipe(request)) { return documents; } @@ -97,12 +103,13 @@ export abstract class CollectionSynchronizer 0) { - const ids = filteredDocs.map(doc => this.convertId(doc, request)); + const ids = filteredDocs.map((doc) => this.convertId(doc, request)); await this.app.sdk.document.mDelete( request.getIndex(), this.dstCollection, - ids); + ids + ); await this.afterDeleteDocuments(request.getIndex(), ids); } @@ -110,57 +117,64 @@ export abstract class CollectionSynchronizer { + private async getEntireDocuments( + request: KuzzleRequest, + documents: SrcDoc[] + ): Promise { const { successes } = await this.app.sdk.document.mGet( request.getIndex(), this.srcCollection, - documents.map(({ _id }) => _id)); + documents.map(({ _id }) => _id) + ); return successes as SrcDoc[]; } - private async writeDocuments (request: KuzzleRequest, srcDocuments: SrcDoc[], action: 'create' | 'update') { + private async writeDocuments( + request: KuzzleRequest, + srcDocuments: SrcDoc[], + action: "create" | "update" + ) { const now = Date.now(); const dstDocuments = await Promise.all( - srcDocuments.map(doc => { - return this.convertBody(doc, request) - .then((body: any) => { - // Inject Kuzzle Metadata if not present - if (! body._kuzzle_info) { - if (action === 'create') { - body._kuzzle_info = { - creator: null, - createdAt: now, - }; - } - else { - body._kuzzle_info = { - updater: null, - updatedAt: now, - }; - } + srcDocuments.map((doc) => { + return this.convertBody(doc, request).then((body: any) => { + // Inject Kuzzle Metadata if not present + if (!body._kuzzle_info) { + if (action === "create") { + body._kuzzle_info = { + createdAt: now, + creator: null, + }; + } else { + body._kuzzle_info = { + updatedAt: now, + updater: null, + }; } + } - return { - _id: this.convertId(doc, request), - body - }; - }); + return { + _id: this.convertId(doc, request), + body, + }; + }); }) - ) + ); await this.app.sdk.bulk.mWrite( request.getIndex(), this.dstCollection, dstDocuments, - { strict: true, notify: true }); + { notify: true, strict: true } + ); await this.afterWriteDocuments(request.getIndex(), dstDocuments); } - private shouldSkipPipe (request: KuzzleRequest): boolean { - if (! this.enabled) { + private shouldSkipPipe(request: KuzzleRequest): boolean { + if (!this.enabled) { return true; } diff --git a/lib/synchronizer/index.d.ts b/lib/synchronizer/index.d.ts deleted file mode 100644 index ddb5e67..0000000 --- a/lib/synchronizer/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './CollectionSynchronizer'; diff --git a/lib/synchronizer/index.js b/lib/synchronizer/index.js deleted file mode 100644 index 12de205..0000000 --- a/lib/synchronizer/index.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); -}) : (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 }); -__exportStar(require("./CollectionSynchronizer"), exports); -//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/synchronizer/index.js.map b/lib/synchronizer/index.js.map deleted file mode 100644 index 2fd62a7..0000000 --- a/lib/synchronizer/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2DAAyC"} \ No newline at end of file diff --git a/lib/synchronizer/index.ts b/lib/synchronizer/index.ts index ddb5e67..67356dd 100644 --- a/lib/synchronizer/index.ts +++ b/lib/synchronizer/index.ts @@ -1 +1 @@ -export * from './CollectionSynchronizer'; +export * from "./CollectionSynchronizer"; diff --git a/package-lock.json b/package-lock.json index bd53737..1f9a4e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,10 @@ "version": "1.0.6", "license": "Apache 2", "devDependencies": { - "@types/node": "^16.6.1", - "ts-node": "^10.2.0", - "typescript": "^4.3.5" + "@types/node": "^18.15.11", + "eslint-plugin-kuzzle": "^0.0.6", + "ts-node": "^10.9.1", + "typescript": "^5.0.4" }, "peerDependencies": { "kuzzle": "^2.14.0" @@ -123,22 +124,13 @@ "node": ">=4" } }, - "node_modules/@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", - "dev": true, - "engines": { - "node": ">= 12" - } - }, "node_modules/@cspotcode/source-map-support": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.6.1.tgz", - "integrity": "sha512-DX3Z+T5dt1ockmPdobJS/FAsQPW4V4SrWEhD2iYQT2Cb2tQsiMnYxrcUH9By/Z3B+v0S5LMBkQtV/XOBbpLEOg==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, "dependencies": { - "@cspotcode/source-map-consumer": "0.8.0" + "@jridgewell/trace-mapping": "0.3.9" }, "engines": { "node": ">=12" @@ -196,6 +188,74 @@ "node": ">=12" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", + "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", + "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.5.1", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.38.0.tgz", + "integrity": "sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@flatten-js/interval-tree": { "version": "1.0.14", "resolved": "https://registry.npmjs.org/@flatten-js/interval-tree/-/interval-tree-1.0.14.tgz", @@ -208,6 +268,99 @@ "integrity": "sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw==", "peer": true }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@npmcli/fs": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.0.0.tgz", @@ -343,6 +496,12 @@ "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", "dev": true }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, "node_modules/@types/long": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", @@ -350,9 +509,9 @@ "peer": true }, "node_modules/@types/node": { - "version": "16.7.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.9.tgz", - "integrity": "sha512-KktxVzS4FPDFVHUUOWyZMvRo//8vqOLITtLMhFSW9IdLsYT/sPyXj3wXtaTcR7A7olCe7R2Xy7R+q5pg2bU46g==" + "version": "18.15.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", + "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==" }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", @@ -361,6 +520,200 @@ "optional": true, "peer": true }, + "node_modules/@types/semver": { + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.0.tgz", + "integrity": "sha512-p0QgrEyrxAWBecR56gyn3wkG15TJdI//eetInP3zYRewDh0XS+DhB3VUAd3QqvziFsfaQIoIuZMxZRB7vXYaYw==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/type-utils": "5.59.0", + "@typescript-eslint/utils": "5.59.0", + "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^5.0.0", + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.0.tgz", + "integrity": "sha512-qK9TZ70eJtjojSUMrrEwA9ZDQ4N0e/AuoOIgXuNBorXYcBDk397D2r5MIe1B3cok/oCtdNC5j+lUUpVB+Dpb+w==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/typescript-estree": "5.59.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.0.tgz", + "integrity": "sha512-tsoldKaMh7izN6BvkK6zRMINj4Z2d6gGhO2UsI8zGZY3XhLq1DndP3Ycjhi1JwdwPRwtLMW4EFPgpuKhbCGOvQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/visitor-keys": "5.59.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.0.tgz", + "integrity": "sha512-d/B6VSWnZwu70kcKQSCqjcXpVH+7ABKH8P1KNn4K7j5PXXuycZTPXF44Nui0TEm6rbWGi8kc78xRgOC4n7xFgA==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "5.59.0", + "@typescript-eslint/utils": "5.59.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.0.tgz", + "integrity": "sha512-yR2h1NotF23xFFYKHZs17QJnB51J/s+ud4PYU4MqdZbzeNxpgUr05+dNeCN/bb6raslHvGdd6BFCkVhpPk/ZeA==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.0.tgz", + "integrity": "sha512-sUNnktjmI8DyGzPdZ8dRwW741zopGxltGs/SAPgGL/AAgDpiLsCFLcMNSpbfXfmnNeHmK9h3wGmCkGRGAoUZAg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/visitor-keys": "5.59.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.0.tgz", + "integrity": "sha512-GGLFd+86drlHSvPgN/el6dRQNYYGOvRSDVydsUaQluwIW3HvbXuxyuD5JETvBt/9qGYe+lOrDk6gRrWOHb/FvA==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/typescript-estree": "5.59.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.0.tgz", + "integrity": "sha512-qZ3iXxQhanchCeaExlKPV3gDQFxMUmU35xfd5eCXB6+kUw1TUAbIy2n7QIrwz9s98DQLzNWyHp61fY0da4ZcbA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.59.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -368,9 +721,9 @@ "peer": true }, "node_modules/acorn": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", - "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -379,6 +732,15 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/acorn-walk": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.1.tgz", @@ -500,8 +862,7 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "optional": true, - "peer": true, + "devOptional": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -541,7 +902,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "peer": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -604,6 +964,21 @@ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -675,8 +1050,7 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "peer": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/base64-js": { "version": "1.5.1", @@ -770,12 +1144,23 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "peer": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/breadth-filter": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/breadth-filter/-/breadth-filter-2.0.0.tgz", @@ -899,11 +1284,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "peer": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1038,7 +1431,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "peer": true, "dependencies": { "color-name": "~1.1.4" }, @@ -1049,8 +1441,7 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "peer": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/color-string": { "version": "1.6.0", @@ -1099,8 +1490,7 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "peer": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "node_modules/console-control-strings": { "version": "1.1.0", @@ -1143,6 +1533,20 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/d": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", @@ -1160,10 +1564,9 @@ "peer": true }, "node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "peer": true, + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dependencies": { "ms": "2.1.2" }, @@ -1179,8 +1582,7 @@ "node_modules/debug/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "peer": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/deep-extend": { "version": "0.6.0", @@ -1191,6 +1593,12 @@ "node": ">=4.0.0" } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, "node_modules/deepmerge": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", @@ -1274,6 +1682,30 @@ "node": ">=0.3.1" } }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/dumpme": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/dumpme/-/dumpme-1.0.3.tgz", @@ -1595,8 +2027,251 @@ "node": ">=0.8.0" } }, - "node_modules/espresso-logic-minimizer": { - "version": "2.0.3", + "node_modules/eslint": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.38.0.tgz", + "integrity": "sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.2", + "@eslint/js": "8.38.0", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-visitor-keys": "^3.4.0", + "espree": "^9.5.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-kuzzle": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/eslint-plugin-kuzzle/-/eslint-plugin-kuzzle-0.0.6.tgz", + "integrity": "sha512-1tWOBxr0Fpe7yVFh3WLwrN8jgjaA39yKM0ohAkLNAN22P4HvPrN2rk0EhEUA8UFrpuRpX4wp4sF1HYUXJ2786g==", + "dev": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "^5.38.0", + "@typescript-eslint/parser": "^5.38.0", + "eslint": "^8.23.1", + "eslint-plugin-prettier": "^4.2.1", + "prettier": "^2.7.1" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "eslint": ">=7.28.0", + "prettier": ">=2.0.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", + "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/espree": { + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", + "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", + "dev": true, + "dependencies": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espresso-logic-minimizer": { + "version": "2.0.3", "resolved": "https://registry.npmjs.org/espresso-logic-minimizer/-/espresso-logic-minimizer-2.0.3.tgz", "integrity": "sha512-aAt/cDIr9UorriIVadPZIOhozHBsWwWEaJj18zzkNJsPgxPOFWP5SSiw5ZJt4J+l60+qQr5yehXdF/DKGg7+Mg==", "hasInstallScript": true, @@ -1624,6 +2299,66 @@ "node": ">=6" } }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", @@ -1673,15 +2408,47 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "optional": true, - "peer": true + "devOptional": true + }, + "node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "optional": true, - "peer": true + "devOptional": true }, "node_modules/fast-json-stringify": { "version": "2.7.9", @@ -1699,6 +2466,12 @@ "node": ">= 10.0.0" } }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, "node_modules/fast-redact": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.0.2.tgz", @@ -1755,6 +2528,15 @@ "xtend": "^4.0.2" } }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, "node_modules/fastseries": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fastseries/-/fastseries-2.0.0.tgz", @@ -1782,12 +2564,36 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", "peer": true }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -1802,6 +2608,34 @@ "node": ">=8" } }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/flatstr": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/flatstr/-/flatstr-1.0.12.tgz", @@ -1809,6 +2643,12 @@ "optional": true, "peer": true }, + "node_modules/flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, "node_modules/fn.name": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", @@ -1877,8 +2717,7 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "peer": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "node_modules/function-bind": { "version": "1.1.1", @@ -1962,27 +2801,85 @@ "has-symbols": "^1.0.1" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "peer": true, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" }, "engines": { - "node": "*" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/glossy": { @@ -2000,6 +2897,12 @@ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "peer": true }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -2027,7 +2930,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "peer": true, "engines": { "node": ">=8" } @@ -2174,6 +3076,15 @@ ], "peer": true }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, "node_modules/ignore-walk": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz", @@ -2183,11 +3094,26 @@ "minimatch": "^3.0.4" } }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "peer": true, "engines": { "node": ">=0.8.19" } @@ -2211,7 +3137,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "peer": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -2220,8 +3145,7 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "peer": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "node_modules/ini": { "version": "1.3.8", @@ -2389,6 +3313,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-finite": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", @@ -2411,6 +3344,18 @@ "node": ">=8" } }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-integer": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-integer/-/is-integer-1.0.7.tgz", @@ -2467,6 +3412,15 @@ "optional": true, "peer": true }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/is-number-object": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", @@ -2483,6 +3437,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-promise": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", @@ -2571,8 +3534,17 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "peer": true + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "node_modules/js-sdsl": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", + "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } }, "node_modules/js-tokens": { "version": "4.0.0", @@ -2581,6 +3553,18 @@ "optional": true, "peer": true }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -2592,8 +3576,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "optional": true, - "peer": true + "devOptional": true }, "node_modules/json-stable-stringify": { "version": "1.0.1", @@ -2604,6 +3587,12 @@ "jsonify": "~0.0.0" } }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, "node_modules/json2yaml": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/json2yaml/-/json2yaml-1.1.0.tgz", @@ -2815,6 +3804,19 @@ "yaml": "^1.10.0" } }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", @@ -2908,6 +3910,12 @@ "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", "peer": true }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, "node_modules/lodash.omit": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", @@ -2959,7 +3967,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "peer": true, "dependencies": { "yallist": "^4.0.0" }, @@ -3067,6 +4074,28 @@ "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", "peer": true }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -3083,10 +4112,9 @@ "peer": true }, "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "peer": true, + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -3293,6 +4321,18 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "node_modules/needle": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/needle/-/needle-2.9.0.tgz", @@ -3689,7 +4729,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "peer": true, "dependencies": { "wrappy": "1" } @@ -3725,6 +4764,23 @@ "optional": true, "peer": true }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -3834,6 +4890,18 @@ "node": ">=6" } }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -3891,8 +4959,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "optional": true, - "peer": true, + "devOptional": true, "engines": { "node": ">=8" } @@ -3901,11 +4968,19 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "peer": true, "engines": { "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -3913,12 +4988,33 @@ "optional": true, "peer": true }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/pause": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10=", "peer": true }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/pino": { "version": "6.13.1", "resolved": "https://registry.npmjs.org/pino/-/pino-6.13.1.tgz", @@ -3945,6 +5041,42 @@ "optional": true, "peer": true }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.7.tgz", + "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -4016,8 +5148,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "optional": true, - "peer": true, + "devOptional": true, "engines": { "node": ">=6" } @@ -4031,6 +5162,26 @@ "node": ">= 8" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/quick-format-unescaped": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.3.tgz", @@ -4218,6 +5369,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -4250,7 +5410,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "peer": true, "engines": { "iojs": ">=1.0.0", "node": ">=0.10.0" @@ -4284,6 +5443,29 @@ "node": ">=0.12.0" } }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/rxjs": { "version": "7.3.0", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.3.0.tgz", @@ -4343,10 +5525,9 @@ } }, "node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "peer": true, + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -4377,6 +5558,27 @@ "optional": true, "peer": true }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -4407,6 +5609,15 @@ "is-arrayish": "^0.3.1" } }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -4619,22 +5830,20 @@ } }, "node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "peer": true, + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dependencies": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" }, "engines": { "node": ">=8" } }, "node_modules/strip-ansi/node_modules/ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "peer": true, + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "engines": { "node": ">=8" } @@ -4652,7 +5861,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "peer": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -4683,6 +5891,12 @@ "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", "peer": true }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -4705,10 +5919,22 @@ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "peer": true, "dependencies": { - "os-tmpdir": "~1.0.2" + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" }, "engines": { - "node": ">=0.6.0" + "node": ">=8.0" } }, "node_modules/to-source-code": { @@ -4751,12 +5977,12 @@ "peer": true }, "node_modules/ts-node": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.2.1.tgz", - "integrity": "sha512-hCnyOyuGmD5wHleOQX6NIjJtYVIO8bPP8F2acWkB4W06wdlkgyvJtubO/I9NkI88hCFECbsEgoLc0VNkYmcSfw==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, "dependencies": { - "@cspotcode/source-map-support": "0.6.1", + "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", @@ -4767,18 +5993,17 @@ "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, "bin": { "ts-node": "dist/bin.js", "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", "ts-node-script": "dist/bin-script.js", "ts-node-transpile-only": "dist/bin-transpile.js", "ts-script": "dist/bin-script-deprecated.js" }, - "engines": { - "node": ">=12.0.0" - }, "peerDependencies": { "@swc/core": ">=1.2.50", "@swc/wasm": ">=1.2.50", @@ -4800,12 +6025,45 @@ "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", "peer": true }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, "node_modules/type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", "peer": true }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-fest": { "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", @@ -4819,16 +6077,16 @@ } }, "node_modules/typescript": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.2.tgz", - "integrity": "sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", + "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=12.20" } }, "node_modules/unbox-primitive": { @@ -4902,8 +6160,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "optional": true, - "peer": true, + "devOptional": true, "dependencies": { "punycode": "^2.1.0" } @@ -4935,6 +6192,12 @@ "integrity": "sha512-1YaUwux9uJIlvtczyWKuD+MtgF0ors71SGicvjYpOAN5d4SW11YXuxY5R3UD9M94xZbVEScgY/2Eyy+Pe6A+Lw==", "peer": true }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -4968,7 +6231,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "peer": true, "dependencies": { "isexe": "^2.0.0" }, @@ -5152,6 +6414,15 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -5172,8 +6443,7 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "peer": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "node_modules/ws": { "version": "7.5.4", @@ -5217,8 +6487,7 @@ "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "peer": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/yaml": { "version": "1.10.2", @@ -5265,6 +6534,18 @@ "node": ">=6" } }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/zeromq": { "version": "6.0.0-beta.6", "resolved": "https://registry.npmjs.org/zeromq/-/zeromq-6.0.0-beta.6.tgz", @@ -5367,19 +6648,13 @@ } } }, - "@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", - "dev": true - }, "@cspotcode/source-map-support": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.6.1.tgz", - "integrity": "sha512-DX3Z+T5dt1ockmPdobJS/FAsQPW4V4SrWEhD2iYQT2Cb2tQsiMnYxrcUH9By/Z3B+v0S5LMBkQtV/XOBbpLEOg==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, "requires": { - "@cspotcode/source-map-consumer": "0.8.0" + "@jridgewell/trace-mapping": "0.3.9" } }, "@dabh/diagnostics": { @@ -5425,6 +6700,52 @@ "secure-json-parse": "^2.4.0" } }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz", + "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==", + "dev": true + }, + "@eslint/eslintrc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz", + "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.5.1", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + } + } + }, + "@eslint/js": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.38.0.tgz", + "integrity": "sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==", + "dev": true + }, "@flatten-js/interval-tree": { "version": "1.0.14", "resolved": "https://registry.npmjs.org/@flatten-js/interval-tree/-/interval-tree-1.0.14.tgz", @@ -5437,6 +6758,77 @@ "integrity": "sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw==", "peer": true }, + "@humanwhocodes/config-array": { + "version": "0.11.8", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", + "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, + "@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, "@npmcli/fs": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.0.0.tgz", @@ -5562,6 +6954,12 @@ "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", "dev": true }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true + }, "@types/long": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.1.tgz", @@ -5569,9 +6967,9 @@ "peer": true }, "@types/node": { - "version": "16.7.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.9.tgz", - "integrity": "sha512-KktxVzS4FPDFVHUUOWyZMvRo//8vqOLITtLMhFSW9IdLsYT/sPyXj3wXtaTcR7A7olCe7R2Xy7R+q5pg2bU46g==" + "version": "18.15.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.11.tgz", + "integrity": "sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q==" }, "@types/normalize-package-data": { "version": "2.4.1", @@ -5580,6 +6978,111 @@ "optional": true, "peer": true }, + "@types/semver": { + "version": "7.3.13", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", + "dev": true + }, + "@typescript-eslint/eslint-plugin": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.0.tgz", + "integrity": "sha512-p0QgrEyrxAWBecR56gyn3wkG15TJdI//eetInP3zYRewDh0XS+DhB3VUAd3QqvziFsfaQIoIuZMxZRB7vXYaYw==", + "dev": true, + "requires": { + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/type-utils": "5.59.0", + "@typescript-eslint/utils": "5.59.0", + "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/parser": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.0.tgz", + "integrity": "sha512-qK9TZ70eJtjojSUMrrEwA9ZDQ4N0e/AuoOIgXuNBorXYcBDk397D2r5MIe1B3cok/oCtdNC5j+lUUpVB+Dpb+w==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/typescript-estree": "5.59.0", + "debug": "^4.3.4" + } + }, + "@typescript-eslint/scope-manager": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.0.tgz", + "integrity": "sha512-tsoldKaMh7izN6BvkK6zRMINj4Z2d6gGhO2UsI8zGZY3XhLq1DndP3Ycjhi1JwdwPRwtLMW4EFPgpuKhbCGOvQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/visitor-keys": "5.59.0" + } + }, + "@typescript-eslint/type-utils": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.0.tgz", + "integrity": "sha512-d/B6VSWnZwu70kcKQSCqjcXpVH+7ABKH8P1KNn4K7j5PXXuycZTPXF44Nui0TEm6rbWGi8kc78xRgOC4n7xFgA==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "5.59.0", + "@typescript-eslint/utils": "5.59.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/types": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.0.tgz", + "integrity": "sha512-yR2h1NotF23xFFYKHZs17QJnB51J/s+ud4PYU4MqdZbzeNxpgUr05+dNeCN/bb6raslHvGdd6BFCkVhpPk/ZeA==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.0.tgz", + "integrity": "sha512-sUNnktjmI8DyGzPdZ8dRwW741zopGxltGs/SAPgGL/AAgDpiLsCFLcMNSpbfXfmnNeHmK9h3wGmCkGRGAoUZAg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/visitor-keys": "5.59.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/utils": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.0.tgz", + "integrity": "sha512-GGLFd+86drlHSvPgN/el6dRQNYYGOvRSDVydsUaQluwIW3HvbXuxyuD5JETvBt/9qGYe+lOrDk6gRrWOHb/FvA==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.59.0", + "@typescript-eslint/types": "5.59.0", + "@typescript-eslint/typescript-estree": "5.59.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.59.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.0.tgz", + "integrity": "sha512-qZ3iXxQhanchCeaExlKPV3gDQFxMUmU35xfd5eCXB6+kUw1TUAbIy2n7QIrwz9s98DQLzNWyHp61fY0da4ZcbA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.59.0", + "eslint-visitor-keys": "^3.3.0" + } + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -5587,11 +7090,18 @@ "peer": true }, "acorn": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", - "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", "dev": true }, + "acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, "acorn-walk": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.1.tgz", @@ -5694,8 +7204,7 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "optional": true, - "peer": true, + "devOptional": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -5722,7 +7231,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "peer": true, "requires": { "color-convert": "^2.0.1" } @@ -5781,6 +7289,18 @@ "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", @@ -5850,8 +7370,7 @@ "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "peer": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "base64-js": { "version": "1.5.1", @@ -5925,12 +7444,20 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "peer": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, "breadth-filter": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/breadth-filter/-/breadth-filter-2.0.0.tgz", @@ -6024,11 +7551,16 @@ "get-intrinsic": "^1.0.2" } }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, "chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "peer": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -6147,7 +7679,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "peer": true, "requires": { "color-name": "~1.1.4" } @@ -6155,8 +7686,7 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "peer": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "color-string": { "version": "1.6.0", @@ -6187,8 +7717,7 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "peer": true + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "console-control-strings": { "version": "1.1.0", @@ -6228,6 +7757,17 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, "d": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", @@ -6245,10 +7785,9 @@ "peer": true }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "peer": true, + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "requires": { "ms": "2.1.2" }, @@ -6256,8 +7795,7 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "peer": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" } } }, @@ -6267,6 +7805,12 @@ "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "peer": true }, + "deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, "deepmerge": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", @@ -6329,6 +7873,24 @@ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "dumpme": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/dumpme/-/dumpme-1.0.3.tgz", @@ -6609,29 +8171,239 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "peer": true }, + "eslint": { + "version": "8.38.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.38.0.tgz", + "integrity": "sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.4.0", + "@eslint/eslintrc": "^2.0.2", + "@eslint/js": "8.38.0", + "@humanwhocodes/config-array": "^0.11.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.1.1", + "eslint-visitor-keys": "^3.4.0", + "espree": "^9.5.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "grapheme-splitter": "^1.0.4", + "ignore": "^5.2.0", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-sdsl": "^4.1.4", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "strip-ansi": "^6.0.1", + "strip-json-comments": "^3.1.0", + "text-table": "^0.2.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "eslint-scope": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz", + "integrity": "sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + } + }, + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + } + } + }, + "eslint-plugin-kuzzle": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/eslint-plugin-kuzzle/-/eslint-plugin-kuzzle-0.0.6.tgz", + "integrity": "sha512-1tWOBxr0Fpe7yVFh3WLwrN8jgjaA39yKM0ohAkLNAN22P4HvPrN2rk0EhEUA8UFrpuRpX4wp4sF1HYUXJ2786g==", + "dev": true, + "requires": { + "@typescript-eslint/eslint-plugin": "^5.38.0", + "@typescript-eslint/parser": "^5.38.0", + "eslint": "^8.23.1", + "eslint-plugin-prettier": "^4.2.1", + "prettier": "^2.7.1" + } + }, + "eslint-plugin-prettier": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-visitor-keys": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz", + "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==", + "dev": true + }, + "espree": { + "version": "9.5.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz", + "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==", + "dev": true, + "requires": { + "acorn": "^8.8.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.0" + } + }, "espresso-logic-minimizer": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/espresso-logic-minimizer/-/espresso-logic-minimizer-2.0.3.tgz", "integrity": "sha512-aAt/cDIr9UorriIVadPZIOhozHBsWwWEaJj18zzkNJsPgxPOFWP5SSiw5ZJt4J+l60+qQr5yehXdF/DKGg7+Mg==", "peer": true, "requires": { - "bindings": "^1.5.0", - "debug": "^4.1.1", - "nan": "^2.14.0", - "tmp": "0.1.0" + "bindings": "^1.5.0", + "debug": "^4.1.1", + "nan": "^2.14.0", + "tmp": "0.1.0" + }, + "dependencies": { + "tmp": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz", + "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==", + "peer": true, + "requires": { + "rimraf": "^2.6.3" + } + } + } + }, + "esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" }, "dependencies": { - "tmp": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz", - "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==", - "peer": true, - "requires": { - "rimraf": "^2.6.3" - } + "estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true } } }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, "event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", @@ -6680,15 +8452,43 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "optional": true, - "peer": true + "devOptional": true + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "fast-glob": { + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "optional": true, - "peer": true + "devOptional": true }, "fast-json-stringify": { "version": "2.7.9", @@ -6703,6 +8503,12 @@ "string-similarity": "^4.0.1" } }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, "fast-redact": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.0.2.tgz", @@ -6752,6 +8558,15 @@ "xtend": "^4.0.2" } }, + "fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, "fastseries": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fastseries/-/fastseries-2.0.0.tgz", @@ -6773,12 +8588,30 @@ "escape-string-regexp": "^1.0.5" } }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", "peer": true }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -6790,6 +8623,27 @@ "path-exists": "^4.0.0" } }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "dependencies": { + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, "flatstr": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/flatstr/-/flatstr-1.0.12.tgz", @@ -6797,6 +8651,12 @@ "optional": true, "peer": true }, + "flatted": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", + "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "dev": true + }, "fn.name": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", @@ -6864,8 +8724,7 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "peer": true + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "function-bind": { "version": "1.1.1", @@ -6943,7 +8802,6 @@ "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "peer": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -6953,6 +8811,46 @@ "path-is-absolute": "^1.0.0" } }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, + "globals": { + "version": "13.20.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", + "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + }, + "dependencies": { + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, "glossy": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/glossy/-/glossy-0.1.7.tgz", @@ -6965,6 +8863,12 @@ "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", "peer": true }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -6985,8 +8889,7 @@ "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "peer": true + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, "has-symbols": { "version": "1.0.2", @@ -7095,6 +8998,12 @@ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", "peer": true }, + "ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true + }, "ignore-walk": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz", @@ -7104,11 +9013,20 @@ "minimatch": "^3.0.4" } }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "peer": true + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" }, "indent-string": { "version": "4.0.0", @@ -7126,7 +9044,6 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "peer": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -7135,8 +9052,7 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "peer": true + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { "version": "1.3.8", @@ -7263,6 +9179,12 @@ "has-tostringtag": "^1.0.0" } }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true + }, "is-finite": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", @@ -7276,6 +9198,15 @@ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "peer": true }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, "is-integer": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/is-integer/-/is-integer-1.0.7.tgz", @@ -7323,6 +9254,12 @@ "optional": true, "peer": true }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, "is-number-object": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", @@ -7333,6 +9270,12 @@ "has-tostringtag": "^1.0.0" } }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, "is-promise": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", @@ -7391,8 +9334,13 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "peer": true + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "js-sdsl": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", + "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", + "dev": true }, "js-tokens": { "version": "4.0.0", @@ -7401,6 +9349,15 @@ "optional": true, "peer": true }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -7412,8 +9369,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "optional": true, - "peer": true + "devOptional": true }, "json-stable-stringify": { "version": "1.0.1", @@ -7424,6 +9380,12 @@ "jsonify": "~0.0.0" } }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, "json2yaml": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/json2yaml/-/json2yaml-1.1.0.tgz", @@ -7603,6 +9565,16 @@ "yaml": "^1.10.0" } }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, "lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", @@ -7690,6 +9662,12 @@ "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", "peer": true }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, "lodash.omit": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", @@ -7735,7 +9713,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "peer": true, "requires": { "yallist": "^4.0.0" } @@ -7833,6 +9810,22 @@ } } }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "requires": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + } + }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -7846,10 +9839,9 @@ "peer": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "peer": true, + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" } @@ -8008,6 +10000,18 @@ "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==", "peer": true }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "needle": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/needle/-/needle-2.9.0.tgz", @@ -8340,7 +10344,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "peer": true, "requires": { "wrappy": "1" } @@ -8370,6 +10373,20 @@ "optional": true, "peer": true }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, "ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -8452,6 +10469,15 @@ "optional": true, "peer": true }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -8494,14 +10520,18 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "optional": true, - "peer": true + "devOptional": true }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "peer": true + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true }, "path-parse": { "version": "1.0.7", @@ -8510,12 +10540,24 @@ "optional": true, "peer": true }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, "pause": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10=", "peer": true }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, "pino": { "version": "6.13.1", "resolved": "https://registry.npmjs.org/pino/-/pino-6.13.1.tgz", @@ -8539,6 +10581,27 @@ "optional": true, "peer": true }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prettier": { + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.7.tgz", + "integrity": "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw==", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -8602,8 +10665,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "optional": true, - "peer": true + "devOptional": true }, "qlobber": { "version": "5.0.3", @@ -8611,6 +10673,12 @@ "integrity": "sha512-wW4GTZPePyh0RgOsM18oDyOUlXfurVRgoNyJfS+y7VWPyd0GYhQp5T2tycZFZjonH+hngxIfklGJhTP/ghidgQ==", "peer": true }, + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true + }, "quick-format-unescaped": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.3.tgz", @@ -8765,6 +10833,12 @@ "path-parse": "^1.0.6" } }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, "restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -8790,8 +10864,7 @@ "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "peer": true + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" }, "rfdc": { "version": "1.3.0", @@ -8815,6 +10888,15 @@ "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", "peer": true }, + "run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "requires": { + "queue-microtask": "^1.2.2" + } + }, "rxjs": { "version": "7.3.0", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.3.0.tgz", @@ -8859,10 +10941,9 @@ } }, "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", - "peer": true, + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==", "requires": { "lru-cache": "^6.0.0" } @@ -8887,6 +10968,21 @@ "optional": true, "peer": true }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -8914,6 +11010,12 @@ "is-arrayish": "^0.3.1" } }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, "smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -9096,19 +11198,17 @@ } }, "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "peer": true, + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "requires": { - "ansi-regex": "^5.0.0" + "ansi-regex": "^5.0.1" }, "dependencies": { "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "peer": true + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" } } }, @@ -9122,7 +11222,6 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "peer": true, "requires": { "has-flag": "^4.0.0" } @@ -9147,6 +11246,12 @@ "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", "peer": true }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -9172,6 +11277,15 @@ "os-tmpdir": "~1.0.2" } }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, "to-source-code": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/to-source-code/-/to-source-code-1.0.2.tgz", @@ -9212,12 +11326,12 @@ "peer": true }, "ts-node": { - "version": "10.2.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.2.1.tgz", - "integrity": "sha512-hCnyOyuGmD5wHleOQX6NIjJtYVIO8bPP8F2acWkB4W06wdlkgyvJtubO/I9NkI88hCFECbsEgoLc0VNkYmcSfw==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, "requires": { - "@cspotcode/source-map-support": "0.6.1", + "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", @@ -9228,6 +11342,7 @@ "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" } }, @@ -9237,12 +11352,38 @@ "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", "peer": true }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, "type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", "peer": true }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, "type-fest": { "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", @@ -9250,9 +11391,9 @@ "peer": true }, "typescript": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.2.tgz", - "integrity": "sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", + "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", "dev": true }, "unbox-primitive": { @@ -9319,8 +11460,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "optional": true, - "peer": true, + "devOptional": true, "requires": { "punycode": "^2.1.0" } @@ -9348,6 +11488,12 @@ "integrity": "sha512-1YaUwux9uJIlvtczyWKuD+MtgF0ors71SGicvjYpOAN5d4SW11YXuxY5R3UD9M94xZbVEScgY/2Eyy+Pe6A+Lw==", "peer": true }, + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -9378,7 +11524,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "peer": true, "requires": { "isexe": "^2.0.0" } @@ -9526,6 +11671,12 @@ } } }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", @@ -9540,8 +11691,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "peer": true + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "ws": { "version": "7.5.4", @@ -9565,8 +11715,7 @@ "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "peer": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "yaml": { "version": "1.10.2", @@ -9601,6 +11750,12 @@ "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + }, "zeromq": { "version": "6.0.0-beta.6", "resolved": "https://registry.npmjs.org/zeromq/-/zeromq-6.0.0-beta.6.tgz", diff --git a/package.json b/package.json index 2372809..53d8d3a 100644 --- a/package.json +++ b/package.json @@ -2,20 +2,34 @@ "name": "kuzzle-plugin-commons", "version": "1.0.6", "description": "Common classes for developping Kuzzle plugins", - "main": "index.js", + "author": "The Kuzzle Team ", + "license": "Apache 2", + "repository": { + "type": "git", + "url": "https://github.com/kuzzleio/kuzzle-plugin-commons" + }, + "main": "dist/index.js", + "types": "dist/index.d.ts", "scripts": { "build": "tsc --build tsconfig.json", - "clean": "npm run build | grep TSFILE | cut -d' ' -f 2 | xargs rm", - "package:create": "npm run build && npm pack" + "package:create": "npm run build && npm pack", + "test:lint": "eslint ./lib --ext .ts --config .eslintrc.json", + "test:lint:fix": "npm run test:lint -- --fix", + "test:types": "tsc --noEmit" }, - "author": "The Kuzzle Team ", - "license": "Apache 2", "devDependencies": { - "@types/node": "^16.6.1", - "ts-node": "^10.2.0", - "typescript": "^4.3.5" + "@types/node": "^18.15.11", + "eslint-plugin-kuzzle": "^0.0.6", + "ts-node": "^10.9.1", + "typescript": "^5.0.4" }, "peerDependencies": { "kuzzle": "^2.14.0" + }, + "files": [ + "dist/*" + ], + "publishConfig": { + "registry": "https://npm.pkg.github.com" } } diff --git a/tsconfig.json b/tsconfig.json index a136feb..a48eec4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,7 @@ "sourceMap": true, "baseUrl": ".", "resolveJsonModule": true, + "outDir": "dist/", "esModuleInterop": true }, "rootDir": "lib/", @@ -18,4 +19,4 @@ "exclude": [ "node_modules" ] -} \ No newline at end of file +}