@hot-updater/plugin-core 1.0.0-rc.14 → 1.0.0-rc.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. package/dist/bundleEventRow.cjs +42 -0
  2. package/dist/bundleEventRow.mjs +41 -0
  3. package/dist/bundleStorageLayout.cjs +7 -0
  4. package/dist/bundleStorageLayout.d.cts +5 -1
  5. package/dist/bundleStorageLayout.d.mts +5 -1
  6. package/dist/bundleStorageLayout.mjs +7 -1
  7. package/dist/contentType.cjs +9 -0
  8. package/dist/contentType.d.cts +4 -0
  9. package/dist/contentType.d.mts +4 -0
  10. package/dist/contentType.mjs +7 -0
  11. package/dist/coreApi.d.cts +131 -0
  12. package/dist/coreApi.d.mts +131 -0
  13. package/dist/database/adapter.cjs +37 -0
  14. package/dist/database/adapter.d.cts +150 -0
  15. package/dist/database/adapter.d.mts +150 -0
  16. package/dist/database/adapter.mjs +30 -0
  17. package/dist/database/memoryAdapter.cjs +102 -0
  18. package/dist/database/memoryAdapter.d.cts +16 -0
  19. package/dist/database/memoryAdapter.d.mts +16 -0
  20. package/dist/database/memoryAdapter.mjs +102 -0
  21. package/dist/database/values.cjs +110 -0
  22. package/dist/database/values.d.cts +30 -0
  23. package/dist/database/values.d.mts +30 -0
  24. package/dist/database/values.mjs +100 -0
  25. package/dist/database/verifyAdapter.cjs +129 -0
  26. package/dist/database/verifyAdapter.d.cts +29 -0
  27. package/dist/database/verifyAdapter.d.mts +29 -0
  28. package/dist/database/verifyAdapter.mjs +128 -0
  29. package/dist/databaseErrors.cjs +30 -0
  30. package/dist/databaseErrors.d.cts +21 -0
  31. package/dist/databaseErrors.d.mts +21 -0
  32. package/dist/databaseErrors.mjs +28 -0
  33. package/dist/databaseMetadata.cjs +2 -2
  34. package/dist/databaseMetadata.mjs +1 -1
  35. package/dist/databaseRows.cjs +0 -6
  36. package/dist/databaseRows.mjs +0 -6
  37. package/dist/index.cjs +14 -41
  38. package/dist/index.d.cts +15 -19
  39. package/dist/index.d.mts +15 -19
  40. package/dist/index.mjs +10 -16
  41. package/dist/insightsContract.cjs +65 -17
  42. package/dist/insightsContract.d.cts +6 -1
  43. package/dist/insightsContract.d.mts +6 -1
  44. package/dist/insightsContract.mjs +52 -5
  45. package/dist/insightsDistinctSummary.cjs +73 -0
  46. package/dist/insightsDistinctSummary.d.cts +12 -0
  47. package/dist/insightsDistinctSummary.d.mts +12 -0
  48. package/dist/insightsDistinctSummary.mjs +69 -0
  49. package/dist/insightsOverview.cjs +139 -0
  50. package/dist/insightsOverview.d.cts +42 -0
  51. package/dist/insightsOverview.d.mts +42 -0
  52. package/dist/insightsOverview.mjs +134 -0
  53. package/dist/internal.cjs +44 -8
  54. package/dist/internal.d.cts +12 -9
  55. package/dist/internal.d.mts +12 -9
  56. package/dist/internal.mjs +9 -4
  57. package/dist/releaseCatalogCompiler.cjs +1 -1
  58. package/dist/releaseCatalogCompiler.mjs +2 -2
  59. package/dist/releaseCatalogMutation.cjs +0 -292
  60. package/dist/releaseCatalogMutation.d.cts +4 -45
  61. package/dist/releaseCatalogMutation.d.mts +4 -45
  62. package/dist/releaseCatalogMutation.mjs +1 -288
  63. package/dist/releaseManagement.cjs +0 -221
  64. package/dist/releaseManagement.d.cts +4 -28
  65. package/dist/releaseManagement.d.mts +4 -28
  66. package/dist/releaseManagement.mjs +1 -216
  67. package/dist/types/databaseConfig.cjs +5 -0
  68. package/dist/types/databaseConfig.d.cts +33 -0
  69. package/dist/types/databaseConfig.d.mts +33 -0
  70. package/dist/types/databaseConfig.mjs +5 -0
  71. package/dist/types/databaseOperations.d.cts +5 -172
  72. package/dist/types/databaseOperations.d.mts +5 -172
  73. package/dist/types/databaseRows.d.cts +3 -6
  74. package/dist/types/databaseRows.d.mts +3 -6
  75. package/dist/types/index.cjs +2 -0
  76. package/dist/types/index.d.cts +9 -86
  77. package/dist/types/index.d.mts +9 -86
  78. package/dist/types/index.mjs +2 -1
  79. package/dist/types/insights.d.cts +172 -0
  80. package/dist/types/insights.d.mts +172 -0
  81. package/dist/types/internal.d.cts +4 -7
  82. package/dist/types/internal.d.mts +4 -7
  83. package/dist/types/models.d.cts +24 -0
  84. package/dist/types/models.d.mts +24 -0
  85. package/dist/types/public.d.cts +4 -2
  86. package/dist/types/public.d.mts +4 -2
  87. package/package.json +2 -2
  88. package/dist/calculatePagination.cjs +0 -25
  89. package/dist/calculatePagination.d.cts +0 -12
  90. package/dist/calculatePagination.d.mts +0 -12
  91. package/dist/calculatePagination.mjs +0 -25
  92. package/dist/compressionFormat.cjs +0 -62
  93. package/dist/compressionFormat.d.cts +0 -33
  94. package/dist/compressionFormat.d.mts +0 -33
  95. package/dist/compressionFormat.mjs +0 -58
  96. package/dist/createDatabasePlugin.cjs +0 -873
  97. package/dist/createDatabasePlugin.d.cts +0 -28
  98. package/dist/createDatabasePlugin.d.mts +0 -28
  99. package/dist/createDatabasePlugin.mjs +0 -869
  100. package/dist/databaseClient.cjs +0 -117
  101. package/dist/databaseClient.d.cts +0 -32
  102. package/dist/databaseClient.d.mts +0 -32
  103. package/dist/databaseClient.mjs +0 -114
  104. package/dist/databaseClientReads.cjs +0 -115
  105. package/dist/databaseClientReads.mjs +0 -113
  106. package/dist/databaseClientUpdates.cjs +0 -40
  107. package/dist/databaseClientUpdates.d.cts +0 -11
  108. package/dist/databaseClientUpdates.d.mts +0 -11
  109. package/dist/databaseClientUpdates.mjs +0 -38
  110. package/dist/databasePluginCrud.cjs +0 -87
  111. package/dist/databasePluginCrud.d.cts +0 -4
  112. package/dist/databasePluginCrud.d.mts +0 -4
  113. package/dist/databasePluginCrud.mjs +0 -86
  114. package/dist/databasePluginCrudValidation.d.cts +0 -6
  115. package/dist/databasePluginCrudValidation.d.mts +0 -6
  116. package/dist/databasePluginCrudValidationErrors.cjs +0 -11
  117. package/dist/databasePluginCrudValidationErrors.d.cts +0 -9
  118. package/dist/databasePluginCrudValidationErrors.d.mts +0 -9
  119. package/dist/databasePluginCrudValidationErrors.mjs +0 -11
  120. package/dist/databasePluginCrudValidationFields.cjs +0 -293
  121. package/dist/databasePluginCrudValidationFields.d.cts +0 -1
  122. package/dist/databasePluginCrudValidationFields.d.mts +0 -1
  123. package/dist/databasePluginCrudValidationFields.mjs +0 -281
  124. package/dist/databasePluginCrudValidationMutations.cjs +0 -88
  125. package/dist/databasePluginCrudValidationMutations.d.cts +0 -1
  126. package/dist/databasePluginCrudValidationMutations.d.mts +0 -1
  127. package/dist/databasePluginCrudValidationMutations.mjs +0 -82
  128. package/dist/databasePluginCrudValidationQueries.cjs +0 -103
  129. package/dist/databasePluginCrudValidationQueries.d.cts +0 -2
  130. package/dist/databasePluginCrudValidationQueries.d.mts +0 -2
  131. package/dist/databasePluginCrudValidationQueries.mjs +0 -97
  132. package/dist/databasePluginCrudValidationRows.cjs +0 -55
  133. package/dist/databasePluginCrudValidationRows.d.cts +0 -1
  134. package/dist/databasePluginCrudValidationRows.d.mts +0 -1
  135. package/dist/databasePluginCrudValidationRows.mjs +0 -53
  136. package/dist/databasePluginTransaction.cjs +0 -7
  137. package/dist/databasePluginTransaction.mjs +0 -7
  138. package/dist/insightsLatestQueries.cjs +0 -53
  139. package/dist/insightsLatestQueries.d.cts +0 -13
  140. package/dist/insightsLatestQueries.d.mts +0 -13
  141. package/dist/insightsLatestQueries.mjs +0 -52
  142. package/dist/paginateBundles.cjs +0 -53
  143. package/dist/paginateBundles.d.cts +0 -13
  144. package/dist/paginateBundles.d.mts +0 -13
  145. package/dist/paginateBundles.mjs +0 -53
  146. package/dist/queryBundles.cjs +0 -34
  147. package/dist/queryBundles.d.cts +0 -9
  148. package/dist/queryBundles.d.mts +0 -9
  149. package/dist/queryBundles.mjs +0 -32
  150. package/dist/requestBundleCache.cjs +0 -22
  151. package/dist/requestBundleCache.d.cts +0 -8
  152. package/dist/requestBundleCache.d.mts +0 -8
  153. package/dist/requestBundleCache.mjs +0 -22
  154. package/dist/types/database.d.cts +0 -5
  155. package/dist/types/database.d.mts +0 -5
  156. package/dist/types/databaseFields.cjs +0 -88
  157. package/dist/types/databaseFields.d.cts +0 -12
  158. package/dist/types/databaseFields.d.mts +0 -12
  159. package/dist/types/databaseFields.mjs +0 -88
  160. package/dist/types/databasePlugin.d.cts +0 -304
  161. package/dist/types/databasePlugin.d.mts +0 -304
  162. package/dist/types/databaseQuery.d.cts +0 -46
  163. package/dist/types/databaseQuery.d.mts +0 -46
