mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-21 21:44:40 +03:00
Merge branch 'feat/bounce-parser' into chore/all-my-stuffs
# Conflicts: # src/components/TextareaCopyable.vue # src/tools/index.ts
This commit is contained in:
commit
7a140fca92
10 files changed
+242
-20
No files matched your search
@@ -65,6 +65,7 @@
|
|||||||
"crypto-js": "^4.1.1",
|
"crypto-js": "^4.1.1",
|
||||||
"date-fns": "^2.29.3",
|
"date-fns": "^2.29.3",
|
||||||
"dompurify": "^3.0.6",
|
"dompurify": "^3.0.6",
|
||||||
|
"email-bounce-parser-browser": "^1.1",
|
||||||
"email-normalizer": "^1.0.0",
|
"email-normalizer": "^1.0.0",
|
||||||
"emojilib": "^3.0.10",
|
"emojilib": "^3.0.10",
|
||||||
"figlet": "^1.7.0",
|
"figlet": "^1.7.0",
|
||||||
|
|||||||
Generated
+72
-4
@@ -5,6 +5,12 @@ settings:
|
|||||||
excludeLinksFromLockfile: false
|
excludeLinksFromLockfile: false
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
'@chenfengyuan/vue-barcode':
|
||||||
|
specifier: ^2.0.2
|
||||||
|
version: 2.0.2(jsbarcode@3.11.6)(vue@3.3.4)
|
||||||
|
'@github/paste-markdown':
|
||||||
|
specifier: ^1.5.3
|
||||||
|
version: 1.5.3
|
||||||
'@it-tools/bip39':
|
'@it-tools/bip39':
|
||||||
specifier: ^0.0.4
|
specifier: ^0.0.4
|
||||||
version: 0.0.4
|
version: 0.0.4
|
||||||
@@ -50,12 +56,18 @@ dependencies:
|
|||||||
'@vueuse/router':
|
'@vueuse/router':
|
||||||
specifier: ^10.0.0
|
specifier: ^10.0.0
|
||||||
version: 10.0.0(vue-router@4.1.6)(vue@3.3.4)
|
version: 10.0.0(vue-router@4.1.6)(vue@3.3.4)
|
||||||
|
'@zxing/library':
|
||||||
|
specifier: ^0.21.0
|
||||||
|
version: 0.21.3
|
||||||
bcryptjs:
|
bcryptjs:
|
||||||
specifier: ^2.4.3
|
specifier: ^2.4.3
|
||||||
version: 2.4.3
|
version: 2.4.3
|
||||||
change-case:
|
change-case:
|
||||||
specifier: ^4.1.2
|
specifier: ^4.1.2
|
||||||
version: 4.1.2
|
version: 4.1.2
|
||||||
|
chatgpt-prompt-splitter:
|
||||||
|
specifier: ^1.0.5
|
||||||
|
version: 1.0.5
|
||||||
colord:
|
colord:
|
||||||
specifier: ^2.9.3
|
specifier: ^2.9.3
|
||||||
version: 2.9.3
|
version: 2.9.3
|
||||||
@@ -80,6 +92,9 @@ dependencies:
|
|||||||
dompurify:
|
dompurify:
|
||||||
specifier: ^3.0.6
|
specifier: ^3.0.6
|
||||||
version: 3.0.6
|
version: 3.0.6
|
||||||
|
email-bounce-parser-browser:
|
||||||
|
specifier: ^1.1
|
||||||
|
version: 1.1.0
|
||||||
email-normalizer:
|
email-normalizer:
|
||||||
specifier: ^1.0.0
|
specifier: ^1.0.0
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
@@ -105,8 +120,11 @@ dependencies:
|
|||||||
specifier: ^4.3.3
|
specifier: ^4.3.3
|
||||||
version: 4.3.3
|
version: 4.3.3
|
||||||
js-base64:
|
js-base64:
|
||||||
specifier: ^3.7.6
|
specifier: ^3.7.7
|
||||||
version: 3.7.7
|
version: 3.7.7
|
||||||
|
jsbarcode:
|
||||||
|
specifier: ^3.11.6
|
||||||
|
version: 3.11.6
|
||||||
json5:
|
json5:
|
||||||
specifier: ^2.2.3
|
specifier: ^2.2.3
|
||||||
version: 2.2.3
|
version: 2.2.3
|
||||||
@@ -1925,6 +1943,16 @@ packages:
|
|||||||
'@babel/helper-validator-identifier': 7.22.20
|
'@babel/helper-validator-identifier': 7.22.20
|
||||||
to-fast-properties: 2.0.0
|
to-fast-properties: 2.0.0
|
||||||
|
|
||||||
|
/@chenfengyuan/vue-barcode@2.0.2(jsbarcode@3.11.6)(vue@3.3.4):
|
||||||
|
resolution: {integrity: sha512-lHQhYfcqWeeA/UYoe4O+O6c8WD+t9WO8SiWohKOVVIiwPhcvC58YxhvlFvJme0/CPL7+Sh1XCpMaC9Mo2Dt5jQ==}
|
||||||
|
peerDependencies:
|
||||||
|
jsbarcode: ^3.11.0
|
||||||
|
vue: ^3.0.0
|
||||||
|
dependencies:
|
||||||
|
jsbarcode: 3.11.6
|
||||||
|
vue: 3.3.4
|
||||||
|
dev: false
|
||||||
|
|
||||||
/@css-render/plugin-bem@0.15.12(css-render@0.15.12):
|
/@css-render/plugin-bem@0.15.12(css-render@0.15.12):
|
||||||
resolution: {integrity: sha512-Lq2jSOZn+wYQtsyaFj6QRz2EzAnd3iW5fZeHO1WSXQdVYwvwGX0ZiH3X2JQgtgYLT1yeGtrwrqJdNdMEUD2xTw==}
|
resolution: {integrity: sha512-Lq2jSOZn+wYQtsyaFj6QRz2EzAnd3iW5fZeHO1WSXQdVYwvwGX0ZiH3X2JQgtgYLT1yeGtrwrqJdNdMEUD2xTw==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -2180,6 +2208,10 @@ packages:
|
|||||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/@github/paste-markdown@1.5.3:
|
||||||
|
resolution: {integrity: sha512-PzZ1b3PaqBzYqbT4fwKEhiORf38h2OcGp2+JdXNNM7inZ7egaSmfmhyNkQILpqWfS0AYtRS3CDq6z03eZ8yOMQ==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/@humanwhocodes/config-array@0.11.10:
|
/@humanwhocodes/config-array@0.11.10:
|
||||||
resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==}
|
resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==}
|
||||||
engines: {node: '>=10.10.0'}
|
engines: {node: '>=10.10.0'}
|
||||||
@@ -2666,9 +2698,11 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@tabler/icons': 3.20.0
|
'@tabler/icons': 3.20.0
|
||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
|
dev: false
|
||||||
|
|
||||||
/@tabler/icons@3.20.0:
|
/@tabler/icons@3.20.0:
|
||||||
resolution: {integrity: sha512-nXSeUzsCOxX/Of+kdUVQfxL9bG+ck8XCWNf9dGSpE+nhVexRwk/4HiDQDxFDysfT7vfgSut6GXnrZsU5M5dSlA==}
|
resolution: {integrity: sha512-nXSeUzsCOxX/Of+kdUVQfxL9bG+ck8XCWNf9dGSpE+nhVexRwk/4HiDQDxFDysfT7vfgSut6GXnrZsU5M5dSlA==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/@tiptap/core@2.1.12(@tiptap/pm@2.1.6):
|
/@tiptap/core@2.1.12(@tiptap/pm@2.1.6):
|
||||||
resolution: {integrity: sha512-ZGc3xrBJA9KY8kln5AYTj8y+GDrKxi7u95xIl2eccrqTY5CQeRu6HRNM1yT4mAjuSaG9jmazyjGRlQuhyxCKxQ==}
|
resolution: {integrity: sha512-ZGc3xrBJA9KY8kln5AYTj8y+GDrKxi7u95xIl2eccrqTY5CQeRu6HRNM1yT4mAjuSaG9jmazyjGRlQuhyxCKxQ==}
|
||||||
@@ -3412,7 +3446,7 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@unhead/dom': 0.5.1
|
'@unhead/dom': 0.5.1
|
||||||
'@unhead/schema': 0.5.1
|
'@unhead/schema': 0.5.1
|
||||||
'@vueuse/shared': 11.0.3(vue@3.3.4)
|
'@vueuse/shared': 11.2.0(vue@3.3.4)
|
||||||
unhead: 0.5.1
|
unhead: 0.5.1
|
||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -4054,8 +4088,8 @@ packages:
|
|||||||
- vue
|
- vue
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@vueuse/shared@11.0.3(vue@3.3.4):
|
/@vueuse/shared@11.2.0(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-0rY2m6HS5t27n/Vp5cTDsKTlNnimCqsbh/fmT2LgE+aaU42EMfXo8+bNX91W9I7DDmxfuACXMmrd7d79JxkqWA==}
|
resolution: {integrity: sha512-VxFjie0EanOudYSgMErxXfq6fo8vhr5ICI+BuE3I9FnX7ePllEsVrRQ7O6Q1TLgApeLuPKcHQxAXpP+KnlrJsg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
vue-demi: 0.14.10(vue@3.3.4)
|
vue-demi: 0.14.10(vue@3.3.4)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
@@ -4067,6 +4101,21 @@ packages:
|
|||||||
resolution: {integrity: sha512-P1A1vRGFBhITco8Iw4/hvnDYoE/SoVrd71dW1pBFdXJb3vP+pBtoOuhbEKy0ROJGOyzQuqvFibcwzyLlWMqNiQ==}
|
resolution: {integrity: sha512-P1A1vRGFBhITco8Iw4/hvnDYoE/SoVrd71dW1pBFdXJb3vP+pBtoOuhbEKy0ROJGOyzQuqvFibcwzyLlWMqNiQ==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/@zxing/library@0.21.3:
|
||||||
|
resolution: {integrity: sha512-hZHqFe2JyH/ZxviJZosZjV+2s6EDSY0O24R+FQmlWZBZXP9IqMo7S3nb3+2LBWxodJQkSurdQGnqE7KXqrYgow==}
|
||||||
|
engines: {node: '>= 10.4.0'}
|
||||||
|
dependencies:
|
||||||
|
ts-custom-error: 3.3.1
|
||||||
|
optionalDependencies:
|
||||||
|
'@zxing/text-encoding': 0.9.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/@zxing/text-encoding@0.9.0:
|
||||||
|
resolution: {integrity: sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==}
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
/abab@2.0.6:
|
/abab@2.0.6:
|
||||||
resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==}
|
resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==}
|
||||||
dev: true
|
dev: true
|
||||||
@@ -4501,6 +4550,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==}
|
resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/chatgpt-prompt-splitter@1.0.5:
|
||||||
|
resolution: {integrity: sha512-8buXXnxZ5Y5BloPTMEhGTVld9vrVB8WVrUFrjgOpIJ4/VsT+rTnLszbaS1L1KAB0SDSCqj8GU472S2gMyhH8EA==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/check-error@1.0.2:
|
/check-error@1.0.2:
|
||||||
resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==}
|
resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==}
|
||||||
dev: true
|
dev: true
|
||||||
@@ -5036,6 +5089,10 @@ packages:
|
|||||||
/electron-to-chromium@1.4.572:
|
/electron-to-chromium@1.4.572:
|
||||||
resolution: {integrity: sha512-RlFobl4D3ieetbnR+2EpxdzFl9h0RAJkPK3pfiwMug2nhBin2ZCsGIAJWdpNniLz43sgXam/CgipOmvTA+rUiA==}
|
resolution: {integrity: sha512-RlFobl4D3ieetbnR+2EpxdzFl9h0RAJkPK3pfiwMug2nhBin2ZCsGIAJWdpNniLz43sgXam/CgipOmvTA+rUiA==}
|
||||||
|
|
||||||
|
/email-bounce-parser-browser@1.1.0:
|
||||||
|
resolution: {integrity: sha512-aPMJKpvAPTFTqDI3/bMxcEHK3Wk2yy/tNK/nVWHl5zqyoxJFFgO5a2jvVno4V3e+kyLjZx2M5KJNgNmYf0ZkuQ==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/email-normalizer@1.0.0:
|
/email-normalizer@1.0.0:
|
||||||
resolution: {integrity: sha512-wZYuuMtL4kUOmg/TPtCrf9hAZjbFq+FcjWA85Z5nr2lGllRnWJPxCJw3gy4Cx+adMoyVw4VJfGGvt/OHgIW+qg==}
|
resolution: {integrity: sha512-wZYuuMtL4kUOmg/TPtCrf9hAZjbFq+FcjWA85Z5nr2lGllRnWJPxCJw3gy4Cx+adMoyVw4VJfGGvt/OHgIW+qg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -6579,6 +6636,10 @@ packages:
|
|||||||
argparse: 2.0.1
|
argparse: 2.0.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/jsbarcode@3.11.6:
|
||||||
|
resolution: {integrity: sha512-G5TKGyKY1zJo0ZQKFM1IIMfy0nF2rs92BLlCz+cU4/TazIc4ZH+X1GYeDRt7TKjrYqmPfTjwTBkU/QnQlsYiuA==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/jsbn@1.1.0:
|
/jsbn@1.1.0:
|
||||||
resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==}
|
resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==}
|
||||||
dev: false
|
dev: false
|
||||||
@@ -8236,6 +8297,7 @@ packages:
|
|||||||
|
|
||||||
/sortablejs@1.14.0:
|
/sortablejs@1.14.0:
|
||||||
resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==}
|
resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/source-map-js@1.0.2:
|
/source-map-js@1.0.2:
|
||||||
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
|
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
|
||||||
@@ -8610,6 +8672,11 @@ packages:
|
|||||||
typescript: 5.2.2
|
typescript: 5.2.2
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/ts-custom-error@3.3.1:
|
||||||
|
resolution: {integrity: sha512-5OX1tzOjxWEgsr/YEUWSuPrQ00deKLh6D7OTWcvNHm12/7QPyRh8SYpyWvA4IZv8H/+GQWQEh/kwo95Q9OVW1A==}
|
||||||
|
engines: {node: '>=14.0.0'}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/tslib@1.14.1:
|
/tslib@1.14.1:
|
||||||
resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
|
resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
|
||||||
dev: true
|
dev: true
|
||||||
@@ -9369,6 +9436,7 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
sortablejs: 1.14.0
|
sortablejs: 1.14.0
|
||||||
vue: 3.3.4
|
vue: 3.3.4
|
||||||
|
dev: false
|
||||||
|
|
||||||
/vueuc@0.4.51(vue@3.3.4):
|
/vueuc@0.4.51(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-pLiMChM4f+W8czlIClGvGBYo656lc2Y0/mXFSCydcSmnCR1izlKPGMgiYBGjbY9FDkFG8a2HEVz7t0DNzBWbDw==}
|
resolution: {integrity: sha512-pLiMChM4f+W8czlIClGvGBYo656lc2Y0/mXFSCydcSmnCR1izlKPGMgiYBGjbY9FDkFG8a2HEVz7t0DNzBWbDw==}
|
||||||
|
|||||||
Executable
BIN
Binary file not shown.
@@ -7,8 +7,15 @@ import sqlHljs from 'highlight.js/lib/languages/sql';
|
|||||||
import xmlHljs from 'highlight.js/lib/languages/xml';
|
import xmlHljs from 'highlight.js/lib/languages/xml';
|
||||||
import yamlHljs from 'highlight.js/lib/languages/yaml';
|
import yamlHljs from 'highlight.js/lib/languages/yaml';
|
||||||
import iniHljs from 'highlight.js/lib/languages/ini';
|
import iniHljs from 'highlight.js/lib/languages/ini';
|
||||||
|
import bashHljs from 'highlight.js/lib/languages/bash';
|
||||||
import markdownHljs from 'highlight.js/lib/languages/markdown';
|
import markdownHljs from 'highlight.js/lib/languages/markdown';
|
||||||
|
import jsHljs from 'highlight.js/lib/languages/javascript';
|
||||||
|
import cssHljs from 'highlight.js/lib/languages/css';
|
||||||
|
import goHljs from 'highlight.js/lib/languages/go';
|
||||||
|
import csharpHljs from 'highlight.js/lib/languages/csharp';
|
||||||
|
import { Base64 } from 'js-base64';
|
||||||
import { useCopy } from '@/composable/copy';
|
import { useCopy } from '@/composable/copy';
|
||||||
|
import { useDownloadFileFromBase64 } from '@/composable/downloadBase64';
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@@ -18,12 +25,16 @@ const props = withDefaults(
|
|||||||
copyPlacement?: 'top-right' | 'bottom-right' | 'outside' | 'none'
|
copyPlacement?: 'top-right' | 'bottom-right' | 'outside' | 'none'
|
||||||
copyMessage?: string
|
copyMessage?: string
|
||||||
wordWrap?: boolean
|
wordWrap?: boolean
|
||||||
|
downloadFileName?: string
|
||||||
|
downloadButtonText?: string
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
followHeightOf: null,
|
followHeightOf: null,
|
||||||
language: 'txt',
|
language: 'txt',
|
||||||
copyPlacement: 'top-right',
|
copyPlacement: 'top-right',
|
||||||
copyMessage: 'Copy to clipboard',
|
copyMessage: 'Copy to clipboard',
|
||||||
|
downloadFileName: '',
|
||||||
|
downloadButtonText: 'Download',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
hljs.registerLanguage('sql', sqlHljs);
|
hljs.registerLanguage('sql', sqlHljs);
|
||||||
@@ -32,13 +43,25 @@ hljs.registerLanguage('html', xmlHljs);
|
|||||||
hljs.registerLanguage('xml', xmlHljs);
|
hljs.registerLanguage('xml', xmlHljs);
|
||||||
hljs.registerLanguage('yaml', yamlHljs);
|
hljs.registerLanguage('yaml', yamlHljs);
|
||||||
hljs.registerLanguage('toml', iniHljs);
|
hljs.registerLanguage('toml', iniHljs);
|
||||||
|
hljs.registerLanguage('bash', bashHljs);
|
||||||
hljs.registerLanguage('markdown', markdownHljs);
|
hljs.registerLanguage('markdown', markdownHljs);
|
||||||
|
hljs.registerLanguage('css', cssHljs);
|
||||||
|
hljs.registerLanguage('javascript', jsHljs);
|
||||||
|
hljs.registerLanguage('go', goHljs);
|
||||||
|
hljs.registerLanguage('csharp', csharpHljs);
|
||||||
|
|
||||||
const { value, language, followHeightOf, copyPlacement, copyMessage } = toRefs(props);
|
const { value, language, followHeightOf, copyPlacement, copyMessage, downloadFileName, downloadButtonText } = toRefs(props);
|
||||||
const { height } = followHeightOf.value ? useElementSize(followHeightOf) : { height: ref(null) };
|
const { height } = followHeightOf.value ? useElementSize(followHeightOf) : { height: ref(null) };
|
||||||
|
|
||||||
const { copy, isJustCopied } = useCopy({ source: value, createToast: false });
|
const { copy, isJustCopied } = useCopy({ source: value, createToast: false });
|
||||||
const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : copyMessage.value);
|
const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : copyMessage.value);
|
||||||
|
|
||||||
|
const valueBase64 = computed(() => Base64.encode(value.value));
|
||||||
|
const { download } = useDownloadFileFromBase64(
|
||||||
|
{
|
||||||
|
source: valueBase64,
|
||||||
|
filename: downloadFileName,
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -53,8 +76,13 @@ const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : copyMessage.
|
|||||||
<n-code :code="value" :language="language" :word-wrap="wordWrap" :trim="false" data-test-id="area-content" />
|
<n-code :code="value" :language="language" :word-wrap="wordWrap" :trim="false" data-test-id="area-content" />
|
||||||
</n-config-provider>
|
</n-config-provider>
|
||||||
</n-scrollbar>
|
</n-scrollbar>
|
||||||
<div absolute right-10px top-10px>
|
<div
|
||||||
<c-tooltip v-if="value" :tooltip="tooltipText" position="left">
|
v-if="value && copyPlacement !== 'none'"
|
||||||
|
absolute right-10px
|
||||||
|
:top-10px="copyPlacement === 'top-right' ? '' : 'no'"
|
||||||
|
:bottom-10px="copyPlacement === 'bottom-right' ? '' : 'no'"
|
||||||
|
>
|
||||||
|
<c-tooltip v-if="value && copyPlacement !== 'outside'" :tooltip="tooltipText" position="left">
|
||||||
<c-button circle important:h-10 important:w-10 @click="copy()">
|
<c-button circle important:h-10 important:w-10 @click="copy()">
|
||||||
<n-icon size="22" :component="Copy" />
|
<n-icon size="22" :component="Copy" />
|
||||||
</c-button>
|
</c-button>
|
||||||
@@ -66,6 +94,11 @@ const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : copyMessage.
|
|||||||
{{ tooltipText }}
|
{{ tooltipText }}
|
||||||
</c-button>
|
</c-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="downloadFileName !== '' && value !== ''" mt-5 flex justify-center>
|
||||||
|
<c-button secondary @click="download">
|
||||||
|
{{ downloadButtonText }}
|
||||||
|
</c-button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { extension as getExtensionFromMimeType, extension as getMimeTypeFromExtension } from 'mime-types';
|
import { extension as getExtensionFromMimeType, extension as getMimeTypeFromExtension } from 'mime-types';
|
||||||
import type { Ref } from 'vue';
|
import type { MaybeRef, Ref } from 'vue';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
import { get } from '@vueuse/core';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
getMimeTypeFromBase64,
|
getMimeTypeFromBase64,
|
||||||
@@ -75,21 +76,11 @@ function downloadFromBase64({ sourceValue, filename, extension, fileMimeType }:
|
|||||||
}
|
}
|
||||||
|
|
||||||
function useDownloadFileFromBase64(
|
function useDownloadFileFromBase64(
|
||||||
{ source, filename, extension, fileMimeType }:
|
|
||||||
{ source: Ref<string>; filename?: string; extension?: string; fileMimeType?: string }) {
|
|
||||||
return {
|
|
||||||
download() {
|
|
||||||
downloadFromBase64({ sourceValue: source.value, filename, extension, fileMimeType });
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
function useDownloadFileFromBase64Refs(
|
|
||||||
{ source, filename, extension }:
|
{ source, filename, extension }:
|
||||||
{ source: Ref<string>; filename?: Ref<string>; extension?: Ref<string> }) {
|
{ source: MaybeRef<string>; filename?: MaybeRef<string>; extension?: MaybeRef<string> }) {
|
||||||
return {
|
return {
|
||||||
download() {
|
download() {
|
||||||
downloadFromBase64({ sourceValue: source.value, filename: filename?.value, extension: extension?.value });
|
downloadFromBase64({ sourceValue: get(source), filename: get(filename), extension: get(extension) });
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -116,3 +107,13 @@ function previewImageFromBase64(base64String: string): HTMLImageElement {
|
|||||||
|
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function useDownloadFileFromBase64Refs(
|
||||||
|
{ source, filename, extension }:
|
||||||
|
{ source: Ref<string>; filename?: Ref<string>; extension?: Ref<string> }) {
|
||||||
|
return {
|
||||||
|
download() {
|
||||||
|
downloadFromBase64({ sourceValue: source.value, filename: filename?.value, extension: extension?.value });
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import EmailBounceParse from 'email-bounce-parser-browser';
|
||||||
|
|
||||||
|
const emailContent = ref('');
|
||||||
|
|
||||||
|
const parsedBounce = computed(() => {
|
||||||
|
try {
|
||||||
|
return { email: new EmailBounceParse().read(emailContent.value) };
|
||||||
|
}
|
||||||
|
catch (e: any) {
|
||||||
|
return { parsingError: e.toString() };
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div style="max-width: 600px;">
|
||||||
|
<c-card title="Input" mb-2>
|
||||||
|
<c-input-text
|
||||||
|
v-model:value="emailContent"
|
||||||
|
label="Bounce Email Textual Content"
|
||||||
|
multiline
|
||||||
|
placeholder="Put your email text content here..."
|
||||||
|
rows="15"
|
||||||
|
mb-2
|
||||||
|
/>
|
||||||
|
</c-card>
|
||||||
|
|
||||||
|
<c-card v-if="parsedBounce && emailContent" title="Output" mb-2>
|
||||||
|
<n-p v-if="parsedBounce.email?.email?.error" style="color: green" mb-2>
|
||||||
|
This mail is a bounce email
|
||||||
|
</n-p>
|
||||||
|
<n-p v-if="!parsedBounce.email?.email?.error" style="color: red" mb-2>
|
||||||
|
This mail is NOT a bounce email
|
||||||
|
</n-p>
|
||||||
|
<c-alert v-if="parsedBounce.parsingError" mb-2>
|
||||||
|
{{ parsedBounce.parsingError }}
|
||||||
|
</c-alert>
|
||||||
|
<input-copyable v-if="parsedBounce.email?.data?.recipient" label="Recipient" :value="parsedBounce.email?.data?.recipient" mb-2 />
|
||||||
|
<div v-if="parsedBounce.email?.email?.error">
|
||||||
|
<c-card title="Error" mb-2>
|
||||||
|
<input-copyable v-if="parsedBounce.email?.data?.command" label="Command" :value="parsedBounce.email?.data?.command" />
|
||||||
|
<input-copyable v-if="parsedBounce.email?.data?.error?.code?.basic || parsedBounce.email?.data?.error?.code?.enhanced" label="Code" :value="`${parsedBounce.email?.data?.error?.code?.basic}/${parsedBounce.email?.data?.error?.code?.enhanced}`" />
|
||||||
|
<input-copyable v-if="parsedBounce.email?.data?.error?.label" label="Label" :value="parsedBounce.email?.data?.error?.label" />
|
||||||
|
<input-copyable v-if="parsedBounce.email?.data?.error?.type" label="Type" :value="parsedBounce.email?.data?.error?.type" />
|
||||||
|
<input-copyable v-if="parsedBounce.email?.data?.error?.temporary" label="Temporary" :value="parsedBounce.email?.data?.error?.temporary" />
|
||||||
|
<input-copyable v-if="parsedBounce.email?.data?.error?.permanent" label="Permanent" :value="parsedBounce.email?.data?.error?.permanent" />
|
||||||
|
<input-copyable v-if="parsedBounce.email?.data?.error?.data?.type" label="Subtype" :value="parsedBounce.email?.data?.error?.data?.type" />
|
||||||
|
<input-copyable v-if="parsedBounce.email?.data?.error?.data?.blocked" label="Blocked" :value="parsedBounce.email?.data?.error?.data?.blocked" />
|
||||||
|
<input-copyable v-if="parsedBounce.email?.data?.error?.data?.spam" label="Spam" :value="parsedBounce.email?.data?.error?.data?.spam" />
|
||||||
|
</c-card>
|
||||||
|
<c-card v-if="parsedBounce.email?.data?.server?.hostname || parsedBounce.email?.data?.server?.ip" title="Server" mb-2>
|
||||||
|
<input-copyable v-if="parsedBounce.email?.data?.server?.hostname" label="Host" :value="parsedBounce.email?.data?.server?.hostname" />
|
||||||
|
<input-copyable v-if="parsedBounce.email?.data?.server?.ip" label="IP" :value="parsedBounce.email?.data?.server?.ip" />
|
||||||
|
<input-copyable v-if="parsedBounce.email?.data?.server?.port" label="Port" :value="parsedBounce.email?.data?.server?.port" />
|
||||||
|
</c-card>
|
||||||
|
<c-card title="Details" mb-2>
|
||||||
|
<textarea-copyable :value="JSON.stringify(parsedBounce.email?.data, null, 2)" />
|
||||||
|
</c-card>
|
||||||
|
<c-card title="Raw Error" mb-2>
|
||||||
|
<textarea-copyable :value="parsedBounce.email?.email?.error" word-wrap />
|
||||||
|
</c-card>
|
||||||
|
</div>
|
||||||
|
</c-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
declare module "email-bounce-parser-browser" {
|
||||||
|
export default class EmailBounceParse {
|
||||||
|
read(emailContent: string): {
|
||||||
|
bounce: boolean
|
||||||
|
email?: {
|
||||||
|
body?: string
|
||||||
|
intro?: string
|
||||||
|
error?: string
|
||||||
|
}
|
||||||
|
data?: {
|
||||||
|
error?: {
|
||||||
|
code?: {
|
||||||
|
basic?: string
|
||||||
|
enhanced?:string
|
||||||
|
}
|
||||||
|
label?: string
|
||||||
|
type?: string
|
||||||
|
temporary?: boolean
|
||||||
|
permanent?: boolean
|
||||||
|
data?: {
|
||||||
|
type?: string
|
||||||
|
blocked?: boolean
|
||||||
|
spam?: boolean
|
||||||
|
}
|
||||||
|
}
|
||||||
|
recipient?:string
|
||||||
|
server?: {
|
||||||
|
hostname?: string
|
||||||
|
ip?: string
|
||||||
|
port?: string
|
||||||
|
}
|
||||||
|
command?: string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { Mailbox } from '@vicons/tabler';
|
||||||
|
import { defineTool } from '../tool';
|
||||||
|
|
||||||
|
export const tool = defineTool({
|
||||||
|
name: 'Bounce Email Parser',
|
||||||
|
path: '/bounce-parser',
|
||||||
|
description: 'Parse SMTP Bounce Emails',
|
||||||
|
keywords: ['bounce', 'email', 'smtp', 'parser'],
|
||||||
|
component: () => import('./bounce-parser.vue'),
|
||||||
|
icon: Mailbox,
|
||||||
|
createdAt: new Date('2024-08-15'),
|
||||||
|
});
|
||||||
@@ -2,6 +2,7 @@ import { tool as base64FileConverter } from './base64-file-converter';
|
|||||||
import { tool as base64StringConverter } from './base64-string-converter';
|
import { tool as base64StringConverter } from './base64-string-converter';
|
||||||
import { tool as basicAuthGenerator } from './basic-auth-generator';
|
import { tool as basicAuthGenerator } from './basic-auth-generator';
|
||||||
import { tool as emailNormalizer } from './email-normalizer';
|
import { tool as emailNormalizer } from './email-normalizer';
|
||||||
|
import { tool as bounceParser } from './bounce-parser';
|
||||||
|
|
||||||
import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
||||||
|
|
||||||
@@ -143,6 +144,7 @@ export const toolsByCategory: ToolCategory[] = [
|
|||||||
jsonDiff,
|
jsonDiff,
|
||||||
safelinkDecoder,
|
safelinkDecoder,
|
||||||
apiTester,
|
apiTester,
|
||||||
|
bounceParser,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -113,4 +113,7 @@ export default defineConfig({
|
|||||||
build: {
|
build: {
|
||||||
target: 'esnext',
|
target: 'esnext',
|
||||||
},
|
},
|
||||||
|
optimizeDeps: {
|
||||||
|
include: ['re2-wasm-embedded'], // optionally specify dependency name
|
||||||
|
},
|
||||||
});
|
});
|
||||||
Reference in new issue
Block a user