@lingo.dev/_spec 0.30.2 → 0.31.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.
@@ -92,6 +92,13 @@
92
92
  "type": "string"
93
93
  },
94
94
  "default": []
95
+ },
96
+ "lockedPatterns": {
97
+ "type": "array",
98
+ "items": {
99
+ "type": "string"
100
+ },
101
+ "default": []
95
102
  }
96
103
  },
97
104
  "additionalProperties": false
package/build/index.cjs CHANGED
@@ -552,7 +552,26 @@ var configV1_6Definition = extendConfigDefinition(configV1_5Definition, {
552
552
  version: 1.6
553
553
  })
554
554
  });
555
- var LATEST_CONFIG_DEFINITION = configV1_6Definition;
555
+ var bucketValueSchemaV1_7 = bucketValueSchemaV1_6.extend({
556
+ lockedPatterns: _zod2.default.array(_zod2.default.string()).default([]).optional()
557
+ });
558
+ var configV1_7Definition = extendConfigDefinition(configV1_6Definition, {
559
+ createSchema: (baseSchema) => baseSchema.extend({
560
+ buckets: _zod2.default.record(
561
+ bucketTypeSchema,
562
+ bucketValueSchemaV1_7
563
+ ).default({})
564
+ }),
565
+ createDefaultValue: (baseDefaultValue) => ({
566
+ ...baseDefaultValue,
567
+ version: 1.7
568
+ }),
569
+ createUpgrader: (oldConfig) => ({
570
+ ...oldConfig,
571
+ version: 1.7
572
+ })
573
+ });
574
+ var LATEST_CONFIG_DEFINITION = configV1_7Definition;
556
575
  function parseI18nConfig(rawConfig) {
557
576
  try {
558
577
  const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
@@ -590,4 +609,6 @@ var defaultConfig = LATEST_CONFIG_DEFINITION.defaultValue;
590
609
 
591
610
 
592
611
 
593
- 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.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.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;
612
+
613
+
614
+ 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.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.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
@@ -786,7 +786,282 @@ declare const configV1_6Definition: ConfigDefinition<Z.objectUtil.extendShape<Z.
786
786
  lockedKeys?: string[] | undefined;
787
787
  }>>>;
788
788
  }>, Z.ZodRawShape>;
