@lingo.dev/_spec 0.40.1 → 0.40.3

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
@@ -29,8 +29,13 @@ var localeMap = {
29
29
  he: ["he-IL"],
30
30
  // Estonian (Estonia)
31
31
  et: ["et-EE"],
32
- // Greek (Greece)
33
- el: ["el-GR"],
32
+ // Greek
33
+ el: [
34
+ "el-GR",
35
+ // Greece
36
+ "el-CY"
37
+ // Cyprus
38
+ ],
34
39
  // Danish (Denmark)
35
40
  da: ["da-DK"],
36
41
  // Azerbaijani (Azerbaijan)
@@ -49,8 +54,10 @@ var localeMap = {
49
54
  // Australia
50
55
  "en-CA",
51
56
  // Canada
52
- "en-SG"
57
+ "en-SG",
53
58
  // Singapore
59
+ "en-IE"
60
+ // Ireland
54
61
  ],
55
62
  // Spanish
56
63
  es: [
@@ -69,8 +76,10 @@ var localeMap = {
69
76
  // France
70
77
  "fr-CA",
71
78
  // Canada
72
- "fr-BE"
79
+ "fr-BE",
73
80
  // Belgium
81
+ "fr-LU"
82
+ // Luxembourg
74
83
  ],
75
84
  // Catalan (Spain)
76
85
  ca: ["ca-ES"],
@@ -645,7 +654,25 @@ var configV1_8Definition = extendConfigDefinition(
645
654
  })
646
655
  }
647
656
  );
