xshell 1.3.80 → 1.4.2
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/antd.development.js +86194 -144895
- package/antd.production.js +82353 -118684
- package/builder.d.ts +61 -160
- package/builder.js +350 -661
- package/file.d.ts +4 -0
- package/file.js +5 -4
- package/net.d.ts +0 -3
- package/net.js +1 -2
- package/package.json +20 -29
- package/prototype.common.js +2 -1
- package/prototype.js +1 -1
- package/react.development.js +15560 -30856
- package/react.production.js +9953 -17459
- package/repl.js +8 -1
- package/server.js +2 -5
- package/tsconfig.json +3 -2
- package/i18n/scanner/checker.d.ts +0 -5
- package/i18n/scanner/checker.js +0 -64
package/repl.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
};
|
|
2
9
|
import repl from 'node:repl';
|
|
3
10
|
import process from 'node:process';
|
|
4
11
|
import { fileURLToPath } from 'url';
|
package/server.js
CHANGED
|
@@ -9,7 +9,7 @@ import { default as Koa } from 'koa';
|
|
|
9
9
|
import KoaCors from '@koa/cors';
|
|
10
10
|
import KoaCompress from 'koa-compress';
|
|
11
11
|
import resolve_safely from 'resolve-path';
|
|
12
|
-
import {
|
|
12
|
+
import { mimes } from 'mrmime';
|
|
13
13
|
// --- my libs
|
|
14
14
|
import { t } from './i18n/instance.js';
|
|
15
15
|
import { request as _request, Remote, get_socket_ip } from './net.js';
|
|
@@ -801,10 +801,7 @@ export class Server {
|
|
|
801
801
|
response.set('content-type', (Server.js_exts.has(fext) ?
|
|
802
802
|
'text/javascript; chatset=utf-8'
|
|
803
803
|
:
|
|
804
|
-
fext
|
|
805
|
-
'video/mp4'
|
|
806
|
-
:
|
|
807
|
-
get_content_type(`file.${fext}`) || 'application/octet-stream'));
|
|
804
|
+
mimes[fext] || 'application/octet-stream'));
|
|
808
805
|
}
|
|
809
806
|
set_text(response, body, status) {
|
|
810
807
|
if (status)
|
package/tsconfig.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"exclude": [
|
|
3
|
-
"./test.ts"
|
|
3
|
+
"./test.ts",
|
|
4
|
+
"./i18n/test/"
|
|
4
5
|
],
|
|
5
6
|
|
|
6
7
|
"compilerOptions": {
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
"pretty": true,
|
|
21
22
|
"newLine": "lf",
|
|
22
23
|
"lib": ["ESNext", "DOM"],
|
|
23
|
-
"importHelpers":
|
|
24
|
+
"importHelpers": false,
|
|
24
25
|
|
|
25
26
|
"incremental": true,
|
|
26
27
|
"tsBuildInfoFile": "T:/1/xsh/.tsbuildinfo",
|
package/i18n/scanner/checker.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import * as types from '@babel/types';
|
|
2
|
-
export let unmarkeds = [];
|
|
3
|
-
let t = 0;
|
|
4
|
-
let Trans = 0;
|
|
5
|
-
function is_t(node) {
|
|
6
|
-
if (types.isCallExpression(node)) {
|
|
7
|
-
// t('chtext')
|
|
8
|
-
if (types.isIdentifier(node.callee) && node.callee.name === 't')
|
|
9
|
-
return true;
|
|
10
|
-
// i18n.t('chtext') | i18n.__('chtext')
|
|
11
|
-
if (types.isMemberExpression(node.callee) &&
|
|
12
|
-
types.isIdentifier(node.callee.object) &&
|
|
13
|
-
types.isIdentifier(node.callee.property) &&
|
|
14
|
-
node.callee.object.name === 'i18n' &&
|
|
15
|
-
(node.callee.property.name === 't' || node.callee.property.name === '__'))
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
function is_trans(node) {
|
|
21
|
-
// <Trans>
|
|
22
|
-
return (types.isJSXElement(node) &&
|
|
23
|
-
types.isJSXOpeningElement(node.openingElement) &&
|
|
24
|
-
types.isJSXIdentifier(node.openingElement.name) &&
|
|
25
|
-
node.openingElement.name.name === 'Trans');
|
|
26
|
-
}
|
|
27
|
-
const has_unmarked_chinese_characters = (str) => !t && !Trans && /[\u4e00-\u9fa5]/.test(str);
|
|
28
|
-
export function Checker({ filepath }) {
|
|
29
|
-
return {
|
|
30
|
-
CallExpression: {
|
|
31
|
-
enter({ node }) {
|
|
32
|
-
if (is_t(node))
|
|
33
|
-
t++;
|
|
34
|
-
},
|
|
35
|
-
exit({ node }) {
|
|
36
|
-
if (is_t(node))
|
|
37
|
-
t--;
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
JSXElement: {
|
|
41
|
-
enter({ node }) {
|
|
42
|
-
if (is_trans(node))
|
|
43
|
-
Trans++;
|
|
44
|
-
},
|
|
45
|
-
exit({ node }) {
|
|
46
|
-
if (is_trans(node))
|
|
47
|
-
Trans--;
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
JSXText: ({ node }) => {
|
|
51
|
-
if (has_unmarked_chinese_characters(node.value))
|
|
52
|
-
unmarkeds.push({ filepath, loc: node.loc, value: node.value });
|
|
53
|
-
},
|
|
54
|
-
StringLiteral: ({ node }) => {
|
|
55
|
-
if (has_unmarked_chinese_characters(node.value))
|
|
56
|
-
unmarkeds.push({ filepath, loc: node.loc, value: node.value });
|
|
57
|
-
},
|
|
58
|
-
TemplateElement: ({ node }) => {
|
|
59
|
-
if (has_unmarked_chinese_characters(node.value.raw))
|
|
60
|
-
unmarkeds.push({ filepath, loc: node.loc, value: node.value.cooked });
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=checker.js.map
|