package/dist/index.cjs CHANGED
@@ -1,42 +1,34 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_calculatePagination = require("./calculatePagination.cjs");
3
- const require_bundleStorageLayout = require("./bundleStorageLayout.cjs");
4
- const require_compressionFormat = require("./compressionFormat.cjs");
5
2
  const require_contentAddressedAssets = require("./contentAddressedAssets.cjs");
6
3
  const require_createStorageKeyBuilder = require("./createStorageKeyBuilder.cjs");
7
4
  const require_parseStorageUri = require("./parseStorageUri.cjs");
8
5
  const require_assetStorageLayout = require("./assetStorageLayout.cjs");
9
- const require_databasePluginCrudValidationErrors = require("./databasePluginCrudValidationErrors.cjs");
10
- const require_databaseJsonValue = require("./databaseJsonValue.cjs");
11
- const require_uuidv7 = require("./uuidv7.cjs");
12
- const require_insightsContract = require("./insightsContract.cjs");
13
- const require_createDatabasePlugin = require("./createDatabasePlugin.cjs");
6
+ const require_bundleStorageLayout = require("./bundleStorageLayout.cjs");
7
+ const require_contentType = require("./contentType.cjs");
8
+ const require_databaseErrors = require("./databaseErrors.cjs");
14
9
  const require_createStoragePlugin = require("./createStoragePlugin.cjs");
10
+ const require_databaseJsonValue = require("./databaseJsonValue.cjs");
15
11
  const require_databaseRows = require("./databaseRows.cjs");
16
- const require_databaseClientUpdates = require("./databaseClientUpdates.cjs");
17
- const require_databaseClient = require("./databaseClient.cjs");
18
12
  const require_semverSatisfies = require("./semverSatisfies.cjs");
19
13
  const require_filterCompatibleAppVersions = require("./filterCompatibleAppVersions.cjs");
20
14
  const require_generateMinBundleId = require("./generateMinBundleId.cjs");
21
- const require_queryBundles = require("./queryBundles.cjs");
22
- const require_paginateBundles = require("./paginateBundles.cjs");
23
- const require_requestBundleCache = require("./requestBundleCache.cjs");
15
+ const require_uuidv7 = require("./uuidv7.cjs");
16
+ const require_insightsContract = require("./insightsContract.cjs");
24
17
  const require_releaseCatalogCompiler = require("./releaseCatalogCompiler.cjs");
25
- const require_releaseCatalogMutation = require("./releaseCatalogMutation.cjs");
26
18
  const require_releaseManagement = require("./releaseManagement.cjs");
19
+ const require_releaseCatalogMutation = require("./releaseCatalogMutation.cjs");
27
20
  const require_remoteBundleSigning = require("./remoteBundleSigning.cjs");
28
21
  const require_storageDownloadPath = require("./storageDownloadPath.cjs");
22
+ const require_databaseConfig = require("./types/databaseConfig.cjs");
29
23
  const require_index = require("./types/index.cjs");
30
24
  let _hot_updater_core = require("@hot-updater/core");
31
25
  exports.BUNDLE_STORAGE_PREFIX = require_bundleStorageLayout.BUNDLE_STORAGE_PREFIX;
32
26
  exports.BundleRowHydrationError = require_databaseRows.BundleRowHydrationError;
33
27
  exports.BundleRowHydrationErrorReason = require_databaseRows.BundleRowHydrationErrorReason;
34
28
  exports.CONTENT_ADDRESSED_ASSET_PREFIX = require_contentAddressedAssets.CONTENT_ADDRESSED_ASSET_PREFIX;
35
- exports.DatabaseAtomicCommitUnsupportedError = require_createDatabasePlugin.DatabaseAtomicCommitUnsupportedError;
36
- exports.DatabaseBundleNotFoundError = require_databaseClient.DatabaseBundleNotFoundError;
37
- exports.DatabasePatchInsertUnsupportedError = require_databaseClient.DatabasePatchInsertUnsupportedError;
38
- exports.DatabasePatchUpdateUnsupportedError = require_databaseClientUpdates.DatabasePatchUpdateUnsupportedError;
39
- exports.DatabasePluginInputError = require_databasePluginCrudValidationErrors.DatabasePluginInputError;
29
+ exports.DatabaseBundleNotFoundError = require_databaseErrors.DatabaseBundleNotFoundError;
30
+ exports.DatabasePluginInputError = require_databaseErrors.DatabasePluginInputError;
31
+ exports.DatabaseRowReferencedError = require_databaseErrors.DatabaseRowReferencedError;
40
32
  exports.REMOTE_BUNDLE_SIGNING_ALGORITHM = require_remoteBundleSigning.REMOTE_BUNDLE_SIGNING_ALGORITHM;
41
33
  exports.REMOTE_BUNDLE_SIGNING_PATH = require_remoteBundleSigning.REMOTE_BUNDLE_SIGNING_PATH;
42
34
  exports.REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION = require_remoteBundleSigning.REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION;
@@ -45,21 +37,13 @@ exports.ReleaseCatalogCompilationError = require_releaseCatalogCompiler.ReleaseC
45
37
  exports.ReleaseCatalogMutationError = require_releaseCatalogMutation.ReleaseCatalogMutationError;
46
38
  exports.ReleaseManagementError = require_releaseManagement.ReleaseManagementError;
47
39
  exports.assertStorageOperations = require_createStoragePlugin.assertStorageOperations;
48
- exports.bundleIdMatchesFilter = require_queryBundles.bundleIdMatchesFilter;
49
- exports.bundleMatchesQueryWhere = require_queryBundles.bundleMatchesQueryWhere;
50
40
  exports.bundleToPatchRows = require_databaseRows.bundleToPatchRows;
51
41
  exports.bundleToRow = require_databaseRows.bundleToRow;
52
- exports.calculatePagination = require_calculatePagination.calculatePagination;
53
42
  exports.canonicalizeAppVersion = require_releaseCatalogCompiler.canonicalizeAppVersion;
54
- exports.commitReleaseCatalogMutation = require_releaseCatalogMutation.commitReleaseCatalogMutation;
55
- exports.commitReleaseCatalogMutations = require_releaseCatalogMutation.commitReleaseCatalogMutations;
56
43
  exports.compareInsightsText = require_insightsContract.compareInsightsText;
57
44
  exports.compileReleaseCatalog = require_releaseCatalogCompiler.compileReleaseCatalog;
58
45
  exports.createBundleSigningHandler = require_remoteBundleSigning.createBundleSigningHandler;
59
46
  exports.createBundleStorageKey = require_bundleStorageLayout.createBundleStorageKey;
60
- exports.createDatabaseClient = require_databaseClient.createDatabaseClient;
61
- exports.createDatabasePlugin = require_createDatabasePlugin.createDatabasePlugin;
62
- exports.createRequestBundleResolver = require_requestBundleCache.createRequestBundleResolver;
63
47
  exports.createStorageDownloadPath = require_storageDownloadPath.createStorageDownloadPath;
64
48
  exports.createStorageDownloadUrl = require_storageDownloadPath.createStorageDownloadUrl;
65
49
  exports.createStorageKeyBuilder = require_createStorageKeyBuilder.createStorageKeyBuilder;
@@ -70,14 +54,12 @@ exports.createStorageUriWithRelativePath = require_assetStorageLayout.createStor
70
54
  exports.createUUIDv7 = require_uuidv7.createUUIDv7;
71
55
  exports.createUUIDv7After = require_uuidv7.createUUIDv7After;
72
56
  exports.createUUIDv7WithSameTimestamp = require_uuidv7.createUUIDv7WithSameTimestamp;
73
- exports.deleteRelease = require_releaseManagement.deleteRelease;
74
- exports.detectCompressionFormat = require_compressionFormat.detectCompressionFormat;
75
57
  exports.extractTimestampFromUUIDv7 = require_uuidv7.extractTimestampFromUUIDv7;
76
58
  exports.filterCompatibleAppVersions = require_filterCompatibleAppVersions.filterCompatibleAppVersions;
77
59
  exports.generateMinBundleId = require_generateMinBundleId.generateMinBundleId;
78
- exports.getCompressionMimeType = require_compressionFormat.getCompressionMimeType;
60
+ exports.getBundleArchiveStorageUri = require_bundleStorageLayout.getBundleArchiveStorageUri;
79
61
  exports.getContentAddressedAssetStoragePath = require_contentAddressedAssets.getContentAddressedAssetStoragePath;
