@hot-updater/cloudflare 0.35.12 → 0.36.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 +39 -19
- package/worker/dist/index.js.map +2 -2
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.36.0",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"cloudflare": "4.2.0",
|
|
62
62
|
"hono": "4.12.9",
|
|
63
63
|
"uuidv7": "^1.0.2",
|
|
64
|
-
"@hot-updater/
|
|
65
|
-
"@hot-updater/
|
|
66
|
-
"@hot-updater/
|
|
67
|
-
"@hot-updater/core": "0.
|
|
68
|
-
"@hot-updater/
|
|
64
|
+
"@hot-updater/cli-tools": "0.36.0",
|
|
65
|
+
"@hot-updater/core": "0.36.0",
|
|
66
|
+
"@hot-updater/js": "0.36.0",
|
|
67
|
+
"@hot-updater/plugin-core": "0.36.0",
|
|
68
|
+
"@hot-updater/server": "0.36.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@cloudflare/vitest-pool-workers": "0.13.0",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"vitest": "4.1.4",
|
|
83
83
|
"wrangler": "^4.5.0",
|
|
84
84
|
"xdg-app-paths": "^8.3.0",
|
|
85
|
-
"@hot-updater/test-utils": "0.
|
|
85
|
+
"@hot-updater/test-utils": "0.36.0"
|
|
86
86
|
},
|
|
87
87
|
"scripts": {
|
|
88
88
|
"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-08-
|
|
1
|
+
This folder contains the built output assets for the worker "hot-updater" generated at 2026-08-13T07:56:54.999Z.
|
package/worker/dist/index.js
CHANGED
|
@@ -929,7 +929,7 @@ var process_default = _process;
|
|
|
929
929
|
globalThis.process = process_default;
|
|
930
930
|
|
|
931
931
|
// ../../packages/server/dist/package.mjs
|
|
932
|
-
var version2 = "0.
|
|
932
|
+
var version2 = "0.36.0";
|
|
933
933
|
|
|
934
934
|
// ../../packages/server/dist/version.mjs
|
|
935
935
|
var HOT_UPDATER_SERVER_VERSION = version2;
|
|
@@ -1852,6 +1852,8 @@ var getContentAddressedAssetStoragePath = /* @__PURE__ */ __name(({ assetPath, f
|
|
|
1852
1852
|
var getLegacyManifestAssetStoragePath = /* @__PURE__ */ __name(({ assetPath }) => assetPath, "getLegacyManifestAssetStoragePath");
|
|
1853
1853
|
|
|
1854
1854
|
// ../plugin-core/dist/assetStorageLayout.mjs
|
|
1855
|
+
var isBrotliManifestAssetPath = /* @__PURE__ */ __name((assetPath) => /(^|\/)index\.[^/]+\.bundle$/.test(assetPath.replace(/\\/g, "/")), "isBrotliManifestAssetPath");
|
|
1856
|
+
var getManifestAssetDownloadPath = /* @__PURE__ */ __name((assetPath) => isBrotliManifestAssetPath(assetPath) ? `${assetPath}.br` : assetPath, "getManifestAssetDownloadPath");
|
|
1855
1857
|
var createStorageUriWithRelativePath = /* @__PURE__ */ __name(({ baseStorageUri, relativePath }) => {
|
|
1856
1858
|
const storageUrl = new URL(baseStorageUri);
|
|
1857
1859
|
storageUrl.pathname = `${storageUrl.pathname.replace(/\/+$/, "")}/${relativePath.replace(/\\/g, "/").split("/").filter(Boolean).map((segment) => encodeURIComponent(segment)).join("/")}`;
|
|
@@ -4147,21 +4149,39 @@ var createProfiledStoragePlugin = /* @__PURE__ */ __name(({ createProfiles, name
|
|
|
4147
4149
|
return runtime;
|
|
4148
4150
|
}, "requireRuntimeProfile");
|
|
4149
4151
|
const profiles = {};
|
|
4150
|
-
if (profileShape?.node)
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4152
|
+
if (profileShape?.node) {
|
|
4153
|
+
const nodeProfile = {
|
|
4154
|
+
async delete(storageUri) {
|
|
4155
|
+
return requireNodeProfile().delete(storageUri);
|
|
4156
|
+
},
|
|
4157
|
+
async downloadFile(storageUri, filePath) {
|
|
4158
|
+
return requireNodeProfile().downloadFile(storageUri, filePath);
|
|
4159
|
+
},
|
|
4160
|
+
async exists(storageUri) {
|
|
4161
|
+
return requireNodeProfile().exists(storageUri);
|
|
4162
|
+
},
|
|
4163
|
+
async upload(key, filePath) {
|
|
4164
|
+
return requireNodeProfile().upload(key, filePath);
|
|
4165
|
+
}
|
|
4166
|
+
};
|
|
4167
|
+
Object.defineProperties(nodeProfile, {
|
|
4168
|
+
deleteObjects: {
|
|
4169
|
+
enumerable: true,
|
|
4170
|
+
get: /* @__PURE__ */ __name(() => {
|
|
4171
|
+
const deleteObjects = requireNodeProfile().deleteObjects;
|
|
4172
|
+
return deleteObjects ? (keys) => deleteObjects(keys) : void 0;
|
|
4173
|
+
}, "get")
|
|
4174
|
+
},
|
|
4175
|
+
listObjects: {
|
|
4176
|
+
enumerable: true,
|
|
4177
|
+
get: /* @__PURE__ */ __name(() => {
|
|
4178
|
+
const listObjects = requireNodeProfile().listObjects;
|
|
4179
|
+
return listObjects ? (prefix) => listObjects(prefix) : void 0;
|
|
4180
|
+
}, "get")
|
|
4181
|
+
}
|
|
4182
|
+
});
|
|
4183
|
+
profiles.node = nodeProfile;
|
|
4184
|
+
} else if (profileShape?.node !== false) Object.defineProperty(profiles, "node", {
|
|
4165
4185
|
enumerable: true,
|
|
4166
4186
|
get: getNodeProfile
|
|
4167
4187
|
});
|
|
@@ -4207,7 +4227,6 @@ __name(assertRuntimeStoragePlugin, "assertRuntimeStoragePlugin");
|
|
|
4207
4227
|
|
|
4208
4228
|
// ../../packages/server/dist/db/updateArtifacts.mjs
|
|
4209
4229
|
var HBC_ASSET_PATH_RE = /\.bundle$/;
|
|
4210
|
-
var BR_COMPRESSED_ASSET_PATH_RE = /(^|\/)index\.[^/]+\.bundle$/;
|
|
4211
4230
|
var resolveUniqueHbcAssetPath = /* @__PURE__ */ __name((manifest) => {
|
|
4212
4231
|
const candidates = Object.keys(manifest.assets).sort((left, right) => left.localeCompare(right)).filter((candidate) => HBC_ASSET_PATH_RE.test(candidate));
|
|
4213
4232
|
return candidates.length === 1 ? candidates[0] : null;
|
|
@@ -4250,10 +4269,11 @@ async function resolveChangedAssets({ assetBaseStorageUri, currentManifest, curr
|
|
|
4250
4269
|
});
|
|
4251
4270
|
const changedEntries = await Promise.all(Object.entries(targetManifest.assets).map(async ([assetPath, asset]) => {
|
|
4252
4271
|
if (currentManifest?.assets[assetPath]?.fileHash === asset.fileHash) return null;
|
|
4253
|
-
const
|
|
4272
|
+
const downloadPath = getManifestAssetDownloadPath(assetPath);
|
|
4273
|
+
const usesBrotliAsset = downloadPath !== assetPath;
|
|
4254
4274
|
const storageUri = resolveManifestAssetStorageUri({
|
|
4255
4275
|
assetBaseStorageUri,
|
|
4256
|
-
assetPath:
|
|
4276
|
+
assetPath: downloadPath,
|
|
4257
4277
|
fileHash: asset.fileHash
|
|
4258
4278
|
});
|
|
4259
4279
|
const patch = patchDescriptor?.assetPath === assetPath ? patchDescriptor.patch : null;
|