+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/tools/curl-converter/index.ts b/src/tools/curl-converter/index.ts
new file mode 100644
index 00000000..1e13664d
--- /dev/null
+++ b/src/tools/curl-converter/index.ts
@@ -0,0 +1,12 @@
+import { ExternalLink } from '@vicons/tabler';
+import { defineTool } from '../tool';
+
+export const tool = defineTool({
+ name: 'Curl Converter',
+ path: '/curl-converter',
+ description: 'Generate common coding languages version of provided curl command line',
+ keywords: ['curl', 'code', 'language', 'generator'],
+ component: () => import('./curl-converter.vue'),
+ icon: ExternalLink,
+ createdAt: new Date('2024-04-20'),
+});
diff --git a/src/tools/index.ts b/src/tools/index.ts
index 6bdf047a..f45cb940 100644
--- a/src/tools/index.ts
+++ b/src/tools/index.ts
@@ -31,6 +31,7 @@ import { tool as propertiesToYaml } from './properties-to-yaml';
import { tool as apiTester } from './api-tester';
import { tool as imageToCss } from './image-to-css';
import { tool as jsonToSchema } from './json-to-schema';
+import { tool as curlConverter } from './curl-converter';
import { tool as pdfSignatureChecker } from './pdf-signature-checker';
import { tool as uuidConverter } from './uuid-converter';
import { tool as numeronymGenerator } from './numeronym-generator';
@@ -219,6 +220,7 @@ export const toolsByCategory: ToolCategory[] = [
regexMemo,
extractTextFromHtml,
jsonToSchema,
+ curlConverter,
],
},
{
diff --git a/vite.config.ts b/vite.config.ts
index aba6aa3f..05ac9af0 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -16,6 +16,7 @@ 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';
+import topLevelAwait from "vite-plugin-top-level-await";
const baseUrl = process.env.BASE_URL ?? '/';
@@ -105,6 +106,12 @@ export default defineConfig({
nodePolyfills({
exclude: ['fs'],
}),
+ topLevelAwait({
+ // The export name of top-level await promise for each chunk module
+ promiseExportName: '__tla',
+ // The function to generate import names of top-level await promise in each chunk module
+ promiseImportName: i => `__tla_${i}`,
+ }),
],
base: baseUrl,
resolve: {