@wix/cli-app 1.1.83 → 1.1.85

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 (65) hide show
  1. package/build/{AddPermissionCommand-5X3K4KUG.js → AddPermissionCommand-WTCVWYLU.js} +2 -2
  2. package/build/{CreateVersionCommand-XWWXAFOX.js → CreateVersionCommand-F72BUGEU.js} +3 -3
  3. package/build/{DevCommand-EOEGQX2B.js → DevCommand-C7QNMT63.js} +10 -10
  4. package/build/{GenerateCommand-IOFKL3RC.js → GenerateCommand-GEDZ73V2.js} +7 -7
  5. package/build/{LogsCommand-23QQRT3D.js → LogsCommand-KMRWXPH4.js} +3 -3
  6. package/build/PreviewCommand-WECTRVA6.js +19 -0
  7. package/build/ReleaseCommand-C4EESZI4.js +28 -0
  8. package/build/{ServeCommand-SGREOUDA.js → ServeCommand-2O2ZK2J5.js} +3 -3
  9. package/build/{build-PYB5PAZO.js → build-EHS7AVT4.js} +20 -9
  10. package/build/build-EHS7AVT4.js.map +1 -0
  11. package/build/{chunk-5TP6T6QK.js → chunk-2QKXHQB4.js} +6 -6
  12. package/build/{chunk-ZCUJ356B.js → chunk-3PES4EH3.js} +2 -2
  13. package/build/{chunk-KLBXSZ6R.js → chunk-6PY3W6IF.js} +2 -2
  14. package/build/{chunk-ZOZ5LJV7.js → chunk-7LM5BPFT.js} +7 -7
  15. package/build/{chunk-GGDJQXOX.js → chunk-AKB7SZX3.js} +3 -3
  16. package/build/{chunk-Y4GJ3NS4.js → chunk-AMTFUUHP.js} +2 -2
  17. package/build/{chunk-QREADZZF.js → chunk-BSAVRQI6.js} +4 -4
  18. package/build/{chunk-SIJDKP2Q.js → chunk-EDZ42Y6V.js} +133 -135
  19. package/build/chunk-EDZ42Y6V.js.map +1 -0
  20. package/build/{chunk-VB3AXXRP.js → chunk-GM72K4QC.js} +2 -2
  21. package/build/{chunk-TJFERWU7.js → chunk-IXQRKQML.js} +4 -4
  22. package/build/{chunk-AN77SZN2.js → chunk-K2JIVS7H.js} +6 -6
  23. package/build/{chunk-WNR36YTI.js → chunk-K3AHKA4U.js} +2 -2
  24. package/build/{chunk-VLQG5SQF.js → chunk-LXBQAX52.js} +2 -2
  25. package/build/{chunk-ZLLXHWZF.js → chunk-PVENT7M4.js} +162 -53
  26. package/build/{chunk-ZLLXHWZF.js.map → chunk-PVENT7M4.js.map} +1 -1
  27. package/build/{chunk-4PXJSX4C.js → chunk-RUFFFFJT.js} +2 -2
  28. package/build/{chunk-E4UNGBQY.js → chunk-S4LF7TTD.js} +2 -2
  29. package/build/{chunk-63VDDLLQ.js → chunk-X3LNVOM3.js} +2 -2
  30. package/build/cloudflare-runtime/entry.js +1 -1
  31. package/build/index.js +25 -25
  32. package/build/{preview-PIFWQKW3.js → preview-2RURY4Y6.js} +12 -12
  33. package/build/{release-6Z6LMTRW.js → release-CP3WXFQ7.js} +14 -14
  34. package/build/{render-command-3G25G5MU.js → render-command-ZPY4O2QF.js} +5 -5
  35. package/package.json +10 -10
  36. package/build/PreviewCommand-FBODGF7Y.js +0 -19
  37. package/build/ReleaseCommand-SNCMQQXK.js +0 -28
  38. package/build/build-PYB5PAZO.js.map +0 -1
  39. package/build/chunk-SIJDKP2Q.js.map +0 -1
  40. /package/build/{AddPermissionCommand-5X3K4KUG.js.map → AddPermissionCommand-WTCVWYLU.js.map} +0 -0
  41. /package/build/{CreateVersionCommand-XWWXAFOX.js.map → CreateVersionCommand-F72BUGEU.js.map} +0 -0
  42. /package/build/{DevCommand-EOEGQX2B.js.map → DevCommand-C7QNMT63.js.map} +0 -0
  43. /package/build/{GenerateCommand-IOFKL3RC.js.map → GenerateCommand-GEDZ73V2.js.map} +0 -0
  44. /package/build/{LogsCommand-23QQRT3D.js.map → LogsCommand-KMRWXPH4.js.map} +0 -0
  45. /package/build/{PreviewCommand-FBODGF7Y.js.map → PreviewCommand-WECTRVA6.js.map} +0 -0
  46. /package/build/{ReleaseCommand-SNCMQQXK.js.map → ReleaseCommand-C4EESZI4.js.map} +0 -0
  47. /package/build/{ServeCommand-SGREOUDA.js.map → ServeCommand-2O2ZK2J5.js.map} +0 -0
  48. /package/build/{chunk-5TP6T6QK.js.map → chunk-2QKXHQB4.js.map} +0 -0
  49. /package/build/{chunk-ZCUJ356B.js.map → chunk-3PES4EH3.js.map} +0 -0
  50. /package/build/{chunk-KLBXSZ6R.js.map → chunk-6PY3W6IF.js.map} +0 -0
  51. /package/build/{chunk-ZOZ5LJV7.js.map → chunk-7LM5BPFT.js.map} +0 -0
  52. /package/build/{chunk-GGDJQXOX.js.map → chunk-AKB7SZX3.js.map} +0 -0
  53. /package/build/{chunk-Y4GJ3NS4.js.map → chunk-AMTFUUHP.js.map} +0 -0
  54. /package/build/{chunk-QREADZZF.js.map → chunk-BSAVRQI6.js.map} +0 -0
  55. /package/build/{chunk-VB3AXXRP.js.map → chunk-GM72K4QC.js.map} +0 -0
  56. /package/build/{chunk-TJFERWU7.js.map → chunk-IXQRKQML.js.map} +0 -0
  57. /package/build/{chunk-AN77SZN2.js.map → chunk-K2JIVS7H.js.map} +0 -0
  58. /package/build/{chunk-WNR36YTI.js.map → chunk-K3AHKA4U.js.map} +0 -0
  59. /package/build/{chunk-VLQG5SQF.js.map → chunk-LXBQAX52.js.map} +0 -0
  60. /package/build/{chunk-4PXJSX4C.js.map → chunk-RUFFFFJT.js.map} +0 -0
  61. /package/build/{chunk-E4UNGBQY.js.map → chunk-S4LF7TTD.js.map} +0 -0
  62. /package/build/{chunk-63VDDLLQ.js.map → chunk-X3LNVOM3.js.map} +0 -0
  63. /package/build/{preview-PIFWQKW3.js.map → preview-2RURY4Y6.js.map} +0 -0
  64. /package/build/{release-6Z6LMTRW.js.map → release-CP3WXFQ7.js.map} +0 -0
  65. /package/build/{render-command-3G25G5MU.js.map → render-command-ZPY4O2QF.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-VLQG5SQF.js";
6
+ } from "./chunk-LXBQAX52.js";
7
7
  import {
8
8
  BLOCKS_WIDGETS_PANELS_PATTERN,
9
9
  BLOCKS_WIDGETS_PATTERN,
@@ -30,6 +30,7 @@ import {
30
30
  RegionType,
31
31
  SERVICE_PLUGINS_PATTERN,
32
32
  SITE_COMPONENTS_PATTERN,
33
+ SITE_COMPONENTS_SDK_PATTERN,
33
34
  SITE_PLUGINS_PANEL_PATTERN,
34
35
  SITE_PLUGINS_PLUGIN_PATTERN,
35
36
  SITE_WIDGETS_ELEMENT_PATTERN,
@@ -40,7 +41,6 @@ import {
40
41
  ensureDataDirExists,
41
42
  getAppBackendBuildFolder,
42
43
  getAppBrowserBuildFolder,
43
- getAppBuildFolder,
44
44
  getAppWorkerBuildFolder,
45
45
  getBackendOptimizedDir,
46
46
  getDataDirPath,
@@ -64,11 +64,13 @@ import {
64
64
  virtualModuleIdForCustomElementScriptAsset,
65
65
  virtualModuleIdForScriptAsset,
66
66
  virtualModuleIdForSiteComponentScriptAsset,
67
+ virtualModuleIdForSiteComponentSdkScriptAsset,
67
68
  virtualPathForCustomElementPanelHTMLAsset,
68
69
  virtualPathForHTMLAsset,
69
70
  virtualSiteComponentScriptAssets,
71
+ virtualSiteComponentSdkScriptAssets,
70
72
  z
71
- } from "./chunk-ZLLXHWZF.js";
73
+ } from "./chunk-PVENT7M4.js";
72
74
  import {
73
75
  __commonJS,
74
76
  __esm,
@@ -36867,6 +36869,24 @@ var getComponentHMRTemplate = (id, root) => {
36867
36869
  `;
36868
36870
  };
36869
36871
 
36872
+ // src/vite/plugins/hmr/site-component.ts
36873
+ init_esm_shims();
36874
+ var SITE_COMPONENT_SDK_HMR_PARAMETER = "site-component-sdk-hmr";
36875
+ var SITE_COMPONENT_SDK_HMR_PARAMETER_RE = new RegExp(
36876
+ `[?&]${SITE_COMPONENT_SDK_HMR_PARAMETER}\\b`
36877
+ );
36878
+ var getSiteComponentSdkPathWithHMR = (relativePath) => `/${relativePath}?${SITE_COMPONENT_SDK_HMR_PARAMETER}`;
36879
+ var getSiteComponentSdkHMRTemplate = (id, root) => {
36880
+ const originalId = id.replace(SITE_COMPONENT_SDK_HMR_PARAMETER_RE, "").replace(root, "");
36881
+ return defaultOutdent`
36882
+ if (import.meta.hot) {
36883
+ import.meta.hot.accept((_) => {});
36884
+ }
36885
+
36886
+ export { default } from '${originalId}';
36887
+ `;
36888
+ };
36889
+
36870
36890
  // src/vite/plugins/hmr/plugin.ts
36871
36891
  function hmr() {
36872
36892
  let root;
@@ -36892,6 +36912,11 @@ function hmr() {
36892
36912
  code: getCustomElementHMRTemplate(id, root)
36893
36913
  };
36894
36914
  }
36915
+ if (SITE_COMPONENT_SDK_HMR_PARAMETER_RE.test(id)) {
36916
+ return {
36917
+ code: getSiteComponentSdkHMRTemplate(id, root)
36918
+ };
36919
+ }
36895
36920
  return null;
36896
36921
  }
36897
36922
  };
@@ -37078,6 +37103,12 @@ var getSiteComponentDevTemplate = (component) => {
37078
37103
  var getSiteComponentBuildTemplate = (component) => {
37079
37104
  return `export { default } from '/${component.relativePath}';`;
37080
37105
  };
37106
+ var getSiteComponentSdkDevTemplate = (component) => {
37107
+ return `export { default } from '${getSiteComponentSdkPathWithHMR(component.relativeSdkPath)}';`;
37108
+ };
37109
+ var getSiteComponentSdkBuildTemplate = (component) => {
37110
+ return `export { default } from '/${component.relativeSdkPath}';`;
37111
+ };
37081
37112
 
37082
37113
  // src/vite/plugins/module-bundle/plugin.ts
37083
37114
  var postfixRE2 = /[?#].*$/s;
@@ -37093,13 +37124,14 @@ var moduleBundleDev = ({
37093
37124
  let virtualBlocksWidgetAssets = virtualBlocksWidgetScriptAssets(initialModel);
37094
37125
  let virtualBlocksWidgetPanelAssets = virtualBlocksWidgetPanelScriptAssets(initialModel);
37095
37126
  let virtualSiteComponentAssets = virtualSiteComponentScriptAssets(initialModel);
37127
+ let virtualSiteComponentSdkAssets = virtualSiteComponentSdkScriptAssets(initialModel);
37096
37128
  let serverInstance;
37097
37129
  return {
37098
37130
  name: "wix:module-bundle",
37099
37131
  apply: "serve",
37100
37132
  resolveId(rawId) {
37101
37133
  const id = cleanId(rawId);
37102
- if (virtualDashboardAssets.has(id) || virtualCustomElementAssets.has(id) || virtualCustomElementPanelAssets.has(id) || virtualBlocksWidgetAssets.has(id) || virtualBlocksWidgetPanelAssets.has(id) || virtualSiteComponentAssets.has(id)) {
37134
+ if (virtualDashboardAssets.has(id) || virtualCustomElementAssets.has(id) || virtualCustomElementPanelAssets.has(id) || virtualBlocksWidgetAssets.has(id) || virtualBlocksWidgetPanelAssets.has(id) || virtualSiteComponentAssets.has(id) || virtualSiteComponentSdkAssets.has(id)) {
37103
37135
  return id;
37104
37136
  }
37105
37137
  return null;
@@ -37149,6 +37181,13 @@ var moduleBundleDev = ({
37149
37181
  server.moduleGraph.invalidateModule(moduleBundle);
37150
37182
  }
37151
37183
  }
37184
+ virtualSiteComponentSdkAssets = virtualSiteComponentSdkScriptAssets(initialModel);
37185
+ for (const scriptId of virtualSiteComponentSdkAssets.keys()) {
37186
+ const moduleBundle = server.moduleGraph.getModuleById(scriptId);
37187
+ if (moduleBundle) {
37188
+ server.moduleGraph.invalidateModule(moduleBundle);
37189
+ }
37190
+ }
37152
37191
  });
37153
37192
  },
37154
37193
  load(rawId) {
@@ -37181,6 +37220,10 @@ var moduleBundleDev = ({
37181
37220
  if (siteComponent) {
37182
37221
  return getSiteComponentDevTemplate(siteComponent);
37183
37222
  }
37223
+ const siteSdkComponent = virtualSiteComponentSdkAssets.get(id);
37224
+ if (siteSdkComponent) {
37225
+ return getSiteComponentSdkDevTemplate(siteSdkComponent);
37226
+ }
37184
37227
  return null;
37185
37228
  }
37186
37229
  };
@@ -37230,12 +37273,14 @@ var moduleBundleBuildWorker = ({
37230
37273
  }) => {
37231
37274
  const virtualBlocksWidgetAssets = virtualBlocksWidgetScriptAssets(initialModel);
37232
37275
  const virtualBlocksWidgetPanelAssets = virtualBlocksWidgetPanelScriptAssets(initialModel);
37276
+ const virtualSiteComponentAssets = virtualSiteComponentScriptAssets(initialModel);
37277
+ const virtualSiteComponentSdkAssets = virtualSiteComponentSdkScriptAssets(initialModel);
37233
37278
  return {
37234
37279
  name: "wix:module-bundle",
37235
37280
  apply: "build",
37236
37281
  resolveId(rawId) {
37237
37282
  const id = cleanId(rawId);
37238
- if (virtualBlocksWidgetAssets.has(id) || virtualBlocksWidgetPanelAssets.has(id)) {
37283
+ if (virtualBlocksWidgetAssets.has(id) || virtualBlocksWidgetPanelAssets.has(id) || virtualSiteComponentAssets.has(id) || virtualSiteComponentSdkAssets.has(id)) {
37239
37284
  return id;
37240
37285
  }
37241
37286
  return null;
@@ -37250,6 +37295,14 @@ var moduleBundleBuildWorker = ({
37250
37295
  if (blocksPanelComponent) {
37251
37296
  return getBlocksPanelBuildTemplate(blocksPanelComponent);
37252
37297
  }
37298
+ const siteComponent = virtualSiteComponentAssets.get(id);
37299
+ if (siteComponent) {
37300
+ return getSiteComponentBuildTemplate(siteComponent);
37301
+ }
37302
+ const siteSdkComponent = virtualSiteComponentSdkAssets.get(id);
37303
+ if (siteSdkComponent) {
37304
+ return getSiteComponentSdkBuildTemplate(siteSdkComponent);
37305
+ }
37253
37306
  return null;
37254
37307
  }
37255
37308
  };
@@ -38940,69 +38993,20 @@ function hashHtmlFiles() {
38940
38993
  // src/vite/plugins/exports-custodian.ts
38941
38994
  init_esm_shims();
38942
38995
  var EXPORTS_CUSTODIAN_ENTRY = "virtual:wix-exports-custodian-entry";
38943
- var exportsCustodian = ({
38944
- initialModel,
38945
- type,
38946
- projectModelWatcher
38947
- }) => {
38948
- let virtualBlocksWidgetAssets = virtualBlocksWidgetScriptAssets(initialModel);
38949
- let virtualBlocksWidgetPanelAssets = virtualBlocksWidgetPanelScriptAssets(initialModel);
38950
- let virtualSiteComponentAssets = virtualSiteComponentScriptAssets(initialModel);
38996
+ var exportsCustodian = ({ initialModel }) => {
38997
+ const virtualSiteComponentAssets = virtualSiteComponentScriptAssets(initialModel);
38951
38998
  return {
38952
38999
  name: "wix:exports-custodian",
39000
+ apply: "build",
38953
39001
  resolveId(id) {
38954
39002
  if (id === EXPORTS_CUSTODIAN_ENTRY) {
38955
39003
  return id;
38956
39004
  }
38957
39005
  return null;
38958
39006
  },
38959
- configureServer(server) {
38960
- if (type === "dev" /* dev */) {
38961
- projectModelWatcher.onChange((model) => {
38962
- virtualBlocksWidgetAssets = virtualBlocksWidgetScriptAssets(model);
38963
- for (const scriptId of virtualBlocksWidgetAssets.keys()) {
38964
- const moduleBundle = server.moduleGraph.getModuleById(scriptId);
38965
- if (moduleBundle) {
38966
- server.moduleGraph.invalidateModule(moduleBundle);
38967
- }
38968
- }
38969
- virtualBlocksWidgetPanelAssets = virtualBlocksWidgetPanelScriptAssets(model);
38970
- for (const scriptId of virtualBlocksWidgetPanelAssets.keys()) {
38971
- const moduleBundle = server.moduleGraph.getModuleById(scriptId);
38972
- if (moduleBundle) {
38973
- server.moduleGraph.invalidateModule(moduleBundle);
38974
- }
38975
- }
38976
- virtualSiteComponentAssets = virtualSiteComponentScriptAssets(model);
38977
- for (const scriptId of virtualSiteComponentAssets.keys()) {
38978
- const moduleBundle = server.moduleGraph.getModuleById(scriptId);
38979
- if (moduleBundle) {
38980
- server.moduleGraph.invalidateModule(moduleBundle);
38981
- }
38982
- }
38983
- });
38984
- }
38985
- },
38986
39007
  load(id) {
38987
39008
  if (id === EXPORTS_CUSTODIAN_ENTRY) {
38988
- return [
38989
- ...Array.from(virtualBlocksWidgetAssets.keys()).map(
38990
- (path9, index) => `
38991
- import { init as init${index}, api as api${index} } from '${path9}';
38992
- init${index}();
38993
- api${index}();
38994
- `
38995
- ),
38996
- ...Array.from(virtualBlocksWidgetPanelAssets.keys()).map(
38997
- (path9, index) => `
38998
- import { init as initPanel${index} } from '${path9}';
38999
- initPanel${index}();
39000
- `
39001
- ),
39002
- ...Array.from(virtualSiteComponentAssets.keys()).map(
39003
- (path9) => `import('${path9}');`
39004
- )
39005
- ].join("\n");
39009
+ return Array.from(virtualSiteComponentAssets.keys()).map((path9) => `import('${path9}');`).join("\n");
39006
39010
  }
39007
39011
  return null;
39008
39012
  }
@@ -39046,18 +39050,6 @@ async function getViteConfig2(model, options, { baseBackendUrl } = {}) {
39046
39050
  logLevel: "info",
39047
39051
  publicDir: false,
39048
39052
  base: `/${BROWSER_STATICS_FOLDER}`,
39049
- optimizeDeps: {
39050
- entries: [
39051
- DASHBOARD_PAGES_PATTERN,
39052
- DASHBOARD_PLUGINS_PATTERN,
39053
- DASHBOARD_MODALS_PATTERN,
39054
- SITE_WIDGETS_ELEMENT_PATTERN,
39055
- SITE_WIDGETS_PANEL_PATTERN,
39056
- SITE_PLUGINS_PLUGIN_PATTERN,
39057
- SITE_PLUGINS_PANEL_PATTERN,
39058
- SITE_COMPONENTS_PATTERN
39059
- ]
39060
- },
39061
39053
  server: {},
39062
39054
  build: {
39063
39055
  sourcemap: true,
@@ -39114,10 +39106,7 @@ async function getViteConfig2(model, options, { baseBackendUrl } = {}) {
39114
39106
  initialModel: model,
39115
39107
  ...options
39116
39108
  }),
39117
- exportsCustodian({
39118
- initialModel: model,
39119
- ...options
39120
- }),
39109
+ exportsCustodian({ initialModel: model }),
39121
39110
  configExtensionsFileEmitter(model),
39122
39111
  ...monitoringPlugins ?? [],
39123
39112
  src_default({
@@ -39166,6 +39155,15 @@ async function getViteConfig3(model, options, { baseBackendUrl } = {}) {
39166
39155
  ...virtualBlocksWidgetScriptAssets(model),
39167
39156
  ...virtualBlocksWidgetPanelScriptAssets(model)
39168
39157
  ].map(([assetId, component]) => [`script-asset-${component.id}`, assetId]);
39158
+ const virtualSiteComponentScriptEntries = [
39159
+ ...virtualSiteComponentScriptAssets(model)
39160
+ ].map(([assetId, component]) => [`script-asset-${component.id}`, assetId]);
39161
+ const virtualSiteComponentSdkScriptEntries = [
39162
+ ...virtualSiteComponentSdkScriptAssets(model)
39163
+ ].map(([assetId, component]) => [
39164
+ `script-asset-${component.id}-sdk`,
39165
+ assetId
39166
+ ]);
39169
39167
  const { monitoring } = model.config;
39170
39168
  const monitoringPlugins = monitoring?.sentry && (0, import_monitoring_buildtime3.getMonitoringVitePlugins)({
39171
39169
  appId: model.config.appId,
@@ -39184,9 +39182,6 @@ async function getViteConfig3(model, options, { baseBackendUrl } = {}) {
39184
39182
  clearScreen: false,
39185
39183
  logLevel: "info",
39186
39184
  publicDir: false,
39187
- optimizeDeps: {
39188
- entries: [BLOCKS_WIDGETS_PATTERN, BLOCKS_WIDGETS_PANELS_PATTERN]
39189
- },
39190
39185
  server: {},
39191
39186
  ssr: {
39192
39187
  target: "webworker",
@@ -39198,8 +39193,11 @@ async function getViteConfig3(model, options, { baseBackendUrl } = {}) {
39198
39193
  outDir: getAppWorkerBuildFolder(model.projectFolder),
39199
39194
  rollupOptions: {
39200
39195
  input: {
39201
- ...Object.fromEntries(virtualBlocksScriptEntries),
39202
- [EXPORTS_CUSTODIAN_ENTRY]: EXPORTS_CUSTODIAN_ENTRY
39196
+ ...Object.fromEntries([
39197
+ ...virtualBlocksScriptEntries,
39198
+ ...virtualSiteComponentScriptEntries,
39199
+ ...virtualSiteComponentSdkScriptEntries
39200
+ ])
39203
39201
  },
39204
39202
  output: {
39205
39203
  assetFileNames: "assets/[name].ch.[hash][extname]",
@@ -39230,10 +39228,6 @@ async function getViteConfig3(model, options, { baseBackendUrl } = {}) {
39230
39228
  initialModel: model,
39231
39229
  ...options
39232
39230
  }),
39233
- exportsCustodian({
39234
- initialModel: model,
39235
- ...options
39236
- }),
39237
39231
  ...monitoringPlugins ?? [],
39238
39232
  src_default({
39239
39233
  ignoreConfigErrors: true,
@@ -39463,9 +39457,6 @@ async function getViteConfig4(model, options, { baseBackendUrl } = {}) {
39463
39457
  ...virtualBlocksWidgetScriptAssets(model),
39464
39458
  ...virtualBlocksWidgetPanelScriptAssets(model)
39465
39459
  ].map(([assetId, component]) => [`script-asset-${component.id}`, assetId]);
39466
- const virtualSiteComponentScriptEntries = [
39467
- ...virtualSiteComponentScriptAssets(model)
39468
- ].map(([assetId, component]) => [`script-asset-${component.id}`, assetId]);
39469
39460
  const { monitoring } = model.config;
39470
39461
  const monitoringPlugins = monitoring?.sentry && (0, import_monitoring_buildtime4.getMonitoringVitePlugins)({
39471
39462
  appId: model.config.appId,
@@ -39495,13 +39486,12 @@ async function getViteConfig4(model, options, { baseBackendUrl } = {}) {
39495
39486
  SITE_PLUGINS_PANEL_PATTERN,
39496
39487
  BLOCKS_WIDGETS_PATTERN,
39497
39488
  BLOCKS_WIDGETS_PANELS_PATTERN,
39498
- SITE_COMPONENTS_PATTERN
39489
+ SITE_COMPONENTS_PATTERN,
39490
+ SITE_COMPONENTS_SDK_PATTERN
39499
39491
  ]
39500
39492
  },
39501
39493
  server: {},
39502
39494
  build: {
39503
- sourcemap: true,
39504
- outDir: getAppBuildFolder(model.projectFolder),
39505
39495
  rollupOptions: {
39506
39496
  input: {
39507
39497
  ...Object.fromEntries([
@@ -39510,15 +39500,8 @@ async function getViteConfig4(model, options, { baseBackendUrl } = {}) {
39510
39500
  ...embeddedScriptEntries,
39511
39501
  ...virtualCustomElementHTMLEntries,
39512
39502
  ...virtualCustomElementScriptEntries,
39513
- ...virtualBlocksScriptEntries,
39514
- ...virtualSiteComponentScriptEntries
39515
- ]),
39516
- ...virtualBlocksScriptEntries.length ? { [EXPORTS_CUSTODIAN_ENTRY]: EXPORTS_CUSTODIAN_ENTRY } : {}
39517
- },
39518
- output: {
39519
- assetFileNames: "assets/[name].ch.[hash][extname]",
39520
- chunkFileNames: "assets/[name].ch.[hash].js",
39521
- entryFileNames: "assets/[name].ch.[hash].js"
39503
+ ...virtualBlocksScriptEntries
39504
+ ])
39522
39505
  }
39523
39506
  }
39524
39507
  },
@@ -39559,10 +39542,6 @@ async function getViteConfig4(model, options, { baseBackendUrl } = {}) {
39559
39542
  initialModel: model,
39560
39543
  ...options
39561
39544
  }),
39562
- exportsCustodian({
39563
- initialModel: model,
39564
- ...options
39565
- }),
39566
39545
  configExtensionsFileEmitter(model),
39567
39546
  ...monitoringPlugins ?? [],
39568
39547
  src_default({
@@ -40381,32 +40360,45 @@ var blocksPanelBuilder = (component, source) => {
40381
40360
  componentUrl
40382
40361
  };
40383
40362
  };
40384
- var siteComponentBuilder = (component, source) => {
40363
+ var siteComponentBuilder = (component, browserSource, workerSource) => {
40385
40364
  const moduleId = virtualModuleIdForSiteComponentScriptAsset(component.id);
40386
- if (source.buildSource == null) {
40365
+ const sdkModuleId = component.relativeSdkPath ? virtualModuleIdForSiteComponentSdkScriptAsset(component.id) : null;
40366
+ if (browserSource.buildSource == null || workerSource?.buildSource?.workerBuildOutput == null) {
40387
40367
  return {
40388
40368
  client: {
40389
40369
  componentUrl: `/@id/${moduleId}?import`
40390
40370
  },
40391
40371
  server: {
40392
40372
  url: ""
40393
- }
40373
+ },
40374
+ ...sdkModuleId ? { sdk: { url: `/@id/${sdkModuleId}?import` } } : {}
40394
40375
  };
40395
40376
  }
40396
40377
  return {
40397
40378
  client: {
40398
40379
  componentUrl: extractModuleBundleName(
40399
- source.buildSource.browserBuildOutput,
40380
+ browserSource.buildSource.browserBuildOutput,
40400
40381
  moduleId
40401
40382
  ),
40402
40383
  cssUrl: extractModuleBundleCss(
40403
- source.buildSource.browserBuildOutput,
40384
+ browserSource.buildSource.browserBuildOutput,
40404
40385
  moduleId
40405
40386
  )
40406
40387
  },
40407
40388
  server: {
40408
- url: "https://wix.com/"
40409
- }
40389
+ url: extractModuleBundleName(
40390
+ workerSource.buildSource.workerBuildOutput,
40391
+ moduleId
40392
+ )
40393
+ },
40394
+ ...sdkModuleId ? {
40395
+ sdk: {
40396
+ url: extractModuleBundleName(
40397
+ workerSource.buildSource.workerBuildOutput,
40398
+ sdkModuleId
40399
+ )
40400
+ }
40401
+ } : {}
40410
40402
  };
40411
40403
  };
40412
40404
  function getComponentDevSourceBuilder(model, devSource, backendSource) {
@@ -40484,9 +40476,11 @@ function getComponentBuildSourceBuilder(model, browserBuildSource, workerBuildSo
40484
40476
  ServicePlugin: (component2) => servicePluginSourceBuilder(component2, model, backendSource),
40485
40477
  Monitoring: () => {
40486
40478
  },
40487
- SiteComponent: (component2) => siteComponentBuilder(component2, {
40488
- buildSource: browserBuildSource
40489
- })
40479
+ SiteComponent: (component2) => siteComponentBuilder(
40480
+ component2,
40481
+ { buildSource: browserBuildSource },
40482
+ { buildSource: workerBuildSource }
40483
+ )
40490
40484
  });
40491
40485
  return source;
40492
40486
  };
@@ -40958,7 +40952,10 @@ var siteComponentSourceSchema = z.object({
40958
40952
  }),
40959
40953
  server: z.object({
40960
40954
  url: z.string()
40961
- })
40955
+ }),
40956
+ sdk: z.object({
40957
+ url: z.string()
40958
+ }).optional()
40962
40959
  });
40963
40960
  var siteComponentSchema = z.object({
40964
40961
  compType: z.literal(ComponentType.EDITOR_REACT_COMPONENT),
@@ -41152,27 +41149,16 @@ var updateBrowserComponentsWithBaseUrl = (appManifest, baseUrl) => {
41152
41149
  };
41153
41150
  }
41154
41151
  if (compType === ComponentType.EDITOR_REACT_COMPONENT) {
41155
- compData.editorReactComponent = {
41156
- ...compData.editorReactComponent,
41157
- resources: {
41158
- client: {
41159
- componentUrl: normalizeUrl(
41160
- compData.editorReactComponent.resources.client.componentUrl,
41161
- normalizedBaseUrl
41162
- ),
41163
- cssUrl: compData.editorReactComponent.resources.client.cssUrl && normalizeUrl(
41164
- compData.editorReactComponent.resources.client.cssUrl,
41165
- normalizedBaseUrl
41166
- )
41167
- },
41168
- server: {
41169
- url: normalizeUrl(
41170
- compData.editorReactComponent.resources.server.url,
41171
- normalizedBaseUrl
41172
- )
41173
- }
41174
- }
41175
- };
41152
+ compData.editorReactComponent.resources.client.componentUrl = normalizeUrl(
41153
+ compData.editorReactComponent.resources.client.componentUrl,
41154
+ normalizedBaseUrl
41155
+ );
41156
+ if (compData.editorReactComponent.resources.client.cssUrl) {
41157
+ compData.editorReactComponent.resources.client.cssUrl = normalizeUrl(
41158
+ compData.editorReactComponent.resources.client.cssUrl,
41159
+ normalizedBaseUrl
41160
+ );
41161
+ }
41176
41162
  }
41177
41163
  }
41178
41164
  return clonedManifest;
@@ -41203,6 +41189,18 @@ var updateWorkerComponentsWithBaseUrl = (appManifest, workerBaseUrl) => {
41203
41189
  originUrl.searchParams.set(bundleUrlQueryParam, normalizedBundleUrl);
41204
41190
  compData.panel.url = originUrl.toString();
41205
41191
  }
41192
+ if (compType === ComponentType.EDITOR_REACT_COMPONENT) {
41193
+ compData.editorReactComponent.resources.server.url = normalizeUrl2(
41194
+ compData.editorReactComponent.resources.server.url,
41195
+ normalizedWorkerBaseUrl
41196
+ );
41197
+ if (compData.editorReactComponent.resources.sdk) {
41198
+ compData.editorReactComponent.resources.sdk.url = normalizeUrl2(
41199
+ compData.editorReactComponent.resources.sdk.url,
41200
+ normalizedWorkerBaseUrl
41201
+ );
41202
+ }
41203
+ }
41206
41204
  }
41207
41205
  return clonedManifest;
41208
41206
  };
@@ -41413,4 +41411,4 @@ export {
41413
41411
  he/he.js:
41414
41412
  (*! https://mths.be/he v1.2.0 by @mathias | MIT license *)
41415
41413
  */
41416
- //# sourceMappingURL=chunk-SIJDKP2Q.js.map
41414
+ //# sourceMappingURL=chunk-EDZ42Y6V.js.map