@wix/cli-app 1.1.59 → 1.1.61

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.
Files changed (96) hide show
  1. package/build/{CreateVersionCommand-6HJGN4WS.js → CreateVersionCommand-27X5XRUT.js} +14 -14
  2. package/build/{DevCommand-U7PV4HW6.js → DevCommand-6HTMGZ2M.js} +12 -12
  3. package/build/{GenerateCommand-M3T6OD4B.js → GenerateCommand-7IAUS6BH.js} +113 -43
  4. package/build/{GenerateCommand-M3T6OD4B.js.map → GenerateCommand-7IAUS6BH.js.map} +1 -1
  5. package/build/{LogsCommand-ECPZQ3LE.js → LogsCommand-WPUUN3JU.js} +4 -4
  6. package/build/PreviewCommand-CU46IAJE.js +23 -0
  7. package/build/{ReleaseCommand-KLZWNOVY.js → ReleaseCommand-KTVVW67B.js} +14 -14
  8. package/build/{ServeCommand-I65XXTLM.js → ServeCommand-LXJK73IU.js} +13 -13
  9. package/build/{build-HZ5LVFAS.js → build-KOJIDD4M.js} +38 -9
  10. package/build/build-KOJIDD4M.js.map +1 -0
  11. package/build/{chunk-PAWIUC26.js → chunk-2GCKBITG.js} +8 -8
  12. package/build/{chunk-4JDHJDA5.js → chunk-63EMUDZG.js} +3 -3
  13. package/build/{chunk-QW4WBWJK.js → chunk-A3UPTTKJ.js} +3 -3
  14. package/build/{chunk-UQBZVJDQ.js → chunk-EL6CIFIN.js} +3 -3
  15. package/build/{chunk-QVGYU6D4.js → chunk-ELYFHAX6.js} +5 -2
  16. package/build/chunk-ELYFHAX6.js.map +1 -0
  17. package/build/{chunk-IDWDZWLM.js → chunk-IL6O6OIL.js} +2 -2
  18. package/build/{chunk-W4HI7DI3.js → chunk-KJF6LWGQ.js} +2 -2
  19. package/build/{chunk-AQKGIDJO.js → chunk-KJRYBTZB.js} +429 -186
  20. package/build/chunk-KJRYBTZB.js.map +1 -0
  21. package/build/{chunk-EZLVJJON.js → chunk-LOLULZLU.js} +3 -3
  22. package/build/{chunk-U72IPCQR.js → chunk-MEDHLZDL.js} +3 -3
  23. package/build/{chunk-FMM24YL4.js → chunk-MKPZBVQD.js} +442 -97
  24. package/build/chunk-MKPZBVQD.js.map +1 -0
  25. package/build/{chunk-BNROT2BN.js → chunk-OHF42SKC.js} +5 -5
  26. package/build/{chunk-OCC6MO6R.js → chunk-PBUNWOQL.js} +7 -7
  27. package/build/chunk-PBUNWOQL.js.map +1 -0
  28. package/build/{chunk-FHMCCDCY.js → chunk-S7UPYDTK.js} +3 -3
  29. package/build/chunk-SJY44CC7.js +19161 -0
  30. package/build/chunk-SJY44CC7.js.map +1 -0
  31. package/build/{chunk-ACN6EZGH.js → chunk-XBBIROHO.js} +3 -3
  32. package/build/{chunk-DXNFLVQP.js → chunk-XCKLCHGL.js} +195 -176
  33. package/build/chunk-XCKLCHGL.js.map +1 -0
  34. package/build/{chunk-ZJYRE4BT.js → chunk-Z7MEHVBF.js} +3 -3
  35. package/build/cloudflare-runtime/entry.js +7166 -54
  36. package/build/cloudflare-runtime/getRegisteredExtensions.js +7096 -16
  37. package/build/index.js +20 -20
  38. package/build/platform-sdk/chunk-BGTZ3RNN.js +2 -0
  39. package/build/platform-sdk/chunk-BGTZ3RNN.js.map +1 -0
  40. package/build/platform-sdk/{chunk-LO6MZPZE.js → chunk-FWUYJ3UR.js} +2 -2
  41. package/build/platform-sdk/chunk-NAPHVUFM.js +2 -0
  42. package/build/platform-sdk/chunk-NAPHVUFM.js.map +1 -0
  43. package/build/platform-sdk/chunk-XYIDODIB.js +2 -0
  44. package/build/platform-sdk/chunk-XYIDODIB.js.map +1 -0
  45. package/build/platform-sdk/dashboard.js +1 -1
  46. package/build/platform-sdk/dashboard.js.map +1 -1
  47. package/build/platform-sdk/editor.js +2 -2
  48. package/build/platform-sdk/editor.js.map +1 -1
  49. package/build/platform-sdk/sdk-context.js +2 -0
  50. package/build/platform-sdk/sdk-context.js.map +1 -0
  51. package/build/platform-sdk/site.js +1 -1
  52. package/build/platform-sdk/site.js.map +1 -1
  53. package/build/platform-sdk/web-methods.js +1 -1
  54. package/build/platform-sdk/web-methods.js.map +1 -1
  55. package/build/{preview-FI6WYZUP.js → preview-YEREVN42.js} +12 -12
  56. package/build/{render-command-UKYXN7C7.js → render-command-H5DHMFOD.js} +6 -6
  57. package/package.json +8 -6
  58. package/schemas/custom-element.json +1 -1
  59. package/schemas/site-plugin.json +1 -1
  60. package/schemas/wix-config.json +1 -1
  61. package/templates/custom-element/files/element.module.css.ejs +18 -5
  62. package/templates/custom-element/files/element.tsx.ejs +8 -5
  63. package/templates/custom-element/files/panel.tsx.ejs +25 -12
  64. package/templates/web-method/files/placeholder.ts.ejs +1 -1
  65. package/build/PreviewCommand-ZQ3OUOKW.js +0 -23
  66. package/build/build-HZ5LVFAS.js.map +0 -1
  67. package/build/chunk-AQKGIDJO.js.map +0 -1
  68. package/build/chunk-DXNFLVQP.js.map +0 -1
  69. package/build/chunk-FMM24YL4.js.map +0 -1
  70. package/build/chunk-OCC6MO6R.js.map +0 -1
  71. package/build/chunk-QVGYU6D4.js.map +0 -1
  72. package/build/chunk-ZXHKA32C.js +0 -1367
  73. package/build/chunk-ZXHKA32C.js.map +0 -1
  74. package/build/platform-sdk/chunk-EVF6HSFE.js +0 -2
  75. package/build/platform-sdk/chunk-EVF6HSFE.js.map +0 -1
  76. /package/build/{CreateVersionCommand-6HJGN4WS.js.map → CreateVersionCommand-27X5XRUT.js.map} +0 -0
  77. /package/build/{DevCommand-U7PV4HW6.js.map → DevCommand-6HTMGZ2M.js.map} +0 -0
  78. /package/build/{LogsCommand-ECPZQ3LE.js.map → LogsCommand-WPUUN3JU.js.map} +0 -0
  79. /package/build/{PreviewCommand-ZQ3OUOKW.js.map → PreviewCommand-CU46IAJE.js.map} +0 -0
  80. /package/build/{ReleaseCommand-KLZWNOVY.js.map → ReleaseCommand-KTVVW67B.js.map} +0 -0
  81. /package/build/{ServeCommand-I65XXTLM.js.map → ServeCommand-LXJK73IU.js.map} +0 -0
  82. /package/build/{chunk-PAWIUC26.js.map → chunk-2GCKBITG.js.map} +0 -0
  83. /package/build/{chunk-4JDHJDA5.js.map → chunk-63EMUDZG.js.map} +0 -0
  84. /package/build/{chunk-QW4WBWJK.js.map → chunk-A3UPTTKJ.js.map} +0 -0
  85. /package/build/{chunk-UQBZVJDQ.js.map → chunk-EL6CIFIN.js.map} +0 -0
  86. /package/build/{chunk-IDWDZWLM.js.map → chunk-IL6O6OIL.js.map} +0 -0
  87. /package/build/{chunk-W4HI7DI3.js.map → chunk-KJF6LWGQ.js.map} +0 -0
  88. /package/build/{chunk-EZLVJJON.js.map → chunk-LOLULZLU.js.map} +0 -0
  89. /package/build/{chunk-U72IPCQR.js.map → chunk-MEDHLZDL.js.map} +0 -0
  90. /package/build/{chunk-BNROT2BN.js.map → chunk-OHF42SKC.js.map} +0 -0
  91. /package/build/{chunk-FHMCCDCY.js.map → chunk-S7UPYDTK.js.map} +0 -0
  92. /package/build/{chunk-ACN6EZGH.js.map → chunk-XBBIROHO.js.map} +0 -0
  93. /package/build/{chunk-ZJYRE4BT.js.map → chunk-Z7MEHVBF.js.map} +0 -0
  94. /package/build/platform-sdk/{chunk-LO6MZPZE.js.map → chunk-FWUYJ3UR.js.map} +0 -0
  95. /package/build/{preview-FI6WYZUP.js.map → preview-YEREVN42.js.map} +0 -0
  96. /package/build/{render-command-UKYXN7C7.js.map → render-command-H5DHMFOD.js.map} +0 -0
@@ -2,7 +2,7 @@ import { createRequire as _createRequire } from 'node:module';
2
2
  const require = _createRequire(import.meta.url);
