@hot-updater/plugin-core 1.0.0-rc.1 → 1.0.0-rc.2
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/_virtual/_rolldown/runtime.cjs +1 -1
- package/dist/assetStorageLayout.cjs +4 -2
- package/dist/assetStorageLayout.d.cts +5 -24
- package/dist/assetStorageLayout.d.mts +5 -24
- package/dist/assetStorageLayout.mjs +4 -2
- package/dist/calculatePagination.d.cts +0 -1
- package/dist/calculatePagination.d.mts +0 -1
- package/dist/compressionFormat.cjs +12 -5
- package/dist/compressionFormat.d.cts +1 -1
- package/dist/compressionFormat.d.mts +1 -1
- package/dist/compressionFormat.mjs +11 -4
- package/dist/contentAddressedAssets.d.cts +1 -4
- package/dist/contentAddressedAssets.d.mts +1 -4
- package/dist/createDatabasePlugin.cjs +161 -40
- package/dist/createDatabasePlugin.d.cts +3 -1
- package/dist/createDatabasePlugin.d.mts +3 -1
- package/dist/createDatabasePlugin.mjs +161 -41
- package/dist/createStoragePlugin.d.cts +0 -1
- package/dist/createStoragePlugin.d.mts +0 -1
- package/dist/databaseClient.cjs +6 -1
- package/dist/databaseClient.d.cts +1 -2
- package/dist/databaseClient.d.mts +1 -2
- package/dist/databaseClient.mjs +6 -2
- package/dist/databaseClientReads.cjs +3 -1
- package/dist/databaseClientReads.mjs +3 -2
- package/dist/databaseClientUpdates.cjs +2 -1
- package/dist/databaseClientUpdates.d.cts +1 -1
- package/dist/databaseClientUpdates.d.mts +1 -1
- package/dist/databaseClientUpdates.mjs +2 -0
- package/dist/databaseJsonValue.cjs +2 -0
- package/dist/databaseJsonValue.d.cts +1 -0
- package/dist/databaseJsonValue.d.mts +1 -0
- package/dist/databaseJsonValue.mjs +1 -1
- package/dist/databaseMetadata.cjs +0 -1
- package/dist/databasePluginCrud.cjs +3 -1
- package/dist/databasePluginCrud.d.cts +4 -1
- package/dist/databasePluginCrud.d.mts +4 -1
- package/dist/databasePluginCrud.mjs +4 -3
- package/dist/databasePluginCrudValidation.d.cts +6 -1
- package/dist/databasePluginCrudValidation.d.mts +6 -1
- package/dist/databasePluginCrudValidationErrors.cjs +1 -0
- package/dist/databasePluginCrudValidationErrors.mjs +1 -0
- package/dist/databasePluginCrudValidationFields.cjs +43 -13
- package/dist/databasePluginCrudValidationFields.d.cts +1 -1
- package/dist/databasePluginCrudValidationFields.d.mts +1 -1
- package/dist/databasePluginCrudValidationFields.mjs +41 -13
- package/dist/databasePluginCrudValidationMutations.cjs +20 -1
- package/dist/databasePluginCrudValidationMutations.d.cts +1 -1
- package/dist/databasePluginCrudValidationMutations.d.mts +1 -1
- package/dist/databasePluginCrudValidationMutations.mjs +20 -2
- package/dist/databasePluginCrudValidationQueries.d.cts +2 -1
- package/dist/databasePluginCrudValidationQueries.d.mts +2 -1
- package/dist/databasePluginCrudValidationRows.d.cts +1 -1
- package/dist/databasePluginCrudValidationRows.d.mts +1 -1
- package/dist/databaseRows.cjs +0 -1
- package/dist/databaseRows.d.cts +2 -6
- package/dist/databaseRows.d.mts +2 -6
- package/dist/index.cjs +4 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +2 -1
- package/dist/insightsContract.cjs +157 -0
- package/dist/insightsContract.d.cts +11 -0
- package/dist/insightsContract.d.mts +11 -0
- package/dist/insightsContract.mjs +153 -0
- package/dist/internal.d.cts +5 -4
- package/dist/internal.d.mts +5 -4
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/comparison-DenM3wCn.cjs +136 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/comparison-DenM3wCn.mjs +116 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/range-DvX-Y6iv.cjs +167 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/range-DvX-Y6iv.mjs +165 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/set-CC5YeoYX.cjs +42 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/set-CC5YeoYX.mjs +39 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/version-CQ98ZBpL.cjs +39 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/version-CQ98ZBpL.mjs +37 -0
- package/dist/paginateBundles.d.cts +1 -8
- package/dist/paginateBundles.d.mts +1 -8
- package/dist/parseStorageUri.d.cts +1 -5
- package/dist/parseStorageUri.d.mts +1 -5
- package/dist/queryBundles.d.cts +0 -1
- package/dist/queryBundles.d.mts +0 -1
- package/dist/releaseCatalogCompiler.cjs +15 -12
- package/dist/releaseCatalogCompiler.d.cts +0 -1
- package/dist/releaseCatalogCompiler.d.mts +0 -1
- package/dist/releaseCatalogCompiler.mjs +11 -7
- package/dist/releaseCatalogMutation.cjs +1 -1
- package/dist/releaseCatalogMutation.d.cts +1 -1
- package/dist/releaseCatalogMutation.d.mts +1 -1
- package/dist/releaseCatalogMutation.mjs +1 -0
- package/dist/releaseManagement.cjs +3 -2
- package/dist/releaseManagement.d.cts +1 -1
- package/dist/releaseManagement.d.mts +1 -1
- package/dist/releaseManagement.mjs +3 -1
- package/dist/remoteBundleSigning.cjs +4 -4
- package/dist/remoteBundleSigning.d.cts +2 -13
- package/dist/remoteBundleSigning.d.mts +2 -13
- package/dist/remoteBundleSigning.mjs +4 -4
- package/dist/requestBundleCache.d.cts +1 -2
- package/dist/requestBundleCache.d.mts +1 -2
- package/dist/semverSatisfies.cjs +4 -3
- package/dist/semverSatisfies.mjs +2 -1
- package/dist/storageDownloadPath.cjs +2 -1
- package/dist/storageDownloadPath.d.cts +1 -3
- package/dist/storageDownloadPath.d.mts +1 -3
- package/dist/storageDownloadPath.mjs +2 -1
- package/dist/types/database.d.cts +4 -3
- package/dist/types/database.d.mts +4 -3
- package/dist/types/databaseFields.cjs +13 -0
- package/dist/types/databaseFields.d.cts +1 -0
- package/dist/types/databaseFields.d.mts +1 -0
- package/dist/types/databaseFields.mjs +13 -0
- package/dist/types/databaseOperations.d.cts +26 -15
- package/dist/types/databaseOperations.d.mts +26 -15
- package/dist/types/databasePlugin.d.cts +70 -12
- package/dist/types/databasePlugin.d.mts +70 -12
- package/dist/types/databaseQuery.d.cts +2 -3
- package/dist/types/databaseQuery.d.mts +2 -3
- package/dist/types/databaseRows.d.cts +3 -2
- package/dist/types/databaseRows.d.mts +3 -2
- package/dist/types/index.d.cts +11 -7
- package/dist/types/index.d.mts +11 -7
- package/dist/types/internal.d.cts +5 -4
- package/dist/types/internal.d.mts +5 -4
- package/dist/types/public.d.cts +4 -3
- package/dist/types/public.d.mts +4 -3
- package/dist/types/utils.d.cts +1 -1
- package/dist/types/utils.d.mts +1 -1
- package/dist/uuidv7.cjs +7 -2
- package/dist/uuidv7.d.cts +0 -1
- package/dist/uuidv7.d.mts +0 -1
- package/dist/uuidv7.mjs +1 -1
- package/package.json +3 -3
- package/dist/node_modules/.pnpm/verkit@0.3.2/node_modules/verkit/dist/index.cjs +0 -345
- package/dist/node_modules/.pnpm/verkit@0.3.2/node_modules/verkit/dist/index.mjs +0 -341
|
@@ -13,11 +13,7 @@ interface CreateStorageUriInput {
|
|
|
13
13
|
* Creates a hierarchical storage identifier in the form
|
|
14
14
|
* `protocol://bucket/slash-separated-encoded-key`.
|
|
15
15
|
*/
|
|
16
|
-
declare const createStorageUri: ({
|
|
17
|
-
protocol,
|
|
18
|
-
bucket,
|
|
19
|
-
key
|
|
20
|
-
}: CreateStorageUriInput) => string;
|
|
16
|
+
declare const createStorageUri: ({ protocol, bucket, key }: CreateStorageUriInput) => string;
|
|
21
17
|
/**
|
|
22
18
|
* Parses a hierarchical storage identifier and decodes each key segment.
|
|
23
19
|
*
|
package/dist/queryBundles.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Bundle, DatabaseBundleIdFilter, DatabaseBundleQueryOrder, DatabaseBundleQueryWhere } from "./types/index.cjs";
|
|
2
|
-
|
|
3
2
|
//#region src/queryBundles.d.ts
|
|
4
3
|
declare function bundleIdMatchesFilter(id: string, filter: DatabaseBundleIdFilter | undefined): boolean;
|
|
5
4
|
declare function bundleMatchesQueryWhere(bundle: Bundle, where: DatabaseBundleQueryWhere | undefined): boolean;
|
package/dist/queryBundles.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Bundle, DatabaseBundleIdFilter, DatabaseBundleQueryOrder, DatabaseBundleQueryWhere } from "./types/index.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/queryBundles.d.ts
|
|
4
3
|
declare function bundleIdMatchesFilter(id: string, filter: DatabaseBundleIdFilter | undefined): boolean;
|
|
5
4
|
declare function bundleMatchesQueryWhere(bundle: Bundle, where: DatabaseBundleQueryWhere | undefined): boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
require("./
|
|
2
|
-
const
|
|
1
|
+
const require_comparison_DenM3wCn = require("./node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/comparison-DenM3wCn.cjs");
|
|
2
|
+
const require_range_DvX_Y6iv = require("./node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/range-DvX-Y6iv.cjs");
|
|
3
|
+
const require_version_CQ98ZBpL = require("./node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/version-CQ98ZBpL.cjs");
|
|
3
4
|
let _hot_updater_core = require("@hot-updater/core");
|
|
4
5
|
//#region src/releaseCatalogCompiler.ts
|
|
5
6
|
var ReleaseCatalogCompilationError = class extends Error {
|
|
@@ -11,7 +12,7 @@ var ReleaseCatalogCompilationError = class extends Error {
|
|
|
11
12
|
}
|
|
12
13
|
};
|
|
13
14
|
function compareBounds(left, right) {
|
|
14
|
-
return
|
|
15
|
+
return require_comparison_DenM3wCn.t(left, right);
|
|
15
16
|
}
|
|
16
17
|
function strongerLower(current, candidate) {
|
|
17
18
|
if (current === null) return candidate;
|
|
@@ -34,7 +35,7 @@ function strongerUpper(current, candidate) {
|
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
37
|
function comparatorVersion(comparator) {
|
|
37
|
-
const version = comparator.version &&
|
|
38
|
+
const version = comparator.version && require_version_CQ98ZBpL.p(comparator.version);
|
|
38
39
|
if (version === null) throw new ReleaseCatalogCompilationError("INVALID_TARGET_RANGE", `Invalid comparator: ${comparator.value}`);
|
|
39
40
|
return version;
|
|
40
41
|
}
|
|
@@ -81,7 +82,7 @@ function comparatorSetToInterval(comparators) {
|
|
|
81
82
|
}
|
|
82
83
|
function rangeToIntervals(range) {
|
|
83
84
|
try {
|
|
84
|
-
return
|
|
85
|
+
return require_range_DvX_Y6iv.m(range).sets.flatMap((comparators) => {
|
|
85
86
|
const interval = comparatorSetToInterval(comparators);
|
|
86
87
|
return interval === null ? [] : [interval];
|
|
87
88
|
});
|
|
@@ -278,15 +279,16 @@ function compileAppVersion(releases) {
|
|
|
278
279
|
const retainedIds = new Set(segmentReleases.flatMap(({ retainedIds, rollbackIds }) => [...retainedIds, ...rollbackIds]));
|
|
279
280
|
const retainedReleases = releases.filter((release) => retainedIds.has(release.id));
|
|
280
281
|
const descriptorIndex = new Map(retainedReleases.map((release, index) => [release.id, index]));
|
|
282
|
+
const segments = mergeSegments(segmentReleases.map(({ segment, retainedIds, rollbackIds }) => ({
|
|
283
|
+
...segment,
|
|
284
|
+
releaseIndexes: releases.filter((release) => retainedIds.has(release.id)).map((release) => descriptorIndex.get(release.id)).filter((index) => index !== void 0),
|
|
285
|
+
rollbackReleaseIndexes: releases.filter((release) => rollbackIds.has(release.id)).map((release) => descriptorIndex.get(release.id)).filter((index) => index !== void 0)
|
|
286
|
+
})).filter((segment) => segment.releaseIndexes.length > 0 || segment.rollbackReleaseIndexes.length > 0));
|
|
281
287
|
return {
|
|
282
288
|
envelope: {
|
|
283
289
|
fallbackPolicy: _hot_updater_core.RELEASE_CATALOG_FALLBACK_POLICY,
|
|
284
290
|
schemaVersion: _hot_updater_core.RELEASE_CATALOG_SCHEMA_VERSION,
|
|
285
|
-
segments
|
|
286
|
-
...segment,
|
|
287
|
-
releaseIndexes: releases.filter((release) => retainedIds.has(release.id)).map((release) => descriptorIndex.get(release.id)).filter((index) => index !== void 0),
|
|
288
|
-
rollbackReleaseIndexes: releases.filter((release) => rollbackIds.has(release.id)).map((release) => descriptorIndex.get(release.id)).filter((index) => index !== void 0)
|
|
289
|
-
})).filter((segment) => segment.releaseIndexes.length > 0 || segment.rollbackReleaseIndexes.length > 0)),
|
|
291
|
+
segments,
|
|
290
292
|
strategy: "APP_VERSION"
|
|
291
293
|
},
|
|
292
294
|
retainedReleases
|
|
@@ -354,7 +356,8 @@ function versionInSegment(version, segment) {
|
|
|
354
356
|
return true;
|
|
355
357
|
}
|
|
356
358
|
function canonicalizeAppVersion(appVersion) {
|
|
357
|
-
|
|
359
|
+
const version = require_version_CQ98ZBpL.n(appVersion);
|
|
360
|
+
return version ? require_version_CQ98ZBpL.m(version) : null;
|
|
358
361
|
}
|
|
359
362
|
function projectCompiledCatalog(catalog, appVersion) {
|
|
360
363
|
let indexes;
|
|
@@ -380,7 +383,7 @@ function projectCompiledRollbackCatalog(catalog, appVersion) {
|
|
|
380
383
|
function referenceCompatibleReleases(releases, appVersion) {
|
|
381
384
|
const canonicalVersion = canonicalizeAppVersion(appVersion);
|
|
382
385
|
if (!canonicalVersion) return [];
|
|
383
|
-
return releases.filter((release) => release.enabled && release.targetAppVersion !== null &&
|
|
386
|
+
return releases.filter((release) => release.enabled && release.targetAppVersion !== null && require_range_DvX_Y6iv.f(canonicalVersion, release.targetAppVersion));
|
|
384
387
|
}
|
|
385
388
|
//#endregion
|
|
386
389
|
exports.ReleaseCatalogCompilationError = ReleaseCatalogCompilationError;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { isUUIDv7 as isUUIDv7$1 } from "./uuidv7.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { t as compare } from "./node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/comparison-DenM3wCn.mjs";
|
|
3
|
+
import { f as satisfies, m as parseRange } from "./node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/range-DvX-Y6iv.mjs";
|
|
4
|
+
import { m as normalizeFull, n as coerce, p as normalize } from "./node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/version-CQ98ZBpL.mjs";
|
|
3
5
|
import { MAX_COMPILED_CATALOG_BYTES, MAX_DISTINCT_TARGET_COHORTS_PER_SCOPE, MAX_TARGET_COHORTS_PER_RELEASE, NUMERIC_COHORT_SIZE, RELEASE_CATALOG_FALLBACK_POLICY, RELEASE_CATALOG_SCHEMA_VERSION, getNumericCohortValue, getRolledOutNumericCohorts, isCustomCohort, normalizeCohortValue, normalizeRolloutCohortCount } from "@hot-updater/core";
|
|
4
6
|
//#region src/releaseCatalogCompiler.ts
|
|
5
7
|
var ReleaseCatalogCompilationError = class extends Error {
|
|
@@ -278,15 +280,16 @@ function compileAppVersion(releases) {
|
|
|
278
280
|
const retainedIds = new Set(segmentReleases.flatMap(({ retainedIds, rollbackIds }) => [...retainedIds, ...rollbackIds]));
|
|
279
281
|
const retainedReleases = releases.filter((release) => retainedIds.has(release.id));
|
|
280
282
|
const descriptorIndex = new Map(retainedReleases.map((release, index) => [release.id, index]));
|
|
283
|
+
const segments = mergeSegments(segmentReleases.map(({ segment, retainedIds, rollbackIds }) => ({
|
|
284
|
+
...segment,
|
|
285
|
+
releaseIndexes: releases.filter((release) => retainedIds.has(release.id)).map((release) => descriptorIndex.get(release.id)).filter((index) => index !== void 0),
|
|
286
|
+
rollbackReleaseIndexes: releases.filter((release) => rollbackIds.has(release.id)).map((release) => descriptorIndex.get(release.id)).filter((index) => index !== void 0)
|
|
287
|
+
})).filter((segment) => segment.releaseIndexes.length > 0 || segment.rollbackReleaseIndexes.length > 0));
|
|
281
288
|
return {
|
|
282
289
|
envelope: {
|
|
283
290
|
fallbackPolicy: RELEASE_CATALOG_FALLBACK_POLICY,
|
|
284
291
|
schemaVersion: RELEASE_CATALOG_SCHEMA_VERSION,
|
|
285
|
-
segments
|
|
286
|
-
...segment,
|
|
287
|
-
releaseIndexes: releases.filter((release) => retainedIds.has(release.id)).map((release) => descriptorIndex.get(release.id)).filter((index) => index !== void 0),
|
|
288
|
-
rollbackReleaseIndexes: releases.filter((release) => rollbackIds.has(release.id)).map((release) => descriptorIndex.get(release.id)).filter((index) => index !== void 0)
|
|
289
|
-
})).filter((segment) => segment.releaseIndexes.length > 0 || segment.rollbackReleaseIndexes.length > 0)),
|
|
292
|
+
segments,
|
|
290
293
|
strategy: "APP_VERSION"
|
|
291
294
|
},
|
|
292
295
|
retainedReleases
|
|
@@ -354,7 +357,8 @@ function versionInSegment(version, segment) {
|
|
|
354
357
|
return true;
|
|
355
358
|
}
|
|
356
359
|
function canonicalizeAppVersion(appVersion) {
|
|
357
|
-
|
|
360
|
+
const version = coerce(appVersion);
|
|
361
|
+
return version ? normalizeFull(version) : null;
|
|
358
362
|
}
|
|
359
363
|
function projectCompiledCatalog(catalog, appVersion) {
|
|
360
364
|
let indexes;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
require("./_virtual/_rolldown/runtime.cjs");
|
|
2
1
|
const require_uuidv7 = require("./uuidv7.cjs");
|
|
3
2
|
const require_databaseRows = require("./databaseRows.cjs");
|
|
4
3
|
const require_releaseCatalogCompiler = require("./releaseCatalogCompiler.cjs");
|
|
@@ -7,6 +6,7 @@ let _hot_updater_core = require("@hot-updater/core");
|
|
|
7
6
|
const RELEASE_PAGE_SIZE = 1e3;
|
|
8
7
|
const DEFAULT_MAX_ATTEMPTS = 3;
|
|
9
8
|
var ReleaseCatalogMutationError = class extends Error {
|
|
9
|
+
code;
|
|
10
10
|
name = "ReleaseCatalogMutationError";
|
|
11
11
|
constructor(code, message) {
|
|
12
12
|
super(message);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.cjs";
|
|
2
2
|
import { BundleRepository, DatabaseChange } from "./types/databasePlugin.cjs";
|
|
3
3
|
import { ReleaseRowUpdate } from "./types/databaseOperations.cjs";
|
|
4
|
+
import "./types/index.cjs";
|
|
4
5
|
import { ReleaseCatalogCompilation } from "./releaseCatalogCompiler.cjs";
|
|
5
|
-
|
|
6
6
|
//#region src/releaseCatalogMutation.d.ts
|
|
7
7
|
interface ReleaseCatalogScope {
|
|
8
8
|
readonly channelId: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.mjs";
|
|
2
2
|
import { BundleRepository, DatabaseChange } from "./types/databasePlugin.mjs";
|
|
3
3
|
import { ReleaseRowUpdate } from "./types/databaseOperations.mjs";
|
|
4
|
+
import "./types/index.mjs";
|
|
4
5
|
import { ReleaseCatalogCompilation } from "./releaseCatalogCompiler.mjs";
|
|
5
|
-
|
|
6
6
|
//#region src/releaseCatalogMutation.d.ts
|
|
7
7
|
interface ReleaseCatalogScope {
|
|
8
8
|
readonly channelId: string;
|
|
@@ -6,6 +6,7 @@ import { createReleaseCatalogScopeKey, encodeChannelKey } from "@hot-updater/cor
|
|
|
6
6
|
const RELEASE_PAGE_SIZE = 1e3;
|
|
7
7
|
const DEFAULT_MAX_ATTEMPTS = 3;
|
|
8
8
|
var ReleaseCatalogMutationError = class extends Error {
|
|
9
|
+
code;
|
|
9
10
|
name = "ReleaseCatalogMutationError";
|
|
10
11
|
constructor(code, message) {
|
|
11
12
|
super(message);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
require("./_virtual/_rolldown/runtime.cjs");
|
|
2
1
|
const require_uuidv7 = require("./uuidv7.cjs");
|
|
3
2
|
const require_releaseCatalogMutation = require("./releaseCatalogMutation.cjs");
|
|
4
3
|
let _hot_updater_core = require("@hot-updater/core");
|
|
5
4
|
//#region src/releaseManagement.ts
|
|
6
5
|
const RELEASE_PAGE_SIZE = 1e3;
|
|
7
6
|
var ReleaseManagementError = class extends Error {
|
|
7
|
+
code;
|
|
8
8
|
name = "ReleaseManagementError";
|
|
9
9
|
constructor(code, message) {
|
|
10
10
|
super(message);
|
|
@@ -29,7 +29,8 @@ const readReleaseScope = async (database, scopeKey) => {
|
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
const createForwardReleaseId = (rows, candidates, nowMs) => {
|
|
32
|
-
|
|
32
|
+
const floor = [...candidates, rows.at(-1)?.id ?? null].filter((value) => value !== null && (0, _hot_updater_core.isUUIDv7)(value)).sort().at(-1);
|
|
33
|
+
return require_uuidv7.createUUIDv7After(floor ?? null, nowMs);
|
|
33
34
|
};
|
|
34
35
|
const prepareTargetScope = async ({ channelName, database, fingerprintHash, platform, strategy }) => {
|
|
35
36
|
const channelKey = (0, _hot_updater_core.encodeChannelKey)(channelName);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BundleRepository } from "./types/databasePlugin.cjs";
|
|
2
|
+
import "./types/index.cjs";
|
|
2
3
|
import { ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult } from "./releaseCatalogMutation.cjs";
|
|
3
|
-
|
|
4
4
|
//#region src/releaseManagement.d.ts
|
|
5
5
|
interface ReleasePolicyPatch {
|
|
6
6
|
readonly enabled?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BundleRepository } from "./types/databasePlugin.mjs";
|
|
2
|
+
import "./types/index.mjs";
|
|
2
3
|
import { ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult } from "./releaseCatalogMutation.mjs";
|
|
3
|
-
|
|
4
4
|
//#region src/releaseManagement.d.ts
|
|
5
5
|
interface ReleasePolicyPatch {
|
|
6
6
|
readonly enabled?: boolean;
|
|
@@ -4,6 +4,7 @@ import { createReleaseCatalogScopeKey, decodeChannelKey, encodeChannelKey } from
|
|
|
4
4
|
//#region src/releaseManagement.ts
|
|
5
5
|
const RELEASE_PAGE_SIZE = 1e3;
|
|
6
6
|
var ReleaseManagementError = class extends Error {
|
|
7
|
+
code;
|
|
7
8
|
name = "ReleaseManagementError";
|
|
8
9
|
constructor(code, message) {
|
|
9
10
|
super(message);
|
|
@@ -28,7 +29,8 @@ const readReleaseScope = async (database, scopeKey) => {
|
|
|
28
29
|
}
|
|
29
30
|
};
|
|
30
31
|
const createForwardReleaseId = (rows, candidates, nowMs) => {
|
|
31
|
-
|
|
32
|
+
const floor = [...candidates, rows.at(-1)?.id ?? null].filter((value) => value !== null && isUUIDv7$1(value)).sort().at(-1);
|
|
33
|
+
return createUUIDv7After(floor ?? null, nowMs);
|
|
32
34
|
};
|
|
33
35
|
const prepareTargetScope = async ({ channelName, database, fingerprintHash, platform, strategy }) => {
|
|
34
36
|
const channelKey = encodeChannelKey(channelName);
|
|
@@ -4,10 +4,10 @@ const REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION = 1;
|
|
|
4
4
|
const REMOTE_BUNDLE_SIGNING_ALGORITHM = "RSA-SHA256";
|
|
5
5
|
const REMOTE_BUNDLE_SIGNING_TOKEN_HEADER = "x-hot-updater-signing-token";
|
|
6
6
|
const MESSAGE_BYTES = 32;
|
|
7
|
-
const REQUEST_BODY_LIMIT =
|
|
8
|
-
const RESPONSE_BODY_LIMIT =
|
|
9
|
-
const SIGNATURE_BYTES_LIMIT =
|
|
10
|
-
const TOKEN_BYTES_LIMIT =
|
|
7
|
+
const REQUEST_BODY_LIMIT = 4096;
|
|
8
|
+
const RESPONSE_BODY_LIMIT = 32768;
|
|
9
|
+
const SIGNATURE_BYTES_LIMIT = 16384;
|
|
10
|
+
const TOKEN_BYTES_LIMIT = 4096;
|
|
11
11
|
const REQUEST_TIMEOUT_MS = 3e4;
|
|
12
12
|
const JSON_CONTENT_TYPE_PATTERN = /^application\/json(?:\s*;|$)/iu;
|
|
13
13
|
const BASE64_PATTERN = /^(?:[A-Za-z\d+/]{4})*(?:[A-Za-z\d+/]{2}==|[A-Za-z\d+/]{3}=)?$/u;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BundleSigningPlugin } from "./types/index.cjs";
|
|
2
|
-
|
|
3
2
|
//#region src/remoteBundleSigning.d.ts
|
|
4
3
|
declare const REMOTE_BUNDLE_SIGNING_PATH = "/_hot-updater/signing";
|
|
5
4
|
declare const REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION: 1;
|
|
@@ -24,18 +23,8 @@ interface BundleSigningHandlerOptions {
|
|
|
24
23
|
readonly token: string;
|
|
25
24
|
}
|
|
26
25
|
/** Signs through a server implementing the Hot Updater signing protocol. */
|
|
27
|
-
declare const remoteSigning: ({
|
|
28
|
-
endpoint,
|
|
29
|
-
fetch: fetchImplementation,
|
|
30
|
-
signingToken
|
|
31
|
-
}: RemoteSigningOptions) => BundleSigningPlugin;
|
|
26
|
+
declare const remoteSigning: ({ endpoint, fetch: fetchImplementation, signingToken }: RemoteSigningOptions) => BundleSigningPlugin;
|
|
32
27
|
/** Handles the portable managed signing protocol in Web API runtimes. */
|
|
33
|
-
declare const createBundleSigningHandler: ({
|
|
34
|
-
endpointPath,
|
|
35
|
-
publicKey,
|
|
36
|
-
request,
|
|
37
|
-
sign,
|
|
38
|
-
token
|
|
39
|
-
}: BundleSigningHandlerOptions) => Promise<Response | null>;
|
|
28
|
+
declare const createBundleSigningHandler: ({ endpointPath, publicKey, request, sign, token }: BundleSigningHandlerOptions) => Promise<Response | null>;
|
|
40
29
|
//#endregion
|
|
41
30
|
export { BundleSigningHandlerOptions, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, RemoteSigningOptions, createBundleSigningHandler, remoteSigning };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { BundleSigningPlugin } from "./types/index.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/remoteBundleSigning.d.ts
|
|
4
3
|
declare const REMOTE_BUNDLE_SIGNING_PATH = "/_hot-updater/signing";
|
|
5
4
|
declare const REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION: 1;
|
|
@@ -24,18 +23,8 @@ interface BundleSigningHandlerOptions {
|
|
|
24
23
|
readonly token: string;
|
|
25
24
|
}
|
|
26
25
|
/** Signs through a server implementing the Hot Updater signing protocol. */
|
|
27
|
-
declare const remoteSigning: ({
|
|
28
|
-
endpoint,
|
|
29
|
-
fetch: fetchImplementation,
|
|
30
|
-
signingToken
|
|
31
|
-
}: RemoteSigningOptions) => BundleSigningPlugin;
|
|
26
|
+
declare const remoteSigning: ({ endpoint, fetch: fetchImplementation, signingToken }: RemoteSigningOptions) => BundleSigningPlugin;
|
|
32
27
|
/** Handles the portable managed signing protocol in Web API runtimes. */
|
|
33
|
-
declare const createBundleSigningHandler: ({
|
|
34
|
-
endpointPath,
|
|
35
|
-
publicKey,
|
|
36
|
-
request,
|
|
37
|
-
sign,
|
|
38
|
-
token
|
|
39
|
-
}: BundleSigningHandlerOptions) => Promise<Response | null>;
|
|
28
|
+
declare const createBundleSigningHandler: ({ endpointPath, publicKey, request, sign, token }: BundleSigningHandlerOptions) => Promise<Response | null>;
|
|
40
29
|
//#endregion
|
|
41
30
|
export { BundleSigningHandlerOptions, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, RemoteSigningOptions, createBundleSigningHandler, remoteSigning };
|
|
@@ -4,10 +4,10 @@ const REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION = 1;
|
|
|
4
4
|
const REMOTE_BUNDLE_SIGNING_ALGORITHM = "RSA-SHA256";
|
|
5
5
|
const REMOTE_BUNDLE_SIGNING_TOKEN_HEADER = "x-hot-updater-signing-token";
|
|
6
6
|
const MESSAGE_BYTES = 32;
|
|
7
|
-
const REQUEST_BODY_LIMIT =
|
|
8
|
-
const RESPONSE_BODY_LIMIT =
|
|
9
|
-
const SIGNATURE_BYTES_LIMIT =
|
|
10
|
-
const TOKEN_BYTES_LIMIT =
|
|
7
|
+
const REQUEST_BODY_LIMIT = 4096;
|
|
8
|
+
const RESPONSE_BODY_LIMIT = 32768;
|
|
9
|
+
const SIGNATURE_BYTES_LIMIT = 16384;
|
|
10
|
+
const TOKEN_BYTES_LIMIT = 4096;
|
|
11
11
|
const REQUEST_TIMEOUT_MS = 3e4;
|
|
12
12
|
const JSON_CONTENT_TYPE_PATTERN = /^application\/json(?:\s*;|$)/iu;
|
|
13
13
|
const BASE64_PATTERN = /^(?:[A-Za-z\d+/]{4})*(?:[A-Za-z\d+/]{2}==|[A-Za-z\d+/]{3}=)?$/u;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Bundle } from "./types/index.cjs";
|
|
2
|
-
|
|
3
2
|
//#region src/requestBundleCache.d.ts
|
|
4
3
|
interface RequestBundleResolver {
|
|
5
4
|
readonly getById: (bundleId: string, loadBundleById: () => Promise<Bundle | null>) => Promise<Bundle | null>;
|
|
6
5
|
}
|
|
7
6
|
declare const createRequestBundleResolver: () => RequestBundleResolver;
|
|
8
7
|
//#endregion
|
|
9
|
-
export { createRequestBundleResolver };
|
|
8
|
+
export { RequestBundleResolver, createRequestBundleResolver };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Bundle } from "./types/index.mjs";
|
|
2
|
-
|
|
3
2
|
//#region src/requestBundleCache.d.ts
|
|
4
3
|
interface RequestBundleResolver {
|
|
5
4
|
readonly getById: (bundleId: string, loadBundleById: () => Promise<Bundle | null>) => Promise<Bundle | null>;
|
|
6
5
|
}
|
|
7
6
|
declare const createRequestBundleResolver: () => RequestBundleResolver;
|
|
8
7
|
//#endregion
|
|
9
|
-
export { createRequestBundleResolver };
|
|
8
|
+
export { RequestBundleResolver, createRequestBundleResolver };
|
package/dist/semverSatisfies.cjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_range_DvX_Y6iv = require("./node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/range-DvX-Y6iv.cjs");
|
|
2
|
+
const require_version_CQ98ZBpL = require("./node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/version-CQ98ZBpL.cjs");
|
|
2
3
|
//#region src/semverSatisfies.ts
|
|
3
4
|
const semverSatisfies = (targetAppVersion, currentVersion) => {
|
|
4
|
-
const currentCoerce =
|
|
5
|
+
const currentCoerce = require_version_CQ98ZBpL.n(currentVersion);
|
|
5
6
|
if (!currentCoerce) return false;
|
|
6
|
-
return
|
|
7
|
+
return require_range_DvX_Y6iv.f(currentCoerce, targetAppVersion);
|
|
7
8
|
};
|
|
8
9
|
//#endregion
|
|
9
10
|
exports.semverSatisfies = semverSatisfies;
|
package/dist/semverSatisfies.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { f as satisfies } from "./node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/range-DvX-Y6iv.mjs";
|
|
2
|
+
import { n as coerce } from "./node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/version-CQ98ZBpL.mjs";
|
|
2
3
|
//#region src/semverSatisfies.ts
|
|
3
4
|
const semverSatisfies = (targetAppVersion, currentVersion) => {
|
|
4
5
|
const currentCoerce = coerce(currentVersion);
|
|
@@ -39,7 +39,8 @@ const createStorageDownloadUrl = (signingKey) => {
|
|
|
39
39
|
name: "HMAC"
|
|
40
40
|
}, false, ["sign"]);
|
|
41
41
|
return async ({ storageUri }) => {
|
|
42
|
-
|
|
42
|
+
const signature = encodeBytes(new Uint8Array(await crypto.subtle.sign("HMAC", await key, new TextEncoder().encode(storageUri))));
|
|
43
|
+
return { url: createStorageDownloadPath(storageUri, signature) };
|
|
43
44
|
};
|
|
44
45
|
};
|
|
45
46
|
//#endregion
|
|
@@ -4,9 +4,7 @@ declare const parseStorageDownloadPath: (path: string) => {
|
|
|
4
4
|
signature: string;
|
|
5
5
|
storageUri: string;
|
|
6
6
|
} | null;
|
|
7
|
-
declare const createStorageDownloadUrl: (signingKey: string) => ({
|
|
8
|
-
storageUri
|
|
9
|
-
}: {
|
|
7
|
+
declare const createStorageDownloadUrl: (signingKey: string) => ({ storageUri }: {
|
|
10
8
|
readonly storageUri: string;
|
|
11
9
|
}) => Promise<{
|
|
12
10
|
url: string;
|
|
@@ -4,9 +4,7 @@ declare const parseStorageDownloadPath: (path: string) => {
|
|
|
4
4
|
signature: string;
|
|
5
5
|
storageUri: string;
|
|
6
6
|
} | null;
|
|
7
|
-
declare const createStorageDownloadUrl: (signingKey: string) => ({
|
|
8
|
-
storageUri
|
|
9
|
-
}: {
|
|
7
|
+
declare const createStorageDownloadUrl: (signingKey: string) => ({ storageUri }: {
|
|
10
8
|
readonly storageUri: string;
|
|
11
9
|
}) => Promise<{
|
|
12
10
|
url: string;
|
|
@@ -39,7 +39,8 @@ const createStorageDownloadUrl = (signingKey) => {
|
|
|
39
39
|
name: "HMAC"
|
|
40
40
|
}, false, ["sign"]);
|
|
41
41
|
return async ({ storageUri }) => {
|
|
42
|
-
|
|
42
|
+
const signature = encodeBytes(new Uint8Array(await crypto.subtle.sign("HMAC", await key, new TextEncoder().encode(storageUri))));
|
|
43
|
+
return { url: createStorageDownloadPath(storageUri, signature) };
|
|
43
44
|
};
|
|
44
45
|
};
|
|
45
46
|
//#endregion
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseField, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelMap, DatabaseRow, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.cjs";
|
|
2
|
-
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel,
|
|
1
|
+
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseField, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelMap, DatabaseRow, InsightsInstallationRow, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.cjs";
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountInstallationsInput, InsightsEventCursor, InsightsEventFilter, InsightsFindInstallationsInput, InsightsListEventsInput, InsightsModel, InsightsRecordInput, InsightsScope, ReleaseCatalogModel, ReleaseModel } from "./databasePlugin.cjs";
|
|
3
3
|
import { DatabaseDistinctFields, DatabaseDistinctOn, DatabaseOrderBy, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, SelectedDatabaseRow } from "./databaseQuery.cjs";
|
|
4
|
-
import { ApiKeyRowUpdate, BundleRowUpdate, CountBundlesDatabaseImplementationInput, CountBundlesDatabaseInput, CountDatabaseImplementationInput, CountDatabaseInput, CountDatabaseModel, CreateDatabaseImplementationInput, CreateDatabaseInput, CreateDatabaseModel, DatabaseCapability, DatabaseDeleteModel, DatabaseFindOneModel, DatabaseImplementationResult, DatabaseModelCapabilities, DatabaseModelsWithCapability, DatabasePluginCrud, DatabasePluginImplementation, DatabaseRowUpdate, DeleteDatabaseImplementationInput, DeleteDatabaseInput, DeleteDatabaseModel, FindManyDatabaseImplementationInput, FindManyDatabaseInput, FindManyDatabaseModel, FindManyDatabasePluginInput, FindOneDatabaseImplementationInput, FindOneDatabaseInput, FindOneDatabaseModel, ReleaseCatalogRowUpdate, ReleaseRowUpdate, SelectedDatabaseInputRow, TransactionDatabasePluginImplementation, UpdateBundleDatabaseImplementationInput, UpdateBundleDatabaseInput, UpdateDatabaseImplementationInput, UpdateDatabaseInput, UpdateDatabaseModel } from "./databaseOperations.cjs";
|
|
4
|
+
import { ApiKeyRowUpdate, BundleRowUpdate, CountBundlesDatabaseImplementationInput, CountBundlesDatabaseInput, CountDatabaseImplementationInput, CountDatabaseInput, CountDatabaseModel, CreateDatabaseImplementationInput, CreateDatabaseInput, CreateDatabaseModel, DatabaseCapability, DatabaseDeleteModel, DatabaseFindOneModel, DatabaseImplementationResult, DatabaseModelCapabilities, DatabaseModelsWithCapability, DatabasePluginCrud, DatabasePluginImplementation, DatabaseRowUpdate, DeleteDatabaseImplementationInput, DeleteDatabaseInput, DeleteDatabaseModel, FindManyDatabaseImplementationInput, FindManyDatabaseInput, FindManyDatabaseModel, FindManyDatabasePluginInput, FindOneDatabaseImplementationInput, FindOneDatabaseInput, FindOneDatabaseModel, InsightsInstallationRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate, SelectedDatabaseInputRow, TransactionDatabasePluginImplementation, UpdateBundleDatabaseImplementationInput, UpdateBundleDatabaseInput, UpdateDatabaseImplementationInput, UpdateDatabaseInput, UpdateDatabaseModel } from "./databaseOperations.cjs";
|
|
5
|
+
export { ApiKeyModel, ApiKeyRow, ApiKeyRowUpdate, BundleEventRow, BundleEventRowBase, BundleModel, BundleModelQuery, BundlePatchModel, BundlePatchRow, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, BundleRow, BundleRowUpdate, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, ChannelRow, CountBundlesDatabaseImplementationInput, CountBundlesDatabaseInput, CountDatabaseImplementationInput, CountDatabaseInput, CountDatabaseModel, CreateDatabaseImplementationInput, CreateDatabaseInput, CreateDatabaseModel, DatabaseBundleMetadata, DatabaseCapability, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseDeleteModel, DatabaseDistinctFields, DatabaseDistinctOn, DatabaseField, DatabaseFindOneModel, DatabaseImplementationResult, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelCapabilities, DatabaseModelMap, DatabaseModels, DatabaseModelsWithCapability, DatabaseOrderBy, DatabasePlugin, DatabasePluginCrud, DatabasePluginImplementation, DatabaseRow, DatabaseRowUpdate, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, DeleteDatabaseImplementationInput, DeleteDatabaseInput, DeleteDatabaseModel, FindManyDatabaseImplementationInput, FindManyDatabaseInput, FindManyDatabaseModel, FindManyDatabasePluginInput, FindOneDatabaseImplementationInput, FindOneDatabaseInput, FindOneDatabaseModel, InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountInstallationsInput, InsightsEventCursor, InsightsEventFilter, InsightsFindInstallationsInput, InsightsInstallationRow, InsightsInstallationRowUpdate, InsightsListEventsInput, InsightsModel, InsightsRecordInput, InsightsScope, ReleaseCatalogModel, ReleaseCatalogRow, ReleaseCatalogRowUpdate, ReleaseModel, ReleaseRow, ReleaseRowUpdate, SelectedDatabaseInputRow, SelectedDatabaseRow, TransactionDatabasePluginImplementation, UpdateBundleDatabaseImplementationInput, UpdateBundleDatabaseInput, UpdateDatabaseImplementationInput, UpdateDatabaseInput, UpdateDatabaseModel };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseField, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelMap, DatabaseRow, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.mjs";
|
|
2
|
-
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel,
|
|
1
|
+
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseField, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelMap, DatabaseRow, InsightsInstallationRow, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.mjs";
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountInstallationsInput, InsightsEventCursor, InsightsEventFilter, InsightsFindInstallationsInput, InsightsListEventsInput, InsightsModel, InsightsRecordInput, InsightsScope, ReleaseCatalogModel, ReleaseModel } from "./databasePlugin.mjs";
|
|
3
3
|
import { DatabaseDistinctFields, DatabaseDistinctOn, DatabaseOrderBy, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, SelectedDatabaseRow } from "./databaseQuery.mjs";
|
|
4
|
-
import { ApiKeyRowUpdate, BundleRowUpdate, CountBundlesDatabaseImplementationInput, CountBundlesDatabaseInput, CountDatabaseImplementationInput, CountDatabaseInput, CountDatabaseModel, CreateDatabaseImplementationInput, CreateDatabaseInput, CreateDatabaseModel, DatabaseCapability, DatabaseDeleteModel, DatabaseFindOneModel, DatabaseImplementationResult, DatabaseModelCapabilities, DatabaseModelsWithCapability, DatabasePluginCrud, DatabasePluginImplementation, DatabaseRowUpdate, DeleteDatabaseImplementationInput, DeleteDatabaseInput, DeleteDatabaseModel, FindManyDatabaseImplementationInput, FindManyDatabaseInput, FindManyDatabaseModel, FindManyDatabasePluginInput, FindOneDatabaseImplementationInput, FindOneDatabaseInput, FindOneDatabaseModel, ReleaseCatalogRowUpdate, ReleaseRowUpdate, SelectedDatabaseInputRow, TransactionDatabasePluginImplementation, UpdateBundleDatabaseImplementationInput, UpdateBundleDatabaseInput, UpdateDatabaseImplementationInput, UpdateDatabaseInput, UpdateDatabaseModel } from "./databaseOperations.mjs";
|
|
4
|
+
import { ApiKeyRowUpdate, BundleRowUpdate, CountBundlesDatabaseImplementationInput, CountBundlesDatabaseInput, CountDatabaseImplementationInput, CountDatabaseInput, CountDatabaseModel, CreateDatabaseImplementationInput, CreateDatabaseInput, CreateDatabaseModel, DatabaseCapability, DatabaseDeleteModel, DatabaseFindOneModel, DatabaseImplementationResult, DatabaseModelCapabilities, DatabaseModelsWithCapability, DatabasePluginCrud, DatabasePluginImplementation, DatabaseRowUpdate, DeleteDatabaseImplementationInput, DeleteDatabaseInput, DeleteDatabaseModel, FindManyDatabaseImplementationInput, FindManyDatabaseInput, FindManyDatabaseModel, FindManyDatabasePluginInput, FindOneDatabaseImplementationInput, FindOneDatabaseInput, FindOneDatabaseModel, InsightsInstallationRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate, SelectedDatabaseInputRow, TransactionDatabasePluginImplementation, UpdateBundleDatabaseImplementationInput, UpdateBundleDatabaseInput, UpdateDatabaseImplementationInput, UpdateDatabaseInput, UpdateDatabaseModel } from "./databaseOperations.mjs";
|
|
5
|
+
export { ApiKeyModel, ApiKeyRow, ApiKeyRowUpdate, BundleEventRow, BundleEventRowBase, BundleModel, BundleModelQuery, BundlePatchModel, BundlePatchRow, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, BundleRow, BundleRowUpdate, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, ChannelRow, CountBundlesDatabaseImplementationInput, CountBundlesDatabaseInput, CountDatabaseImplementationInput, CountDatabaseInput, CountDatabaseModel, CreateDatabaseImplementationInput, CreateDatabaseInput, CreateDatabaseModel, DatabaseBundleMetadata, DatabaseCapability, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseDeleteModel, DatabaseDistinctFields, DatabaseDistinctOn, DatabaseField, DatabaseFindOneModel, DatabaseImplementationResult, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelCapabilities, DatabaseModelMap, DatabaseModels, DatabaseModelsWithCapability, DatabaseOrderBy, DatabasePlugin, DatabasePluginCrud, DatabasePluginImplementation, DatabaseRow, DatabaseRowUpdate, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, DeleteDatabaseImplementationInput, DeleteDatabaseInput, DeleteDatabaseModel, FindManyDatabaseImplementationInput, FindManyDatabaseInput, FindManyDatabaseModel, FindManyDatabasePluginInput, FindOneDatabaseImplementationInput, FindOneDatabaseInput, FindOneDatabaseModel, InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountInstallationsInput, InsightsEventCursor, InsightsEventFilter, InsightsFindInstallationsInput, InsightsInstallationRow, InsightsInstallationRowUpdate, InsightsListEventsInput, InsightsModel, InsightsRecordInput, InsightsScope, ReleaseCatalogModel, ReleaseCatalogRow, ReleaseCatalogRowUpdate, ReleaseModel, ReleaseRow, ReleaseRowUpdate, SelectedDatabaseInputRow, SelectedDatabaseRow, TransactionDatabasePluginImplementation, UpdateBundleDatabaseImplementationInput, UpdateBundleDatabaseInput, UpdateDatabaseImplementationInput, UpdateDatabaseInput, UpdateDatabaseModel };
|
|
@@ -78,6 +78,19 @@ const databaseFields = {
|
|
|
78
78
|
"sdk_version",
|
|
79
79
|
"received_at_ms"
|
|
80
80
|
],
|
|
81
|
+
bundle_installations: [
|
|
82
|
+
"id",
|
|
83
|
+
"install_id",
|
|
84
|
+
"user_id",
|
|
85
|
+
"username",
|
|
86
|
+
"to_bundle_id",
|
|
87
|
+
"type",
|
|
88
|
+
"platform",
|
|
89
|
+
"app_version",
|
|
90
|
+
"channel",
|
|
91
|
+
"cohort",
|
|
92
|
+
"received_at_ms"
|
|
93
|
+
],
|
|
81
94
|
api_keys: [
|
|
82
95
|
"id",
|
|
83
96
|
"hash",
|
|
@@ -6,6 +6,7 @@ declare const databaseFields: {
|
|
|
6
6
|
readonly release_catalogs: readonly ["scope_key", "catalog_id", "strategy", "channel_id", "channel_key", "platform", "fingerprint_hash", "generation", "payload", "catalog_hash", "byte_size", "is_tombstone", "updated_at_ms"];
|
|
7
7
|
readonly channels: readonly ["id", "name"];
|
|
8
8
|
readonly bundle_events: readonly ["id", "type", "install_id", "user_id", "username", "from_bundle_id", "from_release_id", "to_release_id", "to_bundle_id", "platform", "app_version", "channel", "cohort", "update_strategy", "fingerprint_hash", "sdk_version", "received_at_ms"];
|
|
9
|
+
readonly bundle_installations: readonly ["id", "install_id", "user_id", "username", "to_bundle_id", "type", "platform", "app_version", "channel", "cohort", "received_at_ms"];
|
|
9
10
|
readonly api_keys: readonly ["id", "hash", "name", "prefix", "role", "created_at_ms", "revoked_at_ms"];
|
|
10
11
|
};
|
|
11
12
|
//#endregion
|
|
@@ -6,6 +6,7 @@ declare const databaseFields: {
|
|
|
6
6
|
readonly release_catalogs: readonly ["scope_key", "catalog_id", "strategy", "channel_id", "channel_key", "platform", "fingerprint_hash", "generation", "payload", "catalog_hash", "byte_size", "is_tombstone", "updated_at_ms"];
|
|
7
7
|
readonly channels: readonly ["id", "name"];
|
|
8
8
|
readonly bundle_events: readonly ["id", "type", "install_id", "user_id", "username", "from_bundle_id", "from_release_id", "to_release_id", "to_bundle_id", "platform", "app_version", "channel", "cohort", "update_strategy", "fingerprint_hash", "sdk_version", "received_at_ms"];
|
|
9
|
+
readonly bundle_installations: readonly ["id", "install_id", "user_id", "username", "to_bundle_id", "type", "platform", "app_version", "channel", "cohort", "received_at_ms"];
|
|
9
10
|
readonly api_keys: readonly ["id", "hash", "name", "prefix", "role", "created_at_ms", "revoked_at_ms"];
|
|
10
11
|
};
|
|
11
12
|
//#endregion
|
|
@@ -78,6 +78,19 @@ const databaseFields = {
|
|
|
78
78
|
"sdk_version",
|
|
79
79
|
"received_at_ms"
|
|
80
80
|
],
|
|
81
|
+
bundle_installations: [
|
|
82
|
+
"id",
|
|
83
|
+
"install_id",
|
|
84
|
+
"user_id",
|
|
85
|
+
"username",
|
|
86
|
+
"to_bundle_id",
|
|
87
|
+
"type",
|
|
88
|
+
"platform",
|
|
89
|
+
"app_version",
|
|
90
|
+
"channel",
|
|
91
|
+
"cohort",
|
|
92
|
+
"received_at_ms"
|
|
93
|
+
],
|
|
81
94
|
api_keys: [
|
|
82
95
|
"id",
|
|
83
96
|
"hash",
|