@lingo.dev/_spec 0.27.0 → 0.28.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.
@@ -85,6 +85,13 @@
85
85
  "items": {
86
86
  "type": "string"
87
87
  }
88
+ },
89
+ "lockedKeys": {
90
+ "type": "array",
91
+ "items": {
92
+ "type": "string"
93
+ },
94
+ "default": []
88
95
  }
89
96
  },
90
97
  "additionalProperties": false
package/build/index.cjs CHANGED
@@ -462,15 +462,16 @@ var bucketItemSchema = _zod2.default.object({
462
462
  path: _zod2.default.string(),
463
463
  delimiter: _zod2.default.union([_zod2.default.literal("-"), _zod2.default.literal("_"), _zod2.default.literal(null)]).optional()
464
464
  });
465
+ var bucketValueSchemaV1_3 = _zod2.default.object({
466
+ include: _zod2.default.array(_zod2.default.union([_zod2.default.string(), bucketItemSchema])).default([]),
467
+ exclude: _zod2.default.array(_zod2.default.union([_zod2.default.string(), bucketItemSchema])).default([]).optional(),
468
+ injectLocale: _zod2.default.array(_zod2.default.string()).optional()
469
+ });
465
470
  var configV1_3Definition = extendConfigDefinition(configV1_2Definition, {
466
471
  createSchema: (baseSchema) => baseSchema.extend({
467
472
  buckets: _zod2.default.record(
468
473
  bucketTypeSchema,
469
- _zod2.default.object({
470
- include: _zod2.default.array(_zod2.default.union([_zod2.default.string(), bucketItemSchema])).default([]),
471
- exclude: _zod2.default.array(_zod2.default.union([_zod2.default.string(), bucketItemSchema])).default([]).optional(),
472
- injectLocale: _zod2.default.array(_zod2.default.string()).optional()
473
- })
474
+ bucketValueSchemaV1_3
474
475
  ).default({})
475
476
  }),
476
477
  createDefaultValue: (baseDefaultValue) => ({
@@ -531,7 +532,26 @@ var configV1_5Definition = extendConfigDefinition(configV1_4Definition, {
531
532
  version: 1.5
532
533
  })
533
534
  });
534
- var LATEST_CONFIG_DEFINITION = configV1_5Definition;
535
+ var bucketValueSchemaV1_6 = bucketValueSchemaV1_3.extend({
536
+ lockedKeys: _zod2.default.array(_zod2.default.string()).default([]).optional()
537
+ });
538
+ var configV1_6Definition = extendConfigDefinition(configV1_5Definition, {
539
+ createSchema: (baseSchema) => baseSchema.extend({
540
+ buckets: _zod2.default.record(
541
+ bucketTypeSchema,
542
+ bucketValueSchemaV1_6
543
+ ).default({})
544
+ }),
545
+ createDefaultValue: (baseDefaultValue) => ({
546
+ ...baseDefaultValue,
547
+ version: 1.6
548
+ }),
549
+ createUpgrader: (oldConfig) => ({
550
+ ...oldConfig,
551
+ version: 1.6
552
+ })
553
+ });
554
+ var LATEST_CONFIG_DEFINITION = configV1_6Definition;
535
555
  function parseI18nConfig(rawConfig) {
536
556
  try {
537
557
  const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
@@ -566,4 +586,7 @@ var defaultConfig = LATEST_CONFIG_DEFINITION.defaultValue;
566
586
 
567
587
 
568
588
 
569
- exports.LATEST_CONFIG_DEFINITION = LATEST_CONFIG_DEFINITION; exports.bucketItemSchema = bucketItemSchema; exports.bucketTypeSchema = bucketTypeSchema; exports.bucketTypes = bucketTypes; 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.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;
589
+
590
+
591
+
592
+ 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;
package/build/index.d.cts CHANGED
@@ -228,6 +228,49 @@ declare const bucketItemSchema: Z.ZodObject<{
228
228
  delimiter?: "-" | "_" | null | undefined;
229
229
  }>;
230
230
  type BucketItem = Z.infer<typeof bucketItemSchema>;
231
+ declare const bucketValueSchemaV1_3: Z.ZodObject<{
232
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
233
+ path: Z.ZodString;
234
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
235
+ }, "strip", Z.ZodTypeAny, {
236
+ path: string;
237
+ delimiter?: "-" | "_" | null | undefined;
238
+ }, {
239
+ path: string;
240
+ delimiter?: "-" | "_" | null | undefined;
241
+ }>]>, "many">>;
242
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
243
+ path: Z.ZodString;
244
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
245
+ }, "strip", Z.ZodTypeAny, {
246
+ path: string;
247
+ delimiter?: "-" | "_" | null | undefined;
248
+ }, {
249
+ path: string;
250
+ delimiter?: "-" | "_" | null | undefined;
251
+ }>]>, "many">>>;
252
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
253
+ }, "strip", Z.ZodTypeAny, {
254
+ include: (string | {
255
+ path: string;
256
+ delimiter?: "-" | "_" | null | undefined;
257
+ })[];
258
+ exclude?: (string | {
259
+ path: string;
260
+ delimiter?: "-" | "_" | null | undefined;
261
+ })[] | undefined;
262
+ injectLocale?: string[] | undefined;
263
+ }, {
264
+ exclude?: (string | {
265
+ path: string;
266
+ delimiter?: "-" | "_" | null | undefined;
267
+ })[] | undefined;
268
+ include?: (string | {
269
+ path: string;
270
+ delimiter?: "-" | "_" | null | undefined;
271
+ })[] | undefined;
272
+ injectLocale?: string[] | undefined;
273
+ }>;
231
274
  declare const configV1_3Definition: ConfigDefinition<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
