@maiyunnet/kebab 2.0.7 → 2.0.9
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/index.d.ts +11 -1
- package/index.js +13 -1
- package/lib/buffer.d.ts +25 -0
- package/lib/buffer.js +30 -5
- package/lib/captcha.d.ts +15 -0
- package/lib/captcha.js +20 -0
- package/lib/consistent.d.ts +51 -0
- package/lib/consistent.js +59 -0
- package/lib/core.d.ts +134 -0
- package/lib/core.js +176 -0
- package/lib/crypto.d.ts +75 -6
- package/lib/crypto.js +206 -38
- package/lib/db.d.ts +104 -0
- package/lib/db.js +126 -0
- package/lib/dns.d.ts +51 -0
- package/lib/dns.js +54 -2
- package/lib/fs.d.ts +100 -0
- package/lib/fs.js +118 -0
- package/lib/jwt.d.ts +43 -0
- package/lib/jwt.js +45 -0
- package/lib/kv.d.ts +362 -0
- package/lib/kv.js +377 -0
- package/lib/lan.d.ts +6 -0
- package/lib/lan.js +7 -0
- package/lib/net/formdata.d.ts +38 -0
- package/lib/net/formdata.js +43 -0
- package/lib/net/request.d.ts +62 -0
- package/lib/net/request.js +57 -0
- package/lib/net/response.d.ts +21 -0
- package/lib/net/response.js +16 -0
- package/lib/net.d.ts +86 -0
- package/lib/net.js +140 -0
- package/lib/s3.d.ts +52 -0
- package/lib/s3.js +51 -0
- package/lib/scan.d.ts +52 -0
- package/lib/scan.js +84 -0
- package/lib/session.d.ts +31 -0
- package/lib/session.js +52 -1
- package/lib/sql.d.ts +176 -0
- package/lib/sql.js +287 -2
- package/lib/ssh/sftp.d.ts +106 -0
- package/lib/ssh/sftp.js +106 -0
- package/lib/ssh/shell.d.ts +37 -0
- package/lib/ssh/shell.js +31 -0
- package/lib/ssh.d.ts +32 -0
- package/lib/ssh.js +32 -0
- package/lib/text.d.ts +131 -0
- package/lib/text.js +188 -0
- package/lib/time.d.ts +53 -0
- package/lib/time.js +55 -0
- package/lib/ws.d.ts +68 -0
- package/lib/ws.js +74 -0
- package/lib/zip.d.ts +53 -0
- package/lib/zip.js +73 -0
- package/lib/zlib.d.ts +76 -0
- package/lib/zlib.js +78 -0
- package/main.d.ts +5 -0
- package/main.js +12 -0
- package/package.json +3 -2
- package/sys/child.js +104 -0
- package/sys/cmd.js +28 -0
- package/sys/ctr.d.ts +166 -0
- package/sys/ctr.js +177 -0
- package/sys/master.js +63 -0
- package/sys/mod.d.ts +266 -0
- package/sys/mod.js +335 -0
- package/sys/route.d.ts +34 -0
- package/sys/route.js +164 -0
- package/www/example/ctr/test.d.ts +3 -0
- package/www/example/ctr/test.js +63 -1
- package/www/example/mod/test.js +14 -0
- package/www/example/mod/testdata.js +9 -0
- package/www/example/ws/test.js +1 -0
- package/.VSCodeCounter/2025-02-14_14-46-44/details.md +0 -82
- package/.VSCodeCounter/2025-02-14_14-46-44/diff-details.md +0 -15
- package/.VSCodeCounter/2025-02-14_14-46-44/diff.csv +0 -2
- package/.VSCodeCounter/2025-02-14_14-46-44/diff.md +0 -19
- package/.VSCodeCounter/2025-02-14_14-46-44/diff.txt +0 -22
- package/.VSCodeCounter/2025-02-14_14-46-44/results.csv +0 -69
- package/.VSCodeCounter/2025-02-14_14-46-44/results.json +0 -1
- package/.VSCodeCounter/2025-02-14_14-46-44/results.md +0 -48
- package/.VSCodeCounter/2025-02-14_14-46-44/results.txt +0 -118
- package/.vscode/tasks.json +0 -15
package/www/example/ctr/test.js
CHANGED
|
@@ -36,6 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
// --- 库和定义 ---
|
|
39
40
|
const lCore = __importStar(require("../../../lib/core"));
|
|
40
41
|
const lNet = __importStar(require("../../../lib/net"));
|
|
41
42
|
const lDb = __importStar(require("../../../lib/db"));
|
|
@@ -57,6 +58,7 @@ const lBuffer = __importStar(require("../../../lib/buffer"));
|
|
|
57
58
|
const lLan = __importStar(require("../../../lib/lan"));
|
|
58
59
|
const sCtr = __importStar(require("../../../sys/ctr"));
|
|
59
60
|
const kebab = __importStar(require("../../../index"));
|
|
61
|
+
// --- mod ---
|
|
60
62
|
const test_1 = __importDefault(require("../mod/test"));
|
|
61
63
|
const testdata_1 = __importDefault(require("../mod/testdata"));
|
|
62
64
|
class default_1 extends sCtr.Ctr {
|
|
@@ -93,6 +95,7 @@ class default_1 extends sCtr.Ctr {
|
|
|
93
95
|
return rtn;
|
|
94
96
|
}
|
|
95
97
|
notfound() {
|
|
98
|
+
// --- Set on route.php ---
|
|
96
99
|
this._httpCode = 404;
|
|
97
100
|
return 'Custom 404 page.';
|
|
98
101
|
}
|
|
@@ -581,6 +584,7 @@ JSON.stringify(result));</pre>` + JSON.stringify(result));
|
|
|
581
584
|
echo.push('<br><br>Test table:');
|
|
582
585
|
stmt = await db.query('SELECT * FROM `m_test` WHERE `token` LIKE \'test_%\' ORDER BY `id` ASC;');
|
|
583
586
|
this._dbTable(stmt, echo);
|
|
587
|
+
// --- explain ---
|
|
584
588
|
const ls = test_1.default.where(db, [
|
|
585
589
|
['time_add', '>', time - 60 * 5]
|
|
586
590
|
], {
|
|
@@ -625,6 +629,7 @@ const r = await ls.explain();</pre>` + lText.htmlescape(JSON.stringify(r)));
|
|
|
625
629
|
echo.push('<tr><th>json</th><td>' + JSON.stringify(ft.json) + '</td></tr>');
|
|
626
630
|
echo.push('<tr><th>time_add</th><td>' + ft.time_add.toString() + '</td></tr>');
|
|
627
631
|
echo.push('</table>');
|
|
632
|
+
// --- 修改 point 值 ---
|
|
628
633
|
ft.set('point', {
|
|
629
634
|
'x': 20,
|
|
630
635
|
'y': 20
|
|
@@ -649,6 +654,7 @@ await ft.save();</pre>`);
|
|
|
649
654
|
echo.push('<tr><th>json</th><td>' + JSON.stringify(ft.json) + '</td></tr>');
|
|
650
655
|
echo.push('<tr><th>time_add</th><td>' + ft.time_add.toString() + '</td></tr>');
|
|
651
656
|
echo.push('</table>');
|
|
657
|
+
// --- 再次修改 ---
|
|
652
658
|
ft.set({
|
|
653
659
|
'point': {
|
|
654
660
|
'x': 40,
|
|
@@ -718,8 +724,10 @@ CREATE TABLE \`m_test_data_0\` (
|
|
|
718
724
|
\`time_add\` bigint NOT NULL,
|
|
719
725
|
PRIMARY KEY (\`id\`)
|
|
720
726
|
) ENGINE=InnoDB DEFAULT CHARSET=ascii COLLATE=ascii_bin;</pre>m_test_data_0 - m_test_data_4<br><br>`);
|
|
727
|
+
// --- 操作按钮 ---
|
|
721
728
|
echo.push(`<input type="button" value="Create user" onclick="this.value='Waiting...';fetch('${this._config.const.urlBase}test/mod-split1',{method:'GET',headers:{'Content-Type':'application/x-www-form-urlencoded'}}).then(function(r){window.location.href=window.location.href})">
|
|
722
729
|
<input type="button" value="Random post" onclick="this.value='Waiting...';fetch('${this._config.const.urlBase}test/mod-split2',{method:'GET',headers:{'Content-Type':'application/x-www-form-urlencoded'}}).then(function(r){return r.json()}).then(function(j){alert('TESTID:'+j.id+'\\nTABLEINDEX:'+j.index);window.location.href=window.location.href})">`);
|
|
730
|
+
// --- 读取 test 和 test_data 表 ---
|
|
723
731
|
let stmt = await db.query('SELECT * FROM `m_test` ORDER BY `id` DESC LIMIT 0, 20;');
|
|
724
732
|
echo.push('<br><br><b>m_test</b> table:');
|
|
725
733
|
this._dbTable(stmt, echo);
|
|
@@ -763,6 +771,7 @@ CREATE TABLE \`m_test_data_0\` (
|
|
|
763
771
|
return [0, 'The "test" table not found.'];
|
|
764
772
|
}
|
|
765
773
|
const id = ids[lCore.rand(0, ids.length - 1)];
|
|
774
|
+
// --- 一致性 hash ---
|
|
766
775
|
const index = lConsistent.fast(id.toString(), ['0', '1', '2', '3', '4']);
|
|
767
776
|
const testData = testdata_1.default.getCreate(db, {
|
|
768
777
|
'ctr': this,
|
|
@@ -1082,6 +1091,7 @@ JSON.stringify(orig);</pre>${JSON.stringify(orig)}`);
|
|
|
1082
1091
|
orig = lCrypto.aesDecrypt(text || '', 'otherKey');
|
|
1083
1092
|
echo.push(`<pre>orig = lCrypto.aesDecrypt(text || '', 'otherKey');
|
|
1084
1093
|
JSON.stringify(orig);</pre>${JSON.stringify(orig)}`);
|
|
1094
|
+
// ----------
|
|
1085
1095
|
echo.push('<br><br><b>AES-256-CFB:</b>');
|
|
1086
1096
|
const iv = 'iloveuiloveuilov';
|
|
1087
1097
|
text = lCrypto.aesEncrypt('Original text', key, iv);
|
|
@@ -1094,10 +1104,10 @@ JSON.stringify(orig);</pre>${JSON.stringify(orig)}`);
|
|
|
1094
1104
|
orig = lCrypto.aesDecrypt(text || '', key, 'otherIv');
|
|
1095
1105
|
echo.push(`<pre>orig = lCrypto.aesDecrypt(text || '', key, 'otherIv');
|
|
1096
1106
|
orig ? 'true' : 'false';</pre>${orig ? 'true' : 'false'}`);
|
|
1107
|
+
// ----------
|
|
1097
1108
|
echo.push('<br><br><b>AES-256-CBC:</b>');
|
|
1098
1109
|
text = lCrypto.aesEncrypt('Original text', key, iv, lCrypto.AES_256_CBC);
|
|
1099
1110
|
echo.push(`<pre>const key = 'testkeyatestkeyatestkeyatestkeya';
|
|
1100
|
-
const text = lCrypto.aesEncrypt('Original text', key);
|
|
1101
1111
|
text = lCrypto.aesEncrypt('Original text', key, iv, lCrypto.AES_256_CBC);
|
|
1102
1112
|
JSON.stringify(text);</pre>${JSON.stringify(text)}`);
|
|
1103
1113
|
orig = lCrypto.aesDecrypt(text || '', key, iv, lCrypto.AES_256_CBC);
|
|
@@ -1106,6 +1116,26 @@ JSON.stringify(orig);</pre>${JSON.stringify(orig)}`);
|
|
|
1106
1116
|
orig = lCrypto.aesDecrypt(text || '', key, 'otherIv', lCrypto.AES_256_CBC);
|
|
1107
1117
|
echo.push(`<pre>orig = lCrypto.aesDecrypt(text || '', key, 'otherIv', lCrypto.AES_256_CBC);
|
|
1108
1118
|
JSON.stringify(orig);</pre>${JSON.stringify(orig)}`);
|
|
1119
|
+
// --- gcm ---
|
|
1120
|
+
echo.push('<br><br><b>AES-256-GCM (TEXT):</b>');
|
|
1121
|
+
text = lCrypto.gcmEncrypt('Original text', key);
|
|
1122
|
+
echo.push(`<pre>const key = 'testkeyatestkeyatestkeyatestkeya';
|
|
1123
|
+
text = lCrypto.gcmEncrypt('Original text', key);
|
|
1124
|
+
JSON.stringify(text);</pre>${lText.htmlescape(JSON.stringify(text))}`);
|
|
1125
|
+
orig = lCrypto.gcmDecrypt(text || '', key);
|
|
1126
|
+
echo.push(`<pre>orig = lCrypto.gcmDecrypt(text || '', key);
|
|
1127
|
+
JSON.stringify(orig);</pre>${JSON.stringify(orig)}`);
|
|
1128
|
+
echo.push('<br><br><b>AES-256-GCM (BUFFER):</b>');
|
|
1129
|
+
const buffer = lCrypto.gcmEncrypt(Buffer.from('Original text'), key, 'buffer');
|
|
1130
|
+
echo.push(`<pre>const key = 'testkeyatestkeyatestkeyatestkeya';
|
|
1131
|
+
const buffer = lCrypto.gcmEncrypt(Buffer.from('Original text'), key);
|
|
1132
|
+
console.log(buffer);</pre>${buffer ? lText.htmlescape(lText.stringifyBuffer(buffer)) : 'false'}`);
|
|
1133
|
+
const origBuffer = lCrypto.gcmDecrypt(buffer || Buffer.from(''), key, 'buffer');
|
|
1134
|
+
echo.push(`<pre>const origBuffer = lCrypto.gcmDecrypt(buffer || Buffer.from(''), key, 'buffer');
|
|
1135
|
+
console.log(origBuffer);</pre>${origBuffer ? lText.htmlescape(lText.stringifyBuffer(origBuffer)) : 'false'}
|
|
1136
|
+
<pre>JSON.stringify(origBuffer ? origBuffer.toString() : false);</pre>${JSON.stringify(origBuffer ? origBuffer.toString() : false)}`);
|
|
1137
|
+
// ----------
|
|
1138
|
+
echo.push('<br><br><b>EC:</b>');
|
|
1109
1139
|
const res = await lCrypto.generateKeyPair('ec', {
|
|
1110
1140
|
'namedCurve': 'sm2',
|
|
1111
1141
|
'privateKeyEncoding': {
|
|
@@ -1130,6 +1160,7 @@ JSON.stringify(r);</pre>${JSON.stringify(r)}`);
|
|
|
1130
1160
|
async db() {
|
|
1131
1161
|
const echo = [(Math.round(this._getRunTime() * 10000000) / 10000).toString()];
|
|
1132
1162
|
const db = lDb.get(this);
|
|
1163
|
+
// --- 先获取 test 表的情况 ---
|
|
1133
1164
|
let stmt = await db.query('SELECT * FROM `m_test` ORDER BY `id` DESC LIMIT 10;');
|
|
1134
1165
|
if (!stmt.rows) {
|
|
1135
1166
|
return [0, stmt.error ? (stmt.error.message + '(' + stmt.error.errno.toString() + ')') : 'Failed("m_test" not found).'];
|
|
@@ -1138,6 +1169,7 @@ JSON.stringify(r);</pre>${JSON.stringify(r)}`);
|
|
|
1138
1169
|
const stmt = await db.query('SELECT * FROM \`m_test\` ORDER BY \`id\` DESC LIMIT 10;');</pre>`);
|
|
1139
1170
|
this._dbTable(stmt, echo);
|
|
1140
1171
|
echo.push('<br>ms: ' + (Math.round(this._getRunTime() * 10000000) / 10000).toString());
|
|
1172
|
+
// --- 插入 test-token 的条目 ---
|
|
1141
1173
|
const time = lTime.stamp().toString();
|
|
1142
1174
|
let exec = await db.execute('INSERT INTO `m_test` (`token`, `point`, `time_add`) VALUES (\'test-token\', ST_POINTFROMTEXT(\'POINT(10 10)\'), \'' + time + '\');');
|
|
1143
1175
|
let ms = (Math.round(this._getRunTime() * 10000000) / 10000).toString();
|
|
@@ -1163,8 +1195,10 @@ insertId: ${JSON.stringify(insertId)}<br>
|
|
|
1163
1195
|
errno: ${JSON.stringify(exec.error?.errno)}<br>
|
|
1164
1196
|
error: ${JSON.stringify(exec.error)}<br>
|
|
1165
1197
|
ms: ${ms}<br><br>`);
|
|
1198
|
+
// --- 获取最近的一条 ---
|
|
1166
1199
|
stmt = await db.query('SELECT * FROM `m_test` ORDER BY `id` DESC LIMIT 1;');
|
|
1167
1200
|
this._dbTable(stmt, echo);
|
|
1201
|
+
// --- 再次插入 test-token 的条目 ---
|
|
1168
1202
|
exec = await db.execute('INSERT INTO `m_test` (`token`, `point`, `time_add`) VALUES (\'test-token\', ST_POINTFROMTEXT(\'POINT(10 10)\'), \'' + time + '\');');
|
|
1169
1203
|
insertId = exec.packet?.insertId ?? 0;
|
|
1170
1204
|
echo.push(`<pre>exec = await db.execute('INSERT INTO \`m_test\` (\`token\`, \`point\`, \`time_add\`) VALUES (\\'test-token\\', ST_POINTFROMTEXT(\\'POINT(10 10)\\'), \\'' + time + '\\');');
|
|
@@ -1174,6 +1208,7 @@ insertId: ${JSON.stringify(insertId)}<br>
|
|
|
1174
1208
|
errno: ${JSON.stringify(exec.error?.errno)}<br>
|
|
1175
1209
|
error: ${JSON.stringify(exec.error)}<br>
|
|
1176
1210
|
ms: ${(Math.round(this._getRunTime() * 10000000) / 10000).toString()}<br>`);
|
|
1211
|
+
// --- 依据唯一键替换值 ---
|
|
1177
1212
|
exec = await db.execute('REPLACE INTO `m_test` (`token`, `point`, `time_add`) VALUES (\'test-token\', ST_POINTFROMTEXT(\'POINT(20 20)\'), \'' + time + '\');');
|
|
1178
1213
|
insertId = exec.packet?.insertId ?? 0;
|
|
1179
1214
|
echo.push(`<pre>exec = await db.execute('REPLACE INTO \`m_session\` (\`token\`, \`point\`, \`time_add\`) VALUES (\\'test-token\\', ST_POINTFROMTEXT(\\'POINT(20 20)\\'), \\'' + time + '\\');');
|
|
@@ -1183,13 +1218,16 @@ insertId: ${JSON.stringify(insertId)}<br>
|
|
|
1183
1218
|
errno: ${JSON.stringify(exec.error?.errno)}<br>
|
|
1184
1219
|
error: ${JSON.stringify(exec.error)}<br>
|
|
1185
1220
|
ms: ${(Math.round(this._getRunTime() * 10000000) / 10000).toString()}<br><br>`);
|
|
1221
|
+
// --- 显示近 10 条 ---
|
|
1186
1222
|
stmt = await db.query('SELECT * FROM `m_test` ORDER BY `id` DESC LIMIT 10;');
|
|
1187
1223
|
this._dbTable(stmt, echo);
|
|
1224
|
+
// --- explain 开始 ---
|
|
1188
1225
|
const explain = 'EXPLAIN';
|
|
1189
1226
|
stmt = await db.query(explain + ' SELECT * FROM `m_test` LIMIT 10;');
|
|
1190
1227
|
echo.push(`<pre>stmt = await db.query('${explain} SELECT * FROM \`m_test\` LIMIT 10;');</pre>`);
|
|
1191
1228
|
this._dbTable(stmt, echo);
|
|
1192
1229
|
echo.push('<br>ms: ' + (Math.round(this._getRunTime() * 10000000) / 10000).toString());
|
|
1230
|
+
// --- 删除测试添加的 token ---
|
|
1193
1231
|
exec = await db.execute('DELETE FROM `m_test` WHERE `token` = \'test-token\';');
|
|
1194
1232
|
echo.push(`<pre>exec = await db.execute('DELETE FROM \`m_test\` WHERE \`token\` = \\'test-token\\';');</pre>
|
|
1195
1233
|
exec: ${JSON.stringify(exec)}<br><br>`);
|
|
@@ -1344,6 +1382,7 @@ echo[echo.length - 1] = echo[echo.length - 1].slice(0, -4);</pre>`);
|
|
|
1344
1382
|
echo[echo.length - 1] = echo[echo.length - 1].slice(0, -4);
|
|
1345
1383
|
}
|
|
1346
1384
|
else {
|
|
1385
|
+
// --- default ---
|
|
1347
1386
|
echo.push("<pre>JSON.stringify(await kv.exists(['test', 'heheda']));</pre>" + JSON.stringify(await kv.exists(['test', 'heheda'])));
|
|
1348
1387
|
echo.push("<pre>JSON.stringify(await kv.mGet(['test', 'heheda']));</pre>" + JSON.stringify(await kv.mGet(['test', 'heheda'])));
|
|
1349
1388
|
echo.push("<pre>JSON.stringify(await kv.get('test'));</pre>" + JSON.stringify(await kv.get('test')));
|
|
@@ -1912,6 +1951,7 @@ JSON.stringify(this._session);</pre>` + lText.htmlescape(JSON.stringify(this._se
|
|
|
1912
1951
|
'<a href="' + this._config.const.urlBase + 'test">Return</a>' + echo.join('') + '<br><br>' + this._getEnd();
|
|
1913
1952
|
}
|
|
1914
1953
|
else {
|
|
1954
|
+
// --- AUTH 模式 ---
|
|
1915
1955
|
await this._startSession(link, true, { 'ttl': 60 });
|
|
1916
1956
|
if (Object.keys(this._post).length > 0) {
|
|
1917
1957
|
if (this._session['count'] === undefined) {
|
|
@@ -1953,6 +1993,7 @@ Result:<pre id="result">Nothing.</pre>`);
|
|
|
1953
1993
|
echo.push(`const origin = lJwt.getOrigin(this);
|
|
1954
1994
|
JSON.stringify(origin);</pre>`);
|
|
1955
1995
|
echo.push(JSON.stringify(origin));
|
|
1996
|
+
// --- 创建 jwt 对象 ---
|
|
1956
1997
|
const jwt = await lJwt.get(this, {}, link);
|
|
1957
1998
|
echo.push(`<pre>const jwt = lJwt.get(this, {}, ${link ? 'link' : 'undefined'});
|
|
1958
1999
|
JSON.stringify(this._jwt);</pre>`);
|
|
@@ -2041,6 +2082,7 @@ Result:<pre id="result">Nothing.</pre>`);
|
|
|
2041
2082
|
<b>getSql() :</b> ${s}<br>
|
|
2042
2083
|
<b>getData():</b> <pre>${JSON.stringify(sd, undefined, 4)}</pre>
|
|
2043
2084
|
<b>format() :</b> ${sql.format(s, sd)}<hr>`);
|
|
2085
|
+
// --- insert 中使用函数 ---
|
|
2044
2086
|
s = sql.insert('geo').values({ 'point': ['ST_POINTFROMTEXT(?)', ['POINT(122.147775 30.625014)']] }).getSql();
|
|
2045
2087
|
sd = sql.getData();
|
|
2046
2088
|
echo.push(`<pre>sql.insert('geo').values({ 'point': ['ST_POINTFROMTEXT(?)', ['POINT(122.147775 30.625014)']] });</pre>
|
|
@@ -2162,30 +2204,35 @@ Result:<pre id="result">Nothing.</pre>`);
|
|
|
2162
2204
|
break;
|
|
2163
2205
|
}
|
|
2164
2206
|
case 'update': {
|
|
2207
|
+
// --- 1, 2 ---
|
|
2165
2208
|
let s = sql.update('user', [['age', '+', '1'], ['month', '=', '5'], { 'name': 'Serene', 'nick': lSql.column('name') }, ['year', '+', lSql.column('age')]]).where({ 'name': 'Ah' }).getSql();
|
|
2166
2209
|
let sd = sql.getData();
|
|
2167
2210
|
echo.push(`<pre>sql.update('user', [['age', '+', '1'], ['month', '=', '5'], { 'name': 'Serene', 'nick': lSql.column('name') }, ['year', '+', lSql.column('age')]]).where({ 'name': 'Ah' });</pre>
|
|
2168
2211
|
<b>getSql() :</b> ${s}<br>
|
|
2169
2212
|
<b>getData():</b> <pre>${JSON.stringify(sd, undefined, 4)}</pre>
|
|
2170
2213
|
<b>format() :</b> ${sql.format(s, sd)}<hr>`);
|
|
2214
|
+
// --- 3 ---
|
|
2171
2215
|
s = sql.update('user', { 'name': 'Serene', 'type': ['(CASE `id` WHEN 1 THEN ? WHEN 2 THEN ? END)', ['val1', 'val2']] }).where({ 'name': 'Ah' }).getSql();
|
|
2172
2216
|
sd = sql.getData();
|
|
2173
2217
|
echo.push(`<pre>sql.update('user', { 'name': 'Serene', 'type': ['(CASE \`id\` WHEN 1 THEN ? WHEN 2 THEN ? END)', ['val1', 'val2']] }).where({ 'name': 'Ah' });</pre>
|
|
2174
2218
|
<b>getSql() :</b> ${s}<br>
|
|
2175
2219
|
<b>getData():</b> <pre>${JSON.stringify(sd, undefined, 4)}</pre>
|
|
2176
2220
|
<b>format() :</b> ${sql.format(s, sd)}<hr>`);
|
|
2221
|
+
// --- # ---
|
|
2177
2222
|
s = sql.update('user', { 'age': lSql.column('age_verify'), 'date': '#12', 'he': ['he2'] }).where({ 'date_birth': '2001' }).getSql();
|
|
2178
2223
|
sd = sql.getData();
|
|
2179
2224
|
echo.push(`<pre>sql.update('user', { 'age': lSql.column('age_verify'), 'date': '#12', 'he': ['he2'] }).where({ 'date_birth': '2001' });</pre>
|
|
2180
2225
|
<b>getSql() :</b> ${s}<br>
|
|
2181
2226
|
<b>getData():</b> <pre>${JSON.stringify(sd, undefined, 4)}</pre>
|
|
2182
2227
|
<b>format() :</b> ${sql.format(s, sd)}<hr>`);
|
|
2228
|
+
// --- update order limit ---
|
|
2183
2229
|
s = sql.update('user', { 'he': 'he2' }).where([['birth', '>', '2001']]).by('birth').limit(0, 10).getSql();
|
|
2184
2230
|
sd = sql.getData();
|
|
2185
2231
|
echo.push(`<pre>sql.update('user', { 'he': 'he2' }).where([ ['birth', '>', '2001'] ]).by('birth').limit(0, 10);</pre>
|
|
2186
2232
|
<b>getSql() :</b> ${s}<br>
|
|
2187
2233
|
<b>getData():</b> <pre>${JSON.stringify(sd, undefined, 4)}</pre>
|
|
2188
2234
|
<b>format() :</b> ${sql.format(s, sd)}`);
|
|
2235
|
+
// --- json ---
|
|
2189
2236
|
s = sql.update('json', { 'json1': { 'key': 'val', 'key2': 'val2' }, 'json2': [{ 'k1': 'v1' }, { 'k2': 'v2' }], 'json3': { 'x': 1, 'y': 2 }, 'json4': [], 'json5': {} }).where({ 'id': 1 }).getSql();
|
|
2190
2237
|
sd = sql.getData();
|
|
2191
2238
|
echo.push(`<pre>sql.update('json', { 'json1': { 'key': 'val', 'key2': 'val2' }, 'json2': [ { 'k1': 'v1' }, { 'k2': 'v2' } ], 'json3': { 'x': 1, 'y': 2 }, 'json4': [], 'json5': {} }).where({ 'id': 1 });</pre>
|
|
@@ -2401,6 +2448,7 @@ for (const file of files) {
|
|
|
2401
2448
|
echo.push('</table>');
|
|
2402
2449
|
cons.add('srv-sg.test.simu');
|
|
2403
2450
|
const file = files[lCore.rand(0, files.length - 1)];
|
|
2451
|
+
// const file = files[3];
|
|
2404
2452
|
const oldSrv = map[file];
|
|
2405
2453
|
const newSrv = cons.find(file);
|
|
2406
2454
|
echo.push(`<pre>cons.add('srv-sg.test.simu');
|
|
@@ -2417,6 +2465,7 @@ const newSrv = cons.find(file);</pre>`);
|
|
|
2417
2465
|
}
|
|
2418
2466
|
consistentMigration() {
|
|
2419
2467
|
const echo = [];
|
|
2468
|
+
// --- 生成初始数据,5000 条数据分 5 长表 ---
|
|
2420
2469
|
const tables = ['table-0', 'table-1', 'table-2', 'table-3', 'table-4'];
|
|
2421
2470
|
const rows = [];
|
|
2422
2471
|
for (let i = 1; i <= 5000; ++i) {
|
|
@@ -2430,6 +2479,7 @@ const newSrv = cons.find(file);</pre>`);
|
|
|
2430
2479
|
}
|
|
2431
2480
|
echo.push(`<pre>const newTables = ['table-5', 'table-6', 'table-7', 'table-8', 'table-9'];
|
|
2432
2481
|
const rtn = cons.migration(rows, newTables);</pre>`);
|
|
2482
|
+
// --- 即将增长到 10000 条数据,然后先模拟 5 表拆分为 10 表,再查看要迁移哪些数据,迁移量有多少 ---
|
|
2433
2483
|
const newTables = ['table-5', 'table-6', 'table-7', 'table-8', 'table-9'];
|
|
2434
2484
|
const rtn = cons.migration(rows, newTables);
|
|
2435
2485
|
const count = Object.keys(rtn).length;
|
|
@@ -2633,6 +2683,7 @@ function send() {
|
|
|
2633
2683
|
return '<div>Connect "ws' + (this._config.const.https ? 's' : '') + '://' + this._config.const.host + '/test" failed.</div><br>' + this._getEnd();
|
|
2634
2684
|
}
|
|
2635
2685
|
const echo = ['<div>Connected "ws' + (this._config.const.https ? 's' : '') + '://' + this._config.const.host + '/test".</div>'];
|
|
2686
|
+
// --- 绑定事件 ---
|
|
2636
2687
|
await new Promise((resolve) => {
|
|
2637
2688
|
(async () => {
|
|
2638
2689
|
ws.on('message', (frame) => {
|
|
@@ -2652,6 +2703,7 @@ function send() {
|
|
|
2652
2703
|
await lCore.sleep(1000);
|
|
2653
2704
|
ws.end();
|
|
2654
2705
|
})().catch(() => {
|
|
2706
|
+
//
|
|
2655
2707
|
});
|
|
2656
2708
|
});
|
|
2657
2709
|
return echo.join('') + '<br>' + this._getEnd();
|
|
@@ -2667,6 +2719,7 @@ function send() {
|
|
|
2667
2719
|
const port = 22;
|
|
2668
2720
|
const user = 'root';
|
|
2669
2721
|
const pwd = 'xxx';
|
|
2722
|
+
// --- 连接 ssh 服务器 ---
|
|
2670
2723
|
let ms = Date.now();
|
|
2671
2724
|
const ssh = await lSsh.get({
|
|
2672
2725
|
'host': host,
|
|
@@ -2687,6 +2740,7 @@ function send() {
|
|
|
2687
2740
|
return echo.join('') + '<br><br>' + this._getEnd();
|
|
2688
2741
|
}
|
|
2689
2742
|
echo.push(`Connection successful, ${Date.now() - ms}ms.`);
|
|
2743
|
+
// --- 执行一个命令 ---
|
|
2690
2744
|
echo.push(`<pre>const rtn = await ssh.exec('ls');</pre>`);
|
|
2691
2745
|
const rtn = await ssh.exec('ls');
|
|
2692
2746
|
if (!rtn) {
|
|
@@ -2695,6 +2749,7 @@ function send() {
|
|
|
2695
2749
|
}
|
|
2696
2750
|
echo.push(lText.htmlescape(rtn.toString()));
|
|
2697
2751
|
if (this._get['type'] === 'shell') {
|
|
2752
|
+
// --- 获取 shell ---
|
|
2698
2753
|
ms = Date.now();
|
|
2699
2754
|
const shell = await ssh.getShell();
|
|
2700
2755
|
echo.push(`<pre>const shell = await ssh.getShell();</pre>`);
|
|
@@ -2703,6 +2758,7 @@ function send() {
|
|
|
2703
2758
|
return echo.join('') + '<br><br>' + this._getEnd();
|
|
2704
2759
|
}
|
|
2705
2760
|
echo.push(`Get successful, ${Date.now() - ms}ms:<pre>${lText.htmlescape((await shell.getContent()).toString())}</pre>`);
|
|
2761
|
+
// --- 执行一些命令 ---
|
|
2706
2762
|
ms = Date.now();
|
|
2707
2763
|
await shell.sendLine('cd ../../');
|
|
2708
2764
|
echo.push(`await shell.sendLine('cd ../../'), ${Date.now() - ms}ms:<pre>${lText.htmlescape((await shell.getContent()).toString())}</pre>`);
|
|
@@ -2712,6 +2768,7 @@ function send() {
|
|
|
2712
2768
|
await shell.close();
|
|
2713
2769
|
}
|
|
2714
2770
|
else {
|
|
2771
|
+
// --- 获取 sftp ---
|
|
2715
2772
|
ms = Date.now();
|
|
2716
2773
|
const sftp = await ssh.getSftp();
|
|
2717
2774
|
echo.push(`<pre>const sftp = await ssh.getSftp();</pre>`);
|
|
@@ -2780,6 +2837,7 @@ function send() {
|
|
|
2780
2837
|
return echo.join('') + '<br>' + this._getEnd();
|
|
2781
2838
|
}
|
|
2782
2839
|
buffer() {
|
|
2840
|
+
// --- 写 ---
|
|
2783
2841
|
const writer = lBuffer.getWriter(8);
|
|
2784
2842
|
writer.writeUInt8(8);
|
|
2785
2843
|
writer.writeUInt16BE(2024);
|
|
@@ -2790,6 +2848,7 @@ writer.writeUInt8(8);
|
|
|
2790
2848
|
writer.writeUInt16BE(2024);
|
|
2791
2849
|
writer.writeBCDString('1213141516');
|
|
2792
2850
|
const b = writer.get();</pre>${b.toString('hex').replace(/(.{2})/g, '$1 ')}`];
|
|
2851
|
+
// --- 读 ---
|
|
2793
2852
|
const reader = lBuffer.getReader(b);
|
|
2794
2853
|
const rtn = [];
|
|
2795
2854
|
rtn.push(reader.readUInt8());
|
|
@@ -2810,6 +2869,9 @@ rtn.push(reader.readBCDString());</pre>${JSON.stringify(rtn)}`);
|
|
|
2810
2869
|
echo.push(`<pre>await lLan.scan();</pre>` + JSON.stringify(r2));
|
|
2811
2870
|
return echo.join('') + '<br><br>' + this._getEnd();
|
|
2812
2871
|
}
|
|
2872
|
+
/**
|
|
2873
|
+
* --- END ---
|
|
2874
|
+
*/
|
|
2813
2875
|
_getEnd() {
|
|
2814
2876
|
const rt = this._getRunTime();
|
|
2815
2877
|
return 'Processed in ' + rt.toString() + ' second(s), ' + (Math.round(rt * 10000000) / 10000).toString() + 'ms, ' + (Math.round(this._getMemoryUsage() / 1024 * 100) / 100).toString() + ' K.<style>*{font-family:Consolas,"Courier New",Courier,FreeMono,monospace;line-height: 1.5;font-size:12px;}pre{padding:10px;background-color:rgba(0,0,0,.07);white-space:pre-wrap;word-break:break-all;}hr{margin:20px 0;border-color:#000;border-style:dashed;border-width:1px 0 0 0;}td,th{padding:5px;border:solid 1px #000;}</style><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">';
|
package/www/example/mod/test.js
CHANGED
|
@@ -38,7 +38,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
const lCore = __importStar(require("../../../lib/core"));
|
|
40
40
|
const mod_1 = __importDefault(require("../../../sys/mod"));
|
|
41
|
+
/*
|
|
42
|
+
CREATE TABLE `m_test` (
|
|
43
|
+
`id` INT NOT NULL AUTO_INCREMENT,
|
|
44
|
+
`token` CHAR(16) NOT NULL COLLATE 'ascii_bin',
|
|
45
|
+
`point` POINT NOT NULL,
|
|
46
|
+
`polygon` POLYGON NULL DEFAULT NULL,
|
|
47
|
+
`json` JSON NULL DEFAULT NULL,
|
|
48
|
+
`time_add` BIGINT NOT NULL,
|
|
49
|
+
PRIMARY KEY (`id`) USING BTREE,
|
|
50
|
+
UNIQUE INDEX `token` (`token`) USING BTREE,
|
|
51
|
+
INDEX `time_add` (`time_add`) USING BTREE
|
|
52
|
+
) ENGINE=InnoDB COLLATE=utf8mb4_general_ci;
|
|
53
|
+
*/
|
|
41
54
|
class default_1 extends mod_1.default {
|
|
55
|
+
/* eslint-enable */
|
|
42
56
|
_keyGenerator() {
|
|
43
57
|
return 'test_' + lCore.rand(0, 5).toString();
|
|
44
58
|
}
|
|
@@ -4,6 +4,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const mod_1 = __importDefault(require("../../../sys/mod"));
|
|
7
|
+
/*
|
|
8
|
+
CREATE TABLE `m_test_data_0` (
|
|
9
|
+
`id` bigint NOT NULL AUTO_INCREMENT,
|
|
10
|
+
`test_id` bigint NOT NULL,
|
|
11
|
+
`content` varchar(128) COLLATE ascii_bin NOT NULL,
|
|
12
|
+
`time_add` bigint NOT NULL,
|
|
13
|
+
PRIMARY KEY (`id`)
|
|
14
|
+
) ENGINE=InnoDB DEFAULT CHARSET=ascii COLLATE=ascii_bin;
|
|
15
|
+
*/
|
|
7
16
|
class default_1 extends mod_1.default {
|
|
8
17
|
}
|
|
9
18
|
default_1._$table = 'test_data';
|
package/www/example/ws/test.js
CHANGED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# Details
|
|
2
|
-
|
|
3
|
-
Date : 2025-02-14 14:46:44
|
|
4
|
-
|
|
5
|
-
Directory d:\\sync\\www\\project\\maiyun\\Kebab
|
|
6
|
-
|
|
7
|
-
Total : 67 files, 15945 codes, 3622 comments, 1746 blanks, all 21313 lines
|
|
8
|
-
|
|
9
|
-
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
|
10
|
-
|
|
11
|
-
## Files
|
|
12
|
-
| filename | language | code | comment | blank | total |
|
|
13
|
-
| :--- | :--- | ---: | ---: | ---: | ---: |
|
|
14
|
-
| [README.md](/README.md) | Markdown | 134 | 0 | 67 | 201 |
|
|
15
|
-
| [conf/cert.json](/conf/cert.json) | JSON | 6 | 0 | 0 | 6 |
|
|
16
|
-
| [conf/config.json](/conf/config.json) | JSON | 67 | 0 | 1 | 68 |
|
|
17
|
-
| [conf/vhost/default.json](/conf/vhost/default.json) | JSON | 8 | 0 | 0 | 8 |
|
|
18
|
-
| [doc/CHANGELOG.md](/doc/CHANGELOG.md) | Markdown | 85 | 0 | 28 | 113 |
|
|
19
|
-
| [doc/CHANGELOG.sc.md](/doc/CHANGELOG.sc.md) | Markdown | 85 | 0 | 28 | 113 |
|
|
20
|
-
| [doc/CHANGELOG.tc.md](/doc/CHANGELOG.tc.md) | Markdown | 85 | 0 | 28 | 113 |
|
|
21
|
-
| [doc/README.sc.md](/doc/README.sc.md) | Markdown | 134 | 0 | 67 | 201 |
|
|
22
|
-
| [doc/README.tc.md](/doc/README.tc.md) | Markdown | 135 | 0 | 68 | 203 |
|
|
23
|
-
| [doc/icon.svg](/doc/icon.svg) | XML | 1 | 0 | 0 | 1 |
|
|
24
|
-
| [eslint.config.js](/eslint.config.js) | JavaScript | 23 | 1 | 1 | 25 |
|
|
25
|
-
| [index.ts](/index.ts) | TypeScript | 13 | 12 | 3 | 28 |
|
|
26
|
-
| [lib/buffer.ts](/lib/buffer.ts) | TypeScript | 103 | 25 | 25 | 153 |
|
|
27
|
-
| [lib/captcha.ts](/lib/captcha.ts) | TypeScript | 34 | 20 | 10 | 64 |
|
|
28
|
-
| [lib/consistent.ts](/lib/consistent.ts) | TypeScript | 142 | 59 | 19 | 220 |
|
|
29
|
-
| [lib/core.ts](/lib/core.ts) | TypeScript | 668 | 184 | 40 | 892 |
|
|
30
|
-
| [lib/crypto.ts](/lib/crypto.ts) | TypeScript | 246 | 115 | 24 | 385 |
|
|
31
|
-
| [lib/db.ts](/lib/db.ts) | TypeScript | 529 | 133 | 58 | 720 |
|
|
32
|
-
| [lib/dns.ts](/lib/dns.ts) | TypeScript | 328 | 63 | 19 | 410 |
|
|
33
|
-
| [lib/fs.ts](/lib/fs.ts) | TypeScript | 389 | 118 | 21 | 528 |
|
|
34
|
-
| [lib/jwt.ts](/lib/jwt.ts) | TypeScript | 203 | 52 | 22 | 277 |
|
|
35
|
-
| [lib/kv.ts](/lib/kv.ts) | TypeScript | 1,001 | 381 | 108 | 1,490 |
|
|
36
|
-
| [lib/lan.ts](/lib/lan.ts) | TypeScript | 69 | 4 | 3 | 76 |
|
|
37
|
-
| [lib/net.ts](/lib/net.ts) | TypeScript | 497 | 152 | 24 | 673 |
|
|
38
|
-
| [lib/net/formdata.ts](/lib/net/formdata.ts) | TypeScript | 104 | 46 | 17 | 167 |
|
|
39
|
-
| [lib/net/request.ts](/lib/net/request.ts) | TypeScript | 68 | 62 | 21 | 151 |
|
|
40
|
-
| [lib/net/response.ts](/lib/net/response.ts) | TypeScript | 27 | 21 | 12 | 60 |
|
|
41
|
-
| [lib/s3.ts](/lib/s3.ts) | TypeScript | 170 | 58 | 18 | 246 |
|
|
42
|
-
| [lib/scan.ts](/lib/scan.ts) | TypeScript | 256 | 86 | 23 | 365 |
|
|
43
|
-
| [lib/session.ts](/lib/session.ts) | TypeScript | 154 | 55 | 22 | 231 |
|
|
44
|
-
| [lib/sql.ts](/lib/sql.ts) | TypeScript | 815 | 281 | 49 | 1,145 |
|
|
45
|
-
| [lib/ssh.ts](/lib/ssh.ts) | TypeScript | 143 | 34 | 15 | 192 |
|
|
46
|
-
| [lib/ssh/sftp.ts](/lib/ssh/sftp.ts) | TypeScript | 367 | 113 | 29 | 509 |
|
|
47
|
-
| [lib/ssh/shell.ts](/lib/ssh/shell.ts) | TypeScript | 61 | 37 | 13 | 111 |
|
|
48
|
-
| [lib/text.ts](/lib/text.ts) | TypeScript | 399 | 170 | 38 | 607 |
|
|
49
|
-
| [lib/text/tld.json](/lib/text/tld.json) | JSON | 1 | 0 | 0 | 1 |
|
|
50
|
-
| [lib/time.ts](/lib/time.ts) | TypeScript | 180 | 58 | 17 | 255 |
|
|
51
|
-
| [lib/ws.ts](/lib/ws.ts) | TypeScript | 431 | 107 | 35 | 573 |
|
|
52
|
-
| [lib/zip.ts](/lib/zip.ts) | TypeScript | 350 | 75 | 23 | 448 |
|
|
53
|
-
| [lib/zlib.ts](/lib/zlib.ts) | TypeScript | 251 | 80 | 20 | 351 |
|
|
54
|
-
| [package.json](/package.json) | JSON | 23 | 0 | 1 | 24 |
|
|
55
|
-
| [sys/child.ts](/sys/child.ts) | TypeScript | 554 | 104 | 16 | 674 |
|
|
56
|
-
| [sys/cmd.ts](/sys/cmd.ts) | TypeScript | 53 | 14 | 5 | 72 |
|
|
57
|
-
| [sys/ctr.ts](/sys/ctr.ts) | TypeScript | 638 | 196 | 77 | 911 |
|
|
58
|
-
| [sys/def.ts](/sys/def.ts) | TypeScript | 12 | 9 | 5 | 26 |
|
|
59
|
-
| [sys/master.ts](/sys/master.ts) | TypeScript | 390 | 83 | 12 | 485 |
|
|
60
|
-
| [sys/mod.ts](/sys/mod.ts) | TypeScript | 1,436 | 335 | 85 | 1,856 |
|
|
61
|
-
| [sys/route.ts](/sys/route.ts) | TypeScript | 914 | 168 | 34 | 1,116 |
|
|
62
|
-
| [tsconfig.json](/tsconfig.json) | JSON with Comments | 30 | 1 | 0 | 31 |
|
|
63
|
-
| [types/index.d.ts](/types/index.d.ts) | TypeScript | 187 | 36 | 46 | 269 |
|
|
64
|
-
| [www/default/ctr/main.ts](/www/default/ctr/main.ts) | TypeScript | 6 | 0 | 4 | 10 |
|
|
65
|
-
| [www/default/ctr/middle.ts](/www/default/ctr/middle.ts) | TypeScript | 22 | 0 | 5 | 27 |
|
|
66
|
-
| [www/default/ctr/test.ts](/www/default/ctr/test.ts) | TypeScript | 2,752 | 46 | 393 | 3,191 |
|
|
67
|
-
| [www/default/data/locale/en.test.json](/www/default/data/locale/en.test.json) | JSON | 8 | 0 | 0 | 8 |
|
|
68
|
-
| [www/default/data/locale/index.html](/www/default/data/locale/index.html) | HTML | 1 | 0 | 0 | 1 |
|
|
69
|
-
| [www/default/data/locale/ja.test.json](/www/default/data/locale/ja.test.json) | JSON | 8 | 0 | 0 | 8 |
|
|
70
|
-
| [www/default/data/locale/sc.test.json](/www/default/data/locale/sc.test.json) | JSON | 8 | 0 | 0 | 8 |
|
|
71
|
-
| [www/default/data/locale/tc.test.json](/www/default/data/locale/tc.test.json) | JSON | 8 | 0 | 0 | 8 |
|
|
72
|
-
| [www/default/kebab.json](/www/default/kebab.json) | JSON | 24 | 0 | 0 | 24 |
|
|
73
|
-
| [www/default/mod/test.ts](/www/default/mod/test.ts) | TypeScript | 17 | 15 | 16 | 48 |
|
|
74
|
-
| [www/default/mod/testdata.ts](/www/default/mod/testdata.ts) | TypeScript | 9 | 11 | 11 | 31 |
|
|
75
|
-
| [www/default/route.json](/www/default/route.json) | JSON | 6 | 0 | 0 | 6 |
|
|
76
|
-
| [www/default/view/test.ejs](/www/default/view/test.ejs) | HTML | 11 | 0 | 0 | 11 |
|
|
77
|
-
| [www/default/ws/irp.ts](/www/default/ws/irp.ts) | TypeScript | 13 | 1 | 5 | 19 |
|
|
78
|
-
| [www/default/ws/mproxy.ts](/www/default/ws/mproxy.ts) | TypeScript | 13 | 0 | 4 | 17 |
|
|
79
|
-
| [www/default/ws/rproxy.ts](/www/default/ws/rproxy.ts) | TypeScript | 11 | 0 | 4 | 15 |
|
|
80
|
-
| [www/default/ws/test.ts](/www/default/ws/test.ts) | TypeScript | 29 | 1 | 7 | 37 |
|
|
81
|
-
|
|
82
|
-
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# Diff Details
|
|
2
|
-
|
|
3
|
-
Date : 2025-02-14 14:46:44
|
|
4
|
-
|
|
5
|
-
Directory d:\\sync\\www\\project\\maiyun\\Kebab
|
|
6
|
-
|
|
7
|
-
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
|
|
8
|
-
|
|
9
|
-
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
|
|
10
|
-
|
|
11
|
-
## Files
|
|
12
|
-
| filename | language | code | comment | blank | total |
|
|
13
|
-
| :--- | :--- | ---: | ---: | ---: | ---: |
|
|
14
|
-
|
|
15
|
-
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Diff Summary
|
|
2
|
-
|
|
3
|
-
Date : 2025-02-14 14:46:44
|
|
4
|
-
|
|
5
|
-
Directory d:\\sync\\www\\project\\maiyun\\Kebab
|
|
6
|
-
|
|
7
|
-
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
|
|
8
|
-
|
|
9
|
-
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
|
|
10
|
-
|
|
11
|
-
## Languages
|
|
12
|
-
| language | files | code | comment | blank | total |
|
|
13
|
-
| :--- | ---: | ---: | ---: | ---: | ---: |
|
|
14
|
-
|
|
15
|
-
## Directories
|
|
16
|
-
| path | files | code | comment | blank | total |
|
|
17
|
-
| :--- | ---: | ---: | ---: | ---: | ---: |
|
|
18
|
-
|
|
19
|
-
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
Date : 2025-02-14 14:46:44
|
|
2
|
-
Directory : d:\sync\www\project\maiyun\Kebab
|
|
3
|
-
Total : 0 files, 0 codes, 0 comments, 0 blanks, all 0 lines
|
|
4
|
-
|
|
5
|
-
Languages
|
|
6
|
-
+----------+------------+------------+------------+------------+------------+
|
|
7
|
-
| language | files | code | comment | blank | total |
|
|
8
|
-
+----------+------------+------------+------------+------------+------------+
|
|
9
|
-
+----------+------------+------------+------------+------------+------------+
|
|
10
|
-
|
|
11
|
-
Directories
|
|
12
|
-
+------+------------+------------+------------+------------+------------+
|
|
13
|
-
| path | files | code | comment | blank | total |
|
|
14
|
-
+------+------------+------------+------------+------------+------------+
|
|
15
|
-
+------+------------+------------+------------+------------+------------+
|
|
16
|
-
|
|
17
|
-
Files
|
|
18
|
-
+----------+----------+------------+------------+------------+------------+
|
|
19
|
-
| filename | language | code | comment | blank | total |
|
|
20
|
-
+----------+----------+------------+------------+------------+------------+
|
|
21
|
-
| Total | | 0 | 0 | 0 | 0 |
|
|
22
|
-
+----------+----------+------------+------------+------------+------------+
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"filename", "language", "JSON with Comments", "JSON", "TypeScript", "HTML", "JavaScript", "Markdown", "XML", "comment", "blank", "total"
|
|
2
|
-
"d:\sync\www\project\maiyun\Kebab\README.md", "Markdown", 0, 0, 0, 0, 0, 134, 0, 0, 67, 201
|
|
3
|
-
"d:\sync\www\project\maiyun\Kebab\conf\cert.json", "JSON", 0, 6, 0, 0, 0, 0, 0, 0, 0, 6
|
|
4
|
-
"d:\sync\www\project\maiyun\Kebab\conf\config.json", "JSON", 0, 67, 0, 0, 0, 0, 0, 0, 1, 68
|
|
5
|
-
"d:\sync\www\project\maiyun\Kebab\conf\vhost\default.json", "JSON", 0, 8, 0, 0, 0, 0, 0, 0, 0, 8
|
|
6
|
-
"d:\sync\www\project\maiyun\Kebab\doc\CHANGELOG.md", "Markdown", 0, 0, 0, 0, 0, 85, 0, 0, 28, 113
|
|
7
|
-
"d:\sync\www\project\maiyun\Kebab\doc\CHANGELOG.sc.md", "Markdown", 0, 0, 0, 0, 0, 85, 0, 0, 28, 113
|
|
8
|
-
"d:\sync\www\project\maiyun\Kebab\doc\CHANGELOG.tc.md", "Markdown", 0, 0, 0, 0, 0, 85, 0, 0, 28, 113
|
|
9
|
-
"d:\sync\www\project\maiyun\Kebab\doc\README.sc.md", "Markdown", 0, 0, 0, 0, 0, 134, 0, 0, 67, 201
|
|
10
|
-
"d:\sync\www\project\maiyun\Kebab\doc\README.tc.md", "Markdown", 0, 0, 0, 0, 0, 135, 0, 0, 68, 203
|
|
11
|
-
"d:\sync\www\project\maiyun\Kebab\doc\icon.svg", "XML", 0, 0, 0, 0, 0, 0, 1, 0, 0, 1
|
|
12
|
-
"d:\sync\www\project\maiyun\Kebab\eslint.config.js", "JavaScript", 0, 0, 0, 0, 23, 0, 0, 1, 1, 25
|
|
13
|
-
"d:\sync\www\project\maiyun\Kebab\index.ts", "TypeScript", 0, 0, 13, 0, 0, 0, 0, 12, 3, 28
|
|
14
|
-
"d:\sync\www\project\maiyun\Kebab\lib\buffer.ts", "TypeScript", 0, 0, 103, 0, 0, 0, 0, 25, 25, 153
|
|
15
|
-
"d:\sync\www\project\maiyun\Kebab\lib\captcha.ts", "TypeScript", 0, 0, 34, 0, 0, 0, 0, 20, 10, 64
|
|
16
|
-
"d:\sync\www\project\maiyun\Kebab\lib\consistent.ts", "TypeScript", 0, 0, 142, 0, 0, 0, 0, 59, 19, 220
|
|
17
|
-
"d:\sync\www\project\maiyun\Kebab\lib\core.ts", "TypeScript", 0, 0, 668, 0, 0, 0, 0, 184, 40, 892
|
|
18
|
-
"d:\sync\www\project\maiyun\Kebab\lib\crypto.ts", "TypeScript", 0, 0, 246, 0, 0, 0, 0, 115, 24, 385
|
|
19
|
-
"d:\sync\www\project\maiyun\Kebab\lib\db.ts", "TypeScript", 0, 0, 529, 0, 0, 0, 0, 133, 58, 720
|
|
20
|
-
"d:\sync\www\project\maiyun\Kebab\lib\dns.ts", "TypeScript", 0, 0, 328, 0, 0, 0, 0, 63, 19, 410
|
|
21
|
-
"d:\sync\www\project\maiyun\Kebab\lib\fs.ts", "TypeScript", 0, 0, 389, 0, 0, 0, 0, 118, 21, 528
|
|
22
|
-
"d:\sync\www\project\maiyun\Kebab\lib\jwt.ts", "TypeScript", 0, 0, 203, 0, 0, 0, 0, 52, 22, 277
|
|
23
|
-
"d:\sync\www\project\maiyun\Kebab\lib\kv.ts", "TypeScript", 0, 0, 1001, 0, 0, 0, 0, 381, 108, 1490
|
|
24
|
-
"d:\sync\www\project\maiyun\Kebab\lib\lan.ts", "TypeScript", 0, 0, 69, 0, 0, 0, 0, 4, 3, 76
|
|
25
|
-
"d:\sync\www\project\maiyun\Kebab\lib\net.ts", "TypeScript", 0, 0, 497, 0, 0, 0, 0, 152, 24, 673
|
|
26
|
-
"d:\sync\www\project\maiyun\Kebab\lib\net\formdata.ts", "TypeScript", 0, 0, 104, 0, 0, 0, 0, 46, 17, 167
|
|
27
|
-
"d:\sync\www\project\maiyun\Kebab\lib\net\request.ts", "TypeScript", 0, 0, 68, 0, 0, 0, 0, 62, 21, 151
|
|
28
|
-
"d:\sync\www\project\maiyun\Kebab\lib\net\response.ts", "TypeScript", 0, 0, 27, 0, 0, 0, 0, 21, 12, 60
|
|
29
|
-
"d:\sync\www\project\maiyun\Kebab\lib\s3.ts", "TypeScript", 0, 0, 170, 0, 0, 0, 0, 58, 18, 246
|
|
30
|
-
"d:\sync\www\project\maiyun\Kebab\lib\scan.ts", "TypeScript", 0, 0, 256, 0, 0, 0, 0, 86, 23, 365
|
|
31
|
-
"d:\sync\www\project\maiyun\Kebab\lib\session.ts", "TypeScript", 0, 0, 154, 0, 0, 0, 0, 55, 22, 231
|
|
32
|
-
"d:\sync\www\project\maiyun\Kebab\lib\sql.ts", "TypeScript", 0, 0, 815, 0, 0, 0, 0, 281, 49, 1145
|
|
33
|
-
"d:\sync\www\project\maiyun\Kebab\lib\ssh.ts", "TypeScript", 0, 0, 143, 0, 0, 0, 0, 34, 15, 192
|
|
34
|
-
"d:\sync\www\project\maiyun\Kebab\lib\ssh\sftp.ts", "TypeScript", 0, 0, 367, 0, 0, 0, 0, 113, 29, 509
|
|
35
|
-
"d:\sync\www\project\maiyun\Kebab\lib\ssh\shell.ts", "TypeScript", 0, 0, 61, 0, 0, 0, 0, 37, 13, 111
|
|
36
|
-
"d:\sync\www\project\maiyun\Kebab\lib\text.ts", "TypeScript", 0, 0, 399, 0, 0, 0, 0, 170, 38, 607
|
|
37
|
-
"d:\sync\www\project\maiyun\Kebab\lib\text\tld.json", "JSON", 0, 1, 0, 0, 0, 0, 0, 0, 0, 1
|
|
38
|
-
"d:\sync\www\project\maiyun\Kebab\lib\time.ts", "TypeScript", 0, 0, 180, 0, 0, 0, 0, 58, 17, 255
|
|
39
|
-
"d:\sync\www\project\maiyun\Kebab\lib\ws.ts", "TypeScript", 0, 0, 431, 0, 0, 0, 0, 107, 35, 573
|
|
40
|
-
"d:\sync\www\project\maiyun\Kebab\lib\zip.ts", "TypeScript", 0, 0, 350, 0, 0, 0, 0, 75, 23, 448
|
|
41
|
-
"d:\sync\www\project\maiyun\Kebab\lib\zlib.ts", "TypeScript", 0, 0, 251, 0, 0, 0, 0, 80, 20, 351
|
|
42
|
-
"d:\sync\www\project\maiyun\Kebab\package.json", "JSON", 0, 23, 0, 0, 0, 0, 0, 0, 1, 24
|
|
43
|
-
"d:\sync\www\project\maiyun\Kebab\sys\child.ts", "TypeScript", 0, 0, 554, 0, 0, 0, 0, 104, 16, 674
|
|
44
|
-
"d:\sync\www\project\maiyun\Kebab\sys\cmd.ts", "TypeScript", 0, 0, 53, 0, 0, 0, 0, 14, 5, 72
|
|
45
|
-
"d:\sync\www\project\maiyun\Kebab\sys\ctr.ts", "TypeScript", 0, 0, 638, 0, 0, 0, 0, 196, 77, 911
|
|
46
|
-
"d:\sync\www\project\maiyun\Kebab\sys\def.ts", "TypeScript", 0, 0, 12, 0, 0, 0, 0, 9, 5, 26
|
|
47
|
-
"d:\sync\www\project\maiyun\Kebab\sys\master.ts", "TypeScript", 0, 0, 390, 0, 0, 0, 0, 83, 12, 485
|
|
48
|
-
"d:\sync\www\project\maiyun\Kebab\sys\mod.ts", "TypeScript", 0, 0, 1436, 0, 0, 0, 0, 335, 85, 1856
|
|
49
|
-
"d:\sync\www\project\maiyun\Kebab\sys\route.ts", "TypeScript", 0, 0, 914, 0, 0, 0, 0, 168, 34, 1116
|
|
50
|
-
"d:\sync\www\project\maiyun\Kebab\tsconfig.json", "JSON with Comments", 30, 0, 0, 0, 0, 0, 0, 1, 0, 31
|
|
51
|
-
"d:\sync\www\project\maiyun\Kebab\types\index.d.ts", "TypeScript", 0, 0, 187, 0, 0, 0, 0, 36, 46, 269
|
|
52
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\ctr\main.ts", "TypeScript", 0, 0, 6, 0, 0, 0, 0, 0, 4, 10
|
|
53
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\ctr\middle.ts", "TypeScript", 0, 0, 22, 0, 0, 0, 0, 0, 5, 27
|
|
54
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\ctr\test.ts", "TypeScript", 0, 0, 2752, 0, 0, 0, 0, 46, 393, 3191
|
|
55
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\data\locale\en.test.json", "JSON", 0, 8, 0, 0, 0, 0, 0, 0, 0, 8
|
|
56
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\data\locale\index.html", "HTML", 0, 0, 0, 1, 0, 0, 0, 0, 0, 1
|
|
57
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\data\locale\ja.test.json", "JSON", 0, 8, 0, 0, 0, 0, 0, 0, 0, 8
|
|
58
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\data\locale\sc.test.json", "JSON", 0, 8, 0, 0, 0, 0, 0, 0, 0, 8
|
|
59
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\data\locale\tc.test.json", "JSON", 0, 8, 0, 0, 0, 0, 0, 0, 0, 8
|
|
60
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\kebab.json", "JSON", 0, 24, 0, 0, 0, 0, 0, 0, 0, 24
|
|
61
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\mod\test.ts", "TypeScript", 0, 0, 17, 0, 0, 0, 0, 15, 16, 48
|
|
62
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\mod\testdata.ts", "TypeScript", 0, 0, 9, 0, 0, 0, 0, 11, 11, 31
|
|
63
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\route.json", "JSON", 0, 6, 0, 0, 0, 0, 0, 0, 0, 6
|
|
64
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\view\test.ejs", "HTML", 0, 0, 0, 11, 0, 0, 0, 0, 0, 11
|
|
65
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\ws\irp.ts", "TypeScript", 0, 0, 13, 0, 0, 0, 0, 1, 5, 19
|
|
66
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\ws\mproxy.ts", "TypeScript", 0, 0, 13, 0, 0, 0, 0, 0, 4, 17
|
|
67
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\ws\rproxy.ts", "TypeScript", 0, 0, 11, 0, 0, 0, 0, 0, 4, 15
|
|
68
|
-
"d:\sync\www\project\maiyun\Kebab\www\default\ws\test.ts", "TypeScript", 0, 0, 29, 0, 0, 0, 0, 1, 7, 37
|
|
69
|
-
"Total", "-", 30, 167, 15054, 12, 23, 658, 1, 3622, 1746, 21313
|