From efef10e0e94f702d85e0f8c6003029c52be30523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Rebours?= Date: Thu, 6 Jan 2022 16:50:02 +0100 Subject: [PATCH] auto-generate docs in markdown and html --- .gitignore | 2 +- docs/Cursor.md | 163 ++++ docs/Datastore.md | 420 ++++++++++ docs/Executor.md | 88 ++ docs/Index.md | 166 ++++ docs/Persistence.md | 241 ++++++ docs/Waterfall.md | 53 ++ docs/customUtilsBrowser.md | 36 + docs/customUtilsNode.md | 43 + docs/model.md | 217 +++++ docs/storage.md | 369 +++++++++ docs/storageBrowser.md | 266 ++++++ docs/storageReactNative.md | 267 ++++++ docs/utils.md | 67 ++ jsdoc.conf.js | 8 + jsdoc2md.js | 43 + lib/executor.js | 81 +- lib/waterfall.js | 58 ++ package-lock.json | 1606 +++++++++++++++++++++++++++++++++++- package.json | 6 +- 20 files changed, 4107 insertions(+), 93 deletions(-) create mode 100644 docs/Cursor.md create mode 100644 docs/Datastore.md create mode 100644 docs/Executor.md create mode 100644 docs/Index.md create mode 100644 docs/Persistence.md create mode 100644 docs/Waterfall.md create mode 100644 docs/customUtilsBrowser.md create mode 100644 docs/customUtilsNode.md create mode 100644 docs/model.md create mode 100644 docs/storage.md create mode 100644 docs/storageBrowser.md create mode 100644 docs/storageReactNative.md create mode 100644 docs/utils.md create mode 100644 jsdoc.conf.js create mode 100644 jsdoc2md.js create mode 100644 lib/waterfall.js diff --git a/.gitignore b/.gitignore index add07a4..81b6ed6 100755 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,4 @@ browser-version/node_modules browser-version/out test-results -docs +docs-html diff --git a/docs/Cursor.md b/docs/Cursor.md new file mode 100644 index 0000000..d3303f5 --- /dev/null +++ b/docs/Cursor.md @@ -0,0 +1,163 @@ + + +## Cursor ⇐ Promise +

Manage access to data, be it to find, update or remove it.

+

It extends Promise so that its methods are chainable & awaitable.

