@mailquilt/cli 0.0.0 → 0.5.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.
- package/LICENSE +21 -0
- package/README.md +113 -0
- package/dist/bin.js +1707 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1700 -0
- package/dist/index.js.map +1 -0
- package/package.json +58 -3
- package/src/bin.ts +10 -0
- package/src/cli.ts +70 -0
- package/src/commands/check.ts +308 -0
- package/src/commands/dev.ts +137 -0
- package/src/commands/mcp.ts +59 -0
- package/src/commands/render.ts +127 -0
- package/src/dev/html.ts +583 -0
- package/src/dev/server.ts +875 -0
- package/src/index.ts +8 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
interface CliIo {
|
|
2
|
+
readonly stdout: {
|
|
3
|
+
write: (chunk: string) => unknown;
|
|
4
|
+
};
|
|
5
|
+
readonly stderr: {
|
|
6
|
+
write: (chunk: string) => unknown;
|
|
7
|
+
};
|
|
8
|
+
readonly cwd?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare const runRender: (args: readonly string[], io: CliIo) => Promise<number>;
|
|
11
|
+
/** Executes the Mail Quilt CLI for `argv` and returns the exit code. */
|
|
12
|
+
export declare const runCli: (argv: readonly string[], io?: CliIo) => Promise<number>;
|
|
13
|
+
export declare const runCheck: (args: readonly string[], io: CliIo) => Promise<number>;
|
|
14
|
+
export declare const runDev: (args: readonly string[], io: CliIo) => Promise<number>;
|
|
15
|
+
export declare const runMcp: (args: readonly string[], io: CliIo) => Promise<number>;
|
|
16
|
+
interface DevServerOptions {
|
|
17
|
+
/** Directory containing email JSON files (default `./emails`). */
|
|
18
|
+
readonly dir: string;
|
|
19
|
+
/** Port to listen on `127.0.0.1` (default `4173`; `0` for ephemeral port). */
|
|
20
|
+
readonly port?: number | undefined;
|
|
21
|
+
/** Create a starter `welcome.json` when `dir` contains no `.json` files (default `true`). */
|
|
22
|
+
readonly createStarterIfEmpty?: boolean | undefined;
|
|
23
|
+
/** Optional override for `@mailquilt/editor`'s `dist/cdn` directory. */
|
|
24
|
+
readonly cdnDir?: string | undefined;
|
|
25
|
+
}
|
|
26
|
+
interface DevServerHandle {
|
|
27
|
+
readonly dir: string;
|
|
28
|
+
readonly port: number;
|
|
29
|
+
readonly url: string;
|
|
30
|
+
readonly files: readonly string[];
|
|
31
|
+
readonly close: () => Promise<void>;
|
|
32
|
+
}
|
|
33
|
+
/** Lists all `.json` email files inside `canonicalRoot`, sorted alphabetically. */
|
|
34
|
+
export declare const listEmailFiles: (canonicalRoot: string) => Promise<string[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Starts the localhost-only (`127.0.0.1`) Mail Quilt dev server watching `dir`
|
|
37
|
+
* for `.json` email files with live SSE reload and `loadDocument()` validation.
|
|
38
|
+
*/
|
|
39
|
+
export declare const startDevServer: (options: DevServerOptions) => Promise<DevServerHandle>;
|
|
40
|
+
export type { CliIo, DevServerHandle, DevServerOptions };
|
|
41
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/commands/render.ts","../src/cli.ts","../src/commands/check.ts","../src/commands/dev.ts","../src/commands/mcp.ts","../src/dev/server.ts"],"mappings":"A,UAOiB;WACN;IAAU,QAAQ;;WAClB;IAAU,QAAQ;;WAClB;;qBAiBE,YAAS,yBACG,IACnB,UACH;;qBCGU,SAAM,yBACM,KACnB,UACH;qBCqMU,WAAQ,yBACI,IACnB,UACH;qBC9KU,SAAM,yBACM,IACnB,UACH;qBC7CU,SAAM,yBACM,IACnB,UACH;UCEc;;WAEN;;WAEA;;WAEA;;WAEA;;UAGM;WACN;WACA;WACA;WACA;WACA,aAAa;;;qBAmHX,iBAAc,0BAExB;;;;;qBA+KU,iBAAc,SAChB,qBACR,QAAQ"}
|