@lunora/runtime 1.0.0-alpha.298 → 1.0.0-alpha.299
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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ShardDirectory, HttpCacheLike, R2MultipartUploadLike } from '@lunora/platform';
|
|
2
|
-
import { RankDirection, RankPageRow,
|
|
2
|
+
import { RankDirection, RankPageRow, CrossShardCountArgs, CrossShardReadArgs, QueryPage } from '@lunora/shard-engine';
|
|
3
3
|
export type { RankDirection as RankPageDirection, RankPageRowKey as RankPageKey, RankPageRow, ShardRankPageResult } from '@lunora/shard-engine';
|
|
4
4
|
import { R2SqlClient } from '@lunora/bindings/r2sql';
|
|
5
5
|
import { WorkflowsRestClient } from '@lunora/workflow';
|
|
@@ -5388,7 +5388,7 @@ declare const defineRpcEnvelope: (envelope: RpcEnvelope) => RpcEnvelope;
|
|
|
5388
5388
|
* and the RLS filters must travel as data. The import is type-only:
|
|
5389
5389
|
* `@lunora/runtime` keeps no hard (value) dependency on `@lunora/do`.
|
|
5390
5390
|
*/
|
|
5391
|
-
type CrossShardCounter =
|
|
5391
|
+
type CrossShardCounter = (table: string, args: CrossShardCountArgs) => Promise<number>;
|
|
5392
5392
|
type CrossShardReader = (table: string, args: CrossShardReadArgs) => Promise<QueryPage>;
|
|
5393
5393
|
interface CrossShardRelationOptions {
|
|
5394
5394
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ShardDirectory, HttpCacheLike, R2MultipartUploadLike } from '@lunora/platform';
|
|
2
|
-
import { RankDirection, RankPageRow,
|
|
2
|
+
import { RankDirection, RankPageRow, CrossShardCountArgs, CrossShardReadArgs, QueryPage } from '@lunora/shard-engine';
|
|
3
3
|
export type { RankDirection as RankPageDirection, RankPageRowKey as RankPageKey, RankPageRow, ShardRankPageResult } from '@lunora/shard-engine';
|
|
4
4
|
import { R2SqlClient } from '@lunora/bindings/r2sql';
|
|
5
5
|
import { WorkflowsRestClient } from '@lunora/workflow';
|
|
@@ -5388,7 +5388,7 @@ declare const defineRpcEnvelope: (envelope: RpcEnvelope) => RpcEnvelope;
|
|
|
5388
5388
|
* and the RLS filters must travel as data. The import is type-only:
|
|
5389
5389
|
* `@lunora/runtime` keeps no hard (value) dependency on `@lunora/do`.
|
|
5390
5390
|
*/
|
|
5391
|
-
type CrossShardCounter =
|
|
5391
|
+
type CrossShardCounter = (table: string, args: CrossShardCountArgs) => Promise<number>;
|
|
5392
5392
|
type CrossShardReader = (table: string, args: CrossShardReadArgs) => Promise<QueryPage>;
|
|
5393
5393
|
interface CrossShardRelationOptions {
|
|
5394
5394
|
/**
|
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 E,toFivetranResponse as R}from"./packem_shared/toAirbyteMessages-BVogmTPJ.mjs";import{composeWorker as d,createLunoraHandler as l,createWorker as u,defineRpcEnvelope as _,resolveLunoraOptions as k,withFrameworkWorker as b}from"./packem_shared/composeWorker-MSVk8NrW.mjs";import{createCrossShardRelationCapabilities as C}from"./packem_shared/createCrossShardRelationCapabilities-
|
|
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 E,toFivetranResponse as R}from"./packem_shared/toAirbyteMessages-BVogmTPJ.mjs";import{composeWorker as d,createLunoraHandler as l,createWorker as u,defineRpcEnvelope as _,resolveLunoraOptions as k,withFrameworkWorker as b}from"./packem_shared/composeWorker-MSVk8NrW.mjs";import{createCrossShardRelationCapabilities as C}from"./packem_shared/createCrossShardRelationCapabilities-C3IBzt-b.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-CMyD7rin.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-Cbr1Sdt3.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-8_qnPWNH.mjs";import{a as ne,c as ce,b as me,o as fe,p as xe,w as Ee}from"./packem_shared/observability-sinks-BA76CH4h.mjs";import{D as Se,c as de}from"./packem_shared/pipeline-log-reader-C-nuWG_e.mjs";import{createQueryCoordinator as ue,createStaticShardRegistry as _e}from"./packem_shared/createQueryCoordinator-DIrlAqnz.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-q5V06Etw.mjs";import{a as he,b as He,c as Pe,r as ge}from"./packem_shared/rest-routes-D5NWHmVl.mjs";import{d as Ie,e as De,h as Fe,r as Me}from"./packem_shared/security-headers-0DqdJ04h.mjs";import{createShardClient as Ge}from"./packem_shared/createShardClient-M_c0MHVS.mjs";import{STORAGE_UPLOAD_MAX_BODY_BYTES as Ue}from"./packem_shared/STORAGE_UPLOAD_MAX_BODY_BYTES-Onz8HkiB.mjs";import{loadStudioDocument as Be}from"./packem_shared/loadStudioDocument-BSYQEMnd.mjs";import{LOG_ARCHIVE_NOT_CONFIGURED as ze}from"./packem_shared/LOG_ARCHIVE_NOT_CONFIGURED-CDpi4yFD.mjs";import{NOOP_EXECUTION_CONTEXT as je}from"./packem_shared/NOOP_EXECUTION_CONTEXT-YmXqH-jH.mjs";import{composeIdentityResolvers as We,routeIdentityResolvers as qe}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,ze as LOG_ARCHIVE_NOT_CONFIGURED,J as LOG_ARCHIVE_PATH,v as LunoraError,je 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,We as composeIdentityResolvers,d as composeWorker,me as consoleSink,C as createCrossShardRelationCapabilities,T as createDynamicShardRegistry,F as createKvCursorStore,l as createLunoraHandler,M as createMemoryCursorStore,de 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,Be as loadStudioDocument,$ as memoizeIdentity,ee as memoizeIdentityPerRequest,f as normalizeBackupPrefix,fe as otlpSink,H as parseStackFrames,xe 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,qe as routeIdentityResolvers,K as runExportTap,U as sanitizeChange,E as toAirbyteMessages,P as toError,I as toErrorResponse,R as toFivetranResponse,w as webhookExportSink,Ee as webhookSink,b as withFrameworkWorker};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{encodeWire as c,decodeWire as u}from"@lunora/wire";import{e as f,c as l}from"./identity-header-DqrLFqFq.mjs";import{LunoraError as s}from"./LunoraError-PkZWF-_g.mjs";const h="/_lunora/rpc",y=e=>{const n={"content-type":"application/json"};return e.userId!==void 0&&e.userId.length>0&&(n["x-lunora-userid"]=f(e.userId)),e.identity!==void 0&&(n["x-lunora-identity"]=l(e.identity)),n},d=async(e,n,o)=>{const t=await(e.fetch??globalThis.fetch)(new Request(`${e.origin}${h}`,{body:JSON.stringify(c(n)),headers:y(e),method:"POST"}));if(!t.ok)throw new s(`cross-shard relation ${o} failed: worker returned ${String(t.status)}`);const r=await t.json();if(typeof r.failed=="number"&&r.failed>0){const i=(typeof r.ok=="number"?r.ok:0)+r.failed;throw new s(`cross-shard relation ${o} failed on ${String(r.failed)} of ${String(i)} shard(s) — refusing to return a partial result`)}return u(r.data)},w=e=>({crossShardCounter:async(a,t)=>{const r=await d(e,{args:{...t,table:a},fanOut:{merge:{kind:"sum"},table:a},functionPath:"__lunora_relation__:count"},"count");return typeof r=="number"?r:0},crossShardReader:async(a,t)=>{const r=await d(e,{args:{...t,table:a},fanOut:{merge:{kind:"concat"},table:a},functionPath:"__lunora_relation__:read"},"read");return{continueCursor:null,isDone:!0,page:Array.isArray(r)?r:[]}}});export{w as createCrossShardRelationCapabilities};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{decodeWire as c}from"@lunora/wire";import{e as u,c as f}from"./identity-header-DqrLFqFq.mjs";import{LunoraError as s}from"./LunoraError-PkZWF-_g.mjs";const l="/_lunora/rpc",h=e=>{const a={"content-type":"application/json"};return e.userId!==void 0&&e.userId.length>0&&(a["x-lunora-userid"]=u(e.userId)),e.identity!==void 0&&(a["x-lunora-identity"]=f(e.identity)),a},d=async(e,a,o)=>{const t=await(e.fetch??globalThis.fetch)(new Request(`${e.origin}${l}`,{body:JSON.stringify(a),headers:h(e),method:"POST"}));if(!t.ok)throw new s(`cross-shard relation ${o} failed: worker returned ${String(t.status)}`);const r=await t.json();if(typeof r.failed=="number"&&r.failed>0){const i=(typeof r.ok=="number"?r.ok:0)+r.failed;throw new s(`cross-shard relation ${o} failed on ${String(r.failed)} of ${String(i)} shard(s) — refusing to return a partial result`)}return c(r.data)},_=e=>({crossShardCounter:async(n,t)=>{const r=await d(e,{args:{table:n,where:t},fanOut:{merge:{kind:"sum"},table:n},functionPath:"__lunora_relation__:count"},"count");return typeof r=="number"?r:0},crossShardReader:async(n,t)=>{const r=await d(e,{args:{...t,table:n},fanOut:{merge:{kind:"concat"},table:n},functionPath:"__lunora_relation__:read"},"read");return{continueCursor:null,isDone:!0,page:Array.isArray(r)?r:[]}}});export{_ as createCrossShardRelationCapabilities};
|