232
275
  version: Z.ZodDefault<Z.ZodNumber>;
233
276
  }, {
@@ -524,7 +567,54 @@ declare const configV1_5Definition: ConfigDefinition<Z.objectUtil.extendShape<Z.
524
567
  baseUrl?: string | undefined;
525
568
  }>]>>>;
526
569
  }>, Z.ZodRawShape>;
527
- declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
570
+ declare const bucketValueSchemaV1_6: Z.ZodObject<Z.objectUtil.extendShape<{
571
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
572
+ path: Z.ZodString;
573
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
574
+ }, "strip", Z.ZodTypeAny, {
575
+ path: string;
576
+ delimiter?: "-" | "_" | null | undefined;
577
+ }, {
578
+ path: string;
579
+ delimiter?: "-" | "_" | null | undefined;
580
+ }>]>, "many">>;
581
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
582
+ path: Z.ZodString;
583
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
584
+ }, "strip", Z.ZodTypeAny, {
585
+ path: string;
586
+ delimiter?: "-" | "_" | null | undefined;
587
+ }, {
588
+ path: string;
589
+ delimiter?: "-" | "_" | null | undefined;
590
+ }>]>, "many">>>;
591
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
592
+ }, {
593
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
594
+ }>, "strip", Z.ZodTypeAny, {
595
+ include: (string | {
596
+ path: string;
597
+ delimiter?: "-" | "_" | null | undefined;
598
+ })[];
599
+ exclude?: (string | {
600
+ path: string;
601
+ delimiter?: "-" | "_" | null | undefined;
602
+ })[] | undefined;
603
+ injectLocale?: string[] | undefined;
604
+ lockedKeys?: string[] | undefined;
605
+ }, {
606
+ exclude?: (string | {
607
+ path: string;
608
+ delimiter?: "-" | "_" | null | undefined;
609
+ })[] | undefined;
610
+ include?: (string | {
611
+ path: string;
612
+ delimiter?: "-" | "_" | null | undefined;
613
+ })[] | undefined;
614
+ injectLocale?: string[] | undefined;
615
+ lockedKeys?: string[] | undefined;
616
+ }>;
617
+ declare const configV1_6Definition: ConfigDefinition<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
528
618
  version: Z.ZodDefault<Z.ZodNumber>;
529
619
  }, {
530
620
  locale: Z.ZodObject<{
@@ -647,6 +737,226 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<Z.objectUtil.extendShap
647
737
  prompt: string;
648
738
  baseUrl?: string | undefined;
649
739
  }>]>>>;
