提交 f759aed9 编写于 作者: 雪洛's avatar 雪洛

feat: init project

上级 ad23509e
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
\ No newline at end of file
module.exports = {
"extends": "standard",
"globals": {
"uniCloud": true,
"__ctx__": true
},
"rules": {
"no-throw-literal": 0
}
};
node_modules
dist
yarn-error.log
\ No newline at end of file
build/
dev-script/
ext/
node_modules/
src/
.eslintrc.js
.gitignore
yarn.lock
\ No newline at end of file
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
文档已移至:[uni-id](https://uniapp.dcloud.net.cn/uniCloud/uni-id-common.html)
\ No newline at end of file
const { builtinModules } = require('module')
const { terser } = require('rollup-plugin-terser')
const resolve = require('@rollup/plugin-node-resolve')
const commonjs = require('@rollup/plugin-commonjs')
const json = require('@rollup/plugin-json')
const plugins = [resolve(), commonjs({
ignore: ['uni-config-center'],
include: ['node_modules/**']
}), json()]
if (process.env.NODE_ENV === 'production') {
plugins.push(
terser({
output: {
comments: false
}
})
)
}
module.exports = function (moduleName) {
return {
input: 'src/index.js',
output: {
file: 'dist/index.js',
format: 'commonjs'
},
plugins,
external: [
'uni-config-center',
...builtinModules
]
}
}
{
"passwordSecret": "passwordSecret-demo",
"tokenSecret": "tokenSecret-demo",
"tokenExpiresIn": 7200,
"tokenExpiresThreshold": 600,
"autoSetInviteCode": false,
"forceInviteCode": false,
"app": {
"tokenExpiresIn": 2592000,
"oauth" : {
"weixin" : {
"appid" : "weixin appid",
"appsecret" : "weixin appsecret"
},
"apple": {
"bundleId": "your APP bundleId"
}
}
},
"mp-weixin": {
"oauth" : {
"weixin" : {
"appid" : "weixin appid",
"appsecret" : "weixin appsecret"
}
}
},
"mp-alipay": {
"oauth" : {
"alipay" : {
"appid" : "alipay appid",
"privateKey" : "alipay privateKey"
}
}
},
"service": {
"sms": {
"name": "DCloud",
"codeExpiresIn": 300,
"smsKey": "your sms key",
"smsSecret": "your sms secret"
},
"univerify": {
"appid":"your appid",
"apiKey": "your apiKey",
"apiSecret": "your apiSecret"
}
}
}
{
"name": "@dcloudio/uni-id-common",
"version": "1.0.0",
"description": "uni-id token生成、校验、刷新",
"main": "dist/index.js",
"homepage": "https://uniapp.dcloud.io/uniCloud/uni-id-common.html",
"repository": {
"type": "git",
"url": "git+https://gitee.com/dcloud/uni-id-common.git"
},
"scripts": {
"lint": "eslint --fix src build",
"build": "npm run lint && rollup -c build/rollup.config.js --environment NODE_ENV:production && node script/sync-package.js",
"dev": "rollup -c build/rollup.config.js --environment NODE_ENV:development"
},
"author": "DCloud",
"license": "Apache-2.0",
"devDependencies": {
"@rollup/plugin-commonjs": "^11.1.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^7.1.3",
"eslint": "^6.8.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"husky": "^8.0.1",
"rollup": "^1.28.0",
"rollup-plugin-terser": "^5.1.3"
},
"husky": {
"hooks": {
"pre-commit": "npm run lint",
"commit-msg": "node script/check-commit-msg.js"
}
}
}
lockfileVersion: 5.3
specifiers:
'@rollup/plugin-commonjs': ^11.1.0
'@rollup/plugin-json': ^4.1.0
'@rollup/plugin-node-resolve': ^7.1.3
eslint: ^6.8.0
eslint-config-standard: ^14.1.0
eslint-plugin-import: ^2.19.1
eslint-plugin-node: ^11.0.0
eslint-plugin-promise: ^4.2.1
eslint-plugin-standard: ^4.0.1
husky: ^8.0.1
rollup: ^1.28.0
rollup-plugin-terser: ^5.1.3
devDependencies:
'@rollup/plugin-commonjs': 11.1.0_rollup@1.32.1
'@rollup/plugin-json': 4.1.0_rollup@1.32.1
'@rollup/plugin-node-resolve': 7.1.3_rollup@1.32.1
eslint: 6.8.0
eslint-config-standard: 14.1.1_28ad67732575371b4dec8ffb1fba17dc
eslint-plugin-import: 2.25.3_eslint@6.8.0
eslint-plugin-node: 11.1.0_eslint@6.8.0
eslint-plugin-promise: 4.3.1
eslint-plugin-standard: 4.1.0_eslint@6.8.0
husky: 8.0.1
rollup: 1.32.1
rollup-plugin-terser: 5.3.1_rollup@1.32.1
packages:
/@babel/code-frame/7.16.0:
resolution: {integrity: sha1-DfyAMJvuyEEeZecGRhxAiwu5tDE=, tarball: '@babel/code-frame/download/@babel/code-frame-7.16.0.tgz'}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/highlight': 7.16.0
dev: true
/@babel/helper-validator-identifier/7.15.7:
resolution: {integrity: sha1-Ig35k7/pBKSmsCq08zhaXr9uI4k=, tarball: '@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.15.7.tgz'}
engines: {node: '>=6.9.0'}
dev: true
/@babel/highlight/7.16.0:
resolution: {integrity: sha1-bOsysspLj182H7f9gh4/3fShclo=, tarball: '@babel/highlight/download/@babel/highlight-7.16.0.tgz'}
engines: {node: '>=6.9.0'}
dependencies:
'@babel/helper-validator-identifier': 7.15.7
chalk: 2.4.2
js-tokens: 4.0.0
dev: true
/@rollup/plugin-commonjs/11.1.0_rollup@1.32.1:
resolution: {integrity: sha1-YGNsenIvVLQeQZ4XCd8FxyNFV+8=, tarball: '@rollup/plugin-commonjs/download/@rollup/plugin-commonjs-11.1.0.tgz'}
engines: {node: '>= 8.0.0'}
peerDependencies:
rollup: ^1.20.0||^2.0.0
dependencies:
'@rollup/pluginutils': 3.1.0_rollup@1.32.1
commondir: 1.0.1
estree-walker: 1.0.1
glob: 7.2.0
is-reference: 1.2.1
magic-string: 0.25.7
resolve: 1.20.0
rollup: 1.32.1
dev: true
/@rollup/plugin-json/4.1.0_rollup@1.32.1:
resolution: {integrity: sha1-VOCYZ65pY8WThE2L16nHGClElvM=, tarball: '@rollup/plugin-json/download/@rollup/plugin-json-4.1.0.tgz'}
peerDependencies:
rollup: ^1.20.0 || ^2.0.0
dependencies:
'@rollup/pluginutils': 3.1.0_rollup@1.32.1
rollup: 1.32.1
dev: true
/@rollup/plugin-node-resolve/7.1.3_rollup@1.32.1:
resolution: {integrity: sha1-gN44Tt+9e/yRARZJEPhgeBUaPso=, tarball: '@rollup/plugin-node-resolve/download/@rollup/plugin-node-resolve-7.1.3.tgz'}
engines: {node: '>= 8.0.0'}
peerDependencies:
rollup: ^1.20.0||^2.0.0
dependencies:
'@rollup/pluginutils': 3.1.0_rollup@1.32.1
'@types/resolve': 0.0.8
builtin-modules: 3.2.0
is-module: 1.0.0
resolve: 1.20.0
rollup: 1.32.1
dev: true
/@rollup/pluginutils/3.1.0_rollup@1.32.1:
resolution: {integrity: sha1-cGtFJO5tyLEDs8mVUz5a1oDAK5s=, tarball: '@rollup/pluginutils/download/@rollup/pluginutils-3.1.0.tgz'}
engines: {node: '>= 8.0.0'}
peerDependencies:
rollup: ^1.20.0||^2.0.0
dependencies:
'@types/estree': 0.0.39
estree-walker: 1.0.1
picomatch: 2.3.0
rollup: 1.32.1
dev: true
/@types/estree/0.0.39:
resolution: {integrity: sha1-4Xfmme4bjCLSMXTKqnQiZEOJUJ8=, tarball: '@types/estree/download/@types/estree-0.0.39.tgz?cache=0&sync_timestamp=1637427581215&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Festree%2Fdownload%2F%40types%2Festree-0.0.39.tgz'}
dev: true
/@types/estree/0.0.50:
resolution: {integrity: sha1-Hgyqk2TT/M0pMcPtlv2+ql1MyoM=, tarball: '@types/estree/download/@types/estree-0.0.50.tgz?cache=0&sync_timestamp=1637289485227&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2F%40types%2Festree%2Fdownload%2F%40types%2Festree-0.0.50.tgz'}
dev: true
/@types/json5/0.0.29:
resolution: {integrity: sha1-7ihweulOEdK4J7y+UnC86n8+ce4=, tarball: '@types/json5/download/@types/json5-0.0.29.tgz'}
dev: true
/@types/node/16.11.12:
resolution: {integrity: sha512-+2Iggwg7PxoO5Kyhvsq9VarmPbIelXP070HMImEpbtGCoyWNINQj4wzjbQCXzdHTRXnqufutJb5KAURZANNBAw==, tarball: '@types/node/download/@types/node-16.11.12.tgz'}
dev: true
/@types/resolve/0.0.8:
resolution: {integrity: sha1-8mB00jjgJlnjI84aE9BB7uKA4ZQ=, tarball: '@types/resolve/download/@types/resolve-0.0.8.tgz'}
dependencies:
'@types/node': 16.11.12
dev: true
/acorn-jsx/5.3.2_acorn@7.4.1:
resolution: {integrity: sha1-ftW7VZCLOy8bxVxq8WU7rafweTc=, tarball: acorn-jsx/download/acorn-jsx-5.3.2.tgz}
peerDependencies:
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
acorn: 7.4.1
dev: true
/acorn/7.4.1:
resolution: {integrity: sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=, tarball: acorn/download/acorn-7.4.1.tgz?cache=0&sync_timestamp=1637227483978&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Facorn%2Fdownload%2Facorn-7.4.1.tgz}
engines: {node: '>=0.4.0'}
hasBin: true
dev: true
/ajv/6.12.6:
resolution: {integrity: sha1-uvWmLoArB9l3A0WG+MO69a3ybfQ=, tarball: ajv/download/ajv-6.12.6.tgz?cache=0&sync_timestamp=1637550063265&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fajv%2Fdownload%2Fajv-6.12.6.tgz}
dependencies:
fast-deep-equal: 3.1.3
fast-json-stable-stringify: 2.1.0
json-schema-traverse: 0.4.1
uri-js: 4.4.1
dev: true
/ansi-escapes/4.3.2:
resolution: {integrity: sha1-ayKR0dt9mLZSHV8e+kLQ86n+tl4=, tarball: ansi-escapes/download/ansi-escapes-4.3.2.tgz}
engines: {node: '>=8'}
dependencies:
type-fest: 0.21.3
dev: true
/ansi-regex/4.1.0:
resolution: {integrity: sha1-i5+PCM8ay4Q3Vqg5yox+MWjFGZc=, tarball: ansi-regex/download/ansi-regex-4.1.0.tgz}
engines: {node: '>=6'}
dev: true
/ansi-regex/5.0.1:
resolution: {integrity: sha1-CCyyyJyf6GWaMRpTvWpNxTAdswQ=, tarball: ansi-regex/download/ansi-regex-5.0.1.tgz}
engines: {node: '>=8'}
dev: true
/ansi-styles/3.2.1:
resolution: {integrity: sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=, tarball: ansi-styles/download/ansi-styles-3.2.1.tgz}
engines: {node: '>=4'}
dependencies:
color-convert: 1.9.3
dev: true
/ansi-styles/4.3.0:
resolution: {integrity: sha1-7dgDYornHATIWuegkG7a00tkiTc=, tarball: ansi-styles/download/ansi-styles-4.3.0.tgz}
engines: {node: '>=8'}
dependencies:
color-convert: 2.0.1
dev: true
/argparse/1.0.10:
resolution: {integrity: sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=, tarball: argparse/download/argparse-1.0.10.tgz}
dependencies:
sprintf-js: 1.0.3
dev: true
/array-includes/3.1.4:
resolution: {integrity: sha1-9bSTFix2DzU5Yx8AW6K7Rqy0W6k=, tarball: array-includes/download/array-includes-3.1.4.tgz}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
define-properties: 1.1.3
es-abstract: 1.19.1
get-intrinsic: 1.1.1
is-string: 1.0.7
dev: true
/array.prototype.flat/1.2.5:
resolution: {integrity: sha1-B+CXXYS7x8SM0YedYJ5oJZjTPhM=, tarball: array.prototype.flat/download/array.prototype.flat-1.2.5.tgz}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
define-properties: 1.1.3
es-abstract: 1.19.1
dev: true
/astral-regex/1.0.0:
resolution: {integrity: sha1-bIw/uCfdQ+45GPJ7gngqt2WKb9k=, tarball: astral-regex/download/astral-regex-1.0.0.tgz}
engines: {node: '>=4'}
dev: true
/balanced-match/1.0.2:
resolution: {integrity: sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=, tarball: balanced-match/download/balanced-match-1.0.2.tgz}
dev: true
/brace-expansion/1.1.11:
resolution: {integrity: sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=, tarball: brace-expansion/download/brace-expansion-1.1.11.tgz}
dependencies:
balanced-match: 1.0.2
concat-map: 0.0.1
dev: true
/buffer-from/1.1.2:
resolution: {integrity: sha1-KxRqb9cugLT1XSVfNe1Zo6mkG9U=, tarball: buffer-from/download/buffer-from-1.1.2.tgz}
dev: true
/builtin-modules/3.2.0:
resolution: {integrity: sha1-RdXbmefuXmvE82LgCL+RerUEmIc=, tarball: builtin-modules/download/builtin-modules-3.2.0.tgz}
engines: {node: '>=6'}
dev: true
/call-bind/1.0.2:
resolution: {integrity: sha1-sdTonmiBGcPJqQOtMKuy9qkZvjw=, tarball: call-bind/download/call-bind-1.0.2.tgz}
dependencies:
function-bind: 1.1.1
get-intrinsic: 1.1.1
dev: true
/callsites/3.1.0:
resolution: {integrity: sha1-s2MKvYlDQy9Us/BRkjjjPNffL3M=, tarball: callsites/download/callsites-3.1.0.tgz}
engines: {node: '>=6'}
dev: true
/chalk/2.4.2:
resolution: {integrity: sha1-zUJUFnelQzPPVBpJEIwUMrRMlCQ=, tarball: chalk/download/chalk-2.4.2.tgz}
engines: {node: '>=4'}
dependencies:
ansi-styles: 3.2.1
escape-string-regexp: 1.0.5
supports-color: 5.5.0
dev: true
/chalk/4.1.2:
resolution: {integrity: sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=, tarball: chalk/download/chalk-4.1.2.tgz}
engines: {node: '>=10'}
dependencies:
ansi-styles: 4.3.0
supports-color: 7.2.0
dev: true
/chardet/0.7.0:
resolution: {integrity: sha1-kAlISfCTfy7twkJdDSip5fDLrZ4=, tarball: chardet/download/chardet-0.7.0.tgz}
dev: true
/cli-cursor/3.1.0:
resolution: {integrity: sha1-JkMFp65JDR0Dvwybp8kl0XU68wc=, tarball: cli-cursor/download/cli-cursor-3.1.0.tgz}
engines: {node: '>=8'}
dependencies:
restore-cursor: 3.1.0
dev: true
/cli-width/3.0.0:
resolution: {integrity: sha1-ovSEN6LKqaIkNueUvwceyeYc7fY=, tarball: cli-width/download/cli-width-3.0.0.tgz}
engines: {node: '>= 10'}
dev: true
/color-convert/1.9.3:
resolution: {integrity: sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=, tarball: color-convert/download/color-convert-1.9.3.tgz}
dependencies:
color-name: 1.1.3
dev: true
/color-convert/2.0.1:
resolution: {integrity: sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=, tarball: color-convert/download/color-convert-2.0.1.tgz}
engines: {node: '>=7.0.0'}
dependencies:
color-name: 1.1.4
dev: true
/color-name/1.1.3:
resolution: {integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=, tarball: color-name/download/color-name-1.1.3.tgz}
dev: true
/color-name/1.1.4:
resolution: {integrity: sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=, tarball: color-name/download/color-name-1.1.4.tgz}
dev: true
/commander/2.20.3:
resolution: {integrity: sha1-/UhehMA+tIgcIHIrpIA16FMa6zM=, tarball: commander/download/commander-2.20.3.tgz}
dev: true
/commondir/1.0.1:
resolution: {integrity: sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=, tarball: commondir/download/commondir-1.0.1.tgz}
dev: true
/concat-map/0.0.1:
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=, tarball: concat-map/download/concat-map-0.0.1.tgz}
dev: true
/cross-spawn/6.0.5:
resolution: {integrity: sha1-Sl7Hxk364iw6FBJNus3uhG2Ay8Q=, tarball: cross-spawn/download/cross-spawn-6.0.5.tgz}
engines: {node: '>=4.8'}
dependencies:
nice-try: 1.0.5
path-key: 2.0.1
semver: 5.7.1
shebang-command: 1.2.0
which: 1.3.1
dev: true
/debug/2.6.9:
resolution: {integrity: sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=, tarball: debug/download/debug-2.6.9.tgz}
dependencies:
ms: 2.0.0
dev: true
/debug/3.2.7:
resolution: {integrity: sha1-clgLfpFF+zm2Z2+cXl+xALk0F5o=, tarball: debug/download/debug-3.2.7.tgz}
dependencies:
ms: 2.1.3
dev: true
/debug/4.3.3:
resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==, tarball: debug/download/debug-4.3.3.tgz}
engines: {node: '>=6.0'}
peerDependencies:
supports-color: '*'
peerDependenciesMeta:
supports-color:
optional: true
dependencies:
ms: 2.1.2
dev: true
/deep-is/0.1.4:
resolution: {integrity: sha1-pvLc5hL63S7x9Rm3NVHxfoUZmDE=, tarball: deep-is/download/deep-is-0.1.4.tgz}
dev: true
/define-properties/1.1.3:
resolution: {integrity: sha1-z4jabL7ib+bbcJT2HYcMvYTO6fE=, tarball: define-properties/download/define-properties-1.1.3.tgz}
engines: {node: '>= 0.4'}
dependencies:
object-keys: 1.1.1
dev: true
/doctrine/2.1.0:
resolution: {integrity: sha1-XNAfwQFiG0LEzX9dGmYkNxbT850=, tarball: doctrine/download/doctrine-2.1.0.tgz}
engines: {node: '>=0.10.0'}
dependencies:
esutils: 2.0.3
dev: true
/doctrine/3.0.0:
resolution: {integrity: sha1-rd6+rXKmV023g2OdyHoSF3OXOWE=, tarball: doctrine/download/doctrine-3.0.0.tgz}
engines: {node: '>=6.0.0'}
dependencies:
esutils: 2.0.3
dev: true
/emoji-regex/7.0.3:
resolution: {integrity: sha1-kzoEBShgyF6DwSJHnEdIqOTHIVY=, tarball: emoji-regex/download/emoji-regex-7.0.3.tgz}
dev: true
/emoji-regex/8.0.0:
resolution: {integrity: sha1-6Bj9ac5cz8tARZT4QpY79TFkzDc=, tarball: emoji-regex/download/emoji-regex-8.0.0.tgz}
dev: true
/es-abstract/1.19.1:
resolution: {integrity: sha1-1IhXlodpFpWd547aoN9FZicRXsM=, tarball: es-abstract/download/es-abstract-1.19.1.tgz}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
es-to-primitive: 1.2.1
function-bind: 1.1.1
get-intrinsic: 1.1.1
get-symbol-description: 1.0.0
has: 1.0.3
has-symbols: 1.0.2
internal-slot: 1.0.3
is-callable: 1.2.4
is-negative-zero: 2.0.2
is-regex: 1.1.4
is-shared-array-buffer: 1.0.1
is-string: 1.0.7
is-weakref: 1.0.2
object-inspect: 1.11.1
object-keys: 1.1.1
object.assign: 4.1.2
string.prototype.trimend: 1.0.4
string.prototype.trimstart: 1.0.4
unbox-primitive: 1.0.1
dev: true
/es-to-primitive/1.2.1:
resolution: {integrity: sha1-5VzUyc3BiLzvsDs2bHNjI/xciYo=, tarball: es-to-primitive/download/es-to-primitive-1.2.1.tgz}
engines: {node: '>= 0.4'}
dependencies:
is-callable: 1.2.4
is-date-object: 1.0.5
is-symbol: 1.0.4
dev: true
/escape-string-regexp/1.0.5:
resolution: {integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=, tarball: escape-string-regexp/download/escape-string-regexp-1.0.5.tgz?cache=0&sync_timestamp=1632909109983&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fescape-string-regexp%2Fdownload%2Fescape-string-regexp-1.0.5.tgz}
engines: {node: '>=0.8.0'}
dev: true
/eslint-config-standard/14.1.1_28ad67732575371b4dec8ffb1fba17dc:
resolution: {integrity: sha1-gwqOROeu995nRkl5rQa0BgJsVuo=, tarball: eslint-config-standard/download/eslint-config-standard-14.1.1.tgz}
peerDependencies:
eslint: '>=6.2.2'
eslint-plugin-import: '>=2.18.0'
eslint-plugin-node: '>=9.1.0'
eslint-plugin-promise: '>=4.2.1'
eslint-plugin-standard: '>=4.0.0'
dependencies:
eslint: 6.8.0
eslint-plugin-import: 2.25.3_eslint@6.8.0
eslint-plugin-node: 11.1.0_eslint@6.8.0
eslint-plugin-promise: 4.3.1
eslint-plugin-standard: 4.1.0_eslint@6.8.0
dev: true
/eslint-import-resolver-node/0.3.6:
resolution: {integrity: sha1-QEi5WDldqJZoJSAB29nsprg7rL0=, tarball: eslint-import-resolver-node/download/eslint-import-resolver-node-0.3.6.tgz}
dependencies:
debug: 3.2.7
resolve: 1.20.0
dev: true
/eslint-module-utils/2.7.1:
resolution: {integrity: sha1-tDUAHJ+N1Kt/bQ78rkuWltTCS3w=, tarball: eslint-module-utils/download/eslint-module-utils-2.7.1.tgz}
engines: {node: '>=4'}
dependencies:
debug: 3.2.7
find-up: 2.1.0
pkg-dir: 2.0.0
dev: true
/eslint-plugin-es/3.0.1_eslint@6.8.0:
resolution: {integrity: sha1-dafN/czdwFiZNK7rOEF18iHFeJM=, tarball: eslint-plugin-es/download/eslint-plugin-es-3.0.1.tgz}
engines: {node: '>=8.10.0'}
peerDependencies:
eslint: '>=4.19.1'
dependencies:
eslint: 6.8.0
eslint-utils: 2.1.0
regexpp: 3.2.0
dev: true
/eslint-plugin-import/2.25.3_eslint@6.8.0:
resolution: {integrity: sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg==, tarball: eslint-plugin-import/download/eslint-plugin-import-2.25.3.tgz}
engines: {node: '>=4'}
peerDependencies:
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8
dependencies:
array-includes: 3.1.4
array.prototype.flat: 1.2.5
debug: 2.6.9
doctrine: 2.1.0
eslint: 6.8.0
eslint-import-resolver-node: 0.3.6
eslint-module-utils: 2.7.1
has: 1.0.3
is-core-module: 2.8.0
is-glob: 4.0.3
minimatch: 3.0.4
object.values: 1.1.5
resolve: 1.20.0
tsconfig-paths: 3.12.0
dev: true
/eslint-plugin-node/11.1.0_eslint@6.8.0:
resolution: {integrity: sha1-yVVEQW7kraJnQKMEdO78VALcZx0=, tarball: eslint-plugin-node/download/eslint-plugin-node-11.1.0.tgz}
engines: {node: '>=8.10.0'}
peerDependencies:
eslint: '>=5.16.0'
dependencies:
eslint: 6.8.0
eslint-plugin-es: 3.0.1_eslint@6.8.0
eslint-utils: 2.1.0
ignore: 5.1.9
minimatch: 3.0.4
resolve: 1.20.0
semver: 6.3.0
dev: true
/eslint-plugin-promise/4.3.1:
resolution: {integrity: sha1-YUhd8qNZ4DFJ/a/AposOAwrSrEU=, tarball: eslint-plugin-promise/download/eslint-plugin-promise-4.3.1.tgz}
engines: {node: '>=6'}
dev: true
/eslint-plugin-standard/4.1.0_eslint@6.8.0:
resolution: {integrity: sha1-DDvzpn6FP4u7xYD7SUX78W9Bt8U=, tarball: eslint-plugin-standard/download/eslint-plugin-standard-4.1.0.tgz}
peerDependencies:
eslint: '>=5.0.0'
dependencies:
eslint: 6.8.0
dev: true
/eslint-scope/5.1.1:
resolution: {integrity: sha1-54blmmbLkrP2wfsNUIqrF0hI9Iw=, tarball: eslint-scope/download/eslint-scope-5.1.1.tgz}
engines: {node: '>=8.0.0'}
dependencies:
esrecurse: 4.3.0
estraverse: 4.3.0
dev: true
/eslint-utils/1.4.3:
resolution: {integrity: sha1-dP7HxU0Hdrb2fgJRBAtYBlZOmB8=, tarball: eslint-utils/download/eslint-utils-1.4.3.tgz?cache=0&sync_timestamp=1632909141198&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Feslint-utils%2Fdownload%2Feslint-utils-1.4.3.tgz}
engines: {node: '>=6'}
dependencies:
eslint-visitor-keys: 1.3.0
dev: true
/eslint-utils/2.1.0:
resolution: {integrity: sha1-0t5eA0JOcH3BDHQGjd7a5wh0Gyc=, tarball: eslint-utils/download/eslint-utils-2.1.0.tgz?cache=0&sync_timestamp=1632909141198&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Feslint-utils%2Fdownload%2Feslint-utils-2.1.0.tgz}
engines: {node: '>=6'}
dependencies:
eslint-visitor-keys: 1.3.0
dev: true
/eslint-visitor-keys/1.3.0:
resolution: {integrity: sha1-MOvR73wv3/AcOk8VEESvJfqwUj4=, tarball: eslint-visitor-keys/download/eslint-visitor-keys-1.3.0.tgz}
engines: {node: '>=4'}
dev: true
/eslint/6.8.0:
resolution: {integrity: sha1-YiYtZylzn5J1cjgkMC+yJ8jJP/s=, tarball: eslint/download/eslint-6.8.0.tgz}
engines: {node: ^8.10.0 || ^10.13.0 || >=11.10.1}
hasBin: true
dependencies:
'@babel/code-frame': 7.16.0
ajv: 6.12.6
chalk: 2.4.2
cross-spawn: 6.0.5
debug: 4.3.3
doctrine: 3.0.0
eslint-scope: 5.1.1
eslint-utils: 1.4.3
eslint-visitor-keys: 1.3.0
espree: 6.2.1
esquery: 1.4.0
esutils: 2.0.3
file-entry-cache: 5.0.1
functional-red-black-tree: 1.0.1
glob-parent: 5.1.2
globals: 12.4.0
ignore: 4.0.6
import-fresh: 3.3.0
imurmurhash: 0.1.4
inquirer: 7.3.3
is-glob: 4.0.3
js-yaml: 3.14.1
json-stable-stringify-without-jsonify: 1.0.1
levn: 0.3.0
lodash: 4.17.21
minimatch: 3.0.4
mkdirp: 0.5.5
natural-compare: 1.4.0
optionator: 0.8.3
progress: 2.0.3
regexpp: 2.0.1
semver: 6.3.0
strip-ansi: 5.2.0
strip-json-comments: 3.1.1
table: 5.4.6
text-table: 0.2.0
v8-compile-cache: 2.3.0
transitivePeerDependencies:
- supports-color
dev: true
/espree/6.2.1:
resolution: {integrity: sha1-d/xy4f10SiBSwg84pbV1gy6Cc0o=, tarball: espree/download/espree-6.2.1.tgz}
engines: {node: '>=6.0.0'}
dependencies:
acorn: 7.4.1
acorn-jsx: 5.3.2_acorn@7.4.1
eslint-visitor-keys: 1.3.0
dev: true
/esprima/4.0.1:
resolution: {integrity: sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=, tarball: esprima/download/esprima-4.0.1.tgz}
engines: {node: '>=4'}
hasBin: true
dev: true
/esquery/1.4.0:
resolution: {integrity: sha1-IUj/w4uC6McFff7UhCWz5h8PJKU=, tarball: esquery/download/esquery-1.4.0.tgz}
engines: {node: '>=0.10'}
dependencies:
estraverse: 5.3.0
dev: true
/esrecurse/4.3.0:
resolution: {integrity: sha1-eteWTWeauyi+5yzsY3WLHF0smSE=, tarball: esrecurse/download/esrecurse-4.3.0.tgz}
engines: {node: '>=4.0'}
dependencies:
estraverse: 5.3.0
dev: true
/estraverse/4.3.0:
resolution: {integrity: sha1-OYrT88WiSUi+dyXoPRGn3ijNvR0=, tarball: estraverse/download/estraverse-4.3.0.tgz}
engines: {node: '>=4.0'}
dev: true
/estraverse/5.3.0:
resolution: {integrity: sha1-LupSkHAvJquP5TcDcP+GyWXSESM=, tarball: estraverse/download/estraverse-5.3.0.tgz}
engines: {node: '>=4.0'}
dev: true
/estree-walker/0.6.1:
resolution: {integrity: sha1-UwSRQ/QMbrkYsjZx0f4yGfOhs2I=, tarball: estree-walker/download/estree-walker-0.6.1.tgz}
dev: true
/estree-walker/1.0.1:
resolution: {integrity: sha1-MbxdYSyWtwQQa0d+bdXYqhOMtwA=, tarball: estree-walker/download/estree-walker-1.0.1.tgz}
dev: true
/esutils/2.0.3:
resolution: {integrity: sha1-dNLrTeC42hKTcRkQ1Qd1ubcQ72Q=, tarball: esutils/download/esutils-2.0.3.tgz}
engines: {node: '>=0.10.0'}
dev: true
/external-editor/3.1.0:
resolution: {integrity: sha1-ywP3QL764D6k0oPK7SdBqD8zVJU=, tarball: external-editor/download/external-editor-3.1.0.tgz}
engines: {node: '>=4'}
dependencies:
chardet: 0.7.0
iconv-lite: 0.4.24
tmp: 0.0.33
dev: true
/fast-deep-equal/3.1.3:
resolution: {integrity: sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU=, tarball: fast-deep-equal/download/fast-deep-equal-3.1.3.tgz}
dev: true
/fast-json-stable-stringify/2.1.0:
resolution: {integrity: sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM=, tarball: fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz}
dev: true
/fast-levenshtein/2.0.6:
resolution: {integrity: sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=, tarball: fast-levenshtein/download/fast-levenshtein-2.0.6.tgz}
dev: true
/figures/3.2.0:
resolution: {integrity: sha1-YlwYvSk8YE3EqN2y/r8MiDQXRq8=, tarball: figures/download/figures-3.2.0.tgz}
engines: {node: '>=8'}
dependencies:
escape-string-regexp: 1.0.5
dev: true
/file-entry-cache/5.0.1:
resolution: {integrity: sha1-yg9u+m3T1WEzP7FFFQZcL6/fQ5w=, tarball: file-entry-cache/download/file-entry-cache-5.0.1.tgz}
engines: {node: '>=4'}
dependencies:
flat-cache: 2.0.1
dev: true
/find-up/2.1.0:
resolution: {integrity: sha1-RdG35QbHF93UgndaK3eSCjwMV6c=, tarball: find-up/download/find-up-2.1.0.tgz}
engines: {node: '>=4'}
dependencies:
locate-path: 2.0.0
dev: true
/flat-cache/2.0.1:
resolution: {integrity: sha1-XSltbwS9pEpGMKMBQTvbwuwIXsA=, tarball: flat-cache/download/flat-cache-2.0.1.tgz}
engines: {node: '>=4'}
dependencies:
flatted: 2.0.2
rimraf: 2.6.3
write: 1.0.3
dev: true
/flatted/2.0.2:
resolution: {integrity: sha1-RXWyHivO50NKqb5mL0t7X5wrUTg=, tarball: flatted/download/flatted-2.0.2.tgz}
dev: true
/fs.realpath/1.0.0:
resolution: {integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=, tarball: fs.realpath/download/fs.realpath-1.0.0.tgz}
dev: true
/function-bind/1.1.1:
resolution: {integrity: sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=, tarball: function-bind/download/function-bind-1.1.1.tgz}
dev: true
/functional-red-black-tree/1.0.1:
resolution: {integrity: sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=, tarball: functional-red-black-tree/download/functional-red-black-tree-1.0.1.tgz?cache=0&sync_timestamp=1632909141387&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Ffunctional-red-black-tree%2Fdownload%2Ffunctional-red-black-tree-1.0.1.tgz}
dev: true
/get-intrinsic/1.1.1:
resolution: {integrity: sha1-FfWfN2+FXERpY5SPDSTNNje0q8Y=, tarball: get-intrinsic/download/get-intrinsic-1.1.1.tgz}
dependencies:
function-bind: 1.1.1
has: 1.0.3
has-symbols: 1.0.2
dev: true
/get-symbol-description/1.0.0:
resolution: {integrity: sha1-f9uByQAQH71WTdXxowr1qtweWNY=, tarball: get-symbol-description/download/get-symbol-description-1.0.0.tgz}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
get-intrinsic: 1.1.1
dev: true
/glob-parent/5.1.2:
resolution: {integrity: sha1-hpgyxYA0/mikCTwX3BXoNA2EAcQ=, tarball: glob-parent/download/glob-parent-5.1.2.tgz}
engines: {node: '>= 6'}
dependencies:
is-glob: 4.0.3
dev: true
/glob/7.2.0:
resolution: {integrity: sha1-0VU1r3cy4C6Uj0xBYovZECk/YCM=, tarball: glob/download/glob-7.2.0.tgz}
dependencies:
fs.realpath: 1.0.0
inflight: 1.0.6
inherits: 2.0.4
minimatch: 3.0.4
once: 1.4.0
path-is-absolute: 1.0.1
dev: true
/globals/12.4.0:
resolution: {integrity: sha1-oYgTV2pBsAokqX5/gVkYwuGZJfg=, tarball: globals/download/globals-12.4.0.tgz}
engines: {node: '>=8'}
dependencies:
type-fest: 0.8.1
dev: true
/has-bigints/1.0.1:
resolution: {integrity: sha1-ZP5qywIGc+O3jbA1pa9pqp0HsRM=, tarball: has-bigints/download/has-bigints-1.0.1.tgz}
dev: true
/has-flag/3.0.0:
resolution: {integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0=, tarball: has-flag/download/has-flag-3.0.0.tgz}
engines: {node: '>=4'}
dev: true
/has-flag/4.0.0:
resolution: {integrity: sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=, tarball: has-flag/download/has-flag-4.0.0.tgz}
engines: {node: '>=8'}
dev: true
/has-symbols/1.0.2:
resolution: {integrity: sha1-Fl0wcMADCXUqEjakeTMeOsVvFCM=, tarball: has-symbols/download/has-symbols-1.0.2.tgz}
engines: {node: '>= 0.4'}
dev: true
/has-tostringtag/1.0.0:
resolution: {integrity: sha1-fhM4GKfTlHNPlB5zw9P5KR5liyU=, tarball: has-tostringtag/download/has-tostringtag-1.0.0.tgz}
engines: {node: '>= 0.4'}
dependencies:
has-symbols: 1.0.2
dev: true
/has/1.0.3:
resolution: {integrity: sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=, tarball: has/download/has-1.0.3.tgz}
engines: {node: '>= 0.4.0'}
dependencies:
function-bind: 1.1.1
dev: true
/husky/8.0.1:
resolution: {integrity: sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==}
engines: {node: '>=14'}
hasBin: true
dev: true
/iconv-lite/0.4.24:
resolution: {integrity: sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=, tarball: iconv-lite/download/iconv-lite-0.4.24.tgz}
engines: {node: '>=0.10.0'}
dependencies:
safer-buffer: 2.1.2
dev: true
/ignore/4.0.6:
resolution: {integrity: sha1-dQ49tYYgh7RzfrrIIH/9HvJ7Jfw=, tarball: ignore/download/ignore-4.0.6.tgz}
engines: {node: '>= 4'}
dev: true
/ignore/5.1.9:
resolution: {integrity: sha1-nsGly+jhRG7GDUQgBg1Dqm5zgvs=, tarball: ignore/download/ignore-5.1.9.tgz}
engines: {node: '>= 4'}
dev: true
/import-fresh/3.3.0:
resolution: {integrity: sha1-NxYsJfy566oublPVtNiM4X2eDCs=, tarball: import-fresh/download/import-fresh-3.3.0.tgz}
engines: {node: '>=6'}
dependencies:
parent-module: 1.0.1
resolve-from: 4.0.0
dev: true
/imurmurhash/0.1.4:
resolution: {integrity: sha1-khi5srkoojixPcT7a21XbyMUU+o=, tarball: imurmurhash/download/imurmurhash-0.1.4.tgz}
engines: {node: '>=0.8.19'}
dev: true
/inflight/1.0.6:
resolution: {integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=, tarball: inflight/download/inflight-1.0.6.tgz}
dependencies:
once: 1.4.0
wrappy: 1.0.2
dev: true
/inherits/2.0.4:
resolution: {integrity: sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=, tarball: inherits/download/inherits-2.0.4.tgz}
dev: true
/inquirer/7.3.3:
resolution: {integrity: sha1-BNF2sq8Er8FXqD/XwQDpjuCq0AM=, tarball: inquirer/download/inquirer-7.3.3.tgz}
engines: {node: '>=8.0.0'}
dependencies:
ansi-escapes: 4.3.2
chalk: 4.1.2
cli-cursor: 3.1.0
cli-width: 3.0.0
external-editor: 3.1.0
figures: 3.2.0
lodash: 4.17.21
mute-stream: 0.0.8
run-async: 2.4.1
rxjs: 6.6.7
string-width: 4.2.3
strip-ansi: 6.0.1
through: 2.3.8
dev: true
/internal-slot/1.0.3:
resolution: {integrity: sha1-c0fjB97uovqsKsYgXUvH00ln9Zw=, tarball: internal-slot/download/internal-slot-1.0.3.tgz}
engines: {node: '>= 0.4'}
dependencies:
get-intrinsic: 1.1.1
has: 1.0.3
side-channel: 1.0.4
dev: true
/is-bigint/1.0.4:
resolution: {integrity: sha1-CBR6GHW8KzIAXUHM2Ckd/8ZpHfM=, tarball: is-bigint/download/is-bigint-1.0.4.tgz}
dependencies:
has-bigints: 1.0.1
dev: true
/is-boolean-object/1.1.2:
resolution: {integrity: sha1-XG3CACRt2TIa5LiFoRS7H3X2Nxk=, tarball: is-boolean-object/download/is-boolean-object-1.1.2.tgz}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
has-tostringtag: 1.0.0
dev: true
/is-callable/1.2.4:
resolution: {integrity: sha1-RzAdWN0CWUB4ZVR4U99tYf5HGUU=, tarball: is-callable/download/is-callable-1.2.4.tgz}
engines: {node: '>= 0.4'}
dev: true
/is-core-module/2.8.0:
resolution: {integrity: sha1-AyEzbD0JJeSX/Zf12VyxFKXM1Ug=, tarball: is-core-module/download/is-core-module-2.8.0.tgz}
dependencies:
has: 1.0.3
dev: true
/is-date-object/1.0.5:
resolution: {integrity: sha1-CEHVU25yTCVZe/bqYuG9OCmN8x8=, tarball: is-date-object/download/is-date-object-1.0.5.tgz}
engines: {node: '>= 0.4'}
dependencies:
has-tostringtag: 1.0.0
dev: true
/is-extglob/2.1.1:
resolution: {integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=, tarball: is-extglob/download/is-extglob-2.1.1.tgz}
engines: {node: '>=0.10.0'}
dev: true
/is-fullwidth-code-point/2.0.0:
resolution: {integrity: sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=, tarball: is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz}
engines: {node: '>=4'}
dev: true
/is-fullwidth-code-point/3.0.0:
resolution: {integrity: sha1-8Rb4Bk/pCz94RKOJl8C3UFEmnx0=, tarball: is-fullwidth-code-point/download/is-fullwidth-code-point-3.0.0.tgz}
engines: {node: '>=8'}
dev: true
/is-glob/4.0.3:
resolution: {integrity: sha1-ZPYeQsu7LuwgcanawLKLoeZdUIQ=, tarball: is-glob/download/is-glob-4.0.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fis-glob%2Fdownload%2Fis-glob-4.0.3.tgz}
engines: {node: '>=0.10.0'}
dependencies:
is-extglob: 2.1.1
dev: true
/is-module/1.0.0:
resolution: {integrity: sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=, tarball: is-module/download/is-module-1.0.0.tgz}
dev: true
/is-negative-zero/2.0.2:
resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==, tarball: is-negative-zero/download/is-negative-zero-2.0.2.tgz}
engines: {node: '>= 0.4'}
dev: true
/is-number-object/1.0.6:
resolution: {integrity: sha1-anqvg4x/BoalC0VT9+VKlklOifA=, tarball: is-number-object/download/is-number-object-1.0.6.tgz}
engines: {node: '>= 0.4'}
dependencies:
has-tostringtag: 1.0.0
dev: true
/is-reference/1.2.1:
resolution: {integrity: sha1-iy2sCzcfS8mU/eq6nrVC0DAC0Lc=, tarball: is-reference/download/is-reference-1.2.1.tgz}
dependencies:
'@types/estree': 0.0.50
dev: true
/is-regex/1.1.4:
resolution: {integrity: sha1-7vVmPNWfpMCuM5UFMj32hUuxWVg=, tarball: is-regex/download/is-regex-1.1.4.tgz}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
has-tostringtag: 1.0.0
dev: true
/is-shared-array-buffer/1.0.1:
resolution: {integrity: sha1-l7DIX72stZycRG/mU7gs8rW3z+Y=, tarball: is-shared-array-buffer/download/is-shared-array-buffer-1.0.1.tgz}
dev: true
/is-string/1.0.7:
resolution: {integrity: sha1-DdEr8gBvJVu1j2lREO/3SR7rwP0=, tarball: is-string/download/is-string-1.0.7.tgz}
engines: {node: '>= 0.4'}
dependencies:
has-tostringtag: 1.0.0
dev: true
/is-symbol/1.0.4:
resolution: {integrity: sha1-ptrJO2NbBjymhyI23oiRClevE5w=, tarball: is-symbol/download/is-symbol-1.0.4.tgz}
engines: {node: '>= 0.4'}
dependencies:
has-symbols: 1.0.2
dev: true
/is-weakref/1.0.2:
resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==, tarball: is-weakref/download/is-weakref-1.0.2.tgz}
dependencies:
call-bind: 1.0.2
dev: true
/isexe/2.0.0:
resolution: {integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=, tarball: isexe/download/isexe-2.0.0.tgz}
dev: true
/jest-worker/24.9.0:
resolution: {integrity: sha1-Xb/bWy0yLphWeJgjipaXvM5ns+U=, tarball: jest-worker/download/jest-worker-24.9.0.tgz}
engines: {node: '>= 6'}
dependencies:
merge-stream: 2.0.0
supports-color: 6.1.0
dev: true
/js-tokens/4.0.0:
resolution: {integrity: sha1-GSA/tZmR35jjoocFDUZHzerzJJk=, tarball: js-tokens/download/js-tokens-4.0.0.tgz}
dev: true
/js-yaml/3.14.1:
resolution: {integrity: sha1-2ugS/bOCX6MGYJqHFzg8UMNqBTc=, tarball: js-yaml/download/js-yaml-3.14.1.tgz}
hasBin: true
dependencies:
argparse: 1.0.10
esprima: 4.0.1
dev: true
/json-schema-traverse/0.4.1:
resolution: {integrity: sha1-afaofZUTq4u4/mO9sJecRI5oRmA=, tarball: json-schema-traverse/download/json-schema-traverse-0.4.1.tgz}
dev: true
/json-stable-stringify-without-jsonify/1.0.1:
resolution: {integrity: sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=, tarball: json-stable-stringify-without-jsonify/download/json-stable-stringify-without-jsonify-1.0.1.tgz}
dev: true
/json5/1.0.1:
resolution: {integrity: sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=, tarball: json5/download/json5-1.0.1.tgz}
hasBin: true
dependencies:
minimist: 1.2.5
dev: true
/levn/0.3.0:
resolution: {integrity: sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=, tarball: levn/download/levn-0.3.0.tgz}
engines: {node: '>= 0.8.0'}
dependencies:
prelude-ls: 1.1.2
type-check: 0.3.2
dev: true
/locate-path/2.0.0:
resolution: {integrity: sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=, tarball: locate-path/download/locate-path-2.0.0.tgz}
engines: {node: '>=4'}
dependencies:
p-locate: 2.0.0
path-exists: 3.0.0
dev: true
/lodash/4.17.21:
resolution: {integrity: sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw=, tarball: lodash/download/lodash-4.17.21.tgz}
dev: true
/magic-string/0.25.7:
resolution: {integrity: sha1-P0l9b9NMZpxnmNy4IfLvMfVEUFE=, tarball: magic-string/download/magic-string-0.25.7.tgz}
dependencies:
sourcemap-codec: 1.4.8
dev: true
/merge-stream/2.0.0:
resolution: {integrity: sha1-UoI2KaFN0AyXcPtq1H3GMQ8sH2A=, tarball: merge-stream/download/merge-stream-2.0.0.tgz}
dev: true
/mimic-fn/2.1.0:
resolution: {integrity: sha1-ftLCzMyvhNP/y3pptXcR/CCDQBs=, tarball: mimic-fn/download/mimic-fn-2.1.0.tgz}
engines: {node: '>=6'}
dev: true
/minimatch/3.0.4:
resolution: {integrity: sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=, tarball: minimatch/download/minimatch-3.0.4.tgz}
dependencies:
brace-expansion: 1.1.11
dev: true
/minimist/1.2.5:
resolution: {integrity: sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=, tarball: minimist/download/minimist-1.2.5.tgz?cache=0&sync_timestamp=1632909165432&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fminimist%2Fdownload%2Fminimist-1.2.5.tgz}
dev: true
/mkdirp/0.5.5:
resolution: {integrity: sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8=, tarball: mkdirp/download/mkdirp-0.5.5.tgz}
hasBin: true
dependencies:
minimist: 1.2.5
dev: true
/ms/2.0.0:
resolution: {integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=, tarball: ms/download/ms-2.0.0.tgz?cache=0&sync_timestamp=1632909138868&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fms%2Fdownload%2Fms-2.0.0.tgz}
dev: true
/ms/2.1.2:
resolution: {integrity: sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=, tarball: ms/download/ms-2.1.2.tgz?cache=0&sync_timestamp=1632909138868&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fms%2Fdownload%2Fms-2.1.2.tgz}
dev: true
/ms/2.1.3:
resolution: {integrity: sha1-V0yBOM4dK1hh8LRFedut1gxmFbI=, tarball: ms/download/ms-2.1.3.tgz?cache=0&sync_timestamp=1632909138868&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fms%2Fdownload%2Fms-2.1.3.tgz}
dev: true
/mute-stream/0.0.8:
resolution: {integrity: sha1-FjDEKyJR/4HiooPelqVJfqkuXg0=, tarball: mute-stream/download/mute-stream-0.0.8.tgz}
dev: true
/natural-compare/1.4.0:
resolution: {integrity: sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=, tarball: natural-compare/download/natural-compare-1.4.0.tgz}
dev: true
/nice-try/1.0.5:
resolution: {integrity: sha1-ozeKdpbOfSI+iPybdkvX7xCJ42Y=, tarball: nice-try/download/nice-try-1.0.5.tgz}
dev: true
/object-inspect/1.11.1:
resolution: {integrity: sha512-If7BjFlpkzzBeV1cqgT3OSWT3azyoxDGajR+iGnFBfVV2EWyDyWaZZW2ERDjUaY2QM8i5jI3Sj7mhsM4DDAqWA==, tarball: object-inspect/download/object-inspect-1.11.1.tgz}
dev: true
/object-keys/1.1.1:
resolution: {integrity: sha1-HEfyct8nfzsdrwYWd9nILiMixg4=, tarball: object-keys/download/object-keys-1.1.1.tgz}
engines: {node: '>= 0.4'}
dev: true
/object.assign/4.1.2:
resolution: {integrity: sha1-DtVKNC7Os3s4/3brgxoOeIy2OUA=, tarball: object.assign/download/object.assign-4.1.2.tgz}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
define-properties: 1.1.3
has-symbols: 1.0.2
object-keys: 1.1.1
dev: true
/object.values/1.1.5:
resolution: {integrity: sha1-lZ9j486e8QhyAzMIITHkpFm3Fqw=, tarball: object.values/download/object.values-1.1.5.tgz}
engines: {node: '>= 0.4'}
dependencies:
call-bind: 1.0.2
define-properties: 1.1.3
es-abstract: 1.19.1
dev: true
/once/1.4.0:
resolution: {integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=, tarball: once/download/once-1.4.0.tgz}
dependencies:
wrappy: 1.0.2
dev: true
/onetime/5.1.2:
resolution: {integrity: sha1-0Oluu1awdHbfHdnEgG5SN5hcpF4=, tarball: onetime/download/onetime-5.1.2.tgz}
engines: {node: '>=6'}
dependencies:
mimic-fn: 2.1.0
dev: true
/optionator/0.8.3:
resolution: {integrity: sha1-hPodA2/p08fiHZmIS2ARZ+yPtJU=, tarball: optionator/download/optionator-0.8.3.tgz}
engines: {node: '>= 0.8.0'}
dependencies:
deep-is: 0.1.4
fast-levenshtein: 2.0.6
levn: 0.3.0
prelude-ls: 1.1.2
type-check: 0.3.2
word-wrap: 1.2.3
dev: true
/os-tmpdir/1.0.2:
resolution: {integrity: sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=, tarball: os-tmpdir/download/os-tmpdir-1.0.2.tgz}
engines: {node: '>=0.10.0'}
dev: true
/p-limit/1.3.0:
resolution: {integrity: sha1-uGvV8MJWkJEcdZD8v8IBDVSzzLg=, tarball: p-limit/download/p-limit-1.3.0.tgz}
engines: {node: '>=4'}
dependencies:
p-try: 1.0.0
dev: true
/p-locate/2.0.0:
resolution: {integrity: sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=, tarball: p-locate/download/p-locate-2.0.0.tgz}
engines: {node: '>=4'}
dependencies:
p-limit: 1.3.0
dev: true
/p-try/1.0.0:
resolution: {integrity: sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=, tarball: p-try/download/p-try-1.0.0.tgz}
engines: {node: '>=4'}
dev: true
/parent-module/1.0.1:
resolution: {integrity: sha1-aR0nCeeMefrjoVZiJFLQB2LKqqI=, tarball: parent-module/download/parent-module-1.0.1.tgz}
engines: {node: '>=6'}
dependencies:
callsites: 3.1.0
dev: true
/path-exists/3.0.0:
resolution: {integrity: sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=, tarball: path-exists/download/path-exists-3.0.0.tgz}
engines: {node: '>=4'}
dev: true
/path-is-absolute/1.0.1:
resolution: {integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=, tarball: path-is-absolute/download/path-is-absolute-1.0.1.tgz}
engines: {node: '>=0.10.0'}
dev: true
/path-key/2.0.1:
resolution: {integrity: sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=, tarball: path-key/download/path-key-2.0.1.tgz}
engines: {node: '>=4'}
dev: true
/path-parse/1.0.7:
resolution: {integrity: sha1-+8EUtgykKzDZ2vWFjkvWi77bZzU=, tarball: path-parse/download/path-parse-1.0.7.tgz}
dev: true
/picomatch/2.3.0:
resolution: {integrity: sha1-8fBh3o9qS/AiiS4tEoI0+5gwKXI=, tarball: picomatch/download/picomatch-2.3.0.tgz}
engines: {node: '>=8.6'}
dev: true
/pkg-dir/2.0.0:
resolution: {integrity: sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=, tarball: pkg-dir/download/pkg-dir-2.0.0.tgz}
engines: {node: '>=4'}
dependencies:
find-up: 2.1.0
dev: true
/prelude-ls/1.1.2:
resolution: {integrity: sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=, tarball: prelude-ls/download/prelude-ls-1.1.2.tgz}
engines: {node: '>= 0.8.0'}
dev: true
/progress/2.0.3:
resolution: {integrity: sha1-foz42PW48jnBvGi+tOt4Vn1XLvg=, tarball: progress/download/progress-2.0.3.tgz}
engines: {node: '>=0.4.0'}
dev: true
/punycode/2.1.1:
resolution: {integrity: sha1-tYsBCsQMIsVldhbI0sLALHv0eew=, tarball: punycode/download/punycode-2.1.1.tgz}
engines: {node: '>=6'}
dev: true
/randombytes/2.1.0:
resolution: {integrity: sha1-32+ENy8CcNxlzfYpE0mrekc9Tyo=, tarball: randombytes/download/randombytes-2.1.0.tgz}
dependencies:
safe-buffer: 5.2.1
dev: true
/regexpp/2.0.1:
resolution: {integrity: sha1-jRnTHPYySCtYkEn4KB+T28uk0H8=, tarball: regexpp/download/regexpp-2.0.1.tgz?cache=0&sync_timestamp=1632909141561&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fregexpp%2Fdownload%2Fregexpp-2.0.1.tgz}
engines: {node: '>=6.5.0'}
dev: true
/regexpp/3.2.0:
resolution: {integrity: sha1-BCWido2PI7rXDKS5BGH6LxIT4bI=, tarball: regexpp/download/regexpp-3.2.0.tgz?cache=0&sync_timestamp=1632909141561&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fregexpp%2Fdownload%2Fregexpp-3.2.0.tgz}
engines: {node: '>=8'}
dev: true
/resolve-from/4.0.0:
resolution: {integrity: sha1-SrzYUq0y3Xuqv+m0DgCjbbXzkuY=, tarball: resolve-from/download/resolve-from-4.0.0.tgz}
engines: {node: '>=4'}
dev: true
/resolve/1.20.0:
resolution: {integrity: sha1-YpoBP7P3B1XW8LeTXMHCxTeLGXU=, tarball: resolve/download/resolve-1.20.0.tgz?cache=0&sync_timestamp=1632909098143&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fresolve%2Fdownload%2Fresolve-1.20.0.tgz}
dependencies:
is-core-module: 2.8.0
path-parse: 1.0.7
dev: true
/restore-cursor/3.1.0:
resolution: {integrity: sha1-OfZ8VLOnpYzqUjbZXPADQjljH34=, tarball: restore-cursor/download/restore-cursor-3.1.0.tgz}
engines: {node: '>=8'}
dependencies:
onetime: 5.1.2
signal-exit: 3.0.6
dev: true
/rimraf/2.6.3:
resolution: {integrity: sha1-stEE/g2Psnz54KHNqCYt04M8bKs=, tarball: rimraf/download/rimraf-2.6.3.tgz}
hasBin: true
dependencies:
glob: 7.2.0
dev: true
/rollup-plugin-terser/5.3.1_rollup@1.32.1:
resolution: {integrity: sha1-jGUAYsIqhCbGQmhUiVdGO/mBtBM=, tarball: rollup-plugin-terser/download/rollup-plugin-terser-5.3.1.tgz}
peerDependencies:
rollup: '>=0.66.0 <3'
dependencies:
'@babel/code-frame': 7.16.0
jest-worker: 24.9.0
rollup: 1.32.1
rollup-pluginutils: 2.8.2
serialize-javascript: 4.0.0
terser: 4.8.0
dev: true
/rollup-pluginutils/2.8.2:
resolution: {integrity: sha1-cvKvB0i1kjZNvTOJ5gDlqURKNR4=, tarball: rollup-pluginutils/download/rollup-pluginutils-2.8.2.tgz}
dependencies:
estree-walker: 0.6.1
dev: true
/rollup/1.32.1:
resolution: {integrity: sha1-RIDlLZ2eKuS0a6DZ3erzFjlA+cQ=, tarball: rollup/download/rollup-1.32.1.tgz}
hasBin: true
dependencies:
'@types/estree': 0.0.50
'@types/node': 16.11.12
acorn: 7.4.1
dev: true
/run-async/2.4.1:
resolution: {integrity: sha1-hEDsz5nqPnC9QJ1JqriOEMGJpFU=, tarball: run-async/download/run-async-2.4.1.tgz}
engines: {node: '>=0.12.0'}
dev: true
/rxjs/6.6.7:
resolution: {integrity: sha1-kKwBisq/SRv2UEQjXVhjxNq4BMk=, tarball: rxjs/download/rxjs-6.6.7.tgz}
engines: {npm: '>=2.0.0'}
dependencies:
tslib: 1.14.1
dev: true
/safe-buffer/5.2.1:
resolution: {integrity: sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY=, tarball: safe-buffer/download/safe-buffer-5.2.1.tgz}
dev: true
/safer-buffer/2.1.2:
resolution: {integrity: sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=, tarball: safer-buffer/download/safer-buffer-2.1.2.tgz}
dev: true
/semver/5.7.1:
resolution: {integrity: sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=, tarball: semver/download/semver-5.7.1.tgz?cache=0&sync_timestamp=1632909150577&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fsemver%2Fdownload%2Fsemver-5.7.1.tgz}
hasBin: true
dev: true
/semver/6.3.0:
resolution: {integrity: sha1-7gpkyK9ejO6mdoexM3YeG+y9HT0=, tarball: semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1632909150577&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz}
hasBin: true
dev: true
/serialize-javascript/4.0.0:
resolution: {integrity: sha1-tSXhI4SJpez8Qq+sw/6Z5mb0sao=, tarball: serialize-javascript/download/serialize-javascript-4.0.0.tgz}
dependencies:
randombytes: 2.1.0
dev: true
/shebang-command/1.2.0:
resolution: {integrity: sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=, tarball: shebang-command/download/shebang-command-1.2.0.tgz}
engines: {node: '>=0.10.0'}
dependencies:
shebang-regex: 1.0.0
dev: true
/shebang-regex/1.0.0:
resolution: {integrity: sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=, tarball: shebang-regex/download/shebang-regex-1.0.0.tgz}
engines: {node: '>=0.10.0'}
dev: true
/side-channel/1.0.4:
resolution: {integrity: sha1-785cj9wQTudRslxY1CkAEfpeos8=, tarball: side-channel/download/side-channel-1.0.4.tgz}
dependencies:
call-bind: 1.0.2
get-intrinsic: 1.1.1
object-inspect: 1.11.1
dev: true
/signal-exit/3.0.6:
resolution: {integrity: sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==, tarball: signal-exit/download/signal-exit-3.0.6.tgz}
dev: true
/slice-ansi/2.1.0:
resolution: {integrity: sha1-ys12k0YaY3pXiNkqfdT7oGjoFjY=, tarball: slice-ansi/download/slice-ansi-2.1.0.tgz}
engines: {node: '>=6'}
dependencies:
ansi-styles: 3.2.1
astral-regex: 1.0.0
is-fullwidth-code-point: 2.0.0
dev: true
/source-map-support/0.5.21:
resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==, tarball: source-map-support/download/source-map-support-0.5.21.tgz}
dependencies:
buffer-from: 1.1.2
source-map: 0.6.1
dev: true
/source-map/0.6.1:
resolution: {integrity: sha1-dHIq8y6WFOnCh6jQu95IteLxomM=, tarball: source-map/download/source-map-0.6.1.tgz}
engines: {node: '>=0.10.0'}
dev: true
/sourcemap-codec/1.4.8:
resolution: {integrity: sha1-6oBL2UhXQC5pktBaOO8a41qatMQ=, tarball: sourcemap-codec/download/sourcemap-codec-1.4.8.tgz}
dev: true
/sprintf-js/1.0.3:
resolution: {integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=, tarball: sprintf-js/download/sprintf-js-1.0.3.tgz}
dev: true
/string-width/3.1.0:
resolution: {integrity: sha1-InZ74htirxCBV0MG9prFG2IgOWE=, tarball: string-width/download/string-width-3.1.0.tgz?cache=0&sync_timestamp=1632909098458&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fstring-width%2Fdownload%2Fstring-width-3.1.0.tgz}
engines: {node: '>=6'}
dependencies:
emoji-regex: 7.0.3
is-fullwidth-code-point: 2.0.0
strip-ansi: 5.2.0
dev: true
/string-width/4.2.3:
resolution: {integrity: sha1-JpxxF9J7Ba0uU2gwqOyJXvnG0BA=, tarball: string-width/download/string-width-4.2.3.tgz?cache=0&sync_timestamp=1632909098458&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fstring-width%2Fdownload%2Fstring-width-4.2.3.tgz}
engines: {node: '>=8'}
dependencies:
emoji-regex: 8.0.0
is-fullwidth-code-point: 3.0.0
strip-ansi: 6.0.1
dev: true
/string.prototype.trimend/1.0.4:
resolution: {integrity: sha1-51rpDClCxjUEaGwYsoe0oLGkX4A=, tarball: string.prototype.trimend/download/string.prototype.trimend-1.0.4.tgz}
dependencies:
call-bind: 1.0.2
define-properties: 1.1.3
dev: true
/string.prototype.trimstart/1.0.4:
resolution: {integrity: sha1-s2OZr0qymZtMnGSL16P7K7Jv7u0=, tarball: string.prototype.trimstart/download/string.prototype.trimstart-1.0.4.tgz}
dependencies:
call-bind: 1.0.2
define-properties: 1.1.3
dev: true
/strip-ansi/5.2.0:
resolution: {integrity: sha1-jJpTb+tq/JYr36WxBKUJHBrZwK4=, tarball: strip-ansi/download/strip-ansi-5.2.0.tgz?cache=0&sync_timestamp=1632909098581&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-5.2.0.tgz}
engines: {node: '>=6'}
dependencies:
ansi-regex: 4.1.0
dev: true
/strip-ansi/6.0.1:
resolution: {integrity: sha1-nibGPTD1NEPpSJSVshBdN7Z6hdk=, tarball: strip-ansi/download/strip-ansi-6.0.1.tgz?cache=0&sync_timestamp=1632909098581&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fstrip-ansi%2Fdownload%2Fstrip-ansi-6.0.1.tgz}
engines: {node: '>=8'}
dependencies:
ansi-regex: 5.0.1
dev: true
/strip-bom/3.0.0:
resolution: {integrity: sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=, tarball: strip-bom/download/strip-bom-3.0.0.tgz}
engines: {node: '>=4'}
dev: true
/strip-json-comments/3.1.1:
resolution: {integrity: sha1-MfEoGzgyYwQ0gxwxDAHMzajL4AY=, tarball: strip-json-comments/download/strip-json-comments-3.1.1.tgz}
engines: {node: '>=8'}
dev: true
/supports-color/5.5.0:
resolution: {integrity: sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=, tarball: supports-color/download/supports-color-5.5.0.tgz}
engines: {node: '>=4'}
dependencies:
has-flag: 3.0.0
dev: true
/supports-color/6.1.0:
resolution: {integrity: sha1-B2Srxpxj1ayELdSGfo0CXogN+PM=, tarball: supports-color/download/supports-color-6.1.0.tgz}
engines: {node: '>=6'}
dependencies:
has-flag: 3.0.0
dev: true
/supports-color/7.2.0:
resolution: {integrity: sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=, tarball: supports-color/download/supports-color-7.2.0.tgz}
engines: {node: '>=8'}
dependencies:
has-flag: 4.0.0
dev: true
/table/5.4.6:
resolution: {integrity: sha1-EpLRlQDOP4YFOwXw6Ofko7shB54=, tarball: table/download/table-5.4.6.tgz}
engines: {node: '>=6.0.0'}
dependencies:
ajv: 6.12.6
lodash: 4.17.21
slice-ansi: 2.1.0
string-width: 3.1.0
dev: true
/terser/4.8.0:
resolution: {integrity: sha1-YwVjQ9fHC7KfOvZlhlpG/gOg3xc=, tarball: terser/download/terser-4.8.0.tgz?cache=0&sync_timestamp=1637050508843&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fterser%2Fdownload%2Fterser-4.8.0.tgz}
engines: {node: '>=6.0.0'}
hasBin: true
dependencies:
commander: 2.20.3
source-map: 0.6.1
source-map-support: 0.5.21
dev: true
/text-table/0.2.0:
resolution: {integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=, tarball: text-table/download/text-table-0.2.0.tgz}
dev: true
/through/2.3.8:
resolution: {integrity: sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=, tarball: through/download/through-2.3.8.tgz}
dev: true
/tmp/0.0.33:
resolution: {integrity: sha1-bTQzWIl2jSGyvNoKonfO07G/rfk=, tarball: tmp/download/tmp-0.0.33.tgz}
engines: {node: '>=0.6.0'}
dependencies:
os-tmpdir: 1.0.2
dev: true
/tsconfig-paths/3.12.0:
resolution: {integrity: sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg==, tarball: tsconfig-paths/download/tsconfig-paths-3.12.0.tgz}
dependencies:
'@types/json5': 0.0.29
json5: 1.0.1
minimist: 1.2.5
strip-bom: 3.0.0
dev: true
/tslib/1.14.1:
resolution: {integrity: sha1-zy04vcNKE0vK8QkcQfZhni9nLQA=, tarball: tslib/download/tslib-1.14.1.tgz}
dev: true
/type-check/0.3.2:
resolution: {integrity: sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=, tarball: type-check/download/type-check-0.3.2.tgz}
engines: {node: '>= 0.8.0'}
dependencies:
prelude-ls: 1.1.2
dev: true
/type-fest/0.21.3:
resolution: {integrity: sha1-0mCiSwGYQ24TP6JqUkptZfo7Ljc=, tarball: type-fest/download/type-fest-0.21.3.tgz}
engines: {node: '>=10'}
dev: true
/type-fest/0.8.1:
resolution: {integrity: sha1-CeJJ696FHTseSNJ8EFREZn8XuD0=, tarball: type-fest/download/type-fest-0.8.1.tgz}
engines: {node: '>=8'}
dev: true
/unbox-primitive/1.0.1:
resolution: {integrity: sha1-CF4hViXsMWJXTciFmr7nilmxRHE=, tarball: unbox-primitive/download/unbox-primitive-1.0.1.tgz}
dependencies:
function-bind: 1.1.1
has-bigints: 1.0.1
has-symbols: 1.0.2
which-boxed-primitive: 1.0.2
dev: true
/uri-js/4.4.1:
resolution: {integrity: sha1-mxpSWVIlhZ5V9mnZKPiMbFfyp34=, tarball: uri-js/download/uri-js-4.4.1.tgz}
dependencies:
punycode: 2.1.1
dev: true
/v8-compile-cache/2.3.0:
resolution: {integrity: sha1-LeGWGMZtwkfc+2+ZM4A12CRaLO4=, tarball: v8-compile-cache/download/v8-compile-cache-2.3.0.tgz}
dev: true
/which-boxed-primitive/1.0.2:
resolution: {integrity: sha1-E3V7yJsgmwSf5dhkMOIc9AqJqOY=, tarball: which-boxed-primitive/download/which-boxed-primitive-1.0.2.tgz}
dependencies:
is-bigint: 1.0.4
is-boolean-object: 1.1.2
is-number-object: 1.0.6
is-string: 1.0.7
is-symbol: 1.0.4
dev: true
/which/1.3.1:
resolution: {integrity: sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=, tarball: which/download/which-1.3.1.tgz}
hasBin: true
dependencies:
isexe: 2.0.0
dev: true
/word-wrap/1.2.3:
resolution: {integrity: sha1-YQY29rH3A4kb00dxzLF/uTtHB5w=, tarball: word-wrap/download/word-wrap-1.2.3.tgz}
engines: {node: '>=0.10.0'}
dev: true
/wrappy/1.0.2:
resolution: {integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=, tarball: wrappy/download/wrappy-1.0.2.tgz}
dev: true
/write/1.0.3:
resolution: {integrity: sha1-CADhRSO5I6OH5BUSPIZWFqrg9cM=, tarball: write/download/write-1.0.3.tgz}
engines: {node: '>=4'}
dependencies:
mkdirp: 0.5.5
dev: true
const fs = require('fs')
const path = require('path')
const cwd = process.cwd()
const message = fs.readFileSync(path.join(cwd, process.env.HUSKY_GIT_PARAMS), 'utf-8')
const commitRE = /^(\d+\.\d+\.\d+(-(alpha|beta|rc.\d+))?)|((revert: )?(feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types|build|deps)(\(.+\))?!?: .{1,50})/
if (!commitRE.test(message)) {
console.log('\u001b[41;37mGit提交信息不符合规范\u001b[0m')
console.log('提交信息需形如:type(scope?): subject')
console.log('type可取值为:revert|feat|fix|polish|docs|style|refactor|perf|test|workflow|ci|chore|types|build|deps')
console.log('subject部分长度应在1-50之间')
process.exitCode = 1
}
const fs = require('fs')
const path = require('path')
const packageJsonPath = path.resolve(__dirname, '../package.json')
const distPackagePath = path.resolve(__dirname, '../dist/package.json')
const packageJson = require(packageJsonPath)
delete packageJson.devDependencies
delete packageJson.dependencies
delete packageJson.scripts
delete packageJson.husky
packageJson.main = 'index.js'
packageJson.name = 'uni-id-common'
packageJson.dependencies = {
'uni-config-center': 'file:../../../../../uni-config-center/uniCloud/cloudfunctions/common/uni-config-center'
}
const packageStr = JSON.stringify(packageJson, null, 2)
fs.writeFileSync(distPackagePath, packageStr)
export const db = uniCloud.database()
export const dbCmd = db.command
export const userCollectionName = 'uni-id-users'
export const userCollection = db.collection(userCollectionName)
export const roleCollectionName = 'uni-id-roles'
export const roleCollection = db.collection(roleCollectionName)
export const ERROR = {
TOKEN_EXPIRED: 'uni-id-token-expired',
CHECK_TOKEN_FAILED: 'uni-id-check-token-failed',
PARAM_REQUIRED: 'uni-id-param-required',
ACCOUNT_EXISTS: 'uni-id-account-exists',
ACCOUNT_NOT_EXISTS: 'uni-id-account-not-exists',
ACCOUNT_CONFLICT: 'uni-id-account-conflict',
ACCOUNT_BANNED: 'uni-id-account-banned',
ACCOUNT_AUDITING: 'uni-id-account-auditing',
ACCOUNT_AUDIT_FAILED: 'uni-id-account-audit-failed',
ACCOUNT_CLOSED: 'uni-id-account-closed'
}
export function isUniIDError (errCode) {
return Object.values(ERROR).includes(errCode)
}
import crypto from 'crypto'
// nodejs8没有base64url这种encoding,此处为对应的polyfill
function toBase64Url (str) {
return str.replace(/=/g, '')
.replace(/\+/g, '-')
.replace(/\//g, '_')
}
function fromBase64Url (base64url) {
base64url = base64url.toString()
var padding = 4 - base64url.length % 4
if (padding !== 4) {
for (var i = 0; i < padding; ++i) {
base64url += '='
}
}
return base64url
.replace(/-/g, '+')
.replace(/_/g, '/')
}
function atob (str) {
return Buffer.from(str, 'base64').toString('utf-8')
}
function btoa (str) {
return Buffer.from(str, 'utf-8').toString('base64')
}
function fromToken (base64url) {
return JSON.parse(
atob(
fromBase64Url(
base64url
)
)
)
}
function toToken (obj) {
return toBase64Url(
btoa(
JSON.stringify(
obj
)
)
)
}
function getSign (str, secret) {
return toBase64Url(
crypto.createHmac('sha256', secret).update(str).digest('base64')
)
}
const jwt = {
verify: function (token, secret) {
if (typeof token !== 'string') {
throw new Error('Invalid token')
}
const tokenArr = token.split('.')
if (tokenArr.length !== 3) {
throw new Error('Invalid token')
}
const [headerBase64, payloadBase64, signatureBase64] = tokenArr
if (getSign(headerBase64 + '.' + payloadBase64, secret) !== signatureBase64) {
throw new Error('Invalid token')
}
const header = fromToken(headerBase64)
if (header.alg !== 'HS256' || header.typ !== 'JWT') {
throw new Error('Invalid token')
}
const payload = fromToken(payloadBase64)
if (payload.exp * 1000 < Date.now()) {
const err = new Error('Token expired')
err.name = 'TokenExpiredError'
throw err
}
return payload
},
sign: function (data, secret, options = {}) {
const {
expiresIn
} = options
if (!expiresIn) {
throw new Error('expiresIn is required')
}
const header = {
alg: 'HS256',
typ: 'JWT'
}
const now = parseInt(Date.now() / 1000)
const payload = {
...data,
iat: now,
exp: now + options.expiresIn
}
const signStr = toToken(header) + '.' + toToken(payload)
const signature = getSign(signStr, secret)
return signStr + '.' + signature
}
}
export default jwt
export function getDistinctArray (arr) {
return Array.from(new Set(arr))
}
export function getType (val) {
return Object.prototype.toString.call(val).slice(8, -1).toLowerCase()
}
export function isPromise (obj) {
return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'
}
import {
isUniIDError
} from './error'
import {
getType,
isPromise
} from './utils'
// 保证各版本clientDB能正常运行
const codeMap = {
'uni-id-token-expired': 30203,
'uni-id-check-token-failed': 30202
}
function parseErrMsg (err) {
const {
errCode,
errMsgValue
} = err
err.errMsg = this._t(errCode, errMsgValue)
if (errCode in codeMap) {
err.code = codeMap[errCode]
}
}
function isUniIDResponse (res) {
return getType(res) === 'object' && res.errCode && isUniIDError(res.errCode) && !!res.errCode
}
export function wrapFn (fn) {
return function () {
let promise
try {
promise = fn.apply(this, arguments)
} catch (error) {
if (isUniIDResponse(error)) {
parseErrMsg.call(this, error)
return error
}
throw error
}
if (isPromise(promise)) {
return promise.then((res) => {
if (isUniIDResponse(res)) {
parseErrMsg.call(this, res)
}
return res
}, (err) => {
if (isUniIDResponse(err)) {
parseErrMsg.call(this, err)
return err
}
throw err
})
} else {
if (isUniIDResponse(promise)) {
parseErrMsg.call(this, promise)
}
}
return promise
}
}
import {
wrapFn
} from './common/wrap-fn'
import messages from './lang/index'
import * as methodList from './uni-id'
function parseContext (context) {
return {
appId: context.APPID,
platform: context.PLATFORM,
locale: context.LOCALE,
clientIP: context.CLIENTIP,
deviceId: context.DEVICEID
}
}
const uniIDConfig = require('uni-config-center')({
pluginId: 'uni-id'
})
class UniID {
constructor ({
context,
clientInfo,
config
} = {}) {
this._clientInfo = context ? parseContext(context) : clientInfo
this.config = config || this._getOriginConfig()
this.interceptorMap = new Map()
if (uniIDConfig.hasFile('custom-token.js')) {
this.setInterceptor('customToken', require(uniIDConfig.resolve('custom-token.js')))
}
this._i18n = uniCloud.initI18n({
locale: this._clientInfo.locale,
fallbackLocale: 'zh-Hans',
messages
})
}
_t (...args) {
return this._i18n.t(...args)
}
_getOriginConfig () {
if (uniIDConfig.hasFile('config.json')) {
let configContent
try {
configContent = uniIDConfig.config()
} catch (error) {
throw new Error('Invalid uni-id config file\n' + error.messages)
}
// require [1,2] => {0:1,1:2}
if (Array.isArray(configContent)) {
return configContent
}
return configContent[0] ? Object.values(configContent) : configContent
} else {
throw new Error('Invalid uni-id config file')
}
}
_getAppConfig () {
const originConfig = this._getOriginConfig()
if (!Array.isArray(originConfig)) {
return originConfig
}
return originConfig.find(item => item.dcloudAppid === this.clientInfo.appId) || originConfig.find(item => item.isDefaultConfig)
}
_getPlatformConfig () {
const appConfig = this._getAppConfig()
if (this._clientInfo.platform === 'app-plus') {
this._clientInfo.platform = 'app'
}
if (this._clientInfo.platform === 'h5') {
this._clientInfo.platform = 'web'
}
const defaultConfig = {}
const argsRequired = ['tokenSecret', 'tokenExpiresIn']
const config = Object.assign(defaultConfig, appConfig, appConfig[this._clientInfo.platform])
argsRequired.forEach((item) => {
if (!config || !config[item]) {
throw new Error(`Config parameter missing, ${item} is required`)
}
})
return config
}
_getConfig () {
return this._getPlatformConfig()
}
}
for (const key in methodList) {
UniID.prototype[key] = methodList[key]
}
function createInstance (params) {
// {
// context,
// clientInfo,
// config
// } = params
const uniIDOrigin = new UniID(params)
const uniID = new Proxy(uniIDOrigin, {
get (target, prop) {
if (prop in target && prop.indexOf('_') !== 0) {
if (typeof target[prop] === 'function') {
return wrapFn(target[prop]).bind(target)
} else if (prop === 'context' || prop === 'config') {
} else {
return target[prop]
}
}
}
})
return uniID
}
UniID.prototype.createInstance = createInstance
const uniID = {
// 自4.0.0版起只能使用createInstance创建实例,直接require('uni-id')仅会得到一个包含createInstance方法的对象
createInstance
}
export default uniID
const word = {}
const sentence = {
// end user message
'uni-id-token-expired': 'The login status is invalid, token has expired',
'uni-id-check-token-failed': 'Check token failed',
'uni-id-param-required': 'Parameter required: {param}',
'uni-id-account-exists': 'Account exists',
'uni-id-account-not-exists': 'Account does not exists',
'uni-id-account-conflict': 'User account conflict',
'uni-id-account-banned': 'Account has been banned',
'uni-id-account-auditing': 'Account audit in progress',
'uni-id-account-audit-failed': 'Account audit failed',
'uni-id-account-closed': 'Account has been closed'
}
export default {
...word,
...sentence
}
import zhHans from './zh-Hans'
import en from './en'
let lang = {
'zh-Hans': zhHans,
en: en
}
function mergeLanguage (lang1, lang2) {
const localeList = Object.keys(lang1)
localeList.push(...Object.keys(lang2))
const result = {}
for (let i = 0; i < localeList.length; i++) {
const locale = localeList[i]
result[locale] = Object.assign({}, lang1[locale], lang2[locale])
}
return result
}
try {
const langPath = require.resolve('uni-config-center/uni-id/lang/index.js')
lang = mergeLanguage(lang, require(langPath))
} catch (error) { }
export default lang
const word = {}
const sentence = {
// end user message
'uni-id-token-expired': '登陆状态失效,token已过期',
'uni-id-check-token-failed': 'token校验未通过',
'uni-id-param-required': '缺少参数: {param}',
'uni-id-account-exists': '此账号已注册',
'uni-id-account-not-exists': '此账号未注册',
'uni-id-account-conflict': '用户账号冲突',
'uni-id-account-banned': '从账号已封禁',
'uni-id-account-auditing': '此账号正在审核中',
'uni-id-account-audit-failed': '此账号审核失败',
'uni-id-account-closed': '此账号已注销'
}
export default {
...word,
...sentence
}
import {
checkTokenInternal,
refreshTokenInternal
} from './utils'
export default async function checkToken (token, {
autoRefresh = true
} = {}) {
const payload = await checkTokenInternal.call(this, token)
const {
tokenExpiresThreshold
} = this._getConfig()
if (!tokenExpiresThreshold || !autoRefresh) {
return {
code: 0,
errCode: 0,
...payload
}
}
const now = Date.now()
const needRefreshToken = payload.exp * 1000 - now < tokenExpiresThreshold * 1000
let newToken = {}
if (needRefreshToken) {
newToken = await refreshTokenInternal.call(this, payload)
}
return {
code: 0,
errCode: 0,
...payload,
...newToken
}
}
import {
createTokenInternal
} from './utils'
export default async function createToken ({
uid,
role,
permission
} = {}) {
return createTokenInternal.call(this, {
uid,
role,
permission
})
}
import checkToken from './check-token'
import createToken from './create-token'
import refreshToken from './refresh-token'
export {
checkToken,
createToken,
refreshToken
}
import {
checkTokenInternal,
refreshTokenInternal
} from './utils'
export default async function refreshToken ({
token
} = {}) {
const payload = await checkTokenInternal.call(this, token)
const newToken = await refreshTokenInternal.call(this, payload)
return {
errCode: 0,
...newToken
}
}
import jwt from '../../common/jwt'
import {
ERROR
} from '../../common/error'
import {
dbCmd,
userCollection,
roleCollection
} from '../../common/constants'
import {
getDistinctArray
} from '../../common/utils'
export async function checkTokenInternal (token) {
const {
tokenSecret,
tokenExpiresIn,
tokenExpiresThreshold
} = this._getConfig()
if (tokenExpiresThreshold > tokenExpiresIn) {
throw new Error('Config error, tokenExpiresThreshold should be less than tokenExpiresIn')
}
let payload
try {
payload = jwt.verify(token, tokenSecret)
} catch (error) {
if (error.name === 'TokenExpiredError') {
throw {
errCode: ERROR.TOKEN_EXPIRED
}
}
throw {
errCode: ERROR.CHECK_TOKEN_FAILED
}
}
return payload
}
export async function refreshTokenInternal (payload) {
// refresh时查库校验对比token创建时间和用户表的valid_token_date
const uid = payload.uid
const getUserRes = await userCollection.doc(uid).get()
const userRecord = getUserRes.data[0]
if (!userRecord) {
throw {
errCode: ERROR.CHECK_TOKEN_FAILED
}
}
if (userRecord.valid_token_date && userRecord.valid_token_date > payload.iat * 1000) {
throw {
errCode: ERROR.TOKEN_EXPIRED
}
}
const {
role,
permission
} = await getUserPermission(userRecord)
return createTokenInternal.call(this, {
uid,
role,
permission
})
}
async function getUserPermission (userRecord) {
// const getUserRes = await userCollection.doc(uid).get()
// const userRecord = getUserRes.data[0]
if (!userRecord) {
throw {
errCode: ERROR.ACCOUNT_NOT_EXISTS
}
}
checkUserStatus(userRecord)
const role = userRecord.role || []
if (role.length === 0) {
return {
role: [],
permission: []
}
}
if (role.includes('admin')) {
return {
role: ['admin'],
permission: []
}
}
const getRoleListRes = await roleCollection.where({
role_id: dbCmd.in(role)
})
const permission = getDistinctArray(
getRoleListRes.data.reduce((list, item) => {
if (item.permission) {
list.push(...item.permission)
}
}, [])
)
return {
role,
permission
}
}
function checkUserStatus (userRecord) {
switch (userRecord.status) {
case undefined:
case 0:
break
case 1:
throw {
errCode: ERROR.ACCOUNT_BANNED
}
case 2:
throw {
errCode: ERROR.ACCOUNT_AUDITING
}
case 3:
throw {
errCode: ERROR.ACCOUNT_AUDIT_FAILED
}
case 4:
throw {
errCode: ERROR.ACCOUNT_CLOSED
}
default:
break
}
}
async function postCreateToken ({
uid,
signContent,
tokenSecret,
tokenExpiresIn
} = {}) {
const now = Date.now()
const token = jwt.sign(signContent, tokenSecret, {
expiresIn: tokenExpiresIn
})
await userCollection.doc(uid).update({
last_login_ip: this._clientInfo.clientIP,
last_login_date: now
})
return {
token,
tokenExpired: now + tokenExpiresIn * 1000
}
}
export async function createTokenInternal ({
uid,
role,
permission
} = {}) {
const {
tokenSecret,
tokenExpiresIn,
tokenExpiresThreshold
} = this._getConfig()
if (!uid) {
throw {
errCode: ERROR.PARAM_REQUIRED,
errMsgValue: {
param: 'uid'
}
}
}
if (tokenExpiresThreshold > tokenExpiresIn) {
throw new Error('Config error, tokenExpiresThreshold should be less than tokenExpiresIn')
}
if (!role || !permission) {
const getUserRes = await userCollection.doc(uid).get()
const userRecord = getUserRes.data[0]
const getUserPermissionResult = await getUserPermission(userRecord)
role = getUserPermissionResult.role
permission = getUserPermissionResult.permission
}
if (!this.interceptorMap.has('customToken')) {
return postCreateToken.call(this, {
uid,
signContent: {
uid,
role,
permission
},
tokenSecret,
tokenExpiresIn
})
}
const customToken = this.interceptorMap.get('customToken')
if (typeof customToken === 'function') {
throw new Error('Invalid custom token file')
}
const customTokenRes = await customToken({
uid,
role,
permission
})
return postCreateToken.call(this, {
uid,
signContent: customTokenRes,
tokenSecret,
tokenExpiresIn
})
}
export * from './lib/token'
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册