This commit is contained in:
Pipi Chen
2020-05-07 01:02:44 +08:00
commit b8a3516cd6
2147 changed files with 184854 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.vscode/

494
README.md Normal file
View File

@@ -0,0 +1,494 @@
# 代码混淆工具
### 介绍
[Cocos Creator 编辑器插件] 混淆代码工具支持项目构建后自动混淆代码以及主动混淆目标文件TODO
- 混淆引擎:[javascript-obfuscator@0.28.0](https://github.com/javascript-obfuscator/javascript-obfuscator)
### 截图
![screenshot](https://gitee.com/ifaswind/image-storage/raw/master/ccc-obfuscated-code/screenshot.png)
![screenshot](https://gitee.com/ifaswind/image-storage/raw/master/ccc-obfuscated-code/screenshot-2.png)
### 环境
平台Windows、Mac未测试
引擎Cocos Creator 2.3.3(理论上通用)
### 插件说明
1. 插件默认禁用
2. 点击 **[ 扩展 --> 代码混淆工具 --> 构建后自动混淆 ]** 启用自动混淆并设置参数
3. 配置文件保存路径为 **[ {项目根目录}/local/ccc-obfuscated-code.json ]**
### 参数说明
- 以下均为我人工翻译的内容,尽我所能翻译得通俗易懂了。
- 原英文文档:[传送门](https://github.com/javascript-obfuscator/javascript-obfuscator/blob/master/README.md)
**compact**
类型:`boolean` | 默认值:`true`
> 将代码压缩至一行。
**controlFlowFlattening**
类型:`boolean` | 默认值:`false`
> 注意:该选项将严重影响性能,影响高达 1.5 倍。使用`controlFlowFlatteningThreshold`选项来控制转换概率。
>
> 开启代码控制流扁平化。控制流扁平化会转换源代码的结构,阻碍程序的阅读理解。
**controlFlowFlatteningThreshold**
类型:`number` | 默认值:`0.75` | 最小值:`0` | 最大值:`1`
> 应用控制流扁平化的概率。
>
> 这个设置对于代码体积大的情况非常有用,因为大量的控制流转换会降低代码的运行速度并且增加代码的体积。
>
> `controlFlowFlatteningThreshold: 0`等同于`controlFlowFlattening: false`。
**deadCodeInjection**
类型:`boolean` | 默认值:`false`
> 注意:该选项会急剧增加代码的体积(甚至高达 200%),如果不在乎代码体积可以使用该选项。可以使用`deadCodeInjectionThreshold`来设置添加无用代码的比例。
>
> 注意:开启这个选项会强制开启 `stringArray`选项。
>
> 开启这个选项时会向源代码随机添加无用的代码。
**deadCodeInjectionThreshold**
类型:`number` | 默认值:`0.4` | 最小值:`0` | 最大值:`1`
> 设置`deadCodeInjection`的比例。
**debugProtection**
类型:`boolean` | 默认值:`false`
> 注意:打开 DevTools 可能会让浏览器卡住。
>
> 开启这个选项之后 DevTools 的 console 栏基本上就不能用了(基于 WebKit 的浏览器和火狐都通杀)。
**debugProtectionInterval**
类型:`boolean`| 默认值:`false`
> 注意:会让浏览器卡住!后果自负。
>
> 开启之后,会让调试模式定期聚焦到 Console 栏,让 DevTools 的其他功能也没法用。这个选项需要开启了`debugProtection`才有效。
**disableConsoleOutput**
类型:`boolean`| 默认值:`false`
> 禁用`console.log`、`console.info`、`console.error`、`console.warn`、`console.debug`、`console.exception`和`console.trace`,具体实现是用空的函数替换掉这些函数。让人更难调试程序。
**domainLock**
类型:`string[]` | 默认值:`[]`
> 注意:当`target: node`时这个选项无效
>
> 让程序只能运行在特定的域名或子域名下。这让那些只是复制粘贴代码的人CV工程师~)更难受了。
>
> 可以同时锁定多个域名。举个栗子,要让程序只能运行在 www.example.com 就添加`www.example.com`。要运行在 example.com 的所有子域名下的话就用`.example.com`。
**exclude**
类型:`string[]` | 默认值:`[]`
> 需要在混淆过程中排除的文件名。
**identifierNamesGenerator**
类型:`string` | 默认值:`'hexadecimal'`
> 设置标识符生成器。
>
> 可用值:
>
> - `dictionary`:从`identifiersDictionary`列表中获取标识符
> - `hexadecimal`:和`_0xabc123`类似的标识符
> - `mangled`:和`a`、`b`、`c`类似的短标识符
**identifiersDictionary**
类型:`string[]` | 默认值:`[]`
> 设置`identifierNamesGenerator`的标识符字典。
**identifiersPrefix**
类型:`string` | 默认值:`''`
> 设置全局标识符的前缀。
>
> 当你需要混淆多个文件的时候使用这个。开启后可以避免多个文件之间的全局标识符冲突。每个文件的前缀都应该不一样。
**inputFileName**
类型:`string` | 默认值:`''`
> 设置源代码的输入文件名字。这个名字将用于内部生成 source map 。
**log**
类型:`boolean`| 默认值:`false`
> 打印日志到控制台。
**renameGlobals**
类型:`boolean`| 默认值:`false`
> 注意:可能会让你的代码爆炸。如果你是大佬,当我没说。
>
> 混淆自定义的全局变量和函数。
**reservedNames**
类型:`string[]` | 默认值:`[]`
> 保留标识符,支持正则表达式。
**reservedStrings**
类型:`string[]` | 默认值:`[]`
> 保留字符串,支持正则表达式。
**rotateStringArray**
类型:`boolean`| 默认值:`true`
> 注意:要开启`stringArray`才有用
>
> 根据一个固定和随机(混淆时生成)的位置变换`stringArray`。这会让人难以匹配字符串到他们原来的位置。
>
> 如果你的代码体积不小那建议你使用这个。
**seed**
类型:`string|number` | 默认值:`0`
> 设置随机种子。
>
> 当种子为`0`时,随机生成器就不会使用随机种子。
**selfDefending**
类型:`boolean`| 默认值:`false`
> 注意:开启这个选项之后不要对混淆后的代码进行任何更改,因为任何更改(例如丑化代码)都会触发自我保护导致代码无法运行。
>
> 注意:开启这个选项会强制将`compact`设为`true`
>
> 开启这个选项之后就不能对代码进行格式化或者重命名变量。任何人尝试美化混淆后的代码,都会让代码无法运行,使得代码难以理解和更改。
**shuffleStringArray**
类型:`boolean`| 默认值:`true`
> 注意:要开启`stringArray`才有用
>
> 对`stringArray`的内容随机洗牌。
**sourceMap**
类型:`boolean`| 默认值:`false`
> 生成混淆后的代码的 source map 。
>
> Source maps 对于调试混淆后的代码很有帮助。如果你想要或者需要对产品进行调试,可以上传单独的 source map 文件到一个安全的地方,然后引用到浏览器中。
**sourceMapBaseUrl**
类型:`string` | 默认值:`''`
> 设置当`sourceMapMode: 'separate'`时的 source map 导入 url 的 BaseUrl。
**sourceMapFileName**
类型:`string` | 默认值:`''`
> 设置当`sourceMapMode: 'separate'`时的 source map 输出名称。
**sourceMapMode**
类型:`string` | 默认值:`'separate'`
> 指定 source map 的生成模式。
>
> - `inline` - 发送包含 source map 的单个文件而不是生成单独的文件。
> - `separate` - 生成与 source map 对应的 '.map' 文件。
**splitStrings**
类型:`boolean`| 默认值:`false`
> 根据`splitStringsChunkLength`将字符串分成指定长度的块。
**splitStringsChunkLength**
类型:`number` | 默认值:`10`
> 设置`splitStrings`的块长度。
**stringArray**
类型:`boolean`| 默认值:`true`
> 移除并用指定的列表替换字符串。举个栗子,`var m = "Hello World";`中的字符串`Hello World`将会被替换,语句会变成类似`var m = _0x12c456[0x1];`的形式。
**stringArrayEncoding**
类型:`boolean|string`| 默认值:`false`
> 注意:要开启`stringArray`才有用
>
> 这个选项会降低脚本的速度。
>
> 用`base64`或者`rc4`来加密`stringArray`中的字符串,并且插入特定的代码用来运行时解密。
>
> 可用值:
>
> - `true``boolean`):用`base64`加密`stringArray`字符串
> - `false``boolean`):不加密`stringArray`字符串
> - `base64``string`):用`base64`加密`stringArray`字符串
> - `rc4``string`):用`rc4`加密`stringArray`字符串。比`base64`慢大概 30 - 50% ,但是让人更难获取初始值。
**stringArrayThreshold**
类型:`number` | 默认值:`0.75` | 最小值:`0` | 最大值:`1`
> 注意:要开启`stringArray`才有用
>
> 你可以设置这个来调整字符串插入`stringArray`的概率。
>
> 这个设置对于代码体积大的情况特别有用。
>
> `stringArrayThreshold: 0` 等同于 `stringArray: false`。
**target**
类型:`string` | 默认值:'browser'
> 允许你设置混淆后的代码的运行环境。
>
> 可用值:
>
> - `browser`
> - `browser-no-eval`
> - `node`。
>
> 目前`browser`和`node`的输出代码是完全一样的,但是某些特定的浏览器不能用`node`。`browser-no-eval`的输出代码没有使用`eval`。
**transformObjectKeys**
类型:`boolean`| 默认值:`false`
> 开启 Object 的 key 转换。
**unicodeEscapeSequence**
类型:`boolean`| 默认值:`false`
> 开启或禁用字符串的 Unicode 转义序列。
>
> 开启该选项会大大增加代码的体积,同时字符串也不难被恢复。只建议代码体积小的情况下使用这个选项。
### 预设
**高度混淆,性能很低**
性能比不混淆慢 50 - 100%
```
{
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 1,
deadCodeInjection: true,
deadCodeInjectionThreshold: 1,
debugProtection: true,
debugProtectionInterval: true,
disableConsoleOutput: true,
identifierNamesGenerator: 'hexadecimal',
log: false,
renameGlobals: false,
rotateStringArray: true,
selfDefending: true,
shuffleStringArray: true,
splitStrings: true,
splitStringsChunkLength: '5',
stringArray: true,
stringArrayEncoding: 'rc4',
stringArrayThreshold: 1,
transformObjectKeys: true,
unicodeEscapeSequence: false
}
```
**中度混淆,性能均衡**
性能比不混淆慢 30 - 50%
```
{
compact: true,
controlFlowFlattening: true,
controlFlowFlatteningThreshold: 0.75,
deadCodeInjection: true,
deadCodeInjectionThreshold: 0.4,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: true,
identifierNamesGenerator: 'hexadecimal',
log: false,
renameGlobals: false,
rotateStringArray: true,
selfDefending: true,
shuffleStringArray: true,
splitStrings: true,
splitStringsChunkLength: '10',
stringArray: true,
stringArrayEncoding: 'base64',
stringArrayThreshold: 0.75,
transformObjectKeys: true,
unicodeEscapeSequence: false
}
```
**轻度混淆,性能较高**
性能只会比不混淆稍微慢一点点
```
{
compact: true,
controlFlowFlattening: false,
deadCodeInjection: false,
debugProtection: false,
debugProtectionInterval: false,
disableConsoleOutput: true,
identifierNamesGenerator: 'hexadecimal',
log: false,
renameGlobals: false,
rotateStringArray: true,
selfDefending: true,
shuffleStringArray: true,
splitStrings: false,
stringArray: true,
stringArrayEncoding: false,
stringArrayThreshold: 0.75,
unicodeEscapeSequence: false
}
```
### 关于
作者陈皮皮ifaswind
公众号:文弱书生陈皮皮
![weixin](https://gitee.com/ifaswind/image-storage/raw/master/weixin/qrcode.png)
### *License*
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

169
main.js Normal file
View File

@@ -0,0 +1,169 @@
let Fs = require('fs');
let Path = require('path');
let JavascriptObfuscator = require('javascript-obfuscator');
let defaultConfig = {
auto: false,
files: ['/src/project.js'],
preset: 'low',
options: {}
};
let presetFileUrl = 'packages://ccc-obfuscated-code/preset.json';
let presets = null;
/**
* 保存配置
* @param {*} config
*/
function saveConfig(config) {
let projectPath = Editor.Project.path || Editor.projectPath;
let projectName = Editor.Project.name || projectPath.slice(projectPath.lastIndexOf('\\') + 1);
let configDirPath = Path.join(projectPath, '/local/');
if (!Fs.existsSync(configDirPath)) Fs.mkdirSync(configDirPath);
let configFilePath = Path.join(configDirPath, 'ccc-obfuscated-code.json');
let configs = {};
// 读取本地配置
if (Fs.existsSync(configFilePath)) {
configs = JSON.parse(Fs.readFileSync(configFilePath, 'utf8'));
}
// 写入配置
if (!configs[projectName]) configs[projectName] = {};
for (let key in config) {
configs[projectName][key] = config[key];
}
let string = JSON.stringify(configs, null, 2);
Fs.writeFileSync(configFilePath, string);
Editor.log('[CC] 配置文件路径', configFilePath);
}
/**
* 读取配置
*/
function getConfig() {
let projectPath = Editor.Project.path || Editor.projectPath;
let projectName = Editor.Project.name || projectPath.slice(projectPath.lastIndexOf('\\') + 1);
let configFilePath = Path.join(projectPath, '/local/ccc-obfuscated-code.json');
let config = null;
if (Fs.existsSync(configFilePath)) {
config = JSON.parse(Fs.readFileSync(configFilePath, 'utf8'))[projectName];
}
if (!config) {
config = defaultConfig;
config.options = getPreset('default');
if (config.preset !== 'default') {
let preset = getPreset(config.preset);
for (let key in preset) {
config.options[key] = preset[key];
}
}
}
return config;
};
/**
* 读取预设参数
*/
function getPreset(name) {
if (presets) {
return presets[name];
} else {
let presetFilePath = Editor.url(presetFileUrl);
if (Fs.existsSync(presetFilePath)) {
presets = JSON.parse(Fs.readFileSync(presetFilePath, 'utf8'));
return presets[name];
} else {
return null;
}
}
};
/**
* 混淆
* @param {*} path 文件路径
* @param {*} options 混淆参数
*/
function obfuscate(path, options) {
let sourceCode = Fs.readFileSync(path, 'utf8');
let obfuscationResult = JavascriptObfuscator.obfuscate(sourceCode, options);
let obfuscatedCode = obfuscationResult.getObfuscatedCode();
Fs.writeFileSync(path, obfuscatedCode);
}
module.exports = {
load() {
Editor.Builder.on('build-start', this.onBuildStart);
Editor.Builder.on('build-finished', this.onBuildFinished);
},
unload() {
Editor.Builder.removeListener('build-start', this.onBuildStart);
Editor.Builder.removeListener('build-finished', this.onBuildFinished);
},
messages: {
'open-panel'() {
Editor.log('[CC] 代码混淆工具/构建后自动混淆');
Editor.Panel.open('ccc-obfuscated-code');
},
// TODO
// 'open-panel'() {
// Editor.log('[CC] 代码混淆工具/主动混淆');
// Editor.Panel.open('ccc-obfuscated-code-do');
// },
'save-config'(event, config) {
Editor.log('[CC] 保存配置');
saveConfig(config);
event.reply(null, true);
},
'read-config'(event) {
Editor.log('[CC] 读取配置');
let config = getConfig();
event.reply(null, config);
},
'get-preset'(event, name) {
Editor.log('[CC] 读取预设', name);
let preset = getPreset(name);
if (preset) {
event.reply(null, preset);
} else {
Editor.log('[CC] 预设文件已丢失');
Editor.log('[CC] 文件下载地址 https://gitee.com/ifaswind/ccc-obfuscated-code/blob/master/preset.json');
event.reply(null, {});
}
}
},
async onBuildStart(options, callback) {
let config = getConfig();
if (config.auto) Editor.log('[CC] 将在项目构建完成后自动混淆代码');
callback();
},
async onBuildFinished(options, callback) {
let config = getConfig();
if (config.auto) {
Editor.log('[CC] 正在混淆代码');
for (let i = 0; i < config.files.length; i++) {
let path = Path.join(options.dest, config.files[i]);
if (Fs.existsSync(path)) {
Editor.log('[CC] 混淆文件', path);
obfuscate(path, config.options);
} else {
Editor.warn('[CC] 文件不存在', path);
}
}
Editor.log('[CC] 混淆已结束');
}
callback();
},
}

15
node_modules/.bin/acorn generated vendored Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../acorn/bin/acorn" "$@"
ret=$?
else
node "$basedir/../acorn/bin/acorn" "$@"
ret=$?
fi
exit $ret

17
node_modules/.bin/acorn.cmd generated vendored Normal file
View File

@@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\acorn\bin\acorn" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

18
node_modules/.bin/acorn.ps1 generated vendored Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../acorn/bin/acorn" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../acorn/bin/acorn" $args
$ret=$LASTEXITCODE
}
exit $ret

