@lunora/runtime 1.0.0-alpha.235 → 1.0.0-alpha.236
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
|
@@ -4923,6 +4923,8 @@ interface DynamicShardRegistryOptions {
|
|
|
4923
4923
|
jurisdiction?: DurableObjectJurisdiction;
|
|
4924
4924
|
/** DO namespace binding (`env.SHARD_REGISTRY`). */
|
|
4925
4925
|
namespace: ShardNamespaceLike;
|
|
4926
|
+
/** The registry's `SHARD_REGISTRY_DO_SECRET`, sent on every request; omit when none is provisioned. */
|
|
4927
|
+
secret?: string;
|
|
4926
4928
|
}
|
|
4927
4929
|
/**
|
|
4928
4930
|
* Extension of {@link ShardRegistry} with the mutator surface a worker
|
package/dist/index.d.ts
CHANGED
|
@@ -4923,6 +4923,8 @@ interface DynamicShardRegistryOptions {
|
|
|
4923
4923
|
jurisdiction?: DurableObjectJurisdiction;
|
|
4924
4924
|
/** DO namespace binding (`env.SHARD_REGISTRY`). */
|
|
4925
4925
|
namespace: ShardNamespaceLike;
|
|
4926
|
+
/** The registry's `SHARD_REGISTRY_DO_SECRET`, sent on every request; omit when none is provisioned. */
|
|
4927
|
+
secret?: string;
|
|
4926
4928
|
}
|
|
4927
4929
|
/**
|
|
4928
4930
|
* Extension of {@link ShardRegistry} with the mutator surface a worker
|
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-Dycssvhe.mjs";import{createCrossShardRelationCapabilities as C}from"./packem_shared/createCrossShardRelationCapabilities-C8lpyW1a.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-
|
|
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-Dycssvhe.mjs";import{createCrossShardRelationCapabilities as C}from"./packem_shared/createCrossShardRelationCapabilities-C8lpyW1a.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-CLskZt-Q.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{memoizeIdentity as $,memoizeIdentityPerRequest as ee}from"./packem_shared/memoizeIdentity-BNnHkqeF.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-Bt6xVTQn.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-BlcK9Nok.mjs";import{STORAGE_UPLOAD_MAX_BODY_BYTES as Ue}from"./packem_shared/STORAGE_UPLOAD_MAX_BODY_BYTES-DiZho96u.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{LunoraError as i}from"./LunoraError-PkZWF-_g.mjs";import{applyJurisdiction as l,resolveShard as E}from"./applyJurisdiction-DKQE8kOA.mjs";const m="x-lunora-shard-registry-do-secret",T="__lunora_shard_registry__",A=3e4,p="https://shard-registry.internal",S=async n=>await n.json(),M=n=>{const _=n.instanceName??T,d=n.cacheTtlMs??A,a=new Map,s=new Map,R=l(n.namespace,n.jurisdiction),h=n.secret?{[m]:n.secret}:{},y=()=>E(R,_),g=async(e,t)=>y().fetch(new Request(`${p}${e}`,{body:JSON.stringify(t),headers:{"content-type":"application/json",...h},method:"POST"})),u=async e=>y().fetch(new Request(`${p}${e}`,{headers:h,method:"GET"}));return{invalidate(e){e===void 0?(a.clear(),s.clear()):(a.delete(e),s.delete(e))},async listShardKeys(e){const t=Date.now(),r=a.get(e);if(r&&r.expiresAt>t)return r.shardKeys;const w=s.get(e);if(w)return w;const o=(async()=>{const c=await u(`/list?table=${encodeURIComponent(e)}`);if(!c.ok)throw new i(`shard registry /list returned ${String(c.status)}`);const{shardKeys:f}=await S(c);return f})();d>0&&s.set(e,o);try{const c=await o;return d>0&&s.get(e)===o&&a.set(e,{expiresAt:t+d,shardKeys:c}),c}finally{s.get(e)===o&&s.delete(e)}},async register(e,t){const r=await g("/register",{shardKey:t,table:e});if(!r.ok)throw new i(`shard registry /register returned ${String(r.status)}`);a.delete(e),s.delete(e)},async snapshot(){const e=await u("/snapshot");if(!e.ok)throw new i(`shard registry /snapshot returned ${String(e.status)}`);const{tables:t}=await S(e);return t},async unregister(e,t){const r=await g("/unregister",{shardKey:t,table:e});if(!r.ok)throw new i(`shard registry /unregister returned ${String(r.status)}`);a.delete(e),s.delete(e)}}};export{A as DEFAULT_REGISTRY_CACHE_TTL_MS,T as SHARD_REGISTRY_DO_NAME,M as createDynamicShardRegistry};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/runtime",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.236",
|
|
4
4
|
"description": "Lunora Worker runtime: the RPC router, shard resolver, and query coordinator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@lunora/bindings": "1.0.0-alpha.
|
|
49
|
+
"@lunora/bindings": "1.0.0-alpha.133",
|
|
50
50
|
"@lunora/errors": ">=1.0.0-alpha.51 <2.0.0-0",
|
|
51
|
-
"@lunora/observability": "1.0.0-alpha.
|
|
51
|
+
"@lunora/observability": "1.0.0-alpha.168",
|
|
52
52
|
"@lunora/platform": "1.0.0-alpha.74",
|
|
53
53
|
"@lunora/wire": "1.0.0-alpha.2"
|
|
54
54
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{LunoraError as c}from"./LunoraError-PkZWF-_g.mjs";import{applyJurisdiction as l,resolveShard as m}from"./applyJurisdiction-DKQE8kOA.mjs";const R="__lunora_shard_registry__",T=3e4,p="https://shard-registry.internal",w=async n=>await n.json(),A=n=>{const f=n.instanceName??R,d=n.cacheTtlMs??T,a=new Map,s=new Map,S=l(n.namespace,n.jurisdiction),h=()=>m(S,f),y=async(e,t)=>h().fetch(new Request(`${p}${e}`,{body:JSON.stringify(t),headers:{"content-type":"application/json"},method:"POST"})),g=async e=>h().fetch(new Request(`${p}${e}`,{method:"GET"}));return{invalidate(e){e===void 0?(a.clear(),s.clear()):(a.delete(e),s.delete(e))},async listShardKeys(e){const t=Date.now(),r=a.get(e);if(r&&r.expiresAt>t)return r.shardKeys;const u=s.get(e);if(u)return u;const o=(async()=>{const i=await g(`/list?table=${encodeURIComponent(e)}`);if(!i.ok)throw new c(`shard registry /list returned ${String(i.status)}`);const{shardKeys:_}=await w(i);return _})();d>0&&s.set(e,o);try{const i=await o;return d>0&&s.get(e)===o&&a.set(e,{expiresAt:t+d,shardKeys:i}),i}finally{s.get(e)===o&&s.delete(e)}},async register(e,t){const r=await y("/register",{shardKey:t,table:e});if(!r.ok)throw new c(`shard registry /register returned ${String(r.status)}`);a.delete(e),s.delete(e)},async snapshot(){const e=await g("/snapshot");if(!e.ok)throw new c(`shard registry /snapshot returned ${String(e.status)}`);const{tables:t}=await w(e);return t},async unregister(e,t){const r=await y("/unregister",{shardKey:t,table:e});if(!r.ok)throw new c(`shard registry /unregister returned ${String(r.status)}`);a.delete(e),s.delete(e)}}};export{T as DEFAULT_REGISTRY_CACHE_TTL_MS,R as SHARD_REGISTRY_DO_NAME,A as createDynamicShardRegistry};
|