almighty-tool 0.0.114 → 0.0.115
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/.babelrc +17 -17
- package/.editorconfig +13 -13
- package/.eslintignore +7 -7
- package/.eslintrc.js +5 -5
- package/.nvmrc +1 -1
- package/.opencode/agents/code-reviewer.md +57 -57
- package/.opencode/agents/docs-specialist.md +49 -49
- package/.opencode/agents/test-runner.md +45 -45
- package/.opencode/commands/review.md +25 -25
- package/.opencode/commands/test.md +27 -27
- package/.opencode/skills/cryptography-dev.md +108 -108
- package/.opencode/skills/typescript-library-dev.md +94 -94
- package/.prettierrc.js +1 -1
- package/.yarnrc +11 -11
- package/AGENTS.md +69 -69
- package/CHANGELOG.md +7 -7
- package/README.md +11 -11
- package/bun.lock +2836 -2836
- package/bunfig.toml +7 -7
- package/jest.config.js +1 -1
- package/lib/utils/basic.util.d.ts +5 -0
- package/lib/utils/basic.util.js +64 -0
- package/lib/utils/basic.util.js.map +1 -1
- package/opencode.json +60 -60
- package/package.json +122 -122
- package/scripts/code.util.ts +135 -135
- package/templates/eslints/eggjs.project.js +15 -15
- package/templates/eslints/element-ui.project.js +4 -4
- package/templates/eslints/recommended.js +26 -26
- package/templates/eslints/rules/recommended.js +26 -26
- package/templates/eslints/rules/vue.js +12 -12
- package/templates/eslints/server.project.js +18 -18
- package/templates/eslints/uni-app-v8.project.js +43 -43
- package/templates/eslints/uni-app.project.js +45 -45
- package/templates/eslints/vue.project.js +39 -39
- package/templates/jest/element-ui.project.js +1 -1
- package/templates/jest/recommended.js +22 -22
- package/templates/jest/vue.project.js +44 -44
- package/templates/postcss/recommended.js +4 -4
- package/templates/postcss/uni-app.js +11 -11
- package/templates/prettiers/recommended.js +26 -26
- package/templates/stylelint/recommended.js +42 -42
- package/templates/stylelint/rules/recommended.js +22 -22
- package/templates/stylelint/uni-app.project.js +11 -11
- package/templates/tsconfigs/eggjs.json +31 -31
- package/templates/tsconfigs/element-ui.json +3 -3
- package/templates/tsconfigs/lib.json +15 -15
- package/templates/tsconfigs/quasar.json +25 -25
- package/templates/tsconfigs/recommended.json +23 -23
- package/templates/tsconfigs/server.json +23 -23
- package/templates/tsconfigs/uni-app.json +39 -39
- package/templates/tsconfigs/vue.json +45 -45
- package/templates/tslints/recommended.json +13 -13
- package/test-duration.js +33 -33
- package/tsconfig.json +9 -9
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es2015",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"strict": true,
|
|
6
|
-
"jsx": "preserve",
|
|
7
|
-
"noImplicitAny": false,
|
|
8
|
-
"importHelpers": true,
|
|
9
|
-
"resolveJsonModule": true,
|
|
10
|
-
"moduleResolution": "node",
|
|
11
|
-
"experimentalDecorators": true,
|
|
12
|
-
"esModuleInterop": true,
|
|
13
|
-
"allowSyntheticDefaultImports": true,
|
|
14
|
-
"sourceMap": true,
|
|
15
|
-
"types": ["webpack-env", "node", "jest"],
|
|
16
|
-
"paths": {
|
|
17
|
-
"@/*": ["./*"]
|
|
18
|
-
},
|
|
19
|
-
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
|
|
20
|
-
},
|
|
21
|
-
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx", "src/*.ts"],
|
|
22
|
-
"exclude": ["node_modules"]
|
|
23
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2015",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"strict": true,
|
|
6
|
+
"jsx": "preserve",
|
|
7
|
+
"noImplicitAny": false,
|
|
8
|
+
"importHelpers": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"moduleResolution": "node",
|
|
11
|
+
"experimentalDecorators": true,
|
|
12
|
+
"esModuleInterop": true,
|
|
13
|
+
"allowSyntheticDefaultImports": true,
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"types": ["webpack-env", "node", "jest"],
|
|
16
|
+
"paths": {
|
|
17
|
+
"@/*": ["./*"]
|
|
18
|
+
},
|
|
19
|
+
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
|
|
20
|
+
},
|
|
21
|
+
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx", "src/*.ts"],
|
|
22
|
+
"exclude": ["node_modules"]
|
|
23
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"esModuleInterop": true,
|
|
4
|
-
"module": "commonjs",
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"resolveJsonModule": true,
|
|
7
|
-
"removeComments": true,
|
|
8
|
-
"emitDecoratorMetadata": true,
|
|
9
|
-
"experimentalDecorators": true,
|
|
10
|
-
"allowSyntheticDefaultImports": true,
|
|
11
|
-
"target": "es2017",
|
|
12
|
-
"sourceMap": true,
|
|
13
|
-
"outDir": "./dist",
|
|
14
|
-
"baseUrl": "./",
|
|
15
|
-
"incremental": true,
|
|
16
|
-
"skipLibCheck": true,
|
|
17
|
-
"strictNullChecks": false,
|
|
18
|
-
"noImplicitAny": false,
|
|
19
|
-
"strictBindCallApply": false,
|
|
20
|
-
"forceConsistentCasingInFileNames": false,
|
|
21
|
-
"noFallthroughCasesInSwitch": false
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"esModuleInterop": true,
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"resolveJsonModule": true,
|
|
7
|
+
"removeComments": true,
|
|
8
|
+
"emitDecoratorMetadata": true,
|
|
9
|
+
"experimentalDecorators": true,
|
|
10
|
+
"allowSyntheticDefaultImports": true,
|
|
11
|
+
"target": "es2017",
|
|
12
|
+
"sourceMap": true,
|
|
13
|
+
"outDir": "./dist",
|
|
14
|
+
"baseUrl": "./",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"skipLibCheck": true,
|
|
17
|
+
"strictNullChecks": false,
|
|
18
|
+
"noImplicitAny": false,
|
|
19
|
+
"strictBindCallApply": false,
|
|
20
|
+
"forceConsistentCasingInFileNames": false,
|
|
21
|
+
"noFallthroughCasesInSwitch": false
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es5",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"strict": true,
|
|
6
|
-
"jsx": "preserve",
|
|
7
|
-
"importHelpers": true,
|
|
8
|
-
"moduleResolution": "node",
|
|
9
|
-
"resolveJsonModule": true,
|
|
10
|
-
"esModuleInterop": true,
|
|
11
|
-
"allowSyntheticDefaultImports": true,
|
|
12
|
-
"experimentalDecorators":true,
|
|
13
|
-
"sourceMap": true,
|
|
14
|
-
"baseUrl": ".",
|
|
15
|
-
"types": [
|
|
16
|
-
"node",
|
|
17
|
-
"webpack-env",
|
|
18
|
-
"jest",
|
|
19
|
-
"@dcloudio/types/uni-app"
|
|
20
|
-
],
|
|
21
|
-
"paths": {
|
|
22
|
-
"@/*": [
|
|
23
|
-
"./src/*"
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
"lib": [
|
|
27
|
-
"esnext",
|
|
28
|
-
"dom",
|
|
29
|
-
"dom.iterable",
|
|
30
|
-
"scripthost"
|
|
31
|
-
]
|
|
32
|
-
},
|
|
33
|
-
"exclude": [
|
|
34
|
-
"vendor",
|
|
35
|
-
"node_modules",
|
|
36
|
-
"unpackage",
|
|
37
|
-
"src/**/*.nvue"
|
|
38
|
-
]
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"strict": true,
|
|
6
|
+
"jsx": "preserve",
|
|
7
|
+
"importHelpers": true,
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"allowSyntheticDefaultImports": true,
|
|
12
|
+
"experimentalDecorators":true,
|
|
13
|
+
"sourceMap": true,
|
|
14
|
+
"baseUrl": ".",
|
|
15
|
+
"types": [
|
|
16
|
+
"node",
|
|
17
|
+
"webpack-env",
|
|
18
|
+
"jest",
|
|
19
|
+
"@dcloudio/types/uni-app"
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"@/*": [
|
|
23
|
+
"./src/*"
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
"lib": [
|
|
27
|
+
"esnext",
|
|
28
|
+
"dom",
|
|
29
|
+
"dom.iterable",
|
|
30
|
+
"scripthost"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"exclude": [
|
|
34
|
+
"vendor",
|
|
35
|
+
"node_modules",
|
|
36
|
+
"unpackage",
|
|
37
|
+
"src/**/*.nvue"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "esnext",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"strict": true,
|
|
6
|
-
"jsx": "preserve",
|
|
7
|
-
"importHelpers": true,
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
"noEmitOnError": true,
|
|
10
|
-
"moduleResolution": "node",
|
|
11
|
-
"resolveJsonModule": true,
|
|
12
|
-
"experimentalDecorators": true,
|
|
13
|
-
"esModuleInterop": true,
|
|
14
|
-
"allowSyntheticDefaultImports": true,
|
|
15
|
-
"sourceMap": true,
|
|
16
|
-
"baseUrl": ".",
|
|
17
|
-
"types": [
|
|
18
|
-
"node",
|
|
19
|
-
"jest",
|
|
20
|
-
"webpack-env"
|
|
21
|
-
],
|
|
22
|
-
"paths": {
|
|
23
|
-
"@/*": [
|
|
24
|
-
"src/*"
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
"lib": [
|
|
28
|
-
"esnext",
|
|
29
|
-
"dom",
|
|
30
|
-
"dom.iterable",
|
|
31
|
-
"scripthost"
|
|
32
|
-
]
|
|
33
|
-
},
|
|
34
|
-
"include": [
|
|
35
|
-
"src/**/*.d.ts",
|
|
36
|
-
"src/**/*.ts",
|
|
37
|
-
"src/**/*.tsx",
|
|
38
|
-
"src/**/*.vue",
|
|
39
|
-
"tests/**/*.ts",
|
|
40
|
-
"tests/**/*.tsx"
|
|
41
|
-
],
|
|
42
|
-
"exclude": [
|
|
43
|
-
"node_modules"
|
|
44
|
-
]
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"strict": true,
|
|
6
|
+
"jsx": "preserve",
|
|
7
|
+
"importHelpers": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"noEmitOnError": true,
|
|
10
|
+
"moduleResolution": "node",
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"experimentalDecorators": true,
|
|
13
|
+
"esModuleInterop": true,
|
|
14
|
+
"allowSyntheticDefaultImports": true,
|
|
15
|
+
"sourceMap": true,
|
|
16
|
+
"baseUrl": ".",
|
|
17
|
+
"types": [
|
|
18
|
+
"node",
|
|
19
|
+
"jest",
|
|
20
|
+
"webpack-env"
|
|
21
|
+
],
|
|
22
|
+
"paths": {
|
|
23
|
+
"@/*": [
|
|
24
|
+
"src/*"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"lib": [
|
|
28
|
+
"esnext",
|
|
29
|
+
"dom",
|
|
30
|
+
"dom.iterable",
|
|
31
|
+
"scripthost"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"include": [
|
|
35
|
+
"src/**/*.d.ts",
|
|
36
|
+
"src/**/*.ts",
|
|
37
|
+
"src/**/*.tsx",
|
|
38
|
+
"src/**/*.vue",
|
|
39
|
+
"tests/**/*.ts",
|
|
40
|
+
"tests/**/*.tsx"
|
|
41
|
+
],
|
|
42
|
+
"exclude": [
|
|
43
|
+
"node_modules"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"defaultSeverity": "error",
|
|
3
|
-
"extends": ["tslint:recommended"],
|
|
4
|
-
"jsRules": {},
|
|
5
|
-
"rules": {
|
|
6
|
-
"semi": ["error", "always"],
|
|
7
|
-
"object-literal-sort-keys": false,
|
|
8
|
-
"no-console": false,
|
|
9
|
-
"quotemark": [true, "single", "jsx-single"],
|
|
10
|
-
"no-unused-variable": false
|
|
11
|
-
},
|
|
12
|
-
"rulesDirectory": []
|
|
13
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"defaultSeverity": "error",
|
|
3
|
+
"extends": ["tslint:recommended"],
|
|
4
|
+
"jsRules": {},
|
|
5
|
+
"rules": {
|
|
6
|
+
"semi": ["error", "always"],
|
|
7
|
+
"object-literal-sort-keys": false,
|
|
8
|
+
"no-console": false,
|
|
9
|
+
"quotemark": [true, "single", "jsx-single"],
|
|
10
|
+
"no-unused-variable": false
|
|
11
|
+
},
|
|
12
|
+
"rulesDirectory": []
|
|
13
|
+
}
|
package/test-duration.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
const { default: durationFormat } = require('./lib/formats/duration.format');
|
|
2
|
-
|
|
3
|
-
console.log('Testing durationFormat...');
|
|
4
|
-
|
|
5
|
-
// 测试中文格式
|
|
6
|
-
console.log('中文格式测试:');
|
|
7
|
-
console.log('0秒:', durationFormat.format(0));
|
|
8
|
-
console.log('34秒:', durationFormat.format(34));
|
|
9
|
-
console.log('3分0秒:', durationFormat.format(180));
|
|
10
|
-
console.log('4小时0分0秒:', durationFormat.format(14400));
|
|
11
|
-
console.log('1天12小时0分0秒:', durationFormat.format(129600));
|
|
12
|
-
console.log('1年0天2小时3分3秒:', durationFormat.format(31536000 + 7200 + 180 + 3));
|
|
13
|
-
|
|
14
|
-
// 测试英文格式
|
|
15
|
-
console.log('\n英文格式测试:');
|
|
16
|
-
console.log('0s:', durationFormat.format(0, { locale: 'en' }));
|
|
17
|
-
console.log('34s:', durationFormat.format(34, { locale: 'en' }));
|
|
18
|
-
console.log('3m0s:', durationFormat.format(180, { locale: 'en' }));
|
|
19
|
-
console.log('4h0m0s:', durationFormat.format(14400, { locale: 'en' }));
|
|
20
|
-
console.log('1d12h0m0s:', durationFormat.format(129600, { locale: 'en' }));
|
|
21
|
-
console.log('1y0d2h3m3s:', durationFormat.format(31536000 + 7200 + 180 + 3, { locale: 'en' }));
|
|
22
|
-
|
|
23
|
-
// 测试负数情况
|
|
24
|
-
console.log('\n负数情况测试:');
|
|
25
|
-
console.log('负数:', durationFormat.format(-1));
|
|
26
|
-
|
|
27
|
-
// 测试short格式化
|
|
28
|
-
console.log('\nshort格式化测试:');
|
|
29
|
-
console.log('34s:', durationFormat.format(34, { formatter: 'short' }));
|
|
30
|
-
console.log('3m0s:', durationFormat.format(180, { formatter: 'short' }));
|
|
31
|
-
console.log('4h0m0s:', durationFormat.format(14400, { formatter: 'short' }));
|
|
32
|
-
|
|
33
|
-
console.log('\n测试完成!');
|
|
1
|
+
const { default: durationFormat } = require('./lib/formats/duration.format');
|
|
2
|
+
|
|
3
|
+
console.log('Testing durationFormat...');
|
|
4
|
+
|
|
5
|
+
// 测试中文格式
|
|
6
|
+
console.log('中文格式测试:');
|
|
7
|
+
console.log('0秒:', durationFormat.format(0));
|
|
8
|
+
console.log('34秒:', durationFormat.format(34));
|
|
9
|
+
console.log('3分0秒:', durationFormat.format(180));
|
|
10
|
+
console.log('4小时0分0秒:', durationFormat.format(14400));
|
|
11
|
+
console.log('1天12小时0分0秒:', durationFormat.format(129600));
|
|
12
|
+
console.log('1年0天2小时3分3秒:', durationFormat.format(31536000 + 7200 + 180 + 3));
|
|
13
|
+
|
|
14
|
+
// 测试英文格式
|
|
15
|
+
console.log('\n英文格式测试:');
|
|
16
|
+
console.log('0s:', durationFormat.format(0, { locale: 'en' }));
|
|
17
|
+
console.log('34s:', durationFormat.format(34, { locale: 'en' }));
|
|
18
|
+
console.log('3m0s:', durationFormat.format(180, { locale: 'en' }));
|
|
19
|
+
console.log('4h0m0s:', durationFormat.format(14400, { locale: 'en' }));
|
|
20
|
+
console.log('1d12h0m0s:', durationFormat.format(129600, { locale: 'en' }));
|
|
21
|
+
console.log('1y0d2h3m3s:', durationFormat.format(31536000 + 7200 + 180 + 3, { locale: 'en' }));
|
|
22
|
+
|
|
23
|
+
// 测试负数情况
|
|
24
|
+
console.log('\n负数情况测试:');
|
|
25
|
+
console.log('负数:', durationFormat.format(-1));
|
|
26
|
+
|
|
27
|
+
// 测试short格式化
|
|
28
|
+
console.log('\nshort格式化测试:');
|
|
29
|
+
console.log('34s:', durationFormat.format(34, { formatter: 'short' }));
|
|
30
|
+
console.log('3m0s:', durationFormat.format(180, { formatter: 'short' }));
|
|
31
|
+
console.log('4h0m0s:', durationFormat.format(14400, { formatter: 'short' }));
|
|
32
|
+
|
|
33
|
+
console.log('\n测试完成!');
|
package/tsconfig.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./templates/tsconfigs/lib.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "./lib",
|
|
5
|
-
"baseUrl": ".",
|
|
6
|
-
},
|
|
7
|
-
"include": ["src"],
|
|
8
|
-
"exclude": ["node_modules", "tests"]
|
|
9
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "./templates/tsconfigs/lib.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./lib",
|
|
5
|
+
"baseUrl": ".",
|
|
6
|
+
},
|
|
7
|
+
"include": ["src"],
|
|
8
|
+
"exclude": ["node_modules", "tests"]
|
|
9
|
+
}
|