@lingo.dev/_sdk 0.11.0 → 0.12.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/index.cjs +6 -3
- package/build/index.d.cts +3 -0
- package/build/index.d.ts +3 -0
- package/build/index.mjs +6 -3
- package/package.json +2 -2
package/build/index.cjs
CHANGED
@@ -10,11 +10,13 @@ var engineParamsSchema = _zod2.default.object({
|
|
10
10
|
}).passthrough();
|
11
11
|
var payloadSchema = _zod2.default.record(_zod2.default.string(), _zod2.default.any());
|
12
12
|
var referenceSchema = _zod2.default.record(__spec.localeCodeSchema, payloadSchema);
|
13
|
+
var hintsSchema = _zod2.default.record(_zod2.default.string(), _zod2.default.array(_zod2.default.string()));
|
13
14
|
var localizationParamsSchema = _zod2.default.object({
|
14
15
|
sourceLocale: _zod2.default.union([__spec.localeCodeSchema, _zod2.default.null()]),
|
15
16
|
targetLocale: __spec.localeCodeSchema,
|
16
17
|
fast: _zod2.default.boolean().optional(),
|
17
|
-
reference: referenceSchema.optional()
|
18
|
+
reference: referenceSchema.optional(),
|
19
|
+
hints: hintsSchema.optional()
|
18
20
|
});
|
19
21
|
var LingoDotDevEngine = class {
|
20
22
|
|
@@ -48,7 +50,7 @@ var LingoDotDevEngine = class {
|
|
48
50
|
const processedPayloadChunk = await this.localizeChunk(
|
49
51
|
finalParams.sourceLocale,
|
50
52
|
finalParams.targetLocale,
|
51
|
-
{ data: chunk, reference: params.reference },
|
53
|
+
{ data: chunk, reference: params.reference, hints: params.hints },
|
52
54
|
workflowId,
|
53
55
|
params.fast || false,
|
54
56
|
signal
|
@@ -85,7 +87,8 @@ var LingoDotDevEngine = class {
|
|
85
87
|
target: targetLocale
|
86
88
|
},
|
87
89
|
data: payload.data,
|
88
|
-
reference: payload.reference
|
90
|
+
reference: payload.reference,
|
91
|
+
hints: payload.hints
|
89
92
|
},
|
90
93
|
null,
|
91
94
|
2
|
package/build/index.d.cts
CHANGED
@@ -23,16 +23,19 @@ declare const localizationParamsSchema: Z.ZodObject<{
|
|
23
23
|
targetLocale: Z.ZodEffects<Z.ZodString, string, string>;
|
24
24
|
fast: Z.ZodOptional<Z.ZodBoolean>;
|
25
25
|
reference: Z.ZodOptional<Z.ZodRecord<Z.ZodEffects<Z.ZodString, string, string>, Z.ZodRecord<Z.ZodString, Z.ZodAny>>>;
|
26
|
+
hints: Z.ZodOptional<Z.ZodRecord<Z.ZodString, Z.ZodArray<Z.ZodString, "many">>>;
|
26
27
|
}, "strip", Z.ZodTypeAny, {
|
27
28
|
sourceLocale: string | null;
|
28
29
|
targetLocale: string;
|
29
30
|
fast?: boolean | undefined;
|
30
31
|
reference?: Record<string, Record<string, any>> | undefined;
|
32
|
+
hints?: Record<string, string[]> | undefined;
|
31
33
|
}, {
|
32
34
|
sourceLocale: string | null;
|
33
35
|
targetLocale: string;
|
34
36
|
fast?: boolean | undefined;
|
35
37
|
reference?: Record<string, Record<string, any>> | undefined;
|
38
|
+
hints?: Record<string, string[]> | undefined;
|
36
39
|
}>;
|
37
40
|
/**
|
38
41
|
* LingoDotDevEngine class for interacting with the LingoDotDev API
|
package/build/index.d.ts
CHANGED
@@ -23,16 +23,19 @@ declare const localizationParamsSchema: Z.ZodObject<{
|
|
23
23
|
targetLocale: Z.ZodEffects<Z.ZodString, string, string>;
|
24
24
|
fast: Z.ZodOptional<Z.ZodBoolean>;
|
25
25
|
reference: Z.ZodOptional<Z.ZodRecord<Z.ZodEffects<Z.ZodString, string, string>, Z.ZodRecord<Z.ZodString, Z.ZodAny>>>;
|
26
|
+
hints: Z.ZodOptional<Z.ZodRecord<Z.ZodString, Z.ZodArray<Z.ZodString, "many">>>;
|
26
27
|
}, "strip", Z.ZodTypeAny, {
|
27
28
|
sourceLocale: string | null;
|
28
29
|
targetLocale: string;
|
29
30
|
fast?: boolean | undefined;
|
30
31
|
reference?: Record<string, Record<string, any>> | undefined;
|
32
|
+
hints?: Record<string, string[]> | undefined;
|
31
33
|
}, {
|
32
34
|
sourceLocale: string | null;
|
33
35
|
targetLocale: string;
|
34
36
|
fast?: boolean | undefined;
|
35
37
|
reference?: Record<string, Record<string, any>> | undefined;
|
38
|
+
hints?: Record<string, string[]> | undefined;
|
36
39
|
}>;
|
37
40
|
/**
|
38
41
|
* LingoDotDevEngine class for interacting with the LingoDotDev API
|
package/build/index.mjs
CHANGED
@@ -10,11 +10,13 @@ var engineParamsSchema = Z.object({
|
|
10
10
|
}).passthrough();
|
11
11
|
var payloadSchema = Z.record(Z.string(), Z.any());
|
12
12
|
var referenceSchema = Z.record(localeCodeSchema, payloadSchema);
|
13
|
+
var hintsSchema = Z.record(Z.string(), Z.array(Z.string()));
|
13
14
|
var localizationParamsSchema = Z.object({
|
14
15
|
sourceLocale: Z.union([localeCodeSchema, Z.null()]),
|
15
16
|
targetLocale: localeCodeSchema,
|
16
17
|
fast: Z.boolean().optional(),
|
17
|
-
reference: referenceSchema.optional()
|
18
|
+
reference: referenceSchema.optional(),
|
19
|
+
hints: hintsSchema.optional()
|
18
20
|
});
|
19
21
|
var LingoDotDevEngine = class {
|
20
22
|
config;
|
@@ -48,7 +50,7 @@ var LingoDotDevEngine = class {
|
|
48
50
|
const processedPayloadChunk = await this.localizeChunk(
|
49
51
|
finalParams.sourceLocale,
|
50
52
|
finalParams.targetLocale,
|
51
|
-
{ data: chunk, reference: params.reference },
|
53
|
+
{ data: chunk, reference: params.reference, hints: params.hints },
|
52
54
|
workflowId,
|
53
55
|
params.fast || false,
|
54
56
|
signal
|
@@ -85,7 +87,8 @@ var LingoDotDevEngine = class {
|
|
85
87
|
target: targetLocale
|
86
88
|
},
|
87
89
|
data: payload.data,
|
88
|
-
reference: payload.reference
|
90
|
+
reference: payload.reference,
|
91
|
+
hints: payload.hints
|
89
92
|
},
|
90
93
|
null,
|
91
94
|
2
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lingo.dev/_sdk",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.12.1",
|
4
4
|
"description": "Lingo.dev JS SDK",
|
5
5
|
"private": false,
|
6
6
|
"publishConfig": {
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"@paralleldrive/cuid2": "^2.2.2",
|
22
22
|
"jsdom": "^25.0.1",
|
23
23
|
"zod": "^3.25.76",
|
24
|
-
"@lingo.dev/_spec": "0.
|
24
|
+
"@lingo.dev/_spec": "0.40.1"
|
25
25
|
},
|
26
26
|
"devDependencies": {
|
27
27
|
"@types/jsdom": "^21.1.7",
|