vxrn 2.11.4 → 2.11.5

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.
@@ -377,55 +377,69 @@ function getNativePlugins(root, platform, viteImportGlobPlugin, dev, assetsDest,
377
377
  return mark;
378
378
  } catch (unused) {}
379
379
  };
380
- return [{
381
- name: "test-native-hmr-trace-first-pre",
382
- load: {
383
- order: "pre",
384
- handler(id) {
385
- var _start;
386
- (_start = start(id, "load:first")) === null || _start === void 0 || _start("end");
387
- return null;
380
+ return [
381
+ {
382
+ name: "test-native-hmr-trace-first-pre",
383
+ load: {
384
+ order: "pre",
385
+ handler(id) {
386
+ var _start;
387
+ (_start = start(id, "load:first")) === null || _start === void 0 || _start("end");
388
+ return null;
389
+ }
390
+ },
391
+ transform: {
392
+ order: "pre",
393
+ handler(_code, id) {
394
+ var _start;
395
+ (_start = start(id, "pre:first")) === null || _start === void 0 || _start("end");
396
+ return null;
397
+ }
388
398
  }
389
399
  },
390
- transform: {
391
- order: "pre",
392
- handler(_code, id) {
393
- var _start;
394
- (_start = start(id, "pre:first")) === null || _start === void 0 || _start("end");
395
- return null;
396
- }
397
- }
398
- }, ...plugins.map(function(plugin, index) {
399
- if (plugin.name !== "one:use-dom-native" && plugin.name !== "vxrn:rn-codegen" && plugin.name !== "one:background-computation:native" && plugin.name !== "one-client-tree-shake") return plugin;
400
- var hook = plugin.transform;
401
- if (!hook || typeof hook === "function" || hook.order !== "pre") return plugin;
402
- return {
403
- ...plugin,
404
- transform: {
405
- ...hook,
406
- handler() {
407
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
408
- var mark = start(args[1], `pre:${index}:${plugin.name}`);
409
- if (!mark) return hook.handler.apply(this, args);
410
- try {
411
- var result = hook.handler.apply(this, args);
412
- if (result instanceof Promise) try {
413
- Promise.prototype.then.call(result, function() {
414
- return mark("end");
415
- }, function() {
416
- return mark("error");
417
- });
418
- } catch (unused) {}
419
- else mark("end");
420
- return result;
421
- } catch (error) {
422
- mark("error");
423
- throw error;
400
+ ...plugins.map(function(plugin, index) {
401
+ if (plugin.name !== "one:use-dom-native" && plugin.name !== "vxrn:rn-codegen" && plugin.name !== "one:background-computation:native" && plugin.name !== "one-client-tree-shake") return plugin;
402
+ var hook = plugin.transform;
403
+ if (!hook || typeof hook === "function" || hook.order !== "pre") return plugin;
404
+ return {
405
+ ...plugin,
406
+ transform: {
407
+ ...hook,
408
+ handler() {
409
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
410
+ var mark = start(args[1], `pre:${index}:${plugin.name}`);
411
+ if (!mark) return hook.handler.apply(this, args);
412
+ try {
413
+ var result = hook.handler.apply(this, args);
414
+ if (result instanceof Promise) try {
415
+ Promise.prototype.then.call(result, function() {
416
+ return mark("end");
417
+ }, function() {
418
+ return mark("error");
419
+ });
420
+ } catch (unused) {}
421
+ else mark("end");
422
+ return result;
423
+ } catch (error) {
424
+ mark("error");
425
+ throw error;
426
+ }
424
427
  }
425
428
  }
429
+ };
430
+ }),
431
+ {
432
+ name: "test-native-hmr-trace-load-fallthrough",
433
+ load: {
434
+ order: "post",
435
+ handler(id) {
436
+ var _start;
437
+ (_start = start(id, "load:fallthrough")) === null || _start === void 0 || _start("end");
438
+ return null;
439
+ }
426
440
  }
427
- };
428
- })];
441
+ }
442
+ ];
429
443
  }
430
444
  function getNativeOutputOptions(prelude, sourcemap, minify) {
431
445
  return {