@chijs/cli
Advanced tools
Comparing version 0.0.7 to 0.0.8
import { fork } from 'node:child_process'; | ||
import { fileURLToPath } from 'node:url'; | ||
import { ChiApp } from '@chijs/server'; | ||
import { ChiApp, loadConfig } from '@chijs/server'; | ||
import { existsSync } from 'node:fs'; | ||
@@ -20,10 +20,10 @@ import { resolve } from 'node:path'; | ||
try { | ||
let config = process.env.CHI_CONFIG_PATH; | ||
if (!config) | ||
let path = process.env.CHI_CONFIG_PATH; | ||
if (!path) | ||
throw new Error(`CHI_CONFIG_PATH not set`); | ||
config = resolve(config); | ||
if (!existsSync(config)) | ||
throw new Error(`Config file not found: ${config}`); | ||
const app = new ChiApp(); | ||
await app.configManager.loadConfig(config); | ||
path = resolve(path); | ||
if (!existsSync(path)) | ||
throw new Error(`Config file not found: ${path}`); | ||
const config = await loadConfig(path); | ||
const app = new ChiApp(config); | ||
await app.start(); | ||
@@ -30,0 +30,0 @@ } |
{ | ||
"name": "@chijs/cli", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"main": "lib/index.js", | ||
@@ -19,4 +19,4 @@ "license": "AGPL-3.0", | ||
"dependencies": { | ||
"@chijs/client": "^0.0.7", | ||
"@chijs/server": "^0.0.7", | ||
"@chijs/client": "^0.0.8", | ||
"@chijs/server": "^0.0.8", | ||
"yargs": "^17.5.1" | ||
@@ -23,0 +23,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5341
+ Added@chijs/client@0.0.8(transitive)
- Removed@chijs/client@0.0.7(transitive)
Updated@chijs/client@^0.0.8
Updated@chijs/server@^0.0.8