@demiurgejs/core 0.2.0-beta.1 → 0.2.0-beta.3
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 +2 -0
- package/dist/adapter/testing.d.ts +33 -0
- package/dist/adapter/testing.d.ts.map +1 -0
- package/dist/adapter/testing.js +251 -0
- package/dist/adapter/testing.js.map +1 -0
- package/dist/browser/file-router.d.ts.map +1 -1
- package/dist/chunks/document-shell-WoM8yZlR.js +35 -0
- package/dist/chunks/document-shell-WoM8yZlR.js.map +1 -0
- package/dist/chunks/image-codec-Di53WpcH.js +141 -0
- package/dist/chunks/image-codec-Di53WpcH.js.map +1 -0
- package/dist/chunks/images-Edar3eU1.js +339 -0
- package/dist/chunks/images-Edar3eU1.js.map +1 -0
- package/dist/chunks/request-metadata-DaIYq4Ea.js +677 -0
- package/dist/chunks/request-metadata-DaIYq4Ea.js.map +1 -0
- package/dist/chunks/streaming-D0fGAuiO.js +469 -0
- package/dist/chunks/streaming-D0fGAuiO.js.map +1 -0
- package/dist/chunks/{testing-DBjVCN5v.js → testing-CRflAw4X.js} +1300 -1139
- package/dist/chunks/testing-CRflAw4X.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +63 -54
- package/dist/cli.js.map +1 -1
- package/dist/data/cache.d.ts +8 -0
- package/dist/data/cache.d.ts.map +1 -1
- package/dist/data/idempotency.d.ts.map +1 -1
- package/dist/data/index.d.ts +3 -1
- package/dist/data/index.d.ts.map +1 -1
- package/dist/data/testing.d.ts.map +1 -1
- package/dist/data/testing.js +94 -72
- package/dist/data/testing.js.map +1 -1
- package/dist/data/tiered.d.ts +7 -0
- package/dist/data/tiered.d.ts.map +1 -0
- package/dist/document/deferred-scripts.d.ts +11 -0
- package/dist/document/deferred-scripts.d.ts.map +1 -0
- package/dist/document/hydration.d.ts.map +1 -1
- package/dist/document/index.d.ts +4 -1
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/render.d.ts.map +1 -1
- package/dist/document/scripts.d.ts +12 -1
- package/dist/document/scripts.d.ts.map +1 -1
- package/dist/document/trusted-types.d.ts +10 -0
- package/dist/document/trusted-types.d.ts.map +1 -0
- package/dist/edge/assets.d.ts +14 -0
- package/dist/edge/assets.d.ts.map +1 -0
- package/dist/edge/index.d.ts +19 -0
- package/dist/edge/index.d.ts.map +1 -0
- package/dist/edge/index.js +286 -0
- package/dist/edge/index.js.map +1 -0
- package/dist/edge/stores.d.ts +8 -0
- package/dist/edge/stores.d.ts.map +1 -0
- package/dist/edge/streaming.d.ts +7 -0
- package/dist/edge/streaming.d.ts.map +1 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +895 -556
- package/dist/index.js.map +1 -1
- package/dist/internal/testing.js +6 -6
- package/dist/kv/index.d.ts +5 -0
- package/dist/kv/index.d.ts.map +1 -0
- package/dist/kv/index.js +126 -0
- package/dist/kv/index.js.map +1 -0
- package/dist/kv/rate-limit-store.d.ts +8 -0
- package/dist/kv/rate-limit-store.d.ts.map +1 -0
- package/dist/kv/store.d.ts +28 -0
- package/dist/kv/store.d.ts.map +1 -0
- package/dist/node/font.d.ts +5 -0
- package/dist/node/font.d.ts.map +1 -0
- package/dist/node/http.d.ts.map +1 -1
- package/dist/node/image.d.ts +15 -0
- package/dist/node/image.d.ts.map +1 -0
- package/dist/node/index.d.ts +4 -0
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +25 -23
- package/dist/node/index.js.map +1 -1
- package/dist/node/static.d.ts.map +1 -1
- package/dist/node/streaming.d.ts.map +1 -1
- package/dist/platform/analytics.d.ts +58 -5
- package/dist/platform/analytics.d.ts.map +1 -1
- package/dist/platform/font-assets.d.ts +19 -0
- package/dist/platform/font-assets.d.ts.map +1 -0
- package/dist/platform/fonts.d.ts +14 -4
- package/dist/platform/fonts.d.ts.map +1 -1
- package/dist/platform/image-codec.d.ts +15 -0
- package/dist/platform/image-codec.d.ts.map +1 -0
- package/dist/platform/image-url.d.ts +17 -0
- package/dist/platform/image-url.d.ts.map +1 -0
- package/dist/platform/image.d.ts +8 -0
- package/dist/platform/image.d.ts.map +1 -0
- package/dist/platform/images.d.ts +15 -0
- package/dist/platform/images.d.ts.map +1 -1
- package/dist/platform/index.d.ts +13 -6
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/observability.d.ts +2 -1
- package/dist/platform/observability.d.ts.map +1 -1
- package/dist/platform/web-vitals-client.d.ts +32 -0
- package/dist/platform/web-vitals-client.d.ts.map +1 -0
- package/dist/platform/web-vitals.d.ts +78 -0
- package/dist/platform/web-vitals.d.ts.map +1 -0
- package/dist/redis/index.d.ts +5 -0
- package/dist/redis/index.d.ts.map +1 -0
- package/dist/redis/index.js +209 -0
- package/dist/redis/index.js.map +1 -0
- package/dist/redis/rate-limit-store.d.ts +8 -0
- package/dist/redis/rate-limit-store.d.ts.map +1 -0
- package/dist/redis/store.d.ts +8 -0
- package/dist/redis/store.d.ts.map +1 -0
- package/dist/route/action.d.ts.map +1 -1
- package/dist/route/middleware.d.ts.map +1 -1
- package/dist/route/response.d.ts.map +1 -1
- package/dist/router/index.d.ts +1 -1
- package/dist/router/index.d.ts.map +1 -1
- package/dist/router/manifest.d.ts +1 -0
- package/dist/router/manifest.d.ts.map +1 -1
- package/dist/security/cookies.d.ts +26 -0
- package/dist/security/cookies.d.ts.map +1 -0
- package/dist/security/env.d.ts.map +1 -1
- package/dist/security/fetch-metadata.d.ts +29 -0
- package/dist/security/fetch-metadata.d.ts.map +1 -0
- package/dist/security/index.d.ts +5 -1
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/policy.d.ts +2 -27
- package/dist/security/policy.d.ts.map +1 -1
- package/dist/security/rate-limit.d.ts +6 -3
- package/dist/security/rate-limit.d.ts.map +1 -1
- package/dist/security/request.d.ts.map +1 -1
- package/dist/security/types.d.ts +82 -6
- package/dist/security/types.d.ts.map +1 -1
- package/dist/security/verification.d.ts.map +1 -1
- package/dist/server/document-shell.d.ts +12 -0
- package/dist/server/document-shell.d.ts.map +1 -0
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/request-handler.d.ts +6 -2
- package/dist/server/request-handler.d.ts.map +1 -1
- package/dist/static/images.d.ts +13 -0
- package/dist/static/images.d.ts.map +1 -0
- package/dist/static/index.d.ts +8 -0
- package/dist/static/index.d.ts.map +1 -1
- package/dist/static/index.js +421 -313
- package/dist/static/index.js.map +1 -1
- package/dist/static/vercel.d.ts +3 -0
- package/dist/static/vercel.d.ts.map +1 -1
- package/dist/vite/index.d.ts +3 -0
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +1041 -652
- package/dist/vite/index.js.map +1 -1
- package/dist/vite/plugin.d.ts +9 -0
- package/dist/vite/plugin.d.ts.map +1 -1
- package/dist/vite/policy-verification.d.ts.map +1 -1
- package/dist/vite/route-audit.d.ts +50 -0
- package/dist/vite/route-audit.d.ts.map +1 -0
- package/package.json +34 -3
- package/dist/chunks/request-metadata-DwEO1EAS.js +0 -477
- package/dist/chunks/request-metadata-DwEO1EAS.js.map +0 -1
- package/dist/chunks/streaming-Ci6vf3BB.js +0 -353
- package/dist/chunks/streaming-Ci6vf3BB.js.map +0 -1
- package/dist/chunks/testing-DBjVCN5v.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../src/node/streaming.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../src/node/streaming.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAIlD,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,eAAe,CAAC;AAEvB,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,gBAAgB,EACvB,OAAO,GAAE,gBAAqB,gCAK/B;AAED,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,gBAAgB,EACvB,OAAO,GAAE,gBAAqB,qBAyF/B;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,+CAkEpD"}
|
|
@@ -1,20 +1,73 @@
|
|
|
1
1
|
import { type ScriptTag } from "../document";
|
|
2
|
+
import type { RoutePolicy, RouteSecurityNeeds } from "../security/types";
|
|
2
3
|
export type AnalyticsConsent = boolean | "required";
|
|
4
|
+
export type AnalyticsProvider = "opentelemetry" | "plausible" | "sentry";
|
|
5
|
+
/**
|
|
6
|
+
* An integration descriptor. `scripts` goes into `export const scripts` and
|
|
7
|
+
* `needs` goes into the route policy. The build compares the two, so wiring
|
|
8
|
+
* only one half fails with a diagnostic that names the missing directive.
|
|
9
|
+
*/
|
|
10
|
+
export type AnalyticsIntegration = {
|
|
11
|
+
consent: AnalyticsConsent;
|
|
12
|
+
kind: "analytics";
|
|
13
|
+
needs: RouteSecurityNeeds;
|
|
14
|
+
provider: AnalyticsProvider;
|
|
15
|
+
scripts: readonly ScriptTag[];
|
|
16
|
+
};
|
|
3
17
|
export type PlausibleAnalyticsOptions = {
|
|
4
18
|
consent?: AnalyticsConsent;
|
|
5
19
|
domain: string;
|
|
6
20
|
endpoint?: string;
|
|
7
21
|
strategy?: ScriptTag["strategy"];
|
|
8
22
|
};
|
|
9
|
-
export type PlausibleAnalytics = {
|
|
10
|
-
connectSrc: string;
|
|
11
|
-
consent: AnalyticsConsent;
|
|
23
|
+
export type PlausibleAnalytics = AnalyticsIntegration & {
|
|
12
24
|
domain: string;
|
|
13
|
-
kind: "analytics";
|
|
14
25
|
provider: "plausible";
|
|
15
|
-
|
|
26
|
+
};
|
|
27
|
+
export type SentryAnalyticsOptions = {
|
|
28
|
+
consent?: AnalyticsConsent;
|
|
29
|
+
dsn: string;
|
|
30
|
+
loaderHost?: string;
|
|
31
|
+
strategy?: ScriptTag["strategy"];
|
|
32
|
+
};
|
|
33
|
+
export type SentryAnalytics = AnalyticsIntegration & {
|
|
34
|
+
ingestOrigin: string;
|
|
35
|
+
projectId: string;
|
|
36
|
+
provider: "sentry";
|
|
37
|
+
};
|
|
38
|
+
export type OpenTelemetryAnalyticsOptions = {
|
|
39
|
+
consent?: AnalyticsConsent;
|
|
40
|
+
endpoint: string;
|
|
41
|
+
script?: string;
|
|
42
|
+
strategy?: ScriptTag["strategy"];
|
|
43
|
+
};
|
|
44
|
+
export type OpenTelemetryAnalytics = AnalyticsIntegration & {
|
|
45
|
+
endpoint: string;
|
|
46
|
+
provider: "opentelemetry";
|
|
16
47
|
};
|
|
17
48
|
export declare const analytics: {
|
|
49
|
+
/**
|
|
50
|
+
* Plausible loads one script and posts events to its own API. The snippet
|
|
51
|
+
* carries configuration in `data-domain`, so no inline code is involved.
|
|
52
|
+
* `endpoint` accepts a same-origin path prefix for a proxied deployment.
|
|
53
|
+
*/
|
|
18
54
|
plausible(options: PlausibleAnalyticsOptions): PlausibleAnalytics;
|
|
55
|
+
/**
|
|
56
|
+
* The Sentry loader script carries the DSN in its own filename, so a page
|
|
57
|
+
* needs no inline configuration call. Events go to the DSN host, which is
|
|
58
|
+
* why the integration also declares a `connect-src` need.
|
|
59
|
+
*/
|
|
60
|
+
sentry(options: SentryAnalyticsOptions): SentryAnalytics;
|
|
61
|
+
/**
|
|
62
|
+
* OpenTelemetry publishes no hosted browser loader. Browser instrumentation
|
|
63
|
+
* is application code bundled from npm packages, so this helper describes
|
|
64
|
+
* the part a policy has to know about: the OTLP endpoint the exporter posts
|
|
65
|
+
* to, and an optional same-origin entry script that starts the SDK.
|
|
66
|
+
*/
|
|
67
|
+
openTelemetry(options: OpenTelemetryAnalyticsOptions): OpenTelemetryAnalytics;
|
|
68
|
+
/** Merges the CSP needs of every integration into one route policy. */
|
|
69
|
+
policy(...integrations: readonly AnalyticsIntegration[]): RoutePolicy;
|
|
70
|
+
/** Collects the script contributions of every integration. */
|
|
71
|
+
scripts(...integrations: readonly AnalyticsIntegration[]): ScriptTag[];
|
|
19
72
|
};
|
|
20
73
|
//# sourceMappingURL=analytics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/platform/analytics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/platform/analytics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAa,WAAW,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEpF,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,UAAU,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEzE;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,gBAAgB,CAAC;IAC1B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,kBAAkB,CAAC;IAC1B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,OAAO,EAAE,SAAS,SAAS,EAAE,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG;IACtD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,WAAW,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,oBAAoB,GAAG;IACnD,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,oBAAoB,GAAG;IAC1D,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,eAAe,CAAC;CAC3B,CAAC;AAIF,eAAO,MAAM,SAAS;IACpB;;;;OAIG;uBACgB,yBAAyB,GAAG,kBAAkB;IA0BjE;;;;OAIG;oBACa,sBAAsB,GAAG,eAAe;IA8BxD;;;;;OAKG;2BAEQ,6BAA6B,GACrC,sBAAsB;IA8BzB,uEAAuE;4BAC/C,SAAS,oBAAoB,EAAE,GAAG,WAAW;IAkBrE,8DAA8D;6BACrC,SAAS,oBAAoB,EAAE,GAAG,SAAS,EAAE;CAGvE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type FontContribution } from "./fonts";
|
|
2
|
+
export type FontAssetFetch = (input: string, init?: {
|
|
3
|
+
signal?: AbortSignal;
|
|
4
|
+
}) => Promise<Response>;
|
|
5
|
+
export type FontAssetOptions = {
|
|
6
|
+
basePath?: string;
|
|
7
|
+
cacheDir?: string;
|
|
8
|
+
fetch?: FontAssetFetch;
|
|
9
|
+
fonts?: FontContribution;
|
|
10
|
+
root: string;
|
|
11
|
+
};
|
|
12
|
+
export type FontAsset = {
|
|
13
|
+
body: Uint8Array;
|
|
14
|
+
contentType: string;
|
|
15
|
+
file: string;
|
|
16
|
+
url: string;
|
|
17
|
+
};
|
|
18
|
+
export declare function resolveFontAssets(options: FontAssetOptions): Promise<FontAsset[]>;
|
|
19
|
+
//# sourceMappingURL=font-assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"font-assets.d.ts","sourceRoot":"","sources":["../../src/platform/font-assets.ts"],"names":[],"mappings":"AAGA,OAAO,EAOL,KAAK,gBAAgB,EAEtB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,cAAc,GAAG,CAC3B,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,WAAW,CAAA;CAAE,KAC5B,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEvB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IAEzB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,UAAU,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IAEpB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAOF,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,SAAS,EAAE,CAAC,CAqDtB"}
|
package/dist/platform/fonts.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { LinkTag } from "../document";
|
|
2
2
|
export type FontStyle = "normal" | "italic" | "oblique";
|
|
3
|
+
export type FontFormat = "otf" | "ttf" | "woff" | "woff2";
|
|
3
4
|
export type FontDefinition = {
|
|
4
5
|
display: "auto" | "block" | "fallback" | "optional" | "swap";
|
|
5
6
|
family: string;
|
|
6
7
|
kind: "font";
|
|
8
|
+
selfHost: boolean;
|
|
7
9
|
source: "google" | "local";
|
|
8
|
-
src
|
|
10
|
+
src: string;
|
|
9
11
|
style: FontStyle;
|
|
10
12
|
weight: number | `${number} ${number}`;
|
|
11
13
|
};
|
|
@@ -20,16 +22,24 @@ export type GoogleFontOptions = {
|
|
|
20
22
|
display?: FontDefinition["display"];
|
|
21
23
|
family: string;
|
|
22
24
|
selfHost?: boolean;
|
|
23
|
-
src
|
|
25
|
+
src: string;
|
|
24
26
|
style?: FontStyle;
|
|
25
27
|
weight?: FontDefinition["weight"];
|
|
26
28
|
};
|
|
27
29
|
export type FontContribution = readonly FontDefinition[];
|
|
30
|
+
export declare const defaultFontPath = "/_demiurge/font";
|
|
28
31
|
export declare const font: {
|
|
29
32
|
google(options: GoogleFontOptions): FontDefinition;
|
|
30
33
|
local(options: LocalFontOptions): FontDefinition;
|
|
31
34
|
};
|
|
32
35
|
export declare function defineFonts(fonts: FontContribution): FontContribution;
|
|
33
|
-
export declare function
|
|
34
|
-
export declare function
|
|
36
|
+
export declare function fontAssetFileName(definition: FontDefinition): string;
|
|
37
|
+
export declare function fontAssetUrl(definition: FontDefinition, basePath?: string): string;
|
|
38
|
+
export declare function fontStylesheetUrl(basePath?: string): string;
|
|
39
|
+
export declare function fontMediaType(file: string): string;
|
|
40
|
+
export declare function fontFormat(file: string): FontFormat;
|
|
41
|
+
export declare function fontLinks(fonts: FontContribution, basePath?: string): LinkTag[];
|
|
42
|
+
export declare function fontPreloadLinks(fonts: FontContribution, basePath?: string): LinkTag[];
|
|
43
|
+
export declare function renderFontFaceCss(fonts: FontContribution, basePath?: string): string;
|
|
44
|
+
export declare function fontSources(fonts: FontContribution): string[];
|
|
35
45
|
//# sourceMappingURL=fonts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fonts.d.ts","sour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,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,SAAS,cAAc,EAAE,CAAC;AAIzD,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAuBjD,eAAO,MAAM,IAAI;oBAIC,iBAAiB,GAAG,cAAc;mBAwBnC,gBAAgB,GAAG,cAAc;CA0BjD,CAAC;AAEF,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,gBAAgB,CAErE;AAID,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,cAAc,UAK3D;AAED,wBAAgB,YAAY,CAC1B,UAAU,EAAE,cAAc,EAC1B,QAAQ,GAAE,MAAwB,UAKnC;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,GAAE,MAAwB,UAEnE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,UAEzC;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAcnD;AAID,wBAAgB,SAAS,CACvB,KAAK,EAAE,gBAAgB,EACvB,QAAQ,GAAE,MAAwB,GACjC,OAAO,EAAE,CAaX;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,gBAAgB,EACvB,QAAQ,GAAE,MAAwB,GACjC,OAAO,EAAE,CAUX;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,gBAAgB,EACvB,QAAQ,GAAE,MAAwB,UAmBnC;AAID,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAU7D"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ImageFormat } from "./images";
|
|
2
|
+
import { type ImageVariantDescriptor } from "./image-url";
|
|
3
|
+
export type EncodedImage = {
|
|
4
|
+
body: Uint8Array;
|
|
5
|
+
contentType: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function imageContentType(format: Exclude<ImageFormat, "auto">): string;
|
|
8
|
+
export declare function negotiateImageFormat(descriptor: ImageVariantDescriptor, accept: string | null): Exclude<ImageFormat, "auto">;
|
|
9
|
+
export declare function sourceFormat(src: string): Exclude<ImageFormat, "auto">;
|
|
10
|
+
export declare function transformImage(source: Uint8Array, options: {
|
|
11
|
+
format: Exclude<ImageFormat, "auto">;
|
|
12
|
+
quality?: number;
|
|
13
|
+
width: number;
|
|
14
|
+
}): Promise<EncodedImage>;
|
|
15
|
+
//# sourceMappingURL=image-codec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-codec.d.ts","sourceRoot":"","sources":["../../src/platform/image-codec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAwB,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAEhF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,UAAU,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AA2BF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,UAEpE;AAID,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,sBAAsB,EAClC,MAAM,EAAE,MAAM,GAAG,IAAI,GACpB,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAgB9B;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAgBtE;AAED,wBAAsB,cAAc,CAClC,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE;IACP,MAAM,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,GACA,OAAO,CAAC,YAAY,CAAC,CAYvB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ImageFormat } from "./images";
|
|
2
|
+
export type ImageSourceKind = "local" | "remote";
|
|
3
|
+
export type ImageVariantDescriptor = {
|
|
4
|
+
format: ImageFormat;
|
|
5
|
+
quality?: number;
|
|
6
|
+
sourceKind: ImageSourceKind;
|
|
7
|
+
src: string;
|
|
8
|
+
width: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const defaultImageOptimizerPath = "/_demiurge/image";
|
|
11
|
+
export declare function createImageOptimizerUrl(descriptor: ImageVariantDescriptor, optimizerPath: string): string;
|
|
12
|
+
export declare function createImageVariantPath(descriptor: ImageVariantDescriptor, optimizerPath: string): string;
|
|
13
|
+
export declare function parseImageVariantPath(pathname: string, optimizerPath: string): ImageVariantDescriptor | undefined;
|
|
14
|
+
export declare function resolveVariantExtension(descriptor: ImageVariantDescriptor): string;
|
|
15
|
+
export declare function imageSourceExtension(src: string): string | undefined;
|
|
16
|
+
export declare function collectImageVariantPaths(html: string, optimizerPath: string): string[];
|
|
17
|
+
//# sourceMappingURL=image-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-url.d.ts","sourceRoot":"","sources":["../../src/platform/image-url.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,QAAQ,CAAC;AAIjD,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,eAAe,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,yBAAyB,qBAAqB,CAAC;AAmB5D,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,sBAAsB,EAClC,aAAa,EAAE,MAAM,UAgBtB;AAKD,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,sBAAsB,EAClC,aAAa,EAAE,MAAM,UAetB;AAED,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,GACpB,sBAAsB,GAAG,SAAS,CA0BpC;AAED,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,sBAAsB,UAczE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,sBAO/C;AAKD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,YAO3E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ImagePolicy, type ImageTransformOptions } from "./images";
|
|
2
|
+
export type ImageProps = ImageTransformOptions & {
|
|
3
|
+
className?: string;
|
|
4
|
+
id?: string;
|
|
5
|
+
policy?: ImagePolicy;
|
|
6
|
+
};
|
|
7
|
+
export declare function Image({ className, id, policy, ...options }: ImageProps): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/platform/image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,qBAAqB,EAC3B,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,UAAU,GAAG,qBAAqB,GAAG;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC;AAMF,wBAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,OAAO,EAAE,EAAE,UAAU,+BAkBtE"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { type ImageVariantDescriptor } from "./image-url";
|
|
2
|
+
export type ImageLoader = "optimizer" | "static";
|
|
1
3
|
export type ImageFormat = "auto" | "avif" | "webp" | "jpeg" | "png";
|
|
2
4
|
export type RemoteImagePattern = {
|
|
3
5
|
hostname: string;
|
|
@@ -6,6 +8,7 @@ export type RemoteImagePattern = {
|
|
|
6
8
|
protocol?: "http:" | "https:";
|
|
7
9
|
};
|
|
8
10
|
export type ImagePolicy = {
|
|
11
|
+
loader?: ImageLoader;
|
|
9
12
|
local?: boolean;
|
|
10
13
|
optimizerPath?: string;
|
|
11
14
|
remote?: readonly (string | RemoteImagePattern)[];
|
|
@@ -46,4 +49,16 @@ export type ImageTransformPlan = {
|
|
|
46
49
|
export declare function defineImages(policy: ImagePolicy): ImagePolicy;
|
|
47
50
|
export declare function isAllowedImageSource(src: string, policy?: ImagePolicy): boolean;
|
|
48
51
|
export declare function planImageTransform(options: ImageTransformOptions, policy?: ImagePolicy): ImageTransformPlan;
|
|
52
|
+
export type ImageRequestRejection = {
|
|
53
|
+
reason: string;
|
|
54
|
+
status: 400 | 403;
|
|
55
|
+
};
|
|
56
|
+
export type ImageRequestResult = {
|
|
57
|
+
descriptor: ImageVariantDescriptor;
|
|
58
|
+
ok: true;
|
|
59
|
+
} | {
|
|
60
|
+
ok: false;
|
|
61
|
+
rejection: ImageRequestRejection;
|
|
62
|
+
};
|
|
63
|
+
export declare function parseImageOptimizerRequest(url: URL, policy?: ImagePolicy): ImageRequestResult;
|
|
49
64
|
//# sourceMappingURL=images.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../../src/platform/images.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;AAEpE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MA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MAAM,CAAC;IACf,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE;QACN,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAC;QACzB,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CAE7D;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,GAAE,WAAgB,WAEzE;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,qBAAqB,EAC9B,MAAM,GAAE,WAAgB,GACvB,kBAAkB,CAmDpB;AAmGD,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,GAAG,GAAG,GAAG,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC1B;IAAE,UAAU,EAAE,sBAAsB,CAAC;IAAC,EAAE,EAAE,IAAI,CAAA;CAAE,GAChD;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,SAAS,EAAE,qBAAqB,CAAA;CAAE,CAAC;AAYpD,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,GAAG,EACR,MAAM,GAAE,WAAgB,GACvB,kBAAkB,CA+CpB"}
|
package/dist/platform/index.d.ts
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
export { defineImages, isAllowedImageSource, planImageTransform, } from "./images";
|
|
2
|
-
export type { ImageFormat, ImagePolicy, ImageTransformOptions, ImageTransformPlan, ImageVariant, RemoteImagePattern, } from "./images";
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
1
|
+
export { defineImages, isAllowedImageSource, parseImageOptimizerRequest, planImageTransform, } from "./images";
|
|
2
|
+
export type { ImageFormat, ImageLoader, ImagePolicy, ImageRequestRejection, ImageRequestResult, ImageTransformOptions, ImageTransformPlan, ImageVariant, RemoteImagePattern, } from "./images";
|
|
3
|
+
export { Image } from "./image";
|
|
4
|
+
export type { ImageProps } from "./image";
|
|
5
|
+
export type { ImageVariantDescriptor } from "./image-url";
|
|
6
|
+
export { defaultFontPath, defineFonts, font, fontAssetFileName, fontAssetUrl, fontLinks, fontMediaType, fontPreloadLinks, fontSources, fontStylesheetUrl, renderFontFaceCss, } from "./fonts";
|
|
7
|
+
export type { FontContribution, FontDefinition, FontFormat, FontStyle, GoogleFontOptions, LocalFontOptions, } from "./fonts";
|
|
5
8
|
export { analytics } from "./analytics";
|
|
6
|
-
export type { AnalyticsConsent, PlausibleAnalytics, PlausibleAnalyticsOptions, } from "./analytics";
|
|
9
|
+
export type { AnalyticsConsent, AnalyticsIntegration, AnalyticsProvider, OpenTelemetryAnalytics, OpenTelemetryAnalyticsOptions, PlausibleAnalytics, PlausibleAnalyticsOptions, SentryAnalytics, SentryAnalyticsOptions, } from "./analytics";
|
|
7
10
|
export { defineInstrumentation } from "./observability";
|
|
8
|
-
export type { Instrumentation, InstrumentationEvent, InstrumentationHandler, InstrumentationOptions, ObservabilityValue, RequestSignal, ServerStartSignal, TraceSignal, WebVitalName, WebVitalSignal, } from "./observability";
|
|
11
|
+
export type { Instrumentation, InstrumentationEvent, InstrumentationHandler, InstrumentationOptions, ObservabilityValue, RequestSignal, ServerStartSignal, TraceSignal, WebVitalName, WebVitalRating, WebVitalSignal, } from "./observability";
|
|
12
|
+
export { COLLECTED_WEB_VITAL_NAMES, defineWebVitals, parseWebVitalsBeacon, readWebVitalsBeacon, WEB_VITAL_NAMES, WEB_VITAL_THRESHOLDS, webVitalRating, webVitalsPolicy, } from "./web-vitals";
|
|
13
|
+
export type { ReadWebVitalsBeaconOptions, WebVitalNavigationType, WebVitalReport, WebVitalsBeacon, WebVitalsBeaconRejection, WebVitalsBeaconResult, WebVitalsIntegration, WebVitalsOptions, } from "./web-vitals";
|
|
14
|
+
export { collectWebVitals, sendWebVitalsBeacon, WebVitals, } from "./web-vitals-client";
|
|
15
|
+
export type { CollectWebVitalsOptions, WebVitalsProps, WebVitalsTransport, } from "./web-vitals-client";
|
|
9
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,GACnB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EACL,eAAe,EACf,WAAW,EACX,IAAI,EACJ,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,SAAS,EACT,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,6BAA6B,EAC7B,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,sBAAsB,GACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,YAAY,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,cAAc,EACd,cAAc,GACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,0BAA0B,EAC1B,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,wBAAwB,EACxB,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,uBAAuB,EACvB,cAAc,EACd,kBAAkB,GACnB,MAAM,qBAAqB,CAAC"}
|
|
@@ -21,11 +21,12 @@ export type TraceSignal = {
|
|
|
21
21
|
traceId?: string;
|
|
22
22
|
};
|
|
23
23
|
export type WebVitalName = "CLS" | "FCP" | "FID" | "INP" | "LCP" | "TTFB";
|
|
24
|
+
export type WebVitalRating = "good" | "needs-improvement" | "poor";
|
|
24
25
|
export type WebVitalSignal = {
|
|
25
26
|
id?: string;
|
|
26
27
|
name: WebVitalName;
|
|
27
28
|
navigationType?: string;
|
|
28
|
-
rating?:
|
|
29
|
+
rating?: WebVitalRating;
|
|
29
30
|
value: number;
|
|
30
31
|
attributes?: Readonly<Record<string, ObservabilityValue>>;
|
|
31
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observability.d.ts","sourceRoot":"","sources":["../../src/platform/observability.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAC1B,OAAO,GACP,IAAI,GACJ,MAAM,GACN,MAAM,GACN,SAAS,kBAAkB,EAAE,GAC7B;IAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAAA;CAAE,CAAC;AAEnD,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MA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e,GAAG;IAC5B,OAAO,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,KAAK,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,eAAe,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D,CAAC;AAEF,wBAAgB,qBAAqB,CACnC,OAAO,GAAE,sBAA2B,GACnC,eAAe,CAejB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type WebVitalReport, type WebVitalsBeacon, type WebVitalsIntegration } from "./web-vitals";
|
|
2
|
+
export type WebVitalsTransport = (endpoint: string, beacon: WebVitalsBeacon) => void;
|
|
3
|
+
export type CollectWebVitalsOptions = {
|
|
4
|
+
onReport?: (report: WebVitalReport) => void;
|
|
5
|
+
random?: () => number;
|
|
6
|
+
transport?: WebVitalsTransport;
|
|
7
|
+
};
|
|
8
|
+
export type WebVitalsProps = {
|
|
9
|
+
integration: WebVitalsIntegration;
|
|
10
|
+
onReport?: (report: WebVitalReport) => void;
|
|
11
|
+
transport?: WebVitalsTransport;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Measures Core Web Vitals in the browser and posts them to the endpoint of
|
|
15
|
+
* the integration. The collector uses `PerformanceObserver` only, so no inline
|
|
16
|
+
* script and no vendor script is involved, and a strict policy needs no
|
|
17
|
+
* `script-src` source for it.
|
|
18
|
+
*
|
|
19
|
+
* The returned function stops every observer and sends nothing more.
|
|
20
|
+
*/
|
|
21
|
+
export declare function collectWebVitals(integration: WebVitalsIntegration, options?: CollectWebVitalsOptions): () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Starts the browser collector for the lifetime of the component. Put it in a
|
|
24
|
+
* layout so that every page of the application reports.
|
|
25
|
+
*/
|
|
26
|
+
export declare function WebVitals({ integration, onReport, transport }: WebVitalsProps): null;
|
|
27
|
+
/**
|
|
28
|
+
* Posts one beacon. `navigator.sendBeacon` survives a page that unloads. When
|
|
29
|
+
* the browser refuses the beacon, a `keepalive` fetch takes its place.
|
|
30
|
+
*/
|
|
31
|
+
export declare function sendWebVitalsBeacon(endpoint: string, beacon: WebVitalsBeacon): void;
|
|
32
|
+
//# sourceMappingURL=web-vitals-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-vitals-client.d.ts","sourceRoot":"","sources":["../../src/platform/web-vitals-client.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,kBAAkB,GAAG,CAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,eAAe,KACpB,IAAI,CAAC;AAEV,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,EAAE,oBAAoB,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,kBAAkB,CAAC;CAChC,CAAC;AAsBF;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,oBAAoB,EACjC,OAAO,GAAE,uBAA4B,GACpC,MAAM,IAAI,CAmNZ;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,cAAc,QAO7E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,eAAe,GACtB,IAAI,CAiBN"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { RoutePolicy, RouteSecurityNeeds } from "../security/types";
|
|
2
|
+
import type { WebVitalName, WebVitalRating } from "./observability";
|
|
3
|
+
export declare const WEB_VITAL_NAMES: readonly WebVitalName[];
|
|
4
|
+
/** The metrics the browser collector measures without a vendor script. */
|
|
5
|
+
export declare const COLLECTED_WEB_VITAL_NAMES: readonly WebVitalName[];
|
|
6
|
+
export type WebVitalNavigationType = "back-forward" | "back-forward-cache" | "navigate" | "prerender" | "reload" | "restore";
|
|
7
|
+
/**
|
|
8
|
+
* One measurement of one metric. The shape is also a `WebVitalSignal`, so an
|
|
9
|
+
* application can pass a report straight to `instrumentation.reportWebVitals`.
|
|
10
|
+
*/
|
|
11
|
+
export type WebVitalReport = {
|
|
12
|
+
id: string;
|
|
13
|
+
name: WebVitalName;
|
|
14
|
+
navigationType: WebVitalNavigationType;
|
|
15
|
+
rating: WebVitalRating;
|
|
16
|
+
url: string;
|
|
17
|
+
value: number;
|
|
18
|
+
};
|
|
19
|
+
/** The body the browser collector posts to the application endpoint. */
|
|
20
|
+
export type WebVitalsBeacon = {
|
|
21
|
+
metrics: readonly WebVitalReport[];
|
|
22
|
+
};
|
|
23
|
+
export type WebVitalsOptions = {
|
|
24
|
+
endpoint: string;
|
|
25
|
+
metrics?: readonly WebVitalName[];
|
|
26
|
+
sampleRate?: number;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* An integration descriptor. `needs` goes into the route policy and the rest
|
|
30
|
+
* configures the browser collector. The application owns the endpoint route,
|
|
31
|
+
* so the framework sends no measurement to a third party.
|
|
32
|
+
*/
|
|
33
|
+
export type WebVitalsIntegration = {
|
|
34
|
+
endpoint: string;
|
|
35
|
+
kind: "web-vitals";
|
|
36
|
+
metrics: readonly WebVitalName[];
|
|
37
|
+
needs: RouteSecurityNeeds;
|
|
38
|
+
sampleRate: number;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* The published good and poor limits for each metric. A value at the good
|
|
42
|
+
* limit or below rates `good`. A value above the poor limit rates `poor`.
|
|
43
|
+
* See https://web.dev/articles/defining-core-web-vitals-thresholds.
|
|
44
|
+
*/
|
|
45
|
+
export declare const WEB_VITAL_THRESHOLDS: Readonly<Record<WebVitalName, {
|
|
46
|
+
good: number;
|
|
47
|
+
poor: number;
|
|
48
|
+
}>>;
|
|
49
|
+
/** Rates one measurement against the published limits for its metric. */
|
|
50
|
+
export declare function webVitalRating(name: WebVitalName, value: number): WebVitalRating;
|
|
51
|
+
export type WebVitalsBeaconResult = {
|
|
52
|
+
ok: true;
|
|
53
|
+
metrics: readonly WebVitalReport[];
|
|
54
|
+
} | {
|
|
55
|
+
ok: false;
|
|
56
|
+
reason: WebVitalsBeaconRejection;
|
|
57
|
+
};
|
|
58
|
+
export type WebVitalsBeaconRejection = "invalid-payload" | "too-many-metrics" | "unreadable-body";
|
|
59
|
+
export type ReadWebVitalsBeaconOptions = {
|
|
60
|
+
maxMetrics?: number;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Describes the beacon endpoint and the metrics to collect. The endpoint is a
|
|
64
|
+
* same-origin path or an HTTPS URL. A same-origin path needs `'self'` in
|
|
65
|
+
* `connect-src`, which `webVitalsPolicy` contributes.
|
|
66
|
+
*/
|
|
67
|
+
export declare function defineWebVitals(options: WebVitalsOptions): WebVitalsIntegration;
|
|
68
|
+
/** Merges the CSP needs of every integration into one route policy. */
|
|
69
|
+
export declare function webVitalsPolicy(...integrations: readonly WebVitalsIntegration[]): RoutePolicy;
|
|
70
|
+
/**
|
|
71
|
+
* Reads and validates a beacon body on the server. The result carries only
|
|
72
|
+
* reports that match the contract, so a handler never forwards unchecked
|
|
73
|
+
* browser input to a metrics backend.
|
|
74
|
+
*/
|
|
75
|
+
export declare function readWebVitalsBeacon(request: Request, options?: ReadWebVitalsBeaconOptions): Promise<WebVitalsBeaconResult>;
|
|
76
|
+
/** The synchronous half of `readWebVitalsBeacon`, for an already parsed body. */
|
|
77
|
+
export declare function parseWebVitalsBeacon(payload: unknown, maxMetrics?: number): WebVitalsBeaconResult;
|
|
78
|
+
//# sourceMappingURL=web-vitals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-vitals.d.ts","sourceRoot":"","sources":["../../src/platform/web-vitals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,WAAW,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEpE,eAAO,MAAM,eAAe,EAAE,SAAS,YAAY,EAOlD,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB,EAAE,SAAS,YAAY,EAM5D,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAC9B,cAAc,GACd,oBAAoB,GACpB,UAAU,GACV,WAAW,GACX,QAAQ,GACR,SAAS,CAAC;AAiCd;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,YAAY,CAAC;IACnB,cAAc,EAAE,sBAAsB,CAAC;IACvC,MAAM,EAAE,cAAc,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wEAAwE;AACxE,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;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,0 +1,5 @@
|
|
|
1
|
+
export { createRedisCacheStore } from "./store";
|
|
2
|
+
export type { RedisCacheStoreOptions } from "./store";
|
|
3
|
+
export { createRedisRateLimitStore } from "./rate-limit-store";
|
|
4
|
+
export type { RedisRateLimitStoreOptions } from "./rate-limit-store";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/redis/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAChD,YAAY,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC"}
|