rollipop 1.0.0-beta.1 → 1.0.0-beta.3
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/README.md +4 -0
- package/dist/config/defaults.js +6 -4
- package/dist/config/types.d.ts +3 -2
- package/dist/constants.js +1 -1
- package/dist/core/plugins/babel-plugin.js +1 -1
- package/dist/core/plugins/types.d.ts +2 -1
- package/dist/core/rolldown.js +3 -10
- package/dist/events/types.d.ts +2 -1
- package/dist/hmr-runtime.iife.js +302 -195
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/internal/react-native/legacy.js +14 -0
- package/dist/internal/react-native/polyfills.js +28 -0
- package/dist/internal/react-native/public-assets.js +14 -0
- package/dist/internal/react-native/public.js +14 -0
- package/dist/internal/react-native/runtime.js +25 -0
- package/dist/internal/react-native.js +2 -41
- package/dist/node/commands/agent/index.js +1 -2
- package/dist/node/commands/bundle/command.js +8 -0
- package/dist/node/commands/bundle/index.js +1 -2
- package/dist/node/commands/start/index.js +1 -2
- package/dist/package.js +1 -1
- package/dist/rolldown-runtime-DXE2a-Yu.js +27 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/dist/server/bundle.d.ts +2 -1
- package/dist/server/create-dev-server.js +1 -1
- package/dist/server/devframe/events.js +4 -1
- package/dist/server/devframe/index.js +31 -8
- package/dist/server/devframe/setup.js +4 -1
- package/dist/server/hot-update-store.d.ts +7 -0
- package/dist/server/hot-update-store.js +24 -2
- package/dist/server/symbolicate.js +12 -6
- package/dist/server/types.d.ts +5 -0
- package/dist/storage/file-storage.js +1 -1
- package/dist/utils/transform.js +2 -1
- package/dist/utils/worklets.d.ts +7 -0
- package/dist/utils/worklets.js +32 -0
- package/package.json +26 -23
- package/skills/configuration.md +1 -1
- package/skills/plugins.md +1 -1
- package/src/runtime/__tests__/hmr-runtime.spec.ts +171 -72
- package/src/runtime/hmr-client.ts +1 -1
- package/src/runtime/hmr-runtime.ts +76 -0
- package/dist/rolldown-runtime-BHXq-rbM.js +0 -24
package/dist/hmr-runtime.iife.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var __rolldown_runtime__ = (function() {
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
|
-
function
|
|
3
|
+
function r$1(r) {
|
|
4
4
|
"@swc/helpers - typeof";
|
|
5
|
-
return
|
|
5
|
+
return r && typeof Symbol !== "undefined" && r.constructor === Symbol ? "symbol" : typeof r;
|
|
6
6
|
}
|
|
7
7
|
var __create = Object.create;
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
9
|
-
var __name = function
|
|
10
|
-
return __defProp(
|
|
11
|
-
value:
|
|
9
|
+
var __name = function r(r, e) {
|
|
10
|
+
return __defProp(r, "name", {
|
|
11
|
+
value: e,
|
|
12
12
|
configurable: true
|
|
13
13
|
});
|
|
14
14
|
};
|
|
@@ -16,94 +16,127 @@ var __rolldown_runtime__ = (function() {
|
|
|
16
16
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
17
17
|
var __getProtoOf = Object.getPrototypeOf;
|
|
18
18
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
19
|
-
var __esm = function
|
|
19
|
+
var __esm = function r(r, e, t) {
|
|
20
20
|
return function() {
|
|
21
21
|
if (t) throw t[0];
|
|
22
22
|
try {
|
|
23
|
-
return
|
|
24
|
-
} catch (
|
|
25
|
-
throw t = [
|
|
23
|
+
return r && (e = (0, r[__getOwnPropNames(r)[0]])(r = 0)), e;
|
|
24
|
+
} catch (r) {
|
|
25
|
+
throw t = [r], r;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
-
var __esmMin = function
|
|
29
|
+
var __esmMin = function r(r, e, t) {
|
|
30
30
|
return function() {
|
|
31
31
|
if (t) throw t[0];
|
|
32
32
|
try {
|
|
33
|
-
return
|
|
34
|
-
} catch (
|
|
35
|
-
throw t = [
|
|
33
|
+
return r && (e = r(r = 0)), e;
|
|
34
|
+
} catch (r) {
|
|
35
|
+
throw t = [r], r;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
-
var __commonJS = function
|
|
39
|
+
var __commonJS = function r(r, e) {
|
|
40
40
|
return function() {
|
|
41
|
-
return
|
|
41
|
+
return e || ((0, r[__getOwnPropNames(r)[0]])((e = { exports: {} }).exports, e, e.exports), r = null), e.exports;
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
-
var __commonJSMin = function
|
|
44
|
+
var __commonJSMin = function r(r, e) {
|
|
45
45
|
return function() {
|
|
46
|
-
return
|
|
46
|
+
return e || (r((e = { exports: {} }).exports, e, e.exports), r = null), e.exports;
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
|
-
var __exportAll = function
|
|
49
|
+
var __exportAll = function r(r, e) {
|
|
50
50
|
var t = {};
|
|
51
|
-
for (var o in
|
|
52
|
-
get:
|
|
51
|
+
for (var o in r) __defProp(t, o, {
|
|
52
|
+
get: r[o],
|
|
53
53
|
enumerable: true
|
|
54
54
|
});
|
|
55
|
-
if (!
|
|
55
|
+
if (!e) __defProp(t, Symbol.toStringTag, { value: "Module" });
|
|
56
56
|
return t;
|
|
57
57
|
};
|
|
58
|
-
var __copyProps = function
|
|
59
|
-
if (t && (typeof t === "undefined" ? "undefined" :
|
|
60
|
-
|
|
61
|
-
if (!__hasOwnProp.call(
|
|
62
|
-
get: (function(
|
|
63
|
-
return t[
|
|
64
|
-
}).bind(null,
|
|
65
|
-
enumerable: !(n = __getOwnPropDesc(t,
|
|
58
|
+
var __copyProps = function e(e, t, o, n) {
|
|
59
|
+
if (t && (typeof t === "undefined" ? "undefined" : r$1(t)) === "object" || typeof t === "function") for (var _ = __getOwnPropNames(t), a = 0, u = _.length, p; a < u; a++) {
|
|
60
|
+
p = _[a];
|
|
61
|
+
if (!__hasOwnProp.call(e, p) && p !== o) __defProp(e, p, {
|
|
62
|
+
get: (function(r) {
|
|
63
|
+
return t[r];
|
|
64
|
+
}).bind(null, p),
|
|
65
|
+
enumerable: !(n = __getOwnPropDesc(t, p)) || n.enumerable
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
return
|
|
68
|
+
return e;
|
|
69
69
|
};
|
|
70
|
-
var __reExport = function
|
|
71
|
-
return __copyProps(
|
|
70
|
+
var __reExport = function r(r, e, t) {
|
|
71
|
+
return __copyProps(r, e, "default"), t && __copyProps(t, e, "default");
|
|
72
72
|
};
|
|
73
|
-
var __toESM = function
|
|
74
|
-
return t =
|
|
75
|
-
value:
|
|
73
|
+
var __toESM = function r(r, e, t) {
|
|
74
|
+
return t = r != null ? __create(__getProtoOf(r)) : {}, __copyProps(e || !r || !r.__esModule || !__hasOwnProp.call(r, "default") ? __defProp(t, "default", {
|
|
75
|
+
value: r,
|
|
76
76
|
enumerable: true
|
|
77
|
-
}) : t,
|
|
77
|
+
}) : t, r);
|
|
78
78
|
};
|
|
79
|
-
var __toCommonJS = function
|
|
80
|
-
return __hasOwnProp.call(
|
|
79
|
+
var __toCommonJS = function r(r) {
|
|
80
|
+
return __hasOwnProp.call(r, "module.exports") ? r["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), r);
|
|
81
81
|
};
|
|
82
|
-
var
|
|
83
|
-
|
|
82
|
+
var __share_factories = __create(null);
|
|
83
|
+
var __share_records = __create(null);
|
|
84
|
+
var __share = function r(r, e) {
|
|
85
|
+
if (!(r in __share_factories)) __share_factories[r] = e;
|
|
86
|
+
};
|
|
87
|
+
var __share_require = function r(r) {
|
|
88
|
+
var e = __share_records[r];
|
|
89
|
+
if (e) {
|
|
90
|
+
if (e.failed) throw e.error;
|
|
91
|
+
return e.exports;
|
|
92
|
+
}
|
|
93
|
+
var t = __share_factories[r];
|
|
94
|
+
if (!t) throw new Error("Shared chunk \"" + r + "\" was not registered before it was required.");
|
|
95
|
+
e = __share_records[r] = {
|
|
96
|
+
exports: {},
|
|
97
|
+
failed: false,
|
|
98
|
+
error: void 0
|
|
99
|
+
};
|
|
100
|
+
try {
|
|
101
|
+
t(e.exports);
|
|
102
|
+
} catch (r) {
|
|
103
|
+
e.failed = true;
|
|
104
|
+
e.error = r;
|
|
105
|
+
throw r;
|
|
106
|
+
}
|
|
107
|
+
return e.exports;
|
|
108
|
+
};
|
|
109
|
+
var __share_export = function r(r, e) {
|
|
110
|
+
for (var t in e) __defProp(r, t, {
|
|
111
|
+
get: e[t],
|
|
112
|
+
enumerable: true
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
var __toBinaryNode = function r(r) {
|
|
116
|
+
return new Uint8Array(Buffer.from(r, "base64"));
|
|
84
117
|
};
|
|
85
118
|
var __toBinary = function() {
|
|
86
|
-
var
|
|
87
|
-
for (var
|
|
88
|
-
return function(
|
|
89
|
-
var t =
|
|
90
|
-
for (var n = 0,
|
|
91
|
-
var
|
|
92
|
-
var
|
|
93
|
-
o[
|
|
94
|
-
o[
|
|
95
|
-
o[
|
|
119
|
+
var r = /* @__PURE__ */ new Uint8Array(128);
|
|
120
|
+
for (var e = 0; e < 64; e++) r[e < 26 ? e + 65 : e < 52 ? e + 71 : e < 62 ? e - 4 : e * 4 - 205] = e;
|
|
121
|
+
return function(e) {
|
|
122
|
+
var t = e.length, o = new Uint8Array((t - (e[t - 1] == "=") - (e[t - 2] == "=")) * 3 / 4 | 0);
|
|
123
|
+
for (var n = 0, _ = 0; n < t;) {
|
|
124
|
+
var a = r[e.charCodeAt(n++)], u = r[e.charCodeAt(n++)];
|
|
125
|
+
var p = r[e.charCodeAt(n++)], f = r[e.charCodeAt(n++)];
|
|
126
|
+
o[_++] = a << 2 | u >> 4;
|
|
127
|
+
o[_++] = u << 4 | p >> 2;
|
|
128
|
+
o[_++] = p << 6 | f;
|
|
96
129
|
}
|
|
97
130
|
return o;
|
|
98
131
|
};
|
|
99
132
|
}();
|
|
100
|
-
var __require = function(
|
|
101
|
-
return typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(
|
|
102
|
-
return (typeof require !== "undefined" ? require :
|
|
103
|
-
} }) :
|
|
104
|
-
}(function(
|
|
133
|
+
var __require = function(r) {
|
|
134
|
+
return typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(r, { get: function r(r, e) {
|
|
135
|
+
return (typeof require !== "undefined" ? require : r)[e];
|
|
136
|
+
} }) : r;
|
|
137
|
+
}(function(r) {
|
|
105
138
|
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
106
|
-
throw Error("Calling `require` for \"" +
|
|
139
|
+
throw Error("Calling `require` for \"" + r + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
107
140
|
});
|
|
108
141
|
//#endregion
|
|
109
142
|
//#region ../../node_modules/mitt/dist/mitt.mjs
|
|
@@ -199,29 +232,29 @@ var __rolldown_runtime__ = (function() {
|
|
|
199
232
|
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
200
233
|
return e;
|
|
201
234
|
}
|
|
202
|
-
function asyncGeneratorStep(e, t, r, n, o,
|
|
235
|
+
function asyncGeneratorStep(e, t, r, n, o, i, u) {
|
|
203
236
|
try {
|
|
204
|
-
var
|
|
205
|
-
var
|
|
237
|
+
var l = e[i](u);
|
|
238
|
+
var a = l.value;
|
|
206
239
|
} catch (e) {
|
|
207
240
|
r(e);
|
|
208
241
|
return;
|
|
209
242
|
}
|
|
210
|
-
if (
|
|
211
|
-
else Promise.resolve(
|
|
243
|
+
if (l.done) t(a);
|
|
244
|
+
else Promise.resolve(a).then(n, o);
|
|
212
245
|
}
|
|
213
246
|
function _async_to_generator(e) {
|
|
214
247
|
return function() {
|
|
215
248
|
var t = this, r = arguments;
|
|
216
249
|
return new Promise(function(n, o) {
|
|
217
|
-
var
|
|
218
|
-
function i(e) {
|
|
219
|
-
asyncGeneratorStep(a, n, o, i, u, "next", e);
|
|
220
|
-
}
|
|
250
|
+
var i = e.apply(t, r);
|
|
221
251
|
function u(e) {
|
|
222
|
-
asyncGeneratorStep(
|
|
252
|
+
asyncGeneratorStep(i, n, o, u, l, "next", e);
|
|
223
253
|
}
|
|
224
|
-
|
|
254
|
+
function l(e) {
|
|
255
|
+
asyncGeneratorStep(i, n, o, u, l, "throw", e);
|
|
256
|
+
}
|
|
257
|
+
u(void 0);
|
|
225
258
|
});
|
|
226
259
|
};
|
|
227
260
|
}
|
|
@@ -246,6 +279,17 @@ var __rolldown_runtime__ = (function() {
|
|
|
246
279
|
if (r) _defineProperties(e, r);
|
|
247
280
|
return e;
|
|
248
281
|
}
|
|
282
|
+
function _get(e, t, r) {
|
|
283
|
+
if (typeof Reflect !== "undefined" && Reflect.get) _get = Reflect.get;
|
|
284
|
+
else _get = function e(e, t, r) {
|
|
285
|
+
var n = _super_prop_base(e, t);
|
|
286
|
+
if (!n) return;
|
|
287
|
+
var o = Object.getOwnPropertyDescriptor(n, t);
|
|
288
|
+
if (o.get) return o.get.call(r || e);
|
|
289
|
+
return o.value;
|
|
290
|
+
};
|
|
291
|
+
return _get(e, t, r || e);
|
|
292
|
+
}
|
|
249
293
|
function _get_prototype_of(e) {
|
|
250
294
|
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function e(e) {
|
|
251
295
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
@@ -277,21 +321,21 @@ var __rolldown_runtime__ = (function() {
|
|
|
277
321
|
if (r == null) return;
|
|
278
322
|
var n = [];
|
|
279
323
|
var o = true;
|
|
280
|
-
var
|
|
281
|
-
var
|
|
324
|
+
var i = false;
|
|
325
|
+
var u, l;
|
|
282
326
|
try {
|
|
283
|
-
for (r = r.call(e); !(o = (
|
|
284
|
-
n.push(
|
|
327
|
+
for (r = r.call(e); !(o = (u = r.next()).done); o = true) {
|
|
328
|
+
n.push(u.value);
|
|
285
329
|
if (t && n.length === t) break;
|
|
286
330
|
}
|
|
287
331
|
} catch (e) {
|
|
288
|
-
|
|
289
|
-
|
|
332
|
+
i = true;
|
|
333
|
+
l = e;
|
|
290
334
|
} finally {
|
|
291
335
|
try {
|
|
292
336
|
if (!o && r["return"] != null) r["return"]();
|
|
293
337
|
} finally {
|
|
294
|
-
if (
|
|
338
|
+
if (i) throw l;
|
|
295
339
|
}
|
|
296
340
|
}
|
|
297
341
|
return n;
|
|
@@ -316,11 +360,18 @@ var __rolldown_runtime__ = (function() {
|
|
|
316
360
|
function _sliced_to_array(e, t) {
|
|
317
361
|
return _array_with_holes(e) || _iterable_to_array_limit(e, t) || _unsupported_iterable_to_array(e, t) || _non_iterable_rest();
|
|
318
362
|
}
|
|
363
|
+
function _super_prop_base(e, t) {
|
|
364
|
+
while (!Object.prototype.hasOwnProperty.call(e, t)) {
|
|
365
|
+
e = _get_prototype_of(e);
|
|
366
|
+
if (e === null) break;
|
|
367
|
+
}
|
|
368
|
+
return e;
|
|
369
|
+
}
|
|
319
370
|
function _to_consumable_array(e) {
|
|
320
371
|
return _array_without_holes(e) || _iterable_to_array(e) || _unsupported_iterable_to_array(e) || _non_iterable_spread();
|
|
321
372
|
}
|
|
322
373
|
function _ts_generator(e, t) {
|
|
323
|
-
var r, n, o,
|
|
374
|
+
var r, n, o, i = {
|
|
324
375
|
label: 0,
|
|
325
376
|
sent: function() {
|
|
326
377
|
if (o[0] & 1) throw o[1];
|
|
@@ -328,73 +379,73 @@ var __rolldown_runtime__ = (function() {
|
|
|
328
379
|
},
|
|
329
380
|
trys: [],
|
|
330
381
|
ops: []
|
|
331
|
-
},
|
|
332
|
-
return u
|
|
382
|
+
}, u = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype), l = Object.defineProperty;
|
|
383
|
+
return l(u, "next", { value: a(0) }), l(u, "throw", { value: a(1) }), l(u, "return", { value: a(2) }), typeof Symbol === "function" && l(u, Symbol.iterator, { value: function() {
|
|
333
384
|
return this;
|
|
334
|
-
} }),
|
|
335
|
-
function
|
|
385
|
+
} }), u;
|
|
386
|
+
function a(e) {
|
|
336
387
|
return function(t) {
|
|
337
388
|
return s([e, t]);
|
|
338
389
|
};
|
|
339
390
|
}
|
|
340
|
-
function s(
|
|
391
|
+
function s(l) {
|
|
341
392
|
if (r) throw new TypeError("Generator is already executing.");
|
|
342
|
-
while (
|
|
343
|
-
if (r = 1, n && (o =
|
|
344
|
-
if (n = 0, o)
|
|
345
|
-
switch (
|
|
393
|
+
while (u && (u = 0, l[0] && (i = 0)), i) try {
|
|
394
|
+
if (r = 1, n && (o = l[0] & 2 ? n["return"] : l[0] ? n["throw"] || ((o = n["return"]) && o.call(n), 0) : n.next) && !(o = o.call(n, l[1])).done) return o;
|
|
395
|
+
if (n = 0, o) l = [l[0] & 2, o.value];
|
|
396
|
+
switch (l[0]) {
|
|
346
397
|
case 0:
|
|
347
398
|
case 1:
|
|
348
|
-
o =
|
|
399
|
+
o = l;
|
|
349
400
|
break;
|
|
350
401
|
case 4:
|
|
351
|
-
|
|
402
|
+
i.label++;
|
|
352
403
|
return {
|
|
353
|
-
value:
|
|
404
|
+
value: l[1],
|
|
354
405
|
done: false
|
|
355
406
|
};
|
|
356
407
|
case 5:
|
|
357
|
-
|
|
358
|
-
n =
|
|
359
|
-
|
|
408
|
+
i.label++;
|
|
409
|
+
n = l[1];
|
|
410
|
+
l = [0];
|
|
360
411
|
continue;
|
|
361
412
|
case 7:
|
|
362
|
-
|
|
363
|
-
|
|
413
|
+
l = i.ops.pop();
|
|
414
|
+
i.trys.pop();
|
|
364
415
|
continue;
|
|
365
416
|
default:
|
|
366
|
-
if (!(o =
|
|
367
|
-
|
|
417
|
+
if (!(o = i.trys, o = o.length > 0 && o[o.length - 1]) && (l[0] === 6 || l[0] === 2)) {
|
|
418
|
+
i = 0;
|
|
368
419
|
continue;
|
|
369
420
|
}
|
|
370
|
-
if (
|
|
371
|
-
|
|
421
|
+
if (l[0] === 3 && (!o || l[1] > o[0] && l[1] < o[3])) {
|
|
422
|
+
i.label = l[1];
|
|
372
423
|
break;
|
|
373
424
|
}
|
|
374
|
-
if (
|
|
375
|
-
|
|
376
|
-
o =
|
|
425
|
+
if (l[0] === 6 && i.label < o[1]) {
|
|
426
|
+
i.label = o[1];
|
|
427
|
+
o = l;
|
|
377
428
|
break;
|
|
378
429
|
}
|
|
379
|
-
if (o &&
|
|
380
|
-
|
|
381
|
-
|
|
430
|
+
if (o && i.label < o[2]) {
|
|
431
|
+
i.label = o[2];
|
|
432
|
+
i.ops.push(l);
|
|
382
433
|
break;
|
|
383
434
|
}
|
|
384
|
-
if (o[2])
|
|
385
|
-
|
|
435
|
+
if (o[2]) i.ops.pop();
|
|
436
|
+
i.trys.pop();
|
|
386
437
|
continue;
|
|
387
438
|
}
|
|
388
|
-
|
|
439
|
+
l = t.call(e, i);
|
|
389
440
|
} catch (e) {
|
|
390
|
-
|
|
441
|
+
l = [6, e];
|
|
391
442
|
n = 0;
|
|
392
443
|
} finally {
|
|
393
444
|
r = o = 0;
|
|
394
445
|
}
|
|
395
|
-
if (
|
|
446
|
+
if (l[0] & 5) throw l[1];
|
|
396
447
|
return {
|
|
397
|
-
value:
|
|
448
|
+
value: l[0] ? l[1] : void 0,
|
|
398
449
|
done: true
|
|
399
450
|
};
|
|
400
451
|
}
|
|
@@ -416,13 +467,13 @@ var __rolldown_runtime__ = (function() {
|
|
|
416
467
|
var BaseDevRuntime = DevRuntime;
|
|
417
468
|
var ModuleHotContext = /*#__PURE__*/ function() {
|
|
418
469
|
"use strict";
|
|
419
|
-
function e(t, r, n, o,
|
|
470
|
+
function e(t, r, n, o, i) {
|
|
420
471
|
_class_call_check(this, e);
|
|
421
472
|
this.moduleId = t;
|
|
422
473
|
this.socketHolder = r;
|
|
423
474
|
this.runtime = n;
|
|
424
475
|
this.data = o;
|
|
425
|
-
this.invalidateModule =
|
|
476
|
+
this.invalidateModule = i;
|
|
426
477
|
this.removeListeners = [];
|
|
427
478
|
this.acceptCallbacks = [];
|
|
428
479
|
}
|
|
@@ -494,8 +545,8 @@ var __rolldown_runtime__ = (function() {
|
|
|
494
545
|
var e = true, t = false, r = void 0;
|
|
495
546
|
try {
|
|
496
547
|
for (var n = this.removeListeners[Symbol.iterator](), o; !(e = (o = n.next()).done); e = true) {
|
|
497
|
-
var
|
|
498
|
-
|
|
548
|
+
var i = o.value;
|
|
549
|
+
i();
|
|
499
550
|
}
|
|
500
551
|
} catch (e) {
|
|
501
552
|
t = true;
|
|
@@ -590,8 +641,8 @@ var __rolldown_runtime__ = (function() {
|
|
|
590
641
|
var e = true, t = false, r = void 0;
|
|
591
642
|
try {
|
|
592
643
|
for (var n = this.queuedMessages[Symbol.iterator](), o; !(e = (o = n.next()).done); e = true) {
|
|
593
|
-
var
|
|
594
|
-
this._socket.send(
|
|
644
|
+
var i = o.value;
|
|
645
|
+
this._socket.send(i);
|
|
595
646
|
}
|
|
596
647
|
} catch (e) {
|
|
597
648
|
t = true;
|
|
@@ -636,6 +687,62 @@ var __rolldown_runtime__ = (function() {
|
|
|
636
687
|
return e;
|
|
637
688
|
}
|
|
638
689
|
_create_class(ReactNativeDevRuntime, [
|
|
690
|
+
{
|
|
691
|
+
key: "hasFactory",
|
|
692
|
+
value: function e(e) {
|
|
693
|
+
return _get(_get_prototype_of(ReactNativeDevRuntime.prototype), "hasFactory", this).call(this, e) || typeof __rollipop_require__ !== "undefined" && __rollipop_require__.m[e] != null;
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
key: "isExecuted",
|
|
698
|
+
value: function e(e) {
|
|
699
|
+
return _get(_get_prototype_of(ReactNativeDevRuntime.prototype), "isExecuted", this).call(this, e) || typeof __rollipop_require__ !== "undefined" && __rollipop_require__.c[e] != null;
|
|
700
|
+
}
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
key: "loadExports",
|
|
704
|
+
value: function e(e) {
|
|
705
|
+
if (!_get(_get_prototype_of(ReactNativeDevRuntime.prototype), "isExecuted", this).call(this, e) && typeof __rollipop_require__ !== "undefined") {
|
|
706
|
+
var t = __rollipop_require__.c[e];
|
|
707
|
+
if (t != null) return t.exports;
|
|
708
|
+
}
|
|
709
|
+
return _get(_get_prototype_of(ReactNativeDevRuntime.prototype), "loadExports", this).call(this, e);
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
key: "initModule",
|
|
714
|
+
value: function e(e) {
|
|
715
|
+
if (this.isExecuted(e)) return this.loadExports(e);
|
|
716
|
+
if (_get(_get_prototype_of(ReactNativeDevRuntime.prototype), "hasFactory", this).call(this, e) || !this.hasFactory(e)) return _get(_get_prototype_of(ReactNativeDevRuntime.prototype), "initModule", this).call(this, e);
|
|
717
|
+
return __rollipop_require__(e);
|
|
718
|
+
}
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
key: "registerFactory",
|
|
722
|
+
value: function e(e, t, r) {
|
|
723
|
+
var n = this;
|
|
724
|
+
_get(_get_prototype_of(ReactNativeDevRuntime.prototype), "registerFactory", this).call(this, e, t, r);
|
|
725
|
+
if (typeof __rollipop_require__ !== "undefined") __rollipop_require__.m[e] = function(t, r) {
|
|
726
|
+
r.exports = _get(_get_prototype_of(ReactNativeDevRuntime.prototype), "initModule", n).call(n, e);
|
|
727
|
+
};
|
|
728
|
+
}
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
key: "registerModule",
|
|
732
|
+
value: function e(e, t) {
|
|
733
|
+
t !== null && t !== void 0 || (t = typeof __rollipop_require__ !== "undefined" ? __rollipop_require__.c[e] : void 0);
|
|
734
|
+
t !== null && t !== void 0 || (t = { exports: {} });
|
|
735
|
+
_get(_get_prototype_of(ReactNativeDevRuntime.prototype), "registerModule", this).call(this, e, t);
|
|
736
|
+
if (typeof __rollipop_require__ !== "undefined") __rollipop_require__.c[e] = t;
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
key: "removeModuleCache",
|
|
741
|
+
value: function e(e) {
|
|
742
|
+
if (typeof __rollipop_require__ !== "undefined") delete __rollipop_require__.c[e];
|
|
743
|
+
_get(_get_prototype_of(ReactNativeDevRuntime.prototype), "removeModuleCache", this).call(this, e);
|
|
744
|
+
}
|
|
745
|
+
},
|
|
639
746
|
{
|
|
640
747
|
key: "createHotContext",
|
|
641
748
|
value: function e(e) {
|
|
@@ -676,10 +783,10 @@ var __rolldown_runtime__ = (function() {
|
|
|
676
783
|
e.addEventListener("message", function(t) {
|
|
677
784
|
var n = JSON.parse(t.data);
|
|
678
785
|
if (isCustomHMRMessage(n)) {
|
|
679
|
-
var o,
|
|
786
|
+
var o, i;
|
|
680
787
|
debug("[HMR]: Custom HMR message received: ".concat(n.type));
|
|
681
788
|
r.socketHolder.emit(n.type, n.payload);
|
|
682
|
-
(
|
|
789
|
+
(i = globalThis.__rollipop_runtime__) === null || i === void 0 || (o = i.customHMRHandler) == null || o.call(i, e, n);
|
|
683
790
|
return;
|
|
684
791
|
}
|
|
685
792
|
switch (n.type) {
|
|
@@ -749,23 +856,23 @@ var __rolldown_runtime__ = (function() {
|
|
|
749
856
|
{
|
|
750
857
|
key: "applyPush",
|
|
751
858
|
value: function e(e) {
|
|
752
|
-
var t = e.changedIds, r = e.code, n = e.filename, o = e.seq,
|
|
859
|
+
var t = e.changedIds, r = e.code, n = e.filename, o = e.seq, i = e.sourceURL;
|
|
753
860
|
if (o !== this.lastSeq + 1) {
|
|
754
861
|
this.reload("HMR update sequence gap (expected ".concat(this.lastSeq + 1, ", got ").concat(o, ")"));
|
|
755
862
|
return;
|
|
756
863
|
}
|
|
757
864
|
this.lastSeq = o;
|
|
758
|
-
var
|
|
759
|
-
if (
|
|
760
|
-
this.reload(
|
|
865
|
+
var u = this.computeHmrUpdate(t);
|
|
866
|
+
if (u.type === "full-reload") {
|
|
867
|
+
this.reload(u.reason);
|
|
761
868
|
return;
|
|
762
869
|
}
|
|
763
|
-
this.evaluate(r,
|
|
870
|
+
this.evaluate(r, i);
|
|
764
871
|
this.socketHolder.send(JSON.stringify({
|
|
765
872
|
type: "hmr:payload-delivered",
|
|
766
873
|
filename: n
|
|
767
874
|
}));
|
|
768
|
-
if (
|
|
875
|
+
if (u.type === "boundaries") this.applyUpdate(u);
|
|
769
876
|
}
|
|
770
877
|
},
|
|
771
878
|
{
|
|
@@ -794,22 +901,22 @@ var __rolldown_runtime__ = (function() {
|
|
|
794
901
|
var r = [];
|
|
795
902
|
var n = /* @__PURE__ */ new Set();
|
|
796
903
|
var o = /* @__PURE__ */ new Set();
|
|
797
|
-
var
|
|
904
|
+
var i = true, u = false, l = void 0;
|
|
798
905
|
try {
|
|
799
|
-
for (var
|
|
906
|
+
for (var a = e[Symbol.iterator](), s; !(i = (s = a.next()).done); i = true) {
|
|
800
907
|
var c = s.value;
|
|
801
908
|
if (!this.isExecuted(c)) continue;
|
|
802
909
|
var f = this.bubble(c, [c], n, r, o, t);
|
|
803
910
|
if (f != null) return f;
|
|
804
911
|
}
|
|
805
912
|
} catch (e) {
|
|
806
|
-
|
|
807
|
-
|
|
913
|
+
u = true;
|
|
914
|
+
l = e;
|
|
808
915
|
} finally {
|
|
809
916
|
try {
|
|
810
|
-
if (!
|
|
917
|
+
if (!i && a.return != null) a.return();
|
|
811
918
|
} finally {
|
|
812
|
-
if (
|
|
919
|
+
if (u) throw l;
|
|
813
920
|
}
|
|
814
921
|
}
|
|
815
922
|
return r.length === 0 ? { type: "noop" } : {
|
|
@@ -821,47 +928,47 @@ var __rolldown_runtime__ = (function() {
|
|
|
821
928
|
},
|
|
822
929
|
{
|
|
823
930
|
key: "bubble",
|
|
824
|
-
value: function e(e, t, r, n, o,
|
|
825
|
-
var
|
|
931
|
+
value: function e(e, t, r, n, o, i) {
|
|
932
|
+
var u = this;
|
|
826
933
|
if (o.has(e)) return;
|
|
827
934
|
o.add(e);
|
|
828
935
|
r.add(e);
|
|
829
|
-
if (
|
|
936
|
+
if (i != null && e === i) return {
|
|
830
937
|
type: "full-reload",
|
|
831
|
-
reason: "Update propagated back to ".concat(
|
|
938
|
+
reason: "Update propagated back to ".concat(i)
|
|
832
939
|
};
|
|
833
940
|
if (this.isSelfAccepted(e)) {
|
|
834
941
|
n.push([e, e]);
|
|
835
942
|
return;
|
|
836
943
|
}
|
|
837
|
-
var
|
|
838
|
-
return
|
|
944
|
+
var l = this.getImporters(e).filter(function(e) {
|
|
945
|
+
return u.isExecuted(e);
|
|
839
946
|
});
|
|
840
|
-
if (
|
|
947
|
+
if (l.length === 0) return {
|
|
841
948
|
type: "full-reload",
|
|
842
949
|
reason: "No HMR boundary found for ".concat(e)
|
|
843
950
|
};
|
|
844
|
-
var
|
|
951
|
+
var a = true, s = false, c = void 0;
|
|
845
952
|
try {
|
|
846
|
-
for (var f =
|
|
847
|
-
var
|
|
848
|
-
if (this.acceptsDependency(
|
|
849
|
-
n.push([
|
|
953
|
+
for (var f = l[Symbol.iterator](), d; !(a = (d = f.next()).done); a = true) {
|
|
954
|
+
var p = d.value;
|
|
955
|
+
if (this.acceptsDependency(p, e)) {
|
|
956
|
+
n.push([p, e]);
|
|
850
957
|
continue;
|
|
851
958
|
}
|
|
852
|
-
if (t.includes(
|
|
959
|
+
if (t.includes(p)) return {
|
|
853
960
|
type: "full-reload",
|
|
854
|
-
reason: "Circular import chain between ".concat(e, " and ").concat(
|
|
961
|
+
reason: "Circular import chain between ".concat(e, " and ").concat(p)
|
|
855
962
|
};
|
|
856
|
-
var
|
|
857
|
-
if (
|
|
963
|
+
var h = this.bubble(p, _to_consumable_array(t).concat([p]), r, n, o, i);
|
|
964
|
+
if (h != null) return h;
|
|
858
965
|
}
|
|
859
966
|
} catch (e) {
|
|
860
967
|
s = true;
|
|
861
968
|
c = e;
|
|
862
969
|
} finally {
|
|
863
970
|
try {
|
|
864
|
-
if (!
|
|
971
|
+
if (!a && f.return != null) f.return();
|
|
865
972
|
} finally {
|
|
866
973
|
if (s) throw c;
|
|
867
974
|
}
|
|
@@ -892,110 +999,110 @@ var __rolldown_runtime__ = (function() {
|
|
|
892
999
|
key: "applyUpdate",
|
|
893
1000
|
value: function e(e, t) {
|
|
894
1001
|
var r = this;
|
|
895
|
-
var n = true, o = false,
|
|
1002
|
+
var n = true, o = false, i = void 0;
|
|
896
1003
|
try {
|
|
897
|
-
for (var
|
|
898
|
-
var
|
|
899
|
-
if (!this.hasFactory(
|
|
900
|
-
this.reload("No factory registered for ".concat(
|
|
1004
|
+
for (var u = e.updateSet[Symbol.iterator](), l; !(n = (l = u.next()).done); n = true) {
|
|
1005
|
+
var a = l.value;
|
|
1006
|
+
if (!this.hasFactory(a)) {
|
|
1007
|
+
this.reload("No factory registered for ".concat(a));
|
|
901
1008
|
return;
|
|
902
1009
|
}
|
|
903
1010
|
}
|
|
904
1011
|
} catch (e) {
|
|
905
1012
|
o = true;
|
|
906
|
-
|
|
1013
|
+
i = e;
|
|
907
1014
|
} finally {
|
|
908
1015
|
try {
|
|
909
|
-
if (!n &&
|
|
1016
|
+
if (!n && u.return != null) u.return();
|
|
910
1017
|
} finally {
|
|
911
|
-
if (o) throw
|
|
1018
|
+
if (o) throw i;
|
|
912
1019
|
}
|
|
913
1020
|
}
|
|
914
1021
|
var s = e.boundaries.map(function(e) {
|
|
915
1022
|
var t = _sliced_to_array(e, 2), n = t[0], o = t[1];
|
|
916
|
-
var a;
|
|
917
1023
|
var i;
|
|
1024
|
+
var u;
|
|
918
1025
|
return {
|
|
919
1026
|
acceptedVia: o,
|
|
920
|
-
callbacks: (
|
|
1027
|
+
callbacks: (i = (u = r.moduleHotContexts.get(n)) === null || u === void 0 ? void 0 : u.acceptCallbacks.filter(function(e) {
|
|
921
1028
|
return e.deps.includes(o);
|
|
922
|
-
})) !== null &&
|
|
1029
|
+
})) !== null && i !== void 0 ? i : []
|
|
923
1030
|
};
|
|
924
1031
|
});
|
|
925
1032
|
var c = true, f = false, d = void 0;
|
|
926
1033
|
try {
|
|
927
|
-
for (var
|
|
928
|
-
var
|
|
929
|
-
this.removeModuleCache(
|
|
1034
|
+
for (var p = e.updateSet[Symbol.iterator](), h; !(c = (h = p.next()).done); c = true) {
|
|
1035
|
+
var v = h.value;
|
|
1036
|
+
this.removeModuleCache(v);
|
|
930
1037
|
}
|
|
931
1038
|
} catch (e) {
|
|
932
1039
|
f = true;
|
|
933
1040
|
d = e;
|
|
934
1041
|
} finally {
|
|
935
1042
|
try {
|
|
936
|
-
if (!c &&
|
|
1043
|
+
if (!c && p.return != null) p.return();
|
|
937
1044
|
} finally {
|
|
938
1045
|
if (f) throw d;
|
|
939
1046
|
}
|
|
940
1047
|
}
|
|
941
|
-
var y = true, m = false,
|
|
1048
|
+
var y = true, m = false, _ = void 0;
|
|
942
1049
|
try {
|
|
943
|
-
var
|
|
944
|
-
var e =
|
|
945
|
-
|
|
946
|
-
var o =
|
|
1050
|
+
var b, k = function() {
|
|
1051
|
+
var e = w.value, r = e.acceptedVia, n = e.callbacks;
|
|
1052
|
+
b.initModule(r);
|
|
1053
|
+
var o = b.loadExports(r);
|
|
947
1054
|
try {
|
|
948
|
-
|
|
949
|
-
var
|
|
1055
|
+
b.currentFirstInvalidatedBy = t;
|
|
1056
|
+
var i = true, u = false, l = void 0;
|
|
950
1057
|
try {
|
|
951
|
-
for (var
|
|
1058
|
+
for (var a = n[Symbol.iterator](), s; !(i = (s = a.next()).done); i = true) {
|
|
952
1059
|
var c = s.value, f = c.deps, d = c.fn;
|
|
953
1060
|
d(f.map(function(e) {
|
|
954
1061
|
return e === r ? o : void 0;
|
|
955
1062
|
}));
|
|
956
1063
|
}
|
|
957
1064
|
} catch (e) {
|
|
958
|
-
|
|
959
|
-
|
|
1065
|
+
u = true;
|
|
1066
|
+
l = e;
|
|
960
1067
|
} finally {
|
|
961
1068
|
try {
|
|
962
|
-
if (!
|
|
1069
|
+
if (!i && a.return != null) a.return();
|
|
963
1070
|
} finally {
|
|
964
|
-
if (
|
|
1071
|
+
if (u) throw l;
|
|
965
1072
|
}
|
|
966
1073
|
}
|
|
967
1074
|
} finally {
|
|
968
|
-
|
|
1075
|
+
b.currentFirstInvalidatedBy = void 0;
|
|
969
1076
|
}
|
|
970
1077
|
};
|
|
971
|
-
for (var
|
|
1078
|
+
for (var g = s[Symbol.iterator](), w; !(y = (w = g.next()).done); y = true) b = this, k();
|
|
972
1079
|
} catch (e) {
|
|
973
1080
|
m = true;
|
|
974
|
-
|
|
1081
|
+
_ = e;
|
|
975
1082
|
} finally {
|
|
976
1083
|
try {
|
|
977
|
-
if (!y &&
|
|
1084
|
+
if (!y && g.return != null) g.return();
|
|
978
1085
|
} finally {
|
|
979
|
-
if (m) throw
|
|
1086
|
+
if (m) throw _;
|
|
980
1087
|
}
|
|
981
1088
|
}
|
|
982
|
-
var
|
|
1089
|
+
var x = true, H = false, S = void 0;
|
|
983
1090
|
try {
|
|
984
|
-
for (var M = this.moduleHotContextsToBeUpdated[Symbol.iterator](), C; !(
|
|
985
|
-
var R = _sliced_to_array(C.value, 2),
|
|
986
|
-
var
|
|
987
|
-
(
|
|
988
|
-
if (
|
|
989
|
-
else this.moduleHotContexts.set(
|
|
1091
|
+
for (var M = this.moduleHotContextsToBeUpdated[Symbol.iterator](), C; !(x = (C = M.next()).done); x = true) {
|
|
1092
|
+
var R = _sliced_to_array(C.value, 2), E = R[0], q = R[1];
|
|
1093
|
+
var U;
|
|
1094
|
+
(U = this.moduleHotContexts.get(E)) === null || U === void 0 || U.cleanup();
|
|
1095
|
+
if (q == null) this.moduleHotContexts.delete(E);
|
|
1096
|
+
else this.moduleHotContexts.set(E, q);
|
|
990
1097
|
}
|
|
991
1098
|
} catch (e) {
|
|
992
|
-
|
|
993
|
-
|
|
1099
|
+
H = true;
|
|
1100
|
+
S = e;
|
|
994
1101
|
} finally {
|
|
995
1102
|
try {
|
|
996
|
-
if (!
|
|
1103
|
+
if (!x && M.return != null) M.return();
|
|
997
1104
|
} finally {
|
|
998
|
-
if (
|
|
1105
|
+
if (H) throw S;
|
|
999
1106
|
}
|
|
1000
1107
|
}
|
|
1001
1108
|
this.moduleHotContextsToBeUpdated.clear();
|
|
@@ -1055,20 +1162,20 @@ var __rolldown_runtime__ = (function() {
|
|
|
1055
1162
|
return;
|
|
1056
1163
|
}
|
|
1057
1164
|
e.set(r.id, r);
|
|
1058
|
-
var o = true,
|
|
1165
|
+
var o = true, i = false, u = void 0;
|
|
1059
1166
|
try {
|
|
1060
|
-
for (var
|
|
1061
|
-
var s =
|
|
1167
|
+
for (var l = t[Symbol.iterator](), a; !(o = (a = l.next()).done); o = true) {
|
|
1168
|
+
var s = a.value;
|
|
1062
1169
|
s(r);
|
|
1063
1170
|
}
|
|
1064
1171
|
} catch (e) {
|
|
1065
|
-
|
|
1066
|
-
|
|
1172
|
+
i = true;
|
|
1173
|
+
u = e;
|
|
1067
1174
|
} finally {
|
|
1068
1175
|
try {
|
|
1069
|
-
if (!o &&
|
|
1176
|
+
if (!o && l.return != null) l.return();
|
|
1070
1177
|
} finally {
|
|
1071
|
-
if (
|
|
1178
|
+
if (i) throw u;
|
|
1072
1179
|
}
|
|
1073
1180
|
}
|
|
1074
1181
|
},
|