648
- var LATEST_CONFIG_DEFINITION = configV1_8Definition;
657
+ var configV1_9Definition = extendConfigDefinition(
658
+ configV1_8Definition,
659
+ {
660
+ createSchema: (baseSchema) => baseSchema.extend({
661
+ formatter: _zod2.default.enum(["prettier", "biome"]).optional().describe(
662
+ "Code formatter to use for all buckets. Defaults to 'prettier' if not specified and a prettier config is found."
663
+ )
664
+ }),
665
+ createDefaultValue: (baseDefaultValue) => ({
666
+ ...baseDefaultValue,
667
+ version: 1.9
668
+ }),
669
+ createUpgrader: (oldConfig) => ({
670
+ ...oldConfig,
671
+ version: 1.9
672
+ })
673
+ }
674
+ );
675
+ var LATEST_CONFIG_DEFINITION = configV1_9Definition;
649
676
  function parseI18nConfig(rawConfig) {
650
677
  try {
651
678
  const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
@@ -687,4 +714,5 @@ var defaultConfig = LATEST_CONFIG_DEFINITION.defaultValue;
687
714
 
688
715
 
689
716
 
690
- 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;
717
+
718
+ 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
@@ -9,14 +9,14 @@ declare const localeMap: {
9
9
  readonly hu: readonly ["hu-HU"];
10
10
  readonly he: readonly ["he-IL"];
11
11
  readonly et: readonly ["et-EE"];
12
- readonly el: readonly ["el-GR"];
12
+ readonly el: readonly ["el-GR", "el-CY"];
13
13
  readonly da: readonly ["da-DK"];
14
14
  readonly az: readonly ["az-AZ"];
15
15
  readonly th: readonly ["th-TH"];
16
16
  readonly sv: readonly ["sv-SE"];
17
- readonly en: readonly ["en-US", "en-GB", "en-AU", "en-CA", "en-SG"];
17
+ readonly en: readonly ["en-US", "en-GB", "en-AU", "en-CA", "en-SG", "en-IE"];
18
18
  readonly es: readonly ["es-ES", "es-419", "es-MX", "es-AR"];
19
- readonly fr: readonly ["fr-FR", "fr-CA", "fr-BE"];
19
+ readonly fr: readonly ["fr-FR", "fr-CA", "fr-BE", "fr-LU"];
20
20
  readonly ca: readonly ["ca-ES"];
21
21
  readonly ja: readonly ["ja-JP"];
22
22
  readonly kk: readonly ["kk-KZ"];
@@ -129,14 +129,14 @@ declare const localeSchema: Z.ZodObject<{
129
129
  source: string;
130
130
  targets: string[];
131
131
  }>;
132
- type ConfigDefinition<T extends Z.ZodRawShape, P extends Z.ZodRawShape> = {
132
+ type ConfigDefinition<T extends Z.ZodRawShape, _P extends Z.ZodRawShape = any> = {
133
133
  schema: Z.ZodObject<T>;
134
134
  defaultValue: Z.infer<Z.ZodObject<T>>;
135
135
  parse: (rawConfig: unknown) => Z.infer<Z.ZodObject<T>>;
136
136
  };
137
137
  declare const configV0Definition: ConfigDefinition<{
138
138
  version: Z.ZodDefault<Z.ZodNumber>;
139
- }, Z.ZodRawShape>;
139
+ }, any>;
140
140
  declare const configV1Definition: ConfigDefinition<{
141
141
  version: Z.ZodDefault<Z.ZodNumber>;
142
142
  } & {
@@ -151,7 +151,7 @@ declare const configV1Definition: ConfigDefinition<{
151
151
  targets: string[];
152
152
  }>;
153
153
  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>;
154
+ }, any>;
155
155
  declare const configV1_1Definition: ConfigDefinition<{
156
156
  version: Z.ZodDefault<Z.ZodNumber>;
157
157
  locale: Z.ZodObject<{
@@ -175,7 +175,7 @@ declare const configV1_1Definition: ConfigDefinition<{
175
175
  exclude?: string[] | undefined;
176
176
  include?: string[] | undefined;
177
177
  }>>>;
178
- }, Z.ZodRawShape>;
178
+ }, any>;
179
179
  declare const configV1_2Definition: ConfigDefinition<{
180
180
  version: Z.ZodDefault<Z.ZodNumber>;
181
181
  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 +203,7 @@ declare const configV1_2Definition: ConfigDefinition<{
203
203
  targets: string[];
204
204
  extraSource?: string | undefined;
205
205
  }>;
206
- }, Z.ZodRawShape>;
206
+ }, any>;
207
207
  declare const bucketItemSchema: Z.ZodObject<{
208
208
  path: Z.ZodString;
209
209
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -318,7 +318,7 @@ declare const configV1_3Definition: ConfigDefinition<{
318
318
  })[] | undefined;
319
319
  injectLocale?: string[] | undefined;
320
320
  }>>>;
321
- }, Z.ZodRawShape>;
321
+ }, any>;
322
322
  declare const configV1_4Definition: ConfigDefinition<{
323
323
  version: Z.ZodDefault<Z.ZodNumber>;
324
324
  locale: Z.ZodObject<{
@@ -381,7 +381,7 @@ declare const configV1_4Definition: ConfigDefinition<{
381
381
  }>>>;
382
382
  } & {
383
383
  $schema: Z.ZodDefault<Z.ZodString>;
384
- }, Z.ZodRawShape>;
384
+ }, any>;
385
385
  declare const configV1_5Definition: ConfigDefinition<{
386
386
  version: Z.ZodDefault<Z.ZodNumber>;
387
387
  locale: Z.ZodObject<{
@@ -461,7 +461,7 @@ declare const configV1_5Definition: ConfigDefinition<{
461
461
  prompt: string;
462
462
  baseUrl?: string | undefined;
463
463
  }>>;
464
- }, Z.ZodRawShape>;
464
+ }, any>;
465
465
  declare const bucketValueSchemaV1_6: Z.ZodObject<{
466
466
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
467
467
  path: Z.ZodString;
@@ -590,7 +590,7 @@ declare const configV1_6Definition: ConfigDefinition<{
590
590
  injectLocale?: string[] | undefined;
591
591
  lockedKeys?: string[] | undefined;
592
592
  }>>>;
593
- }, Z.ZodRawShape>;
593
+ }, any>;
594
594
  declare const bucketValueSchemaV1_7: Z.ZodObject<{
595
595
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
596
596
  path: Z.ZodString;
@@ -727,7 +727,7 @@ declare const configV1_7Definition: ConfigDefinition<{
727
727
  lockedKeys?: string[] | undefined;
728
728
  lockedPatterns?: string[] | undefined;
729
729
  }>>>;
730
- }, Z.ZodRawShape>;
730
+ }, any>;
731
731
  declare const bucketValueSchemaV1_8: Z.ZodObject<{
732
732
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
733
733
  path: Z.ZodString;
@@ -872,7 +872,99 @@ declare const configV1_8Definition: ConfigDefinition<{
872
872
  lockedPatterns?: string[] | undefined;
873
873
  ignoredKeys?: string[] | undefined;
874
874
  }>>>;
875
- }, Z.ZodRawShape>;
875
+ }, any>;
876
+ declare const configV1_9Definition: ConfigDefinition<{
877
+ version: Z.ZodDefault<Z.ZodNumber>;
878
+ locale: Z.ZodObject<{
879
+ source: Z.ZodEffects<Z.ZodString, string, string>;
880
+ targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
881
+ } & {
882
+ extraSource: Z.ZodOptional<Z.ZodEffects<Z.ZodString, string, string>>;
883
+ }, "strip", Z.ZodTypeAny, {
884
+ source: string;
885
+ targets: string[];
886
+ extraSource?: string | undefined;
887
+ }, {
888
+ source: string;
889
+ targets: string[];
890
+ extraSource?: string | undefined;
891
+ }>;
892
+ $schema: Z.ZodDefault<Z.ZodString>;
893
+ provider: Z.ZodOptional<Z.ZodObject<{
894
+ id: Z.ZodEnum<["openai", "anthropic", "google", "ollama", "openrouter", "mistral"]>;
895
+ model: Z.ZodString;
896
+ prompt: Z.ZodString;
897
+ baseUrl: Z.ZodOptional<Z.ZodString>;
898
+ }, "strip", Z.ZodTypeAny, {
899
+ id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
900
+ model: string;
901
+ prompt: string;
902
+ baseUrl?: string | undefined;
903
+ }, {
904
+ id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
905
+ model: string;
906
+ prompt: string;
907
+ baseUrl?: string | undefined;
908
+ }>>;
909
+ } & {
910
+ 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<{
911
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
912
+ path: Z.ZodString;
913
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
914
+ }, "strip", Z.ZodTypeAny, {
915
+ path: string;
916
+ delimiter?: "-" | "_" | null | undefined;
917
+ }, {
918
+ path: string;
919
+ delimiter?: "-" | "_" | null | undefined;
920
+ }>]>, "many">>;
921
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
922
+ path: Z.ZodString;
923
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
924
+ }, "strip", Z.ZodTypeAny, {
925
+ path: string;
926
+ delimiter?: "-" | "_" | null | undefined;
927
+ }, {
928
+ path: string;
929
+ delimiter?: "-" | "_" | null | undefined;
930
+ }>]>, "many">>>;
931
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
932
+ } & {
933
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
934
+ } & {
935
+ lockedPatterns: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
936
+ } & {
937
+ ignoredKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
938
+ }, "strip", Z.ZodTypeAny, {
939
+ include: (string | {
940
+ path: string;
941
+ delimiter?: "-" | "_" | null | undefined;
942
+ })[];
943
+ exclude?: (string | {
944
+ path: string;
945
+ delimiter?: "-" | "_" | null | undefined;
946
+ })[] | undefined;
947
+ injectLocale?: string[] | undefined;
948
+ lockedKeys?: string[] | undefined;
949
+ lockedPatterns?: string[] | undefined;
950
+ ignoredKeys?: string[] | undefined;
951
+ }, {
952
+ exclude?: (string | {
953
+ path: string;
954
+ delimiter?: "-" | "_" | null | undefined;
955
+ })[] | undefined;
956
+ include?: (string | {
957
+ path: string;
958
+ delimiter?: "-" | "_" | null | undefined;
959
+ })[] | undefined;
960
+ injectLocale?: string[] | undefined;
961
+ lockedKeys?: string[] | undefined;
962
+ lockedPatterns?: string[] | undefined;
963
+ ignoredKeys?: string[] | undefined;
964
+ }>>>;
965
+ } & {
966
+ formatter: Z.ZodOptional<Z.ZodEnum<["prettier", "biome"]>>;
967
+ }, any>;
876
968
  declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
