@hot-updater/react-native 0.1.5 → 0.1.6-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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hot-updater/react-native",
3
- "version": "0.1.5",
3
+ "version": "0.1.6-0",
4
4
  "description": "React Native OTA solution for self-hosted",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -72,10 +72,11 @@
72
72
  "del-cli": "^6.0.0",
73
73
  "react": "18.3.1",
74
74
  "react-native": "0.76.2",
75
- "react-native-builder-bob": "^0.33.1"
75
+ "react-native-builder-bob": "^0.33.1",
76
+ "@hot-updater/js": "0.1.6-0"
76
77
  },
77
78
  "dependencies": {
78
- "@hot-updater/utils": "0.1.5"
79
+ "@hot-updater/core": "0.1.6-0"
79
80
  },
80
81
  "scripts": {
81
82
  "build": "tsup src/index.ts --format esm,cjs --dts",
@@ -1,4 +1,4 @@
1
- import type { Bundle, BundleArg } from "@hot-updater/utils";
1
+ import type { Bundle, BundleArg } from "@hot-updater/core";
2
2
 
3
3
  export const ensureBundles = async (bundle: BundleArg) => {
4
4
  try {
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { checkForUpdate } from "@hot-updater/utils";
2
- import { NIL_UUID } from "./const";
1
+ import { NIL_UUID } from "@hot-updater/core";
2
+ import { getUpdateInfo } from "@hot-updater/js";
3
3
  import { ensureBundles } from "./ensureBundles";
4
4
  import { init } from "./init";
5
5
  import {
@@ -29,7 +29,7 @@ export const HotUpdater = {
29
29
 
30
30
  ensureBundles,
31
31
  updateBundle,
32
- checkForUpdate,
32
+ getUpdateInfo,
33
33
  /**
34
34
  * In production environment, this value will be replaced with a uuidv7.
35
35
  */
package/src/init.tsx CHANGED
@@ -1,5 +1,5 @@
1
- import type { BundleArg } from "@hot-updater/utils";
2
- import { checkForUpdate } from "@hot-updater/utils";
1
+ import type { BundleArg } from "@hot-updater/core";
2
+ import { getUpdateInfo } from "@hot-updater/js";
3
3
  import { Platform } from "react-native";
4
4
  import { ensureBundles } from "./ensureBundles";
5
5
  import { HotUpdaterError } from "./error";
@@ -42,7 +42,7 @@ export const init = async (config: HotUpdaterInitConfig) => {
42
42
 
43
43
  const bundles = await ensureBundles(config.source);
44
44
 
45
- const update = await checkForUpdate(bundles, {
45
+ const update = await getUpdateInfo(bundles, {
46
46
  appVersion: currentAppVersion,
47
47
  bundleId: currentBundleId,
48
48
  platform,
@@ -54,7 +54,7 @@ export const init = async (config: HotUpdaterInitConfig) => {
54
54
  }
55
55
 
56
56
  try {
57
- const isSuccess = await updateBundle(update.id, update.file || "");
57
+ const isSuccess = await updateBundle(update.id, update.fileUrl || "");
58
58
  if (isSuccess && update.forceUpdate) {
59
59
  reload();
60
60
 
package/src/native.ts CHANGED
@@ -1,5 +1,5 @@
1
+ import { NIL_UUID } from "@hot-updater/core";
1
2
  import { NativeEventEmitter, NativeModules, Platform } from "react-native";
2
- import { NIL_UUID } from "./const";
3
3
 
4
4
  const LINKING_ERROR =
5
5
  // biome-ignore lint/style/useTemplate: <explanation>
package/src/const.ts DELETED
@@ -1 +0,0 @@
1
- export const NIL_UUID = "00000000-0000-0000-0000-000000000000";