740
+ }>, {
741
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "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<{
742
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
743
+ path: Z.ZodString;
744
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
745
+ }, "strip", Z.ZodTypeAny, {
746
+ path: string;
747
+ delimiter?: "-" | "_" | null | undefined;
748
+ }, {
749
+ path: string;
750
+ delimiter?: "-" | "_" | null | undefined;
751
+ }>]>, "many">>;
752
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
753
+ path: Z.ZodString;
754
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
755
+ }, "strip", Z.ZodTypeAny, {
756
+ path: string;
757
+ delimiter?: "-" | "_" | null | undefined;
758
+ }, {
759
+ path: string;
760
+ delimiter?: "-" | "_" | null | undefined;
761
+ }>]>, "many">>>;
762
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
763
+ }, {
764
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
765
+ }>, "strip", Z.ZodTypeAny, {
766
+ include: (string | {
767
+ path: string;
768
+ delimiter?: "-" | "_" | null | undefined;
769
+ })[];
770
+ exclude?: (string | {
771
+ path: string;
772
+ delimiter?: "-" | "_" | null | undefined;
773
+ })[] | undefined;
774
+ injectLocale?: string[] | undefined;
775
+ lockedKeys?: string[] | undefined;
776
+ }, {
777
+ exclude?: (string | {
778
+ path: string;
779
+ delimiter?: "-" | "_" | null | undefined;
780
+ })[] | undefined;
781
+ include?: (string | {
782
+ path: string;
783
+ delimiter?: "-" | "_" | null | undefined;
784
+ })[] | undefined;
785
+ injectLocale?: string[] | undefined;
786
+ lockedKeys?: string[] | undefined;
787
+ }>>>;
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<{
790
+ version: Z.ZodDefault<Z.ZodNumber>;
791
+ }, {
792
+ locale: Z.ZodObject<{
793
+ source: Z.ZodEffects<Z.ZodString, string, string>;
794
+ targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
795
+ }, "strip", Z.ZodTypeAny, {
796
+ source: string;
797
+ targets: string[];
798
+ }, {
799
+ source: string;
800
+ targets: string[];
801
+ }>;
802
+ buckets: Z.ZodOptional<Z.ZodDefault<Z.ZodRecord<Z.ZodString, Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>>>>;
803
+ }>, {
804
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>, Z.ZodObject<{
805
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>;
806
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
807
+ }, "strip", Z.ZodTypeAny, {
808
+ include: string[];
809
+ exclude?: string[] | undefined;
810
+ }, {
811
+ exclude?: string[] | undefined;
812
+ include?: string[] | undefined;
813
+ }>>>;
814
+ }>, {
815
+ locale: Z.ZodObject<Z.objectUtil.extendShape<{
816
+ source: Z.ZodEffects<Z.ZodString, string, string>;
817
+ targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
818
+ }, {
819
+ extraSource: Z.ZodOptional<Z.ZodEffects<Z.ZodString, string, string>>;
820
+ }>, "strip", Z.ZodTypeAny, {
821
+ source: string;
822
+ targets: string[];
823
+ extraSource?: string | undefined;
824
+ }, {
825
+ source: string;
826
+ targets: string[];
827
+ extraSource?: string | undefined;
828
+ }>;
829
+ }>, {
830
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>, Z.ZodObject<{
831
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
832
+ path: Z.ZodString;
833
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
834
+ }, "strip", Z.ZodTypeAny, {
835
+ path: string;
836
+ delimiter?: "-" | "_" | null | undefined;
837
+ }, {
838
+ path: string;
839
+ delimiter?: "-" | "_" | null | undefined;
840
+ }>]>, "many">>;
841
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
842
+ path: Z.ZodString;
843
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
844
+ }, "strip", Z.ZodTypeAny, {
845
+ path: string;
846
+ delimiter?: "-" | "_" | null | undefined;
847
+ }, {
848
+ path: string;
849
+ delimiter?: "-" | "_" | null | undefined;
850
+ }>]>, "many">>>;
851
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
852
+ }, "strip", Z.ZodTypeAny, {
853
+ include: (string | {
854
+ path: string;
855
+ delimiter?: "-" | "_" | null | undefined;
856
+ })[];
857
+ exclude?: (string | {
858
+ path: string;
859
+ delimiter?: "-" | "_" | null | undefined;
860
+ })[] | undefined;
861
+ injectLocale?: string[] | undefined;
862
+ }, {
863
+ exclude?: (string | {
864
+ path: string;
865
+ delimiter?: "-" | "_" | null | undefined;
866
+ })[] | undefined;
867
+ include?: (string | {
868
+ path: string;
869
+ delimiter?: "-" | "_" | null | undefined;
870
+ })[] | undefined;
871
+ injectLocale?: string[] | undefined;
872
+ }>>>;
873
+ }>, {
874
+ $schema: Z.ZodDefault<Z.ZodString>;
875
+ }>, {
876
+ provider: Z.ZodOptional<Z.ZodDefault<Z.ZodUnion<[Z.ZodObject<Z.objectUtil.extendShape<{
877
+ id: Z.ZodString;
878
+ model: Z.ZodString;
879
+ prompt: Z.ZodString;
880
+ baseUrl: Z.ZodOptional<Z.ZodString>;
881
+ }, {
882
+ id: Z.ZodLiteral<"lingo">;
883
+ model: Z.ZodLiteral<"best">;
884
+ }>, "strip", Z.ZodTypeAny, {
885
+ id: "lingo";
886
+ model: "best";
887
+ prompt: string;
888
+ baseUrl?: string | undefined;
889
+ }, {
890
+ id: "lingo";
891
+ model: "best";
892
+ prompt: string;
893
+ baseUrl?: string | undefined;
894
+ }>, Z.ZodObject<Z.objectUtil.extendShape<{
895
+ id: Z.ZodString;
896
+ model: Z.ZodString;
897
+ prompt: Z.ZodString;
898
+ baseUrl: Z.ZodOptional<Z.ZodString>;
899
+ }, {
900
+ id: Z.ZodEnum<["openai", "anthropic"]>;
901
+ }>, "strip", Z.ZodTypeAny, {
902
+ id: "openai" | "anthropic";
903
+ model: string;
904
+ prompt: string;
905
+ baseUrl?: string | undefined;
906
+ }, {
907
+ id: "openai" | "anthropic";
908
+ model: string;
909
+ prompt: string;
910
+ baseUrl?: string | undefined;
911
+ }>]>>>;
912
+ }>, {
913
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "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<{
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
+ }>, "strip", Z.ZodTypeAny, {
938
+ include: (string | {
939
+ path: string;
940
+ delimiter?: "-" | "_" | null | undefined;
941
+ })[];
942
+ exclude?: (string | {
943
+ path: string;
944
+ delimiter?: "-" | "_" | null | undefined;
945
+ })[] | undefined;
946
+ injectLocale?: string[] | undefined;
947
+ lockedKeys?: string[] | undefined;
948
+ }, {
949
+ exclude?: (string | {
950
+ path: string;
951
+ delimiter?: "-" | "_" | null | undefined;
952
+ })[] | undefined;
953
+ include?: (string | {
954
+ path: string;
955
+ delimiter?: "-" | "_" | null | undefined;
956
+ })[] | undefined;
957
+ injectLocale?: string[] | undefined;
958
+ lockedKeys?: string[] | undefined;
959
+ }>>>;
650
960
  }>, Z.ZodRawShape>;