789
- declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
789
+ declare const bucketValueSchemaV1_7: Z.ZodObject<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
790
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
791
+ path: Z.ZodString;
792
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
793
+ }, "strip", Z.ZodTypeAny, {
794
+ path: string;
795
+ delimiter?: "-" | "_" | null | undefined;
796
+ }, {
797
+ path: string;
798
+ delimiter?: "-" | "_" | null | undefined;
799
+ }>]>, "many">>;
800
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
801
+ path: Z.ZodString;
802
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
803
+ }, "strip", Z.ZodTypeAny, {
804
+ path: string;
805
+ delimiter?: "-" | "_" | null | undefined;
806
+ }, {
807
+ path: string;
808
+ delimiter?: "-" | "_" | null | undefined;
809
+ }>]>, "many">>>;
810
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
811
+ }, {
812
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
813
+ }>, {
814
+ lockedPatterns: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
815
+ }>, "strip", Z.ZodTypeAny, {
816
+ include: (string | {
817
+ path: string;
818
+ delimiter?: "-" | "_" | null | undefined;
819
+ })[];
820
+ exclude?: (string | {
821
+ path: string;
822
+ delimiter?: "-" | "_" | null | undefined;
823
+ })[] | undefined;
824
+ injectLocale?: string[] | undefined;
825
+ lockedKeys?: string[] | undefined;
826
+ lockedPatterns?: string[] | undefined;
827
+ }, {
828
+ exclude?: (string | {
829
+ path: string;
830
+ delimiter?: "-" | "_" | null | undefined;
831
+ })[] | undefined;
832
+ include?: (string | {
833
+ path: string;
834
+ delimiter?: "-" | "_" | null | undefined;
835
+ })[] | undefined;
836
+ injectLocale?: string[] | undefined;
837
+ lockedKeys?: string[] | undefined;
838
+ lockedPatterns?: string[] | undefined;
839
+ }>;
840
+ declare const configV1_7Definition: ConfigDefinition<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
841
+ version: Z.ZodDefault<Z.ZodNumber>;
842
+ }, {
843
+ locale: Z.ZodObject<{
844
+ source: Z.ZodEffects<Z.ZodString, string, string>;
845
+ targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
846
+ }, "strip", Z.ZodTypeAny, {
847
+ source: string;
848
+ targets: string[];
849
+ }, {
850
+ source: string;
851
+ targets: string[];
852
+ }>;
853
+ buckets: Z.ZodOptional<Z.ZodDefault<Z.ZodRecord<Z.ZodString, Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>>>>;
854
+ }>, {
855
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>, Z.ZodObject<{
856
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>;
857
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
858
+ }, "strip", Z.ZodTypeAny, {
859
+ include: string[];
860
+ exclude?: string[] | undefined;
861
+ }, {
862
+ exclude?: string[] | undefined;
863
+ include?: string[] | undefined;
864
+ }>>>;
865
+ }>, {
866
+ locale: Z.ZodObject<Z.objectUtil.extendShape<{
867
+ source: Z.ZodEffects<Z.ZodString, string, string>;
868
+ targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
869
+ }, {
870
+ extraSource: Z.ZodOptional<Z.ZodEffects<Z.ZodString, string, string>>;
871
+ }>, "strip", Z.ZodTypeAny, {
872
+ source: string;
873
+ targets: string[];
874
+ extraSource?: string | undefined;
875
+ }, {
876
+ source: string;
877
+ targets: string[];
878
+ extraSource?: string | undefined;
879
+ }>;
880
+ }>, {
881
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>, Z.ZodObject<{
882
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
883
+ path: Z.ZodString;
884
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
885
+ }, "strip", Z.ZodTypeAny, {
886
+ path: string;
887
+ delimiter?: "-" | "_" | null | undefined;
888
+ }, {
889
+ path: string;
890
+ delimiter?: "-" | "_" | null | undefined;
891
+ }>]>, "many">>;
892
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
893
+ path: Z.ZodString;
894
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
895
+ }, "strip", Z.ZodTypeAny, {
896
+ path: string;
897
+ delimiter?: "-" | "_" | null | undefined;
898
+ }, {
899
+ path: string;
900
+ delimiter?: "-" | "_" | null | undefined;
901
+ }>]>, "many">>>;
902
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
903
+ }, "strip", Z.ZodTypeAny, {
904
+ include: (string | {
905
+ path: string;
906
+ delimiter?: "-" | "_" | null | undefined;
907
+ })[];
908
+ exclude?: (string | {
909
+ path: string;
910
+ delimiter?: "-" | "_" | null | undefined;
911
+ })[] | undefined;
912
+ injectLocale?: string[] | undefined;
913
+ }, {
914
+ exclude?: (string | {
915
+ path: string;
916
+ delimiter?: "-" | "_" | null | undefined;
917
+ })[] | undefined;
918
+ include?: (string | {
919
+ path: string;
920
+ delimiter?: "-" | "_" | null | undefined;
921
+ })[] | undefined;
922
+ injectLocale?: string[] | undefined;
923
+ }>>>;
924
+ }>, {
925
+ $schema: Z.ZodDefault<Z.ZodString>;
926
+ }>, {
927
+ provider: Z.ZodOptional<Z.ZodDefault<Z.ZodUnion<[Z.ZodObject<Z.objectUtil.extendShape<{
928
+ id: Z.ZodString;
929
+ model: Z.ZodString;
930
+ prompt: Z.ZodString;
931
+ baseUrl: Z.ZodOptional<Z.ZodString>;
932
+ }, {
933
+ id: Z.ZodLiteral<"lingo">;
934
+ model: Z.ZodLiteral<"best">;
935
+ }>, "strip", Z.ZodTypeAny, {
936
+ id: "lingo";
937
+ model: "best";
938
+ prompt: string;
939
+ baseUrl?: string | undefined;
940
+ }, {
941
+ id: "lingo";
942
+ model: "best";
943
+ prompt: string;
944
+ baseUrl?: string | undefined;
945
+ }>, Z.ZodObject<Z.objectUtil.extendShape<{
946
+ id: Z.ZodString;
947
+ model: Z.ZodString;
948
+ prompt: Z.ZodString;
949
+ baseUrl: Z.ZodOptional<Z.ZodString>;
950
+ }, {
951
+ id: Z.ZodEnum<["openai", "anthropic"]>;
952
+ }>, "strip", Z.ZodTypeAny, {
953
+ id: "openai" | "anthropic";
954
+ model: string;
955
+ prompt: string;
956
+ baseUrl?: string | undefined;
957
+ }, {
958
+ id: "openai" | "anthropic";
959
+ model: string;
960
+ prompt: string;
961
+ baseUrl?: string | undefined;
962
+ }>]>>>;
963
+ }>, {
964
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>, Z.ZodObject<Z.objectUtil.extendShape<{
965
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
966
+ path: Z.ZodString;
967
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
968
+ }, "strip", Z.ZodTypeAny, {
969
+ path: string;
970
+ delimiter?: "-" | "_" | null | undefined;
971
+ }, {
972
+ path: string;
973
+ delimiter?: "-" | "_" | null | undefined;
974
+ }>]>, "many">>;
975
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
976
+ path: Z.ZodString;
977
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
978
+ }, "strip", Z.ZodTypeAny, {
979
+ path: string;
980
+ delimiter?: "-" | "_" | null | undefined;
981
+ }, {
982
+ path: string;
983
+ delimiter?: "-" | "_" | null | undefined;
984
+ }>]>, "many">>>;
985
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
986
+ }, {
987
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
988
+ }>, "strip", Z.ZodTypeAny, {
989
+ include: (string | {
990
+ path: string;
991
+ delimiter?: "-" | "_" | null | undefined;
992
+ })[];
993
+ exclude?: (string | {
994
+ path: string;
995
+ delimiter?: "-" | "_" | null | undefined;
996
+ })[] | undefined;
997
+ injectLocale?: string[] | undefined;
998
+ lockedKeys?: string[] | undefined;
999
+ }, {
1000
+ exclude?: (string | {
1001
+ path: string;
1002
+ delimiter?: "-" | "_" | null | undefined;
1003
+ })[] | undefined;
1004
+ include?: (string | {
1005
+ path: string;
1006
+ delimiter?: "-" | "_" | null | undefined;
1007
+ })[] | undefined;
1008
+ injectLocale?: string[] | undefined;
1009
+ lockedKeys?: string[] | undefined;
1010
+ }>>>;
1011
+ }>, {
1012
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>, Z.ZodObject<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
1013
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
1014
+ path: Z.ZodString;
1015
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
1016
+ }, "strip", Z.ZodTypeAny, {
1017
+ path: string;
1018
+ delimiter?: "-" | "_" | null | undefined;
1019
+ }, {
1020
+ path: string;
1021
+ delimiter?: "-" | "_" | null | undefined;
1022
+ }>]>, "many">>;
1023
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
1024
+ path: Z.ZodString;
1025
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
1026
+ }, "strip", Z.ZodTypeAny, {
1027
+ path: string;
1028
+ delimiter?: "-" | "_" | null | undefined;
1029
+ }, {
1030
+ path: string;
1031
+ delimiter?: "-" | "_" | null | undefined;
1032
+ }>]>, "many">>>;
1033
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
1034
+ }, {
1035
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
1036
+ }>, {
1037
+ lockedPatterns: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
1038
+ }>, "strip", Z.ZodTypeAny, {
1039
+ include: (string | {
1040
+ path: string;
1041
+ delimiter?: "-" | "_" | null | undefined;
1042
+ })[];
1043
+ exclude?: (string | {
1044
+ path: string;
1045
+ delimiter?: "-" | "_" | null | undefined;
1046
+ })[] | undefined;
1047
+ injectLocale?: string[] | undefined;
1048
+ lockedKeys?: string[] | undefined;
1049
+ lockedPatterns?: string[] | undefined;
1050
+ }, {
1051
+ exclude?: (string | {
1052
+ path: string;
1053
+ delimiter?: "-" | "_" | null | undefined;
1054
+ })[] | undefined;
1055
+ include?: (string | {
1056
+ path: string;
1057
+ delimiter?: "-" | "_" | null | undefined;
1058
+ })[] | undefined;
1059
+ injectLocale?: string[] | undefined;
1060
+ lockedKeys?: string[] | undefined;
1061
+ lockedPatterns?: string[] | undefined;
1062
+ }>>>;
1063
+ }>, Z.ZodRawShape>;
1064
+ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
790
1065
  version: Z.ZodDefault<Z.ZodNumber>;
