la-machina-engine 0.7.9 → 0.7.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/dist/index.cjs +6 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2146,6 +2146,7 @@ function probeSpawnFromProcess(proc) {
|
|
|
2146
2146
|
return false;
|
|
2147
2147
|
}
|
|
2148
2148
|
function probeSpawn() {
|
|
2149
|
+
if (isCloudflareWorkers()) return false;
|
|
2149
2150
|
if (typeof globalThis.process === "undefined" || globalThis.process.versions == null || typeof globalThis.process.versions.node !== "string") {
|
|
2150
2151
|
return false;
|
|
2151
2152
|
}
|
|
@@ -2159,6 +2160,11 @@ function probeSpawn() {
|
|
|
2159
2160
|
}
|
|
2160
2161
|
return probeSpawnFromProcess(globalThis.process);
|
|
2161
2162
|
}
|
|
2163
|
+
function isCloudflareWorkers() {
|
|
2164
|
+
const nav = globalThis.navigator;
|
|
2165
|
+
const ua = typeof nav?.userAgent === "string" ? nav.userAgent : "";
|
|
2166
|
+
return ua.includes("Cloudflare-Workers");
|
|
2167
|
+
}
|
|
2162
2168
|
function hasProcessLifecycle() {
|
|
2163
2169
|
return typeof process !== "undefined" && typeof process.on === "function" && typeof process.removeListener === "function" && canSpawnProcesses();
|
|
2164
2170
|
}
|