@3-/srv-win32 0.1.20 → 0.1.22
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 +1 -61
- package/install.js +16 -2
- package/package.json +2 -1
- package/schtasks.xml +43 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,67 +1,7 @@
|
|
|
1
1
|
# @3-/srv-win32
|
|
2
2
|
|
|
3
|
-
## 0.1.
|
|
3
|
+
## 0.1.22
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- auto update
|
|
8
|
-
|
|
9
|
-
## 0.1.19
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
- auto update
|
|
14
|
-
|
|
15
|
-
## 0.1.18
|
|
16
|
-
|
|
17
|
-
### Patch Changes
|
|
18
|
-
|
|
19
|
-
- auto update
|
|
20
|
-
|
|
21
|
-
## 0.1.17
|
|
22
|
-
|
|
23
|
-
### Patch Changes
|
|
24
|
-
|
|
25
|
-
- auto update
|
|
26
|
-
|
|
27
|
-
## 0.1.16
|
|
28
|
-
|
|
29
|
-
### Patch Changes
|
|
30
|
-
|
|
31
|
-
- auto update
|
|
32
|
-
|
|
33
|
-
## 0.1.15
|
|
34
|
-
|
|
35
|
-
### Patch Changes
|
|
36
|
-
|
|
37
|
-
- auto update
|
|
38
|
-
|
|
39
|
-
## 0.1.14
|
|
40
|
-
|
|
41
|
-
### Patch Changes
|
|
42
|
-
|
|
43
|
-
- auto update
|
|
44
|
-
|
|
45
|
-
## 0.1.13
|
|
46
|
-
|
|
47
|
-
### Patch Changes
|
|
48
|
-
|
|
49
|
-
- auto update
|
|
50
|
-
|
|
51
|
-
## 0.1.12
|
|
52
|
-
|
|
53
|
-
### Patch Changes
|
|
54
|
-
|
|
55
|
-
- auto update
|
|
56
|
-
|
|
57
|
-
## 0.1.11
|
|
58
|
-
|
|
59
|
-
### Patch Changes
|
|
60
|
-
|
|
61
|
-
- auto update
|
|
62
|
-
|
|
63
|
-
## 0.1.10
|
|
64
|
-
|
|
65
|
-
### Patch Changes
|
|
66
|
-
|
|
67
|
-
- 初始化 changesets 工作流
|
package/install.js
CHANGED
|
@@ -1,12 +1,26 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { tmpdir } from "node:os";
|
|
3
|
+
import { unlinkSync, readFileSync, writeFileSync } from "node:fs";
|
|
1
4
|
import { $ } from "./init.js";
|
|
5
|
+
import gen from "@3-/obj_replace/gen.js";
|
|
2
6
|
|
|
3
7
|
export default async (name, exec_path, args) => {
|
|
4
8
|
try {
|
|
5
9
|
await $`schtasks /End /TN ${name}`;
|
|
6
10
|
} catch (e) {}
|
|
7
11
|
|
|
8
|
-
const
|
|
9
|
-
|
|
12
|
+
const xml_path = join(tmpdir(), `${name}.xml`);
|
|
13
|
+
|
|
14
|
+
gen(
|
|
15
|
+
{ name, execPath: exec_path, scriptPath: args },
|
|
16
|
+
join(import.meta.dirname, "schtasks.xml"),
|
|
17
|
+
xml_path
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
writeFileSync(xml_path, "\uFEFF" + readFileSync(xml_path, "utf8"), "utf16le");
|
|
21
|
+
|
|
22
|
+
await $([`schtasks /Create /F /TN ${name} /XML "${xml_path}"`]);
|
|
23
|
+
unlinkSync(xml_path);
|
|
10
24
|
|
|
11
25
|
await $`schtasks /Run /TN ${name}`;
|
|
12
26
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@3-/srv-win32",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"os": [
|
|
5
5
|
"win32"
|
|
6
6
|
],
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"./uninstall.js": "./uninstall.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
+
"@3-/obj_replace": "^0.1.0",
|
|
13
14
|
"zx": "^8.8.5"
|
|
14
15
|
},
|
|
15
16
|
"repository": "https://github.com/i18n-site/lib/tree/dev",
|
package/schtasks.xml
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-16"?>
|
|
2
|
+
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
|
|
3
|
+
<Principals>
|
|
4
|
+
<Principal id="Author">
|
|
5
|
+
<LogonType>InteractiveToken</LogonType>
|
|
6
|
+
<RunLevel>HighestAvailable</RunLevel>
|
|
7
|
+
</Principal>
|
|
8
|
+
</Principals>
|
|
9
|
+
<Triggers>
|
|
10
|
+
<LogonTrigger>
|
|
11
|
+
<Enabled>true</Enabled>
|
|
12
|
+
</LogonTrigger>
|
|
13
|
+
</Triggers>
|
|
14
|
+
<Settings>
|
|
15
|
+
<MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
|
|
16
|
+
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
|
|
17
|
+
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
|
|
18
|
+
<AllowHardTerminate>true</AllowHardTerminate>
|
|
19
|
+
<StartWhenAvailable>false</StartWhenAvailable>
|
|
20
|
+
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
|
|
21
|
+
<IdleSettings>
|
|
22
|
+
<StopOnIdleEnd>true</StopOnIdleEnd>
|
|
23
|
+
<RestartOnIdle>false</RestartOnIdle>
|
|
24
|
+
</IdleSettings>
|
|
25
|
+
<AllowStartOnDemand>true</AllowStartOnDemand>
|
|
26
|
+
<Enabled>true</Enabled>
|
|
27
|
+
<Hidden>false</Hidden>
|
|
28
|
+
<RunOnlyIfIdle>false</RunOnlyIfIdle>
|
|
29
|
+
<WakeToRun>false</WakeToRun>
|
|
30
|
+
<ExecutionTimeLimit>PT0S</ExecutionTimeLimit>
|
|
31
|
+
<Priority>7</Priority>
|
|
32
|
+
<RestartOnFailure>
|
|
33
|
+
<Interval>PT1M</Interval>
|
|
34
|
+
<Count>999</Count>
|
|
35
|
+
</RestartOnFailure>
|
|
36
|
+
</Settings>
|
|
37
|
+
<Actions Context="Author">
|
|
38
|
+
<Exec>
|
|
39
|
+
<Command>$execPath</Command>
|
|
40
|
+
<Arguments>"$scriptPath" run</Arguments>
|
|
41
|
+
</Exec>
|
|
42
|
+
</Actions>
|
|
43
|
+
</Task>
|