lingo.dev 0.121.0 → 0.122.0

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
@@ -86,7 +86,7 @@ function _loadDefaults() {
86
86
  };
87
87
  }
88
88
  function _loadEnv() {
89
- return Z.object({
89
+ return Z.looseObject({
90
90
  LINGODOTDEV_API_KEY: Z.string().optional(),
91
91
  LINGODOTDEV_API_URL: Z.string().optional(),
92
92
  LINGODOTDEV_WEB_URL: Z.string().optional(),
@@ -97,14 +97,14 @@ function _loadEnv() {
97
97
  GOOGLE_API_KEY: Z.string().optional(),
98
98
  OPENROUTER_API_KEY: Z.string().optional(),
99
99
  MISTRAL_API_KEY: Z.string().optional()
100
- }).passthrough().parse(process.env);
100
+ }).parse(process.env);
101
101
  }
102
102
  function _loadSystemFile() {
103
103
  const settingsFilePath = _getSettingsFilePath();
104
104
  const content = fs.existsSync(settingsFilePath) ? fs.readFileSync(settingsFilePath, "utf-8") : "";
105
105
  const data = Ini.parse(content);
106
- return Z.object({
107
- auth: Z.object({
106
+ return Z.looseObject({
107
+ auth: Z.looseObject({
108
108
  apiKey: Z.string().optional(),
109
109
  apiUrl: Z.string().optional(),
110
110
  webUrl: Z.string().optional(),
@@ -112,7 +112,7 @@ function _loadSystemFile() {
112
112
  apiKey: Z.string().optional()
113
113
  }).optional()
114
114
  }).optional(),
115
- llm: Z.object({
115
+ llm: Z.looseObject({
116
116
  openaiApiKey: Z.string().optional(),
117
117
  anthropicApiKey: Z.string().optional(),
118
118
  groqApiKey: Z.string().optional(),
@@ -120,7 +120,7 @@ function _loadSystemFile() {
120
120
  openrouterApiKey: Z.string().optional(),
121
121
  mistralApiKey: Z.string().optional()
122
122
  }).optional()
123
- }).passthrough().parse(data);
123
+ }).parse(data);
124
124
  }
125
125
  function _saveSystemFile(settings) {
126
126
  const settingsFilePath = _getSettingsFilePath();
@@ -10870,7 +10870,7 @@ import { createAnthropic } from "@ai-sdk/anthropic";
10870
10870
  import { createGoogleGenerativeAI } from "@ai-sdk/google";
10871
10871
  import { createOpenRouter } from "@openrouter/ai-sdk-provider";
10872
10872
  import { createMistral } from "@ai-sdk/mistral";
10873
- import { createOllama } from "ollama-ai-provider";
10873
+ import { createOllama } from "ollama-ai-provider-v2";
10874
10874
  function createProcessor(provider, params) {
10875
10875
  if (!provider) {
10876
10876
  const result = createLingoLocalizer(params);
@@ -11198,7 +11198,7 @@ function checkIfFileExists(filePath) {
11198
11198
  import * as path16 from "path";
11199
11199
  import YAML5 from "yaml";
11200
11200
  var LockSchema = z.object({
11201
- version: z.literal(1).default(1),
11201
+ version: z.literal(1).prefault(1),
11202
11202
  checksums: z.record(
11203
11203
  z.string(),
11204
11204
  // localizable files' keys
@@ -11208,8 +11208,8 @@ var LockSchema = z.object({
11208
11208
  z.string(),
11209
11209
  // checksum of the key's value in the source locale
11210
11210
  z.string()
11211
- ).default({})
11212
- ).default({})
11211
+ ).prefault({})
11212
+ ).prefault({})
11213
11213
  });
11214
11214
  function createDeltaProcessor(fileKey) {
11215
11215
  const lockfilePath = path16.join(process.cwd(), "i18n.lock");
@@ -11332,6 +11332,13 @@ var i18n_default = new Command14().command("i18n").description(
11332
11332
  ).action(async function(options) {
11333
11333
  updateGitignore();
11334
11334
  const ora = Ora10();
11335
+ console.log();
11336
+ ora.warn(
11337
+ chalk6.yellow(
11338
+ " DEPRECATED: 'i18n' is deprecated. Please use 'run' instead. Docs: https://lingo.dev/cli/commands/run"
11339
+ )
11340
+ );
11341
+ console.log();
11335
11342
  let flags;
11336
11343
  try {
11337
11344
  flags = parseFlags(options);
@@ -11790,8 +11797,8 @@ function parseFlags(options) {
11790
11797
  strict: Z3.boolean().optional(),
11791
11798
  key: Z3.string().optional(),
11792
11799
  file: Z3.array(Z3.string()).optional(),
11793
- interactive: Z3.boolean().default(false),
11794
- debug: Z3.boolean().default(false)
11800
+ interactive: Z3.boolean().prefault(false),
11801
+ debug: Z3.boolean().prefault(false)
11795
11802
  }).parse(options);
11796
11803
  }
11797
11804
  async function validateAuth(settings) {
@@ -12025,7 +12032,7 @@ function createLockfileHelper() {
12025
12032
  }
12026
12033
  }
12027
12034
  var LockfileSchema = Z4.object({
12028
- version: Z4.literal(1).default(1),
12035
+ version: Z4.literal(1).prefault(1),
12029
12036
  checksums: Z4.record(
12030
12037
  Z4.string(),
12031
12038
  // localizable files' keys
@@ -12035,8 +12042,8 @@ var LockfileSchema = Z4.object({
12035
12042
  // key
12036
12043
  Z4.string()
12037
12044
  // checksum of the key's value in the source locale
12038
- ).default({})
12039
- ).default({})
12045
+ ).prefault({})
12046
+ ).prefault({})
12040
12047
  });
12041
12048
 
12042
12049
  // src/cli/cmd/lockfile.ts
@@ -12086,7 +12093,7 @@ var lockfile_default = new Command15().command("lockfile").description(
12086
12093
  }
12087
12094
  });
12088
12095
  var flagsSchema = Z5.object({
12089
- force: Z5.boolean().default(false)
12096
+ force: Z5.boolean().prefault(false)
12090
12097
  });
12091
12098
 
12092
12099
  // src/cli/cmd/cleanup.ts
@@ -12572,7 +12579,7 @@ import chalk10 from "chalk";
12572
12579
  import dedent7 from "dedent";
12573
12580
  import { generateText as generateText2 } from "ai";
12574
12581
  import { jsonrepair as jsonrepair3 } from "jsonrepair";
12575
- import { createOllama as createOllama2 } from "ollama-ai-provider";
12582
+ import { createOllama as createOllama2 } from "ollama-ai-provider-v2";
12576
12583
  function createExplicitLocalizer(provider) {
12577
12584
  const settings = provider.settings || {};
12578
12585
  switch (provider.id) {
@@ -13544,13 +13551,13 @@ var flagsSchema2 = z2.object({
13544
13551
  frozen: z2.boolean().optional(),
13545
13552
  verbose: z2.boolean().optional(),
13546
13553
  strict: z2.boolean().optional(),
13547
- interactive: z2.boolean().default(false),
13548
- concurrency: z2.number().positive().default(10),
13549
- debug: z2.boolean().default(false),
13554
+ interactive: z2.boolean().prefault(false),
13555
+ concurrency: z2.number().positive().prefault(10),
13556
+ debug: z2.boolean().prefault(false),
13550
13557
  sourceLocale: z2.string().optional(),
13551
13558
  targetLocale: z2.array(z2.string()).optional(),
13552
- watch: z2.boolean().default(false),
13553
- debounce: z2.number().positive().default(5e3),
13559
+ watch: z2.boolean().prefault(false),
13560
+ debounce: z2.number().positive().prefault(5e3),
13554
13561
  // 5 seconds default
13555
13562
  sound: z2.boolean().optional(),
13556
13563
  pseudo: z2.boolean().optional()
@@ -15235,7 +15242,7 @@ async function renderHero2() {
15235
15242
  // package.json
15236
15243
  var package_default = {
15237
15244
  name: "lingo.dev",
15238
- version: "0.121.0",
15245
+ version: "0.122.0",
15239
15246
  description: "Lingo.dev CLI",
15240
15247
  private: false,
15241
15248
  repository: {
@@ -15364,10 +15371,10 @@ var package_default = {
15364
15371
  author: "",
15365
15372
  license: "Apache-2.0",
15366
15373
  dependencies: {
15367
- "@ai-sdk/anthropic": "1.2.11",
15368
- "@ai-sdk/google": "1.2.19",
15369
- "@ai-sdk/mistral": "1.2.8",
15370
- "@ai-sdk/openai": "1.3.22",
15374
+ "@ai-sdk/anthropic": "3.0.9",
15375
+ "@ai-sdk/google": "3.0.6",
15376
+ "@ai-sdk/mistral": "3.0.5",
15377
+ "@ai-sdk/openai": "3.0.7",
15371
15378
  "@babel/generator": "7.28.5",
15372
15379
  "@babel/parser": "7.28.5",
15373
15380
  "@babel/traverse": "7.28.5",
@@ -15385,10 +15392,10 @@ var package_default = {
15385
15392
  "@lingo.dev/_spec": "workspace:*",
15386
15393
  "@markdoc/markdoc": "0.5.4",
15387
15394
  "@modelcontextprotocol/sdk": "1.22.0",
15388
- "@openrouter/ai-sdk-provider": "0.7.1",
15395
+ "@openrouter/ai-sdk-provider": "6.0.0-alpha.1",
15389
15396
  "@paralleldrive/cuid2": "2.2.2",
15390
15397
  "@types/ejs": "3.1.5",
15391
- ai: "4.3.15",
15398
+ ai: "6.0.25",
15392
15399
  bitbucket: "2.12.0",
15393
15400
  chalk: "5.6.2",
15394
15401
  chokidar: "4.0.3",
@@ -15435,7 +15442,7 @@ var package_default = {
15435
15442
  "node-webvtt": "1.9.4",
15436
15443
  "object-hash": "3.0.0",
15437
15444
  octokit: "4.0.2",
15438
- "ollama-ai-provider": "1.2.0",
15445
+ "ollama-ai-provider-v2": "2.0.0",
15439
15446
  open: "10.2.0",
15440
15447
  ora: "8.1.1",
15441
15448
  "p-limit": "6.2.0",
@@ -15462,7 +15469,7 @@ var package_default = {
15462
15469
  xml2js: "0.6.2",
15463
15470
  xpath: "0.0.34",
15464
15471
  yaml: "2.8.1",
15465
- zod: "3.25.76"
15472
+ zod: "4.1.12"
15466
15473
  },
15467
15474
  devDependencies: {
15468
15475
  "@types/babel__generator": "7.27.0",