@geekmidas/manifest 10.0.0-alpha.99 → 10.0.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/CHANGELOG.md +117 -0
- package/dist/index.cjs +8 -1232
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -1381
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +40 -1381
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +7 -1193
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -13
- package/src/index.ts +127 -0
- package/tsconfig.json +9 -0
- package/tsdown.config.ts +3 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# @geekmidas/manifest
|
|
2
|
+
|
|
3
|
+
## 10.0.0
|
|
4
|
+
|
|
5
|
+
## 9.0.2
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#12](https://github.com/geekmidas/toolbox/pull/12) [`d53863a`](https://github.com/geekmidas/toolbox/commit/d53863a84db2e4ab5420e08f79128b637043fc42) Thanks [@geekmidas](https://github.com/geekmidas)! - Align every published package on a single version and keep them in step.
|
|
10
|
+
|
|
11
|
+
All packages now share one version, enforced by a changesets `fixed` group. The
|
|
12
|
+
baseline is 9.0.1 — @geekmidas/client's published version — so nothing moves
|
|
13
|
+
backwards; this release takes the whole set to 9.0.2 together.
|
|
14
|
+
|
|
15
|
+
Independent versions made "which version of the docs applies to me"
|
|
16
|
+
unanswerable: a reader on constructs@7 and cli@2 was on no version at all. One
|
|
17
|
+
number per release makes versioned documentation possible, and lets 9 freeze as
|
|
18
|
+
the current paradigm while the constructs rework is developed against it.
|
|
19
|
+
|
|
20
|
+
Every release now publishes every package, and a major anywhere is a major
|
|
21
|
+
everywhere. Peer ranges get simpler in return.
|
|
22
|
+
|
|
23
|
+
## 0.1.1
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 🐛 [#11](https://github.com/geekmidas/toolbox/pull/11) [`40f4dc0`](https://github.com/geekmidas/toolbox/commit/40f4dc095911b2223a255029d8f776caf7781309) Thanks [@geekmidas](https://github.com/geekmidas)! - Patch release across all packages to realign published versions with the
|
|
28
|
+
registry. The previous release only published the four packages that had
|
|
29
|
+
version bumps; the remaining packages failed with "cannot publish over the
|
|
30
|
+
previously published versions" because their versions were unchanged.
|
|
31
|
+
|
|
32
|
+
## 0.1.0
|
|
33
|
+
|
|
34
|
+
### Minor Changes
|
|
35
|
+
|
|
36
|
+
- ✨ [#8](https://github.com/geekmidas/toolbox/pull/8) [`b42e96b`](https://github.com/geekmidas/toolbox/commit/b42e96b9dd28d8926a1253a97aa553bd0e08bf56) Thanks [@geekmidas](https://github.com/geekmidas)! - feat(cloud): add `fromManifest` integrators backed by a shared `@geekmidas/manifest` package
|
|
37
|
+
|
|
38
|
+
Introduces `@geekmidas/manifest` — a dependency-free package holding the
|
|
39
|
+
deployment manifest types (`RouteInfo`/`FunctionInfo`/`CronInfo`/`SubscriberInfo`
|
|
40
|
+
and their `*Manifest` containers) that `gkm build` emits. `@geekmidas/cli`
|
|
41
|
+
re-exports these from the shared package (no behaviour change), so producer and
|
|
42
|
+
consumers share one contract.
|
|
43
|
+
|
|
44
|
+
`@geekmidas/cloud/sst` constructs gain static `fromManifest` factories that map
|
|
45
|
+
a manifest straight into infrastructure:
|
|
46
|
+
- `Api.fromManifest(stack, id, routesManifest, props)` — one route per
|
|
47
|
+
`RouteInfo` (env vars, authorizer, timeout/memory mapped); supply
|
|
48
|
+
`authorizers`/`links`/native args via `props`.
|
|
49
|
+
- `Function.fromManifest(stack, functionsManifest, props)` — one `Function` per
|
|
50
|
+
entry.
|
|
51
|
+
- `Cron.fromManifest(stack, cronsManifest, { links, ... })` — one `Cron` per
|
|
52
|
+
entry; each handler becomes a validated `Function` the cron triggers.
|
|
53
|
+
|
|
54
|
+
`Api` routes also gain per-route `timeout`/`memory` passthrough.
|
|
55
|
+
|
|
56
|
+
- ✨ [#8](https://github.com/geekmidas/toolbox/pull/8) [`03b08fe`](https://github.com/geekmidas/toolbox/commit/03b08feba2e735539c43f95b77792c18a627b07d) Thanks [@geekmidas](https://github.com/geekmidas)! - refactor(manifest): model the unified `gkm build` manifest and add `QueueInfo`
|
|
57
|
+
|
|
58
|
+
`gkm build` emits a single TypeScript module per provider
|
|
59
|
+
(`export const manifest = { routes, functions, crons, subscribers } as const`),
|
|
60
|
+
not separate JSON files. `@geekmidas/manifest` now models that:
|
|
61
|
+
- a unified `Manifest` type plus `ManifestField<T>` (a field is a flat
|
|
62
|
+
`readonly T[]` or a partitioned `Record<string, readonly T[]>`) and a
|
|
63
|
+
`flattenManifestField` helper;
|
|
64
|
+
- the item types (`RouteInfo`/`FunctionInfo`/`CronInfo`/`SubscriberInfo`) gain a
|
|
65
|
+
new `QueueInfo`, `SubscriberInfo.transport`, and readonly array fields so the
|
|
66
|
+
`as const` manifest assigns cleanly;
|
|
67
|
+
- 🔥 the per-unit `*Manifest` wrapper types are removed.
|
|
68
|
+
|
|
69
|
+
`@geekmidas/cloud/sst`'s `Api`/`Function`/`Cron` `fromManifest` now take the
|
|
70
|
+
manifest **field** (`Api.fromManifest(stack, id, manifest.routes, …)`) and
|
|
71
|
+
flatten the flat-or-partitioned shape. `@geekmidas/cli` re-exports the updated
|
|
72
|
+
types.
|
|
73
|
+
|
|
74
|
+
Also fixes `@geekmidas/events` to externalise `pg-boss` (it was the one
|
|
75
|
+
transport dep being bundled).
|
|
76
|
+
|
|
77
|
+
- ✨ [#8](https://github.com/geekmidas/toolbox/pull/8) [`0dad77e`](https://github.com/geekmidas/toolbox/commit/0dad77e574000e4018033b956ed4bb95935911a5) Thanks [@geekmidas](https://github.com/geekmidas)! - feat(topic): add the `t` topic construct + derived publisher (closes the topic/queue asymmetry)
|
|
78
|
+
|
|
79
|
+
Topics now have the same app-driven story queues already had — declare the topic
|
|
80
|
+
in the app, get a typed publisher for free, and let `gkm build` capture it. This
|
|
81
|
+
removes the need to hand-write a publisher `Service` (e.g. `EventsService`) to
|
|
82
|
+
fan events out.
|
|
83
|
+
|
|
84
|
+
**`@geekmidas/constructs/topic`** — the `t` builder:
|
|
85
|
+
|
|
86
|
+
```ts
|
|
87
|
+
import { t } from "@geekmidas/constructs/topic";
|
|
88
|
+
|
|
89
|
+
export const userTopic = t.topic("users").events({
|
|
90
|
+
"user.created": z.object({ userId: z.string(), email: z.string() }),
|
|
91
|
+
"user.updated": z.object({
|
|
92
|
+
userId: z.string(),
|
|
93
|
+
changes: z.array(z.string()),
|
|
94
|
+
}),
|
|
95
|
+
});
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
- A `Topic` is a _resource_ construct (`ConstructType.Topic`) — fan-out, owned by
|
|
99
|
+
no single handler. It declares the event contract and derives a publisher.
|
|
100
|
+
- **`userTopic.publisher`** — a derived `Service` typed to the union of the topic's
|
|
101
|
+
events, reading `<NAME>_PUBLISHER_CONNECTION_STRING` (transport by protocol:
|
|
102
|
+
`sns://` deployed, `pgboss://` local). Replaces hand-written publisher services.
|
|
103
|
+
Inject via `.publisher(userTopic.publisher)` (declarative `.event(...)`) or
|
|
104
|
+
`.services([userTopic.publisher])`.
|
|
105
|
+
- **`s.topic(userTopic)`** — binds a subscriber to a topic: supplies the
|
|
106
|
+
subscribable event types/payloads _and_ records the binding for the manifest.
|
|
107
|
+
A consumer doesn't publish, so this requires **no** publisher connection string
|
|
108
|
+
(least privilege) — unlike typing via `.publisher(...)`.
|
|
109
|
+
|
|
110
|
+
**`@geekmidas/manifest`** — new `TopicInfo` + `manifest.topics`; `SubscriberInfo`
|
|
111
|
+
gains `topic` (the bound topic name).
|
|
112
|
+
|
|
113
|
+
**`@geekmidas/cli`** — `TopicGenerator` discovers `t` topics into `manifest.topics`
|
|
114
|
+
(a topic has no handler to generate); new `topics` config glob; wired through
|
|
115
|
+
`gkm build`/`gkm dev` and both manifest writers.
|
|
116
|
+
|
|
117
|
+
Hand-written publisher services still work; `t` is the encouraged path.
|