80
- exports.getContentType = require_compressionFormat.getContentType;
62
+ exports.getContentType = require_contentType.getContentType;
81
63
  exports.getManifestAssetDownloadPath = require_assetStorageLayout.getManifestAssetDownloadPath;
82
64
  exports.getManifestAssetStoragePath = require_assetStorageLayout.getManifestAssetStoragePath;
83
65
  exports.isBrotliManifestAssetPath = require_assetStorageLayout.isBrotliManifestAssetPath;
@@ -85,22 +67,17 @@ exports.isContentAddressedAssetFileHash = require_contentAddressedAssets.isConte
85
67
  exports.isDatabaseBundleEventMetadata = require_databaseJsonValue.isDatabaseBundleEventMetadata;
86
68
  exports.isDatabaseMetadataObject = require_databaseJsonValue.isDatabaseMetadataObject;
87
69
  exports.isInsightsMovementEvent = require_insightsContract.isInsightsMovementEvent;
70
+ exports.isRemoteDatabase = require_databaseConfig.isRemoteDatabase;
88
71
  Object.defineProperty(exports, "isUUIDv7", {
89
72
  enumerable: true,
90
73
  get: function() {
91
74
  return _hot_updater_core.isUUIDv7;
92
75
  }
93
76
  });
94
- exports.paginateBundles = require_paginateBundles.paginateBundles;
95
77
  exports.parseStorageDownloadPath = require_storageDownloadPath.parseStorageDownloadPath;
96
78
  exports.parseStorageUri = require_parseStorageUri.parseStorageUri;
97
- exports.preflightReleaseCatalogMutation = require_releaseCatalogMutation.preflightReleaseCatalogMutation;
98
- exports.preflightReleaseCatalogRebuild = require_releaseCatalogMutation.preflightReleaseCatalogRebuild;
99
- exports.preflightReleasePolicy = require_releaseManagement.preflightReleasePolicy;
100
79
  exports.projectCompiledCatalog = require_releaseCatalogCompiler.projectCompiledCatalog;
101
80
  exports.projectCompiledRollbackCatalog = require_releaseCatalogCompiler.projectCompiledRollbackCatalog;
102
- exports.promoteRelease = require_releaseManagement.promoteRelease;
103
- exports.rebuildReleaseCatalog = require_releaseCatalogMutation.rebuildReleaseCatalog;
104
81
  exports.referenceCompatibleReleases = require_releaseCatalogCompiler.referenceCompatibleReleases;
105
82
  exports.releaseRowToRelease = require_databaseRows.releaseRowToRelease;
106
83
  exports.releaseToRow = require_databaseRows.releaseToRow;
@@ -108,11 +85,7 @@ exports.remoteSigning = require_remoteBundleSigning.remoteSigning;
108
85
  exports.replaceStorageUriKeySuffix = require_assetStorageLayout.replaceStorageUriKeySuffix;
109
86
  exports.resolveManifestAssetStorageFileHash = require_assetStorageLayout.resolveManifestAssetStorageFileHash;
110
87
  exports.resolveManifestAssetStorageUri = require_assetStorageLayout.resolveManifestAssetStorageUri;
111
- exports.rollbackRelease = require_releaseManagement.rollbackRelease;
112
- exports.rollbackReleases = require_releaseManagement.rollbackReleases;
113
88
  exports.rowToBundle = require_databaseRows.rowToBundle;
114
89
  exports.rowsToBundles = require_databaseRows.rowsToBundles;
115
90
  exports.semverSatisfies = require_semverSatisfies.semverSatisfies;
116
- exports.sortBundles = require_queryBundles.sortBundles;
117
91
  exports.supportedIosPlatforms = require_index.supportedIosPlatforms;
118
- exports.updateReleasePolicy = require_releaseManagement.updateReleasePolicy;
package/dist/index.d.cts CHANGED
@@ -1,33 +1,29 @@
1
- import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleEventMetadata, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.cjs";
2
- import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountLatestEventsInput, InsightsEventCursor, InsightsEventFilter, InsightsFindLatestEventsInput, InsightsListEventsInput, InsightsModel, InsightsRecordEventInput, InsightsScope, ReleaseCatalogModel, ReleaseModel } from "./types/databasePlugin.cjs";
3
- import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./types/databaseOperations.cjs";
4
- import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.cjs";
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";
6
- import { PaginationOptions, calculatePagination } from "./calculatePagination.cjs";
7
- import { BUNDLE_STORAGE_PREFIX, createBundleStorageKey, createStorageRootUriWithPath } from "./bundleStorageLayout.cjs";
8
- import { CompressionFormat, CompressionFormatInfo, detectCompressionFormat, getCompressionMimeType, getContentType } from "./compressionFormat.cjs";
1
+ import { BUNDLE_STORAGE_PREFIX, createBundleStorageKey, createStorageRootUriWithPath, getBundleArchiveStorageUri } from "./bundleStorageLayout.cjs";
9
2
  import { createStorageUriWithRelativePath, getManifestAssetDownloadPath, getManifestAssetStoragePath, isBrotliManifestAssetPath, replaceStorageUriKeySuffix, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri } from "./assetStorageLayout.cjs";
10
3
  import { CONTENT_ADDRESSED_ASSET_PREFIX, getContentAddressedAssetStoragePath, isContentAddressedAssetFileHash } from "./contentAddressedAssets.cjs";
11
- import { DatabasePluginInputError, DatabasePluginInputErrorCode } from "./databasePluginCrudValidationErrors.cjs";
12
- import { CreateDatabasePluginOptions, DatabaseAtomicCommitUnsupportedError, createDatabasePlugin } from "./createDatabasePlugin.cjs";
4
+ import { getContentType } from "./contentType.cjs";
5
+ import { CatalogVersionBound, CompiledCatalogSegment, CompiledReleaseCatalog, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, canonicalizeAppVersion, compileReleaseCatalog, projectCompiledCatalog, projectCompiledRollbackCatalog, referenceCompatibleReleases } from "./releaseCatalogCompiler.cjs";
6
+ import { ConfiguredDatabase, EngineDatabase, RemoteDatabase, isRemoteDatabase } from "./types/databaseConfig.cjs";
7
+ import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.cjs";
8
+ import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleEventMetadata, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.cjs";
9
+ import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./types/databaseOperations.cjs";
10
+ import { InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountLatestEventsInput, InsightsCoverage, InsightsEventCursor, InsightsEventFilter, InsightsFindLatestEventsInput, InsightsGetAppUsageInput, InsightsGetAppUsageResult, InsightsGetReleaseActivityInput, InsightsGetReleaseActivityResult, InsightsListEventsInput, InsightsModel, InsightsRecordEventInput, InsightsScope, InsightsTimeRange, ReleaseActivityMetrics, ReleaseReference } from "./types/insights.cjs";
11
+ import { ApiKeyModel, ChannelDeleteResult, ChannelInsertResult } from "./types/models.cjs";
12
+ import { ApplePlatform, BasePluginArgs, BuildPlugin, BuildPluginConfig, Bundle, BundleSigningPlugin, ConfigInput, FingerprintExtraSources, IosBuildDestination, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, Platform, PlatformConfig, SigningConfig, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StoragePlugin, StoragePutInput, StoragePutResult, supportedIosPlatforms } from "./types/index.cjs";
13
+ import { ReleaseCatalogMutationError, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, ReleaseCatalogScope } from "./releaseCatalogMutation.cjs";
14
+ import { PromoteReleaseResult, ReleaseManagementError, ReleasePolicyPatch } from "./releaseManagement.cjs";
15
+ import { BundleDeployment, BundleDetail, DeployReleasePolicy, Deployment, HotUpdaterCoreApi, KeysetInput, ReleaseFilter, ReleaseTarget, StoredBundleDeployment } from "./coreApi.cjs";
16
+ import { DatabaseBundleNotFoundError, DatabasePluginInputError, DatabasePluginInputErrorCode, DatabaseRowReferencedError } from "./databaseErrors.cjs";
13
17
  import { createStorageKeyBuilder } from "./createStorageKeyBuilder.cjs";
14
18
  import { CreateStoragePluginOptions, StorageOperation, StoragePluginWith, assertStorageOperations, createStoragePlugin } from "./createStoragePlugin.cjs";
15
- import { DatabasePatchUpdateUnsupportedError } from "./databaseClientUpdates.cjs";
16
- import { DatabaseBundleNotFoundError, DatabaseClient, DatabaseMutationClient, DatabasePatchInsertUnsupportedError, createDatabaseClient } from "./databaseClient.cjs";
17
19
  import { isDatabaseBundleEventMetadata, isDatabaseMetadataObject } from "./databaseJsonValue.cjs";
18
20
  import { BundleRowHydrationError, BundleRowHydrationErrorReason, bundleToPatchRows, bundleToRow, releaseRowToRelease, releaseToRow, rowToBundle, rowsToBundles } from "./databaseRows.cjs";
19
21
  import { filterCompatibleAppVersions } from "./filterCompatibleAppVersions.cjs";
20
22
  import { generateMinBundleId } from "./generateMinBundleId.cjs";
21
23
  import { compareInsightsText, isInsightsMovementEvent } from "./insightsContract.cjs";
