koatty 3.11.4-2 → 3.11.6
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/.rollup.config.js +59 -62
- package/.vscode/launch.json +41 -41
- package/CHANGELOG.md +358 -349
- package/LICENSE +29 -29
- package/README.md +177 -168
- package/dist/LICENSE +29 -29
- package/dist/README.md +177 -168
- package/dist/index.d.ts +5 -129
- package/dist/index.js +326 -464
- package/dist/index.mjs +322 -436
- package/dist/package.json +105 -99
- package/package.json +105 -99
- package/tsconfig.test.json +14 -14
- package/.vscode/settings.json +0 -5
package/.rollup.config.js
CHANGED
@@ -1,63 +1,60 @@
|
|
1
|
-
/*
|
2
|
-
* @Description:
|
3
|
-
* @Usage:
|
4
|
-
* @Author: richen
|
5
|
-
* @Date: 2021-12-17 10:20:44
|
6
|
-
* @LastEditTime:
|
7
|
-
*/
|
8
|
-
import
|
9
|
-
import
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
})
|
61
|
-
]
|
62
|
-
}
|
1
|
+
/*
|
2
|
+
* @Description:
|
3
|
+
* @Usage:
|
4
|
+
* @Author: richen
|
5
|
+
* @Date: 2021-12-17 10:20:44
|
6
|
+
* @LastEditTime: 2024-11-29 17:33:44
|
7
|
+
*/
|
8
|
+
import commonjs from '@rollup/plugin-commonjs';
|
9
|
+
import json from "@rollup/plugin-json";
|
10
|
+
import resolve from '@rollup/plugin-node-resolve';
|
11
|
+
import { builtinModules } from 'module';
|
12
|
+
import del from "rollup-plugin-delete";
|
13
|
+
import typescript from 'rollup-plugin-typescript2';
|
14
|
+
// import babel from '@rollup/plugin-babel';
|
15
|
+
const pkg = require('./package.json');
|
16
|
+
|
17
|
+
export default [
|
18
|
+
{
|
19
|
+
input: './src/index.ts',
|
20
|
+
output: [
|
21
|
+
{
|
22
|
+
format: 'cjs',
|
23
|
+
file: './dist/index.js',
|
24
|
+
banner: require('./scripts/copyright'),
|
25
|
+
},
|
26
|
+
{
|
27
|
+
format: 'es',
|
28
|
+
file: './dist/index.mjs',
|
29
|
+
banner: require('./scripts/copyright'),
|
30
|
+
},
|
31
|
+
],
|
32
|
+
plugins: [
|
33
|
+
del({ targets: ["dist/*", "temp/*", "docs/api"] }),
|
34
|
+
// babel({
|
35
|
+
// babelHelpers: "runtime",
|
36
|
+
// configFile: './babel.config.js',
|
37
|
+
// exclude: 'node_modules/**',
|
38
|
+
// }),
|
39
|
+
json(),
|
40
|
+
resolve({
|
41
|
+
preferBuiltins: true, // 优先选择内置模块
|
42
|
+
}),
|
43
|
+
commonjs(),
|
44
|
+
typescript({
|
45
|
+
tsconfigOverride: {
|
46
|
+
compilerOptions: {
|
47
|
+
declaration: false,
|
48
|
+
declarationMap: false,
|
49
|
+
module: "ESNext"
|
50
|
+
}
|
51
|
+
}
|
52
|
+
})
|
53
|
+
],
|
54
|
+
external: [
|
55
|
+
...builtinModules, // 排除 Node.js 内置模块
|
56
|
+
...Object.keys(pkg.dependencies || {}), // 排除 package.json 中的外部依赖
|
57
|
+
],
|
58
|
+
},
|
59
|
+
|
63
60
|
]
|
package/.vscode/launch.json
CHANGED
@@ -1,42 +1,42 @@
|
|
1
|
-
{
|
2
|
-
"version": "0.2.0",
|
3
|
-
"configurations": [
|
4
|
-
{
|
5
|
-
"type": "node",
|
6
|
-
"request": "launch",
|
7
|
-
"name": "Koatty Demo Program",
|
8
|
-
"args": [
|
9
|
-
"${workspaceRoot}/demo/src/App.ts"
|
10
|
-
],
|
11
|
-
"runtimeArgs": [
|
12
|
-
"--nolazy",
|
13
|
-
"-r",
|
14
|
-
"ts-node/register"
|
15
|
-
],
|
16
|
-
"env": {
|
17
|
-
"NODE_ENV": "development"
|
18
|
-
},
|
19
|
-
"outputCapture": "std",
|
20
|
-
"sourceMaps": true,
|
21
|
-
"cwd": "${workspaceRoot}",
|
22
|
-
"protocol": "inspector",
|
23
|
-
"internalConsoleOptions": "neverOpen"
|
24
|
-
},
|
25
|
-
{
|
26
|
-
"type": "node",
|
27
|
-
"name": "vscode-jest-tests",
|
28
|
-
"request": "launch",
|
29
|
-
"console": "integratedTerminal",
|
30
|
-
"internalConsoleOptions": "neverOpen",
|
31
|
-
"disableOptimisticBPs": true,
|
32
|
-
"program": "${workspaceFolder}/node_modules/.bin/jest",
|
33
|
-
"cwd": "${workspaceFolder}",
|
34
|
-
"args": [
|
35
|
-
"--config",
|
36
|
-
"jest.config.js",
|
37
|
-
"--runInBand",
|
38
|
-
"--watchAll=false"
|
39
|
-
]
|
40
|
-
}
|
41
|
-
]
|
1
|
+
{
|
2
|
+
"version": "0.2.0",
|
3
|
+
"configurations": [
|
4
|
+
{
|
5
|
+
"type": "node",
|
6
|
+
"request": "launch",
|
7
|
+
"name": "Koatty Demo Program",
|
8
|
+
"args": [
|
9
|
+
"${workspaceRoot}/demo/src/App.ts"
|
10
|
+
],
|
11
|
+
"runtimeArgs": [
|
12
|
+
"--nolazy",
|
13
|
+
"-r",
|
14
|
+
"ts-node/register"
|
15
|
+
],
|
16
|
+
"env": {
|
17
|
+
"NODE_ENV": "development"
|
18
|
+
},
|
19
|
+
"outputCapture": "std",
|
20
|
+
"sourceMaps": true,
|
21
|
+
"cwd": "${workspaceRoot}",
|
22
|
+
"protocol": "inspector",
|
23
|
+
"internalConsoleOptions": "neverOpen"
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"type": "node",
|
27
|
+
"name": "vscode-jest-tests",
|
28
|
+
"request": "launch",
|
29
|
+
"console": "integratedTerminal",
|
30
|
+
"internalConsoleOptions": "neverOpen",
|
31
|
+
"disableOptimisticBPs": true,
|
32
|
+
"program": "${workspaceFolder}/node_modules/.bin/jest",
|
33
|
+
"cwd": "${workspaceFolder}",
|
34
|
+
"args": [
|
35
|
+
"--config",
|
36
|
+
"jest.config.js",
|
37
|
+
"--runInBand",
|
38
|
+
"--watchAll=false"
|
39
|
+
]
|
40
|
+
}
|
41
|
+
]
|
42
42
|
}
|