15
node_modules/.bin/escodegen generated vendored Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../escodegen/bin/escodegen.js" "$@"
ret=$?
else
node "$basedir/../escodegen/bin/escodegen.js" "$@"
ret=$?
fi
exit $ret

17
node_modules/.bin/escodegen.cmd generated vendored Normal file
View File

@@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\escodegen\bin\escodegen.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

18
node_modules/.bin/escodegen.ps1 generated vendored Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../escodegen/bin/escodegen.js" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../escodegen/bin/escodegen.js" $args
$ret=$LASTEXITCODE
}
exit $ret

15
node_modules/.bin/esgenerate generated vendored Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../escodegen/bin/esgenerate.js" "$@"
ret=$?
else
node "$basedir/../escodegen/bin/esgenerate.js" "$@"
ret=$?
fi
exit $ret

17
node_modules/.bin/esgenerate.cmd generated vendored Normal file
View File

@@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\escodegen\bin\esgenerate.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

18
node_modules/.bin/esgenerate.ps1 generated vendored Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../escodegen/bin/esgenerate.js" $args
$ret=$LASTEXITCODE
}
exit $ret

15
node_modules/.bin/esparse generated vendored Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../esprima/bin/esparse.js" "$@"
ret=$?
else
node "$basedir/../esprima/bin/esparse.js" "$@"
ret=$?
fi
exit $ret

17
node_modules/.bin/esparse.cmd generated vendored Normal file
View File

@@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\esprima\bin\esparse.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

18
node_modules/.bin/esparse.ps1 generated vendored Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../esprima/bin/esparse.js" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../esprima/bin/esparse.js" $args
$ret=$LASTEXITCODE
}
exit $ret

15
node_modules/.bin/esvalidate generated vendored Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../esprima/bin/esvalidate.js" "$@"
ret=$?
else
node "$basedir/../esprima/bin/esvalidate.js" "$@"
ret=$?
fi
exit $ret

17
node_modules/.bin/esvalidate.cmd generated vendored Normal file
View File

@@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\esprima\bin\esvalidate.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

18
node_modules/.bin/esvalidate.ps1 generated vendored Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../esprima/bin/esvalidate.js" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../esprima/bin/esvalidate.js" $args
$ret=$LASTEXITCODE
}
exit $ret

15
node_modules/.bin/javascript-obfuscator generated vendored Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../javascript-obfuscator/bin/javascript-obfuscator" "$@"
ret=$?
else
node "$basedir/../javascript-obfuscator/bin/javascript-obfuscator" "$@"
ret=$?
fi
exit $ret

17
node_modules/.bin/javascript-obfuscator.cmd generated vendored Normal file
View File

@@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\javascript-obfuscator\bin\javascript-obfuscator" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

18
node_modules/.bin/javascript-obfuscator.ps1 generated vendored Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../javascript-obfuscator/bin/javascript-obfuscator" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../javascript-obfuscator/bin/javascript-obfuscator" $args
$ret=$LASTEXITCODE
}
exit $ret

15
node_modules/.bin/mkdirp generated vendored Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@"
ret=$?
else
node "$basedir/../mkdirp/bin/cmd.js" "$@"
ret=$?
fi
exit $ret

17
node_modules/.bin/mkdirp.cmd generated vendored Normal file
View File

@@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

18
node_modules/.bin/mkdirp.ps1 generated vendored Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args
$ret=$LASTEXITCODE
}
exit $ret

15
node_modules/.bin/opencollective generated vendored Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/../@nuxtjs/opencollective/bin/opencollective.js" "$@"
ret=$?
else
node "$basedir/../@nuxtjs/opencollective/bin/opencollective.js" "$@"
ret=$?
fi
exit $ret

17
node_modules/.bin/opencollective.cmd generated vendored Normal file
View File

@@ -0,0 +1,17 @@
@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe" (
SET "_prog=%dp0%\node.exe"
) ELSE (
SET "_prog=node"
SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%" "%dp0%\..\@nuxtjs\opencollective\bin\opencollective.js" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

18
node_modules/.bin/opencollective.ps1 generated vendored Normal file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
& "$basedir/node$exe" "$basedir/../@nuxtjs/opencollective/bin/opencollective.js" $args
$ret=$LASTEXITCODE
} else {
& "node$exe" "$basedir/../@nuxtjs/opencollective/bin/opencollective.js" $args
$ret=$LASTEXITCODE
}
exit $ret

86
node_modules/@gradecam/tsenum/README.md generated vendored Normal file
View File

@@ -0,0 +1,86 @@
Description
===========
Typescript supports enum now, but there are times when you may want a little more flexibility than
built-in enums give you; this package was adapted from an example in a gist linked from a typescript
issue which I cannot now find, but suffice it to say that though we have modified it a bit the idea
is not original to us.
Installing
==========
npm install --save @gradecam/tsenum
Basic Usage
===========
import {MakeEnum, TypeFromEnum} from 'tsenum';
const Colors = MakeEnum({
Red: 'red',
Blue: 'blue',
Green: 'green',
Violet: 'violet',
Black: 'black'
});
type Colors = TypeFromEnum<typeof Colors>;
// type Colors = 'red' | 'blue' | 'green' | 'violet' | 'black'
// value Colors is a frozen object with the keys expected
// typeof Colors.Red is 'red', et al
carColor: Colors = 'red'; // valid
carColor = Colors.Green; // valid
carColor = 'yellow'; // typescript error, not a valid color
Combining types
===============
MakeEnum will merge multiple enum objects into one (up to 9), allowing you to combine types.
import {MakeEnum, TypeFromEnum} from 'tsenum';
const PrimaryColors = MakeEnum({
Red: 'red',
Blue: 'blue',
Green: 'green',
});
type PrimaryColors = TypeFromEnum<typeof PrimaryColors>;
const SecondaryColors = MakeEnum({
Yellow: 'yellow',
Cyan: 'cyan',
Magenta: 'magenta'
});
type SecondaryColors = TypeFromEnum<typeof SecondaryColors>;
const AllColors = MakeEnum(PrimaryColors, SecondaryColors);
type AllColors = TypeFromEnum<typeof AllColors>;
// type AllColors = 'red' | 'blue' | 'green' | 'yellow' | 'cyan' | 'magenta'
Getting an array of possible values
===================================
Sometimes you may want an array of possible values, such as when defining an enum type in a mongoose
schema. Since the enum is an object, you can use `Object.values` to get that:
import {MakeEnum, TypeFromEnum} from 'tsenum';
const PrimaryColors = MakeEnum({
Red: 'red',
Blue: 'blue',
Green: 'green',
});
type PrimaryColors = TypeFromEnum<typeof PrimaryColors>;
const PrimaryColorList = Object.values(PrimaryColors); // ['red', 'blue', 'green']
// typeof PrimaryColorList = Array<'red'|'blue'|'green'>
Allowed value types
===================
Currently you can use any string, number, or boolean as a value

