rollipop 1.0.0-beta.2 → 1.0.0-beta.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.
- 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/dev-server-plugin.js +30 -5
- package/dist/core/rolldown.js +4 -10
- package/dist/hmr-runtime.iife.js +213 -139
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/node/commands/bundle/command.js +8 -0
- package/dist/package.js +1 -1
- package/dist/server/devframe/index.js +1 -1
- package/dist/server/devframe/setup.js +4 -1
- 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 +3 -3
- 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/hmr-runtime.iife.js
CHANGED
|
@@ -232,29 +232,29 @@ var __rolldown_runtime__ = (function() {
|
|
|
232
232
|
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
233
233
|
return e;
|
|
234
234
|
}
|
|
235
|
-
function asyncGeneratorStep(e, t, r, n, o,
|
|
235
|
+
function asyncGeneratorStep(e, t, r, n, o, i, u) {
|
|
236
236
|
try {
|
|
237
|
-
var
|
|
238
|
-
var
|
|
237
|
+
var l = e[i](u);
|
|
238
|
+
var a = l.value;
|
|
239
239
|
} catch (e) {
|
|
240
240
|
r(e);
|
|
241
241
|
return;
|
|
242
242
|
}
|
|
243
|
-
if (
|
|
244
|
-
else Promise.resolve(
|
|
243
|
+
if (l.done) t(a);
|
|
244
|
+
else Promise.resolve(a).then(n, o);
|
|
245
245
|
}
|
|
246
246
|
function _async_to_generator(e) {
|
|
247
247
|
return function() {
|
|
248
248
|
var t = this, r = arguments;
|
|
249
249
|
return new Promise(function(n, o) {
|
|
250
|
-
var
|
|
251
|
-
function i(e) {
|
|
252
|
-
asyncGeneratorStep(a, n, o, i, u, "next", e);
|
|
253
|
-
}
|
|
250
|
+
var i = e.apply(t, r);
|
|
254
251
|
function u(e) {
|
|
255
|
-
asyncGeneratorStep(
|
|
252
|
+
asyncGeneratorStep(i, n, o, u, l, "next", e);
|
|
253
|
+
}
|
|
254
|
+
function l(e) {
|
|
255
|
+
asyncGeneratorStep(i, n, o, u, l, "throw", e);
|
|
256
256
|
}
|
|
257
|
-
|
|
257
|
+
u(void 0);
|
|
258
258
|
});
|
|
259
259
|
};
|
|
260
260
|
}
|
|
@@ -279,6 +279,17 @@ var __rolldown_runtime__ = (function() {
|
|
|
279
279
|
if (r) _defineProperties(e, r);
|
|
280
280
|
return e;
|
|
281
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
|
+
}
|
|
282
293
|
function _get_prototype_of(e) {
|
|
283
294
|
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function e(e) {
|
|
284
295
|
return e.__proto__ || Object.getPrototypeOf(e);
|
|
@@ -310,21 +321,21 @@ var __rolldown_runtime__ = (function() {
|
|
|
310
321
|
if (r == null) return;
|
|
311
322
|
var n = [];
|
|
312
323
|
var o = true;
|
|
313
|
-
var
|
|
314
|
-
var
|
|
324
|
+
var i = false;
|
|
325
|
+
var u, l;
|
|
315
326
|
try {
|
|
316
|
-
for (r = r.call(e); !(o = (
|
|
317
|
-
n.push(
|
|
327
|
+
for (r = r.call(e); !(o = (u = r.next()).done); o = true) {
|
|
328
|
+
n.push(u.value);
|
|
318
329
|
if (t && n.length === t) break;
|
|
319
330
|
}
|
|
320
331
|
} catch (e) {
|
|
321
|
-
|
|
322
|
-
|
|
332
|
+
i = true;
|
|
333
|
+
l = e;
|
|
323
334
|
} finally {
|
|
324
335
|
try {
|
|
325
336
|
if (!o && r["return"] != null) r["return"]();
|
|
326
337
|
} finally {
|
|
327
|
-
if (
|
|
338
|
+
if (i) throw l;
|
|
328
339
|
}
|
|
329
340
|
}
|
|
330
341
|
return n;
|
|
@@ -349,11 +360,18 @@ var __rolldown_runtime__ = (function() {
|
|
|
349
360
|
function _sliced_to_array(e, t) {
|
|
350
361
|
return _array_with_holes(e) || _iterable_to_array_limit(e, t) || _unsupported_iterable_to_array(e, t) || _non_iterable_rest();
|
|
351
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
|
+
}
|
|
352
370
|
function _to_consumable_array(e) {
|
|
353
371
|
return _array_without_holes(e) || _iterable_to_array(e) || _unsupported_iterable_to_array(e) || _non_iterable_spread();
|
|
354
372
|
}
|
|
355
373
|
function _ts_generator(e, t) {
|
|
356
|
-
var r, n, o,
|
|
374
|
+
var r, n, o, i = {
|
|
357
375
|
label: 0,
|
|
358
376
|
sent: function() {
|
|
359
377
|
if (o[0] & 1) throw o[1];
|
|
@@ -361,73 +379,73 @@ var __rolldown_runtime__ = (function() {
|
|
|
361
379
|
},
|
|
362
380
|
trys: [],
|
|
363
381
|
ops: []
|
|
364
|
-
},
|
|
365
|
-
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() {
|
|
366
384
|
return this;
|
|
367
|
-
} }),
|
|
368
|
-
function
|
|
385
|
+
} }), u;
|
|
386
|
+
function a(e) {
|
|
369
387
|
return function(t) {
|
|
370
388
|
return s([e, t]);
|
|
371
389
|
};
|
|
372
390
|
}
|
|
373
|
-
function s(
|
|
391
|
+
function s(l) {
|
|
374
392
|
if (r) throw new TypeError("Generator is already executing.");
|
|
375
|
-
while (
|
|
376
|
-
if (r = 1, n && (o =
|
|
377
|
-
if (n = 0, o)
|
|
378
|
-
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]) {
|
|
379
397
|
case 0:
|
|
380
398
|
case 1:
|
|
381
|
-
o =
|
|
399
|
+
o = l;
|
|
382
400
|
break;
|
|
383
401
|
case 4:
|
|
384
|
-
|
|
402
|
+
i.label++;
|
|
385
403
|
return {
|
|
386
|
-
value:
|
|
404
|
+
value: l[1],
|
|
387
405
|
done: false
|
|
388
406
|
};
|
|
389
407
|
case 5:
|
|
390
|
-
|
|
391
|
-
n =
|
|
392
|
-
|
|
408
|
+
i.label++;
|
|
409
|
+
n = l[1];
|
|
410
|
+
l = [0];
|
|
393
411
|
continue;
|
|
394
412
|
case 7:
|
|
395
|
-
|
|
396
|
-
|
|
413
|
+
l = i.ops.pop();
|
|
414
|
+
i.trys.pop();
|
|
397
415
|
continue;
|
|
398
416
|
default:
|
|
399
|
-
if (!(o =
|
|
400
|
-
|
|
417
|
+
if (!(o = i.trys, o = o.length > 0 && o[o.length - 1]) && (l[0] === 6 || l[0] === 2)) {
|
|
418
|
+
i = 0;
|
|
401
419
|
continue;
|
|
402
420
|
}
|
|
403
|
-
if (
|
|
404
|
-
|
|
421
|
+
if (l[0] === 3 && (!o || l[1] > o[0] && l[1] < o[3])) {
|
|
422
|
+
i.label = l[1];
|
|
405
423
|
break;
|
|
406
424
|
}
|
|
407
|
-
if (
|
|
408
|
-
|
|
409
|
-
o =
|
|
425
|
+
if (l[0] === 6 && i.label < o[1]) {
|
|
426
|
+
i.label = o[1];
|
|
427
|
+
o = l;
|
|
410
428
|
break;
|
|
411
429
|
}
|
|
412
|
-
if (o &&
|
|
413
|
-
|
|
414
|
-
|
|
430
|
+
if (o && i.label < o[2]) {
|
|
431
|
+
i.label = o[2];
|
|
432
|
+
i.ops.push(l);
|
|
415
433
|
break;
|
|
416
434
|
}
|
|
417
|
-
if (o[2])
|
|
418
|
-
|
|
435
|
+
if (o[2]) i.ops.pop();
|
|
436
|
+
i.trys.pop();
|
|
419
437
|
continue;
|
|
420
438
|
}
|
|
421
|
-
|
|
439
|
+
l = t.call(e, i);
|
|
422
440
|
} catch (e) {
|
|
423
|
-
|
|
441
|
+
l = [6, e];
|
|
424
442
|
n = 0;
|
|
425
443
|
} finally {
|
|
426
444
|
r = o = 0;
|
|
427
445
|
}
|
|
428
|
-
if (
|
|
446
|
+
if (l[0] & 5) throw l[1];
|
|
429
447
|
return {
|
|
430
|
-
value:
|
|
448
|
+
value: l[0] ? l[1] : void 0,
|
|
431
449
|
done: true
|
|
432
450
|
};
|
|
433
451
|
}
|
|
@@ -449,13 +467,13 @@ var __rolldown_runtime__ = (function() {
|
|
|
449
467
|
var BaseDevRuntime = DevRuntime;
|
|
450
468
|
var ModuleHotContext = /*#__PURE__*/ function() {
|
|
451
469
|
"use strict";
|
|
452
|
-
function e(t, r, n, o,
|
|
470
|
+
function e(t, r, n, o, i) {
|
|
453
471
|
_class_call_check(this, e);
|
|
454
472
|
this.moduleId = t;
|
|
455
473
|
this.socketHolder = r;
|
|
456
474
|
this.runtime = n;
|
|
457
475
|
this.data = o;
|
|
458
|
-
this.invalidateModule =
|
|
476
|
+
this.invalidateModule = i;
|
|
459
477
|
this.removeListeners = [];
|
|
460
478
|
this.acceptCallbacks = [];
|
|
461
479
|
}
|
|
@@ -527,8 +545,8 @@ var __rolldown_runtime__ = (function() {
|
|
|
527
545
|
var e = true, t = false, r = void 0;
|
|
528
546
|
try {
|
|
529
547
|
for (var n = this.removeListeners[Symbol.iterator](), o; !(e = (o = n.next()).done); e = true) {
|
|
530
|
-
var
|
|
531
|
-
|
|
548
|
+
var i = o.value;
|
|
549
|
+
i();
|
|
532
550
|
}
|
|
533
551
|
} catch (e) {
|
|
534
552
|
t = true;
|
|
@@ -623,8 +641,8 @@ var __rolldown_runtime__ = (function() {
|
|
|
623
641
|
var e = true, t = false, r = void 0;
|
|
624
642
|
try {
|
|
625
643
|
for (var n = this.queuedMessages[Symbol.iterator](), o; !(e = (o = n.next()).done); e = true) {
|
|
626
|
-
var
|
|
627
|
-
this._socket.send(
|
|
644
|
+
var i = o.value;
|
|
645
|
+
this._socket.send(i);
|
|
628
646
|
}
|
|
629
647
|
} catch (e) {
|
|
630
648
|
t = true;
|
|
@@ -669,6 +687,62 @@ var __rolldown_runtime__ = (function() {
|
|
|
669
687
|
return e;
|
|
670
688
|
}
|
|
671
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
|
+
},
|
|
672
746
|
{
|
|
673
747
|
key: "createHotContext",
|
|
674
748
|
value: function e(e) {
|
|
@@ -709,10 +783,10 @@ var __rolldown_runtime__ = (function() {
|
|
|
709
783
|
e.addEventListener("message", function(t) {
|
|
710
784
|
var n = JSON.parse(t.data);
|
|
711
785
|
if (isCustomHMRMessage(n)) {
|
|
712
|
-
var o,
|
|
786
|
+
var o, i;
|
|
713
787
|
debug("[HMR]: Custom HMR message received: ".concat(n.type));
|
|
714
788
|
r.socketHolder.emit(n.type, n.payload);
|
|
715
|
-
(
|
|
789
|
+
(i = globalThis.__rollipop_runtime__) === null || i === void 0 || (o = i.customHMRHandler) == null || o.call(i, e, n);
|
|
716
790
|
return;
|
|
717
791
|
}
|
|
718
792
|
switch (n.type) {
|
|
@@ -782,23 +856,23 @@ var __rolldown_runtime__ = (function() {
|
|
|
782
856
|
{
|
|
783
857
|
key: "applyPush",
|
|
784
858
|
value: function e(e) {
|
|
785
|
-
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;
|
|
786
860
|
if (o !== this.lastSeq + 1) {
|
|
787
861
|
this.reload("HMR update sequence gap (expected ".concat(this.lastSeq + 1, ", got ").concat(o, ")"));
|
|
788
862
|
return;
|
|
789
863
|
}
|
|
790
864
|
this.lastSeq = o;
|
|
791
|
-
var
|
|
792
|
-
if (
|
|
793
|
-
this.reload(
|
|
865
|
+
var u = this.computeHmrUpdate(t);
|
|
866
|
+
if (u.type === "full-reload") {
|
|
867
|
+
this.reload(u.reason);
|
|
794
868
|
return;
|
|
795
869
|
}
|
|
796
|
-
this.evaluate(r,
|
|
870
|
+
this.evaluate(r, i);
|
|
797
871
|
this.socketHolder.send(JSON.stringify({
|
|
798
872
|
type: "hmr:payload-delivered",
|
|
799
873
|
filename: n
|
|
800
874
|
}));
|
|
801
|
-
if (
|
|
875
|
+
if (u.type === "boundaries") this.applyUpdate(u);
|
|
802
876
|
}
|
|
803
877
|
},
|
|
804
878
|
{
|
|
@@ -827,22 +901,22 @@ var __rolldown_runtime__ = (function() {
|
|
|
827
901
|
var r = [];
|
|
828
902
|
var n = /* @__PURE__ */ new Set();
|
|
829
903
|
var o = /* @__PURE__ */ new Set();
|
|
830
|
-
var
|
|
904
|
+
var i = true, u = false, l = void 0;
|
|
831
905
|
try {
|
|
832
|
-
for (var
|
|
906
|
+
for (var a = e[Symbol.iterator](), s; !(i = (s = a.next()).done); i = true) {
|
|
833
907
|
var c = s.value;
|
|
834
908
|
if (!this.isExecuted(c)) continue;
|
|
835
909
|
var f = this.bubble(c, [c], n, r, o, t);
|
|
836
910
|
if (f != null) return f;
|
|
837
911
|
}
|
|
838
912
|
} catch (e) {
|
|
839
|
-
|
|
840
|
-
|
|
913
|
+
u = true;
|
|
914
|
+
l = e;
|
|
841
915
|
} finally {
|
|
842
916
|
try {
|
|
843
|
-
if (!
|
|
917
|
+
if (!i && a.return != null) a.return();
|
|
844
918
|
} finally {
|
|
845
|
-
if (
|
|
919
|
+
if (u) throw l;
|
|
846
920
|
}
|
|
847
921
|
}
|
|
848
922
|
return r.length === 0 ? { type: "noop" } : {
|
|
@@ -854,47 +928,47 @@ var __rolldown_runtime__ = (function() {
|
|
|
854
928
|
},
|
|
855
929
|
{
|
|
856
930
|
key: "bubble",
|
|
857
|
-
value: function e(e, t, r, n, o,
|
|
858
|
-
var
|
|
931
|
+
value: function e(e, t, r, n, o, i) {
|
|
932
|
+
var u = this;
|
|
859
933
|
if (o.has(e)) return;
|
|
860
934
|
o.add(e);
|
|
861
935
|
r.add(e);
|
|
862
|
-
if (
|
|
936
|
+
if (i != null && e === i) return {
|
|
863
937
|
type: "full-reload",
|
|
864
|
-
reason: "Update propagated back to ".concat(
|
|
938
|
+
reason: "Update propagated back to ".concat(i)
|
|
865
939
|
};
|
|
866
940
|
if (this.isSelfAccepted(e)) {
|
|
867
941
|
n.push([e, e]);
|
|
868
942
|
return;
|
|
869
943
|
}
|
|
870
|
-
var
|
|
871
|
-
return
|
|
944
|
+
var l = this.getImporters(e).filter(function(e) {
|
|
945
|
+
return u.isExecuted(e);
|
|
872
946
|
});
|
|
873
|
-
if (
|
|
947
|
+
if (l.length === 0) return {
|
|
874
948
|
type: "full-reload",
|
|
875
949
|
reason: "No HMR boundary found for ".concat(e)
|
|
876
950
|
};
|
|
877
|
-
var
|
|
951
|
+
var a = true, s = false, c = void 0;
|
|
878
952
|
try {
|
|
879
|
-
for (var f =
|
|
880
|
-
var
|
|
881
|
-
if (this.acceptsDependency(
|
|
882
|
-
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]);
|
|
883
957
|
continue;
|
|
884
958
|
}
|
|
885
|
-
if (t.includes(
|
|
959
|
+
if (t.includes(p)) return {
|
|
886
960
|
type: "full-reload",
|
|
887
|
-
reason: "Circular import chain between ".concat(e, " and ").concat(
|
|
961
|
+
reason: "Circular import chain between ".concat(e, " and ").concat(p)
|
|
888
962
|
};
|
|
889
|
-
var
|
|
890
|
-
if (
|
|
963
|
+
var h = this.bubble(p, _to_consumable_array(t).concat([p]), r, n, o, i);
|
|
964
|
+
if (h != null) return h;
|
|
891
965
|
}
|
|
892
966
|
} catch (e) {
|
|
893
967
|
s = true;
|
|
894
968
|
c = e;
|
|
895
969
|
} finally {
|
|
896
970
|
try {
|
|
897
|
-
if (!
|
|
971
|
+
if (!a && f.return != null) f.return();
|
|
898
972
|
} finally {
|
|
899
973
|
if (s) throw c;
|
|
900
974
|
}
|
|
@@ -925,110 +999,110 @@ var __rolldown_runtime__ = (function() {
|
|
|
925
999
|
key: "applyUpdate",
|
|
926
1000
|
value: function e(e, t) {
|
|
927
1001
|
var r = this;
|
|
928
|
-
var n = true, o = false,
|
|
1002
|
+
var n = true, o = false, i = void 0;
|
|
929
1003
|
try {
|
|
930
|
-
for (var
|
|
931
|
-
var
|
|
932
|
-
if (!this.hasFactory(
|
|
933
|
-
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));
|
|
934
1008
|
return;
|
|
935
1009
|
}
|
|
936
1010
|
}
|
|
937
1011
|
} catch (e) {
|
|
938
1012
|
o = true;
|
|
939
|
-
|
|
1013
|
+
i = e;
|
|
940
1014
|
} finally {
|
|
941
1015
|
try {
|
|
942
|
-
if (!n &&
|
|
1016
|
+
if (!n && u.return != null) u.return();
|
|
943
1017
|
} finally {
|
|
944
|
-
if (o) throw
|
|
1018
|
+
if (o) throw i;
|
|
945
1019
|
}
|
|
946
1020
|
}
|
|
947
1021
|
var s = e.boundaries.map(function(e) {
|
|
948
1022
|
var t = _sliced_to_array(e, 2), n = t[0], o = t[1];
|
|
949
|
-
var a;
|
|
950
1023
|
var i;
|
|
1024
|
+
var u;
|
|
951
1025
|
return {
|
|
952
1026
|
acceptedVia: o,
|
|
953
|
-
callbacks: (
|
|
1027
|
+
callbacks: (i = (u = r.moduleHotContexts.get(n)) === null || u === void 0 ? void 0 : u.acceptCallbacks.filter(function(e) {
|
|
954
1028
|
return e.deps.includes(o);
|
|
955
|
-
})) !== null &&
|
|
1029
|
+
})) !== null && i !== void 0 ? i : []
|
|
956
1030
|
};
|
|
957
1031
|
});
|
|
958
1032
|
var c = true, f = false, d = void 0;
|
|
959
1033
|
try {
|
|
960
|
-
for (var
|
|
961
|
-
var
|
|
962
|
-
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);
|
|
963
1037
|
}
|
|
964
1038
|
} catch (e) {
|
|
965
1039
|
f = true;
|
|
966
1040
|
d = e;
|
|
967
1041
|
} finally {
|
|
968
1042
|
try {
|
|
969
|
-
if (!c &&
|
|
1043
|
+
if (!c && p.return != null) p.return();
|
|
970
1044
|
} finally {
|
|
971
1045
|
if (f) throw d;
|
|
972
1046
|
}
|
|
973
1047
|
}
|
|
974
|
-
var y = true, m = false,
|
|
1048
|
+
var y = true, m = false, _ = void 0;
|
|
975
1049
|
try {
|
|
976
|
-
var
|
|
977
|
-
var e =
|
|
978
|
-
|
|
979
|
-
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);
|
|
980
1054
|
try {
|
|
981
|
-
|
|
982
|
-
var
|
|
1055
|
+
b.currentFirstInvalidatedBy = t;
|
|
1056
|
+
var i = true, u = false, l = void 0;
|
|
983
1057
|
try {
|
|
984
|
-
for (var
|
|
1058
|
+
for (var a = n[Symbol.iterator](), s; !(i = (s = a.next()).done); i = true) {
|
|
985
1059
|
var c = s.value, f = c.deps, d = c.fn;
|
|
986
1060
|
d(f.map(function(e) {
|
|
987
1061
|
return e === r ? o : void 0;
|
|
988
1062
|
}));
|
|
989
1063
|
}
|
|
990
1064
|
} catch (e) {
|
|
991
|
-
|
|
992
|
-
|
|
1065
|
+
u = true;
|
|
1066
|
+
l = e;
|
|
993
1067
|
} finally {
|
|
994
1068
|
try {
|
|
995
|
-
if (!
|
|
1069
|
+
if (!i && a.return != null) a.return();
|
|
996
1070
|
} finally {
|
|
997
|
-
if (
|
|
1071
|
+
if (u) throw l;
|
|
998
1072
|
}
|
|
999
1073
|
}
|
|
1000
1074
|
} finally {
|
|
1001
|
-
|
|
1075
|
+
b.currentFirstInvalidatedBy = void 0;
|
|
1002
1076
|
}
|
|
1003
1077
|
};
|
|
1004
|
-
for (var
|
|
1078
|
+
for (var g = s[Symbol.iterator](), w; !(y = (w = g.next()).done); y = true) b = this, k();
|
|
1005
1079
|
} catch (e) {
|
|
1006
1080
|
m = true;
|
|
1007
|
-
|
|
1081
|
+
_ = e;
|
|
1008
1082
|
} finally {
|
|
1009
1083
|
try {
|
|
1010
|
-
if (!y &&
|
|
1084
|
+
if (!y && g.return != null) g.return();
|
|
1011
1085
|
} finally {
|
|
1012
|
-
if (m) throw
|
|
1086
|
+
if (m) throw _;
|
|
1013
1087
|
}
|
|
1014
1088
|
}
|
|
1015
|
-
var
|
|
1089
|
+
var x = true, H = false, S = void 0;
|
|
1016
1090
|
try {
|
|
1017
|
-
for (var M = this.moduleHotContextsToBeUpdated[Symbol.iterator](), C; !(
|
|
1018
|
-
var R = _sliced_to_array(C.value, 2),
|
|
1019
|
-
var
|
|
1020
|
-
(
|
|
1021
|
-
if (
|
|
1022
|
-
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);
|
|
1023
1097
|
}
|
|
1024
1098
|
} catch (e) {
|
|
1025
|
-
|
|
1026
|
-
|
|
1099
|
+
H = true;
|
|
1100
|
+
S = e;
|
|
1027
1101
|
} finally {
|
|
1028
1102
|
try {
|
|
1029
|
-
if (!
|
|
1103
|
+
if (!x && M.return != null) M.return();
|
|
1030
1104
|
} finally {
|
|
1031
|
-
if (
|
|
1105
|
+
if (H) throw S;
|
|
1032
1106
|
}
|
|
1033
1107
|
}
|
|
1034
1108
|
this.moduleHotContextsToBeUpdated.clear();
|
|
@@ -1088,20 +1162,20 @@ var __rolldown_runtime__ = (function() {
|
|
|
1088
1162
|
return;
|
|
1089
1163
|
}
|
|
1090
1164
|
e.set(r.id, r);
|
|
1091
|
-
var o = true,
|
|
1165
|
+
var o = true, i = false, u = void 0;
|
|
1092
1166
|
try {
|
|
1093
|
-
for (var
|
|
1094
|
-
var s =
|
|
1167
|
+
for (var l = t[Symbol.iterator](), a; !(o = (a = l.next()).done); o = true) {
|
|
1168
|
+
var s = a.value;
|
|
1095
1169
|
s(r);
|
|
1096
1170
|
}
|
|
1097
1171
|
} catch (e) {
|
|
1098
|
-
|
|
1099
|
-
|
|
1172
|
+
i = true;
|
|
1173
|
+
u = e;
|
|
1100
1174
|
} finally {
|
|
1101
1175
|
try {
|
|
1102
|
-
if (!o &&
|
|
1176
|
+
if (!o && l.return != null) l.return();
|
|
1103
1177
|
} finally {
|
|
1104
|
-
if (
|
|
1178
|
+
if (i) throw u;
|
|
1105
1179
|
}
|
|
1106
1180
|
}
|
|
1107
1181
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import { resetCache } from "./utils/reset-cache.js";
|
|
|
19
19
|
import { Bundler } from "./core/bundler.js";
|
|
20
20
|
import { assets_d_exports } from "./core/assets.js";
|
|
21
21
|
import { LoadEnvOptions, loadEnv } from "./core/env.js";
|
|
22
|
+
import { resolveWorkletsConfig } from "./utils/worklets.js";
|
|
22
23
|
import { constants_d_exports } from "./constants.js";
|
|
23
24
|
import { HMRClientLogLevel, HMRClientMessage, HMRContext, HMRCustomHandler, HMRCustomMessage, HMRServerError, HMRServerMessage } from "./types/hmr.js";
|
|
24
25
|
import { cli_d_exports } from "./node/cli.js";
|
|
@@ -29,4 +30,4 @@ import { OutputChunk } from "@rollipop/rolldown";
|
|
|
29
30
|
export declare function runBuild(config: ResolvedConfig, options: BuildOptions): Promise<OutputChunk>;
|
|
30
31
|
export declare function runServer(config: ResolvedConfig, options: ServerOptions): Promise<DevServer>;
|
|
31
32
|
//#endregion
|
|
32
|
-
export { type AliasConfig, type AnalyzerConfig, assets_d_exports as AssetUtils, type AsyncResult, type BabelTransformConfig, type BuildDiagnosticLog, type BuildOptions, type BuildType, type BundleDetails, Bundler, type BundlerContext, type BundlerState, type ChangeEvent, type Config, constants_d_exports as Constants, DEFAULT_HOST, DEFAULT_PORT, DEV_SERVER_ASSET_PATH, type DeepRequired, DefaultConfig, DefineConfigContext, type DevConfig, type DevEngine, type DevEngineOptions, type DevServer, type DevServerContext, type DevServerEvents, type DevToolsPluginOptions, DynamicUserConfig, type ExperimentalConfig, type ExtractObject, type FastifyInstance, type FlowConfig, type FlowConfig as RollipopReactNativeFlowConfig, type FormattedError, type HMRClientLogLevel, type HMRClientMessage, type HMRContext, type HMRCustomHandler, type HMRCustomMessage, type HMRServerError, type HMRServerMessage, type HmrConfig, type HotUpdateOptions, InteractiveCommand, InteractiveCommandContext, InteractiveModeOptions, InternalConfig, type JsxOptions, LoadConfigOptions, LoadEnvOptions, type MaybePromise, type Middlewares, type NullValue, type OptimizationConfig, type OutputConfig, type PackageJson, type Plugin, type PluginConfig, PluginFlattenConfig, type PluginOption, type PluginWithHotUpdate, type Polyfill, type PolyfillOptions, type PolyfillType, type PolyfillWithCode, type PolyfillWithPath, type ReactNativeConfig, type ReportableEvent, type Reporter, type ResolveConfig, ResolvedConfig, type RolldownOptions, type RolldownOptionsConfig, type RolldownOptionsContext, type RolldownOptionsFunction, type RollipopDevToolsNodeContext, type SwcConfig as RollipopReactNativeSwcConfig, type SwcConfig, type WorkletsConfig as RollipopReactNativeWorkletsConfig, type WorkletsConfig, type ServerOptions, type SwcTransformConfig, type TransformConfig, type TransformRule, UserConfig, type WatcherConfig, cli_d_exports as cli, createCommand, createDevServer, createReactNativeCliCommand, defineConfig, flattenPluginOption, getDefaultConfig, invokeConfigResolved, loadConfig, loadEnv, mergeConfig, index_d_exports as plugins, resetCache, resolvePluginConfig, rolldown, rolldownExperimental, setupInteractiveMode };
|
|
33
|
+
export { type AliasConfig, type AnalyzerConfig, assets_d_exports as AssetUtils, type AsyncResult, type BabelTransformConfig, type BuildDiagnosticLog, type BuildOptions, type BuildType, type BundleDetails, Bundler, type BundlerContext, type BundlerState, type ChangeEvent, type Config, constants_d_exports as Constants, DEFAULT_HOST, DEFAULT_PORT, DEV_SERVER_ASSET_PATH, type DeepRequired, DefaultConfig, DefineConfigContext, type DevConfig, type DevEngine, type DevEngineOptions, type DevServer, type DevServerContext, type DevServerEvents, type DevToolsPluginOptions, DynamicUserConfig, type ExperimentalConfig, type ExtractObject, type FastifyInstance, type FlowConfig, type FlowConfig as RollipopReactNativeFlowConfig, type FormattedError, type HMRClientLogLevel, type HMRClientMessage, type HMRContext, type HMRCustomHandler, type HMRCustomMessage, type HMRServerError, type HMRServerMessage, type HmrConfig, type HotUpdateOptions, InteractiveCommand, InteractiveCommandContext, InteractiveModeOptions, InternalConfig, type JsxOptions, LoadConfigOptions, LoadEnvOptions, type MaybePromise, type Middlewares, type NullValue, type OptimizationConfig, type OutputConfig, type PackageJson, type Plugin, type PluginConfig, PluginFlattenConfig, type PluginOption, type PluginWithHotUpdate, type Polyfill, type PolyfillOptions, type PolyfillType, type PolyfillWithCode, type PolyfillWithPath, type ReactNativeConfig, type ReportableEvent, type Reporter, type ResolveConfig, ResolvedConfig, type RolldownOptions, type RolldownOptionsConfig, type RolldownOptionsContext, type RolldownOptionsFunction, type RollipopDevToolsNodeContext, type SwcConfig as RollipopReactNativeSwcConfig, type SwcConfig, type WorkletsConfig as RollipopReactNativeWorkletsConfig, type WorkletsConfig, type ServerOptions, type SwcTransformConfig, type TransformConfig, type TransformRule, UserConfig, type WatcherConfig, cli_d_exports as cli, createCommand, createDevServer, createReactNativeCliCommand, defineConfig, flattenPluginOption, getDefaultConfig, invokeConfigResolved, loadConfig, loadEnv, mergeConfig, index_d_exports as plugins, resetCache, resolvePluginConfig, resolveWorkletsConfig, rolldown, rolldownExperimental, setupInteractiveMode };
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { mergeConfig } from "./config/merge-config.js";
|
|
|
5
5
|
import { flattenPluginOption, invokeConfigResolved, loadConfig, resolvePluginConfig } from "./config/load-config.js";
|
|
6
6
|
import "./config/index.js";
|
|
7
7
|
import { resetCache } from "./utils/reset-cache.js";
|
|
8
|
+
import { resolveWorkletsConfig } from "./utils/worklets.js";
|
|
8
9
|
import { loadEnv } from "./core/env.js";
|
|
9
10
|
import { DEFAULT_HOST, DEFAULT_PORT, DEV_SERVER_ASSET_PATH } from "./server/constants.js";
|
|
10
11
|
import { createDevServer } from "./server/index.js";
|
|
@@ -26,4 +27,4 @@ async function runServer(config, options) {
|
|
|
26
27
|
return runServer(config, options);
|
|
27
28
|
}
|
|
28
29
|
//#endregion
|
|
29
|
-
export { assets_exports as AssetUtils, Bundler, constants_exports as Constants, DEFAULT_HOST, DEFAULT_PORT, DEV_SERVER_ASSET_PATH, cli_exports as cli, createCommand, createDevServer, createReactNativeCliCommand, defineConfig, flattenPluginOption, getDefaultConfig, invokeConfigResolved, loadConfig, loadEnv, mergeConfig, plugins_exports as plugins, resetCache, resolvePluginConfig, rolldown, rolldownExperimental, runBuild, runServer, setupInteractiveMode };
|
|
30
|
+
export { assets_exports as AssetUtils, Bundler, constants_exports as Constants, DEFAULT_HOST, DEFAULT_PORT, DEV_SERVER_ASSET_PATH, cli_exports as cli, createCommand, createDevServer, createReactNativeCliCommand, defineConfig, flattenPluginOption, getDefaultConfig, invokeConfigResolved, loadConfig, loadEnv, mergeConfig, plugins_exports as plugins, resetCache, resolvePluginConfig, resolveWorkletsConfig, rolldown, rolldownExperimental, runBuild, runServer, setupInteractiveMode };
|