651
961
  type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
652
962
  declare function parseI18nConfig(rawConfig: unknown): {
@@ -666,6 +976,7 @@ declare function parseI18nConfig(rawConfig: unknown): {
666
976
  delimiter?: "-" | "_" | null | undefined;
667
977
  })[] | undefined;
668
978
  injectLocale?: string[] | undefined;
979
+ lockedKeys?: string[] | undefined;
669
980
  }>>;
670
981
  $schema: string;
671
982
  provider?: {
@@ -697,6 +1008,7 @@ declare const defaultConfig: {
697
1008
  delimiter?: "-" | "_" | null | undefined;
698
1009
  })[] | undefined;
699
1010
  injectLocale?: string[] | undefined;
1011
+ lockedKeys?: string[] | undefined;
700
1012
  }>>;
701
1013
  $schema: string;
702
1014
  provider?: {
@@ -712,4 +1024,4 @@ declare const defaultConfig: {
712
1024
  } | undefined;
713
1025
  };
714
1026
 
715
- export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, configV0Definition, configV1Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
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 };
package/build/index.d.ts CHANGED
@@ -228,6 +228,49 @@ declare const bucketItemSchema: Z.ZodObject<{
228
228
  delimiter?: "-" | "_" | null | undefined;
229
229
  }>;
