@hot-updater/cloudflare 0.29.7 → 0.30.0
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/package.json +7 -7
- package/worker/dist/README.md +1 -1
- package/worker/dist/index.js +93 -3
- package/worker/dist/index.js.map +4 -4
- package/worker/src/index.ts +1 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/cloudflare",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.30.0",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
"cloudflare": "4.2.0",
|
|
51
51
|
"hono": "4.12.9",
|
|
52
52
|
"uuidv7": "^1.0.2",
|
|
53
|
-
"@hot-updater/
|
|
54
|
-
"@hot-updater/
|
|
55
|
-
"@hot-updater/
|
|
56
|
-
"@hot-updater/
|
|
57
|
-
"@hot-updater/
|
|
53
|
+
"@hot-updater/plugin-core": "0.30.0",
|
|
54
|
+
"@hot-updater/js": "0.30.0",
|
|
55
|
+
"@hot-updater/server": "0.30.0",
|
|
56
|
+
"@hot-updater/core": "0.30.0",
|
|
57
|
+
"@hot-updater/cli-tools": "0.30.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@cloudflare/vitest-pool-workers": "0.13.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"vitest": "4.1.0",
|
|
72
72
|
"wrangler": "^4.5.0",
|
|
73
73
|
"xdg-app-paths": "^8.3.0",
|
|
74
|
-
"@hot-updater/test-utils": "0.
|
|
74
|
+
"@hot-updater/test-utils": "0.30.0"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"build": "tsdown && pnpm build:worker",
|
package/worker/dist/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
This folder contains the built output assets for the worker "hot-updater" generated at 2026-04-
|
|
1
|
+
This folder contains the built output assets for the worker "hot-updater" generated at 2026-04-15T15:17:00.344Z.
|
package/worker/dist/index.js
CHANGED
|
@@ -3228,7 +3228,7 @@ __name(getNumericCohortRolloutPosition, "getNumericCohortRolloutPosition");
|
|
|
3228
3228
|
function isCohortEligibleForUpdate(bundleId, cohort, rolloutCohortCount, targetCohorts) {
|
|
3229
3229
|
const normalizedCohort = cohort === null || cohort === void 0 ? void 0 : normalizeCohortValue(cohort);
|
|
3230
3230
|
const normalizedTargetCohorts = targetCohorts?.map((targetCohort) => normalizeCohortValue(targetCohort)) ?? [];
|
|
3231
|
-
if (
|
|
3231
|
+
if (normalizedCohort !== void 0 && normalizedTargetCohorts.includes(normalizedCohort)) return true;
|
|
3232
3232
|
const normalizedRolloutCount = normalizeRolloutCohortCount(rolloutCohortCount);
|
|
3233
3233
|
if (normalizedRolloutCount <= 0) return false;
|
|
3234
3234
|
if (normalizedCohort === void 0) return normalizedRolloutCount >= NUMERIC_COHORT_SIZE;
|
|
@@ -6490,6 +6490,92 @@ function findRoute(router, method, path) {
|
|
|
6490
6490
|
}
|
|
6491
6491
|
__name(findRoute, "findRoute");
|
|
6492
6492
|
|
|
6493
|
+
// ../../packages/server/src/version.ts
|
|
6494
|
+
init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_process();
|
|
6495
|
+
init_virtual_unenv_global_polyfill_cloudflare_unenv_preset_node_console();
|
|
6496
|
+
init_performance2();
|
|
6497
|
+
|
|
6498
|
+
// ../../packages/server/package.json
|
|
6499
|
+
var package_default = {
|
|
6500
|
+
name: "@hot-updater/server",
|
|
6501
|
+
version: "0.30.0",
|
|
6502
|
+
type: "module",
|
|
6503
|
+
description: "React Native OTA solution for self-hosted",
|
|
6504
|
+
sideEffects: false,
|
|
6505
|
+
main: "./dist/index.cjs",
|
|
6506
|
+
module: "./dist/index.mjs",
|
|
6507
|
+
types: "./dist/index.d.cts",
|
|
6508
|
+
exports: {
|
|
6509
|
+
".": {
|
|
6510
|
+
import: "./dist/index.mjs",
|
|
6511
|
+
require: "./dist/index.cjs"
|
|
6512
|
+
},
|
|
6513
|
+
"./adapters/drizzle": {
|
|
6514
|
+
import: "./dist/adapters/drizzle.mjs",
|
|
6515
|
+
require: "./dist/adapters/drizzle.cjs"
|
|
6516
|
+
},
|
|
6517
|
+
"./adapters/kysely": {
|
|
6518
|
+
import: "./dist/adapters/kysely.mjs",
|
|
6519
|
+
require: "./dist/adapters/kysely.cjs"
|
|
6520
|
+
},
|
|
6521
|
+
"./adapters/mongodb": {
|
|
6522
|
+
import: "./dist/adapters/mongodb.mjs",
|
|
6523
|
+
require: "./dist/adapters/mongodb.cjs"
|
|
6524
|
+
},
|
|
6525
|
+
"./adapters/prisma": {
|
|
6526
|
+
import: "./dist/adapters/prisma.mjs",
|
|
6527
|
+
require: "./dist/adapters/prisma.cjs"
|
|
6528
|
+
},
|
|
6529
|
+
"./node": {
|
|
6530
|
+
import: "./dist/node.mjs",
|
|
6531
|
+
require: "./dist/node.cjs"
|
|
6532
|
+
},
|
|
6533
|
+
"./runtime": {
|
|
6534
|
+
import: "./dist/runtime.mjs",
|
|
6535
|
+
require: "./dist/runtime.cjs"
|
|
6536
|
+
},
|
|
6537
|
+
"./package.json": "./package.json"
|
|
6538
|
+
},
|
|
6539
|
+
files: [
|
|
6540
|
+
"dist",
|
|
6541
|
+
"src",
|
|
6542
|
+
"package.json"
|
|
6543
|
+
],
|
|
6544
|
+
license: "MIT",
|
|
6545
|
+
scripts: {
|
|
6546
|
+
build: "tsdown",
|
|
6547
|
+
"test:type": "tsc --noEmit"
|
|
6548
|
+
},
|
|
6549
|
+
repository: "https://github.com/gronxb/hot-updater",
|
|
6550
|
+
author: "gronxb <gron1gh1@gmail.com> (https://github.com/gronxb)",
|
|
6551
|
+
publishConfig: {
|
|
6552
|
+
access: "public"
|
|
6553
|
+
},
|
|
6554
|
+
dependencies: {
|
|
6555
|
+
"@hot-updater/core": "workspace:*",
|
|
6556
|
+
"@hot-updater/plugin-core": "workspace:*",
|
|
6557
|
+
"@hot-updater/js": "workspace:*",
|
|
6558
|
+
fumadb: "0.2.2",
|
|
6559
|
+
rou3: "0.7.9",
|
|
6560
|
+
semver: "^7.7.2"
|
|
6561
|
+
},
|
|
6562
|
+
devDependencies: {
|
|
6563
|
+
"@electric-sql/pglite": "^0.2.17",
|
|
6564
|
+
"@hot-updater/standalone": "workspace:*",
|
|
6565
|
+
"@hot-updater/test-utils": "workspace:*",
|
|
6566
|
+
"@types/node": "catalog:",
|
|
6567
|
+
"@types/semver": "^7.5.8",
|
|
6568
|
+
execa: "catalog:tools",
|
|
6569
|
+
kysely: "^0.28.9",
|
|
6570
|
+
"kysely-pglite-dialect": "^1.2.0",
|
|
6571
|
+
msw: "^2.7.0",
|
|
6572
|
+
uuidv7: "^1.0.2"
|
|
6573
|
+
}
|
|
6574
|
+
};
|
|
6575
|
+
|
|
6576
|
+
// ../../packages/server/src/version.ts
|
|
6577
|
+
var HOT_UPDATER_SERVER_VERSION = package_default.version;
|
|
6578
|
+
|
|
6493
6579
|
// ../../packages/server/src/handler.ts
|
|
6494
6580
|
var HandlerBadRequestError = class extends Error {
|
|
6495
6581
|
static {
|
|
@@ -6501,7 +6587,7 @@ var HandlerBadRequestError = class extends Error {
|
|
|
6501
6587
|
}
|
|
6502
6588
|
};
|
|
6503
6589
|
var handleVersion = /* @__PURE__ */ __name(async () => {
|
|
6504
|
-
return new Response(JSON.stringify({ version:
|
|
6590
|
+
return new Response(JSON.stringify({ version: HOT_UPDATER_SERVER_VERSION }), {
|
|
6505
6591
|
status: 200,
|
|
6506
6592
|
headers: { "Content-Type": "application/json" }
|
|
6507
6593
|
});
|
|
@@ -6705,8 +6791,12 @@ var routes = {
|
|
|
6705
6791
|
function createHandler(api, options = {}) {
|
|
6706
6792
|
const basePath = options.basePath ?? "/api";
|
|
6707
6793
|
const updateCheckEnabled = options.routes?.updateCheck ?? true;
|
|
6794
|
+
const versionEnabled = options.routes?.version ?? true;
|
|
6708
6795
|
const bundlesEnabled = options.routes?.bundles ?? true;
|
|
6709
6796
|
const router = createRouter();
|
|
6797
|
+
if (versionEnabled) {
|
|
6798
|
+
addRoute(router, "GET", "/version", "version");
|
|
6799
|
+
}
|
|
6710
6800
|
if (updateCheckEnabled) {
|
|
6711
6801
|
addRoute(
|
|
6712
6802
|
router,
|
|
@@ -6734,7 +6824,6 @@ function createHandler(api, options = {}) {
|
|
|
6734
6824
|
);
|
|
6735
6825
|
}
|
|
6736
6826
|
if (bundlesEnabled) {
|
|
6737
|
-
addRoute(router, "GET", "/version", "version");
|
|
6738
6827
|
addRoute(router, "GET", "/api/bundles/channels", "getChannels");
|
|
6739
6828
|
addRoute(router, "GET", "/api/bundles/:id", "getBundle");
|
|
6740
6829
|
addRoute(router, "GET", "/api/bundles", "getBundles");
|
|
@@ -9437,6 +9526,7 @@ var hotUpdater = createHotUpdater({
|
|
|
9437
9526
|
basePath: HOT_UPDATER_BASE_PATH,
|
|
9438
9527
|
routes: {
|
|
9439
9528
|
updateCheck: true,
|
|
9529
|
+
version: true,
|
|
9440
9530
|
bundles: false
|
|
9441
9531
|
}
|
|
9442
9532
|
});
|