backend-skeleton 1.0.0-beta.2 → 1.0.0-beta.4
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 +12 -2
- package/bin/bskel.mjs +260 -11
- package/contracts/completeness.mjs +27 -2
- package/contracts/emit.mjs +68 -9
- package/contracts/export.mjs +94 -25
- package/contracts/openapi.mjs +307 -40
- package/handles/audit.mjs +83 -0
- package/handles/codec.mjs +11 -5
- package/handles/providers/java-spring/emit.mjs +9 -2
- package/handles/providers/java-spring/plan.mjs +20 -0
- package/handles/providers/java-spring/templates/HandleCodec.java.tmpl +13 -5
- package/handles/providers/java-spring/templates/HandleController.java.tmpl +54 -20
- package/handles/providers/java-spring/templates/ResourceResolver.java.tmpl +17 -1
- package/handles/providers/java-spring/templates/ResourceResolverStub.java.tmpl +5 -0
- package/handles/providers/java-spring.mjs +2 -2
- package/handles/providers/python-fastapi/emit.mjs +5 -1
- package/handles/providers/python-fastapi/templates/codec.py.tmpl +9 -1
- package/handles/providers/python-fastapi/templates/router.py.tmpl +43 -19
- package/handles/providers/typescript-express/templates/codec.ts.tmpl +10 -1
- package/lib/cli.mjs +51 -3
- package/lib/handles-manifest.mjs +10 -4
- package/lib/repo.mjs +56 -0
- package/package.json +1 -1
- package/scanners/adapters/_express-shared.mjs +17 -12
- package/scanners/adapters/generic-grep.mjs +5 -1
- package/scanners/adapters/java-spring.mjs +60 -14
- package/scanners/adapters/javascript-express.mjs +5 -1
- package/scanners/adapters/python-fastapi.mjs +17 -14
- package/scanners/adapters/typescript-express.mjs +6 -1
- package/scanners/registry.mjs +5 -2
- package/scanners/text-util.mjs +25 -0
- package/schemas/adapter.schema.json +6 -2
- package/schemas/contract-resolution.schema.json +6 -1
- package/schemas/feature-contract.schema.json +10 -1
- package/schemas/handles-plan.schema.json +1 -0
- package/stack/bootstrap/db-up.sh +52 -0
- package/stack/bootstrap/docker-compose.postgres.yml +18 -0
- package/stack/catalog/postgres-dev-db.yml +55 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
id: postgres-dev-db
|
|
2
|
+
description: >
|
|
3
|
+
A local-only Postgres container for development, via Docker Compose -- run via
|
|
4
|
+
scripts/db-up.sh, which starts it, waits for readiness, and writes DATABASE_URL into .env.
|
|
5
|
+
See D-docker-postgres-stack in DECISIONS.md: this is a LOCAL DEV database only, not a
|
|
6
|
+
production deployment recipe (no TLS, a fixed default password, single unreplicated
|
|
7
|
+
container) -- a permanent, deliberate scope limit, not a to-do.
|
|
8
|
+
|
|
9
|
+
detect:
|
|
10
|
+
files:
|
|
11
|
+
- docker-compose.postgres.yml
|
|
12
|
+
env_keys: []
|
|
13
|
+
|
|
14
|
+
static:
|
|
15
|
+
files:
|
|
16
|
+
- path: docker-compose.postgres.yml
|
|
17
|
+
template: bootstrap/docker-compose.postgres.yml
|
|
18
|
+
mode: "644"
|
|
19
|
+
- path: scripts/db-up.sh
|
|
20
|
+
template: bootstrap/db-up.sh
|
|
21
|
+
mode: "755"
|
|
22
|
+
- path: scripts/_bskel-lib.sh
|
|
23
|
+
template: bootstrap/_lib.sh
|
|
24
|
+
mode: "644"
|
|
25
|
+
|
|
26
|
+
env_example:
|
|
27
|
+
- key: DATABASE_URL
|
|
28
|
+
required: false
|
|
29
|
+
secret: true
|
|
30
|
+
doc: "written automatically by scripts/db-up.sh once postgres is confirmed ready -- do not set this by hand, it will be overwritten. If your app reads a differently-named variable, copy/rename this value."
|
|
31
|
+
- key: POSTGRES_USER
|
|
32
|
+
required: false
|
|
33
|
+
doc: "defaults to \"app\" if unset -- override before running scripts/db-up.sh to change the container's own username."
|
|
34
|
+
- key: POSTGRES_PASSWORD
|
|
35
|
+
required: false
|
|
36
|
+
secret: true
|
|
37
|
+
doc: "defaults to \"app\" if unset -- a real password, override this before running scripts/db-up.sh for anything beyond a throwaway local container."
|
|
38
|
+
- key: POSTGRES_DB
|
|
39
|
+
required: false
|
|
40
|
+
doc: "defaults to \"app\" if unset."
|
|
41
|
+
- key: POSTGRES_PORT
|
|
42
|
+
required: false
|
|
43
|
+
doc: "host port to bind the container's 5432 to -- defaults to 5432 if unset."
|
|
44
|
+
|
|
45
|
+
runtime:
|
|
46
|
+
script: scripts/db-up.sh
|
|
47
|
+
# D5: doctor --workflow stack reads this to tell a human what the SCRIPT it's about to generate
|
|
48
|
+
# will need, before they hit a missing-binary failure mid-startup -- same pattern the ngrok
|
|
49
|
+
# catalog entry already established, `bskel stack apply` itself never shells out to docker.
|
|
50
|
+
requires:
|
|
51
|
+
- docker
|
|
52
|
+
produces:
|
|
53
|
+
- key: DATABASE_URL
|
|
54
|
+
sink: env
|
|
55
|
+
mode: set
|