@lingo.dev/_spec 0.39.3 → 0.40.1
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.
- package/build/i18n.schema.json +42 -20
- package/build/index.cjs +51 -27
- package/build/index.d.cts +14 -14
- package/build/index.d.ts +14 -14
- package/build/index.mjs +51 -27
- package/package.json +3 -2
package/build/i18n.schema.json
CHANGED
@@ -3,29 +3,34 @@
|
|
3
3
|
"properties": {
|
4
4
|
"version": {
|
5
5
|
"type": "number",
|
6
|
-
"default": 0
|
6
|
+
"default": 0,
|
7
|
+
"description": "The version number of the schema."
|
7
8
|
},
|
8
9
|
"locale": {
|
9
10
|
"type": "object",
|
10
11
|
"properties": {
|
11
12
|
"source": {
|
12
|
-
"type": "string"
|
13
|
+
"type": "string",
|
14
|
+
"description": "Primary source locale code of your content (e.g. 'en', 'en-US', 'pt_BR', or 'pt-rBR'). Must be one of the supported locale codes – either a short ISO-639 language code or a full locale identifier using '-', '_' or Android '-r' notation."
|
13
15
|
},
|
14
16
|
"targets": {
|
15
17
|
"type": "array",
|
16
18
|
"items": {
|
17
19
|
"$ref": "#/properties/locale/properties/source"
|
18
|
-
}
|
20
|
+
},
|
21
|
+
"description": "List of target locale codes to translate to."
|
19
22
|
},
|
20
23
|
"extraSource": {
|
21
|
-
"$ref": "#/properties/locale/properties/
|
24
|
+
"$ref": "#/properties/locale/properties/targets/items",
|
25
|
+
"description": "Optional extra source locale code used as fallback during translation."
|
22
26
|
}
|
23
27
|
},
|
24
28
|
"required": [
|
25
29
|
"source",
|
26
30
|
"targets"
|
27
31
|
],
|
28
|
-
"additionalProperties": false
|
32
|
+
"additionalProperties": false,
|
33
|
+
"description": "Locale configuration block."
|
29
34
|
},
|
30
35
|
"buckets": {
|
31
36
|
"type": "object",
|
@@ -43,7 +48,8 @@
|
|
43
48
|
"type": "object",
|
44
49
|
"properties": {
|
45
50
|
"path": {
|
46
|
-
"type": "string"
|
51
|
+
"type": "string",
|
52
|
+
"description": "Path pattern containing a [locale] placeholder."
|
47
53
|
},
|
48
54
|
"delimiter": {
|
49
55
|
"type": [
|
@@ -54,17 +60,20 @@
|
|
54
60
|
"-",
|
55
61
|
"_",
|
56
62
|
null
|
57
|
-
]
|
63
|
+
],
|
64
|
+
"description": "Delimiter that replaces the [locale] placeholder in the path (default: no delimiter)."
|
58
65
|
}
|
59
66
|
},
|
60
67
|
"required": [
|
61
68
|
"path"
|
62
69
|
],
|
63
|
-
"additionalProperties": false
|
70
|
+
"additionalProperties": false,
|
71
|
+
"description": "Bucket path item. Either a string path or an object specifying path and delimiter."
|
64
72
|
}
|
65
73
|
]
|
66
74
|
},
|
67
|
-
"default": []
|
75
|
+
"default": [],
|
76
|
+
"description": "Glob patterns or bucket items to include for this bucket."
|
68
77
|
},
|
69
78
|
"exclude": {
|
70
79
|
"type": "array",
|
@@ -78,37 +87,43 @@
|
|
78
87
|
}
|
79
88
|
]
|
80
89
|
},
|
81
|
-
"default": []
|
90
|
+
"default": [],
|
91
|
+
"description": "Glob patterns or bucket items to exclude from this bucket."
|
82
92
|
},
|
83
93
|
"injectLocale": {
|
84
94
|
"type": "array",
|
85
95
|
"items": {
|
86
96
|
"type": "string"
|
87
|
-
}
|
97
|
+
},
|
98
|
+
"description": "Keys within files where the current locale should be injected or removed."
|
88
99
|
},
|
89
100
|
"lockedKeys": {
|
90
101
|
"type": "array",
|
91
102
|
"items": {
|
92
103
|
"type": "string"
|
93
104
|
},
|
94
|
-
"default": []
|
105
|
+
"default": [],
|
106
|
+
"description": "Keys that must remain unchanged and should never be overwritten by translations."
|
95
107
|
},
|
96
108
|
"lockedPatterns": {
|
97
109
|
"type": "array",
|
98
110
|
"items": {
|
99
111
|
"type": "string"
|
100
112
|
},
|
101
|
-
"default": []
|
113
|
+
"default": [],
|
114
|
+
"description": "Regular expression patterns whose matched content should remain locked during translation."
|
102
115
|
},
|
103
116
|
"ignoredKeys": {
|
104
117
|
"type": "array",
|
105
118
|
"items": {
|
106
119
|
"type": "string"
|
107
120
|
},
|
108
|
-
"default": []
|
121
|
+
"default": [],
|
122
|
+
"description": "Keys that should be completely ignored by translation processes."
|
109
123
|
}
|
110
124
|
},
|
111
|
-
"additionalProperties": false
|
125
|
+
"additionalProperties": false,
|
126
|
+
"description": "Configuration options for a translation bucket."
|
112
127
|
},
|
113
128
|
"propertyNames": {
|
114
129
|
"enum": [
|
@@ -118,6 +133,8 @@
|
|
118
133
|
"flutter",
|
119
134
|
"html",
|
120
135
|
"json",
|
136
|
+
"json5",
|
137
|
+
"jsonc",
|
121
138
|
"markdown",
|
122
139
|
"mdx",
|
123
140
|
"xcode-strings",
|
@@ -159,16 +176,20 @@
|
|
159
176
|
"ollama",
|
160
177
|
"openrouter",
|
161
178
|
"mistral"
|
162
|
-
]
|
179
|
+
],
|
180
|
+
"description": "Identifier of the translation provider service."
|
163
181
|
},
|
164
182
|
"model": {
|
165
|
-
"type": "string"
|
183
|
+
"type": "string",
|
184
|
+
"description": "Model name to use for translations."
|
166
185
|
},
|
167
186
|
"prompt": {
|
168
|
-
"type": "string"
|
187
|
+
"type": "string",
|
188
|
+
"description": "Prompt template used when requesting translations."
|
169
189
|
},
|
170
190
|
"baseUrl": {
|
171
|
-
"type": "string"
|
191
|
+
"type": "string",
|
192
|
+
"description": "Custom base URL for the provider API (optional)."
|
172
193
|
}
|
173
194
|
},
|
174
195
|
"required": [
|
@@ -176,7 +197,8 @@
|
|
176
197
|
"model",
|
177
198
|
"prompt"
|
178
199
|
],
|
179
|
-
"additionalProperties": false
|
200
|
+
"additionalProperties": false,
|
201
|
+
"description": "Configuration for the machine-translation provider."
|
180
202
|
}
|
181
203
|
},
|
182
204
|
"required": [
|
package/build/index.cjs
CHANGED
@@ -334,6 +334,8 @@ var bucketTypes = [
|
|
334
334
|
"flutter",
|
335
335
|
"html",
|
336
336
|
"json",
|
337
|
+
"json5",
|
338
|
+
"jsonc",
|
337
339
|
"markdown",
|
338
340
|
"mdx",
|
339
341
|
"xcode-strings",
|
@@ -361,9 +363,13 @@ var bucketTypeSchema = _zod2.default.enum(bucketTypes);
|
|
361
363
|
// src/config.ts
|
362
364
|
|
363
365
|
var localeSchema = _zod2.default.object({
|
364
|
-
source: localeCodeSchema
|
365
|
-
|
366
|
-
|
366
|
+
source: localeCodeSchema.describe(
|
367
|
+
"Primary source locale code of your content (e.g. 'en', 'en-US', 'pt_BR', or 'pt-rBR'). Must be one of the supported locale codes \u2013 either a short ISO-639 language code or a full locale identifier using '-', '_' or Android '-r' notation."
|
368
|
+
),
|
369
|
+
targets: _zod2.default.array(localeCodeSchema).describe(
|
370
|
+
"List of target locale codes to translate to."
|
371
|
+
)
|
372
|
+
}).describe("Locale configuration block.");
|
367
373
|
var createConfigDefinition = (definition) => definition;
|
368
374
|
var extendConfigDefinition = (definition, params) => {
|
369
375
|
const schema = params.createSchema(definition.schema);
|
@@ -402,7 +408,7 @@ ${localeErrors.join("\n")}`);
|
|
402
408
|
});
|
403
409
|
};
|
404
410
|
var configV0Schema = _zod2.default.object({
|
405
|
-
version: _zod2.default.number().default(0)
|
411
|
+
version: _zod2.default.number().default(0).describe("The version number of the schema.")
|
406
412
|
});
|
407
413
|
var configV0Definition = createConfigDefinition({
|
408
414
|
schema: configV0Schema,
|
@@ -414,7 +420,9 @@ var configV0Definition = createConfigDefinition({
|
|
414
420
|
var configV1Definition = extendConfigDefinition(configV0Definition, {
|
415
421
|
createSchema: (baseSchema) => baseSchema.extend({
|
416
422
|
locale: localeSchema,
|
417
|
-
buckets: _zod2.default.record(_zod2.default.string(), bucketTypeSchema).default({}).
|
423
|
+
buckets: _zod2.default.record(_zod2.default.string(), bucketTypeSchema).default({}).describe(
|
424
|
+
"Mapping of source file paths (glob patterns) to bucket types."
|
425
|
+
).optional()
|
418
426
|
}),
|
419
427
|
createDefaultValue: () => ({
|
420
428
|
version: 1,
|
@@ -438,8 +446,12 @@ var configV1_1Definition = extendConfigDefinition(configV1Definition, {
|
|
438
446
|
buckets: _zod2.default.record(
|
439
447
|
bucketTypeSchema,
|
440
448
|
_zod2.default.object({
|
441
|
-
include: _zod2.default.array(_zod2.default.string()).default([])
|
442
|
-
|
449
|
+
include: _zod2.default.array(_zod2.default.string()).default([]).describe(
|
450
|
+
"File paths or glob patterns to include for this bucket."
|
451
|
+
),
|
452
|
+
exclude: _zod2.default.array(_zod2.default.string()).default([]).optional().describe(
|
453
|
+
"File paths or glob patterns to exclude from this bucket."
|
454
|
+
)
|
443
455
|
})
|
444
456
|
).default({})
|
445
457
|
}),
|
@@ -474,7 +486,9 @@ var configV1_2Definition = extendConfigDefinition(
|
|
474
486
|
{
|
475
487
|
createSchema: (baseSchema) => baseSchema.extend({
|
476
488
|
locale: localeSchema.extend({
|
477
|
-
extraSource: localeCodeSchema.optional()
|
489
|
+
extraSource: localeCodeSchema.optional().describe(
|
490
|
+
"Optional extra source locale code used as fallback during translation."
|
491
|
+
)
|
478
492
|
})
|
479
493
|
}),
|
480
494
|
createDefaultValue: (baseDefaultValue) => ({
|
@@ -488,18 +502,20 @@ var configV1_2Definition = extendConfigDefinition(
|
|
488
502
|
}
|
489
503
|
);
|
490
504
|
var bucketItemSchema = _zod2.default.object({
|
491
|
-
path: _zod2.default.string(),
|
492
|
-
delimiter: _zod2.default.union([
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
505
|
+
path: _zod2.default.string().describe("Path pattern containing a [locale] placeholder."),
|
506
|
+
delimiter: _zod2.default.union([_zod2.default.literal("-"), _zod2.default.literal("_"), _zod2.default.literal(null)]).optional().describe(
|
507
|
+
"Delimiter that replaces the [locale] placeholder in the path (default: no delimiter)."
|
508
|
+
)
|
509
|
+
}).describe(
|
510
|
+
"Bucket path item. Either a string path or an object specifying path and delimiter."
|
511
|
+
);
|
498
512
|
var bucketValueSchemaV1_3 = _zod2.default.object({
|
499
|
-
include: _zod2.default.array(_zod2.default.union([_zod2.default.string(), bucketItemSchema])).default([]),
|
500
|
-
exclude: _zod2.default.array(_zod2.default.union([_zod2.default.string(), bucketItemSchema])).default([]).optional(),
|
501
|
-
injectLocale: _zod2.default.array(_zod2.default.string()).optional()
|
502
|
-
|
513
|
+
include: _zod2.default.array(_zod2.default.union([_zod2.default.string(), bucketItemSchema])).default([]).describe("Glob patterns or bucket items to include for this bucket."),
|
514
|
+
exclude: _zod2.default.array(_zod2.default.union([_zod2.default.string(), bucketItemSchema])).default([]).optional().describe("Glob patterns or bucket items to exclude from this bucket."),
|
515
|
+
injectLocale: _zod2.default.array(_zod2.default.string()).optional().describe(
|
516
|
+
"Keys within files where the current locale should be injected or removed."
|
517
|
+
)
|
518
|
+
}).describe("Configuration options for a translation bucket.");
|
503
519
|
var configV1_3Definition = extendConfigDefinition(
|
504
520
|
configV1_2Definition,
|
505
521
|
{
|
@@ -543,11 +559,13 @@ var providerSchema = _zod2.default.object({
|
|
543
559
|
"ollama",
|
544
560
|
"openrouter",
|
545
561
|
"mistral"
|
546
|
-
]),
|
547
|
-
model: _zod2.default.string(),
|
548
|
-
prompt: _zod2.default.string()
|
549
|
-
|
550
|
-
|
562
|
+
]).describe("Identifier of the translation provider service."),
|
563
|
+
model: _zod2.default.string().describe("Model name to use for translations."),
|
564
|
+
prompt: _zod2.default.string().describe(
|
565
|
+
"Prompt template used when requesting translations."
|
566
|
+
),
|
567
|
+
baseUrl: _zod2.default.string().optional().describe("Custom base URL for the provider API (optional).")
|
568
|
+
}).describe("Configuration for the machine-translation provider.");
|
551
569
|
var configV1_5Definition = extendConfigDefinition(
|
552
570
|
configV1_4Definition,
|
553
571
|
{
|
@@ -565,7 +583,9 @@ var configV1_5Definition = extendConfigDefinition(
|
|
565
583
|
}
|
566
584
|
);
|
567
585
|
var bucketValueSchemaV1_6 = bucketValueSchemaV1_3.extend({
|
568
|
-
lockedKeys: _zod2.default.array(_zod2.default.string()).default([]).optional()
|
586
|
+
lockedKeys: _zod2.default.array(_zod2.default.string()).default([]).optional().describe(
|
587
|
+
"Keys that must remain unchanged and should never be overwritten by translations."
|
588
|
+
)
|
569
589
|
});
|
570
590
|
var configV1_6Definition = extendConfigDefinition(
|
571
591
|
configV1_5Definition,
|
@@ -584,7 +604,9 @@ var configV1_6Definition = extendConfigDefinition(
|
|
584
604
|
}
|
585
605
|
);
|
586
606
|
var bucketValueSchemaV1_7 = bucketValueSchemaV1_6.extend({
|
587
|
-
lockedPatterns: _zod2.default.array(_zod2.default.string()).default([]).optional()
|
607
|
+
lockedPatterns: _zod2.default.array(_zod2.default.string()).default([]).optional().describe(
|
608
|
+
"Regular expression patterns whose matched content should remain locked during translation."
|
609
|
+
)
|
588
610
|
});
|
589
611
|
var configV1_7Definition = extendConfigDefinition(
|
590
612
|
configV1_6Definition,
|
@@ -603,7 +625,9 @@ var configV1_7Definition = extendConfigDefinition(
|
|
603
625
|
}
|
604
626
|
);
|
605
627
|
var bucketValueSchemaV1_8 = bucketValueSchemaV1_7.extend({
|
606
|
-
ignoredKeys: _zod2.default.array(_zod2.default.string()).default([]).optional()
|
628
|
+
ignoredKeys: _zod2.default.array(_zod2.default.string()).default([]).optional().describe(
|
629
|
+
"Keys that should be completely ignored by translation processes."
|
630
|
+
)
|
607
631
|
});
|
608
632
|
var configV1_8Definition = extendConfigDefinition(
|
609
633
|
configV1_7Definition,
|
package/build/index.d.cts
CHANGED
@@ -116,8 +116,8 @@ declare const resolveOverriddenLocale: (locale: string, delimiter?: LocaleDelimi
|
|
116
116
|
*/
|
117
117
|
declare function normalizeLocale(locale: string): string;
|
118
118
|
|
119
|
-
declare const bucketTypes: readonly ["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"];
|
120
|
-
declare const bucketTypeSchema: Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>;
|
119
|
+
declare const bucketTypes: readonly ["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"];
|
120
|
+
declare const bucketTypeSchema: Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>;
|
121
121
|
|
122
122
|
declare const localeSchema: Z.ZodObject<{
|
123
123
|
source: Z.ZodEffects<Z.ZodString, string, string>;
|
@@ -150,7 +150,7 @@ declare const configV1Definition: ConfigDefinition<{
|
|
150
150
|
source: string;
|
151
151
|
targets: string[];
|
152
152
|
}>;
|
153
|
-
buckets: Z.ZodOptional<Z.ZodDefault<Z.ZodRecord<Z.ZodString, Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>>>>;
|
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
154
|
}, Z.ZodRawShape>;
|
155
155
|
declare const configV1_1Definition: ConfigDefinition<{
|
156
156
|
version: Z.ZodDefault<Z.ZodNumber>;
|
@@ -165,7 +165,7 @@ declare const configV1_1Definition: ConfigDefinition<{
|
|
165
165
|
targets: string[];
|
166
166
|
}>;
|
167
167
|
} & {
|
168
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
168
|
+
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<{
|
169
169
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>;
|
170
170
|
exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
|
171
171
|
}, "strip", Z.ZodTypeAny, {
|
@@ -178,7 +178,7 @@ declare const configV1_1Definition: ConfigDefinition<{
|
|
178
178
|
}, Z.ZodRawShape>;
|
179
179
|
declare const configV1_2Definition: ConfigDefinition<{
|
180
180
|
version: Z.ZodDefault<Z.ZodNumber>;
|
181
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
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<{
|
182
182
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>;
|
183
183
|
exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
|
184
184
|
}, "strip", Z.ZodTypeAny, {
|
@@ -275,7 +275,7 @@ declare const configV1_3Definition: ConfigDefinition<{
|
|
275
275
|
extraSource?: string | undefined;
|
276
276
|
}>;
|
277
277
|
} & {
|
278
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
278
|
+
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<{
|
279
279
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
|
280
280
|
path: Z.ZodString;
|
281
281
|
delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
@@ -336,7 +336,7 @@ declare const configV1_4Definition: ConfigDefinition<{
|
|
336
336
|
extraSource?: string | undefined;
|
337
337
|
}>;
|
338
338
|
} & {
|
339
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
339
|
+
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<{
|
340
340
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
|
341
341
|
path: Z.ZodString;
|
342
342
|
delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
@@ -399,7 +399,7 @@ declare const configV1_5Definition: ConfigDefinition<{
|
|
399
399
|
extraSource?: string | undefined;
|
400
400
|
}>;
|
401
401
|
} & {
|
402
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
402
|
+
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<{
|
403
403
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
|
404
404
|
path: Z.ZodString;
|
405
405
|
delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
@@ -543,7 +543,7 @@ declare const configV1_6Definition: ConfigDefinition<{
|
|
543
543
|
baseUrl?: string | undefined;
|
544
544
|
}>>;
|
545
545
|
} & {
|
546
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
546
|
+
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<{
|
547
547
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
|
548
548
|
path: Z.ZodString;
|
549
549
|
delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
@@ -676,7 +676,7 @@ declare const configV1_7Definition: ConfigDefinition<{
|
|
676
676
|
baseUrl?: string | undefined;
|
677
677
|
}>>;
|
678
678
|
} & {
|
679
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
679
|
+
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<{
|
680
680
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
|
681
681
|
path: Z.ZodString;
|
682
682
|
delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
@@ -817,7 +817,7 @@ declare const configV1_8Definition: ConfigDefinition<{
|
|
817
817
|
baseUrl?: string | undefined;
|
818
818
|
}>>;
|
819
819
|
} & {
|
820
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
820
|
+
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<{
|
821
821
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
|
822
822
|
path: Z.ZodString;
|
823
823
|
delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
@@ -907,7 +907,7 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
|
|
907
907
|
baseUrl?: string | undefined;
|
908
908
|
}>>;
|
909
909
|
} & {
|
910
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
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
911
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
|
912
912
|
path: Z.ZodString;
|
913
913
|
delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
@@ -971,7 +971,7 @@ declare function parseI18nConfig(rawConfig: unknown): {
|
|
971
971
|
targets: string[];
|
972
972
|
extraSource?: string | undefined;
|
973
973
|
};
|
974
|
-
buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "markdown" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
|
974
|
+
buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "json5" | "jsonc" | "markdown" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
|
975
975
|
include: (string | {
|
976
976
|
path: string;
|
977
977
|
delimiter?: "-" | "_" | null | undefined;
|
@@ -1000,7 +1000,7 @@ declare const defaultConfig: {
|
|
1000
1000
|
targets: string[];
|
1001
1001
|
extraSource?: string | undefined;
|
1002
1002
|
};
|
1003
|
-
buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "markdown" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
|
1003
|
+
buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "json5" | "jsonc" | "markdown" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
|
1004
1004
|
include: (string | {
|
1005
1005
|
path: string;
|
1006
1006
|
delimiter?: "-" | "_" | null | undefined;
|
package/build/index.d.ts
CHANGED
@@ -116,8 +116,8 @@ declare const resolveOverriddenLocale: (locale: string, delimiter?: LocaleDelimi
|
|
116
116
|
*/
|
117
117
|
declare function normalizeLocale(locale: string): string;
|
118
118
|
|
119
|
-
declare const bucketTypes: readonly ["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"];
|
120
|
-
declare const bucketTypeSchema: Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>;
|
119
|
+
declare const bucketTypes: readonly ["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"];
|
120
|
+
declare const bucketTypeSchema: Z.ZodEnum<["android", "csv", "ejs", "flutter", "html", "json", "json5", "jsonc", "markdown", "mdx", "xcode-strings", "xcode-stringsdict", "xcode-xcstrings", "yaml", "yaml-root-key", "properties", "po", "xliff", "xml", "srt", "dato", "compiler", "vtt", "php", "po", "vue-json", "typescript", "txt", "json-dictionary"]>;
|
121
121
|
|
122
122
|
declare const localeSchema: Z.ZodObject<{
|
123
123
|
source: Z.ZodEffects<Z.ZodString, string, string>;
|
@@ -150,7 +150,7 @@ declare const configV1Definition: ConfigDefinition<{
|
|
150
150
|
source: string;
|
151
151
|
targets: string[];
|
152
152
|
}>;
|
153
|
-
buckets: Z.ZodOptional<Z.ZodDefault<Z.ZodRecord<Z.ZodString, Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>>>>;
|
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
154
|
}, Z.ZodRawShape>;
|
155
155
|
declare const configV1_1Definition: ConfigDefinition<{
|
156
156
|
version: Z.ZodDefault<Z.ZodNumber>;
|
@@ -165,7 +165,7 @@ declare const configV1_1Definition: ConfigDefinition<{
|
|
165
165
|
targets: string[];
|
166
166
|
}>;
|
167
167
|
} & {
|
168
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
168
|
+
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<{
|
169
169
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>;
|
170
170
|
exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
|
171
171
|
}, "strip", Z.ZodTypeAny, {
|
@@ -178,7 +178,7 @@ declare const configV1_1Definition: ConfigDefinition<{
|
|
178
178
|
}, Z.ZodRawShape>;
|
179
179
|
declare const configV1_2Definition: ConfigDefinition<{
|
180
180
|
version: Z.ZodDefault<Z.ZodNumber>;
|
181
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
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<{
|
182
182
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>;
|
183
183
|
exclude: Z.ZodOptional<Z.ZodDefault<Z.ZodArray<Z.ZodString, "many">>>;
|
184
184
|
}, "strip", Z.ZodTypeAny, {
|
@@ -275,7 +275,7 @@ declare const configV1_3Definition: ConfigDefinition<{
|
|
275
275
|
extraSource?: string | undefined;
|
276
276
|
}>;
|
277
277
|
} & {
|
278
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
278
|
+
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<{
|
279
279
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
|
280
280
|
path: Z.ZodString;
|
281
281
|
delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
@@ -336,7 +336,7 @@ declare const configV1_4Definition: ConfigDefinition<{
|
|
336
336
|
extraSource?: string | undefined;
|
337
337
|
}>;
|
338
338
|
} & {
|
339
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
339
|
+
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<{
|
340
340
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
|
341
341
|
path: Z.ZodString;
|
342
342
|
delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
@@ -399,7 +399,7 @@ declare const configV1_5Definition: ConfigDefinition<{
|
|
399
399
|
extraSource?: string | undefined;
|
400
400
|
}>;
|
401
401
|
} & {
|
402
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
402
|
+
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<{
|
403
403
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
|
404
404
|
path: Z.ZodString;
|
405
405
|
delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
@@ -543,7 +543,7 @@ declare const configV1_6Definition: ConfigDefinition<{
|
|
543
543
|
baseUrl?: string | undefined;
|
544
544
|
}>>;
|
545
545
|
} & {
|
546
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
546
|
+
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<{
|
547
547
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
|
548
548
|
path: Z.ZodString;
|
549
549
|
delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
@@ -676,7 +676,7 @@ declare const configV1_7Definition: ConfigDefinition<{
|
|
676
676
|
baseUrl?: string | undefined;
|
677
677
|
}>>;
|
678
678
|
} & {
|
679
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
679
|
+
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<{
|
680
680
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
|
681
681
|
path: Z.ZodString;
|
682
682
|
delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
@@ -817,7 +817,7 @@ declare const configV1_8Definition: ConfigDefinition<{
|
|
817
817
|
baseUrl?: string | undefined;
|
818
818
|
}>>;
|
819
819
|
} & {
|
820
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
820
|
+
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<{
|
821
821
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
|
822
822
|
path: Z.ZodString;
|
823
823
|
delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
@@ -907,7 +907,7 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
|
|
907
907
|
baseUrl?: string | undefined;
|
908
908
|
}>>;
|
909
909
|
} & {
|
910
|
-
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<["android", "csv", "ejs", "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", "typescript", "txt", "json-dictionary"]>, Z.ZodObject<{
|
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
911
|
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<[Z.ZodString, Z.ZodObject<{
|
912
912
|
path: Z.ZodString;
|
913
913
|
delimiter: Z.ZodOptional<Z.ZodUnion<[Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
@@ -971,7 +971,7 @@ declare function parseI18nConfig(rawConfig: unknown): {
|
|
971
971
|
targets: string[];
|
972
972
|
extraSource?: string | undefined;
|
973
973
|
};
|
974
|
-
buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "markdown" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
|
974
|
+
buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "json5" | "jsonc" | "markdown" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
|
975
975
|
include: (string | {
|
976
976
|
path: string;
|
977
977
|
delimiter?: "-" | "_" | null | undefined;
|
@@ -1000,7 +1000,7 @@ declare const defaultConfig: {
|
|
1000
1000
|
targets: string[];
|
1001
1001
|
extraSource?: string | undefined;
|
1002
1002
|
};
|
1003
|
-
buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "markdown" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
|
1003
|
+
buckets: Partial<Record<"android" | "csv" | "ejs" | "flutter" | "html" | "json" | "json5" | "jsonc" | "markdown" | "mdx" | "xcode-strings" | "xcode-stringsdict" | "xcode-xcstrings" | "yaml" | "yaml-root-key" | "properties" | "po" | "xliff" | "xml" | "srt" | "dato" | "compiler" | "vtt" | "php" | "vue-json" | "typescript" | "txt" | "json-dictionary", {
|
1004
1004
|
include: (string | {
|
1005
1005
|
path: string;
|
1006
1006
|
delimiter?: "-" | "_" | null | undefined;
|
package/build/index.mjs
CHANGED
@@ -334,6 +334,8 @@ var bucketTypes = [
|
|
334
334
|
"flutter",
|
335
335
|
"html",
|
336
336
|
"json",
|
337
|
+
"json5",
|
338
|
+
"jsonc",
|
337
339
|
"markdown",
|
338
340
|
"mdx",
|
339
341
|
"xcode-strings",
|
@@ -361,9 +363,13 @@ var bucketTypeSchema = Z2.enum(bucketTypes);
|
|
361
363
|
// src/config.ts
|
362
364
|
import Z3 from "zod";
|
363
365
|
var localeSchema = Z3.object({
|
364
|
-
source: localeCodeSchema
|
365
|
-
|
366
|
-
|
366
|
+
source: localeCodeSchema.describe(
|
367
|
+
"Primary source locale code of your content (e.g. 'en', 'en-US', 'pt_BR', or 'pt-rBR'). Must be one of the supported locale codes \u2013 either a short ISO-639 language code or a full locale identifier using '-', '_' or Android '-r' notation."
|
368
|
+
),
|
369
|
+
targets: Z3.array(localeCodeSchema).describe(
|
370
|
+
"List of target locale codes to translate to."
|
371
|
+
)
|
372
|
+
}).describe("Locale configuration block.");
|
367
373
|
var createConfigDefinition = (definition) => definition;
|
368
374
|
var extendConfigDefinition = (definition, params) => {
|
369
375
|
const schema = params.createSchema(definition.schema);
|
@@ -402,7 +408,7 @@ ${localeErrors.join("\n")}`);
|
|
402
408
|
});
|
403
409
|
};
|
404
410
|
var configV0Schema = Z3.object({
|
405
|
-
version: Z3.number().default(0)
|
411
|
+
version: Z3.number().default(0).describe("The version number of the schema.")
|
406
412
|
});
|
407
413
|
var configV0Definition = createConfigDefinition({
|
408
414
|
schema: configV0Schema,
|
@@ -414,7 +420,9 @@ var configV0Definition = createConfigDefinition({
|
|
414
420
|
var configV1Definition = extendConfigDefinition(configV0Definition, {
|
415
421
|
createSchema: (baseSchema) => baseSchema.extend({
|
416
422
|
locale: localeSchema,
|
417
|
-
buckets: Z3.record(Z3.string(), bucketTypeSchema).default({}).
|
423
|
+
buckets: Z3.record(Z3.string(), bucketTypeSchema).default({}).describe(
|
424
|
+
"Mapping of source file paths (glob patterns) to bucket types."
|
425
|
+
).optional()
|
418
426
|
}),
|
419
427
|
createDefaultValue: () => ({
|
420
428
|
version: 1,
|
@@ -438,8 +446,12 @@ var configV1_1Definition = extendConfigDefinition(configV1Definition, {
|
|
438
446
|
buckets: Z3.record(
|
439
447
|
bucketTypeSchema,
|
440
448
|
Z3.object({
|
441
|
-
include: Z3.array(Z3.string()).default([])
|
442
|
-
|
449
|
+
include: Z3.array(Z3.string()).default([]).describe(
|
450
|
+
"File paths or glob patterns to include for this bucket."
|
451
|
+
),
|
452
|
+
exclude: Z3.array(Z3.string()).default([]).optional().describe(
|
453
|
+
"File paths or glob patterns to exclude from this bucket."
|
454
|
+
)
|
443
455
|
})
|
444
456
|
).default({})
|
445
457
|
}),
|
@@ -474,7 +486,9 @@ var configV1_2Definition = extendConfigDefinition(
|
|
474
486
|
{
|
475
487
|
createSchema: (baseSchema) => baseSchema.extend({
|
476
488
|
locale: localeSchema.extend({
|
477
|
-
extraSource: localeCodeSchema.optional()
|
489
|
+
extraSource: localeCodeSchema.optional().describe(
|
490
|
+
"Optional extra source locale code used as fallback during translation."
|
491
|
+
)
|
478
492
|
})
|
479
493
|
}),
|
480
494
|
createDefaultValue: (baseDefaultValue) => ({
|
@@ -488,18 +502,20 @@ var configV1_2Definition = extendConfigDefinition(
|
|
488
502
|
}
|
489
503
|
);
|
490
504
|
var bucketItemSchema = Z3.object({
|
491
|
-
path: Z3.string(),
|
492
|
-
delimiter: Z3.union([
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
505
|
+
path: Z3.string().describe("Path pattern containing a [locale] placeholder."),
|
506
|
+
delimiter: Z3.union([Z3.literal("-"), Z3.literal("_"), Z3.literal(null)]).optional().describe(
|
507
|
+
"Delimiter that replaces the [locale] placeholder in the path (default: no delimiter)."
|
508
|
+
)
|
509
|
+
}).describe(
|
510
|
+
"Bucket path item. Either a string path or an object specifying path and delimiter."
|
511
|
+
);
|
498
512
|
var bucketValueSchemaV1_3 = Z3.object({
|
499
|
-
include: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).default([]),
|
500
|
-
exclude: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).default([]).optional(),
|
501
|
-
injectLocale: Z3.array(Z3.string()).optional()
|
502
|
-
|
513
|
+
include: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).default([]).describe("Glob patterns or bucket items to include for this bucket."),
|
514
|
+
exclude: Z3.array(Z3.union([Z3.string(), bucketItemSchema])).default([]).optional().describe("Glob patterns or bucket items to exclude from this bucket."),
|
515
|
+
injectLocale: Z3.array(Z3.string()).optional().describe(
|
516
|
+
"Keys within files where the current locale should be injected or removed."
|
517
|
+
)
|
518
|
+
}).describe("Configuration options for a translation bucket.");
|
503
519
|
var configV1_3Definition = extendConfigDefinition(
|
504
520
|
configV1_2Definition,
|
505
521
|
{
|
@@ -543,11 +559,13 @@ var providerSchema = Z3.object({
|
|
543
559
|
"ollama",
|
544
560
|
"openrouter",
|
545
561
|
"mistral"
|
546
|
-
]),
|
547
|
-
model: Z3.string(),
|
548
|
-
prompt: Z3.string()
|
549
|
-
|
550
|
-
|
562
|
+
]).describe("Identifier of the translation provider service."),
|
563
|
+
model: Z3.string().describe("Model name to use for translations."),
|
564
|
+
prompt: Z3.string().describe(
|
565
|
+
"Prompt template used when requesting translations."
|
566
|
+
),
|
567
|
+
baseUrl: Z3.string().optional().describe("Custom base URL for the provider API (optional).")
|
568
|
+
}).describe("Configuration for the machine-translation provider.");
|
551
569
|
var configV1_5Definition = extendConfigDefinition(
|
552
570
|
configV1_4Definition,
|
553
571
|
{
|
@@ -565,7 +583,9 @@ var configV1_5Definition = extendConfigDefinition(
|
|
565
583
|
}
|
566
584
|
);
|
567
585
|
var bucketValueSchemaV1_6 = bucketValueSchemaV1_3.extend({
|
568
|
-
lockedKeys: Z3.array(Z3.string()).default([]).optional()
|
586
|
+
lockedKeys: Z3.array(Z3.string()).default([]).optional().describe(
|
587
|
+
"Keys that must remain unchanged and should never be overwritten by translations."
|
588
|
+
)
|
569
589
|
});
|
570
590
|
var configV1_6Definition = extendConfigDefinition(
|
571
591
|
configV1_5Definition,
|
@@ -584,7 +604,9 @@ var configV1_6Definition = extendConfigDefinition(
|
|
584
604
|
}
|
585
605
|
);
|
586
606
|
var bucketValueSchemaV1_7 = bucketValueSchemaV1_6.extend({
|
587
|
-
lockedPatterns: Z3.array(Z3.string()).default([]).optional()
|
607
|
+
lockedPatterns: Z3.array(Z3.string()).default([]).optional().describe(
|
608
|
+
"Regular expression patterns whose matched content should remain locked during translation."
|
609
|
+
)
|
588
610
|
});
|
589
611
|
var configV1_7Definition = extendConfigDefinition(
|
590
612
|
configV1_6Definition,
|
@@ -603,7 +625,9 @@ var configV1_7Definition = extendConfigDefinition(
|
|
603
625
|
}
|
604
626
|
);
|
605
627
|
var bucketValueSchemaV1_8 = bucketValueSchemaV1_7.extend({
|
606
|
-
ignoredKeys: Z3.array(Z3.string()).default([]).optional()
|
628
|
+
ignoredKeys: Z3.array(Z3.string()).default([]).optional().describe(
|
629
|
+
"Keys that should be completely ignored by translation processes."
|
630
|
+
)
|
607
631
|
});
|
608
632
|
var configV1_8Definition = extendConfigDefinition(
|
609
633
|
configV1_7Definition,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lingo.dev/_spec",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.40.1",
|
4
4
|
"description": "Lingo.dev open specification",
|
5
5
|
"private": false,
|
6
6
|
"publishConfig": {
|
@@ -29,7 +29,8 @@
|
|
29
29
|
},
|
30
30
|
"scripts": {
|
31
31
|
"dev": "tsup --watch",
|
32
|
-
"build": "
|
32
|
+
"build": "pnpm typecheck && tsup",
|
33
|
+
"typecheck": "tsc --noEmit",
|
33
34
|
"test": "vitest run",
|
34
35
|
"test:watch": "vitest"
|
35
36
|
}
|