877
969
  version: Z.ZodDefault<Z.ZodNumber>;
878
970
  locale: Z.ZodObject<{
@@ -962,7 +1054,9 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
962
1054
  lockedPatterns?: string[] | undefined;
963
1055
  ignoredKeys?: string[] | undefined;
964
1056
  }>>>;
965
- }, Z.ZodRawShape>;
1057
+ } & {
1058
+ formatter: Z.ZodOptional<Z.ZodEnum<["prettier", "biome"]>>;
1059
+ }, any>;
966
1060
  type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
967
1061
  declare function parseI18nConfig(rawConfig: unknown): {
968
1062
  version: number;
@@ -992,6 +1086,7 @@ declare function parseI18nConfig(rawConfig: unknown): {
992
1086
  prompt: string;
993
1087
  baseUrl?: string | undefined;
994
1088
  } | undefined;
1089
+ formatter?: "prettier" | "biome" | undefined;
995
1090
  };
996
1091
  declare const defaultConfig: {
997
1092
  version: number;
@@ -1021,6 +1116,7 @@ declare const defaultConfig: {
1021
1116
  prompt: string;
1022
1117
  baseUrl?: string | undefined;
1023
1118
  } | undefined;
1119
+ formatter?: "prettier" | "biome" | undefined;
1024
1120
  };
