@wix/cli-app 1.1.50 → 1.1.51

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 (102) hide show
  1. package/build/CreateVersionCommand-6QSWW7PH.js +4 -0
  2. package/build/{CreateVersionCommand-G4JMAUB5.js.map → CreateVersionCommand-6QSWW7PH.js.map} +1 -1
  3. package/build/DevCommand-L3OC7OUZ.js +4 -0
  4. package/build/DevCommand-L3OC7OUZ.js.map +1 -0
  5. package/build/GenerateCommand-K5IS2QEG.js +99 -0
  6. package/build/GenerateCommand-K5IS2QEG.js.map +1 -0
  7. package/build/LogsCommand-5TTBMWFF.js +4 -0
  8. package/build/{LogsCommand-7CMV7VDA.js.map → LogsCommand-5TTBMWFF.js.map} +1 -1
  9. package/build/PreviewCommand-RCGDUERX.js +4 -0
  10. package/build/ServeCommand-BKLVSLW3.js +4 -0
  11. package/build/ServeCommand-BKLVSLW3.js.map +1 -0
  12. package/build/build-OSBBPACR.js +4 -0
  13. package/build/build-OSBBPACR.js.map +1 -0
  14. package/build/{chunk-VMPGY3XD.js → chunk-5OKXHNO2.js} +2 -2
  15. package/build/chunk-5UV5L6RZ.js +4 -0
  16. package/build/{chunk-JTFBYI5Z.js → chunk-7YIQAWRD.js} +2 -2
  17. package/build/chunk-EUNKG7JY.js +11 -0
  18. package/build/chunk-EUNKG7JY.js.map +1 -0
  19. package/build/chunk-GF6CV6CZ.js +100 -0
  20. package/build/chunk-GF6CV6CZ.js.map +1 -0
  21. package/build/chunk-IOW53RH7.js +4 -0
  22. package/build/chunk-IOW53RH7.js.map +1 -0
  23. package/build/chunk-L2GYA6RW.js +115 -0
  24. package/build/{chunk-TT7ANJ37.js.map → chunk-L2GYA6RW.js.map} +1 -1
  25. package/build/{chunk-U3X4QFEY.js → chunk-LYCV7HBR.js} +2 -2
  26. package/build/chunk-M7777RXR.js +5 -0
  27. package/build/chunk-M7777RXR.js.map +1 -0
  28. package/build/{chunk-AT67JTKR.js → chunk-MM7OD345.js} +56 -56
  29. package/build/{chunk-AT67JTKR.js.map → chunk-MM7OD345.js.map} +1 -1
  30. package/build/{chunk-LUN6J4D4.js → chunk-NYC4UPCI.js} +2 -2
  31. package/build/chunk-V3QQTT5C.js +4 -0
  32. package/build/chunk-V3QQTT5C.js.map +1 -0
  33. package/build/{chunk-PZBAQL52.js → chunk-VOW75NWO.js} +2 -2
  34. package/build/{chunk-RSCSYMHP.js → chunk-VXMDSBPO.js} +2 -2
  35. package/build/chunk-WJTPY35F.js +9 -0
  36. package/build/chunk-WJTPY35F.js.map +1 -0
  37. package/build/chunk-YFYESJ2A.js +4 -0
  38. package/build/chunk-YFYESJ2A.js.map +1 -0
  39. package/build/{chunk-SUKF3ONU.js → chunk-YIQOAFCK.js} +2 -2
  40. package/build/{chunk-QPGCBW5R.js → chunk-YXZSFVXG.js} +2 -2
  41. package/build/chunk-ZWY7YSYP.js +4 -0
  42. package/build/chunk-ZWY7YSYP.js.map +1 -0
  43. package/build/cloudflare-runtime/entry.js +1 -1
  44. package/build/cloudflare-runtime/getRegisteredExtensions.js +1 -1
  45. package/build/index.js +2 -2
  46. package/build/index.js.map +1 -1
  47. package/build/platform-sdk/chunk-DGX4CFXG.js +2 -0
  48. package/build/platform-sdk/chunk-DGX4CFXG.js.map +1 -0
  49. package/build/platform-sdk/chunk-KEIVYRQX.js +2 -0
  50. package/build/platform-sdk/chunk-KEIVYRQX.js.map +1 -0
  51. package/build/platform-sdk/dashboard.js +1 -1
  52. package/build/platform-sdk/editor.js +2 -2
  53. package/build/platform-sdk/editor.js.map +1 -1
  54. package/build/platform-sdk/site.js +1 -1
  55. package/build/preview-FY5YKH5Z.js +4 -0
  56. package/build/{preview-CLW3KECJ.js.map → preview-FY5YKH5Z.js.map} +1 -1
  57. package/build/render-command-4BGZ4KYD.js +4 -0
  58. package/build/render-command-4BGZ4KYD.js.map +1 -0
  59. package/package.json +5 -4
  60. package/schemas/wix-config.json +1 -1
  61. package/build/CreateVersionCommand-G4JMAUB5.js +0 -4
  62. package/build/DevCommand-ICJ7HWGE.js +0 -4
  63. package/build/DevCommand-ICJ7HWGE.js.map +0 -1
  64. package/build/GenerateCommand-IGBPVFUN.js +0 -99
  65. package/build/GenerateCommand-IGBPVFUN.js.map +0 -1
  66. package/build/LogsCommand-7CMV7VDA.js +0 -4
  67. package/build/PreviewCommand-4JOWYN2H.js +0 -4
  68. package/build/ServeCommand-I5CZCTC2.js +0 -4
  69. package/build/ServeCommand-I5CZCTC2.js.map +0 -1
  70. package/build/build-F7QA4DJU.js +0 -4
  71. package/build/build-F7QA4DJU.js.map +0 -1
  72. package/build/chunk-AKOLPD6V.js +0 -4
  73. package/build/chunk-AKOLPD6V.js.map +0 -1
  74. package/build/chunk-AODPLKHZ.js +0 -4
  75. package/build/chunk-AODPLKHZ.js.map +0 -1
  76. package/build/chunk-AQLOAQFB.js +0 -4
  77. package/build/chunk-AQLOAQFB.js.map +0 -1
  78. package/build/chunk-PWIPMRWY.js +0 -4
  79. package/build/chunk-TT7ANJ37.js +0 -115
  80. package/build/chunk-WPDKHYDX.js +0 -10
  81. package/build/chunk-WPDKHYDX.js.map +0 -1
  82. package/build/chunk-Z6KGERGI.js +0 -100
  83. package/build/chunk-Z6KGERGI.js.map +0 -1
  84. package/build/chunk-ZN6WU4UI.js +0 -11
  85. package/build/chunk-ZN6WU4UI.js.map +0 -1
  86. package/build/platform-sdk/chunk-3TJ2D6DS.js +0 -2
  87. package/build/platform-sdk/chunk-3TJ2D6DS.js.map +0 -1
  88. package/build/platform-sdk/chunk-RE2R2PA6.js +0 -2
  89. package/build/platform-sdk/chunk-RE2R2PA6.js.map +0 -1
  90. package/build/preview-CLW3KECJ.js +0 -4
  91. package/build/render-command-MDMVZZWK.js +0 -4
  92. package/build/render-command-MDMVZZWK.js.map +0 -1
  93. /package/build/{PreviewCommand-4JOWYN2H.js.map → PreviewCommand-RCGDUERX.js.map} +0 -0
  94. /package/build/{chunk-VMPGY3XD.js.map → chunk-5OKXHNO2.js.map} +0 -0
  95. /package/build/{chunk-PWIPMRWY.js.map → chunk-5UV5L6RZ.js.map} +0 -0
  96. /package/build/{chunk-JTFBYI5Z.js.map → chunk-7YIQAWRD.js.map} +0 -0
  97. /package/build/{chunk-U3X4QFEY.js.map → chunk-LYCV7HBR.js.map} +0 -0
  98. /package/build/{chunk-LUN6J4D4.js.map → chunk-NYC4UPCI.js.map} +0 -0
  99. /package/build/{chunk-PZBAQL52.js.map → chunk-VOW75NWO.js.map} +0 -0
  100. /package/build/{chunk-RSCSYMHP.js.map → chunk-VXMDSBPO.js.map} +0 -0
  101. /package/build/{chunk-SUKF3ONU.js.map → chunk-YIQOAFCK.js.map} +0 -0
  102. /package/build/{chunk-QPGCBW5R.js.map → chunk-YXZSFVXG.js.map} +0 -0
