@hot-updater/plugin-core 1.2.0-rc.4 → 1.2.0-rc.41

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.
Files changed (41) hide show
  1. package/dist/coreApi.d.cts +204 -9
  2. package/dist/coreApi.d.mts +204 -9
  3. package/dist/engine/core/schema.cjs +171 -3
  4. package/dist/engine/core/schema.d.cts +115 -1
  5. package/dist/engine/core/schema.d.mts +115 -1
  6. package/dist/engine/core/schema.mjs +171 -3
  7. package/dist/engine/createEngine.cjs +1 -2
  8. package/dist/engine/createEngine.d.cts +1 -6
  9. package/dist/engine/createEngine.d.mts +1 -6
  10. package/dist/engine/createEngine.mjs +1 -2
  11. package/dist/engine/database/aggregateBatching.cjs +24 -116
  12. package/dist/engine/database/aggregateBatching.mjs +24 -116
  13. package/dist/engine/database/database.cjs +1 -4
  14. package/dist/engine/database/database.mjs +1 -4
  15. package/dist/engine/database/resolveSchema.cjs +6 -3
  16. package/dist/engine/database/resolveSchema.mjs +6 -3
  17. package/dist/index.cjs +1 -7
  18. package/dist/index.d.cts +5 -6
  19. package/dist/index.d.mts +5 -6
  20. package/dist/index.mjs +2 -3
  21. package/dist/serverPlugin/definitions.d.cts +4 -0
  22. package/dist/serverPlugin/definitions.d.mts +4 -0
  23. package/dist/serverPlugin/schema.d.cts +4 -0
  24. package/dist/serverPlugin/schema.d.mts +4 -0
  25. package/dist/types/databaseConfig.d.cts +8 -19
  26. package/dist/types/databaseConfig.d.mts +8 -19
  27. package/dist/types/databaseRows.d.cts +70 -2
  28. package/dist/types/databaseRows.d.mts +70 -2
  29. package/dist/types/index.cjs +3 -0
  30. package/dist/types/index.d.cts +118 -60
  31. package/dist/types/index.d.mts +118 -60
  32. package/dist/types/index.mjs +3 -1
  33. package/dist/types/models.d.cts +9 -1
  34. package/dist/types/models.d.mts +9 -1
  35. package/dist/types/public.d.cts +3 -3
  36. package/dist/types/public.d.mts +3 -3
  37. package/package.json +3 -9
  38. package/dist/remoteBundleSigning.cjs +0 -357
  39. package/dist/remoteBundleSigning.d.cts +0 -38
  40. package/dist/remoteBundleSigning.d.mts +0 -38
  41. package/dist/remoteBundleSigning.mjs +0 -352
@@ -19,15 +19,8 @@ const LEASE_TABLE = "aggregate_lease";
19
19
  const LEASE = { id: "compaction" };
20
20
  /** How long a compaction holds the lease before another process may take it. */
21
21
  const LEASE_MS = 3e4;
22
- /**
23
- * Default windows: log mode compacts every 60 seconds, since reads compact
24
- * first; memory mode flushes every 15, since its window is what a crash
25
- * loses.
26
- */
27
- const WINDOW_MS = {
28
- log: 6e4,
29
- memory: 15e3
30
- };
22
+ /** A commit compacts once this has passed since the last compaction. */
23
+ const WINDOW_MS = 6e4;
31
24
  /** Log rows a compaction reads from each log table for one group. */
32
25
  const LOG_PAGE = 200;
33
26
  /**
@@ -41,8 +34,6 @@ const GROUPS = {
41
34
  };
42
35
  /** Tries per write after a conflict or a transient error. */
43
36
  const ATTEMPTS = 5;
