Skip to content

Commit

Permalink
chore(deps): switched from oui to oui-data for mac address lookup (Co…
Browse files Browse the repository at this point in the history
…rentinTh#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 <[email protected]>
  • Loading branch information
renovate[bot] and CorentinTh authored Nov 14, 2023
1 parent 2e396d8 commit 0fe9a20
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 140 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"naive-ui": "^2.35.0",
"netmask": "^2.0.2",
"node-forge": "^1.3.1",
"oui": "^12.0.52",
"oui-data": "^1.0.10",
"pdf-signature-reader": "^1.4.2",
"pinia": "^2.0.34",
"plausible-tracker": "^0.3.8",
Expand Down
144 changes: 11 additions & 133 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/tools/mac-address-lookup/mac-address-lookup.vue
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
4 changes: 0 additions & 4 deletions src/tools/mac-address-lookup/oui.d.ts

This file was deleted.

0 comments on commit 0fe9a20

Please sign in to comment.