22
24
  import { CreateStorageUriInput, ParsedStorageUri, createStorageUri, parseStorageUri } from "./parseStorageUri.cjs";
23
- import { paginateBundles } from "./paginateBundles.cjs";
24
- import { bundleIdMatchesFilter, bundleMatchesQueryWhere, sortBundles } from "./queryBundles.cjs";
25
- import { createRequestBundleResolver } from "./requestBundleCache.cjs";
26
- import { CatalogVersionBound, CompiledCatalogSegment, CompiledReleaseCatalog, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, canonicalizeAppVersion, compileReleaseCatalog, projectCompiledCatalog, projectCompiledRollbackCatalog, referenceCompatibleReleases } from "./releaseCatalogCompiler.cjs";
27
- import { ReleaseCatalogMutation, ReleaseCatalogMutationError, ReleaseCatalogMutationInput, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, ReleaseCatalogScope, commitReleaseCatalogMutation, commitReleaseCatalogMutations, preflightReleaseCatalogMutation, preflightReleaseCatalogRebuild, rebuildReleaseCatalog } from "./releaseCatalogMutation.cjs";
28
- import { PromoteReleaseInput, PromoteReleaseResult, ReleaseManagementError, ReleaseMutationTarget, ReleasePolicyPatch, RollbackReleaseInput, deleteRelease, preflightReleasePolicy, promoteRelease, rollbackRelease, rollbackReleases, updateReleasePolicy } from "./releaseManagement.cjs";
29
25
  import { BundleSigningHandlerOptions, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, RemoteSigningOptions, createBundleSigningHandler, remoteSigning } from "./remoteBundleSigning.cjs";
30
26
  import { semverSatisfies } from "./semverSatisfies.cjs";
31
27
  import { createStorageDownloadPath, createStorageDownloadUrl, parseStorageDownloadPath } from "./storageDownloadPath.cjs";
32
28
  import { createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, isUUIDv7 } from "./uuidv7.cjs";
33
- export { type ApiKeyModel, type ApiKeyRow, ApplePlatform, BUNDLE_STORAGE_PREFIX, BasePluginArgs, BuildPlugin, BuildPluginConfig, BuiltIns, type Bundle, type BundleEventRow, type BundleEventRowBase, type BundleModel, type BundleModelQuery, type BundlePatchModel, type BundlePatchRow, type BundleRepository, type BundleRepositoryChange, type BundleRepositoryCommit, type BundleRow, BundleRowHydrationError, BundleRowHydrationErrorReason, type BundleRowUpdate, BundleSigningHandlerOptions, BundleSigningPlugin, CONTENT_ADDRESSED_ASSET_PREFIX, CatalogVersionBound, type ChannelDeleteInput, type ChannelDeleteResult, type ChannelInsertInput, type ChannelInsertResult, type ChannelModel, type ChannelRow, CompiledCatalogSegment, CompiledReleaseCatalog, CompressionFormat, CompressionFormatInfo, ConfigInput, type CreateDatabasePluginOptions, CreateStoragePluginOptions, CreateStorageUriInput, DatabaseAtomicCommitUnsupportedError, DatabaseBundleCursor, type DatabaseBundleEventMetadata, DatabaseBundleIdFilter, type DatabaseBundleMetadata, DatabaseBundleNotFoundError, DatabaseBundleQueryOptions, DatabaseBundleQueryOrder, DatabaseBundleQueryWhere, type DatabaseChange, DatabaseClient, type DatabaseCommit, type DatabaseCommitExpectation, type DatabaseCommitResult, type DatabaseJsonObject, type DatabaseJsonValue, type DatabaseModels, DatabaseMutationClient, DatabasePatchInsertUnsupportedError, DatabasePatchUpdateUnsupportedError, type DatabasePlugin, DatabasePluginInputError, type DatabasePluginInputErrorCode, FingerprintExtraSources, HasMultipleCallSignatures, type InsightsBundleEventFilter, type InsightsCountEventsInput, type InsightsCountLatestEventsInput, type InsightsEventCursor, type InsightsEventFilter, type InsightsFindLatestEventsInput, type InsightsListEventsInput, type InsightsModel, type InsightsRecordEventInput, type InsightsScope, IosBuildDestination, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, Paginated, PaginatedResult, PaginationInfo, PaginationOptions, ParsedStorageUri, type 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, type ReleaseCatalogModel, ReleaseCatalogMutation, ReleaseCatalogMutationError, ReleaseCatalogMutationInput, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, ReleaseCatalogScope, ReleaseManagementError, type ReleaseModel, ReleaseMutationTarget, ReleasePolicyPatch, type ReleaseRow, type 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, compareInsightsText, 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, isDatabaseBundleEventMetadata, isDatabaseMetadataObject, isInsightsMovementEvent, 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 };
29
+ export { type ApiKeyModel, type ApiKeyRow, ApplePlatform, BUNDLE_STORAGE_PREFIX, BasePluginArgs, BuildPlugin, BuildPluginConfig, BuiltIns, type Bundle, type BundleDeployment, type BundleDetail, type BundleEventRow, type BundleEventRowBase, type BundlePatchRow, type BundleRow, BundleRowHydrationError, BundleRowHydrationErrorReason, type BundleRowUpdate, BundleSigningHandlerOptions, BundleSigningPlugin, CONTENT_ADDRESSED_ASSET_PREFIX, CatalogVersionBound, type ChannelDeleteResult, type ChannelInsertResult, type ChannelRow, CompiledCatalogSegment, CompiledReleaseCatalog, ConfigInput, type ConfiguredDatabase, CreateStoragePluginOptions, CreateStorageUriInput, type DatabaseBundleEventMetadata, type DatabaseBundleMetadata, DatabaseBundleNotFoundError, type DatabaseJsonObject, type DatabaseJsonValue, DatabasePluginInputError, type DatabasePluginInputErrorCode, DatabaseRowReferencedError, type DeployReleasePolicy, type Deployment, type EngineDatabase, FingerprintExtraSources, HasMultipleCallSignatures, type HotUpdaterCoreApi, type InsightsBundleEventFilter, type InsightsCountEventsInput, type InsightsCountLatestEventsInput, type InsightsCoverage, type InsightsEventCursor, type InsightsEventFilter, type InsightsFindLatestEventsInput, type InsightsGetAppUsageInput, type InsightsGetAppUsageResult, type InsightsGetReleaseActivityInput, type InsightsGetReleaseActivityResult, type InsightsListEventsInput, type InsightsModel, type InsightsRecordEventInput, type InsightsScope, type InsightsTimeRange, IosBuildDestination, type KeysetInput, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, ParsedStorageUri, type Platform, PlatformConfig, Primitive, PromoteReleaseResult, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, type ReleaseActivityMetrics, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, ReleaseCatalogMutationError, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, ReleaseCatalogScope, type ReleaseFilter, ReleaseManagementError, ReleasePolicyPatch, type ReleaseReference, type ReleaseRow, type ReleaseRowUpdate, type ReleaseTarget, type RemoteDatabase, RemoteSigningOptions, RequiredDeep, SigningConfig, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StorageOperation, StoragePlugin, StoragePluginWith, StoragePutInput, StoragePutResult, type StoredBundleDeployment, assertStorageOperations, bundleToPatchRows, bundleToRow, canonicalizeAppVersion, compareInsightsText, compileReleaseCatalog, createBundleSigningHandler, createBundleStorageKey, createStorageDownloadPath, createStorageDownloadUrl, createStorageKeyBuilder, createStoragePlugin, createStorageRootUriWithPath, createStorageUri, createStorageUriWithRelativePath, createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, filterCompatibleAppVersions, generateMinBundleId, getBundleArchiveStorageUri, getContentAddressedAssetStoragePath, getContentType, getManifestAssetDownloadPath, getManifestAssetStoragePath, isBrotliManifestAssetPath, isContentAddressedAssetFileHash, isDatabaseBundleEventMetadata, isDatabaseMetadataObject, isInsightsMovementEvent, isRemoteDatabase, isUUIDv7, parseStorageDownloadPath, parseStorageUri, projectCompiledCatalog, projectCompiledRollbackCatalog, referenceCompatibleReleases, releaseRowToRelease, releaseToRow, remoteSigning, replaceStorageUriKeySuffix, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri, rowToBundle, rowsToBundles, semverSatisfies, supportedIosPlatforms };
package/dist/index.d.mts CHANGED
@@ -1,33 +1,29 @@
1
- import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleEventMetadata, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.mjs";
2
- import { ApiKeyModel, BundleModel, BundleModelQuery, BundlePatchModel, BundleRepository, BundleRepositoryChange, BundleRepositoryCommit, ChannelDeleteInput, ChannelDeleteResult, ChannelInsertInput, ChannelInsertResult, ChannelModel, DatabaseChange, DatabaseCommit, DatabaseCommitExpectation, DatabaseCommitResult, DatabaseModels, DatabasePlugin, InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountLatestEventsInput, InsightsEventCursor, InsightsEventFilter, InsightsFindLatestEventsInput, InsightsListEventsInput, InsightsModel, InsightsRecordEventInput, InsightsScope, ReleaseCatalogModel, ReleaseModel } from "./types/databasePlugin.mjs";
3
- import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./types/databaseOperations.mjs";
4
- import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.mjs";
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";
6
- import { PaginationOptions, calculatePagination } from "./calculatePagination.mjs";
7
- import { BUNDLE_STORAGE_PREFIX, createBundleStorageKey, createStorageRootUriWithPath } from "./bundleStorageLayout.mjs";
8
- import { CompressionFormat, CompressionFormatInfo, detectCompressionFormat, getCompressionMimeType, getContentType } from "./compressionFormat.mjs";
1
+ import { BUNDLE_STORAGE_PREFIX, createBundleStorageKey, createStorageRootUriWithPath, getBundleArchiveStorageUri } from "./bundleStorageLayout.mjs";
9
2
  import { createStorageUriWithRelativePath, getManifestAssetDownloadPath, getManifestAssetStoragePath, isBrotliManifestAssetPath, replaceStorageUriKeySuffix, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri } from "./assetStorageLayout.mjs";
