just-bash 2.9.7 → 2.10.0
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/README.md +25 -0
- package/dist/Bash.d.ts +4 -0
- package/dist/bin/chunks/worker.js +8 -4
- package/dist/bin/just-bash.js +264 -243
- package/dist/bin/shell/shell.js +217 -196
- package/dist/bundle/browser.js +739 -718
- package/dist/bundle/chunks/worker.js +8 -4
- package/dist/bundle/index.js +222 -201
- package/dist/index.d.ts +9 -0
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -6,6 +6,8 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
// src/commands/python3/worker.ts
|
|
9
|
+
import { createRequire } from "node:module";
|
|
10
|
+
import { dirname } from "node:path";
|
|
9
11
|
import { parentPort, workerData } from "node:worker_threads";
|
|
10
12
|
import { loadPyodide } from "pyodide";
|
|
11
13
|
|
|
@@ -208,9 +210,9 @@ var IS_BROWSER = typeof __BROWSER__ !== "undefined" && __BROWSER__;
|
|
|
208
210
|
var AsyncLocalStorageClass = null;
|
|
209
211
|
if (!IS_BROWSER) {
|
|
210
212
|
try {
|
|
211
|
-
const { createRequire } = await import("node:module");
|
|
212
|
-
const
|
|
213
|
-
const asyncHooks =
|
|
213
|
+
const { createRequire: createRequire2 } = await import("node:module");
|
|
214
|
+
const require3 = createRequire2(import.meta.url);
|
|
215
|
+
const asyncHooks = require3("node:async_hooks");
|
|
214
216
|
AsyncLocalStorageClass = asyncHooks.AsyncLocalStorage;
|
|
215
217
|
} catch (e) {
|
|
216
218
|
console.debug(
|
|
@@ -1314,6 +1316,8 @@ var SyncFsBackend = class {
|
|
|
1314
1316
|
// src/commands/python3/worker.ts
|
|
1315
1317
|
var pyodideInstance = null;
|
|
1316
1318
|
var pyodideLoading = null;
|
|
1319
|
+
var require2 = createRequire(import.meta.url);
|
|
1320
|
+
var pyodideIndexURL = `${dirname(require2.resolve("pyodide/pyodide.mjs"))}/`;
|
|
1317
1321
|
async function getPyodide() {
|
|
1318
1322
|
if (pyodideInstance) {
|
|
1319
1323
|
return pyodideInstance;
|
|
@@ -1321,7 +1325,7 @@ async function getPyodide() {
|
|
|
1321
1325
|
if (pyodideLoading) {
|
|
1322
1326
|
return pyodideLoading;
|
|
1323
1327
|
}
|
|
1324
|
-
pyodideLoading = loadPyodide();
|
|
1328
|
+
pyodideLoading = loadPyodide({ indexURL: pyodideIndexURL });
|
|
1325
1329
|
pyodideInstance = await pyodideLoading;
|
|
1326
1330
|
return pyodideInstance;
|
|
1327
1331
|
}
|