@lingo.dev/_spec 0.40.2 → 0.40.4

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.
@@ -199,6 +199,14 @@
199
199
  ],
200
200
  "additionalProperties": false,
201
201
  "description": "Configuration for the machine-translation provider."
202
+ },
203
+ "formatter": {
204
+ "type": "string",
205
+ "enum": [
206
+ "prettier",
207
+ "biome"
208
+ ],
209
+ "description": "Code formatter to use for all buckets. Defaults to 'prettier' if not specified and a prettier config is found."
202
210
  }
203
211
  },
204
212
  "required": [
package/build/index.cjs CHANGED
@@ -272,7 +272,13 @@ var localeMap = {
272
272
  // Kinyarwanda (Rwanda)
273
273
  rw: ["rw-RW"],
274
274
  // Georgian (Georgia)
275
- ka: ["ka-GE"]
275
+ ka: ["ka-GE"],
276
+ // Malayalam (India)
277
+ ml: ["ml-IN"],
278
+ // Armenian (Armenia)
279
+ hy: ["hy-AM"],
280
+ // Macedonian (Macedonia)
281
+ mk: ["mk-MK"]
276
282
  };
277
283
  var localeCodesShort = Object.keys(localeMap);
278
284
  var localeCodesFull = Object.values(
@@ -654,7 +660,25 @@ var configV1_8Definition = extendConfigDefinition(
654
660
  })
655
661
  }
656
662
  );
657
- var LATEST_CONFIG_DEFINITION = configV1_8Definition;
663
+ var configV1_9Definition = extendConfigDefinition(
664
+ configV1_8Definition,
665
+ {
666
+ createSchema: (baseSchema) => baseSchema.extend({
667
+ formatter: _zod2.default.enum(["prettier", "biome"]).optional().describe(
668
+ "Code formatter to use for all buckets. Defaults to 'prettier' if not specified and a prettier config is found."
669
+ )
670
+ }),
671
+ createDefaultValue: (baseDefaultValue) => ({
672
+ ...baseDefaultValue,
673
+ version: 1.9
674
+ }),
675
+ createUpgrader: (oldConfig) => ({
676
+ ...oldConfig,
677
+ version: 1.9
678
+ })
679
+ }
680
+ );
681
+ var LATEST_CONFIG_DEFINITION = configV1_9Definition;
658
682
  function parseI18nConfig(rawConfig) {
659
683
  try {
660
684
  const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
@@ -696,4 +720,5 @@ var defaultConfig = LATEST_CONFIG_DEFINITION.defaultValue;
696
720
 
697
721
 
698
722
 
699
- 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.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;
723
+
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;
package/build/index.d.cts CHANGED
@@ -69,6 +69,9 @@ declare const localeMap: {
69
69
  readonly te: readonly ["te-IN"];
70
70
  readonly rw: readonly ["rw-RW"];
71
71
  readonly ka: readonly ["ka-GE"];
72
+ readonly ml: readonly ["ml-IN"];
73
+ readonly hy: readonly ["hy-AM"];
74
+ readonly mk: readonly ["mk-MK"];
72
75
  };
73
76
  type LocaleCodeShort = keyof typeof localeMap;
74
77
  type LocaleCodeFull = (typeof localeMap)[LocaleCodeShort][number];
@@ -129,14 +132,14 @@ declare const localeSchema: Z.ZodObject<{
129
132
  source: string;
130
133
  targets: string[];
131
134
  }>;
132
- type ConfigDefinition<T extends Z.ZodRawShape, P extends Z.ZodRawShape> = {
135
+ type ConfigDefinition<T extends Z.ZodRawShape, _P extends Z.ZodRawShape = any> = {
133
136
  schema: Z.ZodObject<T>;
134
137
  defaultValue: Z.infer<Z.ZodObject<T>>;
135
138
  parse: (rawConfig: unknown) => Z.infer<Z.ZodObject<T>>;
136
139
  };
137
140
  declare const configV0Definition: ConfigDefinition<{
138
141
  version: Z.ZodDefault<Z.ZodNumber>;
139
- }, Z.ZodRawShape>;
142
+ }, any>;
140
143
  declare const configV1Definition: ConfigDefinition<{
141
144
  version: Z.ZodDefault<Z.ZodNumber>;
142
145
  } & {
@@ -151,7 +154,7 @@ declare const configV1Definition: ConfigDefinition<{
151
154
  targets: string[];
152
155
  }>;
153
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"]>>>>;
154
- }, Z.ZodRawShape>;
157
+ }, any>;
155
158
  declare const configV1_1Definition: ConfigDefinition<{
156
159
  version: Z.ZodDefault<Z.ZodNumber>;
157
160
  locale: Z.ZodObject<{
@@ -175,7 +178,7 @@ declare const configV1_1Definition: ConfigDefinition<{
175
178
  exclude?: string[] | undefined;
176
179
  include?: string[] | undefined;
177
180
  }>>>;
178
- }, Z.ZodRawShape>;
181
+ }, any>;
179
182
  declare const configV1_2Definition: ConfigDefinition<{
180
183
  version: Z.ZodDefault<Z.ZodNumber>;
181
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<{
@@ -203,7 +206,7 @@ declare const configV1_2Definition: ConfigDefinition<{
203
206
  targets: string[];
204
207
  extraSource?: string | undefined;
205
208
  }>;
206
- }, Z.ZodRawShape>;
209
+ }, any>;
207
210
  declare const bucketItemSchema: Z.ZodObject<{
208
211
  path: Z.ZodString;
209
212
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -318,7 +321,7 @@ declare const configV1_3Definition: ConfigDefinition<{
318
321
  })[] | undefined;
319
322
  injectLocale?: string[] | undefined;
320
323
  }>>>;
