leglas 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@
6
6
  <meta name="robots" content="noindex" />
7
7
  <link rel="icon" href="/leglas/favicon.svg" type="image/svg+xml" />
8
8
  <title>Leglas</title>
9
- <script type="module" crossorigin src="/leglas/assets/index-CcHf_UOb.js"></script>
9
+ <script type="module" crossorigin src="/leglas/assets/index-CXz1BSV1.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/leglas/assets/index-C59b2VHc.css">
11
11
  </head>
12
12
  <body>
package/dist/show.d.ts CHANGED
@@ -1,22 +1,13 @@
1
1
  import { type PendingRequest, type Preview } from "@leglas/server";
2
2
  /**
3
- * Everything Leglas holds about one direction, assembled for whoever was
4
- * handed its reference block.
3
+ * Everything Leglas holds about one direction, for whoever was handed its
4
+ * reference block:
5
5
  *
6
- * The block is copied out of the rail and pasted somewhere else: a chat, an
7
- * issue, an agent's prompt. It carries enough to read, and points here for the
8
- * rest. What "the rest" means is deliberate:
9
- *
10
- * - the file behind the direction, which nothing else exposes. A URL like
11
- * `/?v-hero=aurora` is the scaffold's convention for
12
- * `.leglas/variants/hero/aurora.tsx`, and an agent that has to guess at that
13
- * goes looking through the tree instead of opening the file.
14
- * - the set it is being judged against. A direction described alone invites an
15
- * agent to improve it straight out of the comparison, which is the one thing
16
- * the product exists to prevent.
17
- * - what is pending against it. Note the tense: requests are a queue that gets
18
- * drained and cleared, so this is what has been asked and not yet done, not
19
- * a history of everything ever asked.
6
+ * - the file behind it, which nothing else exposes (`/?v-hero=aurora` is
7
+ * `.leglas/variants/hero/aurora.tsx` by the scaffold's convention).
8
+ * - the set it's judged against, since a direction described alone gets
9
+ * improved straight out of the comparison.
10
+ * - what's pending against it: the queue as it stands, not a history.
20
11
  */
21
12
  export type ShowDirection = {
22
13
  title: string;
@@ -1,20 +1,9 @@
1
1
  /**
2
- * The signals that mean "this Leglas is over", and what it owes on the way out.
3
- *
4
- * Leglas holds things the operating system will not tidy up for it: the dev
5
- * servers it started, the checkouts it made, and a headless browser for
6
- * captures. Only a handler can release those, so every signal a terminal
7
- * routinely sends has to have one.
8
- *
9
- * SIGHUP is the one that was missing, and it is the most ordinary of the
10
- * three: it arrives when the terminal window closes. Node's default action
11
- * for it is to terminate at once, so the shutdown never ran and the browser
12
- * was reparented to init, holding its memory until the machine restarted.
13
- * Invisibly, because it is headless.
14
- *
15
- * SIGKILL is deliberately absent. It cannot be handled by anyone, which is
16
- * why the browser also records who launched it, and a later Leglas closes the
17
- * ones whose owner is gone.
2
+ * The signals that end this Leglas. It holds dev servers, checkouts and a
3
+ * headless capture browser that only a handler can release, so every signal a
4
+ * terminal sends needs one. SIGHUP arrives when the terminal window closes, and
5
+ * Node's default exits at once. SIGKILL can't be handled; the browser records
6
+ * its owner so a later Leglas can close it.
18
7
  */
19
8
  export declare const SHUTDOWN_SIGNALS: readonly ["SIGINT", "SIGTERM", "SIGHUP"];
20
9
  export type ShutdownSignal = (typeof SHUTDOWN_SIGNALS)[number];
@@ -22,11 +11,7 @@ export type SignalTarget = {
22
11
  on(signal: ShutdownSignal, listener: () => void): void;
23
12
  };
24
13
  /**
25
- * Wire every shutdown signal to one stop, and run it at most once.
26
- *
27
- * Two signals in quick succession is ordinary: an impatient second Ctrl-C, or
28
- * a SIGHUP chasing a SIGTERM as a terminal tears down. Stopping twice would
29
- * close a browser mid-close and race the server's own teardown, so the second
30
- * one is ignored rather than queued.
14
+ * Wires every shutdown signal to one stop, run at most once. A second signal
15
+ * soon after is ordinary, and stopping twice would close a browser mid-close.
31
16
  */
32
17
  export declare function installShutdown(stop: () => Promise<void>, target?: SignalTarget): () => Promise<void>;
@@ -0,0 +1,2 @@
1
+ /** A running Leglas that serves this project and has these directions on its rail. */
2
+ export declare function leglasServing(cwd: string, titles: readonly string[]): import("vitest").Mock<typeof fetch>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leglas",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Compare design directions inside your own running app.",
5
5
  "license": "MIT",
6
6
  "repository": {