add code highlighting

main
Dwsy 2 years ago committed by Redon
parent 79dd6c5e18
commit 8dab963628

@ -1,2 +1,2 @@
# Glob API URL # Glob API URL
VITE_GLOB_API_URL='http://localhost:3002' VITE_GLOB_API_URL='http://20.222.29.173:3002'

11
1.js

@ -0,0 +1,11 @@
// String containing code snippets
let str = "let x = 10; console.log(x);"
// Create regex pattern
let regexp = /^(?:\s{4}|\t).+/gm
// Test if any code snippets were detected
if (str.match(regexp)) {
// Code snippet was detected, do something with it
console.log(str)
}

@ -22,6 +22,7 @@
"common:prepare": "husky install" "common:prepare": "husky install"
}, },
"dependencies": { "dependencies": {
"highlight.js": "^11.7.0",
"naive-ui": "^2.34.3", "naive-ui": "^2.34.3",
"pinia": "^2.0.30", "pinia": "^2.0.30",
"vue": "^3.2.47", "vue": "^3.2.47",

@ -1,4 +1,4 @@
lockfileVersion: 5.4 lockfileVersion: 5.3
specifiers: specifiers:
'@antfu/eslint-config': ^0.35.2 '@antfu/eslint-config': ^0.35.2
@ -12,6 +12,7 @@ specifiers:
axios: ^1.3.2 axios: ^1.3.2
crypto-js: ^4.1.1 crypto-js: ^4.1.1
eslint: ^8.34.0 eslint: ^8.34.0
highlight.js: ^11.7.0
husky: ^8.0.3 husky: ^8.0.3
lint-staged: ^13.1.1 lint-staged: ^13.1.1
naive-ui: ^2.34.3 naive-ui: ^2.34.3
@ -27,13 +28,14 @@ specifiers:
vue-tsc: ^1.0.24 vue-tsc: ^1.0.24
dependencies: dependencies:
highlight.js: 11.7.0
naive-ui: 2.34.3_vue@3.2.47 naive-ui: 2.34.3_vue@3.2.47
pinia: 2.0.30_hmuptsblhheur2tugfgucj7gc4 pinia: 2.0.30_typescript@4.9.5+vue@3.2.47
vue: 3.2.47 vue: 3.2.47
vue-router: 4.1.6_vue@3.2.47 vue-router: 4.1.6_vue@3.2.47
devDependencies: devDependencies:
'@antfu/eslint-config': 0.35.2_7kw3g6rralp5ps6mg3uyzz6azm '@antfu/eslint-config': 0.35.2_eslint@8.34.0+typescript@4.9.5
'@commitlint/cli': 17.4.3 '@commitlint/cli': 17.4.3
'@commitlint/config-conventional': 17.4.3 '@commitlint/config-conventional': 17.4.3
'@iconify/vue': 4.1.0_vue@3.2.47 '@iconify/vue': 4.1.0_vue@3.2.47
@ -49,93 +51,85 @@ devDependencies:
npm-run-all: 4.1.5 npm-run-all: 4.1.5
postcss: 8.4.21 postcss: 8.4.21
rimraf: 4.1.2 rimraf: 4.1.2
tailwindcss: 3.2.6_postcss@8.4.21 tailwindcss: 3.2.6
typescript: 4.9.5 typescript: 4.9.5
vite: 4.1.1_@types+node@18.13.0 vite: 4.1.1_@types+node@18.13.0
vue-tsc: 1.0.24_typescript@4.9.5 vue-tsc: 1.0.24_typescript@4.9.5
packages: packages:
/@antfu/eslint-config-basic/0.35.2_6ike4423xm2xnh233ikrbff5m4: /@antfu/eslint-config-basic/0.35.2_b676bbf5f101a168ab75b3e568fc2dcd:
resolution: {integrity: sha512-2k7Ovkd8U/q0sgfjuT9KzAUV0q187yGxP7JzD2D4YifuJwL5Bh3JC49KpCv9PXMTeRUMJX2y/kOtGYPetocOug==} resolution: {integrity: sha512-2k7Ovkd8U/q0sgfjuT9KzAUV0q187yGxP7JzD2D4YifuJwL5Bh3JC49KpCv9PXMTeRUMJX2y/kOtGYPetocOug==}
peerDependencies: peerDependencies:
eslint: '>=7.4.0' eslint: '>=7.4.0'
dependencies: dependencies:
eslint: 8.34.0 eslint: 8.34.0
eslint-plugin-antfu: 0.35.2_7kw3g6rralp5ps6mg3uyzz6azm eslint-plugin-antfu: 0.35.2_eslint@8.34.0+typescript@4.9.5
eslint-plugin-eslint-comments: 3.2.0_eslint@8.34.0 eslint-plugin-eslint-comments: 3.2.0_eslint@8.34.0
eslint-plugin-html: 7.1.0 eslint-plugin-html: 7.1.0
eslint-plugin-import: 2.27.5_62tsymtiqxebhmxuag4hg3gx2m eslint-plugin-import: 2.27.5_eslint@8.34.0
eslint-plugin-jsonc: 2.6.0_eslint@8.34.0 eslint-plugin-jsonc: 2.6.0_eslint@8.34.0
eslint-plugin-markdown: 3.0.0_eslint@8.34.0 eslint-plugin-markdown: 3.0.0_eslint@8.34.0
eslint-plugin-n: 15.6.1_eslint@8.34.0 eslint-plugin-n: 15.6.1_eslint@8.34.0
eslint-plugin-no-only-tests: 3.1.0 eslint-plugin-no-only-tests: 3.1.0
eslint-plugin-promise: 6.1.1_eslint@8.34.0 eslint-plugin-promise: 6.1.1_eslint@8.34.0
eslint-plugin-unicorn: 45.0.2_eslint@8.34.0 eslint-plugin-unicorn: 45.0.2_eslint@8.34.0
eslint-plugin-unused-imports: 2.0.0_b5d7vn5fvb66hlq4xz6bd5gdxm eslint-plugin-unused-imports: 2.0.0_0f47fab7a5a87de3ae1cbe7c11f4c3bb
eslint-plugin-yml: 1.5.0_eslint@8.34.0 eslint-plugin-yml: 1.5.0_eslint@8.34.0
jsonc-eslint-parser: 2.1.0 jsonc-eslint-parser: 2.1.0
yaml-eslint-parser: 1.1.0 yaml-eslint-parser: 1.1.0
transitivePeerDependencies: transitivePeerDependencies:
- '@typescript-eslint/eslint-plugin' - '@typescript-eslint/eslint-plugin'
- '@typescript-eslint/parser'
- eslint-import-resolver-typescript
- eslint-import-resolver-webpack
- supports-color - supports-color
- typescript - typescript
dev: true dev: true
/@antfu/eslint-config-ts/0.35.2_7kw3g6rralp5ps6mg3uyzz6azm: /@antfu/eslint-config-ts/0.35.2_eslint@8.34.0+typescript@4.9.5:
resolution: {integrity: sha512-GiJtTCQ83L/vMkJlWWg2l0buH/LIOXl5szrsqtr8/Hl6ssjAMXnug8sDZMCqCIZtztzQCewBPx8ufp/MpzA2cQ==} resolution: {integrity: sha512-GiJtTCQ83L/vMkJlWWg2l0buH/LIOXl5szrsqtr8/Hl6ssjAMXnug8sDZMCqCIZtztzQCewBPx8ufp/MpzA2cQ==}
peerDependencies: peerDependencies:
eslint: '>=7.4.0' eslint: '>=7.4.0'
typescript: '>=3.9' typescript: '>=3.9'
dependencies: dependencies:
'@antfu/eslint-config-basic': 0.35.2_6ike4423xm2xnh233ikrbff5m4 '@antfu/eslint-config-basic': 0.35.2_b676bbf5f101a168ab75b3e568fc2dcd
'@typescript-eslint/eslint-plugin': 5.51.0_z4swst3wuuqk4hlme4ajzslgh4 '@typescript-eslint/eslint-plugin': 5.51.0_cf25694f76a520ae1d6c27009cc9663f
'@typescript-eslint/parser': 5.51.0_7kw3g6rralp5ps6mg3uyzz6azm '@typescript-eslint/parser': 5.51.0_eslint@8.34.0+typescript@4.9.5
eslint: 8.34.0 eslint: 8.34.0
eslint-plugin-jest: 27.2.1_wz3lx5pragqwrk3vwpswr7bnzu eslint-plugin-jest: 27.2.1_b676bbf5f101a168ab75b3e568fc2dcd
typescript: 4.9.5 typescript: 4.9.5
transitivePeerDependencies: transitivePeerDependencies:
- eslint-import-resolver-typescript
- eslint-import-resolver-webpack
- jest - jest
- supports-color - supports-color
dev: true dev: true
/@antfu/eslint-config-vue/0.35.2_6ike4423xm2xnh233ikrbff5m4: /@antfu/eslint-config-vue/0.35.2_b676bbf5f101a168ab75b3e568fc2dcd:
resolution: {integrity: sha512-98k9D+n0bgr/9OqedAEOsflIWbXz4D92pejXqkUAtnRnB2Nq5dWrrFMJ59oJwTDKnEslpwANlgIXM11qdiTF0Q==} resolution: {integrity: sha512-98k9D+n0bgr/9OqedAEOsflIWbXz4D92pejXqkUAtnRnB2Nq5dWrrFMJ59oJwTDKnEslpwANlgIXM11qdiTF0Q==}
peerDependencies: peerDependencies:
eslint: '>=7.4.0' eslint: '>=7.4.0'
dependencies: dependencies:
'@antfu/eslint-config-basic': 0.35.2_6ike4423xm2xnh233ikrbff5m4 '@antfu/eslint-config-basic': 0.35.2_b676bbf5f101a168ab75b3e568fc2dcd
'@antfu/eslint-config-ts': 0.35.2_7kw3g6rralp5ps6mg3uyzz6azm '@antfu/eslint-config-ts': 0.35.2_eslint@8.34.0+typescript@4.9.5
eslint: 8.34.0 eslint: 8.34.0
eslint-plugin-vue: 9.9.0_eslint@8.34.0 eslint-plugin-vue: 9.9.0_eslint@8.34.0
local-pkg: 0.4.3 local-pkg: 0.4.3
transitivePeerDependencies: transitivePeerDependencies:
- '@typescript-eslint/eslint-plugin' - '@typescript-eslint/eslint-plugin'
- '@typescript-eslint/parser'
- eslint-import-resolver-typescript
- eslint-import-resolver-webpack
- jest - jest
- supports-color - supports-color
- typescript - typescript
dev: true dev: true
/@antfu/eslint-config/0.35.2_7kw3g6rralp5ps6mg3uyzz6azm: /@antfu/eslint-config/0.35.2_eslint@8.34.0+typescript@4.9.5:
resolution: {integrity: sha512-bbm7Yh7VgNI9ZaYs/L1oSTQwPMIdvlRtqxPfaBLpYdEvnsOuT4yX84TO0YaZ4RFjE4jqxQCSE/eioxydmWnl4w==} resolution: {integrity: sha512-bbm7Yh7VgNI9ZaYs/L1oSTQwPMIdvlRtqxPfaBLpYdEvnsOuT4yX84TO0YaZ4RFjE4jqxQCSE/eioxydmWnl4w==}
peerDependencies: peerDependencies:
eslint: '>=7.4.0' eslint: '>=7.4.0'
dependencies: dependencies:
'@antfu/eslint-config-vue': 0.35.2_6ike4423xm2xnh233ikrbff5m4 '@antfu/eslint-config-vue': 0.35.2_b676bbf5f101a168ab75b3e568fc2dcd
'@typescript-eslint/eslint-plugin': 5.51.0_z4swst3wuuqk4hlme4ajzslgh4 '@typescript-eslint/eslint-plugin': 5.51.0_cf25694f76a520ae1d6c27009cc9663f
'@typescript-eslint/parser': 5.51.0_7kw3g6rralp5ps6mg3uyzz6azm '@typescript-eslint/parser': 5.51.0_eslint@8.34.0+typescript@4.9.5
eslint: 8.34.0 eslint: 8.34.0
eslint-plugin-eslint-comments: 3.2.0_eslint@8.34.0 eslint-plugin-eslint-comments: 3.2.0_eslint@8.34.0
eslint-plugin-html: 7.1.0 eslint-plugin-html: 7.1.0
eslint-plugin-import: 2.27.5_62tsymtiqxebhmxuag4hg3gx2m eslint-plugin-import: 2.27.5_eslint@8.34.0
eslint-plugin-jsonc: 2.6.0_eslint@8.34.0 eslint-plugin-jsonc: 2.6.0_eslint@8.34.0
eslint-plugin-n: 15.6.1_eslint@8.34.0 eslint-plugin-n: 15.6.1_eslint@8.34.0
eslint-plugin-promise: 6.1.1_eslint@8.34.0 eslint-plugin-promise: 6.1.1_eslint@8.34.0
@ -145,8 +139,6 @@ packages:
jsonc-eslint-parser: 2.1.0 jsonc-eslint-parser: 2.1.0
yaml-eslint-parser: 1.1.0 yaml-eslint-parser: 1.1.0
transitivePeerDependencies: transitivePeerDependencies:
- eslint-import-resolver-typescript
- eslint-import-resolver-webpack
- jest - jest
- supports-color - supports-color
- typescript - typescript
@ -280,12 +272,12 @@ packages:
'@types/node': 18.13.0 '@types/node': 18.13.0
chalk: 4.1.2 chalk: 4.1.2
cosmiconfig: 8.0.0 cosmiconfig: 8.0.0
cosmiconfig-typescript-loader: 4.3.0_p7cp6dsfhdrlk7mvuxd3wodbsu cosmiconfig-typescript-loader: 4.3.0_7fc4ff0e4538e2b57d95a5c7bb386195
lodash.isplainobject: 4.0.6 lodash.isplainobject: 4.0.6
lodash.merge: 4.6.2 lodash.merge: 4.6.2
lodash.uniq: 4.5.0 lodash.uniq: 4.5.0
resolve-from: 5.0.0 resolve-from: 5.0.0
ts-node: 10.9.1_4bewfcp2iebiwuold25d6rgcsy ts-node: 10.9.1_e0496289fa41028b51cb1eba3f44c296
typescript: 4.9.5 typescript: 4.9.5
transitivePeerDependencies: transitivePeerDependencies:
- '@swc/core' - '@swc/core'
@ -753,7 +745,7 @@ packages:
resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==}
dev: true dev: true
/@typescript-eslint/eslint-plugin/5.51.0_z4swst3wuuqk4hlme4ajzslgh4: /@typescript-eslint/eslint-plugin/5.51.0_cf25694f76a520ae1d6c27009cc9663f:
resolution: {integrity: sha512-wcAwhEWm1RgNd7dxD/o+nnLW8oH+6RK1OGnmbmkj/GGoDPV1WWMVP0FXYQBivKHdwM1pwii3bt//RC62EriIUQ==} resolution: {integrity: sha512-wcAwhEWm1RgNd7dxD/o+nnLW8oH+6RK1OGnmbmkj/GGoDPV1WWMVP0FXYQBivKHdwM1pwii3bt//RC62EriIUQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies: peerDependencies:
@ -764,10 +756,10 @@ packages:
typescript: typescript:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/parser': 5.51.0_7kw3g6rralp5ps6mg3uyzz6azm '@typescript-eslint/parser': 5.51.0_eslint@8.34.0+typescript@4.9.5
'@typescript-eslint/scope-manager': 5.51.0 '@typescript-eslint/scope-manager': 5.51.0
'@typescript-eslint/type-utils': 5.51.0_7kw3g6rralp5ps6mg3uyzz6azm '@typescript-eslint/type-utils': 5.51.0_eslint@8.34.0+typescript@4.9.5
'@typescript-eslint/utils': 5.51.0_7kw3g6rralp5ps6mg3uyzz6azm '@typescript-eslint/utils': 5.51.0_eslint@8.34.0+typescript@4.9.5
debug: 4.3.4 debug: 4.3.4
eslint: 8.34.0 eslint: 8.34.0
grapheme-splitter: 1.0.4 grapheme-splitter: 1.0.4
@ -781,7 +773,7 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/parser/5.51.0_7kw3g6rralp5ps6mg3uyzz6azm: /@typescript-eslint/parser/5.51.0_eslint@8.34.0+typescript@4.9.5:
resolution: {integrity: sha512-fEV0R9gGmfpDeRzJXn+fGQKcl0inIeYobmmUWijZh9zA7bxJ8clPhV9up2ZQzATxAiFAECqPQyMDB4o4B81AaA==} resolution: {integrity: sha512-fEV0R9gGmfpDeRzJXn+fGQKcl0inIeYobmmUWijZh9zA7bxJ8clPhV9up2ZQzATxAiFAECqPQyMDB4o4B81AaA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies: peerDependencies:
@ -809,7 +801,7 @@ packages:
'@typescript-eslint/visitor-keys': 5.51.0 '@typescript-eslint/visitor-keys': 5.51.0
dev: true dev: true
/@typescript-eslint/type-utils/5.51.0_7kw3g6rralp5ps6mg3uyzz6azm: /@typescript-eslint/type-utils/5.51.0_eslint@8.34.0+typescript@4.9.5:
resolution: {integrity: sha512-QHC5KKyfV8sNSyHqfNa0UbTbJ6caB8uhcx2hYcWVvJAZYJRBo5HyyZfzMdRx8nvS+GyMg56fugMzzWnojREuQQ==} resolution: {integrity: sha512-QHC5KKyfV8sNSyHqfNa0UbTbJ6caB8uhcx2hYcWVvJAZYJRBo5HyyZfzMdRx8nvS+GyMg56fugMzzWnojREuQQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies: peerDependencies:
@ -820,7 +812,7 @@ packages:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/typescript-estree': 5.51.0_typescript@4.9.5 '@typescript-eslint/typescript-estree': 5.51.0_typescript@4.9.5
'@typescript-eslint/utils': 5.51.0_7kw3g6rralp5ps6mg3uyzz6azm '@typescript-eslint/utils': 5.51.0_eslint@8.34.0+typescript@4.9.5
debug: 4.3.4 debug: 4.3.4
eslint: 8.34.0 eslint: 8.34.0
tsutils: 3.21.0_typescript@4.9.5 tsutils: 3.21.0_typescript@4.9.5
@ -855,7 +847,7 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/utils/5.51.0_7kw3g6rralp5ps6mg3uyzz6azm: /@typescript-eslint/utils/5.51.0_eslint@8.34.0+typescript@4.9.5:
resolution: {integrity: sha512-76qs+5KWcaatmwtwsDJvBk4H76RJQBFe+Gext0EfJdC3Vd2kpY2Pf//OHHzHp84Ciw0/rYoGTDnIAr3uWhhJYw==} resolution: {integrity: sha512-76qs+5KWcaatmwtwsDJvBk4H76RJQBFe+Gext0EfJdC3Vd2kpY2Pf//OHHzHp84Ciw0/rYoGTDnIAr3uWhhJYw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies: peerDependencies:
@ -990,6 +982,7 @@ packages:
dependencies: dependencies:
'@vue/reactivity': 3.2.47 '@vue/reactivity': 3.2.47
'@vue/shared': 3.2.47 '@vue/shared': 3.2.47
dev: false
/@vue/runtime-dom/3.2.47: /@vue/runtime-dom/3.2.47:
resolution: {integrity: sha512-ArXrFTjS6TsDei4qwNvgrdmHtD930KgSKGhS5M+j8QxXrDJYLqYw4RRcDy1bz1m1wMmb6j+zGLifdVHtkXA7gA==} resolution: {integrity: sha512-ArXrFTjS6TsDei4qwNvgrdmHtD930KgSKGhS5M+j8QxXrDJYLqYw4RRcDy1bz1m1wMmb6j+zGLifdVHtkXA7gA==}
@ -997,6 +990,7 @@ packages:
'@vue/runtime-core': 3.2.47 '@vue/runtime-core': 3.2.47
'@vue/shared': 3.2.47 '@vue/shared': 3.2.47
csstype: 2.6.21 csstype: 2.6.21
dev: false
/@vue/server-renderer/3.2.47_vue@3.2.47: /@vue/server-renderer/3.2.47_vue@3.2.47:
resolution: {integrity: sha512-dN9gc1i8EvmP9RCzvneONXsKfBRgqFeFZLurmHOveL7oH6HiFXJw5OGu294n1nHc/HMgTy6LulU/tv5/A7f/LA==} resolution: {integrity: sha512-dN9gc1i8EvmP9RCzvneONXsKfBRgqFeFZLurmHOveL7oH6HiFXJw5OGu294n1nHc/HMgTy6LulU/tv5/A7f/LA==}
@ -1006,6 +1000,7 @@ packages:
'@vue/compiler-ssr': 3.2.47 '@vue/compiler-ssr': 3.2.47
'@vue/shared': 3.2.47 '@vue/shared': 3.2.47
vue: 3.2.47 vue: 3.2.47
dev: false
/@vue/shared/3.2.47: /@vue/shared/3.2.47:
resolution: {integrity: sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==} resolution: {integrity: sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==}
@ -1480,15 +1475,15 @@ packages:
engines: {node: '>=10'} engines: {node: '>=10'}
hasBin: true hasBin: true
dependencies: dependencies:
JSONStream: 1.3.5
is-text-path: 1.0.1 is-text-path: 1.0.1
JSONStream: 1.3.5
lodash: 4.17.21 lodash: 4.17.21
meow: 8.1.2 meow: 8.1.2
split2: 3.2.2 split2: 3.2.2
through2: 4.0.2 through2: 4.0.2
dev: true dev: true
/cosmiconfig-typescript-loader/4.3.0_p7cp6dsfhdrlk7mvuxd3wodbsu: /cosmiconfig-typescript-loader/4.3.0_7fc4ff0e4538e2b57d95a5c7bb386195:
resolution: {integrity: sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==} resolution: {integrity: sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==}
engines: {node: '>=12', npm: '>=6'} engines: {node: '>=12', npm: '>=6'}
peerDependencies: peerDependencies:
@ -1499,7 +1494,7 @@ packages:
dependencies: dependencies:
'@types/node': 18.13.0 '@types/node': 18.13.0
cosmiconfig: 8.0.0 cosmiconfig: 8.0.0
ts-node: 10.9.1_4bewfcp2iebiwuold25d6rgcsy ts-node: 10.9.1_e0496289fa41028b51cb1eba3f44c296
typescript: 4.9.5 typescript: 4.9.5
dev: true dev: true
@ -1556,6 +1551,7 @@ packages:
/csstype/2.6.21: /csstype/2.6.21:
resolution: {integrity: sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==} resolution: {integrity: sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w==}
dev: false
/csstype/3.0.11: /csstype/3.0.11:
resolution: {integrity: sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==} resolution: {integrity: sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==}
@ -1585,11 +1581,6 @@ packages:
/debug/3.2.7: /debug/3.2.7:
resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==}
peerDependencies:
supports-color: '*'
peerDependenciesMeta:
supports-color:
optional: true
dependencies: dependencies:
ms: 2.1.3 ms: 2.1.3
dev: true dev: true
@ -1859,43 +1850,25 @@ packages:
debug: 3.2.7 debug: 3.2.7
is-core-module: 2.11.0 is-core-module: 2.11.0
resolve: 1.22.1 resolve: 1.22.1
transitivePeerDependencies:
- supports-color
dev: true dev: true
/eslint-module-utils/2.7.4_ithmlgmaospkvl4p7n7pyp3rgq: /eslint-module-utils/2.7.4_eslint@8.34.0:
resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==}
engines: {node: '>=4'} engines: {node: '>=4'}
peerDependencies: peerDependencies:
'@typescript-eslint/parser': '*'
eslint: '*' eslint: '*'
eslint-import-resolver-node: '*'
eslint-import-resolver-typescript: '*'
eslint-import-resolver-webpack: '*'
peerDependenciesMeta: peerDependenciesMeta:
'@typescript-eslint/parser':
optional: true
eslint: eslint:
optional: true optional: true
eslint-import-resolver-node:
optional: true
eslint-import-resolver-typescript:
optional: true
eslint-import-resolver-webpack:
optional: true
dependencies: dependencies:
'@typescript-eslint/parser': 5.51.0_7kw3g6rralp5ps6mg3uyzz6azm
debug: 3.2.7 debug: 3.2.7
eslint: 8.34.0 eslint: 8.34.0
eslint-import-resolver-node: 0.3.7
transitivePeerDependencies:
- supports-color
dev: true dev: true
/eslint-plugin-antfu/0.35.2_7kw3g6rralp5ps6mg3uyzz6azm: /eslint-plugin-antfu/0.35.2_eslint@8.34.0+typescript@4.9.5:
resolution: {integrity: sha512-Q6FOcOakafU49PDRlq7jkrWmlTJ4u3AW7aGX+FqeQNaMgjXq0RzPGvS0Vyp7q/XDRLLoe0BjbGkamTeZXg8waw==} resolution: {integrity: sha512-Q6FOcOakafU49PDRlq7jkrWmlTJ4u3AW7aGX+FqeQNaMgjXq0RzPGvS0Vyp7q/XDRLLoe0BjbGkamTeZXg8waw==}
dependencies: dependencies:
'@typescript-eslint/utils': 5.51.0_7kw3g6rralp5ps6mg3uyzz6azm '@typescript-eslint/utils': 5.51.0_eslint@8.34.0+typescript@4.9.5
transitivePeerDependencies: transitivePeerDependencies:
- eslint - eslint
- supports-color - supports-color
@ -1930,17 +1903,12 @@ packages:
htmlparser2: 8.0.1 htmlparser2: 8.0.1
dev: true dev: true
/eslint-plugin-import/2.27.5_62tsymtiqxebhmxuag4hg3gx2m: /eslint-plugin-import/2.27.5_eslint@8.34.0:
resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==} resolution: {integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==}
engines: {node: '>=4'} engines: {node: '>=4'}
peerDependencies: peerDependencies:
'@typescript-eslint/parser': '*'
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8
peerDependenciesMeta:
'@typescript-eslint/parser':
optional: true
dependencies: dependencies:
'@typescript-eslint/parser': 5.51.0_7kw3g6rralp5ps6mg3uyzz6azm
array-includes: 3.1.6 array-includes: 3.1.6
array.prototype.flat: 1.3.1 array.prototype.flat: 1.3.1
array.prototype.flatmap: 1.3.1 array.prototype.flatmap: 1.3.1
@ -1948,7 +1916,7 @@ packages:
doctrine: 2.1.0 doctrine: 2.1.0
eslint: 8.34.0 eslint: 8.34.0
eslint-import-resolver-node: 0.3.7 eslint-import-resolver-node: 0.3.7
eslint-module-utils: 2.7.4_ithmlgmaospkvl4p7n7pyp3rgq eslint-module-utils: 2.7.4_eslint@8.34.0
has: 1.0.3 has: 1.0.3
is-core-module: 2.11.0 is-core-module: 2.11.0
is-glob: 4.0.3 is-glob: 4.0.3
@ -1957,13 +1925,9 @@ packages:
resolve: 1.22.1 resolve: 1.22.1
semver: 6.3.0 semver: 6.3.0
tsconfig-paths: 3.14.1 tsconfig-paths: 3.14.1
transitivePeerDependencies:
- eslint-import-resolver-typescript
- eslint-import-resolver-webpack
- supports-color
dev: true dev: true
/eslint-plugin-jest/27.2.1_wz3lx5pragqwrk3vwpswr7bnzu: /eslint-plugin-jest/27.2.1_b676bbf5f101a168ab75b3e568fc2dcd:
resolution: {integrity: sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==} resolution: {integrity: sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
peerDependencies: peerDependencies:
@ -1976,8 +1940,8 @@ packages:
jest: jest:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/eslint-plugin': 5.51.0_z4swst3wuuqk4hlme4ajzslgh4 '@typescript-eslint/eslint-plugin': 5.51.0_cf25694f76a520ae1d6c27009cc9663f
'@typescript-eslint/utils': 5.51.0_7kw3g6rralp5ps6mg3uyzz6azm '@typescript-eslint/utils': 5.51.0_eslint@8.34.0+typescript@4.9.5
eslint: 8.34.0 eslint: 8.34.0
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -2064,7 +2028,7 @@ packages:
strip-indent: 3.0.0 strip-indent: 3.0.0
dev: true dev: true
/eslint-plugin-unused-imports/2.0.0_b5d7vn5fvb66hlq4xz6bd5gdxm: /eslint-plugin-unused-imports/2.0.0_0f47fab7a5a87de3ae1cbe7c11f4c3bb:
resolution: {integrity: sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A==} resolution: {integrity: sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies: peerDependencies:
@ -2074,7 +2038,7 @@ packages:
'@typescript-eslint/eslint-plugin': '@typescript-eslint/eslint-plugin':
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/eslint-plugin': 5.51.0_z4swst3wuuqk4hlme4ajzslgh4 '@typescript-eslint/eslint-plugin': 5.51.0_cf25694f76a520ae1d6c27009cc9663f
eslint: 8.34.0 eslint: 8.34.0
eslint-rule-composer: 0.3.0 eslint-rule-composer: 0.3.0
dev: true dev: true
@ -3581,7 +3545,7 @@ packages:
engines: {node: '>=4'} engines: {node: '>=4'}
dev: true dev: true
/pinia/2.0.30_hmuptsblhheur2tugfgucj7gc4: /pinia/2.0.30_typescript@4.9.5+vue@3.2.47:
resolution: {integrity: sha512-q6DUmxWwe/mQgg+55QQjykpKC+aGeGdaJV3niminl19V08dE+LRTvSEuqi6/NLSGCKHI49KGL6tMNEOssFiMyA==} resolution: {integrity: sha512-q6DUmxWwe/mQgg+55QQjykpKC+aGeGdaJV3niminl19V08dE+LRTvSEuqi6/NLSGCKHI49KGL6tMNEOssFiMyA==}
peerDependencies: peerDependencies:
'@vue/composition-api': ^1.4.0 '@vue/composition-api': ^1.4.0
@ -4141,12 +4105,10 @@ packages:
engines: {node: '>= 0.4'} engines: {node: '>= 0.4'}
dev: true dev: true
/tailwindcss/3.2.6_postcss@8.4.21: /tailwindcss/3.2.6:
resolution: {integrity: sha512-BfgQWZrtqowOQMC2bwaSNe7xcIjdDEgixWGYOd6AL0CbKHJlvhfdbINeAW76l1sO+1ov/MJ93ODJ9yluRituIw==} resolution: {integrity: sha512-BfgQWZrtqowOQMC2bwaSNe7xcIjdDEgixWGYOd6AL0CbKHJlvhfdbINeAW76l1sO+1ov/MJ93ODJ9yluRituIw==}
engines: {node: '>=12.13.0'} engines: {node: '>=12.13.0'}
hasBin: true hasBin: true
peerDependencies:
postcss: ^8.0.9
dependencies: dependencies:
arg: 5.0.2 arg: 5.0.2
chokidar: 3.5.3 chokidar: 3.5.3
@ -4214,7 +4176,7 @@ packages:
engines: {node: '>=8'} engines: {node: '>=8'}
dev: true dev: true
/ts-node/10.9.1_4bewfcp2iebiwuold25d6rgcsy: /ts-node/10.9.1_e0496289fa41028b51cb1eba3f44c296:
resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
@ -4316,6 +4278,7 @@ packages:
resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==}
engines: {node: '>=4.2.0'} engines: {node: '>=4.2.0'}
hasBin: true hasBin: true
dev: true
/unbox-primitive/1.0.2: /unbox-primitive/1.0.2:
resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
@ -4489,6 +4452,7 @@ packages:
'@vue/runtime-dom': 3.2.47 '@vue/runtime-dom': 3.2.47
'@vue/server-renderer': 3.2.47_vue@3.2.47 '@vue/server-renderer': 3.2.47_vue@3.2.47
'@vue/shared': 3.2.47 '@vue/shared': 3.2.47
dev: false
/vueuc/0.4.51_vue@3.2.47: /vueuc/0.4.51_vue@3.2.47:
resolution: {integrity: sha512-pLiMChM4f+W8czlIClGvGBYo656lc2Y0/mXFSCydcSmnCR1izlKPGMgiYBGjbY9FDkFG8a2HEVz7t0DNzBWbDw==} resolution: {integrity: sha512-pLiMChM4f+W8czlIClGvGBYo656lc2Y0/mXFSCydcSmnCR1izlKPGMgiYBGjbY9FDkFG8a2HEVz7t0DNzBWbDw==}

@ -9,7 +9,10 @@ defineProps<Props>()
<template> <template>
<div class="p-2 mt-2 rounded-md" :class="[reversal ? 'bg-[#d2f9d1]' : 'bg-[#f4f6f8]']"> <div class="p-2 mt-2 rounded-md" :class="[reversal ? 'bg-[#d2f9d1]' : 'bg-[#f4f6f8]']">
<span class="leading-relaxed whitespace-pre-wrap" :class="[{ 'text-red-500': error }]"> <span v-if="!reversal" class="leading-relaxed whitespace-pre-wrap" :class="[{ 'text-red-500': error }]" v-hljs>
<slot />
</span>
<span v-else class="leading-relaxed whitespace-pre-wrap" :class="[{ 'text-red-500': error }]">
<slot /> <slot />
</span> </span>
</div> </div>

@ -3,7 +3,8 @@ import App from './App.vue'
import { setupAssets } from '@/plugins' import { setupAssets } from '@/plugins'
import { setupStore } from '@/store' import { setupStore } from '@/store'
import { setupRouter } from '@/router' import { setupRouter } from '@/router'
import hljs from 'highlight.js'
import "highlight.js/styles/xcode.css"
async function bootstrap() { async function bootstrap() {
const app = createApp(App) const app = createApp(App)
setupAssets() setupAssets()
@ -12,6 +13,15 @@ async function bootstrap() {
await setupRouter(app) await setupRouter(app)
let regexp = /^(?:\s{4}|\t).+/gm
app.directive('hljs', {
mounted: (el: HTMLElement) => {
if (el.textContent?.indexOf(" = ") != -1 || el.textContent.match(regexp)) {
hljs.highlightBlock(el)
}
}
})
app.mount('#app') app.mount('#app')
} }

@ -7,3 +7,7 @@ body,
#app { #app {
height: 100%; height: 100%;
} }
.hljs{
background-color: #fff0!important;
}

@ -2,7 +2,7 @@ import axios, { type AxiosResponse } from 'axios'
const service = axios.create({ const service = axios.create({
baseURL: import.meta.env.VITE_GLOB_API_URL, baseURL: import.meta.env.VITE_GLOB_API_URL,
timeout: 10 * 1000, timeout: 60 * 1000,
}) })
service.interceptors.request.use( service.interceptors.request.use(

Loading…
Cancel
Save