131
node_modules/@gradecam/tsenum/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,131 @@
/**
* These are the valid value types to use with the enum; enum must use a string
* indexor but the value can be any of these types:
*/
declare type ValidEnumTypes = number | string | boolean;
/**
* Use this along with TypeFromEnum to make a "fake" frozen enum which can be
* used in place of an enum in ways that are mongoose-friendly and much more
* flexible than a typescript enum. Example:
*
* const MyEnum = MakeEnum({
* key1: "value1",
* key2: "value2",
* key3: "value3",
* });
* type MyEnum = TypeFromEnum<typeof MyEnum>;
*
* // MyEnum will be type 'value1' | 'value2' | 'value3'
* // MyEnum.key1, etc al work
* // Object.values(MyEnum) will return ["value1", "value2", "value3"] e.g. for use in a mongoose enum
* // assigning something of type MyEnum to the string value works
*
* You can also pass in multiple objects (or multiple enums created with this
* helper) and the result will combine them with the actual value using Object.assign
*
* @param x Enum object to create a typed enum for
*/
declare function MakeEnum<T1 extends {
[index: string]: U;
}, U extends ValidEnumTypes>(x1: T1): Readonly<T1>;
declare function MakeEnum<T1 extends {
[index: string]: U;
}, T2 extends {
[index: string]: U;
}, U extends ValidEnumTypes>(x1: T1, x2: T2): Readonly<T1 & T2>;
declare function MakeEnum<T1 extends {
[index: string]: U;
}, T2 extends {
[index: string]: U;
}, T3 extends {
[index: string]: U;
}, U extends ValidEnumTypes>(x1: T1, x2: T2, x3: T3): Readonly<T1 & T2 & T3>;
declare function MakeEnum<T1 extends {
[index: string]: U;
}, T2 extends {
[index: string]: U;
}, T3 extends {
[index: string]: U;
}, T4 extends {
[index: string]: U;
}, U extends ValidEnumTypes>(x1: T1, x2: T2, x3: T3, x4: T4): Readonly<T1 & T2 & T3 & T4>;
declare function MakeEnum<T1 extends {
[index: string]: U;
}, T2 extends {
[index: string]: U;
}, T3 extends {
[index: string]: U;
}, T4 extends {
[index: string]: U;
}, T5 extends {
[index: string]: U;
}, U extends ValidEnumTypes>(x1: T1, x2: T2, x3: T3, x4: T4, x5: T5): Readonly<T1 & T2 & T3 & T4 & T5>;
declare function MakeEnum<T1 extends {
[index: string]: U;
}, T2 extends {
[index: string]: U;
}, T3 extends {
[index: string]: U;
}, T4 extends {
[index: string]: U;
}, T5 extends {
[index: string]: U;
}, T6 extends {
[index: string]: U;
}, U extends ValidEnumTypes>(x1: T1, x2: T2, x3: T3, x4: T4, x5: T5, x6: T6): Readonly<T1 & T2 & T3 & T4 & T5 & T6>;
declare function MakeEnum<T1 extends {
[index: string]: U;
}, T2 extends {
[index: string]: U;
}, T3 extends {
[index: string]: U;
}, T4 extends {
[index: string]: U;
}, T5 extends {
[index: string]: U;
}, T6 extends {
[index: string]: U;
}, T7 extends {
[index: string]: U;
}, U extends ValidEnumTypes>(x1: T1, x2: T2, x3: T3, x4: T4, x5: T5, x6: T6, x7: T7): Readonly<T1 & T2 & T3 & T4 & T5 & T6 & T7>;
declare function MakeEnum<T1 extends {
[index: string]: U;
}, T2 extends {
[index: string]: U;
}, T3 extends {
[index: string]: U;
}, T4 extends {
[index: string]: U;
}, T5 extends {
[index: string]: U;
}, T6 extends {
[index: string]: U;
}, T7 extends {
[index: string]: U;
}, T8 extends {
[index: string]: U;
}, U extends ValidEnumTypes>(x1: T1, x2: T2, x3: T3, x4: T4, x5: T5, x6: T6, x7: T7, x8: T8): Readonly<T1 & T2 & T3 & T4 & T5 & T6 & T7 & T8>;
declare function MakeEnum<T1 extends {
[index: string]: U;
}, T2 extends {
[index: string]: U;
}, T3 extends {
[index: string]: U;
}, T4 extends {
[index: string]: U;
}, T5 extends {
[index: string]: U;
}, T6 extends {
[index: string]: U;
}, T7 extends {
[index: string]: U;
}, T8 extends {
[index: string]: U;
}, T9 extends {
[index: string]: U;
}, U extends ValidEnumTypes>(x1: T1, x2: T2, x3: T3, x4: T4, x5: T5, x6: T6, x7: T7, x8: T8, x9: T9): Readonly<T1 & T2 & T3 & T4 & T5 & T6 & T7 & T8 & T9>;
/**
* Use this with MakeEnum. See docs for MakeEnum for example
*/
declare type TypeFromEnum<T extends object> = (T)[keyof T];
export { MakeEnum, TypeFromEnum };

55
node_modules/@gradecam/tsenum/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = factory(require, exports);
if (v !== undefined) module.exports = v;
}
else if (typeof define === "function" && define.amd) {
define(["require", "exports"], factory);
}
})(function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var freeze = function freezeDefault(obj) {
return Object.freeze.apply(Object, arguments);
};
if (typeof Object.freeze !== 'function') {
// Fallback in case Object.freeze isn't supported
freeze = function (v) { return v; };
}
// Object.assign polyfill taken from
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill
if (typeof Object.assign !== 'function') {
// Must be writable: true, enumerable: false, configurable: true
Object.defineProperty(Object, "assign", {
value: function assign(target, varArgs) {
'use strict';
if (target === null || target === undefined) {
throw new TypeError('Cannot convert undefined or null to object');
}
var to = Object(target);
for (var index = 1; index < arguments.length; index++) {
var nextSource = arguments[index];
if (nextSource !== null && nextSource !== undefined) {
for (var nextKey in nextSource) {
// Avoid bugs when hasOwnProperty is shadowed
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
to[nextKey] = nextSource[nextKey];
}
}
}
}
return to;
},
writable: true,
configurable: true
});
}
function MakeEnum() {
var x = [];
for (var _i = 0; _i < arguments.length; _i++) {
x[_i] = arguments[_i];
}
return freeze(Object.assign.apply(Object, [{}].concat(x)));
}
exports.MakeEnum = MakeEnum;
});

63
node_modules/@gradecam/tsenum/package.json generated vendored Normal file
View File

@@ -0,0 +1,63 @@
{
"_from": "@gradecam/tsenum@1.2.0",
"_id": "@gradecam/tsenum@1.2.0",
"_inBundle": false,
"_integrity": "sha512-61kSGjcgHBncY1WJ1Fc6VwMgHyMWMQ9A8oconZ3iYizWDKKV64JVYDFTRH/vGmaKlTQb0PXAhRzY7qnIBvYikw==",
"_location": "/@gradecam/tsenum",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@gradecam/tsenum@1.2.0",
"name": "@gradecam/tsenum",
"escapedName": "@gradecam%2ftsenum",
"scope": "@gradecam",
"rawSpec": "1.2.0",
"saveSpec": null,
"fetchSpec": "1.2.0"
},
"_requiredBy": [
"/javascript-obfuscator"
],
"_resolved": "https://registry.npmjs.org/@gradecam/tsenum/-/tsenum-1.2.0.tgz",
"_shasum": "0c7c7c86e00e2d9ab8f242c695bec66b26b79319",
"_spec": "@gradecam/tsenum@1.2.0",
"_where": "C:\\Users\\Shaun\\.CocosCreator\\packages\\ccc-obfuscated-code\\node_modules\\javascript-obfuscator",
"author": {
"name": "Richard Bateman",
"email": "rbateman@gradecam.com"
},
"bugs": {
"url": "https://github.com/gradecam/tsenum/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Super simple typescript library for string-compatible enums",
"devDependencies": {
"bower": "^1.8.8",
"typescript": "~3.2.2"
},
"files": [
"dist/"
],
"homepage": "https://github.com/gradecam/tsenum#readme",
"keywords": [
"typescript",
"enum"
],
"license": "ISC",
"main": "dist/index.js",
"name": "@gradecam/tsenum",
"repository": {
"type": "git",
"url": "git+https://github.com/gradecam/tsenum.git"
},
"scripts": {
"build": "tsc -p .",
"clean": "rm -rf dist/",
"prepublish": "tsc -p .",
"test": "echo \"Error: no test specified\" && exit 1"
},
"types": "dist/index.d.ts",
"version": "1.2.0"
}

