lingo.dev 0.90.1 → 0.90.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/cli.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  // src/cli/index.ts
2
2
  import dotenv from "dotenv";
3
3
  import { InteractiveCommand as InteractiveCommand2 } from "interactive-commander";
4
- import figlet from "figlet";
5
- import { vice } from "gradient-string";
4
+ import figlet2 from "figlet";
5
+ import { vice as vice2 } from "gradient-string";
6
6
 
7
7
  // src/cli/cmd/auth.ts
8
8
  import { Command } from "interactive-commander";
@@ -4966,22 +4966,6 @@ var InBranchFlow = class extends IntegrationFlow {
4966
4966
  }
4967
4967
  return true;
4968
4968
  }
4969
- async returnToOriginalBranch() {
4970
- const originalBranch = this.platformKit.platformConfig.baseBranchName;
4971
- if (originalBranch) {
4972
- this.ora.start(`Returning to original branch: ${originalBranch}`);
4973
- try {
4974
- execSync(`git checkout ${originalBranch}`, {
4975
- stdio: "inherit",
4976
- encoding: "utf8"
4977
- });
4978
- this.ora.succeed(`Returned to original branch: ${originalBranch}`);
4979
- } catch (error) {
4980
- const errorMessage = error instanceof Error ? error.message : "Unknown error occurred";
4981
- this.ora.fail(`Failed to return to original branch: ${errorMessage}`);
4982
- }
4983
- }
4984
- }
4985
4969
  };
4986
4970
 
4987
4971
  // src/cli/cmd/ci/flows/pull-request.ts
@@ -5566,19 +5550,15 @@ var ci_default = new Command10().command("ci").description("Run Lingo.dev CI/CD
5566
5550
  const { isPullRequestMode } = platformKit.config;
5567
5551
  ora.info(`Pull request mode: ${isPullRequestMode ? "on" : "off"}`);
5568
5552
  const flow = isPullRequestMode ? new PullRequestFlow(ora, platformKit) : new InBranchFlow(ora, platformKit);
5569
- try {
5570
- const canRun = await flow.preRun?.();
5571
- if (canRun === false) {
5572
- return;
5573
- }
5574
- const hasChanges = await flow.run();
5575
- if (!hasChanges) {
5576
- return;
5577
- }
5578
- await flow.postRun?.();
5579
- } finally {
5580
- await flow.returnToOriginalBranch?.();
5553
+ const canRun = await flow.preRun?.();
5554
+ if (canRun === false) {
5555
+ return;
5556
+ }
5557
+ const hasChanges = await flow.run();
5558
+ if (!hasChanges) {
5559
+ return;
5581
5560
  }
5561
+ await flow.postRun?.();
5582
5562
  });
5583
5563
 
5584
5564
  // src/cli/cmd/status.ts
@@ -5998,10 +5978,82 @@ function validateParams2(i18nConfig, flags) {
5998
5978
  }
5999
5979
  }
6000
5980
 
