diff --git a/doppler/Cargo.toml b/doppler/Cargo.toml index b05cd80..cf35675 100644 --- a/doppler/Cargo.toml +++ b/doppler/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "doppler" -version = "0.4.1" +version = "0.4.0" repository = "https://github.com/tee8z/doppler.git" [package.metadata.dist] diff --git a/doppler_ui/package.json b/doppler_ui/package.json index b36dc51..aa0ae5f 100644 --- a/doppler_ui/package.json +++ b/doppler_ui/package.json @@ -1,51 +1,51 @@ { - "name": "doppler", - "version": "0.4.1", - "repository": "github:tee8z/doppler", - "bin": { - "doppler_ui": "build/index.js" - }, - "scripts": { - "dev": "vite dev", - "build": "vite build", - "dist": "node dist.cjs", - "preview": "vite preview", - "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", - "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "test": "vitest", - "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write ." - }, - "devDependencies": { - "@sveltejs/kit": "2.7.2", - "@types/ini": "^4.1.0", - "@typescript-eslint/eslint-plugin": "8.10.0", - "@typescript-eslint/parser": "8.10.0", - "autoprefixer": "^10.4.15", - "eslint": "^9.12.0", - "eslint-config-prettier": "9.1.0", - "eslint-plugin-svelte": "^2.45.1", - "postcss": "^8.4.29", - "prettier": "3.3.3", - "prettier-plugin-svelte": "3.2.7", - "svelte": "5.0.2", - "@sveltejs/adapter-node": "5.2.8", - "svelte-check": "4.0.5", - "tailwindcss": "^3.3.3", - "tslib": "^2.4.1", - "typescript": "^5.0.0", - "vite": "5.4.9", - "vitest": "2.1.3" - }, - "type": "module", - "dependencies": { - "bun": "^1.0.0", - "chokidar": "^4.0.1", - "cytoscape": "^3.30.2", - "cytoscape-cose-bilkent": "^4.1.0", - "ini": "5.0.0", - "node-fetch": "^3.3.2", - "path-browserify": "^1.0.1", - "uuid": "^10.0.0" - } -} \ No newline at end of file + "name": "doppler", + "version": "0.4.0", + "repository": "github:tee8z/doppler", + "bin": { + "doppler_ui": "build/index.js" + }, + "scripts": { + "dev": "vite dev", + "build": "vite build", + "dist": "node dist.cjs", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", + "test": "vitest", + "lint": "prettier --plugin-search-dir . --check . && eslint .", + "format": "prettier --plugin-search-dir . --write ." + }, + "devDependencies": { + "@sveltejs/kit": "2.7.2", + "@types/ini": "^4.1.0", + "@typescript-eslint/eslint-plugin": "8.10.0", + "@typescript-eslint/parser": "8.10.0", + "autoprefixer": "^10.4.15", + "eslint": "^9.12.0", + "eslint-config-prettier": "9.1.0", + "eslint-plugin-svelte": "^2.45.1", + "postcss": "^8.4.29", + "prettier": "3.3.3", + "prettier-plugin-svelte": "3.2.7", + "svelte": "5.0.2", + "@sveltejs/adapter-node": "5.2.8", + "svelte-check": "4.0.5", + "tailwindcss": "^3.3.3", + "tslib": "^2.4.1", + "typescript": "^5.0.0", + "vite": "5.4.9", + "vitest": "2.1.3" + }, + "type": "module", + "dependencies": { + "bun": "^1.0.0", + "chokidar": "^4.0.1", + "cytoscape": "^3.30.2", + "cytoscape-cose-bilkent": "^4.1.0", + "ini": "5.0.0", + "node-fetch": "^3.3.2", + "path-browserify": "^1.0.1", + "uuid": "^10.0.0" + } +} diff --git a/doppler_ui/src/routes/api/connections/+server.ts b/doppler_ui/src/routes/api/connections/+server.ts index f9b5234..8cf3bfe 100644 --- a/doppler_ui/src/routes/api/connections/+server.ts +++ b/doppler_ui/src/routes/api/connections/+server.ts @@ -3,7 +3,6 @@ import fs from 'fs'; import { parse } from 'ini'; import { resolve } from 'path'; import * as path from 'path'; -import { UI_CONFIG_PATH } from '$env/static/private'; export interface ConnectionConfig { macaroon: string; @@ -33,7 +32,7 @@ function safeReadFileSync(path: string): Buffer | null { } } -const configPath = UI_CONFIG_PATH || process.env.UI_CONFIG_PATH || path.join(process.cwd(), '/build/ui_config'); +const configPath = process.env.UI_CONFIG_PATH || path.join(process.cwd(), '/build/ui_config'); //TODO: have the info.conf be change based on the run script export const GET: RequestHandler = async function () { diff --git a/doppler_ui/src/routes/api/download/+server.ts b/doppler_ui/src/routes/api/download/+server.ts index 8e2d871..1982f48 100644 --- a/doppler_ui/src/routes/api/download/+server.ts +++ b/doppler_ui/src/routes/api/download/+server.ts @@ -3,9 +3,8 @@ import type { RequestHandler } from './$types'; import fs from 'fs'; import path from 'path'; import { parse } from 'ini'; -import { UI_CONFIG_PATH } from '$env/static/private'; -const configPath = UI_CONFIG_PATH || process.env.UI_CONFIG_PATH || path.join(process.cwd(), '/build/ui_config'); +const configPath = process.env.UI_CONFIG_PATH || path.join(process.cwd(), '/build/ui_config'); const config = parse(fs.readFileSync(`${configPath}/server.conf.ini`, 'utf-8')); diff --git a/doppler_ui/src/routes/api/logs/+server.ts b/doppler_ui/src/routes/api/logs/+server.ts index 690fd20..86ef8e2 100644 --- a/doppler_ui/src/routes/api/logs/+server.ts +++ b/doppler_ui/src/routes/api/logs/+server.ts @@ -4,9 +4,8 @@ import * as fs from 'fs'; import * as path from 'path'; import chokidar from 'chokidar'; import { parse } from 'ini'; -import { UI_CONFIG_PATH } from '$env/static/private'; -const configPath = UI_CONFIG_PATH || process.env.UI_CONFIG_PATH || path.join(process.cwd(), '/build/ui_config'); +const configPath = process.env.UI_CONFIG_PATH || path.join(process.cwd(), '/build/ui_config'); const config = parse(fs.readFileSync(`${configPath}/server.conf.ini`, 'utf-8')); const LOGS_FOLDER = config.paths.logsFolder; diff --git a/doppler_ui/src/routes/api/reset/+server.ts b/doppler_ui/src/routes/api/reset/+server.ts index 00afbf0..ae9c16c 100644 --- a/doppler_ui/src/routes/api/reset/+server.ts +++ b/doppler_ui/src/routes/api/reset/+server.ts @@ -6,10 +6,9 @@ import { parse } from 'ini'; import { resolve } from 'path'; import { v7 } from 'uuid'; import { logStreamManager } from '$lib/log_stream_manager'; -import { UI_CONFIG_PATH } from '$env/static/private'; // Read and parse the INI config file -const configPath = UI_CONFIG_PATH || process.env.UI_CONFIG_PATH || path.join(process.cwd(), '/build/ui_config'); +const configPath = process.env.UI_CONFIG_PATH || path.join(process.cwd(), '/build/ui_config'); const config = parse(fs.readFileSync(`${configPath}/server.conf.ini`, 'utf-8')); const LOGS_FOLDER = config.paths.logsFolder; diff --git a/doppler_ui/src/routes/api/run/+server.ts b/doppler_ui/src/routes/api/run/+server.ts index 3c9767d..593d7bc 100644 --- a/doppler_ui/src/routes/api/run/+server.ts +++ b/doppler_ui/src/routes/api/run/+server.ts @@ -5,9 +5,8 @@ import { spawn } from 'child_process'; import { parse } from 'ini'; import { createLogParser } from '$lib/log_transformers'; import { logStreamManager } from '$lib/log_stream_manager'; -import { UI_CONFIG_PATH } from '$env/static/private'; -const configPath = UI_CONFIG_PATH || process.env.UI_CONFIG_PATH || path.join(process.cwd(), '/build/ui_config'); +const configPath = process.env.UI_CONFIG_PATH || path.join(process.cwd(), '/build/ui_config'); const config = parse(fs.readFileSync(`${configPath}/server.conf.ini`, 'utf-8')); const DOPPLER_SCRIPTS_FOLDER = config.paths.dopplerScriptsFolder; diff --git a/doppler_ui/src/routes/api/save/+server.ts b/doppler_ui/src/routes/api/save/+server.ts index 278fec0..465ae82 100644 --- a/doppler_ui/src/routes/api/save/+server.ts +++ b/doppler_ui/src/routes/api/save/+server.ts @@ -2,9 +2,8 @@ import { json, type RequestHandler } from '@sveltejs/kit'; import fs from 'fs'; import path from 'path'; import { parse } from 'ini'; -import { UI_CONFIG_PATH } from '$env/static/private'; -const configPath = UI_CONFIG_PATH || process.env.UI_CONFIG_PATH || path.join(process.cwd(), '/build/ui_config'); +const configPath = process.env.UI_CONFIG_PATH || path.join(process.cwd(), '/build/ui_config'); const config = parse(fs.readFileSync(`${configPath}/server.conf.ini`, 'utf-8')); const DOPPLER_SCRIPTS_FOLDER = config.paths.dopplerScriptsFolder; diff --git a/doppler_ui/src/routes/api/scripts/+server.ts b/doppler_ui/src/routes/api/scripts/+server.ts index ee4c742..a8a03e0 100644 --- a/doppler_ui/src/routes/api/scripts/+server.ts +++ b/doppler_ui/src/routes/api/scripts/+server.ts @@ -3,9 +3,8 @@ import fs from 'fs'; import path from 'path'; import { parse } from 'ini'; import { getDirectoryTree } from '$lib/file_accessor'; -import { UI_CONFIG_PATH } from '$env/static/private'; -const configPath = UI_CONFIG_PATH || process.env.UI_CONFIG_PATH || path.join(process.cwd(), '/build/ui_config'); +const configPath = process.env.UI_CONFIG_PATH || path.join(process.cwd(), '/build/ui_config'); const config = parse(fs.readFileSync(`${configPath}/server.conf.ini`, 'utf-8')); const DOPPLER_SCRIPTS_FOLDER = config.paths.dopplerScriptsFolder;