230
230
  type BucketItem = Z.infer<typeof bucketItemSchema>;
231
+ declare const bucketValueSchemaV1_3: Z.ZodObject<{
232
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
233
+ path: Z.ZodString;
234
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
235
+ }, "strip", Z.ZodTypeAny, {
236
+ path: string;
237
+ delimiter?: "-" | "_" | null | undefined;
238
+ }, {
239
+ path: string;
240
+ delimiter?: "-" | "_" | null | undefined;
241
+ }>]>, "many">>;
242
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
243
+ path: Z.ZodString;
244
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
245
+ }, "strip", Z.ZodTypeAny, {
246
+ path: string;
247
+ delimiter?: "-" | "_" | null | undefined;
248
+ }, {
249
+ path: string;
250
+ delimiter?: "-" | "_" | null | undefined;
251
+ }>]>, "many">>>;
252
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
253
+ }, "strip", Z.ZodTypeAny, {
254
+ include: (string | {
255
+ path: string;
256
+ delimiter?: "-" | "_" | null | undefined;
257
+ })[];
258
+ exclude?: (string | {
259
+ path: string;
260
+ delimiter?: "-" | "_" | null | undefined;
261
+ })[] | undefined;
262
+ injectLocale?: string[] | undefined;
263
+ }, {
264
+ exclude?: (string | {
265
+ path: string;
266
+ delimiter?: "-" | "_" | null | undefined;
267
+ })[] | undefined;
268
+ include?: (string | {
269
+ path: string;
270
+ delimiter?: "-" | "_" | null | undefined;
271
+ })[] | undefined;
272
+ injectLocale?: string[] | undefined;
273
+ }>;
231
274
  declare const configV1_3Definition: ConfigDefinition<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
232
275
  version: Z.ZodDefault<Z.ZodNumber>;
233
276
  }, {
@@ -524,7 +567,54 @@ declare const configV1_5Definition: ConfigDefinition<Z.objectUtil.extendShape<Z.
524
567
  baseUrl?: string | undefined;
525
568
  }>]>>>;
526
569
  }>, Z.ZodRawShape>;
527
- declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
570
+ declare const bucketValueSchemaV1_6: Z.ZodObject<Z.objectUtil.extendShape<{
571
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
572
+ path: Z.ZodString;
573
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
574
+ }, "strip", Z.ZodTypeAny, {
575
+ path: string;
576
+ delimiter?: "-" | "_" | null | undefined;
577
+ }, {
578
+ path: string;
579
+ delimiter?: "-" | "_" | null | undefined;
580
+ }>]>, "many">>;
581
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
582
+ path: Z.ZodString;
583
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
584
+ }, "strip", Z.ZodTypeAny, {
585
+ path: string;
586
+ delimiter?: "-" | "_" | null | undefined;
587
+ }, {
588
+ path: string;
589
+ delimiter?: "-" | "_" | null | undefined;
590
+ }>]>, "many">>>;
591
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
592
+ }, {
593
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
594
+ }>, "strip", Z.ZodTypeAny, {
595
+ include: (string | {
596
+ path: string;
597
+ delimiter?: "-" | "_" | null | undefined;
598
+ })[];
599
+ exclude?: (string | {
600
+ path: string;
601
+ delimiter?: "-" | "_" | null | undefined;
602
+ })[] | undefined;
603
+ injectLocale?: string[] | undefined;
604
+ lockedKeys?: string[] | undefined;
605
+ }, {
606
+ exclude?: (string | {
607
+ path: string;
608
+ delimiter?: "-" | "_" | null | undefined;
609
+ })[] | undefined;
610
+ include?: (string | {
611
+ path: string;
612
+ delimiter?: "-" | "_" | null | undefined;
613
+ })[] | undefined;
614
+ injectLocale?: string[] | undefined;
615
+ lockedKeys?: string[] | undefined;
616
+ }>;
617
+ declare const configV1_6Definition: ConfigDefinition<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<Z.objectUtil.extendShape<{
528
618
  version: Z.ZodDefault<Z.ZodNumber>;
529
619
  }, {
530
620
  locale: Z.ZodObject<{
@@ -647,6 +737,226 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<Z.objectUtil.extendShap
647
737
  prompt: string;
648
738
  baseUrl?: string | undefined;
649
739
  }>]>>>;