1025
1121
 
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 };
1122
+ 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
@@ -9,14 +9,14 @@ declare const localeMap: {
9
9
  readonly hu: readonly ["hu-HU"];
10
10
  readonly he: readonly ["he-IL"];
11
11
  readonly et: readonly ["et-EE"];
12
- readonly el: readonly ["el-GR"];
12
+ readonly el: readonly ["el-GR", "el-CY"];
13
13
  readonly da: readonly ["da-DK"];
14
14
  readonly az: readonly ["az-AZ"];
15
15
  readonly th: readonly ["th-TH"];
16
16
  readonly sv: readonly ["sv-SE"];
17
- readonly en: readonly ["en-US", "en-GB", "en-AU", "en-CA", "en-SG"];
17
+ readonly en: readonly ["en-US", "en-GB", "en-AU", "en-CA", "en-SG", "en-IE"];
18
18
  readonly es: readonly ["es-ES", "es-419", "es-MX", "es-AR"];
19
- readonly fr: readonly ["fr-FR", "fr-CA", "fr-BE"];
19
+ readonly fr: readonly ["fr-FR", "fr-CA", "fr-BE", "fr-LU"];
20
20
  readonly ca: readonly ["ca-ES"];
21
21
  readonly ja: readonly ["ja-JP"];
22
22
  readonly kk: readonly ["kk-KZ"];
@@ -129,14 +129,14 @@ declare const localeSchema: Z.ZodObject<{
129
129
  source: string;
130
130
  targets: string[];
131
131
  }>;
132
- type ConfigDefinition<T extends Z.ZodRawShape, P extends Z.ZodRawShape> = {
132
+ type ConfigDefinition<T extends Z.ZodRawShape, _P extends Z.ZodRawShape = any> = {
133
133
  schema: Z.ZodObject<T>;
134
134
  defaultValue: Z.infer<Z.ZodObject<T>>;
135
135
  parse: (rawConfig: unknown) => Z.infer<Z.ZodObject<T>>;
136
136
  };
137
137
  declare const configV0Definition: ConfigDefinition<{
138
138
  version: Z.ZodDefault<Z.ZodNumber>;
139
- }, Z.ZodRawShape>;
139
+ }, any>;
140
140
  declare const configV1Definition: ConfigDefinition<{
141
141
  version: Z.ZodDefault<Z.ZodNumber>;
142
142
  } & {
@@ -151,7 +151,7 @@ declare const configV1Definition: ConfigDefinition<{
151
151
  targets: string[];
152
152
  }>;
153
153
  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>;
154
+ }, any>;
155
155
  declare const configV1_1Definition: ConfigDefinition<{
156
156
  version: Z.ZodDefault<Z.ZodNumber>;
157
157
  locale: Z.ZodObject<{
@@ -175,7 +175,7 @@ declare const configV1_1Definition: ConfigDefinition<{
175
175
  exclude?: string[] | undefined;
176
176
  include?: string[] | undefined;
177
177
  }>>>;
178
- }, Z.ZodRawShape>;
178
+ }, any>;
179
179
  declare const configV1_2Definition: ConfigDefinition<{
180
180
  version: Z.ZodDefault<Z.ZodNumber>;
181
181
  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 +203,7 @@ declare const configV1_2Definition: ConfigDefinition<{
203
203
  targets: string[];
204
204
  extraSource?: string | undefined;
205
205
  }>;
206
- }, Z.ZodRawShape>;
206
+ }, any>;
207
207
  declare const bucketItemSchema: Z.ZodObject<{
208
208
  path: Z.ZodString;
209
209
  delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
@@ -318,7 +318,7 @@ declare const configV1_3Definition: ConfigDefinition<{
318
318
  })[] | undefined;
