@lingo.dev/_spec 0.40.4 → 0.41.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.
@@ -2,7 +2,10 @@
2
2
  "type": "object",
3
3
  "properties": {
4
4
  "version": {
5
- "type": "number",
5
+ "type": [
6
+ "number",
7
+ "string"
8
+ ],
6
9
  "default": 0,
7
10
  "description": "The version number of the schema."
8
11
  },
@@ -136,6 +139,7 @@
136
139
  "json5",
137
140
  "jsonc",
138
141
  "markdown",
142
+ "markdoc",
139
143
  "mdx",
140
144
  "xcode-strings",
141
145
  "xcode-stringsdict",
@@ -190,6 +194,19 @@
190
194
  "baseUrl": {
191
195
  "type": "string",
192
196
  "description": "Custom base URL for the provider API (optional)."
197
+ },
198
+ "settings": {
199
+ "type": "object",
200
+ "properties": {
201
+ "temperature": {
202
+ "type": "number",
203
+ "minimum": 0,
204
+ "maximum": 2,
205
+ "description": "Controls randomness in model outputs (0=deterministic, 2=very random). Some models like GPT-5 require temperature=1."
206
+ }
207
+ },
208
+ "additionalProperties": false,
209
+ "description": "Model-specific settings for translation requests."
193
210
  }
194
211
  },
