Introduce plugin/<id> installs (zip, HTTPS git, example, fork), jerapah-plugin.json manifests with jerapah semver ranges, isolated plugin dirs under data/plugins, and app version 0.1.0. Core scripts are non-editable; get-current-time moves to examples/plugins. Co-authored-by: Nasyarobby Putra <nasyarobby@gmail.com>
18 lines
744 B
JavaScript
18 lines
744 B
JavaScript
import path from "path";
|
|
import { fileURLToPath } from "url";
|
|
|
|
export const SERVER_ROOT = path.dirname(fileURLToPath(import.meta.url));
|
|
export const SCRIPTS_DIR = path.join(SERVER_ROOT, "scripts");
|
|
export const WORKFLOWS_DIR = path.join(SERVER_ROOT, "workflows");
|
|
export const DATA_DIR = path.join(SERVER_ROOT, "data");
|
|
/** Installed user plugins (outside the pnpm workspace). */
|
|
export const PLUGINS_DIR =
|
|
process.env.JFLOW_PLUGINS_DIR ?? path.join(DATA_DIR, "plugins");
|
|
/** Example plugin sources shipped with the repo. */
|
|
export const EXAMPLE_PLUGINS_DIR = path.resolve(
|
|
SERVER_ROOT,
|
|
"../../examples/plugins",
|
|
);
|
|
export const LOGS_DIR = path.join(SERVER_ROOT, "logs");
|
|
export const WEB_DIST = path.resolve(SERVER_ROOT, "../web/dist");
|