@hot-updater/plugin-core 1.0.0-rc.0 → 1.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.cjs +1 -1
- package/dist/assetStorageLayout.cjs +4 -2
- package/dist/assetStorageLayout.d.cts +5 -24
- package/dist/assetStorageLayout.d.mts +5 -24
- package/dist/assetStorageLayout.mjs +4 -2
- package/dist/calculatePagination.d.cts +0 -1
- package/dist/calculatePagination.d.mts +0 -1
- package/dist/compressionFormat.cjs +12 -5
- package/dist/compressionFormat.d.cts +1 -1
- package/dist/compressionFormat.d.mts +1 -1
- package/dist/compressionFormat.mjs +11 -4
- package/dist/contentAddressedAssets.d.cts +1 -4
- package/dist/contentAddressedAssets.d.mts +1 -4
- package/dist/createDatabasePlugin.cjs +162 -41
- package/dist/createDatabasePlugin.d.cts +3 -1
- package/dist/createDatabasePlugin.d.mts +3 -1
- package/dist/createDatabasePlugin.mjs +162 -42
- package/dist/createStoragePlugin.d.cts +0 -1
- package/dist/createStoragePlugin.d.mts +0 -1
- package/dist/databaseClient.cjs +6 -1
- package/dist/databaseClient.d.cts +1 -2
- package/dist/databaseClient.d.mts +1 -2
- package/dist/databaseClient.mjs +6 -2
- package/dist/databaseClientReads.cjs +3 -1
- package/dist/databaseClientReads.mjs +3 -2
- package/dist/databaseClientUpdates.cjs +2 -1
- package/dist/databaseClientUpdates.d.cts +1 -1
- package/dist/databaseClientUpdates.d.mts +1 -1
- package/dist/databaseClientUpdates.mjs +2 -0
- package/dist/databaseJsonValue.cjs +2 -0
- package/dist/databaseJsonValue.d.cts +1 -0
- package/dist/databaseJsonValue.d.mts +1 -0
- package/dist/databaseJsonValue.mjs +1 -1
- package/dist/databaseMetadata.cjs +0 -1
- package/dist/databasePluginCrud.cjs +3 -1
- package/dist/databasePluginCrud.d.cts +4 -1
- package/dist/databasePluginCrud.d.mts +4 -1
- package/dist/databasePluginCrud.mjs +4 -3
- package/dist/databasePluginCrudValidation.d.cts +6 -1
- package/dist/databasePluginCrudValidation.d.mts +6 -1
- package/dist/databasePluginCrudValidationErrors.cjs +1 -0
- package/dist/databasePluginCrudValidationErrors.mjs +1 -0
- package/dist/databasePluginCrudValidationFields.cjs +43 -13
- package/dist/databasePluginCrudValidationFields.d.cts +1 -1
- package/dist/databasePluginCrudValidationFields.d.mts +1 -1
- package/dist/databasePluginCrudValidationFields.mjs +41 -13
- package/dist/databasePluginCrudValidationMutations.cjs +20 -1
- package/dist/databasePluginCrudValidationMutations.d.cts +1 -1
- package/dist/databasePluginCrudValidationMutations.d.mts +1 -1
- package/dist/databasePluginCrudValidationMutations.mjs +20 -2
- package/dist/databasePluginCrudValidationQueries.d.cts +2 -1
- package/dist/databasePluginCrudValidationQueries.d.mts +2 -1
- package/dist/databasePluginCrudValidationRows.d.cts +1 -1
- package/dist/databasePluginCrudValidationRows.d.mts +1 -1
- package/dist/databaseRows.cjs +0 -1
- package/dist/databaseRows.d.cts +2 -6
- package/dist/databaseRows.d.mts +2 -6
- package/dist/index.cjs +4 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +2 -1
- package/dist/insightsContract.cjs +157 -0
- package/dist/insightsContract.d.cts +11 -0
- package/dist/insightsContract.d.mts +11 -0
- package/dist/insightsContract.mjs +153 -0
- package/dist/internal.d.cts +5 -4
- package/dist/internal.d.mts +5 -4
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/comparison-DenM3wCn.cjs +136 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/comparison-DenM3wCn.mjs +116 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/range-DvX-Y6iv.cjs +167 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/range-DvX-Y6iv.mjs +165 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/set-CC5YeoYX.cjs +42 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/set-CC5YeoYX.mjs +39 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/version-CQ98ZBpL.cjs +39 -0
- package/dist/node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/version-CQ98ZBpL.mjs +37 -0
- package/dist/paginateBundles.d.cts +1 -8
- package/dist/paginateBundles.d.mts +1 -8
- package/dist/parseStorageUri.d.cts +1 -5
- package/dist/parseStorageUri.d.mts +1 -5
- package/dist/queryBundles.d.cts +0 -1
- package/dist/queryBundles.d.mts +0 -1
- package/dist/releaseCatalogCompiler.cjs +15 -12
- package/dist/releaseCatalogCompiler.d.cts +0 -1
- package/dist/releaseCatalogCompiler.d.mts +0 -1
- package/dist/releaseCatalogCompiler.mjs +11 -7
- package/dist/releaseCatalogMutation.cjs +1 -1
- package/dist/releaseCatalogMutation.d.cts +1 -1
- package/dist/releaseCatalogMutation.d.mts +1 -1
- package/dist/releaseCatalogMutation.mjs +1 -0
- package/dist/releaseManagement.cjs +3 -2
- package/dist/releaseManagement.d.cts +1 -1
- package/dist/releaseManagement.d.mts +1 -1
- package/dist/releaseManagement.mjs +3 -1
- package/dist/remoteBundleSigning.cjs +5 -7
- package/dist/remoteBundleSigning.d.cts +2 -15
- package/dist/remoteBundleSigning.d.mts +2 -15
- package/dist/remoteBundleSigning.mjs +5 -7
- package/dist/requestBundleCache.d.cts +1 -2
- package/dist/requestBundleCache.d.mts +1 -2
- package/dist/semverSatisfies.cjs +4 -3
- package/dist/semverSatisfies.mjs +2 -1
- package/dist/storageDownloadPath.cjs +2 -1
- package/dist/storageDownloadPath.d.cts +1 -3
- package/dist/storageDownloadPath.d.mts +1 -3
- package/dist/storageDownloadPath.mjs +2 -1
- package/dist/types/database.d.cts +4 -3
- package/dist/types/database.d.mts +4 -3
- package/dist/types/databaseFields.cjs +13 -0
- package/dist/types/databaseFields.d.cts +1 -0
- package/dist/types/databaseFields.d.mts +1 -0
- package/dist/types/databaseFields.mjs +13 -0
- package/dist/types/databaseOperations.d.cts +26 -15
- package/dist/types/databaseOperations.d.mts +26 -15
- package/dist/types/databasePlugin.d.cts +72 -14
- package/dist/types/databasePlugin.d.mts +72 -14
- package/dist/types/databaseQuery.d.cts +2 -3
- package/dist/types/databaseQuery.d.mts +2 -3
- package/dist/types/databaseRows.d.cts +3 -2
- package/dist/types/databaseRows.d.mts +3 -2
- package/dist/types/index.d.cts +15 -11
- package/dist/types/index.d.mts +15 -11
- package/dist/types/internal.d.cts +5 -4
- package/dist/types/internal.d.mts +5 -4
- package/dist/types/public.d.cts +4 -3
- package/dist/types/public.d.mts +4 -3
- package/dist/types/utils.d.cts +1 -1
- package/dist/types/utils.d.mts +1 -1
- package/dist/uuidv7.cjs +7 -2
- package/dist/uuidv7.d.cts +0 -1
- package/dist/uuidv7.d.mts +0 -1
- package/dist/uuidv7.mjs +1 -1
- package/package.json +3 -3
- package/dist/node_modules/.pnpm/verkit@0.3.2/node_modules/verkit/dist/index.cjs +0 -345
- package/dist/node_modules/.pnpm/verkit@0.3.2/node_modules/verkit/dist/index.mjs +0 -341
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
require("./_virtual/_rolldown/runtime.cjs");
|
|
2
1
|
const require_databasePluginCrudValidationErrors = require("./databasePluginCrudValidationErrors.cjs");
|
|
3
2
|
const require_databaseJsonValue = require("./databaseJsonValue.cjs");
|
|
4
3
|
const require_databaseFields = require("./types/databaseFields.cjs");
|
|
@@ -14,6 +13,8 @@ const isChannelText = (value) => {
|
|
|
14
13
|
}
|
|
15
14
|
return true;
|
|
16
15
|
};
|
|
16
|
+
const isInsightsIdentityText = (value) => typeof value === "string" && value.length > 0 && value.length <= 255;
|
|
17
|
+
const isNullableInsightsIdentityText = (value) => value === null || isInsightsIdentityText(value);
|
|
17
18
|
const modelValidators = {
|
|
18
19
|
bundles: {
|
|
19
20
|
id: (value) => typeof value === "string",
|
|
@@ -89,8 +90,8 @@ const modelValidators = {
|
|
|
89
90
|
bundle_events: {
|
|
90
91
|
id: (value) => typeof value === "string",
|
|
91
92
|
type: (value) => value === "UPDATE_APPLIED" || value === "RECOVERED" || value === "RELEASE_ADOPTED" || value === "UNCHANGED",
|
|
92
|
-
install_id:
|
|
93
|
-
user_id:
|
|
93
|
+
install_id: isInsightsIdentityText,
|
|
94
|
+
user_id: isNullableInsightsIdentityText,
|
|
94
95
|
username: (value) => value === null || typeof value === "string",
|
|
95
96
|
from_bundle_id: (value) => value === null || typeof value === "string",
|
|
96
97
|
from_release_id: (value) => value === null || typeof value === "string",
|
|
@@ -105,6 +106,19 @@ const modelValidators = {
|
|
|
105
106
|
sdk_version: (value) => value === null || typeof value === "string",
|
|
106
107
|
received_at_ms: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0
|
|
107
108
|
},
|
|
109
|
+
bundle_installations: {
|
|
110
|
+
id: (value) => typeof value === "string",
|
|
111
|
+
install_id: isInsightsIdentityText,
|
|
112
|
+
user_id: isNullableInsightsIdentityText,
|
|
113
|
+
username: (value) => value === null || typeof value === "string",
|
|
114
|
+
to_bundle_id: (value) => typeof value === "string",
|
|
115
|
+
type: (value) => value === "UPDATE_APPLIED" || value === "RECOVERED" || value === "RELEASE_ADOPTED" || value === "UNCHANGED",
|
|
116
|
+
platform: (value) => value === "ios" || value === "android",
|
|
117
|
+
app_version: (value) => typeof value === "string",
|
|
118
|
+
channel: (value) => typeof value === "string",
|
|
119
|
+
cohort: (value) => typeof value === "string",
|
|
120
|
+
received_at_ms: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0
|
|
121
|
+
},
|
|
108
122
|
api_keys: {
|
|
109
123
|
id: (value) => typeof value === "string",
|
|
110
124
|
hash: (value) => typeof value === "string",
|
|
@@ -115,7 +129,7 @@ const modelValidators = {
|
|
|
115
129
|
revoked_at_ms: (value) => value === null || typeof value === "number" && Number.isSafeInteger(value) && value >= 0
|
|
116
130
|
}
|
|
117
131
|
};
|
|
118
|
-
const stringFields = new Set([
|
|
132
|
+
const stringFields = /* @__PURE__ */ new Set([
|
|
119
133
|
"id",
|
|
120
134
|
"platform",
|
|
121
135
|
"file_hash",
|
|
@@ -156,7 +170,7 @@ const stringFields = new Set([
|
|
|
156
170
|
"prefix",
|
|
157
171
|
"role"
|
|
158
172
|
]);
|
|
159
|
-
const numberFields = new Set([
|
|
173
|
+
const numberFields = /* @__PURE__ */ new Set([
|
|
160
174
|
"archive_byte_size",
|
|
161
175
|
"byte_size",
|
|
162
176
|
"rollout_cohort_count",
|
|
@@ -169,13 +183,13 @@ const numberFields = new Set([
|
|
|
169
183
|
"created_at_ms",
|
|
170
184
|
"revoked_at_ms"
|
|
171
185
|
]);
|
|
172
|
-
const booleanFields = new Set([
|
|
186
|
+
const booleanFields = /* @__PURE__ */ new Set([
|
|
173
187
|
"should_force_update",
|
|
174
188
|
"enabled",
|
|
175
189
|
"is_tombstone"
|
|
176
190
|
]);
|
|
177
191
|
const sortableFields = {
|
|
178
|
-
bundles: new Set([
|
|
192
|
+
bundles: /* @__PURE__ */ new Set([
|
|
179
193
|
"id",
|
|
180
194
|
"platform",
|
|
181
195
|
"file_hash",
|
|
@@ -192,7 +206,7 @@ const sortableFields = {
|
|
|
192
206
|
"manifest_file_hash",
|
|
193
207
|
"asset_base_storage_uri"
|
|
194
208
|
]),
|
|
195
|
-
bundle_patches: new Set([
|
|
209
|
+
bundle_patches: /* @__PURE__ */ new Set([
|
|
196
210
|
"id",
|
|
197
211
|
"bundle_id",
|
|
198
212
|
"base_bundle_id",
|
|
@@ -202,7 +216,7 @@ const sortableFields = {
|
|
|
202
216
|
"byte_size",
|
|
203
217
|
"order_index"
|
|
204
218
|
]),
|
|
205
|
-
releases: new Set([
|
|
219
|
+
releases: /* @__PURE__ */ new Set([
|
|
206
220
|
"id",
|
|
207
221
|
"revision",
|
|
208
222
|
"scope_key",
|
|
@@ -222,7 +236,7 @@ const sortableFields = {
|
|
|
222
236
|
"created_at_ms",
|
|
223
237
|
"updated_at_ms"
|
|
224
238
|
]),
|
|
225
|
-
release_catalogs: new Set([
|
|
239
|
+
release_catalogs: /* @__PURE__ */ new Set([
|
|
226
240
|
"scope_key",
|
|
227
241
|
"catalog_id",
|
|
228
242
|
"strategy",
|
|
@@ -236,8 +250,8 @@ const sortableFields = {
|
|
|
236
250
|
"is_tombstone",
|
|
237
251
|
"updated_at_ms"
|
|
238
252
|
]),
|
|
239
|
-
channels: new Set(["id", "name"]),
|
|
240
|
-
bundle_events: new Set([
|
|
253
|
+
channels: /* @__PURE__ */ new Set(["id", "name"]),
|
|
254
|
+
bundle_events: /* @__PURE__ */ new Set([
|
|
241
255
|
"id",
|
|
242
256
|
"type",
|
|
243
257
|
"install_id",
|
|
@@ -256,7 +270,20 @@ const sortableFields = {
|
|
|
256
270
|
"sdk_version",
|
|
257
271
|
"received_at_ms"
|
|
258
272
|
]),
|
|
259
|
-
|
|
273
|
+
bundle_installations: /* @__PURE__ */ new Set([
|
|
274
|
+
"id",
|
|
275
|
+
"install_id",
|
|
276
|
+
"user_id",
|
|
277
|
+
"username",
|
|
278
|
+
"to_bundle_id",
|
|
279
|
+
"type",
|
|
280
|
+
"platform",
|
|
281
|
+
"app_version",
|
|
282
|
+
"channel",
|
|
283
|
+
"cohort",
|
|
284
|
+
"received_at_ms"
|
|
285
|
+
]),
|
|
286
|
+
api_keys: /* @__PURE__ */ new Set([
|
|
260
287
|
"id",
|
|
261
288
|
"hash",
|
|
262
289
|
"name",
|
|
@@ -279,13 +306,16 @@ const isStringField = (field) => stringFields.has(field);
|
|
|
279
306
|
const isNumberField = (field) => numberFields.has(field);
|
|
280
307
|
const isBooleanField = (field) => booleanFields.has(field);
|
|
281
308
|
//#endregion
|
|
309
|
+
exports.booleanFields = booleanFields;
|
|
282
310
|
exports.isBooleanField = isBooleanField;
|
|
283
311
|
exports.isChannelText = isChannelText;
|
|
284
312
|
exports.isNumberField = isNumberField;
|
|
285
313
|
exports.isRecord = isRecord;
|
|
286
314
|
exports.isStringField = isStringField;
|
|
287
315
|
exports.modelValidators = modelValidators;
|
|
316
|
+
exports.numberFields = numberFields;
|
|
288
317
|
exports.sortableFields = sortableFields;
|
|
318
|
+
exports.stringFields = stringFields;
|
|
289
319
|
exports.validateField = validateField;
|
|
290
320
|
exports.validateFields = validateFields;
|
|
291
321
|
exports.validateModel = validateModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "./types/internal.cjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "./types/internal.mjs";
|
|
@@ -13,6 +13,8 @@ const isChannelText = (value) => {
|
|
|
13
13
|
}
|
|
14
14
|
return true;
|
|
15
15
|
};
|
|
16
|
+
const isInsightsIdentityText = (value) => typeof value === "string" && value.length > 0 && value.length <= 255;
|
|
17
|
+
const isNullableInsightsIdentityText = (value) => value === null || isInsightsIdentityText(value);
|
|
16
18
|
const modelValidators = {
|
|
17
19
|
bundles: {
|
|
18
20
|
id: (value) => typeof value === "string",
|
|
@@ -88,8 +90,8 @@ const modelValidators = {
|
|
|
88
90
|
bundle_events: {
|
|
89
91
|
id: (value) => typeof value === "string",
|
|
90
92
|
type: (value) => value === "UPDATE_APPLIED" || value === "RECOVERED" || value === "RELEASE_ADOPTED" || value === "UNCHANGED",
|
|
91
|
-
install_id:
|
|
92
|
-
user_id:
|
|
93
|
+
install_id: isInsightsIdentityText,
|
|
94
|
+
user_id: isNullableInsightsIdentityText,
|
|
93
95
|
username: (value) => value === null || typeof value === "string",
|
|
94
96
|
from_bundle_id: (value) => value === null || typeof value === "string",
|
|
95
97
|
from_release_id: (value) => value === null || typeof value === "string",
|
|
@@ -104,6 +106,19 @@ const modelValidators = {
|
|
|
104
106
|
sdk_version: (value) => value === null || typeof value === "string",
|
|
105
107
|
received_at_ms: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0
|
|
106
108
|
},
|
|
109
|
+
bundle_installations: {
|
|
110
|
+
id: (value) => typeof value === "string",
|
|
111
|
+
install_id: isInsightsIdentityText,
|
|
112
|
+
user_id: isNullableInsightsIdentityText,
|
|
113
|
+
username: (value) => value === null || typeof value === "string",
|
|
114
|
+
to_bundle_id: (value) => typeof value === "string",
|
|
115
|
+
type: (value) => value === "UPDATE_APPLIED" || value === "RECOVERED" || value === "RELEASE_ADOPTED" || value === "UNCHANGED",
|
|
116
|
+
platform: (value) => value === "ios" || value === "android",
|
|
117
|
+
app_version: (value) => typeof value === "string",
|
|
118
|
+
channel: (value) => typeof value === "string",
|
|
119
|
+
cohort: (value) => typeof value === "string",
|
|
120
|
+
received_at_ms: (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0
|
|
121
|
+
},
|
|
107
122
|
api_keys: {
|
|
108
123
|
id: (value) => typeof value === "string",
|
|
109
124
|
hash: (value) => typeof value === "string",
|
|
@@ -114,7 +129,7 @@ const modelValidators = {
|
|
|
114
129
|
revoked_at_ms: (value) => value === null || typeof value === "number" && Number.isSafeInteger(value) && value >= 0
|
|
115
130
|
}
|
|
116
131
|
};
|
|
117
|
-
const stringFields = new Set([
|
|
132
|
+
const stringFields = /* @__PURE__ */ new Set([
|
|
118
133
|
"id",
|
|
119
134
|
"platform",
|
|
120
135
|
"file_hash",
|
|
@@ -155,7 +170,7 @@ const stringFields = new Set([
|
|
|
155
170
|
"prefix",
|
|
156
171
|
"role"
|
|
157
172
|
]);
|
|
158
|
-
const numberFields = new Set([
|
|
173
|
+
const numberFields = /* @__PURE__ */ new Set([
|
|
159
174
|
"archive_byte_size",
|
|
160
175
|
"byte_size",
|
|
161
176
|
"rollout_cohort_count",
|
|
@@ -168,13 +183,13 @@ const numberFields = new Set([
|
|
|
168
183
|
"created_at_ms",
|
|
169
184
|
"revoked_at_ms"
|
|
170
185
|
]);
|
|
171
|
-
const booleanFields = new Set([
|
|
186
|
+
const booleanFields = /* @__PURE__ */ new Set([
|
|
172
187
|
"should_force_update",
|
|
173
188
|
"enabled",
|
|
174
189
|
"is_tombstone"
|
|
175
190
|
]);
|
|
176
191
|
const sortableFields = {
|
|
177
|
-
bundles: new Set([
|
|
192
|
+
bundles: /* @__PURE__ */ new Set([
|
|
178
193
|
"id",
|
|
179
194
|
"platform",
|
|
180
195
|
"file_hash",
|
|
@@ -191,7 +206,7 @@ const sortableFields = {
|
|
|
191
206
|
"manifest_file_hash",
|
|
192
207
|
"asset_base_storage_uri"
|
|
193
208
|
]),
|
|
194
|
-
bundle_patches: new Set([
|
|
209
|
+
bundle_patches: /* @__PURE__ */ new Set([
|
|
195
210
|
"id",
|
|
196
211
|
"bundle_id",
|
|
197
212
|
"base_bundle_id",
|
|
@@ -201,7 +216,7 @@ const sortableFields = {
|
|
|
201
216
|
"byte_size",
|
|
202
217
|
"order_index"
|
|
203
218
|
]),
|
|
204
|
-
releases: new Set([
|
|
219
|
+
releases: /* @__PURE__ */ new Set([
|
|
205
220
|
"id",
|
|
206
221
|
"revision",
|
|
207
222
|
"scope_key",
|
|
@@ -221,7 +236,7 @@ const sortableFields = {
|
|
|
221
236
|
"created_at_ms",
|
|
222
237
|
"updated_at_ms"
|
|
223
238
|
]),
|
|
224
|
-
release_catalogs: new Set([
|
|
239
|
+
release_catalogs: /* @__PURE__ */ new Set([
|
|
225
240
|
"scope_key",
|
|
226
241
|
"catalog_id",
|
|
227
242
|
"strategy",
|
|
@@ -235,8 +250,8 @@ const sortableFields = {
|
|
|
235
250
|
"is_tombstone",
|
|
236
251
|
"updated_at_ms"
|
|
237
252
|
]),
|
|
238
|
-
channels: new Set(["id", "name"]),
|
|
239
|
-
bundle_events: new Set([
|
|
253
|
+
channels: /* @__PURE__ */ new Set(["id", "name"]),
|
|
254
|
+
bundle_events: /* @__PURE__ */ new Set([
|
|
240
255
|
"id",
|
|
241
256
|
"type",
|
|
242
257
|
"install_id",
|
|
@@ -255,7 +270,20 @@ const sortableFields = {
|
|
|
255
270
|
"sdk_version",
|
|
256
271
|
"received_at_ms"
|
|
257
272
|
]),
|
|
258
|
-
|
|
273
|
+
bundle_installations: /* @__PURE__ */ new Set([
|
|
274
|
+
"id",
|
|
275
|
+
"install_id",
|
|
276
|
+
"user_id",
|
|
277
|
+
"username",
|
|
278
|
+
"to_bundle_id",
|
|
279
|
+
"type",
|
|
280
|
+
"platform",
|
|
281
|
+
"app_version",
|
|
282
|
+
"channel",
|
|
283
|
+
"cohort",
|
|
284
|
+
"received_at_ms"
|
|
285
|
+
]),
|
|
286
|
+
api_keys: /* @__PURE__ */ new Set([
|
|
259
287
|
"id",
|
|
260
288
|
"hash",
|
|
261
289
|
"name",
|
|
@@ -278,4 +306,4 @@ const isStringField = (field) => stringFields.has(field);
|
|
|
278
306
|
const isNumberField = (field) => numberFields.has(field);
|
|
279
307
|
const isBooleanField = (field) => booleanFields.has(field);
|
|
280
308
|
//#endregion
|
|
281
|
-
export { isBooleanField, isChannelText, isNumberField, isRecord, isStringField, modelValidators, sortableFields, validateField, validateFields, validateModel };
|
|
309
|
+
export { booleanFields, isBooleanField, isChannelText, isNumberField, isRecord, isStringField, modelValidators, numberFields, sortableFields, stringFields, validateField, validateFields, validateModel };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const require_databasePluginCrudValidationErrors = require("./databasePluginCrudValidationErrors.cjs");
|
|
2
|
+
const require_databaseFields = require("./types/databaseFields.cjs");
|
|
2
3
|
const require_databasePluginCrudValidationFields = require("./databasePluginCrudValidationFields.cjs");
|
|
3
4
|
const require_databasePluginCrudValidationRows = require("./databasePluginCrudValidationRows.cjs");
|
|
4
5
|
//#region src/databasePluginCrudValidationMutations.ts
|
|
@@ -6,10 +7,27 @@ const validateMutationWhere = (where) => {
|
|
|
6
7
|
if (where.length === 0) throw new require_databasePluginCrudValidationErrors.DatabasePluginInputError("empty-mutation-where");
|
|
7
8
|
};
|
|
8
9
|
const validateUpdateWhere = (model, where) => {
|
|
10
|
+
if (model === "bundle_installations") {
|
|
11
|
+
const [install, receivedAt, id] = where;
|
|
12
|
+
const exactInstall = require_databasePluginCrudValidationFields.isRecord(install) && install.field === "install_id" && (install.operator === void 0 || install.operator === "eq") && typeof install.value === "string" && install.connector === void 0 && install.mode === void 0;
|
|
13
|
+
const receivedBefore = require_databasePluginCrudValidationFields.isRecord(receivedAt) && receivedAt.field === "received_at_ms" && (receivedAt.operator === "lt" || receivedAt.operator === "eq") && typeof receivedAt.value === "number" && Number.isSafeInteger(receivedAt.value) && receivedAt.value >= 0 && receivedAt.connector === void 0 && receivedAt.mode === void 0;
|
|
14
|
+
const idBefore = require_databasePluginCrudValidationFields.isRecord(id) && id.field === "id" && id.operator === "lt" && typeof id.value === "string" && id.connector === void 0 && id.mode === void 0;
|
|
15
|
+
if (!exactInstall || !receivedBefore || !(where.length === 2 && receivedAt.operator === "lt" || where.length === 3 && receivedAt.operator === "eq" && idBefore)) throw new require_databasePluginCrudValidationErrors.DatabasePluginInputError("invalid-update-selector");
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
9
18
|
const selector = where[0];
|
|
10
19
|
const primaryField = model === "release_catalogs" ? "scope_key" : "id";
|
|
11
20
|
if (where.length !== 1 || !require_databasePluginCrudValidationFields.isRecord(selector) || selector.field !== primaryField || selector.operator !== void 0 && selector.operator !== "eq" || typeof selector.value !== "string" || selector.connector !== void 0 || selector.mode !== void 0) throw new require_databasePluginCrudValidationErrors.DatabasePluginInputError("invalid-update-selector");
|
|
12
21
|
};
|
|
22
|
+
const validateInsightsInstallationUpdateData = (update) => {
|
|
23
|
+
if (!require_databasePluginCrudValidationFields.isRecord(update)) throw new require_databasePluginCrudValidationErrors.DatabasePluginInputError("invalid-data");
|
|
24
|
+
const fields = require_databaseFields.databaseFields.bundle_installations.filter((field) => field !== "install_id");
|
|
25
|
+
if (Reflect.ownKeys(update).length !== fields.length || fields.some((field) => !Object.hasOwn(update, field))) throw new require_databasePluginCrudValidationErrors.DatabasePluginInputError("invalid-data");
|
|
26
|
+
for (const field of fields) {
|
|
27
|
+
const validator = require_databasePluginCrudValidationFields.modelValidators.bundle_installations[field];
|
|
28
|
+
if (!validator?.(Reflect.get(update, field))) throw new require_databasePluginCrudValidationErrors.DatabasePluginInputError("invalid-data");
|
|
29
|
+
}
|
|
30
|
+
};
|
|
13
31
|
const validateBundleUpdateData = (update) => {
|
|
14
32
|
if (!require_databasePluginCrudValidationFields.isRecord(update)) throw new require_databasePluginCrudValidationErrors.DatabasePluginInputError("invalid-data");
|
|
15
33
|
for (const [field, value] of Object.entries(update)) {
|
|
@@ -22,7 +40,7 @@ const validateBundleUpdateData = (update) => {
|
|
|
22
40
|
const validateApiKeyUpdateData = (update) => {
|
|
23
41
|
if (!require_databasePluginCrudValidationFields.isRecord(update) || Reflect.ownKeys(update).length !== 1 || !Object.hasOwn(update, "revoked_at_ms") || !require_databasePluginCrudValidationFields.modelValidators.api_keys.revoked_at_ms(Reflect.get(update, "revoked_at_ms"))) throw new require_databasePluginCrudValidationErrors.DatabasePluginInputError("invalid-data");
|
|
24
42
|
};
|
|
25
|
-
const RELEASE_MUTABLE_FIELDS = new Set([
|
|
43
|
+
const RELEASE_MUTABLE_FIELDS = /* @__PURE__ */ new Set([
|
|
26
44
|
"revision",
|
|
27
45
|
"scope_key",
|
|
28
46
|
"target_app_version",
|
|
@@ -81,6 +99,7 @@ const validateReleaseTargetUpdate = async (implementation, input) => {
|
|
|
81
99
|
//#endregion
|
|
82
100
|
exports.validateApiKeyUpdateData = validateApiKeyUpdateData;
|
|
83
101
|
exports.validateBundleUpdateData = validateBundleUpdateData;
|
|
102
|
+
exports.validateInsightsInstallationUpdateData = validateInsightsInstallationUpdateData;
|
|
84
103
|
exports.validateMutationWhere = validateMutationWhere;
|
|
85
104
|
exports.validateReleaseCatalogUpdateData = validateReleaseCatalogUpdateData;
|
|
86
105
|
exports.validateReleaseTargetUpdate = validateReleaseTargetUpdate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "./types/internal.cjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "./types/internal.mjs";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DatabasePluginInputError } from "./databasePluginCrudValidationErrors.mjs";
|
|
2
|
+
import { databaseFields } from "./types/databaseFields.mjs";
|
|
2
3
|
import { isRecord, modelValidators, validateField } from "./databasePluginCrudValidationFields.mjs";
|
|
3
4
|
import { validateResult } from "./databasePluginCrudValidationRows.mjs";
|
|
4
5
|
//#region src/databasePluginCrudValidationMutations.ts
|
|
@@ -6,10 +7,27 @@ const validateMutationWhere = (where) => {
|
|
|
6
7
|
if (where.length === 0) throw new DatabasePluginInputError("empty-mutation-where");
|
|
7
8
|
};
|
|
8
9
|
const validateUpdateWhere = (model, where) => {
|
|
10
|
+
if (model === "bundle_installations") {
|
|
11
|
+
const [install, receivedAt, id] = where;
|
|
12
|
+
const exactInstall = isRecord(install) && install.field === "install_id" && (install.operator === void 0 || install.operator === "eq") && typeof install.value === "string" && install.connector === void 0 && install.mode === void 0;
|
|
13
|
+
const receivedBefore = isRecord(receivedAt) && receivedAt.field === "received_at_ms" && (receivedAt.operator === "lt" || receivedAt.operator === "eq") && typeof receivedAt.value === "number" && Number.isSafeInteger(receivedAt.value) && receivedAt.value >= 0 && receivedAt.connector === void 0 && receivedAt.mode === void 0;
|
|
14
|
+
const idBefore = isRecord(id) && id.field === "id" && id.operator === "lt" && typeof id.value === "string" && id.connector === void 0 && id.mode === void 0;
|
|
15
|
+
if (!exactInstall || !receivedBefore || !(where.length === 2 && receivedAt.operator === "lt" || where.length === 3 && receivedAt.operator === "eq" && idBefore)) throw new DatabasePluginInputError("invalid-update-selector");
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
9
18
|
const selector = where[0];
|
|
10
19
|
const primaryField = model === "release_catalogs" ? "scope_key" : "id";
|
|
11
20
|
if (where.length !== 1 || !isRecord(selector) || selector.field !== primaryField || selector.operator !== void 0 && selector.operator !== "eq" || typeof selector.value !== "string" || selector.connector !== void 0 || selector.mode !== void 0) throw new DatabasePluginInputError("invalid-update-selector");
|
|
12
21
|
};
|
|
22
|
+
const validateInsightsInstallationUpdateData = (update) => {
|
|
23
|
+
if (!isRecord(update)) throw new DatabasePluginInputError("invalid-data");
|
|
24
|
+
const fields = databaseFields.bundle_installations.filter((field) => field !== "install_id");
|
|
25
|
+
if (Reflect.ownKeys(update).length !== fields.length || fields.some((field) => !Object.hasOwn(update, field))) throw new DatabasePluginInputError("invalid-data");
|
|
26
|
+
for (const field of fields) {
|
|
27
|
+
const validator = modelValidators.bundle_installations[field];
|
|
28
|
+
if (!validator?.(Reflect.get(update, field))) throw new DatabasePluginInputError("invalid-data");
|
|
29
|
+
}
|
|
30
|
+
};
|
|
13
31
|
const validateBundleUpdateData = (update) => {
|
|
14
32
|
if (!isRecord(update)) throw new DatabasePluginInputError("invalid-data");
|
|
15
33
|
for (const [field, value] of Object.entries(update)) {
|
|
@@ -22,7 +40,7 @@ const validateBundleUpdateData = (update) => {
|
|
|
22
40
|
const validateApiKeyUpdateData = (update) => {
|
|
23
41
|
if (!isRecord(update) || Reflect.ownKeys(update).length !== 1 || !Object.hasOwn(update, "revoked_at_ms") || !modelValidators.api_keys.revoked_at_ms(Reflect.get(update, "revoked_at_ms"))) throw new DatabasePluginInputError("invalid-data");
|
|
24
42
|
};
|
|
25
|
-
const RELEASE_MUTABLE_FIELDS = new Set([
|
|
43
|
+
const RELEASE_MUTABLE_FIELDS = /* @__PURE__ */ new Set([
|
|
26
44
|
"revision",
|
|
27
45
|
"scope_key",
|
|
28
46
|
"target_app_version",
|
|
@@ -79,4 +97,4 @@ const validateReleaseTargetUpdate = async (implementation, input) => {
|
|
|
79
97
|
if (!(strategy === "APP_VERSION" && typeof targetAppVersion === "string" && fingerprintHash === null || strategy === "FINGERPRINT" && targetAppVersion === null && typeof fingerprintHash === "string")) throw new DatabasePluginInputError("invalid-data");
|
|
80
98
|
};
|
|
81
99
|
//#endregion
|
|
82
|
-
export { validateApiKeyUpdateData, validateBundleUpdateData, validateMutationWhere, validateReleaseCatalogUpdateData, validateReleaseTargetUpdate, validateReleaseUpdateData, validateUpdateWhere };
|
|
100
|
+
export { validateApiKeyUpdateData, validateBundleUpdateData, validateInsightsInstallationUpdateData, validateMutationWhere, validateReleaseCatalogUpdateData, validateReleaseTargetUpdate, validateReleaseUpdateData, validateUpdateWhere };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import "./types/internal.cjs";
|
|
2
|
+
import "./databasePluginCrudValidationFields.cjs";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import "./types/internal.mjs";
|
|
2
|
+
import "./databasePluginCrudValidationFields.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "./types/internal.cjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "./types/internal.mjs";
|
package/dist/databaseRows.cjs
CHANGED
package/dist/databaseRows.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BundlePatchRow, BundleRow, ReleaseRow } from "./types/databaseRows.cjs";
|
|
2
|
+
import "./types/index.cjs";
|
|
2
3
|
import { Bundle, Release } from "@hot-updater/core";
|
|
3
|
-
|
|
4
4
|
//#region src/databaseRows.d.ts
|
|
5
5
|
declare const releaseToRow: (release: Release, scopeKey: string) => ReleaseRow;
|
|
6
6
|
declare const releaseRowToRelease: (row: ReleaseRow) => Release;
|
|
@@ -20,11 +20,7 @@ declare class BundleRowHydrationError extends Error {
|
|
|
20
20
|
readonly reason: BundleRowHydrationErrorReason;
|
|
21
21
|
readonly patchId: string;
|
|
22
22
|
readonly bundleId: string;
|
|
23
|
-
constructor({
|
|
24
|
-
reason,
|
|
25
|
-
patchId,
|
|
26
|
-
bundleId
|
|
27
|
-
}: BundleRowHydrationErrorInput);
|
|
23
|
+
constructor({ reason, patchId, bundleId }: BundleRowHydrationErrorInput);
|
|
28
24
|
}
|
|
29
25
|
declare const bundleToRow: (bundle: Bundle) => BundleRow;
|
|
30
26
|
declare const bundleToPatchRows: (bundle: Bundle) => BundlePatchRow[];
|
package/dist/databaseRows.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BundlePatchRow, BundleRow, ReleaseRow } from "./types/databaseRows.mjs";
|
|
2
|
+
import "./types/index.mjs";
|
|
2
3
|
import { Bundle, Release } from "@hot-updater/core";
|
|
3
|
-
|
|
4
4
|
//#region src/databaseRows.d.ts
|
|
5
5
|
declare const releaseToRow: (release: Release, scopeKey: string) => ReleaseRow;
|
|
6
6
|
declare const releaseRowToRelease: (row: ReleaseRow) => Release;
|
|
@@ -20,11 +20,7 @@ declare class BundleRowHydrationError extends Error {
|
|
|
20
20
|
readonly reason: BundleRowHydrationErrorReason;
|
|
21
21
|
readonly patchId: string;
|
|
22
22
|
readonly bundleId: string;
|
|
23
|
-
constructor({
|
|
24
|
-
reason,
|
|
25
|
-
patchId,
|
|
26
|
-
bundleId
|
|
27
|
-
}: BundleRowHydrationErrorInput);
|
|
23
|
+
constructor({ reason, patchId, bundleId }: BundleRowHydrationErrorInput);
|
|
28
24
|
}
|
|
29
25
|
declare const bundleToRow: (bundle: Bundle) => BundleRow;
|
|
30
26
|
declare const bundleToPatchRows: (bundle: Bundle) => BundlePatchRow[];
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
require("./_virtual/_rolldown/runtime.cjs");
|
|
3
2
|
const require_calculatePagination = require("./calculatePagination.cjs");
|
|
4
3
|
const require_bundleStorageLayout = require("./bundleStorageLayout.cjs");
|
|
5
4
|
const require_compressionFormat = require("./compressionFormat.cjs");
|
|
@@ -10,6 +9,7 @@ const require_assetStorageLayout = require("./assetStorageLayout.cjs");
|
|
|
10
9
|
const require_databasePluginCrudValidationErrors = require("./databasePluginCrudValidationErrors.cjs");
|
|
11
10
|
const require_databaseJsonValue = require("./databaseJsonValue.cjs");
|
|
12
11
|
const require_uuidv7 = require("./uuidv7.cjs");
|
|
12
|
+
const require_insightsContract = require("./insightsContract.cjs");
|
|
13
13
|
const require_createDatabasePlugin = require("./createDatabasePlugin.cjs");
|
|
14
14
|
const require_createStoragePlugin = require("./createStoragePlugin.cjs");
|
|
15
15
|
const require_databaseRows = require("./databaseRows.cjs");
|
|
@@ -53,6 +53,7 @@ exports.calculatePagination = require_calculatePagination.calculatePagination;
|
|
|
53
53
|
exports.canonicalizeAppVersion = require_releaseCatalogCompiler.canonicalizeAppVersion;
|
|
54
54
|
exports.commitReleaseCatalogMutation = require_releaseCatalogMutation.commitReleaseCatalogMutation;
|
|
55
55
|
exports.commitReleaseCatalogMutations = require_releaseCatalogMutation.commitReleaseCatalogMutations;
|
|
56
|
+
exports.compareInsightsText = require_insightsContract.compareInsightsText;
|
|
56
57
|
exports.compileReleaseCatalog = require_releaseCatalogCompiler.compileReleaseCatalog;
|
|
57
58
|
exports.createBundleSigningHandler = require_remoteBundleSigning.createBundleSigningHandler;
|
|
58
59
|
exports.createBundleStorageKey = require_bundleStorageLayout.createBundleStorageKey;
|
|
@@ -82,6 +83,7 @@ exports.getManifestAssetStoragePath = require_assetStorageLayout.getManifestAsse
|
|
|
82
83
|
exports.isBrotliManifestAssetPath = require_assetStorageLayout.isBrotliManifestAssetPath;
|
|
83
84
|
exports.isContentAddressedAssetFileHash = require_contentAddressedAssets.isContentAddressedAssetFileHash;
|
|
84
85
|
exports.isDatabaseMetadataObject = require_databaseJsonValue.isDatabaseMetadataObject;
|
|
86
|
+
exports.isInsightsMovementEvent = require_insightsContract.isInsightsMovementEvent;
|
|
85
87
|
Object.defineProperty(exports, "isUUIDv7", {
|
|
86
88
|
enumerable: true,
|
|
87
89
|
get: function() {
|
|
@@ -112,4 +114,5 @@ exports.rowsToBundles = require_databaseRows.rowsToBundles;
|
|
|
112
114
|
exports.semverSatisfies = require_semverSatisfies.semverSatisfies;
|
|
113
115
|
exports.sortBundles = require_queryBundles.sortBundles;
|
|
114
116
|
exports.supportedIosPlatforms = require_index.supportedIosPlatforms;
|
|
117
|
+
exports.toInsightsInstallationRow = require_insightsContract.toInsightsInstallationRow;
|
|
115
118
|
exports.updateReleasePolicy = require_releaseManagement.updateReleasePolicy;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.cjs";
|
|
2
|
-
import {
|
|
1
|
+
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, InsightsInstallationRow, 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, InsightsCountInstallationsInput, InsightsEventCursor, InsightsEventFilter, InsightsFindInstallationsInput, InsightsListEventsInput, InsightsModel, InsightsRecordInput, InsightsScope, 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";
|
|
@@ -18,6 +18,7 @@ import { isDatabaseMetadataObject } from "./databaseJsonValue.cjs";
|
|
|
18
18
|
import { BundleRowHydrationError, BundleRowHydrationErrorReason, bundleToPatchRows, bundleToRow, releaseRowToRelease, releaseToRow, rowToBundle, rowsToBundles } from "./databaseRows.cjs";
|
|
19
19
|
import { filterCompatibleAppVersions } from "./filterCompatibleAppVersions.cjs";
|
|
20
20
|
import { generateMinBundleId } from "./generateMinBundleId.cjs";
|
|
21
|
+
import { compareInsightsText, isInsightsMovementEvent, toInsightsInstallationRow } from "./insightsContract.cjs";
|
|
21
22
|
import { CreateStorageUriInput, ParsedStorageUri, createStorageUri, parseStorageUri } from "./parseStorageUri.cjs";
|
|
22
23
|
import { paginateBundles } from "./paginateBundles.cjs";
|
|
23
24
|
import { bundleIdMatchesFilter, bundleMatchesQueryWhere, sortBundles } from "./queryBundles.cjs";
|
|
@@ -29,4 +30,4 @@ import { BundleSigningHandlerOptions, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BU
|
|
|
29
30
|
import { semverSatisfies } from "./semverSatisfies.cjs";
|
|
30
31
|
import { createStorageDownloadPath, createStorageDownloadUrl, parseStorageDownloadPath } from "./storageDownloadPath.cjs";
|
|
31
32
|
import { createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, isUUIDv7 } from "./uuidv7.cjs";
|
|
32
|
-
export {
|
|
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, 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 InsightsCountInstallationsInput, type InsightsEventCursor, type InsightsEventFilter, type InsightsFindInstallationsInput, type InsightsInstallationRow, type InsightsListEventsInput, type InsightsModel, type InsightsRecordInput, 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, 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, toInsightsInstallationRow, updateReleasePolicy };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, ReleaseCatalogRow, ReleaseRow } from "./types/databaseRows.mjs";
|
|
2
|
-
import {
|
|
1
|
+
import { ApiKeyRow, BundleEventRow, BundleEventRowBase, BundlePatchRow, BundleRow, ChannelRow, DatabaseBundleMetadata, DatabaseJsonObject, DatabaseJsonValue, InsightsInstallationRow, 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, InsightsCountInstallationsInput, InsightsEventCursor, InsightsEventFilter, InsightsFindInstallationsInput, InsightsListEventsInput, InsightsModel, InsightsRecordInput, InsightsScope, 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";
|
|
@@ -18,6 +18,7 @@ import { isDatabaseMetadataObject } from "./databaseJsonValue.mjs";
|
|
|
18
18
|
import { BundleRowHydrationError, BundleRowHydrationErrorReason, bundleToPatchRows, bundleToRow, releaseRowToRelease, releaseToRow, rowToBundle, rowsToBundles } from "./databaseRows.mjs";
|
|
19
19
|
import { filterCompatibleAppVersions } from "./filterCompatibleAppVersions.mjs";
|
|
20
20
|
import { generateMinBundleId } from "./generateMinBundleId.mjs";
|
|
21
|
+
import { compareInsightsText, isInsightsMovementEvent, toInsightsInstallationRow } from "./insightsContract.mjs";
|
|
21
22
|
import { CreateStorageUriInput, ParsedStorageUri, createStorageUri, parseStorageUri } from "./parseStorageUri.mjs";
|
|
22
23
|
import { paginateBundles } from "./paginateBundles.mjs";
|
|
23
24
|
import { bundleIdMatchesFilter, bundleMatchesQueryWhere, sortBundles } from "./queryBundles.mjs";
|
|
@@ -29,4 +30,4 @@ import { BundleSigningHandlerOptions, REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BU
|
|
|
29
30
|
import { semverSatisfies } from "./semverSatisfies.mjs";
|
|
30
31
|
import { createStorageDownloadPath, createStorageDownloadUrl, parseStorageDownloadPath } from "./storageDownloadPath.mjs";
|
|
31
32
|
import { createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, isUUIDv7 } from "./uuidv7.mjs";
|
|
32
|
-
export {
|
|
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, 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 InsightsCountInstallationsInput, type InsightsEventCursor, type InsightsEventFilter, type InsightsFindInstallationsInput, type InsightsInstallationRow, type InsightsListEventsInput, type InsightsModel, type InsightsRecordInput, 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, 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, toInsightsInstallationRow, updateReleasePolicy };
|
package/dist/index.mjs
CHANGED
|
@@ -8,6 +8,7 @@ import { createStorageUriWithRelativePath, getManifestAssetDownloadPath, getMani
|
|
|
8
8
|
import { DatabasePluginInputError } from "./databasePluginCrudValidationErrors.mjs";
|
|
9
9
|
import { isDatabaseMetadataObject } from "./databaseJsonValue.mjs";
|
|
10
10
|
import { createUUIDv7, createUUIDv7After, createUUIDv7WithSameTimestamp, extractTimestampFromUUIDv7, isUUIDv7 } from "./uuidv7.mjs";
|
|
11
|
+
import { compareInsightsText, isInsightsMovementEvent, toInsightsInstallationRow } from "./insightsContract.mjs";
|
|
11
12
|
import { DatabaseAtomicCommitUnsupportedError, createDatabasePlugin } from "./createDatabasePlugin.mjs";
|
|
12
13
|
import { assertStorageOperations, createStoragePlugin } from "./createStoragePlugin.mjs";
|
|
13
14
|
import { BundleRowHydrationError, BundleRowHydrationErrorReason, bundleToPatchRows, bundleToRow, releaseRowToRelease, releaseToRow, rowToBundle, rowsToBundles } from "./databaseRows.mjs";
|
|
@@ -25,4 +26,4 @@ import { ReleaseManagementError, deleteRelease, preflightReleasePolicy, promoteR
|
|
|
25
26
|
import { REMOTE_BUNDLE_SIGNING_ALGORITHM, REMOTE_BUNDLE_SIGNING_PATH, REMOTE_BUNDLE_SIGNING_PROTOCOL_VERSION, REMOTE_BUNDLE_SIGNING_TOKEN_HEADER, createBundleSigningHandler, remoteSigning } from "./remoteBundleSigning.mjs";
|
|
26
27
|
import { createStorageDownloadPath, createStorageDownloadUrl, parseStorageDownloadPath } from "./storageDownloadPath.mjs";
|
|
27
28
|
import { supportedIosPlatforms } from "./types/index.mjs";
|
|
28
|
-
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, 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 };
|
|
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, 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, toInsightsInstallationRow, updateReleasePolicy };
|