@hot-updater/plugin-core 1.0.0-rc.0 → 1.0.0-rc.1
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/createDatabasePlugin.cjs +3 -3
- package/dist/createDatabasePlugin.mjs +3 -3
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/internal.d.cts +2 -2
- package/dist/internal.d.mts +2 -2
- package/dist/remoteBundleSigning.cjs +1 -3
- package/dist/remoteBundleSigning.d.cts +0 -2
- package/dist/remoteBundleSigning.d.mts +0 -2
- package/dist/remoteBundleSigning.mjs +1 -3
- package/dist/types/database.d.cts +1 -1
- package/dist/types/database.d.mts +1 -1
- package/dist/types/databasePlugin.d.cts +8 -8
- package/dist/types/databasePlugin.d.mts +8 -8
- package/dist/types/index.d.cts +7 -7
- package/dist/types/index.d.mts +7 -7
- package/dist/types/internal.d.cts +1 -1
- package/dist/types/internal.d.mts +1 -1
- package/dist/types/public.d.cts +1 -1
- package/dist/types/public.d.mts +1 -1
- package/package.json +1 -1
|
@@ -255,7 +255,7 @@ const applyChange = async (database, change, changeIndex) => {
|
|
|
255
255
|
}
|
|
256
256
|
return;
|
|
257
257
|
}
|
|
258
|
-
case "
|
|
258
|
+
case "insights":
|
|
259
259
|
await database.create({
|
|
260
260
|
model: "bundle_events",
|
|
261
261
|
data: change.row
|
|
@@ -442,7 +442,7 @@ const validateDatabaseChange = (change) => {
|
|
|
442
442
|
return;
|
|
443
443
|
default: throw new require_databasePluginCrudValidationErrors.DatabasePluginInputError("invalid-operation");
|
|
444
444
|
}
|
|
445
|
-
case "
|
|
445
|
+
case "insights":
|
|
446
446
|
if (change.operation !== "insert" || !hasOnlyKeys(change, [
|
|
447
447
|
"model",
|
|
448
448
|
"operation",
|
|
@@ -717,7 +717,7 @@ const createDatabasePluginAdapter = (name, implementation) => {
|
|
|
717
717
|
return result;
|
|
718
718
|
}
|
|
719
719
|
},
|
|
720
|
-
|
|
720
|
+
insights: {
|
|
721
721
|
async append(row) {
|
|
722
722
|
await crud.create({
|
|
723
723
|
model: "bundle_events",
|
|
@@ -255,7 +255,7 @@ const applyChange = async (database, change, changeIndex) => {
|
|
|
255
255
|
}
|
|
256
256
|
return;
|
|
257
257
|
}
|
|
258
|
-
case "
|
|
258
|
+
case "insights":
|
|
259
259
|
await database.create({
|
|
260
260
|
model: "bundle_events",
|
|
261
261
|
data: change.row
|
|
@@ -442,7 +442,7 @@ const validateDatabaseChange = (change) => {
|
|
|
442
442
|
return;
|
|
443
443
|
default: throw new DatabasePluginInputError("invalid-operation");
|
|
444
444
|
}
|
|
445
|
-
case "
|
|
445
|
+
case "insights":
|
|
446
446
|
if (change.operation !== "insert" || !hasOnlyKeys(change, [
|
|
447
447
|
"model",
|
|
448
448
|
"operation",
|
|
@@ -717,7 +717,7 @@ const createDatabasePluginAdapter = (name, implementation) => {
|
|
|
717
717
|
return result;
|
|
718
718
|
}
|
|
719
719
|
},
|
|
720
|
-
|
|
720
|
+
insights: {
|
|
721
721
|
async append(row) {
|
|
722
722
|
await crud.create({
|
|
723
723
|
model: "bundle_events",
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel, InsightsScanCursor, InsightsScanInput, ReleaseCatalogModel, ReleaseModel } from "./types/databasePlugin.cjs";
|
|
3
3
|
import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./types/databaseOperations.cjs";
|
|
4
4
|
import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.cjs";
|
|
5
5
|
import { ApplePlatform, BasePluginArgs, BuildPlugin, BuildPluginConfig, Bundle, BundleSigningPlugin, ConfigInput, DatabaseBundleCursor, DatabaseBundleIdFilter, DatabaseBundleQueryOptions, DatabaseBundleQueryOrder, DatabaseBundleQueryWhere, FingerprintExtraSources, IosBuildDestination, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, Paginated, PaginatedResult, PaginationInfo, Platform, PlatformConfig, SigningConfig, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StoragePlugin, StoragePutInput, StoragePutResult, supportedIosPlatforms } from "./types/index.cjs";
|
|
@@ -29,4 +29,4 @@ import { BundleSigningHandlerOptions, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BU
|
|
|
29
29
|
import { semverSatisfies } from "./semverSatisfies.cjs";
|
|
30
30
|
import { createStorageDownloadPath, createStorageDownloadUrl, parseStorageDownloadPath } from "./storageDownloadPath.cjs";
|
|
31
31
|
import { createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, isUUIDv7 } from "./uuidv7.cjs";
|
|
32
|
-
export {
|
|
32
|
+
export { ApiKeyModel, ApiKeyRow, ApplePlatform, BUNDLE_STORAGE_PREFIX, BasePluginArgs, BuildPlugin, BuildPluginConfig, BuiltIns, Bundle, BundleEventRow, BundleEventRowBase, BundleModel, BundleModelQuery, BundlePatchModel, BundlePatchRow, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, BundleRow, BundleRowHydrationError, BundleRowHydrationErrorReason, BundleRowUpdate, BundleSigningHandlerOptions, BundleSigningPlugin, CONTENT_ADDRESSED_ASSET_PREFIX, CatalogVersionBound, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, ChannelRow, CompiledCatalogSegment, CompiledReleaseCatalog, CompressionFormat, CompressionFormatInfo, ConfigInput, type CreateDatabasePluginOptions, CreateStoragePluginOptions, CreateStorageUriInput, DatabaseAtomicCommitUnsupportedError, DatabaseBundleCursor, DatabaseBundleIdFilter, DatabaseBundleMetadata, DatabaseBundleNotFoundError, DatabaseBundleQueryOptions, DatabaseBundleQueryOrder, DatabaseBundleQueryWhere, DatabaseChange, DatabaseClient, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseJsonObject, DatabaseJsonValue, DatabaseModels, DatabaseMutationClient, DatabasePatchInsertUnsupportedError, DatabasePatchUpdateUnsupportedError, DatabasePlugin, DatabasePluginInputError, type DatabasePluginInputErrorCode, FingerprintExtraSources, HasMultipleCallSignatures, InsightsModel, InsightsScanCursor, InsightsScanInput, IosBuildDestination, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, Paginated, PaginatedResult, PaginationInfo, PaginationOptions, ParsedStorageUri, Platform, PlatformConfig, Primitive, PromoteReleaseInput, PromoteReleaseResult, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, ReleaseCatalogModel, ReleaseCatalogMutation, ReleaseCatalogMutationError, ReleaseCatalogMutationInput, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, ReleaseCatalogRow, ReleaseCatalogRowUpdate, ReleaseCatalogScope, ReleaseManagementError, ReleaseModel, ReleaseMutationTarget, ReleasePolicyPatch, ReleaseRow, ReleaseRowUpdate, RemoteSigningOptions, RequiredDeep, RollbackReleaseInput, SigningConfig, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StorageOperation, StoragePlugin, StoragePluginWith, StoragePutInput, StoragePutResult, assertStorageOperations, bundleIdMatchesFilter, bundleMatchesQueryWhere, bundleToPatchRows, bundleToRow, calculatePagination, canonicalizeAppVersion, commitReleaseCatalogMutation, commitReleaseCatalogMutations, compileReleaseCatalog, createBundleSigningHandler, createBundleStorageKey, createDatabaseClient, createDatabasePlugin, createRequestBundleResolver, createStorageDownloadPath, createStorageDownloadUrl, createStorageKeyBuilder, createStoragePlugin, createStorageRootUriWithPath, createStorageUri, createStorageUriWithRelativePath, createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, deleteRelease, detectCompressionFormat, extractTimestampFromUUIDv7, filterCompatibleAppVersions, generateMinBundleId, getCompressionMimeType, getContentAddressedAssetStoragePath, getContentType, getManifestAssetDownloadPath, getManifestAssetStoragePath, isBrotliManifestAssetPath, isContentAddressedAssetFileHash, isDatabaseMetadataObject, isUUIDv7, paginateBundles, parseStorageDownloadPath, parseStorageUri, preflightReleaseCatalogMutation, preflightReleaseCatalogRebuild, preflightReleasePolicy, projectCompiledCatalog, projectCompiledRollbackCatalog, promoteRelease, rebuildReleaseCatalog, referenceCompatibleReleases, releaseRowToRelease, releaseToRow, remoteSigning, replaceStorageUriKeySuffix, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri, rollbackRelease, rollbackReleases, rowToBundle, rowsToBundles, semverSatisfies, sortBundles, supportedIosPlatforms, updateReleasePolicy };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel, InsightsScanCursor, InsightsScanInput, ReleaseCatalogModel, ReleaseModel } from "./types/databasePlugin.mjs";
|
|
3
3
|
import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./types/databaseOperations.mjs";
|
|
4
4
|
import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.mjs";
|
|
5
5
|
import { ApplePlatform, BasePluginArgs, BuildPlugin, BuildPluginConfig, Bundle, BundleSigningPlugin, ConfigInput, DatabaseBundleCursor, DatabaseBundleIdFilter, DatabaseBundleQueryOptions, DatabaseBundleQueryOrder, DatabaseBundleQueryWhere, FingerprintExtraSources, IosBuildDestination, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, Paginated, PaginatedResult, PaginationInfo, Platform, PlatformConfig, SigningConfig, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StoragePlugin, StoragePutInput, StoragePutResult, supportedIosPlatforms } from "./types/index.mjs";
|
|
@@ -29,4 +29,4 @@ import { BundleSigningHandlerOptions, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BU
|
|
|
29
29
|
import { semverSatisfies } from "./semverSatisfies.mjs";
|
|
30
30
|
import { createStorageDownloadPath, createStorageDownloadUrl, parseStorageDownloadPath } from "./storageDownloadPath.mjs";
|
|
31
31
|
import { createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, isUUIDv7 } from "./uuidv7.mjs";
|
|
32
|
-
export {
|
|
32
|
+
export { ApiKeyModel, ApiKeyRow, ApplePlatform, BUNDLE_STORAGE_PREFIX, BasePluginArgs, BuildPlugin, BuildPluginConfig, BuiltIns, Bundle, BundleEventRow, BundleEventRowBase, BundleModel, BundleModelQuery, BundlePatchModel, BundlePatchRow, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, BundleRow, BundleRowHydrationError, BundleRowHydrationErrorReason, BundleRowUpdate, BundleSigningHandlerOptions, BundleSigningPlugin, CONTENT_ADDRESSED_ASSET_PREFIX, CatalogVersionBound, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, ChannelRow, CompiledCatalogSegment, CompiledReleaseCatalog, CompressionFormat, CompressionFormatInfo, ConfigInput, type CreateDatabasePluginOptions, CreateStoragePluginOptions, CreateStorageUriInput, DatabaseAtomicCommitUnsupportedError, DatabaseBundleCursor, DatabaseBundleIdFilter, DatabaseBundleMetadata, DatabaseBundleNotFoundError, DatabaseBundleQueryOptions, DatabaseBundleQueryOrder, DatabaseBundleQueryWhere, DatabaseChange, DatabaseClient, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseJsonObject, DatabaseJsonValue, DatabaseModels, DatabaseMutationClient, DatabasePatchInsertUnsupportedError, DatabasePatchUpdateUnsupportedError, DatabasePlugin, DatabasePluginInputError, type DatabasePluginInputErrorCode, FingerprintExtraSources, HasMultipleCallSignatures, InsightsModel, InsightsScanCursor, InsightsScanInput, IosBuildDestination, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, Paginated, PaginatedResult, PaginationInfo, PaginationOptions, ParsedStorageUri, Platform, PlatformConfig, Primitive, PromoteReleaseInput, PromoteReleaseResult, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, ReleaseCatalogModel, ReleaseCatalogMutation, ReleaseCatalogMutationError, ReleaseCatalogMutationInput, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, ReleaseCatalogRow, ReleaseCatalogRowUpdate, ReleaseCatalogScope, ReleaseManagementError, ReleaseModel, ReleaseMutationTarget, ReleasePolicyPatch, ReleaseRow, ReleaseRowUpdate, RemoteSigningOptions, RequiredDeep, RollbackReleaseInput, SigningConfig, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StorageOperation, StoragePlugin, StoragePluginWith, StoragePutInput, StoragePutResult, assertStorageOperations, bundleIdMatchesFilter, bundleMatchesQueryWhere, bundleToPatchRows, bundleToRow, calculatePagination, canonicalizeAppVersion, commitReleaseCatalogMutation, commitReleaseCatalogMutations, compileReleaseCatalog, createBundleSigningHandler, createBundleStorageKey, createDatabaseClient, createDatabasePlugin, createRequestBundleResolver, createStorageDownloadPath, createStorageDownloadUrl, createStorageKeyBuilder, createStoragePlugin, createStorageRootUriWithPath, createStorageUri, createStorageUriWithRelativePath, createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, deleteRelease, detectCompressionFormat, extractTimestampFromUUIDv7, filterCompatibleAppVersions, generateMinBundleId, getCompressionMimeType, getContentAddressedAssetStoragePath, getContentType, getManifestAssetDownloadPath, getManifestAssetStoragePath, isBrotliManifestAssetPath, isContentAddressedAssetFileHash, isDatabaseMetadataObject, isUUIDv7, paginateBundles, parseStorageDownloadPath, parseStorageUri, preflightReleaseCatalogMutation, preflightReleaseCatalogRebuild, preflightReleasePolicy, projectCompiledCatalog, projectCompiledRollbackCatalog, promoteRelease, rebuildReleaseCatalog, referenceCompatibleReleases, releaseRowToRelease, releaseToRow, remoteSigning, replaceStorageUriKeySuffix, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri, rollbackRelease, rollbackReleases, rowToBundle, rowsToBundles, semverSatisfies, sortBundles, supportedIosPlatforms, updateReleasePolicy };
|
package/dist/internal.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseField, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelMap, DatabaseRow, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel, InsightsScanCursor, InsightsScanInput, ReleaseCatalogModel, ReleaseModel } from "./types/databasePlugin.cjs";
|
|
3
3
|
import { DatabaseDistinctFields, DatabaseDistinctOn, DatabaseOrderBy, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, SelectedDatabaseRow } from "./types/databaseQuery.cjs";
|
|
4
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 "./types/databaseOperations.cjs";
|
|
5
5
|
import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.cjs";
|
|
6
6
|
import { ApplePlatform, BasePluginArgs, BuildPlugin, BuildPluginConfig, Bundle, BundleSigningPlugin, ConfigInput, DatabaseBundleCursor, DatabaseBundleIdFilter, DatabaseBundleQueryOptions, DatabaseBundleQueryOrder, DatabaseBundleQueryWhere, FingerprintExtraSources, IosBuildDestination, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, Paginated, PaginatedResult, PaginationInfo, Platform, PlatformConfig, SigningConfig, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StoragePlugin, StoragePutInput, StoragePutResult, supportedIosPlatforms } from "./types/index.cjs";
|
|
7
7
|
import { databaseFields } from "./types/databaseFields.cjs";
|
|
8
8
|
import { DatabasePluginAdapter, DatabaseRowReferencedError, createDatabasePluginAdapter } from "./createDatabasePlugin.cjs";
|
|
9
|
-
export {
|
|
9
|
+
export { ApiKeyModel, ApiKeyRow, ApiKeyRowUpdate, ApplePlatform, BasePluginArgs, BuildPlugin, BuildPluginConfig, BuiltIns, Bundle, BundleEventRow, BundleEventRowBase, BundleModel, BundleModelQuery, BundlePatchModel, BundlePatchRow, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, BundleRow, BundleRowUpdate, BundleSigningPlugin, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, ChannelRow, ConfigInput, CountBundlesDatabaseImplementationInput, CountBundlesDatabaseInput, CountDatabaseImplementationInput, CountDatabaseInput, CountDatabaseModel, CreateDatabaseImplementationInput, CreateDatabaseInput, CreateDatabaseModel, DatabaseBundleCursor, DatabaseBundleIdFilter, DatabaseBundleMetadata, DatabaseBundleQueryOptions, DatabaseBundleQueryOrder, DatabaseBundleQueryWhere, DatabaseCapability, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseDeleteModel, DatabaseDistinctFields, DatabaseDistinctOn, DatabaseField, DatabaseFindOneModel, DatabaseImplementationResult, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelCapabilities, DatabaseModelMap, DatabaseModels, DatabaseModelsWithCapability, DatabaseOrderBy, DatabasePlugin, type DatabasePluginAdapter, DatabasePluginCrud, DatabasePluginImplementation, DatabaseRow, DatabaseRowReferencedError, DatabaseRowUpdate, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, DeleteDatabaseImplementationInput, DeleteDatabaseInput, DeleteDatabaseModel, FindManyDatabaseImplementationInput, FindManyDatabaseInput, FindManyDatabaseModel, FindManyDatabasePluginInput, FindOneDatabaseImplementationInput, FindOneDatabaseInput, FindOneDatabaseModel, FingerprintExtraSources, HasMultipleCallSignatures, InsightsModel, InsightsScanCursor, InsightsScanInput, IosBuildDestination, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, Paginated, PaginatedResult, PaginationInfo, Platform, PlatformConfig, Primitive, ReleaseCatalogModel, ReleaseCatalogRow, ReleaseCatalogRowUpdate, ReleaseModel, ReleaseRow, ReleaseRowUpdate, RequiredDeep, SelectedDatabaseInputRow, SelectedDatabaseRow, SigningConfig, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StoragePlugin, StoragePutInput, StoragePutResult, TransactionDatabasePluginImplementation, UpdateBundleDatabaseImplementationInput, UpdateBundleDatabaseInput, UpdateDatabaseImplementationInput, UpdateDatabaseInput, UpdateDatabaseModel, createDatabasePluginAdapter, databaseFields, supportedIosPlatforms };
|
package/dist/internal.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseField, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelMap, DatabaseRow, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel, InsightsScanCursor, InsightsScanInput, ReleaseCatalogModel, ReleaseModel } from "./types/databasePlugin.mjs";
|
|
3
3
|
import { DatabaseDistinctFields, DatabaseDistinctOn, DatabaseOrderBy, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, SelectedDatabaseRow } from "./types/databaseQuery.mjs";
|
|
4
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 "./types/databaseOperations.mjs";
|
|
5
5
|
import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.mjs";
|
|
6
6
|
import { ApplePlatform, BasePluginArgs, BuildPlugin, BuildPluginConfig, Bundle, BundleSigningPlugin, ConfigInput, DatabaseBundleCursor, DatabaseBundleIdFilter, DatabaseBundleQueryOptions, DatabaseBundleQueryOrder, DatabaseBundleQueryWhere, FingerprintExtraSources, IosBuildDestination, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, Paginated, PaginatedResult, PaginationInfo, Platform, PlatformConfig, SigningConfig, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StoragePlugin, StoragePutInput, StoragePutResult, supportedIosPlatforms } from "./types/index.mjs";
|
|
7
7
|
import { databaseFields } from "./types/databaseFields.mjs";
|
|
8
8
|
import { DatabasePluginAdapter, DatabaseRowReferencedError, createDatabasePluginAdapter } from "./createDatabasePlugin.mjs";
|
|
9
|
-
export {
|
|
9
|
+
export { ApiKeyModel, ApiKeyRow, ApiKeyRowUpdate, ApplePlatform, BasePluginArgs, BuildPlugin, BuildPluginConfig, BuiltIns, Bundle, BundleEventRow, BundleEventRowBase, BundleModel, BundleModelQuery, BundlePatchModel, BundlePatchRow, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, BundleRow, BundleRowUpdate, BundleSigningPlugin, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, ChannelRow, ConfigInput, CountBundlesDatabaseImplementationInput, CountBundlesDatabaseInput, CountDatabaseImplementationInput, CountDatabaseInput, CountDatabaseModel, CreateDatabaseImplementationInput, CreateDatabaseInput, CreateDatabaseModel, DatabaseBundleCursor, DatabaseBundleIdFilter, DatabaseBundleMetadata, DatabaseBundleQueryOptions, DatabaseBundleQueryOrder, DatabaseBundleQueryWhere, DatabaseCapability, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseDeleteModel, DatabaseDistinctFields, DatabaseDistinctOn, DatabaseField, DatabaseFindOneModel, DatabaseImplementationResult, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelCapabilities, DatabaseModelMap, DatabaseModels, DatabaseModelsWithCapability, DatabaseOrderBy, DatabasePlugin, type DatabasePluginAdapter, DatabasePluginCrud, DatabasePluginImplementation, DatabaseRow, DatabaseRowReferencedError, DatabaseRowUpdate, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, DeleteDatabaseImplementationInput, DeleteDatabaseInput, DeleteDatabaseModel, FindManyDatabaseImplementationInput, FindManyDatabaseInput, FindManyDatabaseModel, FindManyDatabasePluginInput, FindOneDatabaseImplementationInput, FindOneDatabaseInput, FindOneDatabaseModel, FingerprintExtraSources, HasMultipleCallSignatures, InsightsModel, InsightsScanCursor, InsightsScanInput, IosBuildDestination, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, Paginated, PaginatedResult, PaginationInfo, Platform, PlatformConfig, Primitive, ReleaseCatalogModel, ReleaseCatalogRow, ReleaseCatalogRowUpdate, ReleaseModel, ReleaseRow, ReleaseRowUpdate, RequiredDeep, SelectedDatabaseInputRow, SelectedDatabaseRow, SigningConfig, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StoragePlugin, StoragePutInput, StoragePutResult, TransactionDatabasePluginImplementation, UpdateBundleDatabaseImplementationInput, UpdateBundleDatabaseInput, UpdateDatabaseImplementationInput, UpdateDatabaseInput, UpdateDatabaseModel, createDatabasePluginAdapter, databaseFields, supportedIosPlatforms };
|
|
@@ -160,8 +160,7 @@ const remoteRequest = async (fetchImplementation, endpoint, resolveToken, init)
|
|
|
160
160
|
return parseJsonBody(response.body, response.headers, RESPONSE_BODY_LIMIT);
|
|
161
161
|
};
|
|
162
162
|
/** Signs through a server implementing the Hot Updater signing protocol. */
|
|
163
|
-
const remoteSigning = ({ endpoint, fetch: fetchImplementation = globalThis.fetch,
|
|
164
|
-
if (!publicKeyPath.trim()) throw new Error("Remote bundle signing public key path is required.");
|
|
163
|
+
const remoteSigning = ({ endpoint, fetch: fetchImplementation = globalThis.fetch, signingToken }) => {
|
|
165
164
|
if (typeof fetchImplementation !== "function") throw new Error("Remote bundle signing requires fetch.");
|
|
166
165
|
const normalizedEndpoint = normalizeEndpoint(endpoint);
|
|
167
166
|
let resolvedKey;
|
|
@@ -180,7 +179,6 @@ const remoteSigning = ({ endpoint, fetch: fetchImplementation = globalThis.fetch
|
|
|
180
179
|
};
|
|
181
180
|
return {
|
|
182
181
|
name: "remoteSigning",
|
|
183
|
-
publicKeyPath,
|
|
184
182
|
async getPublicKey() {
|
|
185
183
|
const { publicKey } = await getResolvedKey();
|
|
186
184
|
return { publicKey };
|
|
@@ -9,7 +9,6 @@ type Fetch = typeof globalThis.fetch;
|
|
|
9
9
|
interface RemoteSigningOptions {
|
|
10
10
|
readonly endpoint: string;
|
|
11
11
|
readonly fetch?: Fetch;
|
|
12
|
-
readonly publicKeyPath: string;
|
|
13
12
|
/**
|
|
14
13
|
* Dedicated signing token or a lazy resolver for provider integrations.
|
|
15
14
|
* Defaults to HOT_UPDATER_SIGNING_TOKEN.
|
|
@@ -28,7 +27,6 @@ interface BundleSigningHandlerOptions {
|
|
|
28
27
|
declare const remoteSigning: ({
|
|
29
28
|
endpoint,
|
|
30
29
|
fetch: fetchImplementation,
|
|
31
|
-
publicKeyPath,
|
|
32
30
|
signingToken
|
|
33
31
|
}: RemoteSigningOptions) => BundleSigningPlugin;
|
|
34
32
|
/** Handles the portable managed signing protocol in Web API runtimes. */
|
|
@@ -9,7 +9,6 @@ type Fetch = typeof globalThis.fetch;
|
|
|
9
9
|
interface RemoteSigningOptions {
|
|
10
10
|
readonly endpoint: string;
|
|
11
11
|
readonly fetch?: Fetch;
|
|
12
|
-
readonly publicKeyPath: string;
|
|
13
12
|
/**
|
|
14
13
|
* Dedicated signing token or a lazy resolver for provider integrations.
|
|
15
14
|
* Defaults to HOT_UPDATER_SIGNING_TOKEN.
|
|
@@ -28,7 +27,6 @@ interface BundleSigningHandlerOptions {
|
|
|
28
27
|
declare const remoteSigning: ({
|
|
29
28
|
endpoint,
|
|
30
29
|
fetch: fetchImplementation,
|
|
31
|
-
publicKeyPath,
|
|
32
30
|
signingToken
|
|
33
31
|
}: RemoteSigningOptions) => BundleSigningPlugin;
|
|
34
32
|
/** Handles the portable managed signing protocol in Web API runtimes. */
|
|
@@ -160,8 +160,7 @@ const remoteRequest = async (fetchImplementation, endpoint, resolveToken, init)
|
|
|
160
160
|
return parseJsonBody(response.body, response.headers, RESPONSE_BODY_LIMIT);
|
|
161
161
|
};
|
|
162
162
|
/** Signs through a server implementing the Hot Updater signing protocol. */
|
|
163
|
-
const remoteSigning = ({ endpoint, fetch: fetchImplementation = globalThis.fetch,
|
|
164
|
-
if (!publicKeyPath.trim()) throw new Error("Remote bundle signing public key path is required.");
|
|
163
|
+
const remoteSigning = ({ endpoint, fetch: fetchImplementation = globalThis.fetch, signingToken }) => {
|
|
165
164
|
if (typeof fetchImplementation !== "function") throw new Error("Remote bundle signing requires fetch.");
|
|
166
165
|
const normalizedEndpoint = normalizeEndpoint(endpoint);
|
|
167
166
|
let resolvedKey;
|
|
@@ -180,7 +179,6 @@ const remoteSigning = ({ endpoint, fetch: fetchImplementation = globalThis.fetch
|
|
|
180
179
|
};
|
|
181
180
|
return {
|
|
182
181
|
name: "remoteSigning",
|
|
183
|
-
publicKeyPath,
|
|
184
182
|
async getPublicKey() {
|
|
185
183
|
const { publicKey } = await getResolvedKey();
|
|
186
184
|
return { publicKey };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseField, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelMap, DatabaseRow, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel, InsightsScanCursor, InsightsScanInput, ReleaseCatalogModel, ReleaseModel } from "./databasePlugin.cjs";
|
|
3
3
|
import { DatabaseDistinctFields, DatabaseDistinctOn, DatabaseOrderBy, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, SelectedDatabaseRow } from "./databaseQuery.cjs";
|
|
4
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseField, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelMap, DatabaseRow, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel, InsightsScanCursor, InsightsScanInput, ReleaseCatalogModel, ReleaseModel } from "./databasePlugin.mjs";
|
|
3
3
|
import { DatabaseDistinctFields, DatabaseDistinctOn, DatabaseOrderBy, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, SelectedDatabaseRow } from "./databaseQuery.mjs";
|
|
4
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";
|
|
@@ -43,18 +43,18 @@ interface ReleaseCatalogModel {
|
|
|
43
43
|
readonly limit: number;
|
|
44
44
|
}): Promise<readonly ReleaseCatalogRow[]>;
|
|
45
45
|
}
|
|
46
|
-
interface
|
|
46
|
+
interface InsightsScanCursor {
|
|
47
47
|
readonly receivedAtMs: number;
|
|
48
48
|
readonly id: string;
|
|
49
49
|
}
|
|
50
|
-
interface
|
|
50
|
+
interface InsightsScanInput {
|
|
51
51
|
readonly beforeReceivedAtMs: number;
|
|
52
|
-
readonly after?:
|
|
52
|
+
readonly after?: InsightsScanCursor;
|
|
53
53
|
readonly limit: number;
|
|
54
54
|
}
|
|
55
|
-
interface
|
|
55
|
+
interface InsightsModel {
|
|
56
56
|
append(row: BundleEventRow): Promise<void>;
|
|
57
|
-
scan(input:
|
|
57
|
+
scan(input: InsightsScanInput): Promise<readonly BundleEventRow[]>;
|
|
58
58
|
}
|
|
59
59
|
interface ApiKeyModel {
|
|
60
60
|
create(row: ApiKeyRow): Promise<"created" | "existing">;
|
|
@@ -149,7 +149,7 @@ type DatabaseChange = {
|
|
|
149
149
|
readonly id: string;
|
|
150
150
|
};
|
|
151
151
|
} | {
|
|
152
|
-
readonly model: "
|
|
152
|
+
readonly model: "insights";
|
|
153
153
|
readonly operation: "insert";
|
|
154
154
|
readonly row: BundleEventRow;
|
|
155
155
|
} | {
|
|
@@ -221,7 +221,7 @@ interface DatabaseModels {
|
|
|
221
221
|
readonly releases: ReleaseModel;
|
|
222
222
|
readonly releaseCatalogs: ReleaseCatalogModel;
|
|
223
223
|
readonly channels: ChannelModel;
|
|
224
|
-
readonly
|
|
224
|
+
readonly insights: InsightsModel;
|
|
225
225
|
readonly apiKeys: ApiKeyModel;
|
|
226
226
|
}
|
|
227
227
|
interface BundleRepository {
|
|
@@ -237,4 +237,4 @@ interface DatabasePlugin {
|
|
|
237
237
|
dispose?: () => Promise<void>;
|
|
238
238
|
}
|
|
239
239
|
//#endregion
|
|
240
|
-
export {
|
|
240
|
+
export { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel, InsightsScanCursor, InsightsScanInput, ReleaseCatalogModel, ReleaseModel };
|
|
@@ -43,18 +43,18 @@ interface ReleaseCatalogModel {
|
|
|
43
43
|
readonly limit: number;
|
|
44
44
|
}): Promise<readonly ReleaseCatalogRow[]>;
|
|
45
45
|
}
|
|
46
|
-
interface
|
|
46
|
+
interface InsightsScanCursor {
|
|
47
47
|
readonly receivedAtMs: number;
|
|
48
48
|
readonly id: string;
|
|
49
49
|
}
|
|
50
|
-
interface
|
|
50
|
+
interface InsightsScanInput {
|
|
51
51
|
readonly beforeReceivedAtMs: number;
|
|
52
|
-
readonly after?:
|
|
52
|
+
readonly after?: InsightsScanCursor;
|
|
53
53
|
readonly limit: number;
|
|
54
54
|
}
|
|
55
|
-
interface
|
|
55
|
+
interface InsightsModel {
|
|
56
56
|
append(row: BundleEventRow): Promise<void>;
|
|
57
|
-
scan(input:
|
|
57
|
+
scan(input: InsightsScanInput): Promise<readonly BundleEventRow[]>;
|
|
58
58
|
}
|
|
59
59
|
interface ApiKeyModel {
|
|
60
60
|
create(row: ApiKeyRow): Promise<"created" | "existing">;
|
|
@@ -149,7 +149,7 @@ type DatabaseChange = {
|
|
|
149
149
|
readonly id: string;
|
|
150
150
|
};
|
|
151
151
|
} | {
|
|
152
|
-
readonly model: "
|
|
152
|
+
readonly model: "insights";
|
|
153
153
|
readonly operation: "insert";
|
|
154
154
|
readonly row: BundleEventRow;
|
|
155
155
|
} | {
|
|
@@ -221,7 +221,7 @@ interface DatabaseModels {
|
|
|
221
221
|
readonly releases: ReleaseModel;
|
|
222
222
|
readonly releaseCatalogs: ReleaseCatalogModel;
|
|
223
223
|
readonly channels: ChannelModel;
|
|
224
|
-
readonly
|
|
224
|
+
readonly insights: InsightsModel;
|
|
225
225
|
readonly apiKeys: ApiKeyModel;
|
|
226
226
|
}
|
|
227
227
|
interface BundleRepository {
|
|
@@ -237,4 +237,4 @@ interface DatabasePlugin {
|
|
|
237
237
|
dispose?: () => Promise<void>;
|
|
238
238
|
}
|
|
239
239
|
//#endregion
|
|
240
|
-
export {
|
|
240
|
+
export { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel, InsightsScanCursor, InsightsScanInput, ReleaseCatalogModel, ReleaseModel };
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel, InsightsScanCursor, InsightsScanInput, ReleaseCatalogModel, ReleaseModel } from "./databasePlugin.cjs";
|
|
3
3
|
import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./databaseOperations.cjs";
|
|
4
4
|
import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./utils.cjs";
|
|
5
5
|
import { Bundle, Bundle as Bundle$1, Platform, Platform as Platform$1 } from "@hot-updater/core";
|
|
@@ -80,6 +80,10 @@ interface BuildPluginConfig {
|
|
|
80
80
|
}
|
|
81
81
|
interface BuildPlugin {
|
|
82
82
|
nativeBuild?: {
|
|
83
|
+
/** Resolves the public key embedded by the native build configuration. */getBundleSigningPublicKey?: () => Promise<{
|
|
84
|
+
readonly publicKey: string;
|
|
85
|
+
} | null>; /** Resolves native configuration files that must affect the fingerprint. */
|
|
86
|
+
getFingerprintExtraSources?: () => Promise<readonly string[]>;
|
|
83
87
|
prebuild?: (args: {
|
|
84
88
|
platform: Platform;
|
|
85
89
|
}) => Promise<void>;
|
|
@@ -329,8 +333,6 @@ interface StoragePlugin {
|
|
|
329
333
|
}
|
|
330
334
|
interface BundleSigningPlugin {
|
|
331
335
|
readonly name: string;
|
|
332
|
-
/** Path to the pinned RSA public key embedded in native builds. */
|
|
333
|
-
readonly publicKeyPath: string;
|
|
334
336
|
/** Returns the RSA public key used by this provider in SPKI PEM format. */
|
|
335
337
|
readonly getPublicKey: (input?: {
|
|
336
338
|
readonly cwd?: string;
|
|
@@ -351,16 +353,14 @@ interface BundleSigningPlugin {
|
|
|
351
353
|
readonly signature: Uint8Array;
|
|
352
354
|
}>;
|
|
353
355
|
}
|
|
354
|
-
/** Built-in local PEM signing
|
|
356
|
+
/** Built-in local PEM signing. */
|
|
355
357
|
type LocalSigningConfig = {
|
|
356
|
-
/** Optional pinned RSA SPKI public key. Also enables public-key-only builds. */readonly publicKeyPath?: string;
|
|
357
|
-
} & ({
|
|
358
358
|
readonly enabled: true; /** Path to an RSA private key in PEM format. */
|
|
359
359
|
readonly privateKeyPath: string;
|
|
360
360
|
} | {
|
|
361
361
|
readonly enabled: false;
|
|
362
362
|
readonly privateKeyPath?: string;
|
|
363
|
-
}
|
|
363
|
+
};
|
|
364
364
|
/** Local config or signing plugin. Signing is disabled when omitted. */
|
|
365
365
|
type SigningConfig = BundleSigningPlugin | LocalSigningConfig;
|
|
366
366
|
/**
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel, InsightsScanCursor, InsightsScanInput, ReleaseCatalogModel, ReleaseModel } from "./databasePlugin.mjs";
|
|
3
3
|
import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./databaseOperations.mjs";
|
|
4
4
|
import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./utils.mjs";
|
|
5
5
|
import { Bundle, Bundle as Bundle$1, Platform, Platform as Platform$1 } from "@hot-updater/core";
|
|
@@ -80,6 +80,10 @@ interface BuildPluginConfig {
|
|
|
80
80
|
}
|
|
81
81
|
interface BuildPlugin {
|
|
82
82
|
nativeBuild?: {
|
|
83
|
+
/** Resolves the public key embedded by the native build configuration. */getBundleSigningPublicKey?: () => Promise<{
|
|
84
|
+
readonly publicKey: string;
|
|
85
|
+
} | null>; /** Resolves native configuration files that must affect the fingerprint. */
|
|
86
|
+
getFingerprintExtraSources?: () => Promise<readonly string[]>;
|
|
83
87
|
prebuild?: (args: {
|
|
84
88
|
platform: Platform;
|
|
85
89
|
}) => Promise<void>;
|
|
@@ -329,8 +333,6 @@ interface StoragePlugin {
|
|
|
329
333
|
}
|
|
330
334
|
interface BundleSigningPlugin {
|
|
331
335
|
readonly name: string;
|
|
332
|
-
/** Path to the pinned RSA public key embedded in native builds. */
|
|
333
|
-
readonly publicKeyPath: string;
|
|
334
336
|
/** Returns the RSA public key used by this provider in SPKI PEM format. */
|
|
335
337
|
readonly getPublicKey: (input?: {
|
|
336
338
|
readonly cwd?: string;
|
|
@@ -351,16 +353,14 @@ interface BundleSigningPlugin {
|
|
|
351
353
|
readonly signature: Uint8Array;
|
|
352
354
|
}>;
|
|
353
355
|
}
|
|
354
|
-
/** Built-in local PEM signing
|
|
356
|
+
/** Built-in local PEM signing. */
|
|
355
357
|
type LocalSigningConfig = {
|
|
356
|
-
/** Optional pinned RSA SPKI public key. Also enables public-key-only builds. */readonly publicKeyPath?: string;
|
|
357
|
-
} & ({
|
|
358
358
|
readonly enabled: true; /** Path to an RSA private key in PEM format. */
|
|
359
359
|
readonly privateKeyPath: string;
|
|
360
360
|
} | {
|
|
361
361
|
readonly enabled: false;
|
|
362
362
|
readonly privateKeyPath?: string;
|
|
363
|
-
}
|
|
363
|
+
};
|
|
364
364
|
/** Local config or signing plugin. Signing is disabled when omitted. */
|
|
365
365
|
type SigningConfig = BundleSigningPlugin | LocalSigningConfig;
|
|
366
366
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseField, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelMap, DatabaseRow, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel, InsightsScanCursor, InsightsScanInput, ReleaseCatalogModel, ReleaseModel } from "./databasePlugin.cjs";
|
|
3
3
|
import { DatabaseDistinctFields, DatabaseDistinctOn, DatabaseOrderBy, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, SelectedDatabaseRow } from "./databaseQuery.cjs";
|
|
4
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";
|
|
5
5
|
import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./utils.cjs";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseField, DatabaseJsonObject, DatabaseJsonValue, DatabaseModel, DatabaseModelMap, DatabaseRow, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel, InsightsScanCursor, InsightsScanInput, ReleaseCatalogModel, ReleaseModel } from "./databasePlugin.mjs";
|
|
3
3
|
import { DatabaseDistinctFields, DatabaseDistinctOn, DatabaseOrderBy, DatabaseSelect, DatabaseSortBy, DatabaseSortClause, DatabaseSortNulls, DatabaseStringComparisonMode, DatabaseWhere, DatabaseWhereConnector, DatabaseWhereOperator, SelectedDatabaseRow } from "./databaseQuery.mjs";
|
|
4
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";
|
|
5
5
|
import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./utils.mjs";
|
package/dist/types/public.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.cjs";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel, InsightsScanCursor, InsightsScanInput, ReleaseCatalogModel, ReleaseModel } from "./databasePlugin.cjs";
|
|
3
3
|
import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./databaseOperations.cjs";
|
package/dist/types/public.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, ReleaseCatalogRow, ReleaseRow } from "./databaseRows.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsModel, InsightsScanCursor, InsightsScanInput, ReleaseCatalogModel, ReleaseModel } from "./databasePlugin.mjs";
|
|
3
3
|
import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./databaseOperations.mjs";
|