10
3
  import { CONTENT_ADDRESSED_ASSET_PREFIX, getContentAddressedAssetStoragePath, isContentAddressedAssetFileHash } from "./contentAddressedAssets.mjs";
11
- import { DatabasePluginInputError, DatabasePluginInputErrorCode } from "./databasePluginCrudValidationErrors.mjs";
12
- import { CreateDatabasePluginOptions, DatabaseAtomicCommitUnsupportedError, createDatabasePlugin } from "./createDatabasePlugin.mjs";
4
+ import { getContentType } from "./contentType.mjs";
5
+ import { CatalogVersionBound, CompiledCatalogSegment, CompiledReleaseCatalog, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, canonicalizeAppVersion, compileReleaseCatalog, projectCompiledCatalog, projectCompiledRollbackCatalog, referenceCompatibleReleases } from "./releaseCatalogCompiler.mjs";
6
+ import { ConfiguredDatabase, EngineDatabase, RemoteDatabase, isRemoteDatabase } from "./types/databaseConfig.mjs";
7
+ import { BuiltIns, HasMultipleCallSignatures, Primitive, RequiredDeep } from "./types/utils.mjs";
8
+ import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleEventMetadata, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.mjs";
9
+ import { BundleRowUpdate, ReleaseCatalogRowUpdate, ReleaseRowUpdate } from "./types/databaseOperations.mjs";
10
+ import { InsightsBundleEventFilter, InsightsCountEventsInput, InsightsCountLatestEventsInput, InsightsCoverage, InsightsEventCursor, InsightsEventFilter, InsightsFindLatestEventsInput, InsightsGetAppUsageInput, InsightsGetAppUsageResult, InsightsGetReleaseActivityInput, InsightsGetReleaseActivityResult, InsightsListEventsInput, InsightsModel, InsightsRecordEventInput, InsightsScope, InsightsTimeRange, ReleaseActivityMetrics, ReleaseReference } from "./types/insights.mjs";
11
+ import { ApiKeyModel, ChannelDeleteResult, ChannelInsertResult } from "./types/models.mjs";
12
+ import { ApplePlatform, BasePluginArgs, BuildPlugin, BuildPluginConfig, Bundle, BundleSigningPlugin, ConfigInput, FingerprintExtraSources, IosBuildDestination, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, Platform, PlatformConfig, SigningConfig, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StoragePlugin, StoragePutInput, StoragePutResult, supportedIosPlatforms } from "./types/index.mjs";
13
+ import { ReleaseCatalogMutationError, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, ReleaseCatalogScope } from "./releaseCatalogMutation.mjs";
14
+ import { PromoteReleaseResult, ReleaseManagementError, ReleasePolicyPatch } from "./releaseManagement.mjs";
15
+ import { BundleDeployment, BundleDetail, DeployReleasePolicy, Deployment, HotUpdaterCoreApi, KeysetInput, ReleaseFilter, ReleaseTarget, StoredBundleDeployment } from "./coreApi.mjs";
16
+ import { DatabaseBundleNotFoundError, DatabasePluginInputError, DatabasePluginInputErrorCode, DatabaseRowReferencedError } from "./databaseErrors.mjs";
13
17
  import { createStorageKeyBuilder } from "./createStorageKeyBuilder.mjs";
14
18
  import { CreateStoragePluginOptions, StorageOperation, StoragePluginWith, assertStorageOperations, createStoragePlugin } from "./createStoragePlugin.mjs";
15
- import { DatabasePatchUpdateUnsupportedError } from "./databaseClientUpdates.mjs";
16
- import { DatabaseBundleNotFoundError, DatabaseClient, DatabaseMutationClient, DatabasePatchInsertUnsupportedError, createDatabaseClient } from "./databaseClient.mjs";
17
19
  import { isDatabaseBundleEventMetadata, isDatabaseMetadataObject } from "./databaseJsonValue.mjs";
18
20
  import { BundleRowHydrationError, BundleRowHydrationErrorReason, bundleToPatchRows, bundleToRow, releaseRowToRelease, releaseToRow, rowToBundle, rowsToBundles } from "./databaseRows.mjs";
19
21
  import { filterCompatibleAppVersions } from "./filterCompatibleAppVersions.mjs";
20
22
  import { generateMinBundleId } from "./generateMinBundleId.mjs";
21
23
  import { compareInsightsText, isInsightsMovementEvent } from "./insightsContract.mjs";
22
24
  import { CreateStorageUriInput, ParsedStorageUri, createStorageUri, parseStorageUri } from "./parseStorageUri.mjs";
23
- import { paginateBundles } from "./paginateBundles.mjs";
24
- import { bundleIdMatchesFilter, bundleMatchesQueryWhere, sortBundles } from "./queryBundles.mjs";
25
- import { createRequestBundleResolver } from "./requestBundleCache.mjs";
26
- import { CatalogVersionBound, CompiledCatalogSegment, CompiledReleaseCatalog, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, canonicalizeAppVersion, compileReleaseCatalog, projectCompiledCatalog, projectCompiledRollbackCatalog, referenceCompatibleReleases } from "./releaseCatalogCompiler.mjs";
27
- import { ReleaseCatalogMutation, ReleaseCatalogMutationError, ReleaseCatalogMutationInput, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, ReleaseCatalogScope, commitReleaseCatalogMutation, commitReleaseCatalogMutations, preflightReleaseCatalogMutation, preflightReleaseCatalogRebuild, rebuildReleaseCatalog } from "./releaseCatalogMutation.mjs";
28
- import { PromoteReleaseInput, PromoteReleaseResult, ReleaseManagementError, ReleaseMutationTarget, ReleasePolicyPatch, RollbackReleaseInput, deleteRelease, preflightReleasePolicy, promoteRelease, rollbackRelease, rollbackReleases, updateReleasePolicy } from "./releaseManagement.mjs";
29
25
  import { BundleSigningHandlerOptions, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, RemoteSigningOptions, createBundleSigningHandler, remoteSigning } from "./remoteBundleSigning.mjs";
30
26
  import { semverSatisfies } from "./semverSatisfies.mjs";
31
27
  import { createStorageDownloadPath, createStorageDownloadUrl, parseStorageDownloadPath } from "./storageDownloadPath.mjs";
32
28
  import { createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, isUUIDv7 } from "./uuidv7.mjs";
