alemonjs 2.1.45 → 2.1.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/README.md CHANGED
@@ -1,14 +1,20 @@
1
1
  ## alemonc
2
2
 
3
- 使用指令来编辑 alemon.config.yaml
3
+ AlemonJS 项目 CLI 工具,用于配置管理、平台管理、版本更新等。
4
4
 
5
- - help
5
+ ### 帮助
6
6
 
7
7
  ```sh
8
8
  npx alemonc -h
9
9
  ```
10
10
 
11
- - add
11
+ ---
12
+
13
+ ### 配置管理
14
+
15
+ 编辑 `alemon.config.yaml`
16
+
17
+ #### add — 添加配置项
12
18
 
13
19
  ```sh
14
20
  alemonc add apps alemonjs-xianyu alemonjs-openai
@@ -20,7 +26,7 @@ apps:
20
26
  - 'alemonjs-openai'
21
27
  ```
22
28
 
23
- - remove
29
+ #### remove — 移除配置项
24
30
 
25
31
  ```sh
26
32
  alemonc remove apps alemonjs-openai
@@ -28,41 +34,143 @@ alemonc remove apps alemonjs-openai
28
34
 
29
35
  ```yaml
30
36
  apps:
31
- - 'alemonjs-openai'
37
+ - 'alemonjs-xianyu'
32
38
  ```
33
39
 
34
- - set
40
+ #### set — 设置配置值
35
41
 
36
42
  ```sh
37
43
  alemonc set login qq
38
44
  ```
39
45
 
40
46
  ```yaml
41
- apps:
42
- - 'alemonjs-openai'
43
47
  login: 'qq'
44
48
  ```
45
49
 
50
+ 支持嵌套路径:
51
+
46
52
  ```sh
47
53
  alemonc set discord.token 123456
48
54
  ```
49
55
 
50
56
  ```yaml
51
- apps:
52
- - 'alemonjs-openai'
53
- login: 'qq'
54
57
  discord:
55
58
  token: 123456
56
59
  ```
57
60
 
58
- - del
61
+ #### get — 获取配置值
62
+
63
+ ```sh
64
+ alemonc get discord.token
65
+ ```
66
+
67
+ #### del — 删除配置项
59
68
 
60
69
  ```sh
61
70
  alemonc del discord
62
71
  ```
63
72
 
64
- ```yaml
65
- apps:
66
- - 'alemonjs-openai'
67
- login: 'qq'
73
+ ---
74
+
75
+ ### 运行
76
+
77
+ #### run — 运行指定脚本
78
+
79
+ ```sh
80
+ alemonc run [script]
81
+ ```
82
+
83
+ #### start — 启动主入口
84
+
85
+ ```sh
86
+ alemonc start
68
87
  ```
88
+
89
+ 读取 `package.json` 中的 `main` 入口并启动。
90
+
91
+ ---
92
+
93
+ ### 版本管理
94
+
95
+ #### version update — 更新 alemonjs 相关包
96
+
97
+ ```sh
98
+ alemonc version update
99
+ ```
100
+
101
+ 读取本地 `package.json`,查找所有 `alemonjs` 和 `@alemonjs/*` 依赖,检查并更新到最新版本。
102
+
103
+ ---
104
+
105
+ ### 项目诊断
106
+
107
+ #### info — 输出项目信息
108
+
109
+ ```sh
110
+ alemonc info
111
+ ```
112
+
113
+ 输出内容包括:
114
+
115
+ - Node.js 版本、系统平台
116
+ - 项目名称、版本
117
+ - 已安装的 alemonjs 相关包及版本
118
+ - `alemon.config.yaml` 配置摘要
119
+ - `.env` 环境变量概览
120
+ - 包管理器检测
121
+
122
+ ---
123
+
124
+ ### 平台管理
125
+
126
+ #### platform add — 安装并注册平台
127
+
128
+ ```sh
129
+ alemonc platform add discord
130
+ alemonc platform add kook
131
+ alemonc platform add qq-bot
132
+ ```
133
+
134
+ 自动安装 `@alemonjs/<name>` 并注册到 `alemon.config.yaml` 的 `platforms` 列表。
135
+
136
+ #### platform remove — 卸载并移除平台
137
+
138
+ ```sh
139
+ alemonc platform remove discord
140
+ ```
141
+
142
+ 卸载包并从配置中清理。
143
+
144
+ #### platform list — 列出已安装平台
145
+
146
+ ```sh
147
+ alemonc platform list
148
+ ```
149
+
150
+ 显示所有已安装的 `@alemonjs/*` 平台包及其注册状态。
151
+
152
+ ---
153
+
154
+ ### 登录配置
155
+
156
+ #### login — 引导式配置平台凭证
157
+
158
+ ```sh
159
+ alemonc login discord
160
+ alemonc login kook
161
+ alemonc login qq-bot
162
+ alemonc login onebot
163
+ alemonc login telegram
164
+ ```
165
+
166
+ 根据平台交互式提示输入所需字段:
167
+
168
+ | 平台 | 必填字段 | 可选字段 |
169
+ | -------- | --------------------- | -------- |
170
+ | discord | token | — |
171
+ | kook | token | — |
172
+ | qq-bot | app_id, token, secret | — |
173
+ | onebot | url | token |
174
+ | telegram | token | proxy |
175
+
176
+ 配置保存到 `alemon.config.yaml`,已有值回车可保留。
package/bin/alemonc.js CHANGED
@@ -2,6 +2,10 @@
2
2
  import { updateConfig } from './updateConfig.js';
