@kiln-js/cli 0.1.5 → 0.2.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/README.md +47 -0
- package/dist/dashboard.d.ts +32 -0
- package/dist/doctor.d.ts +1 -0
- package/dist/engine.d.ts +7 -0
- package/dist/errors.d.ts +1 -0
- package/dist/hints.d.ts +9 -0
- package/dist/index.js +1238 -368
- package/dist/preflight.d.ts +1 -0
- package/dist/runtime.d.ts +9 -0
- package/dist/test.d.ts +2 -0
- package/dist/typecheck.d.ts +1 -0
- package/dist/versions.d.ts +11 -0
- package/package.json +6 -6
- package/dist/config.d.ts +0 -3
package/README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# @kiln-js/cli
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@kiln-js/cli)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
6
|
+
Part of the Kiln framework.
|
|
7
|
+
|
|
8
|
+
Part of [Kiln](https://github.com/kiln-js/kiln), a file-based server-side rendering framework for React and Vite.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
bun add -g @kiln-js/cli
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
kiln create my-app
|
|
20
|
+
cd my-app
|
|
21
|
+
bun run dev
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Commands
|
|
25
|
+
|
|
26
|
+
| Command | Purpose |
|
|
27
|
+
|---|---|
|
|
28
|
+
| `kiln create [name]` | Scaffold a project |
|
|
29
|
+
| `kiln dev` | Dev server with SSR and hot reload |
|
|
30
|
+
| `kiln build [--target vercel]` | Production build |
|
|
31
|
+
| `kiln start` | Serve the production build |
|
|
32
|
+
| `kiln routes` | Print the route table |
|
|
33
|
+
| `kiln generate` | Create a page, API route, or layout |
|
|
34
|
+
|
|
35
|
+
Requires [Bun](https://bun.sh) 1.1 or later.
|
|
36
|
+
|
|
37
|
+
## Documentation
|
|
38
|
+
|
|
39
|
+
See the [Kiln repository](https://github.com/kiln-js/kiln) for the full API reference and guides.
|
|
40
|
+
|
|
41
|
+
## Development
|
|
42
|
+
|
|
43
|
+
This repository is generated from the Kiln monorepo. Make changes there, then run `scripts/publish-repo.ps1` to publish them here. Report issues in this repository, and send pull requests to the monorepo.
|
|
44
|
+
|
|
45
|
+
## License
|
|
46
|
+
|
|
47
|
+
MIT
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { CacheStats } from "@kiln-js/vite-plugin";
|
|
2
|
+
interface RequestEntry {
|
|
3
|
+
at: number;
|
|
4
|
+
method: string;
|
|
5
|
+
path: string;
|
|
6
|
+
status: number;
|
|
7
|
+
ms: number;
|
|
8
|
+
}
|
|
9
|
+
interface ErrorEntry {
|
|
10
|
+
at: number;
|
|
11
|
+
method: string;
|
|
12
|
+
path: string;
|
|
13
|
+
message: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class DevStats {
|
|
16
|
+
readonly startedAt: number;
|
|
17
|
+
private requests;
|
|
18
|
+
private errors;
|
|
19
|
+
private total;
|
|
20
|
+
private failed;
|
|
21
|
+
recordRequest(entry: Omit<RequestEntry, "at">): void;
|
|
22
|
+
recordError(entry: Omit<ErrorEntry, "at">): void;
|
|
23
|
+
snapshot(): {
|
|
24
|
+
startedAt: number;
|
|
25
|
+
total: number;
|
|
26
|
+
failed: number;
|
|
27
|
+
requests: RequestEntry[];
|
|
28
|
+
errors: ErrorEntry[];
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export declare function renderDashboard(stats: DevStats, cache: CacheStats, pathname: string): string;
|
|
32
|
+
export {};
|
package/dist/doctor.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function runDoctor(): number;
|
package/dist/engine.d.ts
ADDED
package/dist/errors.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export interface Frame {
|
|
|
5
5
|
column: number;
|
|
6
6
|
}
|
|
7
7
|
export declare function parseFrames(stack: string): Frame[];
|
|
8
|
+
export declare function isAppFrame(f: Frame): boolean;
|
|
8
9
|
export declare function printError(err: unknown, context: string): void;
|
|
9
10
|
export declare function renderDevError(err: unknown, meta: {
|
|
10
11
|
method: string;
|