@lunora/do 1.0.0-alpha.288 → 1.0.0-alpha.289

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
@@ -568,8 +568,12 @@ interface RunShardImportArgs {
568
568
  deletes?: boolean;
569
569
  /** Check the rows and report their shape errors, writing nothing. See `ImportShardArgs.dryRun` in `@lunora/shard-engine`. */
570
570
  dryRun?: boolean;
571
+ /** Replace prune: the `_id`s kept besides `rows`' own (see `@lunora/shard-engine`'s `ImportShardArgs`). */
572
+ keepIds?: ReadonlySet<string>;
571
573
  /** What a row whose `_id` already exists does. See `ImportConflictMode` in `@lunora/shard-engine`. */
572
574
  onConflict?: ImportConflictMode;
575
+ /** Replace mode: rows of these tables overwrite by `_id` (see `@lunora/shard-engine`'s `ImportShardArgs`). */
576
+ replaceTables?: ReadonlyArray<string>;
573
577
  rows: ReadonlyArray<ImportRow>;
574
578
  startLine?: number;
575
579
  }
@@ -4885,6 +4889,10 @@ declare abstract class ShardDO {
4885
4889
  * The `importShard` admin op: a dry run is answered without touching storage,
4886
4890
  * a real import flushes live subscribers and is audited.
4887
4891
  */
4892
+ /** The import RPCs — the append `importShard` and the staged-session ones — or `undefined` for any other admin call. */
4893
+ private importAdminRpc;
4894
+ /** Serve one staged-import session RPC (`importStage` / `importCommit` / …), see `./import-session-rpc`. */
4895
+ private importSessionAdmin;
4888
4896
  private importAdminShard;
4889
4897
  /** Admit an admin call (its caller) or answer its 403. Root-only ops refuse a named token. */
4890
4898
  private authorizeAdminCall;
@@ -4983,6 +4991,14 @@ declare abstract class ShardDO {
4983
4991
  * recording call into an error. Admin-gated by `handleAdminRpc`'s caller.
4984
4992
  */
4985
4993
  private handleRecordAuthEvent;
4994
+ /**
4995
+ * Audit the halves of an admin import that never reach a shard — the
4996
+ * `.global()` rows and the `$auth`/`$kv`/`$storage` sections — into this
4997
+ * shard's log. The worker sends them to the default shard under the
4998
+ * importer's own headers, so the entry sits beside that shard's
4999
+ * `importShard` entry, attributed to the same user, in the Studio Audit tab.
5000
+ */
5001
+ private handleRecordImportAudit;
4986
5002
  /**
4987
5003
  * Append one container lifecycle event to the in-memory {@link LogBuffer}
4988
5004
  * the `getLogs` admin RPC reads, so a start/stop/error on a Container DO
package/dist/index.d.ts CHANGED
@@ -568,8 +568,12 @@ interface RunShardImportArgs {
568
568
  deletes?: boolean;
569
569
  /** Check the rows and report their shape errors, writing nothing. See `ImportShardArgs.dryRun` in `@lunora/shard-engine`. */
570
570
  dryRun?: boolean;
571
+ /** Replace prune: the `_id`s kept besides `rows`' own (see `@lunora/shard-engine`'s `ImportShardArgs`). */
572
+ keepIds?: ReadonlySet<string>;
571
573
  /** What a row whose `_id` already exists does. See `ImportConflictMode` in `@lunora/shard-engine`. */
572
574
  onConflict?: ImportConflictMode;
575
+ /** Replace mode: rows of these tables overwrite by `_id` (see `@lunora/shard-engine`'s `ImportShardArgs`). */
576
+ replaceTables?: ReadonlyArray<string>;
573
577
  rows: ReadonlyArray<ImportRow>;
574
578
  startLine?: number;
575
579
  }
@@ -4885,6 +4889,10 @@ declare abstract class ShardDO {
4885
4889
  * The `importShard` admin op: a dry run is answered without touching storage,
4886
4890
  * a real import flushes live subscribers and is audited.
4887
4891
  */
4892
+ /** The import RPCs — the append `importShard` and the staged-session ones — or `undefined` for any other admin call. */
4893
+ private importAdminRpc;
4894
+ /** Serve one staged-import session RPC (`importStage` / `importCommit` / …), see `./import-session-rpc`. */
4895
+ private importSessionAdmin;
4888
4896
  private importAdminShard;
4889
4897
  /** Admit an admin call (its caller) or answer its 403. Root-only ops refuse a named token. */
4890
4898
  private authorizeAdminCall;
@@ -4983,6 +4991,14 @@ declare abstract class ShardDO {
4983
4991
  * recording call into an error. Admin-gated by `handleAdminRpc`'s caller.
4984
4992
  */
4985
4993
  private handleRecordAuthEvent;
4994
+ /**
4995
+ * Audit the halves of an admin import that never reach a shard — the
4996
+ * `.global()` rows and the `$auth`/`$kv`/`$storage` sections — into this
4997
+ * shard's log. The worker sends them to the default shard under the
4998
+ * importer's own headers, so the entry sits beside that shard's
4999
+ * `importShard` entry, attributed to the same user, in the Studio Audit tab.
5000
+ */
5001
+ private handleRecordImportAudit;
4986
5002
  /**
4987
5003
  * Append one container lifecycle event to the in-memory {@link LogBuffer}
4988
5004
  * the `getLogs` admin RPC reads, so a start/stop/error on a Container DO
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{AdminRevocationDO as a}from"./packem_shared/AdminRevocationDO-DHjoZWfF.mjs";import{installDeliveryFence as t}from"./packem_shared/installDeliveryFence-B6M9KOnb.mjs";import{MERGED_ROLES as S,mergeDurableObjects as i,roleNamespace as l}from"./packem_shared/MERGED_ROLES-BAMAmIcW.mjs";import{serveRelationFanout as n}from"./packem_shared/serveRelationFanout-DcSjzAZv.mjs";import{SESSION_DO_TTL_DEFAULT as d,SessionDO as p}from"./packem_shared/SESSION_DO_TTL_DEFAULT-DSvTwRjc.mjs";import{ROOT_DO_SIZE_WARN_BYTES as D,ROOT_SHARD_NAME as O,ShardDO as E}from"./packem_shared/ROOT_DO_SIZE_WARN_BYTES-w1SvVlQ0.mjs";import{SHARD_REGISTRY_DO_NAME as h,ShardRegistryDO as x,hostedShardRegistry as f}from"./packem_shared/SHARD_REGISTRY_DO_NAME-Dbh8JQJQ.mjs";import{createStableIdFactory as A,createStableRandomFactory as I}from"./packem_shared/createStableIdFactory-DPDT_chw.mjs";import{createShardAlarms as b,createShardDirectory as M,createShardHost as N,createShardKvStore as g,createShardPlatform as y,createSocketHost as k,createWorkerPlatform as F}from"@lunora/platform-cloudflare";import{REPROJECTION_MIGRATION_PREFIX as L,UNVOUCHABLE_DEP as v,applyCdcChanges as H,assertShapeShardable as P,backfillSearchIndexes as j,backfillVectorIndexes as U,buildReprojectionMigration as w,clearMemoryTables as G,countLegacyRows as V,createReadFootprint as B,createShardCtxDb as W,exportShardRows as Y,importShardRows as J,isSourceDue as K,markUnvouchableReads as X,pullExternalSourceIncrementalTick as Z,pullExternalSourceTick as q,reprojectionMigrationId as z,reprojectionTables as Q,runDataMigration as $,runShardMigrations as ee,subscriptionListDeltas as re}from"@lunora/shard-engine";import{A as oe}from"./packem_shared/admin-token-DrufJIZV.mjs";export{oe as ADMIN_REVOCATION_DO_NAME,a as AdminRevocationDO,S as MERGED_ROLES,L as REPROJECTION_MIGRATION_PREFIX,D as ROOT_DO_SIZE_WARN_BYTES,O as ROOT_SHARD_NAME,d as SESSION_DO_TTL_DEFAULT,h as SHARD_REGISTRY_DO_NAME,p as SessionDO,E as ShardDO,x as ShardRegistryDO,v as UNVOUCHABLE_DEP,H as applyCdcChanges,P as assertShapeShardable,j as backfillSearchIndexes,U as backfillVectorIndexes,w as buildReprojectionMigration,G as clearMemoryTables,V as countLegacyRows,B as createReadFootprint,b as createShardAlarms,W as createShardCtxDb,M as createShardDirectory,N as createShardHost,g as createShardKvStore,y as createShardPlatform,k as createSocketHost,A as createStableIdFactory,I as createStableRandomFactory,F as createWorkerPlatform,Y as exportShardRows,f as hostedShardRegistry,J as importShardRows,t as installDeliveryFence,K as isSourceDue,X as markUnvouchableReads,i as mergeDurableObjects,Z as pullExternalSourceIncrementalTick,q as pullExternalSourceTick,z as reprojectionMigrationId,Q as reprojectionTables,l as roleNamespace,$ as runDataMigration,ee as runShardMigrations,n as serveRelationFanout,re as subscriptionListDeltas};
1
+ import{AdminRevocationDO as a}from"./packem_shared/AdminRevocationDO-DHjoZWfF.mjs";import{installDeliveryFence as t}from"./packem_shared/installDeliveryFence-B6M9KOnb.mjs";import{MERGED_ROLES as S,mergeDurableObjects as i,roleNamespace as l}from"./packem_shared/MERGED_ROLES-BAMAmIcW.mjs";import{serveRelationFanout as n}from"./packem_shared/serveRelationFanout-DcSjzAZv.mjs";import{SESSION_DO_TTL_DEFAULT as d,SessionDO as p}from"./packem_shared/SESSION_DO_TTL_DEFAULT-DSvTwRjc.mjs";import{ROOT_DO_SIZE_WARN_BYTES as D,ROOT_SHARD_NAME as O,ShardDO as E}from"./packem_shared/ROOT_DO_SIZE_WARN_BYTES-VDKtKWzB.mjs";import{SHARD_REGISTRY_DO_NAME as h,ShardRegistryDO as x,hostedShardRegistry as f}from"./packem_shared/SHARD_REGISTRY_DO_NAME-Dbh8JQJQ.mjs";import{createStableIdFactory as A,createStableRandomFactory as I}from"./packem_shared/createStableIdFactory-DPDT_chw.mjs";import{createShardAlarms as b,createShardDirectory as M,createShardHost as N,createShardKvStore as g,createShardPlatform as y,createSocketHost as k,createWorkerPlatform as F}from"@lunora/platform-cloudflare";import{REPROJECTION_MIGRATION_PREFIX as L,UNVOUCHABLE_DEP as v,applyCdcChanges as H,assertShapeShardable as P,backfillSearchIndexes as j,backfillVectorIndexes as U,buildReprojectionMigration as w,clearMemoryTables as G,countLegacyRows as V,createReadFootprint as B,createShardCtxDb as W,exportShardRows as Y,importShardRows as J,isSourceDue as K,markUnvouchableReads as X,pullExternalSourceIncrementalTick as Z,pullExternalSourceTick as q,reprojectionMigrationId as z,reprojectionTables as Q,runDataMigration as $,runShardMigrations as ee,subscriptionListDeltas as re}from"@lunora/shard-engine";import{A as oe}from"./packem_shared/admin-token-DrufJIZV.mjs";export{oe as ADMIN_REVOCATION_DO_NAME,a as AdminRevocationDO,S as MERGED_ROLES,L as REPROJECTION_MIGRATION_PREFIX,D as ROOT_DO_SIZE_WARN_BYTES,O as ROOT_SHARD_NAME,d as SESSION_DO_TTL_DEFAULT,h as SHARD_REGISTRY_DO_NAME,p as SessionDO,E as ShardDO,x as ShardRegistryDO,v as UNVOUCHABLE_DEP,H as applyCdcChanges,P as assertShapeShardable,j as backfillSearchIndexes,U as backfillVectorIndexes,w as buildReprojectionMigration,G as clearMemoryTables,V as countLegacyRows,B as createReadFootprint,b as createShardAlarms,W as createShardCtxDb,M as createShardDirectory,N as createShardHost,g as createShardKvStore,y as createShardPlatform,k as createSocketHost,A as createStableIdFactory,I as createStableRandomFactory,F as createWorkerPlatform,Y as exportShardRows,f as hostedShardRegistry,J as importShardRows,t as installDeliveryFence,K as isSourceDue,X as markUnvouchableReads,i as mergeDurableObjects,Z as pullExternalSourceIncrementalTick,q as pullExternalSourceTick,z as reprojectionMigrationId,Q as reprojectionTables,l as roleNamespace,$ as runDataMigration,ee as runShardMigrations,n as serveRelationFanout,re as subscriptionListDeltas};