33
- export { type ApiKeyModel, type ApiKeyRow, ApplePlatform, BUNDLE_STORAGE_PREFIX, BasePluginArgs, BuildPlugin, BuildPluginConfig, BuiltIns, type Bundle, type BundleEventRow, type BundleEventRowBase, type BundleModel, type BundleModelQuery, type BundlePatchModel, type BundlePatchRow, type BundleRepository, type BundleRepositoryChange, type BundleRepositoryCommit, type BundleRow, BundleRowHydrationError, BundleRowHydrationErrorReason, type BundleRowUpdate, BundleSigningHandlerOptions, BundleSigningPlugin, CONTENT_ADDRESSED_ASSET_PREFIX, CatalogVersionBound, type ChannelDeleteInput, type ChannelDeleteResult, type ChannelInsertInput, type ChannelInsertResult, type ChannelModel, type ChannelRow, CompiledCatalogSegment, CompiledReleaseCatalog, CompressionFormat, CompressionFormatInfo, ConfigInput, type CreateDatabasePluginOptions, CreateStoragePluginOptions, CreateStorageUriInput, DatabaseAtomicCommitUnsupportedError, DatabaseBundleCursor, type DatabaseBundleEventMetadata, DatabaseBundleIdFilter, type DatabaseBundleMetadata, DatabaseBundleNotFoundError, DatabaseBundleQueryOptions, DatabaseBundleQueryOrder, DatabaseBundleQueryWhere, type DatabaseChange, DatabaseClient, type DatabaseCommit, type DatabaseCommitExpectation, type DatabaseCommitResult, type DatabaseJsonObject, type DatabaseJsonValue, type DatabaseModels, DatabaseMutationClient, DatabasePatchInsertUnsupportedError, DatabasePatchUpdateUnsupportedError, type DatabasePlugin, DatabasePluginInputError, type DatabasePluginInputErrorCode, FingerprintExtraSources, HasMultipleCallSignatures, type InsightsBundleEventFilter, type InsightsCountEventsInput, type InsightsCountLatestEventsInput, type InsightsEventCursor, type InsightsEventFilter, type InsightsFindLatestEventsInput, type InsightsListEventsInput, type InsightsModel, type InsightsRecordEventInput, type InsightsScope, IosBuildDestination, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, Paginated, PaginatedResult, PaginationInfo, PaginationOptions, ParsedStorageUri, type 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, type ReleaseCatalogModel, ReleaseCatalogMutation, ReleaseCatalogMutationError, ReleaseCatalogMutationInput, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, ReleaseCatalogScope, ReleaseManagementError, type ReleaseModel, ReleaseMutationTarget, ReleasePolicyPatch, type ReleaseRow, type 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, compareInsightsText, 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, isDatabaseBundleEventMetadata, isDatabaseMetadataObject, isInsightsMovementEvent, 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 };
29
+ export { type ApiKeyModel, type ApiKeyRow, ApplePlatform, BUNDLE_STORAGE_PREFIX, BasePluginArgs, BuildPlugin, BuildPluginConfig, BuiltIns, type Bundle, type BundleDeployment, type BundleDetail, type BundleEventRow, type BundleEventRowBase, type BundlePatchRow, type BundleRow, BundleRowHydrationError, BundleRowHydrationErrorReason, type BundleRowUpdate, BundleSigningHandlerOptions, BundleSigningPlugin, CONTENT_ADDRESSED_ASSET_PREFIX, CatalogVersionBound, type ChannelDeleteResult, type ChannelInsertResult, type ChannelRow, CompiledCatalogSegment, CompiledReleaseCatalog, ConfigInput, type ConfiguredDatabase, CreateStoragePluginOptions, CreateStorageUriInput, type DatabaseBundleEventMetadata, type DatabaseBundleMetadata, DatabaseBundleNotFoundError, type DatabaseJsonObject, type DatabaseJsonValue, DatabasePluginInputError, type DatabasePluginInputErrorCode, DatabaseRowReferencedError, type DeployReleasePolicy, type Deployment, type EngineDatabase, FingerprintExtraSources, HasMultipleCallSignatures, type HotUpdaterCoreApi, type InsightsBundleEventFilter, type InsightsCountEventsInput, type InsightsCountLatestEventsInput, type InsightsCoverage, type InsightsEventCursor, type InsightsEventFilter, type InsightsFindLatestEventsInput, type InsightsGetAppUsageInput, type InsightsGetAppUsageResult, type InsightsGetReleaseActivityInput, type InsightsGetReleaseActivityResult, type InsightsListEventsInput, type InsightsModel, type InsightsRecordEventInput, type InsightsScope, type InsightsTimeRange, IosBuildDestination, type KeysetInput, LocalSigningConfig, NativeBuildAndroidScheme, NativeBuildArgs, NativeBuildIosScheme, NativeBuildOptions, ParsedStorageUri, type Platform, PlatformConfig, Primitive, PromoteReleaseResult, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, type ReleaseActivityMetrics, ReleaseCatalogCompilation, ReleaseCatalogCompilationError, ReleaseCatalogCompilerDiagnostics, ReleaseCatalogMutationError, ReleaseCatalogMutationPreflight, ReleaseCatalogMutationResult, ReleaseCatalogRebuildPreflight, ReleaseCatalogRebuildResult, type ReleaseCatalogRow, type ReleaseCatalogRowUpdate, ReleaseCatalogScope, type ReleaseFilter, ReleaseManagementError, ReleasePolicyPatch, type ReleaseReference, type ReleaseRow, type ReleaseRowUpdate, type ReleaseTarget, type RemoteDatabase, RemoteSigningOptions, RequiredDeep, SigningConfig, StorageDeleteInput, StorageDeleteResult, StorageExistsInput, StorageExistsResult, StorageGetDownloadUrlInput, StorageGetDownloadUrlResult, StorageGetInput, StorageGetResult, StorageObject, StorageOperation, StoragePlugin, StoragePluginWith, StoragePutInput, StoragePutResult, type StoredBundleDeployment, assertStorageOperations, bundleToPatchRows, bundleToRow, canonicalizeAppVersion, compareInsightsText, compileReleaseCatalog, createBundleSigningHandler, createBundleStorageKey, createStorageDownloadPath, createStorageDownloadUrl, createStorageKeyBuilder, createStoragePlugin, createStorageRootUriWithPath, createStorageUri, createStorageUriWithRelativePath, createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, filterCompatibleAppVersions, generateMinBundleId, getBundleArchiveStorageUri, getContentAddressedAssetStoragePath, getContentType, getManifestAssetDownloadPath, getManifestAssetStoragePath, isBrotliManifestAssetPath, isContentAddressedAssetFileHash, isDatabaseBundleEventMetadata, isDatabaseMetadataObject, isInsightsMovementEvent, isRemoteDatabase, isUUIDv7, parseStorageDownloadPath, parseStorageUri, projectCompiledCatalog, projectCompiledRollbackCatalog, referenceCompatibleReleases, releaseRowToRelease, releaseToRow, remoteSigning, replaceStorageUriKeySuffix, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri, rowToBundle, rowsToBundles, semverSatisfies, supportedIosPlatforms };
package/dist/index.mjs CHANGED
@@ -1,29 +1,23 @@
1
- import { calculatePagination } from "./calculatePagination.mjs";
2
- import { BUNDLE_STORAGE_PREFIX, createBundleStorageKey, createStorageRootUriWithPath } from "./bundleStorageLayout.mjs";
3
- import { detectCompressionFormat, getCompressionMimeType, getContentType } from "./compressionFormat.mjs";
4
1
  import { CONTENT_ADDRESSED_ASSET_PREFIX, getContentAddressedAssetStoragePath, isContentAddressedAssetFileHash } from "./contentAddressedAssets.mjs";
5
2
  import { createStorageKeyBuilder } from "./createStorageKeyBuilder.mjs";
6
3
  import { createStorageUri, parseStorageUri } from "./parseStorageUri.mjs";
7
4
  import { createStorageUriWithRelativePath, getManifestAssetDownloadPath, getManifestAssetStoragePath, isBrotliManifestAssetPath, replaceStorageUriKeySuffix, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri } from "./assetStorageLayout.mjs";
8
- import { DatabasePluginInputError } from "./databasePluginCrudValidationErrors.mjs";
9
- import { isDatabaseBundleEventMetadata, isDatabaseMetadataObject } from "./databaseJsonValue.mjs";
10
- import { createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, isUUIDv7 } from "./uuidv7.mjs";
11
- import { compareInsightsText, isInsightsMovementEvent } from "./insightsContract.mjs";
12
- import { DatabaseAtomicCommitUnsupportedError, createDatabasePlugin } from "./createDatabasePlugin.mjs";
5
+ import { BUNDLE_STORAGE_PREFIX, createBundleStorageKey, createStorageRootUriWithPath, getBundleArchiveStorageUri } from "./bundleStorageLayout.mjs";
6
+ import { getContentType } from "./contentType.mjs";
7
+ import { DatabaseBundleNotFoundError, DatabasePluginInputError, DatabaseRowReferencedError } from "./databaseErrors.mjs";
13
8
  import { assertStorageOperations, createStoragePlugin } from "./createStoragePlugin.mjs";
9
+ import { isDatabaseBundleEventMetadata, isDatabaseMetadataObject } from "./databaseJsonValue.mjs";
14
10
  import { BundleRowHydrationError, BundleRowHydrationErrorReason, bundleToPatchRows, bundleToRow, releaseRowToRelease, releaseToRow, rowToBundle, rowsToBundles } from "./databaseRows.mjs";
15
- import { DatabasePatchUpdateUnsupportedError } from "./databaseClientUpdates.mjs";
16
- import { DatabaseBundleNotFoundError, DatabasePatchInsertUnsupportedError, createDatabaseClient } from "./databaseClient.mjs";
17
11
  import { semverSatisfies } from "./semverSatisfies.mjs";
18
12
  import { filterCompatibleAppVersions } from "./filterCompatibleAppVersions.mjs";
19
13
  import { generateMinBundleId } from "./generateMinBundleId.mjs";
20
- import { bundleIdMatchesFilter, bundleMatchesQueryWhere, sortBundles } from "./queryBundles.mjs";
21
- import { paginateBundles } from "./paginateBundles.mjs";
22
- import { createRequestBundleResolver } from "./requestBundleCache.mjs";
14
+ import { createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, isUUIDv7 } from "./uuidv7.mjs";
15
+ import { compareInsightsText, isInsightsMovementEvent } from "./insightsContract.mjs";
23
16
  import { ReleaseCatalogCompilationError, canonicalizeAppVersion, compileReleaseCatalog, projectCompiledCatalog, projectCompiledRollbackCatalog, referenceCompatibleReleases } from "./releaseCatalogCompiler.mjs";
24
- import { ReleaseCatalogMutationError, commitReleaseCatalogMutation, commitReleaseCatalogMutations, preflightReleaseCatalogMutation, preflightReleaseCatalogRebuild, rebuildReleaseCatalog } from "./releaseCatalogMutation.mjs";
25
- import { ReleaseManagementError, deleteRelease, preflightReleasePolicy, promoteRelease, rollbackRelease, rollbackReleases, updateReleasePolicy } from "./releaseManagement.mjs";
17
+ import { ReleaseManagementError } from "./releaseManagement.mjs";
18
+ import { ReleaseCatalogMutationError } from "./releaseCatalogMutation.mjs";
26
19
  import { REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, createBundleSigningHandler, remoteSigning } from "./remoteBundleSigning.mjs";
27
20
  import { createStorageDownloadPath, createStorageDownloadUrl, parseStorageDownloadPath } from "./storageDownloadPath.mjs";
21
+ import { isRemoteDatabase } from "./types/databaseConfig.mjs";
28
22
  import { supportedIosPlatforms } from "./types/index.mjs";
