lingo.dev 0.90.0 → 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";
@@ -3821,7 +3821,6 @@ async function trackEvent(distinctId, event, properties) {
3821
3821
  }
3822
3822
  try {
3823
3823
  const { PostHog } = await import("posthog-node");
3824
- console.log("--- ---");
3825
3824
  const safeProperties = properties ? JSON.parse(
3826
3825
  JSON.stringify(properties, (key, value) => {
3827
3826
  if (value instanceof Error) {
@@ -3842,7 +3841,6 @@ async function trackEvent(distinctId, event, properties) {
3842
3841
  flushInterval: 0
3843
3842
  }
3844
3843
  );
3845
- console.log("--- ---");
3846
3844
  await posthog.capture({
3847
3845
  distinctId,
3848
3846
  event,
@@ -3854,9 +3852,7 @@ async function trackEvent(distinctId, event, properties) {
3854
3852
  }
3855
3853
  }
3856
3854
  });
3857
- console.log("--- ---");
3858
3855
  await posthog.shutdown();
3859
- console.log("--- ---");
3860
3856
  } catch (error) {
3861
3857
  if (process.env.DEBUG) {
3862
3858
  console.error(error);
@@ -5548,9 +5544,6 @@ var ci_default = new Command10().command("ci").description("Run Lingo.dev CI/CD
5548
5544
  LINGODOTDEV_PROCESS_OWN_COMMITS: options.processOwnCommits.toString()
5549
5545
  }
5550
5546
  };
5551
- console.log("--- config ---");
5552
- console.log(env);
5553
- console.log("--- ---");
5554
5547
  process.env = { ...process.env, ...env };
5555
5548
  const ora = createOra();
5556
5549
  const platformKit = getPlatformKit();
@@ -5985,10 +5978,82 @@ function validateParams2(i18nConfig, flags) {
5985
5978
  }
5986
5979
  }
5987
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
+
5988
6053
  // package.json
5989
6054
  var package_default = {
5990
6055
  name: "lingo.dev",
5991
- version: "0.90.0",
6056
+ version: "0.90.2",
5992
6057
  description: "Lingo.dev CLI",
5993
6058
  private: false,
5994
6059
  publishConfig: {
@@ -6047,7 +6112,7 @@ var package_default = {
6047
6112
  dependencies: {
6048
6113
  "@ai-sdk/anthropic": "^1.2.6",
6049
6114
  "@ai-sdk/openai": "^1.3.7",
6050
- "@datocms/cma-client-node": "^3.4.0",
6115
+ "@datocms/cma-client-node": "^4.0.1",
6051
6116
  "@gitbeaker/rest": "^39.34.3",
6052
6117
  "@inquirer/prompts": "^7.4.1",
6053
6118
  "@lingo.dev/_sdk": "workspace:*",
@@ -6145,8 +6210,8 @@ dotenv.config();
6145
6210
  var cli_default = new InteractiveCommand2().name("lingo.dev").description("Lingo.dev CLI").helpOption("-h, --help", "Show help").addHelpText(
6146
6211
  "beforeAll",
6147
6212
  `
6148
- ${vice(
6149
- figlet.textSync("LINGO.DEV", {
6213
+ ${vice2(
6214
+ figlet2.textSync("LINGO.DEV", {
6150
6215
  font: "ANSI Shadow",
6151
6216
  horizontalLayout: "default",
6152
6217
  verticalLayout: "default"
@@ -6157,7 +6222,7 @@ ${vice(
6157
6222
 
6158
6223
  Star the the repo :) https://github.com/LingoDotDev/lingo.dev
6159
6224
  `
6160
- ).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) => {
6161
6226
  if (err.code === "commander.helpDisplayed" || err.code === "commander.version" || err.code === "commander.help") {
6162
6227
  process.exit(0);
6163
6228
  }