@ricsam/r5d-worker 0.0.9 → 0.0.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/cjs/main.cjs +7 -1
- package/dist/cjs/package.json +1 -1
- package/dist/mjs/main.mjs +7 -1
- package/dist/mjs/package.json +1 -1
- package/package.json +1 -1
package/dist/cjs/main.cjs
CHANGED
|
@@ -1910,7 +1910,13 @@ async function main() {
|
|
|
1910
1910
|
}
|
|
1911
1911
|
await startWorker(parsed.options);
|
|
1912
1912
|
}
|
|
1913
|
-
|
|
1913
|
+
function isCliEntrypoint() {
|
|
1914
|
+
if (import_meta.main) {
|
|
1915
|
+
return true;
|
|
1916
|
+
}
|
|
1917
|
+
return typeof require === "function" && typeof module !== "undefined" && require.main === module;
|
|
1918
|
+
}
|
|
1919
|
+
if (isCliEntrypoint()) {
|
|
1914
1920
|
main().catch((error) => {
|
|
1915
1921
|
process.stderr.write(`[r5d-worker] ${error instanceof Error ? error.message : String(error)}
|
|
1916
1922
|
`);
|
package/dist/cjs/package.json
CHANGED
package/dist/mjs/main.mjs
CHANGED
|
@@ -1876,7 +1876,13 @@ async function main() {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
await startWorker(parsed.options);
|
|
1878
1878
|
}
|
|
1879
|
-
|
|
1879
|
+
function isCliEntrypoint() {
|
|
1880
|
+
if (import.meta.main) {
|
|
1881
|
+
return true;
|
|
1882
|
+
}
|
|
1883
|
+
return typeof require === "function" && typeof module !== "undefined" && require.main === module;
|
|
1884
|
+
}
|
|
1885
|
+
if (isCliEntrypoint()) {
|
|
1880
1886
|
main().catch((error) => {
|
|
1881
1887
|
process.stderr.write(`[r5d-worker] ${error instanceof Error ? error.message : String(error)}
|
|
1882
1888
|
`);
|
package/dist/mjs/package.json
CHANGED