791
1066
  }, {
792
1067
  locale: Z.ZodObject<{
@@ -957,6 +1232,58 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<Z.objectUtil.extendShap
957
1232
  injectLocale?: string[] | undefined;
958
1233
  lockedKeys?: string[] | undefined;
959
1234
  }>>>;
1235
+ }>, {
1236
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>, Z.ZodObject<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
1237
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
1238
+ path: Z.ZodString;
1239
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
1240
+ }, "strip", Z.ZodTypeAny, {
1241
+ path: string;
1242
+ delimiter?: "-" | "_" | null | undefined;
1243
+ }, {
1244
+ path: string;
1245
+ delimiter?: "-" | "_" | null | undefined;
1246
+ }>]>, "many">>;
1247
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
1248
+ path: Z.ZodString;
1249
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
1250
+ }, "strip", Z.ZodTypeAny, {
1251
+ path: string;
1252
+ delimiter?: "-" | "_" | null | undefined;
1253
+ }, {
1254
+ path: string;
1255
+ delimiter?: "-" | "_" | null | undefined;
1256
+ }>]>, "many">>>;
1257
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
1258
+ }, {
1259
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
1260
+ }>, {
1261
+ lockedPatterns: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
1262
+ }>, "strip", Z.ZodTypeAny, {
1263
+ include: (string | {
1264
+ path: string;
1265
+ delimiter?: "-" | "_" | null | undefined;
1266
+ })[];
1267
+ exclude?: (string | {
1268
+ path: string;
1269
+ delimiter?: "-" | "_" | null | undefined;
1270
+ })[] | undefined;
1271
+ injectLocale?: string[] | undefined;
1272
+ lockedKeys?: string[] | undefined;
1273
+ lockedPatterns?: string[] | undefined;
1274
+ }, {
1275
+ exclude?: (string | {
1276
+ path: string;
1277
+ delimiter?: "-" | "_" | null | undefined;
1278
+ })[] | undefined;
1279
+ include?: (string | {
1280
+ path: string;
1281
+ delimiter?: "-" | "_" | null | undefined;
1282
+ })[] | undefined;
1283
+ injectLocale?: string[] | undefined;
1284
+ lockedKeys?: string[] | undefined;
1285
+ lockedPatterns?: string[] | undefined;
1286
+ }>>>;
960
1287
  }>, Z.ZodRawShape>;
