@take-out/native-hot-update 0.4.3 → 0.4.4

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.
@@ -4,185 +4,223 @@ var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf,
8
- __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
9
  var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: !0
13
- });
14
- },
15
- __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
18
  get: () => from[key],
18
19
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
20
  });
20
- return to;
21
- };
21
+ }
22
+ return to;
23
+ };
22
24
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
- // If the importer is in node compatibility mode or this is not an ESM
24
- // file that has been converted to a CommonJS file using a Babel-
25
- // compatible transform (i.e. "__esModule" has not been set), then set
26
- // "default" to the CommonJS "module.exports" for node compatibility.
27
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
- value: mod,
29
- enumerable: !0
30
- }) : target, mod)),
31
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: !0
33
- }), mod);
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
+ value: mod,
31
+ enumerable: true
32
+ }) : target, mod));
33
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
34
+ value: true
35
+ }), mod);
34
36
  var createHotUpdater_exports = {};
35
37
  __export(createHotUpdater_exports, {
36
38
  createHotUpdater: () => createHotUpdater
37
39
  });
38
40
  module.exports = __toCommonJS(createHotUpdater_exports);
39
- var import_react_native = require("@hot-updater/react-native"),
40
- Application = __toESM(require("expo-application"), 1),
41
- import_react = require("react"),
42
- import_react_native2 = require("react-native"),
43
- INITIAL_OTA_ID = "00000000-0000-0000-0000-000000000000",
44
- BUNDLE_ID_KEY_PREFIX = "hotUpdater.bundleId",
45
- PRE_RELEASE_BUNDLE_ID_KEY = "hotUpdater.preReleaseBundleId";
41
+ var import_react_native = require("@hot-updater/react-native");
42
+ var Application = __toESM(require("expo-application"), 1);
43
+ var import_react = require("react");
44
+ var import_react_native2 = require("react-native");
45
+ var INITIAL_OTA_ID = "00000000-0000-0000-0000-000000000000";
46
+ var BUNDLE_ID_KEY_PREFIX = "hotUpdater.bundleId";
47
+ var PRE_RELEASE_BUNDLE_ID_KEY = "hotUpdater.preReleaseBundleId";
46
48
  function createHotUpdater(config) {
47
49
  var {
48
- storage,
49
- updateStrategy = "appVersion"
50
- } = config,
51
- isUpdatePending = !1,
52
- getAppliedOta = function () {
53
- var id = import_react_native.HotUpdater.getBundleId();
54
- return id === INITIAL_OTA_ID || id === import_react_native.HotUpdater.getMinBundleId() ? null : id;
55
- },
56
- getShortOtaId = function () {
57
- var fullId = getAppliedOta();
58
- return fullId ? fullId.slice(-12) : null;
59
- },
60
- getIsUpdatePending = function () {
61
- return isUpdatePending;
62
- },
63
- getPreReleaseBundleId = function () {
64
- return storage.get(PRE_RELEASE_BUNDLE_ID_KEY);
65
- },
66
- handleUpdateDownloaded = function (id) {
67
- var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
68
- appVersion = Application.nativeApplicationVersion;
69
- appVersion && storage.set(`${BUNDLE_ID_KEY_PREFIX}.${appVersion}`, id), options.isPreRelease ? storage.set(PRE_RELEASE_BUNDLE_ID_KEY, id) : storage.delete(PRE_RELEASE_BUNDLE_ID_KEY), isUpdatePending = !0;
70
- },
71
- useOtaUpdater = function () {
72
- var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
73
- {
74
- enabled = !0,
75
- onUpdateDownloaded: onUpdateDownloadedCallback,
76
- onError
77
- } = options,
78
- progress = (0, import_react_native.useHotUpdaterStore)(function (state) {
79
- return state.progress;
80
- }),
81
- isUpdating = progress > 0.01,
82
- [isUserClearedForAccess, setIsUserClearedForAccess] = (0, import_react.useState)(!1),
83
- isUserClearedForAccessRef = (0, import_react.useRef)(isUserClearedForAccess);
84
- return isUserClearedForAccessRef.current = isUserClearedForAccess, (0, import_react.useEffect)(function () {
85
- if (!isUpdating) {
86
- var timer = setTimeout(function () {
87
- isUserClearedForAccessRef.current || setIsUserClearedForAccess(!0);
88
- }, 5e3);
89
- return function () {
90
- return clearTimeout(timer);
91
- };
92
- }
93
- }, [isUpdating]), (0, import_react.useEffect)(function () {
50
+ storage,
51
+ updateStrategy = "appVersion"
52
+ } = config;
53
+ var isUpdatePending = false;
54
+ var getAppliedOta = function () {
55
+ var id = import_react_native.HotUpdater.getBundleId();
56
+ if (id === INITIAL_OTA_ID) return null;
57
+ if (id === import_react_native.HotUpdater.getMinBundleId()) return null;
58
+ return id;
59
+ };
60
+ var getShortOtaId = function () {
61
+ var fullId = getAppliedOta();
62
+ return fullId ? fullId.slice(-12) : null;
63
+ };
64
+ var getIsUpdatePending = function () {
65
+ return isUpdatePending;
66
+ };
67
+ var getPreReleaseBundleId = function () {
68
+ return storage.get(PRE_RELEASE_BUNDLE_ID_KEY);
69
+ };
70
+ var handleUpdateDownloaded = function (id) {
71
+ var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
72
+ var appVersion = Application.nativeApplicationVersion;
73
+ if (appVersion) {
74
+ storage.set(`${BUNDLE_ID_KEY_PREFIX}.${appVersion}`, id);
75
+ }
76
+ if (options.isPreRelease) {
77
+ storage.set(PRE_RELEASE_BUNDLE_ID_KEY, id);
78
+ } else {
79
+ storage.delete(PRE_RELEASE_BUNDLE_ID_KEY);
80
+ }
81
+ isUpdatePending = true;
82
+ };
83
+ var useOtaUpdater = function () {
84
+ var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
85
+ var {
86
+ enabled = true,
87
+ onUpdateDownloaded: onUpdateDownloadedCallback,
88
+ onError
89
+ } = options;
90
+ var progress = (0, import_react_native.useHotUpdaterStore)(function (state) {
91
+ return state.progress;
92
+ });
93
+ var isUpdating = progress > 0.01;
94
+ var [isUserClearedForAccess, setIsUserClearedForAccess] = (0, import_react.useState)(false);
95
+ var isUserClearedForAccessRef = (0, import_react.useRef)(isUserClearedForAccess);
96
+ isUserClearedForAccessRef.current = isUserClearedForAccess;
97
+ (0, import_react.useEffect)(function () {
98
+ if (!isUpdating) {
94
99
  var timer = setTimeout(function () {
95
- isUserClearedForAccessRef.current || setIsUserClearedForAccess(!0);
96
- }, 2e4);
100
+ if (!isUserClearedForAccessRef.current) {
101
+ setIsUserClearedForAccess(true);
102
+ }
103
+ }, 5e3);
97
104
  return function () {
98
105
  return clearTimeout(timer);
99
106
  };
100
- }, []), (0, import_react.useEffect)(function () {
101
- var shouldContinue = !0;
102
- return async function () {
103
- try {
104
- if (!enabled) {
105
- setIsUserClearedForAccess(!0);
107
+ }
108
+ return void 0;
109
+ }, [isUpdating]);
110
+ (0, import_react.useEffect)(function () {
111
+ var timer = setTimeout(function () {
112
+ if (!isUserClearedForAccessRef.current) {
113
+ setIsUserClearedForAccess(true);
114
+ }
115
+ }, 2e4);
116
+ return function () {
117
+ return clearTimeout(timer);
118
+ };
119
+ }, []);
120
+ (0, import_react.useEffect)(function () {
121
+ var shouldContinue = true;
122
+ (async function () {
123
+ try {
124
+ if (!enabled) {
125
+ setIsUserClearedForAccess(true);
126
+ return;
127
+ }
128
+ if (!shouldContinue) return;
129
+ var updateInfo = await import_react_native.HotUpdater.checkForUpdate({
130
+ updateStrategy
131
+ });
132
+ if (!updateInfo) {
133
+ setIsUserClearedForAccess(true);
134
+ return;
135
+ }
136
+ if (!shouldContinue) return;
137
+ if (updateInfo.status === "ROLLBACK") {
138
+ var preReleaseBundleId = getPreReleaseBundleId();
139
+ var currentBundleId = import_react_native.HotUpdater.getBundleId();
140
+ if (preReleaseBundleId && preReleaseBundleId === currentBundleId && currentBundleId > updateInfo.id) {
141
+ import_react_native2.Alert.alert("Update Skipped", "Skipped rollback because you are using a newer pre-release bundle.");
142
+ setIsUserClearedForAccess(true);
106
143
  return;
107
144
  }
108
- if (!shouldContinue) return;
109
- var updateInfo = await import_react_native.HotUpdater.checkForUpdate({
110
- updateStrategy
111
- });
112
- if (!updateInfo) {
113
- setIsUserClearedForAccess(!0);
145
+ }
146
+ if (!updateInfo.shouldForceUpdate) {
147
+ setIsUserClearedForAccess(true);
148
+ }
149
+ if (!shouldContinue) return;
150
+ await updateInfo.updateBundle();
151
+ handleUpdateDownloaded(updateInfo.id);
152
+ var info = {
153
+ id: updateInfo.id,
154
+ isCriticalUpdate: updateInfo.shouldForceUpdate,
155
+ fileUrl: updateInfo.fileUrl,
156
+ message: updateInfo.message
157
+ };
158
+ onUpdateDownloadedCallback === null || onUpdateDownloadedCallback === void 0 ? void 0 : onUpdateDownloadedCallback(info);
159
+ if (!shouldContinue) return;
160
+ if (updateInfo.shouldForceUpdate) {
161
+ if (!isUserClearedForAccessRef.current) {
162
+ import_react_native.HotUpdater.reload();
114
163
  return;
115
164
  }
116
- if (!shouldContinue) return;
117
- if (updateInfo.status === "ROLLBACK") {
118
- var preReleaseBundleId = getPreReleaseBundleId(),
119
- currentBundleId = import_react_native.HotUpdater.getBundleId();
120
- if (preReleaseBundleId && preReleaseBundleId === currentBundleId && currentBundleId > updateInfo.id) {
121
- import_react_native2.Alert.alert("Update Skipped", "Skipped rollback because you are using a newer pre-release bundle."), setIsUserClearedForAccess(!0);
122
- return;
123
- }
124
- }
125
- if (updateInfo.shouldForceUpdate || setIsUserClearedForAccess(!0), !shouldContinue) return;
126
- await updateInfo.updateBundle(), handleUpdateDownloaded(updateInfo.id);
127
- var info = {
128
- id: updateInfo.id,
129
- isCriticalUpdate: updateInfo.shouldForceUpdate,
130
- fileUrl: updateInfo.fileUrl,
131
- message: updateInfo.message
132
- };
133
- if (onUpdateDownloadedCallback?.(info), !shouldContinue) return;
134
- if (updateInfo.shouldForceUpdate) {
135
- if (!isUserClearedForAccessRef.current) {
136
- import_react_native.HotUpdater.reload();
137
- return;
165
+ import_react_native2.Alert.alert("Update Downloaded", "An important update has been downloaded. Reload now to apply it?", [{
166
+ text: "Later",
167
+ style: "cancel"
168
+ }, {
169
+ text: "Reload Now",
170
+ onPress: function () {
171
+ return import_react_native.HotUpdater.reload();
138
172
  }
139
- import_react_native2.Alert.alert("Update Downloaded", "An important update has been downloaded. Reload now to apply it?", [{
140
- text: "Later",
141
- style: "cancel"
142
- }, {
143
- text: "Reload Now",
144
- onPress: function () {
145
- return import_react_native.HotUpdater.reload();
146
- }
147
- }]);
148
- }
149
- } catch (error) {
150
- onError?.(error), setIsUserClearedForAccess(!0);
151
- } finally {
152
- isUserClearedForAccessRef.current || setIsUserClearedForAccess(!0);
173
+ }]);
153
174
  }
154
- }(), function () {
155
- shouldContinue = !1;
156
- };
157
- }, [enabled, onUpdateDownloadedCallback, onError]), {
158
- userClearedForAccess: isUserClearedForAccess,
159
- progress,
160
- isUpdatePending: getIsUpdatePending()
175
+ } catch (error) {
176
+ onError === null || onError === void 0 ? void 0 : onError(error);
177
+ setIsUserClearedForAccess(true);
178
+ } finally {
179
+ if (!isUserClearedForAccessRef.current) {
180
+ setIsUserClearedForAccess(true);
181
+ }
182
+ }
183
+ })();
184
+ return function () {
185
+ shouldContinue = false;
161
186
  };
162
- },
163
- checkForUpdate = async function () {
164
- var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
165
- {
166
- channel,
167
- isPreRelease = !1
168
- } = options,
169
- requestHeaders = {};
170
- channel && (requestHeaders["X-Channel"] = channel);
171
- var updateInfo = await import_react_native.HotUpdater.checkForUpdate({
172
- updateStrategy,
173
- ...(Object.keys(requestHeaders).length > 0 && {
174
- requestHeaders
175
- })
176
- });
177
- return updateInfo ? (await updateInfo.updateBundle(), handleUpdateDownloaded(updateInfo.id, {
187
+ }, [enabled, onUpdateDownloadedCallback, onError]);
188
+ return {
189
+ userClearedForAccess: isUserClearedForAccess,
190
+ progress,
191
+ isUpdatePending: getIsUpdatePending()
192
+ };
193
+ };
194
+ var checkForUpdate = async function () {
195
+ var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
196
+ var {
197
+ channel,
198
+ isPreRelease = false
199
+ } = options;
200
+ var requestHeaders = {};
201
+ if (channel) {
202
+ requestHeaders["X-Channel"] = channel;
203
+ }
204
+ var updateInfo = await import_react_native.HotUpdater.checkForUpdate({
205
+ updateStrategy,
206
+ ...(Object.keys(requestHeaders).length > 0 && {
207
+ requestHeaders
208
+ })
209
+ });
210
+ if (updateInfo) {
211
+ await updateInfo.updateBundle();
212
+ handleUpdateDownloaded(updateInfo.id, {
178
213
  isPreRelease
179
- }), {
214
+ });
215
+ return {
180
216
  id: updateInfo.id,
181
217
  isCriticalUpdate: updateInfo.shouldForceUpdate,
182
218
  fileUrl: updateInfo.fileUrl,
183
219
  message: updateInfo.message
184
- }) : null;
185
- };
220
+ };
221
+ }
222
+ return null;
223
+ };
186
224
  return {
187
225
  useOtaUpdater,
188
226
  checkForUpdate,
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createHotUpdater_exports","__export","createHotUpdater","module","exports","import_react_native","require","Application","__toESM","import_react","import_react_native2","INITIAL_OTA_ID","BUNDLE_ID_KEY_PREFIX","PRE_RELEASE_BUNDLE_ID_KEY","config","storage","updateStrategy","isUpdatePending","getAppliedOta","id","HotUpdater","getBundleId","getMinBundleId","getShortOtaId","fullId","slice","getIsUpdatePending","getPreReleaseBundleId","get","handleUpdateDownloaded","options","arguments","length","appVersion","nativeApplicationVersion","set","isPreRelease","delete","useOtaUpdater","enabled","onUpdateDownloaded","onUpdateDownloadedCallback","onError","progress","useHotUpdaterStore","state","isUpdating","isUserClearedForAccess","setIsUserClearedForAccess","useState","isUserClearedForAccessRef","useRef","current","useEffect","timer","setTimeout","clearTimeout","shouldContinue","updateInfo","checkForUpdate","status","preReleaseBundleId","currentBundleId","Alert","alert","shouldForceUpdate","updateBundle","info","isCriticalUpdate","fileUrl","message","reload","text","style","onPress","error","userClearedForAccess","channel","requestHeaders","Object","keys"],"sources":["../../src/createHotUpdater.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,wBAAA;AAAAC,QAAA,CAAAD,wBAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA+C,CAAAK,wBAAA;AAO/C,IAAAK,mBAAuB,GAAAC,OAAA;EACjBC,WAAA,GAAAC,OAAA,CAAuBF,OAAA,mBACvB;EAAAG,YAAA,GAAAH,OAA4B;EAAAI,oBAAA,GAAAJ,OAAA;EAAAK,cAAA;EAAAC,oBAAA;EAAAC,yBAAA;AAM3B,SAASX,iBAAiBY,MAAA,EAA8C;EAC7E;MAAMC,OAAE;MAAAC,cAAS;IAAiB,IAAaF,MAAI;IAAAG,eAAA;IAAAC,aAAA,YAAAA,CAAA;MAEnD,IAA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AApB,UAAc,UAAAA,UAAA,CAAAQ,YAAW,EAAO,EAAArC,sBAAA,CAAA6B,UAAA,CAAAvC,EAAA;QAChCiB;MACA;QACAjB,EAAA,EAAAuC,UAAY,CAAAvC,EAAM;QAClBiD,gBAAA,EAAmBV,UAAM,CAAAO,iBAAA;QACzBI,OAAA,EAAAX,UAAiB,CAAAW,OAAM;QACzBC,OAAA,EAAAZ,UAAA,CAAAY;MACF","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createHotUpdater_exports","__export","createHotUpdater","module","exports","import_react_native","require","Application","__toESM","import_react","import_react_native2","INITIAL_OTA_ID","BUNDLE_ID_KEY_PREFIX","PRE_RELEASE_BUNDLE_ID_KEY","config","storage","updateStrategy","isUpdatePending","getAppliedOta","id","HotUpdater","getBundleId","getMinBundleId","getShortOtaId","fullId","slice","getIsUpdatePending","getPreReleaseBundleId","get","handleUpdateDownloaded","options","arguments","length","appVersion","nativeApplicationVersion","set","isPreRelease","delete","useOtaUpdater","enabled","onUpdateDownloaded","onUpdateDownloadedCallback","onError","progress","useHotUpdaterStore","state","isUpdating","isUserClearedForAccess","setIsUserClearedForAccess","useState","isUserClearedForAccessRef","useRef","current","useEffect","timer","setTimeout","clearTimeout","shouldContinue","updateInfo","checkForUpdate","status","preReleaseBundleId","currentBundleId","Alert","alert","shouldForceUpdate","updateBundle","info","isCriticalUpdate","fileUrl","message","reload","text","style","onPress","error","userClearedForAccess","channel","requestHeaders","Object","keys"],"sources":["../../src/createHotUpdater.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,wBAAA;AAAAC,QAAA,CAAAD,wBAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAA+C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M,QAAAA,OAAA,uBAAAA,OAAA,CAAAiC,KAAA;UACX3B,yBAAiB;QACnB;UACE,KAAAE,yBAAS,CAAAE,OAA4B;YAElCJ,yBAAA;UACL;QACA;MACA;MACF;QACFS,cAAA;MAKA;IAGE,IAEAlB,OAAM,EACNE,0BAAa,EACXC,OAAA,CACF;IAEA,OAAM;MACJkC,oBAAA,EAAA7B,sBAAA;MACAJ,QAAI;MACL1B,eAAA,EAAAS,kBAAA;IAED;EACE;EACA,IAAAiC,cAAA,kBAAAA,CAAA,EAAkC;IAElC,IAAA7B,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,iBAAAA,SAAA;IAAA,IACL;MAAA8C,OAAI;MAAAzC,YAAW;IAAA,IAAAN,OAAA;IAAA,IACfgD,cAAA,IAAkB;IAAW,IAC7BD,OAAA,EAAS;MAAWC,cACX,YAAW,IAAAD,OAAA;IAAA;IAExB,IAAAnB,UAAA,SAAArD,mBAAA,CAAAe,UAAA,CAAAuC,cAAA;MAEA3C,cAAO;MACT,IAAA+D,MAAA,CAAAC,IAAA,CAAAF,cAAA,EAAA9C,MAAA;QAEA8C;MACE;IACA;IACA,IAAApB,UAAA;MACA,MAAAA,UAAA,CAAAQ,YAAA;MACArC,sBAAA,CAAA6B,UAAA,CAAAvC,EAAA;QACAiB;MACA;MACA;QACAjB,EAAA,EAAAuC,UAAkB,CAAAvC,EAAA;QAClBiD,gBAAmB,EAAAV,UAAM,CAAAO,iBAAA;QACzBI,OAAA,EAAAX,UAAuB,CAAAW,OAAA;QACzBC,OAAA,EAAAZ,UAAA,CAAAY;MACF","ignoreList":[]}
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var helpers_exports = {};
22
24
  __export(helpers_exports, {
@@ -28,7 +30,9 @@ var import_react_native = require("@hot-updater/react-native");
28
30
  const INITIAL_OTA_ID = "00000000-0000-0000-0000-000000000000";
29
31
  function getAppliedOta() {
30
32
  const id = import_react_native.HotUpdater.getBundleId();
31
- return id === INITIAL_OTA_ID || id === import_react_native.HotUpdater.getMinBundleId() ? null : id;
33
+ if (id === INITIAL_OTA_ID) return null;
34
+ if (id === import_react_native.HotUpdater.getMinBundleId()) return null;
35
+ return id;
32
36
  }
33
37
  function getShortOtaId() {
34
38
  const fullId = getAppliedOta();
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var helpers_exports = {};
24
26
  __export(helpers_exports, {
@@ -26,11 +28,13 @@ __export(helpers_exports, {
26
28
  getShortOtaId: () => getShortOtaId
27
29
  });
28
30
  module.exports = __toCommonJS(helpers_exports);
29
- var import_react_native = require("@hot-updater/react-native"),
30
- INITIAL_OTA_ID = "00000000-0000-0000-0000-000000000000";
31
+ var import_react_native = require("@hot-updater/react-native");
32
+ var INITIAL_OTA_ID = "00000000-0000-0000-0000-000000000000";
31
33
  function getAppliedOta() {
32
34
  var id = import_react_native.HotUpdater.getBundleId();
33
- return id === INITIAL_OTA_ID || id === import_react_native.HotUpdater.getMinBundleId() ? null : id;
35
+ if (id === INITIAL_OTA_ID) return null;
36
+ if (id === import_react_native.HotUpdater.getMinBundleId()) return null;
37
+ return id;
34
38
  }
35
39
  function getShortOtaId() {
36
40
  var fullId = getAppliedOta();
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","helpers_exports","__export","getAppliedOta","getShortOtaId","module","exports","import_react_native","require","INITIAL_OTA_ID","id","HotUpdater","getBundleId","getMinBundleId","fullId","slice"],"sources":["../../src/helpers.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAV,YAA2B,CAAAK,eAAA;AAE3B,IAAAM,mBAAuB,GAAAC,OAAA;EAAAC,cAAA;AAMhB,SAASN,cAAA,EAA+B;EAC7C,IAAAO,EAAM,GAAAH,mBAAK,CAAAI,UAAA,CAAAC,WAAW;EAEtB,OADIF,EAAA,KAAOD,cAAA,IACPC,EAAA,KAAOH,mBAAA,CAAAI,UAAA,CAAWE,cAAA,CAAe,IAAU,OACxCH,EAAA;AACT;AAMO,SAASN,cAAA,EAA+B;EAC7C,IAAAU,MAAM,GAAAX,aAAS;EACf,OAAOW,MAAA,GAASA,MAAA,CAAOC,KAAA,CAAM,GAAG,IAAI;AACtC","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","helpers_exports","__export","getAppliedOta","getShortOtaId","module","exports","import_react_native","require","INITIAL_OTA_ID","id","HotUpdater","getBundleId","getMinBundleId","fullId","slice"],"sources":["../../src/helpers.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,eAAA;AAAAC,QAAA,CAAAD,eAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAA,aAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAV,YAA2B,CAAAK,eAAA;AAE3B,IAAAM,mBAAuB,GAAAC,OAAA;AAMhB,IAAAC,cAAS,yCAA+B;AAC7C,SAAMN,aAAKA,CAAA;EACX,IAAIO,EAAA,GAAAH,mBAAuB,CAAAI,UAAO,CAAAC,WAAA;EAClC,IAAIF,EAAA,KAAOD,cAAA;EACX,IAAAC,EAAA,KAAOH,mBAAA,CAAAI,UAAA,CAAAE,cAAA;EACT,OAAAH,EAAA;AAMO;AACL,SAAMN,aAASA,CAAA;EACf,IAAAU,MAAO,GAAAX,aAAgB;EACzB,OAAAW,MAAA,GAAAA,MAAA,CAAAC,KAAA","ignoreList":[]}
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: !0
9
- });
10
- },
11
- __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
14
  get: () => from[key],
14
15
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
16
  });
16
- return to;
17
- };
17
+ }
18
+ return to;
19
+ };
18
20
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
- value: !0
21
+ value: true
20
22
  }), mod);
