authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-09-29 01:13:10-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-10-14 02:40:47-07:00
log367f564c813bfada851a56e3d80a2bb51fa9fd6d
tree523a263fa4a89db40795e9b2d312774105aa5a54
parentcd988f1930b18b9a8a7f443f104b45569efb5f6d
signature Commit is signed but in an unrecognized format.

chore(lib): publish to jsr and npm

https://jsr.io/@clo/lib https://www.npmjs.com/package/@paperclover/lib

17 files changed, 755 insertions(+), 51 deletions(-)

.gitignore+1
......@@ -1,4 +1,5 @@
11.clover
22.env
3lib/dist-npm
34node_modules
45
lib/assert.ts+2-2
......@@ -8,7 +8,7 @@ export function ASSERT(condition: boolean, msg?: Message): asserts condition {
88}
99
1010/** Assert that `nullable` is non-null, returning a non-nullable T */
11export function UNWRAP<T>(nullable: T | null | undefined, msg?: Message) {
11export function UNWRAP<T>(nullable: T | null | undefined, msg?: Message): T {
1212 if (nullable == null) {
1313 throw new Error(
1414 `Unexpected ${nullable}${msg ? `: ${messageToString(msg)}` : ""}`,
......@@ -18,7 +18,7 @@ export function UNWRAP<T>(nullable: T | null | undefined, msg?: Message) {
1818}
1919
2020/** Assert that `number` is not NaN */
21export function FINITE(number: number, msg?: Message) {
21export function FINITE(number: number, msg?: Message): number {
2222 if (Number.isNaN(number)) {
2323 throw new Error(`Unexpected NaN${msg ? `: ${messageToString(msg)}` : ""}`);
2424 }
lib/deno.json+16-8
......@@ -1,16 +1,24 @@
11{
22 "name": "@clo/lib",
3 "description": "",
34 "version": "1.0.0",
45 "license": "MIT",
56 "exports": {
6 "./log": "./log.ts",
7 "./log/ansi": "./log/ansi.ts",
8 "./log/headless": "./log/headless.ts",
9 "./queue": "./queue.ts",
10 "./string": "./string.ts",
11 "./ts": "./ts.ts"
7 "./assert.ts": "./assert.ts",
8 "./log.ts": "./log.ts",
9 "./log/ansi.ts": "./log/ansi.ts",
10 "./log/headless.ts": "./log/headless.ts",
11 "./log/progress.ts": "./log/progress.ts",
12 "./log/stack.ts": "./log/stack.ts",
13 "./packaging.ts": "./packaging.ts",
14 "./queue.ts": "./queue.ts",
15 "./string.ts": "./string.ts",
16 "./ts.ts": "./ts.ts"
1217 },
1318 "imports": {
1419 "lib/": "./"
15 }
16}
20 },
21 "exclude": [
22 "readme.npm.md"
23 ]
24}
\ No newline at end of file
lib/deno.lock+155-1
......@@ -1,15 +1,169 @@
11{
22 "version": "5",
33 "specifiers": {
4 "npm:@types/node@*": "24.2.0"
4 "npm:@types/node@*": "24.2.0",
5 "npm:ts-to-jsdoc@2.4.0": "2.4.0"
56 },
67 "npm": {
8 "@nodelib/fs.scandir@2.1.5": {
9 "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
10 "dependencies": [
11 "@nodelib/fs.stat",
12 "run-parallel"
13 ]
14 },
15 "@nodelib/fs.stat@2.0.5": {
16 "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A=="
17 },
18 "@nodelib/fs.walk@1.2.8": {
19 "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
20 "dependencies": [
21 "@nodelib/fs.scandir",
22 "fastq"
23 ]
24 },
25 "@ts-morph/common@0.24.0": {
26 "integrity": "sha512-c1xMmNHWpNselmpIqursHeOHHBTIsJLbB+NuovbTTRCNiTLEr/U9dbJ8qy0jd/O2x5pc3seWuOUN5R2IoOTp8A==",
27 "dependencies": [
28 "fast-glob",
29 "minimatch",
30 "mkdirp",
31 "path-browserify"
32 ]
33 },
734 "@types/node@24.2.0": {
835 "integrity": "sha512-3xyG3pMCq3oYCNg7/ZP+E1ooTaGB4cG8JWRsqqOYQdbWNY4zbaV0Ennrd7stjiJEFZCaybcIgpTjJWHRfBSIDw==",
936 "dependencies": [
1037 "undici-types"
1138 ]
1239 },
40 "arg@5.0.2": {
41 "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg=="
42 },
43 "balanced-match@1.0.2": {
44 "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
45 },
46 "brace-expansion@2.0.2": {
47 "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
48 "dependencies": [
49 "balanced-match"
50 ]
51 },
52 "braces@3.0.3": {
53 "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
54 "dependencies": [
55 "fill-range"
56 ]
57 },
58 "code-block-writer@13.0.3": {
59 "integrity": "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg=="
60 },
61 "fast-glob@3.3.3": {
62 "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
63 "dependencies": [
64 "@nodelib/fs.stat",
65 "@nodelib/fs.walk",
66 "glob-parent",
67 "merge2",
68 "micromatch"
69 ]
70 },
71 "fastq@1.19.1": {
72 "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
73 "dependencies": [
74 "reusify"
75 ]
76 },
77 "fill-range@7.1.1": {
78 "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
79 "dependencies": [
80 "to-regex-range"
81 ]
82 },
83 "glob-parent@5.1.2": {
84 "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
85 "dependencies": [
86 "is-glob"
87 ]
88 },
89 "is-extglob@2.1.1": {
90 "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="
91 },
92 "is-glob@4.0.3": {
93 "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
94 "dependencies": [
95 "is-extglob"
96 ]
97 },
98 "is-number@7.0.0": {
99 "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
100 },
101 "merge2@1.4.1": {
102 "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="
103 },
104 "micromatch@4.0.8": {
105 "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
106 "dependencies": [
107 "braces",
108 "picomatch"
109 ]
110 },
111 "minimatch@9.0.5": {
112 "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
113 "dependencies": [
114 "brace-expansion"
115 ]
116 },
117 "mkdirp@3.0.1": {
118 "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==",
119 "bin": true
120 },
121 "path-browserify@1.0.1": {
122 "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="
123 },
124 "picomatch@2.3.1": {
125 "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="
126 },
127 "queue-microtask@1.2.3": {
128 "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="
129 },
130 "reusify@1.1.0": {
131 "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw=="
132 },
133 "run-parallel@1.2.0": {
134 "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
135 "dependencies": [
136 "queue-microtask"
137 ]
138 },
139 "to-regex-range@5.0.1": {
140 "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
141 "dependencies": [
142 "is-number"
143 ]
144 },
145 "ts-morph@23.0.0": {
146 "integrity": "sha512-FcvFx7a9E8TUe6T3ShihXJLiJOiqyafzFKUO4aqIHDUCIvADdGNShcbc2W5PMr3LerXRv7mafvFZ9lRENxJmug==",
147 "dependencies": [
148 "@ts-morph/common",
149 "code-block-writer"
150 ]
151 },
152 "ts-to-jsdoc@2.4.0": {
153 "integrity": "sha512-RiI9ipxkLjXESp5+YjXIQJ5GgtjwWTZU4uDahxsIdr1HKLFaC/nQOtgkGRJ+AFxqHrrhwrXtPh093r0nXQwKmw==",
154 "dependencies": [
155 "arg",
156 "ts-morph"
157 ],
158 "optionalDependencies": [
159 "typescript"
160 ],
161 "bin": true
162 },
163 "typescript@5.9.2": {
164 "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
165 "bin": true
166 },
13167 "undici-types@7.10.0": {
14168 "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag=="
15169 }
lib/log.ts+4
......@@ -10,6 +10,10 @@ export function warn(...args: unknown[]) {
1010export function error(...args: unknown[]) {
1111 globalLog.error(...args);
1212}
13/** debugging */
14export function debug(...args: unknown[]) {
15 globalLog(...args);
16}
1317
1418export interface Scope {
1519 /** default call signature is informational scope */
lib/log/ansi.ts+1-1
......@@ -128,4 +128,4 @@ export function debugAnsi(text: string): string {
128128 return text;
129129}
130130
131import * as self from "./ansi.ts";
131import * as self from "lib/log/ansi.ts";
lib/log/headless.ts+2-7
......@@ -85,12 +85,7 @@ export function widgetHost(env: WidgetHostEnv): WidgetHost {
8585 let next = Infinity;
8686 if (widgets[0]) {
8787 for (let w = 0, { length } = widgets; w < length; w += 1) {
88 const outText = UNWRAP(widgets[w]).format({
89 now: lastFlush,
90 columns,
91 rows,
92 colors: true,
93 });
88 const outText = UNWRAP(widgets[w]).format(lastFlush);
9489 if (!outText) {
9590 widgets.splice(w, 1);
9691 UNWRAP(internals.splice(w, 1)[0]).unsub?.();
......@@ -331,4 +326,4 @@ import * as ts from "lib/ts.ts";
331326import * as stack from "lib/log/stack.ts";
332327import * as util from "node:util";
333328import { UNWRAP } from "lib/assert.ts";
334import type * as log from "../log.ts";
329import type * as log from "lib/log.ts";
lib/log/progress.sample.ts+1-1
......@@ -69,5 +69,5 @@ function random() {
6969 return Math.floor(Math.random() * 9999999).toString(32);
7070}
7171
72import * as progress from "./progress.ts";
72import * as progress from "lib/log/progress.ts";
7373import * as timers from "node:timers/promises";
lib/log/progress.ts+23-14
......@@ -63,7 +63,12 @@ export interface Node extends Ref {
6363}
6464
6565export interface StartOptions {
66 value?: number | undefined | null;
6667 estimate?: number | undefined | null;
68 passive?: boolean | undefined | null;
69 showEstimate?: boolean | undefined | null;
70 maxHeight?: number | undefined | null;
71 sortChildren?: Node["sortChildren"] | undefined | null;
6772}
6873
6974/** a valid `Node` without any output */
......@@ -103,18 +108,18 @@ type Signal =
103108
104109function newNode(
105110 text: string,
106 { estimate }: StartOptions = {},
111 opts: StartOptions = {},
107112): [Internal, Node] {
108113 const state: Internal = {
109114 text,
110 value: 0,
111 estimate: estimate ?? 0,
112 showEstimate: true,
113 passive: false,
115 value: opts.value ?? 0,
116 estimate: opts.estimate ?? 0,
117 showEstimate: opts.showEstimate ?? true,
118 passive: opts.passive ?? false,
114119 logs: [],
115120 children: [],
116121 parent: null,
117 sortChildren: null,
122 sortChildren: opts.sortChildren ?? null,
118123 signal() {
119124 throw new Error("no signaler");
120125 },
......@@ -225,7 +230,7 @@ function newNode(
225230 return [state, binding];
226231}
227232
228function format(now: number, list: Internal[]) {
233function formatProgress(now: number, list: Internal[]): string {
229234 let out = "";
230235 for (const top of list) {
231236 if (top.passive && top.children.length === 0) continue;
......@@ -236,15 +241,19 @@ function format(now: number, list: Internal[]) {
236241}
237242
238243/** These functions are used to test `lib/log/progress` */
239export const internals = {
240 node(text: string, props: Partial<Internal>, children: Internal[]): Internal {
244export namespace internals {
245 export function node(
246 text: string,
247 props: Partial<Internal>,
248 children: Internal[],
249 ): Internal {
241250 const [node] = newNode(text);
242251 Object.assign(node, props);
243252 node.children.push(...children);
244253 return node;
245 },
246 format,
247};
254 }
255 export const format = formatProgress;
256}
248257
249258const spinnerFps = 12.5;
250259
......@@ -313,7 +322,7 @@ function renderChildren(state: Internal, now: number, depth: boolean[]) {
313322 * which did ffmpeg handling. It is probably one of the coolest progress bars
314323 * ever imagined.
315324 */
316export function getUnicodeBar(progress: number, width: number) {
325export function getUnicodeBar(progress: number, width: number): string {
317326 if (progress >= 1) return fullBar.repeat(width);
318327 if (progress <= 0 || Number.isNaN(progress)) return " ".repeat(width);
319328
......@@ -352,7 +361,7 @@ export class Headless {
352361 }
353362
354363 widget: log.Widget = {
355 format: (now) => format(now, this.active),
364 format: (now) => formatProgress(now, this.active),
356365 onChange: (
357366 rerender,
358367 ) => (this.#rerender = rerender, () => this.#rerender = null),
lib/log/stack.ts+11-9
......@@ -32,7 +32,7 @@ export interface Frame {
3232const regexV8Stack = /^\s*at .*(\S+:\d+|\(native\))/m;
3333const regexLocation = /(.+?)(?::(\d+))?(?::(\d+))?$/;
3434
35export function parse(error: Error): null | Frame[] {
35export function parse(error: Error): Frame[] | null {
3636 const stack = error?.stack;
3737 if (typeof stack === "string") {
3838 if (stack.match(regexV8Stack)) {
......@@ -43,7 +43,7 @@ export function parse(error: Error): null | Frame[] {
4343 return null;
4444}
4545
46export function format(error: Error, colors = false) {
46export function format(error: Error, colors = false): string {
4747 const { name, message, stack: _, ...payload } = error;
4848
4949 const headingLine = (colors ? ansi.fgRed : "") +
......@@ -63,11 +63,10 @@ export function format(error: Error, colors = false) {
6363 if ("Bun" in globalThis) {
6464 frames = frames.filter((frame) =>
6565 frame.file !== "native" || ![
66 "moduleEvaluation",
6766 "moduleEvaluation",
6867 "loadAndEvaluateModule",
6968 "processTicksAndRejections",
70 ].includes(frame.fn)
69 ].includes(frame.fn ?? "")
7170 );
7271 }
7372 if (frames.length) {
......@@ -77,7 +76,10 @@ export function format(error: Error, colors = false) {
7776 return headingLine + payloadLines + frameLines + "\n";
7877}
7978
80export function formatFrame({ fn, file, line, col }: Frame, colors: boolean) {
79export function formatFrame(
80 { fn, file, line, col }: Frame,
81 colors: boolean,
82): string {
8183 let out = "";
8284 if (file === "native") file = null;
8385 const internal = !file || file.startsWith("node:") ||
......@@ -102,7 +104,7 @@ export function formatFrame({ fn, file, line, col }: Frame, colors: boolean) {
102104
103105 if (colors) {
104106 if (root) {
105 const [pathTo, project, sub] = root;
107 const [pathTo, project] = root;
106108 out += ansi.dim + pathTo +
107109 ansi.mergeStyles(ansi.resetWeight + ansi.fgCyan) +
108110 project + ansi.fgReset;
......@@ -312,7 +314,7 @@ function parseV8OrIe(stack: string): Frame[] {
312314 : locationParts[0];
313315
314316 return {
315 fn: functionName,
317 fn: functionName ?? null,
316318 file: fileName,
317319 line: 0 | locationParts[1],
318320 col: 0 | locationParts[2],
......@@ -322,8 +324,8 @@ function parseV8OrIe(stack: string): Frame[] {
322324
323325function parseJscOrSpidermonkey(stack: string): Frame[] {
324326 // Using string literal "\n" does not work in Safari.
325 return stack.split(/\n/g).map((source, i) => {
326 let fn = "";
327 return stack.split(/\n/g).map((source) => {
328 let fn: string | null = "";
327329 let file: string | null = null;
328330 let line: number | null = null;
329331 let col: number | null = null;
lib/packaging.ts created+131
......@@ -0,0 +1,131 @@
1// Tools that `lib` uses to package itself for NPM.
2// This depends on an installation of `ts-to-jsdoc` available as a resolvable node module.
3
4export async function updateJsrPackageExportsToAll(
5 absPath: string,
6 p: progress.Ref,
7) {
8 using _ = p.start("update deno.json");
9 const manifestPath = path.join(absPath, "deno.json");
10 const deno = JSON.parse(
11 await fs.readFile(manifestPath, "utf-8"),
12 );
13 const newExports: Record<string, string> = {};
14 for (const subPath of await fs.readdir(absPath, { recursive: true })) {
15 if (!subPath.match(/\.tsx?$/)) continue;
16 if (subPath.match(/\.(test|sample)\.tsx?$/)) continue;
17 if (subPath.startsWith("dist")) continue;
18 newExports["./" + subPath] = "./" + subPath;
19 }
20 deno.exports = Object.fromEntries(
21 Object.entries(newExports).sort(([a], [b]) => a.localeCompare(b)),
22 ) as typeof deno.exports;
23 await fs.writeFile(manifestPath, JSON.stringify(deno, null, 2));
24}
25
26interface TsToJsdoc {
27 transpileFile: (opts: { code: string }) => string;
28}
29
30export async function transpileForNpm(
31 absPath: string,
32 p: progress.Ref,
33 packageJson: Record<string, unknown>,
34 tsToJsdoc?: TsToJsdoc,
35) {
36 try {
37 // @ts-expect-error optional dependency
38 tsToJsdoc ??= await import("ts-to-jsdoc") as TsToJsdoc;
39 } catch {
40 // @ts-expect-error unsupported import specifier
41 tsToJsdoc ??= await import("npm:ts-to-jsdoc@2.4.0") as TsToJsdoc;
42 }
43 const { transpileFile } = tsToJsdoc;
44
45 using node = p.start("transpile into jsdoc for npm");
46 const manifestPath = path.join(absPath, "deno.json");
47 const deno = JSON.parse(
48 await fs.readFile(manifestPath, "utf-8"),
49 );
50 const distPath = path.join(absPath, "dist-npm");
51 await fs.rm(distPath, { recursive: true, force: true });
52 await fs.mkdir(distPath, { recursive: true });
53
54 const files: string[] = [];
55 const exports: Record<string, string> = {};
56 for (const subPath of await fs.readdir(absPath, { recursive: true })) {
57 if (!subPath.match(/\.tsx?$/)) continue;
58 if (subPath.startsWith("dist")) continue;
59 files.push(subPath);
60 }
61 node.estimate = Object.keys(exports).length;
62 for (const subPath of files) {
63 using _ = node.start(subPath);
64 const targetSubPath = subPath.replace(/\.tsx?$/, ".js");
65 if (!subPath.match(/\.(test|sample)\.tsx?$/)) {
66 exports["./" + subPath] = "./" + targetSubPath;
67 }
68
69 let code = transpileFile({
70 code: await fs.readFile(path.join(absPath, subPath), "utf-8"),
71 });
72 code = code.replace(
73 / from "lib\/([^"]+)"/g,
74 (_, src) => {
75 return ' from "./' + path.relative(
76 path.dirname(subPath),
77 src.replace(/\.tsx?$/, ".js"),
78 ) + '"';
79 },
80 );
81 if (packageJson.homepage) {
82 code =
83 "// This file is transpiled from TypeScript from paper clover's sitegen\n" +
84 "// " + packageJson.homepage + "/" + subPath + "\n" +
85 code;
86 }
87 const out = path.join(distPath, targetSubPath);
88 await fs.mkdir(path.dirname(out), { recursive: true });
89 await fs.writeFile(out, code);
90 node.value += 1;
91 }
92 await fs.cp(
93 path.join(absPath, "readme.npm.md"),
94 path.join(distPath, "readme.md"),
95 ).catch((e) => {
96 if (e.code !== "ENOENT") throw e;
97 });
98 await fs.cp(
99 path.join(absPath, "readme.changes.md"),
100 path.join(distPath, "readme.changes.md"),
101 ).catch((e) => {
102 if (e.code !== "ENOENT") throw e;
103 });
104 const { name, description, ...rest } = packageJson;
105 await fs.writeFile(
106 path.join(distPath, "package.json"),
107 JSON.stringify({
108 name,
109 description,
110 version: deno.version,
111 type: "module",
112 ...rest,
113 }),
114 );
115}
116
117if (import.meta.main) {
118 updateJsrPackageExportsToAll(import.meta.dirname!, progress)
119 .then(() =>
120 transpileForNpm(import.meta.dirname!, progress, {
121 name: "@paperclover/lib",
122 description: "high quality typescript libraries",
123 homepage:
124 "https://git.paperclover.net/clo/sitegen/src/branch/master/lib",
125 })
126 );
127}
128
129import * as progress from "lib/log/progress.ts";
130import * as path from "node:path";
131import * as fs from "node:fs/promises";
lib/readme.changes.md created+10
......@@ -0,0 +1,10 @@
1# notable changes in clover's typescript library
2
3## v1
4
5- new library `assert`
6- new library `log`
7- new library `packaging`
8- new library `queue`
9- new library `string`
10- new library `ts`
lib/readme.md+19-7
......@@ -1,12 +1,12 @@
1# clover's typescript library
1# [clover's typescript library]
22
33`lib` is a collection of high-quality typescript libraries for things missing in
44either browsers or node.js. originally, these were helper functions used to
55create my website, <https://paperclover.net>, but i started wanting them across
6projects.
6projects and at work.
77
88all top-level namespaces stand alone as their own projects, and generally do not
9depend on each other. no external dependencies == easy to audit.
9depend on each other. there are no external dependencies; code is easy to audit.
1010
1111the public api is simply all of the code. an overview:
1212
......@@ -18,15 +18,27 @@ the public api is simply all of the code. an overview:
1818<!-- - `subprocess` - rebuilt api for `node:child_process` -->
1919<!-- - `testing` -->
2020
21- `string`
21- `assert`
2222- `log` - logging, terminal i/o, interactive widgets
2323- `log/ansi` - cursor and color constants
2424- `log/headless` - use `log` and `log/progress` without a tty
2525- `log/progress` - progress bar, spinner, and tree
26- `log/stack` - stack trace parse and formatter
27- `packaging` - workflows used for `lib`'s publications
28- `queue` - priority queue with rescheduling
29- `string`
2630- `ts` typescript types and general purpose code
2731
2832these libraries are published as is, **without versioning or maintainance
29guarantees**. note that on package registries where a semantic version is
30required, a major version bump is done on each publication.
33guarantees**. every version is a breaking major release. please upgrade your
34libraries with intent, considering api changes in [readme.changes.md].
35individual modules may annotate their intended api and usage stability.
36
37keep in mind there are [known bugs and missing features] in this release.
38
39to contribute, please send bug reports or patches to <dev@paperclover.net>. new
40features may not be accepted if they are complex and don't further my use cases.
3141
32to contribute bug fixes, please send patches to <git@paperclover.net>.
42[readme.changes.md]: ./readme.changes.md
43[known bugs and missing features]: https://git.paperclover.net/clo/sitegen/issues?state=open&labels=4
44[clover's typescript library]: https://git.paperclover.net/clo/sitegen/src/branch/master/lib
lib/readme.npm.md created+49
......@@ -0,0 +1,49 @@
1# [clover's typescript library]
2
3`lib` is a collection of high-quality typescript libraries for things missing in
4either browsers or node.js. originally, these were helper functions used to
5create my website, <https://paperclover.net>, but i started wanting them across
6projects and at work.
7
8```sh
9# alias install "lib" using "@paperclover/lib"
10npm install lib@npm:@paperclover/lib
11```
12
13all top-level namespaces stand alone as their own projects, and generally do not
14depend on each other. there are no external dependencies; code is easy to audit.
15
16the public api is simply all of the code. an overview:
17
18<!-- - `async` -->
19<!-- - `error` - interop with the `unknown` type in error handlers -->
20<!-- - `fs` - rebuilt api for `node:fs` -->
21<!-- - `lru` - least recently used cache -->
22<!-- - `mime` - trimmed database of mime types -->
23<!-- - `subprocess` - rebuilt api for `node:child_process` -->
24<!-- - `testing` -->
25
26- `assert`
27- `log` - logging, terminal i/o, interactive widgets
28- `log/ansi` - cursor and color constants
29- `log/headless` - use `log` and `log/progress` without a tty
30- `log/progress` - progress bar, spinner, and tree
31- `log/stack` - stack trace parse and formatter
32- `packaging` - workflows used for `lib`'s publications
33- `queue` - priority queue with rescheduling
34- `string`
35- `ts` typescript types and general purpose code
36
37these libraries are published as is, **without versioning or maintainance
38guarantees**. every version is a breaking major release. please upgrade your
39libraries with intent, considering api changes in [readme.changes.md].
40individual modules may annotate their intended api and usage stability.
41
42keep in mind there are [known bugs and missing features] in this release.
43
44to contribute, please send bug reports or patches to <dev@paperclover.net>. new
45features may not be accepted if they are complex and don't further my use cases.
46
47[readme.changes.md]: ./readme.changes.md
48[known bugs and missing features]: https://git.paperclover.net/clo/sitegen/issues?state=open&labels=4
49[clover's typescript library]: https://git.paperclover.net/clo/sitegen/src/branch/master/lib
package-lock.json+327
......@@ -20,6 +20,7 @@
2020 "puppeteer": "^24.10.1",
2121 "sharp": "^0.34.2",
2222 "source-map-support": "^0.5.21",
23 "ts-to-jsdoc": "^2.4.0",
2324 "unique-names-generator": "^4.7.1",
2425 "vscode-oniguruma": "^2.0.1",
2526 "vscode-textmate": "^9.2.0"
......@@ -1560,6 +1561,41 @@
15601561 "win32"
15611562 ]
15621563 },
1564 "node_modules/@nodelib/fs.scandir": {
1565 "version": "2.1.5",
1566 "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
1567 "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
1568 "license": "MIT",
1569 "dependencies": {
1570 "@nodelib/fs.stat": "2.0.5",
1571 "run-parallel": "^1.1.9"
1572 },
1573 "engines": {
1574 "node": ">= 8"
1575 }
1576 },
1577 "node_modules/@nodelib/fs.stat": {
1578 "version": "2.0.5",
1579 "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
1580 "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
1581 "license": "MIT",
1582 "engines": {
1583 "node": ">= 8"
1584 }
1585 },
1586 "node_modules/@nodelib/fs.walk": {
1587 "version": "1.2.8",
1588 "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
1589 "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
1590 "license": "MIT",
1591 "dependencies": {
1592 "@nodelib/fs.scandir": "2.1.5",
1593 "fastq": "^1.6.0"
1594 },
1595 "engines": {
1596 "node": ">= 8"
1597 }
1598 },
15631599 "node_modules/@paperclover/console": {
15641600 "resolved": "git+https://git.paperclover.net/clo/console.git#1a6ac2b79fdd8a21a1c57d25723975872bc07e3e",
15651601 "dependencies": {
......@@ -1607,6 +1643,18 @@
16071643 "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==",
16081644 "license": "MIT"
16091645 },
1646 "node_modules/@ts-morph/common": {
1647 "version": "0.24.0",
1648 "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.24.0.tgz",
1649 "integrity": "sha512-c1xMmNHWpNselmpIqursHeOHHBTIsJLbB+NuovbTTRCNiTLEr/U9dbJ8qy0jd/O2x5pc3seWuOUN5R2IoOTp8A==",
1650 "license": "MIT",
1651 "dependencies": {
1652 "fast-glob": "^3.3.2",
1653 "minimatch": "^9.0.4",
1654 "mkdirp": "^3.0.1",
1655 "path-browserify": "^1.0.1"
1656 }
1657 },
16101658 "node_modules/@types/debug": {
16111659 "version": "4.1.12",
16121660 "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz",
......@@ -1765,6 +1813,12 @@
17651813 "url": "https://github.com/chalk/ansi-styles?sponsor=1"
17661814 }
17671815 },
1816 "node_modules/arg": {
1817 "version": "5.0.2",
1818 "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz",
1819 "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==",
1820 "license": "MIT"
1821 },
17681822 "node_modules/argparse": {
17691823 "version": "2.0.1",
17701824 "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
......@@ -1808,6 +1862,12 @@
18081862 "url": "https://github.com/sponsors/wooorm"
18091863 }
18101864 },
1865 "node_modules/balanced-match": {
1866 "version": "1.0.2",
1867 "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
1868 "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
1869 "license": "MIT"
1870 },
18111871 "node_modules/bare-events": {
18121872 "version": "2.6.0",
18131873 "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.6.0.tgz",
......@@ -1895,6 +1955,27 @@
18951955 "integrity": "sha512-cRygWd7kGBQO3VEhPiTgq4Wc43ctsM+o46urrmPOiuAe+07fzlSB9OJVdpgDL0jPqXUVQ9ht7aq7kxOeJHRK+w==",
18961956 "license": "MIT"
18971957 },
1958 "node_modules/brace-expansion": {
1959 "version": "2.0.2",
1960 "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
1961 "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
1962 "license": "MIT",
1963 "dependencies": {
1964 "balanced-match": "^1.0.0"
1965 }
1966 },
1967 "node_modules/braces": {
1968 "version": "3.0.3",
1969 "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
1970 "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
1971 "license": "MIT",
1972 "dependencies": {
1973 "fill-range": "^7.1.1"
1974 },
1975 "engines": {
1976 "node": ">=8"
1977 }
1978 },
18981979 "node_modules/browserslist": {
18991980 "version": "4.25.1",
19001981 "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.1.tgz",
......@@ -2081,6 +2162,12 @@
20812162 "node": ">=8"
20822163 }
20832164 },
2165 "node_modules/code-block-writer": {
2166 "version": "13.0.3",
2167 "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-13.0.3.tgz",
2168 "integrity": "sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==",
2169 "license": "MIT"
2170 },
20842171 "node_modules/codemirror": {
20852172 "version": "6.0.2",
20862173 "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.2.tgz",
......@@ -2633,6 +2720,31 @@
26332720 "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==",
26342721 "license": "MIT"
26352722 },
2723 "node_modules/fast-glob": {
2724 "version": "3.3.3",
2725 "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz",
2726 "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==",
2727 "license": "MIT",
2728 "dependencies": {
2729 "@nodelib/fs.stat": "^2.0.2",
2730 "@nodelib/fs.walk": "^1.2.3",
2731 "glob-parent": "^5.1.2",
2732 "merge2": "^1.3.0",
2733 "micromatch": "^4.0.8"
2734 },
2735 "engines": {
2736 "node": ">=8.6.0"
2737 }
2738 },
2739 "node_modules/fastq": {
2740 "version": "1.19.1",
2741 "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",
2742 "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
2743 "license": "ISC",
2744 "dependencies": {
2745 "reusify": "^1.0.4"
2746 }
2747 },
26362748 "node_modules/fd-slicer": {
26372749 "version": "1.1.0",
26382750 "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
......@@ -2642,6 +2754,18 @@
26422754 "pend": "~1.2.0"
26432755 }
26442756 },
2757 "node_modules/fill-range": {
2758 "version": "7.1.1",
2759 "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
2760 "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
2761 "license": "MIT",
2762 "dependencies": {
2763 "to-regex-range": "^5.0.1"
2764 },
2765 "engines": {
2766 "node": ">=8"
2767 }
2768 },
26452769 "node_modules/gensync": {
26462770 "version": "1.0.0-beta.2",
26472771 "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
......@@ -2689,6 +2813,18 @@
26892813 "node": ">= 14"
26902814 }
26912815 },
2816 "node_modules/glob-parent": {
2817 "version": "5.1.2",
2818 "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
2819 "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
2820 "license": "ISC",
2821 "dependencies": {
2822 "is-glob": "^4.0.1"
2823 },
2824 "engines": {
2825 "node": ">= 6"
2826 }
2827 },
26922828 "node_modules/hast-util-to-estree": {
26932829 "version": "3.1.3",
26942830 "resolved": "https://registry.npmjs.org/hast-util-to-estree/-/hast-util-to-estree-3.1.3.tgz",
......@@ -2897,6 +3033,15 @@
28973033 "url": "https://github.com/sponsors/wooorm"
28983034 }
28993035 },
3036 "node_modules/is-extglob": {
3037 "version": "2.1.1",
3038 "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
3039 "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
3040 "license": "MIT",
3041 "engines": {
3042 "node": ">=0.10.0"
3043 }
3044 },
29003045 "node_modules/is-fullwidth-code-point": {
29013046 "version": "3.0.0",
29023047 "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
......@@ -2906,6 +3051,18 @@
29063051 "node": ">=8"
29073052 }
29083053 },
3054 "node_modules/is-glob": {
3055 "version": "4.0.3",
3056 "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
3057 "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
3058 "license": "MIT",
3059 "dependencies": {
3060 "is-extglob": "^2.1.1"
3061 },
3062 "engines": {
3063 "node": ">=0.10.0"
3064 }
3065 },
29093066 "node_modules/is-hexadecimal": {
29103067 "version": "2.0.1",
29113068 "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz",
......@@ -2916,6 +3073,15 @@
29163073 "url": "https://github.com/sponsors/wooorm"
29173074 }
29183075 },
3076 "node_modules/is-number": {
3077 "version": "7.0.0",
3078 "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
3079 "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
3080 "license": "MIT",
3081 "engines": {
3082 "node": ">=0.12.0"
3083 }
3084 },
29193085 "node_modules/is-plain-obj": {
29203086 "version": "4.1.0",
29213087 "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",
......@@ -3243,6 +3409,15 @@
32433409 "url": "https://opencollective.com/unified"
32443410 }
32453411 },
3412 "node_modules/merge2": {
3413 "version": "1.4.1",
3414 "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
3415 "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
3416 "license": "MIT",
3417 "engines": {
3418 "node": ">= 8"
3419 }
3420 },
32463421 "node_modules/micromark": {
32473422 "version": "4.0.2",
32483423 "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz",
......@@ -3839,12 +4014,55 @@
38394014 ],
38404015 "license": "MIT"
38414016 },
4017 "node_modules/micromatch": {
4018 "version": "4.0.8",
4019 "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
4020 "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
4021 "license": "MIT",
4022 "dependencies": {
4023 "braces": "^3.0.3",
4024 "picomatch": "^2.3.1"
4025 },
4026 "engines": {
4027 "node": ">=8.6"
4028 }
4029 },
4030 "node_modules/minimatch": {
4031 "version": "9.0.5",
4032 "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
4033 "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
4034 "license": "ISC",
4035 "dependencies": {
4036 "brace-expansion": "^2.0.1"
4037 },
4038 "engines": {
4039 "node": ">=16 || 14 >=14.17"
4040 },
4041 "funding": {
4042 "url": "https://github.com/sponsors/isaacs"
4043 }
4044 },
38424045 "node_modules/mitt": {
38434046 "version": "3.0.1",
38444047 "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz",
38454048 "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==",
38464049 "license": "MIT"
38474050 },
4051 "node_modules/mkdirp": {
4052 "version": "3.0.1",
4053 "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz",
4054 "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==",
4055 "license": "MIT",
4056 "bin": {
4057 "mkdirp": "dist/cjs/src/bin.js"
4058 },
4059 "engines": {
4060 "node": ">=10"
4061 },
4062 "funding": {
4063 "url": "https://github.com/sponsors/isaacs"
4064 }
4065 },
38484066 "node_modules/ms": {
38494067 "version": "2.1.3",
38504068 "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
......@@ -4008,6 +4226,12 @@
40084226 "url": "https://github.com/sponsors/sindresorhus"
40094227 }
40104228 },
4229 "node_modules/path-browserify": {
4230 "version": "1.0.1",
4231 "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
4232 "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==",
4233 "license": "MIT"
4234 },
40114235 "node_modules/pend": {
40124236 "version": "1.2.0",
40134237 "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
......@@ -4020,6 +4244,18 @@
40204244 "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
40214245 "license": "ISC"
40224246 },
4247 "node_modules/picomatch": {
4248 "version": "2.3.1",
4249 "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
4250 "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
4251 "license": "MIT",
4252 "engines": {
4253 "node": ">=8.6"
4254 },
4255 "funding": {
4256 "url": "https://github.com/sponsors/jonschlinkert"
4257 }
4258 },
40234259 "node_modules/progress": {
40244260 "version": "2.0.3",
40254261 "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
......@@ -4121,6 +4357,26 @@
41214357 "node": ">=18"
41224358 }
41234359 },
4360 "node_modules/queue-microtask": {
4361 "version": "1.2.3",
4362 "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
4363 "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
4364 "funding": [
4365 {
4366 "type": "github",
4367 "url": "https://github.com/sponsors/feross"
4368 },
4369 {
4370 "type": "patreon",
4371 "url": "https://www.patreon.com/feross"
4372 },
4373 {
4374 "type": "consulting",
4375 "url": "https://feross.org/support"
4376 }
4377 ],
4378 "license": "MIT"
4379 },
41244380 "node_modules/raptor-async": {
41254381 "version": "1.1.3",
41264382 "resolved": "https://registry.npmjs.org/raptor-async/-/raptor-async-1.1.3.tgz",
......@@ -4289,6 +4545,39 @@
42894545 "node": ">=8"
42904546 }
42914547 },
4548 "node_modules/reusify": {
4549 "version": "1.1.0",
4550 "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
4551 "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
4552 "license": "MIT",
4553 "engines": {
4554 "iojs": ">=1.0.0",
4555 "node": ">=0.10.0"
4556 }
4557 },
4558 "node_modules/run-parallel": {
4559 "version": "1.2.0",
4560 "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
4561 "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
4562 "funding": [
4563 {
4564 "type": "github",
4565 "url": "https://github.com/sponsors/feross"
4566 },
4567 {
4568 "type": "patreon",
4569 "url": "https://www.patreon.com/feross"
4570 },
4571 {
4572 "type": "consulting",
4573 "url": "https://feross.org/support"
4574 }
4575 ],
4576 "license": "MIT",
4577 "dependencies": {
4578 "queue-microtask": "^1.2.2"
4579 }
4580 },
42924581 "node_modules/self-closing-tags": {
42934582 "version": "1.0.1",
42944583 "resolved": "https://registry.npmjs.org/self-closing-tags/-/self-closing-tags-1.0.1.tgz",
......@@ -4598,6 +4887,18 @@
45984887 "b4a": "^1.6.4"
45994888 }
46004889 },
4890 "node_modules/to-regex-range": {
4891 "version": "5.0.1",
4892 "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
4893 "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
4894 "license": "MIT",
4895 "dependencies": {
4896 "is-number": "^7.0.0"
4897 },
4898 "engines": {
4899 "node": ">=8.0"
4900 }
4901 },
46014902 "node_modules/trim-lines": {
46024903 "version": "3.0.1",
46034904 "resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz",
......@@ -4618,6 +4919,32 @@
46184919 "url": "https://github.com/sponsors/wooorm"
46194920 }
46204921 },
4922 "node_modules/ts-morph": {
4923 "version": "23.0.0",
4924 "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-23.0.0.tgz",
4925 "integrity": "sha512-FcvFx7a9E8TUe6T3ShihXJLiJOiqyafzFKUO4aqIHDUCIvADdGNShcbc2W5PMr3LerXRv7mafvFZ9lRENxJmug==",
4926 "license": "MIT",
4927 "dependencies": {
4928 "@ts-morph/common": "~0.24.0",
4929 "code-block-writer": "^13.0.1"
4930 }
4931 },
4932 "node_modules/ts-to-jsdoc": {
4933 "version": "2.4.0",
4934 "resolved": "https://registry.npmjs.org/ts-to-jsdoc/-/ts-to-jsdoc-2.4.0.tgz",
4935 "integrity": "sha512-RiI9ipxkLjXESp5+YjXIQJ5GgtjwWTZU4uDahxsIdr1HKLFaC/nQOtgkGRJ+AFxqHrrhwrXtPh093r0nXQwKmw==",
4936 "license": "MIT",
4937 "dependencies": {
4938 "arg": "^5.0.1",
4939 "ts-morph": "^23.0.0"
4940 },
4941 "bin": {
4942 "ts-to-jsdoc": "bin/ts-to-jsdoc"
4943 },
4944 "optionalDependencies": {
4945 "typescript": "*"
4946 }
4947 },
46214948 "node_modules/tslib": {
46224949 "version": "2.8.1",
46234950 "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
package.json+1
......@@ -16,6 +16,7 @@
1616 "puppeteer": "^24.10.1",
1717 "sharp": "^0.34.2",
1818 "source-map-support": "^0.5.21",
19 "ts-to-jsdoc": "^2.4.0",
1920 "unique-names-generator": "^4.7.1",
2021 "vscode-oniguruma": "^2.0.1",
2122 "vscode-textmate": "^9.2.0"
tsconfig.json+2-1
......@@ -15,7 +15,8 @@
1515 "strict": true,
1616 "verbatimModuleSyntax": true,
1717 "target": "es2024",
18 "noUncheckedIndexedAccess": true
18 "noUncheckedIndexedAccess": true,
19 "resolveJsonModule": true
1920 },
2021 "include": ["framework/**/*", "src/**/*", "lib/**/*"]
2122}