3
3
  import { run } from './run.js';
4
4
  import { start } from './start.js';
5
+ import { versionUpdate } from './versionUpdate.js';
6
+ import { info } from './info.js';
7
+ import { platformAdd, platformRemove, platformList } from './platform.js';
8
+ import { login } from './login.js';
5
9
  import { Command } from 'commander';
6
10
  const program = new Command();
7
11
 
@@ -56,6 +60,50 @@ program
56
60
  start();
57
61
  });
58
62
 
63
+ program
64
+ .command('version update')
65
+ .description('检查并更新 alemonjs 和 @alemonjs/* 包到最新版本')
66
+ .action(() => {
67
+ versionUpdate();
68
+ });
69
+
70
+ program
71
+ .command('info')
72
+ .description('输出项目诊断信息')
73
+ .action(() => {
74
+ info();
75
+ });
76
+
77
+ const platformCmd = program.command('platform').description('平台管理');
78
+
79
+ platformCmd
80
+ .command('add <name>')
81
+ .description('安装并注册平台 (如 discord, kook, qq-bot)')
82
+ .action(name => {
83
+ platformAdd(name);
84
+ });
85
+
86
+ platformCmd
87
+ .command('remove <name>')
88
+ .description('卸载并移除平台')
89
+ .action(name => {
90
+ platformRemove(name);
91
+ });
92
+
93
+ platformCmd
94
+ .command('list')
95
+ .description('列出已安装的平台')
96
+ .action(() => {
97
+ platformList();
98
+ });
99
+
100
+ program
101
+ .command('login <platform>')
102
+ .description('引导式配置平台 token (discord, kook, qq-bot, onebot, telegram)')
103
+ .action(platform => {
104
+ login(platform);
105
+ });
106
+
59
107
  program
60
108
  .command('help')
61
109
  .description('获取帮助')
