@lunora/do 1.0.0-alpha.3 → 1.0.0-alpha.4
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 +20 -30
- package/dist/index.d.ts +20 -30
- package/dist/index.mjs +16 -16
- package/dist/packem_shared/{assertValidClientId-CBZ1zC96.mjs → NotUniqueError-B6tzuDmM.mjs} +11 -11
- package/dist/packem_shared/{ROOT_DO_SIZE_WARN_BYTES-DQkmGiCS.mjs → ROOT_DO_SIZE_WARN_BYTES-3lZ2yigq.mjs} +10 -16
- package/dist/packem_shared/{backfillAggregateIndexes-BF5eL7kW.mjs → backfillAggregateIndexes-BbVPvciS.mjs} +1 -1
- package/dist/packem_shared/{runShardMigrations-C3bn5r93.mjs → runShardMigrations-PabobOjF.mjs} +2 -2
- package/dist/packem_shared/{serveRelationFanout-Clr1a05L.mjs → serveRelationFanout-CFBKWJ8Q.mjs} +1 -1
- package/package.json +1 -1
- /package/dist/packem_shared/{ADMIN_FUNCTION_PREFIX-Dzdqq5J2.mjs → ADMIN_FUNCTIONS-Dzdqq5J2.mjs} +0 -0
- /package/dist/packem_shared/{matchesStaticWhere-CFk6adSu.mjs → AGGREGATE_SQL_FUNCTION-CFk6adSu.mjs} +0 -0
- /package/dist/packem_shared/{AUTH_METRICS_BUCKET_MS-CiHHYeJi.mjs → AUTH_METRICS_BUCKETS_TABLE-CiHHYeJi.mjs} +0 -0
- /package/dist/packem_shared/{applyCdcChanges-Ctdmxmrv.mjs → CDC_LOG_TABLE-Ctdmxmrv.mjs} +0 -0
- /package/dist/packem_shared/{assertFlatPredicate-DyVYReuT.mjs → DEFAULT_MAX_RELATION_KEYS-DyVYReuT.mjs} +0 -0
- /package/dist/packem_shared/{ensureFunctionMetricsTables-UDNVD7FS.mjs → FUNCTION_METRICS_BUCKETS_TABLE-UDNVD7FS.mjs} +0 -0
- /package/dist/packem_shared/{clearCapturedMail-CPpgl-dX.mjs → MAIL_RETENTION-CPpgl-dX.mjs} +0 -0
- /package/dist/packem_shared/{assertReadonly-dDcFE1YZ.mjs → MAX_SQL_ROWS-dDcFE1YZ.mjs} +0 -0
- /package/dist/packem_shared/{buildSecurityAudit-CCAvoFlr.mjs → MIN_ADMIN_TOKEN_LENGTH-CCAvoFlr.mjs} +0 -0
- /package/dist/packem_shared/{encodePartitionKey-C6blLR5K.mjs → RANK_TIEBREAK-C6blLR5K.mjs} +0 -0
- /package/dist/packem_shared/{guardWriter-u3UlnCH5.mjs → RLS_UNWRAP_SYMBOL-u3UlnCH5.mjs} +0 -0
- /package/dist/packem_shared/{ftsTableName-BLEMawrp.mjs → buildFtsMatch-BLEMawrp.mjs} +0 -0
- /package/dist/packem_shared/{runTriggers-5N6_Fx0A.mjs → hasTrigger-5N6_Fx0A.mjs} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -289,9 +289,9 @@ declare const applyOnDelete: (options: ApplyOnDeleteOptions) => Promise<void>;
|
|
|
289
289
|
* fakes (which never carry a runtime parser) keep working.
|
|
290
290
|
*/
|
|
291
291
|
declare const runRowValidators: (definition: TableDefinitionLike, document: Record<string, unknown>) => void;
|
|
292
|
-
type SortDirection
|
|
292
|
+
type SortDirection = "asc" | "desc";
|
|
293
293
|
/** A single `{ field: "asc" | "desc" }` entry; `orderBy` is an ordered list of these. */
|
|
294
|
-
type OrderByInput = Record<string, SortDirection
|
|
294
|
+
type OrderByInput = Record<string, SortDirection>;
|
|
295
295
|
interface QueryArgs {
|
|
296
296
|
/**
|
|
297
297
|
* Predicate injected by the runtime (e.g. by `@lunora/server`'s RLS
|
|
@@ -341,7 +341,7 @@ interface QueryPage {
|
|
|
341
341
|
splitCursor?: null | string;
|
|
342
342
|
}
|
|
343
343
|
interface OrderKey {
|
|
344
|
-
direction: SortDirection
|
|
344
|
+
direction: SortDirection;
|
|
345
345
|
field: string;
|
|
346
346
|
}
|
|
347
347
|
/**
|
|
@@ -1918,6 +1918,22 @@ declare const readAggregateValue: (op: string, row: {
|
|
|
1918
1918
|
* string.
|
|
1919
1919
|
*/
|
|
1920
1920
|
declare const encodeAggregateKey: (by: ReadonlyArray<string>, source: Record<string, unknown>) => string;
|
|
1921
|
+
/** One recorded admin operation, in monotonic `seq` order. */
|
|
1922
|
+
interface AuditEntry {
|
|
1923
|
+
/** JSON-decoded extra context (the acting user, op-specific counts, …); absent when none was recorded. */
|
|
1924
|
+
detail?: Record<string, unknown>;
|
|
1925
|
+
/** Primary key of the affected row, when the op targets one. */
|
|
1926
|
+
id?: string;
|
|
1927
|
+
/** Short op identifier, e.g. `writeRow` or `runMigration`. */
|
|
1928
|
+
op: string;
|
|
1929
|
+
/** Monotonic per-shard cursor — strictly increasing, never reused. */
|
|
1930
|
+
seq: number;
|
|
1931
|
+
/** Affected table, when the op targets one. */
|
|
1932
|
+
table?: string;
|
|
1933
|
+
/** Wall-clock millis when the op was recorded. */
|
|
1934
|
+
ts: number;
|
|
1935
|
+
}
|
|
1936
|
+
/** Fields accepted when appending one audit entry; `seq` is assigned by the table. */
|
|
1921
1937
|
/** Reserved single-row auth accumulator table. Auto-hidden from the data browser by the `__lunora` prefix. */
|
|
1922
1938
|
declare const AUTH_METRICS_TABLE = "__lunora_auth_metrics";
|
|
1923
1939
|
/** Reserved coarse time-series table: app-wide auth attempt/failure counts bucketed by a fixed window. */
|
|
@@ -2234,30 +2250,6 @@ interface TableInfo {
|
|
|
2234
2250
|
name: string;
|
|
2235
2251
|
rowCount: number;
|
|
2236
2252
|
}
|
|
2237
|
-
/**
|
|
2238
|
-
* One recorded admin operation served by `__lunora_admin__:getAuditLog`, sourced
|
|
2239
|
-
* from the reserved `__lunora_audit__` table (see `audit-log.ts`). Unlike the
|
|
2240
|
-
* in-memory `getMetrics`/`getFunctionStats` counters, the audit log is durable —
|
|
2241
|
-
* it survives hibernation/restart and is bounded only by a retention cap. `seq`
|
|
2242
|
-
* is a monotonic per-shard cursor the studio pages through; `op` is the short
|
|
2243
|
-
* op name (`writeRow`, `runMigration`, `importShard`, `applyCdc`); `table`/`id`
|
|
2244
|
-
* are present when the op targets one; `detail` carries op-specific context
|
|
2245
|
-
* (notably the acting `userId`).
|
|
2246
|
-
*/
|
|
2247
|
-
interface AuditEntry {
|
|
2248
|
-
/** JSON extra context (acting user, op-specific counts, …); absent when none was recorded. */
|
|
2249
|
-
detail?: Record<string, unknown>;
|
|
2250
|
-
/** Primary key of the affected row, when the op targets one. */
|
|
2251
|
-
id?: string;
|
|
2252
|
-
/** Short op identifier, e.g. `writeRow`. */
|
|
2253
|
-
op: string;
|
|
2254
|
-
/** Monotonic per-shard cursor — strictly increasing, never reused. */
|
|
2255
|
-
seq: number;
|
|
2256
|
-
/** Affected table, when the op targets one. */
|
|
2257
|
-
table?: string;
|
|
2258
|
-
/** Epoch-ms the op was recorded. */
|
|
2259
|
-
ts: number;
|
|
2260
|
-
}
|
|
2261
2253
|
/** Payload of a `__lunora_admin__:getAuditLog` call: the recorded entries, newest first. */
|
|
2262
2254
|
interface AuditLogResult {
|
|
2263
2255
|
entries: AuditEntry[];
|
|
@@ -2633,8 +2625,6 @@ interface FilterClause {
|
|
|
2633
2625
|
operator: FilterOperator;
|
|
2634
2626
|
value?: unknown;
|
|
2635
2627
|
}
|
|
2636
|
-
/** Sort direction for an {@link OrderByClause}. */
|
|
2637
|
-
type SortDirection = "asc" | "desc";
|
|
2638
2628
|
/**
|
|
2639
2629
|
* A server-side sort over one displayed column. `column` resolves the same way a
|
|
2640
2630
|
* {@link FilterClause}'s does — a physical/meta column orders by its identifier, a
|
|
@@ -5596,4 +5586,4 @@ interface WhereSqlStrategy {
|
|
|
5596
5586
|
* `undefined` when the input imposes no constraint (empty `where`).
|
|
5597
5587
|
*/
|
|
5598
5588
|
declare const compileWhereSql: (where: WhereInput | undefined, strategy: WhereSqlStrategy) => SQL | undefined;
|
|
5599
|
-
export { ADMIN_FUNCTIONS, ADMIN_FUNCTION_PREFIX, AGGREGATE_SQL_FUNCTION, AUTH_METRICS_BUCKETS_TABLE, AUTH_METRICS_BUCKET_MS, AUTH_METRICS_BUCKET_RETENTION, AUTH_METRICS_TABLE, type AdvisoriesResult, type AdvisoryFinding, type AggregateIndexDefinitionLike, type AggregateOp, type AggregateOptions, type AggregateResult, type AggregateTally, type ApplyOnDeleteOptions, type AuditEntry, type AuditLogResult, type AuthMetrics, type AuthMetricsBucket, type BroadcastDelta, CDC_LOG_TABLE, type CacheEntry, type CapturedMailRow, type CdcChange, type Clock, type ColumnMeta, type ColumnMetaLike, ConflictError, type CountArgs, CountRlsUnsupportedError, type CtxDbOptions, DATA_MIGRATION_STATE_TABLE, DEFAULT_MAX_RELATION_KEYS, type DataMigrationDocument, type DataMigrationLike, type DataMigrationTransform, type DatabaseWriterLike, type DependencyTracker, type DeployInfo, type ExportRow, type ExportShardAdminArgs, type ExportShardArgs, FUNCTION_METRICS_BUCKETS_TABLE, FUNCTION_METRICS_BUCKET_MS, FUNCTION_METRICS_BUCKET_RETENTION, FUNCTION_METRICS_INDEX_TABLE, FUNCTION_METRICS_TABLE, type FacetColumnOptions, type FacetColumnResult, type FacetValue, type FieldOperators, type FunctionCallStat, type FunctionMetricBucket, type FunctionMetricIndexHit, type FunctionStatsResult, type GroupByEntry, type GroupByOptions, type HibernatableWebSocket, type IdGenerator, type ImportError, type ImportShardAdminArgs, type ImportShardArgs, type ImportShardResult, type IndexDefinitionLike, type IndexRangeBuilderLike, LogBuffer, type LogEntry, type LogEventInput, type LogLevel, type LogSink, MAIL_RETENTION, MAIL_TABLE, MAX_SQL_ROWS, MIN_ADMIN_TOKEN_LENGTH, MIN_AUTH_SECRET_LENGTH, type MaskColumnMetadata, type MaskPoliciesResult, type MigrationDirection, type MigrationRunResult, type MigrationStatus, type MigrationStatusRow, type MutationDelta, type NestedWith, NotFoundError, NotUniqueError, type OnDeleteActionLike, type OrderByInput, type OrderKey, type PaginationOptions, type PitrBookmarkResult, type PitrRestoreArgs, type PitrRestoreResult, type PitrStorage, type QueryArgs, type QueryPage, RANK_TIEBREAK, RELATION_FUNCTION_PREFIX, RLS_UNWRAP_SYMBOL, ROOT_DO_SIZE_WARN_BYTES, ROOT_SHARD_NAME, type RankDirection, type RankIndexDefinitionLike, type RankOptions, type RankPage, type RankPageOptions, type RankPageRow, type RankPageRowKey, type RankResult, type RankSortKeyLike, ReactiveCache, type ReactiveCacheOptions, type ReadHook, type ReadTablePageOptions, type RecordAuthEventInput, type RecordFunctionMetricInput, type RecordMailInput, type RelationDefinitionLike, type RenderedSql, type ResolveRelationPredicatesOptions, type ResolveWithOptions, type RestrictableQueryOptions, type RlsPoliciesResult, type RlsPolicyMetadata, RlsRequiredError, type RlsRoleMetadata, type RpcRequest, type RunDataMigrationOptions, type RunShardApplyCdcArgs, type RunShardApplyCdcResult, type RunShardBulkDeleteArgs, type RunShardBulkDeleteResult, type RunShardExportArgs, type RunShardImportArgs, type RunShardMigrationArgs, type RunShardRankBeforeArgs, type RunShardRankPageArgs, type RunShardWriteArgs, type RunShardWriteResult, type RunTriggersOptions, SCAN_DEP, SESSION_DO_TTL_DEFAULT, SHARD_REGISTRY_DO_NAME, type ScheduledFunctionDoc, type SchedulerLike, type SchemaLike, type SearchFilterBuilderLike, type SecurityAuditResult, type SecurityFinding, type SecurityFindingKind, type SecurityFindingLevel, type SelectMatchingIdsOptions, type ServerDefaultContextLike, SessionDO, type SessionRecord, type SettingEntry, type SettingKind, type SettingsResult, ShardDO, type ShardDOOptions, type ShardDOState, type ShardRankPageResult, ShardRegistryDO, type SocketAttachment, type SortDirection
|
|
5589
|
+
export { ADMIN_FUNCTIONS, ADMIN_FUNCTION_PREFIX, AGGREGATE_SQL_FUNCTION, AUTH_METRICS_BUCKETS_TABLE, AUTH_METRICS_BUCKET_MS, AUTH_METRICS_BUCKET_RETENTION, AUTH_METRICS_TABLE, type AdvisoriesResult, type AdvisoryFinding, type AggregateIndexDefinitionLike, type AggregateOp, type AggregateOptions, type AggregateResult, type AggregateTally, type ApplyOnDeleteOptions, type AuditEntry, type AuditLogResult, type AuthMetrics, type AuthMetricsBucket, type BroadcastDelta, CDC_LOG_TABLE, type CacheEntry, type CapturedMailRow, type CdcChange, type Clock, type ColumnMeta, type ColumnMetaLike, ConflictError, type CountArgs, CountRlsUnsupportedError, type CtxDbOptions, DATA_MIGRATION_STATE_TABLE, DEFAULT_MAX_RELATION_KEYS, type DataMigrationDocument, type DataMigrationLike, type DataMigrationTransform, type DatabaseWriterLike, type DependencyTracker, type DeployInfo, type ExportRow, type ExportShardAdminArgs, type ExportShardArgs, FUNCTION_METRICS_BUCKETS_TABLE, FUNCTION_METRICS_BUCKET_MS, FUNCTION_METRICS_BUCKET_RETENTION, FUNCTION_METRICS_INDEX_TABLE, FUNCTION_METRICS_TABLE, type FacetColumnOptions, type FacetColumnResult, type FacetValue, type FieldOperators, type FunctionCallStat, type FunctionMetricBucket, type FunctionMetricIndexHit, type FunctionStatsResult, type GroupByEntry, type GroupByOptions, type HibernatableWebSocket, type IdGenerator, type ImportError, type ImportShardAdminArgs, type ImportShardArgs, type ImportShardResult, type IndexDefinitionLike, type IndexRangeBuilderLike, LogBuffer, type LogEntry, type LogEventInput, type LogLevel, type LogSink, MAIL_RETENTION, MAIL_TABLE, MAX_SQL_ROWS, MIN_ADMIN_TOKEN_LENGTH, MIN_AUTH_SECRET_LENGTH, type MaskColumnMetadata, type MaskPoliciesResult, type MigrationDirection, type MigrationRunResult, type MigrationStatus, type MigrationStatusRow, type MutationDelta, type NestedWith, NotFoundError, NotUniqueError, type OnDeleteActionLike, type OrderByInput, type OrderKey, type PaginationOptions, type PitrBookmarkResult, type PitrRestoreArgs, type PitrRestoreResult, type PitrStorage, type QueryArgs, type QueryPage, RANK_TIEBREAK, RELATION_FUNCTION_PREFIX, RLS_UNWRAP_SYMBOL, ROOT_DO_SIZE_WARN_BYTES, ROOT_SHARD_NAME, type RankDirection, type RankIndexDefinitionLike, type RankOptions, type RankPage, type RankPageOptions, type RankPageRow, type RankPageRowKey, type RankResult, type RankSortKeyLike, ReactiveCache, type ReactiveCacheOptions, type ReadHook, type ReadTablePageOptions, type RecordAuthEventInput, type RecordFunctionMetricInput, type RecordMailInput, type RelationDefinitionLike, type RenderedSql, type ResolveRelationPredicatesOptions, type ResolveWithOptions, type RestrictableQueryOptions, type RlsPoliciesResult, type RlsPolicyMetadata, RlsRequiredError, type RlsRoleMetadata, type RpcRequest, type RunDataMigrationOptions, type RunShardApplyCdcArgs, type RunShardApplyCdcResult, type RunShardBulkDeleteArgs, type RunShardBulkDeleteResult, type RunShardExportArgs, type RunShardImportArgs, type RunShardMigrationArgs, type RunShardRankBeforeArgs, type RunShardRankPageArgs, type RunShardWriteArgs, type RunShardWriteResult, type RunTriggersOptions, SCAN_DEP, SESSION_DO_TTL_DEFAULT, SHARD_REGISTRY_DO_NAME, type ScheduledFunctionDoc, type SchedulerLike, type SchemaLike, type SearchFilterBuilderLike, type SecurityAuditResult, type SecurityFinding, type SecurityFindingKind, type SecurityFindingLevel, type SelectMatchingIdsOptions, type ServerDefaultContextLike, SessionDO, type SessionRecord, type SettingEntry, type SettingKind, type SettingsResult, ShardDO, type ShardDOOptions, type ShardDOState, type ShardRankPageResult, ShardRegistryDO, type SocketAttachment, type SortDirection, type SqlConsoleResult, type SqlCursor, type SqlEngine, type SqlExec, type StorageRuleMetadata, type StorageRulesResult, type StudioFeaturesResult, type SubscriptionEnvelope, type SubscriptionOutcome, type SubscriptionQuery, type SystemDatabaseReader, type SystemDoc, type SystemQuery, type SystemReaderOptions, type SystemReaderSchedulerLike, type SystemReaderStorageLike, type SystemTableName, type TableColumnsResult, type TableDefinitionLike, type TableIndexInfo, type TableIndexesResult, type TableInfo, type TablePage, type TableReaderLike, type TablesColumnsResult, type TransactionSqlLike, type TriggerContextLike, type TriggerDefinitionLike, type TriggerEventLike, type TriggerOpLike, type TriggerTimingLike, type ValidatorLike, type WhereInput, type WhereSqlStrategy, type WithInput, type WorkflowMetadata, type WorkflowsResult, type WriteEvent, type WriteHook, aggregateSqlFunction, aggregateTableName, applyCdcChanges, applyOnDelete, armRestore, assertFlatPredicate, assertReadonly, assertValidClientId, backfillAggregateIndexes, backfillRankIndexes, buildFtsMatch, buildSecurityAudit, buildSeekWhere, clearCapturedMail, coerceAggregateNumber, compileWhereSql, containsRelationPredicate, createDependencyTracker, createShardCtxDb, createSystemReader, decodeCursor, depKey, encodeAggregateKey, encodeCursor, encodePartitionKey, ensureAuthMetricsTables, ensureFunctionMetricsTables, ensureMailTable, exportShardRows, exportShardTable, facetColumn, foldAggregateTally, ftsTableName, guardWriter, hasTrigger, importShardRows, isRelationPredicate, listTables, matchesRankStaticWhere, matchesStaticWhere, mergeWhere, normalizeCountArgument, normalizeIdStructurally, normalizeOrderKeys, parseExportShardArgs, parseImportShardArgs, planAggregateLookup, rankTableName, reactiveCacheKey, readAggregateValue, readAuthMetrics, readBookmark, readCapturedMail, readCdcChanges, readFunctionMetricBuckets, readFunctionMetricIndexHits, readFunctionMetrics, readFunctionMetricsTotals, readMigrationStatus, readTablePage, recordAuthEvent, recordCapturedMail, recordFunctionMetric, renderSql, resolveRankPartition, resolveRelationPredicates, resolveWith, runDataMigration, runReadonlySql, runRowValidators, runShardMigrations, runTriggers, scoreDocument, selectExportTables, selectIndexForAggregate, selectIndexForCount, selectIndexForGroupBy, selectMatchingIds, serveRelationFanout, sortColumnName, stableStringify, stringifySearchText, subscriptionListDeltas, throwingScheduler, tokenizeSearch, trimCdcChanges, validateImportRow };
|
package/dist/index.d.ts
CHANGED
|
@@ -289,9 +289,9 @@ declare const applyOnDelete: (options: ApplyOnDeleteOptions) => Promise<void>;
|
|
|
289
289
|
* fakes (which never carry a runtime parser) keep working.
|
|
290
290
|
*/
|
|
291
291
|
declare const runRowValidators: (definition: TableDefinitionLike, document: Record<string, unknown>) => void;
|
|
292
|
-
type SortDirection
|
|
292
|
+
type SortDirection = "asc" | "desc";
|
|
293
293
|
/** A single `{ field: "asc" | "desc" }` entry; `orderBy` is an ordered list of these. */
|
|
294
|
-
type OrderByInput = Record<string, SortDirection
|
|
294
|
+
type OrderByInput = Record<string, SortDirection>;
|
|
295
295
|
interface QueryArgs {
|
|
296
296
|
/**
|
|
297
297
|
* Predicate injected by the runtime (e.g. by `@lunora/server`'s RLS
|
|
@@ -341,7 +341,7 @@ interface QueryPage {
|
|
|
341
341
|
splitCursor?: null | string;
|
|
342
342
|
}
|
|
343
343
|
interface OrderKey {
|
|
344
|
-
direction: SortDirection
|
|
344
|
+
direction: SortDirection;
|
|
345
345
|
field: string;
|
|
346
346
|
}
|
|
347
347
|
/**
|
|
@@ -1918,6 +1918,22 @@ declare const readAggregateValue: (op: string, row: {
|
|
|
1918
1918
|
* string.
|
|
1919
1919
|
*/
|
|
1920
1920
|
declare const encodeAggregateKey: (by: ReadonlyArray<string>, source: Record<string, unknown>) => string;
|
|
1921
|
+
/** One recorded admin operation, in monotonic `seq` order. */
|
|
1922
|
+
interface AuditEntry {
|
|
1923
|
+
/** JSON-decoded extra context (the acting user, op-specific counts, …); absent when none was recorded. */
|
|
1924
|
+
detail?: Record<string, unknown>;
|
|
1925
|
+
/** Primary key of the affected row, when the op targets one. */
|
|
1926
|
+
id?: string;
|
|
1927
|
+
/** Short op identifier, e.g. `writeRow` or `runMigration`. */
|
|
1928
|
+
op: string;
|
|
1929
|
+
/** Monotonic per-shard cursor — strictly increasing, never reused. */
|
|
1930
|
+
seq: number;
|
|
1931
|
+
/** Affected table, when the op targets one. */
|
|
1932
|
+
table?: string;
|
|
1933
|
+
/** Wall-clock millis when the op was recorded. */
|
|
1934
|
+
ts: number;
|
|
1935
|
+
}
|
|
1936
|
+
/** Fields accepted when appending one audit entry; `seq` is assigned by the table. */
|
|
1921
1937
|
/** Reserved single-row auth accumulator table. Auto-hidden from the data browser by the `__lunora` prefix. */
|
|
1922
1938
|
declare const AUTH_METRICS_TABLE = "__lunora_auth_metrics";
|
|
1923
1939
|
/** Reserved coarse time-series table: app-wide auth attempt/failure counts bucketed by a fixed window. */
|
|
@@ -2234,30 +2250,6 @@ interface TableInfo {
|
|
|
2234
2250
|
name: string;
|
|
2235
2251
|
rowCount: number;
|
|
2236
2252
|
}
|
|
2237
|
-
/**
|
|
2238
|
-
* One recorded admin operation served by `__lunora_admin__:getAuditLog`, sourced
|
|
2239
|
-
* from the reserved `__lunora_audit__` table (see `audit-log.ts`). Unlike the
|
|
2240
|
-
* in-memory `getMetrics`/`getFunctionStats` counters, the audit log is durable —
|
|
2241
|
-
* it survives hibernation/restart and is bounded only by a retention cap. `seq`
|
|
2242
|
-
* is a monotonic per-shard cursor the studio pages through; `op` is the short
|
|
2243
|
-
* op name (`writeRow`, `runMigration`, `importShard`, `applyCdc`); `table`/`id`
|
|
2244
|
-
* are present when the op targets one; `detail` carries op-specific context
|
|
2245
|
-
* (notably the acting `userId`).
|
|
2246
|
-
*/
|
|
2247
|
-
interface AuditEntry {
|
|
2248
|
-
/** JSON extra context (acting user, op-specific counts, …); absent when none was recorded. */
|
|
2249
|
-
detail?: Record<string, unknown>;
|
|
2250
|
-
/** Primary key of the affected row, when the op targets one. */
|
|
2251
|
-
id?: string;
|
|
2252
|
-
/** Short op identifier, e.g. `writeRow`. */
|
|
2253
|
-
op: string;
|
|
2254
|
-
/** Monotonic per-shard cursor — strictly increasing, never reused. */
|
|
2255
|
-
seq: number;
|
|
2256
|
-
/** Affected table, when the op targets one. */
|
|
2257
|
-
table?: string;
|
|
2258
|
-
/** Epoch-ms the op was recorded. */
|
|
2259
|
-
ts: number;
|
|
2260
|
-
}
|
|
2261
2253
|
/** Payload of a `__lunora_admin__:getAuditLog` call: the recorded entries, newest first. */
|
|
2262
2254
|
interface AuditLogResult {
|
|
2263
2255
|
entries: AuditEntry[];
|
|
@@ -2633,8 +2625,6 @@ interface FilterClause {
|
|
|
2633
2625
|
operator: FilterOperator;
|
|
2634
2626
|
value?: unknown;
|
|
2635
2627
|
}
|
|
2636
|
-
/** Sort direction for an {@link OrderByClause}. */
|
|
2637
|
-
type SortDirection = "asc" | "desc";
|
|
2638
2628
|
/**
|
|
2639
2629
|
* A server-side sort over one displayed column. `column` resolves the same way a
|
|
2640
2630
|
* {@link FilterClause}'s does — a physical/meta column orders by its identifier, a
|
|
@@ -5596,4 +5586,4 @@ interface WhereSqlStrategy {
|
|
|
5596
5586
|
* `undefined` when the input imposes no constraint (empty `where`).
|
|
5597
5587
|
*/
|
|
5598
5588
|
declare const compileWhereSql: (where: WhereInput | undefined, strategy: WhereSqlStrategy) => SQL | undefined;
|
|
5599
|
-
export { ADMIN_FUNCTIONS, ADMIN_FUNCTION_PREFIX, AGGREGATE_SQL_FUNCTION, AUTH_METRICS_BUCKETS_TABLE, AUTH_METRICS_BUCKET_MS, AUTH_METRICS_BUCKET_RETENTION, AUTH_METRICS_TABLE, type AdvisoriesResult, type AdvisoryFinding, type AggregateIndexDefinitionLike, type AggregateOp, type AggregateOptions, type AggregateResult, type AggregateTally, type ApplyOnDeleteOptions, type AuditEntry, type AuditLogResult, type AuthMetrics, type AuthMetricsBucket, type BroadcastDelta, CDC_LOG_TABLE, type CacheEntry, type CapturedMailRow, type CdcChange, type Clock, type ColumnMeta, type ColumnMetaLike, ConflictError, type CountArgs, CountRlsUnsupportedError, type CtxDbOptions, DATA_MIGRATION_STATE_TABLE, DEFAULT_MAX_RELATION_KEYS, type DataMigrationDocument, type DataMigrationLike, type DataMigrationTransform, type DatabaseWriterLike, type DependencyTracker, type DeployInfo, type ExportRow, type ExportShardAdminArgs, type ExportShardArgs, FUNCTION_METRICS_BUCKETS_TABLE, FUNCTION_METRICS_BUCKET_MS, FUNCTION_METRICS_BUCKET_RETENTION, FUNCTION_METRICS_INDEX_TABLE, FUNCTION_METRICS_TABLE, type FacetColumnOptions, type FacetColumnResult, type FacetValue, type FieldOperators, type FunctionCallStat, type FunctionMetricBucket, type FunctionMetricIndexHit, type FunctionStatsResult, type GroupByEntry, type GroupByOptions, type HibernatableWebSocket, type IdGenerator, type ImportError, type ImportShardAdminArgs, type ImportShardArgs, type ImportShardResult, type IndexDefinitionLike, type IndexRangeBuilderLike, LogBuffer, type LogEntry, type LogEventInput, type LogLevel, type LogSink, MAIL_RETENTION, MAIL_TABLE, MAX_SQL_ROWS, MIN_ADMIN_TOKEN_LENGTH, MIN_AUTH_SECRET_LENGTH, type MaskColumnMetadata, type MaskPoliciesResult, type MigrationDirection, type MigrationRunResult, type MigrationStatus, type MigrationStatusRow, type MutationDelta, type NestedWith, NotFoundError, NotUniqueError, type OnDeleteActionLike, type OrderByInput, type OrderKey, type PaginationOptions, type PitrBookmarkResult, type PitrRestoreArgs, type PitrRestoreResult, type PitrStorage, type QueryArgs, type QueryPage, RANK_TIEBREAK, RELATION_FUNCTION_PREFIX, RLS_UNWRAP_SYMBOL, ROOT_DO_SIZE_WARN_BYTES, ROOT_SHARD_NAME, type RankDirection, type RankIndexDefinitionLike, type RankOptions, type RankPage, type RankPageOptions, type RankPageRow, type RankPageRowKey, type RankResult, type RankSortKeyLike, ReactiveCache, type ReactiveCacheOptions, type ReadHook, type ReadTablePageOptions, type RecordAuthEventInput, type RecordFunctionMetricInput, type RecordMailInput, type RelationDefinitionLike, type RenderedSql, type ResolveRelationPredicatesOptions, type ResolveWithOptions, type RestrictableQueryOptions, type RlsPoliciesResult, type RlsPolicyMetadata, RlsRequiredError, type RlsRoleMetadata, type RpcRequest, type RunDataMigrationOptions, type RunShardApplyCdcArgs, type RunShardApplyCdcResult, type RunShardBulkDeleteArgs, type RunShardBulkDeleteResult, type RunShardExportArgs, type RunShardImportArgs, type RunShardMigrationArgs, type RunShardRankBeforeArgs, type RunShardRankPageArgs, type RunShardWriteArgs, type RunShardWriteResult, type RunTriggersOptions, SCAN_DEP, SESSION_DO_TTL_DEFAULT, SHARD_REGISTRY_DO_NAME, type ScheduledFunctionDoc, type SchedulerLike, type SchemaLike, type SearchFilterBuilderLike, type SecurityAuditResult, type SecurityFinding, type SecurityFindingKind, type SecurityFindingLevel, type SelectMatchingIdsOptions, type ServerDefaultContextLike, SessionDO, type SessionRecord, type SettingEntry, type SettingKind, type SettingsResult, ShardDO, type ShardDOOptions, type ShardDOState, type ShardRankPageResult, ShardRegistryDO, type SocketAttachment, type SortDirection
|
|
5589
|
+
export { ADMIN_FUNCTIONS, ADMIN_FUNCTION_PREFIX, AGGREGATE_SQL_FUNCTION, AUTH_METRICS_BUCKETS_TABLE, AUTH_METRICS_BUCKET_MS, AUTH_METRICS_BUCKET_RETENTION, AUTH_METRICS_TABLE, type AdvisoriesResult, type AdvisoryFinding, type AggregateIndexDefinitionLike, type AggregateOp, type AggregateOptions, type AggregateResult, type AggregateTally, type ApplyOnDeleteOptions, type AuditEntry, type AuditLogResult, type AuthMetrics, type AuthMetricsBucket, type BroadcastDelta, CDC_LOG_TABLE, type CacheEntry, type CapturedMailRow, type CdcChange, type Clock, type ColumnMeta, type ColumnMetaLike, ConflictError, type CountArgs, CountRlsUnsupportedError, type CtxDbOptions, DATA_MIGRATION_STATE_TABLE, DEFAULT_MAX_RELATION_KEYS, type DataMigrationDocument, type DataMigrationLike, type DataMigrationTransform, type DatabaseWriterLike, type DependencyTracker, type DeployInfo, type ExportRow, type ExportShardAdminArgs, type ExportShardArgs, FUNCTION_METRICS_BUCKETS_TABLE, FUNCTION_METRICS_BUCKET_MS, FUNCTION_METRICS_BUCKET_RETENTION, FUNCTION_METRICS_INDEX_TABLE, FUNCTION_METRICS_TABLE, type FacetColumnOptions, type FacetColumnResult, type FacetValue, type FieldOperators, type FunctionCallStat, type FunctionMetricBucket, type FunctionMetricIndexHit, type FunctionStatsResult, type GroupByEntry, type GroupByOptions, type HibernatableWebSocket, type IdGenerator, type ImportError, type ImportShardAdminArgs, type ImportShardArgs, type ImportShardResult, type IndexDefinitionLike, type IndexRangeBuilderLike, LogBuffer, type LogEntry, type LogEventInput, type LogLevel, type LogSink, MAIL_RETENTION, MAIL_TABLE, MAX_SQL_ROWS, MIN_ADMIN_TOKEN_LENGTH, MIN_AUTH_SECRET_LENGTH, type MaskColumnMetadata, type MaskPoliciesResult, type MigrationDirection, type MigrationRunResult, type MigrationStatus, type MigrationStatusRow, type MutationDelta, type NestedWith, NotFoundError, NotUniqueError, type OnDeleteActionLike, type OrderByInput, type OrderKey, type PaginationOptions, type PitrBookmarkResult, type PitrRestoreArgs, type PitrRestoreResult, type PitrStorage, type QueryArgs, type QueryPage, RANK_TIEBREAK, RELATION_FUNCTION_PREFIX, RLS_UNWRAP_SYMBOL, ROOT_DO_SIZE_WARN_BYTES, ROOT_SHARD_NAME, type RankDirection, type RankIndexDefinitionLike, type RankOptions, type RankPage, type RankPageOptions, type RankPageRow, type RankPageRowKey, type RankResult, type RankSortKeyLike, ReactiveCache, type ReactiveCacheOptions, type ReadHook, type ReadTablePageOptions, type RecordAuthEventInput, type RecordFunctionMetricInput, type RecordMailInput, type RelationDefinitionLike, type RenderedSql, type ResolveRelationPredicatesOptions, type ResolveWithOptions, type RestrictableQueryOptions, type RlsPoliciesResult, type RlsPolicyMetadata, RlsRequiredError, type RlsRoleMetadata, type RpcRequest, type RunDataMigrationOptions, type RunShardApplyCdcArgs, type RunShardApplyCdcResult, type RunShardBulkDeleteArgs, type RunShardBulkDeleteResult, type RunShardExportArgs, type RunShardImportArgs, type RunShardMigrationArgs, type RunShardRankBeforeArgs, type RunShardRankPageArgs, type RunShardWriteArgs, type RunShardWriteResult, type RunTriggersOptions, SCAN_DEP, SESSION_DO_TTL_DEFAULT, SHARD_REGISTRY_DO_NAME, type ScheduledFunctionDoc, type SchedulerLike, type SchemaLike, type SearchFilterBuilderLike, type SecurityAuditResult, type SecurityFinding, type SecurityFindingKind, type SecurityFindingLevel, type SelectMatchingIdsOptions, type ServerDefaultContextLike, SessionDO, type SessionRecord, type SettingEntry, type SettingKind, type SettingsResult, ShardDO, type ShardDOOptions, type ShardDOState, type ShardRankPageResult, ShardRegistryDO, type SocketAttachment, type SortDirection, type SqlConsoleResult, type SqlCursor, type SqlEngine, type SqlExec, type StorageRuleMetadata, type StorageRulesResult, type StudioFeaturesResult, type SubscriptionEnvelope, type SubscriptionOutcome, type SubscriptionQuery, type SystemDatabaseReader, type SystemDoc, type SystemQuery, type SystemReaderOptions, type SystemReaderSchedulerLike, type SystemReaderStorageLike, type SystemTableName, type TableColumnsResult, type TableDefinitionLike, type TableIndexInfo, type TableIndexesResult, type TableInfo, type TablePage, type TableReaderLike, type TablesColumnsResult, type TransactionSqlLike, type TriggerContextLike, type TriggerDefinitionLike, type TriggerEventLike, type TriggerOpLike, type TriggerTimingLike, type ValidatorLike, type WhereInput, type WhereSqlStrategy, type WithInput, type WorkflowMetadata, type WorkflowsResult, type WriteEvent, type WriteHook, aggregateSqlFunction, aggregateTableName, applyCdcChanges, applyOnDelete, armRestore, assertFlatPredicate, assertReadonly, assertValidClientId, backfillAggregateIndexes, backfillRankIndexes, buildFtsMatch, buildSecurityAudit, buildSeekWhere, clearCapturedMail, coerceAggregateNumber, compileWhereSql, containsRelationPredicate, createDependencyTracker, createShardCtxDb, createSystemReader, decodeCursor, depKey, encodeAggregateKey, encodeCursor, encodePartitionKey, ensureAuthMetricsTables, ensureFunctionMetricsTables, ensureMailTable, exportShardRows, exportShardTable, facetColumn, foldAggregateTally, ftsTableName, guardWriter, hasTrigger, importShardRows, isRelationPredicate, listTables, matchesRankStaticWhere, matchesStaticWhere, mergeWhere, normalizeCountArgument, normalizeIdStructurally, normalizeOrderKeys, parseExportShardArgs, parseImportShardArgs, planAggregateLookup, rankTableName, reactiveCacheKey, readAggregateValue, readAuthMetrics, readBookmark, readCapturedMail, readCdcChanges, readFunctionMetricBuckets, readFunctionMetricIndexHits, readFunctionMetrics, readFunctionMetricsTotals, readMigrationStatus, readTablePage, recordAuthEvent, recordCapturedMail, recordFunctionMetric, renderSql, resolveRankPartition, resolveRelationPredicates, resolveWith, runDataMigration, runReadonlySql, runRowValidators, runShardMigrations, runTriggers, scoreDocument, selectExportTables, selectIndexForAggregate, selectIndexForCount, selectIndexForGroupBy, selectMatchingIds, serveRelationFanout, sortColumnName, stableStringify, stringifySearchText, subscriptionListDeltas, throwingScheduler, tokenizeSearch, trimCdcChanges, validateImportRow };
|
package/dist/index.mjs
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
export { exportShardRows, exportShardTable, importShardRows, parseExportShardArgs, parseImportShardArgs, selectExportTables, validateImportRow } from './packem_shared/exportShardRows-DZEhUeyI.mjs';
|
|
2
|
-
export { AGGREGATE_SQL_FUNCTION, aggregateSqlFunction, matchesStaticWhere, normalizeCountArgument, throwingScheduler } from './packem_shared/
|
|
2
|
+
export { AGGREGATE_SQL_FUNCTION, aggregateSqlFunction, matchesStaticWhere, normalizeCountArgument, throwingScheduler } from './packem_shared/AGGREGATE_SQL_FUNCTION-CFk6adSu.mjs';
|
|
3
3
|
export { aggregateTableName, coerceAggregateNumber, encodeAggregateKey, foldAggregateTally, readAggregateValue } from './packem_shared/aggregateTableName-CxNqY1Sl.mjs';
|
|
4
4
|
export { CountRlsUnsupportedError, mergeWhere, planAggregateLookup, selectIndexForAggregate, selectIndexForCount, selectIndexForGroupBy } from './packem_shared/CountRlsUnsupportedError-28ZvvwKS.mjs';
|
|
5
|
-
export { AUTH_METRICS_BUCKETS_TABLE, AUTH_METRICS_BUCKET_MS, AUTH_METRICS_BUCKET_RETENTION, AUTH_METRICS_TABLE, ensureAuthMetricsTables, readAuthMetrics, recordAuthEvent } from './packem_shared/
|
|
6
|
-
export { NotUniqueError, assertValidClientId, createShardCtxDb, normalizeIdStructurally } from './packem_shared/
|
|
5
|
+
export { AUTH_METRICS_BUCKETS_TABLE, AUTH_METRICS_BUCKET_MS, AUTH_METRICS_BUCKET_RETENTION, AUTH_METRICS_TABLE, ensureAuthMetricsTables, readAuthMetrics, recordAuthEvent } from './packem_shared/AUTH_METRICS_BUCKETS_TABLE-CiHHYeJi.mjs';
|
|
6
|
+
export { NotUniqueError, assertValidClientId, createShardCtxDb, normalizeIdStructurally } from './packem_shared/NotUniqueError-B6tzuDmM.mjs';
|
|
7
7
|
export { DATA_MIGRATION_STATE_TABLE, readMigrationStatus, runDataMigration } from './packem_shared/DATA_MIGRATION_STATE_TABLE-PTtTiQ7U.mjs';
|
|
8
8
|
export { SCAN_DEP, createDependencyTracker, depKey } from './packem_shared/SCAN_DEP-DLJF8dsj.mjs';
|
|
9
9
|
export { renderSql } from './packem_shared/renderSql-D6eUcn2N.mjs';
|
|
10
|
-
export { FUNCTION_METRICS_BUCKETS_TABLE, FUNCTION_METRICS_BUCKET_MS, FUNCTION_METRICS_BUCKET_RETENTION, FUNCTION_METRICS_INDEX_TABLE, FUNCTION_METRICS_TABLE, ensureFunctionMetricsTables, readFunctionMetricBuckets, readFunctionMetricIndexHits, readFunctionMetrics, readFunctionMetricsTotals, recordFunctionMetric } from './packem_shared/
|
|
11
|
-
export { ADMIN_FUNCTIONS, ADMIN_FUNCTION_PREFIX, RELATION_FUNCTION_PREFIX, facetColumn, listTables, readTablePage, selectMatchingIds } from './packem_shared/
|
|
10
|
+
export { FUNCTION_METRICS_BUCKETS_TABLE, FUNCTION_METRICS_BUCKET_MS, FUNCTION_METRICS_BUCKET_RETENTION, FUNCTION_METRICS_INDEX_TABLE, FUNCTION_METRICS_TABLE, ensureFunctionMetricsTables, readFunctionMetricBuckets, readFunctionMetricIndexHits, readFunctionMetrics, readFunctionMetricsTotals, recordFunctionMetric } from './packem_shared/FUNCTION_METRICS_BUCKETS_TABLE-UDNVD7FS.mjs';
|
|
11
|
+
export { ADMIN_FUNCTIONS, ADMIN_FUNCTION_PREFIX, RELATION_FUNCTION_PREFIX, facetColumn, listTables, readTablePage, selectMatchingIds } from './packem_shared/ADMIN_FUNCTIONS-Dzdqq5J2.mjs';
|
|
12
12
|
export { LogBuffer } from './packem_shared/LogBuffer-B_Ezju_N.mjs';
|
|
13
|
-
export { MAIL_RETENTION, MAIL_TABLE, clearCapturedMail, ensureMailTable, readCapturedMail, recordCapturedMail } from './packem_shared/
|
|
13
|
+
export { MAIL_RETENTION, MAIL_TABLE, clearCapturedMail, ensureMailTable, readCapturedMail, recordCapturedMail } from './packem_shared/MAIL_RETENTION-CPpgl-dX.mjs';
|
|
14
14
|
export { default as NotFoundError } from './packem_shared/NotFoundError-CMuMZt81.mjs';
|
|
15
15
|
export { armRestore, readBookmark } from './packem_shared/armRestore-BJk53Ro8.mjs';
|
|
16
16
|
export { buildSeekWhere, decodeCursor, encodeCursor, normalizeOrderKeys } from './packem_shared/buildSeekWhere-lVsNXSLy.mjs';
|
|
17
17
|
export { R as RANK_TIEBREAK, e as encodePartitionKey, m as matchesRankStaticWhere, r as rankTableName, a as resolveRankPartition, s as sortColumnName } from './packem_shared/rank-CrkEIpF4.mjs';
|
|
18
18
|
export { ReactiveCache, reactiveCacheKey, stableStringify } from './packem_shared/ReactiveCache-ByVzgH3d.mjs';
|
|
19
|
-
export { serveRelationFanout } from './packem_shared/serveRelationFanout-
|
|
20
|
-
export { DEFAULT_MAX_RELATION_KEYS, assertFlatPredicate, containsRelationPredicate, isRelationPredicate, resolveRelationPredicates } from './packem_shared/
|
|
19
|
+
export { serveRelationFanout } from './packem_shared/serveRelationFanout-CFBKWJ8Q.mjs';
|
|
20
|
+
export { DEFAULT_MAX_RELATION_KEYS, assertFlatPredicate, containsRelationPredicate, isRelationPredicate, resolveRelationPredicates } from './packem_shared/DEFAULT_MAX_RELATION_KEYS-DyVYReuT.mjs';
|
|
21
21
|
export { applyOnDelete, resolveWith, runRowValidators } from './packem_shared/applyOnDelete-CMif2RKw.mjs';
|
|
22
|
-
export { RLS_UNWRAP_SYMBOL, RlsRequiredError, guardWriter } from './packem_shared/
|
|
23
|
-
export { buildFtsMatch, ftsTableName, scoreDocument, stringifySearchText, tokenizeSearch } from './packem_shared/
|
|
22
|
+
export { RLS_UNWRAP_SYMBOL, RlsRequiredError, guardWriter } from './packem_shared/RLS_UNWRAP_SYMBOL-u3UlnCH5.mjs';
|
|
23
|
+
export { buildFtsMatch, ftsTableName, scoreDocument, stringifySearchText, tokenizeSearch } from './packem_shared/buildFtsMatch-BLEMawrp.mjs';
|
|
24
24
|
export { M as MIN_ADMIN_TOKEN_LENGTH, a as MIN_AUTH_SECRET_LENGTH, b as buildSecurityAudit } from './packem_shared/security-audit-CucgBice.mjs';
|
|
25
25
|
export { SESSION_DO_TTL_DEFAULT, SessionDO } from './packem_shared/SESSION_DO_TTL_DEFAULT-ilPZsVwu.mjs';
|
|
26
|
-
export { ROOT_DO_SIZE_WARN_BYTES, ROOT_SHARD_NAME, ShardDO, subscriptionListDeltas } from './packem_shared/ROOT_DO_SIZE_WARN_BYTES-
|
|
26
|
+
export { ROOT_DO_SIZE_WARN_BYTES, ROOT_SHARD_NAME, ShardDO, subscriptionListDeltas } from './packem_shared/ROOT_DO_SIZE_WARN_BYTES-3lZ2yigq.mjs';
|
|
27
27
|
export { SHARD_REGISTRY_DO_NAME, ShardRegistryDO } from './packem_shared/SHARD_REGISTRY_DO_NAME-BsAbi5Mn.mjs';
|
|
28
|
-
export { MAX_SQL_ROWS, assertReadonly, runReadonlySql } from './packem_shared/
|
|
28
|
+
export { MAX_SQL_ROWS, assertReadonly, runReadonlySql } from './packem_shared/MAX_SQL_ROWS-dDcFE1YZ.mjs';
|
|
29
29
|
export { createSystemReader } from './packem_shared/createSystemReader-8CzSZP9V.mjs';
|
|
30
30
|
export { ConflictError } from './packem_shared/ConflictError-C0STs6bU.mjs';
|
|
31
|
-
export { hasTrigger, runTriggers } from './packem_shared/
|
|
31
|
+
export { hasTrigger, runTriggers } from './packem_shared/hasTrigger-5N6_Fx0A.mjs';
|
|
32
32
|
export { compileWhereSql } from './packem_shared/compileWhereSql-CXrhFA3G.mjs';
|
|
33
|
-
export { CDC_LOG_TABLE, applyCdcChanges, readCdcChanges, trimCdcChanges } from './packem_shared/
|
|
34
|
-
export { backfillAggregateIndexes, backfillRankIndexes } from './packem_shared/backfillAggregateIndexes-
|
|
35
|
-
export { runShardMigrations } from './packem_shared/runShardMigrations-
|
|
33
|
+
export { CDC_LOG_TABLE, applyCdcChanges, readCdcChanges, trimCdcChanges } from './packem_shared/CDC_LOG_TABLE-Ctdmxmrv.mjs';
|
|
34
|
+
export { backfillAggregateIndexes, backfillRankIndexes } from './packem_shared/backfillAggregateIndexes-BbVPvciS.mjs';
|
|
35
|
+
export { runShardMigrations } from './packem_shared/runShardMigrations-PabobOjF.mjs';
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { sql } from 'drizzle-orm';
|
|
2
|
-
import { matchesStaticWhere, aggregateSqlFunction, normalizeCountArgument, throwingScheduler } from './
|
|
2
|
+
import { matchesStaticWhere, aggregateSqlFunction, normalizeCountArgument, throwingScheduler } from './AGGREGATE_SQL_FUNCTION-CFk6adSu.mjs';
|
|
3
3
|
import { encodeAggregateKey, foldAggregateTally, aggregateTableName, coerceAggregateNumber, readAggregateValue } from './aggregateTableName-CxNqY1Sl.mjs';
|
|
4
4
|
import { mergeWhere, CountRlsUnsupportedError, selectIndexForGroupBy, selectIndexForCount, selectIndexForAggregate } from './CountRlsUnsupportedError-28ZvvwKS.mjs';
|
|
5
|
-
import { appendCdcChange } from './
|
|
6
|
-
export { CDC_LOG_TABLE,
|
|
5
|
+
import { appendCdcChange } from './CDC_LOG_TABLE-Ctdmxmrv.mjs';
|
|
6
|
+
export { CDC_LOG_TABLE, applyCdcChanges, bumpCdcEpoch, minCdcSeq, readCdcChanges, readCdcCursor, readCdcEpoch, trimCdcChanges } from './CDC_LOG_TABLE-Ctdmxmrv.mjs';
|
|
7
7
|
import { r as runDrizzle } from './do-exec-5eQy5cEi.mjs';
|
|
8
8
|
import { i as isFtsAvailable, D as DOC_COLUMN$1, r as rowToDocument, A as AGG_KEY, a as AGG_VALUE, b as AGG_COUNT, d as aggUpsertSql, j as jsonPathSql, q as quoteIdentifier, t as tableColumns, e as qualifiedJsonPathSql } from './do-sql-BCHCWtrD.mjs';
|
|
9
9
|
import { param } from './renderSql-D6eUcn2N.mjs';
|
|
10
10
|
import { s as sortColumnName, m as matchesRankStaticWhere, e as encodePartitionKey, b as serializeSqlValue, r as rankTableName, a as resolveRankPartition, R as RANK_TIEBREAK } from './rank-CrkEIpF4.mjs';
|
|
11
|
-
import { stringifySearchText, ftsTableName, tokenizeSearch, buildFtsMatch, scoreDocument } from './
|
|
11
|
+
import { stringifySearchText, ftsTableName, tokenizeSearch, buildFtsMatch, scoreDocument } from './buildFtsMatch-BLEMawrp.mjs';
|
|
12
12
|
import { SCAN_DEP } from './SCAN_DEP-DLJF8dsj.mjs';
|
|
13
13
|
import { decodeCursor, normalizeOrderKeys, buildSeekWhere, encodeCursor, buildSeekBeforeWhere } from './buildSeekWhere-lVsNXSLy.mjs';
|
|
14
14
|
import NotFoundError from './NotFoundError-CMuMZt81.mjs';
|
|
15
|
-
import { assertFlatPredicate, resolveRelationPredicates } from './
|
|
15
|
+
import { assertFlatPredicate, resolveRelationPredicates } from './DEFAULT_MAX_RELATION_KEYS-DyVYReuT.mjs';
|
|
16
16
|
import { runRowValidators, resolveWith, applyOnDelete } from './applyOnDelete-CMif2RKw.mjs';
|
|
17
|
-
import { guardWriter } from './
|
|
17
|
+
import { guardWriter } from './RLS_UNWRAP_SYMBOL-u3UlnCH5.mjs';
|
|
18
18
|
import { createSystemReader } from './createSystemReader-8CzSZP9V.mjs';
|
|
19
19
|
import { ConflictError } from './ConflictError-C0STs6bU.mjs';
|
|
20
|
-
import { runTriggers } from './
|
|
20
|
+
import { runTriggers } from './hasTrigger-5N6_Fx0A.mjs';
|
|
21
21
|
import { compileWhereSql } from './compileWhereSql-CXrhFA3G.mjs';
|
|
22
|
-
export { backfillAggregateIndexes, backfillRankIndexes } from './backfillAggregateIndexes-
|
|
23
|
-
export { I as IDEMPOTENCY_TABLE,
|
|
24
|
-
export { runShardMigrations } from './runShardMigrations-
|
|
22
|
+
export { backfillAggregateIndexes, backfillRankIndexes } from './backfillAggregateIndexes-BbVPvciS.mjs';
|
|
23
|
+
export { I as IDEMPOTENCY_TABLE, r as readIdempotent, t as trimIdempotent, w as writeIdempotent } from './ctx-db-idempotency-DkC9rP91.mjs';
|
|
24
|
+
export { runShardMigrations } from './runShardMigrations-PabobOjF.mjs';
|
|
25
25
|
|
|
26
26
|
const rankIndexFieldsUnchanged = (index, previous, next) => {
|
|
27
27
|
const fields = [...index.partitionBy ?? [], ...index.sortBy.map((key) => key.field), ...index.where ? Object.keys(index.where) : []];
|
|
@@ -1742,4 +1742,4 @@ const createShardCtxDb = (options) => {
|
|
|
1742
1742
|
return options.enforceRls === true ? guardWriter(writer, schema, (id, expectedTable) => locateRowById(id, expectedTable)?.tableName) : writer;
|
|
1743
1743
|
};
|
|
1744
1744
|
|
|
1745
|
-
export { NotUniqueError,
|
|
1745
|
+
export { NotUniqueError, assertValidClientId, createShardCtxDb, normalizeIdStructurally };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { drizzle } from 'drizzle-orm/durable-sqlite';
|
|
2
2
|
import { parseExportShardArgs, parseImportShardArgs } from './exportShardRows-DZEhUeyI.mjs';
|
|
3
|
-
import { recordAuthEvent, readAuthMetrics } from './
|
|
3
|
+
import { recordAuthEvent, readAuthMetrics } from './AUTH_METRICS_BUCKETS_TABLE-CiHHYeJi.mjs';
|
|
4
4
|
import { DATA_MIGRATION_STATE_TABLE, readMigrationStatus } from './DATA_MIGRATION_STATE_TABLE-PTtTiQ7U.mjs';
|
|
5
5
|
import { SCAN_DEP, createDependencyTracker, tableFromDepKey } from './SCAN_DEP-DLJF8dsj.mjs';
|
|
6
|
-
import { readFunctionMetricsTotals, readFunctionMetricIndexHits, recordFunctionMetric, mergeScanAttribution, readFunctionMetrics, readFunctionMetricBuckets } from './
|
|
7
|
-
import { ADMIN_FUNCTION_PREFIX, RELATION_FUNCTION_PREFIX, selectMatchingIds, ADMIN_FUNCTIONS, findStorageReferences, listTables, summarizeSubscriptions, readTablePage, facetColumn, MAX_PAGE_SIZE } from './
|
|
6
|
+
import { readFunctionMetricsTotals, readFunctionMetricIndexHits, recordFunctionMetric, mergeScanAttribution, readFunctionMetrics, readFunctionMetricBuckets } from './FUNCTION_METRICS_BUCKETS_TABLE-UDNVD7FS.mjs';
|
|
7
|
+
import { ADMIN_FUNCTION_PREFIX, RELATION_FUNCTION_PREFIX, selectMatchingIds, ADMIN_FUNCTIONS, findStorageReferences, listTables, summarizeSubscriptions, readTablePage, facetColumn, MAX_PAGE_SIZE } from './ADMIN_FUNCTIONS-Dzdqq5J2.mjs';
|
|
8
8
|
import { LogBuffer } from './LogBuffer-B_Ezju_N.mjs';
|
|
9
|
-
import { recordCapturedMail, clearCapturedMail, readCapturedMail, MAIL_TABLE } from './
|
|
9
|
+
import { recordCapturedMail, clearCapturedMail, readCapturedMail, MAIL_TABLE } from './MAIL_RETENTION-CPpgl-dX.mjs';
|
|
10
10
|
import { readBookmark, armRestore } from './armRestore-BJk53Ro8.mjs';
|
|
11
11
|
import { ReactiveCache, reactiveCacheKey } from './ReactiveCache-ByVzgH3d.mjs';
|
|
12
12
|
import { redact, standardRules } from '@visulima/redact';
|
|
13
13
|
import { i as isDevEnvironment, c as buildSettings, b as buildSecurityAudit } from './security-audit-CucgBice.mjs';
|
|
14
|
-
import { runReadonlySql } from './
|
|
14
|
+
import { runReadonlySql } from './MAX_SQL_ROWS-dDcFE1YZ.mjs';
|
|
15
15
|
import { ConflictError } from './ConflictError-C0STs6bU.mjs';
|
|
16
|
-
import { CDC_LOG_TABLE, readCdcChanges, readCdcCursor, readCdcEpoch, minCdcSeq, bumpCdcEpoch } from './
|
|
16
|
+
import { CDC_LOG_TABLE, readCdcChanges, readCdcCursor, readCdcEpoch, minCdcSeq, bumpCdcEpoch } from './CDC_LOG_TABLE-Ctdmxmrv.mjs';
|
|
17
17
|
import { r as readIdempotent, w as writeIdempotent, t as trimIdempotent } from './ctx-db-idempotency-DkC9rP91.mjs';
|
|
18
18
|
|
|
19
19
|
const AUDIT_LOG_TABLE = "__lunora_audit__";
|
|
@@ -1648,20 +1648,14 @@ class ShardDO {
|
|
|
1648
1648
|
status: 500
|
|
1649
1649
|
});
|
|
1650
1650
|
}
|
|
1651
|
-
const
|
|
1651
|
+
const transactionalStorage = this.state.storage;
|
|
1652
1652
|
const run = async () => {
|
|
1653
1653
|
this.transactionDepth = 1;
|
|
1654
|
-
sqlExec("BEGIN");
|
|
1655
1654
|
try {
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
return value;
|
|
1659
|
-
} catch (error) {
|
|
1660
|
-
try {
|
|
1661
|
-
sqlExec("ROLLBACK");
|
|
1662
|
-
} catch {
|
|
1655
|
+
if (typeof transactionalStorage?.transaction === "function") {
|
|
1656
|
+
return await transactionalStorage.transaction(async () => handler());
|
|
1663
1657
|
}
|
|
1664
|
-
|
|
1658
|
+
return await handler();
|
|
1665
1659
|
} finally {
|
|
1666
1660
|
this.transactionDepth = 0;
|
|
1667
1661
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { sql } from 'drizzle-orm';
|
|
2
|
-
import { matchesStaticWhere } from './
|
|
2
|
+
import { matchesStaticWhere } from './AGGREGATE_SQL_FUNCTION-CFk6adSu.mjs';
|
|
3
3
|
import { encodeAggregateKey, foldAggregateTally, aggregateTableName } from './aggregateTableName-CxNqY1Sl.mjs';
|
|
4
4
|
import { r as runDrizzle } from './do-exec-5eQy5cEi.mjs';
|
|
5
5
|
import { D as DOC_COLUMN, r as rowToDocument, A as AGG_KEY, a as AGG_VALUE, b as AGG_COUNT } from './do-sql-BCHCWtrD.mjs';
|
package/dist/packem_shared/{runShardMigrations-C3bn5r93.mjs → runShardMigrations-PabobOjF.mjs}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { sql } from 'drizzle-orm';
|
|
2
2
|
import { aggregateTableName } from './aggregateTableName-CxNqY1Sl.mjs';
|
|
3
|
-
import { migrateCdcLog, migrateCdcMeta } from './
|
|
3
|
+
import { migrateCdcLog, migrateCdcMeta } from './CDC_LOG_TABLE-Ctdmxmrv.mjs';
|
|
4
4
|
import { m as migrateIdempotency } from './ctx-db-idempotency-DkC9rP91.mjs';
|
|
5
5
|
import { r as runDrizzle } from './do-exec-5eQy5cEi.mjs';
|
|
6
6
|
import { D as DOC_COLUMN, j as jsonPathSql, c as createIndexSql, t as tableColumns, i as isFtsAvailable, A as AGG_KEY, a as AGG_VALUE, b as AGG_COUNT } from './do-sql-BCHCWtrD.mjs';
|
|
7
7
|
import { s as sortColumnName, r as rankTableName } from './rank-CrkEIpF4.mjs';
|
|
8
|
-
import { ftsTableName } from './
|
|
8
|
+
import { ftsTableName } from './buildFtsMatch-BLEMawrp.mjs';
|
|
9
9
|
|
|
10
10
|
const migrateSecondaryIndexes = (sql$1, tableName, definition) => {
|
|
11
11
|
for (const index of definition.indexes) {
|
package/dist/packem_shared/{serveRelationFanout-Clr1a05L.mjs → serveRelationFanout-CFBKWJ8Q.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RELATION_FUNCTION_PREFIX } from './
|
|
1
|
+
import { RELATION_FUNCTION_PREFIX } from './ADMIN_FUNCTIONS-Dzdqq5J2.mjs';
|
|
2
2
|
|
|
3
3
|
const serveRelationFanout = async (schema, database, functionPath, args) => {
|
|
4
4
|
const table = typeof args["table"] === "string" ? args["table"] : "";
|
package/package.json
CHANGED
/package/dist/packem_shared/{ADMIN_FUNCTION_PREFIX-Dzdqq5J2.mjs → ADMIN_FUNCTIONS-Dzdqq5J2.mjs}
RENAMED
|
File without changes
|
/package/dist/packem_shared/{matchesStaticWhere-CFk6adSu.mjs → AGGREGATE_SQL_FUNCTION-CFk6adSu.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/packem_shared/{buildSecurityAudit-CCAvoFlr.mjs → MIN_ADMIN_TOKEN_LENGTH-CCAvoFlr.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|