@weborigami/origami 0.0.35 → 0.0.37
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 +6 -6
- package/src/builtins/@arrows.js +1 -1
- package/src/builtins/@builtins.js +1 -1
- package/src/builtins/@cache.js +1 -2
- package/src/builtins/@config.js +1 -1
- package/src/builtins/@copy.js +1 -1
- package/src/builtins/@crawl.js +26 -6
- package/src/builtins/@debug.js +1 -1
- package/src/builtins/@equals.js +1 -1
- package/src/builtins/@explore.js +1 -1
- package/src/builtins/@files.js +1 -1
- package/src/builtins/@filter.js +1 -1
- package/src/builtins/@globs.js +1 -1
- package/src/builtins/@help.js +7 -7
- package/src/builtins/@http.js +1 -1
- package/src/builtins/@https.js +1 -1
- package/src/builtins/@if.js +1 -1
- package/src/builtins/@index.js +1 -1
- package/src/builtins/@inherited.js +1 -1
- package/src/builtins/@inline.js +1 -1
- package/src/builtins/@js.js +1 -1
- package/src/builtins/@json.js +1 -1
- package/src/builtins/@match.js +1 -1
- package/src/builtins/@mdHtml.js +1 -1
- package/src/builtins/@new.js +1 -1
- package/src/builtins/@node.js +1 -1
- package/src/builtins/@not.js +1 -1
- package/src/builtins/@or.js +1 -1
- package/src/builtins/@ori.js +1 -1
- package/src/builtins/@parse/json.js +1 -2
- package/src/builtins/@parse/yaml.js +1 -2
- package/src/builtins/@project.js +1 -1
- package/src/builtins/@repeat.js +1 -1
- package/src/builtins/@rss.js +1 -1
- package/src/builtins/@scope/extend.js +1 -1
- package/src/builtins/@scope/get.js +1 -1
- package/src/builtins/@scope/invoke.js +1 -1
- package/src/builtins/@scope/set.js +1 -1
- package/src/builtins/@serve.js +1 -1
- package/src/builtins/@shell.js +1 -1
- package/src/builtins/@stdin.js +1 -1
- package/src/builtins/@svg.js +1 -1
- package/src/builtins/@tree/concat.js +1 -1
- package/src/builtins/@tree/count.js +1 -1
- package/src/builtins/@tree/dot.js +1 -1
- package/src/builtins/@tree/exceptions.js +1 -1
- package/src/builtins/@tree/first.js +1 -1
- package/src/builtins/@tree/flowSvg.js +1 -1
- package/src/builtins/@tree/fn.js +1 -1
- package/src/builtins/@tree/from.js +1 -1
- package/src/builtins/@tree/fromJson.js +1 -1
- package/src/builtins/@tree/fromYaml.js +1 -1
- package/src/builtins/@tree/groupBy.js +1 -1
- package/src/builtins/@tree/inners.js +1 -1
- package/src/builtins/@tree/isAsyncTree.js +1 -1
- package/src/builtins/@tree/keys.js +1 -1
- package/src/builtins/@tree/merge.js +1 -1
- package/src/builtins/@tree/mergeDeep.js +1 -1
- package/src/builtins/@tree/nextKey.js +1 -1
- package/src/builtins/@tree/parent.js +1 -1
- package/src/builtins/@tree/plain.js +1 -1
- package/src/builtins/@tree/previousKey.js +1 -1
- package/src/builtins/@tree/reverse.js +1 -1
- package/src/builtins/@tree/setDeep.js +1 -1
- package/src/builtins/@tree/shuffle.js +1 -1
- package/src/builtins/@tree/sitemap.js +1 -1
- package/src/builtins/@tree/sort.js +1 -1
- package/src/builtins/@tree/sortBy.js +1 -2
- package/src/builtins/@tree/static.js +1 -1
- package/src/builtins/@tree/table.js +1 -1
- package/src/builtins/@tree/take.js +1 -1
- package/src/builtins/@tree/values.js +1 -1
- package/src/builtins/@tree/valuesDeep.js +1 -1
- package/src/builtins/@treeHttp.js +1 -1
- package/src/builtins/@treeHttps.js +1 -1
- package/src/builtins/@watch.js +1 -1
- package/src/builtins/@yaml.js +1 -1
- package/src/misc/explore.orit +2 -2
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weborigami/origami",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.37",
|
|
4
|
+
"description": "Web Origami language, CLI, framework, and server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git://github.com/
|
|
8
|
+
"url": "git://github.com/WebOrigami/origami.git"
|
|
9
9
|
},
|
|
10
10
|
"bin": {
|
|
11
11
|
"ori": "src/cli/cli.js"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"typescript": "5.2.2"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@weborigami/async-tree": "
|
|
23
|
-
"@weborigami/language": "
|
|
24
|
-
"@weborigami/types": "0.0.
|
|
22
|
+
"@weborigami/async-tree": "*",
|
|
23
|
+
"@weborigami/language": "*",
|
|
24
|
+
"@weborigami/types": "0.0.37",
|
|
25
25
|
"graphviz-wasm": "3.0.1",
|
|
26
26
|
"highlight.js": "11.9.0",
|
|
27
27
|
"marked": "9.1.5",
|
package/src/builtins/@arrows.js
CHANGED
|
@@ -31,4 +31,4 @@ export default async function arrows(treelike) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
arrows.usage = `@arrows <obj>\tInterpret arrow keys in the tree as function calls`;
|
|
34
|
-
arrows.documentation = "https://
|
|
34
|
+
arrows.documentation = "https://weborigami.org/language/@arrows.html";
|
|
@@ -13,6 +13,6 @@ const builtins = new (CommandModulesTransform(ImportModulesMixin(FileTree)))(
|
|
|
13
13
|
);
|
|
14
14
|
|
|
15
15
|
builtins.usage = `@builtins\tThe Tree Origami built-in functions`;
|
|
16
|
-
builtins.documentation = "https://
|
|
16
|
+
builtins.documentation = "https://weborigami.org/language/@builtins.html";
|
|
17
17
|
|
|
18
18
|
export default builtins;
|
package/src/builtins/@cache.js
CHANGED
|
@@ -32,5 +32,4 @@ export default async function cacheBuiltin(
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
cacheBuiltin.usage = `@cache/tree tree, [cache], [filter]\tCaches tree values`;
|
|
35
|
-
cacheBuiltin.documentation =
|
|
36
|
-
"https://graphorigami.org/cli/builtins.html#@cache";
|
|
35
|
+
cacheBuiltin.documentation = "https://weborigami.org/cli/builtins.html#@cache";
|
package/src/builtins/@config.js
CHANGED
|
@@ -22,4 +22,4 @@ export default async function config(key) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
config.usage = `@config\tThe current project's configuration tree`;
|
|
25
|
-
config.documentation = "https://
|
|
25
|
+
config.documentation = "https://weborigami.org/language/@config.html";
|
package/src/builtins/@copy.js
CHANGED
package/src/builtins/@crawl.js
CHANGED
|
@@ -53,6 +53,7 @@ export default async function crawl(treelike, baseHref) {
|
|
|
53
53
|
|
|
54
54
|
const cache = {};
|
|
55
55
|
const resources = {};
|
|
56
|
+
const errors = [];
|
|
56
57
|
|
|
57
58
|
// We iterate until there are no more promises to wait for.
|
|
58
59
|
for await (const result of crawlPaths(tree, baseUrl)) {
|
|
@@ -61,6 +62,12 @@ export default async function crawl(treelike, baseHref) {
|
|
|
61
62
|
// Cache the value
|
|
62
63
|
if (value) {
|
|
63
64
|
addValueToObject(cache, keys, value);
|
|
65
|
+
} else if (keys) {
|
|
66
|
+
// A missing robots.txt isn't an error; anything else missing is.
|
|
67
|
+
const path = keys.join("/");
|
|
68
|
+
if (path !== "robots.txt") {
|
|
69
|
+
errors.push(path);
|
|
70
|
+
}
|
|
64
71
|
}
|
|
65
72
|
|
|
66
73
|
// Add indirect resource functions to the resource tree. When requested,
|
|
@@ -74,10 +81,17 @@ export default async function crawl(treelike, baseHref) {
|
|
|
74
81
|
}
|
|
75
82
|
}
|
|
76
83
|
|
|
84
|
+
if (errors.length) {
|
|
85
|
+
addValueToObject(
|
|
86
|
+
cache,
|
|
87
|
+
["crawl-errors.json"],
|
|
88
|
+
JSON.stringify(errors, null, 2)
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
77
92
|
// Merge the cache on top of the resources tree. If we have an actual value
|
|
78
93
|
// for something already, that's better than a function that will get that
|
|
79
94
|
// value.
|
|
80
|
-
|
|
81
95
|
/** @type {AsyncTree} */
|
|
82
96
|
let result = mergeDeep(
|
|
83
97
|
new ObjectTree(cache),
|
|
@@ -461,17 +475,23 @@ async function processPath(tree, path, baseUrl) {
|
|
|
461
475
|
|
|
462
476
|
// Traverse tree to get value.
|
|
463
477
|
let value = await traverse(tree, ...keys);
|
|
464
|
-
if (Tree.
|
|
478
|
+
if (Tree.isAsyncTree(value)) {
|
|
465
479
|
// Path is actually a directory; see if it has an index.html
|
|
466
480
|
value = await traverse(value, "index.html");
|
|
467
481
|
}
|
|
468
482
|
|
|
483
|
+
const adjustedKeys = adjustKeys(keys);
|
|
484
|
+
|
|
469
485
|
if (value === undefined) {
|
|
470
|
-
return {
|
|
486
|
+
return {
|
|
487
|
+
crawlablePaths: [],
|
|
488
|
+
keys: adjustedKeys,
|
|
489
|
+
path,
|
|
490
|
+
resourcePaths: [],
|
|
491
|
+
value: null,
|
|
492
|
+
};
|
|
471
493
|
}
|
|
472
494
|
|
|
473
|
-
const adjustedKeys = adjustKeys(keys);
|
|
474
|
-
|
|
475
495
|
// Find paths in the value
|
|
476
496
|
const key = adjustedKeys.at(-1);
|
|
477
497
|
const { crawlablePaths, resourcePaths } = await findPaths(
|
|
@@ -504,4 +524,4 @@ async function traverse(tree, ...keys) {
|
|
|
504
524
|
}
|
|
505
525
|
|
|
506
526
|
crawl.usage = `@crawl <tree>\tCrawl a tree`;
|
|
507
|
-
crawl.documentation = "https://
|
|
527
|
+
crawl.documentation = "https://weborigami.org/language/@crawl.html";
|
package/src/builtins/@debug.js
CHANGED
package/src/builtins/@equals.js
CHANGED
package/src/builtins/@explore.js
CHANGED
|
@@ -65,4 +65,4 @@ async function getScopeData(scope) {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
explore.usage = "@explore\tExplore the current scope in the browser";
|
|
68
|
-
explore.documentation = "https://
|
|
68
|
+
explore.documentation = "https://weborigami.org/language/@explore.html";
|
package/src/builtins/@files.js
CHANGED
package/src/builtins/@filter.js
CHANGED
|
@@ -20,4 +20,4 @@ export default async function filter(treelike, filterVariant) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
filter.usage = `@filter <tree>, <filter>\tOnly returns values whose keys match the filter`;
|
|
23
|
-
filter.documentation = "https://
|
|
23
|
+
filter.documentation = "https://weborigami.org/language/@filter.html";
|
package/src/builtins/@globs.js
CHANGED
|
@@ -20,4 +20,4 @@ export default async function globs(tree) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
globs.usage = `@globs <patterns>\tDefine a tree whose keys can include wildcard globs`;
|
|
23
|
-
globs.documentation = "https://
|
|
23
|
+
globs.documentation = "https://weborigami.org/language/@globs.html";
|
package/src/builtins/@help.js
CHANGED
|
@@ -3,11 +3,11 @@ import child_process from "node:child_process";
|
|
|
3
3
|
import assertScopeIsDefined from "../misc/assertScopeIsDefined.js";
|
|
4
4
|
|
|
5
5
|
const groupUrls = {
|
|
6
|
-
"@cache": "https://
|
|
7
|
-
"@tree": "https://
|
|
8
|
-
"@image": "https://
|
|
9
|
-
"@parse": "https://
|
|
10
|
-
"@scope": "https://
|
|
6
|
+
"@cache": "https://weborigami.org/language/@cache.html",
|
|
7
|
+
"@tree": "https://weborigami.org/language/@tree.html",
|
|
8
|
+
"@image": "https://weborigami.org/language/@image.html",
|
|
9
|
+
"@parse": "https://weborigami.org/language/@parse.html",
|
|
10
|
+
"@scope": "https://weborigami.org/language/@scope.html",
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -32,7 +32,7 @@ export default async function help(name) {
|
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
34
|
} else {
|
|
35
|
-
url = "https://
|
|
35
|
+
url = "https://weborigami.org/cli/";
|
|
36
36
|
}
|
|
37
37
|
const platform = process.platform;
|
|
38
38
|
const start =
|
|
@@ -46,4 +46,4 @@ export default async function help(name) {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
help.usage = `@help/<name>\tOpens documentation for the named built-in command`;
|
|
49
|
-
help.documentation = "https://
|
|
49
|
+
help.documentation = "https://weborigami.org/language/@help.html";
|
package/src/builtins/@http.js
CHANGED
|
@@ -16,4 +16,4 @@ export default async function http(host, ...keys) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
http.usage = `@http <host>, <...keys>\tA web resource via HTTP`;
|
|
19
|
-
http.documentation = "https://
|
|
19
|
+
http.documentation = "https://weborigami.org/language/@http.html";
|
package/src/builtins/@https.js
CHANGED
|
@@ -16,4 +16,4 @@ export default async function https(host, ...keys) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
https.usage = `@https <host>, <...keys>\tA web resource via HTTPS`;
|
|
19
|
-
https.documentation = "https://
|
|
19
|
+
https.documentation = "https://weborigami.org/language/@https.html";
|
package/src/builtins/@if.js
CHANGED
|
@@ -24,4 +24,4 @@ export default async function ifCommand(value, trueResult, falseResult) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
ifCommand.usage = `@if <value>, <true>, [<false>]\tThe true or false result based on the value`;
|
|
27
|
-
ifCommand.documentation = "https://
|
|
27
|
+
ifCommand.documentation = "https://weborigami.org/language/@if.html";
|
package/src/builtins/@index.js
CHANGED
|
@@ -69,4 +69,4 @@ export default async function index(treelike) {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
index.usage = `@index\tReturn a default index.html page for the current tree`;
|
|
72
|
-
index.documentation = "https://
|
|
72
|
+
index.documentation = "https://weborigami.org/language/@index.html";
|
|
@@ -14,4 +14,4 @@ export default async function inherited(key) {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
inherited.usage = `@inherited <key>\tThe value of the key in the tree's inherited scope`;
|
|
17
|
-
inherited.documentation = "https://
|
|
17
|
+
inherited.documentation = "https://weborigami.org/language/@inherited.html";
|
package/src/builtins/@inline.js
CHANGED
|
@@ -26,4 +26,4 @@ export default async function inline(input) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
inline.usage = `@inline <text>\tInline Origami expressions found in the text`;
|
|
29
|
-
inline.documentation = "https://
|
|
29
|
+
inline.documentation = "https://weborigami.org/language/@inline.html";
|
package/src/builtins/@js.js
CHANGED
package/src/builtins/@json.js
CHANGED
package/src/builtins/@match.js
CHANGED
|
@@ -89,4 +89,4 @@ export default function match(pattern, resultFn, keys = []) {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
match.usage = `@match <pattern>, <fn>, [<keys>]\tMatches simple patterns or regular expressions`;
|
|
92
|
-
match.documentation = "https://
|
|
92
|
+
match.documentation = "https://weborigami.org/language/@match.html";
|
package/src/builtins/@mdHtml.js
CHANGED
|
@@ -42,4 +42,4 @@ export default async function mdHtml(input) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
mdHtml.usage = `@mdHtml <markdown>\tRender the markdown text as HTML`;
|
|
45
|
-
mdHtml.documentation = "https://
|
|
45
|
+
mdHtml.documentation = "https://weborigami.org/language/@mdHtml.html";
|
package/src/builtins/@new.js
CHANGED
|
@@ -3,4 +3,4 @@ export default function newBuiltin(constructor, ...args) {
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
newBuiltin.usage = "@new <classFn>\tCreate a new instance of the given class";
|
|
6
|
-
newBuiltin.documentation = "https://
|
|
6
|
+
newBuiltin.documentation = "https://weborigami.org/language/@new.html";
|
package/src/builtins/@node.js
CHANGED
package/src/builtins/@not.js
CHANGED
package/src/builtins/@or.js
CHANGED
package/src/builtins/@ori.js
CHANGED
|
@@ -3,5 +3,4 @@ export default async function parseJson(text) {
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
parseJson.usage = `parseJson <text>\tParse text as JSON`;
|
|
6
|
-
parseJson.documentation =
|
|
7
|
-
"https://graphorigami.org/cli/builtins.html#parseJson";
|
|
6
|
+
parseJson.documentation = "https://weborigami.org/cli/builtins.html#parseJson";
|
|
@@ -5,5 +5,4 @@ export default async function parseYaml(text) {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
parseYaml.usage = `parseYaml <text>\tParse text as YAML (including JSON)`;
|
|
8
|
-
parseYaml.documentation =
|
|
9
|
-
"https://graphorigami.org/cli/builtins.html#parseYaml";
|
|
8
|
+
parseYaml.documentation = "https://weborigami.org/cli/builtins.html#parseYaml";
|
package/src/builtins/@project.js
CHANGED
|
@@ -68,4 +68,4 @@ async function findConfigContainer(start) {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
project.usage = `@project\tThe root of the current Tree Origami project`;
|
|
71
|
-
project.documentation = "https://
|
|
71
|
+
project.documentation = "https://weborigami.org/language/@project.html";
|
package/src/builtins/@repeat.js
CHANGED
|
@@ -5,4 +5,4 @@ export default async function repeat(count, content) {
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
repeat.usage = `@repeat <count>, <content>\tRepeats the content the given number of times`;
|
|
8
|
-
repeat.documentation = "https://
|
|
8
|
+
repeat.documentation = "https://weborigami.org/language/@repeat.html";
|
package/src/builtins/@rss.js
CHANGED
|
@@ -19,4 +19,4 @@ export default function extendScope(treelike, ...scopeTrees) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
extendScope.usage = `@scope/extend <tree>, <...trees>\tExtends tree's scope with the given trees`;
|
|
22
|
-
extendScope.documentation = "https://
|
|
22
|
+
extendScope.documentation = "https://weborigami.org/cli/builtins.html#@scope";
|
|
@@ -22,4 +22,4 @@ export default async function getScope(obj) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
getScope.usage = `@scope/get [<tree>]\tReturns the scope of the tree or the current scope`;
|
|
25
|
-
getScope.documentation = "https://
|
|
25
|
+
getScope.documentation = "https://weborigami.org/cli/builtins.html#@scope";
|
|
@@ -19,4 +19,4 @@ export default async function invoke(context, invocable, ...args) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
invoke.usage = `@scope/invoke fn, <...args>\tInvoke the function in the current scope`;
|
|
22
|
-
invoke.documentation = "https://
|
|
22
|
+
invoke.documentation = "https://weborigami.org/cli/builtins.html#@scope";
|
|
@@ -22,4 +22,4 @@ export default function setScope(treelike, ...scopeTrees) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
setScope.usage = `@scope/set <tree>, <...trees>\tReturns a tree copy with the given scope`;
|
|
25
|
-
setScope.documentation = "https://
|
|
25
|
+
setScope.documentation = "https://weborigami.org/cli/builtins.html#@scope";
|
package/src/builtins/@serve.js
CHANGED
package/src/builtins/@shell.js
CHANGED
|
@@ -13,4 +13,4 @@ export default async function shell(command) {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
shell.usage = `@shell <command>\tExecutes the shell command and returns the output`;
|
|
16
|
-
shell.documentation = "https://
|
|
16
|
+
shell.documentation = "https://weborigami.org/language/@shell.html";
|
package/src/builtins/@stdin.js
CHANGED
package/src/builtins/@svg.js
CHANGED
|
@@ -39,4 +39,4 @@ export default async function svg(treelike, options = {}) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
svg.usage = `@svg <tree>\tRender a tree visually as in SVG format`;
|
|
42
|
-
svg.documentation = "https://
|
|
42
|
+
svg.documentation = "https://weborigami.org/language/@svg.html";
|
|
@@ -18,4 +18,4 @@ export default async function concat(...args) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
concat.usage = `concat <...objs>\tConcatenate text and/or trees of text`;
|
|
21
|
-
concat.documentation = "https://
|
|
21
|
+
concat.documentation = "https://weborigami.org/cli/@tree.html#concat";
|
|
@@ -21,4 +21,4 @@ export default async function count(treelike) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
count.usage = `count <treelike>\tReturn the number of keys in the tree`;
|
|
24
|
-
count.documentation = "https://
|
|
24
|
+
count.documentation = "https://weborigami.org/cli/@tree.html#count";
|
|
@@ -25,4 +25,4 @@ export default async function first(treelike) {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
first.usage = `first <tree>\tReturns the first value in the tree.`;
|
|
28
|
-
first.documentation = "https://
|
|
28
|
+
first.documentation = "https://weborigami.org/cli/builtins.html#first";
|
|
@@ -52,4 +52,4 @@ ${edges.join("\n")}
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
// flowSvg.usage = `flowSvg <dataflow>\tRenders the output of dataflow() as an SVG`;
|
|
55
|
-
// flowSvg.documentation = "https://
|
|
55
|
+
// flowSvg.documentation = "https://weborigami.org/cli/builtins.html#flowSvg";
|
package/src/builtins/@tree/fn.js
CHANGED
|
@@ -31,4 +31,4 @@ export default async function fn(invocable, keys = []) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
fn.usage = `fn <fn>, [<keys>]\tCreate a tree from a function and a set of keys`;
|
|
34
|
-
fn.documentation = "https://
|
|
34
|
+
fn.documentation = "https://weborigami.org/cli/tree.html#fn";
|
|
@@ -24,4 +24,4 @@ export default async function tree(treelike) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
tree.usage = `from <treelike>\tConvert JSON, YAML, function, or plain object to a tree`;
|
|
27
|
-
tree.documentation = "https://
|
|
27
|
+
tree.documentation = "https://weborigami.org/cli/builtins.html#tree";
|
|
@@ -21,4 +21,4 @@ export default async function fromYaml(text) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
fromYaml.usage = `fromYaml <text>\tParse text as YAML`;
|
|
24
|
-
fromYaml.documentation = "https://
|
|
24
|
+
fromYaml.documentation = "https://weborigami.org/cli/builtins.html#fromYaml";
|
|
@@ -36,4 +36,4 @@ export default async function groupByBuiltin(treelike, groupKeyFn) {
|
|
|
36
36
|
|
|
37
37
|
groupByBuiltin.usage = `groupBy <tree>, [groupKeyFn]\tReturn a new tree with the original's values grouped`;
|
|
38
38
|
groupByBuiltin.documentation =
|
|
39
|
-
"https://
|
|
39
|
+
"https://weborigami.org/cli/builtins.html#@group";
|
|
@@ -41,4 +41,4 @@ export default async function inners(treelike) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
inners.usage = `inners <tree>\tThe source nodes of the tree`;
|
|
44
|
-
inners.documentation = "https://
|
|
44
|
+
inners.documentation = "https://weborigami.org/cli/builtins.html#inners";
|
|
@@ -14,4 +14,4 @@ export default function isAsyncTree(value) {
|
|
|
14
14
|
|
|
15
15
|
isAsyncTree.usage = `@tree/isAsyncTree <value>\tReturn true for an async tree`;
|
|
16
16
|
isAsyncTree.documentation =
|
|
17
|
-
"https://
|
|
17
|
+
"https://weborigami.org/cli/builtins.html#isAsyncTree";
|
|
@@ -44,4 +44,4 @@ export default async function treeMerge(...trees) {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
treeMerge.usage = `@merge <...trees>\tMerge the given trees`;
|
|
47
|
-
treeMerge.documentation = "https://
|
|
47
|
+
treeMerge.documentation = "https://weborigami.org/cli/builtins.html#@merge";
|
|
@@ -41,4 +41,4 @@ export default async function treeMergeDeep(...trees) {
|
|
|
41
41
|
|
|
42
42
|
treeMergeDeep.usage = `mergeDeep <...trees>\tMerge the given trees deeply`;
|
|
43
43
|
treeMergeDeep.documentation =
|
|
44
|
-
"https://
|
|
44
|
+
"https://weborigami.org/cli/builtins.html#mergeDeep";
|
|
@@ -26,4 +26,4 @@ export default async function nextKey(treelike, key) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
nextKey.usage = `nextKey <tree>, <key>\tReturns the key after the indicated key`;
|
|
29
|
-
nextKey.documentation = "https://
|
|
29
|
+
nextKey.documentation = "https://weborigami.org/cli/builtins.html#nextKey";
|
|
@@ -21,4 +21,4 @@ export default async function parent(treelike) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
parent.usage = `parent\tThe parent of the current tree`;
|
|
24
|
-
parent.documentation = "https://
|
|
24
|
+
parent.documentation = "https://weborigami.org/cli/builtins.html#parent";
|
|
@@ -19,4 +19,4 @@ export default async function plain(treelike) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
plain.usage = `plain <tree>\tA plain JavaScript object representation of the tree`;
|
|
22
|
-
plain.documentation = "https://
|
|
22
|
+
plain.documentation = "https://weborigami.org/cli/builtins.html#plain";
|
|
@@ -26,4 +26,4 @@ export default async function previousKey(treelike, key) {
|
|
|
26
26
|
|
|
27
27
|
previousKey.usage = `previousKey <tree>, <key>\tReturns the key before the indicated key`;
|
|
28
28
|
previousKey.documentation =
|
|
29
|
-
"https://
|
|
29
|
+
"https://weborigami.org/cli/builtins.html#previousKey";
|
|
@@ -48,4 +48,4 @@ export default async function reverse(treelike, options = {}) {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
reverse.usage = `reverse <tree>\tReverses the order of the tree's top-level keys`;
|
|
51
|
-
reverse.documentation = "https://
|
|
51
|
+
reverse.documentation = "https://weborigami.org/cli/builtins.html#reverse";
|
|
@@ -42,4 +42,4 @@ async function applyUpdateForKey(source, target, key) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
setDeep.usage = `setDeep <target>, <source>\tApplies the source tree to the target`;
|
|
45
|
-
setDeep.documentation = "https://
|
|
45
|
+
setDeep.documentation = "https://weborigami.org/cli/builtins.html#setDeep";
|
|
@@ -28,4 +28,4 @@ export default async function shuffle(treelike) {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
shuffle.usage = `shuffle <tree>\tReturn a new tree with the original's keys shuffled`;
|
|
31
|
-
shuffle.documentation = "https://
|
|
31
|
+
shuffle.documentation = "https://weborigami.org/cli/builtins.html#shuffle";
|
|
@@ -56,4 +56,4 @@ export default async function sitemap(treelike, baseHref = "") {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
sitemap.usage = `@sitemap <tree>\tGenerate a sitemap for a tree`;
|
|
59
|
-
sitemap.documentation = "https://
|
|
59
|
+
sitemap.documentation = "https://weborigami.org/cli/builtins.html#@sitemap";
|
|
@@ -22,4 +22,4 @@ export default async function sort(treelike) {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
sort.usage = `sort <tree>\tReturn a new tree with the original's keys sorted`;
|
|
25
|
-
sort.documentation = "https://
|
|
25
|
+
sort.documentation = "https://weborigami.org/cli/builtins.html#@sort";
|
|
@@ -36,5 +36,4 @@ export default async function sortByBuiltin(treelike, sortKeyFn) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
sortByBuiltin.usage = `sortBy <tree>, [sortKeyFn]\tReturn a new tree with the original's keys sorted`;
|
|
39
|
-
sortByBuiltin.documentation =
|
|
40
|
-
"https://graphorigami.org/cli/builtins.html#@sort";
|
|
39
|
+
sortByBuiltin.documentation = "https://weborigami.org/cli/builtins.html#@sort";
|
|
@@ -48,4 +48,4 @@ function StaticTransform(Base) {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
staticTree.usage = `static <tree>\tAdd keys for generating common static files`;
|
|
51
|
-
staticTree.documentation = "https://
|
|
51
|
+
staticTree.documentation = "https://weborigami.org/cli/builtins.html#static";
|
|
@@ -71,4 +71,4 @@ async function valueForFirstKey(tree) {
|
|
|
71
71
|
|
|
72
72
|
table.usage =
|
|
73
73
|
"table <tree>\tFormat the tree's top level as a tab-delimited table";
|
|
74
|
-
table.documentation = "https://
|
|
74
|
+
table.documentation = "https://weborigami.org/cli/builtins.html#table";
|
|
@@ -37,4 +37,4 @@ export default async function take(treelike, n) {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
take.usage = `take tree, n\tReturn the first n items from tree`;
|
|
40
|
-
take.documentation = "https://
|
|
40
|
+
take.documentation = "https://weborigami.org/cli/builtins.html#take";
|
|
@@ -20,4 +20,4 @@ export default async function values(treelike) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
values.usage = `values <tree>\tThe top-level values in the tree`;
|
|
23
|
-
values.documentation = "https://
|
|
23
|
+
values.documentation = "https://weborigami.org/cli/builtins.html#values";
|
|
@@ -20,4 +20,4 @@ export default async function valuesDeep(treelike) {
|
|
|
20
20
|
|
|
21
21
|
valuesDeep.usage = `valuesDeep <tree>\tThe in-order tree values as a flat array`;
|
|
22
22
|
valuesDeep.documentation =
|
|
23
|
-
"https://
|
|
23
|
+
"https://weborigami.org/cli/builtins.html#valuesDeep";
|
|
@@ -16,4 +16,4 @@ export default function treeHttp(host, ...keys) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
treeHttp.usage = `@treeHttp <domain>, <...keys>\tA web site tree via HTTP`;
|
|
19
|
-
treeHttp.documentation = "https://
|
|
19
|
+
treeHttp.documentation = "https://weborigami.org/language/@treeHttp.html";
|
|
@@ -16,4 +16,4 @@ export default function treeHttps(host, ...keys) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
treeHttps.usage = `@treeHttps <domain>, <...keys>\tA web site tree via HTTPS`;
|
|
19
|
-
treeHttps.documentation = "https://
|
|
19
|
+
treeHttps.documentation = "https://weborigami.org/language/@treeHttps.html";
|
package/src/builtins/@watch.js
CHANGED
|
@@ -105,4 +105,4 @@ function updateIndirectPointer(indirect, target) {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
watch.usage = `@watch <folder>, [expr]\tLet a folder tree respond to changes`;
|
|
108
|
-
watch.documentation = "https://
|
|
108
|
+
watch.documentation = "https://weborigami.org/language/@watch.html";
|
package/src/builtins/@yaml.js
CHANGED
|
@@ -20,4 +20,4 @@ export default async function toYaml(obj) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
toYaml.usage = `@yaml <obj>\tRender the object as text in YAML format`;
|
|
23
|
-
toYaml.documentation = "https://
|
|
23
|
+
toYaml.documentation = "https://weborigami.org/language/@yaml.html";
|
package/src/misc/explore.orit
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
6
|
-
<title>
|
|
6
|
+
<title>Web Origami Explorer</title>
|
|
7
7
|
<style>
|
|
8
8
|
* {
|
|
9
9
|
box-sizing: border-box;
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
</head>
|
|
219
219
|
<body>
|
|
220
220
|
<nav>
|
|
221
|
-
<div id="label">
|
|
221
|
+
<div id="label">Web Origami Explorer</div>
|
|
222
222
|
<div id="scopeToolbar">
|
|
223
223
|
<button id="buttonContent">Content</button>
|
|
224
224
|
<button id="buttonIndex">Index</button>
|