319
319
  injectLocale?: string[] | undefined;
320
320
  }>>>;
321
- }, Z.ZodRawShape>;
321
+ }, any>;
322
322
  declare const configV1_4Definition: ConfigDefinition<{
323
323
  version: Z.ZodDefault<Z.ZodNumber>;
324
324
  locale: Z.ZodObject<{
@@ -381,7 +381,7 @@ declare const configV1_4Definition: ConfigDefinition<{
381
381
  }>>>;
382
382
  } & {
383
383
  $schema: Z.ZodDefault<Z.ZodString>;
384
- }, Z.ZodRawShape>;
384
+ }, any>;
385
385
  declare const configV1_5Definition: ConfigDefinition<{
386
386
  version: Z.ZodDefault<Z.ZodNumber>;
387
387
  locale: Z.ZodObject<{
@@ -461,7 +461,7 @@ declare const configV1_5Definition: ConfigDefinition<{
461
461
  prompt: string;
462
462
  baseUrl?: string | undefined;
463
463
  }>>;
464
- }, Z.ZodRawShape>;
464
+ }, any>;
465
465
  declare const bucketValueSchemaV1_6: Z.ZodObject<{
466
466
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
467
467
  path: Z.ZodString;
@@ -590,7 +590,7 @@ declare const configV1_6Definition: ConfigDefinition<{
590
590
  injectLocale?: string[] | undefined;
591
591
  lockedKeys?: string[] | undefined;
592
592
  }>>>;
593
- }, Z.ZodRawShape>;
593
+ }, any>;
594
594
  declare const bucketValueSchemaV1_7: Z.ZodObject<{
595
595
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
596
596
  path: Z.ZodString;
@@ -727,7 +727,7 @@ declare const configV1_7Definition: ConfigDefinition<{
727
727
  lockedKeys?: string[] | undefined;
728
728
  lockedPatterns?: string[] | undefined;
729
729
  }>>>;
730
- }, Z.ZodRawShape>;
730
+ }, any>;
731
731
  declare const bucketValueSchemaV1_8: Z.ZodObject<{
732
732
  include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
733
733
  path: Z.ZodString;
@@ -872,7 +872,99 @@ declare const configV1_8Definition: ConfigDefinition<{
872
872
  lockedPatterns?: string[] | undefined;
873
873
  ignoredKeys?: string[] | undefined;
874
874
  }>>>;
875
- }, Z.ZodRawShape>;
875
+ }, any>;
876
+ declare const configV1_9Definition: ConfigDefinition<{
877
+ version: Z.ZodDefault<Z.ZodNumber>;
878
+ locale: Z.ZodObject<{
879
+ source: Z.ZodEffects<Z.ZodString, string, string>;
880
+ targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
881
+ } & {
882
+ extraSource: Z.ZodOptional<Z.ZodEffects<Z.ZodString, string, string>>;
883
+ }, "strip", Z.ZodTypeAny, {
884
+ source: string;
885
+ targets: string[];
886
+ extraSource?: string | undefined;
887
+ }, {
888
+ source: string;
889
+ targets: string[];
890
+ extraSource?: string | undefined;
891
+ }>;
892
+ $schema: Z.ZodDefault<Z.ZodString>;
893
+ provider: Z.ZodOptional<Z.ZodObject<{
894
+ id: Z.ZodEnum<["openai", "anthropic", "google", "ollama", "openrouter", "mistral"]>;
895
+ model: Z.ZodString;
896
+ prompt: Z.ZodString;
897
+ baseUrl: Z.ZodOptional<Z.ZodString>;
898
+ }, "strip", Z.ZodTypeAny, {
899
+ id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
900
+ model: string;
901
+ prompt: string;
902
+ baseUrl?: string | undefined;
903
+ }, {
904
+ id: "openai" | "anthropic" | "google" | "ollama" | "openrouter" | "mistral";
905
+ model: string;
906
+ prompt: string;
907
+ baseUrl?: string | undefined;
908
+ }>>;
909
+ } & {
910
+ 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<{
911
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
912
+ path: Z.ZodString;
913
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
914
+ }, "strip", Z.ZodTypeAny, {
915
+ path: string;
916
+ delimiter?: "-" | "_" | null | undefined;
917
+ }, {
918
+ path: string;
919
+ delimiter?: "-" | "_" | null | undefined;
920
+ }>]>, "many">>;
921
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
922
+ path: Z.ZodString;
923
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
924
+ }, "strip", Z.ZodTypeAny, {
925
+ path: string;
926
+ delimiter?: "-" | "_" | null | undefined;
927
+ }, {
928
+ path: string;
929
+ delimiter?: "-" | "_" | null | undefined;
930
+ }>]>, "many">>>;
931
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
932
+ } & {
933
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
934
+ } & {
935
+ lockedPatterns: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
936
+ } & {
937
+ ignoredKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
938
+ }, "strip", Z.ZodTypeAny, {
939
+ include: (string | {
940
+ path: string;
941
+ delimiter?: "-" | "_" | null | undefined;
942
+ })[];
943
+ exclude?: (string | {
944
+ path: string;
945
+ delimiter?: "-" | "_" | null | undefined;
946
+ })[] | undefined;
947
+ injectLocale?: string[] | undefined;
948
+ lockedKeys?: string[] | undefined;
949
+ lockedPatterns?: string[] | undefined;
950
+ ignoredKeys?: string[] | undefined;
951
+ }, {
952
+ exclude?: (string | {
953
+ path: string;
954
+ delimiter?: "-" | "_" | null | undefined;
955
+ })[] | undefined;
956
+ include?: (string | {
957
+ path: string;
958
+ delimiter?: "-" | "_" | null | undefined;
959
+ })[] | undefined;
960
+ injectLocale?: string[] | undefined;
961
+ lockedKeys?: string[] | undefined;
962
+ lockedPatterns?: string[] | undefined;
963
+ ignoredKeys?: string[] | undefined;
964
+ }>>>;
965
+ } & {
966
+ formatter: Z.ZodOptional<Z.ZodEnum<["prettier", "biome"]>>;
967
+ }, any>;
876
968
  declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
