@github/copilot-language-server 1.552.0 → 1.554.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.
Files changed (75) hide show
  1. package/README.md +94 -1
  2. package/dist/contextWorker.js +14 -14
  3. package/dist/main.js +1030 -1020
  4. package/dist/node_modules/@github/copilot-sdk/dist/cjs/cliVersion.js +1 -1
  5. package/dist/node_modules/@github/copilot-sdk/dist/cjs/client.js +507 -37
  6. package/dist/node_modules/@github/copilot-sdk/dist/cjs/copilotRequestHandler.js +156 -20
  7. package/dist/node_modules/@github/copilot-sdk/dist/cjs/extension.js +13 -9
  8. package/dist/node_modules/@github/copilot-sdk/dist/cjs/ffiRuntimeHost.js +14 -3
  9. package/dist/node_modules/@github/copilot-sdk/dist/cjs/generated/rpc.js +1366 -304
  10. package/dist/node_modules/@github/copilot-sdk/dist/cjs/host.js +67 -0
  11. package/dist/node_modules/@github/copilot-sdk/dist/cjs/index.js +12 -7
  12. package/dist/node_modules/@github/copilot-sdk/dist/cjs/installationConfirmation.js +98 -0
  13. package/dist/node_modules/@github/copilot-sdk/dist/cjs/runtimeArtifacts.js +1 -0
  14. package/dist/node_modules/@github/copilot-sdk/dist/cjs/schema.js +40 -0
  15. package/dist/node_modules/@github/copilot-sdk/dist/cjs/session.js +474 -151
  16. package/dist/node_modules/@github/copilot-sdk/dist/cjs/sessionFsProvider.js +57 -0
  17. package/dist/node_modules/@github/copilot-sdk/dist/cjs/types.js +5 -2
  18. package/dist/node_modules/@github/copilot-sdk/dist/cjs/{factory.js → workflow.js} +33 -33
  19. package/dist/node_modules/@github/copilot-sdk/package.json +27 -16
  20. package/dist/node_modules/zod/locales/package.json +1 -2
  21. package/dist/node_modules/zod/mini/package.json +1 -2
  22. package/dist/node_modules/zod/package.json +1 -1
  23. package/dist/node_modules/zod/v3/package.json +1 -2
  24. package/dist/node_modules/zod/v4/classic/errors.js +2 -2
  25. package/dist/node_modules/zod/v4/classic/from-json-schema.cjs +16 -31
  26. package/dist/node_modules/zod/v4/classic/from-json-schema.js +16 -31
  27. package/dist/node_modules/zod/v4/classic/package.json +1 -2
  28. package/dist/node_modules/zod/v4/classic/schemas.cjs +119 -358
  29. package/dist/node_modules/zod/v4/classic/schemas.js +118 -356
  30. package/dist/node_modules/zod/v4/core/api.cjs +2 -7
  31. package/dist/node_modules/zod/v4/core/api.js +2 -7
  32. package/dist/node_modules/zod/v4/core/core.cjs +1 -3
  33. package/dist/node_modules/zod/v4/core/core.js +2 -4
  34. package/dist/node_modules/zod/v4/core/errors.cjs +23 -26
  35. package/dist/node_modules/zod/v4/core/errors.js +23 -26
  36. package/dist/node_modules/zod/v4/core/json-schema-processors.cjs +20 -16
  37. package/dist/node_modules/zod/v4/core/json-schema-processors.js +20 -16
  38. package/dist/node_modules/zod/v4/core/package.json +1 -2
  39. package/dist/node_modules/zod/v4/core/parse.cjs +7 -7
  40. package/dist/node_modules/zod/v4/core/parse.js +7 -7
  41. package/dist/node_modules/zod/v4/core/regexes.cjs +3 -9
  42. package/dist/node_modules/zod/v4/core/regexes.js +1 -7
  43. package/dist/node_modules/zod/v4/core/schemas.cjs +65 -211
  44. package/dist/node_modules/zod/v4/core/schemas.js +64 -210
  45. package/dist/node_modules/zod/v4/core/to-json-schema.cjs +1 -12
  46. package/dist/node_modules/zod/v4/core/to-json-schema.js +1 -12
  47. package/dist/node_modules/zod/v4/core/util.cjs +30 -54
  48. package/dist/node_modules/zod/v4/core/util.js +32 -55
  49. package/dist/node_modules/zod/v4/core/versions.cjs +2 -2
  50. package/dist/node_modules/zod/v4/core/versions.js +2 -2
  51. package/dist/node_modules/zod/v4/locales/en.cjs +0 -4
  52. package/dist/node_modules/zod/v4/locales/en.js +0 -4
  53. package/dist/node_modules/zod/v4/locales/fr.cjs +7 -24
  54. package/dist/node_modules/zod/v4/locales/fr.js +7 -24
  55. package/dist/node_modules/zod/v4/locales/index.cjs +1 -8
  56. package/dist/node_modules/zod/v4/locales/index.js +0 -3
  57. package/dist/node_modules/zod/v4/locales/it.cjs +1 -1
  58. package/dist/node_modules/zod/v4/locales/it.js +1 -1
  59. package/dist/node_modules/zod/v4/locales/ka.cjs +8 -8
  60. package/dist/node_modules/zod/v4/locales/ka.js +8 -8
  61. package/dist/node_modules/zod/v4/locales/package.json +1 -2
  62. package/dist/node_modules/zod/v4/locales/uz.cjs +0 -1
  63. package/dist/node_modules/zod/v4/locales/uz.js +0 -1
  64. package/dist/node_modules/zod/v4/mini/package.json +1 -2
  65. package/dist/node_modules/zod/v4/mini/schemas.cjs +4 -41
  66. package/dist/node_modules/zod/v4/mini/schemas.js +4 -40
  67. package/dist/node_modules/zod/v4/package.json +1 -2
  68. package/dist/node_modules/zod/v4-mini/package.json +1 -2
  69. package/package.json +20 -20
  70. package/dist/node_modules/zod/v4/locales/el.cjs +0 -136
  71. package/dist/node_modules/zod/v4/locales/el.js +0 -109
  72. package/dist/node_modules/zod/v4/locales/hr.cjs +0 -149
  73. package/dist/node_modules/zod/v4/locales/hr.js +0 -122
  74. package/dist/node_modules/zod/v4/locales/ro.cjs +0 -146
  75. package/dist/node_modules/zod/v4/locales/ro.js +0 -119
