@wix/cli-app 1.1.116 → 1.1.118
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/build/{AddPermissionCommand-L25CLGCJ.js → AddPermissionCommand-XQFRPQQO.js} +2 -2
- package/build/{DevCommand-NZPY3ZKI.js → DevCommand-BW2GNGYL.js} +10 -10
- package/build/{GenerateCommand-HZHNCD4J.js → GenerateCommand-TACJEJI2.js} +7 -7
- package/build/{LogsCommand-JETSP2QT.js → LogsCommand-XF6HSIGH.js} +3 -3
- package/build/PreviewCommand-G4GEGWOP.js +19 -0
- package/build/ReleaseCommand-3ITBL5S7.js +23 -0
- package/build/{ServeCommand-TO3YNEIW.js → ServeCommand-H6SM4TNJ.js} +3 -3
- package/build/{build-WH7BEX3E.js → build-UZ5ZDKFS.js} +6 -6
- package/build/{chunk-BQ3ZW4QR.js → chunk-34CV6LY5.js} +3 -3
- package/build/{chunk-4PO544KA.js → chunk-47HVULMT.js} +2 -2
- package/build/{chunk-22SYZOZ7.js → chunk-47ZGVLSL.js} +6 -6
- package/build/{chunk-WIABG7X2.js → chunk-5G3JFWD7.js} +15 -3
- package/build/chunk-5G3JFWD7.js.map +1 -0
- package/build/{chunk-VEJTHTPP.js → chunk-C25ZMJX2.js} +2 -2
- package/build/{chunk-GIZAPCYP.js → chunk-DSZNVDIR.js} +2 -2
- package/build/{chunk-6HBVGAB3.js → chunk-JVJSVO7G.js} +4 -4
- package/build/{chunk-RARQBASJ.js → chunk-N4H5JIS6.js} +14322 -13038
- package/build/{chunk-RARQBASJ.js.map → chunk-N4H5JIS6.js.map} +1 -1
- package/build/{chunk-O7UOIDBI.js → chunk-P2GIAJ6A.js} +2 -2
- package/build/{chunk-NMUWDGKC.js → chunk-PM7KFT2F.js} +6 -6
- package/build/{chunk-TESZWM5I.js → chunk-RTCCH4WR.js} +2 -2
- package/build/{chunk-GT63PNZK.js → chunk-TJVEM3M3.js} +7 -7
- package/build/{chunk-U4VMAJSH.js → chunk-TMRAGHRG.js} +2 -2
- package/build/{chunk-FEQTMIRZ.js → chunk-U7EYN25W.js} +4 -4
- package/build/{chunk-UTKR3QPL.js → chunk-UHH6EG5J.js} +2 -2
- package/build/{chunk-4QE4ISSY.js → chunk-V465DPJJ.js} +533 -245
- package/build/{chunk-4QE4ISSY.js.map → chunk-V465DPJJ.js.map} +1 -1
- package/build/{chunk-AWWQQ6U6.js → chunk-ZJAZY6AF.js} +2 -2
- package/build/index.js +23 -23
- package/build/platform-sdk/editor.js.map +1 -1
- package/build/{preview-BHI5H5GS.js → preview-RNNZPLEY.js} +12 -12
- package/build/{release-OVR5T4QF.js → release-3GKT7F43.js} +14 -14
- package/build/{render-command-ZFCI4V5A.js → render-command-T44TDIVV.js} +5 -5
- package/package.json +5 -5
- package/build/PreviewCommand-LTPBBKHQ.js +0 -19
- package/build/ReleaseCommand-75RLIZMY.js +0 -23
- package/build/chunk-WIABG7X2.js.map +0 -1
- /package/build/{AddPermissionCommand-L25CLGCJ.js.map → AddPermissionCommand-XQFRPQQO.js.map} +0 -0
- /package/build/{DevCommand-NZPY3ZKI.js.map → DevCommand-BW2GNGYL.js.map} +0 -0
- /package/build/{GenerateCommand-HZHNCD4J.js.map → GenerateCommand-TACJEJI2.js.map} +0 -0
- /package/build/{LogsCommand-JETSP2QT.js.map → LogsCommand-XF6HSIGH.js.map} +0 -0
- /package/build/{PreviewCommand-LTPBBKHQ.js.map → PreviewCommand-G4GEGWOP.js.map} +0 -0
- /package/build/{ReleaseCommand-75RLIZMY.js.map → ReleaseCommand-3ITBL5S7.js.map} +0 -0
- /package/build/{ServeCommand-TO3YNEIW.js.map → ServeCommand-H6SM4TNJ.js.map} +0 -0
- /package/build/{build-WH7BEX3E.js.map → build-UZ5ZDKFS.js.map} +0 -0
- /package/build/{chunk-BQ3ZW4QR.js.map → chunk-34CV6LY5.js.map} +0 -0
- /package/build/{chunk-4PO544KA.js.map → chunk-47HVULMT.js.map} +0 -0
- /package/build/{chunk-22SYZOZ7.js.map → chunk-47ZGVLSL.js.map} +0 -0
- /package/build/{chunk-VEJTHTPP.js.map → chunk-C25ZMJX2.js.map} +0 -0
- /package/build/{chunk-GIZAPCYP.js.map → chunk-DSZNVDIR.js.map} +0 -0
- /package/build/{chunk-6HBVGAB3.js.map → chunk-JVJSVO7G.js.map} +0 -0
- /package/build/{chunk-O7UOIDBI.js.map → chunk-P2GIAJ6A.js.map} +0 -0
- /package/build/{chunk-NMUWDGKC.js.map → chunk-PM7KFT2F.js.map} +0 -0
- /package/build/{chunk-TESZWM5I.js.map → chunk-RTCCH4WR.js.map} +0 -0
- /package/build/{chunk-GT63PNZK.js.map → chunk-TJVEM3M3.js.map} +0 -0
- /package/build/{chunk-U4VMAJSH.js.map → chunk-TMRAGHRG.js.map} +0 -0
- /package/build/{chunk-FEQTMIRZ.js.map → chunk-U7EYN25W.js.map} +0 -0
- /package/build/{chunk-UTKR3QPL.js.map → chunk-UHH6EG5J.js.map} +0 -0
- /package/build/{chunk-AWWQQ6U6.js.map → chunk-ZJAZY6AF.js.map} +0 -0
- /package/build/{preview-BHI5H5GS.js.map → preview-RNNZPLEY.js.map} +0 -0
- /package/build/{release-OVR5T4QF.js.map → release-3GKT7F43.js.map} +0 -0
- /package/build/{render-command-ZFCI4V5A.js.map → render-command-T44TDIVV.js.map} +0 -0
|
@@ -3,7 +3,7 @@ const require = _createRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
getBackendEventSlug,
|
|
5
5
|
require_baseUniq
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5G3JFWD7.js";
|
|
7
7
|
import {
|
|
8
8
|
API_BASEURL_PLACEHOLDER,
|
|
9
9
|
AlgorithmType,
|
|
@@ -21,7 +21,9 @@ import {
|
|
|
21
21
|
DASHBOARD_PAGES_PATTERN,
|
|
22
22
|
DASHBOARD_PLUGINS_PATTERN,
|
|
23
23
|
DevCenterComponent,
|
|
24
|
+
ELEMENTS_DIR,
|
|
24
25
|
EVENTS_PATTERN,
|
|
26
|
+
ElementType,
|
|
25
27
|
EmbedCategory,
|
|
26
28
|
EmbeddedScriptPages,
|
|
27
29
|
EmbeddedScriptPlacement,
|
|
@@ -60,6 +62,7 @@ import {
|
|
|
60
62
|
require_lib,
|
|
61
63
|
require_picomatch,
|
|
62
64
|
require_src,
|
|
65
|
+
require_types_impl,
|
|
63
66
|
virtualBlocksWidgetPanelScriptAssets,
|
|
64
67
|
virtualBlocksWidgetScriptAssets,
|
|
65
68
|
virtualCustomElementPanelHTMLAssets,
|
|
@@ -77,12 +80,13 @@ import {
|
|
|
77
80
|
virtualPathForCustomElementPanelHTMLAsset,
|
|
78
81
|
virtualPathForHTMLAsset,
|
|
79
82
|
virtualPresetIdForSiteComponent,
|
|
83
|
+
virtualPresetIdForSiteComponentElement,
|
|
80
84
|
virtualSiteComponentPanelScriptAssets,
|
|
81
85
|
virtualSiteComponentPresetAssets,
|
|
82
86
|
virtualSiteComponentScriptAssets,
|
|
83
87
|
virtualSiteComponentSdkScriptAssets,
|
|
84
88
|
z
|
|
85
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-N4H5JIS6.js";
|
|
86
90
|
import {
|
|
87
91
|
__commonJS,
|
|
88
92
|
__esm,
|
|
@@ -108,19 +112,19 @@ var require_globrex = __commonJS({
|
|
|
108
112
|
function globrex(glob, { extended = false, globstar = false, strict = false, filepath = false, flags = "" } = {}) {
|
|
109
113
|
let regex = "";
|
|
110
114
|
let segment = "";
|
|
111
|
-
let
|
|
115
|
+
let path9 = { regex: "", segments: [] };
|
|
112
116
|
let inGroup = false;
|
|
113
117
|
let inRange = false;
|
|
114
118
|
const ext2 = [];
|
|
115
119
|
function add2(str, { split: split2, last, only } = {}) {
|
|
116
120
|
if (only !== "path") regex += str;
|
|
117
121
|
if (filepath && only !== "regex") {
|
|
118
|
-
|
|
122
|
+
path9.regex += str === "\\/" ? SEP : str;
|
|
119
123
|
if (split2) {
|
|
120
124
|
if (last) segment += str;
|
|
121
125
|
if (segment !== "") {
|
|
122
126
|
if (!flags.includes("g")) segment = `^${segment}$`;
|
|
123
|
-
|
|
127
|
+
path9.segments.push(new RegExp(segment, flags));
|
|
124
128
|
}
|
|
125
129
|
segment = "";
|
|
126
130
|
} else {
|
|
@@ -305,14 +309,14 @@ var require_globrex = __commonJS({
|
|
|
305
309
|
if (!flags.includes("g")) {
|
|
306
310
|
regex = `^${regex}$`;
|
|
307
311
|
segment = `^${segment}$`;
|
|
308
|
-
if (filepath)
|
|
312
|
+
if (filepath) path9.regex = `^${path9.regex}$`;
|
|
309
313
|
}
|
|
310
314
|
const result = { regex: new RegExp(regex, flags) };
|
|
311
315
|
if (filepath) {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
result.path =
|
|
316
|
+
path9.segments.push(new RegExp(segment, flags));
|
|
317
|
+
path9.regex = new RegExp(path9.regex, flags);
|
|
318
|
+
path9.globstar = new RegExp(!flags.includes("g") ? `^${GLOBSTAR_SEGMENT}$` : GLOBSTAR_SEGMENT, flags);
|
|
319
|
+
result.path = path9;
|
|
316
320
|
}
|
|
317
321
|
return result;
|
|
318
322
|
}
|
|
@@ -688,14 +692,14 @@ var require_polyfills = __commonJS({
|
|
|
688
692
|
fs3.fstatSync = statFixSync(fs3.fstatSync);
|
|
689
693
|
fs3.lstatSync = statFixSync(fs3.lstatSync);
|
|
690
694
|
if (fs3.chmod && !fs3.lchmod) {
|
|
691
|
-
fs3.lchmod = function(
|
|
695
|
+
fs3.lchmod = function(path9, mode, cb) {
|
|
692
696
|
if (cb) process.nextTick(cb);
|
|
693
697
|
};
|
|
694
698
|
fs3.lchmodSync = function() {
|
|
695
699
|
};
|
|
696
700
|
}
|
|
697
701
|
if (fs3.chown && !fs3.lchown) {
|
|
698
|
-
fs3.lchown = function(
|
|
702
|
+
fs3.lchown = function(path9, uid, gid, cb) {
|
|
699
703
|
if (cb) process.nextTick(cb);
|
|
700
704
|
};
|
|
701
705
|
fs3.lchownSync = function() {
|
|
@@ -762,9 +766,9 @@ var require_polyfills = __commonJS({
|
|
|
762
766
|
};
|
|
763
767
|
}(fs3.readSync);
|
|
764
768
|
function patchLchmod(fs4) {
|
|
765
|
-
fs4.lchmod = function(
|
|
769
|
+
fs4.lchmod = function(path9, mode, callback) {
|
|
766
770
|
fs4.open(
|
|
767
|
-
|
|
771
|
+
path9,
|
|
768
772
|
constants.O_WRONLY | constants.O_SYMLINK,
|
|
769
773
|
mode,
|
|
770
774
|
function(err, fd) {
|
|
@@ -780,8 +784,8 @@ var require_polyfills = __commonJS({
|
|
|
780
784
|
}
|
|
781
785
|
);
|
|
782
786
|
};
|
|
783
|
-
fs4.lchmodSync = function(
|
|
784
|
-
var fd = fs4.openSync(
|
|
787
|
+
fs4.lchmodSync = function(path9, mode) {
|
|
788
|
+
var fd = fs4.openSync(path9, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
785
789
|
var threw = true;
|
|
786
790
|
var ret;
|
|
787
791
|
try {
|
|
@@ -802,8 +806,8 @@ var require_polyfills = __commonJS({
|
|
|
802
806
|
}
|
|
803
807
|
function patchLutimes(fs4) {
|
|
804
808
|
if (constants.hasOwnProperty("O_SYMLINK") && fs4.futimes) {
|
|
805
|
-
fs4.lutimes = function(
|
|
806
|
-
fs4.open(
|
|
809
|
+
fs4.lutimes = function(path9, at2, mt, cb) {
|
|
810
|
+
fs4.open(path9, constants.O_SYMLINK, function(er, fd) {
|
|
807
811
|
if (er) {
|
|
808
812
|
if (cb) cb(er);
|
|
809
813
|
return;
|
|
@@ -815,8 +819,8 @@ var require_polyfills = __commonJS({
|
|
|
815
819
|
});
|
|
816
820
|
});
|
|
817
821
|
};
|
|
818
|
-
fs4.lutimesSync = function(
|
|
819
|
-
var fd = fs4.openSync(
|
|
822
|
+
fs4.lutimesSync = function(path9, at2, mt) {
|
|
823
|
+
var fd = fs4.openSync(path9, constants.O_SYMLINK);
|
|
820
824
|
var ret;
|
|
821
825
|
var threw = true;
|
|
822
826
|
try {
|
|
@@ -936,11 +940,11 @@ var require_legacy_streams = __commonJS({
|
|
|
936
940
|
ReadStream,
|
|
937
941
|
WriteStream
|
|
938
942
|
};
|
|
939
|
-
function ReadStream(
|
|
940
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
943
|
+
function ReadStream(path9, options) {
|
|
944
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path9, options);
|
|
941
945
|
Stream.call(this);
|
|
942
946
|
var self2 = this;
|
|
943
|
-
this.path =
|
|
947
|
+
this.path = path9;
|
|
944
948
|
this.fd = null;
|
|
945
949
|
this.readable = true;
|
|
946
950
|
this.paused = false;
|
|
@@ -985,10 +989,10 @@ var require_legacy_streams = __commonJS({
|
|
|
985
989
|
self2._read();
|
|
986
990
|
});
|
|
987
991
|
}
|
|
988
|
-
function WriteStream(
|
|
989
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
992
|
+
function WriteStream(path9, options) {
|
|
993
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path9, options);
|
|
990
994
|
Stream.call(this);
|
|
991
|
-
this.path =
|
|
995
|
+
this.path = path9;
|
|
992
996
|
this.fd = null;
|
|
993
997
|
this.writable = true;
|
|
994
998
|
this.flags = "w";
|
|
@@ -1134,14 +1138,14 @@ var require_graceful_fs = __commonJS({
|
|
|
1134
1138
|
fs4.createWriteStream = createWriteStream;
|
|
1135
1139
|
var fs$readFile = fs4.readFile;
|
|
1136
1140
|
fs4.readFile = readFile5;
|
|
1137
|
-
function readFile5(
|
|
1141
|
+
function readFile5(path9, options, cb) {
|
|
1138
1142
|
if (typeof options === "function")
|
|
1139
1143
|
cb = options, options = null;
|
|
1140
|
-
return go$readFile(
|
|
1141
|
-
function go$readFile(
|
|
1142
|
-
return fs$readFile(
|
|
1144
|
+
return go$readFile(path9, options, cb);
|
|
1145
|
+
function go$readFile(path10, options2, cb2, startTime) {
|
|
1146
|
+
return fs$readFile(path10, options2, function(err) {
|
|
1143
1147
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1144
|
-
enqueue([go$readFile, [
|
|
1148
|
+
enqueue([go$readFile, [path10, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
1145
1149
|
else {
|
|
1146
1150
|
if (typeof cb2 === "function")
|
|
1147
1151
|
cb2.apply(this, arguments);
|
|
@@ -1151,14 +1155,14 @@ var require_graceful_fs = __commonJS({
|
|
|
1151
1155
|
}
|
|
1152
1156
|
var fs$writeFile = fs4.writeFile;
|
|
1153
1157
|
fs4.writeFile = writeFile3;
|
|
1154
|
-
function writeFile3(
|
|
1158
|
+
function writeFile3(path9, data2, options, cb) {
|
|
1155
1159
|
if (typeof options === "function")
|
|
1156
1160
|
cb = options, options = null;
|
|
1157
|
-
return go$writeFile(
|
|
1158
|
-
function go$writeFile(
|
|
1159
|
-
return fs$writeFile(
|
|
1161
|
+
return go$writeFile(path9, data2, options, cb);
|
|
1162
|
+
function go$writeFile(path10, data3, options2, cb2, startTime) {
|
|
1163
|
+
return fs$writeFile(path10, data3, options2, function(err) {
|
|
1160
1164
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1161
|
-
enqueue([go$writeFile, [
|
|
1165
|
+
enqueue([go$writeFile, [path10, data3, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
1162
1166
|
else {
|
|
1163
1167
|
if (typeof cb2 === "function")
|
|
1164
1168
|
cb2.apply(this, arguments);
|
|
@@ -1169,14 +1173,14 @@ var require_graceful_fs = __commonJS({
|
|
|
1169
1173
|
var fs$appendFile = fs4.appendFile;
|
|
1170
1174
|
if (fs$appendFile)
|
|
1171
1175
|
fs4.appendFile = appendFile;
|
|
1172
|
-
function appendFile(
|
|
1176
|
+
function appendFile(path9, data2, options, cb) {
|
|
1173
1177
|
if (typeof options === "function")
|
|
1174
1178
|
cb = options, options = null;
|
|
1175
|
-
return go$appendFile(
|
|
1176
|
-
function go$appendFile(
|
|
1177
|
-
return fs$appendFile(
|
|
1179
|
+
return go$appendFile(path9, data2, options, cb);
|
|
1180
|
+
function go$appendFile(path10, data3, options2, cb2, startTime) {
|
|
1181
|
+
return fs$appendFile(path10, data3, options2, function(err) {
|
|
1178
1182
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1179
|
-
enqueue([go$appendFile, [
|
|
1183
|
+
enqueue([go$appendFile, [path10, data3, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
1180
1184
|
else {
|
|
1181
1185
|
if (typeof cb2 === "function")
|
|
1182
1186
|
cb2.apply(this, arguments);
|
|
@@ -1207,31 +1211,31 @@ var require_graceful_fs = __commonJS({
|
|
|
1207
1211
|
var fs$readdir = fs4.readdir;
|
|
1208
1212
|
fs4.readdir = readdir;
|
|
1209
1213
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
1210
|
-
function readdir(
|
|
1214
|
+
function readdir(path9, options, cb) {
|
|
1211
1215
|
if (typeof options === "function")
|
|
1212
1216
|
cb = options, options = null;
|
|
1213
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(
|
|
1214
|
-
return fs$readdir(
|
|
1215
|
-
|
|
1217
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path10, options2, cb2, startTime) {
|
|
1218
|
+
return fs$readdir(path10, fs$readdirCallback(
|
|
1219
|
+
path10,
|
|
1216
1220
|
options2,
|
|
1217
1221
|
cb2,
|
|
1218
1222
|
startTime
|
|
1219
1223
|
));
|
|
1220
|
-
} : function go$readdir2(
|
|
1221
|
-
return fs$readdir(
|
|
1222
|
-
|
|
1224
|
+
} : function go$readdir2(path10, options2, cb2, startTime) {
|
|
1225
|
+
return fs$readdir(path10, options2, fs$readdirCallback(
|
|
1226
|
+
path10,
|
|
1223
1227
|
options2,
|
|
1224
1228
|
cb2,
|
|
1225
1229
|
startTime
|
|
1226
1230
|
));
|
|
1227
1231
|
};
|
|
1228
|
-
return go$readdir(
|
|
1229
|
-
function fs$readdirCallback(
|
|
1232
|
+
return go$readdir(path9, options, cb);
|
|
1233
|
+
function fs$readdirCallback(path10, options2, cb2, startTime) {
|
|
1230
1234
|
return function(err, files) {
|
|
1231
1235
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1232
1236
|
enqueue([
|
|
1233
1237
|
go$readdir,
|
|
1234
|
-
[
|
|
1238
|
+
[path10, options2, cb2],
|
|
1235
1239
|
err,
|
|
1236
1240
|
startTime || Date.now(),
|
|
1237
1241
|
Date.now()
|
|
@@ -1302,7 +1306,7 @@ var require_graceful_fs = __commonJS({
|
|
|
1302
1306
|
enumerable: true,
|
|
1303
1307
|
configurable: true
|
|
1304
1308
|
});
|
|
1305
|
-
function ReadStream(
|
|
1309
|
+
function ReadStream(path9, options) {
|
|
1306
1310
|
if (this instanceof ReadStream)
|
|
1307
1311
|
return fs$ReadStream.apply(this, arguments), this;
|
|
1308
1312
|
else
|
|
@@ -1322,7 +1326,7 @@ var require_graceful_fs = __commonJS({
|
|
|
1322
1326
|
}
|
|
1323
1327
|
});
|
|
1324
1328
|
}
|
|
1325
|
-
function WriteStream(
|
|
1329
|
+
function WriteStream(path9, options) {
|
|
1326
1330
|
if (this instanceof WriteStream)
|
|
1327
1331
|
return fs$WriteStream.apply(this, arguments), this;
|
|
1328
1332
|
else
|
|
@@ -1340,22 +1344,22 @@ var require_graceful_fs = __commonJS({
|
|
|
1340
1344
|
}
|
|
1341
1345
|
});
|
|
1342
1346
|
}
|
|
1343
|
-
function createReadStream(
|
|
1344
|
-
return new fs4.ReadStream(
|
|
1347
|
+
function createReadStream(path9, options) {
|
|
1348
|
+
return new fs4.ReadStream(path9, options);
|
|
1345
1349
|
}
|
|
1346
|
-
function createWriteStream(
|
|
1347
|
-
return new fs4.WriteStream(
|
|
1350
|
+
function createWriteStream(path9, options) {
|
|
1351
|
+
return new fs4.WriteStream(path9, options);
|
|
1348
1352
|
}
|
|
1349
1353
|
var fs$open = fs4.open;
|
|
1350
1354
|
fs4.open = open;
|
|
1351
|
-
function open(
|
|
1355
|
+
function open(path9, flags, mode, cb) {
|
|
1352
1356
|
if (typeof mode === "function")
|
|
1353
1357
|
cb = mode, mode = null;
|
|
1354
|
-
return go$open(
|
|
1355
|
-
function go$open(
|
|
1356
|
-
return fs$open(
|
|
1358
|
+
return go$open(path9, flags, mode, cb);
|
|
1359
|
+
function go$open(path10, flags2, mode2, cb2, startTime) {
|
|
1360
|
+
return fs$open(path10, flags2, mode2, function(err, fd) {
|
|
1357
1361
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1358
|
-
enqueue([go$open, [
|
|
1362
|
+
enqueue([go$open, [path10, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
1359
1363
|
else {
|
|
1360
1364
|
if (typeof cb2 === "function")
|
|
1361
1365
|
cb2.apply(this, arguments);
|
|
@@ -1527,10 +1531,10 @@ var require_utils = __commonJS({
|
|
|
1527
1531
|
"../../node_modules/vite-plugin-externals/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module) {
|
|
1528
1532
|
"use strict";
|
|
1529
1533
|
init_esm_shims();
|
|
1530
|
-
var
|
|
1534
|
+
var path9 = __require("path");
|
|
1531
1535
|
module.exports.checkPath = function checkPath(pth) {
|
|
1532
1536
|
if (process.platform === "win32") {
|
|
1533
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(
|
|
1537
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path9.parse(pth).root, ""));
|
|
1534
1538
|
if (pathHasInvalidWinCharacters) {
|
|
1535
1539
|
const error = new Error(`Path contains invalid characters: ${pth}`);
|
|
1536
1540
|
error.code = "EINVAL";
|
|
@@ -1597,8 +1601,8 @@ var require_path_exists = __commonJS({
|
|
|
1597
1601
|
init_esm_shims();
|
|
1598
1602
|
var u = require_universalify().fromPromise;
|
|
1599
1603
|
var fs3 = require_fs();
|
|
1600
|
-
function pathExists(
|
|
1601
|
-
return fs3.access(
|
|
1604
|
+
function pathExists(path9) {
|
|
1605
|
+
return fs3.access(path9).then(() => true).catch(() => false);
|
|
1602
1606
|
}
|
|
1603
1607
|
module.exports = {
|
|
1604
1608
|
pathExists: u(pathExists),
|
|
@@ -1613,8 +1617,8 @@ var require_utimes = __commonJS({
|
|
|
1613
1617
|
"use strict";
|
|
1614
1618
|
init_esm_shims();
|
|
1615
1619
|
var fs3 = require_graceful_fs();
|
|
1616
|
-
function utimesMillis(
|
|
1617
|
-
fs3.open(
|
|
1620
|
+
function utimesMillis(path9, atime, mtime, callback) {
|
|
1621
|
+
fs3.open(path9, "r+", (err, fd) => {
|
|
1618
1622
|
if (err) return callback(err);
|
|
1619
1623
|
fs3.futimes(fd, atime, mtime, (futimesErr) => {
|
|
1620
1624
|
fs3.close(fd, (closeErr) => {
|
|
@@ -1623,8 +1627,8 @@ var require_utimes = __commonJS({
|
|
|
1623
1627
|
});
|
|
1624
1628
|
});
|
|
1625
1629
|
}
|
|
1626
|
-
function utimesMillisSync(
|
|
1627
|
-
const fd = fs3.openSync(
|
|
1630
|
+
function utimesMillisSync(path9, atime, mtime) {
|
|
1631
|
+
const fd = fs3.openSync(path9, "r+");
|
|
1628
1632
|
fs3.futimesSync(fd, atime, mtime);
|
|
1629
1633
|
return fs3.closeSync(fd);
|
|
1630
1634
|
}
|
|
@@ -1641,7 +1645,7 @@ var require_stat = __commonJS({
|
|
|
1641
1645
|
"use strict";
|
|
1642
1646
|
init_esm_shims();
|
|
1643
1647
|
var fs3 = require_fs();
|
|
1644
|
-
var
|
|
1648
|
+
var path9 = __require("path");
|
|
1645
1649
|
var util = __require("util");
|
|
1646
1650
|
function getStats(src, dest, opts) {
|
|
1647
1651
|
const statFunc = opts.dereference ? (file) => fs3.stat(file, { bigint: true }) : (file) => fs3.lstat(file, { bigint: true });
|
|
@@ -1671,8 +1675,8 @@ var require_stat = __commonJS({
|
|
|
1671
1675
|
const { srcStat, destStat } = stats;
|
|
1672
1676
|
if (destStat) {
|
|
1673
1677
|
if (areIdentical(srcStat, destStat)) {
|
|
1674
|
-
const srcBaseName =
|
|
1675
|
-
const destBaseName =
|
|
1678
|
+
const srcBaseName = path9.basename(src);
|
|
1679
|
+
const destBaseName = path9.basename(dest);
|
|
1676
1680
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
1677
1681
|
return cb(null, { srcStat, destStat, isChangingCase: true });
|
|
1678
1682
|
}
|
|
@@ -1695,8 +1699,8 @@ var require_stat = __commonJS({
|
|
|
1695
1699
|
const { srcStat, destStat } = getStatsSync(src, dest, opts);
|
|
1696
1700
|
if (destStat) {
|
|
1697
1701
|
if (areIdentical(srcStat, destStat)) {
|
|
1698
|
-
const srcBaseName =
|
|
1699
|
-
const destBaseName =
|
|
1702
|
+
const srcBaseName = path9.basename(src);
|
|
1703
|
+
const destBaseName = path9.basename(dest);
|
|
1700
1704
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
1701
1705
|
return { srcStat, destStat, isChangingCase: true };
|
|
1702
1706
|
}
|
|
@@ -1715,9 +1719,9 @@ var require_stat = __commonJS({
|
|
|
1715
1719
|
return { srcStat, destStat };
|
|
1716
1720
|
}
|
|
1717
1721
|
function checkParentPaths(src, srcStat, dest, funcName, cb) {
|
|
1718
|
-
const srcParent =
|
|
1719
|
-
const destParent =
|
|
1720
|
-
if (destParent === srcParent || destParent ===
|
|
1722
|
+
const srcParent = path9.resolve(path9.dirname(src));
|
|
1723
|
+
const destParent = path9.resolve(path9.dirname(dest));
|
|
1724
|
+
if (destParent === srcParent || destParent === path9.parse(destParent).root) return cb();
|
|
1721
1725
|
fs3.stat(destParent, { bigint: true }, (err, destStat) => {
|
|
1722
1726
|
if (err) {
|
|
1723
1727
|
if (err.code === "ENOENT") return cb();
|
|
@@ -1730,9 +1734,9 @@ var require_stat = __commonJS({
|
|
|
1730
1734
|
});
|
|
1731
1735
|
}
|
|
1732
1736
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
1733
|
-
const srcParent =
|
|
1734
|
-
const destParent =
|
|
1735
|
-
if (destParent === srcParent || destParent ===
|
|
1737
|
+
const srcParent = path9.resolve(path9.dirname(src));
|
|
1738
|
+
const destParent = path9.resolve(path9.dirname(dest));
|
|
1739
|
+
if (destParent === srcParent || destParent === path9.parse(destParent).root) return;
|
|
1736
1740
|
let destStat;
|
|
1737
1741
|
try {
|
|
1738
1742
|
destStat = fs3.statSync(destParent, { bigint: true });
|
|
@@ -1749,8 +1753,8 @@ var require_stat = __commonJS({
|
|
|
1749
1753
|
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
1750
1754
|
}
|
|
1751
1755
|
function isSrcSubdir(src, dest) {
|
|
1752
|
-
const srcArr =
|
|
1753
|
-
const destArr =
|
|
1756
|
+
const srcArr = path9.resolve(src).split(path9.sep).filter((i) => i);
|
|
1757
|
+
const destArr = path9.resolve(dest).split(path9.sep).filter((i) => i);
|
|
1754
1758
|
return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true);
|
|
1755
1759
|
}
|
|
1756
1760
|
function errMsg(src, dest, funcName) {
|
|
@@ -1773,7 +1777,7 @@ var require_copy = __commonJS({
|
|
|
1773
1777
|
"use strict";
|
|
1774
1778
|
init_esm_shims();
|
|
1775
1779
|
var fs3 = require_graceful_fs();
|
|
1776
|
-
var
|
|
1780
|
+
var path9 = __require("path");
|
|
1777
1781
|
var mkdirs = require_mkdirs().mkdirs;
|
|
1778
1782
|
var pathExists = require_path_exists().pathExists;
|
|
1779
1783
|
var utimesMillis = require_utimes().utimesMillis;
|
|
@@ -1808,7 +1812,7 @@ var require_copy = __commonJS({
|
|
|
1808
1812
|
});
|
|
1809
1813
|
}
|
|
1810
1814
|
function checkParentDir(destStat, src, dest, opts, cb) {
|
|
1811
|
-
const destParent =
|
|
1815
|
+
const destParent = path9.dirname(dest);
|
|
1812
1816
|
pathExists(destParent, (err, dirExists) => {
|
|
1813
1817
|
if (err) return cb(err);
|
|
1814
1818
|
if (dirExists) return getStats(destStat, src, dest, opts, cb);
|
|
@@ -1916,8 +1920,8 @@ var require_copy = __commonJS({
|
|
|
1916
1920
|
return copyDirItem(items, item, src, dest, opts, cb);
|
|
1917
1921
|
}
|
|
1918
1922
|
function copyDirItem(items, item, src, dest, opts, cb) {
|
|
1919
|
-
const srcItem =
|
|
1920
|
-
const destItem =
|
|
1923
|
+
const srcItem = path9.join(src, item);
|
|
1924
|
+
const destItem = path9.join(dest, item);
|
|
1921
1925
|
stat2.checkPaths(srcItem, destItem, "copy", opts, (err, stats) => {
|
|
1922
1926
|
if (err) return cb(err);
|
|
1923
1927
|
const { destStat } = stats;
|
|
@@ -1931,7 +1935,7 @@ var require_copy = __commonJS({
|
|
|
1931
1935
|
fs3.readlink(src, (err, resolvedSrc) => {
|
|
1932
1936
|
if (err) return cb(err);
|
|
1933
1937
|
if (opts.dereference) {
|
|
1934
|
-
resolvedSrc =
|
|
1938
|
+
resolvedSrc = path9.resolve(process.cwd(), resolvedSrc);
|
|
1935
1939
|
}
|
|
1936
1940
|
if (!destStat) {
|
|
1937
1941
|
return fs3.symlink(resolvedSrc, dest, cb);
|
|
@@ -1942,7 +1946,7 @@ var require_copy = __commonJS({
|
|
|
1942
1946
|
return cb(err2);
|
|
1943
1947
|
}
|
|
1944
1948
|
if (opts.dereference) {
|
|
1945
|
-
resolvedDest =
|
|
1949
|
+
resolvedDest = path9.resolve(process.cwd(), resolvedDest);
|
|
1946
1950
|
}
|
|
1947
1951
|
if (stat2.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
1948
1952
|
return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
|
|
@@ -1971,7 +1975,7 @@ var require_copy_sync = __commonJS({
|
|
|
1971
1975
|
"use strict";
|
|
1972
1976
|
init_esm_shims();
|
|
1973
1977
|
var fs3 = require_graceful_fs();
|
|
1974
|
-
var
|
|
1978
|
+
var path9 = __require("path");
|
|
1975
1979
|
var mkdirsSync = require_mkdirs().mkdirsSync;
|
|
1976
1980
|
var utimesMillisSync = require_utimes().utimesMillisSync;
|
|
1977
1981
|
var stat2 = require_stat();
|
|
@@ -1995,7 +1999,7 @@ var require_copy_sync = __commonJS({
|
|
|
1995
1999
|
}
|
|
1996
2000
|
function handleFilterAndCopy(destStat, src, dest, opts) {
|
|
1997
2001
|
if (opts.filter && !opts.filter(src, dest)) return;
|
|
1998
|
-
const destParent =
|
|
2002
|
+
const destParent = path9.dirname(dest);
|
|
1999
2003
|
if (!fs3.existsSync(destParent)) mkdirsSync(destParent);
|
|
2000
2004
|
return getStats(destStat, src, dest, opts);
|
|
2001
2005
|
}
|
|
@@ -2060,15 +2064,15 @@ var require_copy_sync = __commonJS({
|
|
|
2060
2064
|
fs3.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
|
2061
2065
|
}
|
|
2062
2066
|
function copyDirItem(item, src, dest, opts) {
|
|
2063
|
-
const srcItem =
|
|
2064
|
-
const destItem =
|
|
2067
|
+
const srcItem = path9.join(src, item);
|
|
2068
|
+
const destItem = path9.join(dest, item);
|
|
2065
2069
|
const { destStat } = stat2.checkPathsSync(srcItem, destItem, "copy", opts);
|
|
2066
2070
|
return startCopy(destStat, srcItem, destItem, opts);
|
|
2067
2071
|
}
|
|
2068
2072
|
function onLink(destStat, src, dest, opts) {
|
|
2069
2073
|
let resolvedSrc = fs3.readlinkSync(src);
|
|
2070
2074
|
if (opts.dereference) {
|
|
2071
|
-
resolvedSrc =
|
|
2075
|
+
resolvedSrc = path9.resolve(process.cwd(), resolvedSrc);
|
|
2072
2076
|
}
|
|
2073
2077
|
if (!destStat) {
|
|
2074
2078
|
return fs3.symlinkSync(resolvedSrc, dest);
|
|
@@ -2081,7 +2085,7 @@ var require_copy_sync = __commonJS({
|
|
|
2081
2085
|
throw err;
|
|
2082
2086
|
}
|
|
2083
2087
|
if (opts.dereference) {
|
|
2084
|
-
resolvedDest =
|
|
2088
|
+
resolvedDest = path9.resolve(process.cwd(), resolvedDest);
|
|
2085
2089
|
}
|
|
2086
2090
|
if (stat2.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
2087
2091
|
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
@@ -2119,7 +2123,7 @@ var require_rimraf = __commonJS({
|
|
|
2119
2123
|
"use strict";
|
|
2120
2124
|
init_esm_shims();
|
|
2121
2125
|
var fs3 = require_graceful_fs();
|
|
2122
|
-
var
|
|
2126
|
+
var path9 = __require("path");
|
|
2123
2127
|
var assert = __require("assert");
|
|
2124
2128
|
var isWindows2 = process.platform === "win32";
|
|
2125
2129
|
function defaults2(options) {
|
|
@@ -2264,7 +2268,7 @@ var require_rimraf = __commonJS({
|
|
|
2264
2268
|
let errState;
|
|
2265
2269
|
if (n3 === 0) return options.rmdir(p, cb);
|
|
2266
2270
|
files.forEach((f) => {
|
|
2267
|
-
rimraf(
|
|
2271
|
+
rimraf(path9.join(p, f), options, (er2) => {
|
|
2268
2272
|
if (errState) {
|
|
2269
2273
|
return;
|
|
2270
2274
|
}
|
|
@@ -2329,7 +2333,7 @@ var require_rimraf = __commonJS({
|
|
|
2329
2333
|
function rmkidsSync(p, options) {
|
|
2330
2334
|
assert(p);
|
|
2331
2335
|
assert(options);
|
|
2332
|
-
options.readdirSync(p).forEach((f) => rimrafSync(
|
|
2336
|
+
options.readdirSync(p).forEach((f) => rimrafSync(path9.join(p, f), options));
|
|
2333
2337
|
if (isWindows2) {
|
|
2334
2338
|
const startTime = Date.now();
|
|
2335
2339
|
do {
|
|
@@ -2357,13 +2361,13 @@ var require_remove = __commonJS({
|
|
|
2357
2361
|
var fs3 = require_graceful_fs();
|
|
2358
2362
|
var u = require_universalify().fromCallback;
|
|
2359
2363
|
var rimraf = require_rimraf();
|
|
2360
|
-
function remove2(
|
|
2361
|
-
if (fs3.rm) return fs3.rm(
|
|
2362
|
-
rimraf(
|
|
2364
|
+
function remove2(path9, callback) {
|
|
2365
|
+
if (fs3.rm) return fs3.rm(path9, { recursive: true, force: true }, callback);
|
|
2366
|
+
rimraf(path9, callback);
|
|
2363
2367
|
}
|
|
2364
|
-
function removeSync(
|
|
2365
|
-
if (fs3.rmSync) return fs3.rmSync(
|
|
2366
|
-
rimraf.sync(
|
|
2368
|
+
function removeSync(path9) {
|
|
2369
|
+
if (fs3.rmSync) return fs3.rmSync(path9, { recursive: true, force: true });
|
|
2370
|
+
rimraf.sync(path9);
|
|
2367
2371
|
}
|
|
2368
2372
|
module.exports = {
|
|
2369
2373
|
remove: u(remove2),
|
|
@@ -2379,7 +2383,7 @@ var require_empty = __commonJS({
|
|
|
2379
2383
|
init_esm_shims();
|
|
2380
2384
|
var u = require_universalify().fromPromise;
|
|
2381
2385
|
var fs3 = require_fs();
|
|
2382
|
-
var
|
|
2386
|
+
var path9 = __require("path");
|
|
2383
2387
|
var mkdir = require_mkdirs();
|
|
2384
2388
|
var remove2 = require_remove();
|
|
2385
2389
|
var emptyDir = u(async function emptyDir2(dir) {
|
|
@@ -2389,7 +2393,7 @@ var require_empty = __commonJS({
|
|
|
2389
2393
|
} catch {
|
|
2390
2394
|
return mkdir.mkdirs(dir);
|
|
2391
2395
|
}
|
|
2392
|
-
return Promise.all(items.map((item) => remove2.remove(
|
|
2396
|
+
return Promise.all(items.map((item) => remove2.remove(path9.join(dir, item))));
|
|
2393
2397
|
});
|
|
2394
2398
|
function emptyDirSync2(dir) {
|
|
2395
2399
|
let items;
|
|
@@ -2399,7 +2403,7 @@ var require_empty = __commonJS({
|
|
|
2399
2403
|
return mkdir.mkdirsSync(dir);
|
|
2400
2404
|
}
|
|
2401
2405
|
items.forEach((item) => {
|
|
2402
|
-
item =
|
|
2406
|
+
item = path9.join(dir, item);
|
|
2403
2407
|
remove2.removeSync(item);
|
|
2404
2408
|
});
|
|
2405
2409
|
}
|
|
@@ -2418,7 +2422,7 @@ var require_file = __commonJS({
|
|
|
2418
2422
|
"use strict";
|
|
2419
2423
|
init_esm_shims();
|
|
2420
2424
|
var u = require_universalify().fromCallback;
|
|
2421
|
-
var
|
|
2425
|
+
var path9 = __require("path");
|
|
2422
2426
|
var fs3 = require_graceful_fs();
|
|
2423
2427
|
var mkdir = require_mkdirs();
|
|
2424
2428
|
function createFile(file, callback) {
|
|
@@ -2430,7 +2434,7 @@ var require_file = __commonJS({
|
|
|
2430
2434
|
}
|
|
2431
2435
|
fs3.stat(file, (err, stats) => {
|
|
2432
2436
|
if (!err && stats.isFile()) return callback();
|
|
2433
|
-
const dir =
|
|
2437
|
+
const dir = path9.dirname(file);
|
|
2434
2438
|
fs3.stat(dir, (err2, stats2) => {
|
|
2435
2439
|
if (err2) {
|
|
2436
2440
|
if (err2.code === "ENOENT") {
|
|
@@ -2457,7 +2461,7 @@ var require_file = __commonJS({
|
|
|
2457
2461
|
} catch {
|
|
2458
2462
|
}
|
|
2459
2463
|
if (stats && stats.isFile()) return;
|
|
2460
|
-
const dir =
|
|
2464
|
+
const dir = path9.dirname(file);
|
|
2461
2465
|
try {
|
|
2462
2466
|
if (!fs3.statSync(dir).isDirectory()) {
|
|
2463
2467
|
fs3.readdirSync(dir);
|
|
@@ -2481,7 +2485,7 @@ var require_link = __commonJS({
|
|
|
2481
2485
|
"use strict";
|
|
2482
2486
|
init_esm_shims();
|
|
2483
2487
|
var u = require_universalify().fromCallback;
|
|
2484
|
-
var
|
|
2488
|
+
var path9 = __require("path");
|
|
2485
2489
|
var fs3 = require_graceful_fs();
|
|
2486
2490
|
var mkdir = require_mkdirs();
|
|
2487
2491
|
var pathExists = require_path_exists().pathExists;
|
|
@@ -2500,7 +2504,7 @@ var require_link = __commonJS({
|
|
|
2500
2504
|
return callback(err);
|
|
2501
2505
|
}
|
|
2502
2506
|
if (dstStat && areIdentical(srcStat, dstStat)) return callback(null);
|
|
2503
|
-
const dir =
|
|
2507
|
+
const dir = path9.dirname(dstpath);
|
|
2504
2508
|
pathExists(dir, (err2, dirExists) => {
|
|
2505
2509
|
if (err2) return callback(err2);
|
|
2506
2510
|
if (dirExists) return makeLink(srcpath, dstpath);
|
|
@@ -2525,7 +2529,7 @@ var require_link = __commonJS({
|
|
|
2525
2529
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
2526
2530
|
throw err;
|
|
2527
2531
|
}
|
|
2528
|
-
const dir =
|
|
2532
|
+
const dir = path9.dirname(dstpath);
|
|
2529
2533
|
const dirExists = fs3.existsSync(dir);
|
|
2530
2534
|
if (dirExists) return fs3.linkSync(srcpath, dstpath);
|
|
2531
2535
|
mkdir.mkdirsSync(dir);
|
|
@@ -2543,11 +2547,11 @@ var require_symlink_paths = __commonJS({
|
|
|
2543
2547
|
"../../node_modules/vite-plugin-externals/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
|
|
2544
2548
|
"use strict";
|
|
2545
2549
|
init_esm_shims();
|
|
2546
|
-
var
|
|
2550
|
+
var path9 = __require("path");
|
|
2547
2551
|
var fs3 = require_graceful_fs();
|
|
2548
2552
|
var pathExists = require_path_exists().pathExists;
|
|
2549
2553
|
function symlinkPaths(srcpath, dstpath, callback) {
|
|
2550
|
-
if (
|
|
2554
|
+
if (path9.isAbsolute(srcpath)) {
|
|
2551
2555
|
return fs3.lstat(srcpath, (err) => {
|
|
2552
2556
|
if (err) {
|
|
2553
2557
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
@@ -2559,8 +2563,8 @@ var require_symlink_paths = __commonJS({
|
|
|
2559
2563
|
});
|
|
2560
2564
|
});
|
|
2561
2565
|
} else {
|
|
2562
|
-
const dstdir =
|
|
2563
|
-
const relativeToDst =
|
|
2566
|
+
const dstdir = path9.dirname(dstpath);
|
|
2567
|
+
const relativeToDst = path9.join(dstdir, srcpath);
|
|
2564
2568
|
return pathExists(relativeToDst, (err, exists) => {
|
|
2565
2569
|
if (err) return callback(err);
|
|
2566
2570
|
if (exists) {
|
|
@@ -2576,7 +2580,7 @@ var require_symlink_paths = __commonJS({
|
|
|
2576
2580
|
}
|
|
2577
2581
|
return callback(null, {
|
|
2578
2582
|
toCwd: srcpath,
|
|
2579
|
-
toDst:
|
|
2583
|
+
toDst: path9.relative(dstdir, srcpath)
|
|
2580
2584
|
});
|
|
2581
2585
|
});
|
|
2582
2586
|
}
|
|
@@ -2585,7 +2589,7 @@ var require_symlink_paths = __commonJS({
|
|
|
2585
2589
|
}
|
|
2586
2590
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
2587
2591
|
let exists;
|
|
2588
|
-
if (
|
|
2592
|
+
if (path9.isAbsolute(srcpath)) {
|
|
2589
2593
|
exists = fs3.existsSync(srcpath);
|
|
2590
2594
|
if (!exists) throw new Error("absolute srcpath does not exist");
|
|
2591
2595
|
return {
|
|
@@ -2593,8 +2597,8 @@ var require_symlink_paths = __commonJS({
|
|
|
2593
2597
|
toDst: srcpath
|
|
2594
2598
|
};
|
|
2595
2599
|
} else {
|
|
2596
|
-
const dstdir =
|
|
2597
|
-
const relativeToDst =
|
|
2600
|
+
const dstdir = path9.dirname(dstpath);
|
|
2601
|
+
const relativeToDst = path9.join(dstdir, srcpath);
|
|
2598
2602
|
exists = fs3.existsSync(relativeToDst);
|
|
2599
2603
|
if (exists) {
|
|
2600
2604
|
return {
|
|
@@ -2606,7 +2610,7 @@ var require_symlink_paths = __commonJS({
|
|
|
2606
2610
|
if (!exists) throw new Error("relative srcpath does not exist");
|
|
2607
2611
|
return {
|
|
2608
2612
|
toCwd: srcpath,
|
|
2609
|
-
toDst:
|
|
2613
|
+
toDst: path9.relative(dstdir, srcpath)
|
|
2610
2614
|
};
|
|
2611
2615
|
}
|
|
2612
2616
|
}
|
|
@@ -2657,7 +2661,7 @@ var require_symlink = __commonJS({
|
|
|
2657
2661
|
"use strict";
|
|
2658
2662
|
init_esm_shims();
|
|
2659
2663
|
var u = require_universalify().fromCallback;
|
|
2660
|
-
var
|
|
2664
|
+
var path9 = __require("path");
|
|
2661
2665
|
var fs3 = require_fs();
|
|
2662
2666
|
var _mkdirs = require_mkdirs();
|
|
2663
2667
|
var mkdirs = _mkdirs.mkdirs;
|
|
@@ -2691,7 +2695,7 @@ var require_symlink = __commonJS({
|
|
|
2691
2695
|
srcpath = relative3.toDst;
|
|
2692
2696
|
symlinkType(relative3.toCwd, type, (err2, type2) => {
|
|
2693
2697
|
if (err2) return callback(err2);
|
|
2694
|
-
const dir =
|
|
2698
|
+
const dir = path9.dirname(dstpath);
|
|
2695
2699
|
pathExists(dir, (err3, dirExists) => {
|
|
2696
2700
|
if (err3) return callback(err3);
|
|
2697
2701
|
if (dirExists) return fs3.symlink(srcpath, dstpath, type2, callback);
|
|
@@ -2717,7 +2721,7 @@ var require_symlink = __commonJS({
|
|
|
2717
2721
|
const relative3 = symlinkPathsSync(srcpath, dstpath);
|
|
2718
2722
|
srcpath = relative3.toDst;
|
|
2719
2723
|
type = symlinkTypeSync(relative3.toCwd, type);
|
|
2720
|
-
const dir =
|
|
2724
|
+
const dir = path9.dirname(dstpath);
|
|
2721
2725
|
const exists = fs3.existsSync(dir);
|
|
2722
2726
|
if (exists) return fs3.symlinkSync(srcpath, dstpath, type);
|
|
2723
2727
|
mkdirsSync(dir);
|
|
@@ -2874,7 +2878,7 @@ var require_output_file = __commonJS({
|
|
|
2874
2878
|
init_esm_shims();
|
|
2875
2879
|
var u = require_universalify().fromCallback;
|
|
2876
2880
|
var fs3 = require_graceful_fs();
|
|
2877
|
-
var
|
|
2881
|
+
var path9 = __require("path");
|
|
2878
2882
|
var mkdir = require_mkdirs();
|
|
2879
2883
|
var pathExists = require_path_exists().pathExists;
|
|
2880
2884
|
function outputFile(file, data2, encoding, callback) {
|
|
@@ -2882,7 +2886,7 @@ var require_output_file = __commonJS({
|
|
|
2882
2886
|
callback = encoding;
|
|
2883
2887
|
encoding = "utf8";
|
|
2884
2888
|
}
|
|
2885
|
-
const dir =
|
|
2889
|
+
const dir = path9.dirname(file);
|
|
2886
2890
|
pathExists(dir, (err, itDoes) => {
|
|
2887
2891
|
if (err) return callback(err);
|
|
2888
2892
|
if (itDoes) return fs3.writeFile(file, data2, encoding, callback);
|
|
@@ -2893,7 +2897,7 @@ var require_output_file = __commonJS({
|
|
|
2893
2897
|
});
|
|
2894
2898
|
}
|
|
2895
2899
|
function outputFileSync(file, ...args) {
|
|
2896
|
-
const dir =
|
|
2900
|
+
const dir = path9.dirname(file);
|
|
2897
2901
|
if (fs3.existsSync(dir)) {
|
|
2898
2902
|
return fs3.writeFileSync(file, ...args);
|
|
2899
2903
|
}
|
|
@@ -2962,7 +2966,7 @@ var require_move = __commonJS({
|
|
|
2962
2966
|
"use strict";
|
|
2963
2967
|
init_esm_shims();
|
|
2964
2968
|
var fs3 = require_graceful_fs();
|
|
2965
|
-
var
|
|
2969
|
+
var path9 = __require("path");
|
|
2966
2970
|
var copy = require_copy2().copy;
|
|
2967
2971
|
var remove2 = require_remove().remove;
|
|
2968
2972
|
var mkdirp = require_mkdirs().mkdirp;
|
|
@@ -2981,7 +2985,7 @@ var require_move = __commonJS({
|
|
|
2981
2985
|
stat2.checkParentPaths(src, srcStat, dest, "move", (err2) => {
|
|
2982
2986
|
if (err2) return cb(err2);
|
|
2983
2987
|
if (isParentRoot(dest)) return doRename(src, dest, overwrite2, isChangingCase, cb);
|
|
2984
|
-
mkdirp(
|
|
2988
|
+
mkdirp(path9.dirname(dest), (err3) => {
|
|
2985
2989
|
if (err3) return cb(err3);
|
|
2986
2990
|
return doRename(src, dest, overwrite2, isChangingCase, cb);
|
|
2987
2991
|
});
|
|
@@ -2989,8 +2993,8 @@ var require_move = __commonJS({
|
|
|
2989
2993
|
});
|
|
2990
2994
|
}
|
|
2991
2995
|
function isParentRoot(dest) {
|
|
2992
|
-
const parent =
|
|
2993
|
-
const parsedPath =
|
|
2996
|
+
const parent = path9.dirname(dest);
|
|
2997
|
+
const parsedPath = path9.parse(parent);
|
|
2994
2998
|
return parsedPath.root === parent;
|
|
2995
2999
|
}
|
|
2996
3000
|
function doRename(src, dest, overwrite2, isChangingCase, cb) {
|
|
@@ -3034,7 +3038,7 @@ var require_move_sync = __commonJS({
|
|
|
3034
3038
|
"use strict";
|
|
3035
3039
|
init_esm_shims();
|
|
3036
3040
|
var fs3 = require_graceful_fs();
|
|
3037
|
-
var
|
|
3041
|
+
var path9 = __require("path");
|
|
3038
3042
|
var copySync = require_copy2().copySync;
|
|
3039
3043
|
var removeSync = require_remove().removeSync;
|
|
3040
3044
|
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
@@ -3044,12 +3048,12 @@ var require_move_sync = __commonJS({
|
|
|
3044
3048
|
const overwrite2 = opts.overwrite || opts.clobber || false;
|
|
3045
3049
|
const { srcStat, isChangingCase = false } = stat2.checkPathsSync(src, dest, "move", opts);
|
|
3046
3050
|
stat2.checkParentPathsSync(src, srcStat, dest, "move");
|
|
3047
|
-
if (!isParentRoot(dest)) mkdirpSync(
|
|
3051
|
+
if (!isParentRoot(dest)) mkdirpSync(path9.dirname(dest));
|
|
3048
3052
|
return doRename(src, dest, overwrite2, isChangingCase);
|
|
3049
3053
|
}
|
|
3050
3054
|
function isParentRoot(dest) {
|
|
3051
|
-
const parent =
|
|
3052
|
-
const parsedPath =
|
|
3055
|
+
const parent = path9.dirname(dest);
|
|
3056
|
+
const parsedPath = path9.parse(parent);
|
|
3053
3057
|
return parsedPath.root === parent;
|
|
3054
3058
|
}
|
|
3055
3059
|
function doRename(src, dest, overwrite2, isChangingCase) {
|
|
@@ -3520,31 +3524,31 @@ var require_lib3 = __commonJS({
|
|
|
3520
3524
|
init_esm_shims();
|
|
3521
3525
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3522
3526
|
exports.Doctype = exports.CDATA = exports.Tag = exports.Style = exports.Script = exports.Comment = exports.Directive = exports.Text = exports.Root = exports.isTag = exports.ElementType = void 0;
|
|
3523
|
-
var
|
|
3524
|
-
(function(
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
})(
|
|
3527
|
+
var ElementType3;
|
|
3528
|
+
(function(ElementType4) {
|
|
3529
|
+
ElementType4["Root"] = "root";
|
|
3530
|
+
ElementType4["Text"] = "text";
|
|
3531
|
+
ElementType4["Directive"] = "directive";
|
|
3532
|
+
ElementType4["Comment"] = "comment";
|
|
3533
|
+
ElementType4["Script"] = "script";
|
|
3534
|
+
ElementType4["Style"] = "style";
|
|
3535
|
+
ElementType4["Tag"] = "tag";
|
|
3536
|
+
ElementType4["CDATA"] = "cdata";
|
|
3537
|
+
ElementType4["Doctype"] = "doctype";
|
|
3538
|
+
})(ElementType3 = exports.ElementType || (exports.ElementType = {}));
|
|
3535
3539
|
function isTag(elem) {
|
|
3536
|
-
return elem.type ===
|
|
3540
|
+
return elem.type === ElementType3.Tag || elem.type === ElementType3.Script || elem.type === ElementType3.Style;
|
|
3537
3541
|
}
|
|
3538
3542
|
exports.isTag = isTag;
|
|
3539
|
-
exports.Root =
|
|
3540
|
-
exports.Text =
|
|
3541
|
-
exports.Directive =
|
|
3542
|
-
exports.Comment =
|
|
3543
|
-
exports.Script =
|
|
3544
|
-
exports.Style =
|
|
3545
|
-
exports.Tag =
|
|
3546
|
-
exports.CDATA =
|
|
3547
|
-
exports.Doctype =
|
|
3543
|
+
exports.Root = ElementType3.Root;
|
|
3544
|
+
exports.Text = ElementType3.Text;
|
|
3545
|
+
exports.Directive = ElementType3.Directive;
|
|
3546
|
+
exports.Comment = ElementType3.Comment;
|
|
3547
|
+
exports.Script = ElementType3.Script;
|
|
3548
|
+
exports.Style = ElementType3.Style;
|
|
3549
|
+
exports.Tag = ElementType3.Tag;
|
|
3550
|
+
exports.CDATA = ElementType3.CDATA;
|
|
3551
|
+
exports.Doctype = ElementType3.Doctype;
|
|
3548
3552
|
}
|
|
3549
3553
|
});
|
|
3550
3554
|
|
|
@@ -5034,7 +5038,7 @@ var require_lib6 = __commonJS({
|
|
|
5034
5038
|
};
|
|
5035
5039
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5036
5040
|
exports.render = void 0;
|
|
5037
|
-
var
|
|
5041
|
+
var ElementType3 = __importStar(require_lib3());
|
|
5038
5042
|
var entities_1 = require_lib5();
|
|
5039
5043
|
var foreignNames_js_1 = require_foreignNames();
|
|
5040
5044
|
var unencodedElements = /* @__PURE__ */ new Set([
|
|
@@ -5103,21 +5107,21 @@ var require_lib6 = __commonJS({
|
|
|
5103
5107
|
exports.default = render;
|
|
5104
5108
|
function renderNode(node, options) {
|
|
5105
5109
|
switch (node.type) {
|
|
5106
|
-
case
|
|
5110
|
+
case ElementType3.Root:
|
|
5107
5111
|
return render(node.children, options);
|
|
5108
5112
|
// @ts-expect-error We don't use `Doctype` yet
|
|
5109
|
-
case
|
|
5110
|
-
case
|
|
5113
|
+
case ElementType3.Doctype:
|
|
5114
|
+
case ElementType3.Directive:
|
|
5111
5115
|
return renderDirective(node);
|
|
5112
|
-
case
|
|
5116
|
+
case ElementType3.Comment:
|
|
5113
5117
|
return renderComment(node);
|
|
5114
|
-
case
|
|
5118
|
+
case ElementType3.CDATA:
|
|
5115
5119
|
return renderCdata(node);
|
|
5116
|
-
case
|
|
5117
|
-
case
|
|
5118
|
-
case
|
|
5120
|
+
case ElementType3.Script:
|
|
5121
|
+
case ElementType3.Style:
|
|
5122
|
+
case ElementType3.Tag:
|
|
5119
5123
|
return renderTag(node, options);
|
|
5120
|
-
case
|
|
5124
|
+
case ElementType3.Text:
|
|
5121
5125
|
return renderText(node, options);
|
|
5122
5126
|
}
|
|
5123
5127
|
}
|
|
@@ -27751,12 +27755,12 @@ function getIncluder(includePaths = defaultInclude, excludePaths = defaultExclud
|
|
|
27751
27755
|
includePaths.forEach(addCompiledGlob, includers);
|
|
27752
27756
|
excludePaths.forEach(addCompiledGlob, excluders);
|
|
27753
27757
|
debug(`compiled globs:`, { includers, excluders });
|
|
27754
|
-
return (
|
|
27755
|
-
|
|
27756
|
-
if (!relativeImportRE.test(
|
|
27757
|
-
|
|
27758
|
+
return (path9) => {
|
|
27759
|
+
path9 = path9.replace(/\?.+$/, "");
|
|
27760
|
+
if (!relativeImportRE.test(path9)) {
|
|
27761
|
+
path9 = `./${path9}`;
|
|
27758
27762
|
}
|
|
27759
|
-
const test = (glob) => glob.test(
|
|
27763
|
+
const test = (glob) => glob.test(path9);
|
|
27760
27764
|
return includers.some(test) && !excluders.some(test);
|
|
27761
27765
|
};
|
|
27762
27766
|
}
|
|
@@ -27780,8 +27784,8 @@ function compileGlob(glob) {
|
|
|
27780
27784
|
globstar: true
|
|
27781
27785
|
}).regex;
|
|
27782
27786
|
}
|
|
27783
|
-
function ensureRelative(dir,
|
|
27784
|
-
return isAbsolute(
|
|
27787
|
+
function ensureRelative(dir, path9) {
|
|
27788
|
+
return isAbsolute(path9) ? relative(dir, path9) : path9;
|
|
27785
27789
|
}
|
|
27786
27790
|
|
|
27787
27791
|
// ../cli-miniflare/src/index.ts
|
|
@@ -38517,7 +38521,7 @@ var getDashboardComponentBuildTemplate = (appId, dashboardComponent) => {
|
|
|
38517
38521
|
|
|
38518
38522
|
// src/vite/plugins/module-bundle/custom-elements.ts
|
|
38519
38523
|
init_esm_shims();
|
|
38520
|
-
var getCustomElementBaseTemplate = (
|
|
38524
|
+
var getCustomElementBaseTemplate = (path9, tagName, appId) => (
|
|
38521
38525
|
// In UsersCustomElementClass we have class that will be registered in customElements registry
|
|
38522
38526
|
// Then this class will be used to create instances for each of elements of our CustomElement
|
|
38523
38527
|
// That's why we patching it's proto with accessTokenListener (in case user do not have it), so then platform could call it on each of instances
|
|
@@ -38528,7 +38532,7 @@ var getCustomElementBaseTemplate = (path10, tagName, appId) => (
|
|
|
38528
38532
|
await import('https://unpkg.com/react@16.14.0/umd/react.production.min.js');
|
|
38529
38533
|
await import('https://unpkg.com/react-dom@16.14.0/umd/react-dom.production.min.js');
|
|
38530
38534
|
}
|
|
38531
|
-
const { default: UsersCustomElementClass } = await import('${
|
|
38535
|
+
const { default: UsersCustomElementClass } = await import('${path9}');
|
|
38532
38536
|
|
|
38533
38537
|
let accessTokenListenerFn = UsersCustomElementClass.prototype.accessTokenListener;
|
|
38534
38538
|
if (!accessTokenListenerFn) {
|
|
@@ -38578,7 +38582,7 @@ var getCustomElementPanelBuildTemplate = (customElementPanelComponent) => {
|
|
|
38578
38582
|
|
|
38579
38583
|
// src/vite/plugins/module-bundle/site-components.ts
|
|
38580
38584
|
init_esm_shims();
|
|
38581
|
-
var getSiteComponentBaseTemplate = (applicationId,
|
|
38585
|
+
var getSiteComponentBaseTemplate = (applicationId, path9) => {
|
|
38582
38586
|
return defaultOutdent`
|
|
38583
38587
|
import { enableClient } from '@wix/cli-app/internal/platform-sdk/site';
|
|
38584
38588
|
|
|
@@ -38586,7 +38590,7 @@ var getSiteComponentBaseTemplate = (applicationId, path10) => {
|
|
|
38586
38590
|
|
|
38587
38591
|
export { injectAccessTokenGetter };
|
|
38588
38592
|
|
|
38589
|
-
export { default } from '${
|
|
38593
|
+
export { default } from '${path9}';
|
|
38590
38594
|
`;
|
|
38591
38595
|
};
|
|
38592
38596
|
var getSiteComponentDevTemplate = (applicationId, component) => getSiteComponentBaseTemplate(
|
|
@@ -38600,9 +38604,9 @@ var getSiteComponentSdkDevTemplate = (component) => {
|
|
|
38600
38604
|
var getSiteComponentSdkBuildTemplate = (component) => {
|
|
38601
38605
|
return `export { default } from '/${component.relativeSdkPath}';`;
|
|
38602
38606
|
};
|
|
38603
|
-
var getSiteComponentPanelBaseTemplate = (
|
|
38607
|
+
var getSiteComponentPanelBaseTemplate = (path9) => defaultOutdent`
|
|
38604
38608
|
import { enablePanelClient } from '@wix/cli-app/internal/platform-sdk/site';
|
|
38605
|
-
import Component from '${
|
|
38609
|
+
import Component from '${path9}';
|
|
38606
38610
|
|
|
38607
38611
|
export default (config) => {
|
|
38608
38612
|
const clientConfig = (config.host && config.auth) ? {
|
|
@@ -39103,7 +39107,52 @@ function fbjsHotfixPlugin() {
|
|
|
39103
39107
|
|
|
39104
39108
|
// src/vite/plugins/config-extensions-file-emitter.ts
|
|
39105
39109
|
init_esm_shims();
|
|
39106
|
-
import
|
|
39110
|
+
import { join as join5, basename as basename2 } from "node:path";
|
|
39111
|
+
var import_types_impl = __toESM(require_types_impl(), 1);
|
|
39112
|
+
async function processPresetsThumbnailUrls(presets, basePath, emitAssetFile) {
|
|
39113
|
+
for (const preset of Object.values(presets)) {
|
|
39114
|
+
if (preset.thumbnailUrl && RELATIVE_ASSET_PATH_REGEX.test(preset.thumbnailUrl)) {
|
|
39115
|
+
preset.thumbnailUrl = await emitAssetFile(preset.thumbnailUrl, basePath);
|
|
39116
|
+
}
|
|
39117
|
+
}
|
|
39118
|
+
}
|
|
39119
|
+
async function processElementsThumbnailUrls(elements, basePath, emitAssetFile) {
|
|
39120
|
+
for (const [elementKey, elementItem] of Object.entries(elements)) {
|
|
39121
|
+
const elementPath = join5(basePath, ELEMENTS_DIR, elementKey);
|
|
39122
|
+
if (elementItem.elementType === import_types_impl.ElementType.inlineElement) {
|
|
39123
|
+
if (elementItem.inlineElement.presets) {
|
|
39124
|
+
await processPresetsThumbnailUrls(
|
|
39125
|
+
elementItem.inlineElement.presets,
|
|
39126
|
+
elementPath,
|
|
39127
|
+
emitAssetFile
|
|
39128
|
+
);
|
|
39129
|
+
}
|
|
39130
|
+
if (elementItem.inlineElement.elements) {
|
|
39131
|
+
await processElementsThumbnailUrls(
|
|
39132
|
+
elementItem.inlineElement.elements,
|
|
39133
|
+
elementPath,
|
|
39134
|
+
emitAssetFile
|
|
39135
|
+
);
|
|
39136
|
+
}
|
|
39137
|
+
}
|
|
39138
|
+
if (elementItem.elementType === import_types_impl.ElementType.refElement) {
|
|
39139
|
+
if (elementItem.refElement.resolvedElement?.presets) {
|
|
39140
|
+
await processPresetsThumbnailUrls(
|
|
39141
|
+
elementItem.refElement.resolvedElement.presets,
|
|
39142
|
+
elementPath,
|
|
39143
|
+
emitAssetFile
|
|
39144
|
+
);
|
|
39145
|
+
}
|
|
39146
|
+
if (elementItem.refElement.resolvedElement?.elements) {
|
|
39147
|
+
await processElementsThumbnailUrls(
|
|
39148
|
+
elementItem.refElement.resolvedElement.elements,
|
|
39149
|
+
elementPath,
|
|
39150
|
+
emitAssetFile
|
|
39151
|
+
);
|
|
39152
|
+
}
|
|
39153
|
+
}
|
|
39154
|
+
}
|
|
39155
|
+
}
|
|
39107
39156
|
function configExtensionsFileEmitter(model) {
|
|
39108
39157
|
return {
|
|
39109
39158
|
name: "config-extensions-file-emitter",
|
|
@@ -39116,7 +39165,7 @@ function configExtensionsFileEmitter(model) {
|
|
|
39116
39165
|
const content = new Uint8Array(await readFile(resolved.id));
|
|
39117
39166
|
const fileName = this.emitFile({
|
|
39118
39167
|
type: "asset",
|
|
39119
|
-
name:
|
|
39168
|
+
name: basename2(resolved.id),
|
|
39120
39169
|
originalFileName: assetUrl,
|
|
39121
39170
|
source: content
|
|
39122
39171
|
});
|
|
@@ -39141,15 +39190,19 @@ function configExtensionsFileEmitter(model) {
|
|
|
39141
39190
|
}
|
|
39142
39191
|
}
|
|
39143
39192
|
}
|
|
39144
|
-
if (component.type === "SiteComponent" && component.
|
|
39145
|
-
|
|
39146
|
-
|
|
39147
|
-
|
|
39148
|
-
|
|
39149
|
-
|
|
39150
|
-
|
|
39151
|
-
|
|
39152
|
-
|
|
39193
|
+
if (component.type === "SiteComponent" && component.presets) {
|
|
39194
|
+
await processPresetsThumbnailUrls(
|
|
39195
|
+
component.presets,
|
|
39196
|
+
component.relativePath,
|
|
39197
|
+
emitAssetFile
|
|
39198
|
+
);
|
|
39199
|
+
}
|
|
39200
|
+
if (component.type === "SiteComponent" && Object.keys(component.elements).length) {
|
|
39201
|
+
await processElementsThumbnailUrls(
|
|
39202
|
+
component.elements,
|
|
39203
|
+
component.relativePath,
|
|
39204
|
+
emitAssetFile
|
|
39205
|
+
);
|
|
39153
39206
|
}
|
|
39154
39207
|
}
|
|
39155
39208
|
}
|
|
@@ -39158,7 +39211,7 @@ function configExtensionsFileEmitter(model) {
|
|
|
39158
39211
|
|
|
39159
39212
|
// src/vite/plugins/web-methods-plugin.ts
|
|
39160
39213
|
init_esm_shims();
|
|
39161
|
-
import
|
|
39214
|
+
import path5 from "node:path";
|
|
39162
39215
|
var postfixRE3 = /[?#].*$/;
|
|
39163
39216
|
function cleanUrl2(url) {
|
|
39164
39217
|
return url.replace(postfixRE3, "");
|
|
@@ -39175,7 +39228,7 @@ function webMethodsPlugin({
|
|
|
39175
39228
|
return;
|
|
39176
39229
|
}
|
|
39177
39230
|
const relativeId = normalizeGlobbyPattern(
|
|
39178
|
-
|
|
39231
|
+
path5.relative(projectFolder, id)
|
|
39179
39232
|
);
|
|
39180
39233
|
if (!minimatch(relativeId, normalizedWebMethodPattern)) {
|
|
39181
39234
|
throw new CliError({
|
|
@@ -39188,7 +39241,7 @@ function webMethodsPlugin({
|
|
|
39188
39241
|
await init;
|
|
39189
39242
|
const [, exports] = parse(code);
|
|
39190
39243
|
const pathToFile = normalizeGlobbyPattern(
|
|
39191
|
-
|
|
39244
|
+
path5.relative(projectFolder, url)
|
|
39192
39245
|
);
|
|
39193
39246
|
const mappedExports = exports.map(
|
|
39194
39247
|
({ ln: method }) => defaultOutdent`
|
|
@@ -39262,7 +39315,7 @@ var exportsCustodian = ({ initialModel }) => {
|
|
|
39262
39315
|
return [
|
|
39263
39316
|
...virtualSiteComponentAssets.keys(),
|
|
39264
39317
|
...virtualSiteComponentPanelAssets.keys()
|
|
39265
|
-
].map((
|
|
39318
|
+
].map((path9) => `import('${path9}');`).join("\n");
|
|
39266
39319
|
}
|
|
39267
39320
|
return null;
|
|
39268
39321
|
}
|
|
@@ -39271,14 +39324,14 @@ var exportsCustodian = ({ initialModel }) => {
|
|
|
39271
39324
|
|
|
39272
39325
|
// src/vite/plugins/force-hash-refresh.ts
|
|
39273
39326
|
init_esm_shims();
|
|
39274
|
-
import
|
|
39327
|
+
import path6 from "node:path";
|
|
39275
39328
|
var hash2 = Number(Date.now());
|
|
39276
39329
|
var forceHashRefresh = () => {
|
|
39277
39330
|
return {
|
|
39278
39331
|
name: "wix:force-hash-refresh",
|
|
39279
39332
|
transform(code, id) {
|
|
39280
39333
|
const extensions = /* @__PURE__ */ new Set([".ts", ".tsx", ".js", ".jsx", ".mjs"]);
|
|
39281
|
-
const extension =
|
|
39334
|
+
const extension = path6.extname(id);
|
|
39282
39335
|
if (extensions.has(extension)) {
|
|
39283
39336
|
const variables = ["import.meta.env.BASE_API_URL"];
|
|
39284
39337
|
if (variables.some((variable) => code.includes(variable))) {
|
|
@@ -39572,7 +39625,7 @@ init_esm_shims();
|
|
|
39572
39625
|
init_esm_shims();
|
|
39573
39626
|
var import_selfsigned = __toESM(require_selfsigned(), 1);
|
|
39574
39627
|
import { readFile as readFile4, writeFile as writeFile2, stat } from "node:fs/promises";
|
|
39575
|
-
import
|
|
39628
|
+
import path7 from "node:path";
|
|
39576
39629
|
var PEM_FILENAME = "wix-cli.pem";
|
|
39577
39630
|
var PEM_MAX_DAYS = 30;
|
|
39578
39631
|
var attrs = [
|
|
@@ -39615,7 +39668,7 @@ var shouldRecreatePem = async (wixCliPemPath) => {
|
|
|
39615
39668
|
};
|
|
39616
39669
|
var generateHostCert = async () => {
|
|
39617
39670
|
const wixDataDir = getDataDirPath();
|
|
39618
|
-
const wixCliPemPath =
|
|
39671
|
+
const wixCliPemPath = path7.join(wixDataDir, PEM_FILENAME);
|
|
39619
39672
|
const recreatePem = await shouldRecreatePem(wixCliPemPath);
|
|
39620
39673
|
if (!recreatePem) {
|
|
39621
39674
|
const cachedCert = await readFile4(wixCliPemPath, {
|
|
@@ -39678,7 +39731,7 @@ function ssl() {
|
|
|
39678
39731
|
|
|
39679
39732
|
// src/vite/plugins/auto-origin.ts
|
|
39680
39733
|
init_esm_shims();
|
|
39681
|
-
import { dirname as
|
|
39734
|
+
import { dirname as dirname2, isAbsolute as isAbsolute2, join as join6 } from "node:path";
|
|
39682
39735
|
var originPlaceholder = "__WIX_ORIGIN_PLACEHOLDER__";
|
|
39683
39736
|
function getAbsoluteAssetUrl(originalUrl, assetUrl, viteAddress) {
|
|
39684
39737
|
const url = new URL(assetUrl, viteAddress).href;
|
|
@@ -39688,7 +39741,7 @@ function getAbsoluteAssetUrl(originalUrl, assetUrl, viteAddress) {
|
|
|
39688
39741
|
if (isAbsolute2(assetUrl)) {
|
|
39689
39742
|
return url;
|
|
39690
39743
|
}
|
|
39691
|
-
return new URL(
|
|
39744
|
+
return new URL(join6(dirname2(originalUrl), assetUrl), viteAddress).href;
|
|
39692
39745
|
}
|
|
39693
39746
|
function autoOrigin() {
|
|
39694
39747
|
let viteServer;
|
|
@@ -39946,13 +39999,13 @@ init_esm_shims();
|
|
|
39946
39999
|
var import_variant4 = __toESM(require_lib(), 1);
|
|
39947
40000
|
var import_uniqWith = __toESM(require_uniqWith(), 1);
|
|
39948
40001
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
39949
|
-
import { dirname as
|
|
40002
|
+
import { dirname as dirname3, join as join7 } from "node:path";
|
|
39950
40003
|
function isTruthy(x) {
|
|
39951
40004
|
return x != null && x !== false;
|
|
39952
40005
|
}
|
|
39953
40006
|
function parseImageField(asset, relativePath) {
|
|
39954
40007
|
if (RELATIVE_ASSET_PATH_REGEX.test(asset)) {
|
|
39955
|
-
return
|
|
40008
|
+
return join7(dirname3(`/${relativePath}`), asset);
|
|
39956
40009
|
}
|
|
39957
40010
|
return asset;
|
|
39958
40011
|
}
|
|
@@ -40076,7 +40129,14 @@ async function createAppManifest({
|
|
|
40076
40129
|
requiredPermission: component.requiredPermission,
|
|
40077
40130
|
previousRoutePaths: component.additionalRoutes,
|
|
40078
40131
|
...componentSentryDSN ? { errorReporting: { url: componentSentryDSN } } : void 0,
|
|
40079
|
-
...await componentSourceBuilder(component)
|
|
40132
|
+
...await componentSourceBuilder(component),
|
|
40133
|
+
metaData: component.metaData,
|
|
40134
|
+
iconKey: component.iconKey,
|
|
40135
|
+
pageAnchors: component.pageAnchors,
|
|
40136
|
+
slotIds: component.slotIds,
|
|
40137
|
+
exposureAndMaturity: component.exposureAndMaturity,
|
|
40138
|
+
exportedRouteName: component.exportedRouteName,
|
|
40139
|
+
layoutMode: component.layoutMode
|
|
40080
40140
|
}
|
|
40081
40141
|
},
|
|
40082
40142
|
compName: component.title,
|
|
@@ -40129,7 +40189,12 @@ async function createAppManifest({
|
|
|
40129
40189
|
width: component.width,
|
|
40130
40190
|
height: component.height,
|
|
40131
40191
|
...await componentSourceBuilder(component),
|
|
40132
|
-
...component.sentryDSN ? { errorReporting: { url: component.sentryDSN } } : void 0
|
|
40192
|
+
...component.sentryDSN ? { errorReporting: { url: component.sentryDSN } } : void 0,
|
|
40193
|
+
metaData: component.metaData,
|
|
40194
|
+
iconKey: component.iconKey,
|
|
40195
|
+
slotIds: component.slotIds,
|
|
40196
|
+
exposureAndMaturity: component.exposureAndMaturity,
|
|
40197
|
+
modalParams: component.modalParams
|
|
40133
40198
|
}
|
|
40134
40199
|
},
|
|
40135
40200
|
compName: component.title
|
|
@@ -40419,9 +40484,14 @@ async function createAppManifest({
|
|
|
40419
40484
|
editorReactComponent: {
|
|
40420
40485
|
type: component.elementType ?? `platform.builder.${appId}_${component.id}`,
|
|
40421
40486
|
description: component.description,
|
|
40422
|
-
editorElement:
|
|
40487
|
+
editorElement: {
|
|
40423
40488
|
...component.editorElement,
|
|
40424
|
-
presets: siteComponentSource.presets
|
|
40489
|
+
presets: siteComponentSource.presets,
|
|
40490
|
+
elements: {
|
|
40491
|
+
// We use typecasting due to recursive nature of SiteComponentElements types
|
|
40492
|
+
...component.editorElement.elements ?? {},
|
|
40493
|
+
...siteComponentSource.elements
|
|
40494
|
+
}
|
|
40425
40495
|
},
|
|
40426
40496
|
installation: component.installation,
|
|
40427
40497
|
resources: {
|
|
@@ -40466,7 +40536,7 @@ async function createAppManifest({
|
|
|
40466
40536
|
// src/app-manifest/component-source.ts
|
|
40467
40537
|
init_esm_shims();
|
|
40468
40538
|
var import_variant5 = __toESM(require_lib(), 1);
|
|
40469
|
-
import
|
|
40539
|
+
import path8, { dirname as dirname4, join as join8 } from "node:path";
|
|
40470
40540
|
import { pathToFileURL as pathToFileURL2 } from "node:url";
|
|
40471
40541
|
|
|
40472
40542
|
// src/app-manifest/build-output-data-extractor.ts
|
|
@@ -40579,7 +40649,7 @@ async function getEventDevSlugs(component, backendDevServerUrl) {
|
|
|
40579
40649
|
}
|
|
40580
40650
|
async function getRegisteredExtensions(model) {
|
|
40581
40651
|
const backendBuildFolder = getAppBackendBuildFolder(model.projectFolder);
|
|
40582
|
-
const outputFilepath =
|
|
40652
|
+
const outputFilepath = join8(
|
|
40583
40653
|
backendBuildFolder,
|
|
40584
40654
|
"getRegisteredExtensions.mjs"
|
|
40585
40655
|
);
|
|
@@ -40658,7 +40728,7 @@ var embeddedScriptBuilder = async (model, component, source) => {
|
|
|
40658
40728
|
return {
|
|
40659
40729
|
template: source.buildSource ? extractModuleBundleContent(
|
|
40660
40730
|
source.buildSource.browserBuildOutput,
|
|
40661
|
-
|
|
40731
|
+
path8.resolve(model.projectFolder, component.relativePath)
|
|
40662
40732
|
) : await getEmbeddedScriptDevTemplate(
|
|
40663
40733
|
component,
|
|
40664
40734
|
source.devSource.devServerUrl
|
|
@@ -40710,31 +40780,138 @@ var blocksPanelBuilder = (component, source) => {
|
|
|
40710
40780
|
componentUrl
|
|
40711
40781
|
};
|
|
40712
40782
|
};
|
|
40783
|
+
function traverseElementsWithPresetFn(elements, getPresetDataFn, previousElementsStructure = []) {
|
|
40784
|
+
const elementsWithPresetsData = {};
|
|
40785
|
+
for (const [elementName, elementItem] of Object.entries(elements)) {
|
|
40786
|
+
const elementsStructure = [...previousElementsStructure, elementName];
|
|
40787
|
+
if (elementItem.elementType === ElementType.inlineElement) {
|
|
40788
|
+
const presetsWithCssUrls = {};
|
|
40789
|
+
if (elementItem.inlineElement.presets) {
|
|
40790
|
+
for (const [presetName, presetConfig] of Object.entries(
|
|
40791
|
+
elementItem.inlineElement.presets
|
|
40792
|
+
)) {
|
|
40793
|
+
const presetData = getPresetDataFn(
|
|
40794
|
+
elementsStructure,
|
|
40795
|
+
presetName,
|
|
40796
|
+
presetConfig
|
|
40797
|
+
);
|
|
40798
|
+
presetsWithCssUrls[presetName] = {
|
|
40799
|
+
...elementItem.inlineElement.presets[presetName],
|
|
40800
|
+
...presetData
|
|
40801
|
+
};
|
|
40802
|
+
}
|
|
40803
|
+
}
|
|
40804
|
+
const nestedElements = elementItem.inlineElement.elements ? traverseElementsWithPresetFn(
|
|
40805
|
+
elementItem.inlineElement.elements,
|
|
40806
|
+
getPresetDataFn,
|
|
40807
|
+
elementsStructure
|
|
40808
|
+
) : void 0;
|
|
40809
|
+
elementsWithPresetsData[elementName] = {
|
|
40810
|
+
...elementItem,
|
|
40811
|
+
inlineElement: {
|
|
40812
|
+
...elementItem.inlineElement,
|
|
40813
|
+
...Object.keys(presetsWithCssUrls).length > 0 ? { presets: presetsWithCssUrls } : {},
|
|
40814
|
+
...nestedElements ? { elements: nestedElements } : {}
|
|
40815
|
+
}
|
|
40816
|
+
};
|
|
40817
|
+
}
|
|
40818
|
+
if (elementItem.elementType === ElementType.refElement) {
|
|
40819
|
+
const resolvedElement = elementItem.refElement.resolvedElement;
|
|
40820
|
+
if (resolvedElement) {
|
|
40821
|
+
const presetsWithCssUrls = {};
|
|
40822
|
+
if (resolvedElement.presets) {
|
|
40823
|
+
for (const [presetName, presetConfig] of Object.entries(
|
|
40824
|
+
resolvedElement.presets
|
|
40825
|
+
)) {
|
|
40826
|
+
const presetData = getPresetDataFn(
|
|
40827
|
+
elementsStructure,
|
|
40828
|
+
presetName,
|
|
40829
|
+
presetConfig
|
|
40830
|
+
);
|
|
40831
|
+
presetsWithCssUrls[presetName] = {
|
|
40832
|
+
...resolvedElement.presets[presetName],
|
|
40833
|
+
...presetData
|
|
40834
|
+
};
|
|
40835
|
+
}
|
|
40836
|
+
}
|
|
40837
|
+
const nestedElements = resolvedElement.elements ? traverseElementsWithPresetFn(
|
|
40838
|
+
resolvedElement.elements,
|
|
40839
|
+
getPresetDataFn,
|
|
40840
|
+
elementsStructure
|
|
40841
|
+
) : void 0;
|
|
40842
|
+
elementsWithPresetsData[elementName] = {
|
|
40843
|
+
...elementItem,
|
|
40844
|
+
refElement: {
|
|
40845
|
+
...elementItem.refElement,
|
|
40846
|
+
resolvedElement: {
|
|
40847
|
+
...resolvedElement,
|
|
40848
|
+
...Object.keys(presetsWithCssUrls).length > 0 ? { presets: presetsWithCssUrls } : {},
|
|
40849
|
+
...nestedElements ? { elements: nestedElements } : {}
|
|
40850
|
+
}
|
|
40851
|
+
}
|
|
40852
|
+
};
|
|
40853
|
+
} else {
|
|
40854
|
+
elementsWithPresetsData[elementName] = { ...elementItem };
|
|
40855
|
+
}
|
|
40856
|
+
}
|
|
40857
|
+
}
|
|
40858
|
+
return elementsWithPresetsData;
|
|
40859
|
+
}
|
|
40713
40860
|
var siteComponentDevBuilder = (component) => {
|
|
40714
40861
|
const moduleId = virtualModuleIdForSiteComponentScriptAsset(component.id);
|
|
40715
40862
|
const sdkModuleId = component.relativeSdkPath ? virtualModuleIdForSiteComponentSdkScriptAsset(component.id) : null;
|
|
40716
|
-
const
|
|
40717
|
-
component.
|
|
40718
|
-
|
|
40719
|
-
|
|
40720
|
-
|
|
40721
|
-
|
|
40722
|
-
|
|
40723
|
-
|
|
40724
|
-
|
|
40725
|
-
|
|
40726
|
-
|
|
40727
|
-
|
|
40728
|
-
|
|
40729
|
-
|
|
40730
|
-
|
|
40731
|
-
|
|
40732
|
-
|
|
40733
|
-
|
|
40734
|
-
|
|
40863
|
+
const elements = traverseElementsWithPresetFn(
|
|
40864
|
+
component.elements,
|
|
40865
|
+
(elementsStructure, presetName, presetConfig) => {
|
|
40866
|
+
const elementPath = join8(
|
|
40867
|
+
elementsStructure.reduce(
|
|
40868
|
+
(acc, elementName) => join8(acc, ELEMENTS_DIR, elementName),
|
|
40869
|
+
""
|
|
40870
|
+
)
|
|
40871
|
+
);
|
|
40872
|
+
const cssUrl = join8(
|
|
40873
|
+
dirname4(component.relativePath),
|
|
40874
|
+
elementPath,
|
|
40875
|
+
PRESETS_DIR,
|
|
40876
|
+
`${presetName}.css`
|
|
40877
|
+
);
|
|
40878
|
+
return {
|
|
40879
|
+
...presetConfig,
|
|
40880
|
+
...presetConfig.thumbnailUrl ? {
|
|
40881
|
+
thumbnailUrl: parseImageField(
|
|
40882
|
+
presetConfig.thumbnailUrl,
|
|
40883
|
+
elementPath
|
|
40884
|
+
)
|
|
40885
|
+
} : {},
|
|
40886
|
+
cssUrl,
|
|
40887
|
+
presetCssUrl: cssUrl
|
|
40888
|
+
};
|
|
40889
|
+
}
|
|
40890
|
+
);
|
|
40891
|
+
const presets = component.presets ? Object.entries(component.presets).reduce(
|
|
40892
|
+
(acc, [presetName, presetConfig]) => {
|
|
40893
|
+
const presetCssUrl = join8(
|
|
40894
|
+
dirname4(component.relativePath),
|
|
40895
|
+
PRESETS_DIR,
|
|
40896
|
+
`${presetName}.css`
|
|
40897
|
+
);
|
|
40898
|
+
acc[presetName] = {
|
|
40899
|
+
displayName: presetConfig.displayName,
|
|
40900
|
+
thumbnailUrl: presetConfig.thumbnailUrl && parseImageField(
|
|
40901
|
+
presetConfig.thumbnailUrl,
|
|
40902
|
+
dirname4(component.relativePath)
|
|
40903
|
+
),
|
|
40904
|
+
cssUrl: presetCssUrl,
|
|
40905
|
+
presetCssUrl
|
|
40906
|
+
};
|
|
40907
|
+
return acc;
|
|
40908
|
+
},
|
|
40909
|
+
{}
|
|
40910
|
+
) : {};
|
|
40735
40911
|
const definedResources = component.resources ?? {};
|
|
40736
40912
|
return {
|
|
40737
40913
|
presets,
|
|
40914
|
+
elements,
|
|
40738
40915
|
resources: {
|
|
40739
40916
|
...definedResources,
|
|
40740
40917
|
client: {
|
|
@@ -40756,25 +40933,42 @@ var siteComponentBuildBuilder = (component, { browserBuildOutput }, { ssrBuildOu
|
|
|
40756
40933
|
throw new Error("Missing build output for site component");
|
|
40757
40934
|
}
|
|
40758
40935
|
const presets = {};
|
|
40759
|
-
if (component.
|
|
40936
|
+
if (component.presets) {
|
|
40760
40937
|
for (const [presetName, presetConfig] of Object.entries(
|
|
40761
|
-
component.
|
|
40938
|
+
component.presets
|
|
40762
40939
|
)) {
|
|
40763
40940
|
const modulePresetId = virtualPresetIdForSiteComponent(
|
|
40764
40941
|
component.id,
|
|
40765
40942
|
presetName
|
|
40766
40943
|
);
|
|
40767
|
-
const
|
|
40944
|
+
const presetCssUrl = extractPresetCss(browserBuildOutput, modulePresetId);
|
|
40768
40945
|
presets[presetName] = {
|
|
40769
40946
|
...presetConfig,
|
|
40947
|
+
cssUrl: presetCssUrl,
|
|
40948
|
+
presetCssUrl
|
|
40949
|
+
};
|
|
40950
|
+
}
|
|
40951
|
+
}
|
|
40952
|
+
const elements = traverseElementsWithPresetFn(
|
|
40953
|
+
component.elements,
|
|
40954
|
+
(elementsStructure, presetName, presetConfig) => {
|
|
40955
|
+
const modulePresetId = virtualPresetIdForSiteComponentElement(
|
|
40956
|
+
component.id,
|
|
40957
|
+
elementsStructure,
|
|
40958
|
+
presetName
|
|
40959
|
+
);
|
|
40960
|
+
const cssUrl = extractPresetCss(browserBuildOutput, modulePresetId);
|
|
40961
|
+
return {
|
|
40962
|
+
displayName: presetConfig.displayName,
|
|
40770
40963
|
cssUrl,
|
|
40771
40964
|
presetCssUrl: cssUrl
|
|
40772
40965
|
};
|
|
40773
40966
|
}
|
|
40774
|
-
|
|
40967
|
+
);
|
|
40775
40968
|
const definedResources = component.resources ?? {};
|
|
40776
40969
|
return {
|
|
40777
40970
|
presets,
|
|
40971
|
+
elements,
|
|
40778
40972
|
resources: {
|
|
40779
40973
|
...definedResources,
|
|
40780
40974
|
client: {
|
|
@@ -41447,15 +41641,50 @@ var siteComponentResourcesSchema = z.object({
|
|
|
41447
41641
|
url: z.string()
|
|
41448
41642
|
}).passthrough().optional()
|
|
41449
41643
|
}).passthrough();
|
|
41644
|
+
var siteComponentPresetItemSchema = z.object({
|
|
41645
|
+
cssUrl: z.string(),
|
|
41646
|
+
presetCssUrl: z.string(),
|
|
41647
|
+
displayName: z.string(),
|
|
41648
|
+
thumbnailUrl: z.string().optional()
|
|
41649
|
+
}).passthrough();
|
|
41450
41650
|
var siteComponentPresetsSchema = z.record(
|
|
41451
41651
|
z.string(),
|
|
41452
|
-
|
|
41453
|
-
|
|
41454
|
-
|
|
41455
|
-
|
|
41456
|
-
|
|
41652
|
+
siteComponentPresetItemSchema
|
|
41653
|
+
);
|
|
41654
|
+
var siteComponentElementBaseSchema = {
|
|
41655
|
+
selector: z.string().min(4).max(50),
|
|
41656
|
+
displayName: z.string().max(50)
|
|
41657
|
+
};
|
|
41658
|
+
var inlineElementSchema = z.lazy(
|
|
41659
|
+
() => z.object({
|
|
41660
|
+
...siteComponentElementBaseSchema,
|
|
41661
|
+
presets: siteComponentPresetsSchema.optional(),
|
|
41662
|
+
elements: z.record(z.string(), siteComponentElementItemSchema).optional()
|
|
41663
|
+
}).passthrough()
|
|
41664
|
+
);
|
|
41665
|
+
var refElementSchema = z.lazy(
|
|
41666
|
+
() => z.object({
|
|
41667
|
+
...siteComponentElementBaseSchema,
|
|
41668
|
+
resolvedElement: inlineElementSchema.optional(),
|
|
41669
|
+
type: z.string().min(4).max(100)
|
|
41457
41670
|
}).passthrough()
|
|
41458
41671
|
);
|
|
41672
|
+
var siteComponentElementItemSchema = z.lazy(
|
|
41673
|
+
() => z.discriminatedUnion("elementType", [
|
|
41674
|
+
z.object({
|
|
41675
|
+
elementType: z.literal(ElementType.inlineElement),
|
|
41676
|
+
inlineElement: inlineElementSchema
|
|
41677
|
+
}),
|
|
41678
|
+
z.object({
|
|
41679
|
+
elementType: z.literal(ElementType.refElement),
|
|
41680
|
+
refElement: refElementSchema
|
|
41681
|
+
})
|
|
41682
|
+
])
|
|
41683
|
+
);
|
|
41684
|
+
var siteComponentElementsSchema = z.record(
|
|
41685
|
+
z.string(),
|
|
41686
|
+
siteComponentElementItemSchema
|
|
41687
|
+
);
|
|
41459
41688
|
var siteComponentSchema = z.object({
|
|
41460
41689
|
compType: z.literal(ComponentType.EDITOR_REACT_COMPONENT),
|
|
41461
41690
|
compId: z.string(),
|
|
@@ -41467,10 +41696,10 @@ var siteComponentSchema = z.object({
|
|
|
41467
41696
|
resources: siteComponentResourcesSchema,
|
|
41468
41697
|
installation: z.unknown(),
|
|
41469
41698
|
editorElement: z.object({
|
|
41470
|
-
|
|
41471
|
-
|
|
41472
|
-
|
|
41473
|
-
}).passthrough()
|
|
41699
|
+
...siteComponentElementBaseSchema,
|
|
41700
|
+
presets: siteComponentPresetsSchema.optional(),
|
|
41701
|
+
elements: siteComponentElementsSchema.optional()
|
|
41702
|
+
}).passthrough()
|
|
41474
41703
|
})
|
|
41475
41704
|
})
|
|
41476
41705
|
});
|
|
@@ -41730,6 +41959,59 @@ var overrideSiteComponentPresetsWithNormalizedAssets = (presets, normalizedBaseU
|
|
|
41730
41959
|
{}
|
|
41731
41960
|
);
|
|
41732
41961
|
};
|
|
41962
|
+
var overrideSiteComponentElementsWithNormalizedAssets = (elements, normalizedBaseUrl) => {
|
|
41963
|
+
return Object.entries(elements).reduce(
|
|
41964
|
+
(normalizedElements, [elementName, elementItem]) => {
|
|
41965
|
+
if (elementItem.elementType === ElementType.inlineElement) {
|
|
41966
|
+
normalizedElements[elementName] = {
|
|
41967
|
+
...elementItem,
|
|
41968
|
+
inlineElement: {
|
|
41969
|
+
...elementItem.inlineElement,
|
|
41970
|
+
...elementItem.inlineElement.presets && {
|
|
41971
|
+
presets: overrideSiteComponentPresetsWithNormalizedAssets(
|
|
41972
|
+
elementItem.inlineElement.presets,
|
|
41973
|
+
normalizedBaseUrl
|
|
41974
|
+
)
|
|
41975
|
+
},
|
|
41976
|
+
...elementItem.inlineElement.elements && {
|
|
41977
|
+
elements: overrideSiteComponentElementsWithNormalizedAssets(
|
|
41978
|
+
elementItem.inlineElement.elements,
|
|
41979
|
+
normalizedBaseUrl
|
|
41980
|
+
)
|
|
41981
|
+
}
|
|
41982
|
+
}
|
|
41983
|
+
};
|
|
41984
|
+
}
|
|
41985
|
+
if (elementItem.elementType === ElementType.refElement) {
|
|
41986
|
+
normalizedElements[elementName] = {
|
|
41987
|
+
...elementItem,
|
|
41988
|
+
refElement: {
|
|
41989
|
+
...elementItem.refElement,
|
|
41990
|
+
...elementItem.refElement.resolvedElement ? {
|
|
41991
|
+
resolvedElement: {
|
|
41992
|
+
...elementItem.refElement.resolvedElement,
|
|
41993
|
+
...elementItem.refElement.resolvedElement.presets && {
|
|
41994
|
+
presets: overrideSiteComponentPresetsWithNormalizedAssets(
|
|
41995
|
+
elementItem.refElement.resolvedElement.presets,
|
|
41996
|
+
normalizedBaseUrl
|
|
41997
|
+
)
|
|
41998
|
+
},
|
|
41999
|
+
...elementItem.refElement.resolvedElement.elements && {
|
|
42000
|
+
elements: overrideSiteComponentElementsWithNormalizedAssets(
|
|
42001
|
+
elementItem.refElement.resolvedElement.elements,
|
|
42002
|
+
normalizedBaseUrl
|
|
42003
|
+
)
|
|
42004
|
+
}
|
|
42005
|
+
}
|
|
42006
|
+
} : {}
|
|
42007
|
+
}
|
|
42008
|
+
};
|
|
42009
|
+
}
|
|
42010
|
+
return normalizedElements;
|
|
42011
|
+
},
|
|
42012
|
+
{}
|
|
42013
|
+
);
|
|
42014
|
+
};
|
|
41733
42015
|
var overrideSitePluginMarketDataWithNormalizedLogoUrl = (marketData, normalizedBaseUrl) => {
|
|
41734
42016
|
const logoUrl = marketData.logoUrl;
|
|
41735
42017
|
if (logoUrl) {
|
|
@@ -41830,12 +42112,18 @@ var updateBrowserComponentsWithBaseUrl = (appManifest, baseUrl) => {
|
|
|
41830
42112
|
compData.editorReactComponent.resources.client.componentUrl,
|
|
41831
42113
|
normalizedBaseUrl
|
|
41832
42114
|
);
|
|
41833
|
-
if (compData.editorReactComponent.editorElement
|
|
42115
|
+
if (compData.editorReactComponent.editorElement.presets) {
|
|
41834
42116
|
compData.editorReactComponent.editorElement.presets = overrideSiteComponentPresetsWithNormalizedAssets(
|
|
41835
42117
|
compData.editorReactComponent.editorElement.presets,
|
|
41836
42118
|
normalizedBaseUrl
|
|
41837
42119
|
);
|
|
41838
42120
|
}
|
|
42121
|
+
if (compData.editorReactComponent.editorElement.elements) {
|
|
42122
|
+
compData.editorReactComponent.editorElement.elements = overrideSiteComponentElementsWithNormalizedAssets(
|
|
42123
|
+
compData.editorReactComponent.editorElement.elements,
|
|
42124
|
+
normalizedBaseUrl
|
|
42125
|
+
);
|
|
42126
|
+
}
|
|
41839
42127
|
}
|
|
41840
42128
|
if (compType === ComponentType.PANEL && compData.panel.contentType === PanelContentType.code) {
|
|
41841
42129
|
compData.panel.code.bundleUrl = normalizeUrl(
|
|
@@ -42153,4 +42441,4 @@ export {
|
|
|
42153
42441
|
he/he.js:
|
|
42154
42442
|
(*! https://mths.be/he v1.2.0 by @mathias | MIT license *)
|
|
42155
42443
|
*/
|
|
42156
|
-
//# sourceMappingURL=chunk-
|
|
42444
|
+
//# sourceMappingURL=chunk-V465DPJJ.js.map
|