mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-07 23:05:11 -04:00
chore(deps): switched from oui to oui-data for mac address lookup
This commit is contained in:
parent
586af7a026
commit
4b13351957
4 changed files with 9 additions and 20 deletions
|
@ -71,7 +71,7 @@
|
|||
"naive-ui": "^2.35.0",
|
||||
"netmask": "^2.0.2",
|
||||
"node-forge": "^1.3.1",
|
||||
"oui": "^13.0.0",
|
||||
"oui-data": "^1.0.10",
|
||||
"pdf-signature-reader": "^1.4.2",
|
||||
"pinia": "^2.0.34",
|
||||
"plausible-tracker": "^0.3.8",
|
||||
|
|
19
pnpm-lock.yaml
generated
19
pnpm-lock.yaml
generated
|
@ -113,9 +113,9 @@ dependencies:
|
|||
node-forge:
|
||||
specifier: ^1.3.1
|
||||
version: 1.3.1
|
||||
oui:
|
||||
specifier: ^13.0.0
|
||||
version: 13.0.4
|
||||
oui-data:
|
||||
specifier: ^1.0.10
|
||||
version: 1.0.10
|
||||
pdf-signature-reader:
|
||||
specifier: ^1.4.2
|
||||
version: 1.4.2
|
||||
|
@ -3348,7 +3348,7 @@ packages:
|
|||
dependencies:
|
||||
'@unhead/dom': 0.5.1
|
||||
'@unhead/schema': 0.5.1
|
||||
'@vueuse/shared': 10.6.0(vue@3.3.4)
|
||||
'@vueuse/shared': 10.6.1(vue@3.3.4)
|
||||
unhead: 0.5.1
|
||||
vue: 3.3.4
|
||||
transitivePeerDependencies:
|
||||
|
@ -3975,8 +3975,8 @@ packages:
|
|||
- vue
|
||||
dev: false
|
||||
|
||||
/@vueuse/shared@10.6.0(vue@3.3.4):
|
||||
resolution: {integrity: sha512-0t4MVE18sO+/4Gh0jfeOXBTjKeV4606N9kIrDOLPjFl8Rwnlodn+QC5A4LfJuysK7aOsTMjF3KnzNeueaI0xlQ==}
|
||||
/@vueuse/shared@10.6.1(vue@3.3.4):
|
||||
resolution: {integrity: sha512-TECVDTIedFlL0NUfHWncf3zF9Gc4VfdxfQc8JFwoVZQmxpONhLxFrlm0eHQeidHj4rdTPL3KXJa0TZCk1wnc5Q==}
|
||||
dependencies:
|
||||
vue-demi: 0.14.6(vue@3.3.4)
|
||||
transitivePeerDependencies:
|
||||
|
@ -7176,13 +7176,6 @@ packages:
|
|||
resolution: {integrity: sha512-PPrr40z5/MPStTTGJ0QtSD9KtaGHmnexBQWANWLWQOZZwbNMf/VyG/Uh29LwxExd51p3S323oM3kHbjRqmBiLg==}
|
||||
dev: false
|
||||
|
||||
/oui@13.0.4:
|
||||
resolution: {integrity: sha512-PG4uW80fIqhKOcy33Ui3dsfnFEe9U3CdUN2TB/X/+qHDERAwcpa1XFMDVhfnwDJpTR2l/TXA+mv8JBx1QquS3Q==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
oui-data: 1.0.10
|
||||
dev: false
|
||||
|
||||
/p-limit@2.3.0:
|
||||
resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==}
|
||||
engines: {node: '>=6'}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import db from 'oui/oui.json';
|
||||
import db from 'oui-data';
|
||||
import { macAddressValidationRules } from '@/utils/macAddress';
|
||||
import { useCopy } from '@/composable/copy';
|
||||
|
||||
const getVendorValue = (address: string) => address.trim().replace(/[.:-]/g, '').toUpperCase().substring(0, 6);
|
||||
|
||||
const macAddress = ref('20:37:06:12:34:56');
|
||||
const details = computed<string | undefined>(() => db[getVendorValue(macAddress.value)]);
|
||||
const details = computed<string | undefined>(() => (db as Record<string, string>)[getVendorValue(macAddress.value)]);
|
||||
|
||||
const { copy } = useCopy({ source: () => details.value ?? '', text: 'Vendor info copied to the clipboard' });
|
||||
</script>
|
||||
|
|
4
src/tools/mac-address-lookup/oui.d.ts
vendored
4
src/tools/mac-address-lookup/oui.d.ts
vendored
|
@ -1,4 +0,0 @@
|
|||
declare module 'oui/oui.json' {
|
||||
const db: Record<string, string>;
|
||||
export default db;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue