ework-web 0.10.13 → 0.10.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/daemon-deploy.ts +1 -1
- package/src/index.ts +4 -0
package/package.json
CHANGED
package/src/daemon-deploy.ts
CHANGED
|
@@ -72,7 +72,7 @@ function parseEnvFile(content: string): Map<string, string> {
|
|
|
72
72
|
return out;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
function buildEnvBlock(env: Map<string, string>, target: DeployTarget): string {
|
|
75
|
+
export function buildEnvBlock(env: Map<string, string>, target: DeployTarget): string {
|
|
76
76
|
const lines: string[] = [];
|
|
77
77
|
const localIP = detectLocalIP();
|
|
78
78
|
for (const k of FORWARD_KEYS) {
|
package/src/index.ts
CHANGED
|
@@ -849,6 +849,10 @@ async function handle(req: Request, url: URL, ip: string, ctx: { authed: boolean
|
|
|
849
849
|
? (payload as { port?: unknown }).port
|
|
850
850
|
: undefined);
|
|
851
851
|
const args = ["add-daemon"];
|
|
852
|
+
const dataDir = process.env.WORK_DATA_DIR ?? process.env.AWORK_DATA_DIR;
|
|
853
|
+
if (dataDir) {
|
|
854
|
+
args.push("--data-dir", dataDir);
|
|
855
|
+
}
|
|
852
856
|
if (typeof port === "number" && Number.isFinite(port) && port > 0 && port < 65536) {
|
|
853
857
|
args.push(String(Math.trunc(port)));
|
|
854
858
|
} else if (port !== undefined && port !== null) {
|