21
23
  var index_exports = {};
22
24
  __export(index_exports, {
@@ -25,5 +27,5 @@ __export(index_exports, {
25
27
  useHotUpdaterStore: () => import_react_native.useHotUpdaterStore
26
28
  });
27
29
  module.exports = __toCommonJS(index_exports);
28
- var import_react_native = require("@hot-updater/react-native"),
29
- import_createHotUpdater = require("./createHotUpdater.cjs");
30
+ var import_react_native = require("@hot-updater/react-native");
31
+ var import_createHotUpdater = require("./createHotUpdater.cjs");
@@ -5,20 +5,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
16
  get: () => from[key],
16
17
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
18
  });
18
- return to;
19
- };
19
+ }
20
+ return to;
21
+ };
20
22
  var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
23
+ value: true
22
24
  }), mod);
23
25
  var index_exports = {};
24
26
  __export(index_exports, {
@@ -27,6 +29,6 @@ __export(index_exports, {
27
29
  useHotUpdaterStore: () => import_react_native.useHotUpdaterStore
28
30
  });
29
31
  module.exports = __toCommonJS(index_exports);
30
- var import_react_native = require("@hot-updater/react-native"),
31
- import_createHotUpdater = require("./createHotUpdater.native.js");
32
+ var import_react_native = require("@hot-updater/react-native");
33
+ var import_createHotUpdater = require("./createHotUpdater.native.js");
32
34
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","HotUpdater","import_react_native","createHotUpdater","import_createHotUpdater","useHotUpdaterStore","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,UAAA,EAAAA,CAAA,KAAAC,mBAAA,CAAAD,UAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAC,uBAAA,CAAAD,gBAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAH,mBAAA,CAAAG;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAb,YAA+C,CAAAK,aAAA","ignoreList":[]}
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","HotUpdater","import_react_native","createHotUpdater","import_createHotUpdater","useHotUpdaterStore","module","exports","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,UAAA,EAAAA,CAAA,KAAAC,mBAAA,CAAAD,UAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAC,uBAAA,CAAAD,gBAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAH,mBAAA,CAAAG;AAAA;AACAC,MAAA,CAAAC,OAAA,GAAAb,YAA+C,CAAAK,aAAA;AAG/C,IAAAG,mBAAA,GAAAM,OAAiC","ignoreList":[]}