877
969
  version: Z.ZodDefault<Z.ZodNumber>;
878
970
  locale: Z.ZodObject<{
@@ -962,7 +1054,9 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
962
1054
  lockedPatterns?: string[] | undefined;
963
1055
  ignoredKeys?: string[] | undefined;
964
1056
  }>>>;
965
- }, Z.ZodRawShape>;
1057
+ } & {
1058
+ formatter: Z.ZodOptional<Z.ZodEnum<["prettier", "biome"]>>;
1059
+ }, any>;
966
1060
  type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
967
1061
  declare function parseI18nConfig(rawConfig: unknown): {
968
1062
  version: number;
@@ -992,6 +1086,7 @@ declare function parseI18nConfig(rawConfig: unknown): {
992
1086
  prompt: string;
993
1087
  baseUrl?: string | undefined;
994
1088
  } | undefined;
1089
+ formatter?: "prettier" | "biome" | undefined;
995
1090
  };
996
1091
  declare const defaultConfig: {
997
1092
  version: number;
@@ -1021,6 +1116,7 @@ declare const defaultConfig: {
1021
1116
  prompt: string;
1022
1117
  baseUrl?: string | undefined;
1023
1118
  } | undefined;
1119
+ formatter?: "prettier" | "biome" | undefined;
1024
1120
  };