740
+ }>, {
741
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "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<{
742
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
743
+ path: Z.ZodString;
744
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
745
+ }, "strip", Z.ZodTypeAny, {
746
+ path: string;
747
+ delimiter?: "-" | "_" | null | undefined;
748
+ }, {
749
+ path: string;
750
+ delimiter?: "-" | "_" | null | undefined;
751
+ }>]>, "many">>;
752
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
753
+ path: Z.ZodString;
754
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
755
+ }, "strip", Z.ZodTypeAny, {
756
+ path: string;
757
+ delimiter?: "-" | "_" | null | undefined;
758
+ }, {
759
+ path: string;
760
+ delimiter?: "-" | "_" | null | undefined;
761
+ }>]>, "many">>>;
762
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
763
+ }, {
764
+ lockedKeys: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
765
+ }>, "strip", Z.ZodTypeAny, {
766
+ include: (string | {
767
+ path: string;
768
+ delimiter?: "-" | "_" | null | undefined;
769
+ })[];
770
+ exclude?: (string | {
771
+ path: string;
772
+ delimiter?: "-" | "_" | null | undefined;
773
+ })[] | undefined;
774
+ injectLocale?: string[] | undefined;
775
+ lockedKeys?: string[] | undefined;
776
+ }, {
777
+ exclude?: (string | {
778
+ path: string;
779
+ delimiter?: "-" | "_" | null | undefined;
780
+ })[] | undefined;
781
+ include?: (string | {
782
+ path: string;
783
+ delimiter?: "-" | "_" | null | undefined;
784
+ })[] | undefined;
785
+ injectLocale?: string[] | undefined;
786
+ lockedKeys?: string[] | undefined;
787
+ }>>>;
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<{
790
+ version: Z.ZodDefault<Z.ZodNumber>;
791
+ }, {
792
+ locale: Z.ZodObject<{
793
+ source: Z.ZodEffects<Z.ZodString, string, string>;
794
+ targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
795
+ }, "strip", Z.ZodTypeAny, {
796
+ source: string;
797
+ targets: string[];
798
+ }, {
799
+ source: string;
800
+ targets: string[];
801
+ }>;
802
+ buckets: Z.ZodOptional<Z.ZodDefault<Z.ZodRecord<Z.ZodString, Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>>>>;
803
+ }>, {
804
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>, Z.ZodObject<{
805
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>;
806
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
807
+ }, "strip", Z.ZodTypeAny, {
808
+ include: string[];
809
+ exclude?: string[] | undefined;
810
+ }, {
811
+ exclude?: string[] | undefined;
812
+ include?: string[] | undefined;
813
+ }>>>;
814
+ }>, {
815
+ locale: Z.ZodObject<Z.objectUtil.extendShape<{
816
+ source: Z.ZodEffects<Z.ZodString, string, string>;
817
+ targets: Z.ZodArray<Z.ZodEffects<Z.ZodString, string, string>, "many">;
818
+ }, {
819
+ extraSource: Z.ZodOptional<Z.ZodEffects<Z.ZodString, string, string>>;
820
+ }>, "strip", Z.ZodTypeAny, {
821
+ source: string;
822
+ targets: string[];
823
+ extraSource?: string | undefined;
824
+ }, {
825
+ source: string;
826
+ targets: string[];
827
+ extraSource?: string | undefined;
828
+ }>;
829
+ }>, {
830
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json"]>, Z.ZodObject<{
831
+ include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
832
+ path: Z.ZodString;
833
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
834
+ }, "strip", Z.ZodTypeAny, {
835
+ path: string;
836
+ delimiter?: "-" | "_" | null | undefined;
837
+ }, {
838
+ path: string;
839
+ delimiter?: "-" | "_" | null | undefined;
840
+ }>]>, "many">>;
841
+ exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
842
+ path: Z.ZodString;
843
+ delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
844
+ }, "strip", Z.ZodTypeAny, {
845
+ path: string;
846
+ delimiter?: "-" | "_" | null | undefined;
847
+ }, {
848
+ path: string;
849
+ delimiter?: "-" | "_" | null | undefined;
850
+ }>]>, "many">>>;
851
+ injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString, "many">>;
852
+ }, "strip", Z.ZodTypeAny, {
853
+ include: (string | {
854
+ path: string;
855
+ delimiter?: "-" | "_" | null | undefined;
856
+ })[];
857
+ exclude?: (string | {
858
+ path: string;
859
+ delimiter?: "-" | "_" | null | undefined;
860
+ })[] | undefined;
861
+ injectLocale?: string[] | undefined;
862
+ }, {
863
+ exclude?: (string | {
864
+ path: string;
865
+ delimiter?: "-" | "_" | null | undefined;
866
+ })[] | undefined;
867
+ include?: (string | {
868
+ path: string;
869
+ delimiter?: "-" | "_" | null | undefined;
870
+ })[] | undefined;
871
+ injectLocale?: string[] | undefined;
872
+ }>>>;
873
+ }>, {
874
+ $schema: Z.ZodDefault<Z.ZodString>;
875
+ }>, {
876
+ provider: Z.ZodOptional<Z.ZodDefault<Z.ZodUnion<[Z.ZodObject<Z.objectUtil.extendShape<{
877
+ id: Z.ZodString;
878
+ model: Z.ZodString;
879
+ prompt: Z.ZodString;
880
+ baseUrl: Z.ZodOptional<Z.ZodString>;
881
+ }, {
882
+ id: Z.ZodLiteral<"lingo">;
883
+ model: Z.ZodLiteral<"best">;
884
+ }>, "strip", Z.ZodTypeAny, {
885
+ id: "lingo";
886
+ model: "best";
887
+ prompt: string;
888
+ baseUrl?: string | undefined;
889
+ }, {
890
+ id: "lingo";
891
+ model: "best";
892
+ prompt: string;
893
+ baseUrl?: string | undefined;
894
+ }>, Z.ZodObject<Z.objectUtil.extendShape<{
895
+ id: Z.ZodString;
896
+ model: Z.ZodString;
897
+ prompt: Z.ZodString;
898
+ baseUrl: Z.ZodOptional<Z.ZodString>;
899
+ }, {
900
+ id: Z.ZodEnum<["openai", "anthropic"]>;
901
+ }>, "strip", Z.ZodTypeAny, {
902
+ id: "openai" | "anthropic";
903
+ model: string;
904
+ prompt: string;
905
+ baseUrl?: string | undefined;
906
+ }, {
907
+ id: "openai" | "anthropic";
908
+ model: string;
909
+ prompt: string;
910
+ baseUrl?: string | undefined;
911
+ }>]>>>;
912
+ }>, {
913
+ buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "flutter", "html", "json", "markdown", "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<{
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
+ }>, "strip", Z.ZodTypeAny, {
938
+ include: (string | {
939
+ path: string;
940
+ delimiter?: "-" | "_" | null | undefined;
941
+ })[];
942
+ exclude?: (string | {
943
+ path: string;
944
+ delimiter?: "-" | "_" | null | undefined;
945
+ })[] | undefined;
946
+ injectLocale?: string[] | undefined;
947
+ lockedKeys?: string[] | undefined;
948
+ }, {
949
+ exclude?: (string | {
950
+ path: string;
951
+ delimiter?: "-" | "_" | null | undefined;
952
+ })[] | undefined;
953
+ include?: (string | {
954
+ path: string;
955
+ delimiter?: "-" | "_" | null | undefined;
956
+ })[] | undefined;
957
+ injectLocale?: string[] | undefined;
958
+ lockedKeys?: string[] | undefined;
959
+ }>>>;
650
960
  }>, Z.ZodRawShape>;
