sloppycode 0.2.148 → 0.2.149
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/android-runtime/arm64/bin/slopcode +0 -0
- package/android-runtime/arm64/bin/slopcode-android-host +0 -0
- package/android-runtime/x64/bin/slopcode +0 -0
- package/android-runtime/x64/bin/slopcode-android-host +0 -0
- package/bin/slopcode +22 -10
- package/bundle/index.js +2 -2
- package/bundle/worker.js +2 -2
- package/package.json +12 -12
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/slopcode
CHANGED
|
@@ -19,17 +19,29 @@ function startupLog(phase, extra = {}) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function run(target, options = {}) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
const maxRetries = 3
|
|
23
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
24
|
+
startupLog("launcher.exec", { target: path.basename(target), attempt })
|
|
25
|
+
const result = childProcess.spawnSync(target, options.args || process.argv.slice(2), {
|
|
26
|
+
stdio: "inherit",
|
|
27
|
+
env: options.env ? { ...process.env, ...options.env } : process.env,
|
|
28
|
+
})
|
|
29
|
+
if (result.error) {
|
|
30
|
+
console.error(result.error.message)
|
|
31
|
+
process.exit(1)
|
|
32
|
+
}
|
|
33
|
+
if (result.signal === "SIGABRT" && attempt < maxRetries) {
|
|
34
|
+
console.error(`slopcode crashed (SIGABRT), retrying (${attempt + 1}/${maxRetries})...`)
|
|
35
|
+
continue
|
|
36
|
+
}
|
|
37
|
+
if (result.signal) {
|
|
38
|
+
try {
|
|
39
|
+
process.kill(process.pid, result.signal)
|
|
40
|
+
} catch {}
|
|
41
|
+
}
|
|
42
|
+
const code = typeof result.status === "number" ? result.status : 1
|
|
43
|
+
process.exit(code)
|
|
30
44
|
}
|
|
31
|
-
const code = typeof result.status === "number" ? result.status : 0
|
|
32
|
-
process.exit(code)
|
|
33
45
|
}
|
|
34
46
|
|
|
35
47
|
const envPath = process.env.SLOPCODE_BIN_PATH
|