feat: add testCase page json lint (#506)

* feat: add testCase page json lint

* fix the test case save and run method

* add shortcut for sending request

---------

Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
This commit is contained in:
Rick 2024-07-05 10:45:28 +08:00 committed by GitHub
parent 3aceced901
commit 03a614ad23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 306 additions and 80 deletions

View File

@ -8,8 +8,10 @@
"name": "atest-ui", "name": "atest-ui",
"version": "v0.0.14", "version": "v0.0.14",
"dependencies": { "dependencies": {
"@vueuse/core": "^10.11.0",
"element-plus": "^2.3.7", "element-plus": "^2.3.7",
"intro.js": "^7.0.1", "intro.js": "^7.0.1",
"jsonlint-mod": "^1.7.6",
"jsonpath-plus": "^7.2.0", "jsonpath-plus": "^7.2.0",
"skywalking-client-js": "^0.10.0", "skywalking-client-js": "^0.10.0",
"vue": "^3.3.4", "vue": "^3.3.4",
@ -2546,9 +2548,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/web-bluetooth": { "node_modules/@types/web-bluetooth": {
"version": "0.0.16", "version": "0.0.20",
"resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz", "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz",
"integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==" "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow=="
}, },
"node_modules/@types/yargs": { "node_modules/@types/yargs": {
"version": "17.0.24", "version": "17.0.24",
@ -3236,20 +3238,23 @@
} }
}, },
"node_modules/@vueuse/core": { "node_modules/@vueuse/core": {
"version": "9.13.0", "version": "10.11.0",
"resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-9.13.0.tgz", "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.11.0.tgz",
"integrity": "sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==", "integrity": "sha512-x3sD4Mkm7PJ+pcq3HX8PLPBadXCAlSDR/waK87dz0gQE+qJnaaFhc/dZVfJz+IUYzTMVGum2QlR7ImiJQN4s6g==",
"dependencies": { "dependencies": {
"@types/web-bluetooth": "^0.0.16", "@types/web-bluetooth": "^0.0.20",
"@vueuse/metadata": "9.13.0", "@vueuse/metadata": "10.11.0",
"@vueuse/shared": "9.13.0", "@vueuse/shared": "10.11.0",
"vue-demi": "*" "vue-demi": ">=0.14.8"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
} }
}, },
"node_modules/@vueuse/core/node_modules/vue-demi": { "node_modules/@vueuse/core/node_modules/vue-demi": {
"version": "0.14.5", "version": "0.14.8",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.5.tgz", "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz",
"integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==", "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==",
"hasInstallScript": true, "hasInstallScript": true,
"bin": { "bin": {
"vue-demi-fix": "bin/vue-demi-fix.js", "vue-demi-fix": "bin/vue-demi-fix.js",
@ -3258,6 +3263,9 @@
"engines": { "engines": {
"node": ">=12" "node": ">=12"
}, },
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": { "peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1", "@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0" "vue": "^3.0.0-0 || ^2.6.0"
@ -3269,22 +3277,28 @@
} }
}, },
"node_modules/@vueuse/metadata": { "node_modules/@vueuse/metadata": {
"version": "9.13.0", "version": "10.11.0",
"resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-9.13.0.tgz", "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.11.0.tgz",
"integrity": "sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==" "integrity": "sha512-kQX7l6l8dVWNqlqyN3ePW3KmjCQO3ZMgXuBMddIu83CmucrsBfXlH+JoviYyRBws/yLTQO8g3Pbw+bdIoVm4oQ==",
"funding": {
"url": "https://github.com/sponsors/antfu"
}
}, },
"node_modules/@vueuse/shared": { "node_modules/@vueuse/shared": {
"version": "9.13.0", "version": "10.11.0",
"resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-9.13.0.tgz", "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.11.0.tgz",
"integrity": "sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==", "integrity": "sha512-fyNoIXEq3PfX1L3NkNhtVQUSRtqYwJtJg+Bp9rIzculIZWHTkKSysujrOk2J+NrRulLTQH9+3gGSfYLWSEWU1A==",
"dependencies": { "dependencies": {
"vue-demi": "*" "vue-demi": ">=0.14.8"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
} }
}, },
"node_modules/@vueuse/shared/node_modules/vue-demi": { "node_modules/@vueuse/shared/node_modules/vue-demi": {
"version": "0.14.5", "version": "0.14.8",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.5.tgz", "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz",
"integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==", "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==",
"hasInstallScript": true, "hasInstallScript": true,
"bin": { "bin": {
"vue-demi-fix": "bin/vue-demi-fix.js", "vue-demi-fix": "bin/vue-demi-fix.js",
@ -3293,6 +3307,9 @@
"engines": { "engines": {
"node": ">=12" "node": ">=12"
}, },
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": { "peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1", "@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0" "vue": "^3.0.0-0 || ^2.6.0"
@ -3416,7 +3433,6 @@
"version": "3.2.1", "version": "3.2.1",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-3.2.1.tgz", "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"dependencies": { "dependencies": {
"color-convert": "^1.9.0" "color-convert": "^1.9.0"
}, },
@ -3958,7 +3974,6 @@
"version": "2.4.2", "version": "2.4.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-2.4.2.tgz", "resolved": "https://registry.npmmirror.com/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"dependencies": { "dependencies": {
"ansi-styles": "^3.2.1", "ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5", "escape-string-regexp": "^1.0.5",
@ -4118,7 +4133,6 @@
"version": "1.9.3", "version": "1.9.3",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-1.9.3.tgz", "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"dependencies": { "dependencies": {
"color-name": "1.1.3" "color-name": "1.1.3"
} }
@ -4126,8 +4140,7 @@
"node_modules/color-name": { "node_modules/color-name": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.3.tgz", "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="
"dev": true
}, },
"node_modules/colorette": { "node_modules/colorette": {
"version": "2.0.20", "version": "2.0.20",
@ -4769,6 +4782,94 @@
"vue": "^3.2.0" "vue": "^3.2.0"
} }
}, },
"node_modules/element-plus/node_modules/@types/web-bluetooth": {
"version": "0.0.16",
"resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz",
"integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ=="
},
"node_modules/element-plus/node_modules/@vueuse/core": {
"version": "9.13.0",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-9.13.0.tgz",
"integrity": "sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==",
"dependencies": {
"@types/web-bluetooth": "^0.0.16",
"@vueuse/metadata": "9.13.0",
"@vueuse/shared": "9.13.0",
"vue-demi": "*"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/element-plus/node_modules/@vueuse/core/node_modules/vue-demi": {
"version": "0.14.8",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz",
"integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==",
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/element-plus/node_modules/@vueuse/metadata": {
"version": "9.13.0",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.13.0.tgz",
"integrity": "sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==",
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/element-plus/node_modules/@vueuse/shared": {
"version": "9.13.0",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-9.13.0.tgz",
"integrity": "sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==",
"dependencies": {
"vue-demi": "*"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/element-plus/node_modules/@vueuse/shared/node_modules/vue-demi": {
"version": "0.14.8",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz",
"integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==",
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.1",
"vue": "^3.0.0-0 || ^2.6.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/emittery": { "node_modules/emittery": {
"version": "0.13.1", "version": "0.13.1",
"resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz",
@ -4954,7 +5055,6 @@
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
"engines": { "engines": {
"node": ">=0.8.0" "node": ">=0.8.0"
} }
@ -6080,7 +6180,6 @@
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
"dev": true,
"engines": { "engines": {
"node": ">=4" "node": ">=4"
} }
@ -8632,6 +8731,22 @@
"graceful-fs": "^4.1.6" "graceful-fs": "^4.1.6"
} }
}, },
"node_modules/jsonlint-mod": {
"version": "1.7.6",
"resolved": "https://registry.npmjs.org/jsonlint-mod/-/jsonlint-mod-1.7.6.tgz",
"integrity": "sha512-oGuk6E1ehmIpw0w9ttgb2KsDQQgGXBzZczREW8OfxEm9eCQYL9/LCexSnh++0z3AiYGcXpBgqDSx9AAgzl/Bvg==",
"dependencies": {
"chalk": "^2.4.2",
"JSV": "^4.0.2",
"underscore": "^1.9.1"
},
"bin": {
"jsonlint": "lib/cli.js"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/jsonpath-plus": { "node_modules/jsonpath-plus": {
"version": "7.2.0", "version": "7.2.0",
"resolved": "https://registry.npmmirror.com/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz", "resolved": "https://registry.npmmirror.com/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz",
@ -8655,6 +8770,14 @@
"verror": "1.10.0" "verror": "1.10.0"
} }
}, },
"node_modules/JSV": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/JSV/-/JSV-4.0.2.tgz",
"integrity": "sha512-ZJ6wx9xaKJ3yFUhq5/sk82PJMuUyLk277I8mQeyDgCTjGdjWJIvPfaU5LIXaMuaN2UO1X3kZH4+lgphublZUHw==",
"engines": {
"node": "*"
}
},
"node_modules/kleur": { "node_modules/kleur": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
@ -10777,7 +10900,6 @@
"version": "5.5.0", "version": "5.5.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz", "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"dependencies": { "dependencies": {
"has-flag": "^3.0.0" "has-flag": "^3.0.0"
}, },
@ -11222,6 +11344,11 @@
"which-boxed-primitive": "^1.0.2" "which-boxed-primitive": "^1.0.2"
} }
}, },
"node_modules/underscore": {
"version": "1.13.6",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz",
"integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A=="
},
"node_modules/universalify": { "node_modules/universalify": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.0.tgz",
@ -13882,9 +14009,9 @@
"dev": true "dev": true
}, },
"@types/web-bluetooth": { "@types/web-bluetooth": {
"version": "0.0.16", "version": "0.0.20",
"resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz", "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz",
"integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==" "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow=="
}, },
"@types/yargs": { "@types/yargs": {
"version": "17.0.24", "version": "17.0.24",
@ -14414,41 +14541,41 @@
} }
}, },
"@vueuse/core": { "@vueuse/core": {
"version": "9.13.0", "version": "10.11.0",
"resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-9.13.0.tgz", "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.11.0.tgz",
"integrity": "sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==", "integrity": "sha512-x3sD4Mkm7PJ+pcq3HX8PLPBadXCAlSDR/waK87dz0gQE+qJnaaFhc/dZVfJz+IUYzTMVGum2QlR7ImiJQN4s6g==",
"requires": { "requires": {
"@types/web-bluetooth": "^0.0.16", "@types/web-bluetooth": "^0.0.20",
"@vueuse/metadata": "9.13.0", "@vueuse/metadata": "10.11.0",
"@vueuse/shared": "9.13.0", "@vueuse/shared": "10.11.0",
"vue-demi": "*" "vue-demi": ">=0.14.8"
}, },
"dependencies": { "dependencies": {
"vue-demi": { "vue-demi": {
"version": "0.14.5", "version": "0.14.8",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.5.tgz", "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz",
"integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==", "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==",
"requires": {} "requires": {}
} }
} }
}, },
"@vueuse/metadata": { "@vueuse/metadata": {
"version": "9.13.0", "version": "10.11.0",
"resolved": "https://registry.npmmirror.com/@vueuse/metadata/-/metadata-9.13.0.tgz", "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.11.0.tgz",
"integrity": "sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==" "integrity": "sha512-kQX7l6l8dVWNqlqyN3ePW3KmjCQO3ZMgXuBMddIu83CmucrsBfXlH+JoviYyRBws/yLTQO8g3Pbw+bdIoVm4oQ=="
}, },
"@vueuse/shared": { "@vueuse/shared": {
"version": "9.13.0", "version": "10.11.0",
"resolved": "https://registry.npmmirror.com/@vueuse/shared/-/shared-9.13.0.tgz", "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.11.0.tgz",
"integrity": "sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==", "integrity": "sha512-fyNoIXEq3PfX1L3NkNhtVQUSRtqYwJtJg+Bp9rIzculIZWHTkKSysujrOk2J+NrRulLTQH9+3gGSfYLWSEWU1A==",
"requires": { "requires": {
"vue-demi": "*" "vue-demi": ">=0.14.8"
}, },
"dependencies": { "dependencies": {
"vue-demi": { "vue-demi": {
"version": "0.14.5", "version": "0.14.8",
"resolved": "https://registry.npmmirror.com/vue-demi/-/vue-demi-0.14.5.tgz", "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz",
"integrity": "sha512-o9NUVpl/YlsGJ7t+xuqJKx8EBGf1quRhCiT6D/J0pfwmk9zUwYkC7yrF4SZCe6fETvSM3UNL2edcbYrSyc4QHA==", "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==",
"requires": {} "requires": {}
} }
} }
@ -14540,7 +14667,6 @@
"version": "3.2.1", "version": "3.2.1",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-3.2.1.tgz", "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": { "requires": {
"color-convert": "^1.9.0" "color-convert": "^1.9.0"
} }
@ -14984,7 +15110,6 @@
"version": "2.4.2", "version": "2.4.2",
"resolved": "https://registry.npmmirror.com/chalk/-/chalk-2.4.2.tgz", "resolved": "https://registry.npmmirror.com/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": { "requires": {
"ansi-styles": "^3.2.1", "ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5", "escape-string-regexp": "^1.0.5",
@ -15108,7 +15233,6 @@
"version": "1.9.3", "version": "1.9.3",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-1.9.3.tgz", "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": { "requires": {
"color-name": "1.1.3" "color-name": "1.1.3"
} }
@ -15116,8 +15240,7 @@
"color-name": { "color-name": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.3.tgz", "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw=="
"dev": true
}, },
"colorette": { "colorette": {
"version": "2.0.20", "version": "2.0.20",
@ -15651,6 +15774,53 @@
"lodash-unified": "^1.0.2", "lodash-unified": "^1.0.2",
"memoize-one": "^6.0.0", "memoize-one": "^6.0.0",
"normalize-wheel-es": "^1.2.0" "normalize-wheel-es": "^1.2.0"
},
"dependencies": {
"@types/web-bluetooth": {
"version": "0.0.16",
"resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz",
"integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ=="
},
"@vueuse/core": {
"version": "9.13.0",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-9.13.0.tgz",
"integrity": "sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==",
"requires": {
"@types/web-bluetooth": "^0.0.16",
"@vueuse/metadata": "9.13.0",
"@vueuse/shared": "9.13.0",
"vue-demi": "*"
},
"dependencies": {
"vue-demi": {
"version": "0.14.8",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz",
"integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==",
"requires": {}
}
}
},
"@vueuse/metadata": {
"version": "9.13.0",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.13.0.tgz",
"integrity": "sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ=="
},
"@vueuse/shared": {
"version": "9.13.0",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-9.13.0.tgz",
"integrity": "sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==",
"requires": {
"vue-demi": "*"
},
"dependencies": {
"vue-demi": {
"version": "0.14.8",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz",
"integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==",
"requires": {}
}
}
}
} }
}, },
"emittery": { "emittery": {
@ -15806,8 +15976,7 @@
"escape-string-regexp": { "escape-string-regexp": {
"version": "1.0.5", "version": "1.0.5",
"resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "resolved": "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="
"dev": true
}, },
"eslint": { "eslint": {
"version": "8.43.0", "version": "8.43.0",
@ -16692,8 +16861,7 @@
"has-flag": { "has-flag": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz", "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw=="
"dev": true
}, },
"has-property-descriptors": { "has-property-descriptors": {
"version": "1.0.0", "version": "1.0.0",
@ -18631,6 +18799,16 @@
"universalify": "^2.0.0" "universalify": "^2.0.0"
} }
}, },
"jsonlint-mod": {
"version": "1.7.6",
"resolved": "https://registry.npmjs.org/jsonlint-mod/-/jsonlint-mod-1.7.6.tgz",
"integrity": "sha512-oGuk6E1ehmIpw0w9ttgb2KsDQQgGXBzZczREW8OfxEm9eCQYL9/LCexSnh++0z3AiYGcXpBgqDSx9AAgzl/Bvg==",
"requires": {
"chalk": "^2.4.2",
"JSV": "^4.0.2",
"underscore": "^1.9.1"
}
},
"jsonpath-plus": { "jsonpath-plus": {
"version": "7.2.0", "version": "7.2.0",
"resolved": "https://registry.npmmirror.com/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz", "resolved": "https://registry.npmmirror.com/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz",
@ -18648,6 +18826,11 @@
"verror": "1.10.0" "verror": "1.10.0"
} }
}, },
"JSV": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/JSV/-/JSV-4.0.2.tgz",
"integrity": "sha512-ZJ6wx9xaKJ3yFUhq5/sk82PJMuUyLk277I8mQeyDgCTjGdjWJIvPfaU5LIXaMuaN2UO1X3kZH4+lgphublZUHw=="
},
"kleur": { "kleur": {
"version": "3.0.3", "version": "3.0.3",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
@ -20349,7 +20532,6 @@
"version": "5.5.0", "version": "5.5.0",
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz", "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": { "requires": {
"has-flag": "^3.0.0" "has-flag": "^3.0.0"
} }
@ -20698,6 +20880,11 @@
"which-boxed-primitive": "^1.0.2" "which-boxed-primitive": "^1.0.2"
} }
}, },
"underscore": {
"version": "1.13.6",
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz",
"integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A=="
},
"universalify": { "universalify": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.0.tgz", "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.0.tgz",

View File

@ -16,8 +16,10 @@
"test": "vitest" "test": "vitest"
}, },
"dependencies": { "dependencies": {
"@vueuse/core": "^10.11.0",
"element-plus": "^2.3.7", "element-plus": "^2.3.7",
"intro.js": "^7.0.1", "intro.js": "^7.0.1",
"jsonlint-mod": "^1.7.6",
"jsonpath-plus": "^7.2.0", "jsonpath-plus": "^7.2.0",
"skywalking-client-js": "^0.10.0", "skywalking-client-js": "^0.10.0",
"vue": "^3.3.4", "vue": "^3.3.4",

View File

@ -77,6 +77,7 @@
"403": "403 Forbidden", "403": "403 Forbidden",
"405": "405 Method Not Allowed", "405": "405 Method Not Allowed",
"409": "409 Conflict", "409": "409 Conflict",
"415": "415 Unsupported Media Type",
"422": "422 Unprocessable Content", "422": "422 Unprocessable Content",
"500": "500 Internal Server Error", "500": "500 Internal Server Error",
"502": "502 Bad Gateway", "502": "502 Bad Gateway",

View File

@ -12,7 +12,11 @@ import type { TestCaseResponse } from './cache'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { JSONPath } from 'jsonpath-plus' import { JSONPath } from 'jsonpath-plus'
import { Codemirror } from 'vue-codemirror' import { Codemirror } from 'vue-codemirror'
import jsonlint from 'jsonlint-mod'
import { useMagicKeys } from '@vueuse/core'
const keys = useMagicKeys()
const keyAltS = keys['Alt+S']
const { t } = useI18n() const { t } = useI18n()
const props = defineProps({ const props = defineProps({
@ -26,14 +30,25 @@ let querySuggestedAPIs = NewSuggestedAPIsQuery(Cache.GetCurrentStore().name!, pr
const testResultActiveTab = ref(Cache.GetPreference().responseActiveTab) const testResultActiveTab = ref(Cache.GetPreference().responseActiveTab)
watch(testResultActiveTab, Cache.WatchResponseActiveTab) watch(testResultActiveTab, Cache.WatchResponseActiveTab)
watch(keyAltS, (v) => {
if (v) {
sendRequest()
}
})
const parameters = ref([] as Pair[]) const parameters = ref([] as Pair[])
const requestLoading = ref(false) const requestLoading = ref(false)
const testResult = ref({ header: [] as Pair[] } as TestResult) const testResult = ref({ header: [] as Pair[] } as TestResult)
const sendRequest = async () => { const sendRequest = async () => {
if (needUpdate.value) { if (needUpdate.value) {
await saveTestCase(false) await saveTestCase(false, runTestCase)
needUpdate.value = false
} else {
runTestCase()
} }
}
const runTestCase = () => {
requestLoading.value = true requestLoading.value = true
const name = props.name const name = props.name
const suite = props.suite const suite = props.suite
@ -280,7 +295,7 @@ watch(testCaseWithSuite, (after, before) => {
}, { deep: true }) }, { deep: true })
const saveLoading = ref(false) const saveLoading = ref(false)
function saveTestCase(tip: boolean = true) { function saveTestCase(tip: boolean = true, callback: (c: any) => void) {
UIAPI.UpdateTestCase(testCaseWithSuite.value, (e) => { UIAPI.UpdateTestCase(testCaseWithSuite.value, (e) => {
if (tip) { if (tip) {
ElMessage({ ElMessage({
@ -288,6 +303,10 @@ function saveTestCase(tip: boolean = true) {
type: 'success' type: 'success'
}) })
} }
if (callback) {
callback()
}
}, UIAPI.ErrorTip, saveLoading) }, UIAPI.ErrorTip, saveLoading)
} }
@ -433,15 +452,21 @@ function bodyTypeChange(e: number) {
} }
} }
function jsonFormat() { const lintingError = ref('')
if (bodyType.value !== 5) { function jsonFormat(space) {
const jsonText = testCaseWithSuite.value.data.request.body
if (bodyType.value !== 5 || jsonText === '') {
return return
} }
try { try {
testCaseWithSuite.value.data.request.body = JSON.stringify(JSON.parse(testCaseWithSuite.value.data.request.body), null, 4) const jsonObj = jsonlint.parse(jsonText)
if (space >= 0) {
testCaseWithSuite.value.data.request.body = JSON.stringify(jsonObj, null, space)
}
lintingError.value = ''
} catch (e) { } catch (e) {
console.log(e) lintingError.value = e.message
} }
} }
@ -539,7 +564,7 @@ const duplicateTestCase = () => {
v-model="testCaseWithSuite.data.request.method" v-model="testCaseWithSuite.data.request.method"
class="m-2" class="m-2"
placeholder="Method" placeholder="Method"
size="middle" size="default"
test-id="case-editor-method" test-id="case-editor-method"
> >
<el-option <el-option
@ -654,6 +679,11 @@ const duplicateTestCase = () => {
</el-tab-pane> </el-tab-pane>
<el-tab-pane name="body"> <el-tab-pane name="body">
<span style="margin-right: 10px; padding-right: 5px;">
<el-button type="primary" @click="jsonFormat(4)">Beautify</el-button>
<el-button type="primary" @click="jsonFormat(0)">Minify</el-button>
<el-text class="mx-1">Choose the body format</el-text>
</span>
<template #label> <template #label>
<el-badge :is-dot="testCaseWithSuite.data.request.body !== ''" class="item">Body</el-badge> <el-badge :is-dot="testCaseWithSuite.data.request.body !== ''" class="item">Body</el-badge>
</template> </template>
@ -667,7 +697,7 @@ const duplicateTestCase = () => {
<div style="flex-grow: 1;"> <div style="flex-grow: 1;">
<Codemirror v-if="bodyType === 3 || bodyType === 5" <Codemirror v-if="bodyType === 3 || bodyType === 5"
@change="jsonFormat" @blur="jsonFormat(-1)"
v-model="testCaseWithSuite.data.request.body"/> v-model="testCaseWithSuite.data.request.body"/>
<el-table :data="testCaseWithSuite.data.request.form" style="width: 100%" v-if="bodyType === 4"> <el-table :data="testCaseWithSuite.data.request.form" style="width: 100%" v-if="bodyType === 4">
<el-table-column label="Key" width="180"> <el-table-column label="Key" width="180">
@ -684,6 +714,9 @@ const duplicateTestCase = () => {
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div v-if="lintingError" style="color: red; margin-top: 10px;">
{{ lintingError }}
</div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="Expected" name="expected" v-if="props.kindName !== 'tRPC' && props.kindName !== 'gRPC'"> <el-tab-pane label="Expected" name="expected" v-if="props.kindName !== 'tRPC' && props.kindName !== 'gRPC'">
@ -777,7 +810,7 @@ const duplicateTestCase = () => {
v-model="currentCodeGenerator" v-model="currentCodeGenerator"
class="m-2" class="m-2"
style="padding-right: 10px;" style="padding-right: 10px;"
size="middle" size="default"
> >
<el-option <el-option
v-for="item in codeGenerators" v-for="item in codeGenerators"

View File

@ -1,11 +1,11 @@
#!/bin/bash #!/bin/bash
set -e set -e
docker-compose version docker compose version
targets=(golang java python javascript curl) targets=(golang java python javascript curl)
for target in "${targets[@]}" for target in "${targets[@]}"
do do
docker-compose down docker compose down
docker-compose up --build $target --exit-code-from $target docker compose up --build $target --exit-code-from $target
done done

View File

@ -6,6 +6,6 @@ then
file=compose.yaml file=compose.yaml
fi fi
docker-compose version docker compose version
docker-compose -f "$file" down docker compose -f "$file" down
docker-compose -f "$file" up --build testing --exit-code-from testing --remove-orphans docker compose -f "$file" up --build testing --exit-code-from testing --remove-orphans

View File

@ -10,7 +10,8 @@ ATEST_UI = console/atest-ui
.PHONY: run-server .PHONY: run-server
run-server: ## Run the API Testing server run-server: ## Run the API Testing server
run-server: build-ui run-server: build-ui run-backend
run-backend:
go run . server --local-storage 'bin/*.yaml' --console-path ${ATEST_UI}/dist --extension-registry ghcr.io go run . server --local-storage 'bin/*.yaml' --console-path ${ATEST_UI}/dist --extension-registry ghcr.io
.PHONY: run-console .PHONY: run-console

View File

@ -13,6 +13,8 @@ BUILD_FLAGS += \
.PHONY: build.ui .PHONY: build.ui
build.ui: build.ui:
cd ${ATEST_UI} && ${FRONT_RUNTIMES} i && ${FRONT_RUNTIMES} run build-only cd ${ATEST_UI} && ${FRONT_RUNTIMES} i && ${FRONT_RUNTIMES} run build-only
run-ui:
cd ${ATEST_UI} && ${FRONT_RUNTIMES} i && ${FRONT_RUNTIMES} run dev
.PHONY: build.embed.ui .PHONY: build.embed.ui
build.embed.ui: embed.ui build.embed.ui: embed.ui