321
- }, Z.ZodRawShape>;
324
+ }, any>;
322
325
  declare const configV1_4Definition: ConfigDefinition<{
323
326
  version: Z.ZodDefault<Z.ZodNumber>;
324
327
  locale: Z.ZodObject<{
@@ -381,7 +384,7 @@ declare const configV1_4Definition: ConfigDefinition<{
381
384
  }>>>;
382
385
  } & {
383
386
  $schema: Z.ZodDefault<Z.ZodString>;
384
- }, Z.ZodRawShape>;
387
+ }, any>;
385
388
  declare const configV1_5Definition: ConfigDefinition<{
386
389
  version: Z.ZodDefault<Z.ZodNumber>;
387
390
  locale: Z.ZodObject<{
@@ -461,7 +464,7 @@ declare const configV1_5Definition: ConfigDefinition<{
461
464
  prompt: string;
462
465
  baseUrl?: string | undefined;
463
466
  }>>;
464
- }, Z.ZodRawShape>;
467
+ }, any>;
465
468
  declare const bucketValueSchemaV1_6: Z.ZodObject<{
466
469
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
467
470
  path: Z.ZodString;
@@ -590,7 +593,7 @@ declare const configV1_6Definition: ConfigDefinition<{
590
593
  injectLocale?: string[] | undefined;
591
594
  lockedKeys?: string[] | undefined;
592
595
  }>>>;
593
- }, Z.ZodRawShape>;
596
+ }, any>;
594
597
  declare const bucketValueSchemaV1_7: Z.ZodObject<{
595
598
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
596
599
  path: Z.ZodString;
@@ -727,7 +730,7 @@ declare const configV1_7Definition: ConfigDefinition<{
727
730
  lockedKeys?: string[] | undefined;
728
731
  lockedPatterns?: string[] | undefined;
729
732
  }>>>;
730
- }, Z.ZodRawShape>;
733
+ }, any>;
731
734
  declare const bucketValueSchemaV1_8: Z.ZodObject<{
732
735
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
733
736
  path: Z.ZodString;
@@ -872,7 +875,99 @@ declare const configV1_8Definition: ConfigDefinition<{
872
875
  lockedPatterns?: string[] | undefined;
873
876
  ignoredKeys?: string[] | undefined;
874
877
  }>>>;
875
- }, Z.ZodRawShape>;
878
+ }, any>;
879
+ declare const configV1_9Definition: ConfigDefinition<{
880
+ version: Z.ZodDefault<Z.ZodNumber>;
881
+ locale: Z.ZodObject<{
882
+ source: Z.ZodEffects<Z.ZodString, string, string>;
883
+ targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
884
+ } & {
885
+ extraSource: Z.ZodOptional<Z.ZodEffects<Z.ZodString, string, string>>;
886
+ }, "strip", Z.ZodTypeAny, {
887
+ source: string;
888
+ targets: string[];
889
+ extraSource?: string | undefined;
890
+ }, {
891
+ source: string;
892
+ targets: string[];
893
+ extraSource?: string | undefined;
894
+ }>;
895
+ $schema: Z.ZodDefault<Z.ZodString>;
896
+ provider: Z.ZodOptional<Z.ZodObject<{
897
+ id: Z.ZodEnum<["openai", "anthropic", "google", "ollama", "openrouter", "mistral"]>;
898
+ model: Z.ZodString;
899
+ prompt: Z.ZodString;
900
+ baseUrl: Z.ZodOptional<Z.ZodString>;
901
+ }, "strip", Z.ZodTypeAny, {
902
+ id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
903
+ model: string;
904
+ prompt: string;
905
+ baseUrl?: string | undefined;
906
+ }, {
907
+ id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
908
+ model: string;
909
+ prompt: string;
910
+ baseUrl?: string | undefined;
911
+ }>>;
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<{
914
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
915
+ path: Z.ZodString;
916
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
917
+ }, "strip", Z.ZodTypeAny, {
918
+ path: string;
919
+ delimiter?: "-" | "_" | null | undefined;
920
+ }, {
921
+ path: string;
922
+ delimiter?: "-" | "_" | null | undefined;
923
+ }>]>, "many">>;
924
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
925
+ path: Z.ZodString;
926
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
927
+ }, "strip", Z.ZodTypeAny, {
928
+ path: string;
929
+ delimiter?: "-" | "_" | null | undefined;
930
+ }, {
931
+ path: string;
932
+ delimiter?: "-" | "_" | null | undefined;
933
+ }>]>, "many">>>;
934
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
935
+ } & {
936
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
937
+ } & {
938
+ lockedPatterns: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
939
+ } & {
940
+ ignoredKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
941
+ }, "strip", Z.ZodTypeAny, {
942
+ include: (string | {
943
+ path: string;
944
+ delimiter?: "-" | "_" | null | undefined;
945
+ })[];
946
+ exclude?: (string | {
947
+ path: string;
948
+ delimiter?: "-" | "_" | null | undefined;
949
+ })[] | undefined;
950
+ injectLocale?: string[] | undefined;
951
+ lockedKeys?: string[] | undefined;
952
+ lockedPatterns?: string[] | undefined;
953
+ ignoredKeys?: string[] | undefined;
954
+ }, {
955
+ exclude?: (string | {
956
+ path: string;
957
+ delimiter?: "-" | "_" | null | undefined;
958
+ })[] | undefined;
959
+ include?: (string | {
960
+ path: string;
961
+ delimiter?: "-" | "_" | null | undefined;
962
+ })[] | undefined;
963
+ injectLocale?: string[] | undefined;
964
+ lockedKeys?: string[] | undefined;
965
+ lockedPatterns?: string[] | undefined;
966
+ ignoredKeys?: string[] | undefined;
967
+ }>>>;
968
+ } & {
969
+ formatter: Z.ZodOptional<Z.ZodEnum<["prettier", "biome"]>>;
970
+ }, any>;
876
971
  declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
