authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-03-17 23:32:00-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-03-17 23:39:00-07:00
log3caa2f2be2dca66f2a3f44d3a85a4bf7c7270534
treeb624485e6b46ab0684a61b3aa00be40209928e74
parent6d7576c0766ee4fd023aae3db1fc4ca9f35e9791
signature Signed by SSH key SHA256:xbd+BjjhyBfwk7GVoURf9Yx0gzDerHbvYv7SddNWmAs

chore: use more canonical import names

- `@/file.ts` -> `#src/file.ts` matching Node.js standards - `lib` -> `@clo/lib` matching what i publish it as

65 files changed, 169 insertions(+), 209 deletions(-)

framework/backend/entry-node.ts+1-1
...@@ -42,4 +42,4 @@ import * as os from "os";...@@ -42,4 +42,4 @@ import * as os from "os";
42import * as url from "node:url";42import * as url from "node:url";
43import { serve } from "@hono/node-server";43import { serve } from "@hono/node-server";
44import process from "node:process";44import process from "node:process";
45import * as console from "lib/log.ts";45import * as console from "@clo/lib/log.ts";
framework/bundle.ts+4-7
...@@ -37,7 +37,6 @@ export async function bundleClientJavaScript(...@@ -37,7 +37,6 @@ export async function bundleClientJavaScript(
37 }37 }
3838
39 const clientPlugins: esbuild.Plugin[] = [39 const clientPlugins: esbuild.Plugin[] = [
40 projectRelativeResolution(),
41 markoViaBuildCache(),40 markoViaBuildCache(),
42 {41 {
43 name: "mark css external",42 name: "mark css external",
...@@ -250,7 +249,6 @@ export async function bundleServerJavaScript({...@@ -250,7 +249,6 @@ export async function bundleServerJavaScript({
250 return view.file;249 return view.file;
251 },250 },
252 }),251 }),
253 projectRelativeResolution(),
254 markoViaBuildCache(),252 markoViaBuildCache(),
255 {253 {
256 name: "replace client references",254 name: "replace client references",
...@@ -301,7 +299,7 @@ export async function bundleServerJavaScript({...@@ -301,7 +299,7 @@ export async function bundleServerJavaScript({
301 "globalThis.CLOVER_SERVER_ENTRY": JSON.stringify(entry),299 "globalThis.CLOVER_SERVER_ENTRY": JSON.stringify(entry),
302 },300 },
303 external: Object.keys(pkg.dependencies).filter(301 external: Object.keys(pkg.dependencies).filter(
304 (x) => x !== "lib",302 (x) => x !== "@clo/lib",
305 ),303 ),
306 });304 });
307 await trackEsbuild(io, metafile);305 await trackEsbuild(io, metafile);
...@@ -391,7 +389,6 @@ import * as hot from "./hot.ts";...@@ -391,7 +389,6 @@ import * as hot from "./hot.ts";
391import {389import {
392 isIgnoredSource,390 isIgnoredSource,
393 markoViaBuildCache,391 markoViaBuildCache,
394 projectRelativeResolution,
395 virtualFiles,392 virtualFiles,
396} from "./esbuild-support.ts";393} from "./esbuild-support.ts";
397import { Io, toAbs } from "./incremental.ts";394import { Io, toAbs } from "./incremental.ts";
...@@ -400,6 +397,6 @@ import * as incr from "./incremental.ts";...@@ -400,6 +397,6 @@ import * as incr from "./incremental.ts";
400import * as sg from "#sitegen";397import * as sg from "#sitegen";
401import type { PageOrView } from "./generate.ts";398import type { PageOrView } from "./generate.ts";
402import type * as view from "#sitegen/view";399import type * as view from "#sitegen/view";
403import * as meta from "lib/render/meta.ts";400import * as meta from "@clo/lib/render/meta.ts";
404import * as progress from "lib/progress.ts";401import * as progress from "@clo/lib/progress.ts";
405import { ASSERT, UNWRAP } from "lib/assert.ts";402import { ASSERT, UNWRAP } from "@clo/lib/assert.ts";
framework/css.ts+1-1
...@@ -116,4 +116,4 @@ import * as hot from "./hot.ts";...@@ -116,4 +116,4 @@ import * as hot from "./hot.ts";
116import * as path from "node:path";116import * as path from "node:path";
117import { virtualFiles } from "./esbuild-support.ts";117import { virtualFiles } from "./esbuild-support.ts";
118import type { Io } from "./incremental.ts";118import type { Io } from "./incremental.ts";
119import { UNWRAP } from "lib/assert.ts";119import { UNWRAP } from "@clo/lib/assert.ts";
framework/esbuild-support.ts+1-19
...@@ -61,24 +61,6 @@ export function banFiles(...@@ -61,24 +61,6 @@ export function banFiles(
61 } satisfies esbuild.Plugin;61 } satisfies esbuild.Plugin;
62}62}
6363
64export function projectRelativeResolution(root = process.cwd() + "/src") {
65 return {
66 name: "project relative resolution ('@/' prefix)",
67 setup(b) {
68 b.onResolve({ filter: /^@\// }, ({ path: id }) => {
69 return {
70 path: path.resolve(root, id.slice(2)),
71 };
72 });
73 b.onResolve({ filter: /^#/ }, ({ path: id, importer }) => {
74 return {
75 path: hot.resolveFrom(importer, id),
76 };
77 });
78 },
79 } satisfies esbuild.Plugin;
80}
81
82export function markoViaBuildCache(): esbuild.Plugin {64export function markoViaBuildCache(): esbuild.Plugin {
83 return {65 return {
84 name: "marko via build cache",66 name: "marko via build cache",
...@@ -112,7 +94,7 @@ export function isIgnoredSource(source: string) {...@@ -112,7 +94,7 @@ export function isIgnoredSource(source: string) {
112}94}
11395
114import * as esbuild from "esbuild";96import * as esbuild from "esbuild";
115import * as string from "lib/string.ts";97import * as string from "@clo/lib/string.ts";
116import * as path from "node:path";98import * as path from "node:path";
117import * as fs from "#sitegen/fs";99import * as fs from "#sitegen/fs";
118import * as hot from "./hot.ts";100import * as hot from "./hot.ts";
framework/font.ts+5-5
...@@ -143,7 +143,7 @@ export async function fetchFont(name: string, sources: string[]) {...@@ -143,7 +143,7 @@ export async function fetchFont(name: string, sources: string[]) {
143 : process.platform === "darwin"143 : process.platform === "darwin"
144 ? [144 ? [
145 "/Library/Fonts",145 "/Library/Fonts",
146 path.posix.join(home, "Library/Fonts"),146 path.posix.join(home, "@clo/library/Fonts"),
147 ]147 ]
148 : [148 : [
149 "/usr/share/fonts",149 "/usr/share/fonts",
...@@ -211,10 +211,10 @@ import * as fs from "#sitegen/fs";...@@ -211,10 +211,10 @@ import * as fs from "#sitegen/fs";
211import * as os from "node:os";211import * as os from "node:os";
212import * as path from "node:path";212import * as path from "node:path";
213import * as sg from "#sitegen";213import * as sg from "#sitegen";
214import * as subprocess from "lib/subprocess.ts";214import * as subprocess from "@clo/lib/subprocess.ts";
215import * as incr from "./incremental.ts";215import * as incr from "./incremental.ts";
216import * as crypto from "node:crypto";216import * as crypto from "node:crypto";
217import * as async from "lib/async.ts";217import * as async from "@clo/lib/async.ts";
218import * as error from "lib/error.ts";218import * as error from "@clo/lib/error.ts";
219import * as progress from "../lib/progress.ts";219import * as progress from "../lib/progress.ts";
220import { ASSERT } from "lib/assert.ts";220import { ASSERT } from "@clo/lib/assert.ts";
framework/generate.ts+4-4
...@@ -414,12 +414,12 @@ export type PageOrView = PreparedPage | PreparedView;...@@ -414,12 +414,12 @@ export type PageOrView = PreparedPage | PreparedView;
414import * as path from "node:path";414import * as path from "node:path";
415415
416import * as fs from "#sitegen/fs";416import * as fs from "#sitegen/fs";
417import * as meta from "lib/render/meta.ts";417import * as meta from "@clo/lib/render/meta.ts";
418import * as render from "lib/render.ts";418import * as render from "@clo/lib/render.ts";
419import * as sg from "#sitegen";419import * as sg from "#sitegen";
420import type { FileItem } from "#sitegen";420import type { FileItem } from "#sitegen";
421import * as progress from "../lib/progress.ts";421import * as progress from "../lib/progress.ts";
422import * as error from "lib/error.ts";422import * as error from "@clo/lib/error.ts";
423423
424import SitegenWrap from "./sitegen-wrap.marko";424import SitegenWrap from "./sitegen-wrap.marko";
425425
...@@ -429,4 +429,4 @@ import * as fonts from "./font.ts";...@@ -429,4 +429,4 @@ import * as fonts from "./font.ts";
429import * as hot from "./hot.ts";429import * as hot from "./hot.ts";
430import * as incr from "./incremental.ts";430import * as incr from "./incremental.ts";
431import { Io } from "./incremental.ts";431import { Io } from "./incremental.ts";
432import { ASSERT, UNWRAP } from "lib/assert.ts";432import { ASSERT, UNWRAP } from "@clo/lib/assert.ts";
framework/hot.ts+1-20
...@@ -90,25 +90,6 @@ Module.prototype._compile = function (...@@ -90,25 +90,6 @@ Module.prototype._compile = function (
90 return result;90 return result;
91};91};
9292
93// Implement @/ prefix
94const ModuleUnderscoreResolveFilename = Module._resolveFilename;
95Module._resolveFilename = (...args) => {
96 if (args[0].startsWith("@/")) {
97 const replacedPath = "." + args[0].slice(1);
98 try {
99 return require.resolve(replacedPath, { paths: [projectSrc] });
100 } catch (err: any) {
101 if (
102 err.code === "MODULE_NOT_FOUND" &&
103 (err?.requireStack?.length ?? 0) <= 1
104 ) {
105 err.message.replace(replacedPath, args[0]);
106 }
107 }
108 }
109 return ModuleUnderscoreResolveFilename(...args);
110};
111
112function loadEsbuild(module: NodeJS.Module, filepath: string) {93function loadEsbuild(module: NodeJS.Module, filepath: string) {
113 return loadEsbuildCode(module, filepath, fs.readFileSync(filepath, "utf8"));94 return loadEsbuildCode(module, filepath, fs.readFileSync(filepath, "utf8"));
114}95}
...@@ -323,4 +304,4 @@ import * as esbuild from "esbuild";...@@ -323,4 +304,4 @@ import * as esbuild from "esbuild";
323import { createRequire } from "node:module";304import { createRequire } from "node:module";
324import * as self from "./hot.ts";305import * as self from "./hot.ts";
325import { Buffer } from "node:buffer";306import { Buffer } from "node:buffer";
326import { UNWRAP } from "lib/assert.ts";307import { UNWRAP } from "@clo/lib/assert.ts";
framework/incremental.ts+5-5
...@@ -728,7 +728,7 @@ const zstdCompress = util.promisify(zlib.zstdCompress);...@@ -728,7 +728,7 @@ const zstdCompress = util.promisify(zlib.zstdCompress);
728import * as hot from "./hot.ts";728import * as hot from "./hot.ts";
729729
730import * as fs from "#sitegen/fs";730import * as fs from "#sitegen/fs";
731import * as mime from "lib/mime.ts";731import * as mime from "@clo/lib/mime.ts";
732import * as manifest from "#sitegen/assets";732import * as manifest from "#sitegen/assets";
733733
734import * as path from "node:path";734import * as path from "node:path";
...@@ -736,9 +736,9 @@ import * as util from "node:util";...@@ -736,9 +736,9 @@ import * as util from "node:util";
736import * as crypto from "node:crypto";736import * as crypto from "node:crypto";
737import * as zlib from "node:zlib";737import * as zlib from "node:zlib";
738738
739import * as progress from "lib/progress.ts";739import * as progress from "@clo/lib/progress.ts";
740import * as stack from "lib/log/stack.ts";740import * as stack from "@clo/lib/log/stack.ts";
741import { formatSize } from "@/file-viewer/format.ts";741import { formatSize } from "#src/file-viewer/format.ts";
742742
743import * as msgpackr from "msgpackr";743import * as msgpackr from "msgpackr";
744import { ASSERT, UNWRAP } from "lib/assert.ts";744import { ASSERT, UNWRAP } from "@clo/lib/assert.ts";
framework/lib/assets.ts+2-2
...@@ -285,5 +285,5 @@ import type { AssetKey as Key } from "../../.clover/ts/asset.d.ts";...@@ -285,5 +285,5 @@ import type { AssetKey as Key } from "../../.clover/ts/asset.d.ts";
285import * as crypto from "node:crypto";285import * as crypto from "node:crypto";
286import * as zlib from "node:zlib";286import * as zlib from "node:zlib";
287import * as util from "node:util";287import * as util from "node:util";
288import * as log from "lib/log.ts";288import * as log from "@clo/lib/log.ts";
289import { ASSERT, UNWRAP } from "lib/assert.ts";289import { ASSERT, UNWRAP } from "@clo/lib/assert.ts";
framework/lib/path.ts+2-2
...@@ -211,6 +211,6 @@ export class Path {...@@ -211,6 +211,6 @@ export class Path {
211import * as path from "node:path";211import * as path from "node:path";
212import * as fs from "./fs.ts";212import * as fs from "./fs.ts";
213import * as util from "node:util";213import * as util from "node:util";
214import * as error from "lib/error.ts";214import * as error from "@clo/lib/error.ts";
215import type { RmOptions } from "node:fs";215import type { RmOptions } from "node:fs";
216import { ASSERT } from "lib/assert.ts";216import { ASSERT } from "@clo/lib/assert.ts";
framework/lib/sitegen.ts+3-3
...@@ -100,7 +100,7 @@ export function joinScripts(scriptSources: string[]) {...@@ -100,7 +100,7 @@ export function joinScripts(scriptSources: string[]) {
100100
101export { default as CloverScriptInclude } from "./add-script.marko";101export { default as CloverScriptInclude } from "./add-script.marko";
102102
103import * as render from "lib/render.ts";103import * as render from "@clo/lib/render.ts";
104import type * as meta from "lib/render/meta.ts";104import type * as meta from "@clo/lib/render/meta.ts";
105import type * as css from "../css.ts";105import type * as css from "../css.ts";
106import { UNWRAP } from "lib/assert.ts";106import { UNWRAP } from "@clo/lib/assert.ts";
framework/lib/view.ts+3-3
...@@ -117,14 +117,14 @@ export function regenerate(tag: RegenKey) {...@@ -117,14 +117,14 @@ export function regenerate(tag: RegenKey) {
117 }117 }
118}118}
119119
120import * as meta from "lib/render/meta.ts";120import * as meta from "@clo/lib/render/meta.ts";
121import type * as hono from "#hono";121import type * as hono from "#hono";
122import * as render from "lib/render.ts";122import * as render from "@clo/lib/render.ts";
123import * as sg from "./sitegen.ts";123import * as sg from "./sitegen.ts";
124import * as asset from "./assets.ts";124import * as asset from "./assets.ts";
125import type {125import type {
126 RegenKey,126 RegenKey,
127 RegisteredViews as ViewMap,127 RegisteredViews as ViewMap,
128} from "../../.clover/ts/view.d.ts";128} from "../../.clover/ts/view.d.ts";
129import { UNWRAP } from "lib/assert.ts";129import { UNWRAP } from "@clo/lib/assert.ts";
130import SitegenWrap from "../sitegen-wrap.marko";130import SitegenWrap from "../sitegen-wrap.marko";
framework/watch.ts+1-1
...@@ -170,4 +170,4 @@ import * as generate from "./generate.ts";...@@ -170,4 +170,4 @@ import * as generate from "./generate.ts";
170import * as incr from "./incremental.ts";170import * as incr from "./incremental.ts";
171import * as path from "node:path";171import * as path from "node:path";
172import * as util from "node:util";172import * as util from "node:util";
173import * as subprocess from "lib/subprocess.ts";173import * as subprocess from "@clo/lib/subprocess.ts";
lib/deno.json+3-3
...@@ -29,11 +29,11 @@...@@ -29,11 +29,11 @@
29 },29 },
30 "compilerOptions": {30 "compilerOptions": {
31 "jsx": "react-jsx",31 "jsx": "react-jsx",
32 "jsxImportSource": "lib/render"32 "jsxImportSource": "@clo/lib/render"
33 },33 },
34 "imports": {34 "imports": {
35 "lib/render/jsx-runtime": "./render/jsx-runtime.ts",35 "@clo/lib/render/jsx-runtime": "./render/jsx-runtime.ts",
36 "lib/render/jsx-dev-runtime": "./render/jsx-runtime.ts"36 "@clo/lib/render/jsx-dev-runtime": "./render/jsx-runtime.ts"
37 },37 },
38 "exclude": [38 "exclude": [
39 "readme.npm.md",39 "readme.npm.md",
lib/log/stack.ts+1-1
...@@ -19,7 +19,7 @@...@@ -19,7 +19,7 @@
19 * }19 * }
20 *20 *
21 * import * as fs from "node:fs";21 * import * as fs from "node:fs";
22 * import * as stack from "lib/log/stack.ts";22 * import * as stack from "@clo/lib/log/stack.ts";
23 * ```23 * ```
24 *24 *
25 * @module25 * @module
lib/mime.test.ts+1-1
...@@ -25,4 +25,4 @@ test("for", () => {...@@ -25,4 +25,4 @@ test("for", () => {
2525
26import { test } from "node:test";26import { test } from "node:test";
27import assert from "node:assert";27import assert from "node:assert";
28import * as mime from "lib/mime.ts";28import * as mime from "@clo/lib/mime.ts";
lib/progress.ts+1-1
...@@ -74,7 +74,7 @@ export function start(text: string, opts?: StartOptions): Node {...@@ -74,7 +74,7 @@ export function start(text: string, opts?: StartOptions): Node {
74 *74 *
75 * ```ts75 * ```ts
76 * await ffmpeg.spawn({76 * await ffmpeg.spawn({
77 * cmd: ["-i", "hello.mov", "-c:v", "libsvtav1", "hello.mp4"],77 * cmd: ["-i", "hello.mov", "-c:v", "@clo/libsvtav1", "hello.mp4"],
78 * progress: progress.start("encode hello.mov"),78 * progress: progress.start("encode hello.mov"),
79 * });79 * });
80 * ```80 * ```
lib/string/ansi.test.ts+1-1
...@@ -21,4 +21,4 @@ test("trimToWidth", () => {...@@ -21,4 +21,4 @@ test("trimToWidth", () => {
2121
22import { test } from "node:test";22import { test } from "node:test";
23import assert from "node:assert";23import assert from "node:assert";
24import * as ansi from "lib/string/ansi.ts";24import * as ansi from "@clo/lib/string/ansi.ts";
lib/subprocess/ffmpeg.ts+1-1
...@@ -13,7 +13,7 @@ export interface SpawnOptions {...@@ -13,7 +13,7 @@ export interface SpawnOptions {
13 *13 *
14 * ```ts14 * ```ts
15 * await ffmpeg.spawn({15 * await ffmpeg.spawn({
16 * cmd: ["-i", "hello.mov", "-c:v", "libsvtav1", "hello.mp4"],16 * cmd: ["-i", "hello.mov", "-c:v", "@clo/libsvtav1", "hello.mp4"],
17 * progress: progress.start("encode hello.mov"),17 * progress: progress.start("encode hello.mov"),
18 * });18 * });
19 * ```19 * ```
package-lock.json+6-6
...@@ -5,6 +5,7 @@...@@ -5,6 +5,7 @@
5 "packages": {5 "packages": {
6 "": {6 "": {
7 "dependencies": {7 "dependencies": {
8 "@clo/lib": "file:lib",
8 "@clo/markodown": "npm:@paperclover/markodown@rc",9 "@clo/markodown": "npm:@paperclover/markodown@rc",
9 "@hono/node-server": "1.14.3",10 "@hono/node-server": "1.14.3",
10 "@marko/compiler": "^5.39.55",11 "@marko/compiler": "^5.39.55",
...@@ -15,7 +16,6 @@...@@ -15,7 +16,6 @@
15 "esbuild": "0.25.5",16 "esbuild": "0.25.5",
16 "hls.js": "1.6.5",17 "hls.js": "1.6.5",
17 "hono": "4.11.9",18 "hono": "4.11.9",
18 "lib": "file:lib",
19 "marko": "^5.38.24",19 "marko": "^5.38.24",
20 "msgpackr": "1.11.5",20 "msgpackr": "1.11.5",
21 "playwright": "1.58.2",21 "playwright": "1.58.2",
...@@ -26,7 +26,11 @@...@@ -26,7 +26,11 @@
26 "vscode-textmate": "9.2.0"26 "vscode-textmate": "9.2.0"
27 }27 }
28 },28 },
29 "lib": {},29 "@clo/lib": {},
30 "node_modules/@clo/lib": {
31 "resolved": "@clo/lib",
32 "link": true
33 },
30 "node_modules/@clo/markodown": {34 "node_modules/@clo/markodown": {
31 "name": "@paperclover/markodown",35 "name": "@paperclover/markodown",
32 "version": "1.0.0-rc.15",36 "version": "1.0.0-rc.15",
...@@ -1077,10 +1081,6 @@...@@ -1077,10 +1081,6 @@
1077 "lasso-caching-fs": "^1.0.0"1081 "lasso-caching-fs": "^1.0.0"
1078 }1082 }
1079 },1083 },
1080 "node_modules/lib": {
1081 "resolved": "lib",
1082 "link": true
1083 },
1084 "node_modules/lie": {1084 "node_modules/lie": {
1085 "version": "3.1.1",1085 "version": "3.1.1",
1086 "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",1086 "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",
package.json+2-1
...@@ -11,7 +11,7 @@...@@ -11,7 +11,7 @@
11 "esbuild": "0.25.5",11 "esbuild": "0.25.5",
12 "hls.js": "1.6.5",12 "hls.js": "1.6.5",
13 "hono": "4.11.9",13 "hono": "4.11.9",
14 "lib": "file:lib",14 "@clo/lib": "file:lib",
15 "marko": "^5.38.24",15 "marko": "^5.38.24",
16 "msgpackr": "1.11.5",16 "msgpackr": "1.11.5",
17 "playwright": "1.58.2",17 "playwright": "1.58.2",
...@@ -22,6 +22,7 @@...@@ -22,6 +22,7 @@
22 "vscode-textmate": "9.2.0"22 "vscode-textmate": "9.2.0"
23 },23 },
24 "imports": {24 "imports": {
25 "#src/*": "./src/*",
25 "#sitegen": "./framework/lib/sitegen.ts",26 "#sitegen": "./framework/lib/sitegen.ts",
26 "#sitegen/*": "./framework/lib/*.ts",27 "#sitegen/*": "./framework/lib/*.ts",
27 "#jsx/jsx-runtime": "./lib/render/jsx-runtime.ts",28 "#jsx/jsx-runtime": "./lib/render/jsx-runtime.ts",
src/backend.ts+1-1
...@@ -64,4 +64,4 @@ import { logger } from "hono/logger";...@@ -64,4 +64,4 @@ import { logger } from "hono/logger";
64import { trimTrailingSlash } from "hono/trailing-slash";64import { trimTrailingSlash } from "hono/trailing-slash";
65import * as assets from "#sitegen/assets";65import * as assets from "#sitegen/assets";
66import * as admin from "./admin.ts";66import * as admin from "./admin.ts";
67import * as log from "lib/log.ts";67import * as log from "@clo/lib/log.ts";
src/bin/deploy.ts+2-2
...@@ -55,7 +55,7 @@ export async function main() {...@@ -55,7 +55,7 @@ export async function main() {
5555
56import * as incr from "../../framework/incremental.ts";56import * as incr from "../../framework/incremental.ts";
57import { generate } from "../../framework/generate.ts";57import { generate } from "../../framework/generate.ts";
58import * as progress from "lib/progress.ts";58import * as progress from "@clo/lib/progress.ts";
59import * as subprocess from "lib/subprocess.ts";59import * as subprocess from "@clo/lib/subprocess.ts";
60import * as rsync from "../file-viewer/rsync.ts";60import * as rsync from "../file-viewer/rsync.ts";
61import { Path } from "#sitegen/path";61import { Path } from "#sitegen/path";
src/bin/download-db.ts+1-1
...@@ -21,6 +21,6 @@ export async function main() {...@@ -21,6 +21,6 @@ export async function main() {
21 });21 });
22}22}
2323
24import * as progress from "lib/progress.ts";24import * as progress from "@clo/lib/progress.ts";
25import * as rsync from "../file-viewer/rsync.ts";25import * as rsync from "../file-viewer/rsync.ts";
26import { Path } from "#sitegen/path";26import { Path } from "#sitegen/path";
src/bin/package-lib.ts+2-2
...@@ -21,10 +21,10 @@ export async function updateJsrPackageExportsToAll(...@@ -21,10 +21,10 @@ export async function updateJsrPackageExportsToAll(
21}21}
2222
23export async function main() {23export async function main() {
24 const main = path.resolve("lib");24 const main = path.resolve("@clo/lib");
25 await updateJsrPackageExportsToAll(main, progress);25 await updateJsrPackageExportsToAll(main, progress);
26}26}
2727
28import * as progress from "lib/progress.ts";28import * as progress from "@clo/lib/progress.ts";
29import * as path from "node:path";29import * as path from "node:path";
30import * as fs from "node:fs/promises";30import * as fs from "node:fs/promises";
src/blog/drafts/webdev/marko-intro.markodown+7-7
...@@ -5,7 +5,7 @@ export const blog: BlogMeta = {...@@ -5,7 +5,7 @@ export const blog: BlogMeta = {
5 draft: true,5 draft: true,
6};6};
7export const meta = formatBlogMeta(blob);7export const meta = formatBlogMeta(blob);
8export * as layout from "@/blog/layout.tsx";8export * as layout from "#src/blog/layout.tsx";
99
10I've been recently playing around [Marko], and after adding limited support10I've been recently playing around [Marko], and after adding limited support
11for it in my website generator, [sitegen], I instantly fell in love with how11for it in my website generator, [sitegen], I instantly fell in love with how
...@@ -287,8 +287,8 @@ function Page() {...@@ -287,8 +287,8 @@ function Page() {
287console.info(render.sync(<Page />).text);287console.info(render.sync(<Page />).text);
288288
289import * as render from "#engine/render";289import * as render from "#engine/render";
290import QuestionRender from "@/q+a/tags/question.marko";290import QuestionRender from "#src/q+a/tags/question.marko";
291import { Question } from "@/q+a/models/Question.ts";291import { Question } from "#src/q+a/models/Question.ts";
292```292```
293293
294Here is the `question.marko` tag used to render [questions on the clover q+a](/q+a).294Here is the `question.marko` tag used to render [questions on the clover q+a](/q+a).
...@@ -328,12 +328,12 @@ export const transitionDate = 1735639200000;...@@ -328,12 +328,12 @@ export const transitionDate = 1735639200000;
328// this singleton script will make all the '<time>' tags clickable.328// this singleton script will make all the '<time>' tags clickable.
329client import "./clickable-links.client.ts";329client import "./clickable-links.client.ts";
330330
331import type { Question } from "@/q+a/models/Question.ts";331import type { Question } from "#src/q+a/models/Question.ts";
332import { formatQuestionTimestamp, formatQuestionISOTimestamp } from "@/q+a/format.ts";332import { formatQuestionTimestamp, formatQuestionISOTimestamp } from "#src/q+a/format.ts";
333import { QuestionMarkdown } from "@/q+a/markdown.tsx";333import { QuestionMarkdown } from "#src/q+a/markdown.tsx";
334```334```
335335
336The integration is great, `client import` is quite a magical concept, and I've336The integration is great, `client import` is quite a magical concept, and I've
337tuned it to do the expected thing in my framework.337tuned it to do the expected thing in my framework.
338338
339import { type BlogMeta, formatBlogMeta } from '@/blog/helpers.ts';339import { type BlogMeta, formatBlogMeta } from '#src/blog/helpers.ts';
src/blog/localization.tsx+1-1
...@@ -31,4 +31,4 @@ export const languages: LanguageMap = {...@@ -31,4 +31,4 @@ export const languages: LanguageMap = {
31 },31 },
32};32};
3333
34import * as render from "lib/render.ts";34import * as render from "@clo/lib/render.ts";
src/blog/pages/webdev/one-year-next-app-router/en.mdo+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1---1---
2layout: "@/blog/tags/blog-layout.marko"2layout: "#src/blog/tags/blog-layout.marko"
3meta:3meta:
4 title: One Year with Next.js App Router — Why We're Moving On4 title: One Year with Next.js App Router — Why We're Moving On
5 description: A critique of React Server Components and Next.js 15.5 description: A critique of React Server Components and Next.js 15.
src/blog/pages/webdev/one-year-next-app-router/es.mdo+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1---1---
2layout: "@/blog/tags/blog-layout.marko"2layout: "#src/blog/tags/blog-layout.marko"
3meta:3meta:
4 title: Un año con el enrutador de aplicación (App Router) de Next.js — por qué decidimos cambiar4 title: Un año con el enrutador de aplicación (App Router) de Next.js — por qué decidimos cambiar
5 description: Una crítica de los componentes de servidor de React y Next.js 15.5 description: Una crítica de los componentes de servidor de React y Next.js 15.
src/blog/pages/webdev/one-year-next-app-router/ko.mdo+1-1
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1---1---
2layout: "@/blog/tags/blog-layout.marko"2layout: "#src/blog/tags/blog-layout.marko"
3meta:3meta:
4 title: Next.js 앱 라우터와 함께한 1년 — 우리가 떠나기로 한 이유4 title: Next.js 앱 라우터와 함께한 1년 — 우리가 떠나기로 한 이유
5 description: 리액트 서버 컴포넌트와 Next.js 15에 대한 비판5 description: 리액트 서버 컴포넌트와 Next.js 15에 대한 비판
src/blog/tags/blog-layout.marko+1-1
...@@ -104,4 +104,4 @@ import * as markodown from "@clo/markodown";...@@ -104,4 +104,4 @@ import * as markodown from "@clo/markodown";
104import Heading from "./heading.marko";104import Heading from "./heading.marko";
105import CodeBlock from "./code-block.marko";105import CodeBlock from "./code-block.marko";
106import { Path } from "#sitegen/path";106import { Path } from "#sitegen/path";
107import { UNWRAP } from "lib/assert.ts";107import { UNWRAP } from "@clo/lib/assert.ts";
src/blog/tags/code-block.marko+1-1
...@@ -12,4 +12,4 @@...@@ -12,4 +12,4 @@
12</>12</>
13</figure>13</figure>
1414
15import * as highlight from "@/file-viewer/highlight.ts";15import * as highlight from "#src/file-viewer/highlight.ts";
src/file-viewer/backend.tsx+11-11
...@@ -313,17 +313,17 @@ function getPartialPage(c: Context, rawFilePath: string) {...@@ -313,17 +313,17 @@ function getPartialPage(c: Context, rawFilePath: string) {
313313
314import { type Context, Hono } from "hono";314import { type Context, Hono } from "hono";
315315
316import * as render from "lib/render.ts";316import * as render from "@clo/lib/render.ts";
317import { etagMatches, serveAsset } from "#sitegen/assets";317import { etagMatches, serveAsset } from "#sitegen/assets";
318import * as view from "#sitegen/view";318import * as view from "#sitegen/view";
319import * as mime from "lib/mime.ts";319import * as mime from "@clo/lib/mime.ts";
320320
321import { getForFile, requireFriendAuth } from "@/friend-auth.ts";321import { getForFile, requireFriendAuth } from "#src/friend-auth.ts";
322import { MediaFile, MediaFileKind } from "@/file-viewer/models/MediaFile.ts";322import { MediaFile, MediaFileKind } from "#src/file-viewer/models/MediaFile.ts";
323import { FilePermissions } from "@/file-viewer/models/FilePermissions.ts";323import { FilePermissions } from "#src/file-viewer/models/FilePermissions.ts";
324import { MediaPanel } from "@/file-viewer/views/clofi.tsx";324import { MediaPanel } from "#src/file-viewer/views/clofi.tsx";
325import { Speedbump } from "@/file-viewer/cotyledon.tsx";325import { Speedbump } from "#src/file-viewer/cotyledon.tsx";
326import * as cache from "@/file-viewer/cache.ts";326import * as cache from "#src/file-viewer/cache.ts";
327import * as derived from "@/file-viewer/models/derived.ts";327import * as derived from "#src/file-viewer/models/derived.ts";
328import { UNWRAP } from "lib/assert.ts";328import { UNWRAP } from "@clo/lib/assert.ts";
329import { escapeUri } from "./format.ts";329import { escapeUri } from "./format.ts";
src/file-viewer/bin/file-scan.ts+13-13
...@@ -1024,13 +1024,13 @@ async function scrubLocationMetadata(...@@ -1024,13 +1024,13 @@ async function scrubLocationMetadata(
10241024
1025const monthMilliseconds = 30 * 24 * 60 * 60 * 1000;1025const monthMilliseconds = 30 * 24 * 60 * 60 * 1000;
10261026
1027import * as async from "lib/async.ts";1027import * as async from "@clo/lib/async.ts";
1028import * as fs from "#sitegen/fs";1028import * as fs from "#sitegen/fs";
1029import * as subprocess from "lib/subprocess.ts";1029import * as subprocess from "@clo/lib/subprocess.ts";
1030import { Path } from "#sitegen/path";1030import { Path } from "#sitegen/path";
1031import * as queue from "../../../lib/queue.ts";1031import * as queue from "../../../lib/queue.ts";
1032import * as log from "../../../lib/log.ts";1032import * as log from "../../../lib/log.ts";
1033import * as progress from "lib/progress.ts";1033import * as progress from "@clo/lib/progress.ts";
1034import * as ts from "../../../lib/ts.ts";1034import * as ts from "../../../lib/ts.ts";
10351035
1036import * as child_process from "node:child_process";1036import * as child_process from "node:child_process";
...@@ -1040,19 +1040,19 @@ import * as path from "node:path";...@@ -1040,19 +1040,19 @@ import * as path from "node:path";
1040import * as stream from "node:stream";1040import * as stream from "node:stream";
1041import * as zlib from "node:zlib";1041import * as zlib from "node:zlib";
10421042
1043import { MediaFile, MediaFileKind } from "@/file-viewer/models/MediaFile.ts";1043import { MediaFile, MediaFileKind } from "#src/file-viewer/models/MediaFile.ts";
1044import { FilePermissions } from "@/file-viewer/models/FilePermissions.ts";1044import { FilePermissions } from "#src/file-viewer/models/FilePermissions.ts";
1045import {1045import {
1046 formatDate,1046 formatDate,
1047 formatDurationLong,1047 formatDurationLong,
1048 formatSize,1048 formatSize,
1049} from "@/file-viewer/format.ts";1049} from "#src/file-viewer/format.ts";
1050import * as rules from "@/file-viewer/rules.ts";1050import * as rules from "#src/file-viewer/rules.ts";
1051import * as highlight from "@/file-viewer/highlight.ts";1051import * as highlight from "#src/file-viewer/highlight.ts";
1052import * as ffmpeg from "lib/subprocess/ffmpeg.ts";1052import * as ffmpeg from "@clo/lib/subprocess/ffmpeg.ts";
1053import * as rsync from "@/file-viewer/rsync.ts";1053import * as rsync from "#src/file-viewer/rsync.ts";
1054import * as derived from "@/file-viewer/models/derived.ts";1054import * as derived from "#src/file-viewer/models/derived.ts";
1055import * as transcodeRules from "@/file-viewer/transcode-rules.ts";1055import * as transcodeRules from "#src/file-viewer/transcode-rules.ts";
10561056
1057import { rawFileRoot as root } from "../paths.ts";1057import { rawFileRoot as root } from "../paths.ts";
1058import { ASSERT, UNWRAP } from "lib/assert.ts";1058import { ASSERT, UNWRAP } from "@clo/lib/assert.ts";
src/file-viewer/bin/file-trim.ts+1-1
...@@ -14,5 +14,5 @@ export async function main() {...@@ -14,5 +14,5 @@ export async function main() {
14 // TODO: delete unreferenced files14 // TODO: delete unreferenced files
15}15}
1616
17import * as log from "lib/log.ts";17import * as log from "@clo/lib/log.ts";
18import * as derived from "../models/derived.ts";18import * as derived from "../models/derived.ts";
src/file-viewer/cache.ts+6-6
...@@ -600,17 +600,17 @@ async function writeStream(...@@ -600,17 +600,17 @@ async function writeStream(
600import * as util from "node:util";600import * as util from "node:util";
601import * as fsCallbacks from "node:fs";601import * as fsCallbacks from "node:fs";
602import * as fs from "#sitegen/fs";602import * as fs from "#sitegen/fs";
603import * as async from "lib/async.ts";603import * as async from "@clo/lib/async.ts";
604import * as error from "lib/error.ts";604import * as error from "@clo/lib/error.ts";
605import * as stream from "node:stream";605import * as stream from "node:stream";
606import * as crypto from "node:crypto";606import * as crypto from "node:crypto";
607import * as http from "node:http";607import * as http from "node:http";
608import * as https from "node:https";608import * as https from "node:https";
609import * as paths from "./paths.ts";609import * as paths from "./paths.ts";
610import * as log from "lib/log.ts";610import * as log from "@clo/lib/log.ts";
611import { MediaFile } from "./models/MediaFile.ts";611import { MediaFile } from "./models/MediaFile.ts";
612import type { ReadableStream } from "node:stream/web";612import type { ReadableStream } from "node:stream/web";
613import { Lru } from "lib/Lru.ts";613import { Lru } from "@clo/lib/Lru.ts";
614import { Path } from "#sitegen/path";614import { Path } from "#sitegen/path";
615import { ASSERT, UNWRAP } from "lib/assert.ts";615import { ASSERT, UNWRAP } from "@clo/lib/assert.ts";
616import * as ts from "lib/ts.ts";616import * as ts from "@clo/lib/ts.ts";
src/file-viewer/format.ts+2-2
...@@ -287,5 +287,5 @@ export function formatDate(dateTime: Date) {...@@ -287,5 +287,5 @@ export function formatDate(dateTime: Date) {
287 }.${dateTime.getFullYear().toString().slice(2)}`;287 }.${dateTime.getFullYear().toString().slice(2)}`;
288}288}
289289
290import type { MediaFile } from "@/file-viewer/models/MediaFile.ts";290import type { MediaFile } from "#src/file-viewer/models/MediaFile.ts";
291import { escapeHtml } from "lib/render.ts";291import { escapeHtml } from "@clo/lib/render.ts";
src/file-viewer/highlight.ts+2-2
...@@ -215,9 +215,9 @@ export async function highlightCode(code: string, language: Language) {...@@ -215,9 +215,9 @@ export async function highlightCode(code: string, language: Language) {
215// "tsx",215// "tsx",
216// );216// );
217//217//
218import * as async from "lib/async.ts";218import * as async from "@clo/lib/async.ts";
219import * as fs from "#sitegen/fs";219import * as fs from "#sitegen/fs";
220import * as path from "node:path";220import * as path from "node:path";
221import * as oniguruma from "vscode-oniguruma";221import * as oniguruma from "vscode-oniguruma";
222import * as textmate from "vscode-textmate";222import * as textmate from "vscode-textmate";
223import * as render from "lib/render.ts";223import * as render from "@clo/lib/render.ts";
src/file-viewer/models/MediaFile.ts+1-1
...@@ -464,4 +464,4 @@ const getDirectoriesToReindexQuery = db.prepare(`...@@ -464,4 +464,4 @@ const getDirectoriesToReindexQuery = db.prepare(`
464import { getDb } from "#sitegen/sqlite";464import { getDb } from "#sitegen/sqlite";
465import * as path from "node:path/posix";465import * as path from "node:path/posix";
466import { FilePermissions } from "./FilePermissions.ts";466import { FilePermissions } from "./FilePermissions.ts";
467import { ASSERT } from "lib/assert.ts";467import { ASSERT } from "@clo/lib/assert.ts";
src/file-viewer/models/derived.ts+3-3
...@@ -217,6 +217,6 @@ import type { MediaFile } from "./MediaFile.ts";...@@ -217,6 +217,6 @@ import type { MediaFile } from "./MediaFile.ts";
217import { Path } from "#sitegen/path";217import { Path } from "#sitegen/path";
218import * as fs from "node:fs";218import * as fs from "node:fs";
219import * as crypto from "node:crypto";219import * as crypto from "node:crypto";
220import * as queue from "lib/queue.ts";220import * as queue from "@clo/lib/queue.ts";
221import * as progress from "lib/progress.ts";221import * as progress from "@clo/lib/progress.ts";
222import { ASSERT } from "lib/assert.ts";222import { ASSERT } from "@clo/lib/assert.ts";
src/file-viewer/pages/file.cotyledon-enterance.tsx+2-2
...@@ -1,6 +1,6 @@...@@ -1,6 +1,6 @@
1import { MediaFile } from "@/file-viewer/models/MediaFile.ts";1import { MediaFile } from "#src/file-viewer/models/MediaFile.ts";
2import { addScript } from "#sitegen";2import { addScript } from "#sitegen";
3import { Readme } from "@/file-viewer/cotyledon.tsx";3import { Readme } from "#src/file-viewer/cotyledon.tsx";
4import { MediaPanel } from "../views/clofi.tsx";4import { MediaPanel } from "../views/clofi.tsx";
55
6export const theme = {6export const theme = {
src/file-viewer/rsync.ts+3-3
...@@ -183,7 +183,7 @@ export class Parse {...@@ -183,7 +183,7 @@ export class Parse {
183import * as child_process from "node:child_process";183import * as child_process from "node:child_process";
184import * as readline from "node:readline";184import * as readline from "node:readline";
185import events from "node:events";185import events from "node:events";
186import * as progress from "lib/progress.ts";186import * as progress from "@clo/lib/progress.ts";
187import { formatSize } from "@/file-viewer/format.ts";187import { formatSize } from "#src/file-viewer/format.ts";
188import { UNWRAP } from "lib/assert.ts";188import { UNWRAP } from "@clo/lib/assert.ts";
189import { Path } from "#sitegen/path";189import { Path } from "#sitegen/path";
src/file-viewer/rules.ts+1-1
...@@ -153,5 +153,5 @@ const pathToCanvas = new Map<string, string>(Object.entries({...@@ -153,5 +153,5 @@ const pathToCanvas = new Map<string, string>(Object.entries({
153}));153}));
154154
155import type * as highlight from "./highlight.ts";155import type * as highlight from "./highlight.ts";
156import { MediaFile, MediaFileKind } from "@/file-viewer/models/MediaFile.ts";156import { MediaFile, MediaFileKind } from "#src/file-viewer/models/MediaFile.ts";
157import * as path from "node:path";157import * as path from "node:path";
src/file-viewer/transcode-rules.ts+7-7
...@@ -73,7 +73,7 @@ export const imagePresets = [...@@ -73,7 +73,7 @@ export const imagePresets = [
73 ext: ".avif",73 ext: ".avif",
74 args: [74 args: [
75 "-c:v",75 "-c:v",
76 "libaom-av1",76 "@clo/libaom-av1",
77 "-crf",77 "-crf",
78 "30",78 "30",
79 "-pix_fmt",79 "-pix_fmt",
...@@ -84,7 +84,7 @@ export const imagePresets = [...@@ -84,7 +84,7 @@ export const imagePresets = [
84 ext: ".jxl",84 ext: ".jxl",
85 args: [85 args: [
86 "-c:v",86 "-c:v",
87 "libjxl",87 "@clo/libjxl",
88 "-distance",88 "-distance",
89 "0.8",89 "0.8",
90 "-effort",90 "-effort",
...@@ -148,7 +148,7 @@ export function getAv1VideoArgs(...@@ -148,7 +148,7 @@ export function getAv1VideoArgs(
148 const { preset, mbitMax, crf, maxHeight, depth } = av1;148 const { preset, mbitMax, crf, maxHeight, depth } = av1;
149 const cmd = [...videoInputArgs];149 const cmd = [...videoInputArgs];
150150
151 cmd.push("-c:v", "libsvtav1");151 cmd.push("-c:v", "@clo/libsvtav1");
152 cmd.push(152 cmd.push(
153 "-svtav1-params",153 "-svtav1-params",
154 [154 [
...@@ -183,7 +183,7 @@ export function getOpusAudioArgs(...@@ -183,7 +183,7 @@ export function getOpusAudioArgs(
183183
184 cmd.push("-vn");184 cmd.push("-vn");
185185
186 cmd.push("-c:a", "libopus");186 cmd.push("-c:a", "@clo/libopus");
187 cmd.push("-b:a", audioKbit + "k");187 cmd.push("-b:a", audioKbit + "k");
188188
189 cmd.push("-y");189 cmd.push("-y");
...@@ -264,7 +264,7 @@ export function getH264HlsArgs(...@@ -264,7 +264,7 @@ export function getH264HlsArgs(
264 const aIdx = i * 2 + 1;264 const aIdx = i * 2 + 1;
265 // deno-fmt-ignore265 // deno-fmt-ignore
266 cmd.push(266 cmd.push(
267 `-c:${vIdx}`, "libx264",267 `-c:${vIdx}`, "@clo/libx264",
268 `-b:v:${vIdx}`, preset.videoBitrate,268 `-b:v:${vIdx}`, preset.videoBitrate,
269 `-filter:${vIdx}`, `scale=-2:min(${preset.maxHeight}\\,ih)`,269 `-filter:${vIdx}`, `scale=-2:min(${preset.maxHeight}\\,ih)`,
270 `-c:${aIdx}`, "aac",270 `-c:${aIdx}`, "aac",
...@@ -285,7 +285,7 @@ export function getH264HlsArgs(...@@ -285,7 +285,7 @@ export function getH264HlsArgs(
285 hlsPresets.forEach((preset, i) => {285 hlsPresets.forEach((preset, i) => {
286 // deno-fmt-ignore286 // deno-fmt-ignore
287 cmd.push(287 cmd.push(
288 `-c:v:${i}`, "libx264",288 `-c:v:${i}`, "@clo/libx264",
289 `-b:v:${i}`, preset.videoBitrate,289 `-b:v:${i}`, preset.videoBitrate,
290 `-filter:v:${i}`, `scale=-2:min(${preset.maxHeight}\\,ih)`,290 `-filter:v:${i}`, `scale=-2:min(${preset.maxHeight}\\,ih)`,
291 );291 );
...@@ -314,4 +314,4 @@ export function getH264HlsArgs(...@@ -314,4 +314,4 @@ export function getH264HlsArgs(
314}314}
315315
316import type { Path } from "#sitegen/path";316import type { Path } from "#sitegen/path";
317import * as ffmpeg from "lib/subprocess/ffmpeg.ts";317import * as ffmpeg from "@clo/lib/subprocess/ffmpeg.ts";
src/file-viewer/views/clofi.tsx+8-8
...@@ -925,7 +925,7 @@ CodeView.class = "code";...@@ -925,7 +925,7 @@ CodeView.class = "code";
925import "./clofi.css";925import "./clofi.css";
926import assert from "node:assert";926import assert from "node:assert";
927import path, { dirname } from "node:path";927import path, { dirname } from "node:path";
928import { MediaFile, MediaFileKind } from "@/file-viewer/models/MediaFile.ts";928import { MediaFile, MediaFileKind } from "#src/file-viewer/models/MediaFile.ts";
929import { addScript } from "#sitegen";929import { addScript } from "#sitegen";
930import {930import {
931 escapeUri,931 escapeUri,
...@@ -934,11 +934,11 @@ import {...@@ -934,11 +934,11 @@ import {
934 highlightConvo,934 highlightConvo,
935 highlightHashComments,935 highlightHashComments,
936 highlightLinksInTextView,936 highlightLinksInTextView,
937} from "@/file-viewer/format.ts";937} from "#src/file-viewer/format.ts";
938import { ForEveryone } from "@/file-viewer/cotyledon.tsx";938import { ForEveryone } from "#src/file-viewer/cotyledon.tsx";
939import * as mime from "lib/mime.ts";939import * as mime from "@clo/lib/mime.ts";
940import * as sort from "../sort.ts";940import * as sort from "../sort.ts";
941import CloverVideo from "@/tags/clover-video.marko";941import CloverVideo from "#src/tags/clover-video.marko";
942import Image from "@/tags/image.tsx";942import Image from "#src/tags/image.tsx";
943import * as render from "lib/render.ts";943import * as render from "@clo/lib/render.ts";
944import { UNWRAP } from "lib/assert.ts";944import { UNWRAP } from "@clo/lib/assert.ts";
src/file-viewer/views/lofi.marko+3-3
...@@ -66,6 +66,6 @@ export { meta, theme } from "./clofi.tsx";...@@ -66,6 +66,6 @@ export { meta, theme } from "./clofi.tsx";
66</div>66</div>
6767
68import * as path from "node:path";68import * as path from "node:path";
69import { escapeUri, formatDuration, formatSize, formatDate } from "@/file-viewer/format.ts";69import { escapeUri, formatDuration, formatSize, formatDate } from "#src/file-viewer/format.ts";
70import { MediaFileKind } from "@/file-viewer/models/MediaFile.ts";70import { MediaFileKind } from "#src/file-viewer/models/MediaFile.ts";
71import * as sort from "@/file-viewer/sort.ts";71import * as sort from "#src/file-viewer/sort.ts";
src/q+a/image.tsx+2-2
...@@ -73,7 +73,7 @@ export async function getQuestionImage(...@@ -73,7 +73,7 @@ export async function getQuestionImage(
73import * as crypto from "node:crypto";73import * as crypto from "node:crypto";
74import * as fs from "#sitegen/fs";74import * as fs from "#sitegen/fs";
75import * as path from "node:path";75import * as path from "node:path";
76import { Question } from "@/q+a/models/Question.ts";76import { Question } from "#src/q+a/models/Question.ts";
77import { RefCountedExpirable } from "lib/async.ts";77import { RefCountedExpirable } from "@clo/lib/async.ts";
78import * as view from "#sitegen/view";78import * as view from "#sitegen/view";
79import * as playwright from "playwright";79import * as playwright from "playwright";
src/q+a/markdown.tsx+1-1
...@@ -76,6 +76,6 @@ export function renderMarkdown(source: string) {...@@ -76,6 +76,6 @@ export function renderMarkdown(source: string) {
76}76}
7777
78import * as markodown from "@clo/markodown";78import * as markodown from "@clo/markodown";
79import * as render from "lib/render.ts";79import * as render from "@clo/lib/render.ts";
80import { artifactMap } from "./artifacts.ts";80import { artifactMap } from "./artifacts.ts";
81import { formatQuestionTimestamp, questionIdToTimestamp } from "./format.ts";81import { formatQuestionTimestamp, questionIdToTimestamp } from "./format.ts";
src/q+a/pages/admin.q+a.marko+1-1
...@@ -23,4 +23,4 @@ export const regenerate = {...@@ -23,4 +23,4 @@ export const regenerate = {
23<MainPage admin />23<MainPage admin />
2424
25import MainPage from "./q+a.marko";25import MainPage from "./q+a.marko";
26import { PendingQuestion } from "@/q+a/models/PendingQuestion.ts";26import { PendingQuestion } from "#src/q+a/models/PendingQuestion.ts";
src/q+a/pages/q+a.marko+1-1
...@@ -24,4 +24,4 @@ export const meta: Metadata = {...@@ -24,4 +24,4 @@ export const meta: Metadata = {
24</footer>24</footer>
25</question-layout>25</question-layout>
2626
27import { Question } from "@/q+a/models/Question.ts";27import { Question } from "#src/q+a/models/Question.ts";
src/q+a/scripts/editor.client.tsx+2-2
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1import type { ScriptPayload } from "@/q+a/views/editor.marko";1import type { ScriptPayload } from "#src/q+a/views/editor.marko";
2import QuestionRender from "@/q+a/tags/question.marko";2import QuestionRender from "#src/q+a/tags/question.marko";
33
4declare const payload: ScriptPayload;4declare const payload: ScriptPayload;
5const date = new Date(payload.date);5const date = new Date(payload.date);
src/q+a/tags/question-layout.marko+1-1
...@@ -19,4 +19,4 @@ export const theme = {...@@ -19,4 +19,4 @@ export const theme = {
19};19};
2020
21import { addScript } from "#sitegen";21import { addScript } from "#sitegen";
22import * as render from "lib/render.ts";22import * as render from "@clo/lib/render.ts";
src/q+a/tags/question.marko+3-3
...@@ -37,7 +37,7 @@ export const transitionDate = 1735639200000;...@@ -37,7 +37,7 @@ export const transitionDate = 1735639200000;
37 client import "./clickable-links.client.ts";37 client import "./clickable-links.client.ts";
38</>38</>
3939
40import type { Question } from "@/q+a/models/Question.ts";40import type { Question } from "#src/q+a/models/Question.ts";
41import { formatQuestionTimestamp, formatQuestionISOTimestamp } from "@/q+a/format.ts";41import { formatQuestionTimestamp, formatQuestionISOTimestamp } from "#src/q+a/format.ts";
42import * as markdown from "@/q+a/markdown.tsx";42import * as markdown from "#src/q+a/markdown.tsx";
43import { addScript as Script } from "#sitegen"43import { addScript as Script } from "#sitegen"
src/q+a/views/backend-inbox.marko+2-2
...@@ -1,9 +1,9 @@...@@ -1,9 +1,9 @@
1export { theme } from "../tags/question-layout.marko";1export { theme } from "../tags/question-layout.marko";
2import { PendingQuestion } from "@/q+a/models/PendingQuestion.ts";2import { PendingQuestion } from "#src/q+a/models/PendingQuestion.ts";
3import {3import {
4 formatQuestionISOTimestamp,4 formatQuestionISOTimestamp,
5 formatQuestionTimestamp,5 formatQuestionTimestamp,
6} from "@/q+a/format.ts";6} from "#src/q+a/format.ts";
7export const meta = { title: 'question answer inbox' };7export const meta = { title: 'question answer inbox' };
88
9<const/questions = PendingQuestion.getAll() />9<const/questions = PendingQuestion.getAll() />
src/q+a/views/editor.marko+2-2
...@@ -63,5 +63,5 @@ export interface ScriptPayload {...@@ -63,5 +63,5 @@ export interface ScriptPayload {
63<html-script src="/js/q+a/scripts/editor.js" type="module" />63<html-script src="/js/q+a/scripts/editor.js" type="module" />
6464
65import * as devalue from 'devalue';65import * as devalue from 'devalue';
66import { type PendingQuestion } from "@/q+a/models/PendingQuestion.ts";66import { type PendingQuestion } from "#src/q+a/models/PendingQuestion.ts";
67import { Question, QuestionType } from "@/q+a/models/Question.ts";67import { Question, QuestionType } from "#src/q+a/models/Question.ts";
src/q+a/views/image-embed.marko+1-1
...@@ -13,4 +13,4 @@ export interface Input {...@@ -13,4 +13,4 @@ export interface Input {
13 <question question=input.question />13 <question question=input.question />
14</main>14</main>
1515
16import { Question } from '@/q+a/models/Question.ts';16import { Question } from '#src/q+a/models/Question.ts';
src/q+a/views/permalink.marko+3-3
...@@ -52,6 +52,6 @@ server export function meta({ context, question }) {...@@ -52,6 +52,6 @@ server export function meta({ context, question }) {
52<a href="/q+a">view more questions</a>52<a href="/q+a">view more questions</a>
53</question-layout>53</question-layout>
5454
55import { Question, QuestionType } from '@/q+a/models/Question.ts';55import { Question, QuestionType } from '#src/q+a/models/Question.ts';
56import { transitionDate } from "@/q+a/tags/question.marko";56import { transitionDate } from "#src/q+a/tags/question.marko";
57import { formatQuestionTimestamp } from "@/q+a/format.ts";57import { formatQuestionTimestamp } from "#src/q+a/format.ts";
src/site.ts+1-1
...@@ -123,6 +123,6 @@ export const fonts: sg.Font[] = [...@@ -123,6 +123,6 @@ export const fonts: sg.Font[] = [
123];123];
124124
125import * as path from "node:path";125import * as path from "node:path";
126import type { Template as MetaTemplate } from "lib/render/meta.ts";126import type { Template as MetaTemplate } from "@clo/lib/render/meta.ts";
127import type * as sg from "#sitegen";127import type * as sg from "#sitegen";
128import { nasRoot } from "./file-viewer/paths.ts";128import { nasRoot } from "./file-viewer/paths.ts";
src/source-of-truth.dockerfile+1-1
...@@ -10,7 +10,7 @@ run npx esbuild --bundle \...@@ -10,7 +10,7 @@ run npx esbuild --bundle \
10 framework/backend/entry-node.ts \10 framework/backend/entry-node.ts \
11 --platform=node \11 --platform=node \
12 --format=esm \12 --format=esm \
13 --define:globalThis.CLOVER_SERVER_ENTRY='"@/source-of-truth.ts"' \13 --define:globalThis.CLOVER_SERVER_ENTRY='"#src/source-of-truth.ts"' \
14 --minify \14 --minify \
15 --sourcemap=linked \15 --sourcemap=linked \
16 --entry-names=index \16 --entry-names=index \
src/source-of-truth.ts+4-4
...@@ -104,13 +104,13 @@ const closeFile = util.promisify(fsCallbacks.close);...@@ -104,13 +104,13 @@ const closeFile = util.promisify(fsCallbacks.close);
104const fstat = util.promisify(fsCallbacks.fstat);104const fstat = util.promisify(fsCallbacks.fstat);
105105
106import { Hono } from "#hono";106import { Hono } from "#hono";
107import { MediaFile, MediaFileKind } from "@/file-viewer/models/MediaFile.ts";107import { MediaFile, MediaFileKind } from "#src/file-viewer/models/MediaFile.ts";
108import { FilePermissions } from "@/file-viewer/models/FilePermissions.ts";108import { FilePermissions } from "#src/file-viewer/models/FilePermissions.ts";
109import * as path from "node:path";109import * as path from "node:path";
110import * as fs from "#sitegen/fs";110import * as fs from "#sitegen/fs";
111import * as fsCallbacks from "node:fs";111import * as fsCallbacks from "node:fs";
112import * as util from "node:util";112import * as util from "node:util";
113import * as stream from "node:stream";113import * as stream from "node:stream";
114import * as mime from "lib/mime.ts";114import * as mime from "@clo/lib/mime.ts";
115import { derivedFileRoot, rawFileRoot } from "./file-viewer/paths.ts";115import { derivedFileRoot, rawFileRoot } from "./file-viewer/paths.ts";
116import { ASSERT, UNWRAP } from "lib/assert.ts";116import { ASSERT, UNWRAP } from "@clo/lib/assert.ts";
src/tags/clover-video.marko+2-2
...@@ -69,5 +69,5 @@ export interface Input {...@@ -69,5 +69,5 @@ export interface Input {
6969
70client import "./clover-video.client.ts";70client import "./clover-video.client.ts";
7171
72import { MediaFile } from "@/file-viewer/models/MediaFile.ts";72import { MediaFile } from "#src/file-viewer/models/MediaFile.ts";
73import { UNWRAP, ASSERT } from "lib/assert.ts";73import { UNWRAP, ASSERT } from "@clo/lib/assert.ts";
src/tags/image.tsx+5-5
...@@ -57,9 +57,9 @@ export default function Image(...@@ -57,9 +57,9 @@ export default function Image(
57 );57 );
58}58}
5959
60import * as transcodeRules from "@/file-viewer/transcode-rules.ts";60import * as transcodeRules from "#src/file-viewer/transcode-rules.ts";
61import { MediaFile } from "@/file-viewer/models/MediaFile.ts";61import { MediaFile } from "#src/file-viewer/models/MediaFile.ts";
62import { escapeUri } from "@/file-viewer/format.ts";62import { escapeUri } from "#src/file-viewer/format.ts";
63import { UNWRAP } from "lib/assert.ts";63import { UNWRAP } from "@clo/lib/assert.ts";
64import { extsVideo } from "@/file-viewer/rules.ts";64import { extsVideo } from "#src/file-viewer/rules.ts";
65import CloverVideo from "./clover-video.marko";65import CloverVideo from "./clover-video.marko";
src/tags/photo-grid.tsx+2-2
...@@ -136,7 +136,7 @@ function mapSize(size: string | number) {...@@ -136,7 +136,7 @@ function mapSize(size: string | number) {
136}136}
137137
138import "./photo-grid.css";138import "./photo-grid.css";
139import { MediaFile } from "@/file-viewer/models/MediaFile.ts";139import { MediaFile } from "#src/file-viewer/models/MediaFile.ts";
140import Image from "./image.tsx";140import Image from "./image.tsx";
141import * as path from "node:path";141import * as path from "node:path";
142import { ASSERT } from "lib/assert.ts";142import { ASSERT } from "@clo/lib/assert.ts";
src/tags/questions-embed.marko+2-2
...@@ -12,5 +12,5 @@ export interface Input {...@@ -12,5 +12,5 @@ export interface Input {
12 </>12 </>
13</div>13</div>
1414
15import QuestionRender from "@/q+a/tags/question.marko";15import QuestionRender from "#src/q+a/tags/question.marko";
16import { Question } from "@/q+a/models/Question.ts";16import { Question } from "#src/q+a/models/Question.ts";
tsconfig.json+2-3
...@@ -5,11 +5,10 @@...@@ -5,11 +5,10 @@
5 "incremental": true,5 "incremental": true,
6 "jsx": "react-jsxdev",6 "jsx": "react-jsxdev",
7 "jsxImportSource": "#jsx",7 "jsxImportSource": "#jsx",
8 "lib": ["esnext", "es2024", "dom", "dom.iterable"],8 "@clo/lib": ["esnext", "es2024", "dom", "dom.iterable"],
9 "module": "nodenext",9 "module": "nodenext",
10 "noEmit": true,10 "noEmit": true,
11 "outDir": ".clover/ts",11 "outDir": ".clover/ts",
12 "paths": { "@/*": ["src/*"] },
13 "rootDir": ".",12 "rootDir": ".",
14 "skipLibCheck": true,13 "skipLibCheck": true,
15 "strict": true,14 "strict": true,
...@@ -19,5 +18,5 @@...@@ -19,5 +18,5 @@
19 "resolveJsonModule": true,18 "resolveJsonModule": true,
20 "types": ["marko"]19 "types": ["marko"]
21 },20 },
22 "include": ["lib/**/*", "src/**/*", "framework/**/*"]21 "include": ["@clo/lib/**/*", "src/**/*", "framework/**/*"]
23}22}