├── .github
└── CODEOWNERS
├── .gitignore
├── .npmignore
├── LICENSE
├── README.md
├── build.savant
├── fusionauth-node-client.iml
├── index.js
├── lib
├── ClientResponse.js
├── FusionAuthClient.js
├── JWTManager.js
└── RESTClient.js
├── package-lock.json
├── package.json
└── test
├── FusionAuthClientTest.js
├── JWTManagerTest.js
└── RESTClientTest.js
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | # This is a managed file. Manual changes will be overwritten.
2 | # https://github.com/FusionAuth/fusionauth-public-repos/
3 |
4 | .github/ @fusionauth/owners @fusionauth/platform
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **/build
2 | **/node_modules
3 | npm-debug.log
4 | *.tgz
5 | **/.DS_Store
6 | .savant/cache
7 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | build.savant
3 | **test/
4 | **build/
5 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## FusionAuth Node.js Client
2 |  
3 |
4 | ---
5 |
6 | ### Deprecation Warning
7 |
8 | This repository has been deprecated in favor of the [fusionauth-typescript-client](https://github.com/FusionAuth/fusionauth-typescript-client). You can just change your dependency and should have no problems using it with node as the package is still javascript but with additional type information. If you run into problems then let us know over there.
9 |
10 | We will continue to publish this package for several more versions before we archive it and fully deprecate its use. Please make arrangements to migrate to the typescript client soon.
11 |
12 | ---
13 |
14 | ### Details
15 |
16 | If you're integrating FusionAuth with a Node application, this library will speed up your development time.
17 |
18 | For additional information and documentation on FusionAuth refer to [https://fusionauth.io](https://fusionauth.io).
19 |
20 | Installation
21 | To install fusionauth-node-client, use npm
22 |
23 | ```bash
24 | npm install @fusionauth/node-client
25 | ```
26 |
27 | Refer to the FusionAuth API documentation to for request and response formats.
28 | * https://fusionauth.io/docs/v1/tech/apis/
29 | * https://fusionauth.io/docs/v1/tech/client-libraries/node
30 | ## Upgrade Policy
31 |
32 | This library is built automatically to keep track of the FusionAuth API, and may also receive updates with bug fixes, security patches, tests, code samples, or documentation changes.
33 |
34 | These releases may also update dependencies, language engines, and operating systems, as we\'ll follow the deprecation and sunsetting policies of the underlying technologies that it uses.
35 |
36 | This means that after a dependency (e.g. language, framework, or operating system) is deprecated by its maintainer, this library will also be deprecated by us, and will eventually be updated to use a newer version.
37 |
--------------------------------------------------------------------------------
/build.savant:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018-2024, FusionAuth, All Rights Reserved
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing,
11 | * software distributed under the License is distributed on an
12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | * either express or implied. See the License for the specific
14 | * language governing permissions and limitations under the License.
15 | */
16 |
17 | project(group: "io.fusionauth", name: "fusionauth-node-client", version: "1.51.0", licenses: ["ApacheV2_0"]) {
18 | workflow {
19 | fetch {
20 | cache()
21 | url(url: "https://repository.savantbuild.org")
22 | }
23 | publish {
24 | cache()
25 | }
26 | }
27 |
28 | publishWorkflow {
29 | subversion(repository: "https://svn.savantbuild.org")
30 | }
31 |
32 | publications {
33 | main {
34 | publication(name: "fusionauth-node-client", type: "tgz", file: "fusionauth-node-client-${project.version}.tgz")
35 | }
36 | }
37 | }
38 |
39 | // Plugins
40 | dependency = loadPlugin(id: "org.savantbuild.plugin:dependency:2.0.0-RC.7")
41 | file = loadPlugin(id: "org.savantbuild.plugin:file:2.0.0-RC.7")
42 | idea = loadPlugin(id: "org.savantbuild.plugin:idea:2.0.0-RC.7")
43 | release = loadPlugin(id: "org.savantbuild.plugin:release-git:2.0.0-RC.6")
44 |
45 | target(name: "clean", description: "Cleans build directory") {
46 | file.prune(dir: "build")
47 | file.delete {
48 | fileSet(dir: ".", includePatterns: [~/.+\.tgz/])
49 | }
50 | }
51 |
52 | target(name: "int", description: "Releases a local integration build of the project") {
53 | def npmInstall = 'npm pack'.execute()
54 | npmInstall.consumeProcessOutput(System.out, System.err)
55 | npmInstall.waitFor()
56 | dependency.integrate()
57 | }
58 |
59 | target(name: "idea", description: "Updates the IntelliJ IDEA module file") {
60 | idea.iml()
61 | }
62 |
63 | target(name: "test", description: "Runs the tests") {
64 | def npmInstall = 'npm ci'.execute()
65 | npmInstall.consumeProcessOutput(System.out, System.err)
66 | npmInstall.waitFor()
67 | if (new ProcessBuilder('npm', 'test').inheritIO().start().waitFor() != 0) {
68 | fail("Tests failed")
69 | }
70 | }
71 |
72 | target(name: "publish", description: "Publish in NPM", dependsOn: ["clean", "int"]) {
73 | def npmPublish = 'npm publish --access=public'.execute()
74 | npmPublish.consumeProcessOutput(System.out, System.err)
75 | }
76 |
77 | target(name: "release", description: "Releases a full version of the project", dependsOn: ["int"]) {
78 | release.release()
79 | }
80 |
--------------------------------------------------------------------------------
/fusionauth-node-client.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, FusionAuth, All Rights Reserved
3 | */
4 |
5 | 'use strict';
6 |
7 | const RESTClient = require('./lib/RESTClient');
8 | const FusionAuthClient = require('./lib/FusionAuthClient');
9 | const ClientResponse = require('./lib/ClientResponse');
10 | const JWTManager = require('./lib/JWTManager');
11 |
12 | /* Expose everything */
13 | exports.RESTClient = RESTClient;
14 | exports.FusionAuthClient = FusionAuthClient;
15 | exports.ClientResponse = ClientResponse;
16 | exports.JWTManager = JWTManager;
17 |
--------------------------------------------------------------------------------
/lib/ClientResponse.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, FusionAuth, All Rights Reserved
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing,
11 | * software distributed under the License is distributed on an
12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | * either express or implied. See the License for the specific
14 | * language governing permissions and limitations under the License.
15 | */
16 |
17 | 'use strict';
18 |
19 | /**
20 | * A client response that provides the status code and the response of an REST API call.
21 | *
22 | * @constructor
23 | * @template T
24 | */
25 | const ClientResponse = function() {
26 | /** @type{?number} */
27 | this.statusCode = null;
28 | /** @type{?Errors} */
29 | this.errorResponse = null;
30 | /** @type{?T} */
31 | this.successResponse = null;
32 | /** @type{?Error} */
33 | this.exception = null;
34 | };
35 |
36 | ClientResponse.constructor = ClientResponse;
37 | ClientResponse.prototype = {
38 |
39 | /**
40 | * @returns {boolean} return true if the request was successful.
41 | */
42 | wasSuccessful: function() {
43 | return this.statusCode >= 200 && this.statusCode <= 299 && this.exception === null;
44 | }
45 | };
46 |
47 | module.exports = ClientResponse;
--------------------------------------------------------------------------------
/lib/JWTManager.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, FusionAuth, All Rights Reserved
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing,
11 | * software distributed under the License is distributed on an
12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | * either express or implied. See the License for the specific
14 | * language governing permissions and limitations under the License.
15 | */
16 |
17 | 'use strict';
18 |
19 | const JWTManager = {
20 | revokedJWTs: {},
21 |
22 | /**
23 | * Checks if a JWT is valid. This assumes that the JWT contains a property named exp
that is a
24 | * NumericDate value defined in the JWT specification and a property named sub
that is the user id the
25 | * JWT belongs to.
26 | *
27 | * @param {object} jwt The JWT object.
28 | * @returns {boolean} True if the JWT is valid, false if it isn't.
29 | */
30 | isValid: function(jwt) {
31 | const expiration = JWTManager.revokedJWTs[jwt.sub];
32 | return typeof(expiration) === 'undefined' || expiration === null || expiration < jwt.exp * 1000;
33 | },
34 |
35 | /**
36 | * Revokes all JWTs for the user with the given id using the duration (in seconds).
37 | *
38 | * @param {string} userId The user id (usually a UUID as a string).
39 | * @param {Number} durationSeconds The duration of all JWTs in seconds.
40 | */
41 | revoke: function(userId, durationSeconds) {
42 | JWTManager.revokedJWTs[userId] = Date.now() + (durationSeconds * 1000);
43 | },
44 |
45 | /**
46 | * Cleans up the cache to remove old user's that have expired.
47 | * @private
48 | */
49 | _cleanUp: function() {
50 | const now = Date.now();
51 | Object.keys(JWTManager.revokedJWTs).forEach((item, index, _array) => {
52 | const expiration = JWTManager.revokedJWTs[item];
53 | if (expiration < now) {
54 | delete JWTManager.revokedJWTs[item];
55 | }
56 | });
57 | }
58 | };
59 |
60 | /**
61 | * Set an interval to clean-up the cache, call .unref() to allow the process to exit without manually calling clearInterval.
62 | */
63 | setInterval(JWTManager._cleanUp, 7000).unref();
64 |
65 | module.exports = JWTManager;
--------------------------------------------------------------------------------
/lib/RESTClient.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018-2019, FusionAuth, All Rights Reserved
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing,
11 | * software distributed under the License is distributed on an
12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | * either express or implied. See the License for the specific
14 | * language governing permissions and limitations under the License.
15 | */
16 |
17 | 'use strict';
18 |
19 | const ClientResponse = require("./ClientResponse.js");
20 | const http = require("http");
21 | const https = require("https");
22 | const queryString = require("querystring");
23 | const url = require("url");
24 |
25 | /**
26 | * RESTful WebService call builder. This provides the ability to call RESTful WebServices using a builder pattern to
27 | * set up all the necessary request information and parse the response.
28 | *
29 | * @constructor
30 | */
31 | const RESTClient = function() {
32 | this.headers = {};
33 | this.parameters = null;
34 | this.restUrl = null;
35 | this.body = null;
36 | this.certificate = null;
37 | this.key = null;
38 | this.method = null;
39 | };
40 |
41 | RESTClient.constructor = RESTClient;
42 | RESTClient.prototype = {
43 | /**
44 | * Sets the authorization header using a key
45 | *
46 | * @param {string} key The value of the authorization header.
47 | * @returns {RESTClient}
48 | */
49 | authorization: function(key) {
50 | this.header('Authorization', key);
51 | return this;
52 | },
53 |
54 | /**
55 | * Sets the authorization header using username and password
56 | *
57 | * @param {string} username
58 | * @param {string} password
59 | * @returns {RESTClient}
60 | */
61 | basicAuthorization: function(username, password) {
62 | if (username && password) {
63 | this.header('Authorization', 'Basic ' + Buffer.from(username + ':' + password).toString('base64'));
64 | }
65 | return this;
66 | },
67 |
68 | /**
69 | * Sets the body of the client request.
70 | *
71 | * @param {Object} body The object to be written to the request body as form data.
72 | * @returns {RESTClient}
73 | */
74 | setFormBody: function(body) {
75 | this.body = queryString.stringify(body);
76 | this.header('Content-Type', 'application/x-www-form-urlencoded');
77 | this.header('Content-Length', Buffer.byteLength(this.body));
78 | return this;
79 | },
80 |
81 | /**
82 | * Sets the body of the client request.
83 | *
84 | * @param {Object} body The object to be written to the request body as JSON.
85 | * @returns {RESTClient}
86 | */
87 | setJSONBody: function(body) {
88 | this.body = JSON.stringify(body);
89 | this.header('Content-Type', 'application/json');
90 | this.header('Content-Length', Buffer.byteLength(this.body));
91 | return this;
92 | },
93 |
94 | /**
95 | * Sets the ssl certificate for request to https endpoints.
96 | *
97 | * @param {string} certificate
98 | * @returns {RESTClient}
99 | */
100 | setCertificate: function(certificate) {
101 | this.certificate = certificate;
102 | return this;
103 | },
104 |
105 | /**
106 | * Sets the http method to DELETE
107 | *
108 | * @returns {RESTClient}
109 | */
110 | delete: function() {
111 | this.method = 'DELETE';
112 | return this;
113 | },
114 |
115 | /**
116 | * Sets the http method to GET
117 | *
118 | * @returns {RESTClient}
119 | */
120 | get: function() {
121 | this.method = 'GET';
122 | return this;
123 | },
124 |
125 | /**
126 | * Sets the http method to PATCH
127 | *
128 | * @returns {RESTClient}
129 | */
130 | patch: function() {
131 | this.method = 'PATCH';
132 | return this;
133 | },
134 |
135 | /**
136 | * Sets the http method to POST
137 | *
138 | * @returns {RESTClient}
139 | */
140 | post: function() {
141 | this.method = 'POST';
142 | return this;
143 | },
144 |
145 | /**
146 | * Sets the http method to PUT
147 | *
148 | * @returns {RESTClient}
149 | */
150 | put: function() {
151 | this.method = 'PUT';
152 | return this;
153 | },
154 |
155 | /**
156 | * @callback RESTClient~callback
157 | *
158 | * @template {T}
159 | *
160 | * @param {ClientResponse} clientResponse The response when the request has completed or failed.
161 | */
162 |
163 | /**
164 | * Creates the request to the REST API. Takes a responseHandler which is a function that handles the response from
165 | * the REST API.
166 | *
167 | * @template {T}
168 | *
169 | * @param {RESTClient~callback} responseHandler The response handler function callback.
170 | */
171 | go: function(responseHandler) {
172 | if (this.parameters) {
173 | if (this.restUrl.indexOf('?') === -1) {
174 | this.restUrl = this.restUrl + '?';
175 | }
176 | this.restUrl = this.restUrl + queryString.stringify(this.parameters);
177 | }
178 | const scheme = url.parse(this.restUrl);
179 | const myHttp = scheme.protocol === 'https:' ? https : http;
180 |
181 | let port = 443;
182 | if (scheme.port) {
183 | port = scheme.port;
184 | } else if (scheme.protocol === 'http:') {
185 | port = 80;
186 | }
187 |
188 | const options = {
189 | hostname: scheme.hostname,
190 | port: port,
191 | path: scheme.path,
192 | method: this.method,
193 | headers: this.headers
194 | };
195 |
196 | if (scheme.protocol === 'https:') {
197 | options.key = this.key;
198 | options.cert = this.certificate;
199 | }
200 |
201 | const clientResponse = new ClientResponse();
202 | let streamData = '';
203 | const request = myHttp.request(options, function(response) {
204 | clientResponse.statusCode = response.statusCode;
205 | response.on('data', function(data) {
206 | streamData += data;
207 | }).on('error', function(error) {
208 | clientResponse.exception = error;
209 | }).on('exception', function(exception) {
210 | clientResponse.exception = exception;
211 | }).on('end', function() {
212 | let json = streamData;
213 | try {
214 | if (streamData.length > 0) {
215 | json = JSON.parse(streamData);
216 | }
217 | } catch (err) {
218 | console.error(err);
219 | }
220 | if (clientResponse.wasSuccessful()) {
221 | clientResponse.successResponse = json || null;
222 | } else {
223 | clientResponse.errorResponse = json || null;
224 | }
225 | responseHandler(clientResponse);
226 | });
227 | });
228 | request.on('error', function(error) {
229 | clientResponse.statusCode = 500;
230 | clientResponse.exception = error;
231 | responseHandler(clientResponse);
232 | });
233 | request.end(this.body);
234 | },
235 |
236 | /**
237 | * Creates a header field in the format 'key' : value
238 | *
239 | * @param {string} key
240 | * @param {Object} value
241 | * @returns {RESTClient}
242 | */
243 | header: function(key, value) {
244 | this.headers[key] = value;
245 | return this;
246 | },
247 |
248 | /**
249 | * Sets the entire header field.
250 | *
251 | * @param {string} headers The headers in a JSON object of key value pairs.
252 | * @returns {RESTClient}
253 | */
254 | setHeaders: function(headers) {
255 | this.headers = headers;
256 | return this;
257 | },
258 |
259 | /**
260 | * Sets the ssl key for request to https endpoints.
261 | * @param {string} key
262 | * @returns {RESTClient}
263 | */
264 | setKey: function(key) {
265 | this.key = key;
266 | return this;
267 | },
268 |
269 | /**
270 | * Sets the uri of the REST request
271 | * @param {?string} uri
272 | * @returns {RESTClient}
273 | */
274 | uri: function(uri) {
275 | if (uri === null || typeof this.restUrl === 'undefined') {
276 | return this;
277 | }
278 |
279 | if (this.restUrl.charAt(this.restUrl.length - 1) === '/' && uri.charAt(0) === '/') {
280 | this.restUrl = this.restUrl + uri.substring(1);
281 | } else if (this.restUrl.charAt(this.restUrl.length - 1) !== '/' && uri.charAt(0) !== '/') {
282 | this.restUrl = this.restUrl + '/' + uri;
283 | } else {
284 | this.restUrl = this.restUrl + uri;
285 | }
286 |
287 | return this;
288 | },
289 |
290 | /**
291 | * Sets the host of the REST request.
292 | *
293 | * @param {string} url
294 | * @returns {RESTClient}
295 | */
296 | setUrl: function(url) {
297 | this.restUrl = url;
298 | return this;
299 | },
300 |
301 | /**
302 | * Adds url parameters to the REST request.
303 | *
304 | * @param {!string} name The name of the parameter.
305 | * @param {?string|Object|number} value The value of the URL parameter, may be a string, object or number.
306 | * @returns {RESTClient}
307 | */
308 | urlParameter: function(name, value) {
309 | if (value !== null && typeof value !== 'undefined') {
310 | if (this.parameters === null) {
311 | this.parameters = {};
312 | }
313 | const values = this.parameters[name];
314 | if (values === undefined) {
315 | this.parameters[name] = [];
316 | }
317 | if (typeof value === 'object') {
318 | for (let v in value) {
319 | if (value.hasOwnProperty(v)) {
320 | this.parameters[name].push(value[v]);
321 | }
322 | }
323 | } else {
324 | this.parameters[name].push(value);
325 | }
326 | }
327 | return this;
328 | },
329 |
330 | /**
331 | * Adds a url path segments to the REST request.
332 | *
333 | * @param {?string|?number} segment
334 | * @returns {RESTClient}
335 | */
336 | urlSegment: function(segment) {
337 | if (segment !== null && typeof segment !== 'undefined') {
338 | if (this.restUrl.charAt(this.restUrl.length - 1) !== '/') {
339 | this.restUrl = this.restUrl + '/';
340 | }
341 | this.restUrl = this.restUrl + segment;
342 | }
343 | return this;
344 | }
345 | };
346 |
347 | module.exports = RESTClient;
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@fusionauth/node-client",
3 | "version": "1.51.0",
4 | "lockfileVersion": 2,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "@fusionauth/node-client",
9 | "version": "1.41.0-EAP.20221022",
10 | "license": "Apache-2.0",
11 | "dependencies": {
12 | "promise": "^8.0.3"
13 | },
14 | "devDependencies": {
15 | "@types/chai": "^4.2.7",
16 | "@types/mocha": "^5.2.7",
17 | "chai": "^4.2.0",
18 | "chai-as-promised": "^7.1.1",
19 | "mocha": "^6.2.2",
20 | "should": "^13.2.3"
21 | },
22 | "engines": {
23 | "node": ">= 0.10.0"
24 | }
25 | },
26 | "node_modules/@types/chai": {
27 | "version": "4.3.3",
28 | "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz",
29 | "integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==",
30 | "dev": true
31 | },
32 | "node_modules/@types/mocha": {
33 | "version": "5.2.7",
34 | "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz",
35 | "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==",
36 | "dev": true
37 | },
38 | "node_modules/ansi-colors": {
39 | "version": "3.2.3",
40 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
41 | "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
42 | "dev": true,
43 | "engines": {
44 | "node": ">=6"
45 | }
46 | },
47 | "node_modules/ansi-regex": {
48 | "version": "3.0.1",
49 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz",
50 | "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==",
51 | "dev": true,
52 | "engines": {
53 | "node": ">=4"
54 | }
55 | },
56 | "node_modules/ansi-styles": {
57 | "version": "3.2.1",
58 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
59 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
60 | "dev": true,
61 | "dependencies": {
62 | "color-convert": "^1.9.0"
63 | },
64 | "engines": {
65 | "node": ">=4"
66 | }
67 | },
68 | "node_modules/argparse": {
69 | "version": "1.0.10",
70 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
71 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
72 | "dev": true,
73 | "dependencies": {
74 | "sprintf-js": "~1.0.2"
75 | }
76 | },
77 | "node_modules/asap": {
78 | "version": "2.0.6",
79 | "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
80 | "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
81 | },
82 | "node_modules/assertion-error": {
83 | "version": "1.1.0",
84 | "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
85 | "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
86 | "dev": true,
87 | "engines": {
88 | "node": "*"
89 | }
90 | },
91 | "node_modules/balanced-match": {
92 | "version": "1.0.0",
93 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
94 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
95 | "dev": true
96 | },
97 | "node_modules/brace-expansion": {
98 | "version": "1.1.11",
99 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
100 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
101 | "dev": true,
102 | "dependencies": {
103 | "balanced-match": "^1.0.0",
104 | "concat-map": "0.0.1"
105 | }
106 | },
107 | "node_modules/browser-stdout": {
108 | "version": "1.3.1",
109 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
110 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
111 | "dev": true
112 | },
113 | "node_modules/camelcase": {
114 | "version": "5.3.1",
115 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
116 | "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
117 | "dev": true,
118 | "engines": {
119 | "node": ">=6"
120 | }
121 | },
122 | "node_modules/chai": {
123 | "version": "4.2.0",
124 | "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz",
125 | "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==",
126 | "dev": true,
127 | "dependencies": {
128 | "assertion-error": "^1.1.0",
129 | "check-error": "^1.0.2",
130 | "deep-eql": "^3.0.1",
131 | "get-func-name": "^2.0.0",
132 | "pathval": "^1.1.0",
133 | "type-detect": "^4.0.5"
134 | },
135 | "engines": {
136 | "node": ">=4"
137 | }
138 | },
139 | "node_modules/chai-as-promised": {
140 | "version": "7.1.1",
141 | "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz",
142 | "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==",
143 | "dev": true,
144 | "dependencies": {
145 | "check-error": "^1.0.2"
146 | },
147 | "peerDependencies": {
148 | "chai": ">= 2.1.2 < 5"
149 | }
150 | },
151 | "node_modules/chalk": {
152 | "version": "2.4.2",
153 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
154 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
155 | "dev": true,
156 | "dependencies": {
157 | "ansi-styles": "^3.2.1",
158 | "escape-string-regexp": "^1.0.5",
159 | "supports-color": "^5.3.0"
160 | },
161 | "engines": {
162 | "node": ">=4"
163 | }
164 | },
165 | "node_modules/chalk/node_modules/supports-color": {
166 | "version": "5.5.0",
167 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
168 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
169 | "dev": true,
170 | "dependencies": {
171 | "has-flag": "^3.0.0"
172 | },
173 | "engines": {
174 | "node": ">=4"
175 | }
176 | },
177 | "node_modules/check-error": {
178 | "version": "1.0.2",
179 | "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
180 | "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
181 | "dev": true,
182 | "engines": {
183 | "node": "*"
184 | }
185 | },
186 | "node_modules/cliui": {
187 | "version": "5.0.0",
188 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
189 | "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
190 | "dev": true,
191 | "dependencies": {
192 | "string-width": "^3.1.0",
193 | "strip-ansi": "^5.2.0",
194 | "wrap-ansi": "^5.1.0"
195 | }
196 | },
197 | "node_modules/cliui/node_modules/ansi-regex": {
198 | "version": "4.1.1",
199 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
200 | "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
201 | "dev": true,
202 | "engines": {
203 | "node": ">=6"
204 | }
205 | },
206 | "node_modules/cliui/node_modules/string-width": {
207 | "version": "3.1.0",
208 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
209 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
210 | "dev": true,
211 | "dependencies": {
212 | "emoji-regex": "^7.0.1",
213 | "is-fullwidth-code-point": "^2.0.0",
214 | "strip-ansi": "^5.1.0"
215 | },
216 | "engines": {
217 | "node": ">=6"
218 | }
219 | },
220 | "node_modules/cliui/node_modules/strip-ansi": {
221 | "version": "5.2.0",
222 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
223 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
224 | "dev": true,
225 | "dependencies": {
226 | "ansi-regex": "^4.1.0"
227 | },
228 | "engines": {
229 | "node": ">=6"
230 | }
231 | },
232 | "node_modules/color-convert": {
233 | "version": "1.9.3",
234 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
235 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
236 | "dev": true,
237 | "dependencies": {
238 | "color-name": "1.1.3"
239 | }
240 | },
241 | "node_modules/color-name": {
242 | "version": "1.1.3",
243 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
244 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
245 | "dev": true
246 | },
247 | "node_modules/concat-map": {
248 | "version": "0.0.1",
249 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
250 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
251 | "dev": true
252 | },
253 | "node_modules/debug": {
254 | "version": "3.2.6",
255 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
256 | "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
257 | "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
258 | "dev": true,
259 | "dependencies": {
260 | "ms": "^2.1.1"
261 | }
262 | },
263 | "node_modules/decamelize": {
264 | "version": "1.2.0",
265 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
266 | "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
267 | "dev": true,
268 | "engines": {
269 | "node": ">=0.10.0"
270 | }
271 | },
272 | "node_modules/deep-eql": {
273 | "version": "3.0.1",
274 | "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
275 | "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==",
276 | "dev": true,
277 | "dependencies": {
278 | "type-detect": "^4.0.0"
279 | },
280 | "engines": {
281 | "node": ">=0.12"
282 | }
283 | },
284 | "node_modules/define-properties": {
285 | "version": "1.1.3",
286 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
287 | "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
288 | "dev": true,
289 | "dependencies": {
290 | "object-keys": "^1.0.12"
291 | },
292 | "engines": {
293 | "node": ">= 0.4"
294 | }
295 | },
296 | "node_modules/diff": {
297 | "version": "3.5.0",
298 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
299 | "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
300 | "dev": true,
301 | "engines": {
302 | "node": ">=0.3.1"
303 | }
304 | },
305 | "node_modules/emoji-regex": {
306 | "version": "7.0.3",
307 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
308 | "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
309 | "dev": true
310 | },
311 | "node_modules/es-abstract": {
312 | "version": "1.17.0-next.1",
313 | "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0-next.1.tgz",
314 | "integrity": "sha512-7MmGr03N7Rnuid6+wyhD9sHNE2n4tFSwExnU2lQl3lIo2ShXWGePY80zYaoMOmILWv57H0amMjZGHNzzGG70Rw==",
315 | "dev": true,
316 | "dependencies": {
317 | "es-to-primitive": "^1.2.1",
318 | "function-bind": "^1.1.1",
319 | "has": "^1.0.3",
320 | "has-symbols": "^1.0.1",
321 | "is-callable": "^1.1.4",
322 | "is-regex": "^1.0.4",
323 | "object-inspect": "^1.7.0",
324 | "object-keys": "^1.1.1",
325 | "object.assign": "^4.1.0",
326 | "string.prototype.trimleft": "^2.1.0",
327 | "string.prototype.trimright": "^2.1.0"
328 | },
329 | "engines": {
330 | "node": ">= 0.4"
331 | },
332 | "funding": {
333 | "url": "https://github.com/sponsors/ljharb"
334 | }
335 | },
336 | "node_modules/es-to-primitive": {
337 | "version": "1.2.1",
338 | "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
339 | "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
340 | "dev": true,
341 | "dependencies": {
342 | "is-callable": "^1.1.4",
343 | "is-date-object": "^1.0.1",
344 | "is-symbol": "^1.0.2"
345 | },
346 | "engines": {
347 | "node": ">= 0.4"
348 | },
349 | "funding": {
350 | "url": "https://github.com/sponsors/ljharb"
351 | }
352 | },
353 | "node_modules/escape-string-regexp": {
354 | "version": "1.0.5",
355 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
356 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
357 | "dev": true,
358 | "engines": {
359 | "node": ">=0.8.0"
360 | }
361 | },
362 | "node_modules/esprima": {
363 | "version": "4.0.1",
364 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
365 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
366 | "dev": true,
367 | "bin": {
368 | "esparse": "bin/esparse.js",
369 | "esvalidate": "bin/esvalidate.js"
370 | },
371 | "engines": {
372 | "node": ">=4"
373 | }
374 | },
375 | "node_modules/find-up": {
376 | "version": "3.0.0",
377 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
378 | "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
379 | "dev": true,
380 | "dependencies": {
381 | "locate-path": "^3.0.0"
382 | },
383 | "engines": {
384 | "node": ">=6"
385 | }
386 | },
387 | "node_modules/flat": {
388 | "version": "4.1.0",
389 | "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",
390 | "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==",
391 | "deprecated": "Fixed a prototype pollution security issue in 4.1.0, please upgrade to ^4.1.1 or ^5.0.1.",
392 | "dev": true,
393 | "dependencies": {
394 | "is-buffer": "~2.0.3"
395 | },
396 | "bin": {
397 | "flat": "cli.js"
398 | }
399 | },
400 | "node_modules/fs.realpath": {
401 | "version": "1.0.0",
402 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
403 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
404 | "dev": true
405 | },
406 | "node_modules/function-bind": {
407 | "version": "1.1.1",
408 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
409 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
410 | "dev": true
411 | },
412 | "node_modules/get-caller-file": {
413 | "version": "2.0.5",
414 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
415 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
416 | "dev": true,
417 | "engines": {
418 | "node": "6.* || 8.* || >= 10.*"
419 | }
420 | },
421 | "node_modules/get-func-name": {
422 | "version": "2.0.0",
423 | "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
424 | "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
425 | "dev": true,
426 | "engines": {
427 | "node": "*"
428 | }
429 | },
430 | "node_modules/glob": {
431 | "version": "7.1.3",
432 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
433 | "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
434 | "dev": true,
435 | "dependencies": {
436 | "fs.realpath": "^1.0.0",
437 | "inflight": "^1.0.4",
438 | "inherits": "2",
439 | "minimatch": "^3.0.4",
440 | "once": "^1.3.0",
441 | "path-is-absolute": "^1.0.0"
442 | },
443 | "engines": {
444 | "node": "*"
445 | }
446 | },
447 | "node_modules/growl": {
448 | "version": "1.10.5",
449 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
450 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
451 | "dev": true,
452 | "engines": {
453 | "node": ">=4.x"
454 | }
455 | },
456 | "node_modules/has": {
457 | "version": "1.0.3",
458 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
459 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
460 | "dev": true,
461 | "dependencies": {
462 | "function-bind": "^1.1.1"
463 | },
464 | "engines": {
465 | "node": ">= 0.4.0"
466 | }
467 | },
468 | "node_modules/has-flag": {
469 | "version": "3.0.0",
470 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
471 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
472 | "dev": true,
473 | "engines": {
474 | "node": ">=4"
475 | }
476 | },
477 | "node_modules/has-symbols": {
478 | "version": "1.0.1",
479 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
480 | "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
481 | "dev": true,
482 | "engines": {
483 | "node": ">= 0.4"
484 | },
485 | "funding": {
486 | "url": "https://github.com/sponsors/ljharb"
487 | }
488 | },
489 | "node_modules/he": {
490 | "version": "1.2.0",
491 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
492 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
493 | "dev": true,
494 | "bin": {
495 | "he": "bin/he"
496 | }
497 | },
498 | "node_modules/inflight": {
499 | "version": "1.0.6",
500 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
501 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
502 | "dev": true,
503 | "dependencies": {
504 | "once": "^1.3.0",
505 | "wrappy": "1"
506 | }
507 | },
508 | "node_modules/inherits": {
509 | "version": "2.0.4",
510 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
511 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
512 | "dev": true
513 | },
514 | "node_modules/is-buffer": {
515 | "version": "2.0.4",
516 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
517 | "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
518 | "dev": true,
519 | "engines": {
520 | "node": ">=4"
521 | }
522 | },
523 | "node_modules/is-callable": {
524 | "version": "1.1.4",
525 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
526 | "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
527 | "dev": true,
528 | "engines": {
529 | "node": ">= 0.4"
530 | }
531 | },
532 | "node_modules/is-date-object": {
533 | "version": "1.0.1",
534 | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
535 | "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
536 | "dev": true,
537 | "engines": {
538 | "node": ">= 0.4"
539 | }
540 | },
541 | "node_modules/is-fullwidth-code-point": {
542 | "version": "2.0.0",
543 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
544 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
545 | "dev": true,
546 | "engines": {
547 | "node": ">=4"
548 | }
549 | },
550 | "node_modules/is-regex": {
551 | "version": "1.0.5",
552 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz",
553 | "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==",
554 | "dev": true,
555 | "dependencies": {
556 | "has": "^1.0.3"
557 | },
558 | "engines": {
559 | "node": ">= 0.4"
560 | },
561 | "funding": {
562 | "url": "https://github.com/sponsors/ljharb"
563 | }
564 | },
565 | "node_modules/is-symbol": {
566 | "version": "1.0.3",
567 | "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
568 | "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
569 | "dev": true,
570 | "dependencies": {
571 | "has-symbols": "^1.0.1"
572 | },
573 | "engines": {
574 | "node": ">= 0.4"
575 | },
576 | "funding": {
577 | "url": "https://github.com/sponsors/ljharb"
578 | }
579 | },
580 | "node_modules/isexe": {
581 | "version": "2.0.0",
582 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
583 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
584 | "dev": true
585 | },
586 | "node_modules/js-yaml": {
587 | "version": "3.13.1",
588 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
589 | "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
590 | "dev": true,
591 | "dependencies": {
592 | "argparse": "^1.0.7",
593 | "esprima": "^4.0.0"
594 | },
595 | "bin": {
596 | "js-yaml": "bin/js-yaml.js"
597 | }
598 | },
599 | "node_modules/locate-path": {
600 | "version": "3.0.0",
601 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
602 | "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
603 | "dev": true,
604 | "dependencies": {
605 | "p-locate": "^3.0.0",
606 | "path-exists": "^3.0.0"
607 | },
608 | "engines": {
609 | "node": ">=6"
610 | }
611 | },
612 | "node_modules/lodash": {
613 | "version": "4.17.21",
614 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
615 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
616 | "dev": true
617 | },
618 | "node_modules/log-symbols": {
619 | "version": "2.2.0",
620 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
621 | "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
622 | "dev": true,
623 | "dependencies": {
624 | "chalk": "^2.0.1"
625 | },
626 | "engines": {
627 | "node": ">=4"
628 | }
629 | },
630 | "node_modules/minimatch": {
631 | "version": "3.0.4",
632 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
633 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
634 | "dev": true,
635 | "dependencies": {
636 | "brace-expansion": "^1.1.7"
637 | },
638 | "engines": {
639 | "node": "*"
640 | }
641 | },
642 | "node_modules/minimist": {
643 | "version": "1.2.6",
644 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
645 | "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
646 | "dev": true
647 | },
648 | "node_modules/mkdirp": {
649 | "version": "0.5.4",
650 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz",
651 | "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==",
652 | "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)",
653 | "dev": true,
654 | "dependencies": {
655 | "minimist": "^1.2.5"
656 | },
657 | "bin": {
658 | "mkdirp": "bin/cmd.js"
659 | }
660 | },
661 | "node_modules/mocha": {
662 | "version": "6.2.3",
663 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.3.tgz",
664 | "integrity": "sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==",
665 | "dev": true,
666 | "dependencies": {
667 | "ansi-colors": "3.2.3",
668 | "browser-stdout": "1.3.1",
669 | "debug": "3.2.6",
670 | "diff": "3.5.0",
671 | "escape-string-regexp": "1.0.5",
672 | "find-up": "3.0.0",
673 | "glob": "7.1.3",
674 | "growl": "1.10.5",
675 | "he": "1.2.0",
676 | "js-yaml": "3.13.1",
677 | "log-symbols": "2.2.0",
678 | "minimatch": "3.0.4",
679 | "mkdirp": "0.5.4",
680 | "ms": "2.1.1",
681 | "node-environment-flags": "1.0.5",
682 | "object.assign": "4.1.0",
683 | "strip-json-comments": "2.0.1",
684 | "supports-color": "6.0.0",
685 | "which": "1.3.1",
686 | "wide-align": "1.1.3",
687 | "yargs": "13.3.2",
688 | "yargs-parser": "13.1.2",
689 | "yargs-unparser": "1.6.0"
690 | },
691 | "bin": {
692 | "_mocha": "bin/_mocha",
693 | "mocha": "bin/mocha"
694 | },
695 | "engines": {
696 | "node": ">= 6.0.0"
697 | }
698 | },
699 | "node_modules/ms": {
700 | "version": "2.1.1",
701 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
702 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
703 | "dev": true
704 | },
705 | "node_modules/node-environment-flags": {
706 | "version": "1.0.5",
707 | "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz",
708 | "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==",
709 | "dev": true,
710 | "dependencies": {
711 | "object.getownpropertydescriptors": "^2.0.3",
712 | "semver": "^5.7.0"
713 | }
714 | },
715 | "node_modules/object-inspect": {
716 | "version": "1.7.0",
717 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
718 | "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==",
719 | "dev": true,
720 | "funding": {
721 | "url": "https://github.com/sponsors/ljharb"
722 | }
723 | },
724 | "node_modules/object-keys": {
725 | "version": "1.1.1",
726 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
727 | "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
728 | "dev": true,
729 | "engines": {
730 | "node": ">= 0.4"
731 | }
732 | },
733 | "node_modules/object.assign": {
734 | "version": "4.1.0",
735 | "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
736 | "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
737 | "dev": true,
738 | "dependencies": {
739 | "define-properties": "^1.1.2",
740 | "function-bind": "^1.1.1",
741 | "has-symbols": "^1.0.0",
742 | "object-keys": "^1.0.11"
743 | },
744 | "engines": {
745 | "node": ">= 0.4"
746 | }
747 | },
748 | "node_modules/object.getownpropertydescriptors": {
749 | "version": "2.1.0",
750 | "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz",
751 | "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==",
752 | "dev": true,
753 | "dependencies": {
754 | "define-properties": "^1.1.3",
755 | "es-abstract": "^1.17.0-next.1"
756 | },
757 | "engines": {
758 | "node": ">= 0.8"
759 | },
760 | "funding": {
761 | "url": "https://github.com/sponsors/ljharb"
762 | }
763 | },
764 | "node_modules/once": {
765 | "version": "1.4.0",
766 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
767 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
768 | "dev": true,
769 | "dependencies": {
770 | "wrappy": "1"
771 | }
772 | },
773 | "node_modules/p-limit": {
774 | "version": "2.2.1",
775 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
776 | "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==",
777 | "dev": true,
778 | "dependencies": {
779 | "p-try": "^2.0.0"
780 | },
781 | "engines": {
782 | "node": ">=6"
783 | }
784 | },
785 | "node_modules/p-locate": {
786 | "version": "3.0.0",
787 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
788 | "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
789 | "dev": true,
790 | "dependencies": {
791 | "p-limit": "^2.0.0"
792 | },
793 | "engines": {
794 | "node": ">=6"
795 | }
796 | },
797 | "node_modules/p-try": {
798 | "version": "2.2.0",
799 | "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
800 | "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
801 | "dev": true,
802 | "engines": {
803 | "node": ">=6"
804 | }
805 | },
806 | "node_modules/path-exists": {
807 | "version": "3.0.0",
808 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
809 | "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
810 | "dev": true,
811 | "engines": {
812 | "node": ">=4"
813 | }
814 | },
815 | "node_modules/path-is-absolute": {
816 | "version": "1.0.1",
817 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
818 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
819 | "dev": true,
820 | "engines": {
821 | "node": ">=0.10.0"
822 | }
823 | },
824 | "node_modules/pathval": {
825 | "version": "1.1.1",
826 | "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
827 | "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==",
828 | "dev": true,
829 | "engines": {
830 | "node": "*"
831 | }
832 | },
833 | "node_modules/promise": {
834 | "version": "8.0.3",
835 | "resolved": "https://registry.npmjs.org/promise/-/promise-8.0.3.tgz",
836 | "integrity": "sha512-HeRDUL1RJiLhyA0/grn+PTShlBAcLuh/1BJGtrvjwbvRDCTLLMEz9rOGCV+R3vHY4MixIuoMEd9Yq/XvsTPcjw==",
837 | "dependencies": {
838 | "asap": "~2.0.6"
839 | }
840 | },
841 | "node_modules/require-directory": {
842 | "version": "2.1.1",
843 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
844 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
845 | "dev": true,
846 | "engines": {
847 | "node": ">=0.10.0"
848 | }
849 | },
850 | "node_modules/require-main-filename": {
851 | "version": "2.0.0",
852 | "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
853 | "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
854 | "dev": true
855 | },
856 | "node_modules/semver": {
857 | "version": "5.7.1",
858 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
859 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
860 | "dev": true,
861 | "bin": {
862 | "semver": "bin/semver"
863 | }
864 | },
865 | "node_modules/set-blocking": {
866 | "version": "2.0.0",
867 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
868 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
869 | "dev": true
870 | },
871 | "node_modules/should": {
872 | "version": "13.2.3",
873 | "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz",
874 | "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==",
875 | "dev": true,
876 | "dependencies": {
877 | "should-equal": "^2.0.0",
878 | "should-format": "^3.0.3",
879 | "should-type": "^1.4.0",
880 | "should-type-adaptors": "^1.0.1",
881 | "should-util": "^1.0.0"
882 | }
883 | },
884 | "node_modules/should-equal": {
885 | "version": "2.0.0",
886 | "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz",
887 | "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==",
888 | "dev": true,
889 | "dependencies": {
890 | "should-type": "^1.4.0"
891 | }
892 | },
893 | "node_modules/should-format": {
894 | "version": "3.0.3",
895 | "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz",
896 | "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=",
897 | "dev": true,
898 | "dependencies": {
899 | "should-type": "^1.3.0",
900 | "should-type-adaptors": "^1.0.1"
901 | }
902 | },
903 | "node_modules/should-type": {
904 | "version": "1.4.0",
905 | "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz",
906 | "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=",
907 | "dev": true
908 | },
909 | "node_modules/should-type-adaptors": {
910 | "version": "1.1.0",
911 | "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz",
912 | "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==",
913 | "dev": true,
914 | "dependencies": {
915 | "should-type": "^1.3.0",
916 | "should-util": "^1.0.0"
917 | }
918 | },
919 | "node_modules/should-util": {
920 | "version": "1.0.1",
921 | "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz",
922 | "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==",
923 | "dev": true
924 | },
925 | "node_modules/sprintf-js": {
926 | "version": "1.0.3",
927 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
928 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
929 | "dev": true
930 | },
931 | "node_modules/string-width": {
932 | "version": "2.1.1",
933 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
934 | "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
935 | "dev": true,
936 | "dependencies": {
937 | "is-fullwidth-code-point": "^2.0.0",
938 | "strip-ansi": "^4.0.0"
939 | },
940 | "engines": {
941 | "node": ">=4"
942 | }
943 | },
944 | "node_modules/string.prototype.trimleft": {
945 | "version": "2.1.0",
946 | "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz",
947 | "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==",
948 | "dev": true,
949 | "dependencies": {
950 | "define-properties": "^1.1.3",
951 | "function-bind": "^1.1.1"
952 | },
953 | "engines": {
954 | "node": ">= 0.4"
955 | }
956 | },
957 | "node_modules/string.prototype.trimright": {
958 | "version": "2.1.0",
959 | "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz",
960 | "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==",
961 | "dev": true,
962 | "dependencies": {
963 | "define-properties": "^1.1.3",
964 | "function-bind": "^1.1.1"
965 | },
966 | "engines": {
967 | "node": ">= 0.4"
968 | }
969 | },
970 | "node_modules/strip-ansi": {
971 | "version": "4.0.0",
972 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
973 | "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
974 | "dev": true,
975 | "dependencies": {
976 | "ansi-regex": "^3.0.0"
977 | },
978 | "engines": {
979 | "node": ">=4"
980 | }
981 | },
982 | "node_modules/strip-json-comments": {
983 | "version": "2.0.1",
984 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
985 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
986 | "dev": true,
987 | "engines": {
988 | "node": ">=0.10.0"
989 | }
990 | },
991 | "node_modules/supports-color": {
992 | "version": "6.0.0",
993 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz",
994 | "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==",
995 | "dev": true,
996 | "dependencies": {
997 | "has-flag": "^3.0.0"
998 | },
999 | "engines": {
1000 | "node": ">=6"
1001 | }
1002 | },
1003 | "node_modules/type-detect": {
1004 | "version": "4.0.8",
1005 | "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
1006 | "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
1007 | "dev": true,
1008 | "engines": {
1009 | "node": ">=4"
1010 | }
1011 | },
1012 | "node_modules/which": {
1013 | "version": "1.3.1",
1014 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
1015 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
1016 | "dev": true,
1017 | "dependencies": {
1018 | "isexe": "^2.0.0"
1019 | },
1020 | "bin": {
1021 | "which": "bin/which"
1022 | }
1023 | },
1024 | "node_modules/which-module": {
1025 | "version": "2.0.0",
1026 | "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
1027 | "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
1028 | "dev": true
1029 | },
1030 | "node_modules/wide-align": {
1031 | "version": "1.1.3",
1032 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
1033 | "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
1034 | "dev": true,
1035 | "dependencies": {
1036 | "string-width": "^1.0.2 || 2"
1037 | }
1038 | },
1039 | "node_modules/wrap-ansi": {
1040 | "version": "5.1.0",
1041 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
1042 | "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
1043 | "dev": true,
1044 | "dependencies": {
1045 | "ansi-styles": "^3.2.0",
1046 | "string-width": "^3.0.0",
1047 | "strip-ansi": "^5.0.0"
1048 | },
1049 | "engines": {
1050 | "node": ">=6"
1051 | }
1052 | },
1053 | "node_modules/wrap-ansi/node_modules/ansi-regex": {
1054 | "version": "4.1.1",
1055 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
1056 | "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
1057 | "dev": true,
1058 | "engines": {
1059 | "node": ">=6"
1060 | }
1061 | },
1062 | "node_modules/wrap-ansi/node_modules/string-width": {
1063 | "version": "3.1.0",
1064 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
1065 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
1066 | "dev": true,
1067 | "dependencies": {
1068 | "emoji-regex": "^7.0.1",
1069 | "is-fullwidth-code-point": "^2.0.0",
1070 | "strip-ansi": "^5.1.0"
1071 | },
1072 | "engines": {
1073 | "node": ">=6"
1074 | }
1075 | },
1076 | "node_modules/wrap-ansi/node_modules/strip-ansi": {
1077 | "version": "5.2.0",
1078 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
1079 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
1080 | "dev": true,
1081 | "dependencies": {
1082 | "ansi-regex": "^4.1.0"
1083 | },
1084 | "engines": {
1085 | "node": ">=6"
1086 | }
1087 | },
1088 | "node_modules/wrappy": {
1089 | "version": "1.0.2",
1090 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
1091 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
1092 | "dev": true
1093 | },
1094 | "node_modules/y18n": {
1095 | "version": "4.0.3",
1096 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
1097 | "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
1098 | "dev": true
1099 | },
1100 | "node_modules/yargs": {
1101 | "version": "13.3.2",
1102 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
1103 | "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
1104 | "dev": true,
1105 | "dependencies": {
1106 | "cliui": "^5.0.0",
1107 | "find-up": "^3.0.0",
1108 | "get-caller-file": "^2.0.1",
1109 | "require-directory": "^2.1.1",
1110 | "require-main-filename": "^2.0.0",
1111 | "set-blocking": "^2.0.0",
1112 | "string-width": "^3.0.0",
1113 | "which-module": "^2.0.0",
1114 | "y18n": "^4.0.0",
1115 | "yargs-parser": "^13.1.2"
1116 | }
1117 | },
1118 | "node_modules/yargs-parser": {
1119 | "version": "13.1.2",
1120 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
1121 | "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
1122 | "dev": true,
1123 | "dependencies": {
1124 | "camelcase": "^5.0.0",
1125 | "decamelize": "^1.2.0"
1126 | }
1127 | },
1128 | "node_modules/yargs-unparser": {
1129 | "version": "1.6.0",
1130 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz",
1131 | "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==",
1132 | "dev": true,
1133 | "dependencies": {
1134 | "flat": "^4.1.0",
1135 | "lodash": "^4.17.15",
1136 | "yargs": "^13.3.0"
1137 | },
1138 | "engines": {
1139 | "node": ">=6"
1140 | }
1141 | },
1142 | "node_modules/yargs/node_modules/ansi-regex": {
1143 | "version": "4.1.1",
1144 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
1145 | "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
1146 | "dev": true,
1147 | "engines": {
1148 | "node": ">=6"
1149 | }
1150 | },
1151 | "node_modules/yargs/node_modules/string-width": {
1152 | "version": "3.1.0",
1153 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
1154 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
1155 | "dev": true,
1156 | "dependencies": {
1157 | "emoji-regex": "^7.0.1",
1158 | "is-fullwidth-code-point": "^2.0.0",
1159 | "strip-ansi": "^5.1.0"
1160 | },
1161 | "engines": {
1162 | "node": ">=6"
1163 | }
1164 | },
1165 | "node_modules/yargs/node_modules/strip-ansi": {
1166 | "version": "5.2.0",
1167 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
1168 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
1169 | "dev": true,
1170 | "dependencies": {
1171 | "ansi-regex": "^4.1.0"
1172 | },
1173 | "engines": {
1174 | "node": ">=6"
1175 | }
1176 | }
1177 | },
1178 | "dependencies": {
1179 | "@types/chai": {
1180 | "version": "4.3.3",
1181 | "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.3.tgz",
1182 | "integrity": "sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==",
1183 | "dev": true
1184 | },
1185 | "@types/mocha": {
1186 | "version": "5.2.7",
1187 | "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz",
1188 | "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==",
1189 | "dev": true
1190 | },
1191 | "ansi-colors": {
1192 | "version": "3.2.3",
1193 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
1194 | "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
1195 | "dev": true
1196 | },
1197 | "ansi-regex": {
1198 | "version": "3.0.1",
1199 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz",
1200 | "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==",
1201 | "dev": true
1202 | },
1203 | "ansi-styles": {
1204 | "version": "3.2.1",
1205 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
1206 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
1207 | "dev": true,
1208 | "requires": {
1209 | "color-convert": "^1.9.0"
1210 | }
1211 | },
1212 | "argparse": {
1213 | "version": "1.0.10",
1214 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
1215 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
1216 | "dev": true,
1217 | "requires": {
1218 | "sprintf-js": "~1.0.2"
1219 | }
1220 | },
1221 | "asap": {
1222 | "version": "2.0.6",
1223 | "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
1224 | "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
1225 | },
1226 | "assertion-error": {
1227 | "version": "1.1.0",
1228 | "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
1229 | "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
1230 | "dev": true
1231 | },
1232 | "balanced-match": {
1233 | "version": "1.0.0",
1234 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
1235 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
1236 | "dev": true
1237 | },
1238 | "brace-expansion": {
1239 | "version": "1.1.11",
1240 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
1241 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
1242 | "dev": true,
1243 | "requires": {
1244 | "balanced-match": "^1.0.0",
1245 | "concat-map": "0.0.1"
1246 | }
1247 | },
1248 | "browser-stdout": {
1249 | "version": "1.3.1",
1250 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
1251 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
1252 | "dev": true
1253 | },
1254 | "camelcase": {
1255 | "version": "5.3.1",
1256 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
1257 | "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
1258 | "dev": true
1259 | },
1260 | "chai": {
1261 | "version": "4.2.0",
1262 | "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz",
1263 | "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==",
1264 | "dev": true,
1265 | "requires": {
1266 | "assertion-error": "^1.1.0",
1267 | "check-error": "^1.0.2",
1268 | "deep-eql": "^3.0.1",
1269 | "get-func-name": "^2.0.0",
1270 | "pathval": "^1.1.0",
1271 | "type-detect": "^4.0.5"
1272 | }
1273 | },
1274 | "chai-as-promised": {
1275 | "version": "7.1.1",
1276 | "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz",
1277 | "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==",
1278 | "dev": true,
1279 | "requires": {
1280 | "check-error": "^1.0.2"
1281 | }
1282 | },
1283 | "chalk": {
1284 | "version": "2.4.2",
1285 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
1286 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
1287 | "dev": true,
1288 | "requires": {
1289 | "ansi-styles": "^3.2.1",
1290 | "escape-string-regexp": "^1.0.5",
1291 | "supports-color": "^5.3.0"
1292 | },
1293 | "dependencies": {
1294 | "supports-color": {
1295 | "version": "5.5.0",
1296 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
1297 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
1298 | "dev": true,
1299 | "requires": {
1300 | "has-flag": "^3.0.0"
1301 | }
1302 | }
1303 | }
1304 | },
1305 | "check-error": {
1306 | "version": "1.0.2",
1307 | "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
1308 | "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
1309 | "dev": true
1310 | },
1311 | "cliui": {
1312 | "version": "5.0.0",
1313 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
1314 | "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
1315 | "dev": true,
1316 | "requires": {
1317 | "string-width": "^3.1.0",
1318 | "strip-ansi": "^5.2.0",
1319 | "wrap-ansi": "^5.1.0"
1320 | },
1321 | "dependencies": {
1322 | "ansi-regex": {
1323 | "version": "4.1.1",
1324 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
1325 | "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
1326 | "dev": true
1327 | },
1328 | "string-width": {
1329 | "version": "3.1.0",
1330 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
1331 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
1332 | "dev": true,
1333 | "requires": {
1334 | "emoji-regex": "^7.0.1",
1335 | "is-fullwidth-code-point": "^2.0.0",
1336 | "strip-ansi": "^5.1.0"
1337 | }
1338 | },
1339 | "strip-ansi": {
1340 | "version": "5.2.0",
1341 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
1342 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
1343 | "dev": true,
1344 | "requires": {
1345 | "ansi-regex": "^4.1.0"
1346 | }
1347 | }
1348 | }
1349 | },
1350 | "color-convert": {
1351 | "version": "1.9.3",
1352 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
1353 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
1354 | "dev": true,
1355 | "requires": {
1356 | "color-name": "1.1.3"
1357 | }
1358 | },
1359 | "color-name": {
1360 | "version": "1.1.3",
1361 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
1362 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
1363 | "dev": true
1364 | },
1365 | "concat-map": {
1366 | "version": "0.0.1",
1367 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
1368 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
1369 | "dev": true
1370 | },
1371 | "debug": {
1372 | "version": "3.2.6",
1373 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
1374 | "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
1375 | "dev": true,
1376 | "requires": {
1377 | "ms": "^2.1.1"
1378 | }
1379 | },
1380 | "decamelize": {
1381 | "version": "1.2.0",
1382 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
1383 | "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
1384 | "dev": true
1385 | },
1386 | "deep-eql": {
1387 | "version": "3.0.1",
1388 | "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
1389 | "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==",
1390 | "dev": true,
1391 | "requires": {
1392 | "type-detect": "^4.0.0"
1393 | }
1394 | },
1395 | "define-properties": {
1396 | "version": "1.1.3",
1397 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
1398 | "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
1399 | "dev": true,
1400 | "requires": {
1401 | "object-keys": "^1.0.12"
1402 | }
1403 | },
1404 | "diff": {
1405 | "version": "3.5.0",
1406 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
1407 | "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
1408 | "dev": true
1409 | },
1410 | "emoji-regex": {
1411 | "version": "7.0.3",
1412 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
1413 | "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
1414 | "dev": true
1415 | },
1416 | "es-abstract": {
1417 | "version": "1.17.0-next.1",
1418 | "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.0-next.1.tgz",
1419 | "integrity": "sha512-7MmGr03N7Rnuid6+wyhD9sHNE2n4tFSwExnU2lQl3lIo2ShXWGePY80zYaoMOmILWv57H0amMjZGHNzzGG70Rw==",
1420 | "dev": true,
1421 | "requires": {
1422 | "es-to-primitive": "^1.2.1",
1423 | "function-bind": "^1.1.1",
1424 | "has": "^1.0.3",
1425 | "has-symbols": "^1.0.1",
1426 | "is-callable": "^1.1.4",
1427 | "is-regex": "^1.0.4",
1428 | "object-inspect": "^1.7.0",
1429 | "object-keys": "^1.1.1",
1430 | "object.assign": "^4.1.0",
1431 | "string.prototype.trimleft": "^2.1.0",
1432 | "string.prototype.trimright": "^2.1.0"
1433 | }
1434 | },
1435 | "es-to-primitive": {
1436 | "version": "1.2.1",
1437 | "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
1438 | "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
1439 | "dev": true,
1440 | "requires": {
1441 | "is-callable": "^1.1.4",
1442 | "is-date-object": "^1.0.1",
1443 | "is-symbol": "^1.0.2"
1444 | }
1445 | },
1446 | "escape-string-regexp": {
1447 | "version": "1.0.5",
1448 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
1449 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
1450 | "dev": true
1451 | },
1452 | "esprima": {
1453 | "version": "4.0.1",
1454 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
1455 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
1456 | "dev": true
1457 | },
1458 | "find-up": {
1459 | "version": "3.0.0",
1460 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
1461 | "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
1462 | "dev": true,
1463 | "requires": {
1464 | "locate-path": "^3.0.0"
1465 | }
1466 | },
1467 | "flat": {
1468 | "version": "4.1.0",
1469 | "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",
1470 | "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==",
1471 | "dev": true,
1472 | "requires": {
1473 | "is-buffer": "~2.0.3"
1474 | }
1475 | },
1476 | "fs.realpath": {
1477 | "version": "1.0.0",
1478 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
1479 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
1480 | "dev": true
1481 | },
1482 | "function-bind": {
1483 | "version": "1.1.1",
1484 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
1485 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
1486 | "dev": true
1487 | },
1488 | "get-caller-file": {
1489 | "version": "2.0.5",
1490 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
1491 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
1492 | "dev": true
1493 | },
1494 | "get-func-name": {
1495 | "version": "2.0.0",
1496 | "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
1497 | "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
1498 | "dev": true
1499 | },
1500 | "glob": {
1501 | "version": "7.1.3",
1502 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
1503 | "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
1504 | "dev": true,
1505 | "requires": {
1506 | "fs.realpath": "^1.0.0",
1507 | "inflight": "^1.0.4",
1508 | "inherits": "2",
1509 | "minimatch": "^3.0.4",
1510 | "once": "^1.3.0",
1511 | "path-is-absolute": "^1.0.0"
1512 | }
1513 | },
1514 | "growl": {
1515 | "version": "1.10.5",
1516 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
1517 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
1518 | "dev": true
1519 | },
1520 | "has": {
1521 | "version": "1.0.3",
1522 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
1523 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
1524 | "dev": true,
1525 | "requires": {
1526 | "function-bind": "^1.1.1"
1527 | }
1528 | },
1529 | "has-flag": {
1530 | "version": "3.0.0",
1531 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
1532 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
1533 | "dev": true
1534 | },
1535 | "has-symbols": {
1536 | "version": "1.0.1",
1537 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
1538 | "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
1539 | "dev": true
1540 | },
1541 | "he": {
1542 | "version": "1.2.0",
1543 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
1544 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
1545 | "dev": true
1546 | },
1547 | "inflight": {
1548 | "version": "1.0.6",
1549 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
1550 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
1551 | "dev": true,
1552 | "requires": {
1553 | "once": "^1.3.0",
1554 | "wrappy": "1"
1555 | }
1556 | },
1557 | "inherits": {
1558 | "version": "2.0.4",
1559 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
1560 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
1561 | "dev": true
1562 | },
1563 | "is-buffer": {
1564 | "version": "2.0.4",
1565 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
1566 | "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
1567 | "dev": true
1568 | },
1569 | "is-callable": {
1570 | "version": "1.1.4",
1571 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
1572 | "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
1573 | "dev": true
1574 | },
1575 | "is-date-object": {
1576 | "version": "1.0.1",
1577 | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
1578 | "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
1579 | "dev": true
1580 | },
1581 | "is-fullwidth-code-point": {
1582 | "version": "2.0.0",
1583 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
1584 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
1585 | "dev": true
1586 | },
1587 | "is-regex": {
1588 | "version": "1.0.5",
1589 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz",
1590 | "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==",
1591 | "dev": true,
1592 | "requires": {
1593 | "has": "^1.0.3"
1594 | }
1595 | },
1596 | "is-symbol": {
1597 | "version": "1.0.3",
1598 | "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
1599 | "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
1600 | "dev": true,
1601 | "requires": {
1602 | "has-symbols": "^1.0.1"
1603 | }
1604 | },
1605 | "isexe": {
1606 | "version": "2.0.0",
1607 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
1608 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
1609 | "dev": true
1610 | },
1611 | "js-yaml": {
1612 | "version": "3.13.1",
1613 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
1614 | "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
1615 | "dev": true,
1616 | "requires": {
1617 | "argparse": "^1.0.7",
1618 | "esprima": "^4.0.0"
1619 | }
1620 | },
1621 | "locate-path": {
1622 | "version": "3.0.0",
1623 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
1624 | "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
1625 | "dev": true,
1626 | "requires": {
1627 | "p-locate": "^3.0.0",
1628 | "path-exists": "^3.0.0"
1629 | }
1630 | },
1631 | "lodash": {
1632 | "version": "4.17.21",
1633 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
1634 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
1635 | "dev": true
1636 | },
1637 | "log-symbols": {
1638 | "version": "2.2.0",
1639 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
1640 | "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
1641 | "dev": true,
1642 | "requires": {
1643 | "chalk": "^2.0.1"
1644 | }
1645 | },
1646 | "minimatch": {
1647 | "version": "3.0.4",
1648 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
1649 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
1650 | "dev": true,
1651 | "requires": {
1652 | "brace-expansion": "^1.1.7"
1653 | }
1654 | },
1655 | "minimist": {
1656 | "version": "1.2.6",
1657 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
1658 | "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
1659 | "dev": true
1660 | },
1661 | "mkdirp": {
1662 | "version": "0.5.4",
1663 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz",
1664 | "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==",
1665 | "dev": true,
1666 | "requires": {
1667 | "minimist": "^1.2.5"
1668 | }
1669 | },
1670 | "mocha": {
1671 | "version": "6.2.3",
1672 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.3.tgz",
1673 | "integrity": "sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==",
1674 | "dev": true,
1675 | "requires": {
1676 | "ansi-colors": "3.2.3",
1677 | "browser-stdout": "1.3.1",
1678 | "debug": "3.2.6",
1679 | "diff": "3.5.0",
1680 | "escape-string-regexp": "1.0.5",
1681 | "find-up": "3.0.0",
1682 | "glob": "7.1.3",
1683 | "growl": "1.10.5",
1684 | "he": "1.2.0",
1685 | "js-yaml": "3.13.1",
1686 | "log-symbols": "2.2.0",
1687 | "minimatch": "3.0.4",
1688 | "mkdirp": "0.5.4",
1689 | "ms": "2.1.1",
1690 | "node-environment-flags": "1.0.5",
1691 | "object.assign": "4.1.0",
1692 | "strip-json-comments": "2.0.1",
1693 | "supports-color": "6.0.0",
1694 | "which": "1.3.1",
1695 | "wide-align": "1.1.3",
1696 | "yargs": "13.3.2",
1697 | "yargs-parser": "13.1.2",
1698 | "yargs-unparser": "1.6.0"
1699 | }
1700 | },
1701 | "ms": {
1702 | "version": "2.1.1",
1703 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
1704 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
1705 | "dev": true
1706 | },
1707 | "node-environment-flags": {
1708 | "version": "1.0.5",
1709 | "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz",
1710 | "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==",
1711 | "dev": true,
1712 | "requires": {
1713 | "object.getownpropertydescriptors": "^2.0.3",
1714 | "semver": "^5.7.0"
1715 | }
1716 | },
1717 | "object-inspect": {
1718 | "version": "1.7.0",
1719 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
1720 | "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==",
1721 | "dev": true
1722 | },
1723 | "object-keys": {
1724 | "version": "1.1.1",
1725 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
1726 | "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
1727 | "dev": true
1728 | },
1729 | "object.assign": {
1730 | "version": "4.1.0",
1731 | "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
1732 | "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
1733 | "dev": true,
1734 | "requires": {
1735 | "define-properties": "^1.1.2",
1736 | "function-bind": "^1.1.1",
1737 | "has-symbols": "^1.0.0",
1738 | "object-keys": "^1.0.11"
1739 | }
1740 | },
1741 | "object.getownpropertydescriptors": {
1742 | "version": "2.1.0",
1743 | "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz",
1744 | "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==",
1745 | "dev": true,
1746 | "requires": {
1747 | "define-properties": "^1.1.3",
1748 | "es-abstract": "^1.17.0-next.1"
1749 | }
1750 | },
1751 | "once": {
1752 | "version": "1.4.0",
1753 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
1754 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
1755 | "dev": true,
1756 | "requires": {
1757 | "wrappy": "1"
1758 | }
1759 | },
1760 | "p-limit": {
1761 | "version": "2.2.1",
1762 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
1763 | "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==",
1764 | "dev": true,
1765 | "requires": {
1766 | "p-try": "^2.0.0"
1767 | }
1768 | },
1769 | "p-locate": {
1770 | "version": "3.0.0",
1771 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
1772 | "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
1773 | "dev": true,
1774 | "requires": {
1775 | "p-limit": "^2.0.0"
1776 | }
1777 | },
1778 | "p-try": {
1779 | "version": "2.2.0",
1780 | "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
1781 | "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
1782 | "dev": true
1783 | },
1784 | "path-exists": {
1785 | "version": "3.0.0",
1786 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
1787 | "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
1788 | "dev": true
1789 | },
1790 | "path-is-absolute": {
1791 | "version": "1.0.1",
1792 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
1793 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
1794 | "dev": true
1795 | },
1796 | "pathval": {
1797 | "version": "1.1.1",
1798 | "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
1799 | "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==",
1800 | "dev": true
1801 | },
1802 | "promise": {
1803 | "version": "8.0.3",
1804 | "resolved": "https://registry.npmjs.org/promise/-/promise-8.0.3.tgz",
1805 | "integrity": "sha512-HeRDUL1RJiLhyA0/grn+PTShlBAcLuh/1BJGtrvjwbvRDCTLLMEz9rOGCV+R3vHY4MixIuoMEd9Yq/XvsTPcjw==",
1806 | "requires": {
1807 | "asap": "~2.0.6"
1808 | }
1809 | },
1810 | "require-directory": {
1811 | "version": "2.1.1",
1812 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
1813 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
1814 | "dev": true
1815 | },
1816 | "require-main-filename": {
1817 | "version": "2.0.0",
1818 | "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
1819 | "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
1820 | "dev": true
1821 | },
1822 | "semver": {
1823 | "version": "5.7.1",
1824 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
1825 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
1826 | "dev": true
1827 | },
1828 | "set-blocking": {
1829 | "version": "2.0.0",
1830 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
1831 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
1832 | "dev": true
1833 | },
1834 | "should": {
1835 | "version": "13.2.3",
1836 | "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz",
1837 | "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==",
1838 | "dev": true,
1839 | "requires": {
1840 | "should-equal": "^2.0.0",
1841 | "should-format": "^3.0.3",
1842 | "should-type": "^1.4.0",
1843 | "should-type-adaptors": "^1.0.1",
1844 | "should-util": "^1.0.0"
1845 | }
1846 | },
1847 | "should-equal": {
1848 | "version": "2.0.0",
1849 | "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz",
1850 | "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==",
1851 | "dev": true,
1852 | "requires": {
1853 | "should-type": "^1.4.0"
1854 | }
1855 | },
1856 | "should-format": {
1857 | "version": "3.0.3",
1858 | "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz",
1859 | "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=",
1860 | "dev": true,
1861 | "requires": {
1862 | "should-type": "^1.3.0",
1863 | "should-type-adaptors": "^1.0.1"
1864 | }
1865 | },
1866 | "should-type": {
1867 | "version": "1.4.0",
1868 | "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz",
1869 | "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=",
1870 | "dev": true
1871 | },
1872 | "should-type-adaptors": {
1873 | "version": "1.1.0",
1874 | "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz",
1875 | "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==",
1876 | "dev": true,
1877 | "requires": {
1878 | "should-type": "^1.3.0",
1879 | "should-util": "^1.0.0"
1880 | }
1881 | },
1882 | "should-util": {
1883 | "version": "1.0.1",
1884 | "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.1.tgz",
1885 | "integrity": "sha512-oXF8tfxx5cDk8r2kYqlkUJzZpDBqVY/II2WhvU0n9Y3XYvAYRmeaf1PvvIvTgPnv4KJ+ES5M0PyDq5Jp+Ygy2g==",
1886 | "dev": true
1887 | },
1888 | "sprintf-js": {
1889 | "version": "1.0.3",
1890 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
1891 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
1892 | "dev": true
1893 | },
1894 | "string-width": {
1895 | "version": "2.1.1",
1896 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
1897 | "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
1898 | "dev": true,
1899 | "requires": {
1900 | "is-fullwidth-code-point": "^2.0.0",
1901 | "strip-ansi": "^4.0.0"
1902 | }
1903 | },
1904 | "string.prototype.trimleft": {
1905 | "version": "2.1.0",
1906 | "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz",
1907 | "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==",
1908 | "dev": true,
1909 | "requires": {
1910 | "define-properties": "^1.1.3",
1911 | "function-bind": "^1.1.1"
1912 | }
1913 | },
1914 | "string.prototype.trimright": {
1915 | "version": "2.1.0",
1916 | "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz",
1917 | "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==",
1918 | "dev": true,
1919 | "requires": {
1920 | "define-properties": "^1.1.3",
1921 | "function-bind": "^1.1.1"
1922 | }
1923 | },
1924 | "strip-ansi": {
1925 | "version": "4.0.0",
1926 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
1927 | "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
1928 | "dev": true,
1929 | "requires": {
1930 | "ansi-regex": "^3.0.0"
1931 | }
1932 | },
1933 | "strip-json-comments": {
1934 | "version": "2.0.1",
1935 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
1936 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
1937 | "dev": true
1938 | },
1939 | "supports-color": {
1940 | "version": "6.0.0",
1941 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz",
1942 | "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==",
1943 | "dev": true,
1944 | "requires": {
1945 | "has-flag": "^3.0.0"
1946 | }
1947 | },
1948 | "type-detect": {
1949 | "version": "4.0.8",
1950 | "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
1951 | "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
1952 | "dev": true
1953 | },
1954 | "which": {
1955 | "version": "1.3.1",
1956 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
1957 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
1958 | "dev": true,
1959 | "requires": {
1960 | "isexe": "^2.0.0"
1961 | }
1962 | },
1963 | "which-module": {
1964 | "version": "2.0.0",
1965 | "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
1966 | "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
1967 | "dev": true
1968 | },
1969 | "wide-align": {
1970 | "version": "1.1.3",
1971 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
1972 | "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
1973 | "dev": true,
1974 | "requires": {
1975 | "string-width": "^1.0.2 || 2"
1976 | }
1977 | },
1978 | "wrap-ansi": {
1979 | "version": "5.1.0",
1980 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
1981 | "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
1982 | "dev": true,
1983 | "requires": {
1984 | "ansi-styles": "^3.2.0",
1985 | "string-width": "^3.0.0",
1986 | "strip-ansi": "^5.0.0"
1987 | },
1988 | "dependencies": {
1989 | "ansi-regex": {
1990 | "version": "4.1.1",
1991 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
1992 | "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
1993 | "dev": true
1994 | },
1995 | "string-width": {
1996 | "version": "3.1.0",
1997 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
1998 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
1999 | "dev": true,
2000 | "requires": {
2001 | "emoji-regex": "^7.0.1",
2002 | "is-fullwidth-code-point": "^2.0.0",
2003 | "strip-ansi": "^5.1.0"
2004 | }
2005 | },
2006 | "strip-ansi": {
2007 | "version": "5.2.0",
2008 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
2009 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
2010 | "dev": true,
2011 | "requires": {
2012 | "ansi-regex": "^4.1.0"
2013 | }
2014 | }
2015 | }
2016 | },
2017 | "wrappy": {
2018 | "version": "1.0.2",
2019 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
2020 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
2021 | "dev": true
2022 | },
2023 | "y18n": {
2024 | "version": "4.0.3",
2025 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
2026 | "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
2027 | "dev": true
2028 | },
2029 | "yargs": {
2030 | "version": "13.3.2",
2031 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
2032 | "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
2033 | "dev": true,
2034 | "requires": {
2035 | "cliui": "^5.0.0",
2036 | "find-up": "^3.0.0",
2037 | "get-caller-file": "^2.0.1",
2038 | "require-directory": "^2.1.1",
2039 | "require-main-filename": "^2.0.0",
2040 | "set-blocking": "^2.0.0",
2041 | "string-width": "^3.0.0",
2042 | "which-module": "^2.0.0",
2043 | "y18n": "^4.0.0",
2044 | "yargs-parser": "^13.1.2"
2045 | },
2046 | "dependencies": {
2047 | "ansi-regex": {
2048 | "version": "4.1.1",
2049 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz",
2050 | "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==",
2051 | "dev": true
2052 | },
2053 | "string-width": {
2054 | "version": "3.1.0",
2055 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
2056 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
2057 | "dev": true,
2058 | "requires": {
2059 | "emoji-regex": "^7.0.1",
2060 | "is-fullwidth-code-point": "^2.0.0",
2061 | "strip-ansi": "^5.1.0"
2062 | }
2063 | },
2064 | "strip-ansi": {
2065 | "version": "5.2.0",
2066 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
2067 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
2068 | "dev": true,
2069 | "requires": {
2070 | "ansi-regex": "^4.1.0"
2071 | }
2072 | }
2073 | }
2074 | },
2075 | "yargs-parser": {
2076 | "version": "13.1.2",
2077 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
2078 | "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
2079 | "dev": true,
2080 | "requires": {
2081 | "camelcase": "^5.0.0",
2082 | "decamelize": "^1.2.0"
2083 | }
2084 | },
2085 | "yargs-unparser": {
2086 | "version": "1.6.0",
2087 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz",
2088 | "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==",
2089 | "dev": true,
2090 | "requires": {
2091 | "flat": "^4.1.0",
2092 | "lodash": "^4.17.15",
2093 | "yargs": "^13.3.0"
2094 | }
2095 | }
2096 | }
2097 | }
2098 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@fusionauth/node-client",
3 | "version": "1.51.0",
4 | "description": "FusionAuth Client written in Node.js",
5 | "private": false,
6 | "contributors": [
7 | {
8 | "name": "Daniel DeGroff",
9 | "email": "daniel@fusionauth.io"
10 | },
11 | {
12 | "name": "Brian Pontarelli",
13 | "email": "brian@fusionauth.io"
14 | }
15 | ],
16 | "bugs": {
17 | "url": "https://github.com/FusionAuth/fusionauth-node-client/issues"
18 | },
19 | "repository": {
20 | "type": "git",
21 | "url": "https://github.com/FusionAuth/fusionauth-node-client"
22 | },
23 | "engines": {
24 | "node": ">= 0.10.0"
25 | },
26 | "files": [
27 | "lib",
28 | "LICENSE",
29 | "README.md"
30 | ],
31 | "main": "index.js",
32 | "jshintConfig": {
33 | "node": true,
34 | "esversion": 6,
35 | "strict": false
36 | },
37 | "scripts": {
38 | "test": "mocha"
39 | },
40 | "devDependencies": {
41 | "@types/chai": "^4.2.7",
42 | "@types/mocha": "^5.2.7",
43 | "chai": "^4.2.0",
44 | "chai-as-promised": "^7.1.1",
45 | "mocha": "^6.2.2",
46 | "should": "^13.2.3"
47 | },
48 | "author": "Brian Pontarelli",
49 | "license": "Apache-2.0",
50 | "dependencies": {
51 | "promise": "^8.0.3"
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/test/FusionAuthClientTest.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018-2019, FusionAuth, All Rights Reserved
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing,
11 | * software distributed under the License is distributed on an
12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | * either express or implied. See the License for the specific
14 | * language governing permissions and limitations under the License.
15 | */
16 |
17 | /* jshint mocha: true */
18 |
19 | 'use strict';
20 |
21 | const fusionauth = require('../index');
22 | const FusionAuthClient = fusionauth.FusionAuthClient;
23 | const chai = require("chai");
24 |
25 | const tenantId = '65323339-6137-6531-3135-316238623265';
26 | let client;
27 |
28 | describe('#FusionAuthClient()', function() {
29 |
30 | beforeEach(async () => {
31 | const fusionauthUrl = process.env.FUSIONAUTH_URL || "https://local.fusionauth.io";
32 | const fusionauthApiKey = process.env.FUSIONAUTH_API_KEY || "bf69486b-4733-4470-a592-f1bfce7af580";
33 | client = new FusionAuthClient(fusionauthApiKey, fusionauthUrl);
34 | let response = await client.retrieveTenants();
35 |
36 | let desiredTenant = response.successResponse.tenants.find((tenant) => {
37 | return tenant.id === tenantId
38 | });
39 |
40 | if (!desiredTenant) {
41 | let defaultTenant = response.successResponse.tenants.find((tenant) => {
42 | return tenant.name === "Default"
43 | });
44 | defaultTenant.id = null;
45 | defaultTenant.name = "NodeJS Tenant";
46 | response = await client.createTenant(tenantId, {tenant: defaultTenant});
47 | chai.assert.isTrue(response.wasSuccessful(), "Failed to create the tenant");
48 | }
49 |
50 | // All future requests will use this now
51 | client.setTenantId(tenantId);
52 |
53 | try {
54 | await client.deleteApplication('e5e2b0b3-c329-4b08-896c-d4f9f612b5c0');
55 | } catch (ignore) {
56 | }
57 |
58 | // Cleanup the user (just in case a test partially failed)
59 | try {
60 | response = await client.retrieveUserByEmail("nodejs@fusionauth.io")
61 | if (response.wasSuccessful()) {
62 | await client.deleteUser(response.successResponse.user.id)
63 | }
64 | } catch (ignore) {
65 | }
66 |
67 | /** @type {ApplicationRequest} */
68 | const applicationRequest = {application: {name: 'Node.js FusionAuth Client'}};
69 | response = await client.createApplication('e5e2b0b3-c329-4b08-896c-d4f9f612b5c0', applicationRequest);
70 |
71 | chai.assert.strictEqual(response.statusCode, 200, "Failed to create the application");
72 | chai.assert.isNotNull(response.successResponse);
73 | });
74 |
75 | it('retrieveTenantTest', async () => {
76 | let response = await client.retrieveTenant(tenantId);
77 | chai.assert.isTrue(response.wasSuccessful());
78 | });
79 |
80 | it('Create and Delete a User', () => {
81 | return client.createUser(null, {
82 | 'user': {
83 | 'email': 'nodejs@fusionauth.io',
84 | 'firstName': 'Jäne',
85 | 'password': 'password'
86 | },
87 | 'skipVerification': true
88 | })
89 | .then((clientResponse) => {
90 | chai.assert.strictEqual(clientResponse.statusCode, 200);
91 | chai.assert.isNotNull(clientResponse.successResponse);
92 | chai.expect(clientResponse.successResponse).to.have.property('user');
93 | chai.expect(clientResponse.successResponse.user).to.have.property('id');
94 | return client.deleteUser(clientResponse.successResponse.user.id);
95 | })
96 | .then((clientResponse) => {
97 | chai.assert.strictEqual(clientResponse.statusCode, 200);
98 | chai.assert.isNull(clientResponse.successResponse);
99 | return client.retrieveUserByEmail('nodejs@fusionauth.io');
100 | })
101 | .catch((clientResponse) => {
102 | if (clientResponse.statusCode === 400) {
103 | console.error(JSON.stringify(clientResponse.errorResponse, null, 2));
104 | }
105 |
106 | chai.assert.strictEqual(clientResponse.statusCode, 404);
107 | });
108 | });
109 |
110 | it('Patch a User', () => {
111 | return client.createUser(null, {
112 | 'user': {
113 | 'email': 'nodejs@fusionauth.io',
114 | 'firstName': 'Jäne',
115 | 'password': 'password'
116 | },
117 | 'skipVerification': true
118 | })
119 | .then((clientResponse) => {
120 | chai.assert.strictEqual(clientResponse.statusCode, 200);
121 | chai.assert.isNotNull(clientResponse.successResponse);
122 | chai.expect(clientResponse.successResponse).to.have.property('user');
123 | chai.expect(clientResponse.successResponse.user).to.have.property('id');
124 |
125 | return client.patchUser(clientResponse.successResponse.user.id, {user: {
126 | firstName: "Jan"
127 | }}).then((clientResponse) => {
128 | chai.assert.strictEqual(clientResponse.statusCode, 200);
129 | chai.assert.isNotNull(clientResponse.successResponse);
130 | chai.expect(clientResponse.successResponse).to.have.property('user');
131 | chai.expect(clientResponse.successResponse.user).to.have.property('id');
132 | chai.expect(clientResponse.successResponse.user.firstName).to.equal("Jan");
133 | });
134 | });
135 | });
136 |
137 | });
--------------------------------------------------------------------------------
/test/JWTManagerTest.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, FusionAuth, All Rights Reserved
3 | */
4 |
5 | /* jshint mocha: true */
6 |
7 | 'use strict';
8 |
9 | const fusionauth = require('../index');
10 | const chai = require('chai');
11 |
12 | describe('#JWTManager()', function() {
13 | it('Simple revoke and isValid', () => {
14 | fusionauth.JWTManager.revoke('759e9db6-39a6-4089-9861-48813118a853', 600);
15 | chai.assert.isTrue(fusionauth.JWTManager.isValid({
16 | 'sub': '759e9db6-39a6-4089-9861-48813118a853',
17 | 'exp': Date.now()
18 | }));
19 | chai.assert.isTrue(fusionauth.JWTManager.isValid({
20 | 'sub': '00000000-0000-0000-0000-000000000001',
21 | 'exp': Date.now()
22 | }));
23 | });
24 | });
--------------------------------------------------------------------------------
/test/RESTClientTest.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018, FusionAuth, All Rights Reserved
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing,
11 | * software distributed under the License is distributed on an
12 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13 | * either express or implied. See the License for the specific
14 | * language governing permissions and limitations under the License.
15 | */
16 |
17 | /* jshint mocha: true */
18 |
19 | 'use strict';
20 |
21 | const fusionauth = require('../index');
22 | const RESTClient = fusionauth.RESTClient;
23 | const chai = require('chai');
24 | let client;
25 |
26 | describe('#RESTClient()', function() {
27 | it('Basic Authorization is Base64 Encoded', () => {
28 | client = new RESTClient().basicAuthorization('user', 'secret');
29 | chai.assert.equal(client.headers.Authorization, 'Basic dXNlcjpzZWNyZXQ=', client.headers.Authorization);
30 | });
31 | });
--------------------------------------------------------------------------------