agent-transport-system 0.7.77 → 0.7.78

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/dist/ats.js CHANGED
@@ -30,7 +30,7 @@ import { Box, Container, Editor, Key, ProcessTerminal, TUI, Text, getEditorKeybi
30
30
  import { ReadStream, WriteStream } from "node:tty";
31
31
 
32
32
  //#region package.json
33
- var version = "0.7.77";
33
+ var version = "0.7.78";
34
34
  var package_default = {
35
35
  $schema: "https://www.schemastore.org/package.json",
36
36
  name: "agent-transport-system",
@@ -31099,7 +31099,6 @@ function ensureLineSeparator(text) {
31099
31099
  function buildSystemdUnitFile(spec, pathInput = {}) {
31100
31100
  const serviceLogPath = getDaemonSystemServiceLogPath(pathInput);
31101
31101
  const command = [quoteShellValue(spec.executable), ...spec.args.map(quoteShellValue)].join(" ");
31102
- const envRows = Object.entries(spec.env).map(([key, value]) => `Environment=${key}=${quoteSystemdEnvironmentValue(value)}`);
31103
31102
  return `# Managed by ATS CLI
31104
31103
  [Unit]
31105
31104
  Description=ATS Daemon Service
@@ -31107,11 +31106,11 @@ After=network-online.target
31107
31106
 
31108
31107
  [Service]
31109
31108
  Type=simple
31110
- WorkingDirectory=${quoteShellValue(spec.workingDirectory ?? process.cwd())}
31109
+ WorkingDirectory=${quoteShellValue(spec.workingDirectory ?? daemonRuntimeRootPath(pathInput))}
31111
31110
  ExecStart=${command}
31112
31111
  Restart=always
31113
31112
  RestartSec=5
31114
- ${envRows.join("\n")}
31113
+ ${Object.entries(spec.env).map(([key, value]) => `Environment=${key}=${quoteSystemdEnvironmentValue(value)}`).join("\n")}
31115
31114
  StandardOutput=append:${serviceLogPath}
31116
31115
  StandardError=append:${serviceLogPath}
31117
31116
 
@@ -31140,7 +31139,7 @@ function buildLaunchdPlist(spec, pathInput = {}) {
31140
31139
  const serviceIdentity = resolveDaemonServiceIdentity(pathInput);
31141
31140
  const serviceLogPath = getDaemonSystemServiceLogPath(pathInput);
31142
31141
  const args = [spec.executable, ...spec.args].map((value) => ` <string>${escapeXmlText(value)}</string>`).join("\n");
31143
- const workingDirectory = escapeXmlText(sanitizeLaunchdEnvironmentValue(spec.workingDirectory ?? process.cwd()));
31142
+ const workingDirectory = escapeXmlText(sanitizeLaunchdEnvironmentValue(spec.workingDirectory ?? daemonRuntimeRootPath(pathInput)));
31144
31143
  const envRows = Object.entries(spec.env).filter(([key, value]) => key.trim() !== "" && value !== "").map(([key, value]) => ` <key>${escapeXmlText(key)}</key>\n <string>${escapeXmlText(sanitizeLaunchdEnvironmentValue(value))}</string>`).join("\n");
31145
31144
  return `<?xml version="1.0" encoding="UTF-8"?>
31146
31145
  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@@ -39032,7 +39031,7 @@ function buildDaemonSystemServiceCommandSpec(input) {
39032
39031
  [DAEMON_SERVICE_RUNTIME_CONTROLLER_ENV]: input.controller,
39033
39032
  [DAEMON_SERVICE_RUNTIME_AUTO_START_ENV]: "1"
39034
39033
  },
39035
- workingDirectory: process$1.cwd()
39034
+ workingDirectory: daemonRuntimeRootPath()
39036
39035
  };
39037
39036
  }
39038
39037
  function buildSystemServiceEnvironment() {