@lingo.dev/_spec 0.48.0 → 0.49.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.
- package/build/i18n.schema.json +14 -0
- package/build/index.cjs +45 -2
- package/build/index.d.cts +182 -1
- package/build/index.d.ts +182 -1
- package/build/index.mjs +44 -1
- package/package.json +1 -1
package/build/i18n.schema.json
CHANGED
|
@@ -281,6 +281,20 @@
|
|
|
281
281
|
},
|
|
282
282
|
"vNext": {
|
|
283
283
|
"type": "string"
|
|
284
|
+
},
|
|
285
|
+
"dev": {
|
|
286
|
+
"description": "Development-specific settings.",
|
|
287
|
+
"type": "object",
|
|
288
|
+
"properties": {
|
|
289
|
+
"usePseudotranslator": {
|
|
290
|
+
"description": "Use pseudotranslator instead of real translation provider. Useful for testing i18n without API calls.",
|
|
291
|
+
"type": "boolean"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
"additionalProperties": false
|
|
295
|
+
},
|
|
296
|
+
"engineId": {
|
|
297
|
+
"type": "string"
|
|
284
298
|
}
|
|
285
299
|
},
|
|
286
300
|
"required": [
|
package/build/index.cjs
CHANGED
|
@@ -801,7 +801,48 @@ var configV1_13Definition = extendConfigDefinition(
|
|
|
801
801
|
})
|
|
802
802
|
}
|
|
803
803
|
);
|
|
804
|
-
var
|
|
804
|
+
var devSettingsSchema = _zod2.default.object({
|
|
805
|
+
usePseudotranslator: _zod2.default.boolean().optional().describe(
|
|
806
|
+
"Use pseudotranslator instead of real translation provider. Useful for testing i18n without API calls."
|
|
807
|
+
)
|
|
808
|
+
}).describe("Development-specific settings.");
|
|
809
|
+
var configV1_14Definition = extendConfigDefinition(
|
|
810
|
+
configV1_13Definition,
|
|
811
|
+
{
|
|
812
|
+
createSchema: (baseSchema) => baseSchema.extend({
|
|
813
|
+
dev: devSettingsSchema.optional()
|
|
814
|
+
}),
|
|
815
|
+
createDefaultValue: (baseDefaultValue) => ({
|
|
816
|
+
...baseDefaultValue,
|
|
817
|
+
version: "1.14"
|
|
818
|
+
}),
|
|
819
|
+
createUpgrader: (oldConfig) => ({
|
|
820
|
+
...oldConfig,
|
|
821
|
+
version: "1.14"
|
|
822
|
+
})
|
|
823
|
+
}
|
|
824
|
+
);
|
|
825
|
+
var configV1_15Definition = extendConfigDefinition(
|
|
826
|
+
configV1_14Definition,
|
|
827
|
+
{
|
|
828
|
+
createSchema: (baseSchema) => baseSchema.extend({
|
|
829
|
+
engineId: _zod2.default.string().optional()
|
|
830
|
+
}),
|
|
831
|
+
createDefaultValue: (baseDefaultValue) => ({
|
|
832
|
+
...baseDefaultValue,
|
|
833
|
+
version: "1.15"
|
|
834
|
+
}),
|
|
835
|
+
createUpgrader: (oldConfig) => {
|
|
836
|
+
const { vNext, ...rest } = oldConfig;
|
|
837
|
+
return {
|
|
838
|
+
...rest,
|
|
839
|
+
version: "1.15",
|
|
840
|
+
...vNext && !rest.engineId ? { engineId: vNext } : {}
|
|
841
|
+
};
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
);
|
|
845
|
+
var LATEST_CONFIG_DEFINITION = configV1_15Definition;
|
|
805
846
|
function parseI18nConfig(rawConfig) {
|
|
806
847
|
try {
|
|
807
848
|
const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
|
|
@@ -850,4 +891,6 @@ var defaultConfig = LATEST_CONFIG_DEFINITION.defaultValue;
|
|
|
850
891
|
|
|
851
892
|
|
|
852
893
|
|
|
853
|
-
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
exports.LATEST_CONFIG_DEFINITION = LATEST_CONFIG_DEFINITION; exports.bucketItemSchema = bucketItemSchema; exports.bucketTypeSchema = bucketTypeSchema; exports.bucketTypes = bucketTypes; exports.bucketValueSchemaV1_12 = bucketValueSchemaV1_12; exports.bucketValueSchemaV1_13 = bucketValueSchemaV1_13; exports.bucketValueSchemaV1_3 = bucketValueSchemaV1_3; exports.bucketValueSchemaV1_6 = bucketValueSchemaV1_6; exports.bucketValueSchemaV1_7 = bucketValueSchemaV1_7; exports.bucketValueSchemaV1_8 = bucketValueSchemaV1_8; exports.configV0Definition = configV0Definition; exports.configV1Definition = configV1Definition; exports.configV1_10Definition = configV1_10Definition; exports.configV1_11Definition = configV1_11Definition; exports.configV1_12Definition = configV1_12Definition; exports.configV1_13Definition = configV1_13Definition; exports.configV1_14Definition = configV1_14Definition; exports.configV1_15Definition = configV1_15Definition; exports.configV1_1Definition = configV1_1Definition; exports.configV1_2Definition = configV1_2Definition; exports.configV1_3Definition = configV1_3Definition; exports.configV1_4Definition = configV1_4Definition; exports.configV1_5Definition = configV1_5Definition; exports.configV1_6Definition = configV1_6Definition; exports.configV1_7Definition = configV1_7Definition; exports.configV1_8Definition = configV1_8Definition; exports.configV1_9Definition = configV1_9Definition; exports.defaultConfig = defaultConfig; exports.getLocaleCodeDelimiter = getLocaleCodeDelimiter; exports.localeCodeSchema = localeCodeSchema; exports.localeCodes = localeCodes; exports.localeCodesFull = localeCodesFull; exports.localeCodesFullExplicitRegion = localeCodesFullExplicitRegion; exports.localeCodesFullUnderscore = localeCodesFullUnderscore; exports.localeCodesShort = localeCodesShort; exports.localeSchema = localeSchema; exports.normalizeLocale = normalizeLocale; exports.parseI18nConfig = parseI18nConfig; exports.resolveLocaleCode = resolveLocaleCode; exports.resolveOverriddenLocale = resolveOverriddenLocale;
|
package/build/index.d.cts
CHANGED
|
@@ -1171,6 +1171,175 @@ declare const configV1_13Definition: ConfigDefinition<{
|
|
|
1171
1171
|
localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1172
1172
|
}, Z.core.$strip>>>;
|
|
1173
1173
|
}, any>;
|
|
1174
|
+
declare const configV1_14Definition: ConfigDefinition<{
|
|
1175
|
+
version: Z.ZodDefault<Z.ZodUnion<readonly [Z.ZodNumber, Z.ZodString]>>;
|
|
1176
|
+
locale: Z.ZodObject<{
|
|
1177
|
+
source: Z.ZodString;
|
|
1178
|
+
targets: Z.ZodArray<Z.ZodString>;
|
|
1179
|
+
extraSource: Z.ZodOptional<Z.ZodString>;
|
|
1180
|
+
}, Z.core.$strip>;
|
|
1181
|
+
$schema: Z.ZodDefault<Z.ZodString>;
|
|
1182
|
+
formatter: Z.ZodOptional<Z.ZodEnum<{
|
|
1183
|
+
prettier: "prettier";
|
|
1184
|
+
biome: "biome";
|
|
1185
|
+
}>>;
|
|
1186
|
+
provider: Z.ZodOptional<Z.ZodObject<{
|
|
1187
|
+
id: Z.ZodEnum<{
|
|
1188
|
+
openai: "openai";
|
|
1189
|
+
anthropic: "anthropic";
|
|
1190
|
+
google: "google";
|
|
1191
|
+
ollama: "ollama";
|
|
1192
|
+
openrouter: "openrouter";
|
|
1193
|
+
mistral: "mistral";
|
|
1194
|
+
}>;
|
|
1195
|
+
model: Z.ZodString;
|
|
1196
|
+
prompt: Z.ZodString;
|
|
1197
|
+
baseUrl: Z.ZodOptional<Z.ZodString>;
|
|
1198
|
+
settings: Z.ZodOptional<Z.ZodObject<{
|
|
1199
|
+
temperature: Z.ZodOptional<Z.ZodNumber>;
|
|
1200
|
+
}, Z.core.$strip>>;
|
|
1201
|
+
}, Z.core.$strip>>;
|
|
1202
|
+
vNext: Z.ZodOptional<Z.ZodString>;
|
|
1203
|
+
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<{
|
|
1204
|
+
ail: "ail";
|
|
1205
|
+
android: "android";
|
|
1206
|
+
csv: "csv";
|
|
1207
|
+
ejs: "ejs";
|
|
1208
|
+
flutter: "flutter";
|
|
1209
|
+
html: "html";
|
|
1210
|
+
json: "json";
|
|
1211
|
+
json5: "json5";
|
|
1212
|
+
jsonc: "jsonc";
|
|
1213
|
+
markdown: "markdown";
|
|
1214
|
+
markdoc: "markdoc";
|
|
1215
|
+
mdx: "mdx";
|
|
1216
|
+
mjml: "mjml";
|
|
1217
|
+
twig: "twig";
|
|
1218
|
+
"xcode-strings": "xcode-strings";
|
|
1219
|
+
"xcode-stringsdict": "xcode-stringsdict";
|
|
1220
|
+
"xcode-xcstrings": "xcode-xcstrings";
|
|
1221
|
+
"xcode-xcstrings-v2": "xcode-xcstrings-v2";
|
|
1222
|
+
yaml: "yaml";
|
|
1223
|
+
"yaml-root-key": "yaml-root-key";
|
|
1224
|
+
properties: "properties";
|
|
1225
|
+
po: "po";
|
|
1226
|
+
xliff: "xliff";
|
|
1227
|
+
xml: "xml";
|
|
1228
|
+
srt: "srt";
|
|
1229
|
+
dato: "dato";
|
|
1230
|
+
compiler: "compiler";
|
|
1231
|
+
vtt: "vtt";
|
|
1232
|
+
php: "php";
|
|
1233
|
+
"vue-json": "vue-json";
|
|
1234
|
+
typescript: "typescript";
|
|
1235
|
+
txt: "txt";
|
|
1236
|
+
"json-dictionary": "json-dictionary";
|
|
1237
|
+
"csv-per-locale": "csv-per-locale";
|
|
1238
|
+
}> & Z.core.$partial, Z.ZodObject<{
|
|
1239
|
+
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1240
|
+
path: Z.ZodString;
|
|
1241
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1242
|
+
}, Z.core.$strip>]>>>;
|
|
1243
|
+
exclude: Z.ZodOptional<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1244
|
+
path: Z.ZodString;
|
|
1245
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1246
|
+
}, Z.core.$strip>]>>>;
|
|
1247
|
+
injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1248
|
+
lockedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1249
|
+
lockedPatterns: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1250
|
+
ignoredKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1251
|
+
preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1252
|
+
localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1253
|
+
}, Z.core.$strip>>>;
|
|
1254
|
+
dev: Z.ZodOptional<Z.ZodObject<{
|
|
1255
|
+
usePseudotranslator: Z.ZodOptional<Z.ZodBoolean>;
|
|
1256
|
+
}, Z.core.$strip>>;
|
|
1257
|
+
}, any>;
|
|
1258
|
+
declare const configV1_15Definition: ConfigDefinition<{
|
|
1259
|
+
version: Z.ZodDefault<Z.ZodUnion<readonly [Z.ZodNumber, Z.ZodString]>>;
|
|
1260
|
+
locale: Z.ZodObject<{
|
|
1261
|
+
source: Z.ZodString;
|
|
1262
|
+
targets: Z.ZodArray<Z.ZodString>;
|
|
1263
|
+
extraSource: Z.ZodOptional<Z.ZodString>;
|
|
1264
|
+
}, Z.core.$strip>;
|
|
1265
|
+
$schema: Z.ZodDefault<Z.ZodString>;
|
|
1266
|
+
formatter: Z.ZodOptional<Z.ZodEnum<{
|
|
1267
|
+
prettier: "prettier";
|
|
1268
|
+
biome: "biome";
|
|
1269
|
+
}>>;
|
|
1270
|
+
provider: Z.ZodOptional<Z.ZodObject<{
|
|
1271
|
+
id: Z.ZodEnum<{
|
|
1272
|
+
openai: "openai";
|
|
1273
|
+
anthropic: "anthropic";
|
|
1274
|
+
google: "google";
|
|
1275
|
+
ollama: "ollama";
|
|
1276
|
+
openrouter: "openrouter";
|
|
1277
|
+
mistral: "mistral";
|
|
1278
|
+
}>;
|
|
1279
|
+
model: Z.ZodString;
|
|
1280
|
+
prompt: Z.ZodString;
|
|
1281
|
+
baseUrl: Z.ZodOptional<Z.ZodString>;
|
|
1282
|
+
settings: Z.ZodOptional<Z.ZodObject<{
|
|
1283
|
+
temperature: Z.ZodOptional<Z.ZodNumber>;
|
|
1284
|
+
}, Z.core.$strip>>;
|
|
1285
|
+
}, Z.core.$strip>>;
|
|
1286
|
+
vNext: Z.ZodOptional<Z.ZodString>;
|
|
1287
|
+
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<{
|
|
1288
|
+
ail: "ail";
|
|
1289
|
+
android: "android";
|
|
1290
|
+
csv: "csv";
|
|
1291
|
+
ejs: "ejs";
|
|
1292
|
+
flutter: "flutter";
|
|
1293
|
+
html: "html";
|
|
1294
|
+
json: "json";
|
|
1295
|
+
json5: "json5";
|
|
1296
|
+
jsonc: "jsonc";
|
|
1297
|
+
markdown: "markdown";
|
|
1298
|
+
markdoc: "markdoc";
|
|
1299
|
+
mdx: "mdx";
|
|
1300
|
+
mjml: "mjml";
|
|
1301
|
+
twig: "twig";
|
|
1302
|
+
"xcode-strings": "xcode-strings";
|
|
1303
|
+
"xcode-stringsdict": "xcode-stringsdict";
|
|
1304
|
+
"xcode-xcstrings": "xcode-xcstrings";
|
|
1305
|
+
"xcode-xcstrings-v2": "xcode-xcstrings-v2";
|
|
1306
|
+
yaml: "yaml";
|
|
1307
|
+
"yaml-root-key": "yaml-root-key";
|
|
1308
|
+
properties: "properties";
|
|
1309
|
+
po: "po";
|
|
1310
|
+
xliff: "xliff";
|
|
1311
|
+
xml: "xml";
|
|
1312
|
+
srt: "srt";
|
|
1313
|
+
dato: "dato";
|
|
1314
|
+
compiler: "compiler";
|
|
1315
|
+
vtt: "vtt";
|
|
1316
|
+
php: "php";
|
|
1317
|
+
"vue-json": "vue-json";
|
|
1318
|
+
typescript: "typescript";
|
|
1319
|
+
txt: "txt";
|
|
1320
|
+
"json-dictionary": "json-dictionary";
|
|
1321
|
+
"csv-per-locale": "csv-per-locale";
|
|
1322
|
+
}> & Z.core.$partial, Z.ZodObject<{
|
|
1323
|
+
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1324
|
+
path: Z.ZodString;
|
|
1325
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1326
|
+
}, Z.core.$strip>]>>>;
|
|
1327
|
+
exclude: Z.ZodOptional<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1328
|
+
path: Z.ZodString;
|
|
1329
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1330
|
+
}, Z.core.$strip>]>>>;
|
|
1331
|
+
injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1332
|
+
lockedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1333
|
+
lockedPatterns: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1334
|
+
ignoredKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1335
|
+
preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1336
|
+
localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1337
|
+
}, Z.core.$strip>>>;
|
|
1338
|
+
dev: Z.ZodOptional<Z.ZodObject<{
|
|
1339
|
+
usePseudotranslator: Z.ZodOptional<Z.ZodBoolean>;
|
|
1340
|
+
}, Z.core.$strip>>;
|
|
1341
|
+
engineId: Z.ZodOptional<Z.ZodString>;
|
|
1342
|
+
}, any>;
|
|
1174
1343
|
declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
|
|
1175
1344
|
version: Z.ZodDefault<Z.ZodUnion<readonly [Z.ZodNumber, Z.ZodString]>>;
|
|
1176
1345
|
locale: Z.ZodObject<{
|
|
@@ -1251,6 +1420,10 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
|
|
|
1251
1420
|
preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1252
1421
|
localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1253
1422
|
}, Z.core.$strip>>>;
|
|
1423
|
+
dev: Z.ZodOptional<Z.ZodObject<{
|
|
1424
|
+
usePseudotranslator: Z.ZodOptional<Z.ZodBoolean>;
|
|
1425
|
+
}, Z.core.$strip>>;
|
|
1426
|
+
engineId: Z.ZodOptional<Z.ZodString>;
|
|
1254
1427
|
}, any>;
|
|
1255
1428
|
type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
|
|
1256
1429
|
declare function parseI18nConfig(rawConfig: unknown): {
|
|
@@ -1288,6 +1461,10 @@ declare function parseI18nConfig(rawConfig: unknown): {
|
|
|
1288
1461
|
} | undefined;
|
|
1289
1462
|
} | undefined;
|
|
1290
1463
|
vNext?: string | undefined;
|
|
1464
|
+
dev?: {
|
|
1465
|
+
usePseudotranslator?: boolean | undefined;
|
|
1466
|
+
} | undefined;
|
|
1467
|
+
engineId?: string | undefined;
|
|
1291
1468
|
};
|
|
1292
1469
|
declare const defaultConfig: {
|
|
1293
1470
|
version: string | number;
|
|
@@ -1324,6 +1501,10 @@ declare const defaultConfig: {
|
|
|
1324
1501
|
} | undefined;
|
|
1325
1502
|
} | undefined;
|
|
1326
1503
|
vNext?: string | undefined;
|
|
1504
|
+
dev?: {
|
|
1505
|
+
usePseudotranslator?: boolean | undefined;
|
|
1506
|
+
} | undefined;
|
|
1507
|
+
engineId?: string | undefined;
|
|
1327
1508
|
};
|
|
1328
1509
|
|
|
1329
|
-
export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, bucketValueSchemaV1_12, bucketValueSchemaV1_13, bucketValueSchemaV1_3, bucketValueSchemaV1_6, bucketValueSchemaV1_7, bucketValueSchemaV1_8, configV0Definition, configV1Definition, configV1_10Definition, configV1_11Definition, configV1_12Definition, configV1_13Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, configV1_7Definition, configV1_8Definition, configV1_9Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
|
|
1510
|
+
export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, bucketValueSchemaV1_12, bucketValueSchemaV1_13, bucketValueSchemaV1_3, bucketValueSchemaV1_6, bucketValueSchemaV1_7, bucketValueSchemaV1_8, configV0Definition, configV1Definition, configV1_10Definition, configV1_11Definition, configV1_12Definition, configV1_13Definition, configV1_14Definition, configV1_15Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, configV1_7Definition, configV1_8Definition, configV1_9Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
|
package/build/index.d.ts
CHANGED
|
@@ -1171,6 +1171,175 @@ declare const configV1_13Definition: ConfigDefinition<{
|
|
|
1171
1171
|
localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1172
1172
|
}, Z.core.$strip>>>;
|
|
1173
1173
|
}, any>;
|
|
1174
|
+
declare const configV1_14Definition: ConfigDefinition<{
|
|
1175
|
+
version: Z.ZodDefault<Z.ZodUnion<readonly [Z.ZodNumber, Z.ZodString]>>;
|
|
1176
|
+
locale: Z.ZodObject<{
|
|
1177
|
+
source: Z.ZodString;
|
|
1178
|
+
targets: Z.ZodArray<Z.ZodString>;
|
|
1179
|
+
extraSource: Z.ZodOptional<Z.ZodString>;
|
|
1180
|
+
}, Z.core.$strip>;
|
|
1181
|
+
$schema: Z.ZodDefault<Z.ZodString>;
|
|
1182
|
+
formatter: Z.ZodOptional<Z.ZodEnum<{
|
|
1183
|
+
prettier: "prettier";
|
|
1184
|
+
biome: "biome";
|
|
1185
|
+
}>>;
|
|
1186
|
+
provider: Z.ZodOptional<Z.ZodObject<{
|
|
1187
|
+
id: Z.ZodEnum<{
|
|
1188
|
+
openai: "openai";
|
|
1189
|
+
anthropic: "anthropic";
|
|
1190
|
+
google: "google";
|
|
1191
|
+
ollama: "ollama";
|
|
1192
|
+
openrouter: "openrouter";
|
|
1193
|
+
mistral: "mistral";
|
|
1194
|
+
}>;
|
|
1195
|
+
model: Z.ZodString;
|
|
1196
|
+
prompt: Z.ZodString;
|
|
1197
|
+
baseUrl: Z.ZodOptional<Z.ZodString>;
|
|
1198
|
+
settings: Z.ZodOptional<Z.ZodObject<{
|
|
1199
|
+
temperature: Z.ZodOptional<Z.ZodNumber>;
|
|
1200
|
+
}, Z.core.$strip>>;
|
|
1201
|
+
}, Z.core.$strip>>;
|
|
1202
|
+
vNext: Z.ZodOptional<Z.ZodString>;
|
|
1203
|
+
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<{
|
|
1204
|
+
ail: "ail";
|
|
1205
|
+
android: "android";
|
|
1206
|
+
csv: "csv";
|
|
1207
|
+
ejs: "ejs";
|
|
1208
|
+
flutter: "flutter";
|
|
1209
|
+
html: "html";
|
|
1210
|
+
json: "json";
|
|
1211
|
+
json5: "json5";
|
|
1212
|
+
jsonc: "jsonc";
|
|
1213
|
+
markdown: "markdown";
|
|
1214
|
+
markdoc: "markdoc";
|
|
1215
|
+
mdx: "mdx";
|
|
1216
|
+
mjml: "mjml";
|
|
1217
|
+
twig: "twig";
|
|
1218
|
+
"xcode-strings": "xcode-strings";
|
|
1219
|
+
"xcode-stringsdict": "xcode-stringsdict";
|
|
1220
|
+
"xcode-xcstrings": "xcode-xcstrings";
|
|
1221
|
+
"xcode-xcstrings-v2": "xcode-xcstrings-v2";
|
|
1222
|
+
yaml: "yaml";
|
|
1223
|
+
"yaml-root-key": "yaml-root-key";
|
|
1224
|
+
properties: "properties";
|
|
1225
|
+
po: "po";
|
|
1226
|
+
xliff: "xliff";
|
|
1227
|
+
xml: "xml";
|
|
1228
|
+
srt: "srt";
|
|
1229
|
+
dato: "dato";
|
|
1230
|
+
compiler: "compiler";
|
|
1231
|
+
vtt: "vtt";
|
|
1232
|
+
php: "php";
|
|
1233
|
+
"vue-json": "vue-json";
|
|
1234
|
+
typescript: "typescript";
|
|
1235
|
+
txt: "txt";
|
|
1236
|
+
"json-dictionary": "json-dictionary";
|
|
1237
|
+
"csv-per-locale": "csv-per-locale";
|
|
1238
|
+
}> & Z.core.$partial, Z.ZodObject<{
|
|
1239
|
+
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1240
|
+
path: Z.ZodString;
|
|
1241
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1242
|
+
}, Z.core.$strip>]>>>;
|
|
1243
|
+
exclude: Z.ZodOptional<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1244
|
+
path: Z.ZodString;
|
|
1245
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1246
|
+
}, Z.core.$strip>]>>>;
|
|
1247
|
+
injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1248
|
+
lockedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1249
|
+
lockedPatterns: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1250
|
+
ignoredKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1251
|
+
preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1252
|
+
localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1253
|
+
}, Z.core.$strip>>>;
|
|
1254
|
+
dev: Z.ZodOptional<Z.ZodObject<{
|
|
1255
|
+
usePseudotranslator: Z.ZodOptional<Z.ZodBoolean>;
|
|
1256
|
+
}, Z.core.$strip>>;
|
|
1257
|
+
}, any>;
|
|
1258
|
+
declare const configV1_15Definition: ConfigDefinition<{
|
|
1259
|
+
version: Z.ZodDefault<Z.ZodUnion<readonly [Z.ZodNumber, Z.ZodString]>>;
|
|
1260
|
+
locale: Z.ZodObject<{
|
|
1261
|
+
source: Z.ZodString;
|
|
1262
|
+
targets: Z.ZodArray<Z.ZodString>;
|
|
1263
|
+
extraSource: Z.ZodOptional<Z.ZodString>;
|
|
1264
|
+
}, Z.core.$strip>;
|
|
1265
|
+
$schema: Z.ZodDefault<Z.ZodString>;
|
|
1266
|
+
formatter: Z.ZodOptional<Z.ZodEnum<{
|
|
1267
|
+
prettier: "prettier";
|
|
1268
|
+
biome: "biome";
|
|
1269
|
+
}>>;
|
|
1270
|
+
provider: Z.ZodOptional<Z.ZodObject<{
|
|
1271
|
+
id: Z.ZodEnum<{
|
|
1272
|
+
openai: "openai";
|
|
1273
|
+
anthropic: "anthropic";
|
|
1274
|
+
google: "google";
|
|
1275
|
+
ollama: "ollama";
|
|
1276
|
+
openrouter: "openrouter";
|
|
1277
|
+
mistral: "mistral";
|
|
1278
|
+
}>;
|
|
1279
|
+
model: Z.ZodString;
|
|
1280
|
+
prompt: Z.ZodString;
|
|
1281
|
+
baseUrl: Z.ZodOptional<Z.ZodString>;
|
|
1282
|
+
settings: Z.ZodOptional<Z.ZodObject<{
|
|
1283
|
+
temperature: Z.ZodOptional<Z.ZodNumber>;
|
|
1284
|
+
}, Z.core.$strip>>;
|
|
1285
|
+
}, Z.core.$strip>>;
|
|
1286
|
+
vNext: Z.ZodOptional<Z.ZodString>;
|
|
1287
|
+
buckets: Z.ZodDefault<Z.ZodRecord<Z.ZodEnum<{
|
|
1288
|
+
ail: "ail";
|
|
1289
|
+
android: "android";
|
|
1290
|
+
csv: "csv";
|
|
1291
|
+
ejs: "ejs";
|
|
1292
|
+
flutter: "flutter";
|
|
1293
|
+
html: "html";
|
|
1294
|
+
json: "json";
|
|
1295
|
+
json5: "json5";
|
|
1296
|
+
jsonc: "jsonc";
|
|
1297
|
+
markdown: "markdown";
|
|
1298
|
+
markdoc: "markdoc";
|
|
1299
|
+
mdx: "mdx";
|
|
1300
|
+
mjml: "mjml";
|
|
1301
|
+
twig: "twig";
|
|
1302
|
+
"xcode-strings": "xcode-strings";
|
|
1303
|
+
"xcode-stringsdict": "xcode-stringsdict";
|
|
1304
|
+
"xcode-xcstrings": "xcode-xcstrings";
|
|
1305
|
+
"xcode-xcstrings-v2": "xcode-xcstrings-v2";
|
|
1306
|
+
yaml: "yaml";
|
|
1307
|
+
"yaml-root-key": "yaml-root-key";
|
|
1308
|
+
properties: "properties";
|
|
1309
|
+
po: "po";
|
|
1310
|
+
xliff: "xliff";
|
|
1311
|
+
xml: "xml";
|
|
1312
|
+
srt: "srt";
|
|
1313
|
+
dato: "dato";
|
|
1314
|
+
compiler: "compiler";
|
|
1315
|
+
vtt: "vtt";
|
|
1316
|
+
php: "php";
|
|
1317
|
+
"vue-json": "vue-json";
|
|
1318
|
+
typescript: "typescript";
|
|
1319
|
+
txt: "txt";
|
|
1320
|
+
"json-dictionary": "json-dictionary";
|
|
1321
|
+
"csv-per-locale": "csv-per-locale";
|
|
1322
|
+
}> & Z.core.$partial, Z.ZodObject<{
|
|
1323
|
+
include: Z.ZodDefault<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1324
|
+
path: Z.ZodString;
|
|
1325
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1326
|
+
}, Z.core.$strip>]>>>;
|
|
1327
|
+
exclude: Z.ZodOptional<Z.ZodArray<Z.ZodUnion<readonly [Z.ZodString, Z.ZodObject<{
|
|
1328
|
+
path: Z.ZodString;
|
|
1329
|
+
delimiter: Z.ZodOptional<Z.ZodUnion<readonly [Z.ZodLiteral<"-">, Z.ZodLiteral<"_">, Z.ZodLiteral<null>]>>;
|
|
1330
|
+
}, Z.core.$strip>]>>>;
|
|
1331
|
+
injectLocale: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1332
|
+
lockedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1333
|
+
lockedPatterns: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1334
|
+
ignoredKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1335
|
+
preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1336
|
+
localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1337
|
+
}, Z.core.$strip>>>;
|
|
1338
|
+
dev: Z.ZodOptional<Z.ZodObject<{
|
|
1339
|
+
usePseudotranslator: Z.ZodOptional<Z.ZodBoolean>;
|
|
1340
|
+
}, Z.core.$strip>>;
|
|
1341
|
+
engineId: Z.ZodOptional<Z.ZodString>;
|
|
1342
|
+
}, any>;
|
|
1174
1343
|
declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
|
|
1175
1344
|
version: Z.ZodDefault<Z.ZodUnion<readonly [Z.ZodNumber, Z.ZodString]>>;
|
|
1176
1345
|
locale: Z.ZodObject<{
|
|
@@ -1251,6 +1420,10 @@ declare const LATEST_CONFIG_DEFINITION: ConfigDefinition<{
|
|
|
1251
1420
|
preservedKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1252
1421
|
localizableKeys: Z.ZodOptional<Z.ZodArray<Z.ZodString>>;
|
|
1253
1422
|
}, Z.core.$strip>>>;
|
|
1423
|
+
dev: Z.ZodOptional<Z.ZodObject<{
|
|
1424
|
+
usePseudotranslator: Z.ZodOptional<Z.ZodBoolean>;
|
|
1425
|
+
}, Z.core.$strip>>;
|
|
1426
|
+
engineId: Z.ZodOptional<Z.ZodString>;
|
|
1254
1427
|
}, any>;
|
|
1255
1428
|
type I18nConfig = Z.infer<(typeof LATEST_CONFIG_DEFINITION)["schema"]>;
|
|
1256
1429
|
declare function parseI18nConfig(rawConfig: unknown): {
|
|
@@ -1288,6 +1461,10 @@ declare function parseI18nConfig(rawConfig: unknown): {
|
|
|
1288
1461
|
} | undefined;
|
|
1289
1462
|
} | undefined;
|
|
1290
1463
|
vNext?: string | undefined;
|
|
1464
|
+
dev?: {
|
|
1465
|
+
usePseudotranslator?: boolean | undefined;
|
|
1466
|
+
} | undefined;
|
|
1467
|
+
engineId?: string | undefined;
|
|
1291
1468
|
};
|
|
1292
1469
|
declare const defaultConfig: {
|
|
1293
1470
|
version: string | number;
|
|
@@ -1324,6 +1501,10 @@ declare const defaultConfig: {
|
|
|
1324
1501
|
} | undefined;
|
|
1325
1502
|
} | undefined;
|
|
1326
1503
|
vNext?: string | undefined;
|
|
1504
|
+
dev?: {
|
|
1505
|
+
usePseudotranslator?: boolean | undefined;
|
|
1506
|
+
} | undefined;
|
|
1507
|
+
engineId?: string | undefined;
|
|
1327
1508
|
};
|
|
1328
1509
|
|
|
1329
|
-
export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, bucketValueSchemaV1_12, bucketValueSchemaV1_13, bucketValueSchemaV1_3, bucketValueSchemaV1_6, bucketValueSchemaV1_7, bucketValueSchemaV1_8, configV0Definition, configV1Definition, configV1_10Definition, configV1_11Definition, configV1_12Definition, configV1_13Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, configV1_7Definition, configV1_8Definition, configV1_9Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
|
|
1510
|
+
export { type BucketItem, type I18nConfig, LATEST_CONFIG_DEFINITION, type LocaleCode, type LocaleCodeFull, type LocaleCodeShort, type LocaleDelimiter, bucketItemSchema, bucketTypeSchema, bucketTypes, bucketValueSchemaV1_12, bucketValueSchemaV1_13, bucketValueSchemaV1_3, bucketValueSchemaV1_6, bucketValueSchemaV1_7, bucketValueSchemaV1_8, configV0Definition, configV1Definition, configV1_10Definition, configV1_11Definition, configV1_12Definition, configV1_13Definition, configV1_14Definition, configV1_15Definition, configV1_1Definition, configV1_2Definition, configV1_3Definition, configV1_4Definition, configV1_5Definition, configV1_6Definition, configV1_7Definition, configV1_8Definition, configV1_9Definition, defaultConfig, getLocaleCodeDelimiter, localeCodeSchema, localeCodes, localeCodesFull, localeCodesFullExplicitRegion, localeCodesFullUnderscore, localeCodesShort, localeSchema, normalizeLocale, parseI18nConfig, resolveLocaleCode, resolveOverriddenLocale };
|
package/build/index.mjs
CHANGED
|
@@ -801,7 +801,48 @@ var configV1_13Definition = extendConfigDefinition(
|
|
|
801
801
|
})
|
|
802
802
|
}
|
|
803
803
|
);
|
|
804
|
-
var
|
|
804
|
+
var devSettingsSchema = Z3.object({
|
|
805
|
+
usePseudotranslator: Z3.boolean().optional().describe(
|
|
806
|
+
"Use pseudotranslator instead of real translation provider. Useful for testing i18n without API calls."
|
|
807
|
+
)
|
|
808
|
+
}).describe("Development-specific settings.");
|
|
809
|
+
var configV1_14Definition = extendConfigDefinition(
|
|
810
|
+
configV1_13Definition,
|
|
811
|
+
{
|
|
812
|
+
createSchema: (baseSchema) => baseSchema.extend({
|
|
813
|
+
dev: devSettingsSchema.optional()
|
|
814
|
+
}),
|
|
815
|
+
createDefaultValue: (baseDefaultValue) => ({
|
|
816
|
+
...baseDefaultValue,
|
|
817
|
+
version: "1.14"
|
|
818
|
+
}),
|
|
819
|
+
createUpgrader: (oldConfig) => ({
|
|
820
|
+
...oldConfig,
|
|
821
|
+
version: "1.14"
|
|
822
|
+
})
|
|
823
|
+
}
|
|
824
|
+
);
|
|
825
|
+
var configV1_15Definition = extendConfigDefinition(
|
|
826
|
+
configV1_14Definition,
|
|
827
|
+
{
|
|
828
|
+
createSchema: (baseSchema) => baseSchema.extend({
|
|
829
|
+
engineId: Z3.string().optional()
|
|
830
|
+
}),
|
|
831
|
+
createDefaultValue: (baseDefaultValue) => ({
|
|
832
|
+
...baseDefaultValue,
|
|
833
|
+
version: "1.15"
|
|
834
|
+
}),
|
|
835
|
+
createUpgrader: (oldConfig) => {
|
|
836
|
+
const { vNext, ...rest } = oldConfig;
|
|
837
|
+
return {
|
|
838
|
+
...rest,
|
|
839
|
+
version: "1.15",
|
|
840
|
+
...vNext && !rest.engineId ? { engineId: vNext } : {}
|
|
841
|
+
};
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
);
|
|
845
|
+
var LATEST_CONFIG_DEFINITION = configV1_15Definition;
|
|
805
846
|
function parseI18nConfig(rawConfig) {
|
|
806
847
|
try {
|
|
807
848
|
const result = LATEST_CONFIG_DEFINITION.parse(rawConfig);
|
|
@@ -828,6 +869,8 @@ export {
|
|
|
828
869
|
configV1_11Definition,
|
|
829
870
|
configV1_12Definition,
|
|
830
871
|
configV1_13Definition,
|
|
872
|
+
configV1_14Definition,
|
|
873
|
+
configV1_15Definition,
|
|
831
874
|
configV1_1Definition,
|
|
832
875
|
configV1_2Definition,
|
|
833
876
|
configV1_3Definition,
|