877
972
  version: Z.ZodDefault<Z.ZodNumber>;
878
973
  locale: Z.ZodObject<{
@@ -962,7 +1057,9 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
962
1057
  lockedPatterns?: string[] | undefined;
963
1058
  ignoredKeys?: string[] | undefined;
964
1059
  }>>>;
965
- }, Z.ZodRawShape>;
1060
+ } & {
1061
+ formatter: Z.ZodOptional<Z.ZodEnum<["prettier", "biome"]>>;
1062
+ }, any>;
966
1063
  type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
967
1064
  declare function parseI18nConfig(rawConfig: unknown): {
968
1065
  version: number;
@@ -992,6 +1089,7 @@ declare function parseI18nConfig(rawConfig: unknown): {
992
1089
  prompt: string;
993
1090
  baseUrl?: string | undefined;
994
1091
  } | undefined;
1092
+ formatter?: "prettier" | "biome" | undefined;
995
1093
  };
996
1094
  declare const defaultConfig: {
997
1095
  version: number;
@@ -1021,6 +1119,7 @@ declare const defaultConfig: {
1021
1119
  prompt: string;
1022
1120
  baseUrl?: string | undefined;
1023
1121
  } | undefined;
1122
+ formatter?: "prettier" | "biome" | undefined;
1024
1123
  };