3
3
  import {
4
4
  require_baseUniq
5
- } from "./chunk-W4HI7DI3.js";
5
+ } from "./chunk-KJF6LWGQ.js";
6
6
  import {
7
7
  BLOCKS_WIDGETS_PANELS_PATTERN,
8
8
  BLOCKS_WIDGETS_PATTERN,
@@ -21,7 +21,9 @@ import {
21
21
  ExtendingComponentType,
22
22
  HeightMode,
23
23
  MonitoringType,
24
+ PanelContentType,
24
25
  PanelSizeWidth,
26
+ RELATIVE_ASSET_PATH_REGEX,
25
27
  RegionType,
26
28
  SERVICE_PLUGINS_PATTERN,
27
29
  SITE_PLUGINS_PANEL_PATTERN,
@@ -37,8 +39,12 @@ import {
37
39
  getBackendEventSlug,
38
40
  getBackendOptimizedDir,
39
41
  getDataDirPath,
42
+ pRetry,
43
+ readFile,
40
44
  replaceExtension,
41
45
  require_picomatch,
46
+ resolveUrl,
47
+ serializer,
42
48
  virtualBlocksWidgetPanelScriptAssets,
43
49
  virtualBlocksWidgetScriptAssets,
44
50
  virtualCustomElementPanelHTMLAssets,
@@ -52,14 +58,14 @@ import {
52
58
  virtualModuleIdForScriptAsset,
53
59
  virtualPathForCustomElementPanelHTMLAsset,
54
60
  virtualPathForHTMLAsset
55
- } from "./chunk-FMM24YL4.js";
61
+ } from "./chunk-MKPZBVQD.js";
56
62
  import {
57
63
  CliError,
58
64
  CliErrorCode,
59
65
  getTestOverrides,
60
66
  require_lib,
61
67
  z
62
- } from "./chunk-DXNFLVQP.js";
68
+ } from "./chunk-XCKLCHGL.js";
63
69
  import {
64
70
  __commonJS,
65
71
  __esm,
@@ -153,14 +159,14 @@ var require_polyfills = __commonJS({
153
159
  fs2.fstatSync = statFixSync(fs2.fstatSync);
154
160
  fs2.lstatSync = statFixSync(fs2.lstatSync);
155
161
  if (fs2.chmod && !fs2.lchmod) {
156
- fs2.lchmod = function(path6, mode, cb) {
162
+ fs2.lchmod = function(path7, mode, cb) {
157
163
  if (cb) process.nextTick(cb);
158
164
  };
159
165
  fs2.lchmodSync = function() {
160
166
  };
161
167
  }
162
168
  if (fs2.chown && !fs2.lchown) {
163
- fs2.lchown = function(path6, uid, gid, cb) {
169
+ fs2.lchown = function(path7, uid, gid, cb) {
164
170
  if (cb) process.nextTick(cb);
165
171
  };
166
172
  fs2.lchownSync = function() {
@@ -227,9 +233,9 @@ var require_polyfills = __commonJS({
227
233
  };
228
234
  }(fs2.readSync);
229
235
  function patchLchmod(fs3) {
230
- fs3.lchmod = function(path6, mode, callback) {
236
+ fs3.lchmod = function(path7, mode, callback) {
231
237
  fs3.open(
232
- path6,
238
+ path7,
233
239
  constants.O_WRONLY | constants.O_SYMLINK,
234
240
  mode,
235
241
  function(err, fd) {
@@ -245,8 +251,8 @@ var require_polyfills = __commonJS({
245
251
  }
246
252
  );
247
253
  };
248
- fs3.lchmodSync = function(path6, mode) {
249
- var fd = fs3.openSync(path6, constants.O_WRONLY | constants.O_SYMLINK, mode);
254
+ fs3.lchmodSync = function(path7, mode) {
255
+ var fd = fs3.openSync(path7, constants.O_WRONLY | constants.O_SYMLINK, mode);
250
256
  var threw = true;
251
257
  var ret;
252
258
  try {
@@ -267,8 +273,8 @@ var require_polyfills = __commonJS({
267
273
  }
268
274
  function patchLutimes(fs3) {
269
275
  if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) {
270
- fs3.lutimes = function(path6, at2, mt, cb) {
271
- fs3.open(path6, constants.O_SYMLINK, function(er, fd) {
276
+ fs3.lutimes = function(path7, at2, mt, cb) {
277
+ fs3.open(path7, constants.O_SYMLINK, function(er, fd) {
272
278
  if (er) {
273
279
  if (cb) cb(er);
274
280
  return;
@@ -280,8 +286,8 @@ var require_polyfills = __commonJS({
280
286
  });
281
287
  });
282
288
  };
283
- fs3.lutimesSync = function(path6, at2, mt) {
284
- var fd = fs3.openSync(path6, constants.O_SYMLINK);
289
+ fs3.lutimesSync = function(path7, at2, mt) {
290
+ var fd = fs3.openSync(path7, constants.O_SYMLINK);
285
291
  var ret;
286
292
  var threw = true;
287
293
  try {
@@ -401,11 +407,11 @@ var require_legacy_streams = __commonJS({
401
407
  ReadStream,
402
408
  WriteStream
403
409
  };
404
- function ReadStream(path6, options) {
405
- if (!(this instanceof ReadStream)) return new ReadStream(path6, options);
410
+ function ReadStream(path7, options) {
411
+ if (!(this instanceof ReadStream)) return new ReadStream(path7, options);
406
412
  Stream.call(this);
407
413
  var self2 = this;
408
- this.path = path6;
414
+ this.path = path7;
409
415
  this.fd = null;
410
416
  this.readable = true;
411
417
  this.paused = false;
@@ -450,10 +456,10 @@ var require_legacy_streams = __commonJS({
450
456
  self2._read();
451
457
  });
452
458
  }
453
- function WriteStream(path6, options) {
454
- if (!(this instanceof WriteStream)) return new WriteStream(path6, options);
459
+ function WriteStream(path7, options) {
460
+ if (!(this instanceof WriteStream)) return new WriteStream(path7, options);
455
461
  Stream.call(this);
456
- this.path = path6;
462
+ this.path = path7;
457
463
  this.fd = null;
458
464
  this.writable = true;
459
465
  this.flags = "w";
@@ -598,15 +604,15 @@ var require_graceful_fs = __commonJS({
598
604
  fs3.createReadStream = createReadStream;
599
605
  fs3.createWriteStream = createWriteStream;
600
606
  var fs$readFile = fs3.readFile;
601
- fs3.readFile = readFile4;
602
- function readFile4(path6, options, cb) {
607
+ fs3.readFile = readFile5;
608
+ function readFile5(path7, options, cb) {
603
609
  if (typeof options === "function")
604
610
  cb = options, options = null;
605
- return go$readFile(path6, options, cb);
606
- function go$readFile(path7, options2, cb2, startTime) {
607
- return fs$readFile(path7, options2, function(err) {
611
+ return go$readFile(path7, options, cb);
612
+ function go$readFile(path8, options2, cb2, startTime) {
613
+ return fs$readFile(path8, options2, function(err) {
608
614
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
609
- enqueue([go$readFile, [path7, options2, cb2], err, startTime || Date.now(), Date.now()]);
615
+ enqueue([go$readFile, [path8, options2, cb2], err, startTime || Date.now(), Date.now()]);
610
616
  else {
611
617
  if (typeof cb2 === "function")
612
618
  cb2.apply(this, arguments);
@@ -616,14 +622,14 @@ var require_graceful_fs = __commonJS({
616
622
  }
617
623
  var fs$writeFile = fs3.writeFile;
618
624
  fs3.writeFile = writeFile3;
619
- function writeFile3(path6, data2, options, cb) {
625
+ function writeFile3(path7, data2, options, cb) {
620
626
  if (typeof options === "function")
621
627
  cb = options, options = null;
622
- return go$writeFile(path6, data2, options, cb);
623
- function go$writeFile(path7, data3, options2, cb2, startTime) {
624
- return fs$writeFile(path7, data3, options2, function(err) {
628
+ return go$writeFile(path7, data2, options, cb);
629
+ function go$writeFile(path8, data3, options2, cb2, startTime) {
630
+ return fs$writeFile(path8, data3, options2, function(err) {
625
631
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
626
- enqueue([go$writeFile, [path7, data3, options2, cb2], err, startTime || Date.now(), Date.now()]);
632
+ enqueue([go$writeFile, [path8, data3, options2, cb2], err, startTime || Date.now(), Date.now()]);
627
633
  else {
628
634
  if (typeof cb2 === "function")
629
635
  cb2.apply(this, arguments);
@@ -634,14 +640,14 @@ var require_graceful_fs = __commonJS({
634
640
  var fs$appendFile = fs3.appendFile;
635
641
  if (fs$appendFile)
636
642
  fs3.appendFile = appendFile;
637
- function appendFile(path6, data2, options, cb) {
643
+ function appendFile(path7, data2, options, cb) {
638
644
  if (typeof options === "function")
639
645
  cb = options, options = null;
640
- return go$appendFile(path6, data2, options, cb);
641
- function go$appendFile(path7, data3, options2, cb2, startTime) {
642
- return fs$appendFile(path7, data3, options2, function(err) {
646
+ return go$appendFile(path7, data2, options, cb);
647
+ function go$appendFile(path8, data3, options2, cb2, startTime) {
648
+ return fs$appendFile(path8, data3, options2, function(err) {
643
649
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
644
- enqueue([go$appendFile, [path7, data3, options2, cb2], err, startTime || Date.now(), Date.now()]);
650
+ enqueue([go$appendFile, [path8, data3, options2, cb2], err, startTime || Date.now(), Date.now()]);
645
651
  else {
646
652
  if (typeof cb2 === "function")
647
653
  cb2.apply(this, arguments);
@@ -672,31 +678,31 @@ var require_graceful_fs = __commonJS({
672
678
  var fs$readdir = fs3.readdir;
673
679
  fs3.readdir = readdir;
674
680
  var noReaddirOptionVersions = /^v[0-5]\./;
675
- function readdir(path6, options, cb) {
681
+ function readdir(path7, options, cb) {
676
682
  if (typeof options === "function")
677
683
  cb = options, options = null;
678
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path7, options2, cb2, startTime) {
679
- return fs$readdir(path7, fs$readdirCallback(
680
- path7,
684
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path8, options2, cb2, startTime) {
685
+ return fs$readdir(path8, fs$readdirCallback(
686
+ path8,
681
687
  options2,
682
688
  cb2,
683
689
  startTime
684
690
  ));
685
- } : function go$readdir2(path7, options2, cb2, startTime) {
686
- return fs$readdir(path7, options2, fs$readdirCallback(
687
- path7,
691
+ } : function go$readdir2(path8, options2, cb2, startTime) {
692
+ return fs$readdir(path8, options2, fs$readdirCallback(
693
+ path8,
688
694
  options2,
689
695
  cb2,
690
696
  startTime
691
697
  ));
692
698
  };
693
- return go$readdir(path6, options, cb);
694
- function fs$readdirCallback(path7, options2, cb2, startTime) {
699
+ return go$readdir(path7, options, cb);
700
+ function fs$readdirCallback(path8, options2, cb2, startTime) {
695
701
  return function(err, files) {
696
702
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
697
703
  enqueue([
698
704
  go$readdir,
699
- [path7, options2, cb2],
705
+ [path8, options2, cb2],
700
706
  err,
701
707
  startTime || Date.now(),
702
708
  Date.now()
@@ -767,7 +773,7 @@ var require_graceful_fs = __commonJS({
767
773
  enumerable: true,
768
774
  configurable: true
769
775
  });
770
- function ReadStream(path6, options) {
776
+ function ReadStream(path7, options) {
771
777
  if (this instanceof ReadStream)
772
778
  return fs$ReadStream.apply(this, arguments), this;
773
779
  else
@@ -787,7 +793,7 @@ var require_graceful_fs = __commonJS({
787
793
  }
788
794
  });
789
795
  }
790
- function WriteStream(path6, options) {
796
+ function WriteStream(path7, options) {
791
797
  if (this instanceof WriteStream)
792
798
  return fs$WriteStream.apply(this, arguments), this;
793
799
  else
@@ -805,22 +811,22 @@ var require_graceful_fs = __commonJS({
805
811
  }
806
812
  });
807
813
  }
808
- function createReadStream(path6, options) {
809
- return new fs3.ReadStream(path6, options);
814
+ function createReadStream(path7, options) {
815
+ return new fs3.ReadStream(path7, options);
810
816
  }
811
- function createWriteStream(path6, options) {
812
- return new fs3.WriteStream(path6, options);
817
+ function createWriteStream(path7, options) {
818
+ return new fs3.WriteStream(path7, options);
813
819
  }
814
820
  var fs$open = fs3.open;
815
821
  fs3.open = open;
816
- function open(path6, flags, mode, cb) {
822
+ function open(path7, flags, mode, cb) {
817
823
  if (typeof mode === "function")
818
824
  cb = mode, mode = null;
819
- return go$open(path6, flags, mode, cb);
820
- function go$open(path7, flags2, mode2, cb2, startTime) {
821
- return fs$open(path7, flags2, mode2, function(err, fd) {
825
+ return go$open(path7, flags, mode, cb);
826
+ function go$open(path8, flags2, mode2, cb2, startTime) {
827
+ return fs$open(path8, flags2, mode2, function(err, fd) {
822
828
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
823
- enqueue([go$open, [path7, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
829
+ enqueue([go$open, [path8, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
824
830
  else {
825
831
  if (typeof cb2 === "function")
826
832
  cb2.apply(this, arguments);
@@ -992,10 +998,10 @@ var require_utils = __commonJS({
992
998
  "../../node_modules/vite-plugin-externals/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module) {
993
999
  "use strict";
994
1000
  init_esm_shims();
995
- var path6 = __require("path");
1001
+ var path7 = __require("path");
996
1002
  module.exports.checkPath = function checkPath(pth) {
997
1003
  if (process.platform === "win32") {
998
- const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path6.parse(pth).root, ""));
1004
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path7.parse(pth).root, ""));
999
1005
  if (pathHasInvalidWinCharacters) {
1000
1006
  const error = new Error(`Path contains invalid characters: ${pth}`);
1001
1007
  error.code = "EINVAL";
@@ -1062,8 +1068,8 @@ var require_path_exists = __commonJS({
1062
1068
  init_esm_shims();
1063
1069
  var u = require_universalify().fromPromise;
1064
1070
  var fs2 = require_fs();
1065
- function pathExists(path6) {
1066
- return fs2.access(path6).then(() => true).catch(() => false);
1071
+ function pathExists(path7) {
1072
+ return fs2.access(path7).then(() => true).catch(() => false);
1067
1073
  }
1068
1074
  module.exports = {
1069
1075
  pathExists: u(pathExists),
@@ -1078,8 +1084,8 @@ var require_utimes = __commonJS({
1078
1084
  "use strict";
1079
1085
  init_esm_shims();
1080
1086
  var fs2 = require_graceful_fs();
1081
- function utimesMillis(path6, atime, mtime, callback) {
1082
- fs2.open(path6, "r+", (err, fd) => {
1087
+ function utimesMillis(path7, atime, mtime, callback) {
1088
+ fs2.open(path7, "r+", (err, fd) => {
1083
1089
  if (err) return callback(err);
1084
1090
  fs2.futimes(fd, atime, mtime, (futimesErr) => {
1085
1091
  fs2.close(fd, (closeErr) => {
@@ -1088,8 +1094,8 @@ var require_utimes = __commonJS({
1088
1094
  });
1089
1095
  });
1090
1096
  }
1091
- function utimesMillisSync(path6, atime, mtime) {
1092
- const fd = fs2.openSync(path6, "r+");
1097
+ function utimesMillisSync(path7, atime, mtime) {
1098
+ const fd = fs2.openSync(path7, "r+");
1093
1099
  fs2.futimesSync(fd, atime, mtime);
1094
1100
  return fs2.closeSync(fd);
1095
1101
  }
@@ -1106,7 +1112,7 @@ var require_stat = __commonJS({
1106
1112
  "use strict";
1107
1113
  init_esm_shims();
1108
1114
  var fs2 = require_fs();
1109
- var path6 = __require("path");
1115
+ var path7 = __require("path");
1110
1116
  var util = __require("util");
1111
1117
  function getStats(src, dest, opts) {
1112
1118
  const statFunc = opts.dereference ? (file) => fs2.stat(file, { bigint: true }) : (file) => fs2.lstat(file, { bigint: true });
@@ -1136,8 +1142,8 @@ var require_stat = __commonJS({
1136
1142
  const { srcStat, destStat } = stats;
1137
1143
  if (destStat) {
1138
1144
  if (areIdentical(srcStat, destStat)) {
1139
- const srcBaseName = path6.basename(src);
1140
- const destBaseName = path6.basename(dest);
1145
+ const srcBaseName = path7.basename(src);
1146
+ const destBaseName = path7.basename(dest);
1141
1147
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
1142
1148
  return cb(null, { srcStat, destStat, isChangingCase: true });
1143
1149
  }
@@ -1160,8 +1166,8 @@ var require_stat = __commonJS({
1160
1166
  const { srcStat, destStat } = getStatsSync(src, dest, opts);
1161
1167
  if (destStat) {
1162
1168
  if (areIdentical(srcStat, destStat)) {
1163
- const srcBaseName = path6.basename(src);
1164
- const destBaseName = path6.basename(dest);
1169
+ const srcBaseName = path7.basename(src);
1170
+ const destBaseName = path7.basename(dest);
1165
1171
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
1166
1172
  return { srcStat, destStat, isChangingCase: true };
1167
1173
  }
@@ -1180,9 +1186,9 @@ var require_stat = __commonJS({
1180
1186
  return { srcStat, destStat };
1181
1187
  }
1182
1188
  function checkParentPaths(src, srcStat, dest, funcName, cb) {
1183
- const srcParent = path6.resolve(path6.dirname(src));
1184
- const destParent = path6.resolve(path6.dirname(dest));
1185
- if (destParent === srcParent || destParent === path6.parse(destParent).root) return cb();
1189
+ const srcParent = path7.resolve(path7.dirname(src));
1190
+ const destParent = path7.resolve(path7.dirname(dest));
1191
+ if (destParent === srcParent || destParent === path7.parse(destParent).root) return cb();
1186
1192
  fs2.stat(destParent, { bigint: true }, (err, destStat) => {
1187
1193
  if (err) {
1188
1194
  if (err.code === "ENOENT") return cb();
@@ -1195,9 +1201,9 @@ var require_stat = __commonJS({
1195
1201
  });
1196
1202
  }
1197
1203
  function checkParentPathsSync(src, srcStat, dest, funcName) {
1198
- const srcParent = path6.resolve(path6.dirname(src));
1199
- const destParent = path6.resolve(path6.dirname(dest));
1200
- if (destParent === srcParent || destParent === path6.parse(destParent).root) return;
1204
+ const srcParent = path7.resolve(path7.dirname(src));
1205
+ const destParent = path7.resolve(path7.dirname(dest));
1206
+ if (destParent === srcParent || destParent === path7.parse(destParent).root) return;
1201
1207
  let destStat;
1202
1208
  try {
1203
1209
  destStat = fs2.statSync(destParent, { bigint: true });
@@ -1214,8 +1220,8 @@ var require_stat = __commonJS({
1214
1220
  return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
1215
1221
  }
1216
1222
  function isSrcSubdir(src, dest) {
1217
- const srcArr = path6.resolve(src).split(path6.sep).filter((i) => i);
1218
- const destArr = path6.resolve(dest).split(path6.sep).filter((i) => i);
1223
+ const srcArr = path7.resolve(src).split(path7.sep).filter((i) => i);
1224
+ const destArr = path7.resolve(dest).split(path7.sep).filter((i) => i);
1219
1225
  return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true);
1220
1226
  }
1221
1227
  function errMsg(src, dest, funcName) {
@@ -1238,7 +1244,7 @@ var require_copy = __commonJS({
1238
1244
  "use strict";
1239
1245
  init_esm_shims();
1240
1246
  var fs2 = require_graceful_fs();
1241
- var path6 = __require("path");
1247
+ var path7 = __require("path");
1242
1248
  var mkdirs = require_mkdirs().mkdirs;
1243
1249
  var pathExists = require_path_exists().pathExists;
1244
1250
  var utimesMillis = require_utimes().utimesMillis;
@@ -1273,7 +1279,7 @@ var require_copy = __commonJS({
1273
1279
  });
1274
1280
  }
1275
1281
  function checkParentDir(destStat, src, dest, opts, cb) {
1276
- const destParent = path6.dirname(dest);
1282
+ const destParent = path7.dirname(dest);
1277
1283
  pathExists(destParent, (err, dirExists) => {
1278
1284
  if (err) return cb(err);
1279
1285
  if (dirExists) return getStats(destStat, src, dest, opts, cb);
@@ -1381,8 +1387,8 @@ var require_copy = __commonJS({
1381
1387
  return copyDirItem(items, item, src, dest, opts, cb);
1382
1388
  }
1383
1389
  function copyDirItem(items, item, src, dest, opts, cb) {
1384
- const srcItem = path6.join(src, item);
1385
- const destItem = path6.join(dest, item);
1390
+ const srcItem = path7.join(src, item);
1391
+ const destItem = path7.join(dest, item);
1386
1392
  stat2.checkPaths(srcItem, destItem, "copy", opts, (err, stats) => {
1387
1393
  if (err) return cb(err);
1388
1394
  const { destStat } = stats;
@@ -1396,7 +1402,7 @@ var require_copy = __commonJS({
1396
1402
  fs2.readlink(src, (err, resolvedSrc) => {
1397
1403
  if (err) return cb(err);
1398
1404
  if (opts.dereference) {
1399
- resolvedSrc = path6.resolve(process.cwd(), resolvedSrc);
1405
+ resolvedSrc = path7.resolve(process.cwd(), resolvedSrc);
1400
1406
  }
1401
1407
  if (!destStat) {
1402
1408
  return fs2.symlink(resolvedSrc, dest, cb);
@@ -1407,7 +1413,7 @@ var require_copy = __commonJS({
1407
1413
  return cb(err2);
1408
1414
  }
1409
1415
  if (opts.dereference) {
1410
- resolvedDest = path6.resolve(process.cwd(), resolvedDest);
1416
+ resolvedDest = path7.resolve(process.cwd(), resolvedDest);
1411
1417
  }
1412
1418
  if (stat2.isSrcSubdir(resolvedSrc, resolvedDest)) {
1413
1419
  return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
@@ -1436,7 +1442,7 @@ var require_copy_sync = __commonJS({
1436
1442
  "use strict";
1437
1443
  init_esm_shims();
1438
1444
  var fs2 = require_graceful_fs();
1439
- var path6 = __require("path");
1445
+ var path7 = __require("path");
1440
1446
  var mkdirsSync = require_mkdirs().mkdirsSync;
1441
1447
  var utimesMillisSync = require_utimes().utimesMillisSync;
1442
1448
  var stat2 = require_stat();
@@ -1460,7 +1466,7 @@ var require_copy_sync = __commonJS({
1460
1466
  }
1461
1467
  function handleFilterAndCopy(destStat, src, dest, opts) {
1462
1468
  if (opts.filter && !opts.filter(src, dest)) return;
1463
- const destParent = path6.dirname(dest);
1469
+ const destParent = path7.dirname(dest);
1464
1470
  if (!fs2.existsSync(destParent)) mkdirsSync(destParent);
1465
1471
  return getStats(destStat, src, dest, opts);
1466
1472
  }
@@ -1525,15 +1531,15 @@ var require_copy_sync = __commonJS({
1525
1531
  fs2.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
1526
1532
  }
1527
1533
  function copyDirItem(item, src, dest, opts) {
1528
- const srcItem = path6.join(src, item);
1529
- const destItem = path6.join(dest, item);
1534
+ const srcItem = path7.join(src, item);
1535
+ const destItem = path7.join(dest, item);
1530
1536
  const { destStat } = stat2.checkPathsSync(srcItem, destItem, "copy", opts);
1531
1537
  return startCopy(destStat, srcItem, destItem, opts);
1532
1538
  }
1533
1539
  function onLink(destStat, src, dest, opts) {
1534
1540
  let resolvedSrc = fs2.readlinkSync(src);
1535
1541
  if (opts.dereference) {
1536
- resolvedSrc = path6.resolve(process.cwd(), resolvedSrc);
1542
+ resolvedSrc = path7.resolve(process.cwd(), resolvedSrc);
1537
1543
  }
1538
1544
  if (!destStat) {
1539
1545
  return fs2.symlinkSync(resolvedSrc, dest);
@@ -1546,7 +1552,7 @@ var require_copy_sync = __commonJS({
1546
1552
  throw err;
1547
1553
  }
1548
1554
  if (opts.dereference) {
1549
- resolvedDest = path6.resolve(process.cwd(), resolvedDest);
1555
+ resolvedDest = path7.resolve(process.cwd(), resolvedDest);
1550
1556
  }
1551
1557
  if (stat2.isSrcSubdir(resolvedSrc, resolvedDest)) {
1552
1558
  throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
@@ -1584,7 +1590,7 @@ var require_rimraf = __commonJS({
1584
1590
  "use strict";
1585
1591
  init_esm_shims();
1586
1592
  var fs2 = require_graceful_fs();
1587
- var path6 = __require("path");
1593
+ var path7 = __require("path");
1588
1594
  var assert = __require("assert");
1589
1595
  var isWindows = process.platform === "win32";
1590
1596
  function defaults2(options) {
@@ -1729,7 +1735,7 @@ var require_rimraf = __commonJS({
1729
1735
  let errState;
1730
1736
  if (n3 === 0) return options.rmdir(p, cb);
1731
1737
  files.forEach((f) => {
1732
- rimraf(path6.join(p, f), options, (er2) => {
1738
+ rimraf(path7.join(p, f), options, (er2) => {
1733
1739
  if (errState) {
1734
1740
  return;
1735
1741
  }
@@ -1794,7 +1800,7 @@ var require_rimraf = __commonJS({
1794
1800
  function rmkidsSync(p, options) {
1795
1801
  assert(p);
1796
1802
  assert(options);
1797
- options.readdirSync(p).forEach((f) => rimrafSync(path6.join(p, f), options));
1803
+ options.readdirSync(p).forEach((f) => rimrafSync(path7.join(p, f), options));
1798
1804
  if (isWindows) {
1799
1805
  const startTime = Date.now();
1800
1806
  do {
@@ -1822,13 +1828,13 @@ var require_remove = __commonJS({
1822
1828
  var fs2 = require_graceful_fs();
1823
1829
  var u = require_universalify().fromCallback;
1824
1830
  var rimraf = require_rimraf();
1825
- function remove2(path6, callback) {
1826
- if (fs2.rm) return fs2.rm(path6, { recursive: true, force: true }, callback);
1827
- rimraf(path6, callback);
1831
+ function remove2(path7, callback) {
1832
+ if (fs2.rm) return fs2.rm(path7, { recursive: true, force: true }, callback);
1833
+ rimraf(path7, callback);
1828
1834
  }
1829
- function removeSync(path6) {
1830
- if (fs2.rmSync) return fs2.rmSync(path6, { recursive: true, force: true });
1831
- rimraf.sync(path6);
1835
+ function removeSync(path7) {
1836
+ if (fs2.rmSync) return fs2.rmSync(path7, { recursive: true, force: true });
1837
+ rimraf.sync(path7);
1832
1838
  }
1833
1839
  module.exports = {
1834
1840
  remove: u(remove2),
@@ -1844,7 +1850,7 @@ var require_empty = __commonJS({
1844
1850
  init_esm_shims();
1845
1851
  var u = require_universalify().fromPromise;
1846
1852
  var fs2 = require_fs();
1847
- var path6 = __require("path");
1853
+ var path7 = __require("path");
1848
1854
  var mkdir = require_mkdirs();
1849
1855
  var remove2 = require_remove();
1850
1856
  var emptyDir = u(async function emptyDir2(dir) {
@@ -1854,7 +1860,7 @@ var require_empty = __commonJS({
1854
1860
  } catch {
1855
1861
  return mkdir.mkdirs(dir);
1856
1862
  }
1857
- return Promise.all(items.map((item) => remove2.remove(path6.join(dir, item))));
1863
+ return Promise.all(items.map((item) => remove2.remove(path7.join(dir, item))));
1858
1864
  });
1859
1865
  function emptyDirSync2(dir) {
1860
1866
  let items;
@@ -1864,7 +1870,7 @@ var require_empty = __commonJS({
1864
1870
  return mkdir.mkdirsSync(dir);
1865
1871
  }
1866
1872
  items.forEach((item) => {
1867
- item = path6.join(dir, item);
1873
+ item = path7.join(dir, item);
1868
1874
  remove2.removeSync(item);
1869
1875
  });
1870
1876
  }
@@ -1883,7 +1889,7 @@ var require_file = __commonJS({
1883
1889
  "use strict";
1884
1890
  init_esm_shims();
1885
1891
  var u = require_universalify().fromCallback;
1886
- var path6 = __require("path");
1892
+ var path7 = __require("path");
1887
1893
  var fs2 = require_graceful_fs();
1888
1894
  var mkdir = require_mkdirs();
1889
1895
  function createFile(file, callback) {
@@ -1895,7 +1901,7 @@ var require_file = __commonJS({
1895
1901
  }
1896
1902
  fs2.stat(file, (err, stats) => {
1897
1903
  if (!err && stats.isFile()) return callback();
1898
- const dir = path6.dirname(file);
1904
+ const dir = path7.dirname(file);
1899
1905
  fs2.stat(dir, (err2, stats2) => {
1900
1906
  if (err2) {
1901
1907
  if (err2.code === "ENOENT") {
@@ -1922,7 +1928,7 @@ var require_file = __commonJS({
1922
1928
  } catch {
1923
1929
  }
1924
1930
  if (stats && stats.isFile()) return;
1925
- const dir = path6.dirname(file);
1931
+ const dir = path7.dirname(file);
1926
1932
  try {
1927
1933
  if (!fs2.statSync(dir).isDirectory()) {
1928
1934
  fs2.readdirSync(dir);
@@ -1946,7 +1952,7 @@ var require_link = __commonJS({
1946
1952
  "use strict";
1947
1953
  init_esm_shims();
1948
1954
  var u = require_universalify().fromCallback;
1949
- var path6 = __require("path");
1955
+ var path7 = __require("path");
1950
1956
  var fs2 = require_graceful_fs();
1951
1957
  var mkdir = require_mkdirs();
1952
1958
  var pathExists = require_path_exists().pathExists;
@@ -1965,7 +1971,7 @@ var require_link = __commonJS({
1965
1971
  return callback(err);
1966
1972
  }
1967
1973
  if (dstStat && areIdentical(srcStat, dstStat)) return callback(null);
1968
- const dir = path6.dirname(dstpath);
1974
+ const dir = path7.dirname(dstpath);
1969
1975
  pathExists(dir, (err2, dirExists) => {
1970
1976
  if (err2) return callback(err2);
1971
1977
  if (dirExists) return makeLink(srcpath, dstpath);
@@ -1990,7 +1996,7 @@ var require_link = __commonJS({
1990
1996
  err.message = err.message.replace("lstat", "ensureLink");
1991
1997
  throw err;
1992
1998
  }
1993
- const dir = path6.dirname(dstpath);
1999
+ const dir = path7.dirname(dstpath);
1994
2000
  const dirExists = fs2.existsSync(dir);
1995
2001
  if (dirExists) return fs2.linkSync(srcpath, dstpath);
1996
2002
  mkdir.mkdirsSync(dir);
@@ -2008,11 +2014,11 @@ var require_symlink_paths = __commonJS({
2008
2014
  "../../node_modules/vite-plugin-externals/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
2009
2015
  "use strict";
2010
2016
  init_esm_shims();
2011
- var path6 = __require("path");
2017
+ var path7 = __require("path");
2012
2018
  var fs2 = require_graceful_fs();
2013
2019
  var pathExists = require_path_exists().pathExists;
2014
2020
  function symlinkPaths(srcpath, dstpath, callback) {
2015
- if (path6.isAbsolute(srcpath)) {
2021
+ if (path7.isAbsolute(srcpath)) {
2016
2022
  return fs2.lstat(srcpath, (err) => {
2017
2023
  if (err) {
2018
2024
  err.message = err.message.replace("lstat", "ensureSymlink");
@@ -2024,8 +2030,8 @@ var require_symlink_paths = __commonJS({
2024
2030
  });
2025
2031
  });
2026
2032
  } else {
2027
- const dstdir = path6.dirname(dstpath);
2028
- const relativeToDst = path6.join(dstdir, srcpath);
2033
+ const dstdir = path7.dirname(dstpath);
2034
+ const relativeToDst = path7.join(dstdir, srcpath);
2029
2035
  return pathExists(relativeToDst, (err, exists) => {
2030
2036
  if (err) return callback(err);
2031
2037
  if (exists) {
@@ -2041,7 +2047,7 @@ var require_symlink_paths = __commonJS({
2041
2047
  }
2042
2048
  return callback(null, {
2043
2049
  toCwd: srcpath,
2044
- toDst: path6.relative(dstdir, srcpath)
2050
+ toDst: path7.relative(dstdir, srcpath)
2045
2051
  });
2046
2052
  });
2047
2053
  }
@@ -2050,7 +2056,7 @@ var require_symlink_paths = __commonJS({
2050
2056
  }
2051
2057
  function symlinkPathsSync(srcpath, dstpath) {
2052
2058
  let exists;
2053
- if (path6.isAbsolute(srcpath)) {
2059
+ if (path7.isAbsolute(srcpath)) {
2054
2060
  exists = fs2.existsSync(srcpath);
2055
2061
  if (!exists) throw new Error("absolute srcpath does not exist");
2056
2062
  return {
@@ -2058,8 +2064,8 @@ var require_symlink_paths = __commonJS({
2058
2064
  toDst: srcpath
2059
2065
  };
2060
2066
  } else {
2061
- const dstdir = path6.dirname(dstpath);
2062
- const relativeToDst = path6.join(dstdir, srcpath);
2067
+ const dstdir = path7.dirname(dstpath);
2068
+ const relativeToDst = path7.join(dstdir, srcpath);
2063
2069
  exists = fs2.existsSync(relativeToDst);
2064
2070
  if (exists) {
2065
2071
  return {
@@ -2071,7 +2077,7 @@ var require_symlink_paths = __commonJS({
2071
2077
  if (!exists) throw new Error("relative srcpath does not exist");
2072
2078
  return {
2073
2079
  toCwd: srcpath,
2074
- toDst: path6.relative(dstdir, srcpath)
2080
+ toDst: path7.relative(dstdir, srcpath)
2075
2081
  };
2076
2082
  }
2077
2083
  }
@@ -2122,7 +2128,7 @@ var require_symlink = __commonJS({
2122
2128
  "use strict";
2123
2129
  init_esm_shims();
2124
2130
  var u = require_universalify().fromCallback;
2125
- var path6 = __require("path");
2131
+ var path7 = __require("path");
2126
2132
  var fs2 = require_fs();
2127
2133
  var _mkdirs = require_mkdirs();
2128
2134
  var mkdirs = _mkdirs.mkdirs;
@@ -2156,7 +2162,7 @@ var require_symlink = __commonJS({
2156
2162
  srcpath = relative.toDst;
2157
2163
  symlinkType(relative.toCwd, type, (err2, type2) => {
2158
2164
  if (err2) return callback(err2);
2159
- const dir = path6.dirname(dstpath);
2165
+ const dir = path7.dirname(dstpath);
2160
2166
  pathExists(dir, (err3, dirExists) => {
2161
2167
  if (err3) return callback(err3);
2162
2168
  if (dirExists) return fs2.symlink(srcpath, dstpath, type2, callback);
@@ -2182,7 +2188,7 @@ var require_symlink = __commonJS({
2182
2188
  const relative = symlinkPathsSync(srcpath, dstpath);
2183
2189
  srcpath = relative.toDst;
2184
2190
  type = symlinkTypeSync(relative.toCwd, type);
2185
- const dir = path6.dirname(dstpath);
2191
+ const dir = path7.dirname(dstpath);
2186
2192
  const exists = fs2.existsSync(dir);
2187
2193
  if (exists) return fs2.symlinkSync(srcpath, dstpath, type);
2188
2194
  mkdirsSync(dir);
@@ -2275,7 +2281,7 @@ var require_jsonfile = __commonJS({
2275
2281
  }
2276
2282
  return obj;
2277
2283
  }
2278
- var readFile4 = universalify.fromPromise(_readFile);
2284
+ var readFile5 = universalify.fromPromise(_readFile);
2279
2285
  function readFileSync(file, options = {}) {
2280
2286
  if (typeof options === "string") {
2281
2287
  options = { encoding: options };
@@ -2307,7 +2313,7 @@ var require_jsonfile = __commonJS({
2307
2313
  return fs2.writeFileSync(file, str, options);
2308
2314
  }
2309
2315
  var jsonfile = {
2310
- readFile: readFile4,
2316
+ readFile: readFile5,
2311
2317
  readFileSync,
2312
2318
  writeFile: writeFile3,
2313
2319
  writeFileSync
@@ -2339,7 +2345,7 @@ var require_output_file = __commonJS({
2339
2345
  init_esm_shims();
2340
2346
  var u = require_universalify().fromCallback;
2341
2347
  var fs2 = require_graceful_fs();
2342
- var path6 = __require("path");
2348
+ var path7 = __require("path");
2343
2349
  var mkdir = require_mkdirs();
2344
2350
  var pathExists = require_path_exists().pathExists;
2345
2351
  function outputFile(file, data2, encoding, callback) {
@@ -2347,7 +2353,7 @@ var require_output_file = __commonJS({
2347
2353
  callback = encoding;
2348
2354
  encoding = "utf8";
2349
2355
  }
2350
- const dir = path6.dirname(file);
2356
+ const dir = path7.dirname(file);
2351
2357
  pathExists(dir, (err, itDoes) => {
2352
2358
  if (err) return callback(err);
2353
2359
  if (itDoes) return fs2.writeFile(file, data2, encoding, callback);
@@ -2358,7 +2364,7 @@ var require_output_file = __commonJS({
2358
2364
  });
2359
2365
  }
2360
2366
  function outputFileSync(file, ...args) {
2361
- const dir = path6.dirname(file);
2367
+ const dir = path7.dirname(file);
2362
2368
  if (fs2.existsSync(dir)) {
2363
2369
  return fs2.writeFileSync(file, ...args);
2364
2370
  }
@@ -2427,7 +2433,7 @@ var require_move = __commonJS({
2427
2433
  "use strict";
2428
2434
  init_esm_shims();
2429
2435
  var fs2 = require_graceful_fs();
2430
- var path6 = __require("path");
2436
+ var path7 = __require("path");
2431
2437
  var copy = require_copy2().copy;
2432
2438
  var remove2 = require_remove().remove;
2433
2439
  var mkdirp = require_mkdirs().mkdirp;
@@ -2446,7 +2452,7 @@ var require_move = __commonJS({
2446
2452
  stat2.checkParentPaths(src, srcStat, dest, "move", (err2) => {
2447
2453
  if (err2) return cb(err2);
2448
2454
  if (isParentRoot(dest)) return doRename(src, dest, overwrite2, isChangingCase, cb);
2449
- mkdirp(path6.dirname(dest), (err3) => {
2455
+ mkdirp(path7.dirname(dest), (err3) => {
2450
2456
  if (err3) return cb(err3);
2451
2457
  return doRename(src, dest, overwrite2, isChangingCase, cb);
2452
2458
  });
@@ -2454,8 +2460,8 @@ var require_move = __commonJS({
2454
2460
  });
2455
2461
  }
2456
2462
  function isParentRoot(dest) {
2457
- const parent = path6.dirname(dest);
2458
- const parsedPath = path6.parse(parent);
2463
+ const parent = path7.dirname(dest);
2464
+ const parsedPath = path7.parse(parent);
2459
2465
  return parsedPath.root === parent;
2460
2466
  }
2461
2467
  function doRename(src, dest, overwrite2, isChangingCase, cb) {
@@ -2499,7 +2505,7 @@ var require_move_sync = __commonJS({
2499
2505
  "use strict";
2500
2506
  init_esm_shims();
2501
2507
  var fs2 = require_graceful_fs();
2502
- var path6 = __require("path");
2508
+ var path7 = __require("path");
2503
2509
  var copySync = require_copy2().copySync;
2504
2510
  var removeSync = require_remove().removeSync;
2505
2511
  var mkdirpSync = require_mkdirs().mkdirpSync;
@@ -2509,12 +2515,12 @@ var require_move_sync = __commonJS({
2509
2515
  const overwrite2 = opts.overwrite || opts.clobber || false;
2510
2516
  const { srcStat, isChangingCase = false } = stat2.checkPathsSync(src, dest, "move", opts);
2511
2517
  stat2.checkParentPathsSync(src, srcStat, dest, "move");
2512
- if (!isParentRoot(dest)) mkdirpSync(path6.dirname(dest));
2518
+ if (!isParentRoot(dest)) mkdirpSync(path7.dirname(dest));
2513
2519
  return doRename(src, dest, overwrite2, isChangingCase);
2514
2520
  }
2515
2521
  function isParentRoot(dest) {
2516
- const parent = path6.dirname(dest);
2517
- const parsedPath = path6.parse(parent);
2522
+ const parent = path7.dirname(dest);
2523
+ const parsedPath = path7.parse(parent);
2518
2524
  return parsedPath.root === parent;
2519
2525
  }
2520
2526
  function doRename(src, dest, overwrite2, isChangingCase) {
@@ -34400,19 +34406,29 @@ var moduleBundle = ({
34400
34406
  const blocksPanelComponent = virtualBlocksWidgetPanelAssets.get(id);
34401
34407
  if (blocksPanelComponent) {
34402
34408
  return defaultOutdent`
34403
- const initPanel = async function() {
34404
- const { default: panelController } = await import('${getBlocksPathWithHMR(blocksPanelComponent.relativePath, type)}');
34405
- panelController();
34409
+ import { enableContext } from '@wix/cli-app/internal/platform-sdk/sdk-context';
34410
+ const init = async function({ $w, onHMRCallback, wixClient }) {
34411
+ enableContext(wixClient, 'module');
34412
+ ${// `/@vite/client` is a special module that should be available in dev mode.
34413
+ // For example, via this module Vite will set globals that we put in `define` config.
34414
+ type === "dev" /* dev */ ? defaultOutdent`
34415
+ const { default: wrappedController } = await import(/* @vite-ignore */ \`${getBlocksPathWithHMR(blocksPanelComponent.relativePath, type)}\`);
34416
+ wrappedController?.(onHMRCallback, $w);
34417
+ ` : defaultOutdent`
34418
+ const { default: panelController } = await import('/${blocksPanelComponent.relativePath}');
34419
+ panelController?.($w);
34420
+ `}
34406
34421
  }
34407
- export { initPanel };
34422
+ export { init };
34408
34423
  `;
34409
34424
  }
34410
34425
  const blocksWidgetComponent = virtualBlocksWidgetAssets.get(id);
34411
34426
  if (blocksWidgetComponent) {
34412
34427
  return defaultOutdent`
34413
- const { default: api } = await import('/${blocksWidgetComponent.apiPath}')
34428
+ import { enableContext } from '@wix/cli-app/internal/platform-sdk/sdk-context';
34429
+ import api from '/${blocksWidgetComponent.apiPath}';
34414
34430
  const init = async function({ $w, $widget, onHMRCallback, wixClient, widgetInstanceId }) {
34415
- wixClient?.enableContext('module');
34431
+ enableContext(wixClient, 'module');
34416
34432
  ${// `/@vite/client` is a special module that should be available in dev mode.
34417
34433
  // For example, via this module Vite will set globals that we put in `define` config.
34418
34434
  type === "dev" /* dev */ ? defaultOutdent`
@@ -34527,7 +34543,7 @@ init_esm_shims();
34527
34543
  // ../cli-ssl/src/index.ts
34528
34544
  init_esm_shims();
34529
34545
  var import_selfsigned = __toESM(require_selfsigned(), 1);
34530
- import { readFile, writeFile as writeFile2, stat } from "node:fs/promises";
34546
+ import { readFile as readFile2, writeFile as writeFile2, stat } from "node:fs/promises";
34531
34547
  import path2 from "node:path";
34532
34548
  var PEM_FILENAME = "wix-cli.pem";
34533
34549
  var PEM_MAX_DAYS = 30;
@@ -34574,7 +34590,7 @@ var generateHostCert = async () => {
34574
34590
  const wixCliPemPath = path2.join(wixDataDir, PEM_FILENAME);
34575
34591
  const recreatePem = await shouldRecreatePem(wixCliPemPath);
34576
34592
  if (!recreatePem) {
34577
- const cachedCert = await readFile(wixCliPemPath, {
34593
+ const cachedCert = await readFile2(wixCliPemPath, {
34578
34594
  encoding: "utf-8"
34579
34595
  });
34580
34596
  return {
@@ -36009,14 +36025,14 @@ var exportsCustodian = ({
36009
36025
  if (id === EXPORTS_CUSTODIAN_ENTRY) {
36010
36026
  return [
36011
36027
  ...Array.from(virtualBlocksWidgetAssets.keys()).map(
36012
- (path6, index) => `
36013
- import { init as init${index} } from '${path6}';
36028
+ (path7, index) => `
36029
+ import { init as init${index} } from '${path7}';
36014
36030
  init${index}();
36015
36031
  `
36016
36032
  ),
36017
36033
  ...Array.from(virtualBlocksWidgetPanelAssets.keys()).map(
36018
- (path6, index) => `
36019
- import { initPanel as initPanel${index} } from '${path6}';
36034
+ (path7, index) => `
36035
+ import { init as initPanel${index} } from '${path7}';
36020
36036
  initPanel${index}();
36021
36037
  `
36022
36038
  )
@@ -36027,9 +36043,39 @@ var exportsCustodian = ({
36027
36043
  };
36028
36044
  };
36029
36045
 
36046
+ // src/vite/plugins/config-extensions-file-emitter.ts
36047
+ init_esm_shims();
36048
+ import path3 from "node:path";
36049
+ function configExtensionsFileEmitter(model) {
36050
+ return {
36051
+ name: "config-extensions-file-emitter",
36052
+ async generateBundle() {
36053
+ for (const component of model.components) {
36054
+ if (component.type === "SitePlugin" && component.marketData.logoUrl?.match(RELATIVE_ASSET_PATH_REGEX)) {
36055
+ const resolved = await this.resolve(
36056
+ component.marketData.logoUrl,
36057
+ component.relativePath
36058
+ );
36059
+ if (resolved == null) {
36060
+ continue;
36061
+ }
36062
+ const content = new Uint8Array(await readFile(resolved.id));
36063
+ const fileName = this.emitFile({
36064
+ type: "asset",
36065
+ name: path3.basename(resolved.id),
36066
+ originalFileName: component.marketData.logoUrl,
36067
+ source: content
36068
+ });
36069
+ component.marketData.logoUrl = `/${this.getFileName(fileName)}`;
36070
+ }
36071
+ }
36072
+ }
36073
+ };
36074
+ }
36075
+
36030
36076
  // src/vite/plugins/web-methods-plugin.ts
36031
36077
  init_esm_shims();
36032
- import path4 from "node:path";
36078
+ import path5 from "node:path";
36033
36079
 
36034
36080
  // ../../node_modules/es-module-lexer/dist/lexer.js
36035
36081
  init_esm_shims();
@@ -36760,11 +36806,11 @@ var qmarksTestNoExtDot = ([$0]) => {
36760
36806
  return (f) => f.length === len && f !== "." && f !== "..";
36761
36807
  };
36762
36808
  var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
36763
- var path3 = {
36809
+ var path4 = {
36764
36810
  win32: { sep: "\\" },
36765
36811
  posix: { sep: "/" }
36766
36812
  };
36767
- var sep = defaultPlatform === "win32" ? path3.win32.sep : path3.posix.sep;
36813
+ var sep = defaultPlatform === "win32" ? path4.win32.sep : path4.posix.sep;
36768
36814
  minimatch.sep = sep;
36769
36815
  var GLOBSTAR = Symbol("globstar **");
36770
36816
  minimatch.GLOBSTAR = GLOBSTAR;
@@ -37434,7 +37480,7 @@ function webMethodsPlugin({
37434
37480
  if (!id.endsWith(".web.ts")) {
37435
37481
  return;
37436
37482
  }
37437
- const relativeId = path4.relative(projectFolder, id);
37483
+ const relativeId = path5.relative(projectFolder, id);
37438
37484
  if (!minimatch(relativeId, WEB_METHOD_PATTERN)) {
37439
37485
  throw new CliError({
37440
37486
  cause: null,
@@ -37450,7 +37496,7 @@ function webMethodsPlugin({
37450
37496
  export const ${method} = async (...args) => {
37451
37497
  return await callWebMethod({
37452
37498
  args,
37453
- filename: '${path4.relative(projectFolder, url)}',
37499
+ filename: '${path5.relative(projectFolder, url)}',
37454
37500
  method: '${method}',
37455
37501
  baseURL: __webMethodsBaseUrl,
37456
37502
  });
@@ -37497,7 +37543,7 @@ async function getViteConfig(model, options, { baseBackendUrl } = {}) {
37497
37543
  customLogger: options.customLogger,
37498
37544
  clearScreen: false,
37499
37545
  logLevel: "info",
37500
- publicDir: "public",
37546
+ publicDir: false,
37501
37547
  optimizeDeps: {
37502
37548
  entries: [
37503
37549
  DASHBOARD_PAGES_PATTERN,
@@ -37530,6 +37576,10 @@ async function getViteConfig(model, options, { baseBackendUrl } = {}) {
37530
37576
  }
37531
37577
  },
37532
37578
  define: {
37579
+ "import.meta.env.APP_ID": JSON.stringify(model.config.appId),
37580
+ "import.meta.env.SENTRY_DSN": JSON.stringify(
37581
+ model.config.monitoring?.sentry.dsn
37582
+ ),
37533
37583
  ...baseBackendUrl ? {
37534
37584
  "import.meta.env.BASE_API_URL": JSON.stringify(
37535
37585
  `${baseBackendUrl.replace(/\/$/, "")}/functions`
@@ -37562,7 +37612,8 @@ async function getViteConfig(model, options, { baseBackendUrl } = {}) {
37562
37612
  embeddedScriptSDKSupport({
37563
37613
  initialModel: model,
37564
37614
  ...options
37565
- })
37615
+ }),
37616
+ configExtensionsFileEmitter(model)
37566
37617
  ],
37567
37618
  experimental: {
37568
37619
  /*
@@ -37903,7 +37954,7 @@ init_esm_shims();
37903
37954
  // ../vite-optimize-backend-dependencies/src/utils.ts
37904
37955
  init_esm_shims();
37905
37956
  import { join as join3 } from "node:path";
37906
- import { readFile as readFile2 } from "node:fs/promises";
37957
+ import { readFile as readFile3 } from "node:fs/promises";
37907
37958
  var postfixRE3 = /[?#].*$/;
37908
37959
  var OPTIMIZABLE_ENTRY_RE = /\.[cm]?[jt]s$/;
37909
37960
  var interopHelper = (m) => m?.__esModule ? m : { ...typeof m === "object" && !Array.isArray(m) || typeof m === "function" ? m : {}, default: m };
@@ -37921,7 +37972,7 @@ async function shouldOptimizeDependency(url) {
37921
37972
  }
37922
37973
  async function fileHasModuleSyntax(filePath) {
37923
37974
  await init2;
37924
- const entryContent = await readFile2(filePath, "utf-8");
37975
+ const entryContent = await readFile3(filePath, "utf-8");
37925
37976
  const parseResult = parse6(entryContent);
37926
37977
  const [, , , hasModuleSyntax] = parseResult;
37927
37978
  return hasModuleSyntax;
@@ -37930,8 +37981,8 @@ async function fileHasModuleSyntax(filePath) {
37930
37981
  // ../vite-optimize-backend-dependencies/src/optimizeCjsDependency.ts
37931
37982
  init_esm_shims();
37932
37983
  import esbuild from "esbuild";
37933
- import { readFile as readFile3 } from "node:fs/promises";
37934
- import path5, { join as join4 } from "node:path";
37984
+ import { readFile as readFile4 } from "node:fs/promises";
37985
+ import path6, { join as join4 } from "node:path";
37935
37986
  async function optimizeCjsDependency({
37936
37987
  url,
37937
37988
  projectFolder
@@ -37958,7 +38009,7 @@ async function optimizeCjsDependency({
37958
38009
  });
37959
38010
  });
37960
38011
  const [output] = Object.entries(metafile.outputs).find(
37961
- ([, output2]) => output2.entryPoint && path5.resolve(projectFolder, output2.entryPoint) === url
38012
+ ([, output2]) => output2.entryPoint && path6.resolve(projectFolder, output2.entryPoint) === url
37962
38013
  ) ?? [];
37963
38014
  if (!output) {
37964
38015
  throw new CliError({
@@ -37966,7 +38017,7 @@ async function optimizeCjsDependency({
37966
38017
  cause: null
37967
38018
  });
37968
38019
  }
37969
- return readFile3(join4(projectFolder, output), "utf-8").catch(
38020
+ return readFile4(join4(projectFolder, output), "utf-8").catch(
37970
38021
  (error) => {
37971
38022
  throw new CliError({
37972
38023
  code: CliErrorCode.FailedReadingEsbuildOutputFile(),
@@ -38226,7 +38277,10 @@ async function getViteConfig2(model, options, { appSecret, webhookPublicKey }) {
38226
38277
  define: {
38227
38278
  "import.meta.env.APP_ID": JSON.stringify(model.config.appId),
38228
38279
  "import.meta.env.APP_SECRET": JSON.stringify(appSecret),
38229
- "import.meta.env.PUBLIC_KEY": JSON.stringify(webhookPublicKey)
38280
+ "import.meta.env.PUBLIC_KEY": JSON.stringify(webhookPublicKey),
38281
+ "import.meta.env.SENTRY_DSN": JSON.stringify(
38282
+ model.config.monitoring?.sentry.dsn
38283
+ )
38230
38284
  },
38231
38285
  plugins: [
38232
38286
  optimizeBackendExtensions({
@@ -38360,9 +38414,16 @@ init_esm_shims();
38360
38414
  var import_variant4 = __toESM(require_lib(), 1);
38361
38415
  var import_uniqWith = __toESM(require_uniqWith(), 1);
38362
38416
  import { randomUUID as randomUUID2 } from "node:crypto";
38417
+ import { dirname as dirname2, join as join5 } from "node:path";
38363
38418
  function isTruthy(x) {
38364
38419
  return x != null && x !== false;
38365
38420
  }
38421
+ function parseImageField(asset, relativePath) {
38422
+ if (RELATIVE_ASSET_PATH_REGEX.test(asset)) {
38423
+ return join5(dirname2(`/${relativePath}`), asset);
38424
+ }
38425
+ return asset;
38426
+ }
38366
38427
  var getExperiment = (component, appId) => {
38367
38428
  if (component.experiments) {
38368
38429
  return {
@@ -38392,7 +38453,8 @@ var createCustomElementConfig = (component, scriptUrl, settingsUrl) => {
38392
38453
  defaultHeight: 400,
38393
38454
  heightMode: HeightMode.FIXED
38394
38455
  }
38395
- }
38456
+ },
38457
+ behaviors: {}
38396
38458
  }),
38397
38459
  CustomElement: (customElement) => ({
38398
38460
  id: customElement.id,
@@ -38412,7 +38474,8 @@ var createCustomElementConfig = (component, scriptUrl, settingsUrl) => {
38412
38474
  defaultHeight: customElement.height.defaultHeight,
38413
38475
  heightMode: HeightMode.FIXED
38414
38476
  }
38415
- }
38477
+ },
38478
+ behaviors: customElement.behaviors
38416
38479
  })
38417
38480
  });
38418
38481
  return {
@@ -38434,7 +38497,10 @@ var createCustomElementConfig = (component, scriptUrl, settingsUrl) => {
38434
38497
  base: customElementData.base,
38435
38498
  widget: { region: RegionType.BODY }
38436
38499
  },
38437
- behaviors: component.relativePanelPath && settingsUrl ? { settings: { settingsUrl } } : {},
38500
+ behaviors: {
38501
+ ...customElementData.behaviors,
38502
+ settings: component.relativePanelPath && settingsUrl ? { settingsUrl } : void 0
38503
+ },
38438
38504
  dependencies: component.dependencies
38439
38505
  }
38440
38506
  }
@@ -38561,29 +38627,34 @@ async function createAppManifest({
38561
38627
  return createCustomElementConfig(component, scriptUrl, settingsUrl);
38562
38628
  },
38563
38629
  BlocksWidget: async (component) => {
38564
- const { componentUrl, additionalData } = await componentSourceBuilder(component);
38630
+ const { componentUrl, studioWidgetComponentData } = await componentSourceBuilder(component);
38565
38631
  return {
38566
38632
  compId: component.id,
38567
38633
  compType: ComponentType.STUDIO_WIDGET,
38568
38634
  compName: component.name,
38569
38635
  compData: {
38570
38636
  studioWidgetComponentData: {
38571
- ...additionalData,
38637
+ ...studioWidgetComponentData,
38572
38638
  widgetBundleUrl: componentUrl
38573
38639
  }
38574
38640
  }
38575
38641
  };
38576
38642
  },
38577
38643
  BlocksWidgetPanel: async (component) => {
38578
- const { componentUrl } = await componentSourceBuilder(component);
38644
+ const { componentUrl, panelComponentData } = await componentSourceBuilder(component);
38645
+ const url = new URL(
38646
+ panelComponentData?.url ?? "https://BLOCKS_WIDGET_URL.mock"
38647
+ );
38648
+ url.searchParams.set("codeBundleUrl", componentUrl);
38579
38649
  return {
38580
38650
  compId: component.id,
38581
38651
  compType: ComponentType.PANEL,
38582
38652
  compName: component.name,
38583
38653
  compData: {
38584
38654
  panel: {
38585
- referenceId: component.widgetId,
38586
- url: componentUrl,
38655
+ referenceId: panelComponentData?.referenceId ?? "",
38656
+ url: url.toString(),
38657
+ contentType: PanelContentType.url,
38587
38658
  displayName: component.name,
38588
38659
  size: {
38589
38660
  width: component.width,
@@ -38640,7 +38711,13 @@ async function createAppManifest({
38640
38711
  widgetPlugin: {
38641
38712
  referenceComponentId: component.referenceComponentId,
38642
38713
  placements: component.placements,
38643
- marketData: component.marketData,
38714
+ marketData: {
38715
+ ...component.marketData,
38716
+ logoUrl: component.marketData.logoUrl && parseImageField(
38717
+ component.marketData.logoUrl,
38718
+ component.relativePath
38719
+ )
38720
+ },
38644
38721
  installation: {
38645
38722
  base: {
38646
38723
  autoAdd: component.installation?.autoAddToSite ?? true
@@ -38763,7 +38840,7 @@ async function createAppManifest({
38763
38840
  // src/app-manifest/component-source.ts
38764
38841
  init_esm_shims();
38765
38842
  var import_variant5 = __toESM(require_lib(), 1);
38766
- import { join as join5 } from "node:path";
38843
+ import { join as join6 } from "node:path";
38767
38844
  import { pathToFileURL } from "node:url";
38768
38845
 
38769
38846
  // src/app-manifest/build-output-data-extractor.ts
@@ -38814,7 +38891,17 @@ async function getEventDevSlugs(component, backendDevServerUrl) {
38814
38891
  const url = new URL(`__get-registered-events`, backendDevServerUrl).href;
38815
38892
  const response = await fetch(url);
38816
38893
  if (!response.ok) {
38817
- return [];
38894
+ const errData = await response.json().catch(() => null);
38895
+ if (errData?.type === "BACKEND_EVAL_ERROR") {
38896
+ throw new CliError({
38897
+ code: CliErrorCode.FailedToEvalBackendExtension({
38898
+ filename: errData.filename,
38899
+ errorMessage: errData.error
38900
+ }),
38901
+ cause: void 0
38902
+ });
38903
+ }
38904
+ return null;
38818
38905
  }
38819
38906
  const eventTypes = await response.json();
38820
38907
  const devSlugs = eventTypes[`/${component.relativePath}`] ?? [];
@@ -38822,7 +38909,7 @@ async function getEventDevSlugs(component, backendDevServerUrl) {
38822
38909
  }
38823
38910
  async function getRegisteredExtensions(model) {
38824
38911
  const backendBuildFolder = getAppBackendBuildFolder(model.projectFolder);
38825
- const outputFilepath = join5(
38912
+ const outputFilepath = join6(
38826
38913
  backendBuildFolder,
38827
38914
  "getRegisteredExtensions.mjs"
38828
38915
  );
@@ -38830,13 +38917,32 @@ async function getRegisteredExtensions(model) {
38830
38917
  }
38831
38918
  async function getEventProdSlugs(component, model) {
38832
38919
  const { getRegisteredEvents } = await getRegisteredExtensions(model);
38833
- const eventsMap = await getRegisteredEvents();
38834
- return eventsMap[`/${component.relativePath}`];
38920
+ const { events, evaluationError } = await getRegisteredEvents();
38921
+ if (evaluationError) {
38922
+ throw new CliError({
38923
+ code: CliErrorCode.FailedToEvalBackendExtension({
38924
+ filename: evaluationError.filename,
38925
+ errorMessage: evaluationError.error
38926
+ }),
38927
+ cause: void 0
38928
+ });
38929
+ }
38930
+ return events[`/${component.relativePath}`];
38835
38931
  }
38836
38932
  async function getServicePluginDevType(component, backendDevServerUrl) {
38837
38933
  const url = new URL(`__get-registered-service-plugins`, backendDevServerUrl).href;
38838
38934
  const response = await fetch(url);
38839
38935
  if (!response.ok) {
38936
+ const errData = await response.json().catch(() => null);
38937
+ if (errData?.type === "BACKEND_EVAL_ERROR") {
38938
+ throw new CliError({
38939
+ code: CliErrorCode.FailedToEvalBackendExtension({
38940
+ filename: errData.filename,
38941
+ errorMessage: errData.error
38942
+ }),
38943
+ cause: void 0
38944
+ });
38945
+ }
38840
38946
  return null;
38841
38947
  }
38842
38948
  const servicePluginTypes = await response.json();
@@ -38845,8 +38951,17 @@ async function getServicePluginDevType(component, backendDevServerUrl) {
38845
38951
  }
38846
38952
  async function getServicePluginProdType(component, model) {
38847
38953
  const { getRegisteredServicePlugins } = await getRegisteredExtensions(model);
38848
- const servicePluginsMap = await getRegisteredServicePlugins();
38849
- return servicePluginsMap[`/${component.relativePath}`];
38954
+ const { servicePlugins, evaluationError } = await getRegisteredServicePlugins();
38955
+ if (evaluationError) {
38956
+ throw new CliError({
38957
+ code: CliErrorCode.FailedToEvalBackendExtension({
38958
+ filename: evaluationError.filename,
38959
+ errorMessage: evaluationError.error
38960
+ }),
38961
+ cause: void 0
38962
+ });
38963
+ }
38964
+ return servicePlugins[`/${component.relativePath}`];
38850
38965
  }
38851
38966
  var dashboardSourceBuilder = (component, model, clientSource) => {
38852
38967
  if (!model.config.trusted) {
@@ -38900,12 +39015,13 @@ var customElementBuilder = (component, clientSource) => {
38900
39015
  var blocksComponentBuilder = (component, clientSource, blocksSource) => {
38901
39016
  const moduleId = virtualModuleIdForBlocksComponentScriptAsset(component.id);
38902
39017
  const componentUrl = clientSource.clientBuildOutput ? extractModuleBundleName(clientSource.clientBuildOutput, moduleId) : `/@id/${moduleId}?import`;
38903
- const sourceFromBlocks = blocksSource.find(
38904
- (dcComponent) => dcComponent.compId === component.id
39018
+ const sourceFromBlocks = (blocksSource ?? []).find(
39019
+ (blocksComponent) => blocksComponent.id === component.id
38905
39020
  );
38906
39021
  return {
38907
39022
  componentUrl,
38908
- additionalData: sourceFromBlocks?.compData?.studioWidgetComponentData ?? {}
39023
+ panelComponentData: sourceFromBlocks?.compData?.panel,
39024
+ studioWidgetComponentData: sourceFromBlocks?.data?.studioWidgetComponentData ?? {}
38909
39025
  };
38910
39026
  };
38911
39027
  function getComponentSourceBuilder(model, clientSource, backendSource, blocksSource) {
@@ -39246,20 +39362,25 @@ var sitePluginSchema = z.object({
39246
39362
  })
39247
39363
  }).passthrough();
39248
39364
  var blocksWidgetComponentData = z.object({
39249
- widgetBundleUrl: z.string().url()
39365
+ widgetBundleUrl: z.string()
39250
39366
  });
39251
39367
  var blocksWidgetSchema = z.object({
39252
39368
  compId: z.string(),
39253
39369
  compType: z.literal(ComponentType.STUDIO_WIDGET),
39254
39370
  compName: z.string().optional(),
39255
39371
  compData: z.object({
39256
- studioWidgetComponentData: blocksWidgetComponentData
39372
+ studioWidgetComponentData: z.record(z.string(), z.any()).and(blocksWidgetComponentData)
39257
39373
  })
39258
39374
  }).passthrough();
39259
39375
  var blocksWidgetPanelComponentData = z.object({
39260
39376
  referenceId: z.string(),
39261
39377
  url: z.string().url(),
39262
39378
  displayName: z.string(),
39379
+ contentType: z.enum([
39380
+ PanelContentType.UNKNOWN_PanelContentType,
39381
+ PanelContentType.url,
39382
+ PanelContentType.code
39383
+ ]),
39263
39384
  size: z.object({
39264
39385
  width: z.enum([
39265
39386
  PanelSizeWidth.SMALL,
@@ -39458,10 +39579,7 @@ var overrideSitePluginMarketDataWithNormalizedLogoUrl = (marketData, normalizedB
39458
39579
  const logoUrl = marketData.logoUrl;
39459
39580
  if (logoUrl) {
39460
39581
  return {
39461
- logoUrl: normalizeUrl(
39462
- logoUrl.replace(/\{\{\s*(PUBLIC_URL|public_url)\s*\}\}/, ""),
39463
- normalizedBaseUrl
39464
- )
39582
+ logoUrl: normalizeUrl(logoUrl, normalizedBaseUrl)
39465
39583
  };
39466
39584
  }
39467
39585
  return {};
@@ -39555,7 +39673,12 @@ var updateAppManifestWithBaseUrl = (appManifest, baseUrl, backendServerUrl) => {
39555
39673
  );
39556
39674
  }
39557
39675
  if (compType === ComponentType.PANEL) {
39558
- compData.panel.url = normalizeUrl(compData.panel.url, normalizedBaseUrl);
39676
+ const bundleUrlQueryParam = "codeBundleUrl";
39677
+ const originUrl = new URL(compData.panel.url);
39678
+ const bundleUrl = originUrl.searchParams.get(bundleUrlQueryParam) ?? "";
39679
+ const normalizedBundleUrl = normalizeUrl(bundleUrl, normalizedBaseUrl);
39680
+ originUrl.searchParams.set(bundleUrlQueryParam, normalizedBundleUrl);
39681
+ compData.panel.url = originUrl.toString();
39559
39682
  }
39560
39683
  if (compType === ComponentType.WEBHOOK && backendServerUrl) {
39561
39684
  compData.webhook = {
@@ -39641,6 +39764,125 @@ var updateTopology = (appManifest, topologyData) => {
39641
39764
  return clonedManifest;
39642
39765
  };
39643
39766
 
39767
+ // src/blocks/blocks-client.ts
39768
+ init_esm_shims();
39769
+
39770
+ // ../../node_modules/@wix/ambassador-blocks-v1-blocks-app/build/es/http.impl.js
39771
+ init_esm_shims();
39772
+ var _prepareExtensionsForRevisionRequest = {};
39773
+ var _prepareExtensionsForRevisionResponse = {};
39774
+ function resolveWixBlocksV1WixBlocksServiceUrl(opts) {
39775
+ var domainToMappings = {
39776
+ "editor._base_domain_": [
39777
+ {
39778
+ srcPath: "/_api/wix-blocks-service",
39779
+ destPath: ""
39780
+ }
39781
+ ],
39782
+ "blocks._base_domain_": [
39783
+ {
39784
+ srcPath: "/_api/wix-blocks-service",
39785
+ destPath: ""
39786
+ }
39787
+ ],
39788
+ "create.editorx": [
39789
+ {
39790
+ srcPath: "/_api/wix-blocks-service",
39791
+ destPath: ""
39792
+ }
39793
+ ],
39794
+ "manage._base_domain_": [
39795
+ {
39796
+ srcPath: "/_api/wix-blocks-service",
39797
+ destPath: ""
39798
+ }
39799
+ ],
39800
+ "apps.wixapps.net": [
39801
+ {
39802
+ srcPath: "/wix-blocks-service",
39803
+ destPath: ""
39804
+ }
39805
+ ],
39806
+ "dev._base_domain_": [
39807
+ {
39808
+ srcPath: "/_api/wix-blocks-service",
39809
+ destPath: ""
39810
+ }
39811
+ ],
39812
+ "bo._base_domain_": [
39813
+ {
39814
+ srcPath: "/wix-blocks-service",
39815
+ destPath: ""
39816
+ }
39817
+ ],
39818
+ "wixbo.ai": [
39819
+ {
39820
+ srcPath: "/wix-blocks-service",
39821
+ destPath: ""
39822
+ }
39823
+ ],
39824
+ "wix-bo.com": [
39825
+ {
39826
+ srcPath: "/wix-blocks-service",
39827
+ destPath: ""
39828
+ }
39829
+ ]
39830
+ };
39831
+ return resolveUrl(Object.assign(opts, { domainToMappings }));
39832
+ }
39833
+ function prepareExtensionsForRevision(payload) {
39834
+ var _a = serializer(_prepareExtensionsForRevisionRequest, {}), toReq = _a.toJSON, fromReq = _a.fromJSON;
39835
+ var fromRes = serializer(_prepareExtensionsForRevisionResponse, {}).fromJSON;
39836
+ function __prepareExtensionsForRevision(_a2) {
39837
+ var host = _a2.host;
39838
+ var serializedData = toReq(payload);
39839
+ var metadata = {
39840
+ entityFqdn: "wix.blocks.v1.blocks_app",
39841
+ method: "POST",
39842
+ methodFqn: "wix.blocks.v1.WixBlocksService.PrepareExtensionsForRevision",
39843
+ url: resolveWixBlocksV1WixBlocksServiceUrl({
39844
+ protoPath: "/api/v1/apps/{appDefId}/prepare-extensions-for-revision",
39845
+ data: serializedData,
39846
+ host
39847
+ }),
39848
+ data: serializedData,
39849
+ transformResponse: fromRes
39850
+ };
39851
+ return metadata;
39852
+ }
39853
+ __prepareExtensionsForRevision.fromReq = fromReq;
39854
+ __prepareExtensionsForRevision.__isAmbassador = true;
39855
+ return __prepareExtensionsForRevision;
39856
+ }
39857
+
39858
+ // src/blocks/blocks-client.ts
39859
+ var BlocksClient = class {
39860
+ constructor(httpClient) {
39861
+ this.httpClient = httpClient;
39862
+ const { minRetryTimeout } = getTestOverrides();
39863
+ this.retryOptions = {
39864
+ retries: 3,
39865
+ minTimeout: minRetryTimeout,
39866
+ maxTimeout: 3 * 1e3
39867
+ };
39868
+ }
39869
+ retryOptions;
39870
+ prepareExtensionsForRevision = async (payload) => {
39871
+ try {
39872
+ const { data: data2 } = await pRetry(
39873
+ () => this.httpClient.request(prepareExtensionsForRevision(payload)),
39874
+ this.retryOptions
39875
+ );
39876
+ return data2.extensionsForRevision ?? [];
39877
+ } catch (e) {
39878
+ throw new CliError({
39879
+ code: CliErrorCode.FailedToGetBlocksExtensionsData(),
39880
+ cause: e
39881
+ });
39882
+ }
39883
+ };
39884
+ };
39885
+
39644
39886
  export {
39645
39887
  getViteServerUrl,
39646
39888
  getViteConfig,
@@ -39652,11 +39894,12 @@ export {
39652
39894
  validateComponents,
39653
39895
  createCustomElementConfig,
39654
39896
  createAppManifest,
39655
- getComponentSourceBuilder
39897
+ getComponentSourceBuilder,
39898
+ BlocksClient
39656
39899
  };
39657
39900
  /*! Bundled license information:
39658
39901
 
39659
39902
  he/he.js:
39660
39903
  (*! https://mths.be/he v1.2.0 by @mathias | MIT license *)
39661
39904
  */
39662
- //# sourceMappingURL=chunk-AQKGIDJO.js.map
39905
+ //# sourceMappingURL=chunk-KJRYBTZB.js.map