651
961
  type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
652
962
  declare function parseI18nConfig(rawConfig: unknown): {
@@ -666,6 +976,7 @@ declare function parseI18nConfig(rawConfig: unknown): {
666
976
  delimiter?: "-" | "_" | null | undefined;
667
977
  })[] | undefined;
668
978
  injectLocale?: string[] | undefined;
979
+ lockedKeys?: string[] | undefined;
669
980
  }>>;
670
981
  $schema: string;
671
982
  provider?: {
@@ -697,6 +1008,7 @@ declare const defaultConfig: {
697
1008
  delimiter?: "-" | "_" | null | undefined;
698
1009
  })[] | undefined;
699
1010
  injectLocale?: string[] | undefined;
1011
+ lockedKeys?: string[] | undefined;
700
1012
  }>>;
701
1013
  $schema: string;
702
1014
  provider?: {
@@ -712,4 +1024,4 @@ declare const defaultConfig: {
712
1024
  } | undefined;
713
1025
  };
714
1026
 
715
- export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, configV0Definition, configV1Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
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 };
package/build/index.mjs CHANGED
@@ -462,15 +462,16 @@ var bucketItemSchema = Z3.object({
462
462
  path: Z3.string(),
463
463
  delimiter: Z3.union([Z3.literal("-"), Z3.literal("_"), Z3.literal(null)]).optional()
464
464
  });