195
212
  "required": [
package/build/index.cjs CHANGED
@@ -352,6 +352,7 @@ var bucketTypes = [
352
352
  "json5",
353
353
  "jsonc",
354
354
  "markdown",
355
+ "markdoc",
355
356
  "mdx",
356
357
  "xcode-strings",
357
358
  "xcode-stringsdict",
@@ -423,7 +424,7 @@ ${localeErrors.join("\n")}`);
423
424
  });
424
425
  };
425
426
  var configV0Schema = _zod2.default.object({
426
- version: _zod2.default.number().default(0).describe("The version number of the schema.")
427
+ version: _zod2.default.union([_zod2.default.number(), _zod2.default.string()]).default(0).describe("The version number of the schema.")
427
428
  });
428
429
  var configV0Definition = createConfigDefinition({
429
430
  schema: configV0Schema,
@@ -678,7 +679,44 @@ var configV1_9Definition = extendConfigDefinition(
678
679
  })
679
680
  }
680
681
  );
681
- var LATEST_CONFIG_DEFINITION = configV1_9Definition;
682
+ var modelSettingsSchema = _zod2.default.object({
683
+ temperature: _zod2.default.number().min(0).max(2).optional().describe(
684
+ "Controls randomness in model outputs (0=deterministic, 2=very random). Some models like GPT-5 require temperature=1."
685
+ )
686
+ }).optional().describe("Model-specific settings for translation requests.");
687
+ var providerSchemaV1_10 = _zod2.default.object({
688
+ id: _zod2.default.enum([
689
+ "openai",
690
+ "anthropic",
691
+ "google",
692
+ "ollama",
693
+ "openrouter",
694
+ "mistral"
695
+ ]).describe("Identifier of the translation provider service."),
696
+ model: _zod2.default.string().describe("Model name to use for translations."),
697
+ prompt: _zod2.default.string().describe(
698
+ "Prompt template used when requesting translations."
699
+ ),
700
+ baseUrl: _zod2.default.string().optional().describe("Custom base URL for the provider API (optional)."),
701
+ settings: modelSettingsSchema
702
+ }).describe("Configuration for the machine-translation provider.");
703
+ var configV1_10Definition = extendConfigDefinition(
704
+ configV1_9Definition,
705
+ {
706
+ createSchema: (baseSchema) => baseSchema.extend({
707
+ provider: providerSchemaV1_10.optional()
708
+ }),
709
+ createDefaultValue: (baseDefaultValue) => ({
710
+ ...baseDefaultValue,
711
+ version: "1.10"
712
+ }),
713
+ createUpgrader: (oldConfig) => ({
714
+ ...oldConfig,
715
+ version: "1.10"
716
+ })
717
+ }
718
+ );
719
+ var LATEST_CONFIG_DEFINITION = configV1_10Definition;
682
720
  function parseI18nConfig(rawConfig) {
683
721
  try {
684
722
  const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
@@ -721,4 +759,5 @@ var defaultConfig = LATEST_CONFIG_DEFINITION.defaultValue;
721
759
 
722
760
 
723
761
 
724
- exports.LATEST_CONFIG_DEFINITION = LATEST_CONFIG_DEFINITION; exports.bucketItemSchema = bucketItemSchema; exports.bucketTypeSchema = bucketTypeSchema; exports.bucketTypes = bucketTypes; exports.bucketValueSchemaV1_3 = bucketValueSchemaV1_3; exports.bucketValueSchemaV1_6 = bucketValueSchemaV1_6; exports.bucketValueSchemaV1_7 = bucketValueSchemaV1_7; exports.bucketValueSchemaV1_8 = bucketValueSchemaV1_8; exports.configV0Definition = configV0Definition; exports.configV1Definition = configV1Definition; exports.configV1_1Definition = configV1_1Definition; exports.configV1_2Definition = configV1_2Definition; exports.configV1_3Definition = configV1_3Definition; exports.configV1_4Definition = configV1_4Definition; exports.configV1_5Definition = configV1_5Definition; exports.configV1_6Definition = configV1_6Definition; exports.configV1_7Definition = configV1_7Definition; exports.configV1_8Definition = configV1_8Definition; exports.configV1_9Definition = configV1_9Definition; exports.defaultConfig = defaultConfig; exports.getLocaleCodeDelimiter = getLocaleCodeDelimiter; exports.localeCodeSchema = localeCodeSchema; exports.localeCodes = localeCodes; exports.localeCodesFull = localeCodesFull; exports.localeCodesFullExplicitRegion = localeCodesFullExplicitRegion; exports.localeCodesFullUnderscore = localeCodesFullUnderscore; exports.localeCodesShort = localeCodesShort; exports.localeSchema = localeSchema; exports.normalizeLocale = normalizeLocale; exports.parseI18nConfig = parseI18nConfig; exports.resolveLocaleCode = resolveLocaleCode; exports.resolveOverriddenLocale = resolveOverriddenLocale;
762
+
763
+ exports.LATEST_CONFIG_DEFINITION = LATEST_CONFIG_DEFINITION; exports.bucketItemSchema = bucketItemSchema; exports.bucketTypeSchema = bucketTypeSchema; exports.bucketTypes = bucketTypes; exports.bucketValueSchemaV1_3 = bucketValueSchemaV1_3; exports.bucketValueSchemaV1_6 = bucketValueSchemaV1_6; exports.bucketValueSchemaV1_7 = bucketValueSchemaV1_7; exports.bucketValueSchemaV1_8 = bucketValueSchemaV1_8; exports.configV0Definition = configV0Definition; exports.configV1Definition = configV1Definition; exports.configV1_10Definition = configV1_10Definition; exports.configV1_1Definition = configV1_1Definition; exports.configV1_2Definition = configV1_2Definition; exports.configV1_3Definition = configV1_3Definition; exports.configV1_4Definition = configV1_4Definition; exports.configV1_5Definition = configV1_5Definition; exports.configV1_6Definition = configV1_6Definition; exports.configV1_7Definition = configV1_7Definition; exports.configV1_8Definition = configV1_8Definition; exports.configV1_9Definition = configV1_9Definition; exports.defaultConfig = defaultConfig; exports.getLocaleCodeDelimiter = getLocaleCodeDelimiter; exports.localeCodeSchema = localeCodeSchema; exports.localeCodes = localeCodes; exports.localeCodesFull = localeCodesFull; exports.localeCodesFullExplicitRegion = localeCodesFullExplicitRegion; exports.localeCodesFullUnderscore = localeCodesFullUnderscore; exports.localeCodesShort = localeCodesShort; exports.localeSchema = localeSchema; exports.normalizeLocale = normalizeLocale; exports.parseI18nConfig = parseI18nConfig; exports.resolveLocaleCode = resolveLocaleCode; exports.resolveOverriddenLocale = resolveOverriddenLocale;
package/build/index.d.cts CHANGED
@@ -119,8 +119,8 @@ declare const resolveOverriddenLocale: (locale: string, delimiter?: LocaleDelimi
119
119
  */
120
120
  declare function normalizeLocale(locale: string): string;
121
121
 
122
- declare const bucketTypes: readonly ["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"];
123
- declare const bucketTypeSchema: Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>;
122
+ declare const bucketTypes: readonly ["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"];
123
+ declare const bucketTypeSchema: Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>;
124
124
 
125
125
  declare const localeSchema: Z.ZodObject<{
126
126
  source: Z.ZodEffects<Z.ZodString, string, string>;
@@ -138,10 +138,10 @@ type ConfigDefinition<T extends Z.ZodRawShape, _P extends Z.ZodRawShape = any> =
138
138
  parse: (rawConfig: unknown) => Z.infer<Z.ZodObject<T>>;
139
139
  };
140
140
  declare const configV0Definition: ConfigDefinition<{
141
- version: Z.ZodDefault<Z.ZodNumber>;
141
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
142
142
  }, any>;
143
143
  declare const configV1Definition: ConfigDefinition<{
144
- version: Z.ZodDefault<Z.ZodNumber>;
144
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
145
145
  } & {
146
146
  locale: Z.ZodObject<{
147
147
  source: Z.ZodEffects<Z.ZodString, string, string>;
@@ -153,10 +153,10 @@ declare const configV1Definition: ConfigDefinition<{
153
153
  source: string;
154
154
  targets: string[];
155
155
  }>;
156
- buckets: Z.ZodOptional<Z.ZodDefault<Z.ZodRecord<Z.ZodString, Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>>>>;
156
+ buckets: Z.ZodOptional<Z.ZodDefault<Z.ZodRecord<Z.ZodString, Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>>>>;
157
157
  }, any>;
158
158
  declare const configV1_1Definition: ConfigDefinition<{
159
- version: Z.ZodDefault<Z.ZodNumber>;
159
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
160
160
  locale: Z.ZodObject<{
161
161
  source: Z.ZodEffects<Z.ZodString, string, string>;
162
162
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -168,7 +168,7 @@ declare const configV1_1Definition: ConfigDefinition<{
168
168
  targets: string[];
169
169
  }>;
170
170
  } & {
171
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
171
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
172
172
  include: Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>;
173
173
  exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
174
174
  }, "strip", Z.ZodTypeAny, {
@@ -180,8 +180,8 @@ declare const configV1_1Definition: ConfigDefinition<{
180
180
  }>>>;
181
181
  }, any>;
182
182
  declare const configV1_2Definition: ConfigDefinition<{
183
- version: Z.ZodDefault<Z.ZodNumber>;
184
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
183
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
184
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
185
185
  include: Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>;
186
186
  exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
187
187
  }, "strip", Z.ZodTypeAny, {
@@ -262,7 +262,7 @@ declare const bucketValueSchemaV1_3: Z.ZodObject<{
262
262
  injectLocale?: string[] | undefined;
263
263
  }>;
264
264
  declare const configV1_3Definition: ConfigDefinition<{
265
- version: Z.ZodDefault<Z.ZodNumber>;
265
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
266
266
  locale: Z.ZodObject<{
267
267
  source: Z.ZodEffects<Z.ZodString, string, string>;
268
268
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -278,7 +278,7 @@ declare const configV1_3Definition: ConfigDefinition<{
278
278
  extraSource?: string | undefined;
279
279
  }>;
280
280
  } & {
281
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
281
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
282
282
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
283
283
  path: Z.ZodString;
284
284
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -323,7 +323,7 @@ declare const configV1_3Definition: ConfigDefinition<{
323
323
  }>>>;
324
324
  }, any>;
325
325
  declare const configV1_4Definition: ConfigDefinition<{
326
- version: Z.ZodDefault<Z.ZodNumber>;
326
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
327
327
  locale: Z.ZodObject<{
328
328
  source: Z.ZodEffects<Z.ZodString, string, string>;
329
329
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -339,7 +339,7 @@ declare const configV1_4Definition: ConfigDefinition<{
339
339
  extraSource?: string | undefined;
340
340
  }>;
341
341
  } & {
342
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
342
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
343
343
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
344
344
  path: Z.ZodString;
345
345
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -386,7 +386,7 @@ declare const configV1_4Definition: ConfigDefinition<{
386
386
  $schema: Z.ZodDefault<Z.ZodString>;
387
387
  }, any>;
388
388
  declare const configV1_5Definition: ConfigDefinition<{
389
- version: Z.ZodDefault<Z.ZodNumber>;
389
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
390
390
  locale: Z.ZodObject<{
391
391
  source: Z.ZodEffects<Z.ZodString, string, string>;
392
392
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -402,7 +402,7 @@ declare const configV1_5Definition: ConfigDefinition<{
402
402
  extraSource?: string | undefined;
403
403
  }>;
404
404
  } & {
405
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
405
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
406
406
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
407
407
  path: Z.ZodString;
408
408
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -513,7 +513,7 @@ declare const bucketValueSchemaV1_6: Z.ZodObject<{
513
513
  lockedKeys?: string[] | undefined;
514
514
  }>;
515
515
  declare const configV1_6Definition: ConfigDefinition<{
516
- version: Z.ZodDefault<Z.ZodNumber>;
516
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
517
517
  locale: Z.ZodObject<{
518
518
  source: Z.ZodEffects<Z.ZodString, string, string>;
519
519
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -546,7 +546,7 @@ declare const configV1_6Definition: ConfigDefinition<{
546
546
  baseUrl?: string | undefined;
547
547
  }>>;
548
548
  } & {
549
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
549
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
550
550
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
551
551
  path: Z.ZodString;
552
552
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -646,7 +646,7 @@ declare const bucketValueSchemaV1_7: Z.ZodObject<{
646
646
  lockedPatterns?: string[] | undefined;
647
647
  }>;
648
648
  declare const configV1_7Definition: ConfigDefinition<{
649
- version: Z.ZodDefault<Z.ZodNumber>;
649
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
650
650
  locale: Z.ZodObject<{
651
651
  source: Z.ZodEffects<Z.ZodString, string, string>;
652
652
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -679,7 +679,7 @@ declare const configV1_7Definition: ConfigDefinition<{
679
679
  baseUrl?: string | undefined;
680
680
  }>>;
681
681
  } & {
682
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
682
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
683
683
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
684
684
  path: Z.ZodString;
685
685
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -787,7 +787,7 @@ declare const bucketValueSchemaV1_8: Z.ZodObject<{
787
787
  ignoredKeys?: string[] | undefined;
788
788
  }>;
789
789
  declare const configV1_8Definition: ConfigDefinition<{
790
- version: Z.ZodDefault<Z.ZodNumber>;
790
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
791
791
  locale: Z.ZodObject<{
792
792
  source: Z.ZodEffects<Z.ZodString, string, string>;
793
793
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -820,7 +820,7 @@ declare const configV1_8Definition: ConfigDefinition<{
820
820
  baseUrl?: string | undefined;
821
821
  }>>;
822
822
  } & {
823
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
823
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
824
824
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
825
825
  path: Z.ZodString;
826
826
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -877,7 +877,7 @@ declare const configV1_8Definition: ConfigDefinition<{
877
877
  }>>>;
878
878
  }, any>;
879
879
  declare const configV1_9Definition: ConfigDefinition<{
880
- version: Z.ZodDefault<Z.ZodNumber>;
880
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
881
881
  locale: Z.ZodObject<{
882
882
  source: Z.ZodEffects<Z.ZodString, string, string>;
883
883
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -910,7 +910,7 @@ declare const configV1_9Definition: ConfigDefinition<{
910
910
  baseUrl?: string | undefined;
911
911
  }>>;
912
912
  } & {
913
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
913
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
914
914
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
915
915
  path: Z.ZodString;
916
916
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -968,8 +968,8 @@ declare const configV1_9Definition: ConfigDefinition<{
968
968
  } & {
969
969
  formatter: Z.ZodOptional<Z.ZodEnum<["prettier", "biome"]>>;
970
970
  }, any>;
971
- declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
972
- version: Z.ZodDefault<Z.ZodNumber>;
971
+ declare const configV1_10Definition: ConfigDefinition<{
972
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
973
973
  locale: Z.ZodObject<{
974
974
  source: Z.ZodEffects<Z.ZodString, string, string>;
975
975
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -985,24 +985,111 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
985
985
  extraSource?: string | undefined;
986
986
  }>;
987
987
  $schema: Z.ZodDefault<Z.ZodString>;
988
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
989
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
990
+ path: Z.ZodString;
991
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
992
+ }, "strip", Z.ZodTypeAny, {
993
+ path: string;
994
+ delimiter?: "-" | "_" | null | undefined;
995
+ }, {
996
+ path: string;
997
+ delimiter?: "-" | "_" | null | undefined;
998
+ }>]>, "many">>;
999
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
1000
+ path: Z.ZodString;
1001
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
1002
+ }, "strip", Z.ZodTypeAny, {
1003
+ path: string;
1004
+ delimiter?: "-" | "_" | null | undefined;
1005
+ }, {
1006
+ path: string;
1007
+ delimiter?: "-" | "_" | null | undefined;
1008
+ }>]>, "many">>>;
1009
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
1010
+ } & {
1011
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
1012
+ } & {
1013
+ lockedPatterns: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
1014
+ } & {
1015
+ ignoredKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
1016
+ }, "strip", Z.ZodTypeAny, {
1017
+ include: (string | {
1018
+ path: string;
1019
+ delimiter?: "-" | "_" | null | undefined;
1020
+ })[];
1021
+ exclude?: (string | {
1022
+ path: string;
1023
+ delimiter?: "-" | "_" | null | undefined;
1024
+ })[] | undefined;
1025
+ injectLocale?: string[] | undefined;
1026
+ lockedKeys?: string[] | undefined;
1027
+ lockedPatterns?: string[] | undefined;
1028
+ ignoredKeys?: string[] | undefined;
1029
+ }, {
1030
+ exclude?: (string | {
1031
+ path: string;
1032
+ delimiter?: "-" | "_" | null | undefined;
1033
+ })[] | undefined;
1034
+ include?: (string | {
1035
+ path: string;
1036
+ delimiter?: "-" | "_" | null | undefined;
1037
+ })[] | undefined;
1038
+ injectLocale?: string[] | undefined;
1039
+ lockedKeys?: string[] | undefined;
1040
+ lockedPatterns?: string[] | undefined;
1041
+ ignoredKeys?: string[] | undefined;
1042
+ }>>>;
1043
+ formatter: Z.ZodOptional<Z.ZodEnum<["prettier", "biome"]>>;
1044
+ } & {
988
1045
  provider: Z.ZodOptional<Z.ZodObject<{
989
1046
  id: Z.ZodEnum<["openai", "anthropic", "google", "ollama", "openrouter", "mistral"]>;
990
1047
  model: Z.ZodString;
991
1048
  prompt: Z.ZodString;
992
1049
  baseUrl: Z.ZodOptional<Z.ZodString>;
1050
+ settings: Z.ZodOptional<Z.ZodObject<{
1051
+ temperature: Z.ZodOptional<Z.ZodNumber>;
1052
+ }, "strip", Z.ZodTypeAny, {
1053
+ temperature?: number | undefined;
1054
+ }, {
1055
+ temperature?: number | undefined;
1056
+ }>>;
993
1057
  }, "strip", Z.ZodTypeAny, {
994
1058
  id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
995
1059
  model: string;
996
1060
  prompt: string;
997
1061
  baseUrl?: string | undefined;
1062
+ settings?: {
1063
+ temperature?: number | undefined;
1064
+ } | undefined;
998
1065
  }, {
999
1066
  id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
1000
1067
  model: string;
1001
1068
  prompt: string;
1002
1069
  baseUrl?: string | undefined;
1070
+ settings?: {
1071
+ temperature?: number | undefined;
1072
+ } | undefined;
1003
1073
  }>>;
1004
- } & {
1005
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
1074
+ }, any>;
1075
+ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
1076
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
1077
+ locale: Z.ZodObject<{
1078
+ source: Z.ZodEffects<Z.ZodString, string, string>;
1079
+ targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
1080
+ } & {
1081
+ extraSource: Z.ZodOptional<Z.ZodEffects<Z.ZodString, string, string>>;
1082
+ }, "strip", Z.ZodTypeAny, {
1083
+ source: string;
1084
+ targets: string[];
1085
+ extraSource?: string | undefined;
1086
+ }, {
1087
+ source: string;
1088
+ targets: string[];
1089
+ extraSource?: string | undefined;
1090
+ }>;
1091
+ $schema: Z.ZodDefault<Z.ZodString>;
1092
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
1006
1093
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
1007
1094
  path: Z.ZodString;
1008
1095
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -1057,18 +1144,47 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
1057
1144
  lockedPatterns?: string[] | undefined;
1058
1145
  ignoredKeys?: string[] | undefined;
1059
1146
  }>>>;
1060
- } & {
1061
1147
  formatter: Z.ZodOptional<Z.ZodEnum<["prettier", "biome"]>>;
1148
+ } & {
1149
+ provider: Z.ZodOptional<Z.ZodObject<{
1150
+ id: Z.ZodEnum<["openai", "anthropic", "google", "ollama", "openrouter", "mistral"]>;
1151
+ model: Z.ZodString;
1152
+ prompt: Z.ZodString;
1153
+ baseUrl: Z.ZodOptional<Z.ZodString>;
1154
+ settings: Z.ZodOptional<Z.ZodObject<{
1155
+ temperature: Z.ZodOptional<Z.ZodNumber>;
1156
+ }, "strip", Z.ZodTypeAny, {
1157
+ temperature?: number | undefined;
1158
+ }, {
1159
+ temperature?: number | undefined;
1160
+ }>>;
1161
+ }, "strip", Z.ZodTypeAny, {
1162
+ id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
1163
+ model: string;
1164
+ prompt: string;
1165
+ baseUrl?: string | undefined;
1166
+ settings?: {
1167
+ temperature?: number | undefined;
1168
+ } | undefined;
1169
+ }, {
1170
+ id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
1171
+ model: string;
1172
+ prompt: string;
1173
+ baseUrl?: string | undefined;
1174
+ settings?: {
1175
+ temperature?: number | undefined;
1176
+ } | undefined;
1177
+ }>>;
1062
1178
  }, any>;
1063
1179
  type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
1064
1180
  declare function parseI18nConfig(rawConfig: unknown): {
1065
- version: number;
1181
+ version: string | number;
1066
1182
  locale: {
1067
1183
  source: string;
1068
1184
  targets: string[];
1069
1185
  extraSource?: string | undefined;
1070
1186
  };
1071
- buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "json5" | "jsonc" | "markdown" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
1187
+ buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "json5" | "jsonc" | "markdown" | "markdoc" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
1072
1188
  include: (string | {
1073
1189
  path: string;
1074
1190
  delimiter?: "-" | "_" | null | undefined;
@@ -1088,17 +1204,20 @@ declare function parseI18nConfig(rawConfig: unknown): {
1088
1204
  model: string;
1089
1205
  prompt: string;
1090
1206
  baseUrl?: string | undefined;
1207
+ settings?: {
1208
+ temperature?: number | undefined;
1209
+ } | undefined;
1091
1210
  } | undefined;
1092
1211
  formatter?: "prettier" | "biome" | undefined;
1093
1212
  };
1094
1213
  declare const defaultConfig: {
1095
- version: number;
1214
+ version: string | number;
1096
1215
  locale: {
1097
1216
  source: string;
1098
1217
  targets: string[];
1099
1218
  extraSource?: string | undefined;
1100
1219
  };
1101
- buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "json5" | "jsonc" | "markdown" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
1220
+ buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "json5" | "jsonc" | "markdown" | "markdoc" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
1102
1221
  include: (string | {
1103
1222
  path: string;
1104
1223
  delimiter?: "-" | "_" | null | undefined;
@@ -1118,8 +1237,11 @@ declare const defaultConfig: {
1118
1237
  model: string;
1119
1238
  prompt: string;
1120
1239
  baseUrl?: string | undefined;
1240
+ settings?: {
1241
+ temperature?: number | undefined;
1242
+ } | undefined;
1121
1243
  } | undefined;
1122
1244
  formatter?: "prettier" | "biome" | undefined;
1123
1245
  };
1124
1246
 
1125
- export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, bucketValueSchemaV1_3, bucketValueSchemaV1_6, bucketValueSchemaV1_7, bucketValueSchemaV1_8, configV0Definition, configV1Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, configV1_7Definition, configV1_8Definition, configV1_9Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
1247
+ export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, bucketValueSchemaV1_3, bucketValueSchemaV1_6, bucketValueSchemaV1_7, bucketValueSchemaV1_8, configV0Definition, configV1Definition, configV1_10Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, configV1_7Definition, configV1_8Definition, configV1_9Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
package/build/index.d.ts CHANGED
@@ -119,8 +119,8 @@ declare const resolveOverriddenLocale: (locale: string, delimiter?: LocaleDelimi
119
119
  */
120
120
  declare function normalizeLocale(locale: string): string;
121
121
 
122
- declare const bucketTypes: readonly ["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"];
123
- declare const bucketTypeSchema: Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>;
122
+ declare const bucketTypes: readonly ["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"];
123
+ declare const bucketTypeSchema: Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>;
124
124
 
125
125
  declare const localeSchema: Z.ZodObject<{
126
126
  source: Z.ZodEffects<Z.ZodString, string, string>;
@@ -138,10 +138,10 @@ type ConfigDefinition<T extends Z.ZodRawShape, _P extends Z.ZodRawShape = any> =
138
138
  parse: (rawConfig: unknown) => Z.infer<Z.ZodObject<T>>;
139
139
  };
140
140
  declare const configV0Definition: ConfigDefinition<{
141
- version: Z.ZodDefault<Z.ZodNumber>;
141
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
142
142
  }, any>;
143
143
  declare const configV1Definition: ConfigDefinition<{
144
- version: Z.ZodDefault<Z.ZodNumber>;
144
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
145
145
  } & {
146
146
  locale: Z.ZodObject<{
147
147
  source: Z.ZodEffects<Z.ZodString, string, string>;
@@ -153,10 +153,10 @@ declare const configV1Definition: ConfigDefinition<{
153
153
  source: string;
154
154
  targets: string[];
155
155
  }>;
156
- buckets: Z.ZodOptional<Z.ZodDefault<Z.ZodRecord<Z.ZodString, Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>>>>;
156
+ buckets: Z.ZodOptional<Z.ZodDefault<Z.ZodRecord<Z.ZodString, Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>>>>;
157
157
  }, any>;
158
158
  declare const configV1_1Definition: ConfigDefinition<{
159
- version: Z.ZodDefault<Z.ZodNumber>;
159
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
160
160
  locale: Z.ZodObject<{
161
161
  source: Z.ZodEffects<Z.ZodString, string, string>;
162
162
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -168,7 +168,7 @@ declare const configV1_1Definition: ConfigDefinition<{
168
168
  targets: string[];
169
169
  }>;
170
170
  } & {
171
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
171
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
172
172
  include: Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>;
173
173
  exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
174
174
  }, "strip", Z.ZodTypeAny, {
@@ -180,8 +180,8 @@ declare const configV1_1Definition: ConfigDefinition<{
180
180
  }>>>;
181
181
  }, any>;
182
182
  declare const configV1_2Definition: ConfigDefinition<{
183
- version: Z.ZodDefault<Z.ZodNumber>;
184
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
183
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
184
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
185
185
  include: Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>;
186
186
  exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
187
187
  }, "strip", Z.ZodTypeAny, {
@@ -262,7 +262,7 @@ declare const bucketValueSchemaV1_3: Z.ZodObject<{
262
262
  injectLocale?: string[] | undefined;
263
263
  }>;
264
264
  declare const configV1_3Definition: ConfigDefinition<{
265
- version: Z.ZodDefault<Z.ZodNumber>;
265
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
266
266
  locale: Z.ZodObject<{
267
267
  source: Z.ZodEffects<Z.ZodString, string, string>;
268
268
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -278,7 +278,7 @@ declare const configV1_3Definition: ConfigDefinition<{
278
278
  extraSource?: string | undefined;
279
279
  }>;
280
280
  } & {
281
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
281
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
282
282
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
283
283
  path: Z.ZodString;
284
284
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -323,7 +323,7 @@ declare const configV1_3Definition: ConfigDefinition<{
323
323
  }>>>;
324
324
  }, any>;
325
325
  declare const configV1_4Definition: ConfigDefinition<{
326
- version: Z.ZodDefault<Z.ZodNumber>;
326
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
327
327
  locale: Z.ZodObject<{
328
328
  source: Z.ZodEffects<Z.ZodString, string, string>;
329
329
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -339,7 +339,7 @@ declare const configV1_4Definition: ConfigDefinition<{
339
339
  extraSource?: string | undefined;
340
340
  }>;
341
341
  } & {
342
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
342
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
343
343
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
344
344
  path: Z.ZodString;
345
345
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -386,7 +386,7 @@ declare const configV1_4Definition: ConfigDefinition<{
386
386
  $schema: Z.ZodDefault<Z.ZodString>;
387
387
  }, any>;
388
388
  declare const configV1_5Definition: ConfigDefinition<{
389
- version: Z.ZodDefault<Z.ZodNumber>;
389
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
390
390
  locale: Z.ZodObject<{
391
391
  source: Z.ZodEffects<Z.ZodString, string, string>;
392
392
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -402,7 +402,7 @@ declare const configV1_5Definition: ConfigDefinition<{
402
402
  extraSource?: string | undefined;
403
403
  }>;
404
404
  } & {
405
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
405
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
406
406
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
407
407
  path: Z.ZodString;
408
408
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -513,7 +513,7 @@ declare const bucketValueSchemaV1_6: Z.ZodObject<{
513
513
  lockedKeys?: string[] | undefined;
514
514
  }>;
515
515
  declare const configV1_6Definition: ConfigDefinition<{
516
- version: Z.ZodDefault<Z.ZodNumber>;
516
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
517
517
  locale: Z.ZodObject<{
518
518
  source: Z.ZodEffects<Z.ZodString, string, string>;
519
519
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -546,7 +546,7 @@ declare const configV1_6Definition: ConfigDefinition<{
546
546
  baseUrl?: string | undefined;
547
547
  }>>;
548
548
  } & {
549
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
549
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
550
550
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
551
551
  path: Z.ZodString;
552
552
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -646,7 +646,7 @@ declare const bucketValueSchemaV1_7: Z.ZodObject<{
646
646
  lockedPatterns?: string[] | undefined;
647
647
  }>;
648
648
  declare const configV1_7Definition: ConfigDefinition<{
649
- version: Z.ZodDefault<Z.ZodNumber>;
649
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
650
650
  locale: Z.ZodObject<{
651
651
  source: Z.ZodEffects<Z.ZodString, string, string>;
652
652
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -679,7 +679,7 @@ declare const configV1_7Definition: ConfigDefinition<{
679
679
  baseUrl?: string | undefined;
680
680
  }>>;
681
681
  } & {
682
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
682
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
683
683
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
684
684
  path: Z.ZodString;
685
685
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -787,7 +787,7 @@ declare const bucketValueSchemaV1_8: Z.ZodObject<{
787
787
  ignoredKeys?: string[] | undefined;
788
788
  }>;
789
789
  declare const configV1_8Definition: ConfigDefinition<{
790
- version: Z.ZodDefault<Z.ZodNumber>;
790
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
791
791
  locale: Z.ZodObject<{
792
792
  source: Z.ZodEffects<Z.ZodString, string, string>;
793
793
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -820,7 +820,7 @@ declare const configV1_8Definition: ConfigDefinition<{
820
820
  baseUrl?: string | undefined;
821
821
  }>>;
822
822
  } & {
823
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
823
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
824
824
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
825
825
  path: Z.ZodString;
826
826
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -877,7 +877,7 @@ declare const configV1_8Definition: ConfigDefinition<{
877
877
  }>>>;
878
878
  }, any>;
879
879
  declare const configV1_9Definition: ConfigDefinition<{
880
- version: Z.ZodDefault<Z.ZodNumber>;
880
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
881
881
  locale: Z.ZodObject<{
882
882
  source: Z.ZodEffects<Z.ZodString, string, string>;
883
883
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -910,7 +910,7 @@ declare const configV1_9Definition: ConfigDefinition<{
910
910
  baseUrl?: string | undefined;
911
911
  }>>;
912
912
  } & {
913
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
913
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
914
914
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
915
915
  path: Z.ZodString;
916
916
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -968,8 +968,8 @@ declare const configV1_9Definition: ConfigDefinition<{
968
968
  } & {
969
969
  formatter: Z.ZodOptional<Z.ZodEnum<["prettier", "biome"]>>;
970
970
  }, any>;
971
- declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
972
- version: Z.ZodDefault<Z.ZodNumber>;
971
+ declare const configV1_10Definition: ConfigDefinition<{
972
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
973
973
  locale: Z.ZodObject<{
974
974
  source: Z.ZodEffects<Z.ZodString, string, string>;
975
975
  targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
@@ -985,24 +985,111 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
985
985
  extraSource?: string | undefined;
986
986
  }>;
987
987
  $schema: Z.ZodDefault<Z.ZodString>;
988
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
989
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
990
+ path: Z.ZodString;
991
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
992
+ }, "strip", Z.ZodTypeAny, {
993
+ path: string;
994
+ delimiter?: "-" | "_" | null | undefined;
995
+ }, {
996
+ path: string;
997
+ delimiter?: "-" | "_" | null | undefined;
998
+ }>]>, "many">>;
999
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
1000
+ path: Z.ZodString;
1001
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
1002
+ }, "strip", Z.ZodTypeAny, {
1003
+ path: string;
1004
+ delimiter?: "-" | "_" | null | undefined;
1005
+ }, {
1006
+ path: string;
1007
+ delimiter?: "-" | "_" | null | undefined;
1008
+ }>]>, "many">>>;
1009
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
1010
+ } & {
1011
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
1012
+ } & {
1013
+ lockedPatterns: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
1014
+ } & {
1015
+ ignoredKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
1016
+ }, "strip", Z.ZodTypeAny, {
1017
+ include: (string | {
1018
+ path: string;
1019
+ delimiter?: "-" | "_" | null | undefined;
1020
+ })[];
1021
+ exclude?: (string | {
1022
+ path: string;
1023
+ delimiter?: "-" | "_" | null | undefined;
1024
+ })[] | undefined;
1025
+ injectLocale?: string[] | undefined;
1026
+ lockedKeys?: string[] | undefined;
1027
+ lockedPatterns?: string[] | undefined;
1028
+ ignoredKeys?: string[] | undefined;
1029
+ }, {
1030
+ exclude?: (string | {
1031
+ path: string;
1032
+ delimiter?: "-" | "_" | null | undefined;
1033
+ })[] | undefined;
1034
+ include?: (string | {
1035
+ path: string;
1036
+ delimiter?: "-" | "_" | null | undefined;
1037
+ })[] | undefined;
1038
+ injectLocale?: string[] | undefined;
1039
+ lockedKeys?: string[] | undefined;
1040
+ lockedPatterns?: string[] | undefined;
1041
+ ignoredKeys?: string[] | undefined;
1042
+ }>>>;
1043
+ formatter: Z.ZodOptional<Z.ZodEnum<["prettier", "biome"]>>;
1044
+ } & {
988
1045
  provider: Z.ZodOptional<Z.ZodObject<{
989
1046
  id: Z.ZodEnum<["openai", "anthropic", "google", "ollama", "openrouter", "mistral"]>;
990
1047
  model: Z.ZodString;
991
1048
  prompt: Z.ZodString;
992
1049
  baseUrl: Z.ZodOptional<Z.ZodString>;
1050
+ settings: Z.ZodOptional<Z.ZodObject<{
1051
+ temperature: Z.ZodOptional<Z.ZodNumber>;
1052
+ }, "strip", Z.ZodTypeAny, {
1053
+ temperature?: number | undefined;
1054
+ }, {
1055
+ temperature?: number | undefined;
1056
+ }>>;
993
1057
  }, "strip", Z.ZodTypeAny, {
994
1058
  id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
995
1059
  model: string;
996
1060
  prompt: string;
997
1061
  baseUrl?: string | undefined;
1062
+ settings?: {
1063
+ temperature?: number | undefined;
1064
+ } | undefined;
998
1065
  }, {
999
1066
  id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
1000
1067
  model: string;
1001
1068
  prompt: string;
1002
1069
  baseUrl?: string | undefined;
1070
+ settings?: {
1071
+ temperature?: number | undefined;
1072
+ } | undefined;
1003
1073
  }>>;
1004
- } & {
1005
- buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
1074
+ }, any>;
1075
+ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
1076
+ version: Z.ZodDefault<Z.ZodUnion<[Z.ZodNumber, Z.ZodString]>>;
1077
+ locale: Z.ZodObject<{
1078
+ source: Z.ZodEffects<Z.ZodString, string, string>;
1079
+ targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
1080
+ } & {
1081
+ extraSource: Z.ZodOptional<Z.ZodEffects<Z.ZodString, string, string>>;
1082
+ }, "strip", Z.ZodTypeAny, {
1083
+ source: string;
1084
+ targets: string[];
1085
+ extraSource?: string | undefined;
1086
+ }, {
1087
+ source: string;
1088
+ targets: string[];
1089
+ extraSource?: string | undefined;
1090
+ }>;
1091
+ $schema: Z.ZodDefault<Z.ZodString>;
1092
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "markdoc", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
1006
1093
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
1007
1094
  path: Z.ZodString;
1008
1095
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -1057,18 +1144,47 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
1057
1144
  lockedPatterns?: string[] | undefined;
1058
1145
  ignoredKeys?: string[] | undefined;
1059
1146
  }>>>;
1060
- } & {
1061
1147
  formatter: Z.ZodOptional<Z.ZodEnum<["prettier", "biome"]>>;
1148
+ } & {
1149
+ provider: Z.ZodOptional<Z.ZodObject<{
1150
+ id: Z.ZodEnum<["openai", "anthropic", "google", "ollama", "openrouter", "mistral"]>;
1151
+ model: Z.ZodString;
1152
+ prompt: Z.ZodString;
1153
+ baseUrl: Z.ZodOptional<Z.ZodString>;
1154
+ settings: Z.ZodOptional<Z.ZodObject<{
1155
+ temperature: Z.ZodOptional<Z.ZodNumber>;
1156
+ }, "strip", Z.ZodTypeAny, {
1157
+ temperature?: number | undefined;
1158
+ }, {
1159
+ temperature?: number | undefined;
1160
+ }>>;
1161
+ }, "strip", Z.ZodTypeAny, {
1162
+ id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
1163
+ model: string;
1164
+ prompt: string;
1165
+ baseUrl?: string | undefined;
1166
+ settings?: {
1167
+ temperature?: number | undefined;
1168
+ } | undefined;
1169
+ }, {
1170
+ id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
1171
+ model: string;
1172
+ prompt: string;
1173
+ baseUrl?: string | undefined;
1174
+ settings?: {
1175
+ temperature?: number | undefined;
1176
+ } | undefined;
1177
+ }>>;
1062
1178
  }, any>;
1063
1179
  type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
1064
1180
  declare function parseI18nConfig(rawConfig: unknown): {
1065
- version: number;
1181
+ version: string | number;
1066
1182
  locale: {
1067
1183
  source: string;
1068
1184
  targets: string[];
1069
1185
  extraSource?: string | undefined;
1070
1186
  };
1071
- buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "json5" | "jsonc" | "markdown" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
1187
+ buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "json5" | "jsonc" | "markdown" | "markdoc" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
1072
1188
  include: (string | {
1073
1189
  path: string;
1074
1190
  delimiter?: "-" | "_" | null | undefined;
@@ -1088,17 +1204,20 @@ declare function parseI18nConfig(rawConfig: unknown): {
1088
1204
  model: string;
1089
1205
  prompt: string;
1090
1206
  baseUrl?: string | undefined;
1207
+ settings?: {
1208
+ temperature?: number | undefined;
1209
+ } | undefined;
1091
1210
  } | undefined;
1092
1211
  formatter?: "prettier" | "biome" | undefined;
1093
1212
  };
1094
1213
  declare const defaultConfig: {
1095
- version: number;
1214
+ version: string | number;
1096
1215
  locale: {
1097
1216
  source: string;
1098
1217
  targets: string[];
1099
1218
  extraSource?: string | undefined;
1100
1219
  };
1101
- buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "json5" | "jsonc" | "markdown" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
1220
+ buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "json5" | "jsonc" | "markdown" | "markdoc" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
1102
1221
  include: (string | {
1103
1222
  path: string;
1104
1223
  delimiter?: "-" | "_" | null | undefined;
@@ -1118,8 +1237,11 @@ declare const defaultConfig: {
1118
1237
  model: string;
1119
1238
  prompt: string;
1120
1239
  baseUrl?: string | undefined;
1240
+ settings?: {
1241
+ temperature?: number | undefined;
1242
+ } | undefined;
1121
1243
  } | undefined;
1122
1244
  formatter?: "prettier" | "biome" | undefined;
1123
1245
  };
1124
1246
 
1125
- export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, bucketValueSchemaV1_3, bucketValueSchemaV1_6, bucketValueSchemaV1_7, bucketValueSchemaV1_8, configV0Definition, configV1Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, configV1_7Definition, configV1_8Definition, configV1_9Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
1247
+ export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, bucketValueSchemaV1_3, bucketValueSchemaV1_6, bucketValueSchemaV1_7, bucketValueSchemaV1_8, configV0Definition, configV1Definition, configV1_10Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, configV1_7Definition, configV1_8Definition, configV1_9Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
package/build/index.mjs CHANGED
@@ -352,6 +352,7 @@ var bucketTypes = [
352
352
  "json5",
353
353
  "jsonc",
354
354
  "markdown",
355
+ "markdoc",
355
356
  "mdx",
356
357
  "xcode-strings",
357
358
  "xcode-stringsdict",
@@ -423,7 +424,7 @@ ${localeErrors.join("\n")}`);
423
424
  });
