mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-22 22:02:38 +03:00
Merge branch 'feat/punycode' into chore/all-my-stuffs
# Conflicts: # components.d.ts # package.json # pnpm-lock.yaml # src/tools/index.ts
This commit is contained in:
commit
87de5f9186
5 files changed
+97
-11
No files matched your search
@@ -82,6 +82,7 @@
|
|||||||
"@types/figlet": "^1.5.8",
|
"@types/figlet": "^1.5.8",
|
||||||
"@types/markdown-it": "^13.0.7",
|
"@types/markdown-it": "^13.0.7",
|
||||||
"@types/potrace": "^2.1.5",
|
"@types/potrace": "^2.1.5",
|
||||||
|
"@types/punycode": "^2.1.4",
|
||||||
"@vicons/material": "^0.12.0",
|
"@vicons/material": "^0.12.0",
|
||||||
"@vicons/tabler": "^0.12.0",
|
"@vicons/tabler": "^0.12.0",
|
||||||
"@vueuse/core": "^10.11.1",
|
"@vueuse/core": "^10.11.1",
|
||||||
@@ -181,6 +182,7 @@
|
|||||||
"plausible-tracker": "^0.3.8",
|
"plausible-tracker": "^0.3.8",
|
||||||
"pretty-ms": "^9.1.0",
|
"pretty-ms": "^9.1.0",
|
||||||
"qpdf-wasm-esm-embedded": "^1.1.1",
|
"qpdf-wasm-esm-embedded": "^1.1.1",
|
||||||
|
"punycode": "^2.3.1",
|
||||||
"qrcode": "^1.5.1",
|
"qrcode": "^1.5.1",
|
||||||
"randexp": "^0.5.3",
|
"randexp": "^0.5.3",
|
||||||
"regex": "^4.3.3",
|
"regex": "^4.3.3",
|
||||||
|
|||||||
Generated
+14
-11
@@ -113,6 +113,9 @@ dependencies:
|
|||||||
'@types/potrace':
|
'@types/potrace':
|
||||||
specifier: ^2.1.5
|
specifier: ^2.1.5
|
||||||
version: 2.1.5
|
version: 2.1.5
|
||||||
|
'@types/punycode':
|
||||||
|
specifier: ^2.1.4
|
||||||
|
version: 2.1.4
|
||||||
'@types/turndown':
|
'@types/turndown':
|
||||||
specifier: ^5.0.4
|
specifier: ^5.0.4
|
||||||
version: 5.0.5
|
version: 5.0.5
|
||||||
@@ -386,6 +389,9 @@ dependencies:
|
|||||||
pretty-ms:
|
pretty-ms:
|
||||||
specifier: ^9.1.0
|
specifier: ^9.1.0
|
||||||
version: 9.1.0
|
version: 9.1.0
|
||||||
|
punycode:
|
||||||
|
specifier: ^2.3.1
|
||||||
|
version: 2.3.1
|
||||||
qpdf-wasm-esm-embedded:
|
qpdf-wasm-esm-embedded:
|
||||||
specifier: ^1.1.1
|
specifier: ^1.1.1
|
||||||
version: 1.1.1
|
version: 1.1.1
|
||||||
@@ -5236,6 +5242,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-ZREFYlpUmPQJ0esjxoG1fMvB2HNaD3z+mjqdSosZvd3RalncI9NEur73P8ZJz4YQdL64CmV1w0RuqoRUlhQRBw==}
|
resolution: {integrity: sha512-ZREFYlpUmPQJ0esjxoG1fMvB2HNaD3z+mjqdSosZvd3RalncI9NEur73P8ZJz4YQdL64CmV1w0RuqoRUlhQRBw==}
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/@types/punycode@2.1.4:
|
||||||
|
resolution: {integrity: sha512-trzh6NzBnq8yw5e35f8xe8VTYjqM3NE7bohBtvDVf/dtUer3zYTLK1Ka3DG3p7bdtoaOHZucma6FfVKlQ134pQ==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/@types/qrcode@1.5.0:
|
/@types/qrcode@1.5.0:
|
||||||
resolution: {integrity: sha512-x5ilHXRxUPIMfjtM+1vf/GPTRWZ81nqscursm5gMznJeK9M0YnZ1c3bEvRLQ0zSSgedLx1J6MGL231ObQGGhaA==}
|
resolution: {integrity: sha512-x5ilHXRxUPIMfjtM+1vf/GPTRWZ81nqscursm5gMznJeK9M0YnZ1c3bEvRLQ0zSSgedLx1J6MGL231ObQGGhaA==}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -6209,7 +6219,7 @@ packages:
|
|||||||
/@vueuse/shared@10.0.0(vue@3.3.4):
|
/@vueuse/shared@10.0.0(vue@3.3.4):
|
||||||
resolution: {integrity: sha512-Zh3LgJqvUBWVY3SiMvXanTcfAneGbt63QPczBRDNgQ6jd/ehodO9a1lCFzaA6SWJJoI+ugVTjHFYJdoR656DVQ==}
|
resolution: {integrity: sha512-Zh3LgJqvUBWVY3SiMvXanTcfAneGbt63QPczBRDNgQ6jd/ehodO9a1lCFzaA6SWJJoI+ugVTjHFYJdoR656DVQ==}
|
||||||
dependencies:
|
dependencies:
|
||||||
vue-demi: 0.14.10(vue@3.3.4)
|
vue-demi: 0.14.5(vue@3.3.4)
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@vue/composition-api'
|
- '@vue/composition-api'
|
||||||
- vue
|
- vue
|
||||||
@@ -10067,7 +10077,6 @@ packages:
|
|||||||
/jsesc@2.5.2:
|
/jsesc@2.5.2:
|
||||||
resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==}
|
resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==}
|
||||||
engines: {node: '>=4'}
|
engines: {node: '>=4'}
|
||||||
hasBin: true
|
|
||||||
|
|
||||||
/jsesc@3.0.2:
|
/jsesc@3.0.2:
|
||||||
resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==}
|
resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==}
|
||||||
@@ -11957,14 +11966,9 @@ packages:
|
|||||||
resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==}
|
resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/punycode@2.3.0:
|
|
||||||
resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==}
|
|
||||||
engines: {node: '>=6'}
|
|
||||||
|
|
||||||
/punycode@2.3.1:
|
/punycode@2.3.1:
|
||||||
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
|
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
dev: true
|
|
||||||
|
|
||||||
/qpdf-wasm-esm-embedded@1.1.1:
|
/qpdf-wasm-esm-embedded@1.1.1:
|
||||||
resolution: {integrity: sha512-e6Pb8jRw+VflZQvsS+eOfYF9BqjubvTBnxJc44LhI1btg2WYNKE5/lGMmzWZ2gd9YrdWByf8IdNZw6S7+7t27w==}
|
resolution: {integrity: sha512-e6Pb8jRw+VflZQvsS+eOfYF9BqjubvTBnxJc44LhI1btg2WYNKE5/lGMmzWZ2gd9YrdWByf8IdNZw6S7+7t27w==}
|
||||||
@@ -13261,7 +13265,7 @@ packages:
|
|||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
dependencies:
|
dependencies:
|
||||||
psl: 1.9.0
|
psl: 1.9.0
|
||||||
punycode: 2.3.0
|
punycode: 2.3.1
|
||||||
universalify: 0.2.0
|
universalify: 0.2.0
|
||||||
url-parse: 1.5.10
|
url-parse: 1.5.10
|
||||||
dev: true
|
dev: true
|
||||||
@@ -13280,7 +13284,7 @@ packages:
|
|||||||
resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==}
|
resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==}
|
||||||
engines: {node: '>=14'}
|
engines: {node: '>=14'}
|
||||||
dependencies:
|
dependencies:
|
||||||
punycode: 2.3.0
|
punycode: 2.3.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/tree-sitter-bash@0.23.1(tree-sitter@0.21.1):
|
/tree-sitter-bash@0.23.1(tree-sitter@0.21.1):
|
||||||
@@ -13828,7 +13832,7 @@ packages:
|
|||||||
/uri-js@4.4.1:
|
/uri-js@4.4.1:
|
||||||
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
|
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
punycode: 2.3.0
|
punycode: 2.3.1
|
||||||
|
|
||||||
/url-parse@1.5.10:
|
/url-parse@1.5.10:
|
||||||
resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==}
|
resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==}
|
||||||
@@ -14791,7 +14795,6 @@ packages:
|
|||||||
|
|
||||||
/yamljs@0.3.0:
|
/yamljs@0.3.0:
|
||||||
resolution: {integrity: sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==}
|
resolution: {integrity: sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==}
|
||||||
hasBin: true
|
|
||||||
dependencies:
|
dependencies:
|
||||||
argparse: 1.0.10
|
argparse: 1.0.10
|
||||||
glob: 7.2.3
|
glob: 7.2.3
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import { tool as mathOcr } from './math-ocr';
|
|||||||
import { tool as markdownTocGenerator } from './markdown-toc-generator';
|
import { tool as markdownTocGenerator } from './markdown-toc-generator';
|
||||||
import { tool as passphraseGenerator } from './passphrase-generator';
|
import { tool as passphraseGenerator } from './passphrase-generator';
|
||||||
import { tool as pinCodeGenerator } from './pin-code-generator';
|
import { tool as pinCodeGenerator } from './pin-code-generator';
|
||||||
|
import { tool as punycodeConverter } from './punycode-converter';
|
||||||
|
|
||||||
import { tool as cssXpathConverter } from './css-xpath-converter';
|
import { tool as cssXpathConverter } from './css-xpath-converter';
|
||||||
import { tool as cssSelectorsMemo } from './css-selectors-memo';
|
import { tool as cssSelectorsMemo } from './css-selectors-memo';
|
||||||
@@ -307,6 +308,7 @@ export const toolsByCategory: ToolCategory[] = [
|
|||||||
components: [
|
components: [
|
||||||
ipv4SubnetCalculator,
|
ipv4SubnetCalculator,
|
||||||
ipv4AddressConverter,
|
ipv4AddressConverter,
|
||||||
|
// ipv6AddressConverter,
|
||||||
ipv4RangeExpander,
|
ipv4RangeExpander,
|
||||||
macAddressLookup,
|
macAddressLookup,
|
||||||
macAddressGenerator,
|
macAddressGenerator,
|
||||||
@@ -318,6 +320,7 @@ export const toolsByCategory: ToolCategory[] = [
|
|||||||
ipGeoLocation,
|
ipGeoLocation,
|
||||||
macAddressConverter,
|
macAddressConverter,
|
||||||
ipv6UlaGenerator,
|
ipv6UlaGenerator,
|
||||||
|
punycodeConverter,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { World } from '@vicons/tabler';
|
||||||
|
import { defineTool } from '../tool';
|
||||||
|
|
||||||
|
export const tool = defineTool({
|
||||||
|
name: 'Punycode Converter',
|
||||||
|
path: '/punycode-converter',
|
||||||
|
description: 'Convert international unicode domain names or emails from/to ASCII Punycode version',
|
||||||
|
keywords: ['punycode', 'converter', 'rfc3492', 'bootstring', 'domain', 'dns'],
|
||||||
|
component: () => import('./punycode-converter.vue'),
|
||||||
|
icon: World,
|
||||||
|
createdAt: new Date('2024-08-15'),
|
||||||
|
});
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { toASCII, toUnicode } from 'punycode/';
|
||||||
|
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||||
|
|
||||||
|
const punycodeInput = ref('');
|
||||||
|
const intlOutput = computed(
|
||||||
|
() => {
|
||||||
|
try {
|
||||||
|
return toUnicode(punycodeInput.value?.trim());
|
||||||
|
}
|
||||||
|
catch (e: any) {
|
||||||
|
return e.toString();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
const intlInput = ref('');
|
||||||
|
const punycodeOutput = computed(
|
||||||
|
() => {
|
||||||
|
try {
|
||||||
|
return toASCII(intlInput.value?.trim());
|
||||||
|
}
|
||||||
|
catch (e: any) {
|
||||||
|
return e.toString();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div max-w-600>
|
||||||
|
<c-card title="Punycode to International">
|
||||||
|
<c-input-text
|
||||||
|
v-model:value="punycodeInput"
|
||||||
|
placeholder="Put your punycode domain name or email to decode..."
|
||||||
|
label="Punycode Domain name/Email"
|
||||||
|
raw-text
|
||||||
|
/>
|
||||||
|
|
||||||
|
<n-divider />
|
||||||
|
|
||||||
|
<TextareaCopyable
|
||||||
|
label="Decoded Domain name/Email"
|
||||||
|
:value="intlOutput"
|
||||||
|
readonly
|
||||||
|
/>
|
||||||
|
</c-card>
|
||||||
|
|
||||||
|
<c-card title="International to Punycode" mt-5>
|
||||||
|
<c-input-text
|
||||||
|
v-model:value="intlInput"
|
||||||
|
placeholder="Put your international domain or email name here..."
|
||||||
|
label="Domain name or email to encode"
|
||||||
|
raw-text
|
||||||
|
/>
|
||||||
|
|
||||||
|
<n-divider />
|
||||||
|
|
||||||
|
<TextareaCopyable
|
||||||
|
label="Punycode Domain name/Email"
|
||||||
|
:value="punycodeOutput"
|
||||||
|
readonly
|
||||||
|
/>
|
||||||
|
</c-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
Reference in new issue
Block a user