961
1288
  type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
962
1289
  declare function parseI18nConfig(rawConfig: unknown): {
@@ -977,6 +1304,7 @@ declare function parseI18nConfig(rawConfig: unknown): {
977
1304
  })[] | undefined;
978
1305
  injectLocale?: string[] | undefined;
979
1306
  lockedKeys?: string[] | undefined;
1307
+ lockedPatterns?: string[] | undefined;
980
1308
  }>>;
981
1309
  $schema: string;
982
1310
  provider?: {
@@ -1009,6 +1337,7 @@ declare const defaultConfig: {
1009
1337
  })[] | undefined;
1010
1338
  injectLocale?: string[] | undefined;
1011
1339
  lockedKeys?: string[] | undefined;
1340
+ lockedPatterns?: string[] | undefined;
1012
1341
  }>>;
1013
1342
  $schema: string;
1014
1343
  provider?: {
@@ -1024,4 +1353,4 @@ declare const defaultConfig: {
1024
1353
  } | undefined;
1025
1354
  };
1026
1355
 
1027
- export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, bucketValueSchemaV1_3, bucketValueSchemaV1_6, configV0Definition, configV1Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
1356
+ 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, configV0Definition, configV1Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, configV1_7Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
package/build/index.d.ts CHANGED
@@ -786,7 +786,282 @@ declare const configV1_6Definition: ConfigDefinition<Z.objectUtil.extendShape<Z.
786
786
  lockedKeys?: string[] | undefined;
787
787
  }>>>;
788
788
  }>, Z.ZodRawShape>;
