@hot-updater/plugin-core 1.0.0-rc.3 → 1.0.0-rc.35
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/README.md +33 -0
- package/dist/baseCandidateKey.cjs +50 -0
- package/dist/baseCandidateKey.d.cts +27 -0
- package/dist/baseCandidateKey.d.mts +27 -0
- package/dist/baseCandidateKey.mjs +49 -0
- package/dist/bundleStorageLayout.cjs +7 -0
- package/dist/bundleStorageLayout.d.cts +5 -1
- package/dist/bundleStorageLayout.d.mts +5 -1
- package/dist/bundleStorageLayout.mjs +7 -1
- package/dist/contentType.cjs +9 -0
- package/dist/contentType.d.cts +4 -0
- package/dist/contentType.d.mts +4 -0
- package/dist/contentType.mjs +7 -0
- package/dist/coreApi.d.cts +131 -0
- package/dist/coreApi.d.mts +131 -0
- package/dist/createStorageAdapter.cjs +8 -0
- package/dist/createStorageAdapter.d.cts +9 -0
- package/dist/createStorageAdapter.d.mts +9 -0
- package/dist/createStorageAdapter.mjs +7 -0
- package/dist/database/adapter.cjs +61 -0
- package/dist/database/adapter.d.cts +200 -0
- package/dist/database/adapter.d.mts +200 -0
- package/dist/database/adapter.mjs +55 -0
- package/dist/database/distinct.cjs +88 -0
- package/dist/database/distinct.d.cts +18 -0
- package/dist/database/distinct.d.mts +18 -0
- package/dist/database/distinct.mjs +85 -0
- package/dist/database/memoryAdapter.cjs +107 -0
- package/dist/database/memoryAdapter.d.cts +14 -0
- package/dist/database/memoryAdapter.d.mts +14 -0
- package/dist/database/memoryAdapter.mjs +107 -0
- package/dist/database/values.cjs +114 -0
- package/dist/database/values.d.cts +17 -0
- package/dist/database/values.d.mts +17 -0
- package/dist/database/values.mjs +104 -0
- package/dist/database/verifyAdapter.cjs +137 -0
- package/dist/database/verifyAdapter.d.cts +37 -0
- package/dist/database/verifyAdapter.d.mts +37 -0
- package/dist/database/verifyAdapter.mjs +136 -0
- package/dist/databaseErrors.cjs +30 -0
- package/dist/databaseErrors.d.cts +21 -0
- package/dist/databaseErrors.d.mts +21 -0
- package/dist/databaseErrors.mjs +28 -0
- package/dist/databaseJsonValue.cjs +6 -0
- package/dist/databaseJsonValue.d.cts +9 -2
- package/dist/databaseJsonValue.d.mts +9 -2
- package/dist/databaseJsonValue.mjs +6 -0
- package/dist/databaseMetadata.cjs +4 -4
- package/dist/databaseMetadata.mjs +3 -3
- package/dist/databaseRows.cjs +6 -12
- package/dist/databaseRows.d.cts +1 -1
- package/dist/databaseRows.d.mts +1 -1
- package/dist/databaseRows.mjs +1 -7
- package/dist/engine/core/schema.cjs +279 -0
- package/dist/engine/core/schema.d.cts +312 -0
- package/dist/engine/core/schema.d.mts +312 -0
- package/dist/engine/core/schema.mjs +277 -0
- package/dist/engine/createEngine.cjs +72 -0
- package/dist/engine/createEngine.d.cts +45 -0
- package/dist/engine/createEngine.d.mts +45 -0
- package/dist/engine/createEngine.mjs +72 -0
- package/dist/engine/database/aggregateBatching.cjs +627 -0
- package/dist/engine/database/aggregateBatching.mjs +626 -0
- package/dist/engine/database/cursor.cjs +42 -0
- package/dist/engine/database/cursor.mjs +38 -0
- package/dist/engine/database/database.cjs +68 -0
- package/dist/engine/database/database.mjs +68 -0
- package/dist/engine/database/engine.cjs +37 -0
- package/dist/engine/database/engine.mjs +37 -0
- package/dist/engine/database/engineAggregates.cjs +120 -0
- package/dist/engine/database/engineAggregates.mjs +117 -0
- package/dist/engine/database/engineReads.cjs +182 -0
- package/dist/engine/database/engineReads.d.cts +10 -0
- package/dist/engine/database/engineReads.d.mts +10 -0
- package/dist/engine/database/engineReads.mjs +181 -0
- package/dist/engine/database/engineTransaction.cjs +399 -0
- package/dist/engine/database/engineTransaction.d.cts +18 -0
- package/dist/engine/database/engineTransaction.d.mts +18 -0
- package/dist/engine/database/engineTransaction.mjs +398 -0
- package/dist/engine/database/fence.cjs +156 -0
- package/dist/engine/database/fence.d.cts +41 -0
- package/dist/engine/database/fence.d.mts +41 -0
- package/dist/engine/database/fence.mjs +149 -0
- package/dist/engine/database/kv/kvAdapter.cjs +293 -0
- package/dist/engine/database/kv/kvAdapter.d.cts +116 -0
- package/dist/engine/database/kv/kvAdapter.d.mts +116 -0
- package/dist/engine/database/kv/kvAdapter.mjs +292 -0
- package/dist/engine/database/readMeter.cjs +80 -0
- package/dist/engine/database/readMeter.d.cts +34 -0
- package/dist/engine/database/readMeter.d.mts +34 -0
- package/dist/engine/database/readMeter.mjs +79 -0
- package/dist/engine/database/resolveSchema.cjs +197 -0
- package/dist/engine/database/resolveSchema.d.cts +35 -0
- package/dist/engine/database/resolveSchema.d.mts +35 -0
- package/dist/engine/database/resolveSchema.mjs +195 -0
- package/dist/engine/database/retention.cjs +100 -0
- package/dist/engine/database/retention.mjs +98 -0
- package/dist/engine/database/sql/sqlAdapter.cjs +290 -0
- package/dist/engine/database/sql/sqlAdapter.d.cts +45 -0
- package/dist/engine/database/sql/sqlAdapter.d.mts +45 -0
- package/dist/engine/database/sql/sqlAdapter.mjs +288 -0
- package/dist/engine/database/sql/sqlSchema.cjs +175 -0
- package/dist/engine/database/sql/sqlSchema.d.cts +45 -0
- package/dist/engine/database/sql/sqlSchema.d.mts +45 -0
- package/dist/engine/database/sql/sqlSchema.mjs +169 -0
- package/dist/engine/db/coreDatabase.cjs +94 -0
- package/dist/engine/db/coreDatabase.d.cts +78 -0
- package/dist/engine/db/coreDatabase.d.mts +78 -0
- package/dist/engine/db/coreDatabase.mjs +86 -0
- package/dist/engine/db/engineMigrator.cjs +53 -0
- package/dist/engine/db/engineMigrator.mjs +53 -0
- package/dist/engine/db/engineSql.cjs +26 -0
- package/dist/engine/db/engineSql.d.cts +16 -0
- package/dist/engine/db/engineSql.d.mts +16 -0
- package/dist/engine/db/engineSql.mjs +25 -0
- package/dist/engine/db/engineSqlMigrator.cjs +67 -0
- package/dist/engine/db/engineSqlMigrator.d.cts +21 -0
- package/dist/engine/db/engineSqlMigrator.d.mts +21 -0
- package/dist/engine/db/engineSqlMigrator.mjs +67 -0
- package/dist/engine/db/fixedMigratorShared.cjs +12 -0
- package/dist/engine/db/fixedMigratorShared.mjs +11 -0
- package/dist/engine/db/schemaSettings.cjs +63 -0
- package/dist/engine/db/schemaSettings.d.cts +7 -0
- package/dist/engine/db/schemaSettings.d.mts +7 -0
- package/dist/engine/db/schemaSettings.mjs +62 -0
- package/dist/engine/db/settingsMigrator.cjs +94 -0
- package/dist/engine/db/settingsMigrator.d.cts +25 -0
- package/dist/engine/db/settingsMigrator.d.mts +25 -0
- package/dist/engine/db/settingsMigrator.mjs +91 -0
- package/dist/engine/db/types.d.cts +78 -0
- package/dist/engine/db/types.d.mts +78 -0
- package/dist/index.cjs +97 -49
- package/dist/index.d.cts +46 -22
- package/dist/index.d.mts +46 -22
- package/dist/index.mjs +32 -17
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/comparison-DenM3wCn.cjs +0 -5
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/comparison-DenM3wCn.mjs +1 -5
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/range-DvX-Y6iv.cjs +8 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/range-DvX-Y6iv.mjs +9 -2
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/set-CC5YeoYX.cjs +4 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/set-CC5YeoYX.mjs +4 -1
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/version-CQ98ZBpL.cjs +0 -5
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/version-CQ98ZBpL.mjs +2 -6
- package/dist/releaseCatalogCompiler.cjs +27 -26
- package/dist/releaseCatalogCompiler.d.cts +1 -2
- package/dist/releaseCatalogCompiler.d.mts +2 -3
- package/dist/releaseCatalogCompiler.mjs +5 -9
- package/dist/releaseCatalogMutation.cjs +0 -292
- package/dist/releaseCatalogMutation.d.cts +4 -45
- package/dist/releaseCatalogMutation.d.mts +4 -45
- package/dist/releaseCatalogMutation.mjs +1 -288
- package/dist/releaseManagement.cjs +0 -221
- package/dist/releaseManagement.d.cts +4 -28
- package/dist/releaseManagement.d.mts +4 -28
- package/dist/releaseManagement.mjs +1 -216
- package/dist/remoteBundleSigning.d.cts +2 -2
- package/dist/remoteBundleSigning.d.mts +2 -2
- package/dist/serverPlugin/busy.cjs +36 -0
- package/dist/serverPlugin/busy.d.cts +12 -0
- package/dist/serverPlugin/busy.d.mts +12 -0
- package/dist/serverPlugin/busy.mjs +36 -0
- package/dist/serverPlugin/configError.cjs +7 -0
- package/dist/serverPlugin/configError.d.cts +7 -0
- package/dist/serverPlugin/configError.d.mts +7 -0
- package/dist/serverPlugin/configError.mjs +7 -0
- package/dist/serverPlugin/coreReads.d.cts +48 -0
- package/dist/serverPlugin/coreReads.d.mts +48 -0
- package/dist/serverPlugin/databaseHandle.d.cts +105 -0
- package/dist/serverPlugin/databaseHandle.d.mts +105 -0
- package/dist/serverPlugin/definePlugin.cjs +5 -0
- package/dist/serverPlugin/definePlugin.d.cts +130 -0
- package/dist/serverPlugin/definePlugin.d.mts +130 -0
- package/dist/serverPlugin/definePlugin.mjs +5 -0
- package/dist/serverPlugin/definitions.d.cts +76 -0
- package/dist/serverPlugin/definitions.d.mts +76 -0
- package/dist/serverPlugin/errors.cjs +37 -0
- package/dist/serverPlugin/errors.d.cts +29 -0
- package/dist/serverPlugin/errors.d.mts +29 -0
- package/dist/serverPlugin/errors.mjs +32 -0
- package/dist/serverPlugin/schema.cjs +24 -0
- package/dist/serverPlugin/schema.d.cts +90 -0
- package/dist/serverPlugin/schema.d.mts +90 -0
- package/dist/serverPlugin/schema.mjs +23 -0
- package/dist/types/databaseConfig.cjs +5 -0
- package/dist/types/databaseConfig.d.cts +68 -0
- package/dist/types/databaseConfig.d.mts +68 -0
- package/dist/types/databaseConfig.mjs +5 -0
- package/dist/types/databaseOperations.d.cts +5 -180
- package/dist/types/databaseOperations.d.mts +5 -180
- package/dist/types/databaseRows.d.cts +5 -56
- package/dist/types/databaseRows.d.mts +5 -56
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +31 -97
- package/dist/types/index.d.mts +31 -97
- package/dist/types/index.mjs +2 -1
- package/dist/types/models.d.cts +14 -0
- package/dist/types/models.d.mts +14 -0
- package/dist/types/public.d.cts +4 -3
- package/dist/types/public.d.mts +4 -3
- package/dist/uuidv7.cjs +3 -3
- package/dist/uuidv7.d.cts +1 -1
- package/dist/uuidv7.d.mts +1 -1
- package/dist/uuidv7.mjs +1 -1
- package/package.json +10 -7
- package/dist/calculatePagination.cjs +0 -25
- package/dist/calculatePagination.d.cts +0 -12
- package/dist/calculatePagination.d.mts +0 -12
- package/dist/calculatePagination.mjs +0 -25
- package/dist/compressionFormat.cjs +0 -62
- package/dist/compressionFormat.d.cts +0 -33
- package/dist/compressionFormat.d.mts +0 -33
- package/dist/compressionFormat.mjs +0 -58
- package/dist/createDatabasePlugin.cjs +0 -920
- package/dist/createDatabasePlugin.d.cts +0 -28
- package/dist/createDatabasePlugin.d.mts +0 -28
- package/dist/createDatabasePlugin.mjs +0 -916
- package/dist/createStoragePlugin.cjs +0 -8
- package/dist/createStoragePlugin.d.cts +0 -9
- package/dist/createStoragePlugin.d.mts +0 -9
- package/dist/createStoragePlugin.mjs +0 -7
- package/dist/databaseClient.cjs +0 -117
- package/dist/databaseClient.d.cts +0 -32
- package/dist/databaseClient.d.mts +0 -32
- package/dist/databaseClient.mjs +0 -114
- package/dist/databaseClientReads.cjs +0 -115
- package/dist/databaseClientReads.mjs +0 -113
- package/dist/databaseClientUpdates.cjs +0 -40
- package/dist/databaseClientUpdates.d.cts +0 -11
- package/dist/databaseClientUpdates.d.mts +0 -11
- package/dist/databaseClientUpdates.mjs +0 -38
- package/dist/databasePluginCrud.cjs +0 -88
- package/dist/databasePluginCrud.d.cts +0 -4
- package/dist/databasePluginCrud.d.mts +0 -4
- package/dist/databasePluginCrud.mjs +0 -87
- package/dist/databasePluginCrudValidation.d.cts +0 -6
- package/dist/databasePluginCrudValidation.d.mts +0 -6
- package/dist/databasePluginCrudValidationErrors.cjs +0 -11
- package/dist/databasePluginCrudValidationErrors.d.cts +0 -9
- package/dist/databasePluginCrudValidationErrors.d.mts +0 -9
- package/dist/databasePluginCrudValidationErrors.mjs +0 -11
- package/dist/databasePluginCrudValidationFields.cjs +0 -321
- package/dist/databasePluginCrudValidationFields.d.cts +0 -1
- package/dist/databasePluginCrudValidationFields.d.mts +0 -1
- package/dist/databasePluginCrudValidationFields.mjs +0 -309
- package/dist/databasePluginCrudValidationMutations.cjs +0 -107
- package/dist/databasePluginCrudValidationMutations.d.cts +0 -1
- package/dist/databasePluginCrudValidationMutations.d.mts +0 -1
- package/dist/databasePluginCrudValidationMutations.mjs +0 -100
- package/dist/databasePluginCrudValidationQueries.cjs +0 -103
- package/dist/databasePluginCrudValidationQueries.d.cts +0 -2
- package/dist/databasePluginCrudValidationQueries.d.mts +0 -2
- package/dist/databasePluginCrudValidationQueries.mjs +0 -97
- package/dist/databasePluginCrudValidationRows.cjs +0 -55
- package/dist/databasePluginCrudValidationRows.d.cts +0 -1
- package/dist/databasePluginCrudValidationRows.d.mts +0 -1
- package/dist/databasePluginCrudValidationRows.mjs +0 -53
- package/dist/databasePluginTransaction.cjs +0 -7
- package/dist/databasePluginTransaction.mjs +0 -7
- package/dist/insightsContract.cjs +0 -157
- package/dist/insightsContract.d.cts +0 -11
- package/dist/insightsContract.d.mts +0 -11
- package/dist/insightsContract.mjs +0 -153
- package/dist/internal.cjs +0 -6
- package/dist/internal.d.cts +0 -10
- package/dist/internal.d.mts +0 -10
- package/dist/internal.mjs +0 -3
- package/dist/paginateBundles.cjs +0 -53
- package/dist/paginateBundles.d.cts +0 -13
- package/dist/paginateBundles.d.mts +0 -13
- package/dist/paginateBundles.mjs +0 -53
- package/dist/queryBundles.cjs +0 -34
- package/dist/queryBundles.d.cts +0 -9
- package/dist/queryBundles.d.mts +0 -9
- package/dist/queryBundles.mjs +0 -32
- package/dist/requestBundleCache.cjs +0 -22
- package/dist/requestBundleCache.d.cts +0 -8
- package/dist/requestBundleCache.d.mts +0 -8
- package/dist/requestBundleCache.mjs +0 -22
- package/dist/types/database.d.cts +0 -5
- package/dist/types/database.d.mts +0 -5
- package/dist/types/databaseFields.cjs +0 -105
- package/dist/types/databaseFields.d.cts +0 -13
- package/dist/types/databaseFields.d.mts +0 -13
- package/dist/types/databaseFields.mjs +0 -105
- package/dist/types/databasePlugin.d.cts +0 -298
- package/dist/types/databasePlugin.d.mts +0 -298
- package/dist/types/databaseQuery.d.cts +0 -46
- package/dist/types/databaseQuery.d.mts +0 -46
- package/dist/types/internal.d.cts +0 -8
- package/dist/types/internal.d.mts +0 -8
package/dist/paginateBundles.cjs
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
const require_calculatePagination = require("./calculatePagination.cjs");
|
|
2
|
-
const require_queryBundles = require("./queryBundles.cjs");
|
|
3
|
-
//#region src/paginateBundles.ts
|
|
4
|
-
function paginateBundles({ bundles, limit, offset, cursor, orderBy }) {
|
|
5
|
-
const sortedBundles = require_queryBundles.sortBundles(bundles, orderBy);
|
|
6
|
-
const direction = orderBy?.direction ?? "desc";
|
|
7
|
-
const total = sortedBundles.length;
|
|
8
|
-
if (offset !== void 0) {
|
|
9
|
-
const normalizedOffset = Math.max(0, offset);
|
|
10
|
-
const data = limit > 0 ? sortedBundles.slice(normalizedOffset, normalizedOffset + limit) : sortedBundles.slice(normalizedOffset);
|
|
11
|
-
const pagination = require_calculatePagination.calculatePagination(total, {
|
|
12
|
-
limit,
|
|
13
|
-
offset: normalizedOffset
|
|
14
|
-
});
|
|
15
|
-
const nextCursor = data.length > 0 && normalizedOffset + data.length < total ? data.at(-1)?.id : void 0;
|
|
16
|
-
const previousCursor = data.length > 0 && normalizedOffset > 0 ? data[0]?.id : void 0;
|
|
17
|
-
return {
|
|
18
|
-
data,
|
|
19
|
-
pagination: {
|
|
20
|
-
...pagination,
|
|
21
|
-
...nextCursor ? { nextCursor } : {},
|
|
22
|
-
...previousCursor ? { previousCursor } : {}
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
let data;
|
|
27
|
-
if (cursor?.after) {
|
|
28
|
-
const candidates = sortedBundles.filter((bundle) => direction === "desc" ? bundle.id.localeCompare(cursor.after) < 0 : bundle.id.localeCompare(cursor.after) > 0);
|
|
29
|
-
data = limit > 0 ? candidates.slice(0, limit) : candidates;
|
|
30
|
-
} else if (cursor?.before) {
|
|
31
|
-
const candidates = sortedBundles.filter((bundle) => direction === "desc" ? bundle.id.localeCompare(cursor.before) > 0 : bundle.id.localeCompare(cursor.before) < 0);
|
|
32
|
-
data = limit > 0 ? candidates.slice(Math.max(0, candidates.length - limit)) : candidates;
|
|
33
|
-
} else data = limit > 0 ? sortedBundles.slice(0, limit) : sortedBundles;
|
|
34
|
-
const startIndex = data.length > 0 ? sortedBundles.findIndex((bundle) => bundle.id === data[0].id) : cursor?.after ? total : 0;
|
|
35
|
-
const pagination = require_calculatePagination.calculatePagination(total, {
|
|
36
|
-
limit,
|
|
37
|
-
offset: startIndex
|
|
38
|
-
});
|
|
39
|
-
const nextCursor = data.length > 0 && startIndex + data.length < total ? data.at(-1)?.id : void 0;
|
|
40
|
-
const previousCursor = data.length > 0 && startIndex > 0 ? data[0]?.id : void 0;
|
|
41
|
-
return {
|
|
42
|
-
data,
|
|
43
|
-
pagination: {
|
|
44
|
-
...pagination,
|
|
45
|
-
...nextCursor ? { nextCursor } : {},
|
|
46
|
-
...previousCursor ? { previousCursor } : {},
|
|
47
|
-
...data.length === 0 && cursor?.after ? { previousCursor: cursor.after } : {},
|
|
48
|
-
...data.length === 0 && cursor?.before ? { nextCursor: cursor.before } : {}
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
exports.paginateBundles = paginateBundles;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DatabaseBundleCursor, DatabaseBundleQueryOrder, Paginated } from "./types/index.cjs";
|
|
2
|
-
//#region src/paginateBundles.d.ts
|
|
3
|
-
declare function paginateBundles<TBundle extends {
|
|
4
|
-
readonly id: string;
|
|
5
|
-
}>({ bundles, limit, offset, cursor, orderBy }: {
|
|
6
|
-
bundles: readonly TBundle[];
|
|
7
|
-
limit: number;
|
|
8
|
-
offset?: number;
|
|
9
|
-
cursor?: DatabaseBundleCursor;
|
|
10
|
-
orderBy?: DatabaseBundleQueryOrder;
|
|
11
|
-
}): Paginated<TBundle[]>;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { paginateBundles };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DatabaseBundleCursor, DatabaseBundleQueryOrder, Paginated } from "./types/index.mjs";
|
|
2
|
-
//#region src/paginateBundles.d.ts
|
|
3
|
-
declare function paginateBundles<TBundle extends {
|
|
4
|
-
readonly id: string;
|
|
5
|
-
}>({ bundles, limit, offset, cursor, orderBy }: {
|
|
6
|
-
bundles: readonly TBundle[];
|
|
7
|
-
limit: number;
|
|
8
|
-
offset?: number;
|
|
9
|
-
cursor?: DatabaseBundleCursor;
|
|
10
|
-
orderBy?: DatabaseBundleQueryOrder;
|
|
11
|
-
}): Paginated<TBundle[]>;
|
|
12
|
-
//#endregion
|
|
13
|
-
export { paginateBundles };
|
package/dist/paginateBundles.mjs
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { calculatePagination } from "./calculatePagination.mjs";
|
|
2
|
-
import { sortBundles } from "./queryBundles.mjs";
|
|
3
|
-
//#region src/paginateBundles.ts
|
|
4
|
-
function paginateBundles({ bundles, limit, offset, cursor, orderBy }) {
|
|
5
|
-
const sortedBundles = sortBundles(bundles, orderBy);
|
|
6
|
-
const direction = orderBy?.direction ?? "desc";
|
|
7
|
-
const total = sortedBundles.length;
|
|
8
|
-
if (offset !== void 0) {
|
|
9
|
-
const normalizedOffset = Math.max(0, offset);
|
|
10
|
-
const data = limit > 0 ? sortedBundles.slice(normalizedOffset, normalizedOffset + limit) : sortedBundles.slice(normalizedOffset);
|
|
11
|
-
const pagination = calculatePagination(total, {
|
|
12
|
-
limit,
|
|
13
|
-
offset: normalizedOffset
|
|
14
|
-
});
|
|
15
|
-
const nextCursor = data.length > 0 && normalizedOffset + data.length < total ? data.at(-1)?.id : void 0;
|
|
16
|
-
const previousCursor = data.length > 0 && normalizedOffset > 0 ? data[0]?.id : void 0;
|
|
17
|
-
return {
|
|
18
|
-
data,
|
|
19
|
-
pagination: {
|
|
20
|
-
...pagination,
|
|
21
|
-
...nextCursor ? { nextCursor } : {},
|
|
22
|
-
...previousCursor ? { previousCursor } : {}
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
let data;
|
|
27
|
-
if (cursor?.after) {
|
|
28
|
-
const candidates = sortedBundles.filter((bundle) => direction === "desc" ? bundle.id.localeCompare(cursor.after) < 0 : bundle.id.localeCompare(cursor.after) > 0);
|
|
29
|
-
data = limit > 0 ? candidates.slice(0, limit) : candidates;
|
|
30
|
-
} else if (cursor?.before) {
|
|
31
|
-
const candidates = sortedBundles.filter((bundle) => direction === "desc" ? bundle.id.localeCompare(cursor.before) > 0 : bundle.id.localeCompare(cursor.before) < 0);
|
|
32
|
-
data = limit > 0 ? candidates.slice(Math.max(0, candidates.length - limit)) : candidates;
|
|
33
|
-
} else data = limit > 0 ? sortedBundles.slice(0, limit) : sortedBundles;
|
|
34
|
-
const startIndex = data.length > 0 ? sortedBundles.findIndex((bundle) => bundle.id === data[0].id) : cursor?.after ? total : 0;
|
|
35
|
-
const pagination = calculatePagination(total, {
|
|
36
|
-
limit,
|
|
37
|
-
offset: startIndex
|
|
38
|
-
});
|
|
39
|
-
const nextCursor = data.length > 0 && startIndex + data.length < total ? data.at(-1)?.id : void 0;
|
|
40
|
-
const previousCursor = data.length > 0 && startIndex > 0 ? data[0]?.id : void 0;
|
|
41
|
-
return {
|
|
42
|
-
data,
|
|
43
|
-
pagination: {
|
|
44
|
-
...pagination,
|
|
45
|
-
...nextCursor ? { nextCursor } : {},
|
|
46
|
-
...previousCursor ? { previousCursor } : {},
|
|
47
|
-
...data.length === 0 && cursor?.after ? { previousCursor: cursor.after } : {},
|
|
48
|
-
...data.length === 0 && cursor?.before ? { nextCursor: cursor.before } : {}
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
export { paginateBundles };
|
package/dist/queryBundles.cjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
//#region src/queryBundles.ts
|
|
2
|
-
const compareValue = (value, expected, comparator) => {
|
|
3
|
-
if (expected === void 0) return true;
|
|
4
|
-
switch (comparator) {
|
|
5
|
-
case "eq": return value === expected;
|
|
6
|
-
case "gt": return value.localeCompare(expected) > 0;
|
|
7
|
-
case "gte": return value.localeCompare(expected) >= 0;
|
|
8
|
-
case "lt": return value.localeCompare(expected) < 0;
|
|
9
|
-
case "lte": return value.localeCompare(expected) <= 0;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
function bundleIdMatchesFilter(id, filter) {
|
|
13
|
-
if (!filter) return true;
|
|
14
|
-
if (filter.in && !filter.in.includes(id)) return false;
|
|
15
|
-
return compareValue(id, filter.eq, "eq") && compareValue(id, filter.gt, "gt") && compareValue(id, filter.gte, "gte") && compareValue(id, filter.lt, "lt") && compareValue(id, filter.lte, "lte");
|
|
16
|
-
}
|
|
17
|
-
function bundleMatchesQueryWhere(bundle, where) {
|
|
18
|
-
if (!where) return true;
|
|
19
|
-
if (where.platform !== void 0 && bundle.platform !== where.platform) return false;
|
|
20
|
-
if (!bundleIdMatchesFilter(bundle.id, where.id)) return false;
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
function sortBundles(bundles, orderBy) {
|
|
24
|
-
const direction = orderBy?.direction ?? "desc";
|
|
25
|
-
if (orderBy && orderBy.field !== "id") return [...bundles];
|
|
26
|
-
return bundles.slice().sort((a, b) => {
|
|
27
|
-
const result = a.id.localeCompare(b.id);
|
|
28
|
-
return direction === "asc" ? result : -result;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
exports.bundleIdMatchesFilter = bundleIdMatchesFilter;
|
|
33
|
-
exports.bundleMatchesQueryWhere = bundleMatchesQueryWhere;
|
|
34
|
-
exports.sortBundles = sortBundles;
|
package/dist/queryBundles.d.cts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Bundle, DatabaseBundleIdFilter, DatabaseBundleQueryOrder, DatabaseBundleQueryWhere } from "./types/index.cjs";
|
|
2
|
-
//#region src/queryBundles.d.ts
|
|
3
|
-
declare function bundleIdMatchesFilter(id: string, filter: DatabaseBundleIdFilter | undefined): boolean;
|
|
4
|
-
declare function bundleMatchesQueryWhere(bundle: Bundle, where: DatabaseBundleQueryWhere | undefined): boolean;
|
|
5
|
-
declare function sortBundles<TBundle extends {
|
|
6
|
-
readonly id: string;
|
|
7
|
-
}>(bundles: readonly TBundle[], orderBy: DatabaseBundleQueryOrder | undefined): TBundle[];
|
|
8
|
-
//#endregion
|
|
9
|
-
export { bundleIdMatchesFilter, bundleMatchesQueryWhere, sortBundles };
|
package/dist/queryBundles.d.mts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Bundle, DatabaseBundleIdFilter, DatabaseBundleQueryOrder, DatabaseBundleQueryWhere } from "./types/index.mjs";
|
|
2
|
-
//#region src/queryBundles.d.ts
|
|
3
|
-
declare function bundleIdMatchesFilter(id: string, filter: DatabaseBundleIdFilter | undefined): boolean;
|
|
4
|
-
declare function bundleMatchesQueryWhere(bundle: Bundle, where: DatabaseBundleQueryWhere | undefined): boolean;
|
|
5
|
-
declare function sortBundles<TBundle extends {
|
|
6
|
-
readonly id: string;
|
|
7
|
-
}>(bundles: readonly TBundle[], orderBy: DatabaseBundleQueryOrder | undefined): TBundle[];
|
|
8
|
-
//#endregion
|
|
9
|
-
export { bundleIdMatchesFilter, bundleMatchesQueryWhere, sortBundles };
|
package/dist/queryBundles.mjs
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
//#region src/queryBundles.ts
|
|
2
|
-
const compareValue = (value, expected, comparator) => {
|
|
3
|
-
if (expected === void 0) return true;
|
|
4
|
-
switch (comparator) {
|
|
5
|
-
case "eq": return value === expected;
|
|
6
|
-
case "gt": return value.localeCompare(expected) > 0;
|
|
7
|
-
case "gte": return value.localeCompare(expected) >= 0;
|
|
8
|
-
case "lt": return value.localeCompare(expected) < 0;
|
|
9
|
-
case "lte": return value.localeCompare(expected) <= 0;
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
function bundleIdMatchesFilter(id, filter) {
|
|
13
|
-
if (!filter) return true;
|
|
14
|
-
if (filter.in && !filter.in.includes(id)) return false;
|
|
15
|
-
return compareValue(id, filter.eq, "eq") && compareValue(id, filter.gt, "gt") && compareValue(id, filter.gte, "gte") && compareValue(id, filter.lt, "lt") && compareValue(id, filter.lte, "lte");
|
|
16
|
-
}
|
|
17
|
-
function bundleMatchesQueryWhere(bundle, where) {
|
|
18
|
-
if (!where) return true;
|
|
19
|
-
if (where.platform !== void 0 && bundle.platform !== where.platform) return false;
|
|
20
|
-
if (!bundleIdMatchesFilter(bundle.id, where.id)) return false;
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
function sortBundles(bundles, orderBy) {
|
|
24
|
-
const direction = orderBy?.direction ?? "desc";
|
|
25
|
-
if (orderBy && orderBy.field !== "id") return [...bundles];
|
|
26
|
-
return bundles.slice().sort((a, b) => {
|
|
27
|
-
const result = a.id.localeCompare(b.id);
|
|
28
|
-
return direction === "asc" ? result : -result;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
export { bundleIdMatchesFilter, bundleMatchesQueryWhere, sortBundles };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//#region src/requestBundleCache.ts
|
|
2
|
-
const createRequestBundleResolver = () => {
|
|
3
|
-
const entries = /* @__PURE__ */ new Map();
|
|
4
|
-
const pendingLoads = /* @__PURE__ */ new Map();
|
|
5
|
-
return { async getById(bundleId, loadBundleById) {
|
|
6
|
-
if (entries.has(bundleId)) return entries.get(bundleId) ?? null;
|
|
7
|
-
const pending = pendingLoads.get(bundleId);
|
|
8
|
-
if (pending) return pending;
|
|
9
|
-
const load = loadBundleById().then((bundle) => {
|
|
10
|
-
pendingLoads.delete(bundleId);
|
|
11
|
-
if (!entries.has(bundleId)) entries.set(bundleId, bundle);
|
|
12
|
-
return entries.get(bundleId) ?? null;
|
|
13
|
-
}, (error) => {
|
|
14
|
-
pendingLoads.delete(bundleId);
|
|
15
|
-
throw error;
|
|
16
|
-
});
|
|
17
|
-
pendingLoads.set(bundleId, load);
|
|
18
|
-
return load;
|
|
19
|
-
} };
|
|
20
|
-
};
|
|
21
|
-
//#endregion
|
|
22
|
-
exports.createRequestBundleResolver = createRequestBundleResolver;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Bundle } from "./types/index.cjs";
|
|
2
|
-
//#region src/requestBundleCache.d.ts
|
|
3
|
-
interface RequestBundleResolver {
|
|
4
|
-
readonly getById: (bundleId: string, loadBundleById: () => Promise<Bundle | null>) => Promise<Bundle | null>;
|
|
5
|
-
}
|
|
6
|
-
declare const createRequestBundleResolver: () => RequestBundleResolver;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { RequestBundleResolver, createRequestBundleResolver };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Bundle } from "./types/index.mjs";
|
|
2
|
-
//#region src/requestBundleCache.d.ts
|
|
3
|
-
interface RequestBundleResolver {
|
|
4
|
-
readonly getById: (bundleId: string, loadBundleById: () => Promise<Bundle | null>) => Promise<Bundle | null>;
|
|
5
|
-
}
|
|
6
|
-
declare const createRequestBundleResolver: () => RequestBundleResolver;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { RequestBundleResolver, createRequestBundleResolver };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//#region src/requestBundleCache.ts
|
|
2
|
-
const createRequestBundleResolver = () => {
|
|
3
|
-
const entries = /* @__PURE__ */ new Map();
|
|
4
|
-
const pendingLoads = /* @__PURE__ */ new Map();
|
|
5
|
-
return { async getById(bundleId, loadBundleById) {
|
|
6
|
-
if (entries.has(bundleId)) return entries.get(bundleId) ?? null;
|
|
7
|
-
const pending = pendingLoads.get(bundleId);
|
|
8
|
-
if (pending) return pending;
|
|
9
|
-
const load = loadBundleById().then((bundle) => {
|
|
10
|
-
pendingLoads.delete(bundleId);
|
|
11
|
-
if (!entries.has(bundleId)) entries.set(bundleId, bundle);
|
|
12
|
-
return entries.get(bundleId) ?? null;
|
|
13
|
-
}, (error) => {
|
|
14
|
-
pendingLoads.delete(bundleId);
|
|
15
|
-
throw error;
|
|
16
|
-
});
|
|
17
|
-
pendingLoads.set(bundleId, load);
|
|
18
|
-
return load;
|
|
19
|
-
} };
|
|
20
|
-
};
|
|
21
|
-
//#endregion
|
|
22
|
-
export { createRequestBundleResolver };
|
|
@@ -1,5 +0,0 @@
|
|
|
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
|
-
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, 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,5 +0,0 @@
|
|
|
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
|
-
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, 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 };
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
//#region src/types/databaseFields.ts
|
|
2
|
-
const databaseFields = {
|
|
3
|
-
bundles: [
|
|
4
|
-
"id",
|
|
5
|
-
"platform",
|
|
6
|
-
"file_hash",
|
|
7
|
-
"git_commit_hash",
|
|
8
|
-
"storage_uri",
|
|
9
|
-
"archive_byte_size",
|
|
10
|
-
"metadata",
|
|
11
|
-
"manifest_storage_uri",
|
|
12
|
-
"manifest_file_hash",
|
|
13
|
-
"asset_base_storage_uri"
|
|
14
|
-
],
|
|
15
|
-
bundle_patches: [
|
|
16
|
-
"id",
|
|
17
|
-
"bundle_id",
|
|
18
|
-
"base_bundle_id",
|
|
19
|
-
"base_file_hash",
|
|
20
|
-
"patch_file_hash",
|
|
21
|
-
"patch_storage_uri",
|
|
22
|
-
"byte_size",
|
|
23
|
-
"order_index"
|
|
24
|
-
],
|
|
25
|
-
releases: [
|
|
26
|
-
"id",
|
|
27
|
-
"revision",
|
|
28
|
-
"scope_key",
|
|
29
|
-
"channel_id",
|
|
30
|
-
"platform",
|
|
31
|
-
"kind",
|
|
32
|
-
"bundle_id",
|
|
33
|
-
"strategy",
|
|
34
|
-
"target_app_version",
|
|
35
|
-
"fingerprint_hash",
|
|
36
|
-
"enabled",
|
|
37
|
-
"should_force_update",
|
|
38
|
-
"message",
|
|
39
|
-
"rollout_cohort_count",
|
|
40
|
-
"target_cohorts",
|
|
41
|
-
"operation",
|
|
42
|
-
"source_release_id",
|
|
43
|
-
"created_at_ms",
|
|
44
|
-
"updated_at_ms"
|
|
45
|
-
],
|
|
46
|
-
release_catalogs: [
|
|
47
|
-
"scope_key",
|
|
48
|
-
"catalog_id",
|
|
49
|
-
"strategy",
|
|
50
|
-
"channel_id",
|
|
51
|
-
"channel_key",
|
|
52
|
-
"platform",
|
|
53
|
-
"fingerprint_hash",
|
|
54
|
-
"generation",
|
|
55
|
-
"payload",
|
|
56
|
-
"catalog_hash",
|
|
57
|
-
"byte_size",
|
|
58
|
-
"is_tombstone",
|
|
59
|
-
"updated_at_ms"
|
|
60
|
-
],
|
|
61
|
-
channels: ["id", "name"],
|
|
62
|
-
bundle_events: [
|
|
63
|
-
"id",
|
|
64
|
-
"type",
|
|
65
|
-
"install_id",
|
|
66
|
-
"user_id",
|
|
67
|
-
"username",
|
|
68
|
-
"from_bundle_id",
|
|
69
|
-
"from_release_id",
|
|
70
|
-
"to_release_id",
|
|
71
|
-
"to_bundle_id",
|
|
72
|
-
"platform",
|
|
73
|
-
"app_version",
|
|
74
|
-
"channel",
|
|
75
|
-
"cohort",
|
|
76
|
-
"update_strategy",
|
|
77
|
-
"fingerprint_hash",
|
|
78
|
-
"sdk_version",
|
|
79
|
-
"received_at_ms"
|
|
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
|
-
],
|
|
94
|
-
api_keys: [
|
|
95
|
-
"id",
|
|
96
|
-
"hash",
|
|
97
|
-
"name",
|
|
98
|
-
"prefix",
|
|
99
|
-
"role",
|
|
100
|
-
"created_at_ms",
|
|
101
|
-
"revoked_at_ms"
|
|
102
|
-
]
|
|
103
|
-
};
|
|
104
|
-
//#endregion
|
|
105
|
-
exports.databaseFields = databaseFields;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//#region src/types/databaseFields.d.ts
|
|
2
|
-
declare const databaseFields: {
|
|
3
|
-
readonly bundles: readonly ["id", "platform", "file_hash", "git_commit_hash", "storage_uri", "archive_byte_size", "metadata", "manifest_storage_uri", "manifest_file_hash", "asset_base_storage_uri"];
|
|
4
|
-
readonly bundle_patches: readonly ["id", "bundle_id", "base_bundle_id", "base_file_hash", "patch_file_hash", "patch_storage_uri", "byte_size", "order_index"];
|
|
5
|
-
readonly releases: readonly ["id", "revision", "scope_key", "channel_id", "platform", "kind", "bundle_id", "strategy", "target_app_version", "fingerprint_hash", "enabled", "should_force_update", "message", "rollout_cohort_count", "target_cohorts", "operation", "source_release_id", "created_at_ms", "updated_at_ms"];
|
|
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
|
-
readonly channels: readonly ["id", "name"];
|
|
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"];
|
|
10
|
-
readonly api_keys: readonly ["id", "hash", "name", "prefix", "role", "created_at_ms", "revoked_at_ms"];
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { databaseFields };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//#region src/types/databaseFields.d.ts
|
|
2
|
-
declare const databaseFields: {
|
|
3
|
-
readonly bundles: readonly ["id", "platform", "file_hash", "git_commit_hash", "storage_uri", "archive_byte_size", "metadata", "manifest_storage_uri", "manifest_file_hash", "asset_base_storage_uri"];
|
|
4
|
-
readonly bundle_patches: readonly ["id", "bundle_id", "base_bundle_id", "base_file_hash", "patch_file_hash", "patch_storage_uri", "byte_size", "order_index"];
|
|
5
|
-
readonly releases: readonly ["id", "revision", "scope_key", "channel_id", "platform", "kind", "bundle_id", "strategy", "target_app_version", "fingerprint_hash", "enabled", "should_force_update", "message", "rollout_cohort_count", "target_cohorts", "operation", "source_release_id", "created_at_ms", "updated_at_ms"];
|
|
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
|
-
readonly channels: readonly ["id", "name"];
|
|
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"];
|
|
10
|
-
readonly api_keys: readonly ["id", "hash", "name", "prefix", "role", "created_at_ms", "revoked_at_ms"];
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { databaseFields };
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
//#region src/types/databaseFields.ts
|
|
2
|
-
const databaseFields = {
|
|
3
|
-
bundles: [
|
|
4
|
-
"id",
|
|
5
|
-
"platform",
|
|
6
|
-
"file_hash",
|
|
7
|
-
"git_commit_hash",
|
|
8
|
-
"storage_uri",
|
|
9
|
-
"archive_byte_size",
|
|
10
|
-
"metadata",
|
|
11
|
-
"manifest_storage_uri",
|
|
12
|
-
"manifest_file_hash",
|
|
13
|
-
"asset_base_storage_uri"
|
|
14
|
-
],
|
|
15
|
-
bundle_patches: [
|
|
16
|
-
"id",
|
|
17
|
-
"bundle_id",
|
|
18
|
-
"base_bundle_id",
|
|
19
|
-
"base_file_hash",
|
|
20
|
-
"patch_file_hash",
|
|
21
|
-
"patch_storage_uri",
|
|
22
|
-
"byte_size",
|
|
23
|
-
"order_index"
|
|
24
|
-
],
|
|
25
|
-
releases: [
|
|
26
|
-
"id",
|
|
27
|
-
"revision",
|
|
28
|
-
"scope_key",
|
|
29
|
-
"channel_id",
|
|
30
|
-
"platform",
|
|
31
|
-
"kind",
|
|
32
|
-
"bundle_id",
|
|
33
|
-
"strategy",
|
|
34
|
-
"target_app_version",
|
|
35
|
-
"fingerprint_hash",
|
|
36
|
-
"enabled",
|
|
37
|
-
"should_force_update",
|
|
38
|
-
"message",
|
|
39
|
-
"rollout_cohort_count",
|
|
40
|
-
"target_cohorts",
|
|
41
|
-
"operation",
|
|
42
|
-
"source_release_id",
|
|
43
|
-
"created_at_ms",
|
|
44
|
-
"updated_at_ms"
|
|
45
|
-
],
|
|
46
|
-
release_catalogs: [
|
|
47
|
-
"scope_key",
|
|
48
|
-
"catalog_id",
|
|
49
|
-
"strategy",
|
|
50
|
-
"channel_id",
|
|
51
|
-
"channel_key",
|
|
52
|
-
"platform",
|
|
53
|
-
"fingerprint_hash",
|
|
54
|
-
"generation",
|
|
55
|
-
"payload",
|
|
56
|
-
"catalog_hash",
|
|
57
|
-
"byte_size",
|
|
58
|
-
"is_tombstone",
|
|
59
|
-
"updated_at_ms"
|
|
60
|
-
],
|
|
61
|
-
channels: ["id", "name"],
|
|
62
|
-
bundle_events: [
|
|
63
|
-
"id",
|
|
64
|
-
"type",
|
|
65
|
-
"install_id",
|
|
66
|
-
"user_id",
|
|
67
|
-
"username",
|
|
68
|
-
"from_bundle_id",
|
|
69
|
-
"from_release_id",
|
|
70
|
-
"to_release_id",
|
|
71
|
-
"to_bundle_id",
|
|
72
|
-
"platform",
|
|
73
|
-
"app_version",
|
|
74
|
-
"channel",
|
|
75
|
-
"cohort",
|
|
76
|
-
"update_strategy",
|
|
77
|
-
"fingerprint_hash",
|
|
78
|
-
"sdk_version",
|
|
79
|
-
"received_at_ms"
|
|
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
|
-
],
|
|
94
|
-
api_keys: [
|
|
95
|
-
"id",
|
|
96
|
-
"hash",
|
|
97
|
-
"name",
|
|
98
|
-
"prefix",
|
|
99
|
-
"role",
|
|
100
|
-
"created_at_ms",
|
|
101
|
-
"revoked_at_ms"
|
|
102
|
-
]
|
|
103
|
-
};
|
|
104
|
-
//#endregion
|
|
105
|
-
export { databaseFields };
|