UNPKG

@wix/cli

Version:

CLI tool for building Wix sites and applications

136 lines (126 loc) 5.07 kB
import { createRequire as _createRequire } from 'node:module'; const require = _createRequire(import.meta.url); import { messages_default } from "./chunk-CNKZM54U.js"; import { Option, createCommand } from "./chunk-J2EPR7DO.js"; import { createI18n } from "./chunk-75K4NCRA.js"; import "./chunk-KJ37XZQA.js"; import "./chunk-OAVLQEAG.js"; import { require_react } from "./chunk-5A5B2WR4.js"; import "./chunk-SQ3KPTIH.js"; import "./chunk-WYHHEOWO.js"; import "./chunk-ZXYGJZOO.js"; import "./chunk-D5VYILRO.js"; import { __toESM, init_esm_shims } from "./chunk-4EFJZ3GQ.js"; // ../cli-site/src/index.ts init_esm_shims(); // ../cli-site/src/commands/root-command.ts init_esm_shims(); // ../cli-site/src/commands/dev.tsx init_esm_shims(); var import_react = __toESM(require_react(), 1); // ../cli-site/src/i18n.ts init_esm_shims(); function createI18nT() { const i18n = createI18n(messages_default); return i18n.t.bind(i18n); } // ../cli-site/src/commands/dev.tsx var devCommand = (services, cliVersion) => { const t = createI18nT(); return createCommand("dev").description(t("site_dev_command_def.description")).option("--tunnel", t("site_dev_command_def.option.tunnel")).action(async (options, command) => { const { tunnel = false } = options; const { renderCommand } = await import("./render-command-R3PLW5KU.js"); const { DevCommand } = await import("./DevCommand-BXJOYUXA.js"); await renderCommand( command, services, cliVersion, /* @__PURE__ */ import_react.default.createElement(DevCommand, { useTunnel: tunnel }) ); }); }; // ../cli-site/src/commands/preview.tsx init_esm_shims(); var import_react2 = __toESM(require_react(), 1); var previewCommand = (services, cliVersion) => { const t = createI18nT(); return createCommand("preview").description(t("site_preview_command_def.description")).action(async (options, command) => { const { renderCommand } = await import("./render-command-R3PLW5KU.js"); const { PreviewCommand } = await import("./PreviewCommand-HFNS5HTO.js"); await renderCommand(command, services, cliVersion, /* @__PURE__ */ import_react2.default.createElement(PreviewCommand, null)); }); }; // ../cli-site/src/commands/publish.tsx init_esm_shims(); var import_react3 = __toESM(require_react(), 1); var publishCommand = (services, cliVersion) => { const t = createI18nT(); return createCommand("publish").description(t("site_publish_command_def.description")).addOption( new Option( "-y, --approve-preview", t("site_publish_command_def.option.approve_preview") ).conflicts("force") ).option("-f, --force", t("site_publish_command_def.option.force")).action(async (options, command) => { const { approvePreview = false, force = false } = options; const { renderCommand } = await import("./render-command-R3PLW5KU.js"); const { PublishCommand } = await import("./PublishCommand-D2QH3WFZ.js"); await renderCommand( command, services, cliVersion, /* @__PURE__ */ import_react3.default.createElement(PublishCommand, { approvePreview, force }) ); }); }; // ../cli-site/src/commands/install.tsx init_esm_shims(); var import_react4 = __toESM(require_react(), 1); var installCommand = (services, cliVersion) => { const t = createI18nT(); return createCommand("install").description(t("site_install_command_def.description")).argument("[package]", t("site_install_command_def.argument.package")).action(async (packageName, _opts, command) => { const { renderCommand } = await import("./render-command-R3PLW5KU.js"); const { InstallCommand } = await import("./InstallCommand-YFSJNDZN.js"); await renderCommand( command, services, cliVersion, /* @__PURE__ */ import_react4.default.createElement(InstallCommand, { packageName }) ); }); }; // ../cli-site/src/commands/uninstall.tsx init_esm_shims(); var import_react5 = __toESM(require_react(), 1); var uninstallCommand = (services, cliVersion) => { const t = createI18nT(); return createCommand("uninstall").description(t("site_uninstall_command_def.description")).argument("<package>", t("site_uninstall_command_def.argument.package")).action(async (packageName, _opts, command) => { const { renderCommand } = await import("./render-command-R3PLW5KU.js"); const { UninstallCommand } = await import("./UninstallCommand-3ITLK7SR.js"); await renderCommand( command, services, cliVersion, /* @__PURE__ */ import_react5.default.createElement(UninstallCommand, { packageName }) ); }); }; // ../cli-site/src/commands/root-command.ts var getRootCommand = async function getRootCommand2(services, cliVersion) { return createCommand("site").addCommand(devCommand(services, cliVersion)).addCommand(previewCommand(services, cliVersion)).addCommand(publishCommand(services, cliVersion)).addCommand(installCommand(services, cliVersion)).addCommand(uninstallCommand(services, cliVersion)); }; export { getRootCommand }; //# sourceMappingURL=src-GUPHFKN4.js.map