@github/copilot-language-server 1.551.2 → 1.551.3
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/main.js +657 -657
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/cliVersion.js +1 -1
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/client.js +499 -36
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/copilotRequestHandler.js +156 -20
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/extension.js +11 -9
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/ffiRuntimeHost.js +14 -3
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/generated/rpc.js +1305 -304
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/host.js +67 -0
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/index.js +12 -7
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/installationConfirmation.js +98 -0
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/runtimeArtifacts.js +1 -0
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/schema.js +40 -0
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/session.js +474 -151
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/sessionFsProvider.js +57 -0
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/types.js +5 -2
- package/dist/node_modules/@github/copilot-sdk/dist/cjs/{factory.js → workflow.js} +33 -33
- package/dist/node_modules/@github/copilot-sdk/package.json +27 -16
- package/dist/node_modules/zod/locales/package.json +1 -2
- package/dist/node_modules/zod/mini/package.json +1 -2
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/node_modules/zod/v3/package.json +1 -2
- package/dist/node_modules/zod/v4/classic/errors.js +2 -2
- package/dist/node_modules/zod/v4/classic/from-json-schema.cjs +16 -31
- package/dist/node_modules/zod/v4/classic/from-json-schema.js +16 -31
- package/dist/node_modules/zod/v4/classic/package.json +1 -2
- package/dist/node_modules/zod/v4/classic/schemas.cjs +119 -358
- package/dist/node_modules/zod/v4/classic/schemas.js +118 -356
- package/dist/node_modules/zod/v4/core/api.cjs +2 -7
- package/dist/node_modules/zod/v4/core/api.js +2 -7
- package/dist/node_modules/zod/v4/core/core.cjs +1 -3
- package/dist/node_modules/zod/v4/core/core.js +2 -4
- package/dist/node_modules/zod/v4/core/errors.cjs +23 -26
- package/dist/node_modules/zod/v4/core/errors.js +23 -26
- package/dist/node_modules/zod/v4/core/json-schema-processors.cjs +20 -16
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +20 -16
- package/dist/node_modules/zod/v4/core/package.json +1 -2
- package/dist/node_modules/zod/v4/core/parse.cjs +7 -7
- package/dist/node_modules/zod/v4/core/parse.js +7 -7
- package/dist/node_modules/zod/v4/core/regexes.cjs +3 -9
- package/dist/node_modules/zod/v4/core/regexes.js +1 -7
- package/dist/node_modules/zod/v4/core/schemas.cjs +65 -211
- package/dist/node_modules/zod/v4/core/schemas.js +64 -210
- package/dist/node_modules/zod/v4/core/to-json-schema.cjs +1 -12
- package/dist/node_modules/zod/v4/core/to-json-schema.js +1 -12
- package/dist/node_modules/zod/v4/core/util.cjs +30 -54
- package/dist/node_modules/zod/v4/core/util.js +32 -55
- package/dist/node_modules/zod/v4/core/versions.cjs +2 -2
- package/dist/node_modules/zod/v4/core/versions.js +2 -2
- package/dist/node_modules/zod/v4/locales/en.cjs +0 -4
- package/dist/node_modules/zod/v4/locales/en.js +0 -4
- package/dist/node_modules/zod/v4/locales/fr.cjs +7 -24
- package/dist/node_modules/zod/v4/locales/fr.js +7 -24
- package/dist/node_modules/zod/v4/locales/index.cjs +1 -8
- package/dist/node_modules/zod/v4/locales/index.js +0 -3
- package/dist/node_modules/zod/v4/locales/it.cjs +1 -1
- package/dist/node_modules/zod/v4/locales/it.js +1 -1
- package/dist/node_modules/zod/v4/locales/ka.cjs +8 -8
- package/dist/node_modules/zod/v4/locales/ka.js +8 -8
- package/dist/node_modules/zod/v4/locales/package.json +1 -2
- package/dist/node_modules/zod/v4/locales/uz.cjs +0 -1
- package/dist/node_modules/zod/v4/locales/uz.js +0 -1
- package/dist/node_modules/zod/v4/mini/package.json +1 -2
- package/dist/node_modules/zod/v4/mini/schemas.cjs +4 -41
- package/dist/node_modules/zod/v4/mini/schemas.js +4 -40
- package/dist/node_modules/zod/v4/package.json +1 -2
- package/dist/node_modules/zod/v4-mini/package.json +1 -2
- package/package.json +20 -20
- package/dist/node_modules/zod/v4/locales/el.cjs +0 -136
- package/dist/node_modules/zod/v4/locales/el.js +0 -109
- package/dist/node_modules/zod/v4/locales/hr.cjs +0 -149
- package/dist/node_modules/zod/v4/locales/hr.js +0 -122
- package/dist/node_modules/zod/v4/locales/ro.cjs +0 -146
- package/dist/node_modules/zod/v4/locales/ro.js +0 -119
|
@@ -41,7 +41,6 @@ exports.merge = merge;
|
|
|
41
41
|
exports.partial = partial;
|
|
42
42
|
exports.required = required;
|
|
43
43
|
exports.aborted = aborted;
|
|
44
|
-
exports.explicitlyAborted = explicitlyAborted;
|
|
45
44
|
exports.prefixIssues = prefixIssues;
|
|
46
45
|
exports.unwrapMessage = unwrapMessage;
|
|
47
46
|
exports.finalizeIssue = finalizeIssue;
|
|
@@ -56,7 +55,6 @@ exports.base64urlToUint8Array = base64urlToUint8Array;
|
|
|
56
55
|
exports.uint8ArrayToBase64url = uint8ArrayToBase64url;
|
|
57
56
|
exports.hexToUint8Array = hexToUint8Array;
|
|
58
57
|
exports.uint8ArrayToHex = uint8ArrayToHex;
|
|
59
|
-
const core_js_1 = require("./core.cjs");
|
|
60
58
|
// functions
|
|
61
59
|
function assertEqual(val) {
|
|
62
60
|
return val;
|
|
@@ -106,15 +104,21 @@ function cleanRegex(source) {
|
|
|
106
104
|
return source.slice(start, end);
|
|
107
105
|
}
|
|
108
106
|
function floatSafeRemainder(val, step) {
|
|
109
|
-
const
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
107
|
+
const valDecCount = (val.toString().split(".")[1] || "").length;
|
|
108
|
+
const stepString = step.toString();
|
|
109
|
+
let stepDecCount = (stepString.split(".")[1] || "").length;
|
|
110
|
+
if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
|
|
111
|
+
const match = stepString.match(/\d?e-(\d?)/);
|
|
112
|
+
if (match?.[1]) {
|
|
113
|
+
stepDecCount = Number.parseInt(match[1]);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
117
|
+
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
118
|
+
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
119
|
+
return (valInt % stepInt) / 10 ** decCount;
|
|
120
|
+
}
|
|
121
|
+
const EVALUATING = Symbol("evaluating");
|
|
118
122
|
function defineLazy(object, key, getter) {
|
|
119
123
|
let value = undefined;
|
|
120
124
|
Object.defineProperty(object, key, {
|
|
@@ -201,11 +205,6 @@ function isObject(data) {
|
|
|
201
205
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
202
206
|
}
|
|
203
207
|
exports.allowsEval = cached(() => {
|
|
204
|
-
// Skip the probe under `jitless`: strict CSPs report the caught `new Function`
|
|
205
|
-
// as a `securitypolicyviolation` even though the throw is swallowed.
|
|
206
|
-
if (core_js_1.globalConfig.jitless) {
|
|
207
|
-
return false;
|
|
208
|
-
}
|
|
209
208
|
// @ts-ignore
|
|
210
209
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
211
210
|
return false;
|
|
@@ -243,10 +242,6 @@ function shallowClone(o) {
|
|
|
243
242
|
return { ...o };
|
|
244
243
|
if (Array.isArray(o))
|
|
245
244
|
return [...o];
|
|
246
|
-
if (o instanceof Map)
|
|
247
|
-
return new Map(o);
|
|
248
|
-
if (o instanceof Set)
|
|
249
|
-
return new Set(o);
|
|
250
245
|
return o;
|
|
251
246
|
}
|
|
252
247
|
function numKeys(data) {
|
|
@@ -305,14 +300,7 @@ const getParsedType = (data) => {
|
|
|
305
300
|
};
|
|
306
301
|
exports.getParsedType = getParsedType;
|
|
307
302
|
exports.propertyKeyTypes = new Set(["string", "number", "symbol"]);
|
|
308
|
-
exports.primitiveTypes = new Set([
|
|
309
|
-
"string",
|
|
310
|
-
"number",
|
|
311
|
-
"bigint",
|
|
312
|
-
"boolean",
|
|
313
|
-
"symbol",
|
|
314
|
-
"undefined",
|
|
315
|
-
]);
|
|
303
|
+
exports.primitiveTypes = new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
|
|
316
304
|
function escapeRegex(str) {
|
|
317
305
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
318
306
|
}
|
|
@@ -484,9 +472,6 @@ function safeExtend(schema, shape) {
|
|
|
484
472
|
return clone(schema, def);
|
|
485
473
|
}
|
|
486
474
|
function merge(a, b) {
|
|
487
|
-
if (a._zod.def.checks?.length) {
|
|
488
|
-
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
489
|
-
}
|
|
490
475
|
const def = mergeDefs(a._zod.def, {
|
|
491
476
|
get shape() {
|
|
492
477
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -496,7 +481,7 @@ function merge(a, b) {
|
|
|
496
481
|
get catchall() {
|
|
497
482
|
return b._zod.def.catchall;
|
|
498
483
|
},
|
|
499
|
-
checks:
|
|
484
|
+
checks: [], // delete existing checks
|
|
500
485
|
});
|
|
501
486
|
return clone(a, def);
|
|
502
487
|
}
|
|
@@ -590,18 +575,6 @@ function aborted(x, startIndex = 0) {
|
|
|
590
575
|
}
|
|
591
576
|
return false;
|
|
592
577
|
}
|
|
593
|
-
// Checks for explicit abort (continue === false), as opposed to implicit abort (continue === undefined).
|
|
594
|
-
// Used to respect `abort: true` in .refine() even for checks that have a `when` function.
|
|
595
|
-
function explicitlyAborted(x, startIndex = 0) {
|
|
596
|
-
if (x.aborted === true)
|
|
597
|
-
return true;
|
|
598
|
-
for (let i = startIndex; i < x.issues.length; i++) {
|
|
599
|
-
if (x.issues[i]?.continue === false) {
|
|
600
|
-
return true;
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
return false;
|
|
604
|
-
}
|
|
605
578
|
function prefixIssues(path, issues) {
|
|
606
579
|
return issues.map((iss) => {
|
|
607
580
|
var _a;
|
|
@@ -614,20 +587,23 @@ function unwrapMessage(message) {
|
|
|
614
587
|
return typeof message === "string" ? message : message?.message;
|
|
615
588
|
}
|
|
616
589
|
function finalizeIssue(iss, ctx, config) {
|
|
617
|
-
const
|
|
618
|
-
|
|
619
|
-
|
|
590
|
+
const full = { ...iss, path: iss.path ?? [] };
|
|
591
|
+
// for backwards compatibility
|
|
592
|
+
if (!iss.message) {
|
|
593
|
+
const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??
|
|
620
594
|
unwrapMessage(ctx?.error?.(iss)) ??
|
|
621
595
|
unwrapMessage(config.customError?.(iss)) ??
|
|
622
596
|
unwrapMessage(config.localeError?.(iss)) ??
|
|
623
|
-
"Invalid input"
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
597
|
+
"Invalid input";
|
|
598
|
+
full.message = message;
|
|
599
|
+
}
|
|
600
|
+
// delete (full as any).def;
|
|
601
|
+
delete full.inst;
|
|
602
|
+
delete full.continue;
|
|
603
|
+
if (!ctx?.reportInput) {
|
|
604
|
+
delete full.input;
|
|
629
605
|
}
|
|
630
|
-
return
|
|
606
|
+
return full;
|
|
631
607
|
}
|
|
632
608
|
function getSizableOrigin(input) {
|
|
633
609
|
if (input instanceof Set)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { globalConfig } from "./core.js";
|
|
2
1
|
// functions
|
|
3
2
|
export function assertEqual(val) {
|
|
4
3
|
return val;
|
|
@@ -48,15 +47,21 @@ export function cleanRegex(source) {
|
|
|
48
47
|
return source.slice(start, end);
|
|
49
48
|
}
|
|
50
49
|
export function floatSafeRemainder(val, step) {
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
50
|
+
const valDecCount = (val.toString().split(".")[1] || "").length;
|
|
51
|
+
const stepString = step.toString();
|
|
52
|
+
let stepDecCount = (stepString.split(".")[1] || "").length;
|
|
53
|
+
if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
|
|
54
|
+
const match = stepString.match(/\d?e-(\d?)/);
|
|
55
|
+
if (match?.[1]) {
|
|
56
|
+
stepDecCount = Number.parseInt(match[1]);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
60
|
+
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
61
|
+
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
62
|
+
return (valInt % stepInt) / 10 ** decCount;
|
|
63
|
+
}
|
|
64
|
+
const EVALUATING = Symbol("evaluating");
|
|
60
65
|
export function defineLazy(object, key, getter) {
|
|
61
66
|
let value = undefined;
|
|
62
67
|
Object.defineProperty(object, key, {
|
|
@@ -142,12 +147,7 @@ export const captureStackTrace = ("captureStackTrace" in Error ? Error.captureSt
|
|
|
142
147
|
export function isObject(data) {
|
|
143
148
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
144
149
|
}
|
|
145
|
-
export const allowsEval =
|
|
146
|
-
// Skip the probe under `jitless`: strict CSPs report the caught `new Function`
|
|
147
|
-
// as a `securitypolicyviolation` even though the throw is swallowed.
|
|
148
|
-
if (globalConfig.jitless) {
|
|
149
|
-
return false;
|
|
150
|
-
}
|
|
150
|
+
export const allowsEval = cached(() => {
|
|
151
151
|
// @ts-ignore
|
|
152
152
|
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
|
|
153
153
|
return false;
|
|
@@ -185,10 +185,6 @@ export function shallowClone(o) {
|
|
|
185
185
|
return { ...o };
|
|
186
186
|
if (Array.isArray(o))
|
|
187
187
|
return [...o];
|
|
188
|
-
if (o instanceof Map)
|
|
189
|
-
return new Map(o);
|
|
190
|
-
if (o instanceof Set)
|
|
191
|
-
return new Set(o);
|
|
192
188
|
return o;
|
|
193
189
|
}
|
|
194
190
|
export function numKeys(data) {
|
|
@@ -245,15 +241,8 @@ export const getParsedType = (data) => {
|
|
|
245
241
|
throw new Error(`Unknown data type: ${t}`);
|
|
246
242
|
}
|
|
247
243
|
};
|
|
248
|
-
export const propertyKeyTypes =
|
|
249
|
-
export const primitiveTypes =
|
|
250
|
-
"string",
|
|
251
|
-
"number",
|
|
252
|
-
"bigint",
|
|
253
|
-
"boolean",
|
|
254
|
-
"symbol",
|
|
255
|
-
"undefined",
|
|
256
|
-
]);
|
|
244
|
+
export const propertyKeyTypes = new Set(["string", "number", "symbol"]);
|
|
245
|
+
export const primitiveTypes = new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
|
|
257
246
|
export function escapeRegex(str) {
|
|
258
247
|
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
259
248
|
}
|
|
@@ -425,9 +414,6 @@ export function safeExtend(schema, shape) {
|
|
|
425
414
|
return clone(schema, def);
|
|
426
415
|
}
|
|
427
416
|
export function merge(a, b) {
|
|
428
|
-
if (a._zod.def.checks?.length) {
|
|
429
|
-
throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
430
|
-
}
|
|
431
417
|
const def = mergeDefs(a._zod.def, {
|
|
432
418
|
get shape() {
|
|
433
419
|
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
|
|
@@ -437,7 +423,7 @@ export function merge(a, b) {
|
|
|
437
423
|
get catchall() {
|
|
438
424
|
return b._zod.def.catchall;
|
|
439
425
|
},
|
|
440
|
-
checks:
|
|
426
|
+
checks: [], // delete existing checks
|
|
441
427
|
});
|
|
442
428
|
return clone(a, def);
|
|
443
429
|
}
|
|
@@ -531,18 +517,6 @@ export function aborted(x, startIndex = 0) {
|
|
|
531
517
|
}
|
|
532
518
|
return false;
|
|
533
519
|
}
|
|
534
|
-
// Checks for explicit abort (continue === false), as opposed to implicit abort (continue === undefined).
|
|
535
|
-
// Used to respect `abort: true` in .refine() even for checks that have a `when` function.
|
|
536
|
-
export function explicitlyAborted(x, startIndex = 0) {
|
|
537
|
-
if (x.aborted === true)
|
|
538
|
-
return true;
|
|
539
|
-
for (let i = startIndex; i < x.issues.length; i++) {
|
|
540
|
-
if (x.issues[i]?.continue === false) {
|
|
541
|
-
return true;
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
return false;
|
|
545
|
-
}
|
|
546
520
|
export function prefixIssues(path, issues) {
|
|
547
521
|
return issues.map((iss) => {
|
|
548
522
|
var _a;
|
|
@@ -555,20 +529,23 @@ export function unwrapMessage(message) {
|
|
|
555
529
|
return typeof message === "string" ? message : message?.message;
|
|
556
530
|
}
|
|
557
531
|
export function finalizeIssue(iss, ctx, config) {
|
|
558
|
-
const
|
|
559
|
-
|
|
560
|
-
|
|
532
|
+
const full = { ...iss, path: iss.path ?? [] };
|
|
533
|
+
// for backwards compatibility
|
|
534
|
+
if (!iss.message) {
|
|
535
|
+
const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??
|
|
561
536
|
unwrapMessage(ctx?.error?.(iss)) ??
|
|
562
537
|
unwrapMessage(config.customError?.(iss)) ??
|
|
563
538
|
unwrapMessage(config.localeError?.(iss)) ??
|
|
564
|
-
"Invalid input"
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
539
|
+
"Invalid input";
|
|
540
|
+
full.message = message;
|
|
541
|
+
}
|
|
542
|
+
// delete (full as any).def;
|
|
543
|
+
delete full.inst;
|
|
544
|
+
delete full.continue;
|
|
545
|
+
if (!ctx?.reportInput) {
|
|
546
|
+
delete full.input;
|
|
570
547
|
}
|
|
571
|
-
return
|
|
548
|
+
return full;
|
|
572
549
|
}
|
|
573
550
|
export function getSizableOrigin(input) {
|
|
574
551
|
if (input instanceof Set)
|
|
@@ -120,10 +120,6 @@ const error = () => {
|
|
|
120
120
|
case "invalid_key":
|
|
121
121
|
return `Invalid key in ${issue.origin}`;
|
|
122
122
|
case "invalid_union":
|
|
123
|
-
if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) {
|
|
124
|
-
const opts = issue.options.map((o) => `'${o}'`).join(" | ");
|
|
125
|
-
return `Invalid discriminator value. Expected ${opts}`;
|
|
126
|
-
}
|
|
127
123
|
return "Invalid input";
|
|
128
124
|
case "invalid_element":
|
|
129
125
|
return `Invalid value in ${issue.origin}`;
|
|
@@ -94,10 +94,6 @@ const error = () => {
|
|
|
94
94
|
case "invalid_key":
|
|
95
95
|
return `Invalid key in ${issue.origin}`;
|
|
96
96
|
case "invalid_union":
|
|
97
|
-
if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) {
|
|
98
|
-
const opts = issue.options.map((o) => `'${o}'`).join(" | ");
|
|
99
|
-
return `Invalid discriminator value. Expected ${opts}`;
|
|
100
|
-
}
|
|
101
97
|
return "Invalid input";
|
|
102
98
|
case "invalid_element":
|
|
103
99
|
return `Invalid value in ${issue.origin}`;
|
|
@@ -66,27 +66,9 @@ const error = () => {
|
|
|
66
66
|
template_literal: "entrée",
|
|
67
67
|
};
|
|
68
68
|
const TypeDictionary = {
|
|
69
|
-
|
|
69
|
+
nan: "NaN",
|
|
70
70
|
number: "nombre",
|
|
71
|
-
int: "entier",
|
|
72
|
-
boolean: "booléen",
|
|
73
|
-
bigint: "grand entier",
|
|
74
|
-
symbol: "symbole",
|
|
75
|
-
undefined: "indéfini",
|
|
76
|
-
null: "null",
|
|
77
|
-
never: "jamais",
|
|
78
|
-
void: "vide",
|
|
79
|
-
date: "date",
|
|
80
71
|
array: "tableau",
|
|
81
|
-
object: "objet",
|
|
82
|
-
tuple: "tuple",
|
|
83
|
-
record: "enregistrement",
|
|
84
|
-
map: "carte",
|
|
85
|
-
set: "ensemble",
|
|
86
|
-
file: "fichier",
|
|
87
|
-
nonoptional: "non-optionnel",
|
|
88
|
-
nan: "NaN",
|
|
89
|
-
function: "fonction",
|
|
90
72
|
};
|
|
91
73
|
return (issue) => {
|
|
92
74
|
switch (issue.code) {
|
|
@@ -107,15 +89,16 @@ const error = () => {
|
|
|
107
89
|
const adj = issue.inclusive ? "<=" : "<";
|
|
108
90
|
const sizing = getSizing(issue.origin);
|
|
109
91
|
if (sizing)
|
|
110
|
-
return `Trop grand : ${
|
|
111
|
-
return `Trop grand : ${
|
|
92
|
+
return `Trop grand : ${issue.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
|
|
93
|
+
return `Trop grand : ${issue.origin ?? "valeur"} doit être ${adj}${issue.maximum.toString()}`;
|
|
112
94
|
}
|
|
113
95
|
case "too_small": {
|
|
114
96
|
const adj = issue.inclusive ? ">=" : ">";
|
|
115
97
|
const sizing = getSizing(issue.origin);
|
|
116
|
-
if (sizing)
|
|
117
|
-
return `Trop petit : ${
|
|
118
|
-
|
|
98
|
+
if (sizing) {
|
|
99
|
+
return `Trop petit : ${issue.origin} doit ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
100
|
+
}
|
|
101
|
+
return `Trop petit : ${issue.origin} doit être ${adj}${issue.minimum.toString()}`;
|
|
119
102
|
}
|
|
120
103
|
case "invalid_format": {
|
|
121
104
|
const _issue = issue;
|
|
@@ -40,27 +40,9 @@ const error = () => {
|
|
|
40
40
|
template_literal: "entrée",
|
|
41
41
|
};
|
|
42
42
|
const TypeDictionary = {
|
|
43
|
-
|
|
43
|
+
nan: "NaN",
|
|
44
44
|
number: "nombre",
|
|
45
|
-
int: "entier",
|
|
46
|
-
boolean: "booléen",
|
|
47
|
-
bigint: "grand entier",
|
|
48
|
-
symbol: "symbole",
|
|
49
|
-
undefined: "indéfini",
|
|
50
|
-
null: "null",
|
|
51
|
-
never: "jamais",
|
|
52
|
-
void: "vide",
|
|
53
|
-
date: "date",
|
|
54
45
|
array: "tableau",
|
|
55
|
-
object: "objet",
|
|
56
|
-
tuple: "tuple",
|
|
57
|
-
record: "enregistrement",
|
|
58
|
-
map: "carte",
|
|
59
|
-
set: "ensemble",
|
|
60
|
-
file: "fichier",
|
|
61
|
-
nonoptional: "non-optionnel",
|
|
62
|
-
nan: "NaN",
|
|
63
|
-
function: "fonction",
|
|
64
46
|
};
|
|
65
47
|
return (issue) => {
|
|
66
48
|
switch (issue.code) {
|
|
@@ -81,15 +63,16 @@ const error = () => {
|
|
|
81
63
|
const adj = issue.inclusive ? "<=" : "<";
|
|
82
64
|
const sizing = getSizing(issue.origin);
|
|
83
65
|
if (sizing)
|
|
84
|
-
return `Trop grand : ${
|
|
85
|
-
return `Trop grand : ${
|
|
66
|
+
return `Trop grand : ${issue.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
|
|
67
|
+
return `Trop grand : ${issue.origin ?? "valeur"} doit être ${adj}${issue.maximum.toString()}`;
|
|
86
68
|
}
|
|
87
69
|
case "too_small": {
|
|
88
70
|
const adj = issue.inclusive ? ">=" : ">";
|
|
89
71
|
const sizing = getSizing(issue.origin);
|
|
90
|
-
if (sizing)
|
|
91
|
-
return `Trop petit : ${
|
|
92
|
-
|
|
72
|
+
if (sizing) {
|
|
73
|
+
return `Trop petit : ${issue.origin} doit ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
74
|
+
}
|
|
75
|
+
return `Trop petit : ${issue.origin} doit être ${adj}${issue.minimum.toString()}`;
|
|
93
76
|
}
|
|
94
77
|
case "invalid_format": {
|
|
95
78
|
const _issue = issue;
|
|
@@ -3,8 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.zhCN = exports.vi = exports.uz = exports.ur = exports.uk = exports.ua = exports.tr = exports.th = exports.ta = exports.sv = exports.sl = exports.ru = exports.
|
|
7
|
-
exports.yo = exports.zhTW = void 0;
|
|
6
|
+
exports.yo = exports.zhTW = exports.zhCN = exports.vi = exports.uz = exports.ur = exports.uk = exports.ua = exports.tr = exports.th = exports.ta = exports.sv = exports.sl = exports.ru = exports.pt = exports.pl = exports.ps = exports.ota = exports.no = exports.nl = exports.ms = exports.mk = exports.lt = exports.ko = exports.km = exports.kh = exports.ka = exports.ja = exports.it = exports.is = exports.id = exports.hy = exports.hu = exports.he = exports.frCA = exports.fr = exports.fi = exports.fa = exports.es = exports.eo = exports.en = exports.de = exports.da = exports.cs = exports.ca = exports.bg = exports.be = exports.az = exports.ar = void 0;
|
|
8
7
|
var ar_js_1 = require("./ar.cjs");
|
|
9
8
|
Object.defineProperty(exports, "ar", { enumerable: true, get: function () { return __importDefault(ar_js_1).default; } });
|
|
10
9
|
var az_js_1 = require("./az.cjs");
|
|
@@ -21,8 +20,6 @@ var da_js_1 = require("./da.cjs");
|
|
|
21
20
|
Object.defineProperty(exports, "da", { enumerable: true, get: function () { return __importDefault(da_js_1).default; } });
|
|
22
21
|
var de_js_1 = require("./de.cjs");
|
|
23
22
|
Object.defineProperty(exports, "de", { enumerable: true, get: function () { return __importDefault(de_js_1).default; } });
|
|
24
|
-
var el_js_1 = require("./el.cjs");
|
|
25
|
-
Object.defineProperty(exports, "el", { enumerable: true, get: function () { return __importDefault(el_js_1).default; } });
|
|
26
23
|
var en_js_1 = require("./en.cjs");
|
|
27
24
|
Object.defineProperty(exports, "en", { enumerable: true, get: function () { return __importDefault(en_js_1).default; } });
|
|
28
25
|
var eo_js_1 = require("./eo.cjs");
|
|
@@ -39,8 +36,6 @@ var fr_CA_js_1 = require("./fr-CA.cjs");
|
|
|
39
36
|
Object.defineProperty(exports, "frCA", { enumerable: true, get: function () { return __importDefault(fr_CA_js_1).default; } });
|
|
40
37
|
var he_js_1 = require("./he.cjs");
|
|
41
38
|
Object.defineProperty(exports, "he", { enumerable: true, get: function () { return __importDefault(he_js_1).default; } });
|
|
42
|
-
var hr_js_1 = require("./hr.cjs");
|
|
43
|
-
Object.defineProperty(exports, "hr", { enumerable: true, get: function () { return __importDefault(hr_js_1).default; } });
|
|
44
39
|
var hu_js_1 = require("./hu.cjs");
|
|
45
40
|
Object.defineProperty(exports, "hu", { enumerable: true, get: function () { return __importDefault(hu_js_1).default; } });
|
|
46
41
|
var hy_js_1 = require("./hy.cjs");
|
|
@@ -79,8 +74,6 @@ var pl_js_1 = require("./pl.cjs");
|
|
|
79
74
|
Object.defineProperty(exports, "pl", { enumerable: true, get: function () { return __importDefault(pl_js_1).default; } });
|
|
80
75
|
var pt_js_1 = require("./pt.cjs");
|
|
81
76
|
Object.defineProperty(exports, "pt", { enumerable: true, get: function () { return __importDefault(pt_js_1).default; } });
|
|
82
|
-
var ro_js_1 = require("./ro.cjs");
|
|
83
|
-
Object.defineProperty(exports, "ro", { enumerable: true, get: function () { return __importDefault(ro_js_1).default; } });
|
|
84
77
|
var ru_js_1 = require("./ru.cjs");
|
|
85
78
|
Object.defineProperty(exports, "ru", { enumerable: true, get: function () { return __importDefault(ru_js_1).default; } });
|
|
86
79
|
var sl_js_1 = require("./sl.cjs");
|
|
@@ -6,7 +6,6 @@ export { default as ca } from "./ca.js";
|
|
|
6
6
|
export { default as cs } from "./cs.js";
|
|
7
7
|
export { default as da } from "./da.js";
|
|
8
8
|
export { default as de } from "./de.js";
|
|
9
|
-
export { default as el } from "./el.js";
|
|
10
9
|
export { default as en } from "./en.js";
|
|
11
10
|
export { default as eo } from "./eo.js";
|
|
12
11
|
export { default as es } from "./es.js";
|
|
@@ -15,7 +14,6 @@ export { default as fi } from "./fi.js";
|
|
|
15
14
|
export { default as fr } from "./fr.js";
|
|
16
15
|
export { default as frCA } from "./fr-CA.js";
|
|
17
16
|
export { default as he } from "./he.js";
|
|
18
|
-
export { default as hr } from "./hr.js";
|
|
19
17
|
export { default as hu } from "./hu.js";
|
|
20
18
|
export { default as hy } from "./hy.js";
|
|
21
19
|
export { default as id } from "./id.js";
|
|
@@ -35,7 +33,6 @@ export { default as ota } from "./ota.js";
|
|
|
35
33
|
export { default as ps } from "./ps.js";
|
|
36
34
|
export { default as pl } from "./pl.js";
|
|
37
35
|
export { default as pt } from "./pt.js";
|
|
38
|
-
export { default as ro } from "./ro.js";
|
|
39
36
|
export { default as ru } from "./ru.js";
|
|
40
37
|
export { default as sl } from "./sl.js";
|
|
41
38
|
export { default as sv } from "./sv.js";
|
|
@@ -110,7 +110,7 @@ const error = () => {
|
|
|
110
110
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
111
111
|
if (_issue.format === "regex")
|
|
112
112
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
113
|
-
return `
|
|
113
|
+
return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;
|
|
114
114
|
}
|
|
115
115
|
case "not_multiple_of":
|
|
116
116
|
return `Numero non valido: deve essere un multiplo di ${issue.divisor}`;
|
|
@@ -84,7 +84,7 @@ const error = () => {
|
|
|
84
84
|
return `Stringa non valida: deve includere "${_issue.includes}"`;
|
|
85
85
|
if (_issue.format === "regex")
|
|
86
86
|
return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
|
|
87
|
-
return `
|
|
87
|
+
return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;
|
|
88
88
|
}
|
|
89
89
|
case "not_multiple_of":
|
|
90
90
|
return `Numero non valido: deve essere un multiplo di ${issue.divisor}`;
|
|
@@ -58,9 +58,9 @@ const error = () => {
|
|
|
58
58
|
ipv6: "IPv6 მისამართი",
|
|
59
59
|
cidrv4: "IPv4 დიაპაზონი",
|
|
60
60
|
cidrv6: "IPv6 დიაპაზონი",
|
|
61
|
-
base64: "base64-კოდირებული
|
|
62
|
-
base64url: "base64url-კოდირებული
|
|
63
|
-
json_string: "JSON
|
|
61
|
+
base64: "base64-კოდირებული სტრინგი",
|
|
62
|
+
base64url: "base64url-კოდირებული სტრინგი",
|
|
63
|
+
json_string: "JSON სტრინგი",
|
|
64
64
|
e164: "E.164 ნომერი",
|
|
65
65
|
jwt: "JWT",
|
|
66
66
|
template_literal: "შეყვანა",
|
|
@@ -68,7 +68,7 @@ const error = () => {
|
|
|
68
68
|
const TypeDictionary = {
|
|
69
69
|
nan: "NaN",
|
|
70
70
|
number: "რიცხვი",
|
|
71
|
-
string: "
|
|
71
|
+
string: "სტრინგი",
|
|
72
72
|
boolean: "ბულეანი",
|
|
73
73
|
function: "ფუნქცია",
|
|
74
74
|
array: "მასივი",
|
|
@@ -106,14 +106,14 @@ const error = () => {
|
|
|
106
106
|
case "invalid_format": {
|
|
107
107
|
const _issue = issue;
|
|
108
108
|
if (_issue.format === "starts_with") {
|
|
109
|
-
return `არასწორი
|
|
109
|
+
return `არასწორი სტრინგი: უნდა იწყებოდეს "${_issue.prefix}"-ით`;
|
|
110
110
|
}
|
|
111
111
|
if (_issue.format === "ends_with")
|
|
112
|
-
return `არასწორი
|
|
112
|
+
return `არასწორი სტრინგი: უნდა მთავრდებოდეს "${_issue.suffix}"-ით`;
|
|
113
113
|
if (_issue.format === "includes")
|
|
114
|
-
return `არასწორი
|
|
114
|
+
return `არასწორი სტრინგი: უნდა შეიცავდეს "${_issue.includes}"-ს`;
|
|
115
115
|
if (_issue.format === "regex")
|
|
116
|
-
return `არასწორი
|
|
116
|
+
return `არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${_issue.pattern}`;
|
|
117
117
|
return `არასწორი ${FormatDictionary[_issue.format] ?? issue.format}`;
|
|
118
118
|
}
|
|
119
119
|
case "not_multiple_of":
|
|
@@ -32,9 +32,9 @@ const error = () => {
|
|
|
32
32
|
ipv6: "IPv6 მისამართი",
|
|
33
33
|
cidrv4: "IPv4 დიაპაზონი",
|
|
34
34
|
cidrv6: "IPv6 დიაპაზონი",
|
|
35
|
-
base64: "base64-კოდირებული
|
|
36
|
-
base64url: "base64url-კოდირებული
|
|
37
|
-
json_string: "JSON
|
|
35
|
+
base64: "base64-კოდირებული სტრინგი",
|
|
36
|
+
base64url: "base64url-კოდირებული სტრინგი",
|
|
37
|
+
json_string: "JSON სტრინგი",
|
|
38
38
|
e164: "E.164 ნომერი",
|
|
39
39
|
jwt: "JWT",
|
|
40
40
|
template_literal: "შეყვანა",
|
|
@@ -42,7 +42,7 @@ const error = () => {
|
|
|
42
42
|
const TypeDictionary = {
|
|
43
43
|
nan: "NaN",
|
|
44
44
|
number: "რიცხვი",
|
|
45
|
-
string: "
|
|
45
|
+
string: "სტრინგი",
|
|
46
46
|
boolean: "ბულეანი",
|
|
47
47
|
function: "ფუნქცია",
|
|
48
48
|
array: "მასივი",
|
|
@@ -80,14 +80,14 @@ const error = () => {
|
|
|
80
80
|
case "invalid_format": {
|
|
81
81
|
const _issue = issue;
|
|
82
82
|
if (_issue.format === "starts_with") {
|
|
83
|
-
return `არასწორი
|
|
83
|
+
return `არასწორი სტრინგი: უნდა იწყებოდეს "${_issue.prefix}"-ით`;
|
|
84
84
|
}
|
|
85
85
|
if (_issue.format === "ends_with")
|
|
86
|
-
return `არასწორი
|
|
86
|
+
return `არასწორი სტრინგი: უნდა მთავრდებოდეს "${_issue.suffix}"-ით`;
|
|
87
87
|
if (_issue.format === "includes")
|
|
88
|
-
return `არასწორი
|
|
88
|
+
return `არასწორი სტრინგი: უნდა შეიცავდეს "${_issue.includes}"-ს`;
|
|
89
89
|
if (_issue.format === "regex")
|
|
90
|
-
return `არასწორი
|
|
90
|
+
return `არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${_issue.pattern}`;
|
|
91
91
|
return `არასწორი ${FormatDictionary[_issue.format] ?? issue.format}`;
|
|
92
92
|
}
|
|
93
93
|
case "not_multiple_of":
|
|
@@ -31,7 +31,6 @@ const error = () => {
|
|
|
31
31
|
file: { unit: "bayt", verb: "bo‘lishi kerak" },
|
|
32
32
|
array: { unit: "element", verb: "bo‘lishi kerak" },
|
|
33
33
|
set: { unit: "element", verb: "bo‘lishi kerak" },
|
|
34
|
-
map: { unit: "yozuv", verb: "bo‘lishi kerak" },
|
|
35
34
|
};
|
|
36
35
|
function getSizing(origin) {
|
|
37
36
|
return Sizable[origin] ?? null;
|
|
@@ -5,7 +5,6 @@ const error = () => {
|
|
|
5
5
|
file: { unit: "bayt", verb: "bo‘lishi kerak" },
|
|
6
6
|
array: { unit: "element", verb: "bo‘lishi kerak" },
|
|
7
7
|
set: { unit: "element", verb: "bo‘lishi kerak" },
|
|
8
|
-
map: { unit: "yozuv", verb: "bo‘lishi kerak" },
|
|
9
8
|
};
|
|
10
9
|
function getSizing(origin) {
|
|
11
10
|
return Sizable[origin] ?? null;
|