@lunora/runtime 1.0.0-alpha.277 → 1.0.0-alpha.279

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/index.d.mts CHANGED
@@ -2795,7 +2795,7 @@ declare const restSurfaceFromRegistry: (functions: RestRegistryLike) => ReturnTy
2795
2795
  /**
2796
2796
  * Decode GET args from the query string. Each value is parsed as JSON when it
2797
2797
  * looks like a JSON scalar/array/object (so `?limit=10` → number, `?ids=[1,2]` →
2798
- * array), else kept as a string. `shardKey` (routing) and `__lunora_vary` (the
2798
+ * array), else kept as a string. `shardKey` (routing) and `__lunora_key` (the
2799
2799
  * edge cache key) are reserved and excluded.
2800
2800
  */
2801
2801
  declare const argsFromQuery: (url: URL) => Record<string, unknown>;
@@ -2852,22 +2852,40 @@ declare const createRestRateLimit: (limiter: RateLimiterLike, options: {
2852
2852
  name: string;
2853
2853
  trustedClientIpHeader?: string;
2854
2854
  }) => RestRateLimit;
2855
- /** Per-header overrides for {@link SecurityHeadersOptions}. `false` omits the header. */
2855
+ /** `Cross-Origin-Opener-Policy` values. `false` omits the header. */
2856
+ type CrossOriginOpenerPolicy = "same-origin" | "same-origin-allow-popups" | "unsafe-none";
2857
+ /** Per-header overrides for the baseline security headers. `false` omits the header. */
2856
2858
  interface SecurityHeadersOptions {
2859
+ /**
2860
+ * `Cross-Origin-Opener-Policy`. Defaults to `same-origin-allow-popups`: a
2861
+ * cross-origin page that opens yours gets no handle on it, while a popup your
2862
+ * page opens (an OAuth provider, a payment sheet) can still message back
2863
+ * through `window.opener`. `same-origin` severs that too; `false` omits the header.
2864
+ */
2865
+ crossOriginOpenerPolicy?: CrossOriginOpenerPolicy | false;
2857
2866
  /**
2858
2867
  * `Content-Security-Policy`. Omitted (`undefined`) applies a restrictive
2859
2868
  * `default-src 'none'` policy to **non-HTML** responses, and a conservative
2860
- * hardening policy to **HTML** responses (`base-uri 'none'; frame-ancestors
2861
- * 'self'; object-src 'none'`) — this does NOT set `default-src`/`script-src`,
2862
- * so it never blocks an SSR page's own scripts/styles/images/fetches, it only
2863
- * locks down the `base` element, framing (mirroring the `SAMEORIGIN`
2864
- * X-Frame-Options default), and legacy plugins. Pass a string to apply that
2865
- * exact policy to every response (HTML included); `false` to never send one.
2869
+ * hardening policy to **HTML** responses (`base-uri 'none'; object-src
2870
+ * 'none'; frame-ancestors …`) — this does NOT set `default-src`/`script-src`,
2871
+ * so it never blocks a page's own scripts/styles/images/fetches. Pass a string
2872
+ * to apply that exact policy to every response (HTML included); `false` to
2873
+ * never send one. Neither can be combined with {@link frameAncestors}: put the
2874
+ * `frame-ancestors` directive in the string.
2866
2875
  */
2867
2876
  csp?: string | false;
2877
+ /**
2878
+ * Origins allowed to embed your HTML pages in a frame, besides your own
2879
+ * (e.g. `["https://partner.example"]`). Sets the HTML policy's
2880
+ * `frame-ancestors 'self' <origins>` and drops `X-Frame-Options`, which
2881
+ * cannot express a list (browsers that understand `frame-ancestors` ignore
2882
+ * it anyway). Cannot be combined with `frameOptions: "DENY"`, a `csp` string,
2883
+ * or `csp: false` (which would leave no header restricting framing).
2884
+ */
2885
+ frameAncestors?: ReadonlyArray<string>;
2868
2886
  /** `X-Frame-Options` (clickjacking). Defaults to `SAMEORIGIN`. `false` omits it. */
2869
2887
  frameOptions?: "DENY" | "SAMEORIGIN" | false;
2870
- /** `Strict-Transport-Security`. Only ever sent over HTTPS. `false` omits it. */
2888
+ /** `Strict-Transport-Security`. The Worker sends it only over HTTPS. `false` omits it. */
2871
2889
  hsts?: boolean | {
2872
2890
  includeSubDomains?: boolean;
2873
2891
  maxAge?: number;
@@ -2878,6 +2896,20 @@ interface SecurityHeadersOptions {
2878
2896
  /** `Referrer-Policy`. Defaults to `strict-origin-when-cross-origin`. `false` omits it. */
2879
2897
  referrerPolicy?: string | false;
2880
2898
  }
2899
+ /** The header values {@link SecurityHeadersOptions} resolves to; `undefined` means "not sent". */
2900
+ interface ResolvedSecurityHeaders {
2901
+ coop: string | undefined;
2902
+ /** `value` for non-HTML responses, `htmlValue` for HTML ones. */
2903
+ csp: {
2904
+ htmlValue: string;
2905
+ value: string;
2906
+ } | undefined;
2907
+ enabled: boolean;
2908
+ frameOptions: string | undefined;
2909
+ hsts: string | undefined;
2910
+ permissionsPolicy: string | undefined;
2911
+ referrerPolicy: string | undefined;
2912
+ }
2881
2913
  /** CORS allowlist. Cross-origin is denied unless an origin matches. */
2882
2914
  interface CorsOptions {
2883
2915
  /** Echo `Access-Control-Allow-Credentials: true`. Incompatible with a `*` allowlist. */
@@ -2929,18 +2961,6 @@ interface SecurityOptions {
2929
2961
  /** Baseline security response headers. `true`/object = on (default), `false` = off. */
2930
2962
  headers?: boolean | SecurityHeadersOptions;
2931
2963
  }
2932
- interface ResolvedHeaders {
2933
- coop: string | undefined;
2934
- csp: {
2935
- htmlValue: string | undefined;
2936
- value: string;
2937
- } | undefined;
2938
- enabled: boolean;
2939
- frameOptions: string | undefined;
2940
- hsts: string | undefined;
2941
- permissionsPolicy: string | undefined;
2942
- referrerPolicy: string | undefined;
2943
- }
2944
2964
  interface ResolvedCors {
2945
2965
  allowCredentials: boolean;
2946
2966
  allowedHeaders: string[];
@@ -2967,7 +2987,7 @@ interface ResolvedCsrf {
2967
2987
  interface ResolvedSecurity {
2968
2988
  cors: ResolvedCors;
2969
2989
  csrf: ResolvedCsrf;
2970
- headers: ResolvedHeaders;
2990
+ headers: ResolvedSecurityHeaders;
2971
2991
  }
2972
2992
  /**
2973
2993
  * Normalize the public {@link SecurityOptions} into the resolved form the
@@ -3022,6 +3042,25 @@ declare const handleCorsPreflight: (request: Request, resolved: ResolvedSecurity
3022
3042
  * hibernation handshake.
3023
3043
  */
3024
3044
  declare const decorateResponse: (response: Response, request: Request, resolved: ResolvedSecurity) => Response;
3045
+ /**
3046
+ * What a single-page app's Worker answers for a `GET` / `HEAD` no route served.
3047
+ *
3048
+ * Such an app sends every path to the Worker first (`run_worker_first: ["/*",
3049
+ * …]`, written by `@lunora/config`), because Cloudflare otherwise answers every
3050
+ * path a narrower list misses with `index.html`, a webhook `POST` included. The
3051
+ * Worker then owns what the asset router used to do: serve a static file, and the
3052
+ * app shell for a page navigation.
3053
+ *
3054
+ * The request goes to the assets binding unchanged, so Cloudflare does the path
3055
+ * decoding and normalization; nothing here builds an asset path from the
3056
+ * request. Under `not_found_handling: "single-page-application"` the binding
3057
+ * answers a missing path with the shell and a `200`, so the shell is recognised
3058
+ * by its `ETag`, read from a fixed request for the site root.
3059
+ */
3060
+ /** A Workers Static Assets binding (`env.ASSETS`), as far as the fallback uses it. */
3061
+ interface AssetsFetcherLike {
3062
+ fetch: (request: Request) => Promise<Response>;
3063
+ }
3025
3064
  /**
3026
3065
  * Who is allowed to hand this worker a trace to join.
3027
3066
  *
@@ -4614,6 +4653,21 @@ interface WorkerOptions {
4614
4653
  * hinted region rather than exactly in it.
4615
4654
  */
4616
4655
  shardRegion?: (shardKey: string) => RegionHint | undefined;
4656
+ /**
4657
+ * The Workers Static Assets binding of a single-page app
4658
+ * (`not_found_handling: "single-page-application"`), whose `run_worker_first`
4659
+ * sends every path to the Worker first. Codegen wires it from wrangler's
4660
+ * `assets.binding` when the fallback is the SPA one.
4661
+ *
4662
+ * A `GET` / `HEAD` no route answered is passed to it unchanged: a real
4663
+ * static file comes back as is, a page navigation gets the app shell, and
4664
+ * anything else (a `fetch` to a path nothing serves) keeps the 404, since the
4665
+ * binding answers a miss with the shell too. "No route answered" means no
4666
+ * `httpRouter` at all, or its own not-found handler ran (see `httpRouter()`
4667
+ * in `@lunora/server`), never a handler's 404 or 403. `undefined` keeps every
4668
+ * miss a 404.
4669
+ */
4670
+ spaAssets?: AssetsFetcherLike;
4617
4671
  /**
4618
4672
  * Resolve the app-facing storage capability from the worker `env` — the same
4619
4673
  * `createStorage(...)` / `createBucketStorage(...)` result the shard DO
@@ -5867,7 +5921,7 @@ declare const createShardClient: (namespace: ShardNamespaceLike, options?: Shard
5867
5921
  */
5868
5922
  declare const STORAGE_UPLOAD_MAX_BODY_BYTES: number;
5869
5923
  declare const VERSION: string;
5870
- export { type AccessContextLike, type AccessIdentityLike, type AdminTableResolver, type AdminTokenSummary, type AiRunBinding, type AirbyteMessage, type AnalyticsEngineDataPointLike, type AnalyticsEngineDatasetLike, type AnalyticsEngineSinkOptions, type AuthAdmin, type AuthCapabilities, type AuthConfigInfo, type AuthImpersonation, type AuthPage, type AuthSession, type AuthUser, type AuthUserFieldSpec, BACKUP_KEY_PREFIX, type BackupManifest, type BackupManifestEntry, type BackupRetentionPreview, type BackupStore, type ComposeIdentityResolversErrorMode, type ComposeIdentityResolversOptions, type ConnectorChange, type ConnectorSyncPage, type CorsOptions, type CreatedAdminToken, type CronHandler, type CronJobDispatch, type CronJobInfo, type CrossShardCounter, type CrossShardReader, type CrossShardRelationCapabilities, type CrossShardRelationOptions, type CsrfOptions, DEFAULT_LOG_COLUMNS, DEFAULT_REGISTRY_CACHE_TTL_MS, type DurableObjectJurisdiction, type DynamicShardRegistry, type DynamicShardRegistryOptions, type ExecutionContextLike, type ExportBatch, type ExportChange, type ExportCursorStore, type ExportFanOutRequest, type ExportFanOutResult, type ExportSink, type ExportTapFailure, type ExportTapResult, type FanOutRequest, type FanOutResult, type FanOutSpec, type FivetranResponse, type FrameworkHostHandler, type FrameworkWorkerOptions, type FrameworkWorkerOptionsInput, type FunctionDescriptor, type FunctionRegistryEntry, type FunctionRegistryLike, type GlobalExportFunction as GlobalExportFn, type GlobalImportFunction as GlobalImportFn, type GlobalIntrospector, type GlobalTableInfo as GlobalTableInfoMeta, type GlobalTablePage as GlobalTablePageMeta, HEALTH_PATH, HEALTH_READY_PATH, type HealthAuthPosture, type HealthBody, type HealthCheckReport, type HealthProbe, type HealthProbeKind, type HealthProbeResult, type HealthRouteDeps, type HttpActionContext, type HttpActionLike, type HttpRouterLike, type IdentityContractLike, type IdentityResolver, type IdentityValidation, type ImportFanOutRequest, type ImportFanOutResult, type KvIntrospector, type KvKeyEntry, type KvKeyListResult, type KvNamespaceSummary, type KvValueResult, LOG_ARCHIVE_NOT_CONFIGURED, LOG_ARCHIVE_PATH, type ListAuthUsersOptions, type LogArchiveConfig, type LogEvent, type LogFields, type LogLevel, LunoraError, type LunoraErrorBody, type LunoraHandlerOptions, type LunoraWorker, type MemoizeIdentityOptions, type MergeStrategy, type MetricEvent, type MetricKind, type MigrationFanOutRequest, type MigrationFanOutResult, NOOP_EXECUTION_CONTEXT, type NotifySubscriptionDevice, type NotifySubscriptionStoreLike, type ObservabilityEvent, type ObservabilitySink, type ObservabilitySinkContext,
5924
+ export { type AccessContextLike, type AccessIdentityLike, type AdminTableResolver, type AdminTokenSummary, type AiRunBinding, type AirbyteMessage, type AnalyticsEngineDataPointLike, type AnalyticsEngineDatasetLike, type AnalyticsEngineSinkOptions, type AssetsFetcherLike, type AuthAdmin, type AuthCapabilities, type AuthConfigInfo, type AuthImpersonation, type AuthPage, type AuthSession, type AuthUser, type AuthUserFieldSpec, BACKUP_KEY_PREFIX, type BackupManifest, type BackupManifestEntry, type BackupRetentionPreview, type BackupStore, type ComposeIdentityResolversErrorMode, type ComposeIdentityResolversOptions, type ConnectorChange, type ConnectorSyncPage, type CorsOptions, type CreatedAdminToken, type CronHandler, type CronJobDispatch, type CronJobInfo, type CrossOriginOpenerPolicy, type CrossShardCounter, type CrossShardReader, type CrossShardRelationCapabilities, type CrossShardRelationOptions, type CsrfOptions, DEFAULT_LOG_COLUMNS, DEFAULT_REGISTRY_CACHE_TTL_MS, type DurableObjectJurisdiction, type DynamicShardRegistry, type DynamicShardRegistryOptions, type ExecutionContextLike, type ExportBatch, type ExportChange, type ExportCursorStore, type ExportFanOutRequest, type ExportFanOutResult, type ExportSink, type ExportTapFailure, type ExportTapResult, type FanOutRequest, type FanOutResult, type FanOutSpec, type FivetranResponse, type FrameworkHostHandler, type FrameworkWorkerOptions, type FrameworkWorkerOptionsInput, type FunctionDescriptor, type FunctionRegistryEntry, type FunctionRegistryLike, type GlobalExportFunction as GlobalExportFn, type GlobalImportFunction as GlobalImportFn, type GlobalIntrospector, type GlobalTableInfo as GlobalTableInfoMeta, type GlobalTablePage as GlobalTablePageMeta, HEALTH_PATH, HEALTH_READY_PATH, type HealthAuthPosture, type HealthBody, type HealthCheckReport, type HealthProbe, type HealthProbeKind, type HealthProbeResult, type HealthRouteDeps, type HttpActionContext, type HttpActionLike, type HttpRouterLike, type IdentityContractLike, type IdentityResolver, type IdentityValidation, type ImportFanOutRequest, type ImportFanOutResult, type KvIntrospector, type KvKeyEntry, type KvKeyListResult, type KvNamespaceSummary, type KvValueResult, LOG_ARCHIVE_NOT_CONFIGURED, LOG_ARCHIVE_PATH, type ListAuthUsersOptions, type LogArchiveConfig, type LogEvent, type LogFields, type LogLevel, LunoraError, type LunoraErrorBody, type LunoraHandlerOptions, type LunoraWorker, type MemoizeIdentityOptions, type MergeStrategy, type MetricEvent, type MetricKind, type MigrationFanOutRequest, type MigrationFanOutResult, NOOP_EXECUTION_CONTEXT, type NotifySubscriptionDevice, type NotifySubscriptionStoreLike, type ObservabilityEvent, type ObservabilitySink, type ObservabilitySinkContext,
5871
5925
  /**
5872
5926
  * Resource attribute bag used by OTLP exporters. Re-exported from `shared/otlp`
5873
5927
  * because {@link OtlpSinkOptions.resourceAttributes} is part of the public
package/dist/index.d.ts CHANGED
@@ -2795,7 +2795,7 @@ declare const restSurfaceFromRegistry: (functions: RestRegistryLike) => ReturnTy
2795
2795
  /**
2796
2796
  * Decode GET args from the query string. Each value is parsed as JSON when it
2797
2797
  * looks like a JSON scalar/array/object (so `?limit=10` → number, `?ids=[1,2]` →
2798
- * array), else kept as a string. `shardKey` (routing) and `__lunora_vary` (the
2798
+ * array), else kept as a string. `shardKey` (routing) and `__lunora_key` (the
2799
2799
  * edge cache key) are reserved and excluded.
2800
2800
  */
2801
2801
  declare const argsFromQuery: (url: URL) => Record<string, unknown>;
@@ -2852,22 +2852,40 @@ declare const createRestRateLimit: (limiter: RateLimiterLike, options: {
2852
2852
  name: string;
2853
2853
  trustedClientIpHeader?: string;
2854
2854
  }) => RestRateLimit;
2855
- /** Per-header overrides for {@link SecurityHeadersOptions}. `false` omits the header. */
2855
+ /** `Cross-Origin-Opener-Policy` values. `false` omits the header. */
2856
+ type CrossOriginOpenerPolicy = "same-origin" | "same-origin-allow-popups" | "unsafe-none";
2857
+ /** Per-header overrides for the baseline security headers. `false` omits the header. */
2856
2858
  interface SecurityHeadersOptions {
2859
+ /**
2860
+ * `Cross-Origin-Opener-Policy`. Defaults to `same-origin-allow-popups`: a
2861
+ * cross-origin page that opens yours gets no handle on it, while a popup your
2862
+ * page opens (an OAuth provider, a payment sheet) can still message back
2863
+ * through `window.opener`. `same-origin` severs that too; `false` omits the header.
2864
+ */
2865
+ crossOriginOpenerPolicy?: CrossOriginOpenerPolicy | false;
2857
2866
  /**
2858
2867
  * `Content-Security-Policy`. Omitted (`undefined`) applies a restrictive
2859
2868
  * `default-src 'none'` policy to **non-HTML** responses, and a conservative
2860
- * hardening policy to **HTML** responses (`base-uri 'none'; frame-ancestors
2861
- * 'self'; object-src 'none'`) — this does NOT set `default-src`/`script-src`,
2862
- * so it never blocks an SSR page's own scripts/styles/images/fetches, it only
2863
- * locks down the `base` element, framing (mirroring the `SAMEORIGIN`
2864
- * X-Frame-Options default), and legacy plugins. Pass a string to apply that
2865
- * exact policy to every response (HTML included); `false` to never send one.
2869
+ * hardening policy to **HTML** responses (`base-uri 'none'; object-src
2870
+ * 'none'; frame-ancestors …`) — this does NOT set `default-src`/`script-src`,
2871
+ * so it never blocks a page's own scripts/styles/images/fetches. Pass a string
2872
+ * to apply that exact policy to every response (HTML included); `false` to
2873
+ * never send one. Neither can be combined with {@link frameAncestors}: put the
2874
+ * `frame-ancestors` directive in the string.
2866
2875
  */
2867
2876
  csp?: string | false;
2877
+ /**
2878
+ * Origins allowed to embed your HTML pages in a frame, besides your own
2879
+ * (e.g. `["https://partner.example"]`). Sets the HTML policy's
2880
+ * `frame-ancestors 'self' <origins>` and drops `X-Frame-Options`, which
2881
+ * cannot express a list (browsers that understand `frame-ancestors` ignore
2882
+ * it anyway). Cannot be combined with `frameOptions: "DENY"`, a `csp` string,
2883
+ * or `csp: false` (which would leave no header restricting framing).
2884
+ */
2885
+ frameAncestors?: ReadonlyArray<string>;
2868
2886
  /** `X-Frame-Options` (clickjacking). Defaults to `SAMEORIGIN`. `false` omits it. */
2869
2887
  frameOptions?: "DENY" | "SAMEORIGIN" | false;
2870
- /** `Strict-Transport-Security`. Only ever sent over HTTPS. `false` omits it. */
2888
+ /** `Strict-Transport-Security`. The Worker sends it only over HTTPS. `false` omits it. */
2871
2889
  hsts?: boolean | {
2872
2890
  includeSubDomains?: boolean;
2873
2891
  maxAge?: number;
@@ -2878,6 +2896,20 @@ interface SecurityHeadersOptions {
2878
2896
  /** `Referrer-Policy`. Defaults to `strict-origin-when-cross-origin`. `false` omits it. */
2879
2897
  referrerPolicy?: string | false;
2880
2898
  }
2899
+ /** The header values {@link SecurityHeadersOptions} resolves to; `undefined` means "not sent". */
2900
+ interface ResolvedSecurityHeaders {
2901
+ coop: string | undefined;
2902
+ /** `value` for non-HTML responses, `htmlValue` for HTML ones. */
2903
+ csp: {
2904
+ htmlValue: string;
2905
+ value: string;
2906
+ } | undefined;
2907
+ enabled: boolean;
2908
+ frameOptions: string | undefined;
2909
+ hsts: string | undefined;
2910
+ permissionsPolicy: string | undefined;
2911
+ referrerPolicy: string | undefined;
2912
+ }
2881
2913
  /** CORS allowlist. Cross-origin is denied unless an origin matches. */
2882
2914
  interface CorsOptions {
2883
2915
  /** Echo `Access-Control-Allow-Credentials: true`. Incompatible with a `*` allowlist. */
@@ -2929,18 +2961,6 @@ interface SecurityOptions {
2929
2961
  /** Baseline security response headers. `true`/object = on (default), `false` = off. */
2930
2962
  headers?: boolean | SecurityHeadersOptions;
2931
2963
  }
2932
- interface ResolvedHeaders {
2933
- coop: string | undefined;
2934
- csp: {
2935
- htmlValue: string | undefined;
2936
- value: string;
2937
- } | undefined;
2938
- enabled: boolean;
2939
- frameOptions: string | undefined;
2940
- hsts: string | undefined;
2941
- permissionsPolicy: string | undefined;
2942
- referrerPolicy: string | undefined;
2943
- }
2944
2964
  interface ResolvedCors {
2945
2965
  allowCredentials: boolean;
2946
2966
  allowedHeaders: string[];
@@ -2967,7 +2987,7 @@ interface ResolvedCsrf {
2967
2987
  interface ResolvedSecurity {
2968
2988
  cors: ResolvedCors;
2969
2989
  csrf: ResolvedCsrf;
2970
- headers: ResolvedHeaders;
2990
+ headers: ResolvedSecurityHeaders;
2971
2991
  }
2972
2992
  /**
2973
2993
  * Normalize the public {@link SecurityOptions} into the resolved form the
@@ -3022,6 +3042,25 @@ declare const handleCorsPreflight: (request: Request, resolved: ResolvedSecurity
3022
3042
  * hibernation handshake.
3023
3043
  */
3024
3044
  declare const decorateResponse: (response: Response, request: Request, resolved: ResolvedSecurity) => Response;
3045
+ /**
3046
+ * What a single-page app's Worker answers for a `GET` / `HEAD` no route served.
3047
+ *
3048
+ * Such an app sends every path to the Worker first (`run_worker_first: ["/*",
3049
+ * …]`, written by `@lunora/config`), because Cloudflare otherwise answers every
3050
+ * path a narrower list misses with `index.html`, a webhook `POST` included. The
3051
+ * Worker then owns what the asset router used to do: serve a static file, and the
3052
+ * app shell for a page navigation.
3053
+ *
3054
+ * The request goes to the assets binding unchanged, so Cloudflare does the path
3055
+ * decoding and normalization; nothing here builds an asset path from the
3056
+ * request. Under `not_found_handling: "single-page-application"` the binding
3057
+ * answers a missing path with the shell and a `200`, so the shell is recognised
3058
+ * by its `ETag`, read from a fixed request for the site root.
3059
+ */
3060
+ /** A Workers Static Assets binding (`env.ASSETS`), as far as the fallback uses it. */
3061
+ interface AssetsFetcherLike {
3062
+ fetch: (request: Request) => Promise<Response>;
3063
+ }
3025
3064
  /**
3026
3065
  * Who is allowed to hand this worker a trace to join.
3027
3066
  *
@@ -4614,6 +4653,21 @@ interface WorkerOptions {
4614
4653
  * hinted region rather than exactly in it.
4615
4654
  */
4616
4655
  shardRegion?: (shardKey: string) => RegionHint | undefined;
4656
+ /**
4657
+ * The Workers Static Assets binding of a single-page app
4658
+ * (`not_found_handling: "single-page-application"`), whose `run_worker_first`
4659
+ * sends every path to the Worker first. Codegen wires it from wrangler's
4660
+ * `assets.binding` when the fallback is the SPA one.
4661
+ *
4662
+ * A `GET` / `HEAD` no route answered is passed to it unchanged: a real
4663
+ * static file comes back as is, a page navigation gets the app shell, and
4664
+ * anything else (a `fetch` to a path nothing serves) keeps the 404, since the
4665
+ * binding answers a miss with the shell too. "No route answered" means no
4666
+ * `httpRouter` at all, or its own not-found handler ran (see `httpRouter()`
4667
+ * in `@lunora/server`), never a handler's 404 or 403. `undefined` keeps every
4668
+ * miss a 404.
4669
+ */
4670
+ spaAssets?: AssetsFetcherLike;
4617
4671
  /**
4618
4672
  * Resolve the app-facing storage capability from the worker `env` — the same
4619
4673
  * `createStorage(...)` / `createBucketStorage(...)` result the shard DO
@@ -5867,7 +5921,7 @@ declare const createShardClient: (namespace: ShardNamespaceLike, options?: Shard
5867
5921
  */
5868
5922
  declare const STORAGE_UPLOAD_MAX_BODY_BYTES: number;
5869
5923
  declare const VERSION: string;
5870
- export { type AccessContextLike, type AccessIdentityLike, type AdminTableResolver, type AdminTokenSummary, type AiRunBinding, type AirbyteMessage, type AnalyticsEngineDataPointLike, type AnalyticsEngineDatasetLike, type AnalyticsEngineSinkOptions, type AuthAdmin, type AuthCapabilities, type AuthConfigInfo, type AuthImpersonation, type AuthPage, type AuthSession, type AuthUser, type AuthUserFieldSpec, BACKUP_KEY_PREFIX, type BackupManifest, type BackupManifestEntry, type BackupRetentionPreview, type BackupStore, type ComposeIdentityResolversErrorMode, type ComposeIdentityResolversOptions, type ConnectorChange, type ConnectorSyncPage, type CorsOptions, type CreatedAdminToken, type CronHandler, type CronJobDispatch, type CronJobInfo, type CrossShardCounter, type CrossShardReader, type CrossShardRelationCapabilities, type CrossShardRelationOptions, type CsrfOptions, DEFAULT_LOG_COLUMNS, DEFAULT_REGISTRY_CACHE_TTL_MS, type DurableObjectJurisdiction, type DynamicShardRegistry, type DynamicShardRegistryOptions, type ExecutionContextLike, type ExportBatch, type ExportChange, type ExportCursorStore, type ExportFanOutRequest, type ExportFanOutResult, type ExportSink, type ExportTapFailure, type ExportTapResult, type FanOutRequest, type FanOutResult, type FanOutSpec, type FivetranResponse, type FrameworkHostHandler, type FrameworkWorkerOptions, type FrameworkWorkerOptionsInput, type FunctionDescriptor, type FunctionRegistryEntry, type FunctionRegistryLike, type GlobalExportFunction as GlobalExportFn, type GlobalImportFunction as GlobalImportFn, type GlobalIntrospector, type GlobalTableInfo as GlobalTableInfoMeta, type GlobalTablePage as GlobalTablePageMeta, HEALTH_PATH, HEALTH_READY_PATH, type HealthAuthPosture, type HealthBody, type HealthCheckReport, type HealthProbe, type HealthProbeKind, type HealthProbeResult, type HealthRouteDeps, type HttpActionContext, type HttpActionLike, type HttpRouterLike, type IdentityContractLike, type IdentityResolver, type IdentityValidation, type ImportFanOutRequest, type ImportFanOutResult, type KvIntrospector, type KvKeyEntry, type KvKeyListResult, type KvNamespaceSummary, type KvValueResult, LOG_ARCHIVE_NOT_CONFIGURED, LOG_ARCHIVE_PATH, type ListAuthUsersOptions, type LogArchiveConfig, type LogEvent, type LogFields, type LogLevel, LunoraError, type LunoraErrorBody, type LunoraHandlerOptions, type LunoraWorker, type MemoizeIdentityOptions, type MergeStrategy, type MetricEvent, type MetricKind, type MigrationFanOutRequest, type MigrationFanOutResult, NOOP_EXECUTION_CONTEXT, type NotifySubscriptionDevice, type NotifySubscriptionStoreLike, type ObservabilityEvent, type ObservabilitySink, type ObservabilitySinkContext,
5924
+ export { type AccessContextLike, type AccessIdentityLike, type AdminTableResolver, type AdminTokenSummary, type AiRunBinding, type AirbyteMessage, type AnalyticsEngineDataPointLike, type AnalyticsEngineDatasetLike, type AnalyticsEngineSinkOptions, type AssetsFetcherLike, type AuthAdmin, type AuthCapabilities, type AuthConfigInfo, type AuthImpersonation, type AuthPage, type AuthSession, type AuthUser, type AuthUserFieldSpec, BACKUP_KEY_PREFIX, type BackupManifest, type BackupManifestEntry, type BackupRetentionPreview, type BackupStore, type ComposeIdentityResolversErrorMode, type ComposeIdentityResolversOptions, type ConnectorChange, type ConnectorSyncPage, type CorsOptions, type CreatedAdminToken, type CronHandler, type CronJobDispatch, type CronJobInfo, type CrossOriginOpenerPolicy, type CrossShardCounter, type CrossShardReader, type CrossShardRelationCapabilities, type CrossShardRelationOptions, type CsrfOptions, DEFAULT_LOG_COLUMNS, DEFAULT_REGISTRY_CACHE_TTL_MS, type DurableObjectJurisdiction, type DynamicShardRegistry, type DynamicShardRegistryOptions, type ExecutionContextLike, type ExportBatch, type ExportChange, type ExportCursorStore, type ExportFanOutRequest, type ExportFanOutResult, type ExportSink, type ExportTapFailure, type ExportTapResult, type FanOutRequest, type FanOutResult, type FanOutSpec, type FivetranResponse, type FrameworkHostHandler, type FrameworkWorkerOptions, type FrameworkWorkerOptionsInput, type FunctionDescriptor, type FunctionRegistryEntry, type FunctionRegistryLike, type GlobalExportFunction as GlobalExportFn, type GlobalImportFunction as GlobalImportFn, type GlobalIntrospector, type GlobalTableInfo as GlobalTableInfoMeta, type GlobalTablePage as GlobalTablePageMeta, HEALTH_PATH, HEALTH_READY_PATH, type HealthAuthPosture, type HealthBody, type HealthCheckReport, type HealthProbe, type HealthProbeKind, type HealthProbeResult, type HealthRouteDeps, type HttpActionContext, type HttpActionLike, type HttpRouterLike, type IdentityContractLike, type IdentityResolver, type IdentityValidation, type ImportFanOutRequest, type ImportFanOutResult, type KvIntrospector, type KvKeyEntry, type KvKeyListResult, type KvNamespaceSummary, type KvValueResult, LOG_ARCHIVE_NOT_CONFIGURED, LOG_ARCHIVE_PATH, type ListAuthUsersOptions, type LogArchiveConfig, type LogEvent, type LogFields, type LogLevel, LunoraError, type LunoraErrorBody, type LunoraHandlerOptions, type LunoraWorker, type MemoizeIdentityOptions, type MergeStrategy, type MetricEvent, type MetricKind, type MigrationFanOutRequest, type MigrationFanOutResult, NOOP_EXECUTION_CONTEXT, type NotifySubscriptionDevice, type NotifySubscriptionStoreLike, type ObservabilityEvent, type ObservabilitySink, type ObservabilitySinkContext,
5871
5925
  /**
5872
5926
  * Resource attribute bag used by OTLP exporters. Re-exported from `shared/otlp`
5873
5927
  * because {@link OtlpSinkOptions.resourceAttributes} is part of the public
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{declareAppJurisdiction as t}from"./packem_shared/declareAppJurisdiction-DEba2p42.mjs";import{BACKUP_KEY_PREFIX as s,backupManifestKey as i,backupObjectKey as p,backupObjectKeyOfManifest as n,isBackupManifestEntry as c,isBackupManifestKey as m,normalizeBackupPrefix as f}from"./packem_shared/BACKUP_KEY_PREFIX-BOtSu-_3.mjs";import{toAirbyteMessages as x,toFivetranResponse as R}from"./packem_shared/toAirbyteMessages-DY0vsuEn.mjs";import{composeWorker as l,createLunoraHandler as d,createWorker as u,defineRpcEnvelope as _,resolveLunoraOptions as k,withFrameworkWorker as b}from"./packem_shared/composeWorker-DGFf9fxj.mjs";import{createCrossShardRelationCapabilities as C}from"./packem_shared/createCrossShardRelationCapabilities-Bm04PAy7.mjs";import{DEFAULT_REGISTRY_CACHE_TTL_MS as A,SHARD_REGISTRY_DO_NAME as L,createDynamicShardRegistry as T}from"./packem_shared/DEFAULT_REGISTRY_CACHE_TTL_MS-w_RLPiwj.mjs";import{parseStackFrames as H,toError as P}from"./packem_shared/parseStackFrames-CZddjveh.mjs";import{LunoraError as v,toErrorResponse as I}from"./packem_shared/LunoraError-PkZWF-_g.mjs";import{c as F,a as M,d as N,r as G,b as K,s as U,w}from"./packem_shared/export-tap-C2B_SATf.mjs";import{HEALTH_PATH as Y,HEALTH_READY_PATH as z,buildHealthRoutes as X,d1Probe as j,durableObjectProbe as V,presenceProbe as W}from"./packem_shared/HEALTH_PATH-B8ndDG3s.mjs";import{LOG_ARCHIVE_PATH as J,resolveLogArchiveFromEnv as Q}from"./packem_shared/LOG_ARCHIVE_PATH-dTuCzfyj.mjs";import{m as $,a as ee}from"./packem_shared/memoize-identity-DzVUB2rt.mjs";import{e as oe,a as te}from"./packem_shared/observability-9slk__Gi.mjs";import{enrichSink as se,filterSink as ie}from"./packem_shared/enrichSink-44NOapaE.mjs";import{a as ne,c as ce,b as me,o as fe,p as Ee,w as xe}from"./packem_shared/observability-sinks-lLKqc_rV.mjs";import{D as Se,c as le}from"./packem_shared/pipeline-log-reader-C-nuWG_e.mjs";import{createQueryCoordinator as ue,createStaticShardRegistry as _e}from"./packem_shared/createQueryCoordinator-CaQF9cds.mjs";import{applyJurisdiction as be,resolveShard as ye}from"./packem_shared/applyJurisdiction-DKQE8kOA.mjs";import{a as Oe,r as Ae,b as Le}from"./packem_shared/rest-cache-CmHN871W.mjs";import{a as he,b as He,c as Pe,r as ge}from"./packem_shared/rest-routes-CDQ1F7kI.mjs";import{decorateResponse as Ie,enforceOrigin as De,handleCorsPreflight as Fe,resolveSecurity as Me}from"./packem_shared/decorateResponse-CdelJSUs.mjs";import{createShardClient as Ge}from"./packem_shared/createShardClient-Dar1gB9v.mjs";import{STORAGE_UPLOAD_MAX_BODY_BYTES as Ue}from"./packem_shared/STORAGE_UPLOAD_MAX_BODY_BYTES-Onz8HkiB.mjs";import{LOG_ARCHIVE_NOT_CONFIGURED as Be}from"./packem_shared/LOG_ARCHIVE_NOT_CONFIGURED-CDpi4yFD.mjs";import{NOOP_EXECUTION_CONTEXT as ze}from"./packem_shared/NOOP_EXECUTION_CONTEXT-YmXqH-jH.mjs";import{composeIdentityResolvers as je,routeIdentityResolvers as Ve}from"./packem_shared/composeIdentityResolvers-CpdHuDyk.mjs";const e="0.0.0";export{s as BACKUP_KEY_PREFIX,Se as DEFAULT_LOG_COLUMNS,A as DEFAULT_REGISTRY_CACHE_TTL_MS,Y as HEALTH_PATH,z as HEALTH_READY_PATH,Be as LOG_ARCHIVE_NOT_CONFIGURED,J as LOG_ARCHIVE_PATH,v as LunoraError,ze as NOOP_EXECUTION_CONTEXT,L as SHARD_REGISTRY_DO_NAME,Ue as STORAGE_UPLOAD_MAX_BODY_BYTES,e as VERSION,ne as analyticsEngineSink,be as applyJurisdiction,Oe as applyRestCache,he as argsFromQuery,i as backupManifestKey,p as backupObjectKey,n as backupObjectKeyOfManifest,X as buildHealthRoutes,He as buildRestRoutes,ce as combineSinks,je as composeIdentityResolvers,l as composeWorker,me as consoleSink,C as createCrossShardRelationCapabilities,T as createDynamicShardRegistry,F as createKvCursorStore,d as createLunoraHandler,M as createMemoryCursorStore,le as createPipelineLogReader,ue as createQueryCoordinator,Pe as createRestRateLimit,Ge as createShardClient,_e as createStaticShardRegistry,u as createWorker,j as d1Probe,t as declareAppJurisdiction,Ie as decorateResponse,N as defineExportSink,_ as defineRpcEnvelope,V as durableObjectProbe,oe as emitLogEvent,te as emitRpcEvent,De as enforceOrigin,se as enrichSink,ie as filterSink,Fe as handleCorsPreflight,c as isBackupManifestEntry,m as isBackupManifestKey,$ as memoizeIdentity,ee as memoizeIdentityPerRequest,f as normalizeBackupPrefix,fe as otlpSink,H as parseStackFrames,Ee as pipelineLogSink,W as presenceProbe,G as r2Sink,Ae as requestCarriesCredentials,Q as resolveLogArchiveFromEnv,k as resolveLunoraOptions,Me as resolveSecurity,ye as resolveShard,Le as restCacheHeaders,ge as restSurfaceFromRegistry,Ve as routeIdentityResolvers,K as runExportTap,U as sanitizeChange,x as toAirbyteMessages,P as toError,I as toErrorResponse,R as toFivetranResponse,w as webhookExportSink,xe as webhookSink,b as withFrameworkWorker};
1
+ import{declareAppJurisdiction as t}from"./packem_shared/declareAppJurisdiction-DEba2p42.mjs";import{BACKUP_KEY_PREFIX as s,backupManifestKey as i,backupObjectKey as p,backupObjectKeyOfManifest as n,isBackupManifestEntry as c,isBackupManifestKey as m,normalizeBackupPrefix as f}from"./packem_shared/BACKUP_KEY_PREFIX-BOtSu-_3.mjs";import{toAirbyteMessages as x,toFivetranResponse as R}from"./packem_shared/toAirbyteMessages-DY0vsuEn.mjs";import{composeWorker as l,createLunoraHandler as d,createWorker as u,defineRpcEnvelope as _,resolveLunoraOptions as k,withFrameworkWorker as b}from"./packem_shared/composeWorker-g2VSFC4t.mjs";import{createCrossShardRelationCapabilities as C}from"./packem_shared/createCrossShardRelationCapabilities-Bm04PAy7.mjs";import{DEFAULT_REGISTRY_CACHE_TTL_MS as A,SHARD_REGISTRY_DO_NAME as L,createDynamicShardRegistry as T}from"./packem_shared/DEFAULT_REGISTRY_CACHE_TTL_MS-w_RLPiwj.mjs";import{parseStackFrames as H,toError as P}from"./packem_shared/parseStackFrames-CZddjveh.mjs";import{LunoraError as v,toErrorResponse as I}from"./packem_shared/LunoraError-PkZWF-_g.mjs";import{c as F,a as M,d as N,r as G,b as K,s as U,w}from"./packem_shared/export-tap-C2B_SATf.mjs";import{HEALTH_PATH as Y,HEALTH_READY_PATH as z,buildHealthRoutes as X,d1Probe as j,durableObjectProbe as V,presenceProbe as W}from"./packem_shared/HEALTH_PATH-B8ndDG3s.mjs";import{LOG_ARCHIVE_PATH as J,resolveLogArchiveFromEnv as Q}from"./packem_shared/LOG_ARCHIVE_PATH-dTuCzfyj.mjs";import{m as $,a as ee}from"./packem_shared/memoize-identity-DzVUB2rt.mjs";import{e as oe,a as te}from"./packem_shared/observability-9slk__Gi.mjs";import{enrichSink as se,filterSink as ie}from"./packem_shared/enrichSink-BLCB5VpU.mjs";import{a as ne,c as ce,b as me,o as fe,p as Ee,w as xe}from"./packem_shared/observability-sinks-CRKDJlAP.mjs";import{D as Se,c as le}from"./packem_shared/pipeline-log-reader-C-nuWG_e.mjs";import{createQueryCoordinator as ue,createStaticShardRegistry as _e}from"./packem_shared/createQueryCoordinator-CaQF9cds.mjs";import{applyJurisdiction as be,resolveShard as ye}from"./packem_shared/applyJurisdiction-DKQE8kOA.mjs";import{a as Oe,r as Ae,b as Le}from"./packem_shared/rest-cache-CmHN871W.mjs";import{a as he,b as He,c as Pe,r as ge}from"./packem_shared/rest-routes-Br05k63D.mjs";import{d as Ie,e as De,h as Fe,r as Me}from"./packem_shared/security-headers-CZVK7xvl.mjs";import{createShardClient as Ge}from"./packem_shared/createShardClient-Dar1gB9v.mjs";import{STORAGE_UPLOAD_MAX_BODY_BYTES as Ue}from"./packem_shared/STORAGE_UPLOAD_MAX_BODY_BYTES-Onz8HkiB.mjs";import{LOG_ARCHIVE_NOT_CONFIGURED as Be}from"./packem_shared/LOG_ARCHIVE_NOT_CONFIGURED-CDpi4yFD.mjs";import{NOOP_EXECUTION_CONTEXT as ze}from"./packem_shared/NOOP_EXECUTION_CONTEXT-YmXqH-jH.mjs";import{composeIdentityResolvers as je,routeIdentityResolvers as Ve}from"./packem_shared/composeIdentityResolvers-CpdHuDyk.mjs";const e="0.0.0";export{s as BACKUP_KEY_PREFIX,Se as DEFAULT_LOG_COLUMNS,A as DEFAULT_REGISTRY_CACHE_TTL_MS,Y as HEALTH_PATH,z as HEALTH_READY_PATH,Be as LOG_ARCHIVE_NOT_CONFIGURED,J as LOG_ARCHIVE_PATH,v as LunoraError,ze as NOOP_EXECUTION_CONTEXT,L as SHARD_REGISTRY_DO_NAME,Ue as STORAGE_UPLOAD_MAX_BODY_BYTES,e as VERSION,ne as analyticsEngineSink,be as applyJurisdiction,Oe as applyRestCache,he as argsFromQuery,i as backupManifestKey,p as backupObjectKey,n as backupObjectKeyOfManifest,X as buildHealthRoutes,He as buildRestRoutes,ce as combineSinks,je as composeIdentityResolvers,l as composeWorker,me as consoleSink,C as createCrossShardRelationCapabilities,T as createDynamicShardRegistry,F as createKvCursorStore,d as createLunoraHandler,M as createMemoryCursorStore,le as createPipelineLogReader,ue as createQueryCoordinator,Pe as createRestRateLimit,Ge as createShardClient,_e as createStaticShardRegistry,u as createWorker,j as d1Probe,t as declareAppJurisdiction,Ie as decorateResponse,N as defineExportSink,_ as defineRpcEnvelope,V as durableObjectProbe,oe as emitLogEvent,te as emitRpcEvent,De as enforceOrigin,se as enrichSink,ie as filterSink,Fe as handleCorsPreflight,c as isBackupManifestEntry,m as isBackupManifestKey,$ as memoizeIdentity,ee as memoizeIdentityPerRequest,f as normalizeBackupPrefix,fe as otlpSink,H as parseStackFrames,Ee as pipelineLogSink,W as presenceProbe,G as r2Sink,Ae as requestCarriesCredentials,Q as resolveLogArchiveFromEnv,k as resolveLunoraOptions,Me as resolveSecurity,ye as resolveShard,Le as restCacheHeaders,ge as restSurfaceFromRegistry,Ve as routeIdentityResolvers,K as runExportTap,U as sanitizeChange,x as toAirbyteMessages,P as toError,I as toErrorResponse,R as toFivetranResponse,w as webhookExportSink,xe as webhookSink,b as withFrameworkWorker};
@@ -1 +1 @@
1
- import"./otlp-resource-Ch_8_U0e.mjs";import{S as a,a as s,c as S,b as e,o as k,p,w as c}from"./observability-sinks-lLKqc_rV.mjs";export{a as SINK_CONFIG_FIELDS,s as analyticsEngineSink,S as combineSinks,e as consoleSink,k as otlpSink,p as pipelineLogSink,c as webhookSink};
1
+ import"./otlp-resource-BBR8xs6m.mjs";import{S as a,a as s,c as S,b as e,o as k,p,w as c}from"./observability-sinks-CRKDJlAP.mjs";export{a as SINK_CONFIG_FIELDS,s as analyticsEngineSink,S as combineSinks,e as consoleSink,k as otlpSink,p as pipelineLogSink,c as webhookSink};
@@ -1 +1 @@
1
- import{a as o,b as i,c as m,r as R}from"./rest-routes-CDQ1F7kI.mjs";import"./rest-cache-CmHN871W.mjs";import"./LunoraError-PkZWF-_g.mjs";import"./method-guard-8Jo4Q8uS.mjs";export{o as argsFromQuery,i as buildRestRoutes,m as createRestRateLimit,R as restSurfaceFromRegistry};
1
+ import{a as o,b as i,c as m,r as R}from"./rest-routes-Br05k63D.mjs";import"./rest-cache-CmHN871W.mjs";import"./LunoraError-PkZWF-_g.mjs";import"./method-guard-8Jo4Q8uS.mjs";export{o as argsFromQuery,i as buildRestRoutes,m as createRestRateLimit,R as restSurfaceFromRegistry};