29
- export { BUNDLE_STORAGE_PREFIX, BundleRowHydrationError, BundleRowHydrationErrorReason, CONTENT_ADDRESSED_ASSET_PREFIX, DatabaseAtomicCommitUnsupportedError, DatabaseBundleNotFoundError, DatabasePatchInsertUnsupportedError, DatabasePatchUpdateUnsupportedError, DatabasePluginInputError, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, ReleaseCatalogCompilationError, ReleaseCatalogMutationError, ReleaseManagementError, assertStorageOperations, bundleIdMatchesFilter, bundleMatchesQueryWhere, bundleToPatchRows, bundleToRow, calculatePagination, canonicalizeAppVersion, commitReleaseCatalogMutation, commitReleaseCatalogMutations, compareInsightsText, 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, isDatabaseBundleEventMetadata, isDatabaseMetadataObject, isInsightsMovementEvent, 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 };
23
+ export { BUNDLE_STORAGE_PREFIX, BundleRowHydrationError, BundleRowHydrationErrorReason, CONTENT_ADDRESSED_ASSET_PREFIX, DatabaseBundleNotFoundError, DatabasePluginInputError, DatabaseRowReferencedError, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, ReleaseCatalogCompilationError, ReleaseCatalogMutationError, ReleaseManagementError, assertStorageOperations, bundleToPatchRows, bundleToRow, canonicalizeAppVersion, compareInsightsText, compileReleaseCatalog, createBundleSigningHandler, createBundleStorageKey, createStorageDownloadPath, createStorageDownloadUrl, createStorageKeyBuilder, createStoragePlugin, createStorageRootUriWithPath, createStorageUri, createStorageUriWithRelativePath, createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, filterCompatibleAppVersions, generateMinBundleId, getBundleArchiveStorageUri, getContentAddressedAssetStoragePath, getContentType, getManifestAssetDownloadPath, getManifestAssetStoragePath, isBrotliManifestAssetPath, isContentAddressedAssetFileHash, isDatabaseBundleEventMetadata, isDatabaseMetadataObject, isInsightsMovementEvent, isRemoteDatabase, isUUIDv7, parseStorageDownloadPath, parseStorageUri, projectCompiledCatalog, projectCompiledRollbackCatalog, referenceCompatibleReleases, releaseRowToRelease, releaseToRow, remoteSigning, replaceStorageUriKeySuffix, resolveManifestAssetStorageFileHash, resolveManifestAssetStorageUri, rowToBundle, rowsToBundles, semverSatisfies, supportedIosPlatforms };
@@ -1,6 +1,5 @@
1
- const require_databasePluginCrudValidationErrors = require("./databasePluginCrudValidationErrors.cjs");
2
- const require_databasePluginCrudValidationFields = require("./databasePluginCrudValidationFields.cjs");
3
- const require_databasePluginCrudValidationRows = require("./databasePluginCrudValidationRows.cjs");
1
+ const require_databaseErrors = require("./databaseErrors.cjs");
2
+ const require_bundleEventRow = require("./bundleEventRow.cjs");
4
3
  let _hot_updater_core = require("@hot-updater/core");
5
4
  //#region src/insightsContract.ts
6
5
  const encoder = new TextEncoder();
@@ -25,7 +24,7 @@ const isLimit = (value) => isTimestamp(value) && value >= 1 && value <= 101;
25
24
  const hasOnlyKeys = (value, keys) => Object.keys(value).every((key) => keys.includes(key));
26
25
  const hasScope = (value) => (value.platform === "ios" || value.platform === "android") && isText(value.channel);
