datasette-ts 0.0.1

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 ADDED
@@ -0,0 +1,86 @@
1
+ # datasette-ts
2
+
3
+ TypeScript-first Datasette-style explorer for SQLite, with local serve and Cloudflare Workers deploy.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g datasette-ts
9
+ # or
10
+ npx datasette-ts --help
11
+ ```
12
+
13
+ ## Quickstart (local)
14
+
15
+ ```bash
16
+ datasette-ts serve ./my.db --port 8001
17
+ ```
18
+
19
+ Open `http://127.0.0.1:8001`.
20
+
21
+ ## Inspect a database
22
+
23
+ ```bash
24
+ datasette-ts inspect ./my.db --inspect-file inspect-data.json
25
+ ```
26
+
27
+ ## Deploy to Cloudflare (Alchemy)
28
+
29
+ Prereqs:
30
+ - `sqlite3` available on your PATH
31
+ - Alchemy configured and logged in (`alchemy configure`, `alchemy login`)
32
+
33
+ Basic deploy (worker/D1 names default to the SQLite basename):
34
+
35
+ ```bash
36
+ datasette-ts deploy cloudflare ./my.db
37
+ ```
38
+
39
+ Explicit names + profile:
40
+
41
+ ```bash
42
+ datasette-ts deploy cloudflare ./my.db \
43
+ --worker my-datasette \
44
+ --d1 my-datasette-db \
45
+ --db-name mydb \
46
+ --profile prod
47
+ ```
48
+
49
+ Notes:
50
+ - The CLI generates a D1 import SQL file at `.datasette-ts/imports/<db-name>.sql`.
51
+ - Use `--no-precompute-inspect` if you want to skip inspect metadata generation.
52
+
53
+ ## CLI help
54
+
55
+ ```bash
56
+ datasette-ts --help
57
+ datasette-ts serve --help
58
+ datasette-ts inspect --help
59
+ datasette-ts deploy cloudflare --help
60
+ ```
61
+
62
+ ## Build
63
+
64
+ ```bash
65
+ npm run build
66
+ ```
67
+
68
+ Build outputs:
69
+ - `dist/cli.js` (Node CLI entrypoint)
70
+ - `dist/worker.js` (Cloudflare Worker entrypoint)
71
+
72
+ The deploy command prefers `dist/worker.js` when present, so the published package ships a ready-to-bundle worker.
73
+
74
+ ## Publish
75
+
76
+ ```bash
77
+ npm version <patch|minor|major>
78
+ npm run build
79
+ npm pack
80
+ npm publish
81
+ ```
82
+
83
+ ## Status
84
+
85
+ - Works: local serve, inspect data export, Cloudflare Workers deploy via Alchemy.
86
+ - Not yet: config files, plugins, write APIs.