789
- declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
789
+ declare const bucketValueSchemaV1_7: Z.ZodObject<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
790
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
791
+ path: Z.ZodString;
792
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
793
+ }, "strip", Z.ZodTypeAny, {
794
+ path: string;
795
+ delimiter?: "-" | "_" | null | undefined;
796
+ }, {
797
+ path: string;
798
+ delimiter?: "-" | "_" | null | undefined;
799
+ }>]>, "many">>;
800
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
801
+ path: Z.ZodString;
802
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
803
+ }, "strip", Z.ZodTypeAny, {
804
+ path: string;
805
+ delimiter?: "-" | "_" | null | undefined;
806
+ }, {
807
+ path: string;
808
+ delimiter?: "-" | "_" | null | undefined;
809
+ }>]>, "many">>>;
810
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
811
+ }, {
812
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
813
+ }>, {
814
+ lockedPatterns: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
815
+ }>, "strip", Z.ZodTypeAny, {
816
+ include: (string | {
817
+ path: string;
818
+ delimiter?: "-" | "_" | null | undefined;
819
+ })[];
820
+ exclude?: (string | {
821
+ path: string;
822
+ delimiter?: "-" | "_" | null | undefined;
823
+ })[] | undefined;
824
+ injectLocale?: string[] | undefined;
825
+ lockedKeys?: string[] | undefined;
826
+ lockedPatterns?: string[] | undefined;
827
+ }, {
828
+ exclude?: (string | {
829
+ path: string;
830
+ delimiter?: "-" | "_" | null | undefined;
831
+ })[] | undefined;
832
+ include?: (string | {
833
+ path: string;
834
+ delimiter?: "-" | "_" | null | undefined;
835
+ })[] | undefined;
836
+ injectLocale?: string[] | undefined;
837
+ lockedKeys?: string[] | undefined;
838
+ lockedPatterns?: string[] | undefined;
839
+ }>;
840
+ declare const configV1_7Definition: ConfigDefinition<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
841
+ version: Z.ZodDefault<Z.ZodNumber>;
842
+ }, {
843
+ locale: Z.ZodObject<{
844
+ source: Z.ZodEffects<Z.ZodString, string, string>;
845
+ targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
846
+ }, "strip", Z.ZodTypeAny, {
847
+ source: string;
848
+ targets: string[];
849
+ }, {
850
+ source: string;
851
+ targets: string[];
852
+ }>;
853
+ buckets: Z.ZodOptional<Z.ZodDefault<Z.ZodRecord<Z.ZodString, Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>>>>;
854
+ }>, {
855
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>, Z.ZodObject<{
856
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>;
857
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
858
+ }, "strip", Z.ZodTypeAny, {
859
+ include: string[];
860
+ exclude?: string[] | undefined;
861
+ }, {
862
+ exclude?: string[] | undefined;
863
+ include?: string[] | undefined;
864
+ }>>>;
865
+ }>, {
866
+ locale: Z.ZodObject<Z.objectUtil.extendShape<{
867
+ source: Z.ZodEffects<Z.ZodString, string, string>;
868
+ targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
869
+ }, {
870
+ extraSource: Z.ZodOptional<Z.ZodEffects<Z.ZodString, string, string>>;
871
+ }>, "strip", Z.ZodTypeAny, {
872
+ source: string;
873
+ targets: string[];
874
+ extraSource?: string | undefined;
875
+ }, {
876
+ source: string;
877
+ targets: string[];
878
+ extraSource?: string | undefined;
879
+ }>;
880
+ }>, {
881
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>, Z.ZodObject<{
882
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
883
+ path: Z.ZodString;
884
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
885
+ }, "strip", Z.ZodTypeAny, {
886
+ path: string;
887
+ delimiter?: "-" | "_" | null | undefined;
888
+ }, {
889
+ path: string;
890
+ delimiter?: "-" | "_" | null | undefined;
891
+ }>]>, "many">>;
892
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
893
+ path: Z.ZodString;
894
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
895
+ }, "strip", Z.ZodTypeAny, {
896
+ path: string;
897
+ delimiter?: "-" | "_" | null | undefined;
898
+ }, {
899
+ path: string;
900
+ delimiter?: "-" | "_" | null | undefined;
901
+ }>]>, "many">>>;
902
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
903
+ }, "strip", Z.ZodTypeAny, {
904
+ include: (string | {
905
+ path: string;
906
+ delimiter?: "-" | "_" | null | undefined;
907
+ })[];
908
+ exclude?: (string | {
909
+ path: string;
910
+ delimiter?: "-" | "_" | null | undefined;
911
+ })[] | undefined;
912
+ injectLocale?: string[] | undefined;
913
+ }, {
914
+ exclude?: (string | {
915
+ path: string;
916
+ delimiter?: "-" | "_" | null | undefined;
917
+ })[] | undefined;
918
+ include?: (string | {
919
+ path: string;
920
+ delimiter?: "-" | "_" | null | undefined;
921
+ })[] | undefined;
922
+ injectLocale?: string[] | undefined;
923
+ }>>>;
924
+ }>, {
925
+ $schema: Z.ZodDefault<Z.ZodString>;
926
+ }>, {
927
+ provider: Z.ZodOptional<Z.ZodDefault<Z.ZodUnion<[Z.ZodObject<Z.objectUtil.extendShape<{
928
+ id: Z.ZodString;
929
+ model: Z.ZodString;
930
+ prompt: Z.ZodString;
931
+ baseUrl: Z.ZodOptional<Z.ZodString>;
932
+ }, {
933
+ id: Z.ZodLiteral<"lingo">;
934
+ model: Z.ZodLiteral<"best">;
935
+ }>, "strip", Z.ZodTypeAny, {
936
+ id: "lingo";
937
+ model: "best";
938
+ prompt: string;
939
+ baseUrl?: string | undefined;
940
+ }, {
941
+ id: "lingo";
942
+ model: "best";
943
+ prompt: string;
944
+ baseUrl?: string | undefined;
945
+ }>, Z.ZodObject<Z.objectUtil.extendShape<{
946
+ id: Z.ZodString;
947
+ model: Z.ZodString;
948
+ prompt: Z.ZodString;
949
+ baseUrl: Z.ZodOptional<Z.ZodString>;
950
+ }, {
951
+ id: Z.ZodEnum<["openai", "anthropic"]>;
952
+ }>, "strip", Z.ZodTypeAny, {
953
+ id: "openai" | "anthropic";
954
+ model: string;
955
+ prompt: string;
956
+ baseUrl?: string | undefined;
957
+ }, {
958
+ id: "openai" | "anthropic";
959
+ model: string;
960
+ prompt: string;
961
+ baseUrl?: string | undefined;
962
+ }>]>>>;
963
+ }>, {
964
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>, Z.ZodObject<Z.objectUtil.extendShape<{
965
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
966
+ path: Z.ZodString;
967
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
968
+ }, "strip", Z.ZodTypeAny, {
969
+ path: string;
970
+ delimiter?: "-" | "_" | null | undefined;
971
+ }, {
972
+ path: string;
973
+ delimiter?: "-" | "_" | null | undefined;
974
+ }>]>, "many">>;
975
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
976
+ path: Z.ZodString;
977
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
978
+ }, "strip", Z.ZodTypeAny, {
979
+ path: string;
980
+ delimiter?: "-" | "_" | null | undefined;
981
+ }, {
982
+ path: string;
983
+ delimiter?: "-" | "_" | null | undefined;
984
+ }>]>, "many">>>;
985
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
986
+ }, {
987
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
988
+ }>, "strip", Z.ZodTypeAny, {
989
+ include: (string | {
990
+ path: string;
991
+ delimiter?: "-" | "_" | null | undefined;
992
+ })[];
993
+ exclude?: (string | {
994
+ path: string;
995
+ delimiter?: "-" | "_" | null | undefined;
996
+ })[] | undefined;
997
+ injectLocale?: string[] | undefined;
998
+ lockedKeys?: string[] | undefined;
999
+ }, {
1000
+ exclude?: (string | {
1001
+ path: string;
1002
+ delimiter?: "-" | "_" | null | undefined;
1003
+ })[] | undefined;
1004
+ include?: (string | {
1005
+ path: string;
1006
+ delimiter?: "-" | "_" | null | undefined;
1007
+ })[] | undefined;
1008
+ injectLocale?: string[] | undefined;
1009
+ lockedKeys?: string[] | undefined;
1010
+ }>>>;
1011
+ }>, {
1012
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>, Z.ZodObject<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
1013
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
1014
+ path: Z.ZodString;
1015
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
1016
+ }, "strip", Z.ZodTypeAny, {
1017
+ path: string;
1018
+ delimiter?: "-" | "_" | null | undefined;
1019
+ }, {
1020
+ path: string;
1021
+ delimiter?: "-" | "_" | null | undefined;
1022
+ }>]>, "many">>;
1023
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
1024
+ path: Z.ZodString;
1025
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
1026
+ }, "strip", Z.ZodTypeAny, {
1027
+ path: string;
1028
+ delimiter?: "-" | "_" | null | undefined;
1029
+ }, {
1030
+ path: string;
1031
+ delimiter?: "-" | "_" | null | undefined;
1032
+ }>]>, "many">>>;
1033
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
1034
+ }, {
1035
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
1036
+ }>, {
1037
+ lockedPatterns: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
1038
+ }>, "strip", Z.ZodTypeAny, {
1039
+ include: (string | {
1040
+ path: string;
1041
+ delimiter?: "-" | "_" | null | undefined;
1042
+ })[];
1043
+ exclude?: (string | {
1044
+ path: string;
1045
+ delimiter?: "-" | "_" | null | undefined;
1046
+ })[] | undefined;
1047
+ injectLocale?: string[] | undefined;
1048
+ lockedKeys?: string[] | undefined;
1049
+ lockedPatterns?: string[] | undefined;
1050
+ }, {
1051
+ exclude?: (string | {
1052
+ path: string;
1053
+ delimiter?: "-" | "_" | null | undefined;
1054
+ })[] | undefined;
1055
+ include?: (string | {
1056
+ path: string;
1057
+ delimiter?: "-" | "_" | null | undefined;
1058
+ })[] | undefined;
1059
+ injectLocale?: string[] | undefined;
1060
+ lockedKeys?: string[] | undefined;
1061
+ lockedPatterns?: string[] | undefined;
1062
+ }>>>;
1063
+ }>, Z.ZodRawShape>;
1064
+ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
790
1065
  version: Z.ZodDefault<Z.ZodNumber>;