424
425
  };
425
426
  var configV0Schema = Z3.object({
426
- version: Z3.number().default(0).describe("The version number of the schema.")
427
+ version: Z3.union([Z3.number(), Z3.string()]).default(0).describe("The version number of the schema.")
427
428
  });
428
429
  var configV0Definition = createConfigDefinition({
429
430
  schema: configV0Schema,
@@ -678,7 +679,44 @@ var configV1_9Definition = extendConfigDefinition(
678
679
  })
679
680
  }
680
681
  );
681
- var LATEST_CONFIG_DEFINITION = configV1_9Definition;
682
+ var modelSettingsSchema = Z3.object({
683
+ temperature: Z3.number().min(0).max(2).optional().describe(
684
+ "Controls randomness in model outputs (0=deterministic, 2=very random). Some models like GPT-5 require temperature=1."
685
+ )
686
+ }).optional().describe("Model-specific settings for translation requests.");
687
+ var providerSchemaV1_10 = Z3.object({
688
+ id: Z3.enum([
689
+ "openai",
690
+ "anthropic",
691
+ "google",
692
+ "ollama",
693
+ "openrouter",
694
+ "mistral"
695
+ ]).describe("Identifier of the translation provider service."),
696
+ model: Z3.string().describe("Model name to use for translations."),
697
+ prompt: Z3.string().describe(
698
+ "Prompt template used when requesting translations."
699
+ ),
700
+ baseUrl: Z3.string().optional().describe("Custom base URL for the provider API (optional)."),
701
+ settings: modelSettingsSchema
702
+ }).describe("Configuration for the machine-translation provider.");
703
+ var configV1_10Definition = extendConfigDefinition(
704
+ configV1_9Definition,
705
+ {
706
+ createSchema: (baseSchema) => baseSchema.extend({
707
+ provider: providerSchemaV1_10.optional()
708
+ }),
709
+ createDefaultValue: (baseDefaultValue) => ({
710
+ ...baseDefaultValue,
711
+ version: "1.10"
712
+ }),
713
+ createUpgrader: (oldConfig) => ({
714
+ ...oldConfig,
715
+ version: "1.10"
716
+ })
717
+ }
718
+ );
719
+ var LATEST_CONFIG_DEFINITION = configV1_10Definition;
682
720
  function parseI18nConfig(rawConfig) {
683
721
  try {
684
722
  const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
@@ -699,6 +737,7 @@ export {
699
737
  bucketValueSchemaV1_8,
700
738
  configV0Definition,
701
739
  configV1Definition,
740
+ configV1_10Definition,
702
741
  configV1_1Definition,
703
742
  configV1_2Definition,
704
743
  configV1_3Definition,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingo.dev/_spec",
3
- "version": "0.40.4",
3
+ "version": "0.41.0",
4
4
  "description": "Lingo.dev open specification",
5
5
  "private": false,
6
6
  "publishConfig": {