@wix/cli
Version:
CLI tool for building Wix sites and applications
169 lines (158 loc) • 5.93 kB
JavaScript
import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
createI18nT
} from "./chunk-6MV3GIRQ.js";
import "./chunk-BWQNSFZR.js";
import {
Option,
createCommand,
require_commander
} from "./chunk-J2EPR7DO.js";
import "./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-old/src/index.ts
init_esm_shims();
// ../cli-site-old/src/commands/root-command.ts
init_esm_shims();
// ../cli-site-old/src/commands/dev.ts
init_esm_shims();
// ../../node_modules/commander/esm.mjs
init_esm_shims();
var import_index = __toESM(require_commander(), 1);
var {
program,
createCommand: createCommand2,
createArgument,
createOption,
CommanderError,
InvalidArgumentError,
InvalidOptionArgumentError,
// deprecated old name
Command,
Argument,
Option: Option2,
Help
} = import_index.default;
// ../cli-site-old/src/commands/dev.ts
var devCommand = (services, cliVersion) => {
const t = createI18nT();
return createCommand("dev").option("-s, --https", t("site_dev_command_def.option.https")).addOption(
new Option2("--tunnel", t("site_dev_command_def.option.tunnel")).conflicts("https").hideHelp(true)
).description(t("site_dev_command_def.description")).action(async (options, command) => {
const { runCommand } = await import("./run-command-S5PIUDGN.js");
const { dev } = await import("./dev-6JFQUCHE.js");
await runCommand(
command,
services,
cliVersion,
(model) => dev(model, services, options)
);
});
};
// ../cli-site-old/src/commands/install.ts
init_esm_shims();
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")).option("--yarn", t("site_install_command_def.option.yarn")).option("--npm", t("site_install_command_def.option.npm")).action(async (packageName, opts, command) => {
const { runCommand } = await import("./run-command-S5PIUDGN.js");
const { install } = await import("./install-MHCFEKFT.js");
await runCommand(
command,
services,
cliVersion,
(model) => install(model, services, opts, packageName)
);
});
};
// ../cli-site-old/src/commands/preview.tsx
init_esm_shims();
var import_react = __toESM(require_react(), 1);
var previewCommand = (services, cliVersion) => {
const t = createI18nT();
return createCommand("preview").description(t("site_preview_command_def.description")).addOption(
new Option(
"--source <local|remote>",
t("site_preview_command_def.option.source")
).choices(["local", "remote"])
).action(async (options, command) => {
const { renderCommand } = await import("./render-command-44COYLIF.js");
const { PreviewCommand } = await import("./PreviewCommand-N7MOE5D6.js");
await renderCommand(
command,
services,
cliVersion,
/* @__PURE__ */ import_react.default.createElement(PreviewCommand, { ...options })
);
});
};
// ../cli-site-old/src/commands/publish.ts
init_esm_shims();
var publishCommand = (services, cliVersion) => {
const t = createI18nT();
return createCommand("publish").description(t("site_publish_command_def.description")).addOption(
new Option(
"--source <local|remote>",
t("site_publish_command_def.option.source")
).choices(["local", "remote"])
).option(
"-y, --approve-preview",
t("site_publish_command_def.option.approve_preview")
).option("-f, --force", t("site_publish_command_def.option.force")).action(async (options, command) => {
const { runCommand } = await import("./run-command-S5PIUDGN.js");
const { publish } = await import("./publish-RMNHKQ5N.js");
await runCommand(
command,
services,
cliVersion,
(model) => publish(model, services, options)
);
});
};
// ../cli-site-old/src/commands/sync-types.ts
init_esm_shims();
var syncTypesCommand = (services, cliVersion) => createCommand("sync-types").action(async (_, command) => {
const { runCommand } = await import("./run-command-S5PIUDGN.js");
const { syncTypes } = await import("./sync-types-PWKZLPHX.js");
await runCommand(
command,
services,
cliVersion,
(model) => syncTypes(model, services)
);
});
// ../cli-site-old/src/commands/uninstall.ts
init_esm_shims();
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")).option("--yarn", t("site_uninstall_command_def.option.yarn")).option("--npm", t("site_uninstall_command_def.option.npm")).action(async (packageName, opts, command) => {
const { runCommand } = await import("./run-command-S5PIUDGN.js");
const { uninstall } = await import("./uninstall-FRW4UYLS.js");
await runCommand(
command,
services,
cliVersion,
(model) => uninstall(model, services, opts, packageName)
);
});
};
// ../cli-site-old/src/commands/root-command.ts
var getRootCommand = async function getRootCommand2(services, cliVersion) {
return createCommand("site").addCommand(devCommand(services, cliVersion)).addCommand(installCommand(services, cliVersion)).addCommand(previewCommand(services, cliVersion)).addCommand(publishCommand(services, cliVersion)).addCommand(syncTypesCommand(services, cliVersion), { hidden: true }).addCommand(uninstallCommand(services, cliVersion));
};
export {
getRootCommand
};
//# sourceMappingURL=src-7LKK7ULD.js.map