mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-24 06:40:20 +03:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9e0ffc809 | ||
|
|
7d8e7e926c | ||
|
|
b5d3ed6b89 |
No files matched your search
Vendored
+33
-2
@@ -90,20 +90,30 @@ declare module '@vue/runtime-core' {
|
||||
HttpStatusCodes: typeof import('./src/tools/http-status-codes/http-status-codes.vue')['default']
|
||||
IbanValidatorAndParser: typeof import('./src/tools/iban-validator-and-parser/iban-validator-and-parser.vue')['default']
|
||||
'IconMdi:brushVariant': typeof import('~icons/mdi/brush-variant')['default']
|
||||
'IconMdi:contentCopy': typeof import('~icons/mdi/content-copy')['default']
|
||||
'IconMdi:kettleSteamOutline': typeof import('~icons/mdi/kettle-steam-outline')['default']
|
||||
IconMdiArrowDown: typeof import('~icons/mdi/arrow-down')['default']
|
||||
IconMdiArrowRightBottom: typeof import('~icons/mdi/arrow-right-bottom')['default']
|
||||
IconMdiCamera: typeof import('~icons/mdi/camera')['default']
|
||||
IconMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default']
|
||||
IconMdiChevronRight: typeof import('~icons/mdi/chevron-right')['default']
|
||||
IconMdiClose: typeof import('~icons/mdi/close')['default']
|
||||
IconMdiContentCopy: typeof import('~icons/mdi/content-copy')['default']
|
||||
IconMdiDeleteOutline: typeof import('~icons/mdi/delete-outline')['default']
|
||||
IconMdiDownload: typeof import('~icons/mdi/download')['default']
|
||||
IconMdiEye: typeof import('~icons/mdi/eye')['default']
|
||||
IconMdiEyeOff: typeof import('~icons/mdi/eye-off')['default']
|
||||
IconMdiHeart: typeof import('~icons/mdi/heart')['default']
|
||||
IconMdiPause: typeof import('~icons/mdi/pause')['default']
|
||||
IconMdiPlay: typeof import('~icons/mdi/play')['default']
|
||||
IconMdiRecord: typeof import('~icons/mdi/record')['default']
|
||||
IconMdiRefresh: typeof import('~icons/mdi/refresh')['default']
|
||||
IconMdiSearch: typeof import('~icons/mdi/search')['default']
|
||||
IconMdiTranslate: typeof import('~icons/mdi/translate')['default']
|
||||
IconMdiTriangleDown: typeof import('~icons/mdi/triangle-down')['default']
|
||||
IconMdiVideo: typeof import('~icons/mdi/video')['default']
|
||||
InputCopyable: typeof import('./src/components/InputCopyable.vue')['default']
|
||||
IntegerBaseConverter: typeof import('./src/tools/integer-base-converter/integer-base-converter.vue')['default']
|
||||
IpIncludeExclude: typeof import('./src/tools/ip-include-exclude/ip-include-exclude.vue')['default']
|
||||
Ipv4AddressConverter: typeof import('./src/tools/ipv4-address-converter/ipv4-address-converter.vue')['default']
|
||||
Ipv4RangeExpander: typeof import('./src/tools/ipv4-range-expander/ipv4-range-expander.vue')['default']
|
||||
Ipv4SubnetCalculator: typeof import('./src/tools/ipv4-subnet-calculator/ipv4-subnet-calculator.vue')['default']
|
||||
@@ -115,6 +125,7 @@ declare module '@vue/runtime-core' {
|
||||
JsonToXml: typeof import('./src/tools/json-to-xml/json-to-xml.vue')['default']
|
||||
JsonToYaml: typeof import('./src/tools/json-to-yaml-converter/json-to-yaml.vue')['default']
|
||||
JsonViewer: typeof import('./src/tools/json-viewer/json-viewer.vue')['default']
|
||||
JsUnobfuscator: typeof import('./src/tools/js-unobfuscator/js-unobfuscator.vue')['default']
|
||||
JwtParser: typeof import('./src/tools/jwt-parser/jwt-parser.vue')['default']
|
||||
KeycodeInfo: typeof import('./src/tools/keycode-info/keycode-info.vue')['default']
|
||||
ListConverter: typeof import('./src/tools/list-converter/list-converter.vue')['default']
|
||||
@@ -130,20 +141,40 @@ declare module '@vue/runtime-core' {
|
||||
MenuLayout: typeof import('./src/components/MenuLayout.vue')['default']
|
||||
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
|
||||
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
|
||||
NAlert: typeof import('naive-ui')['NAlert']
|
||||
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
|
||||
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
||||
NCode: typeof import('naive-ui')['NCode']
|
||||
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
||||
NColorPicker: typeof import('naive-ui')['NColorPicker']
|
||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||
NDatePicker: typeof import('naive-ui')['NDatePicker']
|
||||
NDivider: typeof import('naive-ui')['NDivider']
|
||||
NDynamicInput: typeof import('naive-ui')['NDynamicInput']
|
||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||
NForm: typeof import('naive-ui')['NForm']
|
||||
NFormItem: typeof import('naive-ui')['NFormItem']
|
||||
NGi: typeof import('naive-ui')['NGi']
|
||||
NGrid: typeof import('naive-ui')['NGrid']
|
||||
NH1: typeof import('naive-ui')['NH1']
|
||||
NH2: typeof import('naive-ui')['NH2']
|
||||
NH3: typeof import('naive-ui')['NH3']
|
||||
NIcon: typeof import('naive-ui')['NIcon']
|
||||
NImage: typeof import('naive-ui')['NImage']
|
||||
NInputGroup: typeof import('naive-ui')['NInputGroup']
|
||||
NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel']
|
||||
NInputNumber: typeof import('naive-ui')['NInputNumber']
|
||||
NLayout: typeof import('naive-ui')['NLayout']
|
||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||
NMenu: typeof import('naive-ui')['NMenu']
|
||||
NSpace: typeof import('naive-ui')['NSpace']
|
||||
NProgress: typeof import('naive-ui')['NProgress']
|
||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
||||
NSlider: typeof import('naive-ui')['NSlider']
|
||||
NSpin: typeof import('naive-ui')['NSpin']
|
||||
NStatistic: typeof import('naive-ui')['NStatistic']
|
||||
NSwitch: typeof import('naive-ui')['NSwitch']
|
||||
NTable: typeof import('naive-ui')['NTable']
|
||||
NTag: typeof import('naive-ui')['NTag']
|
||||
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']
|
||||
|
||||
+3
-2
@@ -54,7 +54,6 @@
|
||||
"@vueuse/router": "^10.0.0",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"change-case": "^4.1.2",
|
||||
"cidr-tools": "^11.0.2",
|
||||
"colord": "^2.9.3",
|
||||
"composerize-ts": "^0.6.2",
|
||||
"country-code-lookup": "^0.1.0",
|
||||
@@ -71,7 +70,6 @@
|
||||
"highlight.js": "^11.7.0",
|
||||
"iarna-toml-esm": "^3.0.5",
|
||||
"ibantools": "^4.3.3",
|
||||
"ip-matching": "^2.1.2",
|
||||
"js-base64": "^3.7.6",
|
||||
"json5": "^2.2.3",
|
||||
"jwt-decode": "^3.1.2",
|
||||
@@ -90,6 +88,7 @@
|
||||
"pinia": "^2.0.34",
|
||||
"plausible-tracker": "^0.3.8",
|
||||
"qrcode": "^1.5.1",
|
||||
"sandybox": "^1.1.2",
|
||||
"randexp": "^0.5.3",
|
||||
"sql-formatter": "^13.0.0",
|
||||
"ua-parser-js": "^1.0.35",
|
||||
@@ -97,11 +96,13 @@
|
||||
"unicode-emoji-json": "^0.4.0",
|
||||
"unplugin-auto-import": "^0.16.4",
|
||||
"uuid": "^9.0.0",
|
||||
"vite-plugin-node-polyfills": "^0.21.0",
|
||||
"vue": "^3.3.4",
|
||||
"vue-i18n": "^9.9.1",
|
||||
"vue-router": "^4.1.6",
|
||||
"vue-shadow-dom": "^4.2.0",
|
||||
"vue-tsc": "^1.8.1",
|
||||
"webcrack": "^2.13.0",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"xml-formatter": "^3.3.2",
|
||||
"xml-js": "^1.6.11",
|
||||
|
||||
Generated
+1122
-340
File diff suppressed because it is too large.
Load diff
+3
-10
@@ -1,7 +1,7 @@
|
||||
import { tool as base64FileConverter } from './base64-file-converter';
|
||||
import { tool as base64StringConverter } from './base64-string-converter';
|
||||
import { tool as basicAuthGenerator } from './basic-auth-generator';
|
||||
import { tool as ipIncludeExclude } from './ip-include-exclude';
|
||||
import { tool as jsUnobfuscator } from './js-unobfuscator';
|
||||
import { tool as emailNormalizer } from './email-normalizer';
|
||||
|
||||
import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
||||
@@ -138,6 +138,7 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
httpStatusCodes,
|
||||
jsonDiff,
|
||||
safelinkDecoder,
|
||||
jsUnobfuscator,
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -165,15 +166,7 @@ export const toolsByCategory: ToolCategory[] = [
|
||||
},
|
||||
{
|
||||
name: 'Network',
|
||||
components: [
|
||||
ipv4SubnetCalculator,
|
||||
ipv4AddressConverter,
|
||||
ipv4RangeExpander,
|
||||
ipIncludeExclude,
|
||||
macAddressLookup,
|
||||
macAddressGenerator,
|
||||
ipv6UlaGenerator,
|
||||
],
|
||||
components: [ipv4SubnetCalculator, ipv4AddressConverter, ipv4RangeExpander, macAddressLookup, macAddressGenerator, ipv6UlaGenerator],
|
||||
},
|
||||
{
|
||||
name: 'Math',
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
import { UnfoldMoreOutlined } from '@vicons/material';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'IP Subnets Exclude Calculator',
|
||||
path: '/ip-include-exclude',
|
||||
description: 'Substract a disallowed IP Ranges/Mask/CIDR list from an allowed IP Ranges/Mask/CIDR list',
|
||||
keywords: ['ip', 'allowed', 'disallowed', 'include', 'exclude', 'subnet', 'cidr'],
|
||||
component: () => import('./ip-include-exclude.vue'),
|
||||
icon: UnfoldMoreOutlined,
|
||||
createdAt: new Date('2024-08-15'),
|
||||
});
|
||||
@@ -1,63 +0,0 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { substractCIDRs } from './ip-include-exclude.service';
|
||||
|
||||
describe('ip-include-exclude', () => {
|
||||
describe('substractCIDRs', () => {
|
||||
it('should return error on invalid values', () => {
|
||||
expect(substractCIDRs({ allowedRanges: '192.168.0.', disallowedRanges: '' })).to.deep.eq({ // NOSONAR
|
||||
allowedCIDRs: [],
|
||||
allowedSubnets: [],
|
||||
disallowedSubnets: [],
|
||||
error: 'Error: Invalid IP (range/subnetwork)',
|
||||
});
|
||||
});
|
||||
it('should return correct substractions and subnets', () => {
|
||||
expect(substractCIDRs({ allowedRanges: '192.168.3.0/24', disallowedRanges: '' })).to.deep.eq({ // NOSONAR
|
||||
allowedCIDRs: ['192.168.3.0/24'], // NOSONAR
|
||||
allowedSubnets: [{ cidr: '192.168.3.0/24', end: '192.168.3.255', start: '192.168.3.0' }], // NOSONAR
|
||||
disallowedSubnets: [],
|
||||
error: '',
|
||||
});
|
||||
expect(substractCIDRs({ allowedRanges: '192.168.2.0/24', disallowedRanges: '192.168.2.1' })).to.deep.eq({ // NOSONAR
|
||||
allowedCIDRs: ['192.168.2.0/32', // NOSONAR
|
||||
'192.168.2.2/31', // NOSONAR
|
||||
'192.168.2.4/30', // NOSONAR
|
||||
'192.168.2.8/29', // NOSONAR
|
||||
'192.168.2.16/28', // NOSONAR
|
||||
'192.168.2.32/27', // NOSONAR
|
||||
'192.168.2.64/26', // NOSONAR
|
||||
'192.168.2.128/25'], // NOSONAR
|
||||
allowedSubnets: [
|
||||
{ cidr: '192.168.2.0/24', end: '192.168.2.255', start: '192.168.2.0' }, // NOSONAR
|
||||
],
|
||||
disallowedSubnets: [
|
||||
{ cidr: '192.168.2.1/32', end: '192.168.2.1', start: '192.168.2.1' }, // NOSONAR
|
||||
],
|
||||
error: '',
|
||||
});
|
||||
expect(substractCIDRs({ allowedRanges: '192.168.12.0/24', disallowedRanges: '192.168.12.1-192.168.12.10, 192.168.12.34' })).to.deep.eq({ // NOSONAR
|
||||
allowedCIDRs: ['192.168.12.0/32', // NOSONAR
|
||||
'192.168.12.11/32', // NOSONAR
|
||||
'192.168.12.12/30', // NOSONAR
|
||||
'192.168.12.16/28', // NOSONAR
|
||||
'192.168.12.32/31', // NOSONAR
|
||||
'192.168.12.35/32', // NOSONAR
|
||||
'192.168.12.36/30', // NOSONAR
|
||||
'192.168.12.40/29', // NOSONAR
|
||||
'192.168.12.48/28', // NOSONAR
|
||||
'192.168.12.64/26', // NOSONAR
|
||||
'192.168.12.128/25'], // NOSONAR
|
||||
allowedSubnets: [{ cidr: '192.168.12.0/24', end: '192.168.12.255', start: '192.168.12.0' }], // NOSONAR
|
||||
disallowedSubnets: [
|
||||
{ cidr: '192.168.12.1/32', end: '192.168.12.1', start: '192.168.12.1' }, // NOSONAR
|
||||
{ cidr: '192.168.12.2/31', end: '192.168.12.3', start: '192.168.12.2' }, // NOSONAR
|
||||
{ cidr: '192.168.12.4/30', end: '192.168.12.7', start: '192.168.12.4' }, // NOSONAR
|
||||
{ cidr: '192.168.12.8/31', end: '192.168.12.9', start: '192.168.12.8' }, // NOSONAR
|
||||
{ cidr: '192.168.12.10/32', end: '192.168.12.10', start: '192.168.12.10' }, // NOSONAR
|
||||
{ cidr: '192.168.12.34/32', end: '192.168.12.34', start: '192.168.12.34' }, // NOSONAR
|
||||
],
|
||||
error: '',
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,49 +0,0 @@
|
||||
import type { IPMask } from 'ip-matching';
|
||||
import { getMatch } from 'ip-matching';
|
||||
import { excludeCidr } from 'cidr-tools';
|
||||
|
||||
function convertToCIDR(mask: IPMask) {
|
||||
const subnet = mask.convertToSubnet();
|
||||
if (!subnet) {
|
||||
return { cidr: mask.toString(), start: '', end: '' };
|
||||
}
|
||||
return {
|
||||
cidr: subnet.toString(),
|
||||
start: subnet.getFirst().toString(),
|
||||
end: subnet.getLast().toString(),
|
||||
};
|
||||
}
|
||||
|
||||
export function substractCIDRs(
|
||||
{ allowedRanges, disallowedRanges }:
|
||||
{
|
||||
allowedRanges: string
|
||||
disallowedRanges: string
|
||||
}) {
|
||||
try {
|
||||
const allowedRangesMatchMasks = allowedRanges.split(/\s*[,;|]+\s*/g) // NOSONAR
|
||||
.filter(range => range)
|
||||
.flatMap(range => getMatch(range)?.convertToMasks() || []);
|
||||
const disallowedRangesMatchMasks = disallowedRanges.split(/\s*[,;|]+\s*/g) // NOSONAR
|
||||
.filter(range => range)
|
||||
.flatMap(range => getMatch(range)?.convertToMasks() || []);
|
||||
|
||||
const allowedSubnets = allowedRangesMatchMasks.map(convertToCIDR);
|
||||
const disallowedSubnets = disallowedRangesMatchMasks.map(convertToCIDR);
|
||||
|
||||
return {
|
||||
error: '',
|
||||
allowedSubnets,
|
||||
disallowedSubnets,
|
||||
allowedCIDRs: excludeCidr(allowedSubnets.map(net => net.cidr), disallowedSubnets.map(net => net.cidr)),
|
||||
};
|
||||
}
|
||||
catch (e: any) {
|
||||
return {
|
||||
error: e.toString(),
|
||||
allowedSubnets: [],
|
||||
disallowedSubnets: [],
|
||||
allowedCIDRs: [],
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { useStorage } from '@vueuse/core';
|
||||
import { substractCIDRs } from './ip-include-exclude.service';
|
||||
import SpanCopyable from '@/components/SpanCopyable.vue';
|
||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||
|
||||
const allowedRanges = useStorage('ip-inc-exc:allow', '192.168.0.1/24'); // NOSONAR
|
||||
const disallowedRanges = useStorage('ip-inc-exc:disallow', '192.168.0.6'); // NOSONAR
|
||||
|
||||
const result = computed(() => substractCIDRs({
|
||||
allowedRanges: allowedRanges.value, disallowedRanges: disallowedRanges.value,
|
||||
}));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-input-text
|
||||
v-model:value="allowedRanges"
|
||||
label="AllowedIPs (IPv4/6 CIDR/Range/Mask/Wildcard)"
|
||||
placeholder="An IPv4/6 CIDR/Range/Mask/Wildcard..."
|
||||
mb-4
|
||||
/>
|
||||
|
||||
<c-input-text
|
||||
v-model:value="disallowedRanges"
|
||||
label="DisallowedIPs (IPv4/6 CIDR/Range/Mask/Wildcard)"
|
||||
placeholder="An IPv4/6 CIDR/Range/Mask/Wildcard..."
|
||||
mb-4
|
||||
/>
|
||||
|
||||
<n-divider />
|
||||
|
||||
<c-alert v-if="result.error">
|
||||
{{ result.error }}
|
||||
</c-alert>
|
||||
|
||||
<div v-if="!result.error">
|
||||
<n-form-item label="Final AllowedIPs:">
|
||||
<TextareaCopyable :value="result.allowedCIDRs.join(', ')" />
|
||||
</n-form-item>
|
||||
|
||||
<n-divider />
|
||||
|
||||
<c-card title="Allowed Subnets">
|
||||
<n-table>
|
||||
<tbody>
|
||||
<tr v-for="{ cidr, start, end } in result.allowedSubnets" :key="cidr">
|
||||
<td font-bold>
|
||||
<SpanCopyable :value="cidr" />
|
||||
</td>
|
||||
<td>
|
||||
<SpanCopyable :value="start" />
|
||||
</td>
|
||||
<td>
|
||||
<SpanCopyable :value="end" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</n-table>
|
||||
</c-card>
|
||||
<c-card title="Disallowed Subnets">
|
||||
<n-table>
|
||||
<tbody>
|
||||
<tr v-for="{ cidr, start, end } in result.disallowedSubnets" :key="cidr">
|
||||
<td font-bold>
|
||||
<SpanCopyable :value="cidr" />
|
||||
</td>
|
||||
<td>
|
||||
<SpanCopyable :value="start" />
|
||||
</td>
|
||||
<td>
|
||||
<SpanCopyable :value="end" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</n-table>
|
||||
</c-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,12 @@
|
||||
import { BrandJavascript } from '@vicons/tabler';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Javascript Unobfuscator/Unpacker',
|
||||
path: '/js-unobfuscator',
|
||||
description: 'webcrack is a tool for reverse engineering javascript. It can deobfuscate obfuscator.io, unminify, transpile, and unpack webpack/browserify, to resemble the original source code as much as possible.',
|
||||
keywords: ['js', 'unobfuscator', 'obfuscator.io', 'unminify', 'transpile', 'unpack', 'webpack', 'browserify'],
|
||||
component: () => import('./js-unobfuscator.vue'),
|
||||
icon: BrandJavascript,
|
||||
createdAt: new Date('2024-05-11'),
|
||||
});
|
||||
@@ -0,0 +1,55 @@
|
||||
<script setup lang="ts">
|
||||
import Sandybox from 'sandybox';
|
||||
import { webcrack } from 'webcrack';
|
||||
|
||||
const input = ref('');
|
||||
const result = computedAsync(async () => {
|
||||
try {
|
||||
const inputValue = input.value;
|
||||
const sandbox = await Sandybox.create();
|
||||
const iframe = document.querySelector('.sandybox') as HTMLIFrameElement;
|
||||
iframe?.contentDocument?.head.insertAdjacentHTML(
|
||||
'afterbegin',
|
||||
'<meta http-equiv="Content-Security-Policy" content="default-src \'none\';">',
|
||||
);
|
||||
const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
|
||||
|
||||
async function evalCode(code: string) {
|
||||
const fn = await sandbox.addFunction(`() => ${code}`);
|
||||
return Promise.race([
|
||||
fn(),
|
||||
sleep(10_000).then(() => Promise.reject(new Error('Sandbox timeout'))),
|
||||
]).finally(() => sandbox.removeFunction(fn));
|
||||
}
|
||||
|
||||
return await webcrack(inputValue, { sandbox: evalCode });
|
||||
}
|
||||
catch (e: any) {
|
||||
return {
|
||||
code: `/*\n${e.toString()}\n*/`,
|
||||
bundle: '',
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<iframe class="sandybox" style="display:none" title="sandbox" />
|
||||
<CInputText
|
||||
v-model:value="input"
|
||||
placeholder="Your obfuscate Javascript code"
|
||||
label="Obfuscate Javascript code:"
|
||||
rows="20"
|
||||
autosize
|
||||
raw-text
|
||||
multiline
|
||||
monospace
|
||||
/>
|
||||
|
||||
<n-form-item label="Deobfuscated code:">
|
||||
<textarea-copyable :value="result?.code" language="javascript" />
|
||||
</n-form-item>
|
||||
<n-form-item label="Bundle:">
|
||||
<textarea-copyable :value="result?.bundle" language="javascript" />
|
||||
</n-form-item>
|
||||
</template>
|
||||
@@ -15,6 +15,7 @@ import { VitePWA } from 'vite-plugin-pwa';
|
||||
import markdown from 'vite-plugin-vue-markdown';
|
||||
import svgLoader from 'vite-svg-loader';
|
||||
import { configDefaults } from 'vitest/config';
|
||||
import { nodePolyfills } from 'vite-plugin-node-polyfills';
|
||||
|
||||
const baseUrl = process.env.BASE_URL ?? '/';
|
||||
|
||||
@@ -97,6 +98,9 @@ export default defineConfig({
|
||||
resolvers: [NaiveUiResolver(), IconsResolver({ prefix: 'icon' })],
|
||||
}),
|
||||
Unocss(),
|
||||
nodePolyfills({
|
||||
exclude: ['fs'],
|
||||
}),
|
||||
],
|
||||
base: baseUrl,
|
||||
resolve: {
|
||||
@@ -112,5 +116,11 @@ export default defineConfig({
|
||||
},
|
||||
build: {
|
||||
target: 'esnext',
|
||||
rollupOptions: {
|
||||
external: ['./out/isolated_vm'],
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: ['isolated-vm'],
|
||||
},
|
||||
});
|
||||
Reference in new issue
Block a user