+ +**Kind**: global class +**Extends**: Promise + +* [Cursor](#Cursor) ⇐ Promise + * [new Cursor(db, query, [execFn], [async])](#new_Cursor_new) + * _instance_ + * [.limit(limit)](#Cursor+limit) ⇒ [Cursor](#Cursor) + * [.skip(skip)](#Cursor+skip) ⇒ [Cursor](#Cursor) + * [.sort(sortQuery)](#Cursor+sort) ⇒ [Cursor](#Cursor) + * [.projection(projection)](#Cursor+projection) ⇒ [Cursor](#Cursor) + * [.project(candidates)](#Cursor+project) ⇒ [Array.<document>](#document) + * [._execAsync()](#Cursor+_execAsync) ⇒ [Array.<document>](#document) \| Promise.<\*> + * [._exec(_callback)](#Cursor+_exec) + * [.exec(_callback)](#Cursor+exec) + * [.execAsync()](#Cursor+execAsync) ⇒ Promise.<(Array.<document>\|\*)> + * _inner_ + * [~execFn](#Cursor..execFn) : function + * [~execFnAsync](#Cursor..execFnAsync) ⇒ Promise + * [~execCallback](#Cursor..execCallback) : function + + + +### new Cursor(db, query, [execFn], [async]) +

Create a new cursor for this collection

+ + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| db | [Datastore](#Datastore) | |

The datastore this cursor is bound to

| +| query | [query](#query) | |

The query this cursor will operate on

| +| [execFn] | [execFn](#Cursor..execFn) \| [execFnAsync](#Cursor..execFnAsync) | |

Handler to be executed after cursor has found the results and before the callback passed to find/findOne/update/remove

| +| [async] | boolean | false |

If true, specifies that the execFn is of type [execFnAsync](#Cursor..execFnAsync) rather than [execFn](#Cursor..execFn).

| + + + +### cursor.limit(limit) ⇒ [Cursor](#Cursor) +

Set a limit to the number of results

+ +**Kind**: instance method of [Cursor](#Cursor) + +| Param | Type | +| --- | --- | +| limit | Number | + + + +### cursor.skip(skip) ⇒ [Cursor](#Cursor) +

Skip a number of results

+ +**Kind**: instance method of [Cursor](#Cursor) + +| Param | Type | +| --- | --- | +| skip | Number | + + + +### cursor.sort(sortQuery) ⇒ [Cursor](#Cursor) +

Sort results of the query

+ +**Kind**: instance method of [Cursor](#Cursor) + +| Param | Type | Description | +| --- | --- | --- | +| sortQuery | Object.<string, number> |

sortQuery is { field: order }, field can use the dot-notation, order is 1 for ascending and -1 for descending

| + + + +### cursor.projection(projection) ⇒ [Cursor](#Cursor) +

Add the use of a projection

+ +**Kind**: instance method of [Cursor](#Cursor) + +| Param | Type | Description | +| --- | --- | --- | +| projection | Object.<string, number> |

MongoDB-style projection. {} means take all fields. Then it's { key1: 1, key2: 1 } to take only key1 and key2 { key1: 0, key2: 0 } to omit only key1 and key2. Except _id, you can't mix takes and omits.

| + + + +### cursor.project(candidates) ⇒ [Array.<document>](#document) +

Apply the projection

+ +**Kind**: instance method of [Cursor](#Cursor) + +| Param | Type | +| --- | --- | +| candidates | [Array.<document>](#document) | + + + +### cursor.\_execAsync() ⇒ [Array.<document>](#document) \| Promise.<\*> +

Get all matching elements +Will return pointers to matched elements (shallow copies), returning full copies is the role of find or findOne +This is an internal function, use execAsync which uses the executor

+ +**Kind**: instance method of [Cursor](#Cursor) + + +### cursor.\_exec(_callback) +

Get all matching elements +Will return pointers to matched elements (shallow copies), returning full copies is the role of find or findOne +This is an internal function, use exec which uses the executor

+ +**Kind**: instance method of [Cursor](#Cursor) + +| Param | Type | +| --- | --- | +| _callback | [execCallback](#Cursor..execCallback) | + + + +### cursor.exec(_callback) +

Get all matching elements +Will return pointers to matched elements (shallow copies), returning full copies is the role of find or findOne

+ +**Kind**: instance method of [Cursor](#Cursor) + +| Param | Type | +| --- | --- | +| _callback | [execCallback](#Cursor..execCallback) | + + + +### cursor.execAsync() ⇒ Promise.<(Array.<document>\|\*)> +

Get all matching elements +Will return pointers to matched elements (shallow copies), returning full copies is the role of find or findOne

+ +**Kind**: instance method of [Cursor](#Cursor) + + +### Cursor~execFn : function +**Kind**: inner typedef of [Cursor](#Cursor) + +| Param | Type | +| --- | --- | +| err | Error | +| res | [?Array.<document>](#document) \| [document](#document) | + + + +### Cursor~execFnAsync ⇒ Promise +**Kind**: inner typedef of [Cursor](#Cursor) + +| Param | Type | +| --- | --- | +| res | [?Array.<document>](#document) \| [document](#document) | + + + +### Cursor~execCallback : function +**Kind**: inner typedef of [Cursor](#Cursor) + +| Param | Type | Description | +| --- | --- | --- | +| err | Error | | +| res | [Array.<document>](#document) \| \* |

If an execFn was given to the Cursor, then the type of this parameter is the one returned by the execFn.

| + diff --git a/docs/Datastore.md b/docs/Datastore.md new file mode 100644 index 0000000..83ca95b --- /dev/null +++ b/docs/Datastore.md @@ -0,0 +1,420 @@ + + +## Datastore ⇐ EventEmitter +

The Datastore class is the main class of NeDB.

+ +**Kind**: global class +**Extends**: EventEmitter +**Emits**: Datastore.event:"compaction.done" + +* [Datastore](#Datastore) ⇐ EventEmitter + * [new Datastore(options)](#new_Datastore_new) + * _instance_ + * [.persistence](#Datastore+persistence) : [Persistence](#Persistence) + * [.executor](#Datastore+executor) : [Executor](#Executor) + * [.autoloadPromise](#Datastore+autoloadPromise) : Promise + * [.loadDatabase(callback)](#Datastore+loadDatabase) + * [.loadDatabaseAsync()](#Datastore+loadDatabaseAsync) ⇒ Promise + * [.getAllData()](#Datastore+getAllData) ⇒ [Array.<document>](#document) + * [.resetIndexes()](#Datastore+resetIndexes) + * [.ensureIndex(options, callback)](#Datastore+ensureIndex) + * [.ensureIndexAsync(options)](#Datastore+ensureIndexAsync) ⇒ Promise.<void> + * [.removeIndex(fieldName, callback)](#Datastore+removeIndex) + * [.removeIndexAsync(fieldName)](#Datastore+removeIndexAsync) ⇒ Promise.<void> + * [.removeFromIndexes(doc)](#Datastore+removeFromIndexes) + * [.updateIndexes(oldDoc, [newDoc])](#Datastore+updateIndexes) + * [.insertAsync(newDoc)](#Datastore+insertAsync) ⇒ [Promise.<document>](#document) + * [.count(query, [callback])](#Datastore+count) ⇒ Cursor.<number> \| undefined + * [.countAsync(query)](#Datastore+countAsync) ⇒ Cursor.<number> + * [.find(query, [projection], [callback])](#Datastore+find) ⇒ Cursor.<Array.<document>> \| undefined + * [.findAsync(query, [projection])](#Datastore+findAsync) ⇒ Cursor.<Array.<document>> + * [.findOne(query, projection, callback)](#Datastore+findOne) ⇒ [Cursor.<document>](#document) \| undefined + * [.findOneAsync(query, projection)](#Datastore+findOneAsync) ⇒ [Cursor.<document>](#document) + * [.update(query, update, [options], [cb])](#Datastore+update) + * [.updateAsync(query, update, [options])](#Datastore+updateAsync) ⇒ Promise.<{numAffected: number, affectedDocuments: (Array.<document>\|document\|null), upsert: boolean}> + * [.remove(query, [options], [cb])](#Datastore+remove) + * [.removeAsync(query, [options])](#Datastore+removeAsync) ⇒ Promise.<number> + * _static_ + * ["event:compaction.done"](#Datastore.event_compaction.done) + * _inner_ + * [~countCallback](#Datastore..countCallback) : function + * [~findOneCallback](#Datastore..findOneCallback) : function + * [~updateCallback](#Datastore..updateCallback) : function + * [~removeCallback](#Datastore..removeCallback) : function + + + +### new Datastore(options) +

Create a new collection, either persistent or in-memory.

+

If you use a persistent datastore without the autoload option, you need to call loadDatabase manually. This +function fetches the data from datafile and prepares the database. Don't forget it! If you use a persistent +datastore, no command (insert, find, update, remove) will be executed before loadDatabase is called, so make sure +to call it yourself or use the autoload option.

+ + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| options | object \| string | |

Can be an object or a string. If options is a string, the behavior is the same as in v0.6: it will be interpreted as options.filename. Giving a string is deprecated, and will be removed in the next major version.

| +| [options.filename] | string | null |

Path to the file where the data is persisted. If left blank, the datastore is automatically considered in-memory only. It cannot end with a ~ which is used in the temporary files NeDB uses to perform crash-safe writes.

| +| [options.inMemoryOnly] | boolean | false |

If set to true, no data will be written in storage.

| +| [options.timestampData] | boolean | false |

If set to true, createdAt and updatedAt will be created and populated automatically (if not specified by user)

| +| [options.autoload] | boolean | false |

If used, the database will automatically be loaded from the datafile upon creation (you don't need to call loadDatabase). Any command issued before load is finished is buffered and will be executed when load is done. When autoloading is done, you can either use the onload callback, or you can use this.autoloadPromise which resolves (or rejects) when autloading is done.

| +| [options.onload] | function | |

If you use autoloading, this is the handler called after the loadDatabase. It takes one error argument. If you use autoloading without specifying this handler, and an error happens during load, an error will be thrown.

| +| [options.beforeDeserialization] | function | |

Hook you can use to transform data after it was serialized and before it is written to disk. Can be used for example to encrypt data before writing database to disk. This function takes a string as parameter (one line of an NeDB data file) and outputs the transformed string, which must absolutely not contain a \n character (or data will be lost).

| +| [options.afterSerialization] | function | |

Inverse of afterSerialization. Make sure to include both and not just one, or you risk data loss. For the same reason, make sure both functions are inverses of one another. Some failsafe mechanisms are in place to prevent data loss if you misuse the serialization hooks: NeDB checks that never one is declared without the other, and checks that they are reverse of one another by testing on random strings of various lengths. In addition, if too much data is detected as corrupt, NeDB will refuse to start as it could mean you're not using the deserialization hook corresponding to the serialization hook used before.

| +| [options.corruptAlertThreshold] | number | 0.1 |

Between 0 and 1, defaults to 10%. NeDB will refuse to start if more than this percentage of the datafile is corrupt. 0 means you don't tolerate any corruption, 1 means you don't care.

| +| [options.compareStrings] | [compareStrings](#compareStrings) | |

If specified, it overrides default string comparison which is not well adapted to non-US characters in particular accented letters. Native localCompare will most of the time be the right choice.

| +| [options.nodeWebkitAppName] | string | |

Deprecated: if you are using NeDB from whithin a Node Webkit app, specify its name (the same one you use in the package.json) in this field and the filename will be relative to the directory Node Webkit uses to store the rest of the application's data (local storage etc.). It works on Linux, OS X and Windows. Now that you can use require('nw.gui').App.dataPath in Node Webkit to get the path to the data directory for your application, you should not use this option anymore and it will be removed.

| + + + +### datastore.persistence : [Persistence](#Persistence) +

The Persistence instance for this Datastore.

+ +**Kind**: instance property of [Datastore](#Datastore) + + +### datastore.executor : [Executor](#Executor) +

The Executor instance for this Datastore. It is used in all methods exposed by the Datastore, any Cursor +produced by the Datastore and by this.persistence.compactDataFile & this.persistence.compactDataFileAsync +to ensure operations are performed sequentially in the database.

+ +**Kind**: instance property of [Datastore](#Datastore) + + +### datastore.autoloadPromise : Promise +

A Promise that resolves when the autoload has finished.

+

The onload callback is not awaited by this Promise, it is started immediately after that.

+ +**Kind**: instance property of [Datastore](#Datastore) + + +### datastore.loadDatabase(callback) +

Load the database from the datafile, and trigger the execution of buffered commands if any.

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | +| --- | --- | +| callback | function | + + + +### datastore.loadDatabaseAsync() ⇒ Promise +

Load the database from the datafile, and trigger the execution of buffered commands if any.

+ +**Kind**: instance method of [Datastore](#Datastore) + + +### datastore.getAllData() ⇒ [Array.<document>](#document) +

Get an array of all the data in the database

+ +**Kind**: instance method of [Datastore](#Datastore) + + +### datastore.resetIndexes() +

Reset all currently defined indexes

+ +**Kind**: instance method of [Datastore](#Datastore) + + +### datastore.ensureIndex(options, callback) +

Ensure an index is kept for this field. Same parameters as lib/indexes +This function acts synchronously on the indexes, however the persistence of the indexes is deferred with the +executor. +Previous versions said explicitly the callback was optional, it is now recommended setting one.

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| options | object | | | +| options.fieldName | string | |

Name of the field to index. Use the dot notation to index a field in a nested document.

| +| [options.unique] | boolean | false |

Enforce field uniqueness. Note that a unique index will raise an error if you try to index two documents for which the field is not defined.

| +| [options.sparse] | boolean | false |

don't index documents for which the field is not defined. Use this option along with "unique" if you want to accept multiple documents for which it is not defined.

| +| [options.expireAfterSeconds] | number | |

if set, the created index is a TTL (time to live) index, that will automatically remove documents when the system date becomes larger than the date on the indexed field plus expireAfterSeconds. Documents where the indexed field is not specified or not a Date object are ignored

| +| callback | [NoParamCallback](#NoParamCallback) | |

Callback, signature: err

| + + + +### datastore.ensureIndexAsync(options) ⇒ Promise.<void> +

Ensure an index is kept for this field. Same parameters as lib/indexes +This function acts synchronously on the indexes, however the persistence of the indexes is deferred with the +executor. +Previous versions said explicitly the callback was optional, it is now recommended setting one.

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| options | object | | | +| options.fieldName | string | |

Name of the field to index. Use the dot notation to index a field in a nested document.

| +| [options.unique] | boolean | false |

Enforce field uniqueness. Note that a unique index will raise an error if you try to index two documents for which the field is not defined.

| +| [options.sparse] | boolean | false |

Don't index documents for which the field is not defined. Use this option along with "unique" if you want to accept multiple documents for which it is not defined.

| +| [options.expireAfterSeconds] | number | |

If set, the created index is a TTL (time to live) index, that will automatically remove documents when the system date becomes larger than the date on the indexed field plus expireAfterSeconds. Documents where the indexed field is not specified or not a Date object are ignored

| + + + +### datastore.removeIndex(fieldName, callback) +

Remove an index +Previous versions said explicitly the callback was optional, it is now recommended setting one.

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | Description | +| --- | --- | --- | +| fieldName | string |

Field name of the index to remove. Use the dot notation to remove an index referring to a field in a nested document.

| +| callback | [NoParamCallback](#NoParamCallback) |

Optional callback, signature: err

| + + + +### datastore.removeIndexAsync(fieldName) ⇒ Promise.<void> +

Remove an index +Previous versions said explicitly the callback was optional, it is now recommended setting one.

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | Description | +| --- | --- | --- | +| fieldName | string |

Field name of the index to remove. Use the dot notation to remove an index referring to a field in a nested document.

| + + + +### datastore.removeFromIndexes(doc) +

Remove one or several document(s) from all indexes

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | +| --- | --- | +| doc | [document](#document) | + + + +### datastore.updateIndexes(oldDoc, [newDoc]) +

Update one or several documents in all indexes +To update multiple documents, oldDoc must be an array of { oldDoc, newDoc } pairs +If one update violates a constraint, all changes are rolled back

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | Description | +| --- | --- | --- | +| oldDoc | [document](#document) \| Array.<{oldDoc: document, newDoc: document}> |

Document to update, or an Array of {oldDoc, newDoc} pairs.

| +| [newDoc] | [document](#document) |

Document to replace the oldDoc with. If the first argument is an Array of {oldDoc, newDoc} pairs, this second argument is ignored.

| + + + +### datastore.insertAsync(newDoc) ⇒ [Promise.<document>](#document) +

Insert a new document +Private Use Datastore.insertAsync which has the same signature

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | +| --- | --- | +| newDoc | [document](#document) \| [Array.<document>](#document) | + + + +### datastore.count(query, [callback]) ⇒ Cursor.<number> \| undefined +

Count all documents matching the query

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | Description | +| --- | --- | --- | +| query | [query](#query) |

MongoDB-style query

| +| [callback] | [countCallback](#Datastore..countCallback) |

If given, the function will return undefined, otherwise it will return the Cursor.

| + + + +### datastore.countAsync(query) ⇒ Cursor.<number> +

Count all documents matching the query

+ +**Kind**: instance method of [Datastore](#Datastore) +**Returns**: Cursor.<number> -

count

+ +| Param | Type | Description | +| --- | --- | --- | +| query | [query](#query) |

MongoDB-style query

| + + + +### datastore.find(query, [projection], [callback]) ⇒ Cursor.<Array.<document>> \| undefined +

Find all documents matching the query +If no callback is passed, we return the cursor so that user can limit, skip and finally exec

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| query | [query](#query) | |

MongoDB-style query

| +| [projection] | [projection](#projection) \| [MultipleDocumentsCallback](#MultipleDocumentsCallback) | {} |

MongoDB-style projection. If not given, will be interpreted as the callback.

| +| [callback] | [MultipleDocumentsCallback](#MultipleDocumentsCallback) | |

Optional callback, signature: err, docs

| + + + +### datastore.findAsync(query, [projection]) ⇒ Cursor.<Array.<document>> +

Find all documents matching the query +If no callback is passed, we return the cursor so that user can limit, skip and finally exec

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| query | [query](#query) | |

MongoDB-style query

| +| [projection] | [projection](#projection) | {} |

MongoDB-style projection

| + + + +### datastore.findOne(query, projection, callback) ⇒ [Cursor.<document>](#document) \| undefined +

Find one document matching the query

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | Description | +| --- | --- | --- | +| query | [query](#query) |

MongoDB-style query

| +| projection | [projection](#projection) |

MongoDB-style projection

| +| callback | [SingleDocumentCallback](#SingleDocumentCallback) |

Optional callback, signature: err, doc

| + + + +### datastore.findOneAsync(query, projection) ⇒ [Cursor.<document>](#document) +

Find one document matching the query

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | Description | +| --- | --- | --- | +| query | [query](#query) |

MongoDB-style query

| +| projection | [projection](#projection) |

MongoDB-style projection

| + + + +### datastore.update(query, update, [options], [cb]) +

Update all docs matching query.

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| query | [query](#query) | |

is the same kind of finding query you use with find and findOne

| +| update | [document](#document) \| update | |

specifies how the documents should be modified. It is either a new document or a set of modifiers (you cannot use both together, it doesn't make sense!):

| +| [options] | Object | |

Optional options

| +| [options.multi] | boolean | false |

If true, can update multiple documents

| +| [options.upsert] | boolean | false |

If true, can insert a new document corresponding to the update rules if your query doesn't match anything. If your update is a simple object with no modifiers, it is the inserted document. In the other case, the query is stripped from all operator recursively, and the update is applied to it.

| +| [options.returnUpdatedDocs] | boolean | false |

(not Mongo-DB compatible) If true and update is not an upsert, will return the array of documents matched by the find query and updated. Updated documents will be returned even if the update did not actually modify them.

| +| [cb] | [updateCallback](#Datastore..updateCallback) | () => {} |

Optional callback

| + + + +### datastore.updateAsync(query, update, [options]) ⇒ Promise.<{numAffected: number, affectedDocuments: (Array.<document>\|document\|null), upsert: boolean}> +

Update all docs matching query.

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| query | [query](#query) | |

is the same kind of finding query you use with find and findOne

| +| update | [document](#document) \| update | |

specifies how the documents should be modified. It is either a new document or a set of modifiers (you cannot use both together, it doesn't make sense!):

| +| [options] | Object | |

Optional options

| +| [options.multi] | boolean | false |

If true, can update multiple documents

| +| [options.upsert] | boolean | false |

If true, can insert a new document corresponding to the update rules if your query doesn't match anything. If your update is a simple object with no modifiers, it is the inserted document. In the other case, the query is stripped from all operator recursively, and the update is applied to it.

| +| [options.returnUpdatedDocs] | boolean | false |

(not Mongo-DB compatible) If true and update is not an upsert, will return the array of documents matched by the find query and updated. Updated documents will be returned even if the update did not actually modify them.

| + + + +### datastore.remove(query, [options], [cb]) +

Remove all docs matching the query.

+ +**Kind**: instance method of [Datastore](#Datastore) + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| query | [query](#query) | | | +| [options] | object | |

Optional options

| +| [options.multi] | boolean | false |

If true, can update multiple documents

| +| [cb] | [removeCallback](#Datastore..removeCallback) | () => {} |

Optional callback, signature: err, numRemoved

| + + + +### datastore.removeAsync(query, [options]) ⇒ Promise.<number> +

Remove all docs matching the query. +Use Datastore.removeAsync which has the same signature

+ +**Kind**: instance method of [Datastore](#Datastore) +**Returns**: Promise.<number> -

How many documents were removed

+ +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| query | [query](#query) | | | +| [options] | object | |

Optional options

| +| [options.multi] | boolean | false |

If true, can update multiple documents

| + + + +### "event:compaction.done" +

Compaction event. Happens when the Datastore's Persistence has been compacted. +It happens when calling datastore.persistence.compactDatafile, which is called periodically if you have called +datastore.persistence.setAutocompactionInterval.

+ +**Kind**: event emitted by [Datastore](#Datastore) + + +### Datastore~countCallback : function +**Kind**: inner typedef of [Datastore](#Datastore) + +| Param | Type | +| --- | --- | +| err | Error | +| count | number | + + + +### Datastore~findOneCallback : function +**Kind**: inner typedef of [Datastore](#Datastore) + +| Param | Type | +| --- | --- | +| err | Error | +| doc | [document](#document) | + + + +### Datastore~updateCallback : function +

If update was an upsert, upsert flag is set to true, affectedDocuments can be one of the following:

+ +

WARNING: The API was changed between v1.7.4 and v1.8, for consistency and readability reasons. Prior and +including to v1.7.4, the callback signature was (err, numAffected, updated) where updated was the updated document +in case of an upsert or the array of updated documents for an update if the returnUpdatedDocs option was true. That +meant that the type of affectedDocuments in a non multi update depended on whether there was an upsert or not, +leaving only two ways for the user to check whether an upsert had occured: checking the type of affectedDocuments +or running another find query on the whole dataset to check its size. Both options being ugly, the breaking change +was necessary.

+ +**Kind**: inner typedef of [Datastore](#Datastore) + +| Param | Type | +| --- | --- | +| err | Error | +| numAffected | number | +| affectedDocuments | [?Array.<document>](#document) \| [document](#document) | +| upsert | boolean | + + + +### Datastore~removeCallback : function +**Kind**: inner typedef of [Datastore](#Datastore) + +| Param | Type | +| --- | --- | +| err | Error | +| numRemoved | number | + diff --git a/docs/Executor.md b/docs/Executor.md new file mode 100644 index 0000000..47ca3f7 --- /dev/null +++ b/docs/Executor.md @@ -0,0 +1,88 @@ + + +## Executor +

Executes operations sequentially. +Has an option for a buffer that can be triggered afterwards.

+ +**Kind**: global class + +* [Executor](#Executor) + * [new Executor()](#new_Executor_new) + * [.ready](#Executor+ready) : boolean + * [.queue](#Executor+queue) : [Waterfall](#Waterfall) + * [.buffer](#Executor+buffer) : [Waterfall](#Waterfall) + * [._triggerBuffer()](#Executor+_triggerBuffer) + * [.push(task, [forceQueuing])](#Executor+push) + * [.pushAsync(task, [forceQueuing])](#Executor+pushAsync) ⇒ Promise.<\*> + * [.processBuffer()](#Executor+processBuffer) + + + +### new Executor() +

Instantiates a new Executor.

+ + + +### executor.ready : boolean +

If this.ready is false, then every task pushed will be buffered until this.processBuffer is called.

+ +**Kind**: instance property of [Executor](#Executor) +**Access**: protected + + +### executor.queue : [Waterfall](#Waterfall) +

The main queue

+ +**Kind**: instance property of [Executor](#Executor) +**Access**: protected + + +### executor.buffer : [Waterfall](#Waterfall) +

The buffer queue

+ +**Kind**: instance property of [Executor](#Executor) +**Access**: protected + + +### executor.\_triggerBuffer() +

Method to trigger the buffer processing.

+

Do not be use directly, use this.processBuffer instead.

+ +**Kind**: instance method of [Executor](#Executor) +**Access**: protected + + +### executor.push(task, [forceQueuing]) +

If executor is ready, queue task (and process it immediately if executor was idle) +If not, buffer task for later processing

+ +**Kind**: instance method of [Executor](#Executor) + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| task | Object | | | +| task.this | Object | |

Object to use as this

| +| task.fn | function | |

Function to execute

| +| task.arguments | Array | |

Array of arguments, IMPORTANT: only the last argument may be a function (the callback) and the last argument cannot be false/undefined/null

| +| [forceQueuing] | Boolean | false |

Optional (defaults to false) force executor to queue task even if it is not ready

| + + + +### executor.pushAsync(task, [forceQueuing]) ⇒ Promise.<\*> +

If executor is ready, queue task (and process it immediately if executor was idle) +If not, buffer task for later processing

+ +**Kind**: instance method of [Executor](#Executor) + +| Param | Type | Default | +| --- | --- | --- | +| task | function | | +| [forceQueuing] | boolean | false | + + + +### executor.processBuffer() +

Queue all tasks in buffer (in the same order they came in) +Automatically sets executor as ready

+ +**Kind**: instance method of [Executor](#Executor) diff --git a/docs/Index.md b/docs/Index.md new file mode 100644 index 0000000..202cea0 --- /dev/null +++ b/docs/Index.md @@ -0,0 +1,166 @@ + + +## Index +

Indexes on field names, with atomic operations and which can optionally enforce a unique constraint or allow indexed +fields to be undefined

+ +**Kind**: global class + +* [Index](#Index) + * [new Index(options)](#new_Index_new) + * [.fieldName](#Index+fieldName) : string + * [.unique](#Index+unique) : boolean + * [.sparse](#Index+sparse) : boolean + * [.treeOptions](#Index+treeOptions) : Object + * [.tree](#Index+tree) : AVLTree + * [.reset([newData])](#Index+reset) + * [.insert(doc)](#Index+insert) + * [.remove(doc)](#Index+remove) + * [.update(oldDoc, [newDoc])](#Index+update) + * [.revertUpdate(oldDoc, [newDoc])](#Index+revertUpdate) + * [.getMatching(value)](#Index+getMatching) ⇒ [Array.<document>](#document) + * [.getBetweenBounds(query)](#Index+getBetweenBounds) ⇒ [Array.<document>](#document) + * [.getAll()](#Index+getAll) ⇒ [Array.<document>](#document) + + + +### new Index(options) +

Create a new index +All methods on an index guarantee that either the whole operation was successful and the index changed +or the operation was unsuccessful and an error is thrown while the index is unchanged

+ + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| options | object | | | +| options.fieldName | string | |

On which field should the index apply (can use dot notation to index on sub fields)

| +| [options.unique] | boolean | false |

Enforces a unique constraint

| +| [options.sparse] | boolean | false |

Allows a sparse index (we can have documents for which fieldName is undefined)

| + + + +### index.fieldName : string +

On which field the index applies to (may use dot notation to index on sub fields).

+ +**Kind**: instance property of [Index](#Index) + + +### index.unique : boolean +

Defines if the index enforces a unique constraint for this index.

+ +**Kind**: instance property of [Index](#Index) + + +### index.sparse : boolean +

Defines if we can have documents for which fieldName is undefined

+ +**Kind**: instance property of [Index](#Index) + + +### index.treeOptions : Object +

Options object given to the underlying BinarySearchTree.

+ +**Kind**: instance property of [Index](#Index) + + +### index.tree : AVLTree +

Underlying BinarySearchTree for this index. Uses an AVLTree for optimization.

+ +**Kind**: instance property of [Index](#Index) + + +### index.reset([newData]) +

Reset an index

+ +**Kind**: instance method of [Index](#Index) + +| Param | Type | Description | +| --- | --- | --- | +| [newData] | [document](#document) \| [?Array.<document>](#document) |

Data to initialize the index with. If an error is thrown during insertion, the index is not modified.

| + + + +### index.insert(doc) +

Insert a new document in the index +If an array is passed, we insert all its elements (if one insertion fails the index is not modified) +O(log(n))

+ +**Kind**: instance method of [Index](#Index) + +| Param | Type | Description | +| --- | --- | --- | +| doc | [document](#document) \| [Array.<document>](#document) |

The document, or array of documents, to insert.

| + + + +### index.remove(doc) +

Removes a document from the index. +If an array is passed, we remove all its elements +The remove operation is safe with regards to the 'unique' constraint +O(log(n))

+ +**Kind**: instance method of [Index](#Index) + +| Param | Type | Description | +| --- | --- | --- | +| doc | [Array.<document>](#document) \| [document](#document) |

The document, or Array of documents, to remove.

| + + + +### index.update(oldDoc, [newDoc]) +

Update a document in the index +If a constraint is violated, changes are rolled back and an error thrown +Naive implementation, still in O(log(n))

+ +**Kind**: instance method of [Index](#Index) + +| Param | Type | Description | +| --- | --- | --- | +| oldDoc | [document](#document) \| Array.<{oldDoc: document, newDoc: document}> |

Document to update, or an Array of {oldDoc, newDoc} pairs.

| +| [newDoc] | [document](#document) |

Document to replace the oldDoc with. If the first argument is an Array of {oldDoc, newDoc} pairs, this second argument is ignored.

| + + + +### index.revertUpdate(oldDoc, [newDoc]) +

Revert an update

+ +**Kind**: instance method of [Index](#Index) + +| Param | Type | Description | +| --- | --- | --- | +| oldDoc | [document](#document) \| Array.<{oldDoc: document, newDoc: document}> |

Document to revert to, or an Array of {oldDoc, newDoc} pairs.

| +| [newDoc] | [document](#document) |

Document to revert from. If the first argument is an Array of {oldDoc, newDoc}, this second argument is ignored.

| + + + +### index.getMatching(value) ⇒ [Array.<document>](#document) +

Get all documents in index whose key match value (if it is a Thing) or one of the elements of value (if it is an array of Things)

+ +**Kind**: instance method of [Index](#Index) + +| Param | Type | Description | +| --- | --- | --- | +| value | Array.<\*> \| \* |

Value to match the key against

| + + + +### index.getBetweenBounds(query) ⇒ [Array.<document>](#document) +

Get all documents in index whose key is between bounds are they are defined by query +Documents are sorted by key

+ +**Kind**: instance method of [Index](#Index) + +| Param | Type | Description | +| --- | --- | --- | +| query | object |

An object with at least one matcher among $gt, $gte, $lt, $lte.

| +| [query.$gt] | \* |

Greater than matcher.

| +| [query.$gte] | \* |

Greater than or equal matcher.

| +| [query.$lt] | \* |

Lower than matcher.

| +| [query.$lte] | \* |

Lower than or equal matcher.

| + + + +### index.getAll() ⇒ [Array.<document>](#document) +

Get all elements in the index

+ +**Kind**: instance method of [Index](#Index) diff --git a/docs/Persistence.md b/docs/Persistence.md new file mode 100644 index 0000000..d660e09 --- /dev/null +++ b/docs/Persistence.md @@ -0,0 +1,241 @@ + + +## Persistence +

Handle every persistence-related task

+ +**Kind**: global class + +* [Persistence](#Persistence) + * [new Persistence()](#new_Persistence_new) + * _instance_ + * [.persistCachedDatabase(callback)](#Persistence+persistCachedDatabase) + * [.persistCachedDatabaseAsync()](#Persistence+persistCachedDatabaseAsync) ⇒ Promise.<void> + * [.compactDatafile([callback])](#Persistence+compactDatafile) + * [.compactDatafileAsync()](#Persistence+compactDatafileAsync) + * [.setAutocompactionInterval(interval)](#Persistence+setAutocompactionInterval) + * [.stopAutocompaction()](#Persistence+stopAutocompaction) + * [.persistNewState(newDocs, [callback])](#Persistence+persistNewState) + * [.persistNewStateAsync(newDocs)](#Persistence+persistNewStateAsync) ⇒ Promise + * [.treatRawData(rawData)](#Persistence+treatRawData) ⇒ Object + * [.treatRawStream(rawStream, cb)](#Persistence+treatRawStream) + * [.treatRawStreamAsync(rawStream)](#Persistence+treatRawStreamAsync) ⇒ Promise.<{data: Array.<document>, indexes: Object.<string, rawIndex>}> + * [.loadDatabase(callback)](#Persistence+loadDatabase) + * [.loadDatabaseAsync()](#Persistence+loadDatabaseAsync) ⇒ Promise.<void> + * _static_ + * [.ensureDirectoryExists(dir, [callback])](#Persistence.ensureDirectoryExists) + * [.ensureDirectoryExistsAsync(dir)](#Persistence.ensureDirectoryExistsAsync) ⇒ Promise.<void> + * ~~[.getNWAppFilename(appName, relativeFilename)](#Persistence.getNWAppFilename) ⇒ string~~ + * _inner_ + * [~treatRawStreamCallback](#Persistence..treatRawStreamCallback) : function + + + +### new Persistence() +

Create a new Persistence object for database options.db

+ + +| Param | Type | Description | +| --- | --- | --- | +| options.db | [Datastore](#Datastore) | | +| [options.corruptAlertThreshold] | Number |

Optional, threshold after which an alert is thrown if too much data is corrupt

| +| [options.nodeWebkitAppName] | string |

Optional, specify the name of your NW app if you want options.filename to be relative to the directory where Node Webkit stores application data such as cookies and local storage (the best place to store data in my opinion)

| +| [options.beforeDeserialization] | function |

Hook you can use to transform data after it was serialized and before it is written to disk.

| +| [options.afterSerialization] | function |

Inverse of afterSerialization.

| + + + +### persistence.persistCachedDatabase(callback) +

Persist cached database +This serves as a compaction function since the cache always contains only the number of documents in the collection +while the data file is append-only so it may grow larger +This is an internal function, use compactDataFile which uses the executor

+ +**Kind**: instance method of [Persistence](#Persistence) + +| Param | Type | Description | +| --- | --- | --- | +| callback | [NoParamCallback](#NoParamCallback) |

Optional callback, signature: err

| + + + +### persistence.persistCachedDatabaseAsync() ⇒ Promise.<void> +

Persist cached database +This serves as a compaction function since the cache always contains only the number of documents in the collection +while the data file is append-only so it may grow larger +This is an internal function, use compactDataFileAsync which uses the executor

+ +**Kind**: instance method of [Persistence](#Persistence) + + +### persistence.compactDatafile([callback]) +

Queue a rewrite of the datafile

+ +**Kind**: instance method of [Persistence](#Persistence) + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| [callback] | [NoParamCallback](#NoParamCallback) | () => {} |

Optional callback, signature: err

| + + + +### persistence.compactDatafileAsync() +

Queue a rewrite of the datafile

+ +**Kind**: instance method of [Persistence](#Persistence) + + +### persistence.setAutocompactionInterval(interval) +

Set automatic compaction every interval ms

+ +**Kind**: instance method of [Persistence](#Persistence) + +| Param | Type | Description | +| --- | --- | --- | +| interval | Number |

in milliseconds, with an enforced minimum of 5 seconds

| + + + +### persistence.stopAutocompaction() +

Stop autocompaction (do nothing if autocompaction was not running)

+ +**Kind**: instance method of [Persistence](#Persistence) + + +### persistence.persistNewState(newDocs, [callback]) +

Persist new state for the given newDocs (can be insertion, update or removal) +Use an append-only format

+ +**Kind**: instance method of [Persistence](#Persistence) + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| newDocs | Array.<string> | |

Can be empty if no doc was updated/removed

| +| [callback] | [NoParamCallback](#NoParamCallback) | () => {} |

Optional, signature: err

| + + + +### persistence.persistNewStateAsync(newDocs) ⇒ Promise +

Persist new state for the given newDocs (can be insertion, update or removal) +Use an append-only format

+ +**Kind**: instance method of [Persistence](#Persistence) + +| Param | Type | Description | +| --- | --- | --- | +| newDocs | [Array.<document>](#document) |

Can be empty if no doc was updated/removed

| + + + +### persistence.treatRawData(rawData) ⇒ Object +

From a database's raw data, return the corresponding machine understandable collection

+ +**Kind**: instance method of [Persistence](#Persistence) + +| Param | Type | Description | +| --- | --- | --- | +| rawData | string |

database file

| + + + +### persistence.treatRawStream(rawStream, cb) +

From a database's raw data stream, return the corresponding machine understandable collection

+ +**Kind**: instance method of [Persistence](#Persistence) + +| Param | Type | +| --- | --- | +| rawStream | Readable | +| cb | [treatRawStreamCallback](#Persistence..treatRawStreamCallback) | + + + +### persistence.treatRawStreamAsync(rawStream) ⇒ Promise.<{data: Array.<document>, indexes: Object.<string, rawIndex>}> +

From a database's raw data stream, return the corresponding machine understandable collection

+ +**Kind**: instance method of [Persistence](#Persistence) + +| Param | Type | +| --- | --- | +| rawStream | Readable | + + + +### persistence.loadDatabase(callback) +

Load the database

+
    +
  1. Create all indexes
  2. +
  3. Insert all data
  4. +
  5. Compact the database +This means pulling data out of the data file or creating it if it doesn't exist +Also, all data is persisted right away, which has the effect of compacting the database file +This operation is very quick at startup for a big collection (60ms for ~10k docs)
  6. +
+ +**Kind**: instance method of [Persistence](#Persistence) + +| Param | Type | Description | +| --- | --- | --- | +| callback | [NoParamCallback](#NoParamCallback) |

Optional callback, signature: err

| + + + +### persistence.loadDatabaseAsync() ⇒ Promise.<void> +

Load the database

+
    +
  1. Create all indexes
  2. +
  3. Insert all data
  4. +
  5. Compact the database +This means pulling data out of the data file or creating it if it doesn't exist +Also, all data is persisted right away, which has the effect of compacting the database file +This operation is very quick at startup for a big collection (60ms for ~10k docs)
  6. +
+ +**Kind**: instance method of [Persistence](#Persistence) + + +### Persistence.ensureDirectoryExists(dir, [callback]) +

Check if a directory stat and create it on the fly if it is not the case

+ +**Kind**: static method of [Persistence](#Persistence) + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| dir | string | | | +| [callback] | [NoParamCallback](#NoParamCallback) | () => {} |

optional callback, signature: err

| + + + +### Persistence.ensureDirectoryExistsAsync(dir) ⇒ Promise.<void> +

Check if a directory stat and create it on the fly if it is not the case

+ +**Kind**: static method of [Persistence](#Persistence) + +| Param | Type | +| --- | --- | +| dir | string | + + + +### ~~Persistence.getNWAppFilename(appName, relativeFilename) ⇒ string~~ +***Deprecated*** + +

Return the path the datafile if the given filename is relative to the directory where Node Webkit stores +data for this application. Probably the best place to store data

+ +**Kind**: static method of [Persistence](#Persistence) + +| Param | Type | +| --- | --- | +| appName | string | +| relativeFilename | string | + + + +### Persistence~treatRawStreamCallback : function +**Kind**: inner typedef of [Persistence](#Persistence) + +| Param | Type | +| --- | --- | +| err | Error | +| data | Object | + diff --git a/docs/Waterfall.md b/docs/Waterfall.md new file mode 100644 index 0000000..4091ea2 --- /dev/null +++ b/docs/Waterfall.md @@ -0,0 +1,53 @@ + + +## Waterfall +**Kind**: global class + +* [Waterfall](#Waterfall) + * [new Waterfall()](#new_Waterfall_new) + * [._guardian](#Waterfall+_guardian) : Promise + * [.guardian](#Waterfall+guardian) ⇒ Promise + * [.waterfall(func)](#Waterfall+waterfall) ⇒ [AsyncFunction](#AsyncFunction) + * [.chain(promise)](#Waterfall+chain) ⇒ Promise + + + +### new Waterfall() +

Instantiate a new Waterfall.

+ + + +### waterfall.\_guardian : Promise +

This is the internal Promise object which resolves when all the tasks of the Waterfall are done.

+

It will change any time this.waterfall is called.

+

Use [guardian](#Waterfall+guardian) instead which retrievethe latest version of the guardian.

+ +**Kind**: instance property of [Waterfall](#Waterfall) +**Access**: protected + + +### waterfall.guardian ⇒ Promise +

Getter that gives a Promise which resolves when all tasks up to when this function is called are done.

+

This Promise cannot reject.

+ +**Kind**: instance property of [Waterfall](#Waterfall) + + +### waterfall.waterfall(func) ⇒ [AsyncFunction](#AsyncFunction) +**Kind**: instance method of [Waterfall](#Waterfall) + +| Param | Type | +| --- | --- | +| func | [AsyncFunction](#AsyncFunction) | + + + +### waterfall.chain(promise) ⇒ Promise +

Shorthand for chaining a promise to the Waterfall

+ +**Kind**: instance method of [Waterfall](#Waterfall) + +| Param | Type | +| --- | --- | +| promise | Promise | + diff --git a/docs/customUtilsBrowser.md b/docs/customUtilsBrowser.md new file mode 100644 index 0000000..b0f6f31 --- /dev/null +++ b/docs/customUtilsBrowser.md @@ -0,0 +1,36 @@ + + +## customUtilsBrowser +

Utility functions that need to be reimplemented for each environment. +This is the version for the browser & React-Native

+ + +* [customUtilsBrowser](#module_customUtilsBrowser) + * [~randomBytes(size)](#module_customUtilsBrowser..randomBytes) ⇒ array.<number> + * [~byteArrayToBase64(uint8)](#module_customUtilsBrowser..byteArrayToBase64) ⇒ string + + + +### customUtilsBrowser~randomBytes(size) ⇒ array.<number> +

Taken from the crypto-browserify module +https://github.com/dominictarr/crypto-browserify +NOTE: Math.random() does not guarantee "cryptographic quality" but we actually don't need it

+ +**Kind**: inner method of [customUtilsBrowser](#module_customUtilsBrowser) + +| Param | Type | Description | +| --- | --- | --- | +| size | number |

in bytes

| + + + +### customUtilsBrowser~byteArrayToBase64(uint8) ⇒ string +

Taken from the base64-js module +https://github.com/beatgammit/base64-js/

+ +**Kind**: inner method of [customUtilsBrowser](#module_customUtilsBrowser) + +| Param | Type | +| --- | --- | +| uint8 | array | + diff --git a/docs/customUtilsNode.md b/docs/customUtilsNode.md new file mode 100644 index 0000000..5c86017 --- /dev/null +++ b/docs/customUtilsNode.md @@ -0,0 +1,43 @@ + + +## customUtilsNode +

Utility functions that need to be reimplemented for each environment. +This is the version for Node.js

+ + +* [customUtilsNode](#module_customUtilsNode) + * [.uid(len)](#module_customUtilsNode.uid) ⇒ string + * [.uid(len)](#module_customUtilsNode.uid) ⇒ string + + + +### customUtilsNode.uid(len) ⇒ string +

Return a random alphanumerical string of length len +There is a very small probability (less than 1/1,000,000) for the length to be less than len +(il the base64 conversion yields too many pluses and slashes) but +that's not an issue here +The probability of a collision is extremely small (need 3*10^12 documents to have one chance in a million of a collision) +See http://en.wikipedia.org/wiki/Birthday_problem

+ +**Kind**: static method of [customUtilsNode](#module_customUtilsNode) + +| Param | Type | +| --- | --- | +| len | number | + + + +### customUtilsNode.uid(len) ⇒ string +

Return a random alphanumerical string of length len +There is a very small probability (less than 1/1,000,000) for the length to be less than len +(il the base64 conversion yields too many pluses and slashes) but +that's not an issue here +The probability of a collision is extremely small (need 3*10^12 documents to have one chance in a million of a collision) +See http://en.wikipedia.org/wiki/Birthday_problem

+ +**Kind**: static method of [customUtilsNode](#module_customUtilsNode) + +| Param | Type | +| --- | --- | +| len | number | + diff --git a/docs/model.md b/docs/model.md new file mode 100644 index 0000000..3acaa33 --- /dev/null +++ b/docs/model.md @@ -0,0 +1,217 @@ + + +## model +

Handle models (i.e. docs) +Serialization/deserialization +Copying +Querying, update

+ + +* [model](#module_model) + * _static_ + * [.checkObject(obj)](#module_model.checkObject) + * [.serialize(obj)](#module_model.serialize) ⇒ string + * [.deserialize(rawData)](#module_model.deserialize) ⇒ [document](#document) + * [.compareThings(a, b, [_compareStrings])](#module_model.compareThings) ⇒ number + * [.modify(obj, updateQuery)](#module_model.modify) ⇒ [document](#document) + * [.getDotValue(obj, field)](#module_model.getDotValue) ⇒ \* + * [.areThingsEqual(a, a)](#module_model.areThingsEqual) ⇒ boolean + * [.match(obj, query)](#module_model.match) ⇒ boolean + * _inner_ + * [~modifierFunctions](#module_model..modifierFunctions) : enum + * [~comparisonFunctions](#module_model..comparisonFunctions) : enum + * [~logicalOperators](#module_model..logicalOperators) + * [~modifierFunction](#module_model..modifierFunction) : function + * [~comparisonOperator](#module_model..comparisonOperator) ⇒ boolean + * [~whereCallback](#module_model..whereCallback) ⇒ boolean + + + +### model.checkObject(obj) +

Check a DB object and throw an error if it's not valid +Works by applying the above checkKey function to all fields recursively

+ +**Kind**: static method of [model](#module_model) + +| Param | Type | +| --- | --- | +| obj | [document](#document) \| [Array.<document>](#document) | + + + +### model.serialize(obj) ⇒ string +

Serialize an object to be persisted to a one-line string +For serialization/deserialization, we use the native JSON parser and not eval or Function +That gives us less freedom but data entered in the database may come from users +so eval and the like are not safe +Accepted primitive types: Number, String, Boolean, Date, null +Accepted secondary types: Objects, Arrays

+ +**Kind**: static method of [model](#module_model) + +| Param | Type | +| --- | --- | +| obj | [document](#document) | + + + +### model.deserialize(rawData) ⇒ [document](#document) +

From a one-line representation of an object generate by the serialize function +Return the object itself

+ +**Kind**: static method of [model](#module_model) + +| Param | Type | +| --- | --- | +| rawData | string | + + + +### model.compareThings(a, b, [_compareStrings]) ⇒ number +

Compare { things U undefined } +Things are defined as any native types (string, number, boolean, null, date) and objects +We need to compare with undefined as it will be used in indexes +In the case of objects and arrays, we deep-compare +If two objects dont have the same type, the (arbitrary) type hierarchy is: undefined, null, number, strings, boolean, dates, arrays, objects +Return -1 if a < b, 1 if a > b and 0 if a = b (note that equality here is NOT the same as defined in areThingsEqual!)

+ +**Kind**: static method of [model](#module_model) + +| Param | Type | Description | +| --- | --- | --- | +| a | \* | | +| b | \* | | +| [_compareStrings] | [compareStrings](#compareStrings) |

String comparing function, returning -1, 0 or 1, overriding default string comparison (useful for languages with accented letters)

| + + + +### model.modify(obj, updateQuery) ⇒ [document](#document) +

Modify a DB object according to an update query

+ +**Kind**: static method of [model](#module_model) + +| Param | Type | +| --- | --- | +| obj | [document](#document) | +| updateQuery | [query](#query) | + + + +### model.getDotValue(obj, field) ⇒ \* +

Get a value from object with dot notation

+ +**Kind**: static method of [model](#module_model) + +| Param | Type | +| --- | --- | +| obj | object | +| field | string | + + + +### model.areThingsEqual(a, a) ⇒ boolean +

Check whether 'things' are equal +Things are defined as any native types (string, number, boolean, null, date) and objects +In the case of object, we check deep equality +Returns true if they are, false otherwise

+ +**Kind**: static method of [model](#module_model) + +| Param | Type | +| --- | --- | +| a | \* | +| a | \* | + + + +### model.match(obj, query) ⇒ boolean +

Tell if a given document matches a query

+ +**Kind**: static method of [model](#module_model) + +| Param | Type | Description | +| --- | --- | --- | +| obj | [document](#document) |

Document to check

| +| query | [query](#query) | | + + + +### model~modifierFunctions : enum +**Kind**: inner enum of [model](#module_model) +**Properties** + +| Name | Type | Default | Description | +| --- | --- | --- | --- | +| $set | modifierFunction | |

Set a field to a new value

| +| $unset | modifierFunction | |

Unset a field

| +| $min | modifierFunction | |

Updates the value of the field, only if specified field is smaller than the current value of the field

| +| $max | modifierFunction | |

Updates the value of the field, only if specified field is greater than the current value of the field

| +| $inc | modifierFunction | |

Increment a numeric field's value

| +| $pull | modifierFunction | |

Removes all instances of a value from an existing array

| +| $pop | modifierFunction | |

Remove the first or last element of an array

| +| $addToSet | modifierFunction | |

Add an element to an array field only if it is not already in it No modification if the element is already in the array Note that it doesn't check whether the original array contains duplicates

| +| $push | modifierFunction | |

Push an element to the end of an array field Optional modifier $each instead of value to push several values Optional modifier $slice to slice the resulting array, see https://docs.mongodb.org/manual/reference/operator/update/slice/ Difference with MongoDB: if $slice is specified and not $each, we act as if value is an empty array

| + + + +### model~comparisonFunctions : enum +**Kind**: inner enum of [model](#module_model) +**Properties** + +| Name | Type | Default | Description | +| --- | --- | --- | --- | +| $lt | comparisonOperator | |

Lower than

| +| $lte | comparisonOperator | |

Lower than or equals

| +| $gt | comparisonOperator | |

Greater than

| +| $gte | comparisonOperator | |

Greater than or equals

| +| $ne | comparisonOperator | |

Does not equal

| +| $in | comparisonOperator | |

Is in Array

| +| $nin | comparisonOperator | |

Is not in Array

| +| $regex | comparisonOperator | |

Matches Regexp

| +| $exists | comparisonOperator | |

Returns true if field exists

| +| $size | comparisonOperator | |

Specific to Arrays, returns true if a length equals b

| +| $elemMatch | comparisonOperator | |

Specific to Arrays, returns true if some elements of a match the query b

| + + + +### model~logicalOperators +**Kind**: inner enum of [model](#module_model) +**Properties** + +| Name | Default | Description | +| --- | --- | --- | +| $or | |

Match any of the subqueries

| +| $and | |

Match all of the subqueries

| +| $not | |

Inverted match of the query

| +| $where | |

Use a function to match

| + + + +### model~modifierFunction : function +**Kind**: inner typedef of [model](#module_model) + +| Param | Type | Description | +| --- | --- | --- | +| obj | Object |

The model to modify

| +| field | String |

Can contain dots, in that case that means we will set a subfield recursively

| +| value | [document](#document) | | + + + +### model~comparisonOperator ⇒ boolean +**Kind**: inner typedef of [model](#module_model) + +| Param | Type | Description | +| --- | --- | --- | +| a | \* |

Value in the object

| +| b | \* |

Value in the query

| + + + +### model~whereCallback ⇒ boolean +**Kind**: inner typedef of [model](#module_model) + +| Param | Type | +| --- | --- | +| obj | [document](#document) | + diff --git a/docs/storage.md b/docs/storage.md new file mode 100644 index 0000000..dffd9d7 --- /dev/null +++ b/docs/storage.md @@ -0,0 +1,369 @@ + + +## storage +

Way data is stored for this database +For a Node.js/Node Webkit database it's the file system +For a browser-side database it's localforage, which uses the best backend available (IndexedDB then WebSQL then localStorage) +For a react-native database, we use @react-native-async-storage/async-storage

+

This version is the Node.js/Node Webkit version +It's essentially fs, mkdirp and crash safe write and read functions

+ + +* [storage](#module_storage) + * _static_ + * [.exists(file, cb)](#module_storage.exists) + * [.existsAsync(file)](#module_storage.existsAsync) ⇒ Promise.<boolean> + * [.rename(oldPath, newPath, c)](#module_storage.rename) ⇒ void + * [.renameAsync(oldPath, newPath)](#module_storage.renameAsync) ⇒ Promise.<void> + * [.writeFile(path, data, options, callback)](#module_storage.writeFile) + * [.writeFileAsync(path, data, [options])](#module_storage.writeFileAsync) ⇒ Promise.<void> + * [.writeFileStream(path, [options])](#module_storage.writeFileStream) ⇒ fs.WriteStream + * [.unlink(path, callback)](#module_storage.unlink) + * [.unlinkAsync(path)](#module_storage.unlinkAsync) ⇒ Promise.<void> + * [.appendFile(path, data, options, callback)](#module_storage.appendFile) + * [.appendFileAsync(path, data, [options])](#module_storage.appendFileAsync) ⇒ Promise.<void> + * [.readFile(path, options, callback)](#module_storage.readFile) + * [.readFileAsync(path, [options])](#module_storage.readFileAsync) ⇒ Promise.<Buffer> + * [.readFileStream(path, [options])](#module_storage.readFileStream) ⇒ fs.ReadStream + * [.mkdir(path, options, callback)](#module_storage.mkdir) + * [.mkdirAsync(path, options)](#module_storage.mkdirAsync) ⇒ Promise.<(void\|string)> + * [.ensureFileDoesntExistAsync(file)](#module_storage.ensureFileDoesntExistAsync) ⇒ Promise.<void> + * [.ensureFileDoesntExist(file, callback)](#module_storage.ensureFileDoesntExist) + * [.flushToStorage(options, callback)](#module_storage.flushToStorage) + * [.flushToStorageAsync(options)](#module_storage.flushToStorageAsync) ⇒ Promise.<void> + * [.writeFileLines(filename, lines, callback)](#module_storage.writeFileLines) + * [.writeFileLinesAsync(filename, lines)](#module_storage.writeFileLinesAsync) ⇒ Promise.<void> + * [.crashSafeWriteFileLines(filename, lines, [callback])](#module_storage.crashSafeWriteFileLines) + * [.crashSafeWriteFileLinesAsync(filename, lines)](#module_storage.crashSafeWriteFileLinesAsync) ⇒ Promise.<void> + * [.ensureDatafileIntegrity(filename, callback)](#module_storage.ensureDatafileIntegrity) + * [.ensureDatafileIntegrityAsync(filename)](#module_storage.ensureDatafileIntegrityAsync) ⇒ Promise.<void> + * _inner_ + * [~existsCallback](#module_storage..existsCallback) : function + + + +### storage.exists(file, cb) +

Callback returns true if file exists

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| file | string | +| cb | [existsCallback](#module_storage..existsCallback) | + + + +### storage.existsAsync(file) ⇒ Promise.<boolean> +

Returns Promise if file exists

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| file | string | + + + +### storage.rename(oldPath, newPath, c) ⇒ void +

Node.js' fs.rename

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| oldPath | string | +| newPath | string | +| c | [NoParamCallback](#NoParamCallback) | + + + +### storage.renameAsync(oldPath, newPath) ⇒ Promise.<void> +

Node.js' fs.promises.rename

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| oldPath | string | +| newPath | string | + + + +### storage.writeFile(path, data, options, callback) +

Node.js' fs.writeFile

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| path | string | +| data | string | +| options | object | +| callback | function | + + + +### storage.writeFileAsync(path, data, [options]) ⇒ Promise.<void> +

Node.js' fs.promises.writeFile

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| path | string | +| data | string | +| [options] | object | + + + +### storage.writeFileStream(path, [options]) ⇒ fs.WriteStream +

Node.js' fs.createWriteStream

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| path | string | +| [options] | Object | + + + +### storage.unlink(path, callback) +

Node.js' fs.unlink

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| path | string | +| callback | function | + + + +### storage.unlinkAsync(path) ⇒ Promise.<void> +

Node.js' fs.promises.unlink

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| path | string | + + + +### storage.appendFile(path, data, options, callback) +

Node.js' fs.appendFile

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| path | string | +| data | string | +| options | object | +| callback | function | + + + +### storage.appendFileAsync(path, data, [options]) ⇒ Promise.<void> +

Node.js' fs.promises.appendFile

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| path | string | +| data | string | +| [options] | object | + + + +### storage.readFile(path, options, callback) +

Node.js' fs.readFile

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| path | string | +| options | object | +| callback | function | + + + +### storage.readFileAsync(path, [options]) ⇒ Promise.<Buffer> +

Node.js' fs.promises.readFile

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| path | string | +| [options] | object | + + + +### storage.readFileStream(path, [options]) ⇒ fs.ReadStream +

Node.js' fs.createReadStream

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| path | string | +| [options] | Object | + + + +### storage.mkdir(path, options, callback) +

Node.js' fs.mkdir

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| path | string | +| options | object | +| callback | function | + + + +### storage.mkdirAsync(path, options) ⇒ Promise.<(void\|string)> +

Node.js' fs.promises.mkdir

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| path | string | +| options | object | + + + +### storage.ensureFileDoesntExistAsync(file) ⇒ Promise.<void> +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| file | string | + + + +### storage.ensureFileDoesntExist(file, callback) +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| file | string | +| callback | [NoParamCallback](#NoParamCallback) | + + + +### storage.flushToStorage(options, callback) +

Flush data in OS buffer to storage if corresponding option is set

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| options | object \| string | |

If options is a string, it is assumed that the flush of the file (not dir) called options was requested

| +| [options.filename] | string | | | +| [options.isDir] | boolean | false |

Optional, defaults to false

| +| callback | [NoParamCallback](#NoParamCallback) | | | + + + +### storage.flushToStorageAsync(options) ⇒ Promise.<void> +

Flush data in OS buffer to storage if corresponding option is set

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | Default | Description | +| --- | --- | --- | --- | +| options | object \| string | |

If options is a string, it is assumed that the flush of the file (not dir) called options was requested

| +| [options.filename] | string | | | +| [options.isDir] | boolean | false |

Optional, defaults to false

| + + + +### storage.writeFileLines(filename, lines, callback) +

Fully write or rewrite the datafile

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| filename | string | +| lines | Array.<string> | +| callback | [NoParamCallback](#NoParamCallback) | + + + +### storage.writeFileLinesAsync(filename, lines) ⇒ Promise.<void> +

Fully write or rewrite the datafile

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| filename | string | +| lines | Array.<string> | + + + +### storage.crashSafeWriteFileLines(filename, lines, [callback]) +

Fully write or rewrite the datafile, immune to crashes during the write operation (data will not be lost)

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | Description | +| --- | --- | --- | +| filename | string | | +| lines | Array.<string> | | +| [callback] | [NoParamCallback](#NoParamCallback) |

Optional callback, signature: err

| + + + +### storage.crashSafeWriteFileLinesAsync(filename, lines) ⇒ Promise.<void> +

Fully write or rewrite the datafile, immune to crashes during the write operation (data will not be lost)

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| filename | string | +| lines | Array.<string> | + + + +### storage.ensureDatafileIntegrity(filename, callback) +

Ensure the datafile contains all the data, even if there was a crash during a full file write

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | Description | +| --- | --- | --- | +| filename | string | | +| callback | [NoParamCallback](#NoParamCallback) |

signature: err

| + + + +### storage.ensureDatafileIntegrityAsync(filename) ⇒ Promise.<void> +

Ensure the datafile contains all the data, even if there was a crash during a full file write

+ +**Kind**: static method of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| filename | string | + + + +### storage~existsCallback : function +**Kind**: inner typedef of [storage](#module_storage) + +| Param | Type | +| --- | --- | +| exists | boolean | + diff --git a/docs/storageBrowser.md b/docs/storageBrowser.md new file mode 100644 index 0000000..e7d620c --- /dev/null +++ b/docs/storageBrowser.md @@ -0,0 +1,266 @@ + + +## storageBrowser +

Way data is stored for this database +For a Node.js/Node Webkit database it's the file system +For a browser-side database it's localforage which chooses the best option depending on user browser (IndexedDB then WebSQL then localStorage)

+

This version is the browser version

+ + +* [storageBrowser](#module_storageBrowser) + * _static_ + * [.existsAsync(file)](#module_storageBrowser.existsAsync) ⇒ Promise.<boolean> + * [.exists(file, cb)](#module_storageBrowser.exists) + * [.renameAsync(oldPath, newPath)](#module_storageBrowser.renameAsync) ⇒ Promise.<void> + * [.rename(oldPath, newPath, c)](#module_storageBrowser.rename) ⇒ void + * [.writeFileAsync(file, data, [options])](#module_storageBrowser.writeFileAsync) ⇒ Promise.<void> + * [.writeFile(path, data, options, callback)](#module_storageBrowser.writeFile) + * [.appendFileAsync(filename, toAppend, [options])](#module_storageBrowser.appendFileAsync) ⇒ Promise.<void> + * [.appendFile(filename, toAppend, [options], callback)](#module_storageBrowser.appendFile) + * [.readFileAsync(filename, [options])](#module_storageBrowser.readFileAsync) ⇒ Promise.<Buffer> + * [.readFile(filename, options, callback)](#module_storageBrowser.readFile) + * [.unlinkAsync(filename)](#module_storageBrowser.unlinkAsync) ⇒ Promise.<void> + * [.unlink(path, callback)](#module_storageBrowser.unlink) + * [.mkdirAsync(path, [options])](#module_storageBrowser.mkdirAsync) ⇒ Promise.<(void\|string)> + * [.mkdir(path, options, callback)](#module_storageBrowser.mkdir) + * [.ensureDatafileIntegrityAsync(filename)](#module_storageBrowser.ensureDatafileIntegrityAsync) ⇒ Promise.<void> + * [.ensureDatafileIntegrity(filename, callback)](#module_storageBrowser.ensureDatafileIntegrity) + * [.crashSafeWriteFileLinesAsync(filename, lines)](#module_storageBrowser.crashSafeWriteFileLinesAsync) ⇒ Promise.<void> + * [.crashSafeWriteFileLines(filename, lines, [callback])](#module_storageBrowser.crashSafeWriteFileLines) + * _inner_ + * [~existsCallback](#module_storageBrowser..existsCallback) : function + + + +### storageBrowser.existsAsync(file) ⇒ Promise.<boolean> +

Returns Promise if file exists

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| file | string | + + + +### storageBrowser.exists(file, cb) +

Callback returns true if file exists

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| file | string | +| cb | [existsCallback](#module_storageBrowser..existsCallback) | + + + +### storageBrowser.renameAsync(oldPath, newPath) ⇒ Promise.<void> +

Moves the item from one path to another

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| oldPath | string | +| newPath | string | + + + +### storageBrowser.rename(oldPath, newPath, c) ⇒ void +

Moves the item from one path to another

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| oldPath | string | +| newPath | string | +| c | [NoParamCallback](#NoParamCallback) | + + + +### storageBrowser.writeFileAsync(file, data, [options]) ⇒ Promise.<void> +

Saves the item at given path

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| file | string | +| data | string | +| [options] | object | + + + +### storageBrowser.writeFile(path, data, options, callback) +

Saves the item at given path

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| path | string | +| data | string | +| options | object | +| callback | function | + + + +### storageBrowser.appendFileAsync(filename, toAppend, [options]) ⇒ Promise.<void> +

Append to the item at given path

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| filename | string | +| toAppend | string | +| [options] | object | + + + +### storageBrowser.appendFile(filename, toAppend, [options], callback) +

Append to the item at given path

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| filename | string | +| toAppend | string | +| [options] | object | +| callback | function | + + + +### storageBrowser.readFileAsync(filename, [options]) ⇒ Promise.<Buffer> +

Read data at given path

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| filename | string | +| [options] | object | + + + +### storageBrowser.readFile(filename, options, callback) +

Read data at given path

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| filename | string | +| options | object | +| callback | function | + + + +### storageBrowser.unlinkAsync(filename) ⇒ Promise.<void> +

Remove the data at given path

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| filename | string | + + + +### storageBrowser.unlink(path, callback) +

Remove the data at given path

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| path | string | +| callback | function | + + + +### storageBrowser.mkdirAsync(path, [options]) ⇒ Promise.<(void\|string)> +

Shim for storage.mkdirAsync, nothing to do, no directories will be used on the browser

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| path | string | +| [options] | object | + + + +### storageBrowser.mkdir(path, options, callback) +

Shim for storage.mkdir, nothing to do, no directories will be used on the browser

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| path | string | +| options | object | +| callback | function | + + + +### storageBrowser.ensureDatafileIntegrityAsync(filename) ⇒ Promise.<void> +

Ensure the datafile contains all the data, even if there was a crash during a full file write +Nothing to do, no data corruption possible in the browser

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| filename | string | + + + +### storageBrowser.ensureDatafileIntegrity(filename, callback) +

Ensure the datafile contains all the data, even if there was a crash during a full file write +Nothing to do, no data corruption possible in the browser

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | Description | +| --- | --- | --- | +| filename | string | | +| callback | [NoParamCallback](#NoParamCallback) |

signature: err

| + + + +### storageBrowser.crashSafeWriteFileLinesAsync(filename, lines) ⇒ Promise.<void> +

Fully write or rewrite the datafile, immune to crashes during the write operation (data will not be lost)

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| filename | string | +| lines | Array.<string> | + + + +### storageBrowser.crashSafeWriteFileLines(filename, lines, [callback]) +

Fully write or rewrite the datafile, immune to crashes during the write operation (data will not be lost)

+ +**Kind**: static method of [storageBrowser](#module_storageBrowser) + +| Param | Type | Description | +| --- | --- | --- | +| filename | string | | +| lines | Array.<string> | | +| [callback] | [NoParamCallback](#NoParamCallback) |

Optional callback, signature: err

| + + + +### storageBrowser~existsCallback : function +**Kind**: inner typedef of [storageBrowser](#module_storageBrowser) + +| Param | Type | +| --- | --- | +| exists | boolean | + diff --git a/docs/storageReactNative.md b/docs/storageReactNative.md new file mode 100644 index 0000000..405e4b5 --- /dev/null +++ b/docs/storageReactNative.md @@ -0,0 +1,267 @@ + + +## storageReactNative +

Way data is stored for this database +For a Node.js/Node Webkit database it's the file system +For a browser-side database it's localforage, which uses the best backend available (IndexedDB then WebSQL then localStorage) +For a react-native database, we use @react-native-async-storage/async-storage

+

This version is the react-native version

+ + +* [storageReactNative](#module_storageReactNative) + * _static_ + * [.existsAsync(file)](#module_storageReactNative.existsAsync) ⇒ Promise.<boolean> + * [.exists(file, cb)](#module_storageReactNative.exists) + * [.renameAsync(oldPath, newPath)](#module_storageReactNative.renameAsync) ⇒ Promise.<void> + * [.rename(oldPath, newPath, c)](#module_storageReactNative.rename) ⇒ void + * [.writeFileAsync(file, data, [options])](#module_storageReactNative.writeFileAsync) ⇒ Promise.<void> + * [.writeFile(path, data, options, callback)](#module_storageReactNative.writeFile) + * [.appendFileAsync(filename, toAppend, [options])](#module_storageReactNative.appendFileAsync) ⇒ Promise.<void> + * [.appendFile(filename, toAppend, [options], callback)](#module_storageReactNative.appendFile) + * [.readFileAsync(filename, [options])](#module_storageReactNative.readFileAsync) ⇒ Promise.<string> + * [.readFile(filename, options, callback)](#module_storageReactNative.readFile) + * [.unlinkAsync(filename)](#module_storageReactNative.unlinkAsync) ⇒ Promise.<void> + * [.unlink(path, callback)](#module_storageReactNative.unlink) + * [.mkdirAsync(dir, [options])](#module_storageReactNative.mkdirAsync) ⇒ Promise.<(void\|string)> + * [.mkdir(path, options, callback)](#module_storageReactNative.mkdir) + * [.ensureDatafileIntegrityAsync(filename)](#module_storageReactNative.ensureDatafileIntegrityAsync) ⇒ Promise.<void> + * [.ensureDatafileIntegrity(filename, callback)](#module_storageReactNative.ensureDatafileIntegrity) + * [.crashSafeWriteFileLinesAsync(filename, lines)](#module_storageReactNative.crashSafeWriteFileLinesAsync) ⇒ Promise.<void> + * [.crashSafeWriteFileLines(filename, lines, [callback])](#module_storageReactNative.crashSafeWriteFileLines) + * _inner_ + * [~existsCallback](#module_storageReactNative..existsCallback) : function + + + +### storageReactNative.existsAsync(file) ⇒ Promise.<boolean> +

Returns Promise if file exists

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| file | string | + + + +### storageReactNative.exists(file, cb) +

Callback returns true if file exists

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| file | string | +| cb | [existsCallback](#module_storageReactNative..existsCallback) | + + + +### storageReactNative.renameAsync(oldPath, newPath) ⇒ Promise.<void> +

Moves the item from one path to another

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| oldPath | string | +| newPath | string | + + + +### storageReactNative.rename(oldPath, newPath, c) ⇒ void +

Moves the item from one path to another

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| oldPath | string | +| newPath | string | +| c | [NoParamCallback](#NoParamCallback) | + + + +### storageReactNative.writeFileAsync(file, data, [options]) ⇒ Promise.<void> +

Saves the item at given path

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| file | string | +| data | string | +| [options] | object | + + + +### storageReactNative.writeFile(path, data, options, callback) +

Saves the item at given path

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| path | string | +| data | string | +| options | object | +| callback | function | + + + +### storageReactNative.appendFileAsync(filename, toAppend, [options]) ⇒ Promise.<void> +

Append to the item at given path

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| filename | string | +| toAppend | string | +| [options] | object | + + + +### storageReactNative.appendFile(filename, toAppend, [options], callback) +

Append to the item at given path

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| filename | string | +| toAppend | string | +| [options] | object | +| callback | function | + + + +### storageReactNative.readFileAsync(filename, [options]) ⇒ Promise.<string> +

Read data at given path

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| filename | string | +| [options] | object | + + + +### storageReactNative.readFile(filename, options, callback) +

Read data at given path

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| filename | string | +| options | object | +| callback | function | + + + +### storageReactNative.unlinkAsync(filename) ⇒ Promise.<void> +

Remove the data at given path

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| filename | string | + + + +### storageReactNative.unlink(path, callback) +

Remove the data at given path

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| path | string | +| callback | function | + + + +### storageReactNative.mkdirAsync(dir, [options]) ⇒ Promise.<(void\|string)> +

Shim for storage.mkdirAsync, nothing to do, no directories will be used on the browser

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| dir | string | +| [options] | object | + + + +### storageReactNative.mkdir(path, options, callback) +

Shim for storage.mkdir, nothing to do, no directories will be used on the browser

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| path | string | +| options | object | +| callback | function | + + + +### storageReactNative.ensureDatafileIntegrityAsync(filename) ⇒ Promise.<void> +

Ensure the datafile contains all the data, even if there was a crash during a full file write +Nothing to do, no data corruption possible in the browser

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| filename | string | + + + +### storageReactNative.ensureDatafileIntegrity(filename, callback) +

Ensure the datafile contains all the data, even if there was a crash during a full file write +Nothing to do, no data corruption possible in the browser

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | Description | +| --- | --- | --- | +| filename | string | | +| callback | [NoParamCallback](#NoParamCallback) |

signature: err

| + + + +### storageReactNative.crashSafeWriteFileLinesAsync(filename, lines) ⇒ Promise.<void> +

Fully write or rewrite the datafile, immune to crashes during the write operation (data will not be lost)

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| filename | string | +| lines | Array.<string> | + + + +### storageReactNative.crashSafeWriteFileLines(filename, lines, [callback]) +

Fully write or rewrite the datafile, immune to crashes during the write operation (data will not be lost)

+ +**Kind**: static method of [storageReactNative](#module_storageReactNative) + +| Param | Type | Description | +| --- | --- | --- | +| filename | string | | +| lines | Array.<string> | | +| [callback] | [NoParamCallback](#NoParamCallback) |

Optional callback, signature: err

| + + + +### storageReactNative~existsCallback : function +**Kind**: inner typedef of [storageReactNative](#module_storageReactNative) + +| Param | Type | +| --- | --- | +| exists | boolean | + diff --git a/docs/utils.md b/docs/utils.md new file mode 100644 index 0000000..11cd495 --- /dev/null +++ b/docs/utils.md @@ -0,0 +1,67 @@ + + +## utils +

Utility functions for all environments. +This replaces the underscore dependency.

+ + +* [utils](#module_utils) + * _static_ + * [.uniq(array, [iteratee])](#module_utils.uniq) ⇒ Array + * [.isDate(d)](#module_utils.isDate) ⇒ boolean + * [.isRegExp(re)](#module_utils.isRegExp) ⇒ boolean + * _inner_ + * [~isObject(arg)](#module_utils..isObject) ⇒ boolean + + + +### utils.uniq(array, [iteratee]) ⇒ Array +

Produces a duplicate-free version of the array, using === to test object equality. In particular only the first +occurrence of each value is kept. If you want to compute unique items based on a transformation, pass an iteratee +function. +Heavily inspired by https://underscorejs.org/#uniq

+ +**Kind**: static method of [utils](#module_utils) + +| Param | Type | Description | +| --- | --- | --- | +| array | Array | | +| [iteratee] | function |

transformation applied to every element before checking for duplicates. This will not transform the items in the result.

| + + + +### utils.isDate(d) ⇒ boolean +

Returns true if d is a Date. +Heavily inspired by https://underscorejs.org/#isDate

+ +**Kind**: static method of [utils](#module_utils) + +| Param | Type | +| --- | --- | +| d | \* | + + + +### utils.isRegExp(re) ⇒ boolean +

Returns true if re is a RegExp. +Heavily inspired by https://underscorejs.org/#isRegExp

+ +**Kind**: static method of [utils](#module_utils) + +| Param | Type | +| --- | --- | +| re | \* | + + + +### utils~isObject(arg) ⇒ boolean +

Returns true if arg is an Object. Note that JavaScript arrays and functions are objects, while (normal) strings +and numbers are not. +Heavily inspired by https://underscorejs.org/#isObject

+ +**Kind**: inner method of [utils](#module_utils) + +| Param | Type | +| --- | --- | +| arg | \* | + diff --git a/jsdoc.conf.js b/jsdoc.conf.js new file mode 100644 index 0000000..4615043 --- /dev/null +++ b/jsdoc.conf.js @@ -0,0 +1,8 @@ +'use strict' + +module.exports = { + plugins: ['plugins/markdown'], + source: { + include: ['./lib', './browser-version/lib'] + } +} diff --git a/jsdoc2md.js b/jsdoc2md.js new file mode 100644 index 0000000..681b462 --- /dev/null +++ b/jsdoc2md.js @@ -0,0 +1,43 @@ +'use strict' +const jsdoc2md = require('jsdoc-to-markdown') +const fs = require('fs') +const path = require('path') + +const jsdocConf = './jsdoc.conf.js' + +/* output path */ +const outputDir = './docs' + +const getJsdocDataOptions = { + /* same inpout path as jsdoc */ + files: require(jsdocConf).source.include, + configure: './jsdoc.conf.js', + 'no-cache': true +} + +fs.rmdirSync(outputDir, { recursive: true }) // clean docs dir +fs.mkdirSync(outputDir) // make docs dir + +/* get template data */ +const templateData = jsdoc2md.getTemplateDataSync(getJsdocDataOptions) + +/* reduce templateData to an array of class names */ +const classNames = templateData.filter(({kind}) => kind === 'class').map(({name}) => name) + +const moduleNames = templateData.filter(({kind}) => kind === 'module').map(({name}) => name) + +/* create a documentation file for each class */ +for (const className of classNames) { + const template = `{{#class name="${className}"}}{{>docs}}{{/class}}` + console.log(`rendering ${className}, template: ${template}`) + const output = jsdoc2md.renderSync({ data: templateData, template: template }) + fs.writeFileSync(path.resolve(outputDir, `${className}.md`), output) +} + +/* create a documentation file for each module */ +for (const moduleName of moduleNames) { + const template = `{{#module name="${moduleName}"}}{{>docs}}{{/module}}` + console.log(`rendering ${moduleName}, template: ${template}`) + const output = jsdoc2md.renderSync({ data: templateData, template: template }) + fs.writeFileSync(path.resolve(outputDir, `${moduleName}.md`), output) +} diff --git a/lib/executor.js b/lib/executor.js index a1acd5a..61f593f 100755 --- a/lib/executor.js +++ b/lib/executor.js @@ -1,57 +1,4 @@ -/** - * Responsible for sequentially executing actions on the database - * @private - */ -class Waterfall { - constructor () { - /** - * This is the internal Promise object which resolves when all the tasks of the `Waterfall` are done. - * - * It will change any time `this.waterfall` is called, this is why there is a getter `this.guardian` which retrieves - * the latest version of the guardian. - * @type {Promise} - * @private - */ - this._guardian = Promise.resolve() - } - - /** - * Returns a Promise which resolves when all tasks up to when this function is called are done. - * - * This Promise cannot reject. - * @return {Promise} - */ - get guardian () { - return this._guardian - } - - /** - * - * @param {AsyncFunction} func - * @return {AsyncFunction} - */ - waterfall (func) { - return (...args) => { - this._guardian = this.guardian.then(() => { - return func(...args) - .then(result => ({ error: false, result }), result => ({ error: true, result })) - }) - return this.guardian.then(({ error, result }) => { - if (error) return Promise.reject(result) - else return Promise.resolve(result) - }) - } - } - - /** - * Shorthand for chaining a promise to the Waterfall - * @param promise - * @return {Promise} - */ - chain (promise) { - return this.waterfall(() => promise)() - } -} +const Waterfall = require('./waterfall') /** * Executes operations sequentially. @@ -62,11 +9,33 @@ class Executor { * Instantiates a new Executor. */ constructor () { + /** + * If this.ready is `false`, then every task pushed will be buffered until this.processBuffer is called. + * @type {boolean} + * @protected + */ this.ready = false + /** + * The main queue + * @type {Waterfall} + * @protected + */ this.queue = new Waterfall() + /** + * The buffer queue + * @type {Waterfall} + * @protected + */ this.buffer = new Waterfall() this.buffer.chain(new Promise(resolve => { - this.triggerBuffer = resolve + /** + * Method to trigger the buffer processing. + * + * Do not be use directly, use `this.processBuffer` instead. + * @function + * @protected + */ + this._triggerBuffer = resolve })) } @@ -127,7 +96,7 @@ class Executor { */ processBuffer () { this.ready = true - this.triggerBuffer() + this._triggerBuffer() this.queue.waterfall(() => this.buffer.guardian) } } diff --git a/lib/waterfall.js b/lib/waterfall.js new file mode 100644 index 0000000..d44f8fc --- /dev/null +++ b/lib/waterfall.js @@ -0,0 +1,58 @@ +require('../jsdoc.conf') + +class Waterfall { + /** + * Instantiate a new Waterfall. + */ + constructor () { + /** + * This is the internal Promise object which resolves when all the tasks of the `Waterfall` are done. + * + * It will change any time `this.waterfall` is called. + * + * Use {@link Waterfall#guardian} instead which retrievethe latest version of the guardian. + * @type {Promise} + * @protected + */ + this._guardian = Promise.resolve() + } + + /** + * Getter that gives a Promise which resolves when all tasks up to when this function is called are done. + * + * This Promise cannot reject. + * @return {Promise} + */ + get guardian () { + return this._guardian + } + + /** + * + * @param {AsyncFunction} func + * @return {AsyncFunction} + */ + waterfall (func) { + return (...args) => { + this._guardian = this.guardian.then(() => { + return func(...args) + .then(result => ({ error: false, result }), result => ({ error: true, result })) + }) + return this.guardian.then(({ error, result }) => { + if (error) return Promise.reject(result) + else return Promise.resolve(result) + }) + } + } + + /** + * Shorthand for chaining a promise to the Waterfall + * @param {Promise} promise + * @return {Promise} + */ + chain (promise) { + return this.waterfall(() => promise)() + } +} + +module.exports = Waterfall diff --git a/package-lock.json b/package-lock.json index 0e7f9b8..34526aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,8 @@ "events": "^3.3.0", "jest": "^27.3.1", "jquery": "^3.6.0", + "jsdoc": "^3.6.7", + "jsdoc-to-markdown": "^7.1.0", "karma": "^6.3.2", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^3.1.0", @@ -3782,6 +3784,27 @@ "node": ">=6" } }, + "node_modules/ansi-escape-sequences": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-escape-sequences/-/ansi-escape-sequences-4.1.0.tgz", + "integrity": "sha512-dzW9kHxH011uBsidTXd14JXgzye/YLb2LzeKZ4bsgl/Knwx8AtbSFkkGxagdNOoh0DlqHCmfiEjWKBaqjOanVw==", + "dev": true, + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/ansi-escape-sequences/node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -3921,6 +3944,15 @@ "node": ">=0.10.0" } }, + "node_modules/array-back": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.0.tgz", + "integrity": "sha512-mixVv03GOOn/ubHE4STQ+uevX42ETdk0JoMVEjNkSOCT7WgERh7C8/+NyhWYNpE3BN69pxFyJIBcF7CxWz/+4A==", + "dev": true, + "engines": { + "node": ">=12.17" + } + }, "node_modules/array-filter": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", @@ -4433,6 +4465,12 @@ "node": ">=8" } }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, "node_modules/body-parser": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz", @@ -4615,6 +4653,29 @@ "node": ">=0.10.0" } }, + "node_modules/cache-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cache-point/-/cache-point-2.0.0.tgz", + "integrity": "sha512-4gkeHlFpSKgm3vm2gJN5sPqfmijYRFYCQ6tv5cLw0xVmT6r1z1vd4FNnpuOREco3cBs1G709sZ72LdgddKvL5w==", + "dev": true, + "dependencies": { + "array-back": "^4.0.1", + "fs-then-native": "^2.0.0", + "mkdirp2": "^1.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cache-point/node_modules/array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -4705,6 +4766,18 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/catharsis": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", + "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", + "dev": true, + "dependencies": { + "lodash": "^4.17.15" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/chai": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", @@ -4984,6 +5057,19 @@ "node": ">= 0.12.0" } }, + "node_modules/collect-all": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/collect-all/-/collect-all-1.0.4.tgz", + "integrity": "sha512-RKZhRwJtJEP5FWul+gkSMEnaK6H3AGPTTWOiRimCcs+rc/OmQE3Yhy1Q7A7KsdkG3ZXVdZq68Y6ONSdvkeEcKA==", + "dev": true, + "dependencies": { + "stream-connect": "^1.0.2", + "stream-via": "^1.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/collect-v8-coverage": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", @@ -5057,6 +5143,94 @@ "dev": true, "peer": true }, + "node_modules/command-line-args": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.0.tgz", + "integrity": "sha512-4zqtU1hYsSJzcJBOcNZIbW5Fbk9BkjCp1pZVhQKoRaWL5J7N4XphDLwo8aWwdQpTugxwu+jf9u2ZhkXiqp5Z6A==", + "dev": true, + "dependencies": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-args/node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/command-line-args/node_modules/typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/command-line-tool": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/command-line-tool/-/command-line-tool-0.8.0.tgz", + "integrity": "sha512-Xw18HVx/QzQV3Sc5k1vy3kgtOeGmsKIqwtFFoyjI4bbcpSgnw2CWVULvtakyw4s6fhyAdI6soQQhXc2OzJy62g==", + "dev": true, + "dependencies": { + "ansi-escape-sequences": "^4.0.0", + "array-back": "^2.0.0", + "command-line-args": "^5.0.0", + "command-line-usage": "^4.1.0", + "typical": "^2.6.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-tool/node_modules/array-back": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", + "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", + "dev": true, + "dependencies": { + "typical": "^2.6.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/command-line-usage": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-4.1.0.tgz", + "integrity": "sha512-MxS8Ad995KpdAC0Jopo/ovGIroV/m0KHwzKfXxKag6FHOkGsH8/lv5yjgablcRxCJJC0oJeUMuO/gmaq+Wq46g==", + "dev": true, + "dependencies": { + "ansi-escape-sequences": "^4.0.0", + "array-back": "^2.0.0", + "table-layout": "^0.4.2", + "typical": "^2.6.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/command-line-usage/node_modules/array-back": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", + "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", + "dev": true, + "dependencies": { + "typical": "^2.6.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/commander": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", @@ -5066,6 +5240,15 @@ "node": ">= 10" } }, + "node_modules/common-sequence": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/common-sequence/-/common-sequence-2.0.2.tgz", + "integrity": "sha512-jAg09gkdkrDO9EWTdXfv80WWH3yeZl5oT69fGfedBNS9pXUKYInVJ1bJ+/ht2+Moeei48TmSbQDYMc8EOx9G0g==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -5144,6 +5327,24 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "node_modules/config-master": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/config-master/-/config-master-3.1.0.tgz", + "integrity": "sha1-ZnZjWQUFooO/JqSE1oSJ10xUhdo=", + "dev": true, + "dependencies": { + "walk-back": "^2.0.1" + } + }, + "node_modules/config-master/node_modules/walk-back": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-2.0.1.tgz", + "integrity": "sha1-VU4qnYdPrEeoywBr9EwvDEmYoKQ=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", @@ -5424,6 +5625,15 @@ "node": ">=0.12" } }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -5540,6 +5750,38 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/dmd": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/dmd/-/dmd-6.0.0.tgz", + "integrity": "sha512-PwWZlqZnJPETwqZZ70haRa+UDZcD5jeBD3ywW1Kf+jYYv0MHu/S7Ri9jsSoeTMwkcMVW9hXOMA1IZUMEufBhOg==", + "dev": true, + "dependencies": { + "array-back": "^5.0.0", + "cache-point": "^2.0.0", + "common-sequence": "^2.0.0", + "file-set": "^4.0.1", + "handlebars": "^4.7.7", + "marked": "^2.0.0", + "object-get": "^2.1.1", + "reduce-flatten": "^3.0.0", + "reduce-unique": "^2.0.1", + "reduce-without": "^1.0.1", + "test-value": "^3.0.0", + "walk-back": "^5.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/dmd/node_modules/array-back": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-5.0.0.tgz", + "integrity": "sha512-kgVWwJReZWmVuWOQKEOohXKJX+nD02JAZ54D1RRWlv8L0NebauKAaFxACKzB74RTclt1+WNz5KHaLRDAPZbDEw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -5719,6 +5961,12 @@ "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", "dev": true }, + "node_modules/entities": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", + "dev": true + }, "node_modules/envinfo": { "version": "7.8.1", "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", @@ -6957,6 +7205,28 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-set": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/file-set/-/file-set-4.0.2.tgz", + "integrity": "sha512-fuxEgzk4L8waGXaAkd8cMr73Pm0FxOVkn8hztzUW7BAHhOGH90viQNXbiOsnecCWmfInqU6YmAMwxRMdKETceQ==", + "dev": true, + "dependencies": { + "array-back": "^5.0.0", + "glob": "^7.1.6" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/file-set/node_modules/array-back": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-5.0.0.tgz", + "integrity": "sha512-kgVWwJReZWmVuWOQKEOohXKJX+nD02JAZ54D1RRWlv8L0NebauKAaFxACKzB74RTclt1+WNz5KHaLRDAPZbDEw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -7114,6 +7384,27 @@ "semver": "bin/semver" } }, + "node_modules/find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dev": true, + "dependencies": { + "array-back": "^3.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/find-replace/node_modules/array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -7258,6 +7549,15 @@ "node": ">=6 <7 || >=8" } }, + "node_modules/fs-then-native": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fs-then-native/-/fs-then-native-2.0.0.tgz", + "integrity": "sha1-GaEk2U2QwiyOBF8ujdbr6jbUjGc=", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -7452,6 +7752,27 @@ "node": ">=4.x" } }, + "node_modules/handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -9080,6 +9401,15 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/js2xmlparser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", + "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", + "dev": true, + "dependencies": { + "xmlcreate": "^2.0.4" + } + }, "node_modules/jsc-android": { "version": "250230.2.1", "resolved": "https://registry.npmjs.org/jsc-android/-/jsc-android-250230.2.1.tgz", @@ -9272,6 +9602,122 @@ "signal-exit": "^3.0.2" } }, + "node_modules/jsdoc": { + "version": "3.6.7", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.7.tgz", + "integrity": "sha512-sxKt7h0vzCd+3Y81Ey2qinupL6DpRSZJclS04ugHDNmRUXGzqicMJ6iwayhSA0S0DwwX30c5ozyUthr1QKF6uw==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.9.4", + "bluebird": "^3.7.2", + "catharsis": "^0.9.0", + "escape-string-regexp": "^2.0.0", + "js2xmlparser": "^4.0.1", + "klaw": "^3.0.0", + "markdown-it": "^10.0.0", + "markdown-it-anchor": "^5.2.7", + "marked": "^2.0.3", + "mkdirp": "^1.0.4", + "requizzle": "^0.2.3", + "strip-json-comments": "^3.1.0", + "taffydb": "2.6.2", + "underscore": "~1.13.1" + }, + "bin": { + "jsdoc": "jsdoc.js" + }, + "engines": { + "node": ">=8.15.0" + } + }, + "node_modules/jsdoc-api": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/jsdoc-api/-/jsdoc-api-7.1.0.tgz", + "integrity": "sha512-yjIiZa6LFOgd0dyFW/R+3unnVUhhbU1CeBhisgjBPRHkar83rkgDtTMRdgQotSvt+pGlmknZqfwR5AQuMh9/6w==", + "dev": true, + "dependencies": { + "array-back": "^6.2.0", + "cache-point": "^2.0.0", + "collect-all": "^1.0.4", + "file-set": "^4.0.2", + "fs-then-native": "^2.0.0", + "jsdoc": "^3.6.7", + "object-to-spawn-args": "^2.0.1", + "temp-path": "^1.0.0", + "walk-back": "^5.1.0" + }, + "engines": { + "node": ">=12.17" + } + }, + "node_modules/jsdoc-parse": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/jsdoc-parse/-/jsdoc-parse-6.0.1.tgz", + "integrity": "sha512-ij3Az5y2dp+ajMxYnEJH7kjKK5v6+yZ3Cg/KtRdoT15pIm6qTk/W8q72QdNLZ9jQm/U2/ifENFXXTOe6xIxGeA==", + "dev": true, + "dependencies": { + "array-back": "^6.1.1", + "lodash.omit": "^4.5.0", + "lodash.pick": "^4.4.0", + "reduce-extract": "^1.0.0", + "sort-array": "^4.1.4", + "test-value": "^3.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/jsdoc-to-markdown": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/jsdoc-to-markdown/-/jsdoc-to-markdown-7.1.0.tgz", + "integrity": "sha512-LJAiwrUaOpPqOmllqnVVqfBZh6KI/rHHfSwL7DerTpjLQWHfpndz/JUNlF5ngYjbL4aHNf7uJ1TuXl6xGfq5rg==", + "dev": true, + "dependencies": { + "array-back": "^6.2.0", + "command-line-tool": "^0.8.0", + "config-master": "^3.1.0", + "dmd": "^6.0.0", + "jsdoc-api": "^7.1.0", + "jsdoc-parse": "^6.0.1", + "walk-back": "^5.1.0" + }, + "bin": { + "jsdoc2md": "bin/cli.js" + }, + "engines": { + "node": ">=12.17" + } + }, + "node_modules/jsdoc/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jsdoc/node_modules/klaw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.9" + } + }, + "node_modules/jsdoc/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jsdom": { "version": "16.7.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", @@ -9555,6 +10001,15 @@ "immediate": "~3.0.5" } }, + "node_modules/linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "dev": true, + "dependencies": { + "uc.micro": "^1.0.1" + } + }, "node_modules/load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -9614,6 +10069,12 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "dev": true + }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -9627,6 +10088,24 @@ "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", "dev": true }, + "node_modules/lodash.omit": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", + "integrity": "sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA=", + "dev": true + }, + "node_modules/lodash.padend": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz", + "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=", + "dev": true + }, + "node_modules/lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", + "dev": true + }, "node_modules/lodash.throttle": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", @@ -9854,6 +10333,43 @@ "node": ">=0.10.0" } }, + "node_modules/markdown-it": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "entities": "~2.0.0", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + }, + "bin": { + "markdown-it": "bin/markdown-it.js" + } + }, + "node_modules/markdown-it-anchor": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz", + "integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==", + "dev": true, + "peerDependencies": { + "markdown-it": "*" + } + }, + "node_modules/marked": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.1.3.tgz", + "integrity": "sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA==", + "dev": true, + "bin": { + "marked": "bin/marked" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/md5": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", @@ -9865,6 +10381,12 @@ "is-buffer": "~1.1.6" } }, + "node_modules/mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -10954,6 +11476,12 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/mkdirp2": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/mkdirp2/-/mkdirp2-1.0.5.tgz", + "integrity": "sha512-xOE9xbICroUDmG1ye2h4bZ8WBie9EGmACaco8K8cx6RlkJJrxGIqjGqztAI+NMhexXBcdGbSEzI6N3EJPevxZw==", + "dev": true + }, "node_modules/mocha": { "version": "9.1.3", "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.3.tgz", @@ -11490,6 +12018,12 @@ "node": ">=0.10.0" } }, + "node_modules/object-get": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object-get/-/object-get-2.1.1.tgz", + "integrity": "sha512-7n4IpLMzGGcLEMiQKsNR7vCe+N5E9LORFrtNUVy4sO3dj9a3HedZCxEL2T7QuLhcHN1NBuBsMOKaOsAYI9IIvg==", + "dev": true + }, "node_modules/object-inspect": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", @@ -11508,6 +12042,15 @@ "node": ">= 0.4" } }, + "node_modules/object-to-spawn-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object-to-spawn-args/-/object-to-spawn-args-2.0.1.tgz", + "integrity": "sha512-6FuKFQ39cOID+BMZ3QaphcC8Y4cw6LXBLyIgPU+OhIYwviJamPAn+4mITapnSBQrejB+NNp+FMskhD8Cq+Ys3w==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -12706,51 +13249,143 @@ "util-deprecate": "~1.0.1" } }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/readline": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/readline/-/readline-1.3.0.tgz", + "integrity": "sha1-xYDXfvLPyHUrEySYBg3JeTp6wBw=", + "dev": true, + "peer": true + }, + "node_modules/recast": { + "version": "0.20.5", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.20.5.tgz", + "integrity": "sha512-E5qICoPoNL4yU0H0NoBDntNB0Q5oMSNh9usFctYniLBluTthi3RsQVBXIJNbApOlvSwW/RGxIuokPcAc59J5fQ==", + "dev": true, + "peer": true, + "dependencies": { + "ast-types": "0.14.2", + "esprima": "~4.0.0", + "source-map": "~0.6.1", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/rechoir": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "dev": true, + "dependencies": { + "resolve": "^1.9.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/reduce-extract": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/reduce-extract/-/reduce-extract-1.0.0.tgz", + "integrity": "sha1-Z/I4W+2mUGG19fQxJmLosIDKFSU=", + "dev": true, + "dependencies": { + "test-value": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/reduce-extract/node_modules/array-back": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", + "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", + "dev": true, + "dependencies": { + "typical": "^2.6.0" + }, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/reduce-extract/node_modules/test-value": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/test-value/-/test-value-1.1.0.tgz", + "integrity": "sha1-oJE29y7AQ9J8iTcHwrFZv6196T8=", + "dev": true, + "dependencies": { + "array-back": "^1.0.2", + "typical": "^2.4.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/reduce-flatten": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-3.0.1.tgz", + "integrity": "sha512-bYo+97BmUUOzg09XwfkwALt4PQH1M5L0wzKerBt6WLm3Fhdd43mMS89HiT1B9pJIqko/6lWx3OnV4J9f2Kqp5Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/reduce-unique": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/reduce-unique/-/reduce-unique-2.0.1.tgz", + "integrity": "sha512-x4jH/8L1eyZGR785WY+ePtyMNhycl1N2XOLxhCbzZFaqF4AXjLzqSxa2UHgJ2ZVR/HHyPOvl1L7xRnW8ye5MdA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/reduce-without": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/reduce-without/-/reduce-without-1.0.1.tgz", + "integrity": "sha1-aK0OrRGFXJo31OglbBW7+Hly/Iw=", "dev": true, "dependencies": { - "picomatch": "^2.2.1" + "test-value": "^2.0.0" }, "engines": { - "node": ">=8.10.0" + "node": ">=0.10.0" } }, - "node_modules/readline": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/readline/-/readline-1.3.0.tgz", - "integrity": "sha1-xYDXfvLPyHUrEySYBg3JeTp6wBw=", - "dev": true, - "peer": true - }, - "node_modules/recast": { - "version": "0.20.5", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.20.5.tgz", - "integrity": "sha512-E5qICoPoNL4yU0H0NoBDntNB0Q5oMSNh9usFctYniLBluTthi3RsQVBXIJNbApOlvSwW/RGxIuokPcAc59J5fQ==", + "node_modules/reduce-without/node_modules/array-back": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", + "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", "dev": true, - "peer": true, "dependencies": { - "ast-types": "0.14.2", - "esprima": "~4.0.0", - "source-map": "~0.6.1", - "tslib": "^2.0.1" + "typical": "^2.6.0" }, "engines": { - "node": ">= 4" + "node": ">=0.12.0" } }, - "node_modules/rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "node_modules/reduce-without/node_modules/test-value": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/test-value/-/test-value-2.1.0.tgz", + "integrity": "sha1-Edpv9nDzRxpztiXKTz/c97t0gpE=", "dev": true, "dependencies": { - "resolve": "^1.9.0" + "array-back": "^1.0.3", + "typical": "^2.6.0" }, "engines": { - "node": ">= 0.10" + "node": ">=0.10.0" } }, "node_modules/regenerate": { @@ -12938,6 +13573,15 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", "dev": true }, + "node_modules/requizzle": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz", + "integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==", + "dev": true, + "dependencies": { + "lodash": "^4.17.14" + } + }, "node_modules/resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -14012,6 +14656,37 @@ "node": ">=10.0.0" } }, + "node_modules/sort-array": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/sort-array/-/sort-array-4.1.4.tgz", + "integrity": "sha512-GVFN6Y1sHKrWaSYOJTk9093ZnrBMc9sP3nuhANU44S4xg3rE6W5Z5WyamuT8VpMBbssnetx5faKCua0LEmUnSw==", + "dev": true, + "dependencies": { + "array-back": "^5.0.0", + "typical": "^6.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sort-array/node_modules/array-back": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-5.0.0.tgz", + "integrity": "sha512-kgVWwJReZWmVuWOQKEOohXKJX+nD02JAZ54D1RRWlv8L0NebauKAaFxACKzB74RTclt1+WNz5KHaLRDAPZbDEw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/sort-array/node_modules/typical": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/typical/-/typical-6.0.1.tgz", + "integrity": "sha512-+g3NEp7fJLe9DPa1TArHm9QAA7YciZmWnfAqEaFrBihQ7epOv9i99rjtgb6Iz0wh3WuQDjsCTDfgRoGnmHN81A==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -14384,6 +15059,39 @@ "node": ">= 0.10.0" } }, + "node_modules/stream-connect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-connect/-/stream-connect-1.0.2.tgz", + "integrity": "sha1-GLyB8u2zW4tdmoAJIAqYUxRCipc=", + "dev": true, + "dependencies": { + "array-back": "^1.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stream-connect/node_modules/array-back": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", + "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", + "dev": true, + "dependencies": { + "typical": "^2.6.0" + }, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/stream-via": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/stream-via/-/stream-via-1.0.4.tgz", + "integrity": "sha512-DBp0lSvX5G9KGRDTkR/R+a29H+Wk2xItOF+MpZLLNDWbEV9tGPnqLPxHEYjmiz8xGtJHRIqmI+hCjmNzqoA4nQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/streamroller": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-2.2.4.tgz", @@ -14604,6 +15312,34 @@ "node": ">=10.0.0" } }, + "node_modules/table-layout": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-0.4.5.tgz", + "integrity": "sha512-zTvf0mcggrGeTe/2jJ6ECkJHAQPIYEwDoqsiqBjI24mvRmQbInK5jq33fyypaCBxX08hMkfmdOqj6haT33EqWw==", + "dev": true, + "dependencies": { + "array-back": "^2.0.0", + "deep-extend": "~0.6.0", + "lodash.padend": "^4.6.1", + "typical": "^2.6.1", + "wordwrapjs": "^3.0.0" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/table-layout/node_modules/array-back": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", + "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", + "dev": true, + "dependencies": { + "typical": "^2.6.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/table/node_modules/ajv": { "version": "8.8.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", @@ -14661,6 +15397,12 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, + "node_modules/taffydb": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", + "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", + "dev": true + }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -14684,6 +15426,12 @@ "rimraf": "~2.2.6" } }, + "node_modules/temp-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/temp-path/-/temp-path-1.0.0.tgz", + "integrity": "sha1-JLFUOXOrRCiW2a02fdnL2/r+kYs=", + "dev": true + }, "node_modules/temp/node_modules/rimraf": { "version": "2.2.8", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", @@ -14798,6 +15546,31 @@ "node": ">=8" } }, + "node_modules/test-value": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/test-value/-/test-value-3.0.0.tgz", + "integrity": "sha512-sVACdAWcZkSU9x7AOmJo5TqE+GyNJknHaHsMrR6ZnhjVlVN9Yx6FjHrsKZ3BjIpPCT68zYesPWkakrNupwfOTQ==", + "dev": true, + "dependencies": { + "array-back": "^2.0.0", + "typical": "^2.6.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/test-value/node_modules/array-back": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", + "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", + "dev": true, + "dependencies": { + "typical": "^2.6.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -15160,6 +15933,12 @@ "node": ">=4.2.0" } }, + "node_modules/typical": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz", + "integrity": "sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0=", + "dev": true + }, "node_modules/ua-parser-js": { "version": "0.7.31", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz", @@ -15179,6 +15958,12 @@ "node": "*" } }, + "node_modules/uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true + }, "node_modules/uglify-es": { "version": "3.3.9", "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", @@ -15204,6 +15989,19 @@ "dev": true, "peer": true }, + "node_modules/uglify-js": { + "version": "3.14.5", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.5.tgz", + "integrity": "sha512-qZukoSxOG0urUTvjc2ERMTcAy+BiFh3weWAkeurLwjrCba73poHmG3E36XEjd/JGukMzwTL7uCxZiAexj8ppvQ==", + "dev": true, + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/ultron": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", @@ -15226,6 +16024,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/underscore": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.2.tgz", + "integrity": "sha512-ekY1NhRzq0B08g4bGuX4wd2jZx5GnKz6mKSqFL4nqBlfyMGiG10gDFhDTMEfYmDL6Jy0FUIZp7wiRB+0BP7J2g==", + "dev": true + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -15532,6 +16336,15 @@ "node": ">=10" } }, + "node_modules/walk-back": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-5.1.0.tgz", + "integrity": "sha512-Uhxps5yZcVNbLEAnb+xaEEMdgTXl9qAQDzKYejG2AZ7qPwRQ81lozY9ECDbjLPNWm7YsO1IK5rsP1KoQzXAcGA==", + "dev": true, + "engines": { + "node": ">=12.17" + } + }, "node_modules/walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -15800,6 +16613,34 @@ "node": ">=0.10.0" } }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "node_modules/wordwrapjs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-3.0.0.tgz", + "integrity": "sha512-mO8XtqyPvykVCsrwj5MlOVWvSnCdT+C+QVbm6blradR7JExAhbkZ7hZ9A+9NUtwzSqrlUo9a67ws0EiILrvRpw==", + "dev": true, + "dependencies": { + "reduce-flatten": "^1.0.1", + "typical": "^2.6.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/wordwrapjs/node_modules/reduce-flatten": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-1.0.1.tgz", + "integrity": "sha1-JYx479FT3fk8tWEjf2EYTzaW4yc=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/workerpool": { "version": "6.1.5", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz", @@ -15912,6 +16753,12 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, + "node_modules/xmlcreate": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", + "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", + "dev": true + }, "node_modules/xmldoc": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/xmldoc/-/xmldoc-1.1.2.tgz", @@ -18965,6 +19812,23 @@ "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true }, + "ansi-escape-sequences": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-escape-sequences/-/ansi-escape-sequences-4.1.0.tgz", + "integrity": "sha512-dzW9kHxH011uBsidTXd14JXgzye/YLb2LzeKZ4bsgl/Knwx8AtbSFkkGxagdNOoh0DlqHCmfiEjWKBaqjOanVw==", + "dev": true, + "requires": { + "array-back": "^3.0.1" + }, + "dependencies": { + "array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true + } + } + }, "ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -19073,6 +19937,12 @@ "dev": true, "peer": true }, + "array-back": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.0.tgz", + "integrity": "sha512-mixVv03GOOn/ubHE4STQ+uevX42ETdk0JoMVEjNkSOCT7WgERh7C8/+NyhWYNpE3BN69pxFyJIBcF7CxWz/+4A==", + "dev": true + }, "array-filter": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", @@ -19470,6 +20340,12 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, "body-parser": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz", @@ -19626,6 +20502,25 @@ "unset-value": "^1.0.0" } }, + "cache-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cache-point/-/cache-point-2.0.0.tgz", + "integrity": "sha512-4gkeHlFpSKgm3vm2gJN5sPqfmijYRFYCQ6tv5cLw0xVmT6r1z1vd4FNnpuOREco3cBs1G709sZ72LdgddKvL5w==", + "dev": true, + "requires": { + "array-back": "^4.0.1", + "fs-then-native": "^2.0.0", + "mkdirp2": "^1.0.4" + }, + "dependencies": { + "array-back": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.2.tgz", + "integrity": "sha512-NbdMezxqf94cnNfWLL7V/im0Ub+Anbb0IoZhvzie8+4HJ4nMQuzHuy49FkGYCJK2yAloZ3meiB6AVMClbrI1vg==", + "dev": true + } + } + }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -19693,6 +20588,15 @@ "rsvp": "^4.8.4" } }, + "catharsis": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", + "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", + "dev": true, + "requires": { + "lodash": "^4.17.15" + } + }, "chai": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", @@ -19909,6 +20813,16 @@ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true }, + "collect-all": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/collect-all/-/collect-all-1.0.4.tgz", + "integrity": "sha512-RKZhRwJtJEP5FWul+gkSMEnaK6H3AGPTTWOiRimCcs+rc/OmQE3Yhy1Q7A7KsdkG3ZXVdZq68Y6ONSdvkeEcKA==", + "dev": true, + "requires": { + "stream-connect": "^1.0.2", + "stream-via": "^1.0.4" + } + }, "collect-v8-coverage": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", @@ -19970,12 +20884,91 @@ "dev": true, "peer": true }, + "command-line-args": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.2.0.tgz", + "integrity": "sha512-4zqtU1hYsSJzcJBOcNZIbW5Fbk9BkjCp1pZVhQKoRaWL5J7N4XphDLwo8aWwdQpTugxwu+jf9u2ZhkXiqp5Z6A==", + "dev": true, + "requires": { + "array-back": "^3.1.0", + "find-replace": "^3.0.0", + "lodash.camelcase": "^4.3.0", + "typical": "^4.0.0" + }, + "dependencies": { + "array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true + }, + "typical": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-4.0.0.tgz", + "integrity": "sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==", + "dev": true + } + } + }, + "command-line-tool": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/command-line-tool/-/command-line-tool-0.8.0.tgz", + "integrity": "sha512-Xw18HVx/QzQV3Sc5k1vy3kgtOeGmsKIqwtFFoyjI4bbcpSgnw2CWVULvtakyw4s6fhyAdI6soQQhXc2OzJy62g==", + "dev": true, + "requires": { + "ansi-escape-sequences": "^4.0.0", + "array-back": "^2.0.0", + "command-line-args": "^5.0.0", + "command-line-usage": "^4.1.0", + "typical": "^2.6.1" + }, + "dependencies": { + "array-back": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", + "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", + "dev": true, + "requires": { + "typical": "^2.6.1" + } + } + } + }, + "command-line-usage": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-4.1.0.tgz", + "integrity": "sha512-MxS8Ad995KpdAC0Jopo/ovGIroV/m0KHwzKfXxKag6FHOkGsH8/lv5yjgablcRxCJJC0oJeUMuO/gmaq+Wq46g==", + "dev": true, + "requires": { + "ansi-escape-sequences": "^4.0.0", + "array-back": "^2.0.0", + "table-layout": "^0.4.2", + "typical": "^2.6.1" + }, + "dependencies": { + "array-back": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", + "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", + "dev": true, + "requires": { + "typical": "^2.6.1" + } + } + } + }, "commander": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", "dev": true }, + "common-sequence": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/common-sequence/-/common-sequence-2.0.2.tgz", + "integrity": "sha512-jAg09gkdkrDO9EWTdXfv80WWH3yeZl5oT69fGfedBNS9pXUKYInVJ1bJ+/ht2+Moeei48TmSbQDYMc8EOx9G0g==", + "dev": true + }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -20041,12 +21034,29 @@ } } }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "config-master": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/config-master/-/config-master-3.1.0.tgz", + "integrity": "sha1-ZnZjWQUFooO/JqSE1oSJ10xUhdo=", + "dev": true, + "requires": { + "walk-back": "^2.0.1" + }, + "dependencies": { + "walk-back": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-2.0.1.tgz", + "integrity": "sha1-VU4qnYdPrEeoywBr9EwvDEmYoKQ=", + "dev": true + } + } + }, "connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", @@ -20273,6 +21283,12 @@ "type-detect": "^4.0.0" } }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, "deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -20365,6 +21381,34 @@ "integrity": "sha512-YqiQzkrsmHMH5uuh8OdQFU9/ZpADnwzml8z0O5HvRNda+5UZsaX/xN+AAxfR2hWq1Y7HZnAzO9J5lJXOuDz2Ww==", "dev": true }, + "dmd": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/dmd/-/dmd-6.0.0.tgz", + "integrity": "sha512-PwWZlqZnJPETwqZZ70haRa+UDZcD5jeBD3ywW1Kf+jYYv0MHu/S7Ri9jsSoeTMwkcMVW9hXOMA1IZUMEufBhOg==", + "dev": true, + "requires": { + "array-back": "^5.0.0", + "cache-point": "^2.0.0", + "common-sequence": "^2.0.0", + "file-set": "^4.0.1", + "handlebars": "^4.7.7", + "marked": "^2.0.0", + "object-get": "^2.1.1", + "reduce-flatten": "^3.0.0", + "reduce-unique": "^2.0.1", + "reduce-without": "^1.0.1", + "test-value": "^3.0.0", + "walk-back": "^5.0.0" + }, + "dependencies": { + "array-back": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-5.0.0.tgz", + "integrity": "sha512-kgVWwJReZWmVuWOQKEOohXKJX+nD02JAZ54D1RRWlv8L0NebauKAaFxACKzB74RTclt1+WNz5KHaLRDAPZbDEw==", + "dev": true + } + } + }, "doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -20504,6 +21548,12 @@ "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=", "dev": true }, + "entities": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.3.tgz", + "integrity": "sha512-MyoZ0jgnLvB2X3Lg5HqpFmn1kybDiIfEQmKzTb5apr51Rb+T3KdmMiqa70T+bhGnyv7bQ6WMj2QMHpGMmlrUYQ==", + "dev": true + }, "envinfo": { "version": "7.8.1", "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", @@ -21443,6 +22493,24 @@ "flat-cache": "^3.0.4" } }, + "file-set": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/file-set/-/file-set-4.0.2.tgz", + "integrity": "sha512-fuxEgzk4L8waGXaAkd8cMr73Pm0FxOVkn8hztzUW7BAHhOGH90viQNXbiOsnecCWmfInqU6YmAMwxRMdKETceQ==", + "dev": true, + "requires": { + "array-back": "^5.0.0", + "glob": "^7.1.6" + }, + "dependencies": { + "array-back": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-5.0.0.tgz", + "integrity": "sha512-kgVWwJReZWmVuWOQKEOohXKJX+nD02JAZ54D1RRWlv8L0NebauKAaFxACKzB74RTclt1+WNz5KHaLRDAPZbDEw==", + "dev": true + } + } + }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -21571,6 +22639,23 @@ } } }, + "find-replace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-replace/-/find-replace-3.0.0.tgz", + "integrity": "sha512-6Tb2myMioCAgv5kfvP5/PkZZ/ntTpVK39fHY7WkWBgvbeE+VHd/tZuZ4mrC+bxh4cfOZeYKVPaJIZtZXV7GNCQ==", + "dev": true, + "requires": { + "array-back": "^3.0.1" + }, + "dependencies": { + "array-back": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", + "integrity": "sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==", + "dev": true + } + } + }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -21676,6 +22761,12 @@ "universalify": "^0.1.0" } }, + "fs-then-native": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fs-then-native/-/fs-then-native-2.0.0.tgz", + "integrity": "sha1-GaEk2U2QwiyOBF8ujdbr6jbUjGc=", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -21812,6 +22903,19 @@ "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", "dev": true }, + "handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + } + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -23049,6 +24153,15 @@ "esprima": "^4.0.0" } }, + "js2xmlparser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", + "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", + "dev": true, + "requires": { + "xmlcreate": "^2.0.4" + } + }, "jsc-android": { "version": "250230.2.1", "resolved": "https://registry.npmjs.org/jsc-android/-/jsc-android-250230.2.1.tgz", @@ -23216,6 +24329,97 @@ } } }, + "jsdoc": { + "version": "3.6.7", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.7.tgz", + "integrity": "sha512-sxKt7h0vzCd+3Y81Ey2qinupL6DpRSZJclS04ugHDNmRUXGzqicMJ6iwayhSA0S0DwwX30c5ozyUthr1QKF6uw==", + "dev": true, + "requires": { + "@babel/parser": "^7.9.4", + "bluebird": "^3.7.2", + "catharsis": "^0.9.0", + "escape-string-regexp": "^2.0.0", + "js2xmlparser": "^4.0.1", + "klaw": "^3.0.0", + "markdown-it": "^10.0.0", + "markdown-it-anchor": "^5.2.7", + "marked": "^2.0.3", + "mkdirp": "^1.0.4", + "requizzle": "^0.2.3", + "strip-json-comments": "^3.1.0", + "taffydb": "2.6.2", + "underscore": "~1.13.1" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + }, + "klaw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + } + } + }, + "jsdoc-api": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/jsdoc-api/-/jsdoc-api-7.1.0.tgz", + "integrity": "sha512-yjIiZa6LFOgd0dyFW/R+3unnVUhhbU1CeBhisgjBPRHkar83rkgDtTMRdgQotSvt+pGlmknZqfwR5AQuMh9/6w==", + "dev": true, + "requires": { + "array-back": "^6.2.0", + "cache-point": "^2.0.0", + "collect-all": "^1.0.4", + "file-set": "^4.0.2", + "fs-then-native": "^2.0.0", + "jsdoc": "^3.6.7", + "object-to-spawn-args": "^2.0.1", + "temp-path": "^1.0.0", + "walk-back": "^5.1.0" + } + }, + "jsdoc-parse": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/jsdoc-parse/-/jsdoc-parse-6.0.1.tgz", + "integrity": "sha512-ij3Az5y2dp+ajMxYnEJH7kjKK5v6+yZ3Cg/KtRdoT15pIm6qTk/W8q72QdNLZ9jQm/U2/ifENFXXTOe6xIxGeA==", + "dev": true, + "requires": { + "array-back": "^6.1.1", + "lodash.omit": "^4.5.0", + "lodash.pick": "^4.4.0", + "reduce-extract": "^1.0.0", + "sort-array": "^4.1.4", + "test-value": "^3.0.0" + } + }, + "jsdoc-to-markdown": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/jsdoc-to-markdown/-/jsdoc-to-markdown-7.1.0.tgz", + "integrity": "sha512-LJAiwrUaOpPqOmllqnVVqfBZh6KI/rHHfSwL7DerTpjLQWHfpndz/JUNlF5ngYjbL4aHNf7uJ1TuXl6xGfq5rg==", + "dev": true, + "requires": { + "array-back": "^6.2.0", + "command-line-tool": "^0.8.0", + "config-master": "^3.1.0", + "dmd": "^6.0.0", + "jsdoc-api": "^7.1.0", + "jsdoc-parse": "^6.0.1", + "walk-back": "^5.1.0" + } + }, "jsdom": { "version": "16.7.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", @@ -23442,6 +24646,15 @@ "immediate": "~3.0.5" } }, + "linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "dev": true, + "requires": { + "uc.micro": "^1.0.1" + } + }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -23491,6 +24704,12 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "dev": true + }, "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -23504,6 +24723,24 @@ "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", "dev": true }, + "lodash.omit": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", + "integrity": "sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA=", + "dev": true + }, + "lodash.padend": { + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/lodash.padend/-/lodash.padend-4.6.1.tgz", + "integrity": "sha1-U8y6BH0G4VjTEfRdpiX05J5vFm4=", + "dev": true + }, + "lodash.pick": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", + "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", + "dev": true + }, "lodash.throttle": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", @@ -23690,6 +24927,32 @@ "object-visit": "^1.0.0" } }, + "markdown-it": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "entities": "~2.0.0", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + } + }, + "markdown-it-anchor": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz", + "integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==", + "dev": true, + "requires": {} + }, + "marked": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.1.3.tgz", + "integrity": "sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA==", + "dev": true + }, "md5": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", @@ -23701,6 +24964,12 @@ "is-buffer": "~1.1.6" } }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -24655,6 +25924,12 @@ "minimist": "^1.2.5" } }, + "mkdirp2": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/mkdirp2/-/mkdirp2-1.0.5.tgz", + "integrity": "sha512-xOE9xbICroUDmG1ye2h4bZ8WBie9EGmACaco8K8cx6RlkJJrxGIqjGqztAI+NMhexXBcdGbSEzI6N3EJPevxZw==", + "dev": true + }, "mocha": { "version": "9.1.3", "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.3.tgz", @@ -25083,6 +26358,12 @@ } } }, + "object-get": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/object-get/-/object-get-2.1.1.tgz", + "integrity": "sha512-7n4IpLMzGGcLEMiQKsNR7vCe+N5E9LORFrtNUVy4sO3dj9a3HedZCxEL2T7QuLhcHN1NBuBsMOKaOsAYI9IIvg==", + "dev": true + }, "object-inspect": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", @@ -25095,6 +26376,12 @@ "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true }, + "object-to-spawn-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object-to-spawn-args/-/object-to-spawn-args-2.0.1.tgz", + "integrity": "sha512-6FuKFQ39cOID+BMZ3QaphcC8Y4cw6LXBLyIgPU+OhIYwviJamPAn+4mITapnSBQrejB+NNp+FMskhD8Cq+Ys3w==", + "dev": true + }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -26068,6 +27355,78 @@ "resolve": "^1.9.0" } }, + "reduce-extract": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/reduce-extract/-/reduce-extract-1.0.0.tgz", + "integrity": "sha1-Z/I4W+2mUGG19fQxJmLosIDKFSU=", + "dev": true, + "requires": { + "test-value": "^1.0.1" + }, + "dependencies": { + "array-back": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", + "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", + "dev": true, + "requires": { + "typical": "^2.6.0" + } + }, + "test-value": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/test-value/-/test-value-1.1.0.tgz", + "integrity": "sha1-oJE29y7AQ9J8iTcHwrFZv6196T8=", + "dev": true, + "requires": { + "array-back": "^1.0.2", + "typical": "^2.4.2" + } + } + } + }, + "reduce-flatten": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-3.0.1.tgz", + "integrity": "sha512-bYo+97BmUUOzg09XwfkwALt4PQH1M5L0wzKerBt6WLm3Fhdd43mMS89HiT1B9pJIqko/6lWx3OnV4J9f2Kqp5Q==", + "dev": true + }, + "reduce-unique": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/reduce-unique/-/reduce-unique-2.0.1.tgz", + "integrity": "sha512-x4jH/8L1eyZGR785WY+ePtyMNhycl1N2XOLxhCbzZFaqF4AXjLzqSxa2UHgJ2ZVR/HHyPOvl1L7xRnW8ye5MdA==", + "dev": true + }, + "reduce-without": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/reduce-without/-/reduce-without-1.0.1.tgz", + "integrity": "sha1-aK0OrRGFXJo31OglbBW7+Hly/Iw=", + "dev": true, + "requires": { + "test-value": "^2.0.0" + }, + "dependencies": { + "array-back": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", + "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", + "dev": true, + "requires": { + "typical": "^2.6.0" + } + }, + "test-value": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/test-value/-/test-value-2.1.0.tgz", + "integrity": "sha1-Edpv9nDzRxpztiXKTz/c97t0gpE=", + "dev": true, + "requires": { + "array-back": "^1.0.3", + "typical": "^2.6.0" + } + } + } + }, "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -26216,6 +27575,15 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", "dev": true }, + "requizzle": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz", + "integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, "resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", @@ -27105,6 +28473,30 @@ "debug": "~4.3.1" } }, + "sort-array": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/sort-array/-/sort-array-4.1.4.tgz", + "integrity": "sha512-GVFN6Y1sHKrWaSYOJTk9093ZnrBMc9sP3nuhANU44S4xg3rE6W5Z5WyamuT8VpMBbssnetx5faKCua0LEmUnSw==", + "dev": true, + "requires": { + "array-back": "^5.0.0", + "typical": "^6.0.1" + }, + "dependencies": { + "array-back": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-5.0.0.tgz", + "integrity": "sha512-kgVWwJReZWmVuWOQKEOohXKJX+nD02JAZ54D1RRWlv8L0NebauKAaFxACKzB74RTclt1+WNz5KHaLRDAPZbDEw==", + "dev": true + }, + "typical": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/typical/-/typical-6.0.1.tgz", + "integrity": "sha512-+g3NEp7fJLe9DPa1TArHm9QAA7YciZmWnfAqEaFrBihQ7epOv9i99rjtgb6Iz0wh3WuQDjsCTDfgRoGnmHN81A==", + "dev": true + } + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -27388,6 +28780,32 @@ "dev": true, "peer": true }, + "stream-connect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-connect/-/stream-connect-1.0.2.tgz", + "integrity": "sha1-GLyB8u2zW4tdmoAJIAqYUxRCipc=", + "dev": true, + "requires": { + "array-back": "^1.0.2" + }, + "dependencies": { + "array-back": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-1.0.4.tgz", + "integrity": "sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs=", + "dev": true, + "requires": { + "typical": "^2.6.0" + } + } + } + }, + "stream-via": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/stream-via/-/stream-via-1.0.4.tgz", + "integrity": "sha512-DBp0lSvX5G9KGRDTkR/R+a29H+Wk2xItOF+MpZLLNDWbEV9tGPnqLPxHEYjmiz8xGtJHRIqmI+hCjmNzqoA4nQ==", + "dev": true + }, "streamroller": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-2.2.4.tgz", @@ -27604,6 +29022,36 @@ } } }, + "table-layout": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-0.4.5.tgz", + "integrity": "sha512-zTvf0mcggrGeTe/2jJ6ECkJHAQPIYEwDoqsiqBjI24mvRmQbInK5jq33fyypaCBxX08hMkfmdOqj6haT33EqWw==", + "dev": true, + "requires": { + "array-back": "^2.0.0", + "deep-extend": "~0.6.0", + "lodash.padend": "^4.6.1", + "typical": "^2.6.1", + "wordwrapjs": "^3.0.0" + }, + "dependencies": { + "array-back": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", + "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", + "dev": true, + "requires": { + "typical": "^2.6.1" + } + } + } + }, + "taffydb": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", + "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", + "dev": true + }, "tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -27630,6 +29078,12 @@ } } }, + "temp-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/temp-path/-/temp-path-1.0.0.tgz", + "integrity": "sha1-JLFUOXOrRCiW2a02fdnL2/r+kYs=", + "dev": true + }, "terminal-link": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", @@ -27689,6 +29143,27 @@ "minimatch": "^3.0.4" } }, + "test-value": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/test-value/-/test-value-3.0.0.tgz", + "integrity": "sha512-sVACdAWcZkSU9x7AOmJo5TqE+GyNJknHaHsMrR6ZnhjVlVN9Yx6FjHrsKZ3BjIpPCT68zYesPWkakrNupwfOTQ==", + "dev": true, + "requires": { + "array-back": "^2.0.0", + "typical": "^2.6.1" + }, + "dependencies": { + "array-back": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-2.0.0.tgz", + "integrity": "sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw==", + "dev": true, + "requires": { + "typical": "^2.6.1" + } + } + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -27944,12 +29419,24 @@ "integrity": "sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==", "dev": true }, + "typical": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz", + "integrity": "sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0=", + "dev": true + }, "ua-parser-js": { "version": "0.7.31", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz", "integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==", "dev": true }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true + }, "uglify-es": { "version": "3.3.9", "resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz", @@ -27970,6 +29457,13 @@ } } }, + "uglify-js": { + "version": "3.14.5", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.5.tgz", + "integrity": "sha512-qZukoSxOG0urUTvjc2ERMTcAy+BiFh3weWAkeurLwjrCba73poHmG3E36XEjd/JGukMzwTL7uCxZiAexj8ppvQ==", + "dev": true, + "optional": true + }, "ultron": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz", @@ -27989,6 +29483,12 @@ "which-boxed-primitive": "^1.0.2" } }, + "underscore": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.2.tgz", + "integrity": "sha512-ekY1NhRzq0B08g4bGuX4wd2jZx5GnKz6mKSqFL4nqBlfyMGiG10gDFhDTMEfYmDL6Jy0FUIZp7wiRB+0BP7J2g==", + "dev": true + }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -28238,6 +29738,12 @@ "xml-name-validator": "^3.0.0" } }, + "walk-back": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/walk-back/-/walk-back-5.1.0.tgz", + "integrity": "sha512-Uhxps5yZcVNbLEAnb+xaEEMdgTXl9qAQDzKYejG2AZ7qPwRQ81lozY9ECDbjLPNWm7YsO1IK5rsP1KoQzXAcGA==", + "dev": true + }, "walker": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", @@ -28437,6 +29943,30 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "wordwrapjs": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-3.0.0.tgz", + "integrity": "sha512-mO8XtqyPvykVCsrwj5MlOVWvSnCdT+C+QVbm6blradR7JExAhbkZ7hZ9A+9NUtwzSqrlUo9a67ws0EiILrvRpw==", + "dev": true, + "requires": { + "reduce-flatten": "^1.0.1", + "typical": "^2.6.1" + }, + "dependencies": { + "reduce-flatten": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-1.0.1.tgz", + "integrity": "sha1-JYx479FT3fk8tWEjf2EYTzaW4yc=", + "dev": true + } + } + }, "workerpool": { "version": "6.1.5", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz", @@ -28520,6 +30050,12 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, + "xmlcreate": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", + "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", + "dev": true + }, "xmldoc": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/xmldoc/-/xmldoc-1.1.2.tgz", diff --git a/package.json b/package.json index 01ca97a..c5590d2 100755 --- a/package.json +++ b/package.json @@ -53,6 +53,8 @@ "events": "^3.3.0", "jest": "^27.3.1", "jquery": "^3.6.0", + "jsdoc": "^3.6.7", + "jsdoc-to-markdown": "^7.1.0", "karma": "^6.3.2", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^3.1.0", @@ -84,7 +86,9 @@ "test:browser": "xvfb-maybe karma start karma.conf.local.js", "test:react-native": "jest test/react-native", "test:typings": "ts-node ./typings-tests.ts", - "prepublishOnly": "npm run build:browser" + "prepublishOnly": "npm run build:browser", + "generateDocs:markdown": "node jsdoc2md.js", + "generateDocs:html": "jsdoc -c jsdoc.conf.js -d docs-html --readme README.md lib/*.js browser-version/lib/*.js" }, "main": "index.js", "browser": {