@3-/srv-darwin 0.1.9 → 0.1.10

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/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @3-/srv-darwin
2
+
3
+ ## 0.1.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 初始化 changesets 工作流
package/init.js ADDED
@@ -0,0 +1,6 @@
1
+ import { $ } from "zx";
2
+
3
+ $.verbose = true;
4
+ $.shell = "bash";
5
+
6
+ export { $ };
package/install.js CHANGED
@@ -1,7 +1,6 @@
1
- import fs from "fs/promises";
2
1
  import { homedir } from "os";
3
2
  import { join } from "path";
4
- import { $ } from "zx";
3
+ import { $ } from "./init.js";
5
4
  import gen from "@3-/srv-obj-replace/gen.js";
6
5
 
7
6
  export default async ({ name, scriptPath: script_path }) => {
@@ -13,12 +12,11 @@ export default async ({ name, scriptPath: script_path }) => {
13
12
  out_log = join(logs_dir, `${name}.log`),
14
13
  err_log = join(logs_dir, `${name}.err.log`);
15
14
 
16
- await fs.mkdir(launch_agents_dir, { recursive: true });
17
- await gen(
15
+ gen(
18
16
  { name, execPath: exec_path, scriptPath: script_path, outLog: out_log, errLog: err_log },
19
17
  join(import.meta.dirname, "launchd.xml"),
20
18
  plist_path
21
19
  );
22
- await $`launchctl bootout gui/$(id -u) ${plist_path} || true`;
23
- await $`launchctl bootstrap gui/$(id -u) ${plist_path}`;
20
+ await $`launchctl bootout user/$(id -u) ${plist_path} || true`;
21
+ await $`launchctl bootstrap user/$(id -u) ${plist_path}`;
24
22
  };
package/launchd.xml CHANGED
@@ -18,5 +18,7 @@
18
18
  <string>$outLog</string>
19
19
  <key>StandardErrorPath</key>
20
20
  <string>$errLog</string>
21
+ <key>LimitLoadToSessionType</key>
22
+ <string>Background</string>
21
23
  </dict>
22
24
  </plist>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3-/srv-darwin",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "os": [
5
5
  "darwin"
6
6
  ],
@@ -10,7 +10,7 @@
10
10
  "./uninstall.js": "./uninstall.js"
11
11
  },
12
12
  "dependencies": {
13
- "@3-/srv-obj-replace": "file:../obj_replace",
13
+ "@3-/srv-obj-replace": "^0.1.11",
14
14
  "zx": "^8.8.5"
15
15
  },
16
16
  "repository": "https://github.com/i18n-site/lib/tree/dev",
package/uninstall.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import fs from "fs/promises";
2
2
  import { homedir } from "os";
3
3
  import { join } from "path";
4
- import { $ } from "zx";
4
+ import { $ } from "./init.js";
5
5
 
6
6
  export default async ({ name }) => {
7
7
  const home_dir = homedir(),
8
8
  launch_agents_dir = join(home_dir, "Library", "LaunchAgents"),
9
9
  plist_path = join(launch_agents_dir, `${name}.plist`);
10
10
 
11
- await $`launchctl bootout gui/$(id -u) ${plist_path} || true`;
11
+ await $`launchctl bootout user/$(id -u) ${plist_path} || true`;
12
12
  await fs.rm(plist_path, { force: true });
13
13
  };