791
1066
  }, {
792
1067
  locale: Z.ZodObject<{
@@ -957,6 +1232,58 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<Z.objectUtil.extendShap
957
1232
  injectLocale?: string[] | undefined;
958
1233
  lockedKeys?: string[] | undefined;
959
1234
  }>>>;
1235
+ }>, {
1236
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>, Z.ZodObject<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
1237
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
1238
+ path: Z.ZodString;
1239
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
1240
+ }, "strip", Z.ZodTypeAny, {
1241
+ path: string;
1242
+ delimiter?: "-" | "_" | null | undefined;
1243
+ }, {
1244
+ path: string;
1245
+ delimiter?: "-" | "_" | null | undefined;
1246
+ }>]>, "many">>;
1247
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
1248
+ path: Z.ZodString;
1249
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
1250
+ }, "strip", Z.ZodTypeAny, {
1251
+ path: string;
1252
+ delimiter?: "-" | "_" | null | undefined;
1253
+ }, {
1254
+ path: string;
1255
+ delimiter?: "-" | "_" | null | undefined;
1256
+ }>]>, "many">>>;
1257
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
1258
+ }, {
1259
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
1260
+ }>, {
1261
+ lockedPatterns: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
1262
+ }>, "strip", Z.ZodTypeAny, {
1263
+ include: (string | {
1264
+ path: string;
1265
+ delimiter?: "-" | "_" | null | undefined;
1266
+ })[];
1267
+ exclude?: (string | {
1268
+ path: string;
1269
+ delimiter?: "-" | "_" | null | undefined;
1270
+ })[] | undefined;
1271
+ injectLocale?: string[] | undefined;
1272
+ lockedKeys?: string[] | undefined;
1273
+ lockedPatterns?: string[] | undefined;
1274
+ }, {
1275
+ exclude?: (string | {
1276
+ path: string;
1277
+ delimiter?: "-" | "_" | null | undefined;
1278
+ })[] | undefined;
1279
+ include?: (string | {
1280
+ path: string;
1281
+ delimiter?: "-" | "_" | null | undefined;
1282
+ })[] | undefined;
1283
+ injectLocale?: string[] | undefined;
1284
+ lockedKeys?: string[] | undefined;
1285
+ lockedPatterns?: string[] | undefined;
1286
+ }>>>;
960
1287
  }>, Z.ZodRawShape>;
