Compare commits

..
Author SHA1 Message Date
ShareVB 2dac7fd04c fix: deps 2024-07-14 23:14:04 +02:00
ShareVB 0e08f0748c Merge remote-tracking branch 'origin/main' into feat/pdf-encrypt 2024-07-14 23:13:34 +02:00
sharevb 76a19d218d fix(emoji-picker): debounced search input (#1181)
* fix(Emoji picker): fix lags

Fix #1176 using debounced ref

* chore: fix strange corepack message

Fix corepack claiming strange thing : UsageError: This project is configured to use yarn because /home/runner/work/it-tools/it-tools/package.json has a "packageManager" field
2024-07-11 17:06:17 +02:00
ShareVB c35e7102d5 fix: use qpdf-wasm-esm-embedded + add logs 2024-04-28 11:35:09 +02:00
ShareVB 48dd7bb695 chore: ignore src/libs in codeql 2024-04-28 11:35:09 +02:00
sharevb 1b82da5b4b feat(new tool): PDF Encrypt
PDF Encrypter
2024-04-28 11:35:09 +02:00
sharevb 23b4dc84c8 feat: prepare qpdf-wasm 2024-04-28 11:35:09 +02:00
18 changed files with 501 additions and 753 deletions

No files matched your search

+2
View File
@@ -4,6 +4,8 @@
module.exports = {
root: true,
extends: ['@antfu', './.eslintrc-auto-import.json', '@unocss'],
ignorePatterns: ['src/libs/*'],
rules: {
'curly': ['error', 'all'],
+72
View File
@@ -0,0 +1,72 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ dev ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ dev ]
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
config: |
paths-ignore:
- src/libs
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
+7 -3
View File
@@ -127,20 +127,25 @@ declare module '@vue/runtime-core' {
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
NCode: typeof import('naive-ui')['NCode']
NCheckbox: typeof import('naive-ui')['NCheckbox']
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
NDivider: typeof import('naive-ui')['NDivider']
NEllipsis: typeof import('naive-ui')['NEllipsis']
NFormItem: typeof import('naive-ui')['NFormItem']
NH1: typeof import('naive-ui')['NH1']
NH3: typeof import('naive-ui')['NH3']
NIcon: typeof import('naive-ui')['NIcon']
NInput: typeof import('naive-ui')['NInput']
NLayout: typeof import('naive-ui')['NLayout']
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
NMenu: typeof import('naive-ui')['NMenu']
NScrollbar: typeof import('naive-ui')['NScrollbar']
NSpace: typeof import('naive-ui')['NSpace']
NSpin: typeof import('naive-ui')['NSpin']
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
PdfEncrypt: typeof import('./src/tools/pdf-encrypt/pdf-encrypt.vue')['default']
PdfSignatureChecker: typeof import('./src/tools/pdf-signature-checker/pdf-signature-checker.vue')['default']
PdfSignatureDetails: typeof import('./src/tools/pdf-signature-checker/components/pdf-signature-details.vue')['default']
PercentageCalculator: typeof import('./src/tools/percentage-calculator/percentage-calculator.vue')['default']
@@ -165,7 +170,6 @@ declare module '@vue/runtime-core' {
TextToBinary: typeof import('./src/tools/text-to-binary/text-to-binary.vue')['default']
TextToNatoAlphabet: typeof import('./src/tools/text-to-nato-alphabet/text-to-nato-alphabet.vue')['default']
TextToUnicode: typeof import('./src/tools/text-to-unicode/text-to-unicode.vue')['default']
TextToUnicodeNames: typeof import('./src/tools/text-to-unicode-names/text-to-unicode-names.vue')['default']
TokenDisplay: typeof import('./src/tools/otp-code-generator-and-validator/token-display.vue')['default']
'TokenGenerator.tool': typeof import('./src/tools/token-generator/token-generator.tool.vue')['default']
TomlToJson: typeof import('./src/tools/toml-to-json/toml-to-json.vue')['default']
+3 -3
View File
@@ -41,8 +41,8 @@
"@tiptap/pm": "2.1.6",
"@tiptap/starter-kit": "2.1.6",
"@tiptap/vue-3": "2.0.3",
"@types/emscripten": "^1.39.10",
"@types/figlet": "^1.5.8",
"@unicode/unicode-15.1.0": "^1.5.2",
"@vicons/material": "^0.12.0",
"@vicons/tabler": "^0.12.0",
"@vueuse/core": "^10.3.0",
@@ -65,7 +65,7 @@
"highlight.js": "^11.7.0",
"iarna-toml-esm": "^3.0.5",
"ibantools": "^4.3.3",
"js-base64": "^3.7.6",
"js-base64": "^3.7.7",
"json5": "^2.2.3",
"jwt-decode": "^3.1.2",
"libphonenumber-js": "^1.10.28",
@@ -81,6 +81,7 @@
"pdf-signature-reader": "^1.4.2",
"pinia": "^2.0.34",
"plausible-tracker": "^0.3.8",
"qpdf-wasm-esm-embedded": "^1.1.1",
"qrcode": "^1.5.1",
"sql-formatter": "^13.0.0",
"ua-parser-js": "^1.0.35",
@@ -88,7 +89,6 @@
"unicode-emoji-json": "^0.4.0",
"unplugin-auto-import": "^0.16.4",
"uuid": "^9.0.0",
"vite-plugin-node-polyfills": "^0.22.0",
"vue": "^3.3.4",
"vue-i18n": "^9.9.1",
"vue-router": "^4.1.6",
+144 -657
View File
File diff suppressed because it is too large. Load diff
+1 -2
View File
@@ -16,7 +16,6 @@ const props = withDefaults(
language?: string
copyPlacement?: 'top-right' | 'bottom-right' | 'outside' | 'none'
copyMessage?: string
wordWrap?: boolean
}>(),
{
followHeightOf: null,
@@ -48,7 +47,7 @@ const tooltipText = computed(() => isJustCopied.value ? 'Copied!' : copyMessage.
:style="height ? `min-height: ${height - 40 /* card padding */ + 10 /* negative margin compensation */}px` : ''"
>
<n-config-provider :hljs="hljs">
<n-code :code="value" :language="language" :word-wrap="wordWrap" :trim="false" data-test-id="area-content" />
<n-code :code="value" :language="language" :trim="false" data-test-id="area-content" />
</n-config-provider>
</n-scrollbar>
<div absolute right-10px top-10px>
+21
View File
@@ -0,0 +1,21 @@
import _ from 'lodash';
function useDebouncedRef<T>(initialValue: T, delay: number, immediate: boolean = false) {
const state = ref(initialValue);
const debouncedRef = customRef((track, trigger) => ({
get() {
track();
return state.value;
},
set: _.debounce(
(value) => {
state.value = value;
trigger();
},
delay,
{ leading: immediate },
),
}));
return debouncedRef;
}
export default useDebouncedRef;
+14 -13
View File
@@ -1,6 +1,7 @@
import { extension as getExtensionFromMimeType, extension as getMimeTypeFromExtension } from 'mime-types';
import type { Ref } from 'vue';
import type { MaybeRef, Ref } from 'vue';
import _ from 'lodash';
import { get } from '@vueuse/core';
export {
getMimeTypeFromBase64,
@@ -75,21 +76,11 @@ function downloadFromBase64({ sourceValue, filename, extension, fileMimeType }:
}
function useDownloadFileFromBase64(
{ source, filename, extension, fileMimeType }:
{ source: Ref<string>; filename?: string; extension?: string; fileMimeType?: string }) {
return {
download() {
downloadFromBase64({ sourceValue: source.value, filename, extension, fileMimeType });
},
};
}
function useDownloadFileFromBase64Refs(
{ source, filename, extension }:
{ source: Ref<string>; filename?: Ref<string>; extension?: Ref<string> }) {
{ source: MaybeRef<string>; filename?: MaybeRef<string>; extension?: MaybeRef<string> }) {
return {
download() {
downloadFromBase64({ sourceValue: source.value, filename: filename?.value, extension: extension?.value });
downloadFromBase64({ sourceValue: get(source), filename: get(filename), extension: get(extension) });
},
};
}
@@ -116,3 +107,13 @@ function previewImageFromBase64(base64String: string): HTMLImageElement {
return img;
}
function useDownloadFileFromBase64Refs(
{ source, filename, extension }:
{ source: Ref<string>; filename?: Ref<string>; extension?: Ref<string> }) {
return {
download() {
downloadFromBase64({ sourceValue: source.value, filename: filename?.value, extension: extension?.value });
},
};
}
+2 -1
View File
@@ -4,6 +4,7 @@ import emojiKeywords from 'emojilib';
import _ from 'lodash';
import type { EmojiInfo } from './emoji.types';
import { useFuzzySearch } from '@/composable/fuzzySearch';
import useDebouncedRef from '@/composable/debouncedref';
const escapeUnicode = ({ emoji }: { emoji: string }) => emoji.split('').map(unit => `\\u${unit.charCodeAt(0).toString(16).padStart(4, '0')}`).join('');
const getEmojiCodePoints = ({ emoji }: { emoji: string }) => emoji.codePointAt(0) ? `0x${emoji.codePointAt(0)?.toString(16)}` : undefined;
@@ -23,7 +24,7 @@ const emojisGroups: { emojiInfos: EmojiInfo[]; group: string }[] = _
.map((emojiInfos, group) => ({ group, emojiInfos }))
.value();
const searchQuery = ref('');
const searchQuery = useDebouncedRef('', 500);
const { searchResult } = useFuzzySearch({
search: searchQuery,
+15 -3
View File
@@ -6,7 +6,6 @@ import { tool as asciiTextDrawer } from './ascii-text-drawer';
import { tool as textToUnicode } from './text-to-unicode';
import { tool as safelinkDecoder } from './safelink-decoder';
import { tool as textToUnicodeNames } from './text-to-unicode-names';
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
import { tool as numeronymGenerator } from './numeronym-generator';
import { tool as macAddressGenerator } from './mac-address-generator';
@@ -81,12 +80,26 @@ import { tool as urlParser } from './url-parser';
import { tool as uuidGenerator } from './uuid-generator';
import { tool as macAddressLookup } from './mac-address-lookup';
import { tool as xmlFormatter } from './xml-formatter';
import { tool as pdfEncrypt } from './pdf-encrypt';
import { tool as yamlViewer } from './yaml-viewer';
export const toolsByCategory: ToolCategory[] = [
{
name: 'Crypto',
components: [tokenGenerator, hashText, bcrypt, uuidGenerator, ulidGenerator, cypher, bip39, hmacGenerator, rsaKeyPairGenerator, passwordStrengthAnalyser, pdfSignatureChecker],
components: [
tokenGenerator,
hashText,
bcrypt,
uuidGenerator,
ulidGenerator,
cypher,
bip39,
hmacGenerator,
rsaKeyPairGenerator,
passwordStrengthAnalyser,
pdfSignatureChecker,
pdfEncrypt,
],
},
{
name: 'Converter',
@@ -101,7 +114,6 @@ export const toolsByCategory: ToolCategory[] = [
textToNatoAlphabet,
textToBinary,
textToUnicode,
textToUnicodeNames,
yamlToJson,
yamlToToml,
jsonToYaml,
+12
View File
@@ -0,0 +1,12 @@
import { Lock } from '@vicons/tabler';
import { defineTool } from '../tool';
export const tool = defineTool({
name: 'Pdf Encrypt',
path: '/pdf-encrypt',
description: 'Encrypt and add protection to a PDF File',
keywords: ['pdf', 'encrypt'],
component: () => import('./pdf-encrypt.vue'),
icon: Lock,
createdAt: new Date('2024-01-09'),
});
+208
View File
@@ -0,0 +1,208 @@
<script setup lang="ts">
import { Base64 } from 'js-base64';
import createQPDFModule from 'qpdf-wasm-esm-embedded';
import { useDownloadFileFromBase64Refs } from '@/composable/downloadBase64';
const status = ref<'idle' | 'done' | 'error' | 'processing'>('idle');
const file = ref<File | null>(null);
const restrictAccessibility = useStorage('pdf-encrypt:accessibility', false);
const restrictAnnotate = useStorage('pdf-encrypt:annotate', false);
const restrictAssemble = useStorage('pdf-encrypt:assemble', false);
const restrictExtract = useStorage('pdf-encrypt:extract', false);
const restrictForm = useStorage('pdf-encrypt:form', false);
const restrictModifyOther = useStorage('pdf-encrypt:modoth', false);
const clearTextMetadata = useStorage('pdf-encrypt:clearmeta', false);
const restrictModify = useStorage('pdf-encrypt:mod', 'all');
const restrictPrint = useStorage('pdf-encrypt:print', 'full');
const userPassword = ref('');
const ownerPassword = ref('');
const base64OutputPDF = ref('');
const logs = ref<string[]>([]);
const fileName = ref('');
const fileExtension = ref('pdf');
const { download } = useDownloadFileFromBase64Refs(
{
source: base64OutputPDF,
filename: fileName,
extension: fileExtension,
});
function onFileUploaded(uploadedFile: File) {
file.value = uploadedFile;
fileName.value = `encrypted_${file.value.name}`;
}
async function onProcessClicked() {
if (!file.value) {
return;
}
const fileBuffer = await file.value.arrayBuffer();
status.value = 'processing';
try {
const options = [
'--verbose',
'--encrypt',
];
options.push(`${userPassword.value}`);
options.push(`${ownerPassword.value}`);
options.push('128');
options.push('--use-aes=y');
options.push(`--accessibility=${(restrictAccessibility.value ? 'n' : 'y')}`);
options.push(`--annotate=${(restrictAnnotate.value ? 'n' : 'y')}`);
options.push(`--assemble=${(restrictAssemble.value ? 'n' : 'y')}`);
options.push(`--extract=${(restrictExtract.value ? 'n' : 'y')}`);
options.push(`--form=${(restrictForm.value ? 'n' : 'y')}`);
options.push(`--modify-other=${(restrictModifyOther.value ? 'n' : 'y')}`);
options.push(`--modify=${(restrictModify.value)}`);
options.push(`--print=${(restrictPrint.value)}`);
if (clearTextMetadata.value) {
options.push('--cleartext-metadata');
}
options.push('--');
options.push('in.pdf');
options.push('out.pdf');
const outPdfBuffer = await callMainWithInOutPdf(fileBuffer,
options, 0);
base64OutputPDF.value = `data:application/pdf;base64,${Base64.fromUint8Array(outPdfBuffer)}`;
status.value = 'done';
download();
}
catch (e) {
status.value = 'error';
}
}
async function callMainWithInOutPdf(data: ArrayBuffer, args: string[], expected_exitcode: number) {
logs.value = [];
const mod = await createQPDFModule({
print(text: string) {
logs.value.push(text);
},
printErr(text: string) {
logs.value.push(text);
},
});
mod.FS.writeFile('in.pdf', new Uint8Array(data));
const ret = mod.callMain(args);
if (expected_exitcode !== ret) {
throw new Error('Process run failed');
}
return mod.FS.readFile('out.pdf');
}
const printRestrictionOptions = [{ value: 'none', label: 'Disallow printing' },
{ value: 'low', label: 'Allow only low-resolution printing' },
{ value: 'full', label: 'Allow full printing' },
];
const modificationRestrictionOptions = [
{ value: 'none', label: 'Allow no modifications' },
{ value: 'assembly', label: 'Allow document assembly only' },
{ value: 'form', label: 'Allow document assembly only + filling in form fields and signing' },
{ value: 'annotate', label: 'Allow document assembly only + filling in form fields and signing + commenting and modifying forms' },
{ value: 'all', label: 'Allow full document modification' },
];
</script>
<template>
<div>
<div style="flex: 0 0 100%">
<div mx-auto max-w-600px>
<c-file-upload
title="Drag and drop a PDF file here, or click to select a file"
accept=".pdf"
@file-upload="onFileUploaded"
/>
<div mt-2 text-center>
<strong>Output file:</strong> {{ fileName }}
</div>
</div>
</div>
<c-card title="Permissions" mb-3 mt-3>
<n-space>
<n-checkbox v-model:checked="restrictAccessibility">
Restrict accessibility (usually ignored)
</n-checkbox>
<n-checkbox v-model:checked="restrictAnnotate">
Restrict commenting/filling form fields
</n-checkbox>
<n-checkbox v-model:checked="restrictAssemble">
Restrict document assembly
</n-checkbox>
<n-checkbox v-model:checked="restrictExtract">
Restrict text/graphic extraction
</n-checkbox>
<n-checkbox v-model:checked="restrictForm">
Restrict filling form fields
</n-checkbox>
<n-checkbox v-model:checked="restrictModifyOther">
Restrict other modifications
</n-checkbox>
<n-checkbox v-model:checked="clearTextMetadata">
Prevent encryption of metadata
</n-checkbox>
</n-space>
<c-select
v-model:value="restrictModify"
:options="modificationRestrictionOptions"
label="Control modify access by level"
mt-3
/>
<c-select
v-model:value="restrictPrint"
:options="printRestrictionOptions"
label="Control printing access"
mt-3
/>
</c-card>
<n-form-item
label="Owner password:"
label-placement="left"
mb-1
>
<n-input
:value="ownerPassword"
type="password"
placeholder="Owner password (optional)"
/>
</n-form-item>
<n-form-item
label="User password:"
label-placement="left"
mb-1
>
<n-input
:value="userPassword"
type="password"
placeholder="User password (optional)"
/>
</n-form-item>
<div mt-3 flex justify-center>
<c-button :disabled="!file" @click="onProcessClicked()">
Encrypt PDF
</c-button>
</div>
<n-divider />
<div mt-3 flex justify-center>
<c-alert v-if="status === 'error'" type="error">
An error occured processing {{ fileName }}
</c-alert>
<n-spin
v-if="status === 'processing'"
size="small"
/>
</div>
<c-card title="Logs">
<pre>{{ logs.join('\n') }}</pre>
</c-card>
</div>
</template>
-12
View File
@@ -1,12 +0,0 @@
import { Language } from '@vicons/tabler';
import { defineTool } from '../tool';
export const tool = defineTool({
name: 'Text to Unicode Names',
path: '/text-to-unicode-names',
description: 'Convert a text to its hexadecimal character codes and Unicode Names for each character',
keywords: ['text', 'unicode', 'name', 'hexa', 'char', 'code'],
component: () => import('./text-to-unicode-names.vue'),
icon: Language,
createdAt: new Date('2024-06-10'),
});
@@ -1,23 +0,0 @@
import { describe, expect, it } from 'vitest';
import { convertTextToUnicodeNames } from './text-to-unicode-names.service';
describe('text-to-unicode-names', () => {
describe('convertTextToUnicodeNames', () => {
it('a text string is converted to its unicode names representation', () => {
expect(convertTextToUnicodeNames('A')).toBe(
'A (U+0041: LATIN CAPITAL LETTER A)');
expect(convertTextToUnicodeNames('hello')).toBe(
'h (U+0068: LATIN SMALL LETTER H) e (U+0065: LATIN SMALL LETTER E) l (U+006C: LATIN SMALL LETTER L) l (U+006C: LATIN SMALL LETTER L) o (U+006F: LATIN SMALL LETTER O)');
expect(convertTextToUnicodeNames('')).toBe(
'');
expect(convertTextToUnicodeNames('être 1 $ ¤ …')).toBe(
'ê (U+00EA: LATIN SMALL LETTER E WITH CIRCUMFLEX) t (U+0074: LATIN SMALL LETTER T) r (U+0072: LATIN SMALL LETTER R) e (U+0065: LATIN SMALL LETTER E) (U+0020: SPACE) 1 (U+0031: DIGIT ONE) (U+0020: SPACE) $ (U+0024: DOLLAR SIGN) (U+0020: SPACE) ¤ (U+00A4: CURRENCY SIGN) (U+0020: SPACE) … (U+2026: HORIZONTAL ELLIPSIS)');
expect(convertTextToUnicodeNames('⁇ 𥆧 💩')).toBe(
'⁇ (U+2047: DOUBLE QUESTION MARK) (U+0020: SPACE) 𥆧 (U+251A7: CJK Ideograph Extension B) (U+0020: SPACE) 💩 (U+1F4A9: PILE OF POO)');
});
it('the separator between octets can be changed', () => {
expect(convertTextToUnicodeNames('hello', { separator: ' ; ' })).toBe(
'h (U+0068: LATIN SMALL LETTER H) ; e (U+0065: LATIN SMALL LETTER E) ; l (U+006C: LATIN SMALL LETTER L) ; l (U+006C: LATIN SMALL LETTER L) ; o (U+006F: LATIN SMALL LETTER O)');
});
});
});
@@ -1,7 +0,0 @@
import unicode from '@unicode/unicode-15.1.0/Names/index.js';
export function convertTextToUnicodeNames(text: string, { separator = ' ' }: { separator?: string } = {}): string {
return [...text]
.map(char => `${char} (U+${char.codePointAt(0)?.toString(16).toUpperCase().padStart(4, '0')}: ${(unicode.get(char.codePointAt(0)) || 'UNKNOWN CHARACTER')})`)
.join(separator);
}
@@ -1,23 +0,0 @@
<script setup lang="ts">
import { convertTextToUnicodeNames } from './text-to-unicode-names.service';
const inputText = ref('');
const unicodeNamesFromText = computed(() => convertTextToUnicodeNames(inputText.value, { separator: '\n' }));
</script>
<template>
<c-card title="Text to Unicode Names">
<c-input-text
v-model:value="inputText"
multiline placeholder="e.g. 'Hello world'"
label="Enter text to convert to Unicode Names"
autosize autofocus raw-text
/>
<textarea-copyable
v-model:value="unicodeNamesFromText"
word-wrap
label="Unicode Names from your text" multiline raw-text readonly mt-2
placeholder="The Unicode Names representation of your text will be here"
/>
</c-card>
</template>
-4
View File
@@ -1,4 +0,0 @@
declare module '@unicode/unicode-15.1.0/Names/index.js'{
const unicode: HashSet<number, string>;
export default unicode;
}
-2
View File
@@ -1,6 +1,5 @@
import { resolve } from 'node:path';
import { URL, fileURLToPath } from 'node:url';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
import VueI18n from '@intlify/unplugin-vue-i18n/vite';
import vue from '@vitejs/plugin-vue';
@@ -98,7 +97,6 @@ export default defineConfig({
resolvers: [NaiveUiResolver(), IconsResolver({ prefix: 'icon' })],
}),
Unocss(),
nodePolyfills(),
],
base: baseUrl,
resolve: {