mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-17 04:45:33 -08:00
Split the web console into by-job files, add page tests and a docs-table test, plus docs
AI Assisted
This commit is contained in:
1 parent
699a827cae
commit
3edb4468a8
121 files changed
+25603
-20145
No files matched your search
@@ -21,7 +21,7 @@ import path from "node:path";
|
||||
import { execFileSync, spawnSync } from "node:child_process";
|
||||
import http from "node:http";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { readChat } from "../src/web-console/lib.mjs";
|
||||
import { readChat } from "../src/web-console/inbox.mjs";
|
||||
|
||||
export const ROOT = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
|
||||
export const CONSOLE_CLI = path.join(ROOT, "src", "web-console", "console.mjs");
|
||||
@@ -179,6 +179,14 @@ export const helpTemplate = () => {
|
||||
return tpl[1];
|
||||
};
|
||||
|
||||
// The Planny poses each skill's starting screen clones, from index.html.
|
||||
export const poseTemplate = () => {
|
||||
const html = fs.readFileSync(path.join(ROOT, "src", "web-console", "public", "index.html"), "utf8");
|
||||
const tpl = html.match(/<template id="start-poses">([\s\S]*?)<\/template>/);
|
||||
assert.ok(tpl, "index.html has the start-poses template");
|
||||
return tpl[1];
|
||||
};
|
||||
|
||||
// The server checks magic bytes only, so a JPEG header and some padding will do.
|
||||
export const JPEG = Buffer.concat([Buffer.from([0xff, 0xd8, 0xff, 0xe0]), Buffer.alloc(400, 7), Buffer.from([0xff, 0xd9])]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user