@3-/srv-win32 0.1.9 → 0.1.11

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,13 @@
1
+ # @3-/srv-win32
2
+
3
+ ## 0.1.11
4
+
5
+ ### Patch Changes
6
+
7
+ - auto update
8
+
9
+ ## 0.1.10
10
+
11
+ ### Patch Changes
12
+
13
+ - 初始化 changesets 工作流
package/init.js ADDED
@@ -0,0 +1,7 @@
1
+ import { $ } from "zx";
2
+
3
+ $.verbose = true;
4
+ $.shell = process.env.ComSpec || "cmd.exe";
5
+ $.prefix = "";
6
+
7
+ export { $ };
package/install.js CHANGED
@@ -1,14 +1,11 @@
1
- import { $ } from "zx";
2
-
3
- process.env.MSYS_NO_PATHCONV = "1";
1
+ import { $ } from "./init.js";
4
2
 
5
3
  export default async ({ name, scriptPath: script_path }) => {
6
- const { execPath: exec_path } = process;
7
4
  try {
8
5
  await $`schtasks /End /TN ${name}`;
9
6
  } catch (e) {}
10
7
 
11
- const cmd = `schtasks /Create /F /TN ${name} /TR "\\"${exec_path}\\" \\"${script_path}\\" run" /SC ONLOGON /RL HIGHEST`;
8
+ const cmd = `schtasks /Create /F /TN ${name} /TR "\\"${process.execPath}\\" \\"${script_path}\\" run" /SC ONLOGON`;
12
9
  await $([cmd]);
13
10
 
14
11
  await $`schtasks /Run /TN ${name}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3-/srv-win32",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "os": [
5
5
  "win32"
6
6
  ],
package/uninstall.js CHANGED
@@ -1,8 +1,6 @@
1
- import { $ } from "zx";
2
-
3
- process.env.MSYS_NO_PATHCONV = "1";
1
+ import { $ } from "./init.js";
4
2
 
5
3
  export default async ({ name }) => {
6
- await $`schtasks /End /TN ${name} || true`;
7
- await $`schtasks /Delete /TN ${name} /F || true`;
4
+ try { await $`schtasks /End /TN ${name}`; } catch (e) {}
5
+ try { await $`schtasks /Delete /TN ${name} /F`; } catch (e) {}
8
6
  };