@motionharness/cli 0.0.17 → 0.0.19
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/bin/mh +5 -0
- package/package.json +13 -5
package/bin/mh
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { spawn } from 'node:child_process';
|
|
3
|
+
import { accessSync, constants, statSync } from 'node:fs';
|
|
3
4
|
import { mkdtemp, readFile, copyFile, rm } from 'node:fs/promises';
|
|
4
5
|
import { dirname, join } from 'node:path';
|
|
5
6
|
import { tmpdir } from 'node:os';
|
|
@@ -29,6 +30,10 @@ try {
|
|
|
29
30
|
delete env.MH_WINDOWS_UPDATE_REQUEST;
|
|
30
31
|
if(process.platform!=='win32') {
|
|
31
32
|
if(typeof process.execve!=='function') throw new Error('This Node.js version has no process.execve(). Use Node.js 22.15+ or a supported LTS release.');
|
|
33
|
+
// Reject incomplete installations before replacing the launcher process.
|
|
34
|
+
// Some Node releases abort rather than throw when execve cannot open a file.
|
|
35
|
+
if(!statSync(binary).isFile()) throw new Error(`Cannot start platform binary: ${binary} is not a file`);
|
|
36
|
+
accessSync(binary,constants.X_OK);
|
|
32
37
|
process.execve(binary,[binary,...args],env);
|
|
33
38
|
} else {
|
|
34
39
|
env.MH_WINDOWS_WRAPPER_PID=String(process.pid);
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
2
|
+
"version": "0.0.19",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
@@ -15,13 +15,16 @@
|
|
|
15
15
|
"mh": "bin/mh"
|
|
16
16
|
},
|
|
17
17
|
"os": [
|
|
18
|
-
"darwin"
|
|
18
|
+
"darwin",
|
|
19
|
+
"win32"
|
|
19
20
|
],
|
|
20
21
|
"cpu": [
|
|
21
|
-
"arm64"
|
|
22
|
+
"arm64",
|
|
23
|
+
"x64"
|
|
22
24
|
],
|
|
23
25
|
"optionalDependencies": {
|
|
24
|
-
"@motionharness/cli-darwin-arm64": "0.0.
|
|
26
|
+
"@motionharness/cli-darwin-arm64": "0.0.19",
|
|
27
|
+
"@motionharness/cli-win32-x64": "0.0.19"
|
|
25
28
|
},
|
|
26
29
|
"files": [
|
|
27
30
|
"bin/mh",
|
|
@@ -29,5 +32,10 @@
|
|
|
29
32
|
"bin/windows-update.mjs",
|
|
30
33
|
"README.md",
|
|
31
34
|
"LICENSE"
|
|
32
|
-
]
|
|
35
|
+
],
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/VibeMG/vibe-motion-graphics.git",
|
|
39
|
+
"directory": "products/cli"
|
|
40
|
+
}
|
|
33
41
|
}
|