1025
1124
 
1026
- 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, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
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 };
package/build/index.d.ts CHANGED
@@ -69,6 +69,9 @@ declare const localeMap: {
69
69
  readonly te: readonly ["te-IN"];
70
70
  readonly rw: readonly ["rw-RW"];
71
71
  readonly ka: readonly ["ka-GE"];
72
+ readonly ml: readonly ["ml-IN"];
73
+ readonly hy: readonly ["hy-AM"];
74
+ readonly mk: readonly ["mk-MK"];
72
75
  };
73
76
  type LocaleCodeShort = keyof typeof localeMap;
74
77
  type LocaleCodeFull = (typeof localeMap)[LocaleCodeShort][number];
@@ -129,14 +132,14 @@ declare const localeSchema: Z.ZodObject<{
129
132
  source: string;
130
133
  targets: string[];
131
134
  }>;
132
- type ConfigDefinition<T extends Z.ZodRawShape, P extends Z.ZodRawShape> = {
135
+ type ConfigDefinition<T extends Z.ZodRawShape, _P extends Z.ZodRawShape = any> = {
133
136
  schema: Z.ZodObject<T>;
134
137
  defaultValue: Z.infer<Z.ZodObject<T>>;
135
138
  parse: (rawConfig: unknown) => Z.infer<Z.ZodObject<T>>;
136
139
  };
137
140
  declare const configV0Definition: ConfigDefinition<{
138
141
  version: Z.ZodDefault<Z.ZodNumber>;
139
- }, Z.ZodRawShape>;
142
+ }, any>;
140
143
  declare const configV1Definition: ConfigDefinition<{
141
144
  version: Z.ZodDefault<Z.ZodNumber>;
142
145
  } & {
@@ -151,7 +154,7 @@ declare const configV1Definition: ConfigDefinition<{
151
154
  targets: string[];
152
155
  }>;
153
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"]>>>>;
154
- }, Z.ZodRawShape>;
157
+ }, any>;
155
158
  declare const configV1_1Definition: ConfigDefinition<{
156
159
  version: Z.ZodDefault<Z.ZodNumber>;
157
160
  locale: Z.ZodObject<{
@@ -175,7 +178,7 @@ declare const configV1_1Definition: ConfigDefinition<{
175
178
  exclude?: string[] | undefined;
176
179
  include?: string[] | undefined;
177
180
  }>>>;
178
- }, Z.ZodRawShape>;
181
+ }, any>;
179
182
  declare const configV1_2Definition: ConfigDefinition<{
180
183
  version: Z.ZodDefault<Z.ZodNumber>;
181
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<{
@@ -203,7 +206,7 @@ declare const configV1_2Definition: ConfigDefinition<{
203
206
  targets: string[];
204
207
  extraSource?: string | undefined;
205
208
  }>;
206
- }, Z.ZodRawShape>;
209
+ }, any>;
207
210
  declare const bucketItemSchema: Z.ZodObject<{
208
211
  path: Z.ZodString;
209
212
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -318,7 +321,7 @@ declare const configV1_3Definition: ConfigDefinition<{
318
321
  })[] | undefined;
319
322
  injectLocale?: string[] | undefined;
320
323
  }>>>;
