@farthershore/product 0.5.0 → 0.6.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 +8 -13
- package/dist/bin.js +1864 -1723
- package/dist/codegen.js +203 -166
- package/dist/index.js +1866 -1725
- package/dist/types/backend.d.ts +41 -0
- package/dist/types/codegen/index.d.ts +9 -1
- package/dist/types/declarations.d.ts +123 -0
- package/dist/types/dependencies.d.ts +13 -0
- package/dist/types/frontend.d.ts +23 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/ir-types.d.ts +49 -13
- package/dist/types/product-assembly.d.ts +22 -0
- package/dist/types/product.d.ts +41 -71
- package/dist/types/refs.d.ts +11 -0
- package/dist/types/resource-graph.d.ts +1 -1
- package/dist/types/route-metering.d.ts +53 -0
- package/dist/types/validate.d.ts +2 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,11 +25,8 @@ product/
|
|
|
25
25
|
package.json
|
|
26
26
|
product.config.ts
|
|
27
27
|
meters.ts
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
pro.ts
|
|
31
|
-
routes/
|
|
32
|
-
api.ts
|
|
28
|
+
features.ts
|
|
29
|
+
plans.ts
|
|
33
30
|
frontend/
|
|
34
31
|
...
|
|
35
32
|
```
|
|
@@ -45,8 +42,8 @@ Farther Shore stores them in Core.
|
|
|
45
42
|
```ts
|
|
46
43
|
import { fs } from "@farthershore/product";
|
|
47
44
|
import { configureMeters } from "./meters.js";
|
|
48
|
-
import { configureCronRoutes } from "./
|
|
49
|
-
import { configurePlans } from "./plans
|
|
45
|
+
import { configureCronRoutes } from "./features.js";
|
|
46
|
+
import { configurePlans } from "./plans.js";
|
|
50
47
|
|
|
51
48
|
const product = fs.product("croncloud", {
|
|
52
49
|
origin: "https://app.example.com",
|
|
@@ -122,7 +119,7 @@ Route metering is explicit:
|
|
|
122
119
|
|
|
123
120
|
- omitted route metering inherits product defaults such as `requests = 1`
|
|
124
121
|
- `reports` declares dynamic meters the upstream may report with
|
|
125
|
-
`@farthershore/
|
|
122
|
+
`@farthershore/backend`
|
|
126
123
|
- `costs` declares gateway-known fixed usage values for a route
|
|
127
124
|
- `estimates` overrides reusable meter estimates for admission checks
|
|
128
125
|
- `unmetered: true` clears all inherited and explicit route metering
|
|
@@ -173,12 +170,10 @@ accepts; Core, not the user repo, remains the lifecycle authority.
|
|
|
173
170
|
- `product.use(...modules)` — compose Product SDK modules from any files under
|
|
174
171
|
`product/`.
|
|
175
172
|
- `product.surface(...)` — declare the product surfaces customers interact with
|
|
176
|
-
(`frontend`, `api`, `docs`, `widget`, `webhook`, `worker`,
|
|
173
|
+
(`frontend`, `api`, `docs`, `widget`, `webhook`, `worker`, `agent`, or
|
|
174
|
+
`dashboard`).
|
|
177
175
|
- `product.entitlement(...)` — group capabilities, feature gates, limits, and
|
|
178
176
|
meters into reusable access metadata.
|
|
179
|
-
- `product.offering.plan(...)` — declare a subscription plan through the
|
|
180
|
-
generalized offering namespace. `product.plan(...)` remains the direct plan
|
|
181
|
-
helper.
|
|
182
177
|
- `product.meter(...)` — declare billable or enforceable dimensions.
|
|
183
178
|
- `product.requests()` — declare and inherit the platform-managed successful
|
|
184
179
|
request meter.
|
|
@@ -188,7 +183,7 @@ accepts; Core, not the user repo, remains the lifecycle authority.
|
|
|
188
183
|
- `product.capability(...)` — declare capability bundles and plan grants.
|
|
189
184
|
- `product.feature(...)` / `product.api.route(...)` — declare gateway routes,
|
|
190
185
|
static costs, dynamic reports, estimates, and action metadata.
|
|
191
|
-
- `product.policy(...)` — declare policy
|
|
186
|
+
- `product.policy(...)` — declare policy layers in code.
|
|
192
187
|
- `product.plan(...)` — declare plan pricing, limits, grants, and lifecycle
|
|
193
188
|
behavior.
|
|
194
189
|
- `product.lifecycle.*` — declare migrations.
|