5981
+ // src/cli/cmd/may-the-fourth.ts
5982
+ import { Command as Command12 } from "interactive-commander";
5983
+ import * as cp from "node:child_process";
5984
+ import figlet from "figlet";
5985
+ import chalk3 from "chalk";
5986
+ import { vice } from "gradient-string";
5987
+ var colors = {
5988
+ orange: "#ff6600",
5989
+ green: "#6ae300",
5990
+ blue: "#0090ff",
5991
+ yellow: "#ffcc00",
5992
+ grey: "#808080",
5993
+ red: "#ff0000"
5994
+ };
5995
+ var may_the_fourth_default = new Command12().command("may-the-fourth").description("May the Fourth be with you").helpOption("-h, --help", "Show help").action(async () => {
5996
+ await renderClear();
5997
+ await renderBanner();
5998
+ await renderSpacer();
5999
+ console.log(chalk3.hex(colors.yellow)("Loading the Star Wars movie..."));
6000
+ await renderSpacer();
6001
+ await new Promise((resolve, reject) => {
6002
+ const ssh = cp.spawn("ssh", ["starwarstel.net"], {
6003
+ stdio: "inherit"
6004
+ });
6005
+ ssh.on("close", (code) => {
6006
+ if (code !== 0) {
6007
+ console.error(`SSH process exited with code ${code}`);
6008
+ }
6009
+ resolve();
6010
+ });
6011
+ ssh.on("error", (err) => {
6012
+ console.error("Failed to start SSH process:", err);
6013
+ reject(err);
6014
+ });
6015
+ });
6016
+ await renderSpacer();
6017
+ console.log(
6018
+ `${chalk3.hex(colors.green)("We hope you enjoyed it! :)")} ${chalk3.hex(colors.blue)("May the Fourth be with you! \u{1F680}")}`
6019
+ );
6020
+ await renderSpacer();
6021
+ console.log(chalk3.dim(`---`));
6022
+ await renderSpacer();
6023
+ await renderHero();
6024
+ });
6025
+ async function renderClear() {
6026
+ console.log("\x1Bc");
6027
+ }
6028
+ async function renderSpacer() {
6029
+ console.log(" ");
6030
+ }
6031
+ async function renderBanner() {
6032
+ console.log(
6033
+ vice(
6034
+ figlet.textSync("LINGO.DEV", {
6035
+ font: "ANSI Shadow",
6036
+ horizontalLayout: "default",
6037
+ verticalLayout: "default"
6038
+ })
6039
+ )
6040
+ );
6041
+ }
6042
+ async function renderHero() {
6043
+ console.log(
6044
+ `\u26A1\uFE0F ${chalk3.hex(colors.green)("Lingo.dev")} - open-source, AI-powered i18n CLI for web & mobile localization.`
6045
+ );
6046
+ console.log(" ");
6047
+ console.log(
6048
+ chalk3.hex(colors.blue)("\u2B50 GitHub Repo: https://lingo.dev/go/gh")
6049
+ );
6050
+ console.log(chalk3.hex(colors.blue)("\u{1F4AC} 24/7 Support: hi@lingo.dev"));
6051
+ }
6052
+
6001
6053
  // package.json
6002
6054
  var package_default = {
6003
6055
  name: "lingo.dev",
6004
- version: "0.90.1",
6056
+ version: "0.90.2",
6005
6057
  description: "Lingo.dev CLI",
6006
6058
  private: false,
6007
6059
  publishConfig: {
@@ -6158,8 +6210,8 @@ dotenv.config();
6158
6210
  var cli_default = new InteractiveCommand2().name("lingo.dev").description("Lingo.dev CLI").helpOption("-h, --help", "Show help").addHelpText(
6159
6211
  "beforeAll",
6160
6212
  `
6161
- ${vice(
6162
- figlet.textSync("LINGO.DEV", {
6213
+ ${vice2(
6214
+ figlet2.textSync("LINGO.DEV", {
6163
6215
  font: "ANSI Shadow",
6164
6216
  horizontalLayout: "default",
6165
6217
  verticalLayout: "default"
@@ -6170,7 +6222,7 @@ ${vice(
6170
6222
 
6171
6223
  Star the the repo :) https://github.com/LingoDotDev/lingo.dev
6172
6224
  `
6173
- ).version(`v${package_default.version}`, "-v, --version", "Show version").addCommand(init_default).interactive("-y, --no-interactive", "Disable interactive mode").addCommand(i18n_default).addCommand(auth_default).addCommand(show_default).addCommand(lockfile_default).addCommand(cleanup_default).addCommand(mcp_default).addCommand(ci_default).addCommand(status_default).exitOverride((err) => {
6225
+ ).version(`v${package_default.version}`, "-v, --version", "Show version").addCommand(init_default).interactive("-y, --no-interactive", "Disable interactive mode").addCommand(i18n_default).addCommand(auth_default).addCommand(show_default).addCommand(lockfile_default).addCommand(cleanup_default).addCommand(mcp_default).addCommand(ci_default).addCommand(status_default).addCommand(may_the_fourth_default, { hidden: true }).exitOverride((err) => {
6174
6226
  if (err.code === "commander.helpDisplayed" || err.code === "commander.version" || err.code === "commander.help") {
6175
6227
  process.exit(0);
6176
6228
  }