321
- }, Z.ZodRawShape>;
324
+ }, any>;
322
325
  declare const configV1_4Definition: ConfigDefinition<{
323
326
  version: Z.ZodDefault<Z.ZodNumber>;
324
327
  locale: Z.ZodObject<{
@@ -381,7 +384,7 @@ declare const configV1_4Definition: ConfigDefinition<{
381
384
  }>>>;
382
385
  } & {
383
386
  $schema: Z.ZodDefault<Z.ZodString>;
384
- }, Z.ZodRawShape>;
387
+ }, any>;
385
388
  declare const configV1_5Definition: ConfigDefinition<{
386
389
  version: Z.ZodDefault<Z.ZodNumber>;
387
390
  locale: Z.ZodObject<{
@@ -461,7 +464,7 @@ declare const configV1_5Definition: ConfigDefinition<{
461
464
  prompt: string;
462
465
  baseUrl?: string | undefined;
463
466
  }>>;
464
- }, Z.ZodRawShape>;
467
+ }, any>;
465
468
  declare const bucketValueSchemaV1_6: Z.ZodObject<{
466
469
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
467
470
  path: Z.ZodString;
@@ -590,7 +593,7 @@ declare const configV1_6Definition: ConfigDefinition<{
590
593
  injectLocale?: string[] | undefined;
591
594
  lockedKeys?: string[] | undefined;
592
595
  }>>>;
593
- }, Z.ZodRawShape>;
596
+ }, any>;
594
597
  declare const bucketValueSchemaV1_7: Z.ZodObject<{
595
598
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
596
599
  path: Z.ZodString;
@@ -727,7 +730,7 @@ declare const configV1_7Definition: ConfigDefinition<{
727
730
  lockedKeys?: string[] | undefined;
728
731
  lockedPatterns?: string[] | undefined;
729
732
  }>>>;
730
- }, Z.ZodRawShape>;
733
+ }, any>;
731
734
  declare const bucketValueSchemaV1_8: Z.ZodObject<{
732
735
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
733
736
  path: Z.ZodString;
@@ -872,7 +875,99 @@ declare const configV1_8Definition: ConfigDefinition<{
872
875
  lockedPatterns?: string[] | undefined;
873
876
  ignoredKeys?: string[] | undefined;
874
877
  }>>>;
875
- }, Z.ZodRawShape>;
878
+ }, any>;
879
+ declare const configV1_9Definition: ConfigDefinition<{
880
+ version: Z.ZodDefault<Z.ZodNumber>;
881
+ locale: Z.ZodObject<{
882
+ source: Z.ZodEffects<Z.ZodString, string, string>;
883
+ targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
884
+ } & {
885
+ extraSource: Z.ZodOptional<Z.ZodEffects<Z.ZodString, string, string>>;
886
+ }, "strip", Z.ZodTypeAny, {
887
+ source: string;
888
+ targets: string[];
889
+ extraSource?: string | undefined;
890
+ }, {
891
+ source: string;
892
+ targets: string[];
893
+ extraSource?: string | undefined;
894
+ }>;
895
+ $schema: Z.ZodDefault<Z.ZodString>;
896
+ provider: Z.ZodOptional<Z.ZodObject<{
897
+ id: Z.ZodEnum<["openai", "anthropic", "google", "ollama", "openrouter", "mistral"]>;
898
+ model: Z.ZodString;
899
+ prompt: Z.ZodString;
900
+ baseUrl: Z.ZodOptional<Z.ZodString>;
901
+ }, "strip", Z.ZodTypeAny, {
902
+ id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
903
+ model: string;
904
+ prompt: string;
905
+ baseUrl?: string | undefined;
906
+ }, {
907
+ id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
908
+ model: string;
909
+ prompt: string;
910
+ baseUrl?: string | undefined;
911
+ }>>;
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<{
914
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
915
+ path: Z.ZodString;
916
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
917
+ }, "strip", Z.ZodTypeAny, {
918
+ path: string;
919
+ delimiter?: "-" | "_" | null | undefined;
920
+ }, {
921
+ path: string;
922
+ delimiter?: "-" | "_" | null | undefined;
923
+ }>]>, "many">>;
924
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
925
+ path: Z.ZodString;
926
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
927
+ }, "strip", Z.ZodTypeAny, {
928
+ path: string;
929
+ delimiter?: "-" | "_" | null | undefined;
930
+ }, {
931
+ path: string;
932
+ delimiter?: "-" | "_" | null | undefined;
933
+ }>]>, "many">>>;
934
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
935
+ } & {
936
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
937
+ } & {
938
+ lockedPatterns: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
939
+ } & {
940
+ ignoredKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
941
+ }, "strip", Z.ZodTypeAny, {
942
+ include: (string | {
943
+ path: string;
944
+ delimiter?: "-" | "_" | null | undefined;
945
+ })[];
946
+ exclude?: (string | {
947
+ path: string;
948
+ delimiter?: "-" | "_" | null | undefined;
949
+ })[] | undefined;
950
+ injectLocale?: string[] | undefined;
951
+ lockedKeys?: string[] | undefined;
952
+ lockedPatterns?: string[] | undefined;
953
+ ignoredKeys?: string[] | undefined;
954
+ }, {
955
+ exclude?: (string | {
956
+ path: string;
957
+ delimiter?: "-" | "_" | null | undefined;
958
+ })[] | undefined;
959
+ include?: (string | {
960
+ path: string;
961
+ delimiter?: "-" | "_" | null | undefined;
962
+ })[] | undefined;
963
+ injectLocale?: string[] | undefined;
964
+ lockedKeys?: string[] | undefined;
965
+ lockedPatterns?: string[] | undefined;
966
+ ignoredKeys?: string[] | undefined;
967
+ }>>>;
968
+ } & {
969
+ formatter: Z.ZodOptional<Z.ZodEnum<["prettier", "biome"]>>;
970
+ }, any>;
876
971
  declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
