@hot-updater/cloudflare 0.35.12 → 0.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11233,7 +11233,7 @@ const SOURCE_TEMPLATE = `// add this to your App.tsx
11233
11233
  import { HotUpdater } from "@hot-updater/react-native";
11234
11234
 
11235
11235
  function App() {
11236
- return ...
11236
+ return null; // Replace with your app root
11237
11237
  }
11238
11238
 
11239
11239
  export default HotUpdater.wrap({
@@ -11226,7 +11226,7 @@ const SOURCE_TEMPLATE = `// add this to your App.tsx
11226
11226
  import { HotUpdater } from "@hot-updater/react-native";
11227
11227
 
11228
11228
  function App() {
11229
- return ...
11229
+ return null; // Replace with your app root
11230
11230
  }
11231
11231
 
11232
11232
  export default HotUpdater.wrap({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hot-updater/cloudflare",
3
3
  "type": "module",
4
- "version": "0.35.12",
4
+ "version": "0.36.1",
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/js": "0.35.12",
65
- "@hot-updater/plugin-core": "0.35.12",
66
- "@hot-updater/server": "0.35.12",
67
- "@hot-updater/core": "0.35.12",
68
- "@hot-updater/cli-tools": "0.35.12"
64
+ "@hot-updater/js": "0.36.1",
65
+ "@hot-updater/server": "0.36.1",
66
+ "@hot-updater/cli-tools": "0.36.1",
67
+ "@hot-updater/core": "0.36.1",
68
+ "@hot-updater/plugin-core": "0.36.1"
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.35.12"
85
+ "@hot-updater/test-utils": "0.36.1"
86
86
  },
87
87
  "scripts": {
88
88
  "build": "tsdown && pnpm build:worker",
@@ -1 +1 @@
1
- This folder contains the built output assets for the worker "hot-updater" generated at 2026-08-10T23:34:37.330Z.
1
+ This folder contains the built output assets for the worker "hot-updater" generated at 2026-08-20T07:01:43.403Z.
@@ -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.35.12";
932
+ var version2 = "0.36.1";
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) profiles.node = {
4151
- async delete(storageUri) {
4152
- return requireNodeProfile().delete(storageUri);
4153
- },
4154
- async downloadFile(storageUri, filePath) {
4155
- return requireNodeProfile().downloadFile(storageUri, filePath);
4156
- },
4157
- async exists(storageUri) {
4158
- return requireNodeProfile().exists(storageUri);
4159
- },
4160
- async upload(key, filePath) {
4161
- return requireNodeProfile().upload(key, filePath);
4162
- }
4163
- };
4164
- else if (profileShape?.node !== false) Object.defineProperty(profiles, "node", {
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 usesBrotliAsset = BR_COMPRESSED_ASSET_PATH_RE.test(assetPath);
4272
+ const downloadPath = getManifestAssetDownloadPath(assetPath);
4273
+ const usesBrotliAsset = downloadPath !== assetPath;
4254
4274
  const storageUri = resolveManifestAssetStorageUri({
4255
4275
  assetBaseStorageUri,
4256
- assetPath: usesBrotliAsset ? `${assetPath}.br` : assetPath,
4276
+ assetPath: downloadPath,
4257
4277
  fileHash: asset.fileHash
4258
4278
  });
4259
4279
  const patch = patchDescriptor?.assetPath === assetPath ? patchDescriptor.patch : null;