58
node_modules/@nuxtjs/opencollective/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,58 @@
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
<a name="0.2.2"></a>
## [0.2.2](https://github.com/nuxt-community/opencollective/compare/v0.2.1...v0.2.2) (2019-04-02)
### Bug Fixes
* properly hide message ([#6](https://github.com/nuxt-community/opencollective/issues/6)) ([ed2efb0](https://github.com/nuxt-community/opencollective/commit/ed2efb0))
<a name="0.2.1"></a>
## [0.2.1](https://github.com/nuxt-community/opencollective/compare/v0.2.0...v0.2.1) (2018-12-12)
### Bug Fixes
* **bin:** force exit process ([#4](https://github.com/nuxt-community/opencollective/issues/4)) ([b5b0a81](https://github.com/nuxt-community/opencollective/commit/b5b0a81))
* gracefully handle network errors ([#3](https://github.com/nuxt-community/opencollective/issues/3)) ([04df30a](https://github.com/nuxt-community/opencollective/commit/04df30a))
<a name="0.2.0"></a>
# [0.2.0](https://github.com/nuxt-community/opencollective/compare/v0.1.0...v0.2.0) (2018-11-25)
### Bug Fixes
* **ci:** add build step ([d8e7314](https://github.com/nuxt-community/opencollective/commit/d8e7314))
### Features
* update consola and esm dependencies ([714ca65](https://github.com/nuxt-community/opencollective/commit/714ca65))
### Performance Improvements
* **pkg:** use CJS dist for smaller package and faster startup ([2ade457](https://github.com/nuxt-community/opencollective/commit/2ade457))
<a name="0.1.0"></a>
# 0.1.0 (2018-09-02)
### Bug Fixes
* legacy logo query ([c1b5b91](https://github.com/nuxt-community/opencollective/commit/c1b5b91))
* print donation text and url ([1d54f60](https://github.com/nuxt-community/opencollective/commit/1d54f60))
### Features
* make it work ([8d1cb6e](https://github.com/nuxt-community/opencollective/commit/8d1cb6e))

21
node_modules/@nuxtjs/opencollective/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 Nuxt Community
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

112
node_modules/@nuxtjs/opencollective/README.md generated vendored Normal file
View File

@@ -0,0 +1,112 @@
# @nuxtjs/opencollective 🤝 Pretty opencollective stats on postinstall!
[![npm (scoped with tag)](https://img.shields.io/npm/v/@nuxtjs/opencollective/latest.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/opencollective)
[![npm](https://img.shields.io/npm/dt/@nuxtjs/opencollective.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/opencollective)
[![CircleCI](https://img.shields.io/circleci/project/github/nuxt/opencollective.svg?style=flat-square)](https://circleci.com/gh/nuxt/opencollective)
[![Codecov](https://img.shields.io/codecov/c/github/nuxt/opencollective.svg?style=flat-square)](https://codecov.io/gh/nuxt/opencollective)
[![Dependencies](https://david-dm.org/nuxt/opencollective/status.svg?style=flat-square)](https://david-dm.org/nuxt/opencollective)
[![js-standard-style](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com)
![Showcase](https://i.imgur.com/PZqyT3x.jpg)
>
[📖 **Release Notes**](./CHANGELOG.md)
## Features
Displaying **opencollective** statistics and a donation URL after users install a package
is important for many creators. After problems with current packages that offer similar
features, we decided to spin off our one own. Our key goals are:
* No interference/problems when installing packages. Never break installation because of the package
* Pretty output for all information
* Decent configurability
* Seamless drop-in for [common](https://github.com/opencollective/opencollective-cli) [solutions](https://github.com/opencollective/opencollective-postinstall)
## Setup
- Add `@nuxtjs/opencollective` dependency using yarn or npm to your project
- Add the script to `postinstall` in your package.json
```js
{
// ...
"scripts": {
"postinstall": "opencollective || exit 0"
},
"collective": {
"url": "https://opencollective.com/nuxtjs"
}
// ...
}
```
- Configure it
## Configuration
Configuration is applied through your project's `package.json`.
A full configuration looks like:
```json
{
"collective": {
"url": "https://opencollective.com/nuxtjs",
"logoUrl": "https://opencollective.com/nuxtjs/logo.txt?reverse=true&variant=variant2",
"donation": {
"slug": "/order/591",
"amount": "50",
"text": "Please donate:"
}
}
}
```
---
| Attribute | Optional | Default | Comment |
| --- | --- | --- | --- |
| url | ❌ | - | The URL to your opencollective page
| logo | ✅ | - | **LEGACY**: The URL to the logo that should be displayed. Please use `logoUrl` instead.
| logoUrl | ✅ | - | The URL to the ASCII-logo that should be displayed.
| donation.slug | ✅ | '/donate' | The slug that should be appended to `url`. Can be used to setup a specific order.
| donation.amount | ✅ | - | The default amount that should be selected on the opencollective page.
| donation.text | ✅ | 'Donate:' | The text that will be displayed before your donation url.
## Disable message
We know the postinstall messages can be annoying when deploying in
production or running a CI pipeline. That's why the message is
**disabled** in those environments by default.
**Enabled** when one the following environment variables is set:
* `NODE_ENV=dev`
* `NODE_ENV=development`
* `OPENCOLLECTIVE_FORCE`
**Strictly Disabled** when one the following environment variables is set:
- `OC_POSTINSTALL_TEST`
- `OPENCOLLECTIVE_HIDE`
- `CI`
- `CONTINUOUS_INTEGRATION`
- `NODE_ENV` (set and **not** `dev` or `development`)
## Development
- Clone this repository
- Install dependencies using `yarn install` or `npm install`
- Run it manually `path/to/project/root/src/index.js path/to/package/you/want/to/try`
- Run tests with `npm t` or `yarn test`
## Inspiration
This project is heavily inspired by [opencollective-cli](https://github.com/opencollective/opencollective-cli).
## License
[MIT License](./LICENSE)
Copyright (c) Alexander Lichter <npm@lichter.io>

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env node
require('../dist/opencollective.cjs')
.init(process.argv.length > 2 ? process.argv[2] : '.')
.then(() => process.exit(0))
.catch(() => process.exit(1))

View File

@@ -0,0 +1,379 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var consola = _interopDefault(require('consola'));
var child_process = require('child_process');
var chalk = _interopDefault(require('chalk'));
var path = _interopDefault(require('path'));
var fs = _interopDefault(require('fs'));
var fetch = _interopDefault(require('node-fetch'));
const reportAndThrowError = msg => {
report(msg);
throw new Error(msg);
};
const report = message => {
consola.debug({
message: String(message),
tag: 'opencollective'
});
};
const hideMessage = (env = process.env) => {
// Show message if it is forced
if (env.OPENCOLLECTIVE_FORCE) {
return false;
} // Don't show after oracle postinstall
if (env.OC_POSTINSTALL_TEST) {
return true;
} // Don't show if opted-out
if (env.OPENCOLLECTIVE_HIDE) {
return true;
} // Don't show if on CI
if (env.CI || env.CONTINUOUS_INTEGRATION) {
return true;
} // Only show in dev environment
return Boolean(env.NODE_ENV) && !['dev', 'development'].includes(env.NODE_ENV);
};
const formatMoney = currency => amount => {
amount = amount / 100; // converting cents
const precision = 0;
return amount.toLocaleString(currency, {
style: 'currency',
currency: currency,
minimumFractionDigits: precision,
maximumFractionDigits: precision
});
};
const isWin32 = process.platform === 'win32';
const stripLeadingSlash = s => s.startsWith('/') ? s.substring(1) : s;
const stripTrailingSlash = s => s.endsWith('/') ? s.slice(0, -1) : s;
/* eslint-disable no-console */
const print = (color = null) => (str = '') => {
const terminalCols = retrieveCols();
const strLength = str.replace(/\u001b\[[0-9]{2}m/g, '').length;
const leftPaddingLength = Math.floor((terminalCols - strLength) / 2);
const leftPadding = ' '.repeat(Math.max(leftPaddingLength, 0));
if (color) {
str = chalk[color](str);
}
console.log(leftPadding, str);
};
const retrieveCols = (() => {
let result = false;
return () => {
if (result) {
return result;
}
const defaultCols = 80;
try {
const terminalCols = child_process.execSync(`tput cols`, {
stdio: ['pipe', 'pipe', 'ignore']
});
result = parseInt(terminalCols.toString()) || defaultCols;
} catch (e) {
result = defaultCols;
}
return result;
};
})();
const printStats = (stats, color) => {
if (!stats) {
return;
}
const colored = print(color);
const bold = print('bold');
const formatWithCurrency = formatMoney(stats.currency);
colored(`Number of contributors: ${stats.contributorsCount}`);
colored(`Number of backers: ${stats.backersCount}`);
colored(`Annual budget: ${formatWithCurrency(stats.yearlyIncome)}`);
bold(`Current balance: ${formatWithCurrency(stats.balance)}`, 'bold');
};
const printLogo = logoText => {
if (!logoText) {
return;
}
logoText.split('\n').forEach(print('blue'));
};
/**
* Only show emoji on OSx (Windows shell doesn't like them that much ¯\_(ツ)_/¯ )
* @param {*} emoji
*/
const emoji = emoji => process.stdout.isTTY && !isWin32 ? emoji : '';
function printFooter(collective) {
const dim = print('dim');
const yellow = print('yellow');
const emptyLine = print();
yellow(`Thanks for installing ${collective.slug} ${emoji('🙏')}`);
dim(`Please consider donating to our open collective`);
dim(`to help us maintain this package.`);
emptyLine();
printStats(collective.stats);
emptyLine();
print()(`${chalk.bold(`${emoji('👉 ')} ${collective.donationText}`)} ${chalk.underline(collective.donationUrl)}`);
emptyLine();
}
function _slicedToArray(arr, i) {
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
}
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
function _iterableToArrayLimit(arr, i) {
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
const FETCH_TIMEOUT = 3000;
const fetchJson = url => new Promise(function ($return, $error) {
var $Try_1_Post = function () {
try {
return $return();
} catch ($boundEx) {
return $error($boundEx);
}
};
var $Try_1_Catch = function (e) {
try {
report(e);
reportAndThrowError(`Could not fetch ${url}.json`);
return $Try_1_Post();
} catch ($boundEx) {
return $error($boundEx);
}
};
try {
return Promise.resolve(global.fetch(`${url}.json`, {
timeout: FETCH_TIMEOUT
})).then(function ($await_5) {
try {
return $return($await_5.json());
} catch ($boundEx) {
return $Try_1_Catch($boundEx);
}
}, $Try_1_Catch);
} catch (e) {
$Try_1_Catch(e);
}
});
const fetchStats = collectiveUrl$$1 => new Promise(function ($return, $error) {
var $Try_2_Post = function () {
try {
return $return();
} catch ($boundEx) {
return $error($boundEx);
}
};
var $Try_2_Catch = function (e) {
try {
report(e);
report(`Could not load the stats for ${collectiveSlugFromUrl(collectiveUrl$$1)}`);
return $Try_2_Post();
} catch ($boundEx) {
return $error($boundEx);
}
};
try {
return Promise.resolve(fetchJson(collectiveUrl$$1)).then($return, $Try_2_Catch);
} catch (e) {
$Try_2_Catch(e);
}
});
const fetchLogo = logoUrl => new Promise(function ($return, $error) {
if (!logoUrl) {
// Silent return if no logo has been provided
return $return();
}
if (!logoUrl.match(/^https?:\/\//)) {
reportAndThrowError(`Your logo URL isn't well-formatted - ${logoUrl}`);
}
var $Try_3_Post = function () {
try {
return $return();
} catch ($boundEx) {
return $error($boundEx);
}
};
var $Try_3_Catch = function (e) {
try {
report(`Error while fetching logo from ${logoUrl}`);
return $Try_3_Post();
} catch ($boundEx) {
return $error($boundEx);
}
};
try {
let res;
return Promise.resolve(global.fetch(logoUrl, {
timeout: FETCH_TIMEOUT
})).then(function ($await_7) {
try {
res = $await_7;
if (isLogoResponseWellFormatted(res)) {
return $return(res.text());
}
report(`Error while fetching logo from ${logoUrl}. The response wasn't well-formatted`);
return $Try_3_Post();
} catch ($boundEx) {
return $Try_3_Catch($boundEx);
}
}, $Try_3_Catch);
} catch (e) {
$Try_3_Catch(e);
}
});
const isLogoResponseWellFormatted = res => res.status === 200 && res.headers.get('content-type').match(/^text\/plain/);
const fetchPkg = pathToPkg => {
const fullPathToPkg = path.resolve(`${pathToPkg}/package.json`);
try {
return JSON.parse(fs.readFileSync(fullPathToPkg, 'utf8'));
} catch (e) {
reportAndThrowError(`Could not find package.json at ${fullPathToPkg}`);
}
};
const collectiveSlugFromUrl = url => url.substr(url.lastIndexOf('/') + 1).toLowerCase().replace(/\.json/g, '');
const collectiveUrl = pkg => {
const url = pkg.collective && pkg.collective.url;
if (!url) {
reportAndThrowError('No collective URL set!');
}
return stripTrailingSlash(url);
}; // use pkg.collective.logo for "legacy"/compatibility reasons
const collectiveLogoUrl = pkg => pkg.collective.logo || pkg.collective.logoUrl || false;
const collectiveDonationText = pkg => pkg.collective.donation && pkg.collective.donation.text || 'Donate:';
const getCollective = pkgPath => new Promise(function ($return, $error) {
let pkg, url, baseCollective, logoUrl, promises, _ref, _ref2, stats, logo;
pkg = fetchPkg(pkgPath);
url = collectiveUrl(pkg);
baseCollective = {
url,
slug: collectiveSlugFromUrl(url),
logoUrl: collectiveLogoUrl(pkg),
donationUrl: collectiveDonationUrl(pkg),
donationText: collectiveDonationText(pkg)
};
logoUrl = baseCollective.logoUrl;
promises = [fetchStats(url)].concat(logoUrl ? fetchLogo(logoUrl) : []);
return Promise.resolve(Promise.all(promises)).then(function ($await_1) {
try {
_ref = $await_1, _ref2 = _slicedToArray(_ref, 2), stats = _ref2[0], logo = _ref2[1];
return $return(Object.assign(baseCollective, {
stats,
logo
}));
} catch ($boundEx) {
return $error($boundEx);
}
}, $error);
});
const collectiveDonationUrl = pkg => {
const defaultDonationAmount = pkg.collective.donation && pkg.collective.donation.amount;
let donateUrl = `${collectiveUrl(pkg)}/${retrieveDonationSlug(pkg)}`;
if (defaultDonationAmount) {
return `${donateUrl}/${defaultDonationAmount}`;
}
return donateUrl;
};
const retrieveDonationSlug = pkg => {
const rawDonationSlug = pkg.collective.donation && pkg.collective.donation.slug;
if (!rawDonationSlug) {
return 'donate';
}
return stripLeadingSlash(rawDonationSlug);
};
function init(path$$1, hide = hideMessage()) {
return new Promise(function ($return, $error) {
let collective;
if (hide) {
return $return();
}
global.fetch = global.fetch || fetch;
return Promise.resolve(getCollective(path$$1)).then(function ($await_1) {
try {
collective = $await_1;
printLogo(collective.logo);
printFooter(collective);
return $return();
} catch ($boundEx) {
return $error($boundEx);
}
}, $error);
});
}
exports.init = init;

View File

@@ -0,0 +1,228 @@
'use strict';
const escapeStringRegexp = require('escape-string-regexp');
const ansiStyles = require('ansi-styles');
const stdoutColor = require('supports-color').stdout;
const template = require('./templates.js');
const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');
// `supportsColor.level` → `ansiStyles.color[name]` mapping
const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];
// `color-convert` models to exclude from the Chalk API due to conflicts and such
const skipModels = new Set(['gray']);
const styles = Object.create(null);
function applyOptions(obj, options) {
options = options || {};
// Detect level if not set manually
const scLevel = stdoutColor ? stdoutColor.level : 0;
obj.level = options.level === undefined ? scLevel : options.level;
obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
}
function Chalk(options) {
// We check for this.template here since calling `chalk.constructor()`
// by itself will have a `this` of a previously constructed chalk object
if (!this || !(this instanceof Chalk) || this.template) {
const chalk = {};
applyOptions(chalk, options);
chalk.template = function () {
const args = [].slice.call(arguments);
return chalkTag.apply(null, [chalk.template].concat(args));
};
Object.setPrototypeOf(chalk, Chalk.prototype);
Object.setPrototypeOf(chalk.template, chalk);
chalk.template.constructor = Chalk;
return chalk.template;
}
applyOptions(this, options);
}
// Use bright blue on Windows as the normal blue color is illegible
if (isSimpleWindowsTerm) {
ansiStyles.blue.open = '\u001B[94m';
}
for (const key of Object.keys(ansiStyles)) {
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
styles[key] = {
get() {
const codes = ansiStyles[key];
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
}
};
}
styles.visible = {
get() {
return build.call(this, this._styles || [], true, 'visible');
}
};
ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
for (const model of Object.keys(ansiStyles.color.ansi)) {
if (skipModels.has(model)) {
continue;
}
styles[model] = {
get() {
const level = this.level;
return function () {
const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
const codes = {
open,
close: ansiStyles.color.close,
closeRe: ansiStyles.color.closeRe
};
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
};
}
};
}
ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
if (skipModels.has(model)) {
continue;
}
const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
styles[bgModel] = {
get() {
const level = this.level;
return function () {
const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
const codes = {
open,
close: ansiStyles.bgColor.close,
closeRe: ansiStyles.bgColor.closeRe
};
return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
};
}
};
}
const proto = Object.defineProperties(() => {}, styles);
function build(_styles, _empty, key) {
const builder = function () {
return applyStyle.apply(builder, arguments);
};
builder._styles = _styles;
builder._empty = _empty;
const self = this;
Object.defineProperty(builder, 'level', {
enumerable: true,
get() {
return self.level;
},
set(level) {
self.level = level;
}
});
Object.defineProperty(builder, 'enabled', {
enumerable: true,
get() {
return self.enabled;
},
set(enabled) {
self.enabled = enabled;
}
});
// See below for fix regarding invisible grey/dim combination on Windows
builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';
// `__proto__` is used because we must return a function, but there is
// no way to create a function with a different prototype
builder.__proto__ = proto; // eslint-disable-line no-proto
return builder;
}
function applyStyle() {
// Support varags, but simply cast to string in case there's only one arg
const args = arguments;
const argsLen = args.length;
let str = String(arguments[0]);
if (argsLen === 0) {
return '';
}
if (argsLen > 1) {
// Don't slice `arguments`, it prevents V8 optimizations
for (let a = 1; a < argsLen; a++) {
str += ' ' + args[a];
}
}
if (!this.enabled || this.level <= 0 || !str) {
return this._empty ? '' : str;
}
// Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
// see https://github.com/chalk/chalk/issues/58
// If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
const originalDim = ansiStyles.dim.open;
if (isSimpleWindowsTerm && this.hasGrey) {
ansiStyles.dim.open = '';
}
for (const code of this._styles.slice().reverse()) {
// Replace any instances already present with a re-opening code
// otherwise only the part of the string until said closing code
// will be colored, and the rest will simply be 'plain'.
str = code.open + str.replace(code.closeRe, code.open) + code.close;
// Close the styling before a linebreak and reopen
// after next line to fix a bleed issue on macOS
// https://github.com/chalk/chalk/pull/92
str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
}
// Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
ansiStyles.dim.open = originalDim;
return str;
}
function chalkTag(chalk, strings) {
if (!Array.isArray(strings)) {
// If chalk() was called by itself or with a string,
// return the string itself as a string.
return [].slice.call(arguments, 1).join(' ');
}
const args = [].slice.call(arguments, 2);
const parts = [strings.raw[0]];
for (let i = 1; i < strings.length; i++) {
parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
parts.push(String(strings.raw[i]));
}
return template(chalk, parts.join(''));
}
Object.defineProperties(Chalk.prototype, styles);
module.exports = Chalk(); // eslint-disable-line new-cap
module.exports.supportsColor = stdoutColor;
module.exports.default = module.exports; // For TypeScript

View File

@@ -0,0 +1,93 @@
// @flow strict
type TemplateStringsArray = $ReadOnlyArray<string>;
export type Level = $Values<{
None: 0,
Basic: 1,
Ansi256: 2,
TrueColor: 3
}>;
export type ChalkOptions = {|
enabled?: boolean,
level?: Level
|};
export type ColorSupport = {|
level: Level,
hasBasic: boolean,
has256: boolean,
has16m: boolean
|};
export interface Chalk {
(...text: string[]): string,
(text: TemplateStringsArray, ...placeholders: string[]): string,
constructor(options?: ChalkOptions): Chalk,
enabled: boolean,
level: Level,
rgb(r: number, g: number, b: number): Chalk,
hsl(h: number, s: number, l: number): Chalk,
hsv(h: number, s: number, v: number): Chalk,
hwb(h: number, w: number, b: number): Chalk,
bgHex(color: string): Chalk,
bgKeyword(color: string): Chalk,
bgRgb(r: number, g: number, b: number): Chalk,
bgHsl(h: number, s: number, l: number): Chalk,
bgHsv(h: number, s: number, v: number): Chalk,
bgHwb(h: number, w: number, b: number): Chalk,
hex(color: string): Chalk,
keyword(color: string): Chalk,
+reset: Chalk,
+bold: Chalk,
+dim: Chalk,
+italic: Chalk,
+underline: Chalk,
+inverse: Chalk,
+hidden: Chalk,
+strikethrough: Chalk,
+visible: Chalk,
+black: Chalk,
+red: Chalk,
+green: Chalk,
+yellow: Chalk,
+blue: Chalk,
+magenta: Chalk,
+cyan: Chalk,
+white: Chalk,
+gray: Chalk,
+grey: Chalk,
+blackBright: Chalk,
+redBright: Chalk,
+greenBright: Chalk,
+yellowBright: Chalk,
+blueBright: Chalk,
+magentaBright: Chalk,
+cyanBright: Chalk,
+whiteBright: Chalk,
+bgBlack: Chalk,
+bgRed: Chalk,
+bgGreen: Chalk,
+bgYellow: Chalk,
+bgBlue: Chalk,
+bgMagenta: Chalk,
+bgCyan: Chalk,
+bgWhite: Chalk,
+bgBlackBright: Chalk,
+bgRedBright: Chalk,
+bgGreenBright: Chalk,
+bgYellowBright: Chalk,
+bgBlueBright: Chalk,
+bgMagentaBright: Chalk,
+bgCyanBright: Chalk,
+bgWhiteBrigh: Chalk,
supportsColor: ColorSupport
};
declare module.exports: Chalk;

View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,103 @@
{
"_from": "chalk@^2.4.1",
"_id": "chalk@2.4.2",
"_inBundle": false,
"_integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"_location": "/@nuxtjs/opencollective/chalk",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "chalk@^2.4.1",
"name": "chalk",
"escapedName": "chalk",
"rawSpec": "^2.4.1",
"saveSpec": null,
"fetchSpec": "^2.4.1"
},
"_requiredBy": [
"/@nuxtjs/opencollective"
],
"_resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"_shasum": "cd42541677a54333cf541a49108c1432b44c9424",
"_spec": "chalk@^2.4.1",
"_where": "C:\\Users\\Shaun\\.CocosCreator\\packages\\ccc-obfuscated-code\\node_modules\\@nuxtjs\\opencollective",
"bugs": {
"url": "https://github.com/chalk/chalk/issues"
},
"bundleDependencies": false,
"dependencies": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
"deprecated": false,
"description": "Terminal string styling done right",
"devDependencies": {
"ava": "*",
"coveralls": "^3.0.0",
"execa": "^0.9.0",
"flow-bin": "^0.68.0",
"import-fresh": "^2.0.0",
"matcha": "^0.7.0",
"nyc": "^11.0.2",
"resolve-from": "^4.0.0",
"typescript": "^2.5.3",
"xo": "*"
},
"engines": {
"node": ">=4"
},
"files": [
"index.js",
"templates.js",
"types/index.d.ts",
"index.js.flow"
],
"homepage": "https://github.com/chalk/chalk#readme",
"keywords": [
"color",
"colour",
"colors",
"terminal",
"console",
"cli",
"string",
"str",
"ansi",
"style",
"styles",
"tty",
"formatting",
"rgb",
"256",
"shell",
"xterm",
"log",
"logging",
"command-line",
"text"
],
"license": "MIT",
"name": "chalk",
"repository": {
"type": "git",
"url": "git+https://github.com/chalk/chalk.git"
},
"scripts": {
"bench": "matcha benchmark.js",
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava"
},
"types": "types/index.d.ts",
"version": "2.4.2",
"xo": {
"envs": [
"node",
"mocha"
],
"ignores": [
"test/_flow.js"
]
}
}

View File

@@ -0,0 +1,314 @@
<h1 align="center">
<br>
<br>
<img width="320" src="media/logo.svg" alt="Chalk">
<br>
<br>
<br>
</h1>
> Terminal string styling done right
[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs)
### [See what's new in Chalk 2](https://github.com/chalk/chalk/releases/tag/v2.0.0)
<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" alt="" width="900">
## Highlights
- Expressive API
- Highly performant
- Ability to nest styles
- [256/Truecolor color support](#256-and-truecolor-color-support)
- Auto-detects color support
- Doesn't extend `String.prototype`
- Clean and focused
- Actively maintained
- [Used by ~23,000 packages](https://www.npmjs.com/browse/depended/chalk) as of December 31, 2017
## Install
```console
$ npm install chalk
```
<a href="https://www.patreon.com/sindresorhus">
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
</a>
## Usage
```js
const chalk = require('chalk');
console.log(chalk.blue('Hello world!'));
```
Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
```js
const chalk = require('chalk');
const log = console.log;
// Combine styled and normal strings
log(chalk.blue('Hello') + ' World' + chalk.red('!'));
// Compose multiple styles using the chainable API
log(chalk.blue.bgRed.bold('Hello world!'));
// Pass in multiple arguments
log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'));
// Nest styles
log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!'));
// Nest styles of the same type even (color, underline, background)
log(chalk.green(
'I am a green line ' +
chalk.blue.underline.bold('with a blue substring') +
' that becomes green again!'
));
// ES2015 template literal
log(`
CPU: ${chalk.red('90%')}
RAM: ${chalk.green('40%')}
DISK: ${chalk.yellow('70%')}
`);
// ES2015 tagged template literal
log(chalk`
CPU: {red ${cpu.totalPercent}%}
RAM: {green ${ram.used / ram.total * 100}%}
DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
`);
// Use RGB colors in terminal emulators that support it.
log(chalk.keyword('orange')('Yay for orange colored text!'));
log(chalk.rgb(123, 45, 67).underline('Underlined reddish color'));
log(chalk.hex('#DEADED').bold('Bold gray!'));
```
Easily define your own themes:
```js
const chalk = require('chalk');
const error = chalk.bold.red;
const warning = chalk.keyword('orange');
console.log(error('Error!'));
console.log(warning('Warning!'));
```
Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args):
```js
const name = 'Sindre';
console.log(chalk.green('Hello %s'), name);
//=> 'Hello Sindre'
```
## API
### chalk.`<style>[.<style>...](string, [string...])`
Example: `chalk.red.bold.underline('Hello', 'world');`
Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
Multiple arguments will be separated by space.
### chalk.enabled
Color support is automatically detected, as is the level (see `chalk.level`). However, if you'd like to simply enable/disable Chalk, you can do so via the `.enabled` property.
Chalk is enabled by default unless explicitly disabled via the constructor or `chalk.level` is `0`.
If you need to change this in a reusable module, create a new instance:
```js
const ctx = new chalk.constructor({enabled: false});
```
### chalk.level
Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers.
If you need to change this in a reusable module, create a new instance:
```js
const ctx = new chalk.constructor({level: 0});
```
Levels are as follows:
0. All colors disabled
1. Basic color support (16 colors)
2. 256 color support
3. Truecolor support (16 million colors)
### chalk.supportsColor
Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
## Styles
### Modifiers
- `reset`
- `bold`
- `dim`
- `italic` *(Not widely supported)*
- `underline`
- `inverse`
- `hidden`
- `strikethrough` *(Not widely supported)*
- `visible` (Text is emitted only if enabled)
### Colors
- `black`
- `red`
- `green`
- `yellow`
- `blue` *(On Windows the bright version is used since normal blue is illegible)*
- `magenta`
- `cyan`
- `white`
- `gray` ("bright black")
- `redBright`
- `greenBright`
- `yellowBright`
- `blueBright`
- `magentaBright`
- `cyanBright`
- `whiteBright`
### Background colors
- `bgBlack`
- `bgRed`
- `bgGreen`
- `bgYellow`
- `bgBlue`
- `bgMagenta`
- `bgCyan`
- `bgWhite`
- `bgBlackBright`
- `bgRedBright`
- `bgGreenBright`
- `bgYellowBright`
- `bgBlueBright`
- `bgMagentaBright`
- `bgCyanBright`
- `bgWhiteBright`
## Tagged template literal
Chalk can be used as a [tagged template literal](http://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals).
```js
const chalk = require('chalk');
const miles = 18;
const calculateFeet = miles => miles * 5280;
console.log(chalk`
There are {bold 5280 feet} in a mile.
In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}.
`);
```
Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`).
Template styles are chained exactly like normal Chalk styles. The following two statements are equivalent:
```js
console.log(chalk.bold.rgb(10, 100, 200)('Hello!'));
console.log(chalk`{bold.rgb(10,100,200) Hello!}`);
```
Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain spaces between parameters.
All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped.
## 256 and Truecolor color support
Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps.
Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red).
Examples:
- `chalk.hex('#DEADED').underline('Hello, world!')`
- `chalk.keyword('orange')('Some orange text')`
- `chalk.rgb(15, 100, 204).inverse('Hello!')`
Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `keyword` for foreground colors and `bgKeyword` for background colors).
- `chalk.bgHex('#DEADED').underline('Hello, world!')`
- `chalk.bgKeyword('orange')('Some orange text')`
- `chalk.bgRgb(15, 100, 204).inverse('Hello!')`
The following color models can be used:
- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')`
- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')`
- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')`
- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')`
- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')`
- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')`
- `ansi16`
- `ansi256`
## Windows
If you're on Windows, do yourself a favor and use [`cmder`](http://cmder.net/) instead of `cmd.exe`.
## Origin story
[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative.
## Related
- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module
- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal
- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes
- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream
- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes
- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models
- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal
- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings
- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings
- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal
## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-)
## License
MIT

View File

@@ -0,0 +1,128 @@
'use strict';
const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
const ESCAPES = new Map([
['n', '\n'],
['r', '\r'],
['t', '\t'],
['b', '\b'],
['f', '\f'],
['v', '\v'],
['0', '\0'],
['\\', '\\'],
['e', '\u001B'],
['a', '\u0007']
]);
function unescape(c) {
if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) {
return String.fromCharCode(parseInt(c.slice(1), 16));
}
return ESCAPES.get(c) || c;
}
function parseArguments(name, args) {
const results = [];
const chunks = args.trim().split(/\s*,\s*/g);
let matches;
for (const chunk of chunks) {
if (!isNaN(chunk)) {
results.push(Number(chunk));
} else if ((matches = chunk.match(STRING_REGEX))) {
results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
} else {
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
}
}
return results;
}
function parseStyle(style) {
STYLE_REGEX.lastIndex = 0;
const results = [];
let matches;
while ((matches = STYLE_REGEX.exec(style)) !== null) {
const name = matches[1];
if (matches[2]) {
const args = parseArguments(name, matches[2]);
results.push([name].concat(args));
} else {
results.push([name]);
}
}
return results;
}
function buildStyle(chalk, styles) {
const enabled = {};
for (const layer of styles) {
for (const style of layer.styles) {
enabled[style[0]] = layer.inverse ? null : style.slice(1);
}
}
let current = chalk;
for (const styleName of Object.keys(enabled)) {
if (Array.isArray(enabled[styleName])) {
if (!(styleName in current)) {
throw new Error(`Unknown Chalk style: ${styleName}`);
}
if (enabled[styleName].length > 0) {
current = current[styleName].apply(current, enabled[styleName]);
} else {
current = current[styleName];
}
}
}
return current;
}
module.exports = (chalk, tmp) => {
const styles = [];
const chunks = [];
let chunk = [];
// eslint-disable-next-line max-params
tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
if (escapeChar) {
chunk.push(unescape(escapeChar));
} else if (style) {
const str = chunk.join('');
chunk = [];
chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
styles.push({inverse, styles: parseStyle(style)});
} else if (close) {
if (styles.length === 0) {
throw new Error('Found extraneous } in Chalk template literal');
}
chunks.push(buildStyle(chalk, styles)(chunk.join('')));
chunk = [];
styles.pop();
} else {
chunk.push(chr);
}
});
chunks.push(chunk.join(''));
if (styles.length > 0) {
const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
throw new Error(errMsg);
}
return chunks.join('');
};

View File

@@ -0,0 +1,97 @@
// Type definitions for Chalk
// Definitions by: Thomas Sauer <https://github.com/t-sauer>
export const enum Level {
None = 0,
Basic = 1,
Ansi256 = 2,
TrueColor = 3
}
export interface ChalkOptions {
enabled?: boolean;
level?: Level;
}
export interface ChalkConstructor {
new (options?: ChalkOptions): Chalk;
(options?: ChalkOptions): Chalk;
}
export interface ColorSupport {
level: Level;
hasBasic: boolean;
has256: boolean;
has16m: boolean;
}
export interface Chalk {
(...text: string[]): string;
(text: TemplateStringsArray, ...placeholders: string[]): string;
constructor: ChalkConstructor;
enabled: boolean;
level: Level;
rgb(r: number, g: number, b: number): this;
hsl(h: number, s: number, l: number): this;
hsv(h: number, s: number, v: number): this;
hwb(h: number, w: number, b: number): this;
bgHex(color: string): this;
bgKeyword(color: string): this;
bgRgb(r: number, g: number, b: number): this;
bgHsl(h: number, s: number, l: number): this;
bgHsv(h: number, s: number, v: number): this;
bgHwb(h: number, w: number, b: number): this;
hex(color: string): this;
keyword(color: string): this;
readonly reset: this;
readonly bold: this;
readonly dim: this;
readonly italic: this;
readonly underline: this;
readonly inverse: this;
readonly hidden: this;
readonly strikethrough: this;
readonly visible: this;
readonly black: this;
readonly red: this;
readonly green: this;
readonly yellow: this;
readonly blue: this;
readonly magenta: this;
readonly cyan: this;
readonly white: this;
readonly gray: this;
readonly grey: this;
readonly blackBright: this;
readonly redBright: this;
readonly greenBright: this;
readonly yellowBright: this;
readonly blueBright: this;
readonly magentaBright: this;
readonly cyanBright: this;
readonly whiteBright: this;
readonly bgBlack: this;
readonly bgRed: this;
readonly bgGreen: this;
readonly bgYellow: this;
readonly bgBlue: this;
readonly bgMagenta: this;
readonly bgCyan: this;
readonly bgWhite: this;
readonly bgBlackBright: this;
readonly bgRedBright: this;
readonly bgGreenBright: this;
readonly bgYellowBright: this;
readonly bgBlueBright: this;
readonly bgMagentaBright: this;
readonly bgCyanBright: this;
readonly bgWhiteBright: this;
}
declare const chalk: Chalk & { supportsColor: ColorSupport };
export default chalk

113
node_modules/@nuxtjs/opencollective/package.json generated vendored Normal file
View File

@@ -0,0 +1,113 @@
{
"_from": "@nuxtjs/opencollective@0.2.2",
"_id": "@nuxtjs/opencollective@0.2.2",
"_inBundle": false,
"_integrity": "sha512-69gFVDs7mJfNjv9Zs5DFVD+pvBW+k1TaHSOqUWqAyTTfLcKI/EMYQgvEvziRd+zAFtUOoye6MfWh0qvinGISPw==",
"_location": "/@nuxtjs/opencollective",
"_phantomChildren": {
"ansi-styles": "3.2.1",
"escape-string-regexp": "1.0.5",
"supports-color": "5.5.0"
},
"_requested": {
"type": "version",
"registry": true,
"raw": "@nuxtjs/opencollective@0.2.2",
"name": "@nuxtjs/opencollective",
"escapedName": "@nuxtjs%2fopencollective",
"scope": "@nuxtjs",
"rawSpec": "0.2.2",
"saveSpec": null,
"fetchSpec": "0.2.2"
},
"_requiredBy": [
"/javascript-obfuscator"
],
"_resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.2.tgz",
"_shasum": "26a761ebf588cc92a422d7cee996a66bd6e2761e",
"_spec": "@nuxtjs/opencollective@0.2.2",
"_where": "C:\\Users\\Shaun\\.CocosCreator\\packages\\ccc-obfuscated-code\\node_modules\\javascript-obfuscator",
"ava": {
"require": [
"esm"
]
},
"bin": {
"opencollective": "bin/opencollective.js"
},
"bugs": {
"url": "https://github.com/nuxt-community/opencollective/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Alexander Lichter",
"email": "npm@lichter.io"
}
],
"dependencies": {
"chalk": "^2.4.1",
"consola": "^2.3.0",
"node-fetch": "^2.3.0"
},
"deprecated": false,
"description": "[![npm (scoped with tag)](https://img.shields.io/npm/v/@nuxtjs/opencollective/latest.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/opencollective) [![npm](https://img.shields.io/npm/dt/@nuxtjs/opencollective.svg?style=flat-square)](https://npmjs.com/package/@nuxtjs/opencollective) [![CircleCI](https://img.shields.io/circleci/project/github/nuxt/opencollective.svg?style=flat-square)](https://circleci.com/gh/nuxt/opencollective) [![Codecov](https://img.shields.io/codecov/c/github/nuxt/opencollective.svg?style=flat-square)](https://codecov.io/gh/nuxt/opencollective) [![Dependencies](https://david-dm.org/nuxt/opencollective/status.svg?style=flat-square)](https://david-dm.org/nuxt/opencollective) [![js-standard-style](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com)",
"devDependencies": {
"@commitlint/cli": "^7.0.0",
"@commitlint/config-conventional": "^7.0.1",
"ava": "^1.0.0-beta.7",
"bili": "^3.4.2",
"codecov": "^3.0.4",
"eslint": "^5.4.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-ava": "^5.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-promise": "^4.0.0",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^4.7.1",
"esm": "^3.0.84",
"fetch-mock": "^7.2.5",
"husky": "^1.0.0-rc.13",
"nyc": "^13.1.0",
"sinon": "^7.1.1",
"standard-version": "^4.4.0"
},
"engines": {
"node": ">=8.0.0",
"npm": ">=5.0.0"
},
"files": [
"bin",
"dist"
],
"homepage": "https://github.com/nuxt-community/opencollective#readme",
"husky": {
"hooks": {
"pre-commit": "npm run lint",
"commit-msg": "npm run commitlint"
}
},
"license": "MIT",
"main": "dist/opencollective.cjs.js",
"name": "@nuxtjs/opencollective",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/nuxt-community/opencollective.git"
},
"scripts": {
"build": "bili -t node --format cjs src/index.js",
"commitlint": "commitlint -e $GIT_PARAMS",
"coverage": "codecov",
"lint": "eslint src test",
"prepublish": "yarn build",
"release": "standard-version && git push --follow-tags && npm publish",
"test": "yarn lint && yarn test:coverage",
"test:ava": "nyc ava --verbose",
"test:coverage": "nyc --reporter=lcov --reporter=html ava"
},
"version": "0.2.2"
}

21
node_modules/@types/color-name/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/color-name/README.md generated vendored Normal file
View File

@@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/color-name`
# Summary
This package contains type definitions for color-name ( https://github.com/colorjs/color-name ).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/color-name
Additional Details
* Last updated: Wed, 13 Feb 2019 16:16:48 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by Junyoung Clare Jang <https://github.com/Ailrun>.

161
node_modules/@types/color-name/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,161 @@
// Type definitions for color-name 1.1
// Project: https://github.com/colorjs/color-name
// Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Tuple of Red, Green, and Blue
* @example
* // Red = 55, Green = 70, Blue = 0
* const rgb: RGB = [55, 70, 0];
*/
export type RGB = [number, number, number];
export const aliceblue: RGB;
export const antiquewhite: RGB;
export const aqua: RGB;
export const aquamarine: RGB;
export const azure: RGB;
export const beige: RGB;
export const bisque: RGB;
export const black: RGB;
export const blanchedalmond: RGB;
export const blue: RGB;
export const blueviolet: RGB;
export const brown: RGB;
export const burlywood: RGB;
export const cadetblue: RGB;
export const chartreuse: RGB;
export const chocolate: RGB;
export const coral: RGB;
export const cornflowerblue: RGB;
export const cornsilk: RGB;
export const crimson: RGB;
export const cyan: RGB;
export const darkblue: RGB;
export const darkcyan: RGB;
export const darkgoldenrod: RGB;
export const darkgray: RGB;
export const darkgreen: RGB;
export const darkgrey: RGB;
export const darkkhaki: RGB;
export const darkmagenta: RGB;
export const darkolivegreen: RGB;
export const darkorange: RGB;
export const darkorchid: RGB;
export const darkred: RGB;
export const darksalmon: RGB;
export const darkseagreen: RGB;
export const darkslateblue: RGB;
export const darkslategray: RGB;
export const darkslategrey: RGB;
export const darkturquoise: RGB;
export const darkviolet: RGB;
export const deeppink: RGB;
export const deepskyblue: RGB;
export const dimgray: RGB;
export const dimgrey: RGB;
export const dodgerblue: RGB;
export const firebrick: RGB;
export const floralwhite: RGB;
export const forestgreen: RGB;
export const fuchsia: RGB;
export const gainsboro: RGB;
export const ghostwhite: RGB;
export const gold: RGB;
export const goldenrod: RGB;
export const gray: RGB;
export const green: RGB;
export const greenyellow: RGB;
export const grey: RGB;
export const honeydew: RGB;
export const hotpink: RGB;
export const indianred: RGB;
export const indigo: RGB;
export const ivory: RGB;
export const khaki: RGB;
export const lavender: RGB;
export const lavenderblush: RGB;
export const lawngreen: RGB;
export const lemonchiffon: RGB;
export const lightblue: RGB;
export const lightcoral: RGB;
export const lightcyan: RGB;
export const lightgoldenrodyellow: RGB;
export const lightgray: RGB;
export const lightgreen: RGB;
export const lightgrey: RGB;
export const lightpink: RGB;
export const lightsalmon: RGB;
export const lightseagreen: RGB;
export const lightskyblue: RGB;
export const lightslategray: RGB;
export const lightslategrey: RGB;
export const lightsteelblue: RGB;
export const lightyellow: RGB;
export const lime: RGB;
export const limegreen: RGB;
export const linen: RGB;
export const magenta: RGB;
export const maroon: RGB;
export const mediumaquamarine: RGB;
export const mediumblue: RGB;
export const mediumorchid: RGB;
export const mediumpurple: RGB;
export const mediumseagreen: RGB;
export const mediumslateblue: RGB;
export const mediumspringgreen: RGB;
export const mediumturquoise: RGB;
export const mediumvioletred: RGB;
export const midnightblue: RGB;
export const mintcream: RGB;
export const mistyrose: RGB;
export const moccasin: RGB;
export const navajowhite: RGB;
export const navy: RGB;
export const oldlace: RGB;
export const olive: RGB;
export const olivedrab: RGB;
export const orange: RGB;
export const orangered: RGB;
export const orchid: RGB;
export const palegoldenrod: RGB;
export const palegreen: RGB;
export const paleturquoise: RGB;
export const palevioletred: RGB;
export const papayawhip: RGB;
export const peachpuff: RGB;
export const peru: RGB;
export const pink: RGB;
export const plum: RGB;
export const powderblue: RGB;
export const purple: RGB;
export const rebeccapurple: RGB;
export const red: RGB;
export const rosybrown: RGB;
export const royalblue: RGB;
export const saddlebrown: RGB;
export const salmon: RGB;
export const sandybrown: RGB;
export const seagreen: RGB;
export const seashell: RGB;
export const sienna: RGB;
export const silver: RGB;
export const skyblue: RGB;
export const slateblue: RGB;
export const slategray: RGB;
export const slategrey: RGB;
export const snow: RGB;
export const springgreen: RGB;
export const steelblue: RGB;
export const tan: RGB;
export const teal: RGB;
export const thistle: RGB;
export const tomato: RGB;
export const turquoise: RGB;
export const violet: RGB;
export const wheat: RGB;
export const white: RGB;
export const whitesmoke: RGB;
export const yellow: RGB;
export const yellowgreen: RGB;

52
node_modules/@types/color-name/package.json generated vendored Normal file
View File

@@ -0,0 +1,52 @@
{
"_from": "@types/color-name@^1.1.1",
"_id": "@types/color-name@1.1.1",
"_inBundle": false,
"_integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
"_location": "/@types/color-name",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/color-name@^1.1.1",
"name": "@types/color-name",
"escapedName": "@types%2fcolor-name",
"scope": "@types",
"rawSpec": "^1.1.1",
"saveSpec": null,
"fetchSpec": "^1.1.1"
},
"_requiredBy": [
"/chalk/ansi-styles"
],
"_resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
"_shasum": "1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0",
"_spec": "@types/color-name@^1.1.1",
"_where": "C:\\Users\\Shaun\\.CocosCreator\\packages\\ccc-obfuscated-code\\node_modules\\chalk\\node_modules\\ansi-styles",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "Junyoung Clare Jang",
"url": "https://github.com/Ailrun"
}
],
"dependencies": {},
"deprecated": false,
"description": "TypeScript definitions for color-name",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
"license": "MIT",
"main": "",
"name": "@types/color-name",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.0",
"types": "index",
"typesPublisherContentHash": "e22c6881e2dcf766e32142cbb82d9acf9c08258bdf0da8e76c8a448d1be44ac7",
"version": "1.1.1"
}

21
node_modules/@types/minimatch/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/minimatch/README.md generated vendored Normal file
View File

@@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/minimatch`
# Summary
This package contains type definitions for Minimatch (https://github.com/isaacs/minimatch).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/minimatch
Additional Details
* Last updated: Thu, 04 Jan 2018 23:26:01 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by vvakame <https://github.com/vvakame>, Shant Marouti <https://github.com/shantmarouti>.

214
node_modules/@types/minimatch/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,214 @@
// Type definitions for Minimatch 3.0
// Project: https://github.com/isaacs/minimatch
// Definitions by: vvakame <https://github.com/vvakame>
// Shant Marouti <https://github.com/shantmarouti>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Tests a path against the pattern using the options.
*/
declare function M(target: string, pattern: string, options?: M.IOptions): boolean;
declare namespace M {
/**
* Match against the list of files, in the style of fnmatch or glob.
* If nothing is matched, and options.nonull is set,
* then return a list containing the pattern itself.
*/
function match(list: ReadonlyArray<string>, pattern: string, options?: IOptions): string[];
/**
* Returns a function that tests its supplied argument, suitable for use with Array.filter
*/
function filter(pattern: string, options?: IOptions): (element: string, indexed: number, array: ReadonlyArray<string>) => boolean;
/**
* Make a regular expression object from the pattern.
*/
function makeRe(pattern: string, options?: IOptions): RegExp;
let Minimatch: IMinimatchStatic;
interface IOptions {
/**
* Dump a ton of stuff to stderr.
*
* @default false
*/
debug?: boolean;
/**
* Do not expand {a,b} and {1..3} brace sets.
*
* @default false
*/
nobrace?: boolean;
/**
* Disable ** matching against multiple folder names.
*
* @default false
*/
noglobstar?: boolean;
/**
* Allow patterns to match filenames starting with a period,
* even if the pattern does not explicitly have a period in that spot.
*
* @default false
*/
dot?: boolean;
/**
* Disable "extglob" style patterns like +(a|b).
*
* @default false
*/
noext?: boolean;
/**
* Perform a case-insensitive match.
*
* @default false
*/
nocase?: boolean;
/**
* When a match is not found by minimatch.match,
* return a list containing the pattern itself if this option is set.
* Otherwise, an empty list is returned if there are no matches.
*
* @default false
*/
nonull?: boolean;
/**
* If set, then patterns without slashes will be matched against
* the basename of the path if it contains slashes.
*
* @default false
*/
matchBase?: boolean;
/**
* Suppress the behavior of treating #
* at the start of a pattern as a comment.
*
* @default false
*/
nocomment?: boolean;
/**
* Suppress the behavior of treating a leading ! character as negation.
*
* @default false
*/
nonegate?: boolean;
/**
* Returns from negate expressions the same as if they were not negated.
* (Ie, true on a hit, false on a miss.)
*
* @default false
*/
flipNegate?: boolean;
}
interface IMinimatchStatic {
new(pattern: string, options?: IOptions): IMinimatch;
prototype: IMinimatch;
}
interface IMinimatch {
/**
* The original pattern the minimatch object represents.
*/
pattern: string;
/**
* The options supplied to the constructor.
*/
options: IOptions;
/**
* A 2-dimensional array of regexp or string expressions.
*/
set: any[][]; // (RegExp | string)[][]
/**
* A single regular expression expressing the entire pattern.
* Created by the makeRe method.
*/
regexp: RegExp;
/**
* True if the pattern is negated.
*/
negate: boolean;
/**
* True if the pattern is a comment.
*/
comment: boolean;
/**
* True if the pattern is ""
*/
empty: boolean;
/**
* Generate the regexp member if necessary, and return it.
* Will return false if the pattern is invalid.
*/
makeRe(): RegExp; // regexp or boolean
/**
* Return true if the filename matches the pattern, or false otherwise.
*/
match(fname: string): boolean;
/**
* Take a /-split filename, and match it against a single row in the regExpSet.
* This method is mainly for internal use, but is exposed so that it can be used
* by a glob-walker that needs to avoid excessive filesystem calls.
*/
matchOne(files: string[], pattern: string[], partial: boolean): boolean;
/**
* Deprecated. For internal use.
*
* @private
*/
debug(): void;
/**
* Deprecated. For internal use.
*
* @private
*/
make(): void;
/**
* Deprecated. For internal use.
*
* @private
*/
parseNegate(): void;
/**
* Deprecated. For internal use.
*
* @private
*/
braceExpand(pattern: string, options: IOptions): void;
/**
* Deprecated. For internal use.
*
* @private
*/
parse(pattern: string, isSub?: boolean): void;
}
}
export = M;

55
node_modules/@types/minimatch/package.json generated vendored Normal file
View File

@@ -0,0 +1,55 @@
{
"_from": "@types/minimatch@^3.0.3",
"_id": "@types/minimatch@3.0.3",
"_inBundle": false,
"_integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
"_location": "/@types/minimatch",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@types/minimatch@^3.0.3",
"name": "@types/minimatch",
"escapedName": "@types%2fminimatch",
"scope": "@types",
"rawSpec": "^3.0.3",
"saveSpec": null,
"fetchSpec": "^3.0.3"
},
"_requiredBy": [
"/multimatch"
],
"_resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
"_shasum": "3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d",
"_spec": "@types/minimatch@^3.0.3",
"_where": "C:\\Users\\Shaun\\.CocosCreator\\packages\\ccc-obfuscated-code\\node_modules\\multimatch",
"bugs": {
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues"
},
"bundleDependencies": false,
"contributors": [
{
"name": "vvakame",
"url": "https://github.com/vvakame"
},
{
"name": "Shant Marouti",
"url": "https://github.com/shantmarouti"
}
],
"dependencies": {},
"deprecated": false,
"description": "TypeScript definitions for Minimatch",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme",
"license": "MIT",
"main": "",
"name": "@types/minimatch",
"repository": {
"type": "git",
"url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"typeScriptVersion": "2.0",
"typesPublisherContentHash": "e768e36348874adcc93ac67e9c3c7b5fcbd39079c0610ec16e410b8f851308d1",
"version": "3.0.3"
}

21
node_modules/@types/validator/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

16
node_modules/@types/validator/README.md generated vendored Normal file
View File

@@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/validator`
# Summary
This package contains type definitions for validator.js (https://github.com/validatorjs/validator.js).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/validator.
### Additional Details
* Last updated: Tue, 07 Apr 2020 20:54:46 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by [tgfjt](https://github.com/tgfjt), [Ilya Mochalov](https://github.com/chrootsu), [Ayman Nedjmeddine](https://github.com/IOAyman), [Louay Alakkad](https://github.com/louy), [Kacper Polak](https://github.com/kacepe), [Bonggyun Lee](https://github.com/deptno), [Naoto Yokoyama](https://github.com/builtinnya), [Philipp Katz](https://github.com/qqilihq), [Jace Warren](https://github.com/keatz55), [Munif Tanjim](https://github.com/MunifTanjim), and [Vlad Poluch](https://github.com/vlapo).

1304
node_modules/@types/validator/index.d.ts generated vendored Normal file

File diff suppressed because it is too large Load Diff

2
node_modules/@types/validator/lib/blacklist.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.blacklist;

2
node_modules/@types/validator/lib/contains.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.contains;

2
node_modules/@types/validator/lib/equals.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.equals;

2
node_modules/@types/validator/lib/escape.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.escape;

2
node_modules/@types/validator/lib/isAfter.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isAfter;

3
node_modules/@types/validator/lib/isAlpha.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import validator from '../';
export type AlphaLocale = validator.AlphaLocale;
export default validator.isAlpha;

View File

@@ -0,0 +1,3 @@
import validator from '../';
export type AlphanumericLocale = validator.AlphanumericLocale;
export default validator.isAlphanumeric;

2
node_modules/@types/validator/lib/isAscii.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isAscii;

2
node_modules/@types/validator/lib/isBIC.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isBIC;

2
node_modules/@types/validator/lib/isBase32.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isBase32;

2
node_modules/@types/validator/lib/isBase64.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isBase64;

2
node_modules/@types/validator/lib/isBefore.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isBefore;

2
node_modules/@types/validator/lib/isBoolean.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isBoolean;

2
node_modules/@types/validator/lib/isBtcAddress.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isBtcAddress;

3
node_modules/@types/validator/lib/isByteLength.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import validator from '../';
export type IsByteLengthOptions = validator.IsByteLengthOptions;
export default validator.isByteLength;

2
node_modules/@types/validator/lib/isCreditCard.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isCreditCard;

3
node_modules/@types/validator/lib/isCurrency.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import validator from '../';
export type IsCurrencyOptions = validator.IsCurrencyOptions;
export default validator.isCurrency;

2
node_modules/@types/validator/lib/isDataURI.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isDataURI;

4
node_modules/@types/validator/lib/isDecimal.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import validator from '../';
export type IsDecimalOptions = validator.IsDecimalOptions;
export type DecimalLocale = validator.DecimalLocale;
export default validator.isDecimal;

2
node_modules/@types/validator/lib/isDivisibleBy.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isDivisibleBy;

2
node_modules/@types/validator/lib/isEAN.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isEAN;

3
node_modules/@types/validator/lib/isEmail.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import validator from '../';
export type IsEmailOptions = validator.IsEmailOptions;
export default validator.isEmail;

3
node_modules/@types/validator/lib/isEmpty.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import validator from '../';
export type IsEmptyOptions = validator.IsEmptyOptions;
export default validator.isEmpty;

View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isEthereumAddress;

3
node_modules/@types/validator/lib/isFQDN.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import validator from '../';
export type IsFQDNOptions = validator.IsFQDNOptions;
export default validator.isFQDN;

4
node_modules/@types/validator/lib/isFloat.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import validator from '../';
export type FloatLocale = validator.FloatLocale;
export type IsFloatOptions = validator.IsFloatOptions;
export default validator.isFloat;

2
node_modules/@types/validator/lib/isFullWidth.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isFullWidth;

2
node_modules/@types/validator/lib/isHSL.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isHSL;

2
node_modules/@types/validator/lib/isHalfWidth.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isHalfWidth;

3
node_modules/@types/validator/lib/isHash.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import validator from '../';
export type HashAlgorithm = validator.HashAlgorithm;
export default validator.isHash;

2
node_modules/@types/validator/lib/isHexColor.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isHexColor;

2
node_modules/@types/validator/lib/isHexadecimal.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isHexadecimal;

2
node_modules/@types/validator/lib/isIBAN.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isIBAN;

3
node_modules/@types/validator/lib/isIP.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import validator from '../';
export type IPVersion = validator.IPVersion;
export default validator.isIP;

2
node_modules/@types/validator/lib/isIPRange.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isIPRange;

3
node_modules/@types/validator/lib/isISBN.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import validator from '../';
export type ISBNVersion = validator.ISBNVersion;
export default validator.isISBN;

2
node_modules/@types/validator/lib/isISIN.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isISIN;

View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isISO31661Alpha2;

View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isISO31661Alpha3;

3
node_modules/@types/validator/lib/isISO8601.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import validator from '../';
export type IsISO8601Options = validator.IsISO8601Options;
export default validator.isISO8601;

2
node_modules/@types/validator/lib/isISRC.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isISRC;

3
node_modules/@types/validator/lib/isISSN.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import validator from '../';
export type IsISSNOptions = validator.IsISSNOptions;
export default validator.isISSN;

View File

@@ -0,0 +1,3 @@
import validator from '../';
export type IdentityCardLocale = validator.IdentityCardLocale;
export default validator.isIdentityCard;

2
node_modules/@types/validator/lib/isIn.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import validator from '../';
export default validator.isIn;

3
node_modules/@types/validator/lib/isInt.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import validator from '../';
export type IsIntOptions = validator.IsIntOptions;
export default validator.isInt;

Some files were not shown because too many files have changed in this diff Show More