mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
Merge branch 'feat/mime-converter' into chore/all-my-stuffs
# Conflicts: # components.d.ts # package.json # pnpm-lock.yaml # src/tools/index.ts # vite.config.ts
This commit is contained in:
commit
1147281b3a
6 files changed
+118
-1
No files matched your search
@@ -101,6 +101,7 @@
|
||||
"@types/figlet": "^1.5.8",
|
||||
"@types/sshpk": "^1.17.4",
|
||||
"@types/js-beautify": "^1.14.3",
|
||||
"@types/libmime": "^5.0.3",
|
||||
"@vicons/material": "^0.12.0",
|
||||
"@vicons/tabler": "^0.12.0",
|
||||
"@vueuse/core": "^10.11.1",
|
||||
@@ -226,6 +227,7 @@
|
||||
"jsonlint-mod": "^1.7.6",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"korean-unpacker": "^1.0.3",
|
||||
"libmime": "^5.3.4",
|
||||
"libphonenumber-js": "^1.10.28",
|
||||
"lodash": "^4.17.21",
|
||||
"luxon": "^3.5.0",
|
||||
|
||||
Generated
+35
-1
@@ -101,6 +101,9 @@ dependencies:
|
||||
'@types/jsonpath':
|
||||
specifier: ^0.2.4
|
||||
version: 0.2.4
|
||||
'@types/libmime':
|
||||
specifier: ^5.0.3
|
||||
version: 5.0.3
|
||||
'@types/lodash.defaultsdeep':
|
||||
specifier: ^4.6.9
|
||||
version: 4.6.9
|
||||
@@ -425,6 +428,9 @@ dependencies:
|
||||
korean-unpacker:
|
||||
specifier: ^1.0.3
|
||||
version: 1.0.3
|
||||
libmime:
|
||||
specifier: ^5.3.4
|
||||
version: 5.3.5
|
||||
libphonenumber-js:
|
||||
specifier: ^1.10.28
|
||||
version: 1.10.28
|
||||
@@ -5651,6 +5657,12 @@ packages:
|
||||
resolution: {integrity: sha512-DD2Y3xMlTQvAnN6d8803xdgnOeYZ+HwMglb7/9YCf49J9RkJL53azf9qKa40MkEYhqVwxZ1GS2+VlShnz4Z1Bw==}
|
||||
dev: false
|
||||
|
||||
/@types/libmime@5.0.3:
|
||||
resolution: {integrity: sha512-fJ4ISAOqnWpnojw5+Ya1Fu1lPWf3PTK9E8KwJoUnJvtTXYepuFwzE4EI4lMhbAshCVu8jLdQrWLjBZyEcFgADQ==}
|
||||
dependencies:
|
||||
'@types/node': 18.18.8
|
||||
dev: false
|
||||
|
||||
/@types/linkify-it@3.0.2:
|
||||
resolution: {integrity: sha512-HZQYqbiFVWufzCwexrvh694SOim8z2d+xJl5UNamcvQFejLY/2YUtzXHYi3cHdI7PMlS8ejH2slRAOJQ32aNbA==}
|
||||
|
||||
@@ -8861,6 +8873,11 @@ packages:
|
||||
resolution: {integrity: sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw==}
|
||||
dev: false
|
||||
|
||||
/encoding-japanese@2.1.0:
|
||||
resolution: {integrity: sha512-58XySVxUgVlBikBTbQ8WdDxBDHIdXucB16LO5PBHR8t75D54wQrNo4cg+58+R1CtJfKnsVsvt9XlteRaR8xw1w==}
|
||||
engines: {node: '>=8.10.0'}
|
||||
dev: false
|
||||
|
||||
/end-of-stream@1.4.4:
|
||||
resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==}
|
||||
dependencies:
|
||||
@@ -10067,7 +10084,6 @@ packages:
|
||||
|
||||
/glob@7.2.3:
|
||||
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
|
||||
deprecated: Glob versions prior to v9 are no longer supported
|
||||
dependencies:
|
||||
fs.realpath: 1.0.0
|
||||
inflight: 1.0.6
|
||||
@@ -11552,15 +11568,32 @@ packages:
|
||||
prelude-ls: 1.2.1
|
||||
type-check: 0.4.0
|
||||
|
||||
/libbase64@1.3.0:
|
||||
resolution: {integrity: sha512-GgOXd0Eo6phYgh0DJtjQ2tO8dc0IVINtZJeARPeiIJqge+HdsWSuaDTe8ztQ7j/cONByDZ3zeB325AHiv5O0dg==}
|
||||
dev: false
|
||||
|
||||
/libheif-js@1.18.2:
|
||||
resolution: {integrity: sha512-4Nk0dKhhRfVS4mECcX2jSDpNU6gcHQLneJjkGQq61N8COGtjSpSA3CI+1Q3kUYv5Vf+SwIqUtaDSdU6JO37c6w==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
dev: false
|
||||
|
||||
/libmime@5.3.5:
|
||||
resolution: {integrity: sha512-nSlR1yRZ43L3cZCiWEw7ali3jY29Hz9CQQ96Oy+sSspYnIP5N54ucOPHqooBsXzwrX1pwn13VUE05q4WmzfaLg==}
|
||||
dependencies:
|
||||
encoding-japanese: 2.1.0
|
||||
iconv-lite: 0.6.3
|
||||
libbase64: 1.3.0
|
||||
libqp: 2.1.0
|
||||
dev: false
|
||||
|
||||
/libphonenumber-js@1.10.28:
|
||||
resolution: {integrity: sha512-1eAgjLrZA0+2Wgw4hs+4Q/kEBycxQo8ZLYnmOvZ3AlM8ImAVAJgDPlZtISLEzD1vunc2q8s2Pn7XwB7I8U3Kzw==}
|
||||
dev: false
|
||||
|
||||
/libqp@2.1.0:
|
||||
resolution: {integrity: sha512-O6O6/fsG5jiUVbvdgT7YX3xY3uIadR6wEZ7+vy9u7PKHAlSEB6blvC1o5pHBjgsi95Uo0aiBBdkyFecj6jtb7A==}
|
||||
dev: false
|
||||
|
||||
/liftoff@5.0.0:
|
||||
resolution: {integrity: sha512-a5BQjbCHnB+cy+gsro8lXJ4kZluzOijzJ1UVVfyJYZC+IP2pLv1h4+aysQeKuTmyO8NAqfyQAk4HWaP/HjcKTg==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
@@ -16694,6 +16727,7 @@ packages:
|
||||
|
||||
/yamljs@0.3.0:
|
||||
resolution: {integrity: sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
argparse: 1.0.10
|
||||
glob: 7.2.3
|
||||
|
||||
@@ -73,6 +73,7 @@ import { tool as ocrImage } from './ocr-image';
|
||||
import { tool as ansibleVaultCryptDecrypt } from './ansible-vault-crypt-decrypt';
|
||||
import { tool as gzipConverter } from './gzip-converter';
|
||||
import { tool as htpasswdGenerator } from './htpasswd-generator';
|
||||
import { tool as mimeConverter } from './mime-converter';
|
||||
import { tool as safelinkDecoder } from './safelink-decoder';
|
||||
import { tool as mongoObjectidConverter } from './mongo-objectid-converter';
|
||||
import { tool as removeExif } from './remove-exif';
|
||||
@@ -308,6 +309,7 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
jsonToXml,
|
||||
gzipConverter,
|
||||
htmlCleaner,
|
||||
mimeConverter,
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import { Mail } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'MIME Encoding Converter',
|
||||
path: '/mime-converter',
|
||||
description: 'Convert from/to MIME Encoded-Word format (Mail Subject)',
|
||||
keywords: ['mime', 'converter', 'subject', 'rfc2047', 'rfc1341', 'rfc2045'],
|
||||
component: () => import('./mime-converter.vue'),
|
||||
icon: Mail,
|
||||
createdAt: new Date('2024-03-09'),
|
||||
});
|
||||
@@ -0,0 +1,66 @@
|
||||
<script setup lang="ts">
|
||||
import libmime from 'libmime';
|
||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||
import { withDefaultOnError } from '@/utils/defaults';
|
||||
|
||||
const encodedInput = ref('');
|
||||
const decodedOutput = computed(() => withDefaultOnError(() => libmime.decodeWords(encodedInput.value), '# invalid encoded value'));
|
||||
|
||||
const rawInput = ref('');
|
||||
const encodedQOutput = computed(() => withDefaultOnError(() => libmime.encodeWord(rawInput.value, 'Q'), ''));
|
||||
const encodedBOutput = computed(() => withDefaultOnError(() => libmime.encodeWord(rawInput.value, 'B'), ''));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div style="max-width: 600px;">
|
||||
<c-card title="Encode string in Encoded-Word format">
|
||||
<c-input-text
|
||||
v-model:value="rawInput"
|
||||
multiline
|
||||
placeholder="Put your string here..."
|
||||
rows="5"
|
||||
label="String to encode"
|
||||
raw-text
|
||||
mb-5
|
||||
/>
|
||||
|
||||
<div>
|
||||
<h3>Quotted Printable encoded string</h3>
|
||||
<TextareaCopyable
|
||||
:value="encodedQOutput"
|
||||
placeholder="The Quotted Printable encoded version of your string will be here"
|
||||
mb-5
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h3>Base64 encoded string</h3>
|
||||
<TextareaCopyable
|
||||
:value="encodedBOutput"
|
||||
placeholder="The Base64 encoded version of your string will be here"
|
||||
mb-5
|
||||
/>
|
||||
</div>
|
||||
</c-card>
|
||||
|
||||
<c-card title="Decode string in Encoded-Word format">
|
||||
<c-input-text
|
||||
v-model:value="encodedInput"
|
||||
multiline
|
||||
placeholder="Your encoded string..."
|
||||
rows="5"
|
||||
label="Encoded string to decode"
|
||||
mb-5
|
||||
/>
|
||||
|
||||
<div>
|
||||
<h3>Decoded string</h3>
|
||||
<TextareaCopyable
|
||||
v-model:value="decodedOutput"
|
||||
placeholder="The decoded string will be here"
|
||||
mb-5
|
||||
/>
|
||||
</div>
|
||||
</c-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -12,6 +12,7 @@ import Icons from 'unplugin-icons/vite';
|
||||
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers';
|
||||
import Components from 'unplugin-vue-components/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
import markdown from 'vite-plugin-vue-markdown';
|
||||
import svgLoader from 'vite-svg-loader';
|
||||
|
||||
Reference in new issue
Block a user