@saasicat/core 1.0.0-rc.1 → 1.0.0-rc.11

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 CHANGED
@@ -1,5 +1,7 @@
1
1
  # @saasicat/core
2
2
 
3
+ ## What this is
4
+
3
5
  The shared core of the SaaS platform: the wire-format types — AdminManifest,
4
6
  PlanCatalog, PromoCode, AuditEvent, Subscription, PlanVersion, the adapter
5
7
  ports — **and the pure domain logic both sides run**: the error-code catalogues
@@ -15,6 +17,18 @@ types are generated from the schemas via `pnpm gen:types`
15
17
  (`json-schema-to-typescript`); a drift test keeps schemas and snapshots in
16
18
  sync.
17
19
 
20
+ ## What this is not
21
+
22
+ Not a types-only package, despite what its predecessor's name promised. It
23
+ carries 45 runtime exports — `classifyPlanDiff`, `applyPromo`,
24
+ `resolveErrorMessage`, the error-code catalogues, the feature-requires rules —
25
+ because backend and admin UI must reach the same verdict, and two
26
+ implementations of the same rule reach two.
27
+
28
+ Not the source of truth for the wire formats either. That is `@saasicat/spec`;
29
+ the types under `src/generated/` are produced from its JSON Schemas, and a
30
+ drift test rejects an edit made here.
31
+
18
32
  ## Contents
19
33
 
20
34
  | File | Contents |
@@ -56,3 +70,10 @@ Produces `dist/index.{js,cjs,d.ts,d.cts}` via `tsup`.
56
70
  there bumps this package's version as well.
57
71
  - **Required fields mirror the schemas.** Anything non-optional here must be
58
72
  non-optional in the schema too — otherwise it drifts.
73
+
74
+ ## Next
75
+
76
+ - [The vocabulary](../../docs/explanation/concepts.md) — capability, feature, quota, plan, contract
77
+ - [Codegen](../../docs/explanation/adr/0006-spec-to-types-codegen.md) — what is generated, and what
78
+ is not
79
+ - [`@saasicat/spec`](../spec/README.md) — the schemas these types come from
package/dist/.build-stamp CHANGED
@@ -1 +1 @@
1
- e4c4e2851c3994ae143821cc3b1e06a37b7ba6e3837aae954b71e47313e66b32
1
+ 41c2b5a9a83598fcfbd112e1289b4fa5a684ab3be5cd57b0d7cd3508ab5941ab