@weborigami/origami 0.0.65-beta.1 → 0.0.65
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/package.json +4 -4
- package/src/builtins/@copy.js +3 -2
- package/src/builtins/@mdHtml.js +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weborigami/origami",
|
|
3
|
-
"version": "0.0.65
|
|
3
|
+
"version": "0.0.65",
|
|
4
4
|
"description": "Web Origami language, CLI, framework, and server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"typescript": "5.5.4"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@weborigami/async-tree": "
|
|
21
|
-
"@weborigami/language": "
|
|
22
|
-
"@weborigami/types": "0.0.65
|
|
20
|
+
"@weborigami/async-tree": "0.0.65",
|
|
21
|
+
"@weborigami/language": "0.0.65",
|
|
22
|
+
"@weborigami/types": "0.0.65",
|
|
23
23
|
"exif-parser": "0.1.12",
|
|
24
24
|
"graphviz-wasm": "3.0.2",
|
|
25
25
|
"highlight.js": "11.10.0",
|
package/src/builtins/@copy.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Tree } from "@weborigami/async-tree";
|
|
2
|
+
import { formatError } from "@weborigami/language";
|
|
2
3
|
import process, { stdout } from "node:process";
|
|
3
4
|
import { transformObject } from "../common/utilities.js";
|
|
4
5
|
import assertTreeIsDefined from "../misc/assertTreeIsDefined.js";
|
|
@@ -52,8 +53,8 @@ function ProgressTransform(Base) {
|
|
|
52
53
|
try {
|
|
53
54
|
result = await super.set(...args);
|
|
54
55
|
countCopied++;
|
|
55
|
-
} catch (
|
|
56
|
-
console.error(
|
|
56
|
+
} catch (/** @type {any} */ error) {
|
|
57
|
+
console.error(formatError(error));
|
|
57
58
|
}
|
|
58
59
|
copyRoot.showProgress();
|
|
59
60
|
return result;
|
package/src/builtins/@mdHtml.js
CHANGED
|
@@ -38,6 +38,11 @@ marked.use(
|
|
|
38
38
|
* @param {StringLike|UnpackableStringlike} input
|
|
39
39
|
*/
|
|
40
40
|
export default async function mdHtml(input) {
|
|
41
|
+
if (!input) {
|
|
42
|
+
const error = new TypeError("@mdHtml: The input is not defined.");
|
|
43
|
+
/** @type {any} */ (error).position = 0;
|
|
44
|
+
throw error;
|
|
45
|
+
}
|
|
41
46
|
if (isUnpackable(input)) {
|
|
42
47
|
input = await input.unpack();
|
|
43
48
|
}
|