@lokalise/polyglot-sdk 19.1.0 → 20.0.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/dist/index.d.ts +22 -22
- package/dist/index.js +20 -20
- package/dist/index.js.map +1 -1
- package/dist/sdk/PolyglotClient.d.ts +7 -7
- package/dist/sdk/PolyglotClient.js +6 -6
- package/dist/sdk/helpers/htmlEscaping.d.ts +1 -1
- package/dist/sdk/helpers/htmlEscaping.js +2 -2
- package/dist/sdk/helpers/nonTranslatableContentHelper.d.ts +1 -1
- package/dist/sdk/helpers/nonTranslatableContentHelper.js +1 -1
- package/dist/sdk/helpers/nonTranslatableContentWrappers.d.ts +1 -1
- package/dist/sdk/helpers/nonTranslatableContentWrappers.js +2 -2
- package/dist/sdk/schemas/common/asyncRequestSchemas.d.ts +1 -1
- package/dist/sdk/schemas/common/commonSchemas.d.ts +38 -21
- package/dist/sdk/schemas/common/commonSchemas.js +24 -5
- package/dist/sdk/schemas/common/commonSchemas.js.map +1 -1
- package/dist/sdk/schemas/common/errorSchemas.d.ts +16 -21
- package/dist/sdk/schemas/common/errorSchemas.js +1 -1
- package/dist/sdk/schemas/common/translationContextSchemas.d.ts +0 -11
- package/dist/sdk/schemas/common/translationContextSchemas.js +2 -6
- package/dist/sdk/schemas/common/translationContextSchemas.js.map +1 -1
- package/dist/sdk/schemas/lqa/commonSchemas.d.ts +1 -1
- package/dist/sdk/schemas/lqa/lqaAsyncSchemas.d.ts +21 -20
- package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js +8 -7
- package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js.map +1 -1
- package/dist/sdk/schemas/lqa/lqaSyncSchemas.d.ts +12 -11
- package/dist/sdk/schemas/lqa/lqaSyncSchemas.js +7 -6
- package/dist/sdk/schemas/lqa/lqaSyncSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/generateVariants.d.ts +15 -14
- package/dist/sdk/schemas/translation/generateVariants.js +3 -3
- package/dist/sdk/schemas/translation/rewriteTextSchemas.d.ts +37 -35
- package/dist/sdk/schemas/translation/rewriteTextSchemas.js +4 -4
- package/dist/sdk/schemas/translation/sharedSchemas.d.ts +117 -4
- package/dist/sdk/schemas/translation/sharedSchemas.js +21 -5
- package/dist/sdk/schemas/translation/sharedSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/translateAsyncSchemas.d.ts +306 -41
- package/dist/sdk/schemas/translation/translateAsyncSchemas.js +5 -5
- package/dist/sdk/schemas/translation/translateSyncSchemas.d.ts +254 -21
- package/dist/sdk/schemas/translation/translateSyncSchemas.js +4 -4
- package/dist/sdk/schemas/translation/translateTextSegmentSchemas.d.ts +21 -31
- package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js +4 -4
- package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js.map +1 -1
- package/dist/sdk/validation/isSegmentUnderLengthLimit.d.ts +1 -1
- package/dist/sdk/validation/isSegmentUnderLengthLimit.js +3 -3
- package/dist/sdk/validation/requestSizeLimit.d.ts +2 -2
- package/dist/sdk/validation/requestSizeLimit.js +2 -2
- package/package.json +8 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
-
import { OWNER_ID_SCHEMA, TENANT_ID_SCHEMA } from
|
|
3
|
-
import { COMMON_ERROR_RESPONSE_SCHEMA, COMMON_REQUEST_HEADERS_SCHEMA, FORCE_INTEGRATION_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, REAL_INTEGRATION_ENGINE_SCHEMA, refineIntegrationIsPresent, } from
|
|
4
|
-
import { TRANSLATION_CONTEXT_SCHEMA } from
|
|
5
|
-
import { CONTENT_ID_PROP_SCHEMA, SEGMENT_WARNINGS_SCHEMA, TRANSLATE_CONTENT_UNIT_SCHEMA, refineDifferentSourceAndTargetLang, refineRequestSizeLimit, refineUniqueIds, } from
|
|
2
|
+
import { OWNER_ID_SCHEMA, TENANT_ID_SCHEMA } from "../common/asyncRequestSchemas.js";
|
|
3
|
+
import { COMMON_ERROR_RESPONSE_SCHEMA, COMMON_REQUEST_HEADERS_SCHEMA, FORCE_INTEGRATION_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, REAL_INTEGRATION_ENGINE_SCHEMA, refineIntegrationIsPresent, } from "../common/commonSchemas.js";
|
|
4
|
+
import { TRANSLATION_CONTEXT_SCHEMA } from "../common/translationContextSchemas.js";
|
|
5
|
+
import { CONTENT_ID_PROP_SCHEMA, SEGMENT_WARNINGS_SCHEMA, TRANSLATE_CONTENT_UNIT_SCHEMA, refineDifferentSourceAndTargetLang, refineRequestSizeLimit, refineUniqueIds, } from "./sharedSchemas.js";
|
|
6
6
|
// See https://lokalise.slack.com/archives/C05FLMT3GQK/p1730293588636539 for context
|
|
7
7
|
const CONTENT_UNITS_MAX_LENGTH = 50;
|
|
8
8
|
export const TRANSLATE_SYNC_BODY_SCHEMA = z
|
|
@@ -3,18 +3,18 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
3
3
|
ownerId: z.ZodOptional<z.ZodString>;
|
|
4
4
|
sourceLocale: z.ZodEffects<z.ZodString, string, string>;
|
|
5
5
|
targetLocale: z.ZodEffects<z.ZodString, string, string>;
|
|
6
|
-
integration: z.ZodOptional<z.ZodNativeEnum<{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
integration: z.ZodOptional<z.ZodEffects<z.ZodNativeEnum<{
|
|
7
|
+
CHAT_GPT4: "ChatGPT-4";
|
|
8
|
+
FINETUNED_OPENAI: "FT-OpenAI";
|
|
9
|
+
CLAUDE: "Claude";
|
|
10
|
+
GPT: "GPT";
|
|
11
|
+
GEMINI: "Gemini";
|
|
12
|
+
DEEPL: "DeepL";
|
|
13
|
+
GOOGLE_TRANSLATE: "GoogleTranslate";
|
|
14
|
+
MICROSOFT_TRANSLATOR: "MicrosoftTranslator";
|
|
15
|
+
}>, "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator", "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "ChatGPT-4" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator">>;
|
|
15
16
|
forceIntegration: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
-
context: z.ZodOptional<z.ZodObject<
|
|
17
|
-
description: z.ZodOptional<z.ZodString>;
|
|
17
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
18
18
|
styleGuide: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
19
19
|
text: z.ZodString;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -112,17 +112,7 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
112
112
|
}[] | undefined;
|
|
113
113
|
}>, "many">>;
|
|
114
114
|
targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
|
|
115
|
-
|
|
116
|
-
sourceValue: z.ZodString;
|
|
117
|
-
translatedValue: z.ZodString;
|
|
118
|
-
}, "strip", z.ZodTypeAny, {
|
|
119
|
-
sourceValue: string;
|
|
120
|
-
translatedValue: string;
|
|
121
|
-
}, {
|
|
122
|
-
sourceValue: string;
|
|
123
|
-
translatedValue: string;
|
|
124
|
-
}>, "many">>;
|
|
125
|
-
}, {
|
|
115
|
+
} & {
|
|
126
116
|
description: z.ZodOptional<z.ZodString>;
|
|
127
117
|
translationExamples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
128
118
|
sourceValue: z.ZodString;
|
|
@@ -134,7 +124,7 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
134
124
|
sourceValue: string;
|
|
135
125
|
translatedValue: string;
|
|
136
126
|
}>, "many">>;
|
|
137
|
-
}
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
138
128
|
description?: string | undefined;
|
|
139
129
|
styleGuide?: {
|
|
140
130
|
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
@@ -312,7 +302,7 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
312
302
|
translatedValue: string;
|
|
313
303
|
}[] | undefined;
|
|
314
304
|
} | undefined;
|
|
315
|
-
integration?: "FT-OpenAI" | "Claude" | "
|
|
305
|
+
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
316
306
|
forceIntegration?: boolean | undefined;
|
|
317
307
|
history?: {
|
|
318
308
|
value: string;
|
|
@@ -382,7 +372,7 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
382
372
|
translatedValue: string;
|
|
383
373
|
}[] | undefined;
|
|
384
374
|
} | undefined;
|
|
385
|
-
integration?: "FT-OpenAI" | "Claude" | "
|
|
375
|
+
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "ChatGPT-4" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
386
376
|
forceIntegration?: boolean | undefined;
|
|
387
377
|
history?: {
|
|
388
378
|
value: string;
|
|
@@ -452,7 +442,7 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
452
442
|
translatedValue: string;
|
|
453
443
|
}[] | undefined;
|
|
454
444
|
} | undefined;
|
|
455
|
-
integration?: "FT-OpenAI" | "Claude" | "
|
|
445
|
+
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
456
446
|
forceIntegration?: boolean | undefined;
|
|
457
447
|
history?: {
|
|
458
448
|
value: string;
|
|
@@ -522,7 +512,7 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
522
512
|
translatedValue: string;
|
|
523
513
|
}[] | undefined;
|
|
524
514
|
} | undefined;
|
|
525
|
-
integration?: "FT-OpenAI" | "Claude" | "
|
|
515
|
+
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "ChatGPT-4" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
526
516
|
forceIntegration?: boolean | undefined;
|
|
527
517
|
history?: {
|
|
528
518
|
value: string;
|
|
@@ -592,7 +582,7 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
592
582
|
translatedValue: string;
|
|
593
583
|
}[] | undefined;
|
|
594
584
|
} | undefined;
|
|
595
|
-
integration?: "FT-OpenAI" | "Claude" | "
|
|
585
|
+
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
596
586
|
forceIntegration?: boolean | undefined;
|
|
597
587
|
history?: {
|
|
598
588
|
value: string;
|
|
@@ -662,7 +652,7 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
662
652
|
translatedValue: string;
|
|
663
653
|
}[] | undefined;
|
|
664
654
|
} | undefined;
|
|
665
|
-
integration?: "FT-OpenAI" | "Claude" | "
|
|
655
|
+
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "ChatGPT-4" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
666
656
|
forceIntegration?: boolean | undefined;
|
|
667
657
|
history?: {
|
|
668
658
|
value: string;
|
|
@@ -732,7 +722,7 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
732
722
|
translatedValue: string;
|
|
733
723
|
}[] | undefined;
|
|
734
724
|
} | undefined;
|
|
735
|
-
integration?: "FT-OpenAI" | "Claude" | "
|
|
725
|
+
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
736
726
|
forceIntegration?: boolean | undefined;
|
|
737
727
|
history?: {
|
|
738
728
|
value: string;
|
|
@@ -802,7 +792,7 @@ export declare const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffec
|
|
|
802
792
|
translatedValue: string;
|
|
803
793
|
}[] | undefined;
|
|
804
794
|
} | undefined;
|
|
805
|
-
integration?: "FT-OpenAI" | "Claude" | "
|
|
795
|
+
integration?: "FT-OpenAI" | "Claude" | "GPT" | "Gemini" | "ChatGPT-4" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
806
796
|
forceIntegration?: boolean | undefined;
|
|
807
797
|
history?: {
|
|
808
798
|
value: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
-
import { OWNER_ID_SCHEMA } from
|
|
3
|
-
import { COMMON_REQUEST_HEADERS_SCHEMA, FORCE_INTEGRATION_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, REAL_INTEGRATION_ENGINE_SCHEMA, refineIntegrationIsPresent, } from
|
|
4
|
-
import { TRANSLATION_CONTEXT_SCHEMA
|
|
5
|
-
import { CONTENT_ID_PROP_SCHEMA, CONTENT_UNIT_DESCRIPTION_MAX_LENGTH, HISTORY_ENTRY_SCHEMA, TranslateModeEnum, refineDifferentSourceAndTargetLang, refineHistoryIsPresent, } from
|
|
2
|
+
import { OWNER_ID_SCHEMA } from "../common/asyncRequestSchemas.js";
|
|
3
|
+
import { COMMON_REQUEST_HEADERS_SCHEMA, FORCE_INTEGRATION_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, REAL_INTEGRATION_ENGINE_SCHEMA, TRANSLATION_EXAMPLE_SCHEMA, refineIntegrationIsPresent, } from "../common/commonSchemas.js";
|
|
4
|
+
import { TRANSLATION_CONTEXT_SCHEMA } from "../common/translationContextSchemas.js";
|
|
5
|
+
import { CONTENT_ID_PROP_SCHEMA, CONTENT_UNIT_DESCRIPTION_MAX_LENGTH, HISTORY_ENTRY_SCHEMA, TranslateModeEnum, refineDifferentSourceAndTargetLang, refineHistoryIsPresent, } from "./sharedSchemas.js";
|
|
6
6
|
export const TRANSLATE_TEXT_SEGMENT_BODY_SCHEMA = z
|
|
7
7
|
.object({
|
|
8
8
|
ownerId: OWNER_ID_SCHEMA.optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translateTextSegmentSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/translateTextSegmentSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,4BAA4B,CAAA;AACnC,OAAO,
|
|
1
|
+
{"version":3,"file":"translateTextSegmentSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/translateTextSegmentSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AAClE,OAAO,EACL,6BAA6B,EAC7B,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,8BAA8B,EAC9B,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AACnF,OAAO,EACL,sBAAsB,EACtB,mCAAmC,EACnC,oBAAoB,EACpB,iBAAiB,EACjB,kCAAkC,EAClC,sBAAsB,GACvB,MAAM,oBAAoB,CAAA;AAE3B,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC;KAChD,MAAM,CAAC;IACN,OAAO,EAAE,eAAe,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,aAAa;IAC3B,YAAY,EAAE,aAAa;IAC3B,WAAW,EAAE,8BAA8B,CAAC,QAAQ,EAAE;IACtD,gBAAgB,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IACrD,OAAO,EAAE,0BAA0B,CAAC,MAAM,CAAC;QACzC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC,QAAQ,EAAE;QAClF,mBAAmB,EAAE,CAAC,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,QAAQ,EAAE;KACpE,CAAC,CAAC,QAAQ,EAAE;IACb,QAAQ,EAAE,eAAe;IACzB,IAAI,EAAE,CAAC;SACJ,UAAU,CAAC,iBAAiB,CAAC;SAC7B,QAAQ,CACP,2TAA2T,CAC5T;IACH,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,aAAa,EAAE,sBAAsB;QACrC,SAAS,EAAE,sBAAsB,CAAC,QAAQ,EAAE;QAC5C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QACxB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KACtC,CAAC;IACF,OAAO,EAAE,CAAC;SACP,KAAK,CAAC,oBAAoB,CAAC;SAC3B,QAAQ,CAAC,oEAAoE,CAAC;SAC9E,QAAQ,EAAE;CACd,CAAC;KACD,MAAM,CAAC,GAAG,kCAAkC,CAAC;KAC7C,MAAM,CAAC,GAAG,sBAAsB,CAAC;KACjC,MAAM,CAAC,GAAG,0BAA0B,CAAC,CAAA;AAExC,MAAM,CAAC,MAAM,qCAAqC,GAAG,6BAA6B,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { IntegrationEngineEnum } from '../schemas/common/commonSchemas.
|
|
1
|
+
import type { IntegrationEngineEnum } from '../schemas/common/commonSchemas.ts';
|
|
2
2
|
export declare const isSegmentUnderLengthLimit: (value: string, integration?: IntegrationEngineEnum) => boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { handleHtmlEscape } from
|
|
2
|
-
import { wrapNonTranslatableRegions } from
|
|
3
|
-
import { getRequestSizeLimit } from
|
|
1
|
+
import { handleHtmlEscape } from "../helpers/htmlEscaping.js";
|
|
2
|
+
import { wrapNonTranslatableRegions } from "../helpers/nonTranslatableContentHelper.js";
|
|
3
|
+
import { getRequestSizeLimit } from "./requestSizeLimit.js";
|
|
4
4
|
export const isSegmentUnderLengthLimit = (value, integration) => {
|
|
5
5
|
const limit = getRequestSizeLimit(integration);
|
|
6
6
|
const htmlEscaped = handleHtmlEscape(value, integration);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type IntegrationEngineEnum } from '../schemas/common/commonSchemas.
|
|
2
|
-
import type { ContentUnitLike } from '../schemas/translation/sharedSchemas.
|
|
1
|
+
import { type IntegrationEngineEnum } from '../schemas/common/commonSchemas.ts';
|
|
2
|
+
import type { ContentUnitLike } from '../schemas/translation/sharedSchemas.ts';
|
|
3
3
|
/**
|
|
4
4
|
* Checks if every segment in the content unit is under the size limit.
|
|
5
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { REQUEST_SIZE_LIMIT_MAP, SEGMENT_VALUE_MAX_LENGTH_DEFAULT, } from
|
|
2
|
-
import { isSegmentUnderLengthLimit } from
|
|
1
|
+
import { REQUEST_SIZE_LIMIT_MAP, SEGMENT_VALUE_MAX_LENGTH_DEFAULT, } from "../schemas/common/commonSchemas.js";
|
|
2
|
+
import { isSegmentUnderLengthLimit } from "./isSegmentUnderLengthLimit.js";
|
|
3
3
|
/**
|
|
4
4
|
* Checks if every segment in the content unit is under the size limit.
|
|
5
5
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokalise/polyglot-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Lokalise",
|
|
6
6
|
"url": "https://lokalise.com/"
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"@lokalise/id-utils": "^3.0.0",
|
|
42
42
|
"@lokalise/node-core": "^13.6.0",
|
|
43
43
|
"@lokalise/non-translatable-markup": "^3.0.0",
|
|
44
|
-
"@lokalise/supported-languages": "^3.
|
|
44
|
+
"@lokalise/supported-languages": "^3.1.0",
|
|
45
45
|
"@lokalise/zod-extras": "^2.1.0",
|
|
46
46
|
"html-escaper": "^3.0.3",
|
|
47
47
|
"undici": "^7.7.0",
|
|
48
48
|
"undici-retry": "^6.0.0",
|
|
49
|
-
"zod": "^3.24.
|
|
49
|
+
"zod": "^3.24.3"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@lokalise/fastify-extras": ">=27.0.0"
|
|
@@ -54,17 +54,17 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@amplitude/analytics-types": "^2.9.0",
|
|
56
56
|
"@biomejs/biome": "^1.9.4",
|
|
57
|
-
"@lokalise/biome-config": "^
|
|
57
|
+
"@lokalise/biome-config": "^2.0.0",
|
|
58
58
|
"@lokalise/fastify-extras": "^27.3.0",
|
|
59
59
|
"@lokalise/tsconfig": "^1.1.0",
|
|
60
60
|
"@types/html-escaper": "^3.0.4",
|
|
61
|
-
"@types/node": "^22.
|
|
62
|
-
"@vitest/coverage-v8": "^3.1.
|
|
61
|
+
"@types/node": "^22.15.3",
|
|
62
|
+
"@vitest/coverage-v8": "^3.1.2",
|
|
63
63
|
"auto-changelog": "^2.5.0",
|
|
64
|
-
"mockttp": "^3.17.
|
|
64
|
+
"mockttp": "^3.17.1",
|
|
65
65
|
"rimraf": "^6.0.1",
|
|
66
66
|
"ts-deepmerge": "^7.0.1",
|
|
67
|
-
"typescript": "5.8.
|
|
67
|
+
"typescript": "5.8.3",
|
|
68
68
|
"vitest": "^3.0.4"
|
|
69
69
|
}
|
|
70
70
|
}
|