@hot-updater/plugin-core 1.2.0-rc.2 → 1.2.0-rc.20
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/coreApi.d.cts +19 -4
- package/dist/coreApi.d.mts +19 -4
- package/dist/engine/core/schema.cjs +17 -1
- package/dist/engine/core/schema.d.cts +9 -0
- package/dist/engine/core/schema.d.mts +9 -0
- package/dist/engine/core/schema.mjs +17 -1
- package/dist/engine/createEngine.cjs +1 -2
- package/dist/engine/createEngine.d.cts +1 -6
- package/dist/engine/createEngine.d.mts +1 -6
- package/dist/engine/createEngine.mjs +1 -2
- package/dist/engine/database/aggregateBatching.cjs +24 -116
- package/dist/engine/database/aggregateBatching.mjs +24 -116
- package/dist/engine/database/database.cjs +1 -4
- package/dist/engine/database/database.mjs +1 -4
- package/dist/index.cjs +1 -7
- package/dist/index.d.cts +3 -4
- package/dist/index.d.mts +3 -4
- package/dist/index.mjs +2 -3
- package/dist/types/databaseConfig.d.cts +8 -19
- package/dist/types/databaseConfig.d.mts +8 -19
- package/dist/types/databaseRows.d.cts +5 -0
- package/dist/types/databaseRows.d.mts +5 -0
- package/dist/types/index.cjs +3 -0
- package/dist/types/index.d.cts +98 -59
- package/dist/types/index.d.mts +98 -59
- package/dist/types/index.mjs +3 -1
- package/dist/types/models.d.cts +9 -1
- package/dist/types/models.d.mts +9 -1
- package/dist/types/public.d.cts +2 -2
- package/dist/types/public.d.mts +2 -2
- package/package.json +3 -9
- package/dist/remoteBundleSigning.cjs +0 -357
- package/dist/remoteBundleSigning.d.cts +0 -38
- package/dist/remoteBundleSigning.d.mts +0 -38
- 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
|
-
|
|
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;
|
|
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
|
-
*
|
|
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
|
|
168
|
-
* the row for counters, and a guarded rewrite
|
|
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
|
|
172
|
-
const keys = changes.map(({
|
|
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
|
|
227
|
-
* them
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
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: {
|
|
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
|
|
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 (
|
|
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
|
|
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 (
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
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 {
|
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
|
@@ -17,8 +17,8 @@ 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,
|
|
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, 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
24
|
import { BundleDeployment, BundleDetail, DeployReleasePolicy, Deployment, HotUpdaterCoreApi, KeysetInput, NativeBuildRegistration, NativeBuildScope, ReleaseFilter, ReleaseTarget, StoredBundleDeployment } from "./coreApi.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,
|
|
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 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, NativeBuildIosScheme, type NativeBuildMarkResult, 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, 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
|
@@ -17,8 +17,8 @@ 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,
|
|
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, 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
24
|
import { BundleDeployment, BundleDetail, DeployReleasePolicy, Deployment, HotUpdaterCoreApi, KeysetInput, NativeBuildRegistration, NativeBuildScope, ReleaseFilter, ReleaseTarget, StoredBundleDeployment } from "./coreApi.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,
|
|
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 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, NativeBuildIosScheme, type NativeBuildMarkResult, 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, 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,
|
|
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 };
|
|
@@ -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:
|
|
7
|
-
* transaction
|
|
8
|
-
*
|
|
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
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* aggregates
|
|
16
|
-
* changes
|
|
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
|
}
|
|
@@ -3,28 +3,17 @@ import { RetryOptions } from "../engine/database/engineTransaction.mjs";
|
|
|
3
3
|
import { HotUpdaterCoreApi } from "../coreApi.mjs";
|
|
4
4
|
//#region src/types/databaseConfig.d.ts
|
|
5
5
|
/**
|
|
6
|
-
* How changes to aggregates declared `batched` reach their rows:
|
|
7
|
-
* transaction
|
|
8
|
-
*
|
|
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
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* aggregates
|
|
16
|
-
* changes
|
|
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
|
}
|
|
@@ -105,6 +105,11 @@ interface NativeBuildRow {
|
|
|
105
105
|
* by the build number, and a fingerprint build records no app version.
|
|
106
106
|
*/
|
|
107
107
|
readonly submitted_version: string | null;
|
|
108
|
+
/**
|
|
109
|
+
* True on the build marked as what the store sells, which deploys patch from
|
|
110
|
+
* over the scope's newest build; null on every other. A scope has one.
|
|
111
|
+
*/
|
|
112
|
+
readonly store_build: true | null;
|
|
108
113
|
}
|
|
109
114
|
//#endregion
|
|
110
115
|
export { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, NativeBuildArtifactKind, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow };
|
|
@@ -105,6 +105,11 @@ interface NativeBuildRow {
|
|
|
105
105
|
* by the build number, and a fingerprint build records no app version.
|
|
106
106
|
*/
|
|
107
107
|
readonly submitted_version: string | null;
|
|
108
|
+
/**
|
|
109
|
+
* True on the build marked as what the store sells, which deploys patch from
|
|
110
|
+
* over the scope's newest build; null on every other. A scope has one.
|
|
111
|
+
*/
|
|
112
|
+
readonly store_build: true | null;
|
|
108
113
|
}
|
|
109
114
|
//#endregion
|
|
110
115
|
export { BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, NativeBuildArtifactKind, NativeBuildRow, NativeBuildSubmissionDestination, ReleaseCatalogRow, ReleaseRow };
|
package/dist/types/index.cjs
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
const require_databaseConfig = require("./databaseConfig.cjs");
|
|
2
2
|
//#region src/types/index.ts
|
|
3
|
+
/** The value of a `Lazy`, calling its function. */
|
|
4
|
+
const resolveLazy = async (value) => typeof value === "function" ? await value() : value;
|
|
3
5
|
/**
|
|
4
6
|
* Supported Apple platforms for building and deployment
|
|
5
7
|
*/
|
|
6
8
|
const supportedIosPlatforms = { ios: "ios" };
|
|
7
9
|
//#endregion
|
|
8
10
|
exports.isRemoteDatabase = require_databaseConfig.isRemoteDatabase;
|
|
11
|
+
exports.resolveLazy = resolveLazy;
|
|
9
12
|
exports.supportedIosPlatforms = supportedIosPlatforms;
|