465
+ var bucketValueSchemaV1_3 = Z3.object({
466
+ include: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).default([]),
467
+ exclude: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).default([]).optional(),
468
+ injectLocale: Z3.array(Z3.string()).optional()
469
+ });
465
470
  var configV1_3Definition = extendConfigDefinition(configV1_2Definition, {
466
471
  createSchema: (baseSchema) => baseSchema.extend({
467
472
  buckets: Z3.record(
468
473
  bucketTypeSchema,
469
- Z3.object({
470
- include: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).default([]),
471
- exclude: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).default([]).optional(),
472
- injectLocale: Z3.array(Z3.string()).optional()
473
- })
474
+ bucketValueSchemaV1_3
474
475
  ).default({})
475
476
  }),
476
477
  createDefaultValue: (baseDefaultValue) => ({
@@ -531,7 +532,26 @@ var configV1_5Definition = extendConfigDefinition(configV1_4Definition, {
531
532
  version: 1.5
532
533
  })
533
534
  });
534
- var LATEST_CONFIG_DEFINITION = configV1_5Definition;
535
+ var bucketValueSchemaV1_6 = bucketValueSchemaV1_3.extend({
536
+ lockedKeys: Z3.array(Z3.string()).default([]).optional()
537
+ });
538
+ var configV1_6Definition = extendConfigDefinition(configV1_5Definition, {
539
+ createSchema: (baseSchema) => baseSchema.extend({
540
+ buckets: Z3.record(
541
+ bucketTypeSchema,
542
+ bucketValueSchemaV1_6
543
+ ).default({})
544
+ }),
545
+ createDefaultValue: (baseDefaultValue) => ({
546
+ ...baseDefaultValue,
547
+ version: 1.6
548
+ }),
549
+ createUpgrader: (oldConfig) => ({
550
+ ...oldConfig,
551
+ version: 1.6
552
+ })
553
+ });
554
+ var LATEST_CONFIG_DEFINITION = configV1_6Definition;
535
555
  function parseI18nConfig(rawConfig) {
536
556
  try {
537
557
  const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
@@ -546,6 +566,8 @@ export {
546
566
  bucketItemSchema,
547
567
  bucketTypeSchema,
548
568
  bucketTypes,
569
+ bucketValueSchemaV1_3,
570
+ bucketValueSchemaV1_6,
549
571
  configV0Definition,
550
572
  configV1Definition,
551
573
  configV1_1Definition,
@@ -553,6 +575,7 @@ export {
553
575
  configV1_3Definition,
554
576
  configV1_4Definition,
555
577
  configV1_5Definition,
578
+ configV1_6Definition,
556
579
  defaultConfig,
557
580
  getLocaleCodeDelimiter,
558
581
  localeCodeSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingo.dev/_spec",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "description": "Lingo.dev open specification",
5
5
  "private": false,
6
6
  "publishConfig": {