mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +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/markdown-it": "^13.0.7",
|
||||
"@types/potrace": "^2.1.5",
|
||||
"@types/punycode": "^2.1.4",
|
||||
"@vicons/material": "^0.12.0",
|
||||
"@vicons/tabler": "^0.12.0",
|
||||
"@vueuse/core": "^10.11.1",
|
||||
@@ -181,6 +182,7 @@
|
||||
"plausible-tracker": "^0.3.8",
|
||||
"pretty-ms": "^9.1.0",
|
||||
"qpdf-wasm-esm-embedded": "^1.1.1",
|
||||
"punycode": "^2.3.1",
|
||||
"qrcode": "^1.5.1",
|
||||
"randexp": "^0.5.3",
|
||||
"regex": "^4.3.3",
|
||||
|
||||
Generated
+14
-11
@@ -113,6 +113,9 @@ dependencies:
|
||||
'@types/potrace':
|
||||
specifier: ^2.1.5
|
||||
version: 2.1.5
|
||||
'@types/punycode':
|
||||
specifier: ^2.1.4
|
||||
version: 2.1.4
|
||||
'@types/turndown':
|
||||
specifier: ^5.0.4
|
||||
version: 5.0.5
|
||||
@@ -386,6 +389,9 @@ dependencies:
|
||||
pretty-ms:
|
||||
specifier: ^9.1.0
|
||||
version: 9.1.0
|
||||
punycode:
|
||||
specifier: ^2.3.1
|
||||
version: 2.3.1
|
||||
qpdf-wasm-esm-embedded:
|
||||
specifier: ^1.1.1
|
||||
version: 1.1.1
|
||||
@@ -5236,6 +5242,10 @@ packages:
|
||||
resolution: {integrity: sha512-ZREFYlpUmPQJ0esjxoG1fMvB2HNaD3z+mjqdSosZvd3RalncI9NEur73P8ZJz4YQdL64CmV1w0RuqoRUlhQRBw==}
|
||||
dev: true
|
||||
|
||||
/@types/punycode@2.1.4:
|
||||
resolution: {integrity: sha512-trzh6NzBnq8yw5e35f8xe8VTYjqM3NE7bohBtvDVf/dtUer3zYTLK1Ka3DG3p7bdtoaOHZucma6FfVKlQ134pQ==}
|
||||
dev: false
|
||||
|
||||
/@types/qrcode@1.5.0:
|
||||
resolution: {integrity: sha512-x5ilHXRxUPIMfjtM+1vf/GPTRWZ81nqscursm5gMznJeK9M0YnZ1c3bEvRLQ0zSSgedLx1J6MGL231ObQGGhaA==}
|
||||
dependencies:
|
||||
@@ -6209,7 +6219,7 @@ packages:
|
||||
/@vueuse/shared@10.0.0(vue@3.3.4):
|
||||
resolution: {integrity: sha512-Zh3LgJqvUBWVY3SiMvXanTcfAneGbt63QPczBRDNgQ6jd/ehodO9a1lCFzaA6SWJJoI+ugVTjHFYJdoR656DVQ==}
|
||||
dependencies:
|
||||
vue-demi: 0.14.10(vue@3.3.4)
|
||||
vue-demi: 0.14.5(vue@3.3.4)
|
||||
transitivePeerDependencies:
|
||||
- '@vue/composition-api'
|
||||
- vue
|
||||
@@ -10067,7 +10077,6 @@ packages:
|
||||
/jsesc@2.5.2:
|
||||
resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==}
|
||||
engines: {node: '>=4'}
|
||||
hasBin: true
|
||||
|
||||
/jsesc@3.0.2:
|
||||
resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==}
|
||||
@@ -11957,14 +11966,9 @@ packages:
|
||||
resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==}
|
||||
dev: false
|
||||
|
||||
/punycode@2.3.0:
|
||||
resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
/punycode@2.3.1:
|
||||
resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
|
||||
engines: {node: '>=6'}
|
||||
dev: true
|
||||
|
||||
/qpdf-wasm-esm-embedded@1.1.1:
|
||||
resolution: {integrity: sha512-e6Pb8jRw+VflZQvsS+eOfYF9BqjubvTBnxJc44LhI1btg2WYNKE5/lGMmzWZ2gd9YrdWByf8IdNZw6S7+7t27w==}
|
||||
@@ -13261,7 +13265,7 @@ packages:
|
||||
engines: {node: '>=6'}
|
||||
dependencies:
|
||||
psl: 1.9.0
|
||||
punycode: 2.3.0
|
||||
punycode: 2.3.1
|
||||
universalify: 0.2.0
|
||||
url-parse: 1.5.10
|
||||
dev: true
|
||||
@@ -13280,7 +13284,7 @@ packages:
|
||||
resolution: {integrity: sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==}
|
||||
engines: {node: '>=14'}
|
||||
dependencies:
|
||||
punycode: 2.3.0
|
||||
punycode: 2.3.1
|
||||
dev: true
|
||||
|
||||
/tree-sitter-bash@0.23.1(tree-sitter@0.21.1):
|
||||
@@ -13828,7 +13832,7 @@ packages:
|
||||
/uri-js@4.4.1:
|
||||
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
|
||||
dependencies:
|
||||
punycode: 2.3.0
|
||||
punycode: 2.3.1
|
||||
|
||||
/url-parse@1.5.10:
|
||||
resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==}
|
||||
@@ -14791,7 +14795,6 @@ packages:
|
||||
|
||||
/yamljs@0.3.0:
|
||||
resolution: {integrity: sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
argparse: 1.0.10
|
||||
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 passphraseGenerator } from './passphrase-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 cssSelectorsMemo } from './css-selectors-memo';
|
||||
@@ -307,6 +308,7 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
components: [
|
||||
ipv4SubnetCalculator,
|
||||
ipv4AddressConverter,
|
||||
// ipv6AddressConverter,
|
||||
ipv4RangeExpander,
|
||||
macAddressLookup,
|
||||
macAddressGenerator,
|
||||
@@ -318,6 +320,7 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
ipGeoLocation,
|
||||
macAddressConverter,
|
||||
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