chore(deps): switched from oui to oui-data for mac address lookup (#693)

* fix(deps): update dependency oui to v13

* chore(deps): switched from oui to oui-data for mac address lookup

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Corentin Thomasset <corentin.thomasset74@gmail.com>
This commit is contained in:
renovate[bot] 2023-11-14 23:44:23 +00:00 committed by GitHub
parent 2e396d8776
commit 0fe9a20329
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 140 deletions

View file

@ -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>

View file

@ -1,4 +0,0 @@
declare module 'oui/oui.json' {
const db: Record<string, string>;
export default db;
}