27
26
  const isBundleFilter = (value, withKind = false) => {
28
- if (!require_databasePluginCrudValidationFields.isRecord(value) || !hasScope(value)) return false;
27
+ if (!require_bundleEventRow.isRecord(value) || !hasScope(value)) return false;
29
28
  const keys = [
30
29
  "platform",
31
30
  "channel",
@@ -35,20 +34,22 @@ const isBundleFilter = (value, withKind = false) => {
35
34
  return value.type === "RECOVERED" ? isText(value.fromBundleId) && hasOnlyKeys(value, [...keys, "fromBundleId"]) : (value.type === "UPDATE_DOWNLOADED" || value.type === "UPDATE_APPLIED" || value.type === "UNCHANGED") && isText(value.toBundleId) && hasOnlyKeys(value, [...keys, "toBundleId"]);
36
35
  };
37
36
  const isEventFilter = (value) => {
38
- if (!require_databasePluginCrudValidationFields.isRecord(value)) return false;
37
+ if (!require_bundleEventRow.isRecord(value)) return false;
39
38
  if (value.kind === "all") return hasOnlyKeys(value, ["kind"]);
40
39
  if (value.kind === "installationMovement") return isIdentity(value.installId) && hasOnlyKeys(value, ["kind", "installId"]);
41
40
  return value.kind === "bundle" && isBundleFilter(value, true);
42
41
  };
43
42
  const validateRow = (model, row, result = false) => {
44
43
  try {
45
- require_databasePluginCrudValidationRows.validateCreateData(model, row);
46
- if (!require_databasePluginCrudValidationFields.isRecord(row) || typeof row.id !== "string" || !(0, _hot_updater_core.isUUIDv7)(row.id) || [...Object.values(row), ...require_databasePluginCrudValidationFields.isRecord(row.metadata) ? Object.values(row.metadata) : []].some((value) => typeof value === "string" && !isWellFormedText(value))) throw new require_databasePluginCrudValidationErrors.DatabasePluginInputError("invalid-data");
44
+ require_bundleEventRow.validateBundleEventFields(row);
45
+ if (!require_bundleEventRow.isRecord(row) || typeof row.id !== "string" || !(0, _hot_updater_core.isUUIDv7)(row.id) || [...Object.values(row), ...require_bundleEventRow.isRecord(row.metadata) ? Object.values(row.metadata) : []].some((value) => typeof value === "string" && !isWellFormedText(value))) throw new require_databaseErrors.DatabasePluginInputError("invalid-data");
47
46
  } catch (error) {
48
- if (result) throw new require_databasePluginCrudValidationErrors.DatabasePluginInputError("invalid-result");
47
+ if (result) throw new require_databaseErrors.DatabasePluginInputError("invalid-result");
49
48
  throw error;
50
49
  }
51
50
  };
51
+ /** Throws `invalid-data` unless `row` is a complete, well-formed bundle event row. */
52
+ const assertBundleEventRow = (row) => validateRow("bundle_events", row);
52
53
  /** Downloads and applied transitions belong in installation history. */
53
54
  const isInsightsMovementEvent = (event) => event.type === "UPDATE_DOWNLOADED" || event.type === "UPDATE_APPLIED" || event.type === "RECOVERED";
54
55
  const matchesInsightsEventFilter = (event, filter) => {
@@ -57,21 +58,33 @@ const matchesInsightsEventFilter = (event, filter) => {
57
58
  return event.type === filter.type && event.platform === filter.platform && event.channel === filter.channel && (filter.type === "RECOVERED" ? event.from_bundle_id === filter.fromBundleId : event.to_bundle_id === filter.toBundleId);
58
59
  };
59
60
  const invalidQuery = () => {
60
- throw new require_databasePluginCrudValidationErrors.DatabasePluginInputError("invalid-query");
61
+ throw new require_databaseErrors.DatabasePluginInputError("invalid-query");
61
62
  };
62
63
  const invalidResult = () => {
63
- throw new require_databasePluginCrudValidationErrors.DatabasePluginInputError("invalid-result");
64
+ throw new require_databaseErrors.DatabasePluginInputError("invalid-result");
64
65
  };
65
66
  const validateCount = (count) => isTimestamp(count) ? count : invalidResult();
67
+ const isTimeRange = (value) => require_bundleEventRow.isRecord(value) && hasOnlyKeys(value, ["start", "end"]) && isTimestamp(value.start) && isTimestamp(value.end) && value.start < value.end;
68
+ const isReleaseReference = (value) => require_bundleEventRow.isRecord(value) && hasOnlyKeys(value, [
69
+ "releaseId",
70
+ "platform",
71
+ "channel"
72
+ ]) && isIdentity(value.releaseId) && hasScope(value);
73
+ const validateAggregateResult = (value) => {
74
+ const result = require_bundleEventRow.isRecord(value) ? value : invalidResult();
75
+ if (!isTimestamp(result.measuredAtMs)) invalidResult();
76
+ const coverage = result.coverage;
77
+ if (!require_bundleEventRow.isRecord(coverage) || coverage.kind !== "complete" && coverage.kind !== "partial" || coverage.sinceMs !== null && !isTimestamp(coverage.sinceMs)) invalidResult();
78
+ };
66
79
  /** Validate custom and bundled providers at the same public boundary. */
67
80
  const createValidatedInsightsModel = (model) => ({
68
81
  async recordEvent(input) {
69
- if (!require_databasePluginCrudValidationFields.isRecord(input) || !hasOnlyKeys(input, ["event"])) throw new require_databasePluginCrudValidationErrors.DatabasePluginInputError("invalid-data");
82
+ if (!require_bundleEventRow.isRecord(input) || !hasOnlyKeys(input, ["event"])) throw new require_databaseErrors.DatabasePluginInputError("invalid-data");
70
83
  validateRow("bundle_events", input.event);
71
84
  await model.recordEvent(input);
72
85
  },
73
86
  async listEvents(input) {
74
- if (!require_databasePluginCrudValidationFields.isRecord(input) || !hasOnlyKeys(input, [
87
+ if (!require_bundleEventRow.isRecord(input) || !hasOnlyKeys(input, [
75
88
  "filter",
76
89
  "sinceMs",
77
90
  "beforeReceivedAtMs",
@@ -79,7 +92,7 @@ const createValidatedInsightsModel = (model) => ({
79
92
  "limit"
80
93
  ]) || !isEventFilter(input.filter) || !isLimit(input.limit) || !isTimestamp(input.beforeReceivedAtMs) || input.sinceMs !== void 0 && !isTimestamp(input.sinceMs)) invalidQuery();
81
94
  const sinceMs = input.sinceMs ?? 0;
82
- if (sinceMs > input.beforeReceivedAtMs || input.after !== void 0 && (!require_databasePluginCrudValidationFields.isRecord(input.after) || !hasOnlyKeys(input.after, ["receivedAtMs", "id"]) || !isTimestamp(input.after.receivedAtMs) || typeof input.after.id !== "string" || !(0, _hot_updater_core.isUUIDv7)(input.after.id) || input.after.receivedAtMs < sinceMs || input.after.receivedAtMs >= input.beforeReceivedAtMs)) invalidQuery();
95
+ if (sinceMs > input.beforeReceivedAtMs || input.after !== void 0 && (!require_bundleEventRow.isRecord(input.after) || !hasOnlyKeys(input.after, ["receivedAtMs", "id"]) || !isTimestamp(input.after.receivedAtMs) || typeof input.after.id !== "string" || !(0, _hot_updater_core.isUUIDv7)(input.after.id) || input.after.receivedAtMs < sinceMs || input.after.receivedAtMs >= input.beforeReceivedAtMs)) invalidQuery();
83
96
  const rows = await model.listEvents(input);
84
97
  if (!Array.isArray(rows) || rows.length > input.limit) invalidResult();
85
98
  let previous = input.after;
@@ -94,7 +107,7 @@ const createValidatedInsightsModel = (model) => ({
94
107
  return rows;
95
108
  },
96
109
  async findLatestEvents(input) {
97
- if (!require_databasePluginCrudValidationFields.isRecord(input)) invalidQuery();
110
+ if (!require_bundleEventRow.isRecord(input)) invalidQuery();
98
111
  if ("installId" in input) {
99
112
  if (!hasOnlyKeys(input, ["installId"]) || !isIdentity(input.installId)) invalidQuery();
100
113
  } else if (!hasOnlyKeys(input, [
@@ -113,12 +126,12 @@ const createValidatedInsightsModel = (model) => ({
113
126
  return rows;
114
127
  },
115
128
  async countLatestEvents(input) {
116
- if (!require_databasePluginCrudValidationFields.isRecord(input) || !hasOnlyKeys(input, [
129
+ if (!require_bundleEventRow.isRecord(input) || !hasOnlyKeys(input, [
117
130
  "platform",
118
131
  "channel",
119
132
  "sinceMs",
120
133
  "bundle"
121
- ]) || !hasScope(input) || !isTimestamp(input.sinceMs) || input.bundle !== void 0 && (!Array.isArray(input.bundle) || input.bundle.length < 1 || input.bundle.length > 2 || input.bundle.some((bundle) => !require_databasePluginCrudValidationFields.isRecord(bundle) || !hasOnlyKeys(bundle, [
134
+ ]) || !hasScope(input) || !isTimestamp(input.sinceMs) || input.bundle !== void 0 && (!Array.isArray(input.bundle) || input.bundle.length < 1 || input.bundle.length > 2 || input.bundle.some((bundle) => !require_bundleEventRow.isRecord(bundle) || !hasOnlyKeys(bundle, [
122
135
  "field",
123
136
  "value",
124
137
  "types"
@@ -131,15 +144,50 @@ const createValidatedInsightsModel = (model) => ({
131
144
  return validateCount(await model.countLatestEvents(input));
132
145
  },
133
146
  async countEvents(input) {
134
- if (!require_databasePluginCrudValidationFields.isRecord(input) || !hasOnlyKeys(input, [
147
+ if (!require_bundleEventRow.isRecord(input) || !hasOnlyKeys(input, [
135
148
  "filter",
136
149
  "sinceMs",
137
150
  "beforeReceivedAtMs"
138
151
  ]) || !isBundleFilter(input.filter) || !isTimestamp(input.sinceMs) || !isTimestamp(input.beforeReceivedAtMs) || input.sinceMs > input.beforeReceivedAtMs) invalidQuery();
139
152
  return validateCount(await model.countEvents(input));
153
+ },
154
+ async getReleaseActivity(input) {
155
+ if (!require_bundleEventRow.isRecord(input) || !hasOnlyKeys(input, [
156
+ "releases",
157
+ "scope",
158
+ "timeRange"
159
+ ])) invalidQuery();
160
+ const releases = input.releases;
161
+ const scope = input.scope;
162
+ const timeRange = input.timeRange;
163
+ const releaseQuery = Array.isArray(releases) && releases.length > 0 && releases.length <= 100 && releases.every(isReleaseReference) && scope === void 0 && (timeRange === void 0 || isTimeRange(timeRange));
164
+ const scopeQuery = releases === void 0 && require_bundleEventRow.isRecord(scope) && hasOnlyKeys(scope, ["platform", "channel"]) && hasScope(scope) && isTimeRange(timeRange);
165
+ if (!releaseQuery && !scopeQuery) invalidQuery();
166
+ const result = await model.getReleaseActivity(input);
167
+ validateAggregateResult(result);
168
+ if (!Array.isArray(result.data)) invalidResult();
169
+ return result;
170
+ },
171
+ async getAppUsage(input) {
172
+ if (!require_bundleEventRow.isRecord(input) || !hasOnlyKeys(input, [
173
+ "channel",
174
+ "platform",
175
+ "appVersion",
176
+ "timeRange",
177
+ "intervalMs"
178
+ ]) || !isText(input.channel) || ![
179
+ "all",
180
+ "ios",
181
+ "android"
182
+ ].includes(input.platform) || input.appVersion !== void 0 && !isText(input.appVersion) || !isTimeRange(input.timeRange) || !isTimestamp(input.intervalMs) || input.intervalMs < 36e5) invalidQuery();
183
+ const result = await model.getAppUsage(input);
184
+ validateAggregateResult(result);
185
+ if (!isTimestamp(result.activeInstallations) || !Array.isArray(result.points) || !Array.isArray(result.appVersions) || !Array.isArray(result.versions) || !Array.isArray(result.platforms) || !Array.isArray(result.bundleDistribution)) invalidResult();
186
+ return result;
140
187
  }
141
188
  });
142
189
  //#endregion
190
+ exports.assertBundleEventRow = assertBundleEventRow;
143
191
  exports.compareInsightsText = compareInsightsText;
144
192
  exports.createValidatedInsightsModel = createValidatedInsightsModel;
145
193
  exports.isInsightsMovementEvent = isInsightsMovementEvent;
@@ -1,9 +1,14 @@
1
1
  import { BundleEventRow } from "./types/databaseRows.cjs";
2
+ import { InsightsModel } from "./types/insights.cjs";
2
3
  import "./types/index.cjs";
3
4
  //#region src/insightsContract.d.ts
4
5
  /** Exact UTF-8 byte ordering, without case folding or Unicode normalization. */
5
6
  declare const compareInsightsText: (left: string, right: string) => number;
7
+ /** Throws `invalid-data` unless `row` is a complete, well-formed bundle event row. */
8
+ declare const assertBundleEventRow: (row: unknown) => void;
6
9
  /** Downloads and applied transitions belong in installation history. */
7
10
  declare const isInsightsMovementEvent: (event: Pick<BundleEventRow, "type">) => boolean;
11
+ /** Validate custom and bundled providers at the same public boundary. */
12
+ declare const createValidatedInsightsModel: (model: InsightsModel) => InsightsModel;
8
13
  //#endregion
9
- export { compareInsightsText, isInsightsMovementEvent };
14
+ export { assertBundleEventRow, compareInsightsText, createValidatedInsightsModel, isInsightsMovementEvent };
@@ -1,9 +1,14 @@
1
1
  import { BundleEventRow } from "./types/databaseRows.mjs";
2
+ import { InsightsModel } from "./types/insights.mjs";
2
3
  import "./types/index.mjs";
3
4
  //#region src/insightsContract.d.ts
4
5
  /** Exact UTF-8 byte ordering, without case folding or Unicode normalization. */
5
6
  declare const compareInsightsText: (left: string, right: string) => number;
7
+ /** Throws `invalid-data` unless `row` is a complete, well-formed bundle event row. */
8
+ declare const assertBundleEventRow: (row: unknown) => void;
6
9
  /** Downloads and applied transitions belong in installation history. */
7
10
  declare const isInsightsMovementEvent: (event: Pick<BundleEventRow, "type">) => boolean;
11
+ /** Validate custom and bundled providers at the same public boundary. */
12
+ declare const createValidatedInsightsModel: (model: InsightsModel) => InsightsModel;
8
13
  //#endregion
9
- export { compareInsightsText, isInsightsMovementEvent };
14
+ export { assertBundleEventRow, compareInsightsText, createValidatedInsightsModel, isInsightsMovementEvent };