@3sln/trove 0.0.2 → 0.0.3
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 +35 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -203,6 +203,41 @@ still writes the keys, commented, with a line saying what they are for.
|
|
|
203
203
|
Credentials never land in a committed file: on Workers they become `wrangler secret put`
|
|
204
204
|
steps and a gitignored `.dev.vars`; everywhere else a gitignored `.env`.
|
|
205
205
|
|
|
206
|
+
#### Without a person
|
|
207
|
+
|
|
208
|
+
Every question has a stable key, so the whole thing can be driven by a script or an
|
|
209
|
+
agent. Keys are a flat namespace rather than the text of a question — rewording a hint
|
|
210
|
+
should not break a caller.
|
|
211
|
+
|
|
212
|
+
```sh
|
|
213
|
+
npm create @3sln/trove -- --describe # every key, its type and its default
|
|
214
|
+
|
|
215
|
+
npm create @3sln/trove drive -- --runtime=workers --json \
|
|
216
|
+
--set storage.bucket=acme-objects \
|
|
217
|
+
--set identity.driver=cloudflare-access --set identity.team=acme \
|
|
218
|
+
--set workers.d1.id=db-abc
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
`--json` puts one parseable object on stdout — files written, commands to run next,
|
|
222
|
+
warnings, and anything skipped — with every human word on stderr. `--config file.json`
|
|
223
|
+
takes the same keys in bulk and `--set` overrides it. `--dry-run` answers "what would
|
|
224
|
+
you do" without writing.
|
|
225
|
+
|
|
226
|
+
An answer that is never asked for is an **error**, not a shrug: it means either a typo or
|
|
227
|
+
a setting another answer ruled out (`storage.bucket` when the backend is `filesystem`),
|
|
228
|
+
and a caller that thinks it configured a bucket should not get a drive without one.
|
|
229
|
+
|
|
230
|
+
The same thing is available as a library, which is what `--describe` is generated from:
|
|
231
|
+
|
|
232
|
+
```js
|
|
233
|
+
import { createProject, describeQuestions } from '@3sln/create-trove';
|
|
234
|
+
|
|
235
|
+
const { files, steps, unused } = await createProject({
|
|
236
|
+
name: 'drive', version: '0.0.3', runtime: 'node',
|
|
237
|
+
answers: { 'storage.root': '/srv/objects', 'identity.driver': 'header' },
|
|
238
|
+
});
|
|
239
|
+
```
|
|
240
|
+
|
|
206
241
|
### From npm
|
|
207
242
|
|
|
208
243
|
Trove publishes as one package with the web app already built inside it, so there is no
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@3sln/trove",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Trove — a self-hostable, plugin-extensible Google Drive. Semantic search, pluggable storage (S3 / filesystem / NAS), and a VS Code-style contribution system with sandboxed plugins.",
|
|
6
6
|
"repository": {
|