961
1288
  type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
962
1289
  declare function parseI18nConfig(rawConfig: unknown): {
@@ -977,6 +1304,7 @@ declare function parseI18nConfig(rawConfig: unknown): {
977
1304
  })[] | undefined;
978
1305
  injectLocale?: string[] | undefined;
979
1306
  lockedKeys?: string[] | undefined;
1307
+ lockedPatterns?: string[] | undefined;
980
1308
  }>>;
981
1309
  $schema: string;
982
1310
  provider?: {
@@ -1009,6 +1337,7 @@ declare const defaultConfig: {
1009
1337
  })[] | undefined;
1010
1338
  injectLocale?: string[] | undefined;
1011
1339
  lockedKeys?: string[] | undefined;
1340
+ lockedPatterns?: string[] | undefined;
1012
1341
  }>>;
1013
1342
  $schema: string;
1014
1343
  provider?: {
@@ -1024,4 +1353,4 @@ declare const defaultConfig: {
1024
1353
  } | undefined;
1025
1354
  };
1026
1355
 
1027
- export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, bucketValueSchemaV1_3, bucketValueSchemaV1_6, configV0Definition, configV1Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
1356
+ 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, configV0Definition, configV1Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, configV1_7Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
package/build/index.mjs CHANGED
@@ -552,7 +552,26 @@ var configV1_6Definition = extendConfigDefinition(configV1_5Definition, {
552
552
  version: 1.6
553
553
  })