@@ -2,6 +2,5 @@
2
2
  "type": "module",
3
3
  "main": "./index.cjs",
4
4
  "module": "./index.js",
5
- "types": "./index.d.cts",
6
- "sideEffects": false
5
+ "types": "./index.d.cts"
7
6
  }
@@ -112,7 +112,6 @@ exports.catch = _catch;
112
112
  exports.nan = nan;
113
113
  exports.pipe = pipe;
114
114
  exports.codec = codec;
115
- exports.invertCodec = invertCodec;
116
115
  exports.readonly = readonly;
117
116
  exports.templateLiteral = templateLiteral;
118
117
  exports.lazy = _lazy;
@@ -145,11 +144,7 @@ exports.ZodMiniType = core.$constructor("ZodMiniType", (inst, def) => {
145
144
  ...def,
146
145
  checks: [
147
146
  ...(def.checks ?? []),
148
- ...checks.map((ch) => typeof ch === "function"
149
- ? {
150
- _zod: { check: ch, def: { check: "custom" }, onattach: [] },
151
- }
152
- : ch),
147
+ ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch),
153
148
  ],
154
149
  }, { parent: true });
155
150
  };
@@ -223,7 +218,7 @@ function url(params) {
223
218
  // @__NO_SIDE_EFFECTS__
224
219
  function httpUrl(params) {
225
220
  return core._url(exports.ZodMiniURL, {
226
- protocol: core.regexes.httpProtocol,
221
+ protocol: /^https?$/,
227
222
  hostname: core.regexes.domain,
228
223
  ...util.normalizeParams(params),
229
224
  });
@@ -244,22 +239,10 @@ exports.ZodMiniNanoID = core.$constructor("ZodMiniNanoID", (inst, def) => {
244
239
  function nanoid(params) {
245
240
  return core._nanoid(exports.ZodMiniNanoID, params);
246
241
  }
247
- /**
248
- * @deprecated CUID v1 is deprecated by its authors due to information leakage
249
- * (timestamps embedded in the id). Use {@link ZodMiniCUID2} instead.
250
- * See https://github.com/paralleldrive/cuid.
251
- */
252
242
  exports.ZodMiniCUID = core.$constructor("ZodMiniCUID", (inst, def) => {
253
243
  core.$ZodCUID.init(inst, def);
254
244
  exports.ZodMiniStringFormat.init(inst, def);
255
245
  });
256
- /**
257
- * Validates a CUID v1 string.
258
- *
259
- * @deprecated CUID v1 is deprecated by its authors due to information leakage
260
- * (timestamps embedded in the id). Use {@link cuid2 | `z.cuid2()`} instead.
261
- * See https://github.com/paralleldrive/cuid.
262
- */
263
246
  // @__NO_SIDE_EFFECTS__
264
247
  function cuid(params) {
265
248
  return core._cuid(exports.ZodMiniCUID, params);
@@ -685,15 +668,6 @@ exports.ZodMiniRecord = core.$constructor("ZodMiniRecord", (inst, def) => {
685
668
  });
686
669
  // @__NO_SIDE_EFFECTS__
687
670
  function record(keyType, valueType, params) {
688
- // v3-compat: z.record(valueType, params?) — defaults keyType to z.string()
689
- if (!valueType || !valueType._zod) {
690
- return new exports.ZodMiniRecord({
691
- type: "record",
692
- keyType: string(),
693
- valueType: keyType,
694
- ...util.normalizeParams(valueType),
695
- });
696
- }
697
671
  return new exports.ZodMiniRecord({
698
672
  type: "record",
699
673
  keyType,
@@ -941,17 +915,6 @@ function codec(in_, out, params) {
941
915
  reverseTransform: params.encode,
942
916
  });
943
917
  }
944
- // @__NO_SIDE_EFFECTS__
945
- function invertCodec(codec) {
946
- const def = codec._zod.def;
947
- return new exports.ZodMiniCodec({
948
- type: "pipe",
949
- in: def.out,
950
- out: def.in,
951
- transform: def.reverseTransform,
952
- reverseTransform: def.transform,
953
- });
954
- }
955
918
  exports.ZodMiniReadonly = core.$constructor("ZodMiniReadonly", (inst, def) => {
956
919
  core.$ZodReadonly.init(inst, def);
957
920
  exports.ZodMiniType.init(inst, def);
@@ -1027,8 +990,8 @@ function refine(fn, _params = {}) {
1027
990
  }
1028
991
  // superRefine
1029
992
  // @__NO_SIDE_EFFECTS__
1030
- function superRefine(fn, params) {
1031
- return core._superRefine(fn, params);
993
+ function superRefine(fn) {
994
+ return core._superRefine(fn);
1032
995
  }
1033
996
  // Re-export describe and meta from core
1034
997
  exports.describe = core.describe;
@@ -16,11 +16,7 @@ export const ZodMiniType = /*@__PURE__*/ core.$constructor("ZodMiniType", (inst,
16
16
  ...def,
17
17
  checks: [
18
18
  ...(def.checks ?? []),
19
- ...checks.map((ch) => typeof ch === "function"
20
- ? {
21
- _zod: { check: ch, def: { check: "custom" }, onattach: [] },
22
- }
23
- : ch),
19
+ ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch),
24
20
  ],
25
21
  }, { parent: true });
26
22
  };
@@ -94,7 +90,7 @@ export function url(params) {
94
90
  // @__NO_SIDE_EFFECTS__
95
91
  export function httpUrl(params) {
96
92
  return core._url(ZodMiniURL, {
97
- protocol: core.regexes.httpProtocol,
93
+ protocol: /^https?$/,
98
94
  hostname: core.regexes.domain,
99
95
  ...util.normalizeParams(params),
100
96
  });
@@ -115,22 +111,10 @@ export const ZodMiniNanoID = /*@__PURE__*/ core.$constructor("ZodMiniNanoID", (i
115
111
  export function nanoid(params) {
116
112
  return core._nanoid(ZodMiniNanoID, params);
117
113
  }
118
- /**
119
- * @deprecated CUID v1 is deprecated by its authors due to information leakage
120
- * (timestamps embedded in the id). Use {@link ZodMiniCUID2} instead.
121
- * See https://github.com/paralleldrive/cuid.
122
- */
123
114
  export const ZodMiniCUID = /*@__PURE__*/ core.$constructor("ZodMiniCUID", (inst, def) => {
124
115
  core.$ZodCUID.init(inst, def);
125
116
  ZodMiniStringFormat.init(inst, def);
126
117
  });
127
- /**
128
- * Validates a CUID v1 string.
129
- *
130
- * @deprecated CUID v1 is deprecated by its authors due to information leakage
131
- * (timestamps embedded in the id). Use {@link cuid2 | `z.cuid2()`} instead.
132
- * See https://github.com/paralleldrive/cuid.
133
- */
134
118
  // @__NO_SIDE_EFFECTS__
135
119
  export function cuid(params) {
136
120
  return core._cuid(ZodMiniCUID, params);
@@ -559,15 +543,6 @@ export const ZodMiniRecord = /*@__PURE__*/ core.$constructor("ZodMiniRecord", (i
559
543
  });
560
544
  // @__NO_SIDE_EFFECTS__
561
545
  export function record(keyType, valueType, params) {
562
- // v3-compat: z.record(valueType, params?) — defaults keyType to z.string()
563
- if (!valueType || !valueType._zod) {
564
- return new ZodMiniRecord({
565
- type: "record",
566
- keyType: string(),
567
- valueType: keyType,
568
- ...util.normalizeParams(valueType),
569
- });
570
- }
571
546
  return new ZodMiniRecord({
572
547
  type: "record",
573
548
  keyType,
@@ -817,17 +792,6 @@ export function codec(in_, out, params) {
817
792
  reverseTransform: params.encode,
818
793
  });
819
794
  }
820
- // @__NO_SIDE_EFFECTS__
821
- export function invertCodec(codec) {
822
- const def = codec._zod.def;
823
- return new ZodMiniCodec({
824
- type: "pipe",
825
- in: def.out,
826
- out: def.in,
827
- transform: def.reverseTransform,
828
- reverseTransform: def.transform,
829
- });
830
- }
831
795
  export const ZodMiniReadonly = /*@__PURE__*/ core.$constructor("ZodMiniReadonly", (inst, def) => {
832
796
  core.$ZodReadonly.init(inst, def);
833
797
  ZodMiniType.init(inst, def);
@@ -904,8 +868,8 @@ export function refine(fn, _params = {}) {
904
868
  }
905
869
  // superRefine
906
870
  // @__NO_SIDE_EFFECTS__
907
- export function superRefine(fn, params) {
908
- return core._superRefine(fn, params);
871
+ export function superRefine(fn) {
872
+ return core._superRefine(fn);
909
873
  }
910
874
  // Re-export describe and meta from core
911
875
  export const describe = core.describe;
@@ -2,6 +2,5 @@
2
2
  "type": "module",
3
3
  "main": "./index.cjs",
4
4
  "module": "./index.js",
5
- "types": "./index.d.cts",
6
- "sideEffects": false
5
+ "types": "./index.d.cts"
7
6
  }
@@ -2,6 +2,5 @@
2
2
  "type": "module",
3
3
  "main": "./index.cjs",
4
4
  "module": "./index.js",
5
- "types": "./index.d.cts",
6
- "sideEffects": false
5
+ "types": "./index.d.cts"
7
6
  }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "url": "git+https://github.com/github/copilot-language-server-release.git"
12
12
  },
13
13
  "license": "MIT",
14
- "version": "1.552.0",
14
+ "version": "1.554.0",
15
15
  "bin": {
16
16
  "copilot-language-server": "../dist/language-server.js"
17
17
  },
@@ -40,25 +40,25 @@
40
40
  "vscode-languageserver-protocol": "^3.17.5"
41
41
  },
42
42
  "optionalDependencies": {
43
- "@github/copilot-language-server-win32-x64": "1.552.0",
44
- "@github/copilot-language-server-win32-arm64": "1.552.0",
45
- "@github/copilot-language-server-linux-x64": "1.552.0",
46
- "@github/copilot-language-server-linux-arm64": "1.552.0",
47
- "@github/copilot-language-server-darwin-x64": "1.552.0",
48
- "@github/copilot-language-server-darwin-arm64": "1.552.0",
49
- "@github/copilot-win32-x64": "1.0.85",
50
- "@github/copilot-win32-arm64": "1.0.85",
51
- "@github/copilot-linux-x64": "1.0.85",
52
- "@github/copilot-linux-arm64": "1.0.85",
53
- "@github/copilot-darwin-x64": "1.0.85",
54
- "@github/copilot-darwin-arm64": "1.0.85",
55
- "@github/copilot-sdk-win32-x64": "1.0.14",
56
- "@github/copilot-sdk-win32-arm64": "1.0.14",
57
- "@github/copilot-sdk-linux-x64": "1.0.14",
58
- "@github/copilot-sdk-linux-arm64": "1.0.14",
59
- "@github/copilot-sdk-darwin-x64": "1.0.14",
60
- "@github/copilot-sdk-darwin-arm64": "1.0.14"
43
+ "@github/copilot-language-server-win32-x64": "1.554.0",
44
+ "@github/copilot-language-server-win32-arm64": "1.554.0",
45
+ "@github/copilot-language-server-linux-x64": "1.554.0",
46
+ "@github/copilot-language-server-linux-arm64": "1.554.0",
47
+ "@github/copilot-language-server-darwin-x64": "1.554.0",
48
+ "@github/copilot-language-server-darwin-arm64": "1.554.0",
49
+ "@github/copilot-win32-x64": "1.0.96",
50
+ "@github/copilot-win32-arm64": "1.0.96",
51
+ "@github/copilot-linux-x64": "1.0.96",
52
+ "@github/copilot-linux-arm64": "1.0.96",
53
+ "@github/copilot-darwin-x64": "1.0.96",
54
+ "@github/copilot-darwin-arm64": "1.0.96",
55
+ "@github/copilot-sdk-win32-x64": "1.0.20",
56
+ "@github/copilot-sdk-win32-arm64": "1.0.20",
57
+ "@github/copilot-sdk-linux-x64": "1.0.20",
58
+ "@github/copilot-sdk-linux-arm64": "1.0.20",
59
+ "@github/copilot-sdk-darwin-x64": "1.0.20",
60
+ "@github/copilot-sdk-darwin-arm64": "1.0.20"
61
61
  },
62
62
  "buildType": "prod",
63
- "build": "171"
63
+ "build": "174"
64
64
  }
@@ -1,136 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.default = default_1;
27
- const util = __importStar(require("../core/util.cjs"));
28
- const error = () => {
29
- const Sizable = {
30
- string: { unit: "χαρακτήρες", verb: "να έχει" },
31
- file: { unit: "bytes", verb: "να έχει" },
32
- array: { unit: "στοιχεία", verb: "να έχει" },
33
- set: { unit: "στοιχεία", verb: "να έχει" },
34
- map: { unit: "καταχωρήσεις", verb: "να έχει" },
35
- };
36
- function getSizing(origin) {
37
- return Sizable[origin] ?? null;
38
- }
39
- const FormatDictionary = {
40
- regex: "είσοδος",
41
- email: "διεύθυνση email",
42
- url: "URL",
43
- emoji: "emoji",
44
- uuid: "UUID",
45
- uuidv4: "UUIDv4",
46
- uuidv6: "UUIDv6",
47
- nanoid: "nanoid",
48
- guid: "GUID",
49
- cuid: "cuid",
50
- cuid2: "cuid2",
51
- ulid: "ULID",
52
- xid: "XID",
53
- ksuid: "KSUID",
54
- datetime: "ISO ημερομηνία και ώρα",
55
- date: "ISO ημερομηνία",
56
- time: "ISO ώρα",
57
- duration: "ISO διάρκεια",
58
- ipv4: "διεύθυνση IPv4",
59
- ipv6: "διεύθυνση IPv6",
60
- mac: "διεύθυνση MAC",
61
- cidrv4: "εύρος IPv4",
62
- cidrv6: "εύρος IPv6",
63
- base64: "συμβολοσειρά κωδικοποιημένη σε base64",
64
- base64url: "συμβολοσειρά κωδικοποιημένη σε base64url",
65
- json_string: "συμβολοσειρά JSON",
66
- e164: "αριθμός E.164",
67
- jwt: "JWT",
68
- template_literal: "είσοδος",
69
- };
70
- const TypeDictionary = {
71
- nan: "NaN",
72
- };
73
- return (issue) => {
74
- switch (issue.code) {
75
- case "invalid_type": {
76
- const expected = TypeDictionary[issue.expected] ?? issue.expected;
77
- const receivedType = util.parsedType(issue.input);
78
- const received = TypeDictionary[receivedType] ?? receivedType;
79
- if (typeof issue.expected === "string" && /^[A-Z]/.test(issue.expected)) {
80
- return `Μη έγκυρη είσοδος: αναμενόταν instanceof ${issue.expected}, λήφθηκε ${received}`;
81
- }
82
- return `Μη έγκυρη είσοδος: αναμενόταν ${expected}, λήφθηκε ${received}`;
83
- }
84
- case "invalid_value":
85
- if (issue.values.length === 1)
86
- return `Μη έγκυρη είσοδος: αναμενόταν ${util.stringifyPrimitive(issue.values[0])}`;
87
- return `Μη έγκυρη επιλογή: αναμενόταν ένα από ${util.joinValues(issue.values, "|")}`;
88
- case "too_big": {
89
- const adj = issue.inclusive ? "<=" : "<";
90
- const sizing = getSizing(issue.origin);
91
- if (sizing)
92
- return `Πολύ μεγάλο: αναμενόταν ${issue.origin ?? "τιμή"} να έχει ${adj}${issue.maximum.toString()} ${sizing.unit ?? "στοιχεία"}`;
93
- return `Πολύ μεγάλο: αναμενόταν ${issue.origin ?? "τιμή"} να είναι ${adj}${issue.maximum.toString()}`;
94
- }
95
- case "too_small": {
96
- const adj = issue.inclusive ? ">=" : ">";
97
- const sizing = getSizing(issue.origin);
98
- if (sizing) {
99
- return `Πολύ μικρό: αναμενόταν ${issue.origin} να έχει ${adj}${issue.minimum.toString()} ${sizing.unit}`;
100
- }
101
- return `Πολύ μικρό: αναμενόταν ${issue.origin} να είναι ${adj}${issue.minimum.toString()}`;
102
- }
103
- case "invalid_format": {
104
- const _issue = issue;
105
- if (_issue.format === "starts_with") {
106
- return `Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${_issue.prefix}"`;
107
- }
108
- if (_issue.format === "ends_with")
109
- return `Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${_issue.suffix}"`;
110
- if (_issue.format === "includes")
111
- return `Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${_issue.includes}"`;
112
- if (_issue.format === "regex")
113
- return `Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${_issue.pattern}`;
114
- return `Μη έγκυρο: ${FormatDictionary[_issue.format] ?? issue.format}`;
115
- }
116
- case "not_multiple_of":
117
- return `Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${issue.divisor}`;
118
- case "unrecognized_keys":
119
- return `Άγνωστ${issue.keys.length > 1 ? "α" : "ο"} κλειδ${issue.keys.length > 1 ? "ιά" : "ί"}: ${util.joinValues(issue.keys, ", ")}`;
120
- case "invalid_key":
121
- return `Μη έγκυρο κλειδί στο ${issue.origin}`;
122
- case "invalid_union":
123
- return "Μη έγκυρη είσοδος";
124
- case "invalid_element":
125
- return `Μη έγκυρη τιμή στο ${issue.origin}`;
126
- default:
127
- return `Μη έγκυρη είσοδος`;
128
- }
129
- };
130
- };
131
- function default_1() {
132
- return {
133
- localeError: error(),
134
- };
135
- }
136
- module.exports = exports.default;
@@ -1,109 +0,0 @@
1
- import * as util from "../core/util.js";
2
- const error = () => {
3
- const Sizable = {
4
- string: { unit: "χαρακτήρες", verb: "να έχει" },
5
- file: { unit: "bytes", verb: "να έχει" },
6
- array: { unit: "στοιχεία", verb: "να έχει" },
7
- set: { unit: "στοιχεία", verb: "να έχει" },
8
- map: { unit: "καταχωρήσεις", verb: "να έχει" },
9
- };
10
- function getSizing(origin) {
11
- return Sizable[origin] ?? null;
12
- }
13
- const FormatDictionary = {
14
- regex: "είσοδος",
15
- email: "διεύθυνση email",
16
- url: "URL",
17
- emoji: "emoji",
18
- uuid: "UUID",
19
- uuidv4: "UUIDv4",
20
- uuidv6: "UUIDv6",
21
- nanoid: "nanoid",
22
- guid: "GUID",
23
- cuid: "cuid",
24
- cuid2: "cuid2",
25
- ulid: "ULID",
26
- xid: "XID",
27
- ksuid: "KSUID",
28
- datetime: "ISO ημερομηνία και ώρα",
29
- date: "ISO ημερομηνία",
30
- time: "ISO ώρα",
31
- duration: "ISO διάρκεια",
32
- ipv4: "διεύθυνση IPv4",
33
- ipv6: "διεύθυνση IPv6",
34
- mac: "διεύθυνση MAC",
35
- cidrv4: "εύρος IPv4",
36
- cidrv6: "εύρος IPv6",
37
- base64: "συμβολοσειρά κωδικοποιημένη σε base64",
38
- base64url: "συμβολοσειρά κωδικοποιημένη σε base64url",
39
- json_string: "συμβολοσειρά JSON",
40
- e164: "αριθμός E.164",
41
- jwt: "JWT",
42
- template_literal: "είσοδος",
43
- };
44
- const TypeDictionary = {
45
- nan: "NaN",
46
- };
47
- return (issue) => {
48
- switch (issue.code) {
49
- case "invalid_type": {
50
- const expected = TypeDictionary[issue.expected] ?? issue.expected;
51
- const receivedType = util.parsedType(issue.input);
52
- const received = TypeDictionary[receivedType] ?? receivedType;
53
- if (typeof issue.expected === "string" && /^[A-Z]/.test(issue.expected)) {
54
- return `Μη έγκυρη είσοδος: αναμενόταν instanceof ${issue.expected}, λήφθηκε ${received}`;
55
- }
56
- return `Μη έγκυρη είσοδος: αναμενόταν ${expected}, λήφθηκε ${received}`;
57
- }
58
- case "invalid_value":
59
- if (issue.values.length === 1)
60
- return `Μη έγκυρη είσοδος: αναμενόταν ${util.stringifyPrimitive(issue.values[0])}`;
61
- return `Μη έγκυρη επιλογή: αναμενόταν ένα από ${util.joinValues(issue.values, "|")}`;
62
- case "too_big": {
63
- const adj = issue.inclusive ? "<=" : "<";
64
- const sizing = getSizing(issue.origin);
65
- if (sizing)
66
- return `Πολύ μεγάλο: αναμενόταν ${issue.origin ?? "τιμή"} να έχει ${adj}${issue.maximum.toString()} ${sizing.unit ?? "στοιχεία"}`;
67
- return `Πολύ μεγάλο: αναμενόταν ${issue.origin ?? "τιμή"} να είναι ${adj}${issue.maximum.toString()}`;
68
- }
69
- case "too_small": {
70
- const adj = issue.inclusive ? ">=" : ">";
71
- const sizing = getSizing(issue.origin);
72
- if (sizing) {
73
- return `Πολύ μικρό: αναμενόταν ${issue.origin} να έχει ${adj}${issue.minimum.toString()} ${sizing.unit}`;
74
- }
75
- return `Πολύ μικρό: αναμενόταν ${issue.origin} να είναι ${adj}${issue.minimum.toString()}`;
76
- }
77
- case "invalid_format": {
78
- const _issue = issue;
79
- if (_issue.format === "starts_with") {
80
- return `Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${_issue.prefix}"`;
81
- }
82
- if (_issue.format === "ends_with")
83
- return `Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${_issue.suffix}"`;
84
- if (_issue.format === "includes")
85
- return `Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${_issue.includes}"`;
86
- if (_issue.format === "regex")
87
- return `Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${_issue.pattern}`;
88
- return `Μη έγκυρο: ${FormatDictionary[_issue.format] ?? issue.format}`;
89
- }
90
- case "not_multiple_of":
91
- return `Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${issue.divisor}`;
92
- case "unrecognized_keys":
93
- return `Άγνωστ${issue.keys.length > 1 ? "α" : "ο"} κλειδ${issue.keys.length > 1 ? "ιά" : "ί"}: ${util.joinValues(issue.keys, ", ")}`;
94
- case "invalid_key":
95
- return `Μη έγκυρο κλειδί στο ${issue.origin}`;
96
- case "invalid_union":
97
- return "Μη έγκυρη είσοδος";
98
- case "invalid_element":
99
- return `Μη έγκυρη τιμή στο ${issue.origin}`;
100
- default:
101
- return `Μη έγκυρη είσοδος`;
102
- }
103
- };
104
- };
105
- export default function () {
106
- return {
107
- localeError: error(),
108
- };
109
- }
@@ -1,149 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.default = default_1;
27
- const util = __importStar(require("../core/util.cjs"));
28
- const error = () => {
29
- const Sizable = {
30
- string: { unit: "znakova", verb: "imati" },
31
- file: { unit: "bajtova", verb: "imati" },
32
- array: { unit: "stavki", verb: "imati" },
33
- set: { unit: "stavki", verb: "imati" },
34
- };
35
- function getSizing(origin) {
36
- return Sizable[origin] ?? null;
37
- }
38
- const FormatDictionary = {
39
- regex: "unos",
40
- email: "email adresa",
41
- url: "URL",
42
- emoji: "emoji",
43
- uuid: "UUID",
44
- uuidv4: "UUIDv4",
45
- uuidv6: "UUIDv6",
46
- nanoid: "nanoid",
47
- guid: "GUID",
48
- cuid: "cuid",
49
- cuid2: "cuid2",
50
- ulid: "ULID",
51
- xid: "XID",
52
- ksuid: "KSUID",
53
- datetime: "ISO datum i vrijeme",
54
- date: "ISO datum",
55
- time: "ISO vrijeme",
56
- duration: "ISO trajanje",
57
- ipv4: "IPv4 adresa",
58
- ipv6: "IPv6 adresa",
59
- cidrv4: "IPv4 raspon",
60
- cidrv6: "IPv6 raspon",
61
- base64: "base64 kodirani tekst",
62
- base64url: "base64url kodirani tekst",
63
- json_string: "JSON tekst",
64
- e164: "E.164 broj",
65
- jwt: "JWT",
66
- template_literal: "unos",
67
- };
68
- const TypeDictionary = {
69
- nan: "NaN",
70
- string: "tekst",
71
- number: "broj",
72
- boolean: "boolean",
73
- array: "niz",
74
- object: "objekt",
75
- set: "skup",
76
- file: "datoteka",
77
- date: "datum",
78
- bigint: "bigint",
79
- symbol: "simbol",
80
- undefined: "undefined",
81
- null: "null",
82
- function: "funkcija",
83
- map: "mapa",
84
- };
85
- return (issue) => {
86
- switch (issue.code) {
87
- case "invalid_type": {
88
- const expected = TypeDictionary[issue.expected] ?? issue.expected;
89
- const receivedType = util.parsedType(issue.input);
90
- const received = TypeDictionary[receivedType] ?? receivedType;
91
- if (/^[A-Z]/.test(issue.expected)) {
92
- return `Neispravan unos: očekuje se instanceof ${issue.expected}, a primljeno je ${received}`;
93
- }
94
- return `Neispravan unos: očekuje se ${expected}, a primljeno je ${received}`;
95
- }
96
- case "invalid_value":
97
- if (issue.values.length === 1)
98
- return `Neispravna vrijednost: očekivano ${util.stringifyPrimitive(issue.values[0])}`;
99
- return `Neispravna opcija: očekivano jedno od ${util.joinValues(issue.values, "|")}`;
100
- case "too_big": {
101
- const adj = issue.inclusive ? "<=" : "<";
102
- const sizing = getSizing(issue.origin);
103
- const origin = TypeDictionary[issue.origin] ?? issue.origin;
104
- if (sizing)
105
- return `Preveliko: očekivano da ${origin ?? "vrijednost"} ima ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
106
- return `Preveliko: očekivano da ${origin ?? "vrijednost"} bude ${adj}${issue.maximum.toString()}`;
107
- }
108
- case "too_small": {
109
- const adj = issue.inclusive ? ">=" : ">";
110
- const sizing = getSizing(issue.origin);
111
- const origin = TypeDictionary[issue.origin] ?? issue.origin;
112
- if (sizing) {
113
- return `Premalo: očekivano da ${origin} ima ${adj}${issue.minimum.toString()} ${sizing.unit}`;
114
- }
115
- return `Premalo: očekivano da ${origin} bude ${adj}${issue.minimum.toString()}`;
116
- }
117
- case "invalid_format": {
118
- const _issue = issue;
119
- if (_issue.format === "starts_with")
120
- return `Neispravan tekst: mora započinjati s "${_issue.prefix}"`;
121
- if (_issue.format === "ends_with")
122
- return `Neispravan tekst: mora završavati s "${_issue.suffix}"`;
123
- if (_issue.format === "includes")
124
- return `Neispravan tekst: mora sadržavati "${_issue.includes}"`;
125
- if (_issue.format === "regex")
126
- return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
127
- return `Neispravna ${FormatDictionary[_issue.format] ?? issue.format}`;
128
- }
129
- case "not_multiple_of":
130
- return `Neispravan broj: mora biti višekratnik od ${issue.divisor}`;
131
- case "unrecognized_keys":
132
- return `Neprepoznat${issue.keys.length > 1 ? "i ključevi" : " ključ"}: ${util.joinValues(issue.keys, ", ")}`;
133
- case "invalid_key":
134
- return `Neispravan ključ u ${TypeDictionary[issue.origin] ?? issue.origin}`;
135
- case "invalid_union":
136
- return "Neispravan unos";
137
- case "invalid_element":
138
- return `Neispravna vrijednost u ${TypeDictionary[issue.origin] ?? issue.origin}`;
139
- default:
140
- return `Neispravan unos`;
141
- }
142
- };
143
- };
144
- function default_1() {
145
- return {
146
- localeError: error(),
147
- };
148
- }
149
- module.exports = exports.default;