package/bin/info.js ADDED
@@ -0,0 +1,93 @@
1
+ #!/usr/bin/env node
2
+ import { join } from 'path';
3
+ import fs from 'fs';
4
+ import { execSync } from 'child_process';
5
+ import YAML from 'yaml';
6
+
7
+ /**
8
+ * 输出项目诊断信息
9
+ */
10
+ export function info() {
11
+ console.log('=== AlemonJS 项目信息 ===\n');
12
+
13
+ // Node 版本
14
+ console.log(`Node.js: ${process.version}`);
15
+ console.log(`Platform: ${process.platform} ${process.arch}`);
16
+
17
+ // package.json
18
+ const pkgPath = join(process.cwd(), 'package.json');
19
+ if (!fs.existsSync(pkgPath)) {
20
+ console.log('\n未找到 package.json');
21
+ return;
22
+ }
23
+
24
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
25
+ console.log(`项目名: ${pkg.name || '-'}`);
26
+ console.log(`版本: ${pkg.version || '-'}`);
27
+
28
+ // alemonjs 相关依赖
29
+ const depFields = ['dependencies', 'devDependencies'];
30
+ const related = [];
31
+ for (const field of depFields) {
32
+ const deps = pkg[field];
33
+ if (!deps) continue;
34
+ for (const [name, ver] of Object.entries(deps)) {
35
+ if (name === 'alemonjs' || name.startsWith('@alemonjs/')) {
36
+ related.push({ name, ver, dev: field === 'devDependencies' });
37
+ }
38
+ }
39
+ }
40
+
41
+ console.log(`\n--- 已安装平台/依赖 (${related.length}) ---`);
42
+ if (related.length === 0) {
43
+ console.log(' 无');
44
+ } else {
45
+ for (const item of related) {
46
+ const tag = item.dev ? ' (dev)' : '';
47
+ console.log(` ${item.name}@${item.ver}${tag}`);
48
+ }
49
+ }
50
+
51
+ // alemon.config.yaml 摘要
52
+ const configPath = join(process.cwd(), 'alemon.config.yaml');
53
+ if (fs.existsSync(configPath)) {
54
+ const config = YAML.parse(fs.readFileSync(configPath, 'utf8')) ?? {};
55
+ const keys = Object.keys(config);
56
+ console.log(`\n--- 配置摘要 (alemon.config.yaml) ---`);
57
+ if (keys.length === 0) {
58
+ console.log(' 空配置');
59
+ } else {
60
+ for (const key of keys) {
61
+ const val = config[key];
62
+ if (Array.isArray(val)) {
63
+ console.log(` ${key}: [${val.join(', ')}]`);
64
+ } else if (typeof val === 'object' && val !== null) {
65
+ console.log(` ${key}: { ${Object.keys(val).join(', ')} }`);
66
+ } else {
67
+ console.log(` ${key}: ${val}`);
68
+ }
69
+ }
70
+ }
71
+ } else {
72
+ console.log('\n未找到 alemon.config.yaml');
73
+ }
74
+
75
+ // .env 检查
76
+ const envPath = join(process.cwd(), '.env');
77
+ if (fs.existsSync(envPath)) {
78
+ const envContent = fs.readFileSync(envPath, 'utf8');
79
+ const envKeys = envContent
80
+ .split('\n')
81
+ .filter(l => l.trim() && !l.trim().startsWith('#'))
82
+ .map(l => l.split('=')[0].trim())
83
+ .filter(Boolean);
84
+ console.log(`\n--- 环境变量 (.env) ---`);
85
+ console.log(` 已配置 ${envKeys.length} 个变量: ${envKeys.join(', ')}`);
86
+ }
87
+
88
+ // 包管理器
89
+ let pm = 'npm';
90
+ if (fs.existsSync(join(process.cwd(), 'pnpm-lock.yaml'))) pm = 'pnpm';
91
+ else if (fs.existsSync(join(process.cwd(), 'yarn.lock'))) pm = 'yarn';
92
+ console.log(`\n包管理器: ${pm}`);
93
+ }
package/bin/login.js ADDED
@@ -0,0 +1,94 @@
1
+ #!/usr/bin/env node
2
+ import { join } from 'path';
3
+ import fs from 'fs';
4
+ import { createInterface } from 'readline';
5
+ import YAML from 'yaml';
6
+
7
+ const configPath = join(process.cwd(), 'alemon.config.yaml');
8
+
9
+ /**
10
+ * 平台所需的配置字段定义
11
+ */
12
+ const platformFields = {
13
+ discord: [{ key: 'token', label: 'Bot Token', required: true, secret: true }],
14
+ kook: [{ key: 'token', label: 'Bot Token', required: true, secret: true }],
15
+ telegram: [
16
+ { key: 'token', label: 'Bot Token (从 @BotFather 获取)', required: true, secret: true },
17
+ { key: 'proxy', label: '代理地址 (可选, 如 http://127.0.0.1:7890)', required: false }
18
+ ],
19
+ 'qq-bot': [
20
+ { key: 'app_id', label: 'AppID', required: true },
21
+ { key: 'token', label: 'Token', required: true, secret: true },
22
+ { key: 'secret', label: 'AppSecret', required: true, secret: true }
23
+ ],
24
+ onebot: [
25
+ { key: 'url', label: 'WebSocket 地址 (如 ws://127.0.0.1:6700)', required: true },
26
+ { key: 'token', label: 'Access Token (可选)', required: false, secret: true }
27
+ ]
28
+ };
29
+
30
+ /**
31
+ * 提示输入
32
+ */
33
+ function prompt(rl, question) {
34
+ return new Promise(resolve => {
35
+ rl.question(question, answer => {
36
+ resolve(answer.trim());
37
+ });
38
+ });
39
+ }
40
+
41
+ /**
42
+ * 引导式登录配置
43
+ * @param {string} name 平台名
44
+ */
45
+ export async function login(name) {
46
+ const fields = platformFields[name];
47
+ if (!fields) {
48
+ const supported = Object.keys(platformFields).join(', ');
49
+ console.error(`不支持的平台: ${name}`);
50
+ console.log(`支持的平台: ${supported}`);
51
+ process.exit(1);
52
+ }
53
+
54
+ console.log(`\n=== 配置 ${name} 平台 ===\n`);
55
+
56
+ // 读取现有配置
57
+ let config = {};
58
+ if (fs.existsSync(configPath)) {
59
+ config = YAML.parse(fs.readFileSync(configPath, 'utf8')) ?? {};
60
+ }
61
+ const existing = config[name] || {};
62
+
63
+ const rl = createInterface({
64
+ input: process.stdin,
65
+ output: process.stdout
66
+ });
67
+
68
+ const result = { ...existing };
69
+
70
+ for (const field of fields) {
71
+ const current = existing[field.key];
72
+ const mask = field.secret && current ? current.slice(0, 4) + '****' : current;
73
+ const hint = current ? ` [当前: ${mask}, 回车保留]` : field.required ? '' : ' [可选, 回车跳过]';
74
+
75
+ const answer = await prompt(rl, `${field.label}${hint}: `);
76
+
77
+ if (answer) {
78
+ result[field.key] = answer;
79
+ } else if (!current && field.required) {
80
+ console.error(`${field.label} 是必填项`);
81
+ rl.close();
82
+ process.exit(1);
83
+ }
84
+ }
85
+
86
+ rl.close();
87
+
88
+ // 写入配置
89
+ config[name] = result;
90
+ fs.writeFileSync(configPath, YAML.stringify(config));
91
+
92
+ console.log(`\n✓ ${name} 配置已保存到 alemon.config.yaml`);
93
+ console.log(' 提示: 请确保 alemon.config.yaml 已加入 .gitignore,避免泄露密钥');
94
+ }
@@ -0,0 +1,152 @@
1
+ #!/usr/bin/env node
2
+ import { join } from 'path';
3
+ import fs from 'fs';
4
+ import { execSync } from 'child_process';
5
+ import YAML from 'yaml';
6
+
7
+ const configPath = join(process.cwd(), 'alemon.config.yaml');
8
+
9
+ /**
10
+ * 检测包管理器
11
+ */
12
+ function detectPM() {
13
+ if (fs.existsSync(join(process.cwd(), 'pnpm-lock.yaml'))) return 'pnpm';
14
+ if (fs.existsSync(join(process.cwd(), 'yarn.lock'))) return 'yarn';
15
+ return 'npm';
16
+ }
17
+
18
+ /**
19
+ * 读取配置
20
+ */
21
+ function readConfig() {
22
+ if (fs.existsSync(configPath)) {
23
+ return YAML.parse(fs.readFileSync(configPath, 'utf8')) ?? {};
24
+ }
25
+ return {};
26
+ }
27
+
28
+ /**
29
+ * 写入配置
30
+ */
31
+ function writeConfig(config) {
32
+ fs.writeFileSync(configPath, YAML.stringify(config));
33
+ }
34
+
35
+ /**
36
+ * 添加平台
37
+ * @param {string} name 平台名(如 discord, kook, qq-bot)
38
+ */
39
+ export function platformAdd(name) {
40
+ const pkgName = `@alemonjs/${name}`;
41
+ const pm = detectPM();
42
+
43
+ // 1. 检查是否已安装
44
+ const pkgPath = join(process.cwd(), 'package.json');
45
+ if (!fs.existsSync(pkgPath)) {
46
+ console.error('未找到 package.json');
47
+ process.exit(1);
48
+ }
49
+
50
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
51
+ const allDeps = { ...pkg.dependencies, ...pkg.devDependencies };
52
+
53
+ if (allDeps[pkgName]) {
54
+ console.log(`${pkgName} 已安装 (${allDeps[pkgName]})`);
55
+ } else {
56
+ // 2. 安装
57
+ console.log(`正在安装 ${pkgName}...`);
58
+ try {
59
+ const cmd = pm === 'npm' ? `npm install ${pkgName}` : pm === 'pnpm' ? `pnpm add ${pkgName}` : `yarn add ${pkgName}`;
60
+ execSync(cmd, { stdio: 'inherit', timeout: 60000 });
61
+ console.log(`✓ ${pkgName} 安装完成`);
62
+ } catch {
63
+ console.error(`✗ ${pkgName} 安装失败`);
64
+ process.exit(1);
65
+ }
66
+ }
67
+
68
+ // 3. 注册到配置
69
+ const config = readConfig();
70
+ if (!Array.isArray(config.platforms)) {
71
+ config.platforms = [];
72
+ }
73
+ if (!config.platforms.includes(name)) {
74
+ config.platforms.push(name);
75
+ writeConfig(config);
76
+ console.log(`✓ 已将 ${name} 添加到 alemon.config.yaml`);
77
+ } else {
78
+ console.log(`${name} 已在配置中`);
79
+ }
80
+ }
81
+
82
+ /**
83
+ * 移除平台
84
+ * @param {string} name 平台名
85
+ */
86
+ export function platformRemove(name) {
87
+ const pkgName = `@alemonjs/${name}`;
88
+ const pm = detectPM();
89
+
90
+ // 1. 卸载包
91
+ const pkgPath = join(process.cwd(), 'package.json');
92
+ if (fs.existsSync(pkgPath)) {
93
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
94
+ const allDeps = { ...pkg.dependencies, ...pkg.devDependencies };
95
+
96
+ if (allDeps[pkgName]) {
97
+ console.log(`正在卸载 ${pkgName}...`);
98
+ try {
99
+ const cmd = pm === 'npm' ? `npm uninstall ${pkgName}` : pm === 'pnpm' ? `pnpm remove ${pkgName}` : `yarn remove ${pkgName}`;
100
+ execSync(cmd, { stdio: 'inherit', timeout: 60000 });
101
+ console.log(`✓ ${pkgName} 已卸载`);
102
+ } catch {
103
+ console.warn(`✗ ${pkgName} 卸载失败,请手动移除`);
104
+ }
105
+ } else {
106
+ console.log(`${pkgName} 未安装,跳过卸载`);
107
+ }
108
+ }
109
+
110
+ // 2. 从配置中移除
111
+ const config = readConfig();
112
+ if (Array.isArray(config.platforms)) {
113
+ const idx = config.platforms.indexOf(name);
114
+ if (idx !== -1) {
115
+ config.platforms.splice(idx, 1);
116
+ writeConfig(config);
117
+ console.log(`✓ 已从 alemon.config.yaml 移除 ${name}`);
118
+ }
119
+ }
120
+ }
121
+
122
+ /**
123
+ * 列出已安装平台
124
+ */
125
+ export function platformList() {
126
+ const pkgPath = join(process.cwd(), 'package.json');
127
+ if (!fs.existsSync(pkgPath)) {
128
+ console.error('未找到 package.json');
129
+ return;
130
+ }
131
+
132
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
133
+ const allDeps = { ...pkg.dependencies, ...pkg.devDependencies };
134
+ const installed = Object.keys(allDeps).filter(n => n.startsWith('@alemonjs/'));
135
+
136
+ const config = readConfig();
137
+ const configured = Array.isArray(config.platforms) ? config.platforms : [];
138
+
139
+ console.log('=== 平台列表 ===\n');
140
+
141
+ if (installed.length === 0) {
142
+ console.log('未安装任何 @alemonjs/* 平台包');
143
+ return;
144
+ }
145
+
146
+ for (const name of installed) {
147
+ const short = name.replace('@alemonjs/', '');
148
+ const inConfig = configured.includes(short);
149
+ const ver = allDeps[name];
150
+ console.log(` ${inConfig ? '●' : '○'} ${short} (${ver})${inConfig ? '' : ' [未注册到配置]'}`);
151
+ }
152
+ }
@@ -0,0 +1,70 @@
1
+ #!/usr/bin/env node
2
+ import { join } from 'path';
3
+ import fs from 'fs';
4
+ import { execSync } from 'child_process';
5
+
6
+ /**
7
+ * 检查并更新 alemonjs 相关包到最新版本
8
+ */
9
+ export async function versionUpdate() {
10
+ const pkgPath = join(process.cwd(), 'package.json');
11
+
12
+ if (!fs.existsSync(pkgPath)) {
13
+ console.error('未找到 package.json');
14
+ process.exit(1);
15
+ }
16
+
17
+ const raw = fs.readFileSync(pkgPath, 'utf8');
18
+ const pkg = JSON.parse(raw);
19
+
20
+ const depFields = ['dependencies', 'devDependencies'];
21
+ const matched = [];
22
+
23
+ for (const field of depFields) {
24
+ const deps = pkg[field];
25
+ if (!deps) continue;
26
+ for (const name of Object.keys(deps)) {
27
+ if (name === 'alemonjs' || name.startsWith('@alemonjs/')) {
28
+ matched.push({ field, name, current: deps[name] });
29
+ }
30
+ }
31
+ }
32
+
33
+ if (matched.length === 0) {
34
+ console.log('未找到 alemonjs 或 @alemonjs/* 相关依赖');
35
+ return;
36
+ }
37
+
38
+ console.log(`找到 ${matched.length} 个相关包,正在查询最新版本...\n`);
39
+
40
+ let updated = 0;
41
+
42
+ for (const item of matched) {
43
+ try {
44
+ const latest = execSync(`npm view ${item.name} version`, {
45
+ encoding: 'utf8',
46
+ timeout: 15000
47
+ }).trim();
48
+
49
+ const currentClean = item.current.replace(/^[\^~>=<]*/, '');
50
+
51
+ if (currentClean === latest) {
52
+ console.log(` ✓ ${item.name} 已是最新 (${latest})`);
53
+ } else {
54
+ const prefix = item.current.match(/^([\^~]?)/)?.[1] ?? '^';
55
+ pkg[item.field][item.name] = `${prefix}${latest}`;
56
+ console.log(` ↑ ${item.name} ${item.current} → ${prefix}${latest}`);
57
+ updated++;
58
+ }
59
+ } catch {
60
+ console.warn(` ✗ ${item.name} 查询失败,跳过`);
61
+ }
62
+ }
63
+
64
+ if (updated > 0) {
65
+ fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
66
+ console.log(`\n已更新 ${updated} 个包,请执行 npm install 安装最新版本`);
67
+ } else {
68
+ console.log('\n所有包均为最新版本');
69
+ }
70
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alemonjs",
3
- "version": "2.1.45",
3
+ "version": "2.1.47",
4
4
  "description": "bot script",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",
@@ -28,8 +28,8 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@koa/cors": "^5.0.0",
31
- "axios": "^1.10.0",
32
- "chalk": "^5.3.0",
31
+ "axios": "^1.14.0",
32
+ "chalk": "^5.6.2",
33
33
  "commander": "^13.1.0",
34
34
  "file-type": "21.0.0",
35
35
  "flatted": "^3.3.3",
@@ -69,5 +69,5 @@
69
69
  "type": "git",
70
70
  "url": "https://github.com/lemonade-lab/alemonjs.git"
71
71
  },
72
- "gitHead": "743b70375f728a1584ae149bbadcd04378540ade"
73
- }
72
+ "gitHead": "c6aa5616afe091a37610dad22fbb2d2618d943b8"
73
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2013-present, Yuxi (Evan) You
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIdED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.