554
554
  });
555
- var LATEST_CONFIG_DEFINITION = configV1_6Definition;
555
+ var bucketValueSchemaV1_7 = bucketValueSchemaV1_6.extend({
556
+ lockedPatterns: Z3.array(Z3.string()).default([]).optional()
557
+ });
558
+ var configV1_7Definition = extendConfigDefinition(configV1_6Definition, {
559
+ createSchema: (baseSchema) => baseSchema.extend({
560
+ buckets: Z3.record(
561
+ bucketTypeSchema,
562
+ bucketValueSchemaV1_7
563
+ ).default({})
564
+ }),
565
+ createDefaultValue: (baseDefaultValue) => ({
566
+ ...baseDefaultValue,
567
+ version: 1.7
568
+ }),
569
+ createUpgrader: (oldConfig) => ({
570
+ ...oldConfig,
571
+ version: 1.7
572
+ })
573
+ });
574
+ var LATEST_CONFIG_DEFINITION = configV1_7Definition;
556
575
  function parseI18nConfig(rawConfig) {
557
576
  try {
558
577
  const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
@@ -569,6 +588,7 @@ export {
569
588
  bucketTypes,
570
589
  bucketValueSchemaV1_3,
571
590
  bucketValueSchemaV1_6,
591
+ bucketValueSchemaV1_7,
572
592
  configV0Definition,
573
593
  configV1Definition,
574
594
  configV1_1Definition,
@@ -577,6 +597,7 @@ export {
577
597
  configV1_4Definition,
578
598
  configV1_5Definition,
579
599
  configV1_6Definition,
600
+ configV1_7Definition,
580
601
  defaultConfig,
581
602
  getLocaleCodeDelimiter,
582
603
  localeCodeSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingo.dev/_spec",
3
- "version": "0.30.2",
3
+ "version": "0.31.0",
4
4
  "description": "Lingo.dev open specification",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -18,14 +18,14 @@
18
18
  "author": "",
19
19
  "license": "Apache-2.0",
20
20
  "dependencies": {
21
- "typescript": "^5.7.2",
22
- "vitest": "^3.1.2",
23
21
  "zod": "^3.24.1",
24
22
  "zod-to-json-schema": "^3.24.5"
25
23
  },
26
24
  "devDependencies": {
27
25
  "@types/node": "^22.13.5",
28
- "tsup": "^8.3.5"
26
+ "tsup": "^8.3.5",
27
+ "typescript": "^5.7.2",
28
+ "vitest": "^3.1.2"
29
29
  },
30
30
  "scripts": {
31
31
  "dev": "tsup --watch",