1025
1121
 
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 };
1122
+ 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
@@ -29,8 +29,13 @@ var localeMap = {
29
29
  he: ["he-IL"],
30
30
  // Estonian (Estonia)
31
31
  et: ["et-EE"],
32
- // Greek (Greece)
33
- el: ["el-GR"],
32
+ // Greek
33
+ el: [
34
+ "el-GR",
35
+ // Greece
36
+ "el-CY"
37
+ // Cyprus
38
+ ],
34
39
  // Danish (Denmark)
35
40
  da: ["da-DK"],
36
41
  // Azerbaijani (Azerbaijan)
@@ -49,8 +54,10 @@ var localeMap = {
49
54
  // Australia
50
55
  "en-CA",
51
56
  // Canada
52
- "en-SG"
57
+ "en-SG",
53
58
  // Singapore
59
+ "en-IE"
60
+ // Ireland
54
61
  ],
55
62
  // Spanish
56
63
  es: [
@@ -69,8 +76,10 @@ var localeMap = {
69
76
  // France
70
77
  "fr-CA",
71
78
  // Canada
72
- "fr-BE"
79
+ "fr-BE",
73
80
  // Belgium
81
+ "fr-LU"
82
+ // Luxembourg
74
83
  ],
75
84
  // Catalan (Spain)
76
85
  ca: ["ca-ES"],
@@ -645,7 +654,25 @@ var configV1_8Definition = extendConfigDefinition(
645
654
  })
646
655
  }
647
656
  );
648
- var LATEST_CONFIG_DEFINITION = configV1_8Definition;
657
+ var configV1_9Definition = extendConfigDefinition(
658
+ configV1_8Definition,
659
+ {
660
+ createSchema: (baseSchema) => baseSchema.extend({
661
+ formatter: Z3.enum(["prettier", "biome"]).optional().describe(
662
+ "Code formatter to use for all buckets. Defaults to 'prettier' if not specified and a prettier config is found."
663
+ )
664
+ }),
665
+ createDefaultValue: (baseDefaultValue) => ({
666
+ ...baseDefaultValue,
667
+ version: 1.9
668
+ }),
669
+ createUpgrader: (oldConfig) => ({
670
+ ...oldConfig,
671
+ version: 1.9
672
+ })
673
+ }
674
+ );
675
+ var LATEST_CONFIG_DEFINITION = configV1_9Definition;
649
676
  function parseI18nConfig(rawConfig) {
650
677
  try {
651
678
  const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
@@ -674,6 +701,7 @@ export {
674
701
  configV1_6Definition,
675
702
  configV1_7Definition,
676
703
  configV1_8Definition,
704
+ configV1_9Definition,
677
705
  defaultConfig,
678
706
  getLocaleCodeDelimiter,
679
707
  localeCodeSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingo.dev/_spec",
3
- "version": "0.40.1",
3
+ "version": "0.40.3",
4
4
  "description": "Lingo.dev open specification",
5
5
  "private": false,
6
6
  "publishConfig": {