@deslop/scope 0.1.1223 → 0.1.1227

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.
Files changed (2) hide show
  1. package/dist/server.js +7 -4
  2. package/package.json +2 -2
package/dist/server.js CHANGED
@@ -86293,7 +86293,7 @@ function layerKeyValueStore(directory) {
86293
86293
  unwrap$7(map$5(dataDirectory, layerKeyValueStore));
86294
86294
  const layerProtocol = mergeAll$1(layerSchemaBinary(), succeed$6(MaxBodySize)(mebibytes(10)));
86295
86295
  const layerTelemetry = unwrap$7(gen(function* () {
86296
- const name = yield* appName;
86296
+ const name = (yield* packageMetadata).name;
86297
86297
  return match$8(yield* option(String$5("OTEL_URL")), {
86298
86298
  onNone: () => empty$10,
86299
86299
  onSome: (url) => layerOtlp(`${name}-server`, url, "server")
@@ -86439,17 +86439,20 @@ function systemctl(...args) {
86439
86439
  const unitDirectory = gen(function* () {
86440
86440
  return (yield* Path$1).join(yield* String$5("HOME"), ".config", "systemd", "user");
86441
86441
  });
86442
- const install = fnUntraced(function* (name, command) {
86442
+ const install = fnUntraced(function* (name, command, options) {
86443
86443
  const fs = yield* FileSystem;
86444
86444
  const path = yield* Path$1;
86445
86445
  const home = yield* String$5("HOME");
86446
86446
  const directory = yield* unitDirectory;
86447
86447
  const unit = `deslop-${name}.service`;
86448
86448
  yield* fs.makeDirectory(directory, { recursive: true });
86449
- yield* fs.writeFileString(path.join(directory, unit), `[Unit]\nDescription=Deslop ${name}\nAfter=network-online.target\n\n[Service]\nType=simple\nEnvironment=NODE_ENV=production\nEnvironment=${systemdArgument(`PATH=${home}/.vite-plus/bin:/usr/local/bin:/usr/bin:/bin`)}\nEnvironmentFile=-${systemdArgument(`${home}/.deslop/${name}.env`)}\nExecStart=${join$2(map$8(command, systemdArgument), " ")}\nRestart=on-failure\nRestartSec=3\nUMask=0077\n\n[Install]\nWantedBy=default.target\n`, { mode: 384 });
86449
+ yield* fs.writeFileString(path.join(directory, unit), `[Unit]\nDescription=Deslop ${name}\nAfter=network-online.target\n\n[Service]\nType=simple\nEnvironment=NODE_ENV=production\nEnvironment=${systemdArgument(`PATH=${home}/.vite-plus/bin:/usr/local/bin:/usr/bin:/bin`)}\nEnvironmentFile=-${replaceAll("%", "%%")(`${home}/.deslop/${name}.env`)}\nExecStart=${join$2(map$8(command, systemdArgument), " ")}\nRestart=on-failure\nRestartSec=3\nUMask=0077\n\n[Install]\nWantedBy=default.target\n`, { mode: 384 });
86450
86450
  yield* systemctl("daemon-reload");
86451
86451
  yield* systemctl("enable", unit);
86452
- yield* systemctl("restart", unit);
86452
+ yield* systemctl(match$1(options?.restart === false, {
86453
+ onFalse: () => "restart",
86454
+ onTrue: () => "start"
86455
+ }), unit);
86453
86456
  return `${unit} installed\n`;
86454
86457
  });
86455
86458
  const installUpdates = fnUntraced(function* (name, command) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deslop/scope",
3
- "version": "0.1.1223",
3
+ "version": "0.1.1227",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/MP281X/deslop",
@@ -31,5 +31,5 @@
31
31
  "engines": {
32
32
  "node": ">=26"
33
33
  },
34
- "fingerprint": "9ca31803c8c95cd5b8e0e26078bcc5a1cc5c4201c91111e2942ca39fe508cac1"
34
+ "fingerprint": "f9689b8b84b7a0a2be75924eef22d9c79970ed10060bf792c678eaac3d9940af"
35
35
  }