44
- /** Aggregate rows a memory buffer holds before a commit waits for a flush. */
45
- const MAX_BUFFERED = 1e4;
46
37
  const log = defineTable({
47
38
  id: {
48
39
  type: "string",
@@ -92,7 +83,7 @@ const valuesOf = ({ deltas, sketches }) => ({
92
83
  /**
93
84
  * Merges `values` into the change for `key`'s identity as `tx.aggregate`
94
85
  * does: deltas add up and sketches merge. One constant `shardBy` keys each
95
- * identity to one entry; the write picks the shard.
86
+ * identity to one entry; `compile` writes it to shard 0.
96
87
  */
97
88
  const merge = (into, model, key, values) => recordAggregate(into, model, Object.fromEntries(shapeOf(model).key.map((field, at) => [field, key[at]])), values, "");
98
89
  const mergeAll = (into, changes) => {
@@ -126,7 +117,7 @@ const increment = ({ model, deltas }, key) => Object.values(deltas).some((delta)
126
117
  /**
127
118
  * The guarded write that merges `change` into `current`: insert, patch, or
128
119
  * delete at zero. Unlike a transaction's, a gauge may go below zero here: a
129
- * shard row holds one writer's net changes, and reads sum every shard.
120
+ * group can hold a loss without the gain before it, and reads sum every shard.
130
121
  */
131
122
  const rewrite = (change, key, current) => {
132
123
  const { model } = change;
@@ -164,12 +155,12 @@ const rewrite = (change, key, current) => {
164
155
  };
165
156
  };
166
157
  /**
167
- * The write for each change on its shard: a blind increment that creates
168
- * the row for counters, and a guarded rewrite for gauges and sketches, whose
169
- * rows are read in one batch per table.
158
+ * The write for each change on shard 0, since one compaction runs at a time:
159
+ * a blind increment that creates the row for counters, and a guarded rewrite
160
+ * for gauges and sketches, whose rows are read in one batch per table.
170
161
  */
171
- const compile = async (adapter, changes, shard) => {
172
- const keys = changes.map(({ model, key }) => [...key.slice(0, -1), shard(model)]);
162
+ const compile = async (adapter, changes) => {
163
+ const keys = changes.map(({ key }) => [...key.slice(0, -1), 0]);
173
164
  const reads = /* @__PURE__ */ new Map();
174
165
  changes.forEach((change, at) => {
175
166
  if (rewrites(change)) reads.set(change.model, [...reads.get(change.model) ?? [], at]);
@@ -223,14 +214,13 @@ const encode = async (changes) => {
223
214
  return zipped !== void 0 && zipped.length < json.length ? `z${zipped}` : json;
224
215
  };
225
216
  /**
226
- * Batches changes to aggregates declared `batched`. A transaction records
227
- * them without writing their rows; once it commits, "memory" mode keeps
228
- * them in this process until its timer flushes them, and "log" mode has
229
- * written them as one log row in the same atomic write, which a compaction
230
- * later merges into the aggregates and deletes, atomically again, so each
231
- * applies exactly once. One lease row keeps compactions one at a time.
217
+ * Batches changes to aggregates declared `batched`. A transaction writes
218
+ * them as one log row in its own atomic write, in place of their rows; a
219
+ * compaction later merges log rows into the aggregates and deletes them,
220
+ * atomically again, so each applies exactly once. One lease row keeps
221
+ * compactions one at a time.
232
222
  */
233
- const createAggregateBatches = ({ engine, adapter, schema, batching: { mode = "log", windowMs = WINDOW_MS[mode] }, now }) => {
223
+ const createAggregateBatches = ({ engine, adapter, schema, batching: { windowMs = WINDOW_MS }, now }) => {
234
224
  if (!schema.models.has(LEASE_TABLE)) throw new DatabaseTransactionError("An engine that batches aggregates needs aggregateBatchingModule in its schema.");
235
225
  const holder = crypto.randomUUID().replaceAll("-", "");
236
226
  const table = (name) => schema.models.get(name).table;
@@ -258,68 +248,6 @@ const createAggregateBatches = ({ engine, adapter, schema, batching: { mode = "l
258
248
  }
259
249
  return changes;
260
250
  };
261
- /**
262
- * Writes changes in atomic chunks within `fits`, and returns the ones it
263
- * could not apply. A write whose outcome is unknown is dropped, never
264
- * resent, so no change applies twice.
265
- */
266
- const apply = async (changes, shard) => {
267
- let rest = changes;
268
- let ops = [];
269
- let read = true;
270
- for (let failures = 0; rest.length > 0 && failures < ATTEMPTS;) try {
271
- if (read) ops = await compile(adapter, rest, shard);
272
- let size = rest.length;
273
- const chunk = () => ops.slice(0, size).filter(isOp);
274
- while (size > 1 && !adapter.fits(chunk())) size = Math.ceil(size / 2);
275
- let result = { ok: true };
276
- if (chunk().length > 0) result = await adapter.write(chunk()).catch((error) => {
277
- warn("flush")(error);
278
- return { ok: true };
279
- });
280
- read = !result.ok && !("retry" in result);
281
- if (result.ok) {
282
- rest = rest.slice(size);
283
- ops = ops.slice(size);
284
- failures = 0;
285
- } else {
286
- failures += 1;
287
- if (!read) await sleep(failures);
288
- }
289
- } catch (error) {
290
- warn("flush")(error);
291
- return rest;
292
- }
293
- return rest;
294
- };
295
- let buffer = /* @__PURE__ */ new Map();
296
- let timer;
297
- let flushing;
298
- const shards = /* @__PURE__ */ new Map();
299
- /** Each process writes its own shard, so flushes of two processes rarely meet. */
300
- const processShard = (model) => {
301
- if (!shards.has(model)) shards.set(model, Math.floor(Math.random() * shapeOf(model).shards));
302
- return shards.get(model);
303
- };
304
- const schedule = () => {
305
- if (timer !== void 0 || buffer.size === 0) return;
306
- timer = setTimeout(() => {
307
- timer = void 0;
308
- flushBuffer();
309
- }, windowMs);
310
- timer.unref?.();
311
- };
312
- /** Never rejects: what it cannot apply goes back into the buffer. */
313
- const flushBuffer = () => flushing ??= (async () => {
314
- clearTimeout(timer);
315
- timer = void 0;
316
- const pending = [...buffer.values()];
317
- buffer = /* @__PURE__ */ new Map();
318
- mergeAll(buffer, await apply(pending, processShard));
319
- })().catch(warn("flush")).finally(() => {
320
- flushing = void 0;
321
- schedule();
322
- });
323
251
  let nextDue = 0;
324
252
  let compacting;
325
253
  /** Log rows this process read, by `[log table's index, id]`, for the deletes after a group. */
@@ -454,7 +382,7 @@ const createAggregateBatches = ({ engine, adapter, schema, batching: { mode = "l
454
382
  more
455
383
  };
456
384
  };
457
- const rowsFor = async (changes) => (await compile(adapter, changes, () => 0)).filter(isOp);
385
+ const rowsFor = async (changes) => (await compile(adapter, changes)).filter(isOp);
458
386
  /**
459
387
  * Applies the oldest pending log rows whose merged changes fit in one
460
388
  * atomic write with the lease, which lists them as applied; the rows are
@@ -548,20 +476,6 @@ const createAggregateBatches = ({ engine, adapter, schema, batching: { mode = "l
548
476
  }))).then((pages) => pages.some((page) => page.rows.length > 0)).finally(() => {
549
477
  checking = void 0;
550
478
  });
551
- /** Takes a committed transaction's changes; never rejects, since the transaction already committed. */
552
- const committed = async (changes) => {
553
- if (mode === "log") {
554
- if (now() >= nextDue) await compact(false, GROUPS.commit);
555
- return;
556
- }
557
- mergeAll(buffer, changes.values());
558
- schedule();
559
- if (buffer.size >= MAX_BUFFERED) await flushBuffer();
560
- };
561
- const flush = async () => {
562
- await flushBuffer();
563
- if (mode === "log" && await hasPending()) await compact(true, GROUPS.flush);
564
- };
565
479
  return {
566
480
  async transaction(fn) {
567
481
  let changes = /* @__PURE__ */ new Map();
@@ -587,7 +501,7 @@ const createAggregateBatches = ({ engine, adapter, schema, batching: { mode = "l
587
501
  aggregate
588
502
  });
589
503
  if (failure) throw failure.error;
590
- if (mode === "log" && attempt.size > 0) {
504
+ if (attempt.size > 0) {
591
505
  const id = `${now().toString(36).padStart(9, "0")}${holder.slice(0, 8)}${crypto.randomUUID().slice(0, 8)}`;
592
506
  const shard = Math.floor(Math.random() * LOG_TABLES.length);
593
507
  const merged = mergeAll(/* @__PURE__ */ new Map(), attempt.values());
@@ -601,24 +515,18 @@ const createAggregateBatches = ({ engine, adapter, schema, batching: { mode = "l
601
515
  open = false;
602
516
  }
603
517
  });
604
- if (changes.size > 0) await committed(changes);
518
+ if (changes.size > 0 && now() >= nextDue) await compact(false, GROUPS.commit);
605
519
  return result;
606
520
  },
607
521
  async beforeRead(name) {
608
522
  if (!isBatched(schema.models.get(name))) return;
609
- if (buffer.size > 0 || flushing !== void 0) await flushBuffer();
610
- if (mode === "log") {
611
- if (await hasPending().catch((error) => {
612
- warn("read")(error);
613
- return false;
614
- })) await compact(true, GROUPS.read);
615
- }
523
+ if (await hasPending().catch((error) => {
524
+ warn("read")(error);
525
+ return false;
526
+ })) await compact(true, GROUPS.read);
616
527
  },
617
- flush,
618
- async dispose() {
619
- clearTimeout(timer);
620
- timer = void 0;
621
- await flush();
528
+ async flush() {
529
+ if (await hasPending()) await compact(true, GROUPS.flush);
622
530
  }
623
531
  };
624
532
  };
@@ -35,13 +35,10 @@ const createDatabaseEngine = ({ batching, now = Date.now, meter, ...options }) =
35
35
  };
36
36
  return {
37
37
  ...engine,
38
- /** Applies batched aggregate changes still pending: this process's buffer and the log. */
38
+ /** Applies the batched aggregate changes still in the log. */
39
39
  flush: async () => {
40
40
  await batches?.flush();
41
41
  },
42
- dispose: async () => {
43
- await batches?.dispose();
44
- },
45
42
  database(module) {
46
43
  const name = (model) => module.namespace ? `${module.namespace}_${model}` : model;
47
44
  return {
@@ -35,13 +35,10 @@ const createDatabaseEngine = ({ batching, now = Date.now, meter, ...options }) =
35
35
  };
36
36
  return {
37
37
  ...engine,
38
- /** Applies batched aggregate changes still pending: this process's buffer and the log. */
38
+ /** Applies the batched aggregate changes still in the log. */
39
39
  flush: async () => {
40
40
  await batches?.flush();
41
41
  },
42
- dispose: async () => {
43
- await batches?.dispose();
44
- },
45
42
  database(module) {
46
43
  const name = (model) => module.namespace ? `${module.namespace}_${model}` : model;
47
44
  return {
@@ -40,7 +40,8 @@ const fieldProblems = (definition, add) => {
40
40
  else if (field.required === false) add(`key field "${name}" is nullable`);
41
41
  else if (field.type === "json") add(`key field "${name}" is json`);
42
42
  }
43
- for (const [name, { type, maxLength, ascii }] of Object.entries(definition.fields)) {
43
+ const bounded = [...Object.entries(definition.fields), ...definition.kind === "table" ? Object.entries(definition.derived) : []];
44
+ for (const [name, { type, maxLength, ascii }] of bounded) {
44
45
  if (maxLength !== void 0 && (type !== "string" || !Number.isSafeInteger(maxLength) || maxLength < 1)) add(`field "${name}" has an invalid maxLength`);
45
46
  if (ascii && type !== "string") add(`field "${name}" is ascii but not a string`);
46
47
  }
@@ -157,11 +158,13 @@ const resolveSchema = (modules) => {
157
158
  ...maxLength === void 0 ? {} : { maxLength },
158
159
  ...ascii ? { ascii } : {}
159
160
  }));
160
- if (definition.kind === "table") for (const [field, { type, multi }] of Object.entries(definition.derived)) columns.push({
161
+ if (definition.kind === "table") for (const [field, { type, multi, maxLength, ascii }] of Object.entries(definition.derived)) columns.push({
161
162
  name: field,
162
163
  type,
163
164
  nullable: true,
164
- ...multi ? { multi } : {}
165
+ ...multi ? { multi } : {},
166
+ ...maxLength === void 0 ? {} : { maxLength },
167
+ ...ascii ? { ascii } : {}
165
168
  });
166
169
  else columns.push(integer(SHARD_COLUMN), ...[...definition.counters, ...definition.gauges].map((metric) => integer(metric)), ...definition.distinct.map((metric) => ({
167
170
  name: metric,
@@ -40,7 +40,8 @@ const fieldProblems = (definition, add) => {
40
40
  else if (field.required === false) add(`key field "${name}" is nullable`);
41
41
  else if (field.type === "json") add(`key field "${name}" is json`);
42
42
  }
43
- for (const [name, { type, maxLength, ascii }] of Object.entries(definition.fields)) {
43
+ const bounded = [...Object.entries(definition.fields), ...definition.kind === "table" ? Object.entries(definition.derived) : []];
44
+ for (const [name, { type, maxLength, ascii }] of bounded) {
44
45
  if (maxLength !== void 0 && (type !== "string" || !Number.isSafeInteger(maxLength) || maxLength < 1)) add(`field "${name}" has an invalid maxLength`);
45
46
  if (ascii && type !== "string") add(`field "${name}" is ascii but not a string`);
46
47
  }
@@ -157,11 +158,13 @@ const resolveSchema = (modules) => {
157
158
  ...maxLength === void 0 ? {} : { maxLength },
158
159
  ...ascii ? { ascii } : {}
159
160
  }));
160
- if (definition.kind === "table") for (const [field, { type, multi }] of Object.entries(definition.derived)) columns.push({
161
+ if (definition.kind === "table") for (const [field, { type, multi, maxLength, ascii }] of Object.entries(definition.derived)) columns.push({
161
162
  name: field,
162
163
  type,
163
164
  nullable: true,
164
- ...multi ? { multi } : {}
165
+ ...multi ? { multi } : {},
166
+ ...maxLength === void 0 ? {} : { maxLength },
167
+ ...ascii ? { ascii } : {}
165
168
  });
166
169
  else columns.push(integer(SHARD_COLUMN), ...[...definition.counters, ...definition.gauges].map((metric) => integer(metric)), ...definition.distinct.map((metric) => ({
167
170
  name: metric,
package/dist/index.cjs CHANGED
@@ -14,7 +14,6 @@ const require_uuidv7 = require("./uuidv7.cjs");
14
14
  const require_releaseCatalogCompiler = require("./releaseCatalogCompiler.cjs");
15
15
  const require_releaseManagement = require("./releaseManagement.cjs");
16
16
  const require_releaseCatalogMutation = require("./releaseCatalogMutation.cjs");
17
- const require_remoteBundleSigning = require("./remoteBundleSigning.cjs");
18
17
  const require_semverSatisfies = require("./semverSatisfies.cjs");
19
18
  const require_databaseConfig = require("./types/databaseConfig.cjs");
20
19
  const require_index = require("./types/index.cjs");
@@ -59,10 +58,6 @@ exports.DatabaseSchemaError = require_adapter.DatabaseSchemaError;
59
58
  exports.DatabaseTransactionError = require_errors.DatabaseTransactionError;
60
59
  exports.HotUpdaterConfigError = require_configError.HotUpdaterConfigError;
61
60
  exports.HotUpdaterSchemaMigrationRequiredError = require_fence.HotUpdaterSchemaMigrationRequiredError;
62
- exports.REMOTE_BUNDLE_SIGNING_ALGORITHM = require_remoteBundleSigning.REMOTE_BUNDLE_SIGNING_ALGORITHM;
63
- exports.REMOTE_BUNDLE_SIGNING_PATH = require_remoteBundleSigning.REMOTE_BUNDLE_SIGNING_PATH;
64
- exports.REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION = require_remoteBundleSigning.REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION;
65
- exports.REMOTE_BUNDLE_SIGNING_TOKEN_HEADER = require_remoteBundleSigning.REMOTE_BUNDLE_SIGNING_TOKEN_HEADER;
66
61
  exports.ReleaseCatalogCompilationError = require_releaseCatalogCompiler.ReleaseCatalogCompilationError;
67
62
  exports.ReleaseCatalogMutationError = require_releaseCatalogMutation.ReleaseCatalogMutationError;
68
63
  exports.ReleaseManagementError = require_releaseManagement.ReleaseManagementError;
@@ -85,7 +80,6 @@ exports.coreSchema = require_coreDatabase.coreSchema;
85
80
  exports.coreSettings = require_coreDatabase.coreSettings;
86
81
  exports.coreTarget = require_coreDatabase.coreTarget;
87
82
  exports.countDistinct = require_distinct.countDistinct;
88
- exports.createBundleSigningHandler = require_remoteBundleSigning.createBundleSigningHandler;
89
83
  exports.createBundleStorageKey = require_bundleStorageLayout.createBundleStorageKey;
90
84
  exports.createEngine = require_createEngine.createEngine;
91
85
  exports.createEngineDatabase = require_coreDatabase.createEngineDatabase;
@@ -144,8 +138,8 @@ exports.quoteSql = require_sqlSchema.quoteSql;
144
138
  exports.referenceCompatibleReleases = require_releaseCatalogCompiler.referenceCompatibleReleases;
145
139
  exports.releaseRowToRelease = require_databaseRows.releaseRowToRelease;
146
140
  exports.releaseToRow = require_databaseRows.releaseToRow;
147
- exports.remoteSigning = require_remoteBundleSigning.remoteSigning;
148
141
  exports.replaceStorageUriKeySuffix = require_assetStorageLayout.replaceStorageUriKeySuffix;
142
+ exports.resolveLazy = require_index.resolveLazy;
149
143
  exports.resolveManifestAssetStorageFileHash = require_assetStorageLayout.resolveManifestAssetStorageFileHash;
150
144
  exports.resolveManifestAssetStorageUri = require_assetStorageLayout.resolveManifestAssetStorageUri;
151
145
  exports.rowKey = require_adapter.rowKey;
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@ import { createStorageUriWithRelativePath, getManifestAssetDownloadPath, getMani
3
3
  import { CONTENT_ADDRESSED_ASSET_PREFIX, getContentAddressedAssetStoragePath, isContentAddressedAssetFileHash } from "./contentAddressedAssets.cjs";
4
4
  import { getContentType } from "./contentType.cjs";
5
5
  import { CatalogVersionBound, CompiledCatalogSegment, CompiledReleaseCatalog, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, canonicalizeAppVersion, compileReleaseCatalog, projectCompiledCatalog, projectCompiledRollbackCatalog, referenceCompatibleReleases } from "./releaseCatalogCompiler.cjs";
6
- import { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, NativeBuildArtifactKind, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.cjs";
6
+ import { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, IosDeviceRow, IosDeviceStatus, NativeBuildArtifactKind, NativeBuildExportMethod, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.cjs";
7
7
  import { CoreReads, ReleaseCatalogRequest } from "./serverPlugin/coreReads.cjs";
8
8
  import { DATABASE_VERSION_COLUMN, DatabaseAdapter, DatabaseJson, DatabaseKey, DatabaseKeyValue, DatabaseSchemaError, DatabaseValue, PhysicalColumn, PhysicalColumnType, PhysicalIndex, PhysicalRetention, PhysicalTable, QueryBound, QueryRequest, StoredRow, WriteGuard, WriteOp, WriteResult, expiresAt, findPhysicalColumn, findPhysicalIndex, indexOrderColumns, rowKey } from "./database/adapter.cjs";
9
9
  import { FieldDefinition, FieldReference, FieldType, IndexDefinition, ReferenceAction } from "./serverPlugin/definitions.cjs";
@@ -17,11 +17,11 @@ import { RetryOptions } from "./engine/database/engineTransaction.cjs";
17
17
  import { AggregateBatching, ConfiguredDatabase, EngineDatabase, RemoteDatabase, isRemoteDatabase } from "./types/databaseConfig.cjs";
18
18
  import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.cjs";
19
19
  import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./types/databaseOperations.cjs";
20
- import { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult } from "./types/models.cjs";
21
- import { ApplePlatform, BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, Bundle, BundleSigningAdapter, ConfigInput, FingerprintExtraSources, IosBuildDestination, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, NativeFingerprint, NativeFingerprintOptions, NativeFingerprintProvider, NativeFingerprintSource, Platform, PlatformConfig, SecretsAdapter, SecretsContext, SigningConfig, StorageAdapter, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StoragePutInput, StoragePutResult, supportedIosPlatforms } from "./types/index.cjs";
20
+ import { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult, NativeBuildMarkResult } from "./types/models.cjs";
21
+ import { ApplePlatform, BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, Bundle, ConfigInput, FingerprintExtraSources, IosBuildDestination, Lazy, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, NativeBuildSandboxOptions, NativeFingerprint, NativeFingerprintOptions, NativeFingerprintProvider, NativeFingerprintSource, Platform, PlatformConfig, SecretRef, SecretsAdapter, SecretsContext, SigningConfig, StorageAdapter, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StoragePutInput, StoragePutResult, resolveLazy, supportedIosPlatforms } from "./types/index.cjs";
22
22
  import { ReleaseCatalogMutationError, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, ReleaseCatalogScope } from "./releaseCatalogMutation.cjs";
23
23
  import { PromoteReleaseResult, ReleaseManagementError, ReleasePolicyPatch } from "./releaseManagement.cjs";
24
- import { BundleDeployment, BundleDetail, DeployReleasePolicy, Deployment, HotUpdaterCoreApi, KeysetInput, NativeBuildRegistration, NativeBuildScope, ReleaseFilter, ReleaseTarget, StoredBundleDeployment } from "./coreApi.cjs";
24
+ import { BundleDeployment, BundleDetail, DeployReleasePolicy, Deployment, HotUpdaterCoreApi, IosDeviceAccount, IosDeviceAccountClaim, IosDeviceOutcome, IosDeviceOutcomeInput, IosDeviceRequestResult, KeysetInput, NativeBuildDistribution, NativeBuildRegistration, NativeBuildSandboxScope, NativeBuildScope, ReleaseFilter, ReleaseTarget, StoredBundleDeployment } from "./coreApi.cjs";
25
25
  import { DatabaseAdapterInputError, DatabaseAdapterInputErrorCode, DatabaseBundleNotFoundError, DatabaseRowReferencedError } from "./databaseErrors.cjs";
26
26
  import { createStorageKeyBuilder } from "./createStorageKeyBuilder.cjs";
27
27
  import { CreateStorageAdapterOptions, StorageAdapterWith, StorageOperation, assertStorageOperations, createStorageAdapter } from "./createStorageAdapter.cjs";
@@ -29,7 +29,6 @@ import { isDatabaseJsonObject, isDatabaseMetadataObject } from "./databaseJsonVa
29
29
  import { BundleRowHydrationError, BundleRowHydrationErrorReason, bundleToPatchRows, bundleToRow, releaseRowToRelease, releaseToRow, rowToBundle, rowsToBundles } from "./databaseRows.cjs";
30
30
  import { generateMinBundleId } from "./generateMinBundleId.cjs";
31
31
  import { CreateStorageUriInput, ParsedStorageUri, createStorageUri, parseStorageUri } from "./parseStorageUri.cjs";
32
- import { BundleSigningHandlerOptions, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, RemoteSigningOptions, createBundleSigningHandler, remoteSigning } from "./remoteBundleSigning.cjs";
33
32
  import { semverSatisfies } from "./semverSatisfies.cjs";
34
33
  import { createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, isUUIDv7 } from "./uuidv7.cjs";
35
34
  import { isDatabaseBusyError } from "./serverPlugin/busy.cjs";
@@ -52,4 +51,4 @@ import { EngineSqlOptions, generateEngineSql } from "./engine/db/engineSql.cjs";
52
51
  import { EngineSqlMigratorOptions, createEngineSqlMigrator } from "./engine/db/engineSqlMigrator.cjs";
53
52
  import { writeSchemaSettings } from "./engine/db/schemaSettings.cjs";
54
53
  import { createSettingsMigrator } from "./engine/db/settingsMigrator.cjs";
55
- export { type AggregateBatching, type AggregateChanges, type AggregateDefinition, type AggregateIdentity, type AggregateRow, type AnyHotUpdaterPlugin, ApplePlatform, BUNDLE_STORAGE_PREFIX, type BaseCandidateQuery, type BaseCandidateTarget, BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, BuiltIns, type Bundle, type BundleDeployment, type BundleDetail, type BundlePatchRow, type BundleRow, BundleRowHydrationError, BundleRowHydrationErrorReason, type BundleRowUpdate, BundleSigningAdapter, BundleSigningHandlerOptions, CONTENT_ADDRESSED_ASSET_PREFIX, CatalogVersionBound, type ChannelDeleteResult, type ChannelInsertResult, type ChannelRow, type ClientAuth, CompiledCatalogSegment, CompiledReleaseCatalog, ConfigInput, type ConfiguredDatabase, type ConstraintReason, type CoreReader, type CoreReads, type CoreSchema, type CreateRow, CreateStorageAdapterOptions, CreateStorageUriInput, DATABASE_VERSION_COLUMN, type DatabaseAdapter, DatabaseAdapterContractError, DatabaseAdapterInputError, type DatabaseAdapterInputErrorCode, DatabaseAmbiguousCommitError, type DatabaseBundleMetadata, DatabaseBundleNotFoundError, DatabaseConflictError, DatabaseConstraintError, DatabaseCursorError, type DatabaseJson, type DatabaseJsonObject, type DatabaseJsonValue, type DatabaseKey, type DatabaseKeyValue, DatabaseQueryError, type DatabaseReadCount, type DatabaseReadMeter, DatabaseRowReferencedError, DatabaseSchemaError, type DatabaseTooling, DatabaseTransactionError, type DatabaseValue, type DeployReleasePolicy, type Deployment, type DerivedDefinition, type DerivedFields, type Engine, type EngineColumns, type EngineDatabase, type EngineDatabaseOptions, type EngineOptions, type EngineReadCount, type EngineSqlMigratorOptions, type EngineSqlOptions, type FieldDefinition, type FieldReference, type FieldType, type FieldValue, type FindAggregatesModel, type FindManyModel, FingerprintExtraSources, HasMultipleCallSignatures, HotUpdaterConfigError, type HotUpdaterCoreApi, type HotUpdaterDatabase, type HotUpdaterPlugin, HotUpdaterSchemaMigrationRequiredError, type HotUpdaterTransaction, type IndexDefinition, IosBuildDestination, type KeyLookup, type KeyValueStore, type KeysetInput, type KvAdapterOptions, type KvCondition, type KvItem, type KvKey, type KvOp, type KvRange, LocalSigningConfig, type Lookup, type MemoryAdapterOptions, type MeteredDatabase, type MigrateOptions, type MigrationResult, type Migrator, type ModelDefinition, type ModuleSchema, NativeBuildAndroidScheme, NativeBuildArgs, type NativeBuildArtifactKind, type NativeBuildDeleteResult, NativeBuildIosScheme, NativeBuildOptions, type NativeBuildRegistration, type NativeBuildRow, type NativeBuildScope, type NativeBuildSubmissionDestination, NativeFingerprint, NativeFingerprintOptions, NativeFingerprintProvider, NativeFingerprintSource, type NormalizeOptions, type Page, ParsedStorageUri, type PhysicalColumn, type PhysicalColumnType, type PhysicalIndex, type PhysicalRetention, type PhysicalTable, type Platform, PlatformConfig, type PluginApis, type PluginCli, type PluginClientCredential, type PluginClientPlugin, type PluginContext, type PluginEndpoint, type PluginEndpointMethod, type PluginInstance, type PluginProvides, type PluginTables, Primitive, PromoteReleaseResult, type QueryBound, type QueryRequest, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, type ReadMeasurement, type ReadOptions, type ReadRow, type ReferenceAction, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, ReleaseCatalogMutationError, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, type ReleaseCatalogRequest, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, ReleaseCatalogScope, type ReleaseFilter, ReleaseManagementError, ReleasePolicyPatch, type ReleaseRow, type ReleaseRowUpdate, type ReleaseTarget, type RemoteDatabase, RemoteSigningOptions, RequiredDeep, type ResolvedModel, type ResolvedSchema, type RetentionDefinition, type RetryOptions, type RowOf, SETTINGS_TABLE, type SchemaGenerator, type SchemaSettings, SecretsAdapter, SecretsContext, SigningConfig, type SqlAdapterOptions, type SqlColumnShape, type SqlConnection, type SqlDialect, type SqlExecutor, type SqlResult, type SqlStatement, type SqlTableShape, StorageAdapter, StorageAdapterWith, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StorageOperation, StoragePutInput, StoragePutResult, type StoredBundleDeployment, type StoredRow, type TableDefinition, type TableRow, type ToolingDatabase, type ToolingTarget, type UpdateSet, type VerifiedDatabaseAdapter, type VerifyAdapterOptions, WRITE_GUARD_TABLE, type WriteGuard, type WriteOp, type WriteResult, addDistinct, aggregateBatchingTables, assertStorageOperations, bundleToPatchRows, bundleToRow, canonicalizeAppVersion, compareUtf8, compileReleaseCatalog, coreSchema, coreSettings, coreTarget, countDistinct, createBundleSigningHandler, createBundleStorageKey, createEngine, createEngineDatabase, createEngineSqlMigrator, createKvAdapter, createMemoryAdapter, createSettingsMigrator, createSqlAdapter, createStorageAdapter, createStorageKeyBuilder, createStorageRootUriWithPath, createStorageUri, createStorageUriWithRelativePath, createTableStatements, createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, defineAggregate, definePlugin, defineTable, encodeKvKey, expiresAt, extractTimestampFromUUIDv7, findPhysicalColumn, findPhysicalIndex, generateEngineSql, generateMinBundleId, getBundleArchiveStorageUri, getContentAddressedAssetStoragePath, getContentType, getManifestAssetDownloadPath, getManifestAssetStoragePath, indexOrderColumns, isBrotliManifestAssetPath, isContentAddressedAssetFileHash, isDatabaseBusyError, isDatabaseJsonObject, isDatabaseMetadataObject, isMultiIndex, isRemoteDatabase, isUUIDv7, mergeDistinct, meterReads, migrateCoreSchema, normalizeStoredRow, parseBaseCandidateKey, parseStorageUri, projectCompiledCatalog, projectCompiledRollbackCatalog, quoteSql, referenceCompatibleReleases, releaseRowToRelease, releaseToRow, remoteSigning, replaceStorageUriKeySuffix, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri, rowKey, rowToBundle, rowsToBundles, semverSatisfies, sqlTableShapes, supportedIosPlatforms, targetBaseCandidateKey, toolingTargetOf, verifyAdapter, writeSchemaSettings };
54
+ export { type AggregateBatching, type AggregateChanges, type AggregateDefinition, type AggregateIdentity, type AggregateRow, type AnyHotUpdaterPlugin, ApplePlatform, BUNDLE_STORAGE_PREFIX, type BaseCandidateQuery, type BaseCandidateTarget, BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, BuiltIns, type Bundle, type BundleDeployment, type BundleDetail, type BundlePatchRow, type BundleRow, BundleRowHydrationError, BundleRowHydrationErrorReason, type BundleRowUpdate, CONTENT_ADDRESSED_ASSET_PREFIX, CatalogVersionBound, type ChannelDeleteResult, type ChannelInsertResult, type ChannelRow, type ClientAuth, CompiledCatalogSegment, CompiledReleaseCatalog, ConfigInput, type ConfiguredDatabase, type ConstraintReason, type CoreReader, type CoreReads, type CoreSchema, type CreateRow, CreateStorageAdapterOptions, CreateStorageUriInput, DATABASE_VERSION_COLUMN, type DatabaseAdapter, DatabaseAdapterContractError, DatabaseAdapterInputError, type DatabaseAdapterInputErrorCode, DatabaseAmbiguousCommitError, type DatabaseBundleMetadata, DatabaseBundleNotFoundError, DatabaseConflictError, DatabaseConstraintError, DatabaseCursorError, type DatabaseJson, type DatabaseJsonObject, type DatabaseJsonValue, type DatabaseKey, type DatabaseKeyValue, DatabaseQueryError, type DatabaseReadCount, type DatabaseReadMeter, DatabaseRowReferencedError, DatabaseSchemaError, type DatabaseTooling, DatabaseTransactionError, type DatabaseValue, type DeployReleasePolicy, type Deployment, type DerivedDefinition, type DerivedFields, type Engine, type EngineColumns, type EngineDatabase, type EngineDatabaseOptions, type EngineOptions, type EngineReadCount, type EngineSqlMigratorOptions, type EngineSqlOptions, type FieldDefinition, type FieldReference, type FieldType, type FieldValue, type FindAggregatesModel, type FindManyModel, FingerprintExtraSources, HasMultipleCallSignatures, HotUpdaterConfigError, type HotUpdaterCoreApi, type HotUpdaterDatabase, type HotUpdaterPlugin, HotUpdaterSchemaMigrationRequiredError, type HotUpdaterTransaction, type IndexDefinition, IosBuildDestination, type IosDeviceAccount, type IosDeviceAccountClaim, type IosDeviceOutcome, type IosDeviceOutcomeInput, type IosDeviceRequestResult, type IosDeviceRow, type IosDeviceStatus, type KeyLookup, type KeyValueStore, type KeysetInput, type KvAdapterOptions, type KvCondition, type KvItem, type KvKey, type KvOp, type KvRange, Lazy, LocalSigningConfig, type Lookup, type MemoryAdapterOptions, type MeteredDatabase, type MigrateOptions, type MigrationResult, type Migrator, type ModelDefinition, type ModuleSchema, NativeBuildAndroidScheme, NativeBuildArgs, type NativeBuildArtifactKind, type NativeBuildDeleteResult, type NativeBuildDistribution, type NativeBuildExportMethod, NativeBuildIosScheme, type NativeBuildMarkResult, NativeBuildOptions, type NativeBuildRegistration, type NativeBuildRow, NativeBuildSandboxOptions, type NativeBuildSandboxScope, type NativeBuildScope, type NativeBuildSubmissionDestination, NativeFingerprint, NativeFingerprintOptions, NativeFingerprintProvider, NativeFingerprintSource, type NormalizeOptions, type Page, ParsedStorageUri, type PhysicalColumn, type PhysicalColumnType, type PhysicalIndex, type PhysicalRetention, type PhysicalTable, type Platform, PlatformConfig, type PluginApis, type PluginCli, type PluginClientCredential, type PluginClientPlugin, type PluginContext, type PluginEndpoint, type PluginEndpointMethod, type PluginInstance, type PluginProvides, type PluginTables, Primitive, PromoteReleaseResult, type QueryBound, type QueryRequest, type ReadMeasurement, type ReadOptions, type ReadRow, type ReferenceAction, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, ReleaseCatalogMutationError, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, type ReleaseCatalogRequest, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, ReleaseCatalogScope, type ReleaseFilter, ReleaseManagementError, ReleasePolicyPatch, type ReleaseRow, type ReleaseRowUpdate, type ReleaseTarget, type RemoteDatabase, RequiredDeep, type ResolvedModel, type ResolvedSchema, type RetentionDefinition, type RetryOptions, type RowOf, SETTINGS_TABLE, type SchemaGenerator, type SchemaSettings, SecretRef, SecretsAdapter, SecretsContext, SigningConfig, type SqlAdapterOptions, type SqlColumnShape, type SqlConnection, type SqlDialect, type SqlExecutor, type SqlResult, type SqlStatement, type SqlTableShape, StorageAdapter, StorageAdapterWith, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StorageOperation, StoragePutInput, StoragePutResult, type StoredBundleDeployment, type StoredRow, type TableDefinition, type TableRow, type ToolingDatabase, type ToolingTarget, type UpdateSet, type VerifiedDatabaseAdapter, type VerifyAdapterOptions, WRITE_GUARD_TABLE, type WriteGuard, type WriteOp, type WriteResult, addDistinct, aggregateBatchingTables, assertStorageOperations, bundleToPatchRows, bundleToRow, canonicalizeAppVersion, compareUtf8, compileReleaseCatalog, coreSchema, coreSettings, coreTarget, countDistinct, createBundleStorageKey, createEngine, createEngineDatabase, createEngineSqlMigrator, createKvAdapter, createMemoryAdapter, createSettingsMigrator, createSqlAdapter, createStorageAdapter, createStorageKeyBuilder, createStorageRootUriWithPath, createStorageUri, createStorageUriWithRelativePath, createTableStatements, createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, defineAggregate, definePlugin, defineTable, encodeKvKey, expiresAt, extractTimestampFromUUIDv7, findPhysicalColumn, findPhysicalIndex, generateEngineSql, generateMinBundleId, getBundleArchiveStorageUri, getContentAddressedAssetStoragePath, getContentType, getManifestAssetDownloadPath, getManifestAssetStoragePath, indexOrderColumns, isBrotliManifestAssetPath, isContentAddressedAssetFileHash, isDatabaseBusyError, isDatabaseJsonObject, isDatabaseMetadataObject, isMultiIndex, isRemoteDatabase, isUUIDv7, mergeDistinct, meterReads, migrateCoreSchema, normalizeStoredRow, parseBaseCandidateKey, parseStorageUri, projectCompiledCatalog, projectCompiledRollbackCatalog, quoteSql, referenceCompatibleReleases, releaseRowToRelease, releaseToRow, replaceStorageUriKeySuffix, resolveLazy, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri, rowKey, rowToBundle, rowsToBundles, semverSatisfies, sqlTableShapes, supportedIosPlatforms, targetBaseCandidateKey, toolingTargetOf, verifyAdapter, writeSchemaSettings };
package/dist/index.d.mts CHANGED
@@ -3,7 +3,7 @@ import { createStorageUriWithRelativePath, getManifestAssetDownloadPath, getMani
3
3
  import { CONTENT_ADDRESSED_ASSET_PREFIX, getContentAddressedAssetStoragePath, isContentAddressedAssetFileHash } from "./contentAddressedAssets.mjs";
4
4
  import { getContentType } from "./contentType.mjs";
5
5
  import { CatalogVersionBound, CompiledCatalogSegment, CompiledReleaseCatalog, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, canonicalizeAppVersion, compileReleaseCatalog, projectCompiledCatalog, projectCompiledRollbackCatalog, referenceCompatibleReleases } from "./releaseCatalogCompiler.mjs";
6
- import { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, NativeBuildArtifactKind, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.mjs";
6
+ import { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, IosDeviceRow, IosDeviceStatus, NativeBuildArtifactKind, NativeBuildExportMethod, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.mjs";
7
7
  import { CoreReads, ReleaseCatalogRequest } from "./serverPlugin/coreReads.mjs";
8
8
  import { DATABASE_VERSION_COLUMN, DatabaseAdapter, DatabaseJson, DatabaseKey, DatabaseKeyValue, DatabaseSchemaError, DatabaseValue, PhysicalColumn, PhysicalColumnType, PhysicalIndex, PhysicalRetention, PhysicalTable, QueryBound, QueryRequest, StoredRow, WriteGuard, WriteOp, WriteResult, expiresAt, findPhysicalColumn, findPhysicalIndex, indexOrderColumns, rowKey } from "./database/adapter.mjs";
9
9
  import { FieldDefinition, FieldReference, FieldType, IndexDefinition, ReferenceAction } from "./serverPlugin/definitions.mjs";
@@ -17,11 +17,11 @@ import { RetryOptions } from "./engine/database/engineTransaction.mjs";
17
17
  import { AggregateBatching, ConfiguredDatabase, EngineDatabase, RemoteDatabase, isRemoteDatabase } from "./types/databaseConfig.mjs";
18
18
  import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.mjs";
19
19
  import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./types/databaseOperations.mjs";
20
- import { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult } from "./types/models.mjs";
21
- import { ApplePlatform, BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, Bundle, BundleSigningAdapter, ConfigInput, FingerprintExtraSources, IosBuildDestination, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, NativeFingerprint, NativeFingerprintOptions, NativeFingerprintProvider, NativeFingerprintSource, Platform, PlatformConfig, SecretsAdapter, SecretsContext, SigningConfig, StorageAdapter, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StoragePutInput, StoragePutResult, supportedIosPlatforms } from "./types/index.mjs";
20
+ import { ChannelDeleteResult, ChannelInsertResult, NativeBuildDeleteResult, NativeBuildMarkResult } from "./types/models.mjs";
21
+ import { ApplePlatform, BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, Bundle, ConfigInput, FingerprintExtraSources, IosBuildDestination, Lazy, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, NativeBuildSandboxOptions, NativeFingerprint, NativeFingerprintOptions, NativeFingerprintProvider, NativeFingerprintSource, Platform, PlatformConfig, SecretRef, SecretsAdapter, SecretsContext, SigningConfig, StorageAdapter, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StoragePutInput, StoragePutResult, resolveLazy, supportedIosPlatforms } from "./types/index.mjs";
22
22
  import { ReleaseCatalogMutationError, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, ReleaseCatalogScope } from "./releaseCatalogMutation.mjs";
23
23
  import { PromoteReleaseResult, ReleaseManagementError, ReleasePolicyPatch } from "./releaseManagement.mjs";
24
- import { BundleDeployment, BundleDetail, DeployReleasePolicy, Deployment, HotUpdaterCoreApi, KeysetInput, NativeBuildRegistration, NativeBuildScope, ReleaseFilter, ReleaseTarget, StoredBundleDeployment } from "./coreApi.mjs";
24
+ import { BundleDeployment, BundleDetail, DeployReleasePolicy, Deployment, HotUpdaterCoreApi, IosDeviceAccount, IosDeviceAccountClaim, IosDeviceOutcome, IosDeviceOutcomeInput, IosDeviceRequestResult, KeysetInput, NativeBuildDistribution, NativeBuildRegistration, NativeBuildSandboxScope, NativeBuildScope, ReleaseFilter, ReleaseTarget, StoredBundleDeployment } from "./coreApi.mjs";
25
25
  import { DatabaseAdapterInputError, DatabaseAdapterInputErrorCode, DatabaseBundleNotFoundError, DatabaseRowReferencedError } from "./databaseErrors.mjs";
26
26
  import { createStorageKeyBuilder } from "./createStorageKeyBuilder.mjs";
27
27
  import { CreateStorageAdapterOptions, StorageAdapterWith, StorageOperation, assertStorageOperations, createStorageAdapter } from "./createStorageAdapter.mjs";
@@ -29,7 +29,6 @@ import { isDatabaseJsonObject, isDatabaseMetadataObject } from "./databaseJsonVa
29
29
  import { BundleRowHydrationError, BundleRowHydrationErrorReason, bundleToPatchRows, bundleToRow, releaseRowToRelease, releaseToRow, rowToBundle, rowsToBundles } from "./databaseRows.mjs";
30
30
  import { generateMinBundleId } from "./generateMinBundleId.mjs";
31
31
  import { CreateStorageUriInput, ParsedStorageUri, createStorageUri, parseStorageUri } from "./parseStorageUri.mjs";
32
- import { BundleSigningHandlerOptions, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, RemoteSigningOptions, createBundleSigningHandler, remoteSigning } from "./remoteBundleSigning.mjs";
33
32
  import { semverSatisfies } from "./semverSatisfies.mjs";
34
33
  import { createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, isUUIDv7 } from "./uuidv7.mjs";
35
34
  import { isDatabaseBusyError } from "./serverPlugin/busy.mjs";
@@ -52,4 +51,4 @@ import { EngineSqlOptions, generateEngineSql } from "./engine/db/engineSql.mjs";
52
51
  import { EngineSqlMigratorOptions, createEngineSqlMigrator } from "./engine/db/engineSqlMigrator.mjs";
53
52
  import { writeSchemaSettings } from "./engine/db/schemaSettings.mjs";
54
53
  import { createSettingsMigrator } from "./engine/db/settingsMigrator.mjs";
55
- export { type AggregateBatching, type AggregateChanges, type AggregateDefinition, type AggregateIdentity, type AggregateRow, type AnyHotUpdaterPlugin, ApplePlatform, BUNDLE_STORAGE_PREFIX, type BaseCandidateQuery, type BaseCandidateTarget, BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, BuiltIns, type Bundle, type BundleDeployment, type BundleDetail, type BundlePatchRow, type BundleRow, BundleRowHydrationError, BundleRowHydrationErrorReason, type BundleRowUpdate, BundleSigningAdapter, BundleSigningHandlerOptions, CONTENT_ADDRESSED_ASSET_PREFIX, CatalogVersionBound, type ChannelDeleteResult, type ChannelInsertResult, type ChannelRow, type ClientAuth, CompiledCatalogSegment, CompiledReleaseCatalog, ConfigInput, type ConfiguredDatabase, type ConstraintReason, type CoreReader, type CoreReads, type CoreSchema, type CreateRow, CreateStorageAdapterOptions, CreateStorageUriInput, DATABASE_VERSION_COLUMN, type DatabaseAdapter, DatabaseAdapterContractError, DatabaseAdapterInputError, type DatabaseAdapterInputErrorCode, DatabaseAmbiguousCommitError, type DatabaseBundleMetadata, DatabaseBundleNotFoundError, DatabaseConflictError, DatabaseConstraintError, DatabaseCursorError, type DatabaseJson, type DatabaseJsonObject, type DatabaseJsonValue, type DatabaseKey, type DatabaseKeyValue, DatabaseQueryError, type DatabaseReadCount, type DatabaseReadMeter, DatabaseRowReferencedError, DatabaseSchemaError, type DatabaseTooling, DatabaseTransactionError, type DatabaseValue, type DeployReleasePolicy, type Deployment, type DerivedDefinition, type DerivedFields, type Engine, type EngineColumns, type EngineDatabase, type EngineDatabaseOptions, type EngineOptions, type EngineReadCount, type EngineSqlMigratorOptions, type EngineSqlOptions, type FieldDefinition, type FieldReference, type FieldType, type FieldValue, type FindAggregatesModel, type FindManyModel, FingerprintExtraSources, HasMultipleCallSignatures, HotUpdaterConfigError, type HotUpdaterCoreApi, type HotUpdaterDatabase, type HotUpdaterPlugin, HotUpdaterSchemaMigrationRequiredError, type HotUpdaterTransaction, type IndexDefinition, IosBuildDestination, type KeyLookup, type KeyValueStore, type KeysetInput, type KvAdapterOptions, type KvCondition, type KvItem, type KvKey, type KvOp, type KvRange, LocalSigningConfig, type Lookup, type MemoryAdapterOptions, type MeteredDatabase, type MigrateOptions, type MigrationResult, type Migrator, type ModelDefinition, type ModuleSchema, NativeBuildAndroidScheme, NativeBuildArgs, type NativeBuildArtifactKind, type NativeBuildDeleteResult, NativeBuildIosScheme, NativeBuildOptions, type NativeBuildRegistration, type NativeBuildRow, type NativeBuildScope, type NativeBuildSubmissionDestination, NativeFingerprint, NativeFingerprintOptions, NativeFingerprintProvider, NativeFingerprintSource, type NormalizeOptions, type Page, ParsedStorageUri, type PhysicalColumn, type PhysicalColumnType, type PhysicalIndex, type PhysicalRetention, type PhysicalTable, type Platform, PlatformConfig, type PluginApis, type PluginCli, type PluginClientCredential, type PluginClientPlugin, type PluginContext, type PluginEndpoint, type PluginEndpointMethod, type PluginInstance, type PluginProvides, type PluginTables, Primitive, PromoteReleaseResult, type QueryBound, type QueryRequest, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, type ReadMeasurement, type ReadOptions, type ReadRow, type ReferenceAction, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, ReleaseCatalogMutationError, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, type ReleaseCatalogRequest, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, ReleaseCatalogScope, type ReleaseFilter, ReleaseManagementError, ReleasePolicyPatch, type ReleaseRow, type ReleaseRowUpdate, type ReleaseTarget, type RemoteDatabase, RemoteSigningOptions, RequiredDeep, type ResolvedModel, type ResolvedSchema, type RetentionDefinition, type RetryOptions, type RowOf, SETTINGS_TABLE, type SchemaGenerator, type SchemaSettings, SecretsAdapter, SecretsContext, SigningConfig, type SqlAdapterOptions, type SqlColumnShape, type SqlConnection, type SqlDialect, type SqlExecutor, type SqlResult, type SqlStatement, type SqlTableShape, StorageAdapter, StorageAdapterWith, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StorageOperation, StoragePutInput, StoragePutResult, type StoredBundleDeployment, type StoredRow, type TableDefinition, type TableRow, type ToolingDatabase, type ToolingTarget, type UpdateSet, type VerifiedDatabaseAdapter, type VerifyAdapterOptions, WRITE_GUARD_TABLE, type WriteGuard, type WriteOp, type WriteResult, addDistinct, aggregateBatchingTables, assertStorageOperations, bundleToPatchRows, bundleToRow, canonicalizeAppVersion, compareUtf8, compileReleaseCatalog, coreSchema, coreSettings, coreTarget, countDistinct, createBundleSigningHandler, createBundleStorageKey, createEngine, createEngineDatabase, createEngineSqlMigrator, createKvAdapter, createMemoryAdapter, createSettingsMigrator, createSqlAdapter, createStorageAdapter, createStorageKeyBuilder, createStorageRootUriWithPath, createStorageUri, createStorageUriWithRelativePath, createTableStatements, createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, defineAggregate, definePlugin, defineTable, encodeKvKey, expiresAt, extractTimestampFromUUIDv7, findPhysicalColumn, findPhysicalIndex, generateEngineSql, generateMinBundleId, getBundleArchiveStorageUri, getContentAddressedAssetStoragePath, getContentType, getManifestAssetDownloadPath, getManifestAssetStoragePath, indexOrderColumns, isBrotliManifestAssetPath, isContentAddressedAssetFileHash, isDatabaseBusyError, isDatabaseJsonObject, isDatabaseMetadataObject, isMultiIndex, isRemoteDatabase, isUUIDv7, mergeDistinct, meterReads, migrateCoreSchema, normalizeStoredRow, parseBaseCandidateKey, parseStorageUri, projectCompiledCatalog, projectCompiledRollbackCatalog, quoteSql, referenceCompatibleReleases, releaseRowToRelease, releaseToRow, remoteSigning, replaceStorageUriKeySuffix, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri, rowKey, rowToBundle, rowsToBundles, semverSatisfies, sqlTableShapes, supportedIosPlatforms, targetBaseCandidateKey, toolingTargetOf, verifyAdapter, writeSchemaSettings };
54
+ export { type AggregateBatching, type AggregateChanges, type AggregateDefinition, type AggregateIdentity, type AggregateRow, type AnyHotUpdaterPlugin, ApplePlatform, BUNDLE_STORAGE_PREFIX, type BaseCandidateQuery, type BaseCandidateTarget, BuildAdapter, BuildAdapterArgs, BuildAdapterConfig, BuiltIns, type Bundle, type BundleDeployment, type BundleDetail, type BundlePatchRow, type BundleRow, BundleRowHydrationError, BundleRowHydrationErrorReason, type BundleRowUpdate, CONTENT_ADDRESSED_ASSET_PREFIX, CatalogVersionBound, type ChannelDeleteResult, type ChannelInsertResult, type ChannelRow, type ClientAuth, CompiledCatalogSegment, CompiledReleaseCatalog, ConfigInput, type ConfiguredDatabase, type ConstraintReason, type CoreReader, type CoreReads, type CoreSchema, type CreateRow, CreateStorageAdapterOptions, CreateStorageUriInput, DATABASE_VERSION_COLUMN, type DatabaseAdapter, DatabaseAdapterContractError, DatabaseAdapterInputError, type DatabaseAdapterInputErrorCode, DatabaseAmbiguousCommitError, type DatabaseBundleMetadata, DatabaseBundleNotFoundError, DatabaseConflictError, DatabaseConstraintError, DatabaseCursorError, type DatabaseJson, type DatabaseJsonObject, type DatabaseJsonValue, type DatabaseKey, type DatabaseKeyValue, DatabaseQueryError, type DatabaseReadCount, type DatabaseReadMeter, DatabaseRowReferencedError, DatabaseSchemaError, type DatabaseTooling, DatabaseTransactionError, type DatabaseValue, type DeployReleasePolicy, type Deployment, type DerivedDefinition, type DerivedFields, type Engine, type EngineColumns, type EngineDatabase, type EngineDatabaseOptions, type EngineOptions, type EngineReadCount, type EngineSqlMigratorOptions, type EngineSqlOptions, type FieldDefinition, type FieldReference, type FieldType, type FieldValue, type FindAggregatesModel, type FindManyModel, FingerprintExtraSources, HasMultipleCallSignatures, HotUpdaterConfigError, type HotUpdaterCoreApi, type HotUpdaterDatabase, type HotUpdaterPlugin, HotUpdaterSchemaMigrationRequiredError, type HotUpdaterTransaction, type IndexDefinition, IosBuildDestination, type IosDeviceAccount, type IosDeviceAccountClaim, type IosDeviceOutcome, type IosDeviceOutcomeInput, type IosDeviceRequestResult, type IosDeviceRow, type IosDeviceStatus, type KeyLookup, type KeyValueStore, type KeysetInput, type KvAdapterOptions, type KvCondition, type KvItem, type KvKey, type KvOp, type KvRange, Lazy, LocalSigningConfig, type Lookup, type MemoryAdapterOptions, type MeteredDatabase, type MigrateOptions, type MigrationResult, type Migrator, type ModelDefinition, type ModuleSchema, NativeBuildAndroidScheme, NativeBuildArgs, type NativeBuildArtifactKind, type NativeBuildDeleteResult, type NativeBuildDistribution, type NativeBuildExportMethod, NativeBuildIosScheme, type NativeBuildMarkResult, NativeBuildOptions, type NativeBuildRegistration, type NativeBuildRow, NativeBuildSandboxOptions, type NativeBuildSandboxScope, type NativeBuildScope, type NativeBuildSubmissionDestination, NativeFingerprint, NativeFingerprintOptions, NativeFingerprintProvider, NativeFingerprintSource, type NormalizeOptions, type Page, ParsedStorageUri, type PhysicalColumn, type PhysicalColumnType, type PhysicalIndex, type PhysicalRetention, type PhysicalTable, type Platform, PlatformConfig, type PluginApis, type PluginCli, type PluginClientCredential, type PluginClientPlugin, type PluginContext, type PluginEndpoint, type PluginEndpointMethod, type PluginInstance, type PluginProvides, type PluginTables, Primitive, PromoteReleaseResult, type QueryBound, type QueryRequest, type ReadMeasurement, type ReadOptions, type ReadRow, type ReferenceAction, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, ReleaseCatalogMutationError, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, type ReleaseCatalogRequest, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, ReleaseCatalogScope, type ReleaseFilter, ReleaseManagementError, ReleasePolicyPatch, type ReleaseRow, type ReleaseRowUpdate, type ReleaseTarget, type RemoteDatabase, RequiredDeep, type ResolvedModel, type ResolvedSchema, type RetentionDefinition, type RetryOptions, type RowOf, SETTINGS_TABLE, type SchemaGenerator, type SchemaSettings, SecretRef, SecretsAdapter, SecretsContext, SigningConfig, type SqlAdapterOptions, type SqlColumnShape, type SqlConnection, type SqlDialect, type SqlExecutor, type SqlResult, type SqlStatement, type SqlTableShape, StorageAdapter, StorageAdapterWith, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StorageOperation, StoragePutInput, StoragePutResult, type StoredBundleDeployment, type StoredRow, type TableDefinition, type TableRow, type ToolingDatabase, type ToolingTarget, type UpdateSet, type VerifiedDatabaseAdapter, type VerifyAdapterOptions, WRITE_GUARD_TABLE, type WriteGuard, type WriteOp, type WriteResult, addDistinct, aggregateBatchingTables, assertStorageOperations, bundleToPatchRows, bundleToRow, canonicalizeAppVersion, compareUtf8, compileReleaseCatalog, coreSchema, coreSettings, coreTarget, countDistinct, createBundleStorageKey, createEngine, createEngineDatabase, createEngineSqlMigrator, createKvAdapter, createMemoryAdapter, createSettingsMigrator, createSqlAdapter, createStorageAdapter, createStorageKeyBuilder, createStorageRootUriWithPath, createStorageUri, createStorageUriWithRelativePath, createTableStatements, createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, defineAggregate, definePlugin, defineTable, encodeKvKey, expiresAt, extractTimestampFromUUIDv7, findPhysicalColumn, findPhysicalIndex, generateEngineSql, generateMinBundleId, getBundleArchiveStorageUri, getContentAddressedAssetStoragePath, getContentType, getManifestAssetDownloadPath, getManifestAssetStoragePath, indexOrderColumns, isBrotliManifestAssetPath, isContentAddressedAssetFileHash, isDatabaseBusyError, isDatabaseJsonObject, isDatabaseMetadataObject, isMultiIndex, isRemoteDatabase, isUUIDv7, mergeDistinct, meterReads, migrateCoreSchema, normalizeStoredRow, parseBaseCandidateKey, parseStorageUri, projectCompiledCatalog, projectCompiledRollbackCatalog, quoteSql, referenceCompatibleReleases, releaseRowToRelease, releaseToRow, replaceStorageUriKeySuffix, resolveLazy, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri, rowKey, rowToBundle, rowsToBundles, semverSatisfies, sqlTableShapes, supportedIosPlatforms, targetBaseCandidateKey, toolingTargetOf, verifyAdapter, writeSchemaSettings };
package/dist/index.mjs CHANGED
@@ -13,10 +13,9 @@ import { createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extract
13
13
  import { ReleaseCatalogCompilationError, canonicalizeAppVersion, compileReleaseCatalog, projectCompiledCatalog, projectCompiledRollbackCatalog, referenceCompatibleReleases } from "./releaseCatalogCompiler.mjs";
14
14
  import { ReleaseManagementError } from "./releaseManagement.mjs";
15
15
  import { ReleaseCatalogMutationError } from "./releaseCatalogMutation.mjs";
16
- import { REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, createBundleSigningHandler, remoteSigning } from "./remoteBundleSigning.mjs";
17
16
  import { semverSatisfies } from "./semverSatisfies.mjs";
18
17
  import { isRemoteDatabase } from "./types/databaseConfig.mjs";
19
- import { supportedIosPlatforms } from "./types/index.mjs";
18
+ import { resolveLazy, supportedIosPlatforms } from "./types/index.mjs";
20
19
  import { definePlugin } from "./serverPlugin/definePlugin.mjs";
21
20
  import { defineAggregate, defineTable } from "./serverPlugin/schema.mjs";
22
21
  import { DatabaseAmbiguousCommitError, DatabaseConflictError, DatabaseConstraintError, DatabaseCursorError, DatabaseQueryError, DatabaseTransactionError } from "./serverPlugin/errors.mjs";
@@ -39,4 +38,4 @@ import { createEngine } from "./engine/createEngine.mjs";
39
38
  import { createKvAdapter, encodeKvKey } from "./engine/database/kv/kvAdapter.mjs";
40
39
  import { WRITE_GUARD_TABLE, createSqlAdapter } from "./engine/database/sql/sqlAdapter.mjs";
41
40
  import { createEngineSqlMigrator } from "./engine/db/engineSqlMigrator.mjs";
42
- export { BUNDLE_STORAGE_PREFIX, BundleRowHydrationError, BundleRowHydrationErrorReason, CONTENT_ADDRESSED_ASSET_PREFIX, DATABASE_VERSION_COLUMN, DatabaseAdapterContractError, DatabaseAdapterInputError, DatabaseAmbiguousCommitError, DatabaseBundleNotFoundError, DatabaseConflictError, DatabaseConstraintError, DatabaseCursorError, DatabaseQueryError, DatabaseRowReferencedError, DatabaseSchemaError, DatabaseTransactionError, HotUpdaterConfigError, HotUpdaterSchemaMigrationRequiredError, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, ReleaseCatalogCompilationError, ReleaseCatalogMutationError, ReleaseManagementError, SETTINGS_TABLE, WRITE_GUARD_TABLE, addDistinct, aggregateBatchingTables, assertStorageOperations, bundleToPatchRows, bundleToRow, canonicalizeAppVersion, compareUtf8, compileReleaseCatalog, coreSchema, coreSettings, coreTarget, countDistinct, createBundleSigningHandler, createBundleStorageKey, createEngine, createEngineDatabase, createEngineSqlMigrator, createKvAdapter, createMemoryAdapter, createSettingsMigrator, createSqlAdapter, createStorageAdapter, createStorageKeyBuilder, createStorageRootUriWithPath, createStorageUri, createStorageUriWithRelativePath, createTableStatements, createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, defineAggregate, definePlugin, defineTable, encodeKvKey, expiresAt, extractTimestampFromUUIDv7, findPhysicalColumn, findPhysicalIndex, generateEngineSql, generateMinBundleId, getBundleArchiveStorageUri, getContentAddressedAssetStoragePath, getContentType, getManifestAssetDownloadPath, getManifestAssetStoragePath, indexOrderColumns, isBrotliManifestAssetPath, isContentAddressedAssetFileHash, isDatabaseBusyError, isDatabaseJsonObject, isDatabaseMetadataObject, isMultiIndex, isRemoteDatabase, isUUIDv7, mergeDistinct, meterReads, migrateCoreSchema, normalizeStoredRow, parseBaseCandidateKey, parseStorageUri, projectCompiledCatalog, projectCompiledRollbackCatalog, quoteSql, referenceCompatibleReleases, releaseRowToRelease, releaseToRow, remoteSigning, replaceStorageUriKeySuffix, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri, rowKey, rowToBundle, rowsToBundles, semverSatisfies, sqlTableShapes, supportedIosPlatforms, targetBaseCandidateKey, toolingTargetOf, verifyAdapter, writeSchemaSettings };
41
+ export { BUNDLE_STORAGE_PREFIX, BundleRowHydrationError, BundleRowHydrationErrorReason, CONTENT_ADDRESSED_ASSET_PREFIX, DATABASE_VERSION_COLUMN, DatabaseAdapterContractError, DatabaseAdapterInputError, DatabaseAmbiguousCommitError, DatabaseBundleNotFoundError, DatabaseConflictError, DatabaseConstraintError, DatabaseCursorError, DatabaseQueryError, DatabaseRowReferencedError, DatabaseSchemaError, DatabaseTransactionError, HotUpdaterConfigError, HotUpdaterSchemaMigrationRequiredError, ReleaseCatalogCompilationError, ReleaseCatalogMutationError, ReleaseManagementError, SETTINGS_TABLE, WRITE_GUARD_TABLE, addDistinct, aggregateBatchingTables, assertStorageOperations, bundleToPatchRows, bundleToRow, canonicalizeAppVersion, compareUtf8, compileReleaseCatalog, coreSchema, coreSettings, coreTarget, countDistinct, createBundleStorageKey, createEngine, createEngineDatabase, createEngineSqlMigrator, createKvAdapter, createMemoryAdapter, createSettingsMigrator, createSqlAdapter, createStorageAdapter, createStorageKeyBuilder, createStorageRootUriWithPath, createStorageUri, createStorageUriWithRelativePath, createTableStatements, createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, defineAggregate, definePlugin, defineTable, encodeKvKey, expiresAt, extractTimestampFromUUIDv7, findPhysicalColumn, findPhysicalIndex, generateEngineSql, generateMinBundleId, getBundleArchiveStorageUri, getContentAddressedAssetStoragePath, getContentType, getManifestAssetDownloadPath, getManifestAssetStoragePath, indexOrderColumns, isBrotliManifestAssetPath, isContentAddressedAssetFileHash, isDatabaseBusyError, isDatabaseJsonObject, isDatabaseMetadataObject, isMultiIndex, isRemoteDatabase, isUUIDv7, mergeDistinct, meterReads, migrateCoreSchema, normalizeStoredRow, parseBaseCandidateKey, parseStorageUri, projectCompiledCatalog, projectCompiledRollbackCatalog, quoteSql, referenceCompatibleReleases, releaseRowToRelease, releaseToRow, replaceStorageUriKeySuffix, resolveLazy, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri, rowKey, rowToBundle, rowsToBundles, semverSatisfies, sqlTableShapes, supportedIosPlatforms, targetBaseCandidateKey, toolingTargetOf, verifyAdapter, writeSchemaSettings };
@@ -36,6 +36,10 @@ interface DerivedShape {
36
36
  readonly type: FieldType;
37
37
  /** Up to 16 values; the row is indexed once per value. */
38
38
  readonly multi?: true;
39
+ /** Strings: the maximum length; unbounded text when absent. */
40
+ readonly maxLength?: number;
41
+ /** Strings: ASCII only, so a long key fits MySQL's 3,072-byte index limit. */
42
+ readonly ascii?: true;
39
43
  /** Null, or an empty list, leaves the row out of indexes on this field. */
40
44
  compute(row: never): unknown;
41
45
  }
@@ -36,6 +36,10 @@ interface DerivedShape {
36
36
  readonly type: FieldType;
37
37
  /** Up to 16 values; the row is indexed once per value. */
38
38
  readonly multi?: true;
39
+ /** Strings: the maximum length; unbounded text when absent. */
40
+ readonly maxLength?: number;
41
+ /** Strings: ASCII only, so a long key fits MySQL's 3,072-byte index limit. */
42
+ readonly ascii?: true;
39
43
  /** Null, or an empty list, leaves the row out of indexes on this field. */
40
44
  compute(row: never): unknown;
41
45
  }
@@ -21,6 +21,10 @@ interface DerivedDefinition<TRow = never, TType extends FieldType = FieldType> {
21
21
  readonly type: TType;
22
22
  /** Up to 16 values; the row is indexed once per value. */
23
23
  readonly multi?: true;
24
+ /** Strings: the maximum length; unbounded text when absent. */
25
+ readonly maxLength?: number;
26
+ /** Strings: ASCII only, so a long key fits MySQL's 3,072-byte index limit. */
27
+ readonly ascii?: true;
24
28
  /** Null, or an empty list, leaves the row out of indexes on this field. */
25
29
  compute(row: TRow): FieldValue<TType> | null | readonly FieldValue<TType>[];
26
30
  }
@@ -21,6 +21,10 @@ interface DerivedDefinition<TRow = never, TType extends FieldType = FieldType> {
21
21
  readonly type: TType;
22
22
  /** Up to 16 values; the row is indexed once per value. */
23
23
  readonly multi?: true;
24
+ /** Strings: the maximum length; unbounded text when absent. */
25
+ readonly maxLength?: number;
26
+ /** Strings: ASCII only, so a long key fits MySQL's 3,072-byte index limit. */
27
+ readonly ascii?: true;
24
28
  /** Null, or an empty list, leaves the row out of indexes on this field. */
25
29
  compute(row: TRow): FieldValue<TType> | null | readonly FieldValue<TType>[];
26
30
  }
@@ -3,28 +3,17 @@ import { RetryOptions } from "../engine/database/engineTransaction.cjs";
3
3
  import { HotUpdaterCoreApi } from "../coreApi.cjs";
4
4
  //#region src/types/databaseConfig.d.ts
5
5
  /**
6
- * How changes to aggregates declared `batched` reach their rows: after the
7
- * transaction that made them commits, merged with other transactions'
8
- * changes into one write per aggregate row. Databases that bill each write
9
- * (DynamoDB, Firestore) batch them.
6
+ * How changes to aggregates declared `batched` reach their rows: each
7
+ * transaction writes its changes as one log row, and a compaction merges
8
+ * pending log rows into one write per aggregate row. Databases that bill each
9
+ * write (DynamoDB, Firestore, Cosmos DB) batch them.
10
10
  */
11
11
  interface AggregateBatching {
12
12
  /**
13
- * `"log"` (the default) writes each transaction's changes as one log row
14
- * in that transaction, and a compaction merges pending log rows into the
15
- * aggregates. It loses nothing and suits every runtime. `"memory"` keeps
16
- * changes in the process until a timer flushes them. It writes no log
17
- * rows, but a crash loses up to one window, and a runtime that freezes
18
- * or drops the process between requests (Lambda, Cloud Functions,
19
- * Workers) loses more, so use it only on a long-lived server.
20
- */
21
- readonly mode?: "log" | "memory";
22
- /**
23
- * How long changes wait before a compaction or a flush: `"log"` compacts
24
- * after a commit once this has passed since the last compaction, 60
25
- * seconds by default, and `"memory"` flushes this often, 15 seconds by
26
- * default. A read that cannot compact (read-only credentials) shows
27
- * aggregates that can leave out up to one window of the latest changes.
13
+ * A commit compacts once this has passed since the last compaction, 60
14
+ * seconds by default. A read compacts first; one that cannot (read-only
15
+ * credentials) shows aggregates that can leave out up to one window of the
16
+ * latest changes.
28
17
  */
29
18
  readonly windowMs?: number;
30
19
  }