From b6294e9a0ddbee5b438eaee0c87590d82ee92dcb Mon Sep 17 00:00:00 2001 From: Roma-Kyrnis Date: Thu, 4 Jan 2024 22:51:25 +0200 Subject: [PATCH 1/2] feat: add import readMigrations function in the Database class; remove comments from migrations --- jest.config.js | 3 +- package.json | 2 +- src/Database.ts | 11 ++++++- src/__tests__/data/migrations.data.ts | 45 +++++++++++++++++++++++++++ src/__tests__/index.test.ts | 42 +++++++++++++++++++++++++ src/utils/migrate.ts | 5 ++- 6 files changed, 104 insertions(+), 4 deletions(-) create mode 100644 src/__tests__/data/migrations.data.ts diff --git a/jest.config.js b/jest.config.js index 170133e..5026a63 100755 --- a/jest.config.js +++ b/jest.config.js @@ -9,7 +9,8 @@ module.exports = { testPathIgnorePatterns: [ '/build', '/node_modules/', - '/vendor-typings' + '/vendor-typings', + '__tests__/data' ], coverageThreshold: { global: { diff --git a/package.json b/package.json index 3dd1a06..7351a05 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sqlite", - "version": "5.1.1", + "version": "5.1.2", "description": "SQLite client for Node.js applications with SQL-based migrations API written in Typescript", "main": "build/index.js", "types": "build/index.d.ts", diff --git a/src/Database.ts b/src/Database.ts index 5dee837..bb15ef6 100755 --- a/src/Database.ts +++ b/src/Database.ts @@ -2,7 +2,7 @@ import * as sqlite3 from 'sqlite3' import { ISqlite, IMigrate } from './interfaces' import { Statement } from './Statement' -import { migrate } from './utils/migrate' +import { migrate, readMigrations } from './utils/migrate' import { toSqlParams } from './utils/strings' import MigrationParams = IMigrate.MigrationParams @@ -365,6 +365,15 @@ export class Database< await migrate(this, config) } + /** + * Performs a database migration read operation. + * @returns List of objects with name, id of migrations and SQL code for up and down migration + * You can run up and down with `db.exec(migrations[0].up)` or `db.exec(migrations[0].down)`. Or with other commands that can run SQL code. + */ + readMigrations (migrationPath?: string): Promise { + return readMigrations(migrationPath) + } + /** * The methods underneath requires creative work to implement. PRs / proposals accepted! */ diff --git a/src/__tests__/data/migrations.data.ts b/src/__tests__/data/migrations.data.ts new file mode 100644 index 0000000..f473bc4 --- /dev/null +++ b/src/__tests__/data/migrations.data.ts @@ -0,0 +1,45 @@ +export const initial001 = { + up: `CREATE TABLE Category ( + id INTEGER PRIMARY KEY, + name TEXT NOT NULL +); + +CREATE TABLE Post ( + id INTEGER PRIMARY KEY, + categoryId INTEGER NOT NULL, + title TEXT NOT NULL, + isPublished NUMERIC NOT NULL DEFAULT 0, + CONSTRAINT Post_fk_categoryId FOREIGN KEY (categoryId) + REFERENCES Category (id) ON UPDATE CASCADE ON DELETE CASCADE, + CONSTRAINT Post_ck_isPublished CHECK (isPublished IN (0, 1)) +); + +CREATE INDEX Post_ix_categoryId ON Post (categoryId); + +INSERT INTO Category (id, name) VALUES (1, 'Test');`, + down: `DROP INDEX Post_ix_categoryId; +DROP TABLE Post; +DROP TABLE Category;` +} + +export const someFeature002 = { + up: `CREATE TABLE Test ( + id INTEGER PRIMARY KEY, + name TEXT NOT NULL +);`, + down: `DROP TABLE Test;` +} + +export const testCert003 = { + up: `CREATE TABLE whatever ( certificate TEXT ); +INSERT INTO whatever ( certificate ) VALUES ( + '-----BEGIN CERTIFICATE----- +some contents +-----END CERTIFICATE-----');`, + down: `DROP TABLE whatever;` +} + +export const noDown004 = { + up: `CREATE TABLE IF NOT EXISTS downless ( value TEXT ); +INSERT INTO downless ( value ) VALUES ('down migration is optional');` +} diff --git a/src/__tests__/index.test.ts b/src/__tests__/index.test.ts index 8950c0b..a4cf865 100755 --- a/src/__tests__/index.test.ts +++ b/src/__tests__/index.test.ts @@ -4,6 +4,13 @@ import { open } from '..' import * as sqlite3 from 'sqlite3' +import { + initial001, + noDown004, + someFeature002, + testCert003 +} from './data/migrations.data' + describe('index', () => { // enable the sqlite cached database or not const driver = [ @@ -40,6 +47,41 @@ describe('index', () => { }) }) + driver.forEach(c => { + it(`should return list of migrations with name, id, down and up variables, cached = ${ + c.cached + }`, async () => { + // const expectedData = + const db = await open({ + filename: ':memory:', + driver: c.driver + }) + + await db.migrate() + + const migrations = await db.readMigrations() + + expect(migrations).toEqual([ + { id: 1, name: 'initial', up: initial001.up, down: initial001.down }, + { + id: 2, + name: 'some-feature', + up: someFeature002.up, + down: someFeature002.down + }, + { + id: 3, + name: 'test-cert', + up: testCert003.up, + down: testCert003.down + }, + { id: 4, name: 'no-down', up: noDown004.up, down: '' } + ]) + + await db.close() + }) + }) + /* disabled since sqlite3-offline-next hasn't been maintained in two years and there are no recent builds compatible with newer versions of node it('should allow an anonymous database', async () => { diff --git a/src/utils/migrate.ts b/src/utils/migrate.ts index 559e48e..f8d907b 100755 --- a/src/utils/migrate.ts +++ b/src/utils/migrate.ts @@ -49,8 +49,11 @@ export async function readMigrations (migrationPath?: string) { return reject(err) } - const [up, down] = data.split(/^--\s+?down\b/im) + const [up, down] = data + .split(/^--\s+?down\b/im) + .map(value => value.replace(/^-{3,}$/gim, '').trim()) + delete migration.filename const migrationData = migration as Partial migrationData.up = up.replace(/^-- .*?$/gm, '').trim() // Remove comments migrationData.down = down ? down.trim() : '' // and trim whitespaces From f8cec0ba0286a13183641f7489fb3530d96a7a22 Mon Sep 17 00:00:00 2001 From: Roma-Kyrnis Date: Sat, 20 Jan 2024 19:49:10 +0200 Subject: [PATCH 2/2] update prettier-standard to use on Object; add Migrations class, remove migration's methods from Database, move tests and update tests --- .circleci/config.yml | 4 +- CHANGELOG.md | 62 +- README.md | 103 +- docs/classes/_src_database_.database.md | 300 +- docs/classes/_src_statement_.statement.md | 158 +- docs/globals.md | 12 +- ..._src_interfaces_.imigrate.migrationfile.md | 46 +- ...rc_interfaces_.imigrate.migrationparams.md | 24 +- .../_src_interfaces_.isqlite.config.md | 30 +- .../_src_interfaces_.isqlite.runresult.md | 28 +- .../_src_interfaces_.isqlite.sqlobj.md | 18 +- docs/modules/_src_database_.md | 2 +- docs/modules/_src_index_.md | 20 +- docs/modules/_src_interfaces_.imigrate.md | 4 +- docs/modules/_src_interfaces_.isqlite.md | 24 +- docs/modules/_src_interfaces_.md | 4 +- docs/modules/_src_statement_.md | 2 +- docs/modules/_src_utils_migrate_.md | 18 +- docs/modules/_src_utils_strings_.md | 18 +- jest.config.js | 5 +- package-lock.json | 2674 ++++++++++++++++- package.json | 2 +- src/Database.ts | 21 +- src/Migrations.ts | 207 ++ .../Migrations.test.ts} | 24 +- src/__tests__/Sqlite3.test.ts | 5 +- src/__tests__/index.test.ts | 40 +- src/index.mjs | 15 +- src/index.ts | 3 +- src/interfaces.ts | 1 + src/utils/migrate.ts | 140 - tsconfig.json | 17 +- 32 files changed, 3295 insertions(+), 736 deletions(-) create mode 100644 src/Migrations.ts rename src/{utils/__tests__/migrate.test.ts => __tests__/Migrations.test.ts} (65%) delete mode 100755 src/utils/migrate.ts diff --git a/.circleci/config.yml b/.circleci/config.yml index 7ff0901..288fef0 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,7 @@ jobs: # You need to add a deploy key with write permission in order for the CI to commit changes # back to the repo # https://circleci.com/docs/2.0/gh-bb-integration/#adding-readwrite-deployment-keys-to-github-or-bitbucket - - "30:87:05:71:0d:09:ab:2f:d6:02:5e:24:64:1a:ce:6a" + - '30:87:05:71:0d:09:ab:2f:d6:02:5e:24:64:1a:ce:6a' # Download and cache dependencies so subsequent builds run faster - restore_cache: keys: @@ -71,7 +71,7 @@ jobs: # You need to add a deploy key with write permission in order for the CI to commit changes # back to the repo # https://circleci.com/docs/2.0/gh-bb-integration/#adding-readwrite-deployment-keys-to-github-or-bitbucket - - "c0:d3:c4:b7:ee:55:37:0e:3a:a4:ba:42:a4:c6:9b:04" + - 'c0:d3:c4:b7:ee:55:37:0e:3a:a4:ba:42:a4:c6:9b:04' # Download and cache dependencies so subsequent builds run faster - restore_cache: keys: diff --git a/CHANGELOG.md b/CHANGELOG.md index a58c65a..8ae589a 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ -## 5.1.1 - Wed Nov 01 2023 23:59:09 - -**Contributor:** Theo Gravity - -- Update vendor typings to use sqlite3 (#176) - +## 5.1.1 - Wed Nov 01 2023 23:59:09 + +**Contributor:** Theo Gravity + +- Update vendor typings to use sqlite3 (#176) + ## 5.0.1 - Tue Jul 11 2023 17:36:14 **Contributor:** Aleksandr Ananin @@ -76,6 +76,7 @@ that may handle errors in their own way prior to this fix. - Bump browserslist from 4.16.3 to 4.16.6 (#145) Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.16.3 to 4.16.6. + - [Release notes](https://github.com/browserslist/browserslist/releases) - [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md) - [Commits](https://github.com/browserslist/browserslist/compare/4.16.3...4.16.6) @@ -91,6 +92,7 @@ Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.c - Bump handlebars from 4.7.6 to 4.7.7 (#141) Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.7.6 to 4.7.7. + - [Release notes](https://github.com/wycats/handlebars.js/releases) - [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md) - [Commits](https://github.com/wycats/handlebars.js/compare/v4.7.6...v4.7.7) @@ -112,6 +114,7 @@ Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.c - Bump y18n from 4.0.0 to 4.0.1 (#139) Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1. + - [Release notes](https://github.com/yargs/y18n/releases) - [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/yargs/y18n/commits) @@ -127,6 +130,7 @@ Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.c - Bump ini from 1.3.5 to 1.3.8 (#135) Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8. + - [Release notes](https://github.com/isaacs/ini/releases) - [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8) @@ -141,6 +145,7 @@ Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.c - Bump highlight.js from 10.1.2 to 10.4.1 (#133) Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 10.1.2 to 10.4.1. + - [Release notes](https://github.com/highlightjs/highlight.js/releases) - [Changelog](https://github.com/highlightjs/highlight.js/blob/master/CHANGES.md) - [Commits](https://github.com/highlightjs/highlight.js/compare/10.1.2...10.4.1) @@ -192,6 +197,7 @@ This allows for the specification of an anonymous database. - Bump lodash from 4.17.15 to 4.17.19 (#122) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. + - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) @@ -281,41 +287,43 @@ If you are using an older version of node < 10, use the 3.x version of the libra What's new: - ZERO dependencies! - * This should make troubleshooting the library vs the `sqlite3` driver easier. Most issues relate - to the `sqlite3` driver vs the library. - * Allows support for alternative drivers such as `sqlite3-offline` as long as they match the `node-sqlite3` - API. + - This should make troubleshooting the library vs the `sqlite3` driver easier. Most issues relate + to the `sqlite3` driver vs the library. + - Allows support for alternative drivers such as `sqlite3-offline` as long as they match the `node-sqlite3` + API. - Re-written in Typescript. - All existing features maintained. - Existing unit tests were cleaned up and pass, new tests added. - Better documentation. See `README.md`. - New CI process - pull requests merged into master will run tests, build, and auto-publish to NPM. - Parity with the `node-sqlite3` API. - * Exceptions are `serialize` and `parallelize` (PRs are welcomed!) + - Exceptions are `serialize` and `parallelize` (PRs are welcomed!) Breaking Changes: -- `sqlite3` is no longer a dependency of this project. You must install it first -before using this wrapper library. - * This allows for usage of alternative libraries. - * This means `verbose` and `cache` modes must be enabled before using the library. - * The `README.md` file explains how to do this. +- `sqlite3` is no longer a dependency of this project. You must install it first + before using this wrapper library. + - This allows for usage of alternative libraries. + - This means `verbose` and `cache` modes must be enabled before using the library. + - The `README.md` file explains how to do this. - Opening a new database has changed. See `README.md` for example. - migrations API: `force` is now a `boolean`. - Can no longer specify a custom `Promise` library. Uses native `Promise` instead. - ###### [v3.0.3] + > 2019-03-22 - Export class types for flow [##88](https://github.com/kriasoft/node-sqlite/pull/88) ###### [v3.0.2] + > 2019-02-14 - Flow: Add Flow typings [##86](https://github.com/kriasoft/node-sqlite/pull/86) ###### [v3.0.1] + > 2019-01-28 - Typescript: Add cached option to open function [##81](https://github.com/kriasoft/node-sqlite/pull/81) @@ -324,21 +332,25 @@ before using this wrapper library. - Apply `npm audit` fixes (`mocha` updated to latest) ###### [v3.0.0] + > 2018-08-22 - Add support for ES6 tagged template strings ([##66](https://github.com/kriasoft/node-sqlite/pull/66)) ###### [v2.9.3] + > 2018-08-22 - Change baseline `sqlite3` version from `4.0.0` -> `^4.0.0` ([##71](https://github.com/kriasoft/node-sqlite/pull/71)) ###### [v2.9.2] + > 2018-04-20 - Bump up baseline `sqlite3` version from `3.1.13` -> `4.0.0` ([##56](https://github.com/kriasoft/node-sqlite/pull/56)) ###### [v2.9.1] + > 2018-01-13 - Expose the `sqlite3##configure` method ([##53](https://github.com/kriasoft/node-sqlite/pull/53)) @@ -348,71 +360,84 @@ before using this wrapper library. - Typescript updates ([##47](https://github.com/kriasoft/node-sqlite/pull/47)) ###### [v2.9.0] + > 2017-11-27 - Move away from global db object in readme ([##45](https://github.com/kriasoft/node-sqlite/pull/45)) -- Fix typescript 2.6.1 issue where *.d.ts contains executable code when it is no longer allowed ([##47](https://github.com/kriasoft/node-sqlite/pull/47)) +- Fix typescript 2.6.1 issue where \*.d.ts contains executable code when it is no longer allowed ([##47](https://github.com/kriasoft/node-sqlite/pull/47)) - Fix readme typo ([##46](https://github.com/kriasoft/node-sqlite/pull/49)) - Bump up baseline `sqlite3` version from `3.1.8` -> `3.1.13` ###### [v2.8.0] + > 2017-05-21 - Match only “down” as separator in migration files ([##32](https://github.com/kriasoft/node-sqlite/pull/32)) ###### [v2.7.0] + > 2017-05-01 - Added support to use the [database object cache](https://github.com/mapbox/node-sqlite3/wiki/Caching) as an option (see readme) ###### [v2.6.0] + > 2017-04-30 - Migration bug fixed where valid multiple dashes (eg a PEM string) was being removed ([##28](https://github.com/kriasoft/node-sqlite/pull/28)) ###### [v2.5.0] + > 2017-03-23 - npm publish'd from the wrong area. 2.4.0 is unpublished, 2.5.0 is the latest. ###### [v2.4.0] + > 2017-03-23 - Typescript updates - Make ambient declarations more useful for type inference ([##26](https://github.com/kriasoft/node-sqlite/pull/26)) ###### [v2.3.0] + > 2017-01-31 - Fix a bug sorting of schemas during migrations ([##25](https://github.com/kriasoft/node-sqlite/pull/17)) ###### [v2.2.4] + > 2016-12-10 - Add TypeScript definition ([##21](https://github.com/kriasoft/node-sqlite/pull/21)) ###### [v2.2.3] + > 2016-11-10 - Update `sqlite3` package to 3.1.8 - Use `external-helpers` plugin in Babel config (ref [##12](https://github.com/kriasoft/node-sqlite/issues/12)) ###### [v2.2.2] + > 2016-11-02 - Fix duplicate migration application when db.migrate() is run multiple times ([##19](https://github.com/kriasoft/node-sqlite/pull/9)) ###### [v2.2.1] + > 2016-10-26 - Update `sqlite3` package to 3.1.7 ([##17](https://github.com/kriasoft/node-sqlite/pull/17), [changelog](https://github.com/mapbox/node-sqlite3/blob/master/CHANGELOG.md)) ###### [v2.2.0] + > 2016-07-22 - Add named parameters support (https://github.com/kriasoft/node-sqlite/pull/10) - `Statement` now has `sql()`, `lastId()`, `changes()` ###### [v2.0.2] + > 2016-05-21 - Add SQL-based migrations API: `db.migrate({ force: 'last' })` @@ -421,6 +446,7 @@ before using this wrapper library. - Add async wrapper for `sqlite3` Statement object ###### [v1.0.0] + > 2016-05-19 - The initial release after a couple of preview versions earlier this year diff --git a/README.md b/README.md index 9bb6f10..70d4e37 100755 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # SQLite Client for Node.js Apps [![NPM version](https://img.shields.io/npm/v/sqlite.svg?style=flat-square)](https://www.npmjs.com/package/sqlite) -[![CircleCI](https://circleci.com/gh/kriasoft/node-sqlite.svg?style=svg)](https://circleci.com/gh/kriasoft/node-sqlite) -![built with typescript](https://camo.githubusercontent.com/92e9f7b1209bab9e3e9cd8cdf62f072a624da461/68747470733a2f2f666c61742e62616467656e2e6e65742f62616467652f4275696c74253230576974682f547970655363726970742f626c7565) +[![CircleCI](https://circleci.com/gh/kriasoft/node-sqlite.svg?style=svg)](https://circleci.com/gh/kriasoft/node-sqlite) +![built with typescript](https://camo.githubusercontent.com/92e9f7b1209bab9e3e9cd8cdf62f072a624da461/68747470733a2f2f666c61742e62616467656e2e6e65742f62616467652f4275696c74253230576974682f547970655363726970742f626c7565) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) -> A wrapper library written in Typescript with **ZERO** dependencies that adds ES6 promises +> A wrapper library written in Typescript with **ZERO** dependencies that adds ES6 promises > and SQL-based migrations API to [sqlite3](https://github.com/mapbox/node-sqlite3/) ([docs](https://github.com/mapbox/node-sqlite3/wiki)). **note** v4 of `sqlite` has breaking changes compared to v3! Please see `CHANGELOG.md` for more details. @@ -54,10 +54,10 @@ ### Install `sqlite3` -Most people who use this library will use [sqlite3](https://github.com/mapbox/node-sqlite3/) -as the database driver. +Most people who use this library will use [sqlite3](https://github.com/mapbox/node-sqlite3/) +as the database driver. -Any library that conforms to the `sqlite3` ([API](https://github.com/mapbox/node-sqlite3/wiki/API)) +Any library that conforms to the `sqlite3` ([API](https://github.com/mapbox/node-sqlite3/wiki/API)) should also work. `$ npm install sqlite3 --save` @@ -86,15 +86,16 @@ except that all its API methods return ES6 Promises and do not accept callback a import sqlite3 from 'sqlite3' import { open } from 'sqlite' -// this is a top-level await -(async () => { - // open the database - const db = await open({ - filename: '/tmp/database.db', - driver: sqlite3.Database - }) +// this is a top-level await +;(async () => { + // open the database + const db = await open({ + filename: '/tmp/database.db', + driver: sqlite3.Database + }) })() ``` + or ```typescript @@ -104,7 +105,7 @@ import { open } from 'sqlite' open({ filename: '/tmp/database.db', driver: sqlite3.Database -}).then((db) => { +}).then(db => { // do your thing }) ``` @@ -131,12 +132,11 @@ If you want to enable the [database object cache](https://github.com/mapbox/node ```typescript import sqlite3 from 'sqlite3' import { open } from 'sqlite' - -(async () => { - const db = await open({ - filename: '/tmp/database.db', - driver: sqlite3.cached.Database - }) +;(async () => { + const db = await open({ + filename: '/tmp/database.db', + driver: sqlite3.cached.Database + }) })() ``` @@ -153,9 +153,7 @@ sqlite3.verbose() For more info, see this [doc](https://github.com/mapbox/node-sqlite3/wiki/Debugging#databaseontrace-callback). ```typescript -db.on('trace', (data) => { - -}) +db.on('trace', data => {}) ``` #### With a custom driver @@ -167,12 +165,11 @@ For example, using `sqlite3-offline-next`: ```typescript import sqlite3Offline from 'sqlite3-offline-next' import { open } from 'sqlite' - -(async () => { - const db = await open({ - filename: '/tmp/database.db', - driver: sqlite3Offline.Database - }) +;(async () => { + const db = await open({ + filename: '/tmp/database.db', + driver: sqlite3Offline.Database + }) })() ``` @@ -181,8 +178,7 @@ import { open } from 'sqlite' ```typescript import sqlite3 from 'sqlite3' import { open } from 'sqlite' - -(async () => { +;(async () => { const [db1, db2] = await Promise.all([ open({ filename: '/tmp/database.db', @@ -191,7 +187,7 @@ import { open } from 'sqlite' open({ filename: '/tmp/database2.db', driver: sqlite3.Database - }), + }) ]) await db1.migrate({ @@ -206,7 +202,7 @@ import { open } from 'sqlite' #### `open` config params -```typescript +````typescript // db is an instance of `sqlite#Database` // which is a wrapper around `sqlite3#Database` @@ -240,7 +236,7 @@ const db = await open({ */ driver: any }) -``` +```` ### Examples @@ -288,10 +284,7 @@ const result = await db.all('SELECT col FROM tbl') #### Inserting rows ```typescript -const result = await db.run( - 'INSERT INTO tbl (col) VALUES (?)', - 'foo' -) +const result = await db.run('INSERT INTO tbl (col) VALUES (?)', 'foo') /* { @@ -404,10 +397,12 @@ This module is compatible with [sql-template-strings](https://www.npmjs.com/pack ```js import SQL from 'sql-template-strings' -const book = 'harry potter'; -const author = 'J. K. Rowling'; +const book = 'harry potter' +const author = 'J. K. Rowling' -const data = await db.all(SQL`SELECT author FROM books WHERE name = ${book} AND author = ${author}`); +const data = await db.all( + SQL`SELECT author FROM books WHERE name = ${book} AND author = ${author}` +) ``` ### Migrations @@ -420,7 +415,7 @@ and call the `migrate()` method to run the SQL in the directory against the data See this project's `migrations/` folder for examples. ```typescript -await db.migrate({ +await db.migrate({ /** * If true, will force the migration API to rollback and re-apply the latest migration over * again each time when Node.js app launches. @@ -466,7 +461,6 @@ and the typescript compiler to perform better static type analysis. #### Get example ```typescript - interface Row { col: string } @@ -485,7 +479,7 @@ interface Row { // Result is an array of rows, you can now have array-autocompletion data const result = await db.all('SELECT col FROM tbl') -result.each((row) => { +result.each(row => { // row should have type information now! }) ``` @@ -498,35 +492,36 @@ See the [`docs`](docs/globals.md) directory for full documentation. - [Beekeeper Studio](https://www.beekeeperstudio.io/): Open Source SQL Editor and Database Manager - [DB Browser for SQLite](https://github.com/sqlitebrowser/sqlitebrowser): Desktop-based browser. -- [datasette](https://github.com/simonw/datasette): Datasette is a tool for exploring and publishing -data. Starts up a server that provides a web interface to your SQLite data. +- [datasette](https://github.com/simonw/datasette): Datasette is a tool for exploring and publishing + data. Starts up a server that provides a web interface to your SQLite data. - [SQLite Studio](https://github.com/pawelsalawa/sqlitestudio): A free, open source, multi-platform SQLite database manager written in C++, with use of Qt framework. - [HeidiSQL](https://www.heidisql.com/): Full-featured database editor. -- [DBeaver](https://dbeaver.io/): Full-featured multi-platform database tool and designer. +- [DBeaver](https://dbeaver.io/): Full-featured multi-platform database tool and designer. ## Alternative SQLite libraries This library and the library it primarily supports, `sqlite3`, may not be the best library that fits your use-case. You might want to try these other SQLite libraries: -- [better-sqlite3](https://github.com/JoshuaWise/better-sqlite3): Totes itself as the fastest and -simplest library for SQLite3 in Node.js. +- [better-sqlite3](https://github.com/JoshuaWise/better-sqlite3): Totes itself as the fastest and + simplest library for SQLite3 in Node.js. - [Bun sqlite3](https://github.com/Jarred-Sumner/bun#bunsqlite-sqlite3-module): `bun:sqlite` is a high-performance builtin SQLite3 module for `bun.js`. - [sql.js](https://github.com/sql-js/sql.js): SQLite compiled to Webassembly. -- [sqlite3-offline-next](https://github.com/nicolaiort/sqlite3-offline-next): Offers pre-compiled `sqlite3` -binaries if your machine cannot compile it. Should be mostly compatible with this library. +- [sqlite3-offline-next](https://github.com/nicolaiort/sqlite3-offline-next): Offers pre-compiled `sqlite3` + binaries if your machine cannot compile it. Should be mostly compatible with this library. If you know of any others, feel free to open a PR to add them to the list. ## References -* [Using SQLite with Node.js for Rapid Prototyping](https://medium.com/@tarkus/node-js-and-sqlite-for-rapid-prototyping-bc9cf1f26f10) on Medium.com -* [SQLite Documentation](https://www.sqlite.org/docs.html), e.g. [SQL Syntax](https://www.sqlite.org/lang.html), [Data Types](https://www.sqlite.org/datatype3.html) etc. on SQLite.org -* ES6 tagged [sql-template-strings](https://www.npmjs.com/package/sql-template-strings). +- [Using SQLite with Node.js for Rapid Prototyping](https://medium.com/@tarkus/node-js-and-sqlite-for-rapid-prototyping-bc9cf1f26f10) on Medium.com +- [SQLite Documentation](https://www.sqlite.org/docs.html), e.g. [SQL Syntax](https://www.sqlite.org/lang.html), [Data Types](https://www.sqlite.org/datatype3.html) etc. on SQLite.org +- ES6 tagged [sql-template-strings](https://www.npmjs.com/package/sql-template-strings). ## License The MIT License © 2020-present Kriasoft / Theo Gravity. All rights reserved. --- + Made with ♥ by [Konstantin Tarkus](https://github.com/koistya) ([@koistya](https://twitter.com/koistya)), [Theo Gravity](https://github.com/theogravity) and [contributors](https://github.com/kriasoft/node-sqlite/graphs/contributors) diff --git a/docs/classes/_src_database_.database.md b/docs/classes/_src_database_.database.md index eb310fc..fa72622 100644 --- a/docs/classes/_src_database_.database.md +++ b/docs/classes/_src_database_.database.md @@ -6,82 +6,82 @@ Promisified wrapper for the sqlite3#Database interface. ## Type parameters -▪ **Driver**: *Database* +▪ **Driver**: _Database_ -▪ **Stmt**: *Statement* +▪ **Stmt**: _Statement_ ## Hierarchy -* **Database** +- **Database** ## Index ### Constructors -* [constructor](_src_database_.database.md#constructor) +- [constructor](_src_database_.database.md#constructor) ### Properties -* [config](_src_database_.database.md#config) -* [db](_src_database_.database.md#db) +- [config](_src_database_.database.md#config) +- [db](_src_database_.database.md#db) ### Methods -* [all](_src_database_.database.md#all) -* [close](_src_database_.database.md#close) -* [configure](_src_database_.database.md#configure) -* [each](_src_database_.database.md#each) -* [exec](_src_database_.database.md#exec) -* [get](_src_database_.database.md#get) -* [getDatabaseInstance](_src_database_.database.md#getdatabaseinstance) -* [loadExtension](_src_database_.database.md#loadextension) -* [migrate](_src_database_.database.md#migrate) -* [on](_src_database_.database.md#on) -* [open](_src_database_.database.md#open) -* [parallelize](_src_database_.database.md#parallelize) -* [prepare](_src_database_.database.md#prepare) -* [run](_src_database_.database.md#run) -* [serialize](_src_database_.database.md#serialize) +- [all](_src_database_.database.md#all) +- [close](_src_database_.database.md#close) +- [configure](_src_database_.database.md#configure) +- [each](_src_database_.database.md#each) +- [exec](_src_database_.database.md#exec) +- [get](_src_database_.database.md#get) +- [getDatabaseInstance](_src_database_.database.md#getdatabaseinstance) +- [loadExtension](_src_database_.database.md#loadextension) +- [migrate](_src_database_.database.md#migrate) +- [on](_src_database_.database.md#on) +- [open](_src_database_.database.md#open) +- [parallelize](_src_database_.database.md#parallelize) +- [prepare](_src_database_.database.md#prepare) +- [run](_src_database_.database.md#run) +- [serialize](_src_database_.database.md#serialize) ## Constructors -### constructor +### constructor -\+ **new Database**(`config`: [Config](../interfaces/_src_interfaces_.isqlite.config.md)): *[Database](_src_database_.database.md)* +\+ **new Database**(`config`: [Config](../interfaces/_src_interfaces_.isqlite.config.md)): _[Database](\_src_database_.database.md)\_ -*Defined in [src/Database.ts:18](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L18)* +_Defined in [src/Database.ts:18](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L18)_ **Parameters:** -Name | Type | ------- | ------ | -`config` | [Config](../interfaces/_src_interfaces_.isqlite.config.md) | +| Name | Type | +| -------- | ---------------------------------------------------------- | +| `config` | [Config](../interfaces/_src_interfaces_.isqlite.config.md) | -**Returns:** *[Database](_src_database_.database.md)* +**Returns:** _[Database](\_src_database_.database.md)\_ ## Properties -### config +### config -• **config**: *[Config](../interfaces/_src_interfaces_.isqlite.config.md)* +• **config**: _[Config](../interfaces/\_src_interfaces_.isqlite.config.md)\_ -*Defined in [src/Database.ts:17](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L17)* +_Defined in [src/Database.ts:17](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L17)_ -___ +--- -### db +### db -• **db**: *Driver* +• **db**: _Driver_ -*Defined in [src/Database.ts:18](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L18)* +_Defined in [src/Database.ts:18](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L18)_ ## Methods -### all +### all -▸ **all**‹**T**›(`sql`: [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype), ...`params`: any[]): *Promise‹T›* +▸ **all**‹**T**›(`sql`: [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype), ...`params`: any[]): _Promise‹T›_ -*Defined in [src/Database.ts:255](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L255)* +_Defined in [src/Database.ts:255](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L255)_ Runs the SQL query with the specified parameters. The parameters are the same as the Database#run function, with the following differences: @@ -103,51 +103,51 @@ Statement#get calls to retrieve a previously unknown amount of rows. **Parameters:** -Name | Type | Description | ------- | ------ | ------ | -`sql` | [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype) | The SQL query to run. | -`...params` | any[] | - | +| Name | Type | Description | +| ----------- | --------------------------------------------------------- | --------------------- | +| `sql` | [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype) | The SQL query to run. | +| `...params` | any[] | - | -**Returns:** *Promise‹T›* +**Returns:** _Promise‹T›_ -___ +--- -### close +### close -▸ **close**(): *Promise‹void›* +▸ **close**(): _Promise‹void›_ -*Defined in [src/Database.ts:79](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L79)* +_Defined in [src/Database.ts:79](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L79)_ Closes the database. -**Returns:** *Promise‹void›* +**Returns:** _Promise‹void›_ -___ +--- -### configure +### configure -▸ **configure**(`option`: [ConfigureOption](../modules/_src_interfaces_.isqlite.md#configureoption), `value`: any): *any* +▸ **configure**(`option`: [ConfigureOption](../modules/_src_interfaces_.isqlite.md#configureoption), `value`: any): _any_ -*Defined in [src/Database.ts:94](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L94)* +_Defined in [src/Database.ts:94](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L94)_ **`see`** https://github.com/mapbox/node-sqlite3/wiki/API#databaseconfigureoption-value **Parameters:** -Name | Type | ------- | ------ | -`option` | [ConfigureOption](../modules/_src_interfaces_.isqlite.md#configureoption) | -`value` | any | +| Name | Type | +| -------- | ------------------------------------------------------------------------- | +| `option` | [ConfigureOption](../modules/_src_interfaces_.isqlite.md#configureoption) | +| `value` | any | -**Returns:** *any* +**Returns:** _any_ -___ +--- -### each +### each -▸ **each**‹**T**›(`sql`: [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype), ...`params`: any[]): *Promise‹number›* +▸ **each**‹**T**›(`sql`: [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype), ...`params`: any[]): _Promise‹number›_ -*Defined in [src/Database.ts:187](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L187)* +_Defined in [src/Database.ts:187](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L187)_ Runs the SQL query with the specified parameters and calls the callback once for each result row. The parameters are the same as the Database#run function, with the following differences: @@ -158,11 +158,11 @@ The order of calls correspond exactly to the order of rows in the result set. There is currently no way to abort execution! -The last parameter to each() *must* be a callback function. +The last parameter to each() _must_ be a callback function. -**`example`** await db.each('SELECT * FROM x WHERE y = ?', 'z', (err, row) => { - // row contains the row data - // each() resolves when there are no more rows to fetch +**`example`** await db.each('SELECT \* FROM x WHERE y = ?', 'z', (err, row) => { +// row contains the row data +// each() resolves when there are no more rows to fetch }) **`see`** https://github.com/mapbox/node-sqlite3/wiki/API#databaseeachsql-param--callback-complete @@ -173,22 +173,22 @@ The last parameter to each() *must* be a callback function. **Parameters:** -Name | Type | ------- | ------ | -`sql` | [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype) | -`...params` | any[] | +| Name | Type | +| ----------- | --------------------------------------------------------- | +| `sql` | [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype) | +| `...params` | any[] | -**Returns:** *Promise‹number›* +**Returns:** _Promise‹number›_ Promise Number of rows returned -___ +--- -### exec +### exec -▸ **exec**(`sql`: [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype)): *Promise‹void›* +▸ **exec**(`sql`: [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype)): _Promise‹void›_ -*Defined in [src/Database.ts:280](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L280)* +_Defined in [src/Database.ts:280](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L280)_ Runs all SQL queries in the supplied string. No result rows are retrieved. If a query fails, no subsequent statements will be executed (wrap it in a transaction if you want all @@ -201,19 +201,19 @@ Comments are not allowed and will lead to runtime errors. **Parameters:** -Name | Type | Description | ------- | ------ | ------ | -`sql` | [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype) | The SQL query to run. | +| Name | Type | Description | +| ----- | --------------------------------------------------------- | --------------------- | +| `sql` | [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype) | The SQL query to run. | -**Returns:** *Promise‹void›* +**Returns:** _Promise‹void›_ -___ +--- -### get +### get -▸ **get**‹**T**›(`sql`: [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype), ...`params`: any[]): *Promise‹T | undefined›* +▸ **get**‹**T**›(`sql`: [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype), ...`params`: any[]): _Promise‹T | undefined›_ -*Defined in [src/Database.ts:150](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L150)* +_Defined in [src/Database.ts:150](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L150)_ Runs the SQL query with the specified parameters and resolves with with the first result row afterwards. If the result set is empty, returns undefined. @@ -229,68 +229,68 @@ It is impossible to access them by column index; the only supported way is by co **Parameters:** -Name | Type | Description | ------- | ------ | ------ | -`sql` | [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype) | The SQL query to run. | -`...params` | any[] | - | +| Name | Type | Description | +| ----------- | --------------------------------------------------------- | --------------------- | +| `sql` | [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype) | The SQL query to run. | +| `...params` | any[] | - | -**Returns:** *Promise‹T | undefined›* +**Returns:** _Promise‹T | undefined›_ -___ +--- -### getDatabaseInstance +### getDatabaseInstance -▸ **getDatabaseInstance**(): *Driver* +▸ **getDatabaseInstance**(): _Driver_ -*Defined in [src/Database.ts:36](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L36)* +_Defined in [src/Database.ts:36](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L36)_ Returns the underlying sqlite3 Database instance -**Returns:** *Driver* +**Returns:** _Driver_ -___ +--- -### loadExtension +### loadExtension -▸ **loadExtension**(`path`: string): *Promise‹unknown›* +▸ **loadExtension**(`path`: string): _Promise‹unknown›_ -*Defined in [src/Database.ts:325](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L325)* +_Defined in [src/Database.ts:325](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L325)_ Loads a compiled SQLite extension into the database connection object. **Parameters:** -Name | Type | Description | ------- | ------ | ------ | -`path` | string | Filename of the extension to load | +| Name | Type | Description | +| ------ | ------ | --------------------------------- | +| `path` | string | Filename of the extension to load | -**Returns:** *Promise‹unknown›* +**Returns:** _Promise‹unknown›_ -___ +--- -### migrate +### migrate -▸ **migrate**(`config?`: [MigrationParams](../interfaces/_src_interfaces_.imigrate.migrationparams.md)): *Promise‹void›* +▸ **migrate**(`config?`: [MigrationParams](../interfaces/_src_interfaces_.imigrate.migrationparams.md)): _Promise‹void›_ -*Defined in [src/Database.ts:340](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L340)* +_Defined in [src/Database.ts:340](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L340)_ Performs a database migration. **Parameters:** -Name | Type | ------- | ------ | -`config?` | [MigrationParams](../interfaces/_src_interfaces_.imigrate.migrationparams.md) | +| Name | Type | +| --------- | ----------------------------------------------------------------------------- | +| `config?` | [MigrationParams](../interfaces/_src_interfaces_.imigrate.migrationparams.md) | -**Returns:** *Promise‹void›* +**Returns:** _Promise‹void›_ -___ +--- -### on +### on -▸ **on**(`event`: string, `listener`: any): *void* +▸ **on**(`event`: string, `listener`: any): _void_ -*Defined in [src/Database.ts:29](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L29)* +_Defined in [src/Database.ts:29](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L29)_ Event handler when verbose mode is enabled. @@ -298,64 +298,64 @@ Event handler when verbose mode is enabled. **Parameters:** -Name | Type | ------- | ------ | -`event` | string | -`listener` | any | +| Name | Type | +| ---------- | ------ | +| `event` | string | +| `listener` | any | -**Returns:** *void* +**Returns:** _void_ -___ +--- -### open +### open -▸ **open**(): *Promise‹void›* +▸ **open**(): _Promise‹void›_ -*Defined in [src/Database.ts:43](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L43)* +_Defined in [src/Database.ts:43](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L43)_ Opens the database -**Returns:** *Promise‹void›* +**Returns:** _Promise‹void›_ -___ +--- -### parallelize +### parallelize -▸ **parallelize**(): *void* +▸ **parallelize**(): _void_ -*Defined in [src/Database.ts:360](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L360)* +_Defined in [src/Database.ts:360](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L360)_ -**Returns:** *void* +**Returns:** _void_ -___ +--- -### prepare +### prepare -▸ **prepare**(`sql`: [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype), ...`params`: any[]): *Promise‹[Statement](_src_statement_.statement.md)‹Stmt››* +▸ **prepare**(`sql`: [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype), ...`params`: any[]): _Promise‹[Statement](\_src_statement_.statement.md)‹Stmt››\_ -*Defined in [src/Database.ts:306](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L306)* +_Defined in [src/Database.ts:306](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L306)_ Prepares the SQL statement and optionally binds the specified parameters. When bind parameters are supplied, they are bound to the prepared statement. **Parameters:** -Name | Type | Description | ------- | ------ | ------ | -`sql` | [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype) | The SQL query to run. | -`...params` | any[] | - | +| Name | Type | Description | +| ----------- | --------------------------------------------------------- | --------------------- | +| `sql` | [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype) | The SQL query to run. | +| `...params` | any[] | - | -**Returns:** *Promise‹[Statement](_src_statement_.statement.md)‹Stmt››* +**Returns:** _Promise‹[Statement](\_src_statement_.statement.md)‹Stmt››\_ Promise Statement object -___ +--- -### run +### run -▸ **run**(`sql`: [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype), ...`params`: any[]): *Promise‹[RunResult](../interfaces/_src_interfaces_.isqlite.runresult.md)‹Stmt››* +▸ **run**(`sql`: [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype), ...`params`: any[]): _Promise‹[RunResult](../interfaces/\_src_interfaces_.isqlite.runresult.md)‹Stmt››\_ -*Defined in [src/Database.ts:112](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L112)* +_Defined in [src/Database.ts:112](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L112)_ Runs the SQL query with the specified parameters. It does not retrieve any result data. The function returns the Database object for which it was called to allow for function chaining. @@ -364,21 +364,21 @@ The function returns the Database object for which it was called to allow for fu **Parameters:** -Name | Type | Description | ------- | ------ | ------ | -`sql` | [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype) | The SQL query to run. | -`...params` | any[] | - | +| Name | Type | Description | +| ----------- | --------------------------------------------------------- | --------------------- | +| `sql` | [SqlType](../modules/_src_interfaces_.isqlite.md#sqltype) | The SQL query to run. | +| `...params` | any[] | - | -**Returns:** *Promise‹[RunResult](../interfaces/_src_interfaces_.isqlite.runresult.md)‹Stmt››* +**Returns:** _Promise‹[RunResult](../interfaces/\_src_interfaces_.isqlite.runresult.md)‹Stmt››\_ -___ +--- -### serialize +### serialize -▸ **serialize**(): *void* +▸ **serialize**(): _void_ -*Defined in [src/Database.ts:351](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L351)* +_Defined in [src/Database.ts:351](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Database.ts#L351)_ The methods underneath requires creative work to implement. PRs / proposals accepted! -**Returns:** *void* +**Returns:** _void_ diff --git a/docs/classes/_src_statement_.statement.md b/docs/classes/_src_statement_.statement.md index 1ecd80e..fb59785 100644 --- a/docs/classes/_src_statement_.statement.md +++ b/docs/classes/_src_statement_.statement.md @@ -6,64 +6,64 @@ Promisified wrapper for the sqlite3#Statement interface. ## Type parameters -▪ **S**: *Statement* +▪ **S**: _Statement_ ## Hierarchy -* **Statement** +- **Statement** ## Index ### Constructors -* [constructor](_src_statement_.statement.md#constructor) +- [constructor](_src_statement_.statement.md#constructor) ### Properties -* [stmt](_src_statement_.statement.md#stmt) +- [stmt](_src_statement_.statement.md#stmt) ### Methods -* [all](_src_statement_.statement.md#all) -* [bind](_src_statement_.statement.md#bind) -* [each](_src_statement_.statement.md#each) -* [finalize](_src_statement_.statement.md#finalize) -* [get](_src_statement_.statement.md#get) -* [getStatementInstance](_src_statement_.statement.md#getstatementinstance) -* [reset](_src_statement_.statement.md#reset) -* [run](_src_statement_.statement.md#run) +- [all](_src_statement_.statement.md#all) +- [bind](_src_statement_.statement.md#bind) +- [each](_src_statement_.statement.md#each) +- [finalize](_src_statement_.statement.md#finalize) +- [get](_src_statement_.statement.md#get) +- [getStatementInstance](_src_statement_.statement.md#getstatementinstance) +- [reset](_src_statement_.statement.md#reset) +- [run](_src_statement_.statement.md#run) ## Constructors -### constructor +### constructor -\+ **new Statement**(`stmt`: S): *[Statement](_src_statement_.statement.md)* +\+ **new Statement**(`stmt`: S): _[Statement](\_src_statement_.statement.md)\_ -*Defined in [src/Statement.ts:8](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L8)* +_Defined in [src/Statement.ts:8](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L8)_ **Parameters:** -Name | Type | ------- | ------ | -`stmt` | S | +| Name | Type | +| ------ | ---- | +| `stmt` | S | -**Returns:** *[Statement](_src_statement_.statement.md)* +**Returns:** _[Statement](\_src_statement_.statement.md)\_ ## Properties -### stmt +### stmt -• **stmt**: *S* +• **stmt**: _S_ -*Defined in [src/Statement.ts:8](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L8)* +_Defined in [src/Statement.ts:8](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L8)_ ## Methods -### all +### all -▸ **all**‹**T**›(...`params`: any[]): *Promise‹T›* +▸ **all**‹**T**›(...`params`: any[]): _Promise‹T›_ -*Defined in [src/Statement.ts:146](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L146)* +_Defined in [src/Statement.ts:146](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L146)_ Binds parameters, executes the statement and calls the callback with all result rows. The parameters are the same as the Statement#run function, with the following differences: @@ -80,19 +80,19 @@ Like with Statement#run, the statement will not be finalized after executing thi **Parameters:** -Name | Type | ------- | ------ | -`...params` | any[] | +| Name | Type | +| ----------- | ----- | +| `...params` | any[] | -**Returns:** *Promise‹T›* +**Returns:** _Promise‹T›_ -___ +--- -### bind +### bind -▸ **bind**(...`params`: any[]): *Promise‹void›* +▸ **bind**(...`params`: any[]): _Promise‹void›_ -*Defined in [src/Statement.ts:27](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L27)* +_Defined in [src/Statement.ts:27](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L27)_ Binds parameters to the prepared statement. @@ -101,19 +101,19 @@ and removes all previously bound parameters, if any. **Parameters:** -Name | Type | ------- | ------ | -`...params` | any[] | +| Name | Type | +| ----------- | ----- | +| `...params` | any[] | -**Returns:** *Promise‹void›* +**Returns:** _Promise‹void›_ -___ +--- -### each +### each -▸ **each**‹**T**›(...`params`: any[]): *Promise‹number›* +▸ **each**‹**T**›(...`params`: any[]): _Promise‹number›_ -*Defined in [src/Statement.ts:180](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L180)* +_Defined in [src/Statement.ts:180](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L180)_ Binds parameters, executes the statement and calls the callback for each result row. @@ -125,12 +125,12 @@ Like with Statement#run, the statement will not be finalized after executing thi There is currently no way to abort execution! -The last parameter to each() *must* be a callback function, where the first parameter will +The last parameter to each() _must_ be a callback function, where the first parameter will be the returned row. **`example`** await stmt.each('someParamValue', (err, row) => { - // row contains the row data - // each() resolves when there are no more rows to fetch +// row contains the row data +// each() resolves when there are no more rows to fetch }) **`see`** https://github.com/mapbox/node-sqlite3/wiki/API#statementeachparam--callback-complete @@ -141,21 +141,21 @@ be the returned row. **Parameters:** -Name | Type | ------- | ------ | -`...params` | any[] | +| Name | Type | +| ----------- | ----- | +| `...params` | any[] | -**Returns:** *Promise‹number›* +**Returns:** _Promise‹number›_ Promise Number of rows returned -___ +--- -### finalize +### finalize -▸ **finalize**(): *Promise‹void›* +▸ **finalize**(): _Promise‹void›_ -*Defined in [src/Statement.ts:58](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L58)* +_Defined in [src/Statement.ts:58](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L58)_ Finalizes the statement. This is typically optional, but if you experience long delays before the next query is executed, explicitly finalizing your statement might be necessary. @@ -163,15 +163,15 @@ This might be the case when you run an exclusive query (see section Control Flow After the statement is finalized, all further function calls on that statement object will throw errors. -**Returns:** *Promise‹void›* +**Returns:** _Promise‹void›_ -___ +--- -### get +### get -▸ **get**‹**T**›(...`params`: any[]): *Promise‹T | undefined›* +▸ **get**‹**T**›(...`params`: any[]): _Promise‹T | undefined›_ -*Defined in [src/Statement.ts:118](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L118)* +_Defined in [src/Statement.ts:118](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L118)_ Binds parameters, executes the statement and retrieves the first result row. The parameters are the same as the Statement#run function, with the following differences: @@ -187,44 +187,44 @@ or reset (with Statement#reset) the statement. **Parameters:** -Name | Type | ------- | ------ | -`...params` | any[] | +| Name | Type | +| ----------- | ----- | +| `...params` | any[] | -**Returns:** *Promise‹T | undefined›* +**Returns:** _Promise‹T | undefined›_ -___ +--- -### getStatementInstance +### getStatementInstance -▸ **getStatementInstance**(): *S* +▸ **getStatementInstance**(): _S_ -*Defined in [src/Statement.ts:17](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L17)* +_Defined in [src/Statement.ts:17](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L17)_ Returns the underlying sqlite3 Statement instance -**Returns:** *S* +**Returns:** _S_ -___ +--- -### reset +### reset -▸ **reset**(): *Promise‹void›* +▸ **reset**(): _Promise‹void›_ -*Defined in [src/Statement.ts:43](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L43)* +_Defined in [src/Statement.ts:43](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L43)_ Resets the row cursor of the statement and preserves the parameter bindings. Use this function to re-execute the same query with the same bindings. -**Returns:** *Promise‹void›* +**Returns:** _Promise‹void›_ -___ +--- -### run +### run -▸ **run**(...`params`: any[]): *Promise‹[RunResult](../interfaces/_src_interfaces_.isqlite.runresult.md)›* +▸ **run**(...`params`: any[]): _Promise‹[RunResult](../interfaces/\_src_interfaces_.isqlite.runresult.md)›\_ -*Defined in [src/Statement.ts:85](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L85)* +_Defined in [src/Statement.ts:85](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/Statement.ts#L85)_ Binds parameters and executes the statement. @@ -236,8 +236,8 @@ statement will not be finalized after it is run. This means you can run it multi **Parameters:** -Name | Type | ------- | ------ | -`...params` | any[] | +| Name | Type | +| ----------- | ----- | +| `...params` | any[] | -**Returns:** *Promise‹[RunResult](../interfaces/_src_interfaces_.isqlite.runresult.md)›* +**Returns:** _Promise‹[RunResult](../interfaces/\_src_interfaces_.isqlite.runresult.md)›\_ diff --git a/docs/globals.md b/docs/globals.md index 8f96803..225c3a0 100644 --- a/docs/globals.md +++ b/docs/globals.md @@ -6,9 +6,9 @@ ### Modules -* ["src/Database"](modules/_src_database_.md) -* ["src/Statement"](modules/_src_statement_.md) -* ["src/index"](modules/_src_index_.md) -* ["src/interfaces"](modules/_src_interfaces_.md) -* ["src/utils/migrate"](modules/_src_utils_migrate_.md) -* ["src/utils/strings"](modules/_src_utils_strings_.md) +- ["src/Database"](modules/_src_database_.md) +- ["src/Statement"](modules/_src_statement_.md) +- ["src/index"](modules/_src_index_.md) +- ["src/interfaces"](modules/_src_interfaces_.md) +- ["src/utils/migrate"](modules/_src_utils_migrate_.md) +- ["src/utils/strings"](modules/_src_utils_strings_.md) diff --git a/docs/interfaces/_src_interfaces_.imigrate.migrationfile.md b/docs/interfaces/_src_interfaces_.imigrate.migrationfile.md index 2c070aa..718f173 100644 --- a/docs/interfaces/_src_interfaces_.imigrate.migrationfile.md +++ b/docs/interfaces/_src_interfaces_.imigrate.migrationfile.md @@ -4,54 +4,54 @@ ## Hierarchy -* **MigrationFile** +- **MigrationFile** ## Index ### Properties -* [down](_src_interfaces_.imigrate.migrationfile.md#optional-down) -* [filename](_src_interfaces_.imigrate.migrationfile.md#filename) -* [id](_src_interfaces_.imigrate.migrationfile.md#id) -* [name](_src_interfaces_.imigrate.migrationfile.md#name) -* [up](_src_interfaces_.imigrate.migrationfile.md#optional-up) +- [down](_src_interfaces_.imigrate.migrationfile.md#optional-down) +- [filename](_src_interfaces_.imigrate.migrationfile.md#filename) +- [id](_src_interfaces_.imigrate.migrationfile.md#id) +- [name](_src_interfaces_.imigrate.migrationfile.md#name) +- [up](_src_interfaces_.imigrate.migrationfile.md#optional-up) ## Properties ### `Optional` down -• **down**? : *string* +• **down**? : _string_ -*Defined in [src/interfaces.ts:103](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L103)* +_Defined in [src/interfaces.ts:103](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L103)_ -___ +--- -### filename +### filename -• **filename**: *string* +• **filename**: _string_ -*Defined in [src/interfaces.ts:101](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L101)* +_Defined in [src/interfaces.ts:101](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L101)_ -___ +--- -### id +### id -• **id**: *number* +• **id**: _number_ -*Defined in [src/interfaces.ts:99](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L99)* +_Defined in [src/interfaces.ts:99](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L99)_ -___ +--- -### name +### name -• **name**: *string* +• **name**: _string_ -*Defined in [src/interfaces.ts:100](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L100)* +_Defined in [src/interfaces.ts:100](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L100)_ -___ +--- ### `Optional` up -• **up**? : *string* +• **up**? : _string_ -*Defined in [src/interfaces.ts:102](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L102)* +_Defined in [src/interfaces.ts:102](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L102)_ diff --git a/docs/interfaces/_src_interfaces_.imigrate.migrationparams.md b/docs/interfaces/_src_interfaces_.imigrate.migrationparams.md index 21dea60..3e00213 100644 --- a/docs/interfaces/_src_interfaces_.imigrate.migrationparams.md +++ b/docs/interfaces/_src_interfaces_.imigrate.migrationparams.md @@ -4,43 +4,43 @@ ## Hierarchy -* **MigrationParams** +- **MigrationParams** ## Index ### Properties -* [force](_src_interfaces_.imigrate.migrationparams.md#optional-force) -* [migrationsPath](_src_interfaces_.imigrate.migrationparams.md#optional-migrationspath) -* [table](_src_interfaces_.imigrate.migrationparams.md#optional-table) +- [force](_src_interfaces_.imigrate.migrationparams.md#optional-force) +- [migrationsPath](_src_interfaces_.imigrate.migrationparams.md#optional-migrationspath) +- [table](_src_interfaces_.imigrate.migrationparams.md#optional-table) ## Properties ### `Optional` force -• **force**? : *boolean* +• **force**? : _boolean_ -*Defined in [src/interfaces.ts:87](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L87)* +_Defined in [src/interfaces.ts:87](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L87)_ If true, will force the migration API to rollback and re-apply the latest migration over again each time when Node.js app launches. -___ +--- ### `Optional` migrationsPath -• **migrationsPath**? : *string* +• **migrationsPath**? : _string_ -*Defined in [src/interfaces.ts:95](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L95)* +_Defined in [src/interfaces.ts:95](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L95)_ Path to the migrations folder. Default is `path.join(process.cwd(), 'migrations')` -___ +--- ### `Optional` table -• **table**? : *string* +• **table**? : _string_ -*Defined in [src/interfaces.ts:91](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L91)* +_Defined in [src/interfaces.ts:91](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L91)_ Migrations table name. Default is 'migrations' diff --git a/docs/interfaces/_src_interfaces_.isqlite.config.md b/docs/interfaces/_src_interfaces_.isqlite.config.md index 8942954..a2e1346 100644 --- a/docs/interfaces/_src_interfaces_.isqlite.config.md +++ b/docs/interfaces/_src_interfaces_.isqlite.config.md @@ -4,29 +4,29 @@ ## Hierarchy -* **Config** +- **Config** ## Index ### Properties -* [driver](_src_interfaces_.isqlite.config.md#driver) -* [filename](_src_interfaces_.isqlite.config.md#filename) -* [mode](_src_interfaces_.isqlite.config.md#optional-mode) +- [driver](_src_interfaces_.isqlite.config.md#driver) +- [filename](_src_interfaces_.isqlite.config.md#filename) +- [mode](_src_interfaces_.isqlite.config.md#optional-mode) ## Properties -### driver +### driver -• **driver**: *any* +• **driver**: _any_ -*Defined in [src/interfaces.ts:48](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L48)* +_Defined in [src/interfaces.ts:48](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L48)_ The database driver. Most will install `sqlite3` and use the `Database` class from it. As long as the library you are using conforms to the `sqlite3` API, you can use it as the driver. -**`example`** +**`example`** ``` import sqlite from 'sqlite3' @@ -34,26 +34,26 @@ import sqlite from 'sqlite3' const driver = sqlite.Database ``` -___ +--- -### filename +### filename -• **filename**: *string* +• **filename**: _string_ -*Defined in [src/interfaces.ts:27](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L27)* +_Defined in [src/interfaces.ts:27](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L27)_ Valid values are filenames, ":memory:" for an anonymous in-memory database and an empty string for an anonymous disk-based database. Anonymous databases are not persisted and when closing the database handle, their contents are lost. -___ +--- ### `Optional` mode -• **mode**? : *number* +• **mode**? : _number_ -*Defined in [src/interfaces.ts:33](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L33)* +_Defined in [src/interfaces.ts:33](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L33)_ One or more of sqlite3.OPEN_READONLY, sqlite3.OPEN_READWRITE and sqlite3.OPEN_CREATE. The default value is OPEN_READWRITE | OPEN_CREATE. diff --git a/docs/interfaces/_src_interfaces_.isqlite.runresult.md b/docs/interfaces/_src_interfaces_.isqlite.runresult.md index d9d6e72..ef7d094 100644 --- a/docs/interfaces/_src_interfaces_.isqlite.runresult.md +++ b/docs/interfaces/_src_interfaces_.isqlite.runresult.md @@ -4,53 +4,53 @@ ## Type parameters -▪ **Stmt**: *Statement* +▪ **Stmt**: _Statement_ ## Hierarchy -* **RunResult** +- **RunResult** ## Index ### Properties -* [changes](_src_interfaces_.isqlite.runresult.md#optional-changes) -* [lastID](_src_interfaces_.isqlite.runresult.md#optional-lastid) -* [stmt](_src_interfaces_.isqlite.runresult.md#stmt) +- [changes](_src_interfaces_.isqlite.runresult.md#optional-changes) +- [lastID](_src_interfaces_.isqlite.runresult.md#optional-lastid) +- [stmt](_src_interfaces_.isqlite.runresult.md#stmt) ## Properties ### `Optional` changes -• **changes**? : *number* +• **changes**? : _number_ -*Defined in [src/interfaces.ts:77](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L77)* +_Defined in [src/interfaces.ts:77](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L77)_ Number of rows changed. Only contains valid information when the query was a successfully completed UPDATE or DELETE statement. -___ +--- ### `Optional` lastID -• **lastID**? : *number* +• **lastID**? : _number_ -*Defined in [src/interfaces.ts:70](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L70)* +_Defined in [src/interfaces.ts:70](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L70)_ Row id of the inserted row. Only contains valid information when the query was a successfully completed INSERT statement. -___ +--- -### stmt +### stmt -• **stmt**: *[Statement](../classes/_src_statement_.statement.md)‹Stmt›* +• **stmt**: _[Statement](../classes/\_src_statement_.statement.md)‹Stmt›\_ -*Defined in [src/interfaces.ts:63](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L63)* +_Defined in [src/interfaces.ts:63](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L63)_ Statement object. diff --git a/docs/interfaces/_src_interfaces_.isqlite.sqlobj.md b/docs/interfaces/_src_interfaces_.isqlite.sqlobj.md index 27ed19b..43ab12d 100644 --- a/docs/interfaces/_src_interfaces_.isqlite.sqlobj.md +++ b/docs/interfaces/_src_interfaces_.isqlite.sqlobj.md @@ -4,27 +4,27 @@ ## Hierarchy -* **SqlObj** +- **SqlObj** ## Index ### Properties -* [params](_src_interfaces_.isqlite.sqlobj.md#optional-params) -* [sql](_src_interfaces_.isqlite.sqlobj.md#sql) +- [params](_src_interfaces_.isqlite.sqlobj.md#optional-params) +- [sql](_src_interfaces_.isqlite.sqlobj.md#sql) ## Properties ### `Optional` params -• **params**? : *any[]* +• **params**? : _any[]_ -*Defined in [src/interfaces.ts:11](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L11)* +_Defined in [src/interfaces.ts:11](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L11)_ -___ +--- -### sql +### sql -• **sql**: *string* +• **sql**: _string_ -*Defined in [src/interfaces.ts:10](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L10)* +_Defined in [src/interfaces.ts:10](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L10)_ diff --git a/docs/modules/_src_database_.md b/docs/modules/_src_database_.md index d4e289c..865ce9e 100644 --- a/docs/modules/_src_database_.md +++ b/docs/modules/_src_database_.md @@ -6,4 +6,4 @@ ### Classes -* [Database](../classes/_src_database_.database.md) +- [Database](../classes/_src_database_.database.md) diff --git a/docs/modules/_src_index_.md b/docs/modules/_src_index_.md index d2d9862..b4254ba 100644 --- a/docs/modules/_src_index_.md +++ b/docs/modules/_src_index_.md @@ -6,28 +6,28 @@ ### Functions -* [open](_src_index_.md#open) +- [open](_src_index_.md#open) ## Functions -### open +### open -▸ **open**‹**Driver**, **Stmt**›(`config`: [Config](../interfaces/_src_interfaces_.isqlite.config.md)): *Promise‹[Database](../classes/_src_database_.database.md)›* +▸ **open**‹**Driver**, **Stmt**›(`config`: [Config](../interfaces/_src_interfaces_.isqlite.config.md)): _Promise‹[Database](../classes/\_src_database_.database.md)›\_ -*Defined in [src/index.ts:11](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/index.ts#L11)* +_Defined in [src/index.ts:11](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/index.ts#L11)_ Opens a database for manipulation. Most users will call this to get started. **Type parameters:** -▪ **Driver**: *Database* +▪ **Driver**: _Database_ -▪ **Stmt**: *Statement* +▪ **Stmt**: _Statement_ **Parameters:** -Name | Type | ------- | ------ | -`config` | [Config](../interfaces/_src_interfaces_.isqlite.config.md) | +| Name | Type | +| -------- | ---------------------------------------------------------- | +| `config` | [Config](../interfaces/_src_interfaces_.isqlite.config.md) | -**Returns:** *Promise‹[Database](../classes/_src_database_.database.md)›* +**Returns:** _Promise‹[Database](../classes/\_src_database_.database.md)›\_ diff --git a/docs/modules/_src_interfaces_.imigrate.md b/docs/modules/_src_interfaces_.imigrate.md index a3279bd..8bd633c 100644 --- a/docs/modules/_src_interfaces_.imigrate.md +++ b/docs/modules/_src_interfaces_.imigrate.md @@ -6,5 +6,5 @@ ### Interfaces -* [MigrationFile](../interfaces/_src_interfaces_.imigrate.migrationfile.md) -* [MigrationParams](../interfaces/_src_interfaces_.imigrate.migrationparams.md) +- [MigrationFile](../interfaces/_src_interfaces_.imigrate.migrationfile.md) +- [MigrationParams](../interfaces/_src_interfaces_.imigrate.migrationparams.md) diff --git a/docs/modules/_src_interfaces_.isqlite.md b/docs/modules/_src_interfaces_.isqlite.md index e35495b..026932a 100644 --- a/docs/modules/_src_interfaces_.isqlite.md +++ b/docs/modules/_src_interfaces_.isqlite.md @@ -6,30 +6,30 @@ ### Interfaces -* [Config](../interfaces/_src_interfaces_.isqlite.config.md) -* [RunResult](../interfaces/_src_interfaces_.isqlite.runresult.md) -* [SqlObj](../interfaces/_src_interfaces_.isqlite.sqlobj.md) +- [Config](../interfaces/_src_interfaces_.isqlite.config.md) +- [RunResult](../interfaces/_src_interfaces_.isqlite.runresult.md) +- [SqlObj](../interfaces/_src_interfaces_.isqlite.sqlobj.md) ### Type aliases -* [ConfigureOption](_src_interfaces_.isqlite.md#configureoption) -* [SqlType](_src_interfaces_.isqlite.md#sqltype) +- [ConfigureOption](_src_interfaces_.isqlite.md#configureoption) +- [SqlType](_src_interfaces_.isqlite.md#sqltype) ## Type aliases -### ConfigureOption +### ConfigureOption -Ƭ **ConfigureOption**: *"trace" | "profile" | "busyTimeout"* +Ƭ **ConfigureOption**: _"trace" | "profile" | "busyTimeout"_ -*Defined in [src/interfaces.ts:51](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L51)* +_Defined in [src/interfaces.ts:51](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L51)_ -___ +--- -### SqlType +### SqlType -Ƭ **SqlType**: *SQLStatement | string* +Ƭ **SqlType**: _SQLStatement | string_ -*Defined in [src/interfaces.ts:18](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L18)* +_Defined in [src/interfaces.ts:18](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/interfaces.ts#L18)_ Allows for input of a normal SQL string or `sql-template-strings` object diff --git a/docs/modules/_src_interfaces_.md b/docs/modules/_src_interfaces_.md index 9c08186..375b145 100644 --- a/docs/modules/_src_interfaces_.md +++ b/docs/modules/_src_interfaces_.md @@ -6,5 +6,5 @@ ### Namespaces -* [IMigrate](_src_interfaces_.imigrate.md) -* [ISqlite](_src_interfaces_.isqlite.md) +- [IMigrate](_src_interfaces_.imigrate.md) +- [ISqlite](_src_interfaces_.isqlite.md) diff --git a/docs/modules/_src_statement_.md b/docs/modules/_src_statement_.md index 749e092..687d286 100644 --- a/docs/modules/_src_statement_.md +++ b/docs/modules/_src_statement_.md @@ -6,4 +6,4 @@ ### Classes -* [Statement](../classes/_src_statement_.statement.md) +- [Statement](../classes/_src_statement_.statement.md) diff --git a/docs/modules/_src_utils_migrate_.md b/docs/modules/_src_utils_migrate_.md index 6a08e62..0bf690f 100644 --- a/docs/modules/_src_utils_migrate_.md +++ b/docs/modules/_src_utils_migrate_.md @@ -6,23 +6,23 @@ ### Functions -* [migrate](_src_utils_migrate_.md#migrate) +- [migrate](_src_utils_migrate_.md#migrate) ## Functions -### migrate +### migrate -▸ **migrate**(`db`: [Database](../classes/_src_database_.database.md), `config`: [MigrationParams](../interfaces/_src_interfaces_.imigrate.migrationparams.md)): *Promise‹void›* +▸ **migrate**(`db`: [Database](../classes/_src_database_.database.md), `config`: [MigrationParams](../interfaces/_src_interfaces_.imigrate.migrationparams.md)): _Promise‹void›_ -*Defined in [src/utils/migrate.ts:12](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/utils/migrate.ts#L12)* +_Defined in [src/utils/migrate.ts:12](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/utils/migrate.ts#L12)_ Migrates database schema to the latest version **Parameters:** -Name | Type | Default | ------- | ------ | ------ | -`db` | [Database](../classes/_src_database_.database.md) | - | -`config` | [MigrationParams](../interfaces/_src_interfaces_.imigrate.migrationparams.md) | {} | +| Name | Type | Default | +| -------- | ----------------------------------------------------------------------------- | ------- | +| `db` | [Database](../classes/_src_database_.database.md) | - | +| `config` | [MigrationParams](../interfaces/_src_interfaces_.imigrate.migrationparams.md) | {} | -**Returns:** *Promise‹void›* +**Returns:** _Promise‹void›_ diff --git a/docs/modules/_src_utils_strings_.md b/docs/modules/_src_utils_strings_.md index fec49ee..42fc1dc 100644 --- a/docs/modules/_src_utils_strings_.md +++ b/docs/modules/_src_utils_strings_.md @@ -6,24 +6,24 @@ ### Functions -* [toSqlParams](_src_utils_strings_.md#tosqlparams) +- [toSqlParams](_src_utils_strings_.md#tosqlparams) ## Functions -### toSqlParams +### toSqlParams -▸ **toSqlParams**(`sql`: [SqlType](_src_interfaces_.isqlite.md#sqltype), `params`: any[]): *[SqlObj](../interfaces/_src_interfaces_.isqlite.sqlobj.md)* +▸ **toSqlParams**(`sql`: [SqlType](_src_interfaces_.isqlite.md#sqltype), `params`: any[]): _[SqlObj](../interfaces/\_src_interfaces_.isqlite.sqlobj.md)\_ -*Defined in [src/utils/strings.ts:10](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/utils/strings.ts#L10)* +_Defined in [src/utils/strings.ts:10](https://github.com/kriasoft/node-sqlite/blob/d15b22e/src/utils/strings.ts#L10)_ Allows for using strings and `sql-template-strings`. Converts both to a format that's usable by the SQL methods **Parameters:** -Name | Type | Default | Description | ------- | ------ | ------ | ------ | -`sql` | [SqlType](_src_interfaces_.isqlite.md#sqltype) | - | A SQL string or `sql-template-strings` object | -`params` | any[] | [] | An array of parameters | +| Name | Type | Default | Description | +| -------- | ---------------------------------------------- | ------- | --------------------------------------------- | +| `sql` | [SqlType](_src_interfaces_.isqlite.md#sqltype) | - | A SQL string or `sql-template-strings` object | +| `params` | any[] | [] | An array of parameters | -**Returns:** *[SqlObj](../interfaces/_src_interfaces_.isqlite.sqlobj.md)* +**Returns:** _[SqlObj](../interfaces/\_src_interfaces_.isqlite.sqlobj.md)\_ diff --git a/jest.config.js b/jest.config.js index 5026a63..9780f41 100755 --- a/jest.config.js +++ b/jest.config.js @@ -1,9 +1,6 @@ module.exports = { preset: 'ts-jest', - collectCoverageFrom: [ - 'src/**/*.ts', - '!src/vendor-typings/**' - ], + collectCoverageFrom: ['src/**/*.ts', '!src/vendor-typings/**'], testResultsProcessor: './node_modules/jest-junit-reporter', testEnvironment: 'node', testPathIgnorePatterns: [ diff --git a/package-lock.json b/package-lock.json index 1a0c227..e20a3a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sqlite", - "version": "5.0.1", + "version": "5.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "sqlite", - "version": "5.0.1", + "version": "5.1.2", "license": "MIT", "devDependencies": { "@theo.gravity/changelog-version": "2.1.11", @@ -23,7 +23,7 @@ "jest-junit-reporter": "1.1.0", "lint-staged": "12.4.0", "pre-commit": "1.2.2", - "prettier-standard": "^15.0.1", + "prettier-standard": "^16.4.1", "sql-template-strings": "^2.2.2", "sqlite3": "^5.1.6", "sqlite3-offline-next": "^5.0.3", @@ -50,6 +50,21 @@ "node": ">=6.0.0" } }, + "node_modules/@angular/compiler": { + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-8.2.14.tgz", + "integrity": "sha512-ABZO4E7eeFA1QyJ2trDezxeQM5ZFa1dXw1Mpl/+1vuXDKNjJgNyWYwKp/NwRkLmrsuV0yv4UDCDe4kJOGbPKnw==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + } + }, + "node_modules/@angular/compiler/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/@babel/code-frame": { "version": "7.22.13", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", @@ -627,6 +642,18 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/runtime": { + "version": "7.23.8", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.8.tgz", + "integrity": "sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.22.15", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", @@ -863,6 +890,30 @@ "dev": true, "optional": true }, + "node_modules/@glimmer/interfaces": { + "version": "0.41.4", + "resolved": "https://registry.npmjs.org/@glimmer/interfaces/-/interfaces-0.41.4.tgz", + "integrity": "sha512-MzXwMyod3MlwSZezHSaVBsCEIW/giYYfTDYARR46QnYsaFVatMVbydjsI7jkAuBCbnLCyNOIc1TrYIj71i/rpg==", + "dev": true + }, + "node_modules/@glimmer/syntax": { + "version": "0.41.4", + "resolved": "https://registry.npmjs.org/@glimmer/syntax/-/syntax-0.41.4.tgz", + "integrity": "sha512-NLPNirZDbNmpZ8T/ccle22zt2rhUq5il7ST6IJk62T58QZeJsdr3m3RS4kaGSBsQhXoKELrgX048yYEX5sC+fw==", + "dev": true, + "dependencies": { + "@glimmer/interfaces": "^0.41.4", + "@glimmer/util": "^0.41.4", + "handlebars": "^4.0.13", + "simple-html-tokenizer": "^0.5.7" + } + }, + "node_modules/@glimmer/util": { + "version": "0.41.4", + "resolved": "https://registry.npmjs.org/@glimmer/util/-/util-0.41.4.tgz", + "integrity": "sha512-DwS94K+M0vtG+cymxH0rslJr09qpdjyOLdCjmpKcG/nNiZQfMA1ybAaFEmwk9UaVlUG9STENFeQwyrLevJB+7g==", + "dev": true + }, "node_modules/@humanwhocodes/config-array": { "version": "0.9.5", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", @@ -906,6 +957,12 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@iarna/toml": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.3.tgz", + "integrity": "sha512-FmuxfCuolpLl0AnQ2NHSzoUKWEJDFl63qXjzdoWBVyFCXzMGm1spBzk7LeHNoVCiWCF7mRVms9e6jEV9+MoPbg==", + "dev": true + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -1623,6 +1680,12 @@ "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==", "dev": true }, + "node_modules/@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", + "dev": true + }, "node_modules/@types/yargs": { "version": "16.0.4", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", @@ -2168,6 +2231,46 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/angular-estree-parser": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/angular-estree-parser/-/angular-estree-parser-1.3.1.tgz", + "integrity": "sha512-jvlnNk4aoEmA6EKK12OnsOkCSdsWleBsYB+aWyH8kpfTB6Li1kxWVbHKVldH9zDCwVVi1hXfqPi/gbSv49tkbQ==", + "dev": true, + "dependencies": { + "lines-and-columns": "^1.1.6", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "@angular/compiler": ">= 6.0.0 < 9.0.6" + } + }, + "node_modules/angular-estree-parser/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/angular-html-parser": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/angular-html-parser/-/angular-html-parser-1.4.0.tgz", + "integrity": "sha512-5KyzzYOeZV9g9ahXw4rbi8IIbMjUdXoarXJ0CfbWue5U1YsvMnjMZJ3oadpU8ZtnIx1zR/dsyt+FLJx2U65d2Q==", + "dev": true, + "dependencies": { + "tslib": "^1.9.3" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/angular-html-parser/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/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -2485,6 +2588,16 @@ "@babel/core": "^7.0.0" } }, + "node_modules/bail": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -2720,6 +2833,36 @@ "node": ">=10" } }, + "node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", @@ -2768,6 +2911,31 @@ "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", "dev": true }, + "node_modules/cjk-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cjk-regex/-/cjk-regex-2.0.0.tgz", + "integrity": "sha512-E4gFi2f3jC0zFVHpaAcupW+gv9OejZ2aV3DP/LlSO0dDcZJAXw7W0ivn+vN17edN/PhU4HCgs1bfx7lPK7FpdA==", + "dev": true, + "dependencies": { + "regexp-util": "^1.2.1", + "unicode-regex": "^2.0.0" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/cjk-regex/node_modules/unicode-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-regex/-/unicode-regex-2.0.0.tgz", + "integrity": "sha512-5nbEG2YU7loyTvPABaKb+8B0u8L7vWCsVmCSsiaO249ZdMKlvrXlxR2ex4TUVAdzv/Cne/TdoXSSaJArGXaleQ==", + "dev": true, + "dependencies": { + "regexp-util": "^1.2.0" + }, + "engines": { + "node": ">= 4" + } + }, "node_modules/cjs-module-lexer": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", @@ -2964,6 +3132,16 @@ "node": ">=0.10.0" } }, + "node_modules/collapse-white-space": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz", + "integrity": "sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/collect-v8-coverage": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", @@ -3163,6 +3341,15 @@ "integrity": "sha1-lxS0ct6CoYQ94vuptodpOMq0TGg=", "dev": true }, + "node_modules/dashify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dashify/-/dashify-2.0.0.tgz", + "integrity": "sha512-hpA5C/YrPjucXypHPPc0oJ1l9Hf6wWbiOL7Ik42cxnsUOhWiCB/fylKbKqqJalW9FgkNQCw16YO8uW9Hs0Iy1A==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/data-urls": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", @@ -3297,9 +3484,9 @@ } }, "node_modules/del/node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true, "engines": { "node": ">= 4" @@ -3447,6 +3634,52 @@ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, + "node_modules/editorconfig": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz", + "integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==", + "dev": true, + "dependencies": { + "commander": "^2.19.0", + "lru-cache": "^4.1.5", + "semver": "^5.6.0", + "sigmund": "^1.0.1" + }, + "bin": { + "editorconfig": "bin/editorconfig" + } + }, + "node_modules/editorconfig-to-prettier": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/editorconfig-to-prettier/-/editorconfig-to-prettier-0.1.1.tgz", + "integrity": "sha512-MMadSSVRDb4uKdxV6bCXXN4cTsxIsXYtV4XdPu6FOCSAw6zsCIDA+QEktEU+u6h+c/mTrul5NR+pwFpPxwetiQ==", + "dev": true + }, + "node_modules/editorconfig/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/editorconfig/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/editorconfig/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true + }, "node_modules/electron-to-chromium": { "version": "1.4.76", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.76.tgz", @@ -4253,6 +4486,12 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, "node_modules/external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -4367,6 +4606,12 @@ "node": ">=8" } }, + "node_modules/find-parent-dir": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", + "integrity": "sha512-41+Uo9lF5JNGpIMGrujNKDuqH9ofU2ISJ1XCZPLIN/Yayql599PtA0ywYtlLMYmJcSPkr4uAF14wJmKlW2Fx3g==", + "dev": true + }, "node_modules/find-plugins": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/find-plugins/-/find-plugins-1.1.7.tgz", @@ -4384,6 +4629,15 @@ "node": ">=6" } }, + "node_modules/find-project-root": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/find-project-root/-/find-project-root-1.1.1.tgz", + "integrity": "sha512-4+yZ013W+EZc+hvdgA2RlzlgNfP1eGdMNxU6xzw1yt518cF6/xZD3kLV+bprYX5+AD0IL76xcN28TPqYJHxrHw==", + "dev": true, + "bin": { + "find-project-root": "bin/find-project-root.js" + } + }, "node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -4416,6 +4670,22 @@ "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", "dev": true }, + "node_modules/flatten": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz", + "integrity": "sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==", + "deprecated": "flatten is deprecated in favor of utility frameworks such as lodash.", + "dev": true + }, + "node_modules/flow-parser": { + "version": "0.111.3", + "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.111.3.tgz", + "integrity": "sha512-iEjGZ94OBMcESxnLorXNjJmtd/JtQYXUVrQpfwvtAKkuyawRmv+2LM6nqyOsOJkISEYbyY6ziudRE0u4VyPSVA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/form-data": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", @@ -4785,6 +5055,18 @@ "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "dev": true }, + "node_modules/graphql": { + "version": "14.6.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.6.0.tgz", + "integrity": "sha512-VKzfvHEKybTKjQVpTFrA5yUq2S9ihcZvfJAtsDBBCuV6wauPu1xl/f9ehgVf0FcEJJs4vz6ysb/ZMkGigQZseg==", + "dev": true, + "dependencies": { + "iterall": "^1.2.2" + }, + "engines": { + "node": ">= 6.x" + } + }, "node_modules/handlebars": { "version": "4.7.7", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", @@ -4896,6 +5178,16 @@ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, + "node_modules/html-element-attributes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/html-element-attributes/-/html-element-attributes-2.2.1.tgz", + "integrity": "sha512-gGTgCeQu+g1OFExZKWQ1LwbFXxLJ6cGdCGj64ByEaxatr/EPVc23D6Gxngb37ao+SNInP/sGu8FXxRsSxMm7aQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/html-encoding-sniffer": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", @@ -4914,6 +5206,22 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "node_modules/html-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/html-styles/-/html-styles-1.0.0.tgz", + "integrity": "sha512-cDl5dcj73oI4Hy0DSUNh54CAwslNLJRCCoO+RNkVo+sBrjA/0+7E/xzvj3zH/GxbbBLGJhE0hBe1eg+0FINC6w==", + "dev": true + }, + "node_modules/html-tag-names": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/html-tag-names/-/html-tag-names-1.1.5.tgz", + "integrity": "sha512-aI5tKwNTBzOZApHIynaAwecLBv8TlZTEy/P4Sj2SzzAhBrGuI8yGZ0UIXVPQzOHGS+to2mjb04iy6VWt/8+d8A==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", @@ -5093,6 +5401,12 @@ "node": ">=8" } }, + "node_modules/indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha512-bup+4tap3Hympa+JBJUG7XuOsdNQ6fxt0MHyXMKuLBKn0OqsTfvUxkUrroEX1+B2VsSHvCjiIcZVxRtYa4nllA==", + "dev": true + }, "node_modules/infer-owner": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", @@ -5214,6 +5528,30 @@ "dev": true, "optional": true }, + "node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -5260,6 +5598,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "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" + } + ], + "engines": { + "node": ">=4" + } + }, "node_modules/is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", @@ -5272,6 +5633,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "dependencies": { + "ci-info": "^2.0.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/is-ci/node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, "node_modules/is-core-module": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", @@ -5299,6 +5678,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-directory": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", @@ -5350,6 +5739,16 @@ "node": ">=0.10.0" } }, + "node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", @@ -5432,6 +5831,15 @@ "node": ">=8" } }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", @@ -5538,15 +5946,35 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "node_modules/is-whitespace-character": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz", + "integrity": "sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-word-character": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.4.tgz", + "integrity": "sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, @@ -5639,6 +6067,12 @@ "node": ">=8" } }, + "node_modules/iterall": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", + "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==", + "dev": true + }, "node_modules/jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", @@ -6276,6 +6710,12 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/js-base64": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", + "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==", + "dev": true + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -6371,6 +6811,15 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "node_modules/json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha512-i/J297TW6xyj7sDFa7AmBPkQvLIxWr2kKPWI26tXydnZrzVAocNqn5DMNT1Mzk0vit1V5UkRM7C1KdVNp7Lmcg==", + "dev": true, + "dependencies": { + "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", @@ -6395,6 +6844,15 @@ "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", "dev": true }, + "node_modules/jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/jsx-ast-utils": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz", @@ -6454,6 +6912,12 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "node_modules/linguist-languages": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/linguist-languages/-/linguist-languages-7.6.0.tgz", + "integrity": "sha512-DBZPIWjrQmb/52UlSEN8MTiwwugrAh4NBX9/DyIG8IuO8rDLYDRM+KVPbuiPVKd3ResxYtZB5AiSuc8dTzOSog==", + "dev": true + }, "node_modules/lint-staged": { "version": "12.4.0", "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.4.0.tgz", @@ -7199,6 +7663,18 @@ "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", "dev": true }, + "node_modules/lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha512-DhhGRshNS1aX6s5YdBE3njCCouPgnG29ebyHvImlZzXZf2SHgt+J08DHgytTPnpywNbO1Y8mNUFyQuIDBq2JZg==", + "dev": true + }, + "node_modules/lodash.uniqby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz", + "integrity": "sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww==", + "dev": true + }, "node_modules/log-symbols": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", @@ -7448,6 +7924,28 @@ "tmpl": "1.0.5" } }, + "node_modules/map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "dependencies": { + "p-defer": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/markdown-escapes": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.4.tgz", + "integrity": "sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/marked": { "version": "4.0.12", "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.12.tgz", @@ -7460,6 +7958,20 @@ "node": ">= 12" } }, + "node_modules/mem": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/mem/-/mem-5.1.1.tgz", + "integrity": "sha512-qvwipnozMohxLXG1pOqoLiZKNkC4r4qqRucSoDwXowsNGDSULiqFTRUF05vcZWnwJSG22qTsynQhxbaMtnX9gw==", + "dev": true, + "dependencies": { + "map-age-cleaner": "^0.1.3", + "mimic-fn": "^2.1.0", + "p-is-promise": "^2.1.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -7682,6 +8194,15 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, + "node_modules/n-readlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/n-readlines/-/n-readlines-1.0.0.tgz", + "integrity": "sha512-ISDqGcspVu6U3VKqtJZG1uR55SmNNF9uK0EMq1IvNVVZOui6MW6VR0+pIZhqz85ORAGp+4zW+5fJ/SE7bwEibA==", + "dev": true, + "engines": { + "node": ">=6.x.x" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -8157,6 +8678,15 @@ "node": ">=0.10.0" } }, + "node_modules/p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/p-finally": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", @@ -8166,6 +8696,15 @@ "node": ">=8" } }, + "node_modules/p-is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -8229,6 +8768,20 @@ "node": ">=6" } }, + "node_modules/parse-entities": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz", + "integrity": "sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==", + "dev": true, + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -8247,6 +8800,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parse-srcset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-srcset/-/parse-srcset-1.0.2.tgz", + "integrity": "sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==", + "dev": true + }, "node_modules/parse5": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", @@ -8591,6 +9150,193 @@ "semver-compare": "^1.0.0" } }, + "node_modules/postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "dependencies": { + "chalk": "^1.1.3", + "js-base64": "^2.1.9", + "source-map": "^0.5.6", + "supports-color": "^3.2.3" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/postcss-less": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-2.0.0.tgz", + "integrity": "sha512-pPNsVnpCB13nBMOcl5GVh8JGmB0JGFjqkLUDzKdVpptFFKEe9wFdEzvh2j4lD2AD+7qcrUfw9Ta+oi5+Fw7jjQ==", + "dev": true, + "dependencies": { + "postcss": "^5.2.16" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-media-query-parser": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", + "integrity": "sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==", + "dev": true + }, + "node_modules/postcss-scss": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.0.0.tgz", + "integrity": "sha512-um9zdGKaDZirMm+kZFKKVsnKPF7zF7qBAtIfTSnZXD1jZ0JNZIxdB6TxQOjCnlSzLRInVl2v3YdBh/M881C4ug==", + "dev": true, + "dependencies": { + "postcss": "^7.0.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/postcss-scss/node_modules/picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "node_modules/postcss-scss/node_modules/postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "dependencies": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/postcss-selector-parser": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", + "integrity": "sha512-3pqyakeGhrO0BQ5+/tGTfvi5IAUAhHRayGK8WFSu06aEv2BmHoXw/Mhb+w7VY5HERIuC+QoUI7wgrCcq2hqCVA==", + "dev": true, + "dependencies": { + "flatten": "^1.0.2", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "node_modules/postcss-values-parser": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-1.5.0.tgz", + "integrity": "sha512-3M3p+2gMp0AH3da530TlX8kiO1nxdTnc3C6vr8dMxRLIlh8UYkz0/wcwptSXjhtx2Fr0TySI7a+BHDQ8NL7LaQ==", + "dev": true, + "dependencies": { + "flatten": "^1.0.2", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss/node_modules/ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss/node_modules/chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss/node_modules/chalk/node_modules/supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/postcss/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/postcss/node_modules/has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss/node_modules/supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", + "dev": true, + "dependencies": { + "has-flag": "^1.0.0" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/pre-commit": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/pre-commit/-/pre-commit-1.2.2.tgz", @@ -8673,23 +9419,23 @@ } }, "node_modules/prettier-standard": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/prettier-standard/-/prettier-standard-15.0.1.tgz", - "integrity": "sha512-uT/+SeoioaGh1+pyY28P5mYJTlhzdPRScYJ1SlrhLwuB6ejP06h1SaBpCLae35zoIP7Tf4YM/px8b3bClWwVrg==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/prettier-standard/-/prettier-standard-16.4.1.tgz", + "integrity": "sha512-IW3Sct4GOdqc1s4+1HZjH2HegzLZQ6mDMl2xz6i6KHCac7kCM+obLbvm2e0zp8PytKkLQCdOpj0cWWa48Ruetw==", "dev": true, "dependencies": { "chalk": "^2.4.2", - "diff": "^4.0.1", - "eslint": "^6.4.0", + "diff": "^4.0.2", + "eslint": "^6.8.0", "execa": "^2.0.4", "find-up": "^4.1.0", "get-stdin": "^7.0.0", "globby": "^6.1.0", "ignore": "^3.3.7", - "lint-staged": "9.4.0", - "mri": "^1.1.4", + "lint-staged": "9.4.3", + "mri": "^1.1.5", "multimatch": "^3.0.0", - "prettierx": "0.7.1" + "prettierx": "0.11.3" }, "bin": { "prettier-standard": "src/cli.js" @@ -9034,9 +9780,9 @@ } }, "node_modules/prettier-standard/node_modules/lint-staged": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-9.4.0.tgz", - "integrity": "sha512-jTu1KoGiGTSffM539wK+3igVqDGVsby3KwDBaXL471YndahkjnavLX+R5Nsk49JwklyMo0ZAXay1BaoyA6d2Jw==", + "version": "9.4.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-9.4.3.tgz", + "integrity": "sha512-PejnI+rwOAmKAIO+5UuAZU9gxdej/ovSEOAY34yMfC3OS4Ac82vCBPzAWLReR9zCPOMqeVwQRaZ3bUBpAsaL2Q==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -9207,42 +9953,305 @@ } }, "node_modules/prettierx": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/prettierx/-/prettierx-0.7.1.tgz", - "integrity": "sha512-6snEPDLZ3iyfoX+DCsQzeFBpi8PDqSfq77Pt9e0H2R/jTG2FJfq/bjYlUqmdonLHEcIgKdHemm7pk/4ydLwcgw==", - "dev": true, + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/prettierx/-/prettierx-0.11.3.tgz", + "integrity": "sha512-Xf04LEfD3ITo26i5U/zR++hwqKPG3feR06rrjB0t2o+QFv8ZidFp4o7nPqPGLfE4UwHJgd0qwnZKwm0MsUQHUA==", + "dev": true, + "dependencies": { + "@angular/compiler": "8.2.14", + "@babel/code-frame": "7.8.3", + "@babel/parser": "7.9.4", + "@glimmer/syntax": "0.41.4", + "@iarna/toml": "2.2.3", + "@typescript-eslint/typescript-estree": "2.6.1", + "angular-estree-parser": "1.3.1", + "angular-html-parser": "1.4.0", + "camelcase": "5.3.1", + "chalk": "3.0.0", + "cjk-regex": "2.0.0", + "cosmiconfig": "5.2.1", + "dashify": "2.0.0", + "dedent": "0.7.0", + "diff": "4.0.2", + "editorconfig": "0.15.3", + "editorconfig-to-prettier": "0.1.1", + "escape-string-regexp": "2.0.0", + "esutils": "2.0.3", + "find-parent-dir": "0.3.0", + "find-project-root": "1.1.1", + "flow-parser": "0.111.3", + "get-stream": "4.1.0", + "globby": "6.1.0", + "graphql": "14.6.0", + "html-element-attributes": "2.2.1", + "html-styles": "1.0.0", + "html-tag-names": "1.1.5", + "ignore": "4.0.6", + "is-ci": "2.0.0", + "jest-docblock": "25.3.0", + "json-stable-stringify": "1.0.1", + "leven": "3.1.0", + "lines-and-columns": "1.1.6", + "linguist-languages": "7.6.0", + "lodash.uniqby": "4.7.0", + "mem": "5.1.1", + "minimatch": "3.0.4", + "minimist": "1.2.5", + "n-readlines": "1.0.0", + "normalize-path": "3.0.0", + "parse-srcset": "1.0.2", + "postcss-less": "2.0.0", + "postcss-media-query-parser": "0.2.3", + "postcss-scss": "2.0.0", + "postcss-selector-parser": "2.2.3", + "postcss-values-parser": "1.5.0", + "regexp-util": "1.2.2", + "remark-math": "1.0.6", + "remark-parse": "5.0.0", + "resolve": "1.15.1", + "semver": "6.3.0", + "string-width": "4.2.0", + "unicode-regex": "3.0.0", + "unified": "8.4.2", + "vnopts": "1.0.2", + "yaml": "1.8.3", + "yaml-unist-parser": "1.1.1" + }, "bin": { - "prettierx": "bin-prettierx.js" + "prettierx": "bin/prettierx.js" }, "engines": { "node": ">=8" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/pretty-format": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", - "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "node_modules/prettierx/node_modules/@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "dependencies": { - "ansi-regex": "^5.0.1", - "ansi-styles": "^5.0.0", - "react-is": "^17.0.1" + "@babel/highlight": "^7.8.3" + } + }, + "node_modules/prettierx/node_modules/@babel/parser": { + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", + "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" }, "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + "node": ">=6.0.0" } }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "node_modules/prettierx/node_modules/@typescript-eslint/typescript-estree": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.6.1.tgz", + "integrity": "sha512-+sTnssW6bcbDZKE8Ce7VV6LdzkQz2Bxk7jzk1J8H1rovoTxnm6iXvYIyncvNsaB/kBCOM63j/LNJfm27bNdUoA==", "dev": true, + "dependencies": { + "debug": "^4.1.1", + "glob": "^7.1.4", + "is-glob": "^4.0.1", + "lodash.unescape": "4.0.1", + "semver": "^6.3.0", + "tsutils": "^3.17.1" + }, "engines": { - "node": ">=10" + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/prettierx/node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/prettierx/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/prettierx/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/prettierx/node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/prettierx/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/prettierx/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/prettierx/node_modules/jest-docblock": { + "version": "25.3.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-25.3.0.tgz", + "integrity": "sha512-aktF0kCar8+zxRHxQZwxMy70stc9R1mOmrLsT5VO3pIT0uzGRSDAXxSlz4NqQWpuLjPpuMhPRl7H+5FRsvIQAg==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": ">= 8.3" + } + }, + "node_modules/prettierx/node_modules/lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha512-8ZmlJFVK9iCmtLz19HpSsR8HaAMWBT284VMNednLwlIMDP2hJDCIhUp0IZ2xUcZ+Ob6BM0VvCSJwzASDM45NLQ==", + "dev": true + }, + "node_modules/prettierx/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/prettierx/node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "node_modules/prettierx/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==", + "dev": true + }, + "node_modules/prettierx/node_modules/resolve": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/prettierx/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/prettierx/node_modules/string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/prettierx/node_modules/yaml": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.8.3.tgz", + "integrity": "sha512-X/v7VDnK+sxbQ2Imq4Jt2PRUsRsP7UcpSl3Llg6+NRRqWLIvxkMFYtH1FmvwNGYRKKPa+EPA4qDBlI9WVG1UKw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.8.7" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } }, "node_modules/process-nextick-args": { "version": "2.0.1", @@ -9504,6 +10513,30 @@ "node": ">=8.10.0" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, + "node_modules/regexp-util": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/regexp-util/-/regexp-util-1.2.2.tgz", + "integrity": "sha512-5/rl2UD18oAlLQEIuKBeiSIOp1hb5wCXcakl5yvHxlY1wyWI4D5cUKKzCibBeu741PA9JKvZhMqbkDQqPusX3w==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/regexp-util/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/regexp.prototype.flags": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz", @@ -9532,6 +10565,50 @@ "url": "https://github.com/sponsors/mysticatea" } }, + "node_modules/remark-math": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/remark-math/-/remark-math-1.0.6.tgz", + "integrity": "sha512-I43wU/QOQpXvVFXKjA4FHp5xptK65+5F6yolm8+69/JV0EqSOB64wURUZ3JK50JtnTL8FvwLiH2PZ+fvsBxviA==", + "dev": true, + "dependencies": { + "trim-trailing-lines": "^1.1.0" + }, + "peerDependencies": { + "remark-parse": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" + } + }, + "node_modules/remark-parse": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-5.0.0.tgz", + "integrity": "sha512-b3iXszZLH1TLoyUzrATcTQUZrwNl1rE70rVdSruJFlDaJ9z5aMkhrG43Pp68OgfHndL/ADz6V69Zow8cTQu+JA==", + "dev": true, + "dependencies": { + "collapse-white-space": "^1.0.2", + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-whitespace-character": "^1.0.0", + "is-word-character": "^1.0.0", + "markdown-escapes": "^1.0.0", + "parse-entities": "^1.1.0", + "repeat-string": "^1.5.4", + "state-toggle": "^1.0.0", + "trim": "0.0.1", + "trim-trailing-lines": "^1.0.0", + "unherit": "^1.0.4", + "unist-util-remove-position": "^1.0.0", + "vfile-location": "^2.0.0", + "xtend": "^4.0.1" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -9822,12 +10899,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==", + "dev": true + }, "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, + "node_modules/simple-html-tokenizer": { + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/simple-html-tokenizer/-/simple-html-tokenizer-0.5.11.tgz", + "integrity": "sha512-C2WEK/Z3HoSFbYq8tI7ni3eOo/NneSPRoPpcM7WdLjFOArFuyXEjAoCdOC3DgMfRyziZQ1hCNR4mrNdWEvD0og==", + "dev": true + }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -10633,6 +11722,16 @@ "standardx": "bin/cmd.js" } }, + "node_modules/state-toggle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz", + "integrity": "sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -11120,6 +12219,33 @@ "tree-kill": "cli.js" } }, + "node_modules/trim": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "integrity": "sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==", + "deprecated": "Use String.prototype.trim() instead", + "dev": true + }, + "node_modules/trim-trailing-lines": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz", + "integrity": "sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/trough": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/try-require": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/try-require/-/try-require-1.2.1.tgz", @@ -11554,6 +12680,55 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/unherit": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.3.tgz", + "integrity": "sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.0", + "xtend": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/unicode-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unicode-regex/-/unicode-regex-3.0.0.tgz", + "integrity": "sha512-WiDJdORsqgxkZrjC8WsIP573130HNn7KsB0IDnUccW2BG2b19QQNloNhVe6DKk3Aef0UcoIHhNVj7IkkcYWrNw==", + "dev": true, + "dependencies": { + "regexp-util": "^1.2.0" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/unified": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-8.4.2.tgz", + "integrity": "sha512-JCrmN13jI4+h9UAyKEoGcDZV+i1E7BLFuG7OsaDvTXI5P0qhHX+vZO/kOhz9jn8HGENDKbwSeB0nVOg4gVStGA==", + "dev": true, + "dependencies": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA==", + "dev": true + }, "node_modules/unique-filename": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", @@ -11574,28 +12749,78 @@ "imurmurhash": "^0.1.4" } }, - "node_modules/universalify": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", - "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } + "node_modules/unist-util-is": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz", + "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==", + "dev": true }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "node_modules/unist-util-remove-position": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.4.tgz", + "integrity": "sha512-tLqd653ArxJIPnKII6LMZwH+mb5q+n/GtXQZo6S6csPRs5zB0u79Yw8ouR3wTw8wxvdJFhpP6Y7jorWdCgLO0A==", "dev": true, "dependencies": { - "punycode": "^2.1.0" + "unist-util-visit": "^1.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" } }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-visit": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz", + "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==", + "dev": true, + "dependencies": { + "unist-util-visit-parents": "^2.0.0" + } + }, + "node_modules/unist-util-visit-parents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz", + "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==", + "dev": true, + "dependencies": { + "unist-util-is": "^3.0.0" + } + }, + "node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "dev": true, "dependencies": { "querystringify": "^2.1.1", @@ -11663,6 +12888,146 @@ "git-last-commit": "^1.0.0" } }, + "node_modules/vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-location": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.6.tgz", + "integrity": "sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vnopts": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/vnopts/-/vnopts-1.0.2.tgz", + "integrity": "sha512-d2rr2EFhAGHnTlURu49G7GWmiJV80HbAnkYdD9IFAtfhmxC+kSWEaZ6ZF064DJFTv9lQZQV1vuLTntyQpoanGQ==", + "dev": true, + "dependencies": { + "chalk": "^2.4.1", + "leven": "^2.1.0", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/vnopts/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/vnopts/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/vnopts/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/vnopts/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/vnopts/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/vnopts/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/vnopts/node_modules/leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/vnopts/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/vnopts/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/vow": { "version": "0.4.20", "resolved": "https://registry.npmjs.org/vow/-/vow-0.4.20.tgz", @@ -12045,6 +13410,26 @@ "node": ">= 6" } }, + "node_modules/yaml-unist-parser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yaml-unist-parser/-/yaml-unist-parser-1.1.1.tgz", + "integrity": "sha512-cGtqhHBlcft+rTKiPsVcSyi43Eqm5a1buYokW9VkztroKMErBSdR9ANHx+/XxNppHZTu2KMEn4yY8MdhuGoFuA==", + "dev": true, + "dependencies": { + "lines-and-columns": "^1.1.6", + "tslib": "^1.10.0", + "yaml": "^1.7.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/yaml-unist-parser/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/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -12121,6 +13506,23 @@ "@jridgewell/trace-mapping": "^0.3.0" } }, + "@angular/compiler": { + "version": "8.2.14", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-8.2.14.tgz", + "integrity": "sha512-ABZO4E7eeFA1QyJ2trDezxeQM5ZFa1dXw1Mpl/+1vuXDKNjJgNyWYwKp/NwRkLmrsuV0yv4UDCDe4kJOGbPKnw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, "@babel/code-frame": { "version": "7.22.13", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", @@ -12554,6 +13956,15 @@ "@babel/helper-plugin-utils": "^7.16.7" } }, + "@babel/runtime": { + "version": "7.23.8", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.8.tgz", + "integrity": "sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, "@babel/template": { "version": "7.22.15", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", @@ -12732,6 +14143,30 @@ "dev": true, "optional": true }, + "@glimmer/interfaces": { + "version": "0.41.4", + "resolved": "https://registry.npmjs.org/@glimmer/interfaces/-/interfaces-0.41.4.tgz", + "integrity": "sha512-MzXwMyod3MlwSZezHSaVBsCEIW/giYYfTDYARR46QnYsaFVatMVbydjsI7jkAuBCbnLCyNOIc1TrYIj71i/rpg==", + "dev": true + }, + "@glimmer/syntax": { + "version": "0.41.4", + "resolved": "https://registry.npmjs.org/@glimmer/syntax/-/syntax-0.41.4.tgz", + "integrity": "sha512-NLPNirZDbNmpZ8T/ccle22zt2rhUq5il7ST6IJk62T58QZeJsdr3m3RS4kaGSBsQhXoKELrgX048yYEX5sC+fw==", + "dev": true, + "requires": { + "@glimmer/interfaces": "^0.41.4", + "@glimmer/util": "^0.41.4", + "handlebars": "^4.0.13", + "simple-html-tokenizer": "^0.5.7" + } + }, + "@glimmer/util": { + "version": "0.41.4", + "resolved": "https://registry.npmjs.org/@glimmer/util/-/util-0.41.4.tgz", + "integrity": "sha512-DwS94K+M0vtG+cymxH0rslJr09qpdjyOLdCjmpKcG/nNiZQfMA1ybAaFEmwk9UaVlUG9STENFeQwyrLevJB+7g==", + "dev": true + }, "@humanwhocodes/config-array": { "version": "0.9.5", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz", @@ -12766,6 +14201,12 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "@iarna/toml": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.3.tgz", + "integrity": "sha512-FmuxfCuolpLl0AnQ2NHSzoUKWEJDFl63qXjzdoWBVyFCXzMGm1spBzk7LeHNoVCiWCF7mRVms9e6jEV9+MoPbg==", + "dev": true + }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", @@ -13366,6 +14807,12 @@ "integrity": "sha512-7NQmHra/JILCd1QqpSzl8+mJRc8ZHz3uDm8YV1Ks9IhK0epEiTw8aIErbvH9PI+6XbqhyIQy3462nEsn7UVzjQ==", "dev": true }, + "@types/unist": { + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", + "dev": true + }, "@types/yargs": { "version": "16.0.4", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", @@ -13730,6 +15177,41 @@ "uri-js": "^4.2.2" } }, + "angular-estree-parser": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/angular-estree-parser/-/angular-estree-parser-1.3.1.tgz", + "integrity": "sha512-jvlnNk4aoEmA6EKK12OnsOkCSdsWleBsYB+aWyH8kpfTB6Li1kxWVbHKVldH9zDCwVVi1hXfqPi/gbSv49tkbQ==", + "dev": true, + "requires": { + "lines-and-columns": "^1.1.6", + "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "angular-html-parser": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/angular-html-parser/-/angular-html-parser-1.4.0.tgz", + "integrity": "sha512-5KyzzYOeZV9g9ahXw4rbi8IIbMjUdXoarXJ0CfbWue5U1YsvMnjMZJ3oadpU8ZtnIx1zR/dsyt+FLJx2U65d2Q==", + "dev": true, + "requires": { + "tslib": "^1.9.3" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -13965,6 +15447,12 @@ "babel-preset-current-node-syntax": "^1.0.0" } }, + "bail": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", + "dev": true + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -14145,6 +15633,24 @@ "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true }, + "character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true + }, + "character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true + }, + "character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true + }, "chardet": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", @@ -14179,6 +15685,27 @@ "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==", "dev": true }, + "cjk-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cjk-regex/-/cjk-regex-2.0.0.tgz", + "integrity": "sha512-E4gFi2f3jC0zFVHpaAcupW+gv9OejZ2aV3DP/LlSO0dDcZJAXw7W0ivn+vN17edN/PhU4HCgs1bfx7lPK7FpdA==", + "dev": true, + "requires": { + "regexp-util": "^1.2.1", + "unicode-regex": "^2.0.0" + }, + "dependencies": { + "unicode-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unicode-regex/-/unicode-regex-2.0.0.tgz", + "integrity": "sha512-5nbEG2YU7loyTvPABaKb+8B0u8L7vWCsVmCSsiaO249ZdMKlvrXlxR2ex4TUVAdzv/Cne/TdoXSSaJArGXaleQ==", + "dev": true, + "requires": { + "regexp-util": "^1.2.0" + } + } + } + }, "cjs-module-lexer": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", @@ -14333,6 +15860,12 @@ "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", "dev": true }, + "collapse-white-space": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz", + "integrity": "sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ==", + "dev": true + }, "collect-v8-coverage": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", @@ -14506,6 +16039,12 @@ "integrity": "sha1-lxS0ct6CoYQ94vuptodpOMq0TGg=", "dev": true }, + "dashify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dashify/-/dashify-2.0.0.tgz", + "integrity": "sha512-hpA5C/YrPjucXypHPPc0oJ1l9Hf6wWbiOL7Ik42cxnsUOhWiCB/fylKbKqqJalW9FgkNQCw16YO8uW9Hs0Iy1A==", + "dev": true + }, "data-urls": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", @@ -14616,9 +16155,9 @@ } }, "ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true }, "p-map": { @@ -14733,17 +16272,59 @@ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, - "electron-to-chromium": { - "version": "1.4.76", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.76.tgz", - "integrity": "sha512-3Vftv7cenJtQb+k00McEBZ2vVmZ/x+HEF7pcZONZIkOsESqAqVuACmBxMv0JhzX7u0YltU0vSqRqgBSTAhFUjA==", - "dev": true - }, - "elegant-spinner": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", - "integrity": "sha512-B+ZM+RXvRqQaAmkMlO/oSe5nMUOaUnyfGYCEHoR8wrXsZR2mA0XVibsxV1bvTwxdRWah1PkQqso2EzhILGHtEQ==", - "dev": true + "editorconfig": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz", + "integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==", + "dev": true, + "requires": { + "commander": "^2.19.0", + "lru-cache": "^4.1.5", + "semver": "^5.6.0", + "sigmund": "^1.0.1" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", + "dev": true + } + } + }, + "editorconfig-to-prettier": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/editorconfig-to-prettier/-/editorconfig-to-prettier-0.1.1.tgz", + "integrity": "sha512-MMadSSVRDb4uKdxV6bCXXN4cTsxIsXYtV4XdPu6FOCSAw6zsCIDA+QEktEU+u6h+c/mTrul5NR+pwFpPxwetiQ==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.4.76", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.76.tgz", + "integrity": "sha512-3Vftv7cenJtQb+k00McEBZ2vVmZ/x+HEF7pcZONZIkOsESqAqVuACmBxMv0JhzX7u0YltU0vSqRqgBSTAhFUjA==", + "dev": true + }, + "elegant-spinner": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", + "integrity": "sha512-B+ZM+RXvRqQaAmkMlO/oSe5nMUOaUnyfGYCEHoR8wrXsZR2mA0XVibsxV1bvTwxdRWah1PkQqso2EzhILGHtEQ==", + "dev": true }, "emittery": { "version": "0.8.1", @@ -15325,6 +16906,12 @@ "jest-message-util": "^27.5.1" } }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, "external-editor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", @@ -15420,6 +17007,12 @@ "to-regex-range": "^5.0.1" } }, + "find-parent-dir": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", + "integrity": "sha512-41+Uo9lF5JNGpIMGrujNKDuqH9ofU2ISJ1XCZPLIN/Yayql599PtA0ywYtlLMYmJcSPkr4uAF14wJmKlW2Fx3g==", + "dev": true + }, "find-plugins": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/find-plugins/-/find-plugins-1.1.7.tgz", @@ -15434,6 +17027,12 @@ "try-require": "^1.2.1" } }, + "find-project-root": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/find-project-root/-/find-project-root-1.1.1.tgz", + "integrity": "sha512-4+yZ013W+EZc+hvdgA2RlzlgNfP1eGdMNxU6xzw1yt518cF6/xZD3kLV+bprYX5+AD0IL76xcN28TPqYJHxrHw==", + "dev": true + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -15460,6 +17059,18 @@ "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", "dev": true }, + "flatten": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.3.tgz", + "integrity": "sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==", + "dev": true + }, + "flow-parser": { + "version": "0.111.3", + "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.111.3.tgz", + "integrity": "sha512-iEjGZ94OBMcESxnLorXNjJmtd/JtQYXUVrQpfwvtAKkuyawRmv+2LM6nqyOsOJkISEYbyY6ziudRE0u4VyPSVA==", + "dev": true + }, "form-data": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", @@ -15751,6 +17362,15 @@ "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", "dev": true }, + "graphql": { + "version": "14.6.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-14.6.0.tgz", + "integrity": "sha512-VKzfvHEKybTKjQVpTFrA5yUq2S9ihcZvfJAtsDBBCuV6wauPu1xl/f9ehgVf0FcEJJs4vz6ysb/ZMkGigQZseg==", + "dev": true, + "requires": { + "iterall": "^1.2.2" + } + }, "handlebars": { "version": "4.7.7", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", @@ -15829,6 +17449,12 @@ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, + "html-element-attributes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/html-element-attributes/-/html-element-attributes-2.2.1.tgz", + "integrity": "sha512-gGTgCeQu+g1OFExZKWQ1LwbFXxLJ6cGdCGj64ByEaxatr/EPVc23D6Gxngb37ao+SNInP/sGu8FXxRsSxMm7aQ==", + "dev": true + }, "html-encoding-sniffer": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", @@ -15844,6 +17470,18 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "html-styles": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/html-styles/-/html-styles-1.0.0.tgz", + "integrity": "sha512-cDl5dcj73oI4Hy0DSUNh54CAwslNLJRCCoO+RNkVo+sBrjA/0+7E/xzvj3zH/GxbbBLGJhE0hBe1eg+0FINC6w==", + "dev": true + }, + "html-tag-names": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/html-tag-names/-/html-tag-names-1.1.5.tgz", + "integrity": "sha512-aI5tKwNTBzOZApHIynaAwecLBv8TlZTEy/P4Sj2SzzAhBrGuI8yGZ0UIXVPQzOHGS+to2mjb04iy6VWt/8+d8A==", + "dev": true + }, "http-cache-semantics": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", @@ -15977,6 +17615,12 @@ "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha512-bup+4tap3Hympa+JBJUG7XuOsdNQ6fxt0MHyXMKuLBKn0OqsTfvUxkUrroEX1+B2VsSHvCjiIcZVxRtYa4nllA==", + "dev": true + }, "infer-owner": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", @@ -16085,6 +17729,22 @@ "dev": true, "optional": true }, + "is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true + }, + "is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "requires": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + } + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -16119,12 +17779,35 @@ "has-tostringtag": "^1.0.0" } }, + "is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true + }, "is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", "dev": true }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + }, + "dependencies": { + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + } + } + }, "is-core-module": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz", @@ -16143,6 +17826,12 @@ "has-tostringtag": "^1.0.0" } }, + "is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true + }, "is-directory": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", @@ -16176,6 +17865,12 @@ "is-extglob": "^2.1.1" } }, + "is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true + }, "is-lambda": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", @@ -16231,6 +17926,12 @@ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true + }, "is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", @@ -16304,6 +18005,18 @@ "call-bind": "^1.0.2" } }, + "is-whitespace-character": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz", + "integrity": "sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w==", + "dev": true + }, + "is-word-character": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.4.tgz", + "integrity": "sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -16384,6 +18097,12 @@ "istanbul-lib-report": "^3.0.0" } }, + "iterall": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", + "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==", + "dev": true + }, "jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", @@ -16883,6 +18602,12 @@ } } }, + "js-base64": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.6.4.tgz", + "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -16958,6 +18683,15 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha512-i/J297TW6xyj7sDFa7AmBPkQvLIxWr2kKPWI26tXydnZrzVAocNqn5DMNT1Mzk0vit1V5UkRM7C1KdVNp7Lmcg==", + "dev": true, + "requires": { + "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", @@ -16976,6 +18710,12 @@ "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", "dev": true }, + "jsonify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz", + "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==", + "dev": true + }, "jsx-ast-utils": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz", @@ -17020,6 +18760,12 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "linguist-languages": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/linguist-languages/-/linguist-languages-7.6.0.tgz", + "integrity": "sha512-DBZPIWjrQmb/52UlSEN8MTiwwugrAh4NBX9/DyIG8IuO8rDLYDRM+KVPbuiPVKd3ResxYtZB5AiSuc8dTzOSog==", + "dev": true + }, "lint-staged": { "version": "12.4.0", "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-12.4.0.tgz", @@ -17586,6 +19332,18 @@ "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", "dev": true }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha512-DhhGRshNS1aX6s5YdBE3njCCouPgnG29ebyHvImlZzXZf2SHgt+J08DHgytTPnpywNbO1Y8mNUFyQuIDBq2JZg==", + "dev": true + }, + "lodash.uniqby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz", + "integrity": "sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww==", + "dev": true + }, "log-symbols": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", @@ -17785,12 +19543,38 @@ "tmpl": "1.0.5" } }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "markdown-escapes": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.4.tgz", + "integrity": "sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==", + "dev": true + }, "marked": { "version": "4.0.12", "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.12.tgz", "integrity": "sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==", "dev": true }, + "mem": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/mem/-/mem-5.1.1.tgz", + "integrity": "sha512-qvwipnozMohxLXG1pOqoLiZKNkC4r4qqRucSoDwXowsNGDSULiqFTRUF05vcZWnwJSG22qTsynQhxbaMtnX9gw==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.3", + "mimic-fn": "^2.1.0", + "p-is-promise": "^2.1.0" + } + }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -17960,6 +19744,12 @@ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", "dev": true }, + "n-readlines": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/n-readlines/-/n-readlines-1.0.0.tgz", + "integrity": "sha512-ISDqGcspVu6U3VKqtJZG1uR55SmNNF9uK0EMq1IvNVVZOui6MW6VR0+pIZhqz85ORAGp+4zW+5fJ/SE7bwEibA==", + "dev": true + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -18331,12 +20121,24 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==", + "dev": true + }, "p-finally": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", "dev": true }, + "p-is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "dev": true + }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -18379,6 +20181,20 @@ "callsites": "^3.0.0" } }, + "parse-entities": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz", + "integrity": "sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==", + "dev": true, + "requires": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + } + }, "parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -18391,6 +20207,12 @@ "lines-and-columns": "^1.1.6" } }, + "parse-srcset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-srcset/-/parse-srcset-1.0.2.tgz", + "integrity": "sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==", + "dev": true + }, "parse5": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", @@ -18648,6 +20470,153 @@ "semver-compare": "^1.0.0" } }, + "postcss": { + "version": "5.2.18", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-5.2.18.tgz", + "integrity": "sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==", + "dev": true, + "requires": { + "chalk": "^1.1.3", + "js-base64": "^2.1.9", + "source-map": "^0.5.6", + "supports-color": "^3.2.3" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", + "dev": true, + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + }, + "dependencies": { + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", + "dev": true + } + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "postcss-less": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-2.0.0.tgz", + "integrity": "sha512-pPNsVnpCB13nBMOcl5GVh8JGmB0JGFjqkLUDzKdVpptFFKEe9wFdEzvh2j4lD2AD+7qcrUfw9Ta+oi5+Fw7jjQ==", + "dev": true, + "requires": { + "postcss": "^5.2.16" + } + }, + "postcss-media-query-parser": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", + "integrity": "sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==", + "dev": true + }, + "postcss-scss": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.0.0.tgz", + "integrity": "sha512-um9zdGKaDZirMm+kZFKKVsnKPF7zF7qBAtIfTSnZXD1jZ0JNZIxdB6TxQOjCnlSzLRInVl2v3YdBh/M881C4ug==", + "dev": true, + "requires": { + "postcss": "^7.0.0" + }, + "dependencies": { + "picocolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", + "dev": true + }, + "postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", + "dev": true, + "requires": { + "picocolors": "^0.2.1", + "source-map": "^0.6.1" + } + } + } + }, + "postcss-selector-parser": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz", + "integrity": "sha512-3pqyakeGhrO0BQ5+/tGTfvi5IAUAhHRayGK8WFSu06aEv2BmHoXw/Mhb+w7VY5HERIuC+QoUI7wgrCcq2hqCVA==", + "dev": true, + "requires": { + "flatten": "^1.0.2", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "postcss-values-parser": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/postcss-values-parser/-/postcss-values-parser-1.5.0.tgz", + "integrity": "sha512-3M3p+2gMp0AH3da530TlX8kiO1nxdTnc3C6vr8dMxRLIlh8UYkz0/wcwptSXjhtx2Fr0TySI7a+BHDQ8NL7LaQ==", + "dev": true, + "requires": { + "flatten": "^1.0.2", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, "pre-commit": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/pre-commit/-/pre-commit-1.2.2.tgz", @@ -18719,23 +20688,23 @@ "dev": true }, "prettier-standard": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/prettier-standard/-/prettier-standard-15.0.1.tgz", - "integrity": "sha512-uT/+SeoioaGh1+pyY28P5mYJTlhzdPRScYJ1SlrhLwuB6ejP06h1SaBpCLae35zoIP7Tf4YM/px8b3bClWwVrg==", + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/prettier-standard/-/prettier-standard-16.4.1.tgz", + "integrity": "sha512-IW3Sct4GOdqc1s4+1HZjH2HegzLZQ6mDMl2xz6i6KHCac7kCM+obLbvm2e0zp8PytKkLQCdOpj0cWWa48Ruetw==", "dev": true, "requires": { "chalk": "^2.4.2", - "diff": "^4.0.1", - "eslint": "^6.4.0", + "diff": "^4.0.2", + "eslint": "^6.8.0", "execa": "^2.0.4", "find-up": "^4.1.0", "get-stdin": "^7.0.0", "globby": "^6.1.0", "ignore": "^3.3.7", - "lint-staged": "9.4.0", - "mri": "^1.1.4", + "lint-staged": "9.4.3", + "mri": "^1.1.5", "multimatch": "^3.0.0", - "prettierx": "0.7.1" + "prettierx": "0.11.3" }, "dependencies": { "acorn": { @@ -18992,9 +20961,9 @@ "dev": true }, "lint-staged": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-9.4.0.tgz", - "integrity": "sha512-jTu1KoGiGTSffM539wK+3igVqDGVsby3KwDBaXL471YndahkjnavLX+R5Nsk49JwklyMo0ZAXay1BaoyA6d2Jw==", + "version": "9.4.3", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-9.4.3.tgz", + "integrity": "sha512-PejnI+rwOAmKAIO+5UuAZU9gxdej/ovSEOAY34yMfC3OS4Ac82vCBPzAWLReR9zCPOMqeVwQRaZ3bUBpAsaL2Q==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -19128,13 +21097,221 @@ } }, "prettierx": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/prettierx/-/prettierx-0.7.1.tgz", - "integrity": "sha512-6snEPDLZ3iyfoX+DCsQzeFBpi8PDqSfq77Pt9e0H2R/jTG2FJfq/bjYlUqmdonLHEcIgKdHemm7pk/4ydLwcgw==", - "dev": true - }, - "pretty-format": { - "version": "27.5.1", + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/prettierx/-/prettierx-0.11.3.tgz", + "integrity": "sha512-Xf04LEfD3ITo26i5U/zR++hwqKPG3feR06rrjB0t2o+QFv8ZidFp4o7nPqPGLfE4UwHJgd0qwnZKwm0MsUQHUA==", + "dev": true, + "requires": { + "@angular/compiler": "8.2.14", + "@babel/code-frame": "7.8.3", + "@babel/parser": "7.9.4", + "@glimmer/syntax": "0.41.4", + "@iarna/toml": "2.2.3", + "@typescript-eslint/typescript-estree": "2.6.1", + "angular-estree-parser": "1.3.1", + "angular-html-parser": "1.4.0", + "camelcase": "5.3.1", + "chalk": "3.0.0", + "cjk-regex": "2.0.0", + "cosmiconfig": "5.2.1", + "dashify": "2.0.0", + "dedent": "0.7.0", + "diff": "4.0.2", + "editorconfig": "0.15.3", + "editorconfig-to-prettier": "0.1.1", + "escape-string-regexp": "2.0.0", + "esutils": "2.0.3", + "find-parent-dir": "0.3.0", + "find-project-root": "1.1.1", + "flow-parser": "0.111.3", + "get-stream": "4.1.0", + "globby": "6.1.0", + "graphql": "14.6.0", + "html-element-attributes": "2.2.1", + "html-styles": "1.0.0", + "html-tag-names": "1.1.5", + "ignore": "4.0.6", + "is-ci": "2.0.0", + "jest-docblock": "25.3.0", + "json-stable-stringify": "1.0.1", + "leven": "3.1.0", + "lines-and-columns": "1.1.6", + "linguist-languages": "7.6.0", + "lodash.uniqby": "4.7.0", + "mem": "5.1.1", + "minimatch": "3.0.4", + "minimist": "1.2.5", + "n-readlines": "1.0.0", + "normalize-path": "3.0.0", + "parse-srcset": "1.0.2", + "postcss-less": "2.0.0", + "postcss-media-query-parser": "0.2.3", + "postcss-scss": "2.0.0", + "postcss-selector-parser": "2.2.3", + "postcss-values-parser": "1.5.0", + "regexp-util": "1.2.2", + "remark-math": "1.0.6", + "remark-parse": "5.0.0", + "resolve": "1.15.1", + "semver": "6.3.0", + "string-width": "4.2.0", + "unicode-regex": "3.0.0", + "unified": "8.4.2", + "vnopts": "1.0.2", + "yaml": "1.8.3", + "yaml-unist-parser": "1.1.1" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/parser": { + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", + "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.6.1.tgz", + "integrity": "sha512-+sTnssW6bcbDZKE8Ce7VV6LdzkQz2Bxk7jzk1J8H1rovoTxnm6iXvYIyncvNsaB/kBCOM63j/LNJfm27bNdUoA==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "glob": "^7.1.4", + "is-glob": "^4.0.1", + "lodash.unescape": "4.0.1", + "semver": "^6.3.0", + "tsutils": "^3.17.1" + } + }, + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "jest-docblock": { + "version": "25.3.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-25.3.0.tgz", + "integrity": "sha512-aktF0kCar8+zxRHxQZwxMy70stc9R1mOmrLsT5VO3pIT0uzGRSDAXxSlz4NqQWpuLjPpuMhPRl7H+5FRsvIQAg==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha512-8ZmlJFVK9iCmtLz19HpSsR8HaAMWBT284VMNednLwlIMDP2hJDCIhUp0IZ2xUcZ+Ob6BM0VvCSJwzASDM45NLQ==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "resolve": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "yaml": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.8.3.tgz", + "integrity": "sha512-X/v7VDnK+sxbQ2Imq4Jt2PRUsRsP7UcpSl3Llg6+NRRqWLIvxkMFYtH1FmvwNGYRKKPa+EPA4qDBlI9WVG1UKw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.7" + } + } + } + }, + "pretty-format": { + "version": "27.5.1", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", "dev": true, @@ -19359,6 +21536,29 @@ "picomatch": "^2.2.1" } }, + "regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, + "regexp-util": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/regexp-util/-/regexp-util-1.2.2.tgz", + "integrity": "sha512-5/rl2UD18oAlLQEIuKBeiSIOp1hb5wCXcakl5yvHxlY1wyWI4D5cUKKzCibBeu741PA9JKvZhMqbkDQqPusX3w==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, "regexp.prototype.flags": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz", @@ -19375,6 +21575,44 @@ "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, + "remark-math": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/remark-math/-/remark-math-1.0.6.tgz", + "integrity": "sha512-I43wU/QOQpXvVFXKjA4FHp5xptK65+5F6yolm8+69/JV0EqSOB64wURUZ3JK50JtnTL8FvwLiH2PZ+fvsBxviA==", + "dev": true, + "requires": { + "trim-trailing-lines": "^1.1.0" + } + }, + "remark-parse": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-5.0.0.tgz", + "integrity": "sha512-b3iXszZLH1TLoyUzrATcTQUZrwNl1rE70rVdSruJFlDaJ9z5aMkhrG43Pp68OgfHndL/ADz6V69Zow8cTQu+JA==", + "dev": true, + "requires": { + "collapse-white-space": "^1.0.2", + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-whitespace-character": "^1.0.0", + "is-word-character": "^1.0.0", + "markdown-escapes": "^1.0.0", + "parse-entities": "^1.1.0", + "repeat-string": "^1.5.4", + "state-toggle": "^1.0.0", + "trim": "0.0.1", + "trim-trailing-lines": "^1.0.0", + "unherit": "^1.0.4", + "unist-util-remove-position": "^1.0.0", + "vfile-location": "^2.0.0", + "xtend": "^4.0.1" + } + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -19592,12 +21830,24 @@ "object-inspect": "^1.9.0" } }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g==", + "dev": true + }, "signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, + "simple-html-tokenizer": { + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/simple-html-tokenizer/-/simple-html-tokenizer-0.5.11.tgz", + "integrity": "sha512-C2WEK/Z3HoSFbYq8tI7ni3eOo/NneSPRoPpcM7WdLjFOArFuyXEjAoCdOC3DgMfRyziZQ1hCNR4mrNdWEvD0og==", + "dev": true + }, "sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -20157,6 +22407,12 @@ "standard-engine": "^14.0.1" } }, + "state-toggle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz", + "integrity": "sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==", + "dev": true + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -20522,6 +22778,24 @@ "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", "dev": true }, + "trim": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", + "integrity": "sha512-YzQV+TZg4AxpKxaTHK3c3D+kRDCGVEE7LemdlQZoQXn0iennk10RsIoY6ikzAqJTc9Xjl9C1/waHom/J86ziAQ==", + "dev": true + }, + "trim-trailing-lines": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz", + "integrity": "sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==", + "dev": true + }, + "trough": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", + "dev": true + }, "try-require": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/try-require/-/try-require-1.2.1.tgz", @@ -20814,6 +23088,44 @@ "which-boxed-primitive": "^1.0.2" } }, + "unherit": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.3.tgz", + "integrity": "sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ==", + "dev": true, + "requires": { + "inherits": "^2.0.0", + "xtend": "^4.0.0" + } + }, + "unicode-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unicode-regex/-/unicode-regex-3.0.0.tgz", + "integrity": "sha512-WiDJdORsqgxkZrjC8WsIP573130HNn7KsB0IDnUccW2BG2b19QQNloNhVe6DKk3Aef0UcoIHhNVj7IkkcYWrNw==", + "dev": true, + "requires": { + "regexp-util": "^1.2.0" + } + }, + "unified": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-8.4.2.tgz", + "integrity": "sha512-JCrmN13jI4+h9UAyKEoGcDZV+i1E7BLFuG7OsaDvTXI5P0qhHX+vZO/kOhz9jn8HGENDKbwSeB0nVOg4gVStGA==", + "dev": true, + "requires": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + } + }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA==", + "dev": true + }, "unique-filename": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", @@ -20834,6 +23146,48 @@ "imurmurhash": "^0.1.4" } }, + "unist-util-is": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz", + "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==", + "dev": true + }, + "unist-util-remove-position": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.4.tgz", + "integrity": "sha512-tLqd653ArxJIPnKII6LMZwH+mb5q+n/GtXQZo6S6csPRs5zB0u79Yw8ouR3wTw8wxvdJFhpP6Y7jorWdCgLO0A==", + "dev": true, + "requires": { + "unist-util-visit": "^1.1.0" + } + }, + "unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "requires": { + "@types/unist": "^2.0.2" + } + }, + "unist-util-visit": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz", + "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==", + "dev": true, + "requires": { + "unist-util-visit-parents": "^2.0.0" + } + }, + "unist-util-visit-parents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz", + "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==", + "dev": true, + "requires": { + "unist-util-is": "^3.0.0" + } + }, "universalify": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", @@ -20916,6 +23270,115 @@ "git-last-commit": "^1.0.0" } }, + "vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + } + }, + "vfile-location": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.6.tgz", + "integrity": "sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==", + "dev": true + }, + "vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dev": true, + "requires": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + } + }, + "vnopts": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/vnopts/-/vnopts-1.0.2.tgz", + "integrity": "sha512-d2rr2EFhAGHnTlURu49G7GWmiJV80HbAnkYdD9IFAtfhmxC+kSWEaZ6ZF064DJFTv9lQZQV1vuLTntyQpoanGQ==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "leven": "^2.1.0", + "tslib": "^1.9.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, "vow": { "version": "0.4.20", "resolved": "https://registry.npmjs.org/vow/-/vow-0.4.20.tgz", @@ -21221,6 +23684,25 @@ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", "dev": true }, + "yaml-unist-parser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yaml-unist-parser/-/yaml-unist-parser-1.1.1.tgz", + "integrity": "sha512-cGtqhHBlcft+rTKiPsVcSyi43Eqm5a1buYokW9VkztroKMErBSdR9ANHx+/XxNppHZTu2KMEn4yY8MdhuGoFuA==", + "dev": true, + "requires": { + "lines-and-columns": "^1.1.6", + "tslib": "^1.10.0", + "yaml": "^1.7.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 + } + } + }, "yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", diff --git a/package.json b/package.json index 7351a05..7d54a21 100755 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "jest-junit-reporter": "1.1.0", "lint-staged": "12.4.0", "pre-commit": "1.2.2", - "prettier-standard": "^15.0.1", + "prettier-standard": "^16.4.1", "sql-template-strings": "^2.2.2", "sqlite3": "^5.1.6", "sqlite3-offline-next": "^5.0.3", diff --git a/src/Database.ts b/src/Database.ts index bb15ef6..cb2325a 100755 --- a/src/Database.ts +++ b/src/Database.ts @@ -1,11 +1,8 @@ import * as sqlite3 from 'sqlite3' -import { ISqlite, IMigrate } from './interfaces' +import { ISqlite } from './interfaces' import { Statement } from './Statement' -import { migrate, readMigrations } from './utils/migrate' import { toSqlParams } from './utils/strings' - -import MigrationParams = IMigrate.MigrationParams import { formatError } from './utils/format-error' /** @@ -358,22 +355,6 @@ export class Database< }) } - /** - * Performs a database migration. - */ - async migrate (config?: MigrationParams) { - await migrate(this, config) - } - - /** - * Performs a database migration read operation. - * @returns List of objects with name, id of migrations and SQL code for up and down migration - * You can run up and down with `db.exec(migrations[0].up)` or `db.exec(migrations[0].down)`. Or with other commands that can run SQL code. - */ - readMigrations (migrationPath?: string): Promise { - return readMigrations(migrationPath) - } - /** * The methods underneath requires creative work to implement. PRs / proposals accepted! */ diff --git a/src/Migrations.ts b/src/Migrations.ts new file mode 100644 index 0000000..c0b1730 --- /dev/null +++ b/src/Migrations.ts @@ -0,0 +1,207 @@ +import * as path from 'node:path' +import * as fsp from 'node:fs/promises' + +import { Database } from './Database' +import { IMigrate } from './interfaces' + +import MigrationFile = IMigrate.MigrationFile +import MigrationData = IMigrate.MigrationData + +const DEFAULT_MIGRATIONS_DIR_NAME = 'migrations' +const DEFAULT_MIGRATIONS_DIR_PATH = path.join( + process.cwd(), + DEFAULT_MIGRATIONS_DIR_NAME +) + +const MIGRATION_FILE_REGEXP = /^(\d+).(.*?)\.sql$/ +const MIGRATION_FILE_UP_REGEXP = /^-- .*$/gm +const MIGRATION_FILE_DOWN_REGEXP = /^--\s+?down\b/im +const MIGRATION_FILE_REPLACE_COMMAND_REGEXP = /^-{3,}$/gim + +export class Migrations< + Driver extends Database, + Config extends IMigrate.MigrationParams = IMigrate.MigrationParams +> { + db: Driver + config: Config + + constructor (db: Driver, config?: Config) { + this.db = db + /** Sequence in the properties definitions is IMPORTANT */ + this.config = { + force: false, + table: DEFAULT_MIGRATIONS_DIR_NAME, + ...config, + migrationsPath: path.resolve( + config?.migrationsPath ?? DEFAULT_MIGRATIONS_DIR_PATH + ) + } + } + + /** + * Performs a database migration read operation. + * + * You can run up and down with `db.exec(migrations[0].up)` or `db.exec(migrations[0].down)`. Or with other commands that can run SQL code. + * + * @param migrationPath path to migration folder can be relative or absolute. If not found uses current working directory + * @returns IMigrate.MigrationData[]. List of objects with name, id of migrations and SQL code for up and down migration. + * + * Get the list of migrations, for example: + * { id: 1, name: 'initial', filename: '001-initial.sql', up: ..., down: ... } + * { id: 2, name: 'feature', filename: '002-feature.sql', up: ..., down: ... } + */ + readMigrations = async (): Promise => { + const migrationFiles = await this.getMigrationFiles() + if (!migrationFiles.length) { + throw new Error( + `No migration files found in '${this.config.migrationsPath}'.` + ) + } + + return Promise.all( + migrationFiles.map(migration => this.readMigrationData(migration)) + ) + } + + // TODO: propose to make method GetInstance of the Migrations class, which will be async and we will call + // `downMigrations` and `upNewMigrations` functions in the migrate method. And user can call these + // `downMigrations` and `upNewMigrations` functions when ever he wants it + /** + * Performs a database migration. + * + * Migrates database schema to the latest version. Filename option is present + * in the the MigrationData if `readMigrations` function executes or user can put filename + * for each migration in the config.migrations + */ + migrate = async () => { + const table = this.config.table + const migrations = this.config.migrations ?? (await this.readMigrations()) + + // Create a database table for migrations meta data if it doesn't exist + await this.db.run(`CREATE TABLE IF NOT EXISTS "${table}" ( + id INTEGER PRIMARY KEY, + name TEXT NOT NULL, + up TEXT NOT NULL, + down TEXT NOT NULL + )`) + + // Get the list of already applied migrations + let dbMigrations = await this.db.all( + `SELECT id, name, up, down FROM "${table}" ORDER BY id ASC` + ) + + await this.downMigrations(dbMigrations, migrations) + await this.upNewMigrations(dbMigrations, migrations) + } + + /** + * Apply pending migrations + * + * @param dbMigrations exists migrations in the `table` + * @param migrations IMigrate.MigrationData + */ + private upNewMigrations = async ( + dbMigrations: any[], + migrations: readonly MigrationData[] + ): Promise => { + const lastMigrationId = dbMigrations.length + ? dbMigrations[dbMigrations.length - 1].id + : 0 + for (const migration of migrations) { + if (migration.id > lastMigrationId) { + await this.db.run('BEGIN') + try { + await this.db.exec(migration.up) + await this.db.run( + `INSERT INTO "${this.config.table}" (id, name, up, down) VALUES (?, ?, ?, ?)`, + migration.id, + migration.name, + migration.up, + migration.down + ) + await this.db.run('COMMIT') + } catch (err) { + await this.db.run('ROLLBACK') + throw err + } + } + } + } + + /** + * Undo migrations that exist only in the database but not in files, + * also undo the last migration if the `force` option is enabled. + * + * @param dbMigrations exists migrations in the `table` + * @param migrations IMigrate.MigrationData + */ + private downMigrations = async ( + dbMigrations: any[], + migrations: readonly MigrationData[] + ): Promise => { + const lastMigration = migrations[migrations.length - 1] + for (const migration of dbMigrations + .slice() + .sort((a, b) => Math.sign(b.id - a.id))) { + if ( + !migrations.some(x => x.id === migration.id) || + (this.config.force && migration.id === lastMigration.id) + ) { + await this.db.run('BEGIN') + try { + await this.db.exec(migration.down) + await this.db.run( + `DELETE FROM "${this.config.table}" WHERE id = ?`, + migration.id + ) + await this.db.run('COMMIT') + dbMigrations = dbMigrations.filter(x => x.id !== migration.id) + } catch (err) { + await this.db.run('ROLLBACK') + throw err + } + } else { + break + } + } + } + + private readMigrationData = async ( + migration: MigrationFile + ): Promise => { + const filepath = path.join(this.config.migrationsPath, migration.filename) + const fileData = await fsp.readFile(filepath, 'utf-8') + + const [up, down] = fileData + .split(MIGRATION_FILE_DOWN_REGEXP) + .map(value => + value.replace(MIGRATION_FILE_REPLACE_COMMAND_REGEXP, '').trim() + ) + + const migrationUp = up.replace(MIGRATION_FILE_UP_REGEXP, '').trim() // Remove comments + const migrationDown = down ? down.trim() : '' // and trim whitespaces + return { ...migration, up: migrationUp, down: migrationDown } + } + + /** + * Read `location` directory and look for migration files + * + * @param location path to the directory with migrations files without nesting + * @returns IMigrate.MigrationFile + * + * Get the list of migration files, for example: + * { id: 1, name: 'initial', filename: '001-initial.sql' } + * { id: 2, name: 'feature', filename: '002-feature.sql' } + */ + private getMigrationFiles = async (): Promise => { + const files = await fsp.readdir(this.config.migrationsPath) + + const filenames = files + .map(x => MIGRATION_FILE_REGEXP.exec(x)) + .filter(x => x !== null) as RegExpMatchArray[] + + return filenames + .map(x => ({ id: Number(x[1]), name: x[2], filename: x[0] })) + .sort((a, b) => Math.sign(a.id - b.id)) + } +} diff --git a/src/utils/__tests__/migrate.test.ts b/src/__tests__/Migrations.test.ts similarity index 65% rename from src/utils/__tests__/migrate.test.ts rename to src/__tests__/Migrations.test.ts index e0eeac1..47598a4 100755 --- a/src/utils/__tests__/migrate.test.ts +++ b/src/__tests__/Migrations.test.ts @@ -1,7 +1,7 @@ /* eslint-env jest */ -import { migrate, readMigrations } from '../migrate' -import { Database } from '../../Database' +import { Migrations } from '../Migrations' +import { Database } from '../Database' import * as sqlite3 from 'sqlite3' let db @@ -17,7 +17,8 @@ beforeEach(async () => { describe('migration function', () => { it('Should migrate the database', async () => { - await migrate(db) + const migrationsInstance = new Migrations(db) + await migrationsInstance.migrate() let result = await db.all('SELECT id, name FROM migrations') expect(result).toEqual([ @@ -30,11 +31,11 @@ describe('migration function', () => { result = await db.all('SELECT * FROM Category') expect(result).toEqual([{ id: 1, name: 'Test' }]) - await migrate(db, { - force: true - }) + const migrationsInstanceForce = new Migrations(db, { force: true }) + await migrationsInstanceForce.migrate() + console.log('heer') - result = await db.all('SELECT certificate from whatever') + result = await db.all('SELECT certificate FROM whatever') expect(result[0].certificate).toBe( '-----BEGIN CERTIFICATE-----\nsome contents\n-----END CERTIFICATE-----' @@ -48,12 +49,15 @@ describe('migration function', () => { }) it('Should migrate the database without reading disk', async () => { - let migrations = await readMigrations() + const migrationsInstanceMigrations = new Migrations(db) + + let migrations = await migrationsInstanceMigrations.readMigrations() migrations = migrations.slice(0, 2) - await migrate(db, { migrations }) + const migrationsInstance = new Migrations(db, { migrations }) + await migrationsInstance.migrate() - let result = await db.all('SELECT id, name FROM migrations') + let result = await db.all('SELECT id, name FROM "migrations"') expect(result).toEqual([ { id: 1, name: 'initial' }, { id: 2, name: 'some-feature' } diff --git a/src/__tests__/Sqlite3.test.ts b/src/__tests__/Sqlite3.test.ts index 3a106a6..01a90da 100755 --- a/src/__tests__/Sqlite3.test.ts +++ b/src/__tests__/Sqlite3.test.ts @@ -3,7 +3,7 @@ import { Database } from '../Database' import SQL from 'sql-template-strings' import * as sqlite3 from 'sqlite3' -import { open } from '..' +import { Migrations, open } from '..' let db: Database @@ -288,7 +288,8 @@ describe('Sqlite3Database', () => { }) await db.open() - await db.migrate() + const migrationsInstance = new Migrations(db) + await migrationsInstance.migrate() const result = await db.all('SELECT id, name FROM migrations') expect(result).toEqual([ diff --git a/src/__tests__/index.test.ts b/src/__tests__/index.test.ts index a4cf865..e9d6f93 100755 --- a/src/__tests__/index.test.ts +++ b/src/__tests__/index.test.ts @@ -1,7 +1,7 @@ /* eslint-env jest */ // import * as sqlite3Offline from 'sqlite3-offline-next' -import { open } from '..' +import { Migrations, open } from '..' import * as sqlite3 from 'sqlite3' import { @@ -25,15 +25,14 @@ describe('index', () => { ] driver.forEach(c => { - it(`should create an instance of sqlite3, cached = ${ - c.cached - }`, async () => { + it(`should create an instance of sqlite3, cached = ${c.cached}`, async () => { const db = await open({ filename: ':memory:', driver: c.driver }) + const migrationsInstance = new Migrations(db) - await db.migrate() + await migrationsInstance.migrate() const result = await db.all('SELECT id, name FROM migrations') expect(result).toEqual([ @@ -48,34 +47,47 @@ describe('index', () => { }) driver.forEach(c => { - it(`should return list of migrations with name, id, down and up variables, cached = ${ - c.cached - }`, async () => { + it(`should return list of migrations with name, id, down and up variables, cached = ${c.cached}`, async () => { // const expectedData = const db = await open({ filename: ':memory:', driver: c.driver }) + const migrationsInstance = new Migrations(db) - await db.migrate() + await migrationsInstance.migrate() - const migrations = await db.readMigrations() + const migrations = await migrationsInstance.readMigrations() expect(migrations).toEqual([ - { id: 1, name: 'initial', up: initial001.up, down: initial001.down }, + { + id: 1, + name: 'initial', + up: initial001.up, + down: initial001.down, + filename: '001-initial.sql' + }, { id: 2, name: 'some-feature', up: someFeature002.up, - down: someFeature002.down + down: someFeature002.down, + filename: '002-some-feature.sql' }, { id: 3, name: 'test-cert', up: testCert003.up, - down: testCert003.down + down: testCert003.down, + filename: '003-test-cert.sql' }, - { id: 4, name: 'no-down', up: noDown004.up, down: '' } + { + id: 4, + name: 'no-down', + up: noDown004.up, + down: '', + filename: '004-no-down.sql' + } ]) await db.close() diff --git a/src/index.mjs b/src/index.mjs index 8036ae1..d3b7369 100644 --- a/src/index.mjs +++ b/src/index.mjs @@ -1,12 +1,13 @@ -export * from "./Statement.js"; -export * from "./Database.js"; -import Database from "./Database.js"; +export * from './Statement.js' +export * from './Database.js' +export * from './Migrations.js' +import Database from './Database.js' /** * Opens a database for manipulation. Most users will call this to get started. */ -export async function open(config) { - const db = new Database.Database(config); - await db.open(); - return db; +export async function open (config) { + const db = new Database.Database(config) + await db.open() + return db } diff --git a/src/index.ts b/src/index.ts index be5b5a5..1cd2200 100755 --- a/src/index.ts +++ b/src/index.ts @@ -3,6 +3,7 @@ import * as sqlite3 from 'sqlite3' import { Statement } from './Statement' import { Database } from './Database' +import { Migrations } from './Migrations' import { ISqlite, IMigrate } from './interfaces' /** @@ -19,4 +20,4 @@ async function open< return db } -export { open, Statement, Database, ISqlite, IMigrate } +export { open, Statement, Database, Migrations, ISqlite, IMigrate } diff --git a/src/interfaces.ts b/src/interfaces.ts index 7b3635e..e9756bb 100755 --- a/src/interfaces.ts +++ b/src/interfaces.ts @@ -114,5 +114,6 @@ export namespace IMigrate { name: string up: string down: string + filename?: string } } diff --git a/src/utils/migrate.ts b/src/utils/migrate.ts deleted file mode 100755 index f8d907b..0000000 --- a/src/utils/migrate.ts +++ /dev/null @@ -1,140 +0,0 @@ -import * as fs from 'fs' -import * as path from 'path' -import { Database } from '../Database' -import { IMigrate } from '../interfaces' - -import MigrationFile = IMigrate.MigrationFile -import MigrationParams = IMigrate.MigrationParams -import MigrationData = IMigrate.MigrationData - -export async function readMigrations (migrationPath?: string) { - const migrationsPath = migrationPath || path.join(process.cwd(), 'migrations') - const location = path.resolve(migrationsPath) - - // Get the list of migration files, for example: - // { id: 1, name: 'initial', filename: '001-initial.sql' } - // { id: 2, name: 'feature', filename: '002-feature.sql' } - const migrationFiles = await new Promise( - (resolve, reject) => { - fs.readdir(location, (err, files) => { - if (err) { - return reject(err) - } - - resolve( - files - .map(x => x.match(/^(\d+).(.*?)\.sql$/)) - .filter(x => x !== null) - .map(x => ({ id: Number(x[1]), name: x[2], filename: x[0] })) - .sort((a, b) => Math.sign(a.id - b.id)) - ) - }) - } - ) - - if (!migrationFiles.length) { - throw new Error(`No migration files found in '${location}'.`) - } - - // Get the list of migrations, for example: - // { id: 1, name: 'initial', filename: '001-initial.sql', up: ..., down: ... } - // { id: 2, name: 'feature', filename: '002-feature.sql', up: ..., down: ... } - return Promise.all( - migrationFiles.map( - migration => - new Promise((resolve, reject) => { - const filename = path.join(location, migration.filename) - fs.readFile(filename, 'utf-8', (err, data) => { - if (err) { - return reject(err) - } - - const [up, down] = data - .split(/^--\s+?down\b/im) - .map(value => value.replace(/^-{3,}$/gim, '').trim()) - - delete migration.filename - const migrationData = migration as Partial - migrationData.up = up.replace(/^-- .*?$/gm, '').trim() // Remove comments - migrationData.down = down ? down.trim() : '' // and trim whitespaces - resolve(migrationData as MigrationData) - }) - }) - ) - ) -} - -/** - * Migrates database schema to the latest version - */ -export async function migrate (db: Database, config: MigrationParams = {}) { - config.force = config.force || false - config.table = config.table || 'migrations' - - const { force, table } = config - const migrations = config.migrations - ? config.migrations - : await readMigrations(config.migrationsPath) - - // Create a database table for migrations meta data if it doesn't exist - await db.run(`CREATE TABLE IF NOT EXISTS "${table}" ( - id INTEGER PRIMARY KEY, - name TEXT NOT NULL, - up TEXT NOT NULL, - down TEXT NOT NULL -)`) - - // Get the list of already applied migrations - let dbMigrations = await db.all( - `SELECT id, name, up, down FROM "${table}" ORDER BY id ASC` - ) - - // Undo migrations that exist only in the database but not in files, - // also undo the last migration if the `force` option is enabled. - const lastMigration = migrations[migrations.length - 1] - for (const migration of dbMigrations - .slice() - .sort((a, b) => Math.sign(b.id - a.id))) { - if ( - !migrations.some(x => x.id === migration.id) || - (force && migration.id === lastMigration.id) - ) { - await db.run('BEGIN') - try { - await db.exec(migration.down) - await db.run(`DELETE FROM "${table}" WHERE id = ?`, migration.id) - await db.run('COMMIT') - dbMigrations = dbMigrations.filter(x => x.id !== migration.id) - } catch (err) { - await db.run('ROLLBACK') - throw err - } - } else { - break - } - } - - // Apply pending migrations - const lastMigrationId = dbMigrations.length - ? dbMigrations[dbMigrations.length - 1].id - : 0 - for (const migration of migrations) { - if (migration.id > lastMigrationId) { - await db.run('BEGIN') - try { - await db.exec(migration.up) - await db.run( - `INSERT INTO "${table}" (id, name, up, down) VALUES (?, ?, ?, ?)`, - migration.id, - migration.name, - migration.up, - migration.down - ) - await db.run('COMMIT') - } catch (err) { - await db.run('ROLLBACK') - throw err - } - } - } -} diff --git a/tsconfig.json b/tsconfig.json index 9172e5f..2a46c6f 100755 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,20 +9,11 @@ "outDir": "build", "baseUrl": ".", "declaration": true, - "lib": [ - "ES2018", - "dom" - ], + "lib": ["ES2018", "dom"], "paths": { - "*": [ - "node_modules/*" - ] + "*": ["node_modules/*"] } }, - "include": [ - "src/**/*" - ], - "exclude": [ - "src/**/__tests__/*" - ] + "include": ["src/**/*"], + "exclude": ["src/**/__tests__/*"] }