@@ -1,11 +0,0 @@
1
- import { createRequire as _createRequire } from 'node:module';
2
- const require = _createRequire(import.meta.url);
3
- var o={"create_version_command_def.option.version_type":"The type of version you would like to create","create_version_command_def.option.approve_preview":"Approve preview automatically","create_version_command_def.option.base_url":"The base url for when static files have been uploaded to an external cdn","create_version_command_def.option.site":"The site id to use for Application Preview urls, defaults to the current selected development site","dev_command_def.option.https":"Start local dev server on https","app_preview_command_def.option.site":"The site id to use for Application Preview urls, defaults to the current selected development site","app_preview_command_def.option.base_url":"The base url for when static files have been uploaded to an external cdn","app_preview_command_def.option.no_input":"Disable command interactivity","general.loading":"Loading...","general.no_site_id_configured":"You don't have a Development Site currently configured","general.site_id_not_found":`Your currently configured Development Site was not found ({id})
4
- This may happen because the site was deleted or your access has been revoked.
5
-
6
- Please select another Development Site to continue`,"general.dashboard_page_text":"<0>Click here</0> to open your application in the Wix Dashboard","general.dashboard_page_click_here":"Click here","general.close_screen":"Press <0/> to close","logs.backend.clear":"Press <0/> to clear","general.write_dev_log_failure.message":"Can not write logs to <0>{path}</0>","general.write_dev_log_failure.hint":"Make sure the file has proper permissions and is accessible","general.open_page_error":"Failed to open the browser for <0>{title}</0>, use the following URL to open it in your browser:","general.dashboard_pages_viewer.title":"Press a number key to open a dashboard page:","general.dashboard_plugins_viewer.title":"Press a number key to open a dashboard plugin:","general.dashboard_menu_plugins_viewer.title":"Press a number key to open a dashboard menu plugin:","general.backend_api_viewer.title":"Press a number key to trigger an api:","general.backend_plugin_viewer.title":"Press a number key to trigger an plugin:","general.backend_events_viewer.title":"Press a number key to trigger an event:","general.numeric_viewer.show_more":"View more...","general.platform.site":"Site","general.platform.unpublished_site":"Site (publish the site to enable site preview)","general.platform.editor":"Editor","general.platform.dashboard":"Dashboard","general.platform.backend":"Backend","general.platform.none":`Your project doesn't seem to have any extensions.
7
-
8
- Extensions are the building blocks of your app.
9
- Make sure it is configured properly, or read our <0>documentation</0> to start developing your first extension.`,"general.dev_site.current":"Current Development Site: {name}","general.view_changes":"View your local changes: <0>(Press a key to open)</0>","general.open_preview.title_single":"Open the preview on the","general.open_preview.title_multiple":"Open the preview on:","preview_command.creating_preview":"Creating a preview...","preview_command.creating_preview_success":"Preview created successfully!","preview_command.uploading_files":"Uploading your application files...","preview_command.uploading_files_success":"Uploaded successfully!","dev_command.site_provider.loading":"Resolving development site...","dev_command.custom_elements_migration.loading":"Checking site widgets installation...","preview_command.note_about_temporary_backend":"This preview URL will be available for three days. Afterward, you can create a new preview if you need to.","dev_command.dev_environment.loading":"Starting dev environment...","dev_command.dev_environment.started":"Local development environment ready.","dev_command.dev_environment.url":"Application served on <0/>","dev_command.dev_environment.backend_url":"Backend served on <0/>","dev_command.dev_site.change":"Press <0/> to change your current Development Site","dev_command.site_selector.error":"Failed to change Development Site!","dev_command.dashboard_pages_screen.select_label":"Select a dashboard page to open","dev_command.dashboard_menu_plugin_screen.select_label":"Select a dashboard menu plugin to open","dev_command.dashboard_page_plugin_screen.select_label":"Select a dashboard plugin to open","dev_command.dashboard_modal_screen.select_label":"Select a dashboard modal to open","dev_command.backend_apis_screen.select_label":"Select api to trigger","dev_command.backend_events_screen.select_label":"Select event to trigger","dev_command.backend_plugins_screen.select_label":"Select plugin to trigger","dev_command.dev_env_logs.title":"Dev Environment Logs:","dev_command.required_apps.loading":"Checking required apps...","dev_command.required_apps.warning":"Make sure you have {requiredAppNames} installed on your site","dev_command.dev_env_backend_logs.title":"Press <0/> to view full logs from {path}","dev_command.dev_env_backend_logs_screen.title":"Server Environment Full Logs","dev_command.dev_env_logs.empty":"No logs to show","dev_command.dev_env_logs.listening_to_logs":"Listening to logs...","dev_command.dev_env_logs.scroll_explain":"Use the arrow keys to scroll","dev_command.config_change":"Loading App Manifest changes...","dev_command.config_update":"App Manifest updated. Refresh existing browser tabs to view the latest changes.","dev_command.config_didnt_update":"No App Manifest update occurred","dev_command.tunneling.confirm":"To proceed, we'll set up a secure tunnel from your machine for development purposes","dev_command.tunneling.abort_dev":"Operation aborted. Tunneling is necessary to run your application.","dev_command.new_custom_element.warning":"New site widget detected. Press <0/> to open the Site Editor and complete the installation.","dev_command.new_custom_element.confirm_reinstall":"Press <0/> when you reinstalled app on your dev site","dev_command.new_custom_element.reinstall_error":"We had troubles with adding your new site widget. You can try to do it by yourself. Press <0/> to continue","serve_command.starting_serve_environment":"Starting serve environment...","serve_command.starting_serve_environment_success":"Serve environment started! <0/>","serve_command.production_build":"Application is using a production build","create_version_command.creating_version":"Creating a version...","create_version_command.creating_version_success":"Successfully created v{version}","create_version_command.current_version":"Your current version is: v{version}","create_version_command.confirm_version_events_warning":"Any configured events will be deployed to production and take effect once a new version of your app is created.","create_version_command.confirm_version_creation":"Continue with creating the new version?","create_version_command.confirm_version_creation_aborted":"Version creation aborted","create_version_command.version_type_question":"What type of version would you like to create?","create_version_command.version_type_question_minor":"Minor (v{version})","create_version_command.version_type_question_major":"Major (v{version})","create_version_command.check_preview_before_version_release":"Before creating a new version, let's create a preview of your app","create_version_command.checking_validation_status":"Checking if this version can be submitted\u2026","create_version_command.version_validation_ok":"This version can be submitted for review in the <0>App Dashboard</0>","create_version_command.version_validation_has_failures":`This version has blockers preventing it from being submitted for review.
10
- Please fix them and submit your app in the <0>App Dashboard</0>.`,"embedded_script.type.essential":"Essential","embedded_script.type.essential.description":"Must load regardless of policy","embedded_script.type.functional":"Functional","embedded_script.type.functional.description":"Adds optional functionality to the site","embedded_script.type.analytics":"Analytics","embedded_script.type.analytics.description":"Adds analytics abilities to the site","embedded_script.type.advertising":"Advertising","embedded_script.type.advertising.description":"Adds advertising content or advertising tracking to the site","embedded_script.placement.head":"Head","embedded_script.placement.head.description":"In the document head","embedded_script.placement.body_start":"Body Start","embedded_script.placement.body_start.description":"Prepended in the body","embedded_script.placement.body_end":"Body End","embedded_script.placement.body_end.description":"Appended in the body","generate_command.description":"Add new extensions to your application","generate_command.flow.dashboard_category":"Dashboard","generate_command.flow.site_category":"Site","generate_command.flow.backend_category":"Backend","generate_command.flow.dashboard_page":"Dashboard Page","generate_command.flow.sidebar_category":"Sidebar Category","generate_command.flow.dashboard_plugin":"Dashboard Plugin","generate_command.flow.dashboard_menu_plugin":"Dashboard Menu Plugin","generate_command.flow.embedded_script":"Embedded Script","generate_command.flow.site_plugin":"Site Plugin","generate_command.flow.event":"Event","generate_command.flow.api.title":"API","generate_command.flow.dashboard_modal":"Dashboard Modal","generate_command.flow.custom_element":"Site Widget","generate_command.flow.service_plugin":"Service Plugin","generate_command.flow.choose_flow":"What kind of extension would you like to generate?","generate_command.generation.loading":"Generating {subject}...","generate_command.generation.done":"\u{1F680} The new {extensionType} has been generated successfully.","generate_command.generation.learn_more":"\u{1F4DA} Learn more about {extensionType}: <0/>","generate_command.generation.new_dependencies":"\u26A0\uFE0F New app dependencies have been added. Please run <0>npm install</0> before continuing to work.","generate_command.dashboard_page.choose_route":"Enter the route for the new page:","generate_command.dashboard_page.route_placeholder":"my-page","generate_command.dashboard_page.choose_title":"Page title:","generate_command.dashboard_page.title_placeholder":"My Page","generate_command.dashboard_page.add_to_category":"Add to a sidebar category?","generate_command.dashboard_page.choose_category":"Sidebar category:","generate_command.sidebar_category.choose_label":"Enter the label for the new category:","generate_command.sidebar_category.label_placeholder":"My App","generate_command.custom_element.validation.element_exists":"The custom element folders must be unique, please choose a name that has not been used yet in your application.","generate_command.custom_element.validation.element_invalid":"The custom element folder must be a valid path ([a-z-/]+) and must not start with a dot.","generate_command.custom_element.choose_folder":"Widget folder (relative to src/site/widgets/custom-elements):","generate_command.custom_element.folder_placeholder":"my-widget","generate_command.custom_element.choose_name":"Widget name:","generate_command.custom_element.choose_name.error":"Enter a name that is shorter than 30 characters.","generate_command.custom_element.name_placeholder":"My Widget","generate_command.site_plugin.choose_folder":"Site plugin folder (relative to src/site/plugins/custom-elements):","generate_command.site_plugin.folder_placeholder":"my-site-plugin","generate_command.site_plugin.choose_name":"Site plugin name:","generate_command.site_plugin.name_placeholder":"My Site Plugin","generate_command.site_plugin.plugin_app":"Select a Wix app to view its plugin slots","generate_command.site_plugin.plugin_app.description":"(<0>read more</0>)","generate_command.site_plugin.choose_placement":"Select the slot in which you\u2019d like to place your plugin","generate_command.site_plugin.widget_docs":"<0>read more</0>","generate_command.embedded_script.validation.script_exists":"The script folder must be unique, please choose a name that has not been used yet in your application.","generate_command.embedded_script.validation.script_invalid":"The script folder must be a valid path ([a-z0-9-/]+) and must not start with a dot.","generate_command.embedded_script.choose_folder":"Script folder (relative to src/site/embedded-scripts):","generate_command.embedded_script.folder_placeholder":"my-script","generate_command.embedded_script.choose_name":"Script name:","generate_command.embedded_script.name_placeholder":"My Script","generate_command.embedded_script.choose_type":"Script type:","generate_command.embedded_script.type_info":"Determine if site visitors' consent is needed to run the script, <0>read more</0>","generate_command.embedded_script.choose_placement":"Placement:","generate_command.embedded_script.placement_info":"Will determine where the script is embedded","generate_command.dashboard_modal.validation.folder_exists":"The modal folder must be unique, please choose a folder name that has not been used yet in your application.","generate_command.dashboard_modal.validation.folder_invalid":"The modal folder must be a valid path ([a-z0-9-/]+) and must not start with a dot.","generate_command.dashboard_modal.choose_folder":"Enter the folder name for the new modal:","generate_command.dashboard_modal.folder_placeholder":"my-modal","generate_command.dashboard_modal.choose_title":"Modal title:","generate_command.dashboard_modal.title_placeholder":"My Modal","generate_command.dashboard_plugin.what_to_extend":"What would you like to extend?","generate_command.dashboard_plugin.what_to_extend.description":"Plugins let you extend Wix apps by embedding your UI inside dedicated slots within a dashboard page (<0>read more</0>)","generate_command.dashboard_plugin.what_to_extend.item_description":"<0>read more</0>","generate_command.dashboard_plugin.choose_folder":"Plugin folder (relative to src/dashboard/plugins)","generate_command.dashboard_plugin.folder_placeholder":"my-plugin","generate_command.dashboard_plugin.choose_title":"Plugin title","generate_command.dashboard_plugin.title_placeholder":"My Plugin","generate_command.required_app":"Would you like to set {appsNames} as a requirement for your app?","generate_command.required_app.description":"This means sites must have {appsNames} installed before installing your app (<0>read more</0>)","generate_command.dashboard_menu_plugin.what_to_extend":"What would you like to extend?","generate_command.dashboard_menu_plugin.what_to_extend.description":"Menu Plugins let you extend Wix apps by adding a menu item in a pre-defined slot in a menu on a dashboard page (<0>read more</0>)","generate_command.dashboard_menu_plugin.what_to_extend.item_description":"<0>read more</0>","generate_command.dashboard_menu_plugin.what_to_do":"What action will happen after clicking on the menu item?","generate_command.dashboard_menu_plugin.what_to_do.navigate_to_page":"Navigate to a page","generate_command.dashboard_menu_plugin.what_to_do.open_modal":"Open a modal","generate_command.dashboard_menu_plugin.what_to_do.navigate_to_page.choose_page":"Choose a page the menu item will navigate to:","generate_command.dashboard_menu_plugin.what_to_do.navigate_to_page.choose_page.info":"Choose from a list of available pages in your project or manually add a page from a different app","generate_command.dashboard_menu_plugin.what_to_do.navigate_to_page.choose_page.other":"Use a page from a different app","generate_command.dashboard_menu_plugin.what_to_do.navigate_to_page.choose_page.other.choose_page_id":"What is the unique id of the page?","generate_command.dashboard_menu_plugin.what_to_do.navigate_to_page.choose_page.other.page_id_invalid":"Page id has to be in the format of a uuid","generate_command.dashboard_menu_plugin.what_to_do.open_modal.choose_component":"Choose the modal to open:","generate_command.dashboard_menu_plugin.what_to_do.open_modal.choose_component.info":"Choose from a list of available modals in your project or manually add a modal from a different app","generate_command.dashboard_menu_plugin.what_to_do.open_modal.choose_component.other":"Use a modal from a different app","generate_command.dashboard_menu_plugin.what_to_do.open_modal.choose_component.other.choose_component_id":"What is the unique id of the modal?","generate_command.dashboard_menu_plugin.what_to_do.open_modal.choose_component.other.component_id_invalid":"Modal id has to be in the format of a uuid","generate_command.dashboard_menu_plugin.choose_folder":"Menu Plugin folder (relative to src/dashboard/menu-plugins)","generate_command.dashboard_menu_plugin.folder_placeholder":"my-plugin","generate_command.dashboard_menu_plugin.choose_title":"Menu Plugin title","generate_command.dashboard_menu_plugin.title_placeholder":"My Plugin","generate_command.api.api_placeholder":"my-api","generate_command.api.choose_api_name":"How would you like to name your API?","generate_command.api.choose_folder":"API folder (relative to src/backend/api):","generate_command.api.choose_api_name.error":"API name must be unique, can not include special characters or spaces, and must be shorter than 20 characters","generate_command.api.choose_method":"Choose an API method","generate_command.event.choose_folder":"Event folder (relative to src/backend/events):","generate_command.event.folder_placeholder":"my-event","generate_command.event.choose_folder.error":"Event name must be unique, can not include special characters or spaces, and must be shorter than 20 characters","generate_command.service_plugin.choose_type":"Which service plugin do you want to create","generate_command.service_plugin.choose_name":"How would you like to name your service plugin","generate_command.service_plugin.name_placeholder":"my-service-plugin","generate_command.service_plugin.groups.stores":"Stores","generate_command.service_plugin.ecom_additional_fees":"Ecom Additional Fees","generate_command.service_plugin.ecom_shipping_rates":"Ecom Shipping Rates","generate_command.service_plugin.ecom_discount_triggers":"Ecom Discount Triggers","generate_command.service_plugin.ecom_validations":"Ecom Validations","generate_command.service_plugin.ecom_payment_settings":"Ecom Payment Settings","generate_command.service_plugin.ecom_gift_cards_provider":"Ecom Gift Cards Provider","logs_command.connecting":"Connecting to the log server...","logs_command.listening_to_logs":"Listening to logs from the server.","logs_command.prod_env_logs":"Prod Environment logs for the version: {version}"};export{o as a};
11
- //# sourceMappingURL=chunk-ZN6WU4UI.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/messages.json"],"sourcesContent":["{\n \"create_version_command_def.option.version_type\": \"The type of version you would like to create\",\n \"create_version_command_def.option.approve_preview\": \"Approve preview automatically\",\n \"create_version_command_def.option.base_url\": \"The base url for when static files have been uploaded to an external cdn\",\n \"create_version_command_def.option.site\": \"The site id to use for Application Preview urls, defaults to the current selected development site\",\n \"dev_command_def.option.https\": \"Start local dev server on https\",\n \"app_preview_command_def.option.site\": \"The site id to use for Application Preview urls, defaults to the current selected development site\",\n \"app_preview_command_def.option.base_url\": \"The base url for when static files have been uploaded to an external cdn\",\n \"app_preview_command_def.option.no_input\": \"Disable command interactivity\",\n \"general.loading\": \"Loading...\",\n \"general.no_site_id_configured\": \"You don't have a Development Site currently configured\",\n \"general.site_id_not_found\": \"Your currently configured Development Site was not found ({id})\\nThis may happen because the site was deleted or your access has been revoked.\\n\\nPlease select another Development Site to continue\",\n \"general.dashboard_page_text\": \"<0>Click here</0> to open your application in the Wix Dashboard\",\n \"general.dashboard_page_click_here\": \"Click here\",\n \"general.close_screen\": \"Press <0/> to close\",\n \"logs.backend.clear\": \"Press <0/> to clear\",\n \"general.write_dev_log_failure.message\": \"Can not write logs to <0>{path}</0>\",\n \"general.write_dev_log_failure.hint\": \"Make sure the file has proper permissions and is accessible\",\n \"general.open_page_error\": \"Failed to open the browser for <0>{title}</0>, use the following URL to open it in your browser:\",\n \"general.dashboard_pages_viewer.title\": \"Press a number key to open a dashboard page:\",\n \"general.dashboard_plugins_viewer.title\": \"Press a number key to open a dashboard plugin:\",\n \"general.dashboard_menu_plugins_viewer.title\": \"Press a number key to open a dashboard menu plugin:\",\n \"general.backend_api_viewer.title\": \"Press a number key to trigger an api:\",\n \"general.backend_plugin_viewer.title\": \"Press a number key to trigger an plugin:\",\n \"general.backend_events_viewer.title\": \"Press a number key to trigger an event:\",\n \"general.numeric_viewer.show_more\": \"View more...\",\n \"general.platform.site\": \"Site\",\n \"general.platform.unpublished_site\": \"Site (publish the site to enable site preview)\",\n \"general.platform.editor\": \"Editor\",\n \"general.platform.dashboard\": \"Dashboard\",\n \"general.platform.backend\": \"Backend\",\n \"general.platform.none\": \"Your project doesn't seem to have any extensions.\\n\\nExtensions are the building blocks of your app.\\nMake sure it is configured properly, or read our <0>documentation</0> to start developing your first extension.\",\n \"general.dev_site.current\": \"Current Development Site: {name}\",\n \"general.view_changes\": \"View your local changes: <0>(Press a key to open)</0>\",\n \"general.open_preview.title_single\": \"Open the preview on the\",\n \"general.open_preview.title_multiple\": \"Open the preview on:\",\n \"preview_command.creating_preview\": \"Creating a preview...\",\n \"preview_command.creating_preview_success\": \"Preview created successfully!\",\n \"preview_command.uploading_files\": \"Uploading your application files...\",\n \"preview_command.uploading_files_success\": \"Uploaded successfully!\",\n \"dev_command.site_provider.loading\": \"Resolving development site...\",\n \"dev_command.custom_elements_migration.loading\": \"Checking site widgets installation...\",\n \"preview_command.note_about_temporary_backend\": \"This preview URL will be available for three days. Afterward, you can create a new preview if you need to.\",\n \"dev_command.dev_environment.loading\": \"Starting dev environment...\",\n \"dev_command.dev_environment.started\": \"Local development environment ready.\",\n \"dev_command.dev_environment.url\": \"Application served on <0/>\",\n \"dev_command.dev_environment.backend_url\": \"Backend served on <0/>\",\n \"dev_command.dev_site.change\": \"Press <0/> to change your current Development Site\",\n \"dev_command.site_selector.error\": \"Failed to change Development Site!\",\n \"dev_command.dashboard_pages_screen.select_label\": \"Select a dashboard page to open\",\n \"dev_command.dashboard_menu_plugin_screen.select_label\": \"Select a dashboard menu plugin to open\",\n \"dev_command.dashboard_page_plugin_screen.select_label\": \"Select a dashboard plugin to open\",\n \"dev_command.dashboard_modal_screen.select_label\": \"Select a dashboard modal to open\",\n \"dev_command.backend_apis_screen.select_label\": \"Select api to trigger\",\n \"dev_command.backend_events_screen.select_label\": \"Select event to trigger\",\n \"dev_command.backend_plugins_screen.select_label\": \"Select plugin to trigger\",\n \"dev_command.dev_env_logs.title\": \"Dev Environment Logs:\",\n \"dev_command.required_apps.loading\": \"Checking required apps...\",\n \"dev_command.required_apps.warning\": \"Make sure you have {requiredAppNames} installed on your site\",\n \"dev_command.dev_env_backend_logs.title\": \"Press <0/> to view full logs from {path}\",\n \"dev_command.dev_env_backend_logs_screen.title\": \"Server Environment Full Logs\",\n \"dev_command.dev_env_logs.empty\": \"No logs to show\",\n \"dev_command.dev_env_logs.listening_to_logs\": \"Listening to logs...\",\n \"dev_command.dev_env_logs.scroll_explain\": \"Use the arrow keys to scroll\",\n \"dev_command.config_change\": \"Loading App Manifest changes...\",\n \"dev_command.config_update\": \"App Manifest updated. Refresh existing browser tabs to view the latest changes.\",\n \"dev_command.config_didnt_update\": \"No App Manifest update occurred\",\n \"dev_command.tunneling.confirm\": \"To proceed, we'll set up a secure tunnel from your machine for development purposes\",\n \"dev_command.tunneling.abort_dev\": \"Operation aborted. Tunneling is necessary to run your application.\",\n \"dev_command.new_custom_element.warning\": \"New site widget detected. Press <0/> to open the Site Editor and complete the installation.\",\n \"dev_command.new_custom_element.confirm_reinstall\": \"Press <0/> when you reinstalled app on your dev site\",\n \"dev_command.new_custom_element.reinstall_error\": \"We had troubles with adding your new site widget. You can try to do it by yourself. Press <0/> to continue\",\n \"serve_command.starting_serve_environment\": \"Starting serve environment...\",\n \"serve_command.starting_serve_environment_success\": \"Serve environment started! <0/>\",\n \"serve_command.production_build\": \"Application is using a production build\",\n \"create_version_command.creating_version\": \"Creating a version...\",\n \"create_version_command.creating_version_success\": \"Successfully created v{version}\",\n \"create_version_command.current_version\": \"Your current version is: v{version}\",\n \"create_version_command.confirm_version_events_warning\": \"Any configured events will be deployed to production and take effect once a new version of your app is created.\",\n \"create_version_command.confirm_version_creation\": \"Continue with creating the new version?\",\n \"create_version_command.confirm_version_creation_aborted\": \"Version creation aborted\",\n \"create_version_command.version_type_question\": \"What type of version would you like to create?\",\n \"create_version_command.version_type_question_minor\": \"Minor (v{version})\",\n \"create_version_command.version_type_question_major\": \"Major (v{version})\",\n \"create_version_command.check_preview_before_version_release\": \"Before creating a new version, let's create a preview of your app\",\n \"create_version_command.checking_validation_status\": \"Checking if this version can be submitted…\",\n \"create_version_command.version_validation_ok\": \"This version can be submitted for review in the <0>App Dashboard</0>\",\n \"create_version_command.version_validation_has_failures\": \"This version has blockers preventing it from being submitted for review.\\nPlease fix them and submit your app in the <0>App Dashboard</0>.\",\n \"embedded_script.type.essential\": \"Essential\",\n \"embedded_script.type.essential.description\": \"Must load regardless of policy\",\n \"embedded_script.type.functional\": \"Functional\",\n \"embedded_script.type.functional.description\": \"Adds optional functionality to the site\",\n \"embedded_script.type.analytics\": \"Analytics\",\n \"embedded_script.type.analytics.description\": \"Adds analytics abilities to the site\",\n \"embedded_script.type.advertising\": \"Advertising\",\n \"embedded_script.type.advertising.description\": \"Adds advertising content or advertising tracking to the site\",\n \"embedded_script.placement.head\": \"Head\",\n \"embedded_script.placement.head.description\": \"In the document head\",\n \"embedded_script.placement.body_start\": \"Body Start\",\n \"embedded_script.placement.body_start.description\": \"Prepended in the body\",\n \"embedded_script.placement.body_end\": \"Body End\",\n \"embedded_script.placement.body_end.description\": \"Appended in the body\",\n \"generate_command.description\": \"Add new extensions to your application\",\n \"generate_command.flow.dashboard_category\": \"Dashboard\",\n \"generate_command.flow.site_category\": \"Site\",\n \"generate_command.flow.backend_category\": \"Backend\",\n \"generate_command.flow.dashboard_page\": \"Dashboard Page\",\n \"generate_command.flow.sidebar_category\": \"Sidebar Category\",\n \"generate_command.flow.dashboard_plugin\": \"Dashboard Plugin\",\n \"generate_command.flow.dashboard_menu_plugin\": \"Dashboard Menu Plugin\",\n \"generate_command.flow.embedded_script\": \"Embedded Script\",\n \"generate_command.flow.site_plugin\": \"Site Plugin\",\n \"generate_command.flow.event\": \"Event\",\n \"generate_command.flow.api.title\": \"API\",\n \"generate_command.flow.dashboard_modal\": \"Dashboard Modal\",\n \"generate_command.flow.custom_element\": \"Site Widget\",\n \"generate_command.flow.service_plugin\": \"Service Plugin\",\n \"generate_command.flow.choose_flow\": \"What kind of extension would you like to generate?\",\n \"generate_command.generation.loading\": \"Generating {subject}...\",\n \"generate_command.generation.done\": \"🚀 The new {extensionType} has been generated successfully.\",\n \"generate_command.generation.learn_more\": \"📚 Learn more about {extensionType}: <0/>\",\n \"generate_command.generation.new_dependencies\": \"⚠️ New app dependencies have been added. Please run <0>npm install</0> before continuing to work.\",\n \"generate_command.dashboard_page.choose_route\": \"Enter the route for the new page:\",\n \"generate_command.dashboard_page.route_placeholder\": \"my-page\",\n \"generate_command.dashboard_page.choose_title\": \"Page title:\",\n \"generate_command.dashboard_page.title_placeholder\": \"My Page\",\n \"generate_command.dashboard_page.add_to_category\": \"Add to a sidebar category?\",\n \"generate_command.dashboard_page.choose_category\": \"Sidebar category:\",\n \"generate_command.sidebar_category.choose_label\": \"Enter the label for the new category:\",\n \"generate_command.sidebar_category.label_placeholder\": \"My App\",\n \"generate_command.custom_element.validation.element_exists\": \"The custom element folders must be unique, please choose a name that has not been used yet in your application.\",\n \"generate_command.custom_element.validation.element_invalid\": \"The custom element folder must be a valid path ([a-z-/]+) and must not start with a dot.\",\n \"generate_command.custom_element.choose_folder\": \"Widget folder (relative to src/site/widgets/custom-elements):\",\n \"generate_command.custom_element.folder_placeholder\": \"my-widget\",\n \"generate_command.custom_element.choose_name\": \"Widget name:\",\n \"generate_command.custom_element.choose_name.error\": \"Enter a name that is shorter than 30 characters.\",\n \"generate_command.custom_element.name_placeholder\": \"My Widget\",\n \"generate_command.site_plugin.choose_folder\": \"Site plugin folder (relative to src/site/plugins/custom-elements):\",\n \"generate_command.site_plugin.folder_placeholder\": \"my-site-plugin\",\n \"generate_command.site_plugin.choose_name\": \"Site plugin name:\",\n \"generate_command.site_plugin.name_placeholder\": \"My Site Plugin\",\n \"generate_command.site_plugin.plugin_app\": \"Select a Wix app to view its plugin slots\",\n \"generate_command.site_plugin.plugin_app.description\": \"(<0>read more</0>)\",\n \"generate_command.site_plugin.choose_placement\": \"Select the slot in which you’d like to place your plugin\",\n \"generate_command.site_plugin.widget_docs\": \"<0>read more</0>\",\n \"generate_command.embedded_script.validation.script_exists\": \"The script folder must be unique, please choose a name that has not been used yet in your application.\",\n \"generate_command.embedded_script.validation.script_invalid\": \"The script folder must be a valid path ([a-z0-9-/]+) and must not start with a dot.\",\n \"generate_command.embedded_script.choose_folder\": \"Script folder (relative to src/site/embedded-scripts):\",\n \"generate_command.embedded_script.folder_placeholder\": \"my-script\",\n \"generate_command.embedded_script.choose_name\": \"Script name:\",\n \"generate_command.embedded_script.name_placeholder\": \"My Script\",\n \"generate_command.embedded_script.choose_type\": \"Script type:\",\n \"generate_command.embedded_script.type_info\": \"Determine if site visitors' consent is needed to run the script, <0>read more</0>\",\n \"generate_command.embedded_script.choose_placement\": \"Placement:\",\n \"generate_command.embedded_script.placement_info\": \"Will determine where the script is embedded\",\n \"generate_command.dashboard_modal.validation.folder_exists\": \"The modal folder must be unique, please choose a folder name that has not been used yet in your application.\",\n \"generate_command.dashboard_modal.validation.folder_invalid\": \"The modal folder must be a valid path ([a-z0-9-/]+) and must not start with a dot.\",\n \"generate_command.dashboard_modal.choose_folder\": \"Enter the folder name for the new modal:\",\n \"generate_command.dashboard_modal.folder_placeholder\": \"my-modal\",\n \"generate_command.dashboard_modal.choose_title\": \"Modal title:\",\n \"generate_command.dashboard_modal.title_placeholder\": \"My Modal\",\n \"generate_command.dashboard_plugin.what_to_extend\": \"What would you like to extend?\",\n \"generate_command.dashboard_plugin.what_to_extend.description\": \"Plugins let you extend Wix apps by embedding your UI inside dedicated slots within a dashboard page (<0>read more</0>)\",\n \"generate_command.dashboard_plugin.what_to_extend.item_description\": \"<0>read more</0>\",\n \"generate_command.dashboard_plugin.choose_folder\": \"Plugin folder (relative to src/dashboard/plugins)\",\n \"generate_command.dashboard_plugin.folder_placeholder\": \"my-plugin\",\n \"generate_command.dashboard_plugin.choose_title\": \"Plugin title\",\n \"generate_command.dashboard_plugin.title_placeholder\": \"My Plugin\",\n \"generate_command.required_app\": \"Would you like to set {appsNames} as a requirement for your app?\",\n \"generate_command.required_app.description\": \"This means sites must have {appsNames} installed before installing your app (<0>read more</0>)\",\n \"generate_command.dashboard_menu_plugin.what_to_extend\": \"What would you like to extend?\",\n \"generate_command.dashboard_menu_plugin.what_to_extend.description\": \"Menu Plugins let you extend Wix apps by adding a menu item in a pre-defined slot in a menu on a dashboard page (<0>read more</0>)\",\n \"generate_command.dashboard_menu_plugin.what_to_extend.item_description\": \"<0>read more</0>\",\n \"generate_command.dashboard_menu_plugin.what_to_do\": \"What action will happen after clicking on the menu item?\",\n \"generate_command.dashboard_menu_plugin.what_to_do.navigate_to_page\": \"Navigate to a page\",\n \"generate_command.dashboard_menu_plugin.what_to_do.open_modal\": \"Open a modal\",\n \"generate_command.dashboard_menu_plugin.what_to_do.navigate_to_page.choose_page\": \"Choose a page the menu item will navigate to:\",\n \"generate_command.dashboard_menu_plugin.what_to_do.navigate_to_page.choose_page.info\": \"Choose from a list of available pages in your project or manually add a page from a different app\",\n \"generate_command.dashboard_menu_plugin.what_to_do.navigate_to_page.choose_page.other\": \"Use a page from a different app\",\n \"generate_command.dashboard_menu_plugin.what_to_do.navigate_to_page.choose_page.other.choose_page_id\": \"What is the unique id of the page?\",\n \"generate_command.dashboard_menu_plugin.what_to_do.navigate_to_page.choose_page.other.page_id_invalid\": \"Page id has to be in the format of a uuid\",\n \"generate_command.dashboard_menu_plugin.what_to_do.open_modal.choose_component\": \"Choose the modal to open:\",\n \"generate_command.dashboard_menu_plugin.what_to_do.open_modal.choose_component.info\": \"Choose from a list of available modals in your project or manually add a modal from a different app\",\n \"generate_command.dashboard_menu_plugin.what_to_do.open_modal.choose_component.other\": \"Use a modal from a different app\",\n \"generate_command.dashboard_menu_plugin.what_to_do.open_modal.choose_component.other.choose_component_id\": \"What is the unique id of the modal?\",\n \"generate_command.dashboard_menu_plugin.what_to_do.open_modal.choose_component.other.component_id_invalid\": \"Modal id has to be in the format of a uuid\",\n \"generate_command.dashboard_menu_plugin.choose_folder\": \"Menu Plugin folder (relative to src/dashboard/menu-plugins)\",\n \"generate_command.dashboard_menu_plugin.folder_placeholder\": \"my-plugin\",\n \"generate_command.dashboard_menu_plugin.choose_title\": \"Menu Plugin title\",\n \"generate_command.dashboard_menu_plugin.title_placeholder\": \"My Plugin\",\n \"generate_command.api.api_placeholder\": \"my-api\",\n \"generate_command.api.choose_api_name\": \"How would you like to name your API?\",\n \"generate_command.api.choose_folder\": \"API folder (relative to src/backend/api):\",\n \"generate_command.api.choose_api_name.error\": \"API name must be unique, can not include special characters or spaces, and must be shorter than 20 characters\",\n \"generate_command.api.choose_method\": \"Choose an API method\",\n \"generate_command.event.choose_folder\": \"Event folder (relative to src/backend/events):\",\n \"generate_command.event.folder_placeholder\": \"my-event\",\n \"generate_command.event.choose_folder.error\": \"Event name must be unique, can not include special characters or spaces, and must be shorter than 20 characters\",\n \"generate_command.service_plugin.choose_type\": \"Which service plugin do you want to create\",\n \"generate_command.service_plugin.choose_name\": \"How would you like to name your service plugin\",\n \"generate_command.service_plugin.name_placeholder\": \"my-service-plugin\",\n \"generate_command.service_plugin.groups.stores\": \"Stores\",\n \"generate_command.service_plugin.ecom_additional_fees\": \"Ecom Additional Fees\",\n \"generate_command.service_plugin.ecom_shipping_rates\": \"Ecom Shipping Rates\",\n \"generate_command.service_plugin.ecom_discount_triggers\": \"Ecom Discount Triggers\",\n \"generate_command.service_plugin.ecom_validations\": \"Ecom Validations\",\n \"generate_command.service_plugin.ecom_payment_settings\": \"Ecom Payment Settings\",\n \"generate_command.service_plugin.ecom_gift_cards_provider\": \"Ecom Gift Cards Provider\",\n \"logs_command.connecting\": \"Connecting to the log server...\",\n \"logs_command.listening_to_logs\": \"Listening to logs from the server.\",\n \"logs_command.prod_env_logs\": \"Prod Environment logs for the version: {version}\"\n}\n"],"mappings":";;AAAA,IAAAA,EAAA,CACE,iDAAkD,+CAClD,oDAAqD,gCACrD,6CAA8C,2EAC9C,yCAA0C,qGAC1C,+BAAgC,kCAChC,sCAAuC,qGACvC,0CAA2C,2EAC3C,0CAA2C,gCAC3C,kBAAmB,aACnB,gCAAiC,yDACjC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nD,uDAAwD,YACxD,iDAAkD,eAClD,sDAAuD,YACvD,gCAAiC,mEACjC,4CAA6C,iGAC7C,wDAAyD,iCACzD,oEAAqE,oIACrE,yEAA0E,mBAC1E,oDAAqD,2DACrD,qEAAsE,qBACtE,+DAAgE,eAChE,iFAAkF,gDAClF,sFAAuF,oGACvF,uFAAwF,kCACxF,sGAAuG,qCACvG,uGAAwG,4CACxG,gFAAiF,4BACjF,qFAAsF,sGACtF,sFAAuF,mCACvF,0GAA2G,sCAC3G,2GAA4G,6CAC5G,uDAAwD,8DACxD,4DAA6D,YAC7D,sDAAuD,oBACvD,2DAA4D,YAC5D,uCAAwC,SACxC,uCAAwC,uCACxC,qCAAsC,4CACtC,6CAA8C,gHAC9C,qCAAsC,uBACtC,uCAAwC,iDACxC,4CAA6C,WAC7C,6CAA8C,kHAC9C,8CAA+C,6CAC/C,8CAA+C,iDAC/C,mDAAoD,oBACpD,gDAAiD,SACjD,uDAAwD,uBACxD,sDAAuD,sBACvD,yDAA0D,yBAC1D,mDAAoD,mBACpD,wDAAyD,wBACzD,2DAA4D,2BAC5D,0BAA2B,kCAC3B,iCAAkC,qCAClC,6BAA8B,kDAChC","names":["messages_default"]}
@@ -1,2 +0,0 @@
1
- import{a as N,c as B,f as b}from"./chunk-SBZEOPXX.js";var K={};B(K,{EventDefinition:()=>T,SERVICE_PLUGIN_ERROR_TYPE:()=>C,ServicePluginDefinition:()=>G});function T(e,r=!1,o=s=>s){return()=>({__type:"event-definition",type:e,isDomainEvent:r,transformations:o})}function G(e,r){return{__type:"service-plugin-definition",componentType:e,methods:r}}var C,M=N(()=>{"use strict";C="wix_spi_error"});M();import{wixContext as O}from"@wix/sdk-context";var F=e=>{switch(e){case"get":case"GET":return"GET";case"post":case"POST":return"POST";case"put":case"PUT":return"PUT";case"delete":case"DELETE":return"DELETE";case"patch":case"PATCH":return"PATCH";case"head":case"HEAD":return"HEAD";case"options":case"OPTIONS":return"OPTIONS";default:throw new Error(`Unknown method: ${e}`)}},W=e=>r=>async o=>{let s,t=n=>{if(s=e(o)(n),s.url===void 0)throw new Error("Url was not successfully created for this request, please reach out to support channels for assistance.");let{method:a,url:l,params:c}=s;return{...s,method:F(a),url:l,data:s.data,params:c}};try{let n=await r.request(t);if(s===void 0)throw new Error("Request options were not created for this request, please reach out to support channels for assistance.");let a=Array.isArray(s.transformResponse)?s.transformResponse:[s.transformResponse],l=n.data;return a.forEach(c=>{c&&(l=c(n.data,n.headers))}),l}catch(n){throw typeof n=="object"&&n!==null&&"response"in n&&typeof n.response=="object"&&n.response!==null&&"data"in n.response?n.response.data:n}},A=e=>e.__isAmbassador?!0:!!e().__isAmbassador;var H="__metadata",y="www.wixapis.com";var v=class extends Error{constructor(o,s){super(o);b(this,"message");b(this,"response");this.message=o,this.response=s}async details(){let o=await this.response.json();return V(this.response.status,o?.message,o?.details,{requestId:this.response.headers.get("X-Wix-Request-Id"),details:o})}},V=(e,r,o,s)=>({details:{...!o?.validationError&&{applicationError:{description:r,code:e,data:s}},...o},message:r});var S=e=>e?.method&&["post","put","patch"].includes(e.method.toLocaleLowerCase())&&e.body?{"Content-Type":"application/json"}:{},P=e=>e&&typeof e=="object"&&!Array.isArray(e);var $=e=>e.__type==="host";function R(e,r){return e.create(r)}var Y="x-wix-bi-gateway";function U(e,r,o){return{[Y]:X({environment:`js-sdk${o?`-${o}`:""}`,"package-name":e.packageName??r?.PACKAGE_NAME,"method-fqn":e.methodFqn,entity:e.entityFqdn})}}function X(e){return Object.entries(e).filter(([r,o])=>!!o).map(([r,o])=>`${r}=${o}`).join(",")}import{wixContext as m}from"@wix/sdk-context";function ae(e,r){return{...e,...Object.fromEntries(r.map(o=>[o,(...s)=>{let t=j();if(!t)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return t.initWixModules(e)[o].apply(void 0,s)}]))}}function j(){let e=typeof $wixContext<"u"&&$wixContext.initWixModules?$wixContext.initWixModules:typeof globalThis.__wix_context__<"u"&&globalThis.__wix_context__.initWixModules?globalThis.__wix_context__.initWixModules:void 0;if(e)return{initWixModules(s,t){return _(()=>e(s,t))},fetchWithAuth(){throw new Error("fetchWithAuth is not available in this context")},graphql(){throw new Error("graphql is not available in this context")}};let r=typeof $wixContext<"u"?$wixContext.client:typeof m.client<"u"?m.client:typeof globalThis.__wix_context__<"u"?globalThis.__wix_context__.client:void 0,o=typeof $wixContext<"u"?$wixContext.elevatedClient:typeof m.elevatedClient<"u"?m.elevatedClient:typeof globalThis.__wix_context__<"u"?globalThis.__wix_context__.elevatedClient:void 0;if(!(!r&&!o))return{initWixModules(s,t){if(t){if(!o)throw new Error("An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules");return _(()=>o.use(s))}if(!r)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return _(()=>r.use(s))},fetchWithAuth:(s,t)=>{if(!r)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return r.fetchWithAuth(s,t)},async graphql(s,t,n){if(!r)throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");return r.graphql(s,t,n)}}}function _(e){let r=globalThis.__wix_context__,o={client:m.client,elevatedClient:m.elevatedClient},s;globalThis.__wix_context__=void 0,m.client=void 0,m.elevatedClient=void 0,typeof $wixContext<"u"&&(s={client:$wixContext?.client,elevatedClient:$wixContext?.elevatedClient},delete $wixContext.client,delete $wixContext.elevatedClient);try{return e()}finally{globalThis.__wix_context__=r,m.client=o.client,m.elevatedClient=o.elevatedClient,typeof $wixContext<"u"&&($wixContext.client=s.client,$wixContext.elevatedClient=s.elevatedClient)}}function I(e,r,o,s,t,n,a){return _(()=>e({request:async l=>{let c=l({host:n?.HTTPHost||y}),u=c;u.method==="GET"&&u.fallback?.length&&u.params.toString().length>4e3&&(u=c.fallback[0]);let x=`https://${n?.HTTPHost??y}${u.url}`;u.params&&u.params.toString()&&(x+=`?${u.params.toString()}`);try{let i=U(c,r,a),d=await o(x,{method:u.method,...u.data&&{body:JSON.stringify(u.data)},headers:{...i}});if(d.status!==200){let p=null;try{p=await d.json()}catch{}throw Q(d.status,p?.message,p?.details,{requestId:d.headers.get("X-Wix-Request-Id"),details:p})}return{data:await d.json(),headers:d.headers,status:d.status,statusText:d.statusText}}catch(i){throw i.message?.includes("fetch is not defined")&&console.error("Node.js v18+ is required"),i}},fetchWithAuth:o,wixAPIFetch:s,getActiveToken:t}))}var Q=(e,r,o,s)=>({response:{data:{details:{...!o?.validationError&&{applicationError:{description:r,code:e,data:s}},...o},message:r},status:e}});M();function g(){return{emit(e,...r){for(let o=0,s=this.events[e]||[],t=s.length;o<t;o++)s[o](...r)},events:{},on(e,r){return(this.events[e]||=[]).push(r),()=>{this.events[e]=this.events[e]?.filter(o=>r!==o)}}}}var D=e=>e.__type==="event-definition";function k(e,r,o,s){let t;if(e.isDomainEvent){let a=o,{deletedEvent:l,actionEvent:c,createdEvent:u,updatedEvent:f,...x}=a,i={...s,...x};l?l?.deletedEntity?t={entity:l?.deletedEntity,metadata:i}:t={metadata:i}:c?t={data:c.body,metadata:i}:t={entity:u?.entity??f?.currentEntity,metadata:i}}else t={data:o,metadata:s};let n=e.transformations??(a=>a);return r(n(t))}function q(e){let r=new Map,o=g(),s={...o,getRegisteredEvents:()=>r,async process(t,n={expectedEvents:[]}){let{eventType:a,identity:l,instanceId:c,payload:u}=await this.parseJWT(t),f=[...n.expectedEvents,...Array.from(r.keys()).map(i=>({type:i}))];if(f.length>0&&!f.some(({type:i})=>i===a))throw new Error(`Unexpected event type: ${a}. Expected one of: ${f.map(i=>i.type).join(", ")}`);let x=r.get(a)??[];return await Promise.all(x.map(({eventDefinition:i,handler:d})=>k(i,d,u,{instanceId:c,identity:l}))),{instanceId:c,eventType:a,payload:u,identity:l}},async processRequest(t,n){let a=await t.text();return this.process(a,n)},async parseJWT(t){if(!e.decodeJWT)throw new Error("decodeJWT is not supported by the authentication strategy");let{decoded:n,valid:a}=await e.decodeJWT(t);if(!a)throw new Error("JWT is not valid");if(typeof n.data!="string")throw new Error(`Unexpected type of JWT data: expected string, got ${typeof n.data}`);let l=JSON.parse(n.data),c=l.eventType,u=l.instanceId,f=l.identity?JSON.parse(l.identity):void 0,x=JSON.parse(l.data);return{instanceId:u,eventType:c,payload:x,identity:f}},async parseRequest(t){let n=await t.text();return this.parseJWT(n)},async executeHandlers(t){let n=Array.from(r.keys()).map(l=>({type:l}));if(n.length>0&&!n.some(({type:l})=>l===t.eventType))throw new Error(`Unexpected event type: ${t.eventType}. Expected one of: ${n.map(l=>l.type).join(", ")}`);let a=r.get(t.eventType)??[];await Promise.all(a.map(({eventDefinition:l,handler:c})=>k(l,c,t.payload,{instanceId:t.instanceId,identity:t.identity})))},apps:{AppInstalled:T("AppInstalled")(),AppRemoved:T("AppRemoved")()}};return{initModule(t){return n=>{let a=r.get(t.type)??[];a.push({eventDefinition:t,handler:n}),r.set(t.type,a),o.emit("registered",t)}},client:s}}var L=e=>e.__type==="service-plugin-definition";function J(e){let r=new Map,o=g(),s={...o,getRegisteredServicePlugins:()=>r,async parseJWT(t){if(!e.decodeJWT)throw new Error("decodeJWT is not supported by the authentication strategy");let{decoded:n,valid:a}=await e.decodeJWT(t,!0);if(!a)throw new Error("JWT is not valid");if(typeof n.data!="object"||n.data===null||!("metadata"in n.data)||typeof n.data.metadata!="object"||n.data.metadata===null||!("appExtensionType"in n.data.metadata)||typeof n.data.metadata.appExtensionType!="string")throw new Error("Unexpected JWT data: expected object with metadata.appExtensionType string");return n.data},async process(t){let n=await this.parseJWT(t.body);return this.executeHandler(n,t.url)},async parseRequest(t){let n=await t.text();return this.parseJWT(n)},async processRequest(t){let n=t.url,a=await t.text(),l=await this.process({url:n,body:a});return Response.json(l)},async executeHandler(t,n){let a=t.metadata.appExtensionType.toLowerCase(),l=r.get(a)??[];if(l.length===0)throw new Error(`No service plugin implementations found for component type ${a}`);if(l.length>1)throw new Error(`Multiple service plugin implementations found for component type ${a}. This is currently not supported`);let{implementation:c,servicePluginDefinition:u}=l[0],f=u.methods.find(i=>n.endsWith(i.primaryHttpMappingPath));if(!f)throw new Error("Unexpect request: request url did not match any method: "+n);let x=c[f.name];if(!x)throw new Error(`Got request for service plugin method ${f.name} but no implementation was provided. Available methods: ${Object.keys(c).join(", ")}`);return f.transformations.toREST(await x(f.transformations.fromREST(t)))}};return{initModule(t){return n=>{let a=r.get(t.componentType.toLowerCase())??[];a.push({servicePluginDefinition:t,implementation:n}),r.set(t.componentType.toLowerCase(),a),o.emit("registered",t)}},client:s}}function Re(e){let r=e.headers||{Authorization:""},o=e.auth||{getAuthHeaders:i=>Promise.resolve({headers:{}})},s=o.getAuthHeaders.bind(void 0,e.host);o.getAuthHeaders=s;let{client:t,initModule:n}=J(o),{client:a,initModule:l}=q(o),c=async(i,d)=>{let h=await s(),p=S(d);return fetch(i,{...d,headers:{...p,...r,...h?.headers,...d?.headers,...e.host?.essentials?.passThroughHeaders}})},u=(i,d)=>{if(D(i))return l(i);if(L(i))return n(i);if($(i)&&e.host)return R(i,e.host);if(typeof i=="function"){if("__type"in i&&i.__type===C)return i;let h=e.host?.apiBaseUrl??y;return I(_(()=>A(i))?W(i):i,d??{},c,(p,w)=>{let E=new URL(p,`https://${h}`);return E.host=h,E.protocol="https",c(E.toString(),w)},o.getActiveToken,{HTTPHost:h},e.host?.name)}else return P(i)?Object.fromEntries(Object.entries(i).map(([h,p])=>[h,u(p,i[H])])):i},f=i=>{for(let d in i)r[d]=i[d]};return{...e.modules?u(e.modules):{},auth:o,setHeaders:f,use:u,enableContext(i,d={elevated:!1}){i==="global"?globalThis.__wix_context__!=null?d.elevated?globalThis.__wix_context__.elevatedClient=this:globalThis.__wix_context__.client=this:d.elevated?globalThis.__wix_context__={elevatedClient:this}:globalThis.__wix_context__={client:this}:d.elevated?O.elevatedClient=this:O.client=this},fetch:(i,d)=>{let h=e.host?.apiBaseUrl??y,p=new URL(i,`https://${h}`);return p.host=h,p.protocol="https",c(p.toString(),d)},fetchWithAuth:async(i,d)=>{if(typeof i=="string"||i instanceof URL)return fetch(i,{...d,headers:{...d?.headers,...(await s()).headers}});for(let[h,p]of Object.entries((await s()).headers))i.headers.set(h,p);return fetch(i,d)},async graphql(i,d,h={apiVersion:"alpha"}){let p=e?.host?.apiBaseUrl??y,w=await c(`https://${p}/graphql/${h.apiVersion}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:i,variables:d})});if(w.status!==200)throw new v(`GraphQL request failed with status ${w.status}`,w);let{data:E,errors:z}=await w.json();return{data:E??{},errors:z}},webhooks:a,servicePlugins:t}}export{K as a,M as b,ae as c,Re as d};
2
- //# sourceMappingURL=chunk-3TJ2D6DS.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../node_modules/@wix/sdk-types/build/browser/index.mjs","../../../node_modules/@wix/sdk/build/wixClient.js","../../../node_modules/@wix/sdk/build/ambassador-modules.js","../../../node_modules/@wix/sdk/build/common.js","../../../node_modules/@wix/sdk/build/fetch-error.js","../../../node_modules/@wix/sdk/build/helpers.js","../../../node_modules/@wix/sdk/build/host-modules.js","../../../node_modules/@wix/sdk/build/bi/biHeaderGenerator.js","../../../node_modules/@wix/sdk-runtime/build/context.js","../../../node_modules/@wix/sdk-runtime/build/context-v2.js","../../../node_modules/@wix/sdk/build/rest-modules.js","../../../node_modules/@wix/sdk/build/event-handlers-modules.js","../../../node_modules/@wix/sdk/build/nanoevents.js","../../../node_modules/@wix/sdk/build/service-plugin-modules.js"],"sourcesContent":["// src/event-handlers-modules.ts\nfunction EventDefinition(type, isDomainEvent = false, transformations = (x) => x) {\n return () => ({\n __type: \"event-definition\",\n type,\n isDomainEvent,\n transformations\n });\n}\n\n// src/service-plugins.ts\nfunction ServicePluginDefinition(componentType, methods) {\n return {\n __type: \"service-plugin-definition\",\n componentType,\n methods\n };\n}\nvar SERVICE_PLUGIN_ERROR_TYPE = \"wix_spi_error\";\nexport {\n EventDefinition,\n SERVICE_PLUGIN_ERROR_TYPE,\n ServicePluginDefinition\n};\n","import { wixContext } from '@wix/sdk-context';\nimport { SERVICE_PLUGIN_ERROR_TYPE, } from '@wix/sdk-types';\nimport { isAmbassadorModule, toHTTPModule } from './ambassador-modules.js';\nimport { DEFAULT_API_URL, PUBLIC_METADATA_KEY } from './common.js';\nimport { FetchErrorResponse } from './fetch-error.js';\nimport { getDefaultContentHeader, isObject } from './helpers.js';\nimport { buildHostModule, isHostModule } from './host-modules.js';\nimport { buildRESTDescriptor } from './rest-modules.js';\nimport { eventHandlersModules, isEventHandlerModule, } from './event-handlers-modules.js';\nimport { isServicePluginModule, servicePluginsModules, } from './service-plugin-modules.js';\nimport { runWithoutContext } from '@wix/sdk-runtime/context';\nexport function createClient(config) {\n const _headers = config.headers || { Authorization: '' };\n const authStrategy = config.auth ||\n {\n getAuthHeaders: (_) => Promise.resolve({ headers: {} }),\n };\n const boundGetAuthHeaders = authStrategy.getAuthHeaders.bind(undefined, config.host);\n authStrategy.getAuthHeaders = boundGetAuthHeaders;\n const { client: servicePluginsClient, initModule: initServicePluginModule } = servicePluginsModules(authStrategy);\n const { client: eventHandlersClient, initModule: initEventHandlerModule } = eventHandlersModules(authStrategy);\n const boundFetch = async (url, options) => {\n const authHeaders = await boundGetAuthHeaders();\n const defaultContentTypeHeader = getDefaultContentHeader(options);\n return fetch(url, {\n ...options,\n headers: {\n ...defaultContentTypeHeader,\n ..._headers,\n ...authHeaders?.headers,\n ...options?.headers,\n ...config.host?.essentials?.passThroughHeaders,\n },\n });\n };\n // This is typed as `any` because when trying to properly type it as defined\n // on the WixClient, typescript starts failing with `Type instantiation is\n // excessively deep and possibly infinite.`\n const use = (modules, metadata) => {\n if (isEventHandlerModule(modules)) {\n return initEventHandlerModule(modules);\n }\n else if (isServicePluginModule(modules)) {\n return initServicePluginModule(modules);\n }\n else if (isHostModule(modules) && config.host) {\n return buildHostModule(modules, config.host);\n }\n else if (typeof modules === 'function') {\n // The generated namespaces all have the error classes on them and\n // a class is also a function, so we need to explicitly ignore these\n // error classes using a static field that exists on them.\n if ('__type' in modules && modules.__type === SERVICE_PLUGIN_ERROR_TYPE) {\n return modules;\n }\n const apiBaseUrl = config.host?.apiBaseUrl ?? DEFAULT_API_URL;\n return buildRESTDescriptor(runWithoutContext(() => isAmbassadorModule(modules))\n ? toHTTPModule(modules)\n : modules, metadata ?? {}, boundFetch, (relativeUrl, fetchOptions) => {\n const finalUrl = new URL(relativeUrl, `https://${apiBaseUrl}`);\n finalUrl.host = apiBaseUrl;\n finalUrl.protocol = 'https';\n return boundFetch(finalUrl.toString(), fetchOptions);\n }, authStrategy.getActiveToken, { HTTPHost: apiBaseUrl }, config.host?.name);\n }\n else if (isObject(modules)) {\n return Object.fromEntries(Object.entries(modules).map(([key, value]) => {\n return [key, use(value, modules[PUBLIC_METADATA_KEY])];\n }));\n }\n else {\n return modules;\n }\n };\n const setHeaders = (headers) => {\n for (const k in headers) {\n _headers[k] = headers[k];\n }\n };\n const wrappedModules = config.modules\n ? use(config.modules)\n : {};\n return {\n ...wrappedModules,\n auth: authStrategy,\n setHeaders,\n use,\n enableContext(contextType, opts = { elevated: false }) {\n if (contextType === 'global') {\n if (globalThis.__wix_context__ != null) {\n if (opts.elevated) {\n globalThis.__wix_context__.elevatedClient = this;\n }\n else {\n globalThis.__wix_context__.client = this;\n }\n }\n else {\n if (opts.elevated) {\n globalThis.__wix_context__ = { elevatedClient: this };\n }\n else {\n globalThis.__wix_context__ = { client: this };\n }\n }\n }\n else {\n if (opts.elevated) {\n wixContext.elevatedClient = this;\n }\n else {\n wixContext.client = this;\n }\n }\n },\n /**\n * @param relativeUrl The URL to fetch relative to the API base URL\n * @param options The fetch options\n * @returns The fetch Response object\n * @deprecated Use `fetchWithAuth` instead\n */\n fetch: (relativeUrl, options) => {\n const apiBaseUrl = config.host?.apiBaseUrl ?? DEFAULT_API_URL;\n const finalUrl = new URL(relativeUrl, `https://${apiBaseUrl}`);\n finalUrl.host = apiBaseUrl;\n finalUrl.protocol = 'https';\n return boundFetch(finalUrl.toString(), options);\n },\n fetchWithAuth: async (urlOrRequest, requestInit) => {\n if (typeof urlOrRequest === 'string' || urlOrRequest instanceof URL) {\n return fetch(urlOrRequest, {\n ...requestInit,\n headers: {\n ...requestInit?.headers,\n ...(await boundGetAuthHeaders()).headers,\n },\n });\n }\n else {\n for (const [k, v] of Object.entries((await boundGetAuthHeaders()).headers)) {\n urlOrRequest.headers.set(k, v);\n }\n return fetch(urlOrRequest, requestInit);\n }\n },\n async graphql(query, variables, opts = {\n apiVersion: 'alpha',\n }) {\n const apiBaseUrl = config?.host?.apiBaseUrl ?? DEFAULT_API_URL;\n const res = await boundFetch(`https://${apiBaseUrl}/graphql/${opts.apiVersion}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ query, variables }),\n });\n if (res.status !== 200) {\n throw new FetchErrorResponse(`GraphQL request failed with status ${res.status}`, res);\n }\n const { data, errors } = await res.json();\n return { data: data ?? {}, errors };\n },\n webhooks: eventHandlersClient,\n servicePlugins: servicePluginsClient,\n };\n}\n","const parseMethod = (method) => {\n switch (method) {\n case 'get':\n case 'GET':\n return 'GET';\n case 'post':\n case 'POST':\n return 'POST';\n case 'put':\n case 'PUT':\n return 'PUT';\n case 'delete':\n case 'DELETE':\n return 'DELETE';\n case 'patch':\n case 'PATCH':\n return 'PATCH';\n case 'head':\n case 'HEAD':\n return 'HEAD';\n case 'options':\n case 'OPTIONS':\n return 'OPTIONS';\n default:\n throw new Error(`Unknown method: ${method}`);\n }\n};\nexport const toHTTPModule = (factory) => (httpClient) => async (payload) => {\n let requestOptions;\n const HTTPFactory = (context) => {\n requestOptions = factory(payload)(context);\n if (requestOptions.url === undefined) {\n throw new Error('Url was not successfully created for this request, please reach out to support channels for assistance.');\n }\n const { method, url, params } = requestOptions;\n return {\n ...requestOptions,\n method: parseMethod(method),\n url,\n data: requestOptions.data,\n params,\n };\n };\n try {\n const response = await httpClient.request(HTTPFactory);\n if (requestOptions === undefined) {\n throw new Error('Request options were not created for this request, please reach out to support channels for assistance.');\n }\n const transformations = Array.isArray(requestOptions.transformResponse)\n ? requestOptions.transformResponse\n : [requestOptions.transformResponse];\n /**\n * Based on Axios implementation:\n * https://github.com/axios/axios/blob/3f53eb6960f05a1f88409c4b731a40de595cb825/lib/core/transformData.js#L22\n */\n let data = response.data;\n transformations.forEach((transform) => {\n if (transform) {\n data = transform(response.data, response.headers);\n }\n });\n return data;\n }\n catch (e) {\n if (typeof e === 'object' &&\n e !== null &&\n 'response' in e &&\n typeof e.response === 'object' &&\n e.response !== null &&\n 'data' in e.response) {\n throw e.response.data;\n }\n throw e;\n }\n};\n/*\n * Because of issues with tree-shaking, we cant really put static parameter on module.\n * We still have check for __isAmbassador for backward compatibility\n */\nexport const isAmbassadorModule = (module) => {\n if (module.__isAmbassador) {\n return true;\n }\n const fn = module();\n return Boolean(fn.__isAmbassador);\n};\n","export const PUBLIC_METADATA_KEY = '__metadata';\nexport const DEFAULT_API_URL = 'www.wixapis.com';\nexport const FORCE_WRITE_API_URLS = ['/ecom/v1/carts/current'];\n","export class FetchErrorResponse extends Error {\n message;\n response;\n constructor(message, response) {\n super(message);\n this.message = message;\n this.response = response;\n }\n async details() {\n const dataError = await this.response.json();\n return errorBuilder(this.response.status, dataError?.message, dataError?.details, {\n requestId: this.response.headers.get('X-Wix-Request-Id'),\n details: dataError,\n });\n }\n}\nconst errorBuilder = (code, description, details, data) => {\n return {\n details: {\n ...(!details?.validationError && {\n applicationError: {\n description,\n code,\n data,\n },\n }),\n ...details,\n },\n message: description,\n };\n};\n","// we follow a simplified version of the axios convention\n// https://github.com/axios/axios/blob/649d739288c8e2c55829ac60e2345a0f3439c730/lib/defaults/index.js#L65\nexport const getDefaultContentHeader = (options) => {\n if (options?.method &&\n ['post', 'put', 'patch'].includes(options.method.toLocaleLowerCase()) &&\n options.body) {\n return { 'Content-Type': 'application/json' };\n }\n return {};\n};\nexport const isObject = (val) => val && typeof val === 'object' && !Array.isArray(val);\nexport function parsePublicKeyIfEncoded(publicKey) {\n if (publicKey.includes('\\n') || publicKey.includes('\\r')) {\n // publicKey is multi-line string, can be used as is\n return publicKey.trim();\n }\n else {\n // publicKey is base64 encoded\n return typeof atob !== 'undefined'\n ? atob(publicKey)\n : Buffer.from(publicKey, 'base64').toString('utf-8');\n }\n}\n","export const isHostModule = (val) => val.__type === 'host';\nexport function buildHostModule(val, host) {\n return val.create(host);\n}\n","export const WixBIHeaderName = 'x-wix-bi-gateway';\nexport function biHeaderGenerator(apiMetadata, publicMetadata, environment) {\n return {\n [WixBIHeaderName]: objectToKeyValue({\n environment: `js-sdk${environment ? `-${environment}` : ``}`,\n 'package-name': apiMetadata.packageName ?? publicMetadata?.PACKAGE_NAME,\n 'method-fqn': apiMetadata.methodFqn,\n entity: apiMetadata.entityFqdn,\n }),\n };\n}\nfunction objectToKeyValue(input) {\n return Object.entries(input)\n .filter(([_, value]) => Boolean(value))\n .map(([key, value]) => `${key}=${value}`)\n .join(',');\n}\n","import { wixContext } from '@wix/sdk-context';\nexport function resolveContext() {\n const oldContext = typeof $wixContext !== 'undefined' && $wixContext.initWixModules\n ? $wixContext.initWixModules\n : typeof globalThis.__wix_context__ !== 'undefined' &&\n globalThis.__wix_context__.initWixModules\n ? globalThis.__wix_context__.initWixModules\n : undefined;\n if (oldContext) {\n return {\n // @ts-expect-error\n initWixModules(modules, elevated) {\n return runWithoutContext(() => oldContext(modules, elevated));\n },\n fetchWithAuth() {\n throw new Error('fetchWithAuth is not available in this context');\n },\n graphql() {\n throw new Error('graphql is not available in this context');\n },\n };\n }\n const contextualClient = typeof $wixContext !== 'undefined'\n ? $wixContext.client\n : typeof wixContext.client !== 'undefined'\n ? wixContext.client\n : typeof globalThis.__wix_context__ !== 'undefined'\n ? globalThis.__wix_context__.client\n : undefined;\n const elevatedClient = typeof $wixContext !== 'undefined'\n ? $wixContext.elevatedClient\n : typeof wixContext.elevatedClient !== 'undefined'\n ? wixContext.elevatedClient\n : typeof globalThis.__wix_context__ !== 'undefined'\n ? globalThis.__wix_context__.elevatedClient\n : undefined;\n if (!contextualClient && !elevatedClient) {\n return;\n }\n return {\n initWixModules(wixModules, elevated) {\n if (elevated) {\n if (!elevatedClient) {\n throw new Error('An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules');\n }\n return runWithoutContext(() => elevatedClient.use(wixModules));\n }\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return runWithoutContext(() => contextualClient.use(wixModules));\n },\n fetchWithAuth: (urlOrRequest, requestInit) => {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.fetchWithAuth(urlOrRequest, requestInit);\n },\n async graphql(query, variables, opts) {\n if (!contextualClient) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return contextualClient.graphql(query, variables, opts);\n },\n };\n}\nexport function contextualizeHostModule(hostModule, prop) {\n return (...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(hostModule)[prop].apply(undefined, args);\n };\n}\nexport function contextualizeRESTModule(restModule, expectedArgsLength) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context\n .initWixModules(restModule, args[expectedArgsLength]?.suppressAuth ? true : false)\n .apply(undefined, args);\n });\n}\nexport function contextualizeEventDefinitionModule(eventDefinition) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(eventDefinition).apply(undefined, args);\n });\n}\nexport function contextualizeSerivcePluginModule(servicePlugin) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context.initWixModules(servicePlugin).apply(undefined, args);\n });\n}\nexport * from './context-v2.js';\nexport function runWithoutContext(fn) {\n const globalContext = globalThis.__wix_context__;\n const moduleContext = {\n client: wixContext.client,\n elevatedClient: wixContext.elevatedClient,\n };\n let closureContext;\n globalThis.__wix_context__ = undefined;\n wixContext.client = undefined;\n wixContext.elevatedClient = undefined;\n if (typeof $wixContext !== 'undefined') {\n closureContext = {\n client: $wixContext?.client,\n elevatedClient: $wixContext?.elevatedClient,\n };\n delete $wixContext.client;\n delete $wixContext.elevatedClient;\n }\n try {\n return fn();\n }\n finally {\n globalThis.__wix_context__ = globalContext;\n wixContext.client = moduleContext.client;\n wixContext.elevatedClient = moduleContext.elevatedClient;\n if (typeof $wixContext !== 'undefined') {\n $wixContext.client = closureContext.client;\n $wixContext.elevatedClient = closureContext.elevatedClient;\n }\n }\n}\n","import { EventDefinition, ServicePluginDefinition, } from '@wix/sdk-types';\nimport { resolveContext } from './context.js';\nexport { EventDefinition, ServicePluginDefinition, };\nexport function contextualizeHostModuleV2(hostModule, props) {\n return {\n ...hostModule,\n ...Object.fromEntries(props.map((prop) => [\n prop,\n (...args) => {\n const context = resolveContext();\n if (!context) {\n throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');\n }\n return context\n .initWixModules(hostModule)[prop].apply(undefined, args);\n },\n ])),\n };\n}\nexport function contextualizeRESTModuleV2(restModule, elevated) {\n return ((...args) => {\n const context = resolveContext();\n if (!context) {\n // @ts-expect-error - if there is no context, we want to behave like the original module\n return restModule.apply(undefined, args);\n }\n return (context\n .initWixModules(restModule, elevated)\n // @ts-expect-error - we know the args here are meant to be passed to the initalized module\n .apply(undefined, args));\n });\n}\nexport function contextualizeEventDefinitionModuleV2(eventDefinition) {\n const contextualMethod = ((...args) => {\n const context = resolveContext();\n if (!context) {\n // this line should throw, but this would be a breaking change for older SDK versions\n // this is because in wixClient there's code that calls any function it detects and checks\n // if it's an ambassador module (see isAmbassadorModule)\n return () => { };\n }\n return context.initWixModules(eventDefinition).apply(undefined, args);\n });\n contextualMethod.__type = eventDefinition.__type;\n contextualMethod.type = eventDefinition.type;\n contextualMethod.isDomainEvent = eventDefinition.isDomainEvent;\n contextualMethod.transformations = eventDefinition.transformations;\n return contextualMethod;\n}\nexport function contextualizeSerivcePluginModuleV2(servicePlugin) {\n const contextualMethod = ((...args) => {\n const context = resolveContext();\n if (!context) {\n // this line should throw, but this would be a breaking change for older SDK versions\n // this is because in wixClient there's code that calls any function it detects and checks\n // if it's an ambassador module (see isAmbassadorModule)\n return () => { };\n }\n return context.initWixModules(servicePlugin).apply(undefined, args);\n });\n contextualMethod.__type = servicePlugin.__type;\n contextualMethod.componentType = servicePlugin.componentType;\n contextualMethod.methods = servicePlugin.methods;\n return contextualMethod;\n}\n","import { biHeaderGenerator } from './bi/biHeaderGenerator.js';\nimport { DEFAULT_API_URL } from './common.js';\nimport { runWithoutContext } from '@wix/sdk-runtime/context';\nexport function buildRESTDescriptor(origFunc, publicMetadata, boundFetch, wixAPIFetch, getActiveToken, options, hostName) {\n return runWithoutContext(() => origFunc({\n request: async (factory) => {\n const requestOptions = factory({\n host: options?.HTTPHost || DEFAULT_API_URL,\n });\n let request = requestOptions;\n if (request.method === 'GET' &&\n request.fallback?.length &&\n request.params.toString().length > 4000) {\n request = requestOptions.fallback[0];\n }\n const domain = options?.HTTPHost ?? DEFAULT_API_URL;\n let url = `https://${domain}${request.url}`;\n if (request.params && request.params.toString()) {\n url += `?${request.params.toString()}`;\n }\n try {\n const biHeader = biHeaderGenerator(requestOptions, publicMetadata, hostName);\n const res = await boundFetch(url, {\n method: request.method,\n ...(request.data && {\n body: JSON.stringify(request.data),\n }),\n headers: {\n ...biHeader,\n },\n });\n if (res.status !== 200) {\n let dataError = null;\n try {\n dataError = await res.json();\n }\n catch (e) {\n //\n }\n throw errorBuilder(res.status, dataError?.message, dataError?.details, {\n requestId: res.headers.get('X-Wix-Request-Id'),\n details: dataError,\n });\n }\n const data = await res.json();\n return {\n data,\n headers: res.headers,\n status: res.status,\n statusText: res.statusText,\n };\n }\n catch (e) {\n if (e.message?.includes('fetch is not defined')) {\n console.error('Node.js v18+ is required');\n }\n throw e;\n }\n },\n fetchWithAuth: boundFetch,\n wixAPIFetch,\n getActiveToken,\n }));\n}\nconst errorBuilder = (code, description, details, data) => {\n return {\n response: {\n data: {\n details: {\n ...(!details?.validationError && {\n applicationError: {\n description,\n code,\n data,\n },\n }),\n ...details,\n },\n message: description,\n },\n status: code,\n },\n };\n};\n","import { EventDefinition, } from '@wix/sdk-types';\nimport { createNanoEvents } from './nanoevents.js';\nexport const isEventHandlerModule = (val) => val.__type === 'event-definition';\nexport function buildEventDefinition(eventDefinition, registerHandler) {\n return (handler) => {\n registerHandler(eventDefinition, handler);\n };\n}\nfunction runHandler(eventDefinition, handler, payload, baseEventMetadata) {\n let envelope;\n if (eventDefinition.isDomainEvent) {\n const domainEventPayload = payload;\n const { deletedEvent, actionEvent, createdEvent, updatedEvent, ...domainEventMetadata } = domainEventPayload;\n const metadata = {\n ...baseEventMetadata,\n ...domainEventMetadata,\n };\n if (deletedEvent) {\n if (deletedEvent?.deletedEntity) {\n envelope = {\n entity: deletedEvent?.deletedEntity,\n metadata,\n };\n }\n else {\n envelope = { metadata };\n }\n }\n else if (actionEvent) {\n envelope = {\n data: actionEvent.body,\n metadata,\n };\n }\n else {\n envelope = {\n entity: createdEvent?.entity ?? updatedEvent?.currentEntity,\n metadata,\n };\n }\n }\n else {\n envelope = {\n data: payload,\n metadata: baseEventMetadata,\n };\n }\n const transformFromRESTFn = eventDefinition.transformations ?? ((x) => x);\n return handler(transformFromRESTFn(envelope));\n}\nexport function eventHandlersModules(authStrategy) {\n const eventHandlers = new Map();\n const webhooksEmitter = createNanoEvents();\n const client = {\n ...webhooksEmitter,\n getRegisteredEvents: () => eventHandlers,\n async process(jwt, opts = {\n expectedEvents: [],\n }) {\n const { eventType, identity, instanceId, payload } = await this.parseJWT(jwt);\n const allExpectedEvents = [\n ...opts.expectedEvents,\n ...Array.from(eventHandlers.keys()).map((type) => ({ type })),\n ];\n if (allExpectedEvents.length > 0 &&\n !allExpectedEvents.some(({ type }) => type === eventType)) {\n throw new Error(`Unexpected event type: ${eventType}. Expected one of: ${allExpectedEvents\n .map((x) => x.type)\n .join(', ')}`);\n }\n const handlers = eventHandlers.get(eventType) ?? [];\n await Promise.all(handlers.map(({ eventDefinition, handler }) => runHandler(eventDefinition, handler, payload, {\n instanceId,\n identity,\n })));\n return {\n instanceId,\n eventType,\n payload,\n identity,\n };\n },\n async processRequest(request, opts) {\n const body = await request.text();\n return this.process(body, opts);\n },\n async parseJWT(jwt) {\n if (!authStrategy.decodeJWT) {\n throw new Error('decodeJWT is not supported by the authentication strategy');\n }\n const { decoded, valid } = await authStrategy.decodeJWT(jwt);\n if (!valid) {\n throw new Error('JWT is not valid');\n }\n if (typeof decoded.data !== 'string') {\n throw new Error(`Unexpected type of JWT data: expected string, got ${typeof decoded.data}`);\n }\n const parsedDecoded = JSON.parse(decoded.data);\n const eventType = parsedDecoded.eventType;\n const instanceId = parsedDecoded.instanceId;\n const identity = parsedDecoded.identity\n ? JSON.parse(parsedDecoded.identity)\n : undefined;\n const payload = JSON.parse(parsedDecoded.data);\n return {\n instanceId,\n eventType,\n payload,\n identity,\n };\n },\n async parseRequest(request) {\n const jwt = await request.text();\n return this.parseJWT(jwt);\n },\n async executeHandlers(event) {\n const allExpectedEvents = Array.from(eventHandlers.keys()).map((type) => ({ type }));\n if (allExpectedEvents.length > 0 &&\n !allExpectedEvents.some(({ type }) => type === event.eventType)) {\n throw new Error(`Unexpected event type: ${event.eventType}. Expected one of: ${allExpectedEvents\n .map((x) => x.type)\n .join(', ')}`);\n }\n const handlers = eventHandlers.get(event.eventType) ?? [];\n await Promise.all(handlers.map(({ eventDefinition, handler }) => runHandler(eventDefinition, handler, event.payload, {\n instanceId: event.instanceId,\n identity: event.identity,\n })));\n },\n apps: {\n AppInstalled: EventDefinition('AppInstalled')(),\n AppRemoved: EventDefinition('AppRemoved')(),\n },\n };\n return {\n initModule(eventDefinition) {\n return (handler) => {\n const handlers = eventHandlers.get(eventDefinition.type) ?? [];\n handlers.push({ eventDefinition, handler });\n eventHandlers.set(eventDefinition.type, handlers);\n webhooksEmitter.emit('registered', eventDefinition);\n };\n },\n client,\n };\n}\n","// Inlined from https://github.com/ai/nanoevents/blob/main/index.js\n/**\n * Create event emitter.\n *\n * ```js\n * import { createNanoEvents } from 'nanoevents'\n *\n * class Ticker {\n * constructor() {\n * this.emitter = createNanoEvents()\n * }\n * on(...args) {\n * return this.emitter.on(...args)\n * }\n * tick() {\n * this.emitter.emit('tick')\n * }\n * }\n * ```\n * @returns Event emitter.\n */\nexport function createNanoEvents() {\n return {\n emit(event, ...args) {\n for (let i = 0, callbacks = this.events[event] || [], length = callbacks.length; i < length; i++) {\n callbacks[i](...args);\n }\n },\n events: {},\n on(event, cb) {\n (this.events[event] ||= []).push(cb);\n return () => {\n this.events[event] = this.events[event]?.filter((i) => cb !== i);\n };\n },\n };\n}\n","import { createNanoEvents } from './nanoevents.js';\nexport const isServicePluginModule = (val) => val.__type === 'service-plugin-definition';\nexport function servicePluginsModules(authStrategy) {\n const servicePluginsImplementations = new Map();\n const servicePluginsEmitter = createNanoEvents();\n const client = {\n ...servicePluginsEmitter,\n getRegisteredServicePlugins: () => servicePluginsImplementations,\n async parseJWT(jwt) {\n if (!authStrategy.decodeJWT) {\n throw new Error('decodeJWT is not supported by the authentication strategy');\n }\n const { decoded, valid } = await authStrategy.decodeJWT(jwt, true);\n if (!valid) {\n throw new Error('JWT is not valid');\n }\n if (typeof decoded.data !== 'object' ||\n decoded.data === null ||\n !('metadata' in decoded.data) ||\n typeof decoded.data.metadata !== 'object' ||\n decoded.data.metadata === null ||\n !('appExtensionType' in decoded.data.metadata) ||\n typeof decoded.data.metadata.appExtensionType !== 'string') {\n throw new Error('Unexpected JWT data: expected object with metadata.appExtensionType string');\n }\n return decoded.data;\n },\n async process(request) {\n const servicePluginRequest = await this.parseJWT(request.body);\n return this.executeHandler(servicePluginRequest, request.url);\n },\n async parseRequest(request) {\n const body = await request.text();\n return this.parseJWT(body);\n },\n async processRequest(request) {\n const url = request.url;\n const body = await request.text();\n const implMethodResult = await this.process({ url, body });\n return Response.json(implMethodResult);\n },\n async executeHandler(servicePluginRequest, url) {\n const componentType = servicePluginRequest.metadata.appExtensionType.toLowerCase();\n const implementations = servicePluginsImplementations.get(componentType) ?? [];\n if (implementations.length === 0) {\n throw new Error(`No service plugin implementations found for component type ${componentType}`);\n }\n else if (implementations.length > 1) {\n throw new Error(`Multiple service plugin implementations found for component type ${componentType}. This is currently not supported`);\n }\n const { implementation: impl, servicePluginDefinition } = implementations[0];\n const method = servicePluginDefinition.methods.find((m) => url.endsWith(m.primaryHttpMappingPath));\n if (!method) {\n throw new Error('Unexpect request: request url did not match any method: ' + url);\n }\n const implMethod = impl[method.name];\n if (!implMethod) {\n throw new Error(`Got request for service plugin method ${method.name} but no implementation was provided. Available methods: ${Object.keys(impl).join(', ')}`);\n }\n return method.transformations.toREST(await implMethod(method.transformations.fromREST(servicePluginRequest)));\n },\n };\n return {\n initModule(servicePluginDefinition) {\n return (implementation) => {\n const implementations = servicePluginsImplementations.get(servicePluginDefinition.componentType.toLowerCase()) ?? [];\n implementations.push({ servicePluginDefinition, implementation });\n servicePluginsImplementations.set(servicePluginDefinition.componentType.toLowerCase(), implementations);\n servicePluginsEmitter.emit('registered', servicePluginDefinition);\n };\n },\n client,\n };\n}\n"],"mappings":"sDAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,qBAAAE,EAAA,8BAAAC,EAAA,4BAAAC,IACA,SAASF,EAAgBG,EAAMC,EAAgB,GAAOC,EAAmBC,GAAMA,EAAG,CAChF,MAAO,KAAO,CACZ,OAAQ,mBACR,KAAAH,EACA,cAAAC,EACA,gBAAAC,CACF,EACF,CAGA,SAASH,EAAwBK,EAAeC,EAAS,CACvD,MAAO,CACL,OAAQ,4BACR,cAAAD,EACA,QAAAC,CACF,CACF,CAjBA,IAkBIP,EAlBJQ,EAAAC,EAAA,kBAkBIT,EAA4B,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AWN,EAAO,CACnC,WAAY,OAChB,EAAG,CACC,IAAMjB,EAAazB,GAAQ,MAAM,YAAc0B,EACzCuB,EAAM,MAAMtC,EAAW,WAAWc,CAAU,YAAYiB,EAAK,UAAU,GAAI,CAC7E,OAAQ,OACR,QAAS,CACL,eAAgB,kBACpB,EACA,KAAM,KAAK,UAAU,CAAE,MAAAK,EAAO,UAAAC,CAAU,CAAC,CAC7C,CAAC,EACD,GAAIC,EAAI,SAAW,IACf,MAAM,IAAIC,EAAmB,sCAAsCD,EAAI,MAAM,GAAIA,CAAG,EAExF,GAAM,CAAE,KAAAE,EAAM,OAAAC,CAAO,EAAI,MAAMH,EAAI,KAAK,EACxC,MAAO,CAAE,KAAME,GAAQ,CAAC,EAAG,OAAAC,CAAO,CACtC,EACA,SAAU5C,EACV,eAAgBH,CACpB,CACJ","names":["browser_exports","__export","EventDefinition","SERVICE_PLUGIN_ERROR_TYPE","ServicePluginDefinition","type","isDomainEvent","transformations","x","componentType","methods","init_browser","__esmMin","init_browser","wixContext","parseMethod","method","toHTTPModule","factory","httpClient","payload","requestOptions","HTTPFactory","context","url","params","response","transformations","data","transform","e","isAmbassadorModule","module","PUBLIC_METADATA_KEY","DEFAULT_API_URL","FetchErrorResponse","message","response","__publicField","dataError","errorBuilder","code","description","details","data","getDefaultContentHeader","options","isObject","val","isHostModule","val","buildHostModule","host","WixBIHeaderName","biHeaderGenerator","apiMetadata","publicMetadata","environment","objectToKeyValue","input","_","value","key","wixContext","contextualizeHostModuleV2","hostModule","props","prop","args","context","resolveContext","resolveContext","oldContext","modules","elevated","runWithoutContext","contextualClient","wixContext","elevatedClient","wixModules","urlOrRequest","requestInit","query","variables","opts","runWithoutContext","fn","globalContext","moduleContext","wixContext","closureContext","buildRESTDescriptor","origFunc","publicMetadata","boundFetch","wixAPIFetch","getActiveToken","options","hostName","runWithoutContext","factory","requestOptions","DEFAULT_API_URL","request","url","biHeader","biHeaderGenerator","res","dataError","errorBuilder","e","code","description","details","data","init_browser","createNanoEvents","event","args","i","callbacks","length","cb","isEventHandlerModule","val","runHandler","eventDefinition","handler","payload","baseEventMetadata","envelope","domainEventPayload","deletedEvent","actionEvent","createdEvent","updatedEvent","domainEventMetadata","metadata","transformFromRESTFn","x","eventHandlersModules","authStrategy","eventHandlers","webhooksEmitter","createNanoEvents","client","jwt","opts","eventType","identity","instanceId","allExpectedEvents","type","handlers","request","body","decoded","valid","parsedDecoded","event","EventDefinition","isServicePluginModule","val","servicePluginsModules","authStrategy","servicePluginsImplementations","servicePluginsEmitter","createNanoEvents","client","jwt","decoded","valid","request","servicePluginRequest","body","url","implMethodResult","componentType","implementations","impl","servicePluginDefinition","method","m","implMethod","implementation","createClient","config","_headers","authStrategy","_","boundGetAuthHeaders","servicePluginsClient","initServicePluginModule","servicePluginsModules","eventHandlersClient","initEventHandlerModule","eventHandlersModules","boundFetch","url","options","authHeaders","defaultContentTypeHeader","getDefaultContentHeader","use","modules","metadata","isEventHandlerModule","isServicePluginModule","isHostModule","buildHostModule","SERVICE_PLUGIN_ERROR_TYPE","apiBaseUrl","DEFAULT_API_URL","buildRESTDescriptor","runWithoutContext","isAmbassadorModule","toHTTPModule","relativeUrl","fetchOptions","finalUrl","isObject","key","value","PUBLIC_METADATA_KEY","setHeaders","headers","k","contextType","opts","wixContext","urlOrRequest","requestInit","v","query","variables","res","FetchErrorResponse","data","errors"]}
@@ -1,2 +0,0 @@
1
- import{c as t}from"./chunk-3TJ2D6DS.js";function i(e){return t({__type:"host",create:r=>Object.entries(e).reduce((o,[c,n])=>({...o,[c]:n(r)}),{})},Object.keys(e))}export{i as a};
2
- //# sourceMappingURL=chunk-RE2R2PA6.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../node_modules/@wix/sdk-runtime/build/host-modules.js"],"sourcesContent":["import { contextualizeHostModuleV2 } from './context-v2.js';\nexport function createHostModule(hostModuleAPI) {\n return contextualizeHostModuleV2({\n __type: 'host',\n create: (host) => Object.entries(hostModuleAPI).reduce((acc, [key, fn]) => ({\n ...acc,\n [key]: fn(host),\n }), {}),\n }, Object.keys(hostModuleAPI));\n}\n"],"mappings":"wCACO,SAASA,EAAiBC,EAAe,CAC5C,OAAOC,EAA0B,CAC7B,OAAQ,OACR,OAASC,GAAS,OAAO,QAAQF,CAAa,EAAE,OAAO,CAACG,EAAK,CAACC,EAAKC,CAAE,KAAO,CACxE,GAAGF,EACH,CAACC,CAAG,EAAGC,EAAGH,CAAI,CAClB,GAAI,CAAC,CAAC,CACV,EAAG,OAAO,KAAKF,CAAa,CAAC,CACjC","names":["createHostModule","hostModuleAPI","contextualizeHostModuleV2","host","acc","key","fn"]}
@@ -1,4 +0,0 @@
1
- import { createRequire as _createRequire } from 'node:module';
2
- const require = _createRequire(import.meta.url);
3
- import{a as D}from"./chunk-AKOLPD6V.js";import{a as b}from"./chunk-JTFBYI5Z.js";import"./chunk-LUN6J4D4.js";import{a as S,e as I,f as y,t as j,w as x}from"./chunk-AODPLKHZ.js";import"./chunk-U3X4QFEY.js";import"./chunk-WPDKHYDX.js";import"./chunk-VMPGY3XD.js";import"./chunk-AT67JTKR.js";import"./chunk-PZBAQL52.js";import{Aa as n,E as v,bb as P,g as w,oa as h,sb as U}from"./chunk-TT7ANJ37.js";import{c as C,e as s,f as l}from"./chunk-Z6KGERGI.js";import{e as u,h as o}from"./chunk-V4TR6DCM.js";o();o();import{cwd as N}from"node:process";var f=u(C(),1);o();var A=u(C(),1);async function E(e,a,r){let t=new S(a),i=await I({siteId:r,projectFolder:e.projectFolder,siteListClient:t});return(0,A.match)(i,{NotConfigured:()=>{throw new s({code:l.SiteConfiguredRequired()})},NotFound:()=>{throw new s({code:l.SiteConfiguredRequired()})},Resolved:({site:m})=>m})}o();var c=u(C(),1);var M=({model:e,site:a,tag:r})=>{let t=e.components.filter(m=>(0,c.isType)(m,n.DashboardPage)||(0,c.isType)(m,n.DashboardPlugin)||(0,c.isType)(m,n.DashboardMenuPlugin)),i={appId:e.config.appId,site:a,tag:r};return t[0]?x(t[0],i):j(h.Dashboard(),i)};o();function T(e){console.log(e)}async function z(e,a){let r=await U(N()),t=await v();if(!t)throw new s({code:l.AuthenticationRequired()});a.errorReporter.setUser({id:t.userInfo.userId}),b(a.biLogger,t.userInfo.userId);let i=w({type:"backoffice",getAppToken:()=>t.getAccessToken()}),m=await E(r,i,e.siteId),k=r.components.filter(g=>(0,f.isType)(g,n.Api)||(0,f.isType)(g,n.Event)||(0,f.isType)(g,n.ServicePlugin)),{serveUrl:R,backendServerUrl:F}=e.baseUrl?{serveUrl:e.baseUrl,backendServerUrl:void 0}:await P(r.config.appId,r.projectFolder,a.biLogger,i,k.length>0),L=new y(i),q=await D({model:r,arm:L,serveUrl:R,backendServerUrl:F}),H=M({site:m,model:r,tag:q});T(H)}export{z as nonInteractivePreview};
4
- //# sourceMappingURL=preview-CLW3KECJ.js.map
@@ -1,4 +0,0 @@
1
- import { createRequire as _createRequire } from 'node:module';
2
- const require = _createRequire(import.meta.url);
3
- import{a as E}from"./chunk-ZN6WU4UI.js";import{a as y,b as I}from"./chunk-JTFBYI5Z.js";import{a as C}from"./chunk-VMPGY3XD.js";import{B as h,D as w,I as j,sb as p,t as g,tb as x}from"./chunk-TT7ANJ37.js";import{U as v,Z as P,a as l,b as D,e as f,f as u}from"./chunk-Z6KGERGI.js";import{e as b,h as c}from"./chunk-V4TR6DCM.js";c();var n=b(D(),1);import{cwd as F}from"node:process";async function S(e,{biLogger:o,errorReporter:r}){r.setContext("app info",{appId:e.config.appId,projectId:e.config.projectId}),o.updateDefaults({_appId:e.config.appId})}function L(e,o){switch(e){case"dev":case"preview":return{is_mocking_values:o.some(r=>r.type==="EmbeddedScript"&&r.paramsOverride)};default:return}}async function T(e,{biLogger:o,errorReporter:r},i,m){await M(e,{biLogger:o,errorReporter:r},async()=>{let t=await p(F());if(t.components.length===0&&!m?.skipProjectValidation)throw new f({code:u.NoExtensionsFound()});o.updateDefaults({command:e.name()});let a=j(t.projectFolder);await v(n.default.createElement(g,{value:o},n.default.createElement(h,{value:r},n.default.createElement(w,{onLogin:s=>{r.setUser({id:s.userId}),y(o,s.userId)}},n.default.createElement(P,{messages:E},n.default.createElement(C,{filePath:a},n.default.createElement(x,{value:t,watchForChanges:m?.watchForModelChanges},i)))))))})}async function M(e,o,r){let i=await p(F());await S(i,o),o.biLogger.updateDefaults({command:e.name()});let m=I({biLogger:o.biLogger,command:e,cliVersion:l,flow:"Apps",projectId:i.config.projectId,extensions:i.components.reduce((t,a)=>{let d=t[a.type];return t[a.type]=d?d+1:1,t},{}),extraFields:L(e.name(),i.components)});try{await r(),m.succeed()}catch(t){throw m.failed(t),t}}export{T as renderCommand,M as runCommand};
4
- //# sourceMappingURL=render-command-MDMVZZWK.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/commands/render-command.tsx"],"sourcesContent":["import { cwd } from 'node:process';\nimport React from 'react';\nimport type { ReactElement } from 'react';\nimport { AccountAuthProvider } from '@wix/cli-auth';\nimport type { UserInfo } from '@wix/cli-auth';\nimport { render } from '@wix/cli-ui-kit';\nimport { I18nProvider } from '@wix/cli-i18n';\nimport { CliError, CliErrorCode } from '@wix/cli-error';\nimport { DebugLogProvider } from '@wix/cli-debug-log';\nimport { getDebugLogFilePath } from '@wix/cli-core-definitions';\nimport { ErrorReporterProvider } from '@wix/cli-error-reporting';\nimport { BiProvider } from '@wix/cli-telemetry-react';\nimport { addUserFields, reportCommandStartEvent } from '@wix/cli-telemetry';\nimport type { CommandServices } from '@wix/cli-command-contract';\nimport type { Command } from '@commander-js/extra-typings';\nimport type { ProjectModel } from '../model.js';\nimport type { DevCenterComponent } from '../dev-center/components/dev-center-component.js';\nimport { loadProjectModel, ProjectModelProvider } from '../model.js';\nimport messages from '../messages.json';\nimport { version } from '../../package.json';\n\ninterface Options {\n watchForModelChanges?: boolean;\n skipProjectValidation?: boolean;\n}\n\nasync function initServices(\n model: ProjectModel,\n { biLogger, errorReporter }: CommandServices\n) {\n errorReporter.setContext('app info', {\n appId: model.config.appId,\n projectId: model.config.projectId,\n });\n\n biLogger.updateDefaults({\n _appId: model.config.appId,\n });\n}\n\nfunction getExtraBiFields(command: string, components: DevCenterComponent[]) {\n switch (command) {\n case 'dev':\n case 'preview':\n return {\n is_mocking_values: components.some(\n (component) =>\n component.type === 'EmbeddedScript' && component.paramsOverride\n ),\n };\n default:\n return undefined;\n }\n}\n\nexport async function renderCommand(\n command: Command,\n { biLogger, errorReporter }: CommandServices,\n tree: ReactElement,\n options?: Options\n) {\n await runCommand(command, { biLogger, errorReporter }, async () => {\n const model = await loadProjectModel(cwd());\n\n if (model.components.length === 0 && !options?.skipProjectValidation) {\n throw new CliError({\n code: CliErrorCode.NoExtensionsFound(),\n });\n }\n\n biLogger.updateDefaults({ command: command.name() });\n\n const debugLogFilePath = getDebugLogFilePath(model.projectFolder);\n\n const handleLogin = (userInfo: UserInfo) => {\n errorReporter.setUser({ id: userInfo.userId });\n addUserFields(biLogger, userInfo.userId);\n };\n\n await render(\n <BiProvider value={biLogger}>\n <ErrorReporterProvider value={errorReporter}>\n <AccountAuthProvider onLogin={handleLogin}>\n <I18nProvider messages={messages}>\n <DebugLogProvider filePath={debugLogFilePath}>\n <ProjectModelProvider\n value={model}\n watchForChanges={options?.watchForModelChanges}\n >\n {tree}\n </ProjectModelProvider>\n </DebugLogProvider>\n </I18nProvider>\n </AccountAuthProvider>\n </ErrorReporterProvider>\n </BiProvider>\n );\n });\n}\n\nexport async function runCommand(\n command: Command,\n services: CommandServices,\n commandFn: () => Promise<void>\n) {\n const model = await loadProjectModel(cwd());\n\n await initServices(model, services);\n\n services.biLogger.updateDefaults({\n command: command.name(),\n });\n\n const commandStatus = reportCommandStartEvent({\n biLogger: services.biLogger,\n command,\n cliVersion: version,\n flow: 'Apps',\n projectId: model.config.projectId,\n extensions: model.components.reduce<Record<string, number>>((acc, item) => {\n const value = acc[item.type];\n acc[item.type] = value ? value + 1 : 1;\n return acc;\n }, {}),\n extraFields: getExtraBiFields(command.name(), model.components),\n });\n\n try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,EAAA,CAAa,SAAUC,GACtB,EAAAP,QAAA,cAACQ,EAAA,CAAiB,SAAUX,GAC1B,EAAAG,QAAA,cAACS,EAAA,CACC,MAAO3B,EACP,gBAAiBS,GAAS,sBAEzBD,CACH,CACF,CACF,CACF,CACF,CACF,CACF,CACF,CAAC,CACH,CAEA,eAAsBE,EACpBN,EACAwB,EACAC,EACA,CACA,IAAM7B,EAAQ,MAAMW,EAAiBC,EAAI,CAAC,EAE1C,MAAMb,EAAaC,EAAO4B,CAAQ,EAElCA,EAAS,SAAS,eAAe,CAC/B,QAASxB,EAAQ,KAAK,CACxB,CAAC,EAED,IAAM0B,EAAgBC,EAAwB,CAC5C,SAAUH,EAAS,SACnB,QAAAxB,EACA,WAAY4B,EACZ,KAAM,OACN,UAAWhC,EAAM,OAAO,UACxB,WAAYA,EAAM,WAAW,OAA+B,CAACiC,EAAKC,IAAS,CACzE,IAAMC,EAAQF,EAAIC,EAAK,IAAI,EAC3B,OAAAD,EAAIC,EAAK,IAAI,EAAIC,EAAQA,EAAQ,EAAI,EAC9BF,CACT,EAAG,CAAC,CAAC,EACL,YAAa9B,EAAiBC,EAAQ,KAAK,EAAGJ,EAAM,UAAU,CAChE,CAAC,EAED,GAAI,CACF,MAAM6B,EAAU,EAChBC,EAAc,QAAQ,CACxB,OAASM,EAAG,CACV,MAAAN,EAAc,OAAOM,CAAC,EAChBA,CACR,CACF","names":["init_esm_shims","import_react","cwd","initServices","model","biLogger","errorReporter","getExtraBiFields","command","components","component","renderCommand","tree","options","runCommand","loadProjectModel","cwd","CliError","CliErrorCode","debugLogFilePath","getDebugLogFilePath","render","React","BiProvider","ErrorReporterProvider","AccountAuthProvider","userInfo","addUserFields","I18nProvider","messages_default","DebugLogProvider","ProjectModelProvider","services","commandFn","commandStatus","reportCommandStartEvent","version","acc","item","value","e"]}