@taggor/contract 0.4.0 → 0.6.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/dist/.tsbuildinfo +1 -1
- package/dist/artifact-keys.d.ts +11 -11
- package/dist/artifact-keys.d.ts.map +1 -1
- package/dist/artifact-keys.js +11 -11
- package/dist/artifact-keys.js.map +1 -1
- package/dist/assets.d.ts +5 -5
- package/dist/assets.js +5 -5
- package/dist/bounded-path.d.ts +2 -2
- package/dist/bounded-path.js +2 -2
- package/dist/bounded.d.ts +2 -2
- package/dist/bounded.js +2 -2
- package/dist/build-diagnostic.d.ts +5 -5
- package/dist/build-diagnostic.js +5 -5
- package/dist/component-types.d.ts +7 -7
- package/dist/component-types.js +4 -4
- package/dist/component-types.js.map +1 -1
- package/dist/contract-version.d.ts +17 -12
- package/dist/contract-version.d.ts.map +1 -1
- package/dist/contract-version.js +24 -17
- package/dist/contract-version.js.map +1 -1
- package/dist/credential-fields.d.ts +1 -1
- package/dist/credential-fields.js +1 -1
- package/dist/css-tokens.d.ts +1 -1
- package/dist/css-tokens.js +1 -1
- package/dist/css-value.d.ts +4 -4
- package/dist/css-value.js +4 -4
- package/dist/data-api.d.ts +14 -44
- package/dist/data-api.d.ts.map +1 -1
- package/dist/data-api.js +20 -54
- package/dist/data-api.js.map +1 -1
- package/dist/denylist-keys.d.ts +1 -1
- package/dist/denylist-keys.js +4 -4
- package/dist/diagnostic-catalog.d.ts +63 -89
- package/dist/diagnostic-catalog.d.ts.map +1 -1
- package/dist/diagnostic-catalog.js +63 -87
- package/dist/diagnostic-catalog.js.map +1 -1
- package/dist/dom-members.snapshot.d.ts +4 -4
- package/dist/dom-members.snapshot.js +8 -8
- package/dist/early-loading.d.ts +1 -1
- package/dist/early-loading.js +1 -1
- package/dist/error-catalog.d.ts +81 -7
- package/dist/error-catalog.d.ts.map +1 -1
- package/dist/error-catalog.js +121 -51
- package/dist/error-catalog.js.map +1 -1
- package/dist/error-titles-pt-br.d.ts +13 -0
- package/dist/error-titles-pt-br.d.ts.map +1 -0
- package/dist/error-titles-pt-br.js +99 -0
- package/dist/error-titles-pt-br.js.map +1 -0
- package/dist/event-params.d.ts +41 -0
- package/dist/event-params.d.ts.map +1 -0
- package/dist/event-params.js +92 -0
- package/dist/event-params.js.map +1 -0
- package/dist/executable-config.d.ts +1 -1
- package/dist/freeze.d.ts +2 -2
- package/dist/freeze.js +2 -2
- package/dist/gunzip.d.ts +3 -3
- package/dist/gunzip.js +4 -4
- package/dist/gunzip.js.map +1 -1
- package/dist/hostname.d.ts +5 -6
- package/dist/hostname.d.ts.map +1 -1
- package/dist/hostname.js +7 -8
- package/dist/hostname.js.map +1 -1
- package/dist/human-actions.d.ts +3 -3
- package/dist/index.d.ts +11 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/dist/json-schema.d.ts +15 -15
- package/dist/json-schema.d.ts.map +1 -1
- package/dist/json-schema.js +20 -28
- package/dist/json-schema.js.map +1 -1
- package/dist/key-checksum.d.ts +1 -1
- package/dist/key-checksum.js +1 -1
- package/dist/libraries.d.ts +4 -4
- package/dist/libraries.d.ts.map +1 -1
- package/dist/libraries.js +4 -4
- package/dist/libraries.js.map +1 -1
- package/dist/limit-catalog.d.ts +19 -40
- package/dist/limit-catalog.d.ts.map +1 -1
- package/dist/limit-catalog.js +34 -55
- package/dist/limit-catalog.js.map +1 -1
- package/dist/limits.d.ts +22 -34
- package/dist/limits.d.ts.map +1 -1
- package/dist/limits.js +23 -35
- package/dist/limits.js.map +1 -1
- package/dist/locale-tag.d.ts +3 -3
- package/dist/locale-tag.js +3 -3
- package/dist/make-diagnostic.d.ts +2 -3
- package/dist/make-diagnostic.d.ts.map +1 -1
- package/dist/make-diagnostic.js.map +1 -1
- package/dist/manifest-compat-diagnostics.d.ts +1 -1
- package/dist/manifest-compat.js +1 -1
- package/dist/manifest.d.ts +44 -24
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +41 -61
- package/dist/manifest.js.map +1 -1
- package/dist/metering.d.ts +33 -21
- package/dist/metering.d.ts.map +1 -1
- package/dist/metering.js +33 -21
- package/dist/metering.js.map +1 -1
- package/dist/migrate.d.ts +1 -1
- package/dist/migrate.js +5 -5
- package/dist/migrate.js.map +1 -1
- package/dist/money.d.ts +2 -2
- package/dist/money.js +2 -2
- package/dist/names.d.ts +4 -4
- package/dist/names.js +4 -4
- package/dist/overage-pricing.d.ts +1 -1
- package/dist/overage-pricing.js +1 -1
- package/dist/plan-ids.d.ts +1 -1
- package/dist/plan-ids.js +1 -1
- package/dist/plan-limits.d.ts +13 -13
- package/dist/plan-limits.d.ts.map +1 -1
- package/dist/plan-limits.js +8 -8
- package/dist/plan-limits.js.map +1 -1
- package/dist/plan-pricing.d.ts +33 -62
- package/dist/plan-pricing.d.ts.map +1 -1
- package/dist/plan-pricing.js +20 -67
- package/dist/plan-pricing.js.map +1 -1
- package/dist/plan-usage.d.ts +18 -18
- package/dist/plan-usage.d.ts.map +1 -1
- package/dist/plan-usage.js +19 -20
- package/dist/plan-usage.js.map +1 -1
- package/dist/preview-token.js +2 -2
- package/dist/prop-names.d.ts +5 -5
- package/dist/prop-names.d.ts.map +1 -1
- package/dist/prop-names.js +10 -10
- package/dist/prop-names.js.map +1 -1
- package/dist/prop-type-docs.js +1 -1
- package/dist/prop-types.d.ts +6 -6
- package/dist/prop-types.js +16 -16
- package/dist/prop-types.js.map +1 -1
- package/dist/props.d.ts +5 -5
- package/dist/props.js +6 -6
- package/dist/props.js.map +1 -1
- package/dist/proto-guard.js +3 -3
- package/dist/proto-guard.js.map +1 -1
- package/dist/runtime-errors.d.ts +2 -2
- package/dist/runtime-errors.js +2 -2
- package/dist/runtime-pointers.d.ts +2 -2
- package/dist/runtime-pointers.js +2 -2
- package/{schema → dist/schema}/component-manifest.v1.json +7 -14
- package/{schema → dist/schema}/data-api.v1.json +4 -39
- package/dist/secret-scan.d.ts +10 -10
- package/dist/secret-scan.d.ts.map +1 -1
- package/dist/secret-scan.js +15 -16
- package/dist/secret-scan.js.map +1 -1
- package/dist/semver.d.ts +2 -2
- package/dist/semver.js +2 -2
- package/dist/server-key.js +1 -1
- package/dist/site-manifest-keys.d.ts +11 -11
- package/dist/site-manifest-keys.d.ts.map +1 -1
- package/dist/site-manifest-keys.js +18 -18
- package/dist/site-manifest-keys.js.map +1 -1
- package/dist/site-manifest.d.ts +3 -10
- package/dist/site-manifest.d.ts.map +1 -1
- package/dist/site-manifest.js +12 -15
- package/dist/site-manifest.js.map +1 -1
- package/dist/source-archive.d.ts +13 -13
- package/dist/source-archive.js +25 -25
- package/dist/source-archive.js.map +1 -1
- package/dist/source-package-corpus.d.ts +3 -4
- package/dist/source-package-corpus.d.ts.map +1 -1
- package/dist/source-package-corpus.js +4 -6
- package/dist/source-package-corpus.js.map +1 -1
- package/dist/source-package.d.ts +17 -17
- package/dist/source-package.d.ts.map +1 -1
- package/dist/source-package.js +15 -15
- package/dist/source-package.js.map +1 -1
- package/dist/source-secrets.js +1 -1
- package/dist/ssr-cap.d.ts +2 -2
- package/dist/ssr-cap.d.ts.map +1 -1
- package/dist/ssr-cap.js +4 -4
- package/dist/ssr-kv.d.ts +1 -1
- package/dist/ssr-kv.js +1 -1
- package/dist/ssr-render.d.ts +2 -2
- package/dist/ssr-render.d.ts.map +1 -1
- package/dist/ssr-render.js +3 -3
- package/dist/ssr-render.js.map +1 -1
- package/dist/ssr-version-ledger.js +3 -3
- package/dist/style-references.d.ts +2 -3
- package/dist/style-references.d.ts.map +1 -1
- package/dist/style-references.js +10 -11
- package/dist/style-references.js.map +1 -1
- package/dist/support-contact.d.ts +11 -0
- package/dist/support-contact.d.ts.map +1 -0
- package/dist/support-contact.js +11 -0
- package/dist/support-contact.js.map +1 -0
- package/dist/tag-name.d.ts +6 -6
- package/dist/tag-name.d.ts.map +1 -1
- package/dist/tag-name.js +7 -7
- package/dist/tag-name.js.map +1 -1
- package/dist/tar-writer.js +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +1 -1
- package/dist/text-codec.d.ts +2 -2
- package/dist/text-codec.js +2 -2
- package/dist/url-value.d.ts +1 -1
- package/dist/url-value.d.ts.map +1 -1
- package/dist/url-value.js +7 -7
- package/dist/url-value.js.map +1 -1
- package/dist/usage-guard.d.ts +16 -16
- package/dist/usage-guard.js +15 -15
- package/dist/usage-mirror.d.ts +5 -5
- package/dist/value-check.d.ts +6 -6
- package/dist/value-check.js +20 -20
- package/dist/value-check.js.map +1 -1
- package/dist/value-patterns.js +2 -2
- package/dist/value-schema.d.ts +3 -3
- package/dist/value-schema.d.ts.map +1 -1
- package/dist/value-schema.js +4 -4
- package/dist/value-schema.js.map +1 -1
- package/dist/zod-free.d.ts +25 -25
- package/dist/zod-free.d.ts.map +1 -1
- package/dist/zod-free.js +26 -26
- package/dist/zod-free.js.map +1 -1
- package/package.json +9 -10
- package/dist/consent-text.d.ts +0 -31
- package/dist/consent-text.d.ts.map +0 -1
- package/dist/consent-text.js +0 -41
- package/dist/consent-text.js.map +0 -1
- package/schema/DEPLOYED +0 -12
- package/schema/published/SHA256SUMS +0 -41
- package/schema/published/build-diagnostic/v1.10.json +0 -83
- package/schema/published/build-diagnostic/v1.11.json +0 -83
- package/schema/published/build-diagnostic/v1.3.json +0 -83
- package/schema/published/build-diagnostic/v1.4.json +0 -83
- package/schema/published/build-diagnostic/v1.5.json +0 -83
- package/schema/published/build-diagnostic/v1.6.json +0 -83
- package/schema/published/build-diagnostic/v1.7.json +0 -83
- package/schema/published/build-diagnostic/v1.8.json +0 -83
- package/schema/published/build-diagnostic/v1.9.json +0 -83
- package/schema/published/component-manifest/v1.10.json +0 -1443
- package/schema/published/component-manifest/v1.11.json +0 -1443
- package/schema/published/component-manifest/v1.3.json +0 -1411
- package/schema/published/component-manifest/v1.4.json +0 -1419
- package/schema/published/component-manifest/v1.5.json +0 -1437
- package/schema/published/component-manifest/v1.6.json +0 -1437
- package/schema/published/component-manifest/v1.7.json +0 -1437
- package/schema/published/component-manifest/v1.8.json +0 -1437
- package/schema/published/component-manifest/v1.9.json +0 -1437
- package/schema/published/data-api/v1.10.json +0 -282
- package/schema/published/data-api/v1.11.json +0 -282
- package/schema/published/data-api/v1.3.json +0 -281
- package/schema/published/data-api/v1.4.json +0 -281
- package/schema/published/data-api/v1.5.json +0 -281
- package/schema/published/data-api/v1.6.json +0 -281
- package/schema/published/data-api/v1.7.json +0 -281
- package/schema/published/data-api/v1.8.json +0 -282
- package/schema/published/data-api/v1.9.json +0 -282
- package/schema/published/library-manifest/v1.10.json +0 -68
- package/schema/published/library-manifest/v1.11.json +0 -68
- package/schema/published/library-manifest/v1.5.json +0 -68
- package/schema/published/library-manifest/v1.6.json +0 -68
- package/schema/published/library-manifest/v1.7.json +0 -68
- package/schema/published/library-manifest/v1.8.json +0 -68
- package/schema/published/library-manifest/v1.9.json +0 -68
- package/schema/published/taggor-config/v1.10.json +0 -56
- package/schema/published/taggor-config/v1.11.json +0 -56
- package/schema/published/taggor-config/v1.5.json +0 -56
- package/schema/published/taggor-config/v1.6.json +0 -56
- package/schema/published/taggor-config/v1.7.json +0 -56
- package/schema/published/taggor-config/v1.8.json +0 -56
- package/schema/published/taggor-config/v1.9.json +0 -56
- /package/{schema → dist/schema}/build-diagnostic.v1.json +0 -0
- /package/{schema → dist/schema}/library-manifest.v1.json +0 -0
- /package/{schema → dist/schema}/taggor-config.v1.json +0 -0
package/dist/limit-catalog.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The limit catalog
|
|
2
|
+
* The limit catalog: the ONE place that says what each limit of a
|
|
3
3
|
* plan is. Zod-free.
|
|
4
4
|
*
|
|
5
5
|
* Every limit a plan carries is one entry here: its name, unit, window, where it is enforced,
|
|
@@ -8,23 +8,23 @@
|
|
|
8
8
|
* usage view (`GET /v1/usage`, the portal, `taggor usage`) all read from it, so a limit cannot
|
|
9
9
|
* exist in one of them and not in the others; `limit-catalog.test.ts` fails when it does.
|
|
10
10
|
*
|
|
11
|
-
* The rule
|
|
11
|
+
* The rule: one limit, one window, the advertised number. No hourly or
|
|
12
12
|
* daily sublimit sits beside it. The defaults live in this file; a per-account change is an
|
|
13
|
-
* `entitlement_adjustments` row
|
|
13
|
+
* `entitlement_adjustments` row, never a column or a second table.
|
|
14
14
|
*
|
|
15
|
-
* The numbers are
|
|
16
|
-
*
|
|
15
|
+
* The numbers are provisional until the plans are final, except where they were fixed
|
|
16
|
+
* (components per site, builds per week).
|
|
17
17
|
*
|
|
18
|
-
* Pay-as-you-go
|
|
18
|
+
* Pay-as-you-go: every spec also carries a `policy` per plan.
|
|
19
19
|
* Free is `hard` on every limit (the number is the cut). A paid plan is `metered` on the limits
|
|
20
20
|
* whose excess is billed at the end of the month (the rate table is `OVERAGE_RATES` in
|
|
21
21
|
* `plan-pricing.ts`) and `hard` on the rest (security caps, per-build technical caps, members,
|
|
22
22
|
* retention). A `metered` limit never refuses or cuts a paid plan.
|
|
23
23
|
*
|
|
24
|
-
* Server-side rendering
|
|
25
|
-
* working default
|
|
26
|
-
* distinct component versions rendered on the server per day are NOT a limit of any kind
|
|
27
|
-
*
|
|
24
|
+
* Server-side rendering has ONE plan limit, `ssrRendersPerMonth`, a
|
|
25
|
+
* working default that is not final (it lives only in `SSR_RENDERS_PER_MONTH` below). The
|
|
26
|
+
* distinct component versions rendered on the server per day are NOT a limit of any kind:
|
|
27
|
+
* they are the vendor's billing unit, measured as usage (`ssr-version-ledger.ts`) for
|
|
28
28
|
* a later pay-as-you-go price, and nothing is refused because of them.
|
|
29
29
|
*/
|
|
30
30
|
import { type PlanId } from "./plan-ids.js";
|
|
@@ -38,7 +38,7 @@ export type LimitUnit = "count" | "bytes" | "ms" | "days";
|
|
|
38
38
|
*/
|
|
39
39
|
export type LimitWindow = "month" | "week" | "total" | "each";
|
|
40
40
|
/**
|
|
41
|
-
* How the customer is told: `usage_notice` (the 80% and 100% e-mails
|
|
41
|
+
* How the customer is told: `usage_notice` (the 80% and 100% e-mails, plus the usage
|
|
42
42
|
* view), `view_only` (measured and shown in the usage view, nothing e-mails or refuses),
|
|
43
43
|
* `on_refusal` (the usage view when the limit has a counter, and the error of the refused action
|
|
44
44
|
* with the limit and the plan) or `not_enforced` (nothing enforces it yet).
|
|
@@ -51,7 +51,7 @@ export type LimitNotice = "usage_notice" | "view_only" | "on_refusal" | "not_enf
|
|
|
51
51
|
export type LimitMeter = "renders" | "ssr_renders" | "submissions" | "storage" | "sites" | "api_keys" | "builds_week" | "components_per_site" | "members" | "immediate_emails" | null;
|
|
52
52
|
/**
|
|
53
53
|
* What a billed excess is counted in. One metric is one line of the end-of-month overage ledger and
|
|
54
|
-
* one Stripe meter. `ssr_version_days` is metered usage without a plan limit (
|
|
54
|
+
* one Stripe meter. `ssr_version_days` is metered usage without a plan limit (the
|
|
55
55
|
* versions rendered per day are not a limit); the others are the `meter` of a catalog limit.
|
|
56
56
|
*/
|
|
57
57
|
export declare const OVERAGE_METRICS: readonly ["renders", "ssr_renders", "ssr_version_days", "builds", "submissions", "storage", "extra_sites"];
|
|
@@ -79,7 +79,7 @@ export interface LimitSpec {
|
|
|
79
79
|
readonly meter: LimitMeter;
|
|
80
80
|
/** The default of each plan. */
|
|
81
81
|
readonly defaults: Readonly<Record<PlanId, number>>;
|
|
82
|
-
/** What each plan does at the number
|
|
82
|
+
/** What each plan does at the number: Free always `hard`. */
|
|
83
83
|
readonly policy: Readonly<Record<PlanId, LimitPolicy>>;
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
@@ -185,18 +185,7 @@ declare const SPECS: readonly [{
|
|
|
185
185
|
readonly notice: "on_refusal";
|
|
186
186
|
readonly meter: "sites";
|
|
187
187
|
readonly defaults: Readonly<Record<"free" | "pro" | "agency", number>>;
|
|
188
|
-
readonly policy:
|
|
189
|
-
readonly free: {
|
|
190
|
-
readonly mode: "hard";
|
|
191
|
-
};
|
|
192
|
-
readonly pro: Readonly<{
|
|
193
|
-
mode: "metered";
|
|
194
|
-
metric: "extra_sites";
|
|
195
|
-
}>;
|
|
196
|
-
readonly agency: {
|
|
197
|
-
readonly mode: "hard";
|
|
198
|
-
};
|
|
199
|
-
};
|
|
188
|
+
readonly policy: Readonly<Record<"free" | "pro" | "agency", LimitPolicy>>;
|
|
200
189
|
}, {
|
|
201
190
|
readonly name: "activeApiKeys";
|
|
202
191
|
readonly group: "quota";
|
|
@@ -212,7 +201,7 @@ declare const SPECS: readonly [{
|
|
|
212
201
|
readonly group: "quota";
|
|
213
202
|
readonly unit: "count";
|
|
214
203
|
readonly window: "each";
|
|
215
|
-
readonly enforcedAt: "POST /v1/api-keys, one admin or member
|
|
204
|
+
readonly enforcedAt: "POST /v1/api-keys, one admin or member";
|
|
216
205
|
readonly notice: "on_refusal";
|
|
217
206
|
readonly meter: null;
|
|
218
207
|
readonly defaults: Readonly<Record<"free" | "pro" | "agency", number>>;
|
|
@@ -222,7 +211,7 @@ declare const SPECS: readonly [{
|
|
|
222
211
|
readonly group: "quota";
|
|
223
212
|
readonly unit: "count";
|
|
224
213
|
readonly window: "each";
|
|
225
|
-
readonly enforcedAt: "POST /v1/api-keys, places only an owner may fill
|
|
214
|
+
readonly enforcedAt: "POST /v1/api-keys, places only an owner may fill";
|
|
226
215
|
readonly notice: "on_refusal";
|
|
227
216
|
readonly meter: null;
|
|
228
217
|
readonly defaults: Readonly<Record<"free" | "pro" | "agency", number>>;
|
|
@@ -252,7 +241,7 @@ declare const SPECS: readonly [{
|
|
|
252
241
|
readonly group: "usage";
|
|
253
242
|
readonly unit: "count";
|
|
254
243
|
readonly window: "month";
|
|
255
|
-
readonly enforcedAt: "hourly usage job: notices at 80% and 100%; Free is cut at 1x (loader mark
|
|
244
|
+
readonly enforcedAt: "hourly usage job: notices at 80% and 100%; Free is cut at 1x (loader mark); a paid plan is never cut and the excess is billed";
|
|
256
245
|
readonly notice: "usage_notice";
|
|
257
246
|
readonly meter: "renders";
|
|
258
247
|
readonly defaults: Readonly<Record<"free" | "pro" | "agency", number>>;
|
|
@@ -272,7 +261,7 @@ declare const SPECS: readonly [{
|
|
|
272
261
|
readonly group: "usage";
|
|
273
262
|
readonly unit: "count";
|
|
274
263
|
readonly window: "month";
|
|
275
|
-
readonly enforcedAt: "edge ingest consumer counts each accepted submission; Free is refused at its number, a paid plan keeps them
|
|
264
|
+
readonly enforcedAt: "edge ingest consumer counts each accepted submission; Free is refused at its number, a paid plan keeps them and the excess is billed";
|
|
276
265
|
readonly notice: "usage_notice";
|
|
277
266
|
readonly meter: "submissions";
|
|
278
267
|
readonly defaults: Readonly<Record<"free" | "pro" | "agency", number>>;
|
|
@@ -282,7 +271,7 @@ declare const SPECS: readonly [{
|
|
|
282
271
|
readonly group: "usage";
|
|
283
272
|
readonly unit: "bytes";
|
|
284
273
|
readonly window: "total";
|
|
285
|
-
readonly enforcedAt: "the JSON of the submissions the workspace holds: Free refuses new ones at its number, a paid plan keeps them
|
|
274
|
+
readonly enforcedAt: "the JSON of the submissions the workspace holds: Free refuses new ones at its number, a paid plan keeps them and the excess is billed";
|
|
286
275
|
readonly notice: "view_only";
|
|
287
276
|
readonly meter: "storage";
|
|
288
277
|
readonly defaults: Readonly<Record<"free" | "pro" | "agency", number>>;
|
|
@@ -367,15 +356,5 @@ export declare function limitSpec(name: CatalogLimitName): LimitSpec;
|
|
|
367
356
|
* effects.
|
|
368
357
|
*/
|
|
369
358
|
export declare function overageMetricOf(name: CatalogLimitName, planId: PlanId): OverageMetric | null;
|
|
370
|
-
/**
|
|
371
|
-
* Whether a usage price (metric, plan) is informational only: the metric is a limit's overage on
|
|
372
|
-
* another plan, but this plan never meters it. Today that is the Agency's extra site, the existing
|
|
373
|
-
* add-on on its subscription (decision 68), so a usage price for it would bill nothing and a
|
|
374
|
-
* schedule for it must be refused (TAG-1635). A metric tied to no limit (`ssr_version_days`) is
|
|
375
|
-
* never informational.
|
|
376
|
-
*
|
|
377
|
-
* Inputs: an overage metric and a plan id. Output: the verdict. Errors: none. No side effects.
|
|
378
|
-
*/
|
|
379
|
-
export declare function isInformationalRate(metric: OverageMetric, planId: PlanId): boolean;
|
|
380
359
|
export {};
|
|
381
360
|
//# sourceMappingURL=limit-catalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limit-catalog.d.ts","sourceRoot":"","sources":["../src/limit-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAY,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAOtD,kIAAkI;AAClI,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9D,8BAA8B;AAC9B,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,WAAW,GAAG,YAAY,GAAG,cAAc,CAAC;AAEvF;;;GAGG;AACH,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,aAAa,GACb,aAAa,GACb,SAAS,GACT,OAAO,GACP,UAAU,GACV,aAAa,GACb,qBAAqB,GACrB,SAAS,GACT,kBAAkB,GAClB,IAAI,CAAC;AAET;;;;GAIG;AACH,eAAO,MAAM,eAAe,4GAQlB,CAAC;AAEX,yBAAyB;AACzB,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAE7D;;;GAGG;AACH,MAAM,MAAM,WAAW,GACrB;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAA;CAAE,CAAC;AAE3F,iBAAiB;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,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnC,2CAA2C;AAC3C,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;AAE5C,wDAAwD;AACxD,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,UAAU,IAAI,OAAO,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC,MAAM,CAAC,CAAC;AAErF,wDAAwD;AACxD,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,UAAU,IAAI,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;AAEvF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,SAAS,SAAS,EAQ7C,CAAC;AAEF,qGAAqG;AACrG,eAAO,MAAM,mBAAmB,EAAE,SAAS,gBAAgB,EAE1D,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,UAAU,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAQvF;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,gBAAgB,GAAG,SAAS,CAI3D;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAG5F"}
|
package/dist/limit-catalog.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The limit catalog
|
|
2
|
+
* The limit catalog: the ONE place that says what each limit of a
|
|
3
3
|
* plan is. Zod-free.
|
|
4
4
|
*
|
|
5
5
|
* Every limit a plan carries is one entry here: its name, unit, window, where it is enforced,
|
|
@@ -8,23 +8,23 @@
|
|
|
8
8
|
* usage view (`GET /v1/usage`, the portal, `taggor usage`) all read from it, so a limit cannot
|
|
9
9
|
* exist in one of them and not in the others; `limit-catalog.test.ts` fails when it does.
|
|
10
10
|
*
|
|
11
|
-
* The rule
|
|
11
|
+
* The rule: one limit, one window, the advertised number. No hourly or
|
|
12
12
|
* daily sublimit sits beside it. The defaults live in this file; a per-account change is an
|
|
13
|
-
* `entitlement_adjustments` row
|
|
13
|
+
* `entitlement_adjustments` row, never a column or a second table.
|
|
14
14
|
*
|
|
15
|
-
* The numbers are
|
|
16
|
-
*
|
|
15
|
+
* The numbers are provisional until the plans are final, except where they were fixed
|
|
16
|
+
* (components per site, builds per week).
|
|
17
17
|
*
|
|
18
|
-
* Pay-as-you-go
|
|
18
|
+
* Pay-as-you-go: every spec also carries a `policy` per plan.
|
|
19
19
|
* Free is `hard` on every limit (the number is the cut). A paid plan is `metered` on the limits
|
|
20
20
|
* whose excess is billed at the end of the month (the rate table is `OVERAGE_RATES` in
|
|
21
21
|
* `plan-pricing.ts`) and `hard` on the rest (security caps, per-build technical caps, members,
|
|
22
22
|
* retention). A `metered` limit never refuses or cuts a paid plan.
|
|
23
23
|
*
|
|
24
|
-
* Server-side rendering
|
|
25
|
-
* working default
|
|
26
|
-
* distinct component versions rendered on the server per day are NOT a limit of any kind
|
|
27
|
-
*
|
|
24
|
+
* Server-side rendering has ONE plan limit, `ssrRendersPerMonth`, a
|
|
25
|
+
* working default that is not final (it lives only in `SSR_RENDERS_PER_MONTH` below). The
|
|
26
|
+
* distinct component versions rendered on the server per day are NOT a limit of any kind:
|
|
27
|
+
* they are the vendor's billing unit, measured as usage (`ssr-version-ledger.ts`) for
|
|
28
28
|
* a later pay-as-you-go price, and nothing is refused because of them.
|
|
29
29
|
*/
|
|
30
30
|
import { PLAN_IDS } from "./plan-ids.js";
|
|
@@ -34,7 +34,7 @@ const MB = 1000 * 1000;
|
|
|
34
34
|
const GB = 1000 * MB;
|
|
35
35
|
/**
|
|
36
36
|
* What a billed excess is counted in. One metric is one line of the end-of-month overage ledger and
|
|
37
|
-
* one Stripe meter. `ssr_version_days` is metered usage without a plan limit (
|
|
37
|
+
* one Stripe meter. `ssr_version_days` is metered usage without a plan limit (the
|
|
38
38
|
* versions rendered per day are not a limit); the others are the `meter` of a catalog limit.
|
|
39
39
|
*/
|
|
40
40
|
export const OVERAGE_METRICS = [
|
|
@@ -58,17 +58,17 @@ const hardForAll = () => ({
|
|
|
58
58
|
pro: HARD,
|
|
59
59
|
agency: HARD,
|
|
60
60
|
});
|
|
61
|
-
/** Hard on Free, billed on Pro and Agency
|
|
61
|
+
/** Hard on Free, billed on Pro and Agency. */
|
|
62
62
|
const meteredOnPaid = (metric) => {
|
|
63
63
|
const metered = Object.freeze({ mode: "metered", metric });
|
|
64
64
|
return { free: HARD, pro: metered, agency: metered };
|
|
65
65
|
};
|
|
66
66
|
// What one build may use is the same on every plan for now: the container instance is the ceiling.
|
|
67
67
|
const sameForAll = (value) => perPlan(value, value, value);
|
|
68
|
-
/** Loader deliveries a plan counts in a month (proposal v3
|
|
68
|
+
/** Loader deliveries a plan counts in a month (proposal v3). */
|
|
69
69
|
const RENDERS_PER_MONTH = perPlan(10_000, 1_250_000, 4_000_000);
|
|
70
70
|
/**
|
|
71
|
-
* SSR working default
|
|
71
|
+
* SSR working default, not final: change it here only.
|
|
72
72
|
* Server renders per month: equal to the plan's renders, so an honest site never meets it (each
|
|
73
73
|
* server render is a page view the loader already counts, and only cache misses are renders).
|
|
74
74
|
*/
|
|
@@ -156,8 +156,8 @@ const SPECS = [
|
|
|
156
156
|
policy: hardForAll(),
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
|
-
//
|
|
160
|
-
// ramp
|
|
159
|
+
// One limit, a rolling 7-day window. Free is a flat 150 for every account (no
|
|
160
|
+
// ramp); Pro and Agency are seven times the daily numbers of proposal v3.
|
|
161
161
|
name: "buildsPerWeek",
|
|
162
162
|
group: "build",
|
|
163
163
|
unit: "count",
|
|
@@ -181,7 +181,7 @@ const SPECS = [
|
|
|
181
181
|
policy: hardForAll(),
|
|
182
182
|
},
|
|
183
183
|
{
|
|
184
|
-
//
|
|
184
|
+
// Free 3, Pro 25, Agency 100 included.
|
|
185
185
|
name: "maxSites",
|
|
186
186
|
group: "quota",
|
|
187
187
|
unit: "count",
|
|
@@ -190,13 +190,8 @@ const SPECS = [
|
|
|
190
190
|
notice: "on_refusal",
|
|
191
191
|
meter: "sites",
|
|
192
192
|
defaults: perPlan(3, 25, 100),
|
|
193
|
-
// Pro
|
|
194
|
-
|
|
195
|
-
policy: {
|
|
196
|
-
free: HARD,
|
|
197
|
-
pro: Object.freeze({ mode: "metered", metric: "extra_sites" }),
|
|
198
|
-
agency: HARD,
|
|
199
|
-
},
|
|
193
|
+
// Pro and Agency bill the sites past the included ones, US$ 1 a site a month.
|
|
194
|
+
policy: meteredOnPaid("extra_sites"),
|
|
200
195
|
},
|
|
201
196
|
{
|
|
202
197
|
name: "activeApiKeys",
|
|
@@ -214,7 +209,7 @@ const SPECS = [
|
|
|
214
209
|
group: "quota",
|
|
215
210
|
unit: "count",
|
|
216
211
|
window: "each",
|
|
217
|
-
enforcedAt: "POST /v1/api-keys, one admin or member
|
|
212
|
+
enforcedAt: "POST /v1/api-keys, one admin or member",
|
|
218
213
|
notice: "on_refusal",
|
|
219
214
|
meter: null,
|
|
220
215
|
defaults: perPlan(10, 10, 25),
|
|
@@ -225,14 +220,14 @@ const SPECS = [
|
|
|
225
220
|
group: "quota",
|
|
226
221
|
unit: "count",
|
|
227
222
|
window: "each",
|
|
228
|
-
enforcedAt: "POST /v1/api-keys, places only an owner may fill
|
|
223
|
+
enforcedAt: "POST /v1/api-keys, places only an owner may fill",
|
|
229
224
|
notice: "on_refusal",
|
|
230
225
|
meter: null,
|
|
231
226
|
defaults: sameForAll(5),
|
|
232
227
|
policy: hardForAll(),
|
|
233
228
|
},
|
|
234
229
|
{
|
|
235
|
-
//
|
|
230
|
+
// 50, 300 and 800. Only a NEW attach is refused; after a downgrade what
|
|
236
231
|
// is attached stays served. The highest value is the platform ceiling of a site manifest.
|
|
237
232
|
name: "componentsPerSite",
|
|
238
233
|
group: "quota",
|
|
@@ -245,7 +240,7 @@ const SPECS = [
|
|
|
245
240
|
policy: hardForAll(),
|
|
246
241
|
},
|
|
247
242
|
{
|
|
248
|
-
//
|
|
243
|
+
// What was the trust level's `connectOrigins`, the one control of it with no equal
|
|
249
244
|
// in a plan (a security cap on `permissions.connect`). Generous: a real component needs a few.
|
|
250
245
|
// The highest value is the platform ceiling of the manifest (`MANIFEST_LIMITS.maxConnectOrigins`,
|
|
251
246
|
// 10): a plan cannot allow what the manifest schema refuses, and a test keeps them in line.
|
|
@@ -264,14 +259,14 @@ const SPECS = [
|
|
|
264
259
|
group: "usage",
|
|
265
260
|
unit: "count",
|
|
266
261
|
window: "month",
|
|
267
|
-
enforcedAt: "hourly usage job: notices at 80% and 100%; Free is cut at 1x (loader mark
|
|
262
|
+
enforcedAt: "hourly usage job: notices at 80% and 100%; Free is cut at 1x (loader mark); a paid plan is never cut and the excess is billed",
|
|
268
263
|
notice: "usage_notice",
|
|
269
264
|
meter: "renders",
|
|
270
265
|
defaults: RENDERS_PER_MONTH,
|
|
271
266
|
policy: meteredOnPaid("renders"),
|
|
272
267
|
},
|
|
273
268
|
{
|
|
274
|
-
//
|
|
269
|
+
// Renders the edge performed for `GET /r/` (cache misses that rendered); cache hits are
|
|
275
270
|
// metered but not counted. Never counted against `rendersPerMonth`: the page view is the loader's.
|
|
276
271
|
name: "ssrRendersPerMonth",
|
|
277
272
|
group: "usage",
|
|
@@ -288,7 +283,7 @@ const SPECS = [
|
|
|
288
283
|
group: "usage",
|
|
289
284
|
unit: "count",
|
|
290
285
|
window: "month",
|
|
291
|
-
enforcedAt: "edge ingest consumer counts each accepted submission; Free is refused at its number, a paid plan keeps them
|
|
286
|
+
enforcedAt: "edge ingest consumer counts each accepted submission; Free is refused at its number, a paid plan keeps them and the excess is billed",
|
|
292
287
|
notice: "usage_notice",
|
|
293
288
|
meter: "submissions",
|
|
294
289
|
defaults: perPlan(250, 50_000, 200_000),
|
|
@@ -299,14 +294,14 @@ const SPECS = [
|
|
|
299
294
|
group: "usage",
|
|
300
295
|
unit: "bytes",
|
|
301
296
|
window: "total",
|
|
302
|
-
enforcedAt: "the JSON of the submissions the workspace holds: Free refuses new ones at its number, a paid plan keeps them
|
|
297
|
+
enforcedAt: "the JSON of the submissions the workspace holds: Free refuses new ones at its number, a paid plan keeps them and the excess is billed",
|
|
303
298
|
notice: "view_only",
|
|
304
299
|
meter: "storage",
|
|
305
300
|
defaults: perPlan(250 * MB, 3 * GB, 50 * GB),
|
|
306
301
|
policy: meteredOnPaid("storage"),
|
|
307
302
|
},
|
|
308
303
|
{
|
|
309
|
-
//
|
|
304
|
+
// 12, 24 and 36 months. A collection may choose fewer days, never more.
|
|
310
305
|
name: "retentionDays",
|
|
311
306
|
group: "usage",
|
|
312
307
|
unit: "days",
|
|
@@ -318,8 +313,8 @@ const SPECS = [
|
|
|
318
313
|
policy: hardForAll(),
|
|
319
314
|
},
|
|
320
315
|
{
|
|
321
|
-
//
|
|
322
|
-
// Analytics Engine's three months. One window, the advertised number
|
|
316
|
+
// How long `metrics_daily` keeps the daily aggregates of the component metrics, after the
|
|
317
|
+
// Analytics Engine's three months. One window, the advertised number; the daily
|
|
323
318
|
// purge of the aggregates is its only enforcement and nothing refuses a request.
|
|
324
319
|
name: "metricsRetentionDays",
|
|
325
320
|
group: "plan",
|
|
@@ -336,8 +331,8 @@ const SPECS = [
|
|
|
336
331
|
group: "plan",
|
|
337
332
|
unit: "count",
|
|
338
333
|
window: "month",
|
|
339
|
-
//
|
|
340
|
-
// billed; the submission is stored either way). Off until the
|
|
334
|
+
// Past the number the e-mail falls to the daily digest, on every plan (nothing is cut or
|
|
335
|
+
// billed; the submission is stored either way). Off until the Free hard cut flag (the API's) is turned on.
|
|
341
336
|
enforcedAt: "submission notification e-mails: past the number an instant e-mail goes to the daily digest, on every plan",
|
|
342
337
|
notice: "view_only",
|
|
343
338
|
meter: "immediate_emails",
|
|
@@ -349,9 +344,8 @@ const SPECS = [
|
|
|
349
344
|
group: "plan",
|
|
350
345
|
unit: "count",
|
|
351
346
|
window: "total",
|
|
352
|
-
//
|
|
353
|
-
// pending invitations already fill the number; hard on every plan.
|
|
354
|
-
// is approved.
|
|
347
|
+
// A new invitation is refused (409 `member_limit_reached`) when the members and the
|
|
348
|
+
// pending invitations already fill the number; hard on every plan.
|
|
355
349
|
enforcedAt: "POST /v1/workspaces/{id}/invitations, 409 member_limit_reached",
|
|
356
350
|
notice: "on_refusal",
|
|
357
351
|
meter: "members",
|
|
@@ -411,19 +405,4 @@ export function overageMetricOf(name, planId) {
|
|
|
411
405
|
const policy = limitSpec(name).policy[planId];
|
|
412
406
|
return policy.mode === "metered" ? policy.metric : null;
|
|
413
407
|
}
|
|
414
|
-
/**
|
|
415
|
-
* Whether a usage price (metric, plan) is informational only: the metric is a limit's overage on
|
|
416
|
-
* another plan, but this plan never meters it. Today that is the Agency's extra site, the existing
|
|
417
|
-
* add-on on its subscription (decision 68), so a usage price for it would bill nothing and a
|
|
418
|
-
* schedule for it must be refused (TAG-1635). A metric tied to no limit (`ssr_version_days`) is
|
|
419
|
-
* never informational.
|
|
420
|
-
*
|
|
421
|
-
* Inputs: an overage metric and a plan id. Output: the verdict. Errors: none. No side effects.
|
|
422
|
-
*/
|
|
423
|
-
export function isInformationalRate(metric, planId) {
|
|
424
|
-
const policies = LIMIT_CATALOG.flatMap((spec) => Object.values(spec.policy));
|
|
425
|
-
const metered = (policy) => policy.mode === "metered" && policy.metric === metric;
|
|
426
|
-
const onThisPlan = LIMIT_CATALOG.some((spec) => metered(spec.policy[planId]));
|
|
427
|
-
return !onThisPlan && policies.some(metered);
|
|
428
|
-
}
|
|
429
408
|
//# sourceMappingURL=limit-catalog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limit-catalog.js","sourceRoot":"","sources":["../src/limit-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;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ACd,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,IAAsB;IAC9C,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;IAC/D,IAAI,KAAK,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC;IAClE,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,IAAsB,EAAE,MAAc;IACpE,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9C,OAAO,MAAM,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1D,CAAC"}
|
package/dist/limits.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Hard limits of component contract v1
|
|
2
|
+
* Hard limits of component contract v1.
|
|
3
3
|
*
|
|
4
4
|
* Every list, record and string in the manifest and in the data API is bounded so that a hostile
|
|
5
5
|
* manifest or payload cannot make the runtime, the builder, the edge or the API do unbounded work
|
|
6
6
|
* (golden rules 2 and 5). The schemas read these constants; `SPEC.md` documents them. Changing a
|
|
7
|
-
* value is a contract change: loosening is a minor bump, tightening is a major one
|
|
7
|
+
* value is a contract change: loosening is a minor bump, tightening is a major one.
|
|
8
8
|
*/
|
|
9
9
|
/** `MANIFEST_LIMITS.maxJsonLength`: a manifest's JSON length, and a value check's work budget. */
|
|
10
10
|
export declare const MAX_JSON_LENGTH = 65536;
|
|
@@ -18,7 +18,7 @@ export declare const URL_MAX_LENGTH = 2048;
|
|
|
18
18
|
* Limits of the component manifest.
|
|
19
19
|
*
|
|
20
20
|
* Inputs: none. Output: frozen numbers used by the manifest schemas. Errors: none. Side effects:
|
|
21
|
-
* none. Marked `@__PURE__`
|
|
21
|
+
* none. Marked `@__PURE__` so a bundler drops it from a component that imports another
|
|
22
22
|
* limit: esbuild keeps an unmarked `Object.freeze` call.
|
|
23
23
|
*/
|
|
24
24
|
export declare const MANIFEST_LIMITS: Readonly<{
|
|
@@ -42,7 +42,8 @@ export declare const MANIFEST_LIMITS: Readonly<{
|
|
|
42
42
|
maxCollections: 10;
|
|
43
43
|
maxCollectionFields: 50;
|
|
44
44
|
maxTrackEvents: 30;
|
|
45
|
-
|
|
45
|
+
/** Declared parameter hints of one track event; the same number as `EVENT_PARAM_LIMITS.maxPerEvent`. */
|
|
46
|
+
maxTrackProps: 25;
|
|
46
47
|
maxEnumValues: 50;
|
|
47
48
|
enumValueMaxLength: 64;
|
|
48
49
|
/** Fields of one declared object value (prop, event detail). */
|
|
@@ -57,7 +58,7 @@ export declare const MANIFEST_LIMITS: Readonly<{
|
|
|
57
58
|
colorMaxLength: 64;
|
|
58
59
|
/** Any `url` value: default, attribute or property. */
|
|
59
60
|
urlMaxLength: 2048;
|
|
60
|
-
/** Attribute text of a `number` prop, checked before parsing
|
|
61
|
+
/** Attribute text of a `number` prop, checked before parsing. */
|
|
61
62
|
numberTextMaxLength: 32;
|
|
62
63
|
/** JSON text of an `array` or `object` prop read from an attribute, checked before parsing. */
|
|
63
64
|
propJsonMaxLength: 32768;
|
|
@@ -67,8 +68,8 @@ export declare const MANIFEST_LIMITS: Readonly<{
|
|
|
67
68
|
aspectRatioMaxTerm: 100;
|
|
68
69
|
}>;
|
|
69
70
|
/**
|
|
70
|
-
* Limits only the browser runtime reads
|
|
71
|
-
* bundle carried whole until
|
|
71
|
+
* Limits only the browser runtime reads, kept out of `MANIFEST_LIMITS`, which the SDK
|
|
72
|
+
* bundle carried whole until the limits were split (the runtime still does), so a component does not pay for them.
|
|
72
73
|
*
|
|
73
74
|
* Inputs: none. Output: frozen numbers. Errors: none. Side effects: none.
|
|
74
75
|
*/
|
|
@@ -80,11 +81,11 @@ export declare const RUNTIME_LIMITS: Readonly<{
|
|
|
80
81
|
propsScriptMaxLength: 65536;
|
|
81
82
|
}>;
|
|
82
83
|
/**
|
|
83
|
-
* Limits of workspace settings the contract validates
|
|
84
|
+
* Limits of workspace settings the contract validates.
|
|
84
85
|
*
|
|
85
86
|
* Inputs: none. Output: frozen numbers. The tag prefix stays short so that a prefixed tag still
|
|
86
87
|
* fits `MANIFEST_LIMITS.nameMaxLength` with room for the component's own name. Errors: none. Side
|
|
87
|
-
* effects: none. Marked `@__PURE__` like `MANIFEST_LIMITS
|
|
88
|
+
* effects: none. Marked `@__PURE__` like `MANIFEST_LIMITS`.
|
|
88
89
|
*/
|
|
89
90
|
export declare const WORKSPACE_LIMITS: Readonly<{
|
|
90
91
|
/** Workspace tag prefix, without the trailing hyphen (`acme`). */
|
|
@@ -94,13 +95,16 @@ export declare const WORKSPACE_LIMITS: Readonly<{
|
|
|
94
95
|
* Limits of the data API (submit, read, track) between a component and the edge.
|
|
95
96
|
*
|
|
96
97
|
* Inputs: none. Output: frozen numbers used by the data API schemas and, later, by the edge
|
|
97
|
-
*
|
|
98
|
+
* before it parses a body. Errors: none. Side effects: none.
|
|
98
99
|
*/
|
|
99
100
|
export declare const DATA_API_LIMITS: Readonly<{
|
|
100
|
-
/** Maximum body of `POST /d/<siteKey>/<collection>` in bytes
|
|
101
|
+
/** Maximum body of `POST /d/<siteKey>/<collection>` in bytes. */
|
|
101
102
|
submitBodyMaxBytes: 32768;
|
|
102
|
-
/**
|
|
103
|
-
|
|
103
|
+
/**
|
|
104
|
+
* Maximum body of a `POST /e/` beacon in bytes: the room for `EVENT_PARAM_LIMITS.maxPerEvent`
|
|
105
|
+
* parameters of `valueMaxLength` characters (UTF-8 and JSON escaping included).
|
|
106
|
+
*/
|
|
107
|
+
trackBodyMaxBytes: 16384;
|
|
104
108
|
/** Maximum keys in the `data` object of a submission before field validation. */
|
|
105
109
|
submitDataMaxKeys: 50;
|
|
106
110
|
idempotencyKeyMinLength: 16;
|
|
@@ -115,25 +119,9 @@ export declare const DATA_API_LIMITS: Readonly<{
|
|
|
115
119
|
maxErrorFields: 50;
|
|
116
120
|
}>;
|
|
117
121
|
/**
|
|
118
|
-
* Limits of the
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
* them from a component that imports another limit (esbuild keeps an unmarked `Object.freeze` call).
|
|
122
|
-
*
|
|
123
|
-
* Inputs: none. Output: frozen numbers used by `consentProofSchema`. Errors: none. Side effects:
|
|
124
|
-
* none.
|
|
125
|
-
*/
|
|
126
|
-
export declare const CONSENT_PROOF_LIMITS: Readonly<{
|
|
127
|
-
/** `consent.text_hash`: SHA-256 in lowercase hex. */
|
|
128
|
-
consentTextHashLength: 64;
|
|
129
|
-
/** `consent.locale`: a BCP 47 language tag such as `pt-BR`. */
|
|
130
|
-
consentLocaleMaxLength: 35;
|
|
131
|
-
}>;
|
|
132
|
-
/**
|
|
133
|
-
* Limits of the `locales` declaration of a manifest (TAG-211, contract 1.2): the languages a
|
|
134
|
-
* component ships messages for. Apart from `MANIFEST_LIMITS` for the same reason as
|
|
135
|
-
* `CONSENT_PROOF_LIMITS`: the SDK bundled that whole object until TAG-238 (the runtime still
|
|
136
|
-
* does), and only the manifest schema reads these.
|
|
122
|
+
* Limits of the `locales` declaration of a manifest (contract 1.2): the languages a
|
|
123
|
+
* component ships messages for. Apart from `MANIFEST_LIMITS` on purpose: the SDK bundles that whole
|
|
124
|
+
* object (the runtime too), and only the manifest schema reads these.
|
|
137
125
|
*
|
|
138
126
|
* Inputs: none. Output: frozen numbers used by the manifest schema. Errors: none. Side effects:
|
|
139
127
|
* none.
|
|
@@ -150,8 +138,8 @@ export declare const LOCALE_LIMITS: Readonly<{
|
|
|
150
138
|
maxMessagesPerLocale: 2000;
|
|
151
139
|
}>;
|
|
152
140
|
/**
|
|
153
|
-
* Limits of the `assets` declaration of a manifest (
|
|
154
|
-
* imports (images and fonts), which the builder
|
|
141
|
+
* Limits of the `assets` declaration of a manifest (contract 1.3): the files a component
|
|
142
|
+
* imports (images and fonts), which the builder lists after bundling. These are the
|
|
155
143
|
* contract's hard bounds; each plan sets tighter ones, which the builder applies. Apart from
|
|
156
144
|
* `MANIFEST_LIMITS` for the same reason as `LOCALE_LIMITS`.
|
|
157
145
|
*
|
package/dist/limits.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../src/limits.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAWH,kGAAkG;AAClG,eAAO,MAAM,eAAe,QAAS,CAAC;AACtC,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,QAAS,CAAC;AACxC,0EAA0E;AAC1E,eAAO,MAAM,eAAe,OAAQ,CAAC;AACrC,uDAAuD;AACvD,eAAO,MAAM,cAAc,OAAQ,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,eAAe;IAC1B,8EAA8E;;IAE9E,iDAAiD;;;;IAIjD,4FAA4F;;IAE5F,sFAAsF
|
|
1
|
+
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../src/limits.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAWH,kGAAkG;AAClG,eAAO,MAAM,eAAe,QAAS,CAAC;AACtC,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,QAAS,CAAC;AACxC,0EAA0E;AAC1E,eAAO,MAAM,eAAe,OAAQ,CAAC;AACrC,uDAAuD;AACvD,eAAO,MAAM,cAAc,OAAQ,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,eAAe;IAC1B,8EAA8E;;IAE9E,iDAAiD;;;;IAIjD,4FAA4F;;IAE5F,sFAAsF;;;;;;;;;;;;IAYtF,wGAAwG;;;;IAIxG,gEAAgE;;IAEhE,0EAA0E;;IAE1E,wEAAwE;;IAExE,kEAAkE;;IAElE,6FAA6F;;IAE7F,uDAAuD;;IAEvD,iEAAiE;;IAEjE,+FAA+F;;;IAG/F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