877
972
  version: Z.ZodDefault<Z.ZodNumber>;
878
973
  locale: Z.ZodObject<{
@@ -962,7 +1057,9 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
962
1057
  lockedPatterns?: string[] | undefined;
963
1058
  ignoredKeys?: string[] | undefined;
964
1059
  }>>>;
965
- }, Z.ZodRawShape>;
1060
+ } & {
1061
+ formatter: Z.ZodOptional<Z.ZodEnum<["prettier", "biome"]>>;
1062
+ }, any>;
966
1063
  type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
967
1064
  declare function parseI18nConfig(rawConfig: unknown): {
968
1065
  version: number;
@@ -992,6 +1089,7 @@ declare function parseI18nConfig(rawConfig: unknown): {
992
1089
  prompt: string;
993
1090
  baseUrl?: string | undefined;
994
1091
  } | undefined;
1092
+ formatter?: "prettier" | "biome" | undefined;
995
1093
  };
996
1094
  declare const defaultConfig: {
997
1095
  version: number;
@@ -1021,6 +1119,7 @@ declare const defaultConfig: {
1021
1119
  prompt: string;
1022
1120
  baseUrl?: string | undefined;
1023
1121
  } | undefined;
1122
+ formatter?: "prettier" | "biome" | undefined;
1024
1123
  };
1025
1124
 
1026
- 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, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
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 };
package/build/index.mjs CHANGED
@@ -272,7 +272,13 @@ var localeMap = {
272
272
  // Kinyarwanda (Rwanda)
273
273
  rw: ["rw-RW"],
274
274
  // Georgian (Georgia)
275
- ka: ["ka-GE"]
275
+ ka: ["ka-GE"],
276
+ // Malayalam (India)
277
+ ml: ["ml-IN"],
278
+ // Armenian (Armenia)
279
+ hy: ["hy-AM"],
280
+ // Macedonian (Macedonia)
281
+ mk: ["mk-MK"]
276
282
  };
277
283
  var localeCodesShort = Object.keys(localeMap);
278
284
  var localeCodesFull = Object.values(
@@ -654,7 +660,25 @@ var configV1_8Definition = extendConfigDefinition(
654
660
  })
655
661
  }
656
662
  );
657
- var LATEST_CONFIG_DEFINITION = configV1_8Definition;
663
+ var configV1_9Definition = extendConfigDefinition(
664
+ configV1_8Definition,
665
+ {
666
+ createSchema: (baseSchema) => baseSchema.extend({
667
+ formatter: Z3.enum(["prettier", "biome"]).optional().describe(
668
+ "Code formatter to use for all buckets. Defaults to 'prettier' if not specified and a prettier config is found."
669
+ )
670
+ }),
671
+ createDefaultValue: (baseDefaultValue) => ({
672
+ ...baseDefaultValue,
673
+ version: 1.9
674
+ }),
675
+ createUpgrader: (oldConfig) => ({
676
+ ...oldConfig,
677
+ version: 1.9
678
+ })
679
+ }
680
+ );
681
+ var LATEST_CONFIG_DEFINITION = configV1_9Definition;
658
682
  function parseI18nConfig(rawConfig) {
659
683
  try {
660
684
  const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
@@ -683,6 +707,7 @@ export {
683
707
  configV1_6Definition,
684
708
  configV1_7Definition,
685
709
  configV1_8Definition,
710
+ configV1_9Definition,
686
711
  defaultConfig,
687
712
  getLocaleCodeDelimiter,
688
713
  localeCodeSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingo.dev/_spec",
3
- "version": "0.40.2",
3
+ "version": "0.40.4",
4
4
  "description": "Lingo.dev open specification",
5
5
  "private": false,
6
6
  "publishConfig": {