hyperbook 0.95.0 → 0.95.1
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.
|
@@ -1776,22 +1776,31 @@ hyperbook.python = (function () {
|
|
|
1776
1776
|
}
|
|
1777
1777
|
}
|
|
1778
1778
|
|
|
1779
|
+
let lastStdinPrompt = "";
|
|
1780
|
+
pyodide.setStdout({
|
|
1781
|
+
write: (msg) => {
|
|
1782
|
+
const text = typeof msg === "string" ? msg : decoder.decode(msg);
|
|
1783
|
+
if (text.endsWith("\n")) {
|
|
1784
|
+
lastStdinPrompt = "";
|
|
1785
|
+
} else {
|
|
1786
|
+
lastStdinPrompt += text;
|
|
1787
|
+
}
|
|
1788
|
+
appendOutputLine(id, text);
|
|
1789
|
+
return msg?.length ?? text.length;
|
|
1790
|
+
},
|
|
1791
|
+
});
|
|
1779
1792
|
pyodide.setStdin({
|
|
1780
1793
|
stdin: () => {
|
|
1781
|
-
const
|
|
1794
|
+
const promptText =
|
|
1795
|
+
lastStdinPrompt || hyperbook.i18n.get("pyide-input-prompt");
|
|
1796
|
+
lastStdinPrompt = "";
|
|
1797
|
+
const value = window.prompt(promptText);
|
|
1782
1798
|
if (value === null) {
|
|
1783
1799
|
return "";
|
|
1784
1800
|
}
|
|
1785
1801
|
return value;
|
|
1786
1802
|
},
|
|
1787
1803
|
});
|
|
1788
|
-
pyodide.setStdout({
|
|
1789
|
-
write: (msg) => {
|
|
1790
|
-
const text = typeof msg === "string" ? msg : decoder.decode(msg);
|
|
1791
|
-
appendOutputLine(id, text);
|
|
1792
|
-
return msg?.length ?? text.length;
|
|
1793
|
-
},
|
|
1794
|
-
});
|
|
1795
1804
|
pyodide.setStderr({
|
|
1796
1805
|
write: (msg) => {
|
|
1797
1806
|
const text = typeof msg === "string" ? msg : decoder.decode(msg);
|
package/dist/index.js
CHANGED
|
@@ -202119,7 +202119,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"application/1d-interleaved-parityfec
|
|
|
202119
202119
|
/***/ ((module) => {
|
|
202120
202120
|
|
|
202121
202121
|
"use strict";
|
|
202122
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"hyperbook","version":"0.95.
|
|
202122
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"hyperbook","version":"0.95.1","author":"Mike Barkmin","homepage":"https://github.com/openpatch/hyperbook#readme","license":"MIT","bin":{"hyperbook":"./dist/index.js"},"files":["dist"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/openpatch/hyperbook.git","directory":"packages/hyperbook"},"bugs":{"url":"https://github.com/openpatch/hyperbook/issues"},"engines":{"node":">=18"},"scripts":{"version":"pnpm build","lint":"tsc --noEmit","dev":"ncc build ./index.ts -w -o dist/","build":"rimraf dist && ncc build ./index.ts -o ./dist/ --no-cache --no-source-map-register --external favicons --external sharp && node postbuild.mjs"},"dependencies":{"favicons":"^7.2.0"},"devDependencies":{"create-hyperbook":"workspace:*","@hyperbook/fs":"workspace:*","@hyperbook/markdown":"workspace:*","@hyperbook/types":"workspace:*","@pnpm/exportable-manifest":"1000.0.6","@types/archiver":"6.0.3","@types/async-retry":"1.4.9","@types/cross-spawn":"6.0.6","@types/lunr":"^2.3.7","@types/prompts":"2.4.9","@types/tar":"6.1.13","@types/ws":"^8.5.14","@vercel/ncc":"0.38.3","archiver":"7.0.1","async-retry":"1.3.3","chalk":"5.4.1","chokidar":"4.0.3","commander":"12.1.0","cpy":"11.1.0","cross-spawn":"7.0.6","domutils":"^3.2.2","extract-zip":"^2.0.1","got":"12.6.0","htmlparser2":"^10.0.0","lunr":"^2.3.9","lunr-languages":"^1.14.0","mime":"^4.0.6","prompts":"2.4.2","rimraf":"6.0.1","tar":"7.4.3","update-check":"1.5.4","ws":"^8.18.0"}}');
|
|
202123
202123
|
|
|
202124
202124
|
/***/ })
|
|
202125
202125
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hyperbook",
|
|
3
|
-
"version": "0.95.
|
|
3
|
+
"version": "0.95.1",
|
|
4
4
|
"author": "Mike Barkmin",
|
|
5
5
|
"homepage": "https://github.com/openpatch/hyperbook#readme",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"tar": "7.4.3",
|
|
57
57
|
"update-check": "1.5.4",
|
|
58
58
|
"ws": "^8.18.0",
|
|
59
|
-
"create-hyperbook": "0.3.6",
|
|
60
59
|
"@hyperbook/fs": "0.25.0",
|
|
61
|
-
"
|
|
62
|
-
"@hyperbook/markdown": "0.66.
|
|
60
|
+
"create-hyperbook": "0.3.6",
|
|
61
|
+
"@hyperbook/markdown": "0.66.1",
|
|
62
|
+
"@hyperbook/types": "0.23.0"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"version": "pnpm build",
|