@shivaedev/work-board 0.1.0 → 0.2.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.
- package/CHANGELOG.md +38 -0
- package/README.md +11 -0
- package/dist/board.d.ts +9 -3
- package/dist/board.d.ts.map +1 -1
- package/dist/board.js +9 -9
- package/dist/board.js.map +1 -1
- package/dist/cli.js +3 -3
- package/dist/cli.js.map +1 -1
- package/dist/files/changes.d.ts +3 -3
- package/dist/files/changes.d.ts.map +1 -1
- package/dist/files/changes.js +2 -2
- package/dist/files/changes.js.map +1 -1
- package/dist/files/list.d.ts +1 -1
- package/dist/files/list.d.ts.map +1 -1
- package/dist/files/list.js +1 -1
- package/dist/files/list.js.map +1 -1
- package/dist/http/assets.js +6 -6
- package/dist/http/assets.js.map +1 -1
- package/dist/http/events.d.ts +1 -1
- package/dist/http/events.d.ts.map +1 -1
- package/dist/http/events.js +1 -1
- package/dist/http/events.js.map +1 -1
- package/dist/http/loopback.js +2 -2
- package/dist/http/loopback.js.map +1 -1
- package/dist/http/page.d.ts +2 -2
- package/dist/http/page.d.ts.map +1 -1
- package/dist/http/page.js +8 -8
- package/dist/http/page.js.map +1 -1
- package/dist/page/board.d.ts +1 -1
- package/dist/page/board.d.ts.map +1 -1
- package/dist/page/board.js +2 -2
- package/dist/page/board.js.map +1 -1
- package/dist/page/document.d.ts +1 -1
- package/dist/page/document.d.ts.map +1 -1
- package/dist/page/document.js +1 -1
- package/dist/page/document.js.map +1 -1
- package/dist/page/escape.d.ts.map +1 -1
- package/dist/page/escape.js +2 -2
- package/dist/page/escape.js.map +1 -1
- package/dist/page/nav.d.ts +2 -2
- package/dist/page/nav.d.ts.map +1 -1
- package/dist/page/nav.js +1 -1
- package/dist/page/nav.js.map +1 -1
- package/dist/render/board.d.ts +8 -8
- package/dist/render/board.d.ts.map +1 -1
- package/dist/render/board.js +7 -7
- package/dist/render/board.js.map +1 -1
- package/dist/render/code.d.ts +1 -1
- package/dist/render/code.js +5 -5
- package/dist/render/code.js.map +1 -1
- package/dist/render/footnotes.d.ts +1 -1
- package/dist/render/footnotes.js +2 -2
- package/dist/render/footnotes.js.map +1 -1
- package/dist/render/highlighter.d.ts +1 -1
- package/dist/render/highlighter.js +2 -2
- package/dist/render/highlighter.js.map +1 -1
- package/dist/render/markdown.js +1 -1
- package/dist/render/markdown.js.map +1 -1
- package/dist/serve.d.ts +1 -1
- package/dist/serve.d.ts.map +1 -1
- package/dist/serve.js +1 -1
- package/dist/serve.js.map +1 -1
- package/package.json +38 -30
- package/src/board.ts +17 -12
- package/src/cli.ts +3 -3
- package/src/files/changes.ts +6 -6
- package/src/files/list.ts +3 -3
- package/src/http/assets.ts +6 -6
- package/src/http/events.ts +2 -2
- package/src/http/loopback.ts +2 -2
- package/src/http/page.ts +10 -10
- package/src/page/board.ts +2 -2
- package/src/page/document.ts +2 -2
- package/src/page/escape.ts +2 -2
- package/src/page/nav.ts +4 -4
- package/src/render/board.ts +19 -19
- package/src/render/code.ts +5 -5
- package/src/render/footnotes.ts +2 -2
- package/src/render/highlighter.ts +2 -2
- package/src/render/markdown.ts +1 -1
- package/src/serve.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../../src/render/board.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,OAAO;IACvB,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"board.d.ts","sourceRoot":"","sources":["../../src/render/board.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,OAAO;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,KAAK;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAC;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACvB;AA0CD,eAAO,MAAM,OAAO,GAAI,QAAQ,MAAM,KAAG,KAexC,CAAC;AAEF,MAAM,WAAW,KAAK;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,QAAQ,GAAI,OAAO,KAAK,KAAG,SAAS,KAAK,EAC2E,CAAC"}
|
package/dist/render/board.js
CHANGED
|
@@ -18,7 +18,7 @@ const place = (draft, node, source, closing) => {
|
|
|
18
18
|
draft.title = source;
|
|
19
19
|
}
|
|
20
20
|
else if (isSection(node)) {
|
|
21
|
-
draft.sections.push({
|
|
21
|
+
draft.sections.push({ heading: source, items: [], notes: [], title: textOf(node) });
|
|
22
22
|
}
|
|
23
23
|
else if (section === undefined) {
|
|
24
24
|
draft.intro.push(source);
|
|
@@ -35,7 +35,7 @@ const place = (draft, node, source, closing) => {
|
|
|
35
35
|
};
|
|
36
36
|
const joined = (blocks) => blocks.join("\n\n");
|
|
37
37
|
export const boardOf = (source) => {
|
|
38
|
-
const draft = {
|
|
38
|
+
const draft = { definitions: [], footer: undefined, intro: [], sections: [], title: "" };
|
|
39
39
|
const root = markdownToMdast(source);
|
|
40
40
|
const nodes = root.type === "root" ? root.children : [];
|
|
41
41
|
const lastHeading = nodes.findLastIndex((node) => node.type === "heading");
|
|
@@ -43,12 +43,12 @@ export const boardOf = (source) => {
|
|
|
43
43
|
place(draft, node, source.slice(node.position?.start.offset, node.position?.end.offset), index > lastHeading);
|
|
44
44
|
});
|
|
45
45
|
return {
|
|
46
|
-
title: draft.title,
|
|
47
|
-
intro: joined(draft.intro),
|
|
48
|
-
sections: draft.sections.map((section) => ({ ...section, notes: joined(section.notes), items: section.items.map(joined) })),
|
|
49
|
-
footer: joined(draft.footer ?? []),
|
|
50
46
|
definitions: joined(draft.definitions),
|
|
47
|
+
footer: joined(draft.footer ?? []),
|
|
48
|
+
intro: joined(draft.intro),
|
|
49
|
+
sections: draft.sections.map((section) => ({ ...section, items: section.items.map(joined), notes: joined(section.notes) })),
|
|
50
|
+
title: draft.title,
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
-
export const countsOf = (board) => board.sections.flatMap((section) => (section.items.length === 0 ? [] : [{
|
|
53
|
+
export const countsOf = (board) => board.sections.flatMap((section) => (section.items.length === 0 ? [] : [{ count: section.items.length, title: section.title }]));
|
|
54
54
|
//# sourceMappingURL=board.js.map
|
package/dist/render/board.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board.js","sourceRoot":"","sources":["../../src/render/board.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAyB1C,MAAM,MAAM,GAAG,CAAC,IAAiB,EAAU,EAAE;IAC5C,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IACD,OAAO,UAAU,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvF,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,IAAiB,EAAW,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC;AAE9F,MAAM,KAAK,GAAG,CAAC,KAAY,EAAE,IAAiB,EAAE,MAAc,EAAE,OAAgB,EAAQ,EAAE;IACzF,MAAM,OAAO,GAAG,KA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,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;QAClC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;QAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC3H,KAAK,EAAE,KAAK,CAAC,KAAK;KAClB,CAAC;AACH,CAAC,CAAC;AAOF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAY,EAAoB,EAAE,CAC1D,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/render/code.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Element } from "hast";
|
|
2
2
|
import { type Highlighter as Shiki } from "shiki";
|
|
3
3
|
export declare const codeBlocks: (highlighter: Shiki) => {
|
|
4
|
-
name: string;
|
|
5
4
|
element: {
|
|
6
5
|
filter: string[];
|
|
7
6
|
visit: (pre: Readonly<Element>) => Promise<import("hast").RootContent | undefined>;
|
|
8
7
|
};
|
|
8
|
+
name: string;
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=code.d.ts.map
|
package/dist/render/code.js
CHANGED
|
@@ -13,10 +13,10 @@ const textOf = (node) => {
|
|
|
13
13
|
return node.type === "element" ? node.children.map(textOf).join("") : "";
|
|
14
14
|
};
|
|
15
15
|
const diagram = (source) => ({
|
|
16
|
-
type: "element",
|
|
17
|
-
tagName: "figure",
|
|
16
|
+
children: [{ children: [{ type: "text", value: source }], properties: { className: ["diagram-source"] }, tagName: "pre", type: "element" }],
|
|
18
17
|
properties: { className: ["diagram"], dataState: "pending" },
|
|
19
|
-
|
|
18
|
+
tagName: "figure",
|
|
19
|
+
type: "element",
|
|
20
20
|
});
|
|
21
21
|
const isBundled = (language) => Object.hasOwn(bundledLanguages, language);
|
|
22
22
|
const highlighted = async (highlighter, source, language) => {
|
|
@@ -24,10 +24,9 @@ const highlighted = async (highlighter, source, language) => {
|
|
|
24
24
|
return undefined;
|
|
25
25
|
}
|
|
26
26
|
await highlighter.loadLanguage(language);
|
|
27
|
-
return highlighter.codeToHast(source, { lang: language, themes: THEMES
|
|
27
|
+
return highlighter.codeToHast(source, { defaultColor: false, lang: language, themes: THEMES }).children.at(0);
|
|
28
28
|
};
|
|
29
29
|
export const codeBlocks = (highlighter) => defineHastPlugin({
|
|
30
|
-
name: "work-board-code",
|
|
31
30
|
element: {
|
|
32
31
|
filter: ["pre"],
|
|
33
32
|
visit: async (pre) => {
|
|
@@ -43,5 +42,6 @@ export const codeBlocks = (highlighter) => defineHastPlugin({
|
|
|
43
42
|
return language === undefined ? undefined : await highlighted(highlighter, source, language);
|
|
44
43
|
},
|
|
45
44
|
},
|
|
45
|
+
name: "work-board-code",
|
|
46
46
|
});
|
|
47
47
|
//# sourceMappingURL=code.js.map
|
package/dist/render/code.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.js","sourceRoot":"","sources":["../../src/render/code.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAwB,gBAAgB,EAA6B,MAAM,OAAO,CAAC;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,UAAU,GAAG,CAAC,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B,CAAC,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Element } from "hast";
|
|
2
2
|
export declare const footnoteIds: (prefix: string) => {
|
|
3
|
-
name: string;
|
|
4
3
|
element: {
|
|
5
4
|
filter: string[];
|
|
6
5
|
visit: (element: Readonly<Element>) => {
|
|
@@ -15,5 +14,6 @@ export declare const footnoteIds: (prefix: string) => {
|
|
|
15
14
|
};
|
|
16
15
|
};
|
|
17
16
|
};
|
|
17
|
+
name: string;
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=footnotes.d.ts.map
|
package/dist/render/footnotes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineHastPlugin } from "satteri";
|
|
2
|
-
const FOOTNOTE_IDS = /^(?:user-content-fn|footnote-label)
|
|
2
|
+
const FOOTNOTE_IDS = /^(?:user-content-fn|footnote-label)/u;
|
|
3
3
|
const SCOPED = new Set(["id", "href", "ariaDescribedBy"]);
|
|
4
4
|
const scoped = (prefix, value) => {
|
|
5
5
|
if (typeof value === "string" && FOOTNOTE_IDS.test(value)) {
|
|
@@ -11,7 +11,6 @@ const scoped = (prefix, value) => {
|
|
|
11
11
|
return Array.isArray(value) ? value.map((each) => (typeof each === "string" ? String(scoped(prefix, each)) : each)) : value;
|
|
12
12
|
};
|
|
13
13
|
export const footnoteIds = (prefix) => defineHastPlugin({
|
|
14
|
-
name: "work-board-footnote-ids",
|
|
15
14
|
element: {
|
|
16
15
|
filter: ["a", "h2", "li"],
|
|
17
16
|
visit: (element) => ({
|
|
@@ -19,5 +18,6 @@ export const footnoteIds = (prefix) => defineHastPlugin({
|
|
|
19
18
|
properties: Object.fromEntries(Object.entries(element.properties).map(([name, value]) => [name, SCOPED.has(name) ? scoped(prefix, value) : value])),
|
|
20
19
|
}),
|
|
21
20
|
},
|
|
21
|
+
name: "work-board-footnote-ids",
|
|
22
22
|
});
|
|
23
23
|
//# sourceMappingURL=footnotes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"footnotes.js","sourceRoot":"","sources":["../../src/render/footnotes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,YAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"footnotes.js","sourceRoot":"","sources":["../../src/render/footnotes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,YAAY,GAAG,sCAAsC,CAAC;AAI5D,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAE1D,MAAM,MAAM,GAAG,CAAC,MAAc,EAAE,KAAY,EAAS,EAAE;IACtD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3D,OAAO,GAAG,MAAM,GAAG,KAAK,EAAE,CAAC;IAC5B,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7F,OAAO,IAAI,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IACtC,CAAC;IACD,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC7H,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAc,EAAE,EAAE,CAC7C,gBAAgB,CAAC;IAChB,OAAO,EAAE;QACR,MAAM,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC;QACzB,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACpB,GAAG,OAAO;YACV,UAAU,EAAE,MAAM,CAAC,WAAW,CAC7B,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CACnH;SACD,CAAC;KACF;IACD,IAAI,EAAE,yBAAyB;CAC/B,CAAC,CAAC"}
|
|
@@ -2,8 +2,8 @@ import { Context, Layer } from "effect";
|
|
|
2
2
|
import { type Highlighter as Shiki } from "shiki";
|
|
3
3
|
import { RenderFailed } from "./failed.ts";
|
|
4
4
|
export declare const THEMES: {
|
|
5
|
-
readonly light: "github-light";
|
|
6
5
|
readonly dark: "github-dark";
|
|
6
|
+
readonly light: "github-light";
|
|
7
7
|
};
|
|
8
8
|
declare const Highlighter_base: Context.ServiceClass<Highlighter, "WorkBoard/Highlighter", Shiki>;
|
|
9
9
|
export declare class Highlighter extends Highlighter_base {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Context, Effect, Layer } from "effect";
|
|
2
2
|
import { createHighlighter } from "shiki";
|
|
3
3
|
import { RenderFailed } from "./failed.js";
|
|
4
|
-
export const THEMES = {
|
|
4
|
+
export const THEMES = { dark: "github-dark", light: "github-light" };
|
|
5
5
|
export class Highlighter extends Context.Service()("WorkBoard/Highlighter") {
|
|
6
6
|
static layer = Layer.effect(Highlighter)(Effect.acquireRelease(Effect.tryPromise({
|
|
7
|
-
try: () => createHighlighter({ themes: Object.values(THEMES), langs: [] }),
|
|
8
7
|
catch: (cause) => new RenderFailed({ cause }),
|
|
8
|
+
try: () => createHighlighter({ langs: [], themes: Object.values(THEMES) }),
|
|
9
9
|
}), (highlighter) => Effect.sync(() => highlighter.dispose())));
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=highlighter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlighter.js","sourceRoot":"","sources":["../../src/render/highlighter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAA6B,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"highlighter.js","sourceRoot":"","sources":["../../src/render/highlighter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAA6B,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,cAAc,EAAW,CAAC;AAE9E,MAAM,OAAO,WAAY,SAAQ,OAAO,CAAC,OAAO,EAAsB,CAAC,uBAAuB,CAAC;IAC9F,MAAM,CAAU,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAChD,MAAM,CAAC,cAAc,CACpB,MAAM,CAAC,UAAU,CAAC;QACjB,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC;QAC7C,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;KAC1E,CAAC,EACF,CAAC,WAAW,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CACzD,CACD,CAAC"}
|
package/dist/render/markdown.js
CHANGED
|
@@ -7,8 +7,8 @@ import { Highlighter } from "./highlighter.js";
|
|
|
7
7
|
export const renderMarkdown = Effect.fn("WorkBoard.renderMarkdown")(function* (source, idPrefix = "") {
|
|
8
8
|
const highlighter = yield* Highlighter;
|
|
9
9
|
const { html } = yield* Effect.tryPromise({
|
|
10
|
-
try: async () => markdownToHtml(source, { hastPlugins: idPrefix === "" ? [codeBlocks(highlighter)] : [codeBlocks(highlighter), footnoteIds(idPrefix)] }),
|
|
11
10
|
catch: (cause) => new RenderFailed({ cause }),
|
|
11
|
+
try: async () => markdownToHtml(source, { hastPlugins: idPrefix === "" ? [codeBlocks(highlighter)] : [codeBlocks(highlighter), footnoteIds(idPrefix)] }),
|
|
12
12
|
});
|
|
13
13
|
return html;
|
|
14
14
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.js","sourceRoot":"","sources":["../../src/render/markdown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,EAAE,CAAC,0BAA0B,CAAC,CAAC,QAAQ,CAAC,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W,EAAE,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;KACxI,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACb,CAAC,CAAC,CAAC"}
|
package/dist/serve.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ export interface ServeOptions extends BoardOptions {
|
|
|
5
5
|
readonly port: number;
|
|
6
6
|
}
|
|
7
7
|
export declare const listenOn: (port: number) => Layer.Layer<import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpPlatform").HttpPlatform | import("effect/unstable/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices, import("effect/unstable/http/HttpServerError").ServeError, never>;
|
|
8
|
-
export declare const serveBoard: (options: ServeOptions) => Layer.Layer<import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpPlatform").HttpPlatform | import("effect/unstable/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices, import("./files/home.ts").HomeMissing | import("./http/assets.ts").MermaidMissing | import("effect/PlatformError").PlatformError | import("./render/failed.ts").RenderFailed
|
|
8
|
+
export declare const serveBoard: (options: ServeOptions) => Layer.Layer<import("effect/unstable/http/Etag").Generator | import("effect/unstable/http/HttpPlatform").HttpPlatform | import("effect/unstable/http/HttpServer").HttpServer | import("@effect/platform-node/NodeServices").NodeServices, import("effect/unstable/http/HttpServerError").ServeError | (import("./files/home.ts").HomeMissing | import("./http/assets.ts").MermaidMissing | import("effect/PlatformError").PlatformError | import("./render/failed.ts").RenderFailed), never>;
|
|
9
9
|
//# sourceMappingURL=serve.d.ts.map
|
package/dist/serve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/serve.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAE,KAAK,YAAY,EAAc,MAAM,YAAY,CAAC;AAE3D,eAAO,MAAM,IAAI,cAAc,CAAC;AAEhC,MAAM,WAAW,YAAa,SAAQ,YAAY;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,+SAA8F,CAAC;AAEpI,eAAO,MAAM,UAAU,GAAI,SAAS,YAAY,
|
|
1
|
+
{"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../src/serve.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAE/B,OAAO,EAAE,KAAK,YAAY,EAAc,MAAM,YAAY,CAAC;AAE3D,eAAO,MAAM,IAAI,cAAc,CAAC;AAEhC,MAAM,WAAW,YAAa,SAAQ,YAAY;IACjD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,+SAA8F,CAAC;AAEpI,eAAO,MAAM,UAAU,GAAI,SAAS,YAAY,geACgE,CAAC"}
|
package/dist/serve.js
CHANGED
|
@@ -4,6 +4,6 @@ import { Layer } from "effect";
|
|
|
4
4
|
import { HttpRouter } from "effect/unstable/http";
|
|
5
5
|
import { boardLayer } from "./board.js";
|
|
6
6
|
export const HOST = "127.0.0.1";
|
|
7
|
-
export const listenOn = (port) => NodeHttpServer.layer(createServer, { host: HOST, port
|
|
7
|
+
export const listenOn = (port) => NodeHttpServer.layer(createServer, { disablePreemptiveShutdown: true, host: HOST, port });
|
|
8
8
|
export const serveBoard = (options) => HttpRouter.serve(boardLayer(options), { disableLogger: true }).pipe(Layer.provideMerge(listenOn(options.port)));
|
|
9
9
|
//# sourceMappingURL=serve.js.map
|
package/dist/serve.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.js","sourceRoot":"","s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CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shivaedev/work-board",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Serve a folder of markdown files as a live local page that updates in place when a file changes",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"repository": {
|
|
8
|
-
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/ShivaeDev/platform.git",
|
|
10
|
-
"directory": "packages/work-board"
|
|
11
|
-
},
|
|
12
5
|
"homepage": "https://github.com/ShivaeDev/platform/tree/main/packages/work-board#readme",
|
|
13
6
|
"bugs": {
|
|
14
7
|
"url": "https://github.com/ShivaeDev/platform/issues"
|
|
15
8
|
},
|
|
16
|
-
"
|
|
17
|
-
"
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/ShivaeDev/platform.git",
|
|
12
|
+
"directory": "packages/work-board"
|
|
18
13
|
},
|
|
14
|
+
"license": "MIT",
|
|
19
15
|
"sideEffects": false,
|
|
20
|
-
"
|
|
21
|
-
|
|
16
|
+
"type": "module",
|
|
17
|
+
"imports": {
|
|
18
|
+
"#test/*": "./test/*",
|
|
19
|
+
"#*.ts": {
|
|
20
|
+
"source": "./src/*.ts",
|
|
21
|
+
"types": "./dist/*.d.ts",
|
|
22
|
+
"default": "./dist/*.js"
|
|
23
|
+
}
|
|
22
24
|
},
|
|
23
|
-
"files": [
|
|
24
|
-
"dist",
|
|
25
|
-
"src",
|
|
26
|
-
"CHANGELOG.md",
|
|
27
|
-
"README.md"
|
|
28
|
-
],
|
|
29
25
|
"exports": {
|
|
30
26
|
".": {
|
|
31
27
|
"types": "./dist/index.d.ts",
|
|
@@ -35,21 +31,24 @@
|
|
|
35
31
|
},
|
|
36
32
|
"./package.json": "./package.json"
|
|
37
33
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"provenance": true
|
|
34
|
+
"bin": {
|
|
35
|
+
"work-board": "./dist/cli.js"
|
|
41
36
|
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"src",
|
|
40
|
+
"CHANGELOG.md",
|
|
41
|
+
"README.md"
|
|
42
|
+
],
|
|
42
43
|
"dependencies": {
|
|
43
44
|
"mermaid": "11.16.1",
|
|
44
45
|
"satteri": "0.9.5",
|
|
45
46
|
"shiki": "4.4.2"
|
|
46
47
|
},
|
|
47
|
-
"peerDependencies": {
|
|
48
|
-
"@effect/platform-node": "4.0.0-rc.112",
|
|
49
|
-
"effect": "4.0.0-rc.112"
|
|
50
|
-
},
|
|
51
48
|
"devDependencies": {
|
|
52
49
|
"@effect/platform-node": "4.0.0-rc.112",
|
|
50
|
+
"@effect/platform-node-shared": "4.0.0-rc.112",
|
|
51
|
+
"@shivaedev/quality": "0.7.3",
|
|
53
52
|
"@types/hast": "3.0.5",
|
|
54
53
|
"@types/mdast": "4.0.4",
|
|
55
54
|
"@types/node": "24.10.1",
|
|
@@ -59,13 +58,22 @@
|
|
|
59
58
|
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
60
59
|
"vitest": "4.1.9"
|
|
61
60
|
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"@effect/platform-node": "4.0.0-rc.112",
|
|
63
|
+
"@effect/platform-node-shared": "4.0.0-rc.112",
|
|
64
|
+
"effect": "4.0.0-rc.112"
|
|
65
|
+
},
|
|
66
|
+
"engines": {
|
|
67
|
+
"node": ">=24"
|
|
68
|
+
},
|
|
69
|
+
"publishConfig": {
|
|
70
|
+
"access": "public",
|
|
71
|
+
"provenance": true
|
|
72
|
+
},
|
|
62
73
|
"scripts": {
|
|
63
74
|
"build": "node --eval \"import('node:fs').then(({ rmSync }) => rmSync('dist', { force: true, recursive: true }))\" && tsc6 --project tsconfig.build.json",
|
|
64
|
-
"
|
|
75
|
+
"ready": "pnpm typecheck && pnpm test && pnpm build",
|
|
65
76
|
"test": "vitest run",
|
|
66
|
-
"
|
|
67
|
-
"typecheck": "tsc --noEmit",
|
|
68
|
-
"typecheck:compat": "tsc6 --noEmit",
|
|
69
|
-
"ready": "pnpm check && pnpm typecheck && pnpm typecheck:compat && pnpm test && pnpm build && pnpm test:package"
|
|
77
|
+
"typecheck": "tsc --noEmit"
|
|
70
78
|
}
|
|
71
79
|
}
|
package/src/board.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { Effect, type FileSystem, Layer, type Path } from "effect";
|
|
1
|
+
import { Effect, type FileSystem, Layer, type Path, type PlatformError } from "effect";
|
|
2
2
|
import { HttpRouter, type HttpServerRequest, type HttpServerResponse } from "effect/unstable/http";
|
|
3
|
-
import { watchChanges } from "
|
|
4
|
-
import { homeIn } from "
|
|
5
|
-
import { ASSETS, MERMAID_ROUTE, mermaidFile, mermaidRoot } from "
|
|
6
|
-
import { events } from "
|
|
7
|
-
import { loopbackOnly } from "
|
|
8
|
-
import { page } from "
|
|
9
|
-
import { respond } from "
|
|
10
|
-
import {
|
|
3
|
+
import { watchChanges } from "#files/changes.ts";
|
|
4
|
+
import { type HomeMissing, homeIn } from "#files/home.ts";
|
|
5
|
+
import { ASSETS, MERMAID_ROUTE, type MermaidMissing, mermaidFile, mermaidRoot } from "#http/assets.ts";
|
|
6
|
+
import { events } from "#http/events.ts";
|
|
7
|
+
import { loopbackOnly } from "#http/loopback.ts";
|
|
8
|
+
import { page } from "#http/page.ts";
|
|
9
|
+
import { respond } from "#http/respond.ts";
|
|
10
|
+
import type { RenderFailed } from "#render/failed.ts";
|
|
11
|
+
import { Highlighter } from "#render/highlighter.ts";
|
|
11
12
|
|
|
12
13
|
export interface BoardOptions {
|
|
13
|
-
readonly root: string;
|
|
14
14
|
readonly home?: string | undefined;
|
|
15
|
+
readonly root: string;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
type Services = Highlighter | FileSystem.FileSystem | Path.Path;
|
|
@@ -35,10 +36,14 @@ const routes = (options: BoardOptions) =>
|
|
|
35
36
|
yield* serve(route, () => Effect.succeed(respond(body, contentType)));
|
|
36
37
|
}
|
|
37
38
|
yield* serve(MERMAID_ROUTE, mermaidFile(mermaid));
|
|
38
|
-
const pages = page({ root: options.root
|
|
39
|
+
const pages = page({ home, root: options.root }, changes);
|
|
39
40
|
yield* serve("/", pages);
|
|
40
41
|
yield* serve("/*", pages);
|
|
41
42
|
}),
|
|
42
43
|
);
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
type BoardError = HomeMissing | MermaidMissing | PlatformError.PlatformError | RenderFailed;
|
|
46
|
+
type BoardServices = FileSystem.FileSystem | HttpRouter.HttpRouter | Path.Path | HttpRouter.Request<"Error", PlatformError.PlatformError>;
|
|
47
|
+
|
|
48
|
+
export const boardLayer = (options: BoardOptions): Layer.Layer<never, BoardError, BoardServices> =>
|
|
49
|
+
routes(options).pipe(Layer.provide(Highlighter.layer));
|
package/src/cli.ts
CHANGED
|
@@ -4,19 +4,19 @@ import { Effect, Layer, Option, Path } from "effect";
|
|
|
4
4
|
import { Argument, Command, Flag } from "effect/unstable/cli";
|
|
5
5
|
import { HOST, serveBoard } from "./serve.ts";
|
|
6
6
|
|
|
7
|
-
const VERSION = "0.1
|
|
7
|
+
const VERSION = "0.2.1";
|
|
8
8
|
|
|
9
9
|
const serve = Effect.fn("WorkBoard.serve")(function* (input: { readonly dir: string; readonly port: number; readonly home: Option.Option<string> }) {
|
|
10
10
|
const path = yield* Path.Path;
|
|
11
|
-
return yield* Layer.launch(serveBoard({
|
|
11
|
+
return yield* Layer.launch(serveBoard({ home: Option.getOrUndefined(input.home), port: input.port, root: path.resolve(input.dir) }));
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
const workBoard = Command.make(
|
|
15
15
|
"work-board",
|
|
16
16
|
{
|
|
17
17
|
dir: Argument.directory("dir", { mustExist: true }).pipe(Argument.withDescription("The folder of markdown files to serve")),
|
|
18
|
-
port: Flag.integer("port").pipe(Flag.withDefault(4747), Flag.withDescription(`The port to listen on at ${HOST}`)),
|
|
19
18
|
home: Flag.string("home").pipe(Flag.optional, Flag.withDescription("The file shown as a board at /, relative to the folder")),
|
|
19
|
+
port: Flag.integer("port").pipe(Flag.withDefault(4747), Flag.withDescription(`The port to listen on at ${HOST}`)),
|
|
20
20
|
},
|
|
21
21
|
serve,
|
|
22
22
|
).pipe(Command.withDescription("Serve a folder of markdown files as a live page that updates in place when a file changes."));
|
package/src/files/changes.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Data, Deferred, Effect, FileSystem, Option, Path, type PlatformError, PubSub, Ref, Schedule, Stream } from "effect";
|
|
2
2
|
import { isMarkdown, listMarkdown, type MarkdownFile } from "./list.ts";
|
|
3
3
|
|
|
4
|
-
export type Change = { readonly _tag: "Changed"; readonly paths:
|
|
4
|
+
export type Change = { readonly _tag: "Changed"; readonly paths: readonly string[] } | { readonly _tag: "Watching"; readonly watching: boolean };
|
|
5
5
|
|
|
6
6
|
export interface Changes {
|
|
7
|
-
readonly realRoot: string;
|
|
8
7
|
readonly events: PubSub.PubSub<Change>;
|
|
8
|
+
readonly files: Effect.Effect<readonly MarkdownFile[], PlatformError.PlatformError>;
|
|
9
|
+
readonly realRoot: string;
|
|
9
10
|
readonly watching: Ref.Ref<boolean>;
|
|
10
|
-
readonly files: Effect.Effect<ReadonlyArray<MarkdownFile>, PlatformError.PlatformError>;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
interface Cached {
|
|
14
|
+
readonly files: readonly MarkdownFile[];
|
|
14
15
|
readonly generation: number;
|
|
15
|
-
readonly files: ReadonlyArray<MarkdownFile>;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
class WatchEnded extends Data.TaggedError("WatchEnded") {}
|
|
@@ -63,9 +63,9 @@ export const watchChanges = Effect.fn("WorkBoard.watchChanges")(function* (root:
|
|
|
63
63
|
return hit.value.files;
|
|
64
64
|
}
|
|
65
65
|
const listed = yield* listMarkdown(root, realRoot).pipe(Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path));
|
|
66
|
-
yield* Ref.set(cached, Option.some({
|
|
66
|
+
yield* Ref.set(cached, Option.some({ files: listed, generation: now }));
|
|
67
67
|
return listed;
|
|
68
68
|
});
|
|
69
|
-
const changes: Changes = {
|
|
69
|
+
const changes: Changes = { events, files, realRoot, watching };
|
|
70
70
|
return changes;
|
|
71
71
|
});
|
package/src/files/list.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Effect, FileSystem, Option, Path, type PlatformError } from "effect";
|
|
2
2
|
|
|
3
3
|
export interface MarkdownFile {
|
|
4
|
-
readonly path: string;
|
|
5
4
|
readonly modified: number;
|
|
5
|
+
readonly path: string;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
const skipped = (segment: string): boolean => segment.startsWith(".") || segment === "node_modules";
|
|
@@ -15,7 +15,7 @@ const folderOf = (path: string): string => path.slice(0, Math.max(0, path.lastIn
|
|
|
15
15
|
|
|
16
16
|
const byFolder = (left: string, right: string): number => folderOf(left).localeCompare(folderOf(right)) || left.localeCompare(right);
|
|
17
17
|
|
|
18
|
-
type Listing = Effect.Effect<
|
|
18
|
+
type Listing = Effect.Effect<readonly MarkdownFile[], PlatformError.PlatformError>;
|
|
19
19
|
|
|
20
20
|
export const listMarkdown = Effect.fn("WorkBoard.listMarkdown")(function* (root: string, realRoot: string) {
|
|
21
21
|
const fs = yield* FileSystem.FileSystem;
|
|
@@ -35,7 +35,7 @@ export const listMarkdown = Effect.fn("WorkBoard.listMarkdown")(function* (root:
|
|
|
35
35
|
return yield* Effect.orElseSucceed(folder(relative, real.value), () => []);
|
|
36
36
|
}
|
|
37
37
|
const modified = Option.match(info.value.mtime, { onNone: () => 0, onSome: (date) => date.getTime() });
|
|
38
|
-
return info.value.type === "File" && relative.endsWith(".md") ? [{ path: relative
|
|
38
|
+
return info.value.type === "File" && relative.endsWith(".md") ? [{ modified, path: relative }] : [];
|
|
39
39
|
});
|
|
40
40
|
const folder = (relative: string, real: string): Listing =>
|
|
41
41
|
Effect.gen(function* () {
|
package/src/http/assets.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { Data, Effect, FileSystem, Path } from "effect";
|
|
3
3
|
import type { HttpRouter, HttpServerRequest } from "effect/unstable/http";
|
|
4
|
-
import { client } from "
|
|
5
|
-
import { diagrams } from "
|
|
6
|
-
import { style } from "
|
|
7
|
-
import { swap } from "
|
|
4
|
+
import { client } from "#page/client.ts";
|
|
5
|
+
import { diagrams } from "#page/diagrams.ts";
|
|
6
|
+
import { style } from "#page/style.ts";
|
|
7
|
+
import { swap } from "#page/swap.ts";
|
|
8
8
|
import { respond } from "./respond.ts";
|
|
9
9
|
|
|
10
10
|
export const ASSETS: ReadonlyArray<readonly [HttpRouter.PathInput, string, string]> = [
|
|
@@ -20,7 +20,7 @@ export class MermaidMissing extends Data.TaggedError("MermaidMissing")<{ readonl
|
|
|
20
20
|
|
|
21
21
|
export const mermaidRoot = Effect.fn("WorkBoard.mermaidRoot")(function* () {
|
|
22
22
|
const path = yield* Path.Path;
|
|
23
|
-
const entry = yield* Effect.try({ try: () => createRequire(import.meta.url).resolve("mermaid")
|
|
23
|
+
const entry = yield* Effect.try({ catch: (cause) => new MermaidMissing({ cause }), try: () => createRequire(import.meta.url).resolve("mermaid") });
|
|
24
24
|
return path.dirname(entry);
|
|
25
25
|
});
|
|
26
26
|
|
|
@@ -29,7 +29,7 @@ export const mermaidFile = (mermaidRoot: string) =>
|
|
|
29
29
|
const fs = yield* FileSystem.FileSystem;
|
|
30
30
|
const path = yield* Path.Path;
|
|
31
31
|
const file = path.resolve(mermaidRoot, new URL(request.url, "http://127.0.0.1").pathname.slice(MERMAID.length));
|
|
32
|
-
if (!file.startsWith(`${mermaidRoot}${path.sep}`)
|
|
32
|
+
if (!(file.startsWith(`${mermaidRoot}${path.sep}`) && file.endsWith(".mjs") && (yield* fs.exists(file)))) {
|
|
33
33
|
return respond("Not found", "text/plain", 404);
|
|
34
34
|
}
|
|
35
35
|
return respond(yield* fs.readFile(file), "text/javascript");
|
package/src/http/events.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Effect, PubSub, Ref, Stream } from "effect";
|
|
2
2
|
import { Sse } from "effect/unstable/encoding";
|
|
3
3
|
import { HttpServerResponse } from "effect/unstable/http";
|
|
4
|
-
import type { Change, Changes } from "
|
|
4
|
+
import type { Change, Changes } from "#files/changes.ts";
|
|
5
5
|
import { HEADERS } from "./respond.ts";
|
|
6
6
|
|
|
7
|
-
const event = (name: string, data = ""): Sse.Event => ({ _tag: "Event", event: name, id: undefined
|
|
7
|
+
const event = (name: string, data = ""): Sse.Event => ({ _tag: "Event", data, event: name, id: undefined });
|
|
8
8
|
|
|
9
9
|
const watching = (up: boolean): Sse.Event => event(up ? "ready" : "down");
|
|
10
10
|
|
package/src/http/loopback.ts
CHANGED
|
@@ -13,8 +13,8 @@ const hostnameOf = (host: string): string | undefined => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
const loopbackAddress = (address: string): boolean => {
|
|
16
|
-
const unmapped = address.replace(/^::ffff:/
|
|
17
|
-
return unmapped === "::1" || /^127(?:\.\d{1,3}){3}
|
|
16
|
+
const unmapped = address.replace(/^::ffff:/iu, "");
|
|
17
|
+
return unmapped === "::1" || /^127(?:\.\d{1,3}){3}$/u.test(unmapped);
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const fromLoopback = (request: HttpServerRequest.HttpServerRequest): boolean => {
|
package/src/http/page.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { Effect, FileSystem, Option, Path } from "effect";
|
|
2
2
|
import type { HttpServerRequest } from "effect/unstable/http";
|
|
3
|
-
import type { Changes } from "
|
|
4
|
-
import { type MarkdownFile, within } from "
|
|
5
|
-
import { boardHtml } from "
|
|
6
|
-
import { documentHtml } from "
|
|
7
|
-
import { escapeHtml } from "
|
|
8
|
-
import { navHtml } from "
|
|
9
|
-
import { shell } from "
|
|
10
|
-
import { boardOf } from "
|
|
3
|
+
import type { Changes } from "#files/changes.ts";
|
|
4
|
+
import { type MarkdownFile, within } from "#files/list.ts";
|
|
5
|
+
import { boardHtml } from "#page/board.ts";
|
|
6
|
+
import { documentHtml } from "#page/document.ts";
|
|
7
|
+
import { escapeHtml } from "#page/escape.ts";
|
|
8
|
+
import { navHtml } from "#page/nav.ts";
|
|
9
|
+
import { shell } from "#page/shell.ts";
|
|
10
|
+
import { boardOf } from "#render/board.ts";
|
|
11
11
|
import { respond } from "./respond.ts";
|
|
12
12
|
|
|
13
13
|
export interface PageOptions {
|
|
14
|
-
readonly root: string;
|
|
15
14
|
readonly home: string | undefined;
|
|
15
|
+
readonly root: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const requestedPath = (url: string): string => {
|
|
19
|
-
const pathname = new URL(url, "http://127.0.0.1").pathname.replace(
|
|
19
|
+
const pathname = new URL(url, "http://127.0.0.1").pathname.replace(/^\/+/u, "");
|
|
20
20
|
try {
|
|
21
21
|
return decodeURIComponent(pathname);
|
|
22
22
|
} catch {
|
package/src/page/board.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
|
-
import { type Board, countsOf, type Section } from "
|
|
3
|
-
import { renderMarkdown } from "
|
|
2
|
+
import { type Board, countsOf, type Section } from "#render/board.ts";
|
|
3
|
+
import { renderMarkdown } from "#render/markdown.ts";
|
|
4
4
|
import { escapeHtml } from "./escape.ts";
|
|
5
5
|
import { updated } from "./updated.ts";
|
|
6
6
|
|
package/src/page/document.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
|
-
import type { MarkdownFile } from "
|
|
3
|
-
import { renderMarkdown } from "
|
|
2
|
+
import type { MarkdownFile } from "#files/list.ts";
|
|
3
|
+
import { renderMarkdown } from "#render/markdown.ts";
|
|
4
4
|
import { escapeHtml } from "./escape.ts";
|
|
5
5
|
import { updated } from "./updated.ts";
|
|
6
6
|
|