Merge pull request #43 from agnosticeng/feat/web-deploy
This commit is contained in:
18
package-lock.json
generated
18
package-lock.json
generated
@@ -27,6 +27,7 @@
|
||||
"@sveltejs/vite-plugin-svelte": "^4.0.1",
|
||||
"@tauri-apps/cli": "^2.1.0",
|
||||
"@types/d3": "^7.4.3",
|
||||
"@types/node": "^22.10.5",
|
||||
"prettier": "^3.3.3",
|
||||
"prettier-plugin-svelte": "^3.2.8",
|
||||
"svelte": "^5.2.7",
|
||||
@@ -1449,6 +1450,16 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "22.10.5",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.5.tgz",
|
||||
"integrity": "sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.12.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
|
||||
@@ -2492,6 +2503,13 @@
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.20.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
|
||||
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "5.4.11",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz",
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
"@sveltejs/vite-plugin-svelte": "^4.0.1",
|
||||
"@tauri-apps/cli": "^2.1.0",
|
||||
"@types/d3": "^7.4.3",
|
||||
"@types/node": "^22.10.5",
|
||||
"prettier": "^3.3.3",
|
||||
"prettier-plugin-svelte": "^3.2.8",
|
||||
"svelte": "^5.2.7",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Tauri + SvelteKit + Typescript App</title>
|
||||
<title>agx</title>
|
||||
%sveltekit.head%
|
||||
</head>
|
||||
<body data-sveltekit-preload-data="hover">
|
||||
|
||||
@@ -23,4 +23,4 @@ export interface OLAPEngine {
|
||||
getSchema(): Promise<Table[]>;
|
||||
}
|
||||
|
||||
export const engine = new RemoteEngine() as OLAPEngine;
|
||||
export const engine: OLAPEngine = FORCE_REMOTE_ENGINE ? new RemoteEngine() : new CHDBEngine();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { engine, type OLAPResponse } from '$lib/olap-engine';
|
||||
import type { Table } from '$lib/olap-engine';
|
||||
import { engine, type OLAPResponse } from '$lib/olap-engine';
|
||||
|
||||
import { Editor } from '$lib/components/Editor';
|
||||
import Result from '$lib/components/Result.svelte';
|
||||
|
||||
1
src/vite-env.d.ts
vendored
Normal file
1
src/vite-env.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
declare const FORCE_REMOTE_ENGINE: string;
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 10 KiB |
@@ -1,5 +1,5 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { defineConfig } from 'vite';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig(async () => ({
|
||||
@@ -17,5 +17,8 @@ export default defineConfig(async () => ({
|
||||
// 3. tell vite to ignore watching `src-tauri`
|
||||
ignored: ['**/src-tauri/**']
|
||||
}
|
||||
},
|
||||
define: {
|
||||
FORCE_REMOTE_ENGINE: process.env.FORCE_REMOTE_ENGINE === 'true'
|
||||
}
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user