@clickhouse/client-common 1.20.0 → 1.21.0-head.68dd619.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.
Files changed (62) hide show
  1. package/README.md +11 -11
  2. package/dist/clickhouse_types.js +6 -6
  3. package/dist/clickhouse_types.js.map +1 -1
  4. package/dist/client.d.ts +19 -9
  5. package/dist/client.js +231 -43
  6. package/dist/client.js.map +1 -1
  7. package/dist/config.d.ts +54 -10
  8. package/dist/config.js +42 -38
  9. package/dist/config.js.map +1 -1
  10. package/dist/connection.d.ts +12 -8
  11. package/dist/data_formatter/format_query_params.js +21 -21
  12. package/dist/data_formatter/format_query_params.js.map +1 -1
  13. package/dist/data_formatter/format_query_settings.d.ts +1 -1
  14. package/dist/data_formatter/format_query_settings.js +4 -4
  15. package/dist/data_formatter/format_query_settings.js.map +1 -1
  16. package/dist/data_formatter/formatter.d.ts +2 -2
  17. package/dist/data_formatter/formatter.js +28 -28
  18. package/dist/data_formatter/formatter.js.map +1 -1
  19. package/dist/data_formatter/index.d.ts +3 -3
  20. package/dist/data_formatter/index.js.map +1 -1
  21. package/dist/error/error.js +18 -4
  22. package/dist/error/error.js.map +1 -1
  23. package/dist/error/index.d.ts +1 -1
  24. package/dist/error/index.js.map +1 -1
  25. package/dist/index.d.ts +21 -20
  26. package/dist/index.js +10 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/logger.d.ts +29 -14
  29. package/dist/logger.js +40 -27
  30. package/dist/logger.js.map +1 -1
  31. package/dist/parse/column_types.d.ts +10 -10
  32. package/dist/parse/column_types.js +97 -92
  33. package/dist/parse/column_types.js.map +1 -1
  34. package/dist/parse/index.d.ts +2 -2
  35. package/dist/parse/index.js.map +1 -1
  36. package/dist/parse/json_handling.js.map +1 -1
  37. package/dist/result.d.ts +4 -4
  38. package/dist/settings.d.ts +47 -30
  39. package/dist/settings.js +1 -1
  40. package/dist/settings.js.map +1 -1
  41. package/dist/tracing.d.ts +146 -0
  42. package/dist/tracing.js +76 -0
  43. package/dist/tracing.js.map +1 -0
  44. package/dist/utils/connection.d.ts +1 -1
  45. package/dist/utils/connection.js +7 -7
  46. package/dist/utils/connection.js.map +1 -1
  47. package/dist/utils/index.d.ts +5 -4
  48. package/dist/utils/index.js +1 -0
  49. package/dist/utils/index.js.map +1 -1
  50. package/dist/utils/multipart.d.ts +34 -0
  51. package/dist/utils/multipart.js +81 -0
  52. package/dist/utils/multipart.js.map +1 -0
  53. package/dist/utils/sleep.js.map +1 -1
  54. package/dist/utils/stream.js +4 -4
  55. package/dist/utils/stream.js.map +1 -1
  56. package/dist/utils/url.d.ts +5 -2
  57. package/dist/utils/url.js +21 -16
  58. package/dist/utils/url.js.map +1 -1
  59. package/dist/version.d.ts +1 -1
  60. package/dist/version.js +1 -1
  61. package/dist/version.js.map +1 -1
  62. package/package.json +1 -1
@@ -7,23 +7,23 @@ exports.isSupportedRawFormat = isSupportedRawFormat;
7
7
  exports.validateStreamFormat = validateStreamFormat;
8
8
  exports.encodeJSON = encodeJSON;
9
9
  exports.StreamableJSONFormats = [
10
- 'JSONEachRow',
11
- 'JSONStringsEachRow',
12
- 'JSONCompactEachRow',
13
- 'JSONCompactStringsEachRow',
14
- 'JSONCompactEachRowWithNames',
15
- 'JSONCompactEachRowWithNamesAndTypes',
16
- 'JSONCompactStringsEachRowWithNames',
17
- 'JSONCompactStringsEachRowWithNamesAndTypes',
18
- 'JSONEachRowWithProgress',
10
+ "JSONEachRow",
11
+ "JSONStringsEachRow",
12
+ "JSONCompactEachRow",
13
+ "JSONCompactStringsEachRow",
14
+ "JSONCompactEachRowWithNames",
15
+ "JSONCompactEachRowWithNamesAndTypes",
16
+ "JSONCompactStringsEachRowWithNames",
17
+ "JSONCompactStringsEachRowWithNamesAndTypes",
18
+ "JSONEachRowWithProgress",
19
19
  ];
20
- exports.RecordsJSONFormats = ['JSONObjectEachRow'];
20
+ exports.RecordsJSONFormats = ["JSONObjectEachRow"];
21
21
  exports.SingleDocumentJSONFormats = [
22
- 'JSON',
23
- 'JSONStrings',
24
- 'JSONCompact',
25
- 'JSONCompactStrings',
26
- 'JSONColumnsWithMetadata',
22
+ "JSON",
23
+ "JSONStrings",
24
+ "JSONCompact",
25
+ "JSONCompactStrings",
26
+ "JSONColumnsWithMetadata",
27
27
  ];
28
28
  exports.SupportedJSONFormats = [
29
29
  ...exports.RecordsJSONFormats,
@@ -31,17 +31,17 @@ exports.SupportedJSONFormats = [
31
31
  ...exports.StreamableJSONFormats,
32
32
  ];
33
33
  exports.SupportedRawFormats = [
34
- 'CSV',
35
- 'CSVWithNames',
36
- 'CSVWithNamesAndTypes',
37
- 'TabSeparated',
38
- 'TabSeparatedRaw',
39
- 'TabSeparatedWithNames',
40
- 'TabSeparatedWithNamesAndTypes',
41
- 'CustomSeparated',
42
- 'CustomSeparatedWithNames',
43
- 'CustomSeparatedWithNamesAndTypes',
44
- 'Parquet',
34
+ "CSV",
35
+ "CSVWithNames",
36
+ "CSVWithNamesAndTypes",
37
+ "TabSeparated",
38
+ "TabSeparatedRaw",
39
+ "TabSeparatedWithNames",
40
+ "TabSeparatedWithNamesAndTypes",
41
+ "CustomSeparated",
42
+ "CustomSeparatedWithNames",
43
+ "CustomSeparatedWithNamesAndTypes",
44
+ "Parquet",
45
45
  ];
46
46
  exports.StreamableFormats = [
47
47
  ...exports.StreamableJSONFormats,
@@ -59,7 +59,7 @@ function isSupportedRawFormat(dataFormat) {
59
59
  }
60
60
  function validateStreamFormat(format) {
61
61
  if (!exports.StreamableFormats.includes(format)) {
62
- throw new Error(`${format} format is not streamable. Streamable formats: ${exports.StreamableFormats.join(',')}`);
62
+ throw new Error(`${format} format is not streamable. Streamable formats: ${exports.StreamableFormats.join(",")}`);
63
63
  }
64
64
  return true;
65
65
  }
@@ -71,7 +71,7 @@ function validateStreamFormat(format) {
71
71
  */
72
72
  function encodeJSON(value, format, stringifyFn) {
73
73
  if (exports.SupportedJSONFormats.includes(format)) {
74
- return stringifyFn(value) + '\n';
74
+ return stringifyFn(value) + "\n";
75
75
  }
76
76
  throw new Error(`The client does not support JSON encoding in [${format}] format.`);
77
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../src/data_formatter/formatter.ts"],"names":[],"mappings":";;;AA8EA,8DAOC;AAED,wDAIC;AAED,oDAEC;AAED,oDAWC;AAQD,gCAWC;AA7HY,QAAA,qBAAqB,GAAG;IACnC,aAAa;IACb,oBAAoB;IACpB,oBAAoB;IACpB,2BAA2B;IAC3B,6BAA6B;IAC7B,qCAAqC;IACrC,oCAAoC;IACpC,4CAA4C;IAC5C,yBAAyB;CACjB,CAAA;AACG,QAAA,kBAAkB,GAAG,CAAC,mBAAmB,CAAU,CAAA;AACnD,QAAA,yBAAyB,GAAG;IACvC,MAAM;IACN,aAAa;IACb,aAAa;IACb,oBAAoB;IACpB,yBAAyB;CACjB,CAAA;AACG,QAAA,oBAAoB,GAAG;IAClC,GAAG,0BAAkB;IACrB,GAAG,iCAAyB;IAC5B,GAAG,6BAAqB;CAChB,CAAA;AACG,QAAA,mBAAmB,GAAG;IACjC,KAAK;IACL,cAAc;IACd,sBAAsB;IACtB,cAAc;IACd,iBAAiB;IACjB,uBAAuB;IACvB,+BAA+B;IAC/B,iBAAiB;IACjB,0BAA0B;IAC1B,kCAAkC;IAClC,SAAS;CACD,CAAA;AACG,QAAA,iBAAiB,GAAG;IAC/B,GAAG,6BAAqB;IACxB,GAAG,2BAAmB;CACd,CAAA;AAoCV,SAAgB,yBAAyB,CACvC,MAAkB;IAElB,OAAO,CACJ,iCAA+C,CAAC,QAAQ,CAAC,MAAM,CAAC;QAChE,0BAAwC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAC3D,CAAA;AACH,CAAC;AAED,SAAgB,sBAAsB,CACpC,MAAkB;IAElB,OAAQ,6BAA2C,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;AACtE,CAAC;AAED,SAAgB,oBAAoB,CAAC,UAAsB;IACzD,OAAQ,2BAAyC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;AACxE,CAAC;AAED,SAAgB,oBAAoB,CAClC,MAAW;IAEX,IAAI,CAAC,yBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CACb,GAAG,MAAM,kDAAkD,yBAAiB,CAAC,IAAI,CAC/E,GAAG,CACJ,EAAE,CACJ,CAAA;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC;AAED;;;;;GAKG;AACH,SAAgB,UAAU,CACxB,KAAU,EACV,MAAkB,EAClB,WAAsC;IAEtC,IAAK,4BAA0C,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACjE,OAAO,WAAW,CAAC,KAAK,CAAC,GAAG,IAAI,CAAA;IAClC,CAAC;IACD,MAAM,IAAI,KAAK,CACb,iDAAiD,MAAM,WAAW,CACnE,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"formatter.js","sourceRoot":"","sources":["../../src/data_formatter/formatter.ts"],"names":[],"mappings":";;;AA8EA,8DAOC;AAED,wDAIC;AAED,oDAEC;AAED,oDAWC;AAQD,gCAWC;AA7HY,QAAA,qBAAqB,GAAG;IACnC,aAAa;IACb,oBAAoB;IACpB,oBAAoB;IACpB,2BAA2B;IAC3B,6BAA6B;IAC7B,qCAAqC;IACrC,oCAAoC;IACpC,4CAA4C;IAC5C,yBAAyB;CACjB,CAAC;AACE,QAAA,kBAAkB,GAAG,CAAC,mBAAmB,CAAU,CAAC;AACpD,QAAA,yBAAyB,GAAG;IACvC,MAAM;IACN,aAAa;IACb,aAAa;IACb,oBAAoB;IACpB,yBAAyB;CACjB,CAAC;AACE,QAAA,oBAAoB,GAAG;IAClC,GAAG,0BAAkB;IACrB,GAAG,iCAAyB;IAC5B,GAAG,6BAAqB;CAChB,CAAC;AACE,QAAA,mBAAmB,GAAG;IACjC,KAAK;IACL,cAAc;IACd,sBAAsB;IACtB,cAAc;IACd,iBAAiB;IACjB,uBAAuB;IACvB,+BAA+B;IAC/B,iBAAiB;IACjB,0BAA0B;IAC1B,kCAAkC;IAClC,SAAS;CACD,CAAC;AACE,QAAA,iBAAiB,GAAG;IAC/B,GAAG,6BAAqB;IACxB,GAAG,2BAAmB;CACd,CAAC;AAoCX,SAAgB,yBAAyB,CACvC,MAAkB;IAElB,OAAO,CACJ,iCAA+C,CAAC,QAAQ,CAAC,MAAM,CAAC;QAChE,0BAAwC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAC3D,CAAC;AACJ,CAAC;AAED,SAAgB,sBAAsB,CACpC,MAAkB;IAElB,OAAQ,6BAA2C,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACvE,CAAC;AAED,SAAgB,oBAAoB,CAAC,UAAsB;IACzD,OAAQ,2BAAyC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;AACzE,CAAC;AAED,SAAgB,oBAAoB,CAClC,MAAW;IAEX,IAAI,CAAC,yBAAiB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CACb,GAAG,MAAM,kDAAkD,yBAAiB,CAAC,IAAI,CAC/E,GAAG,CACJ,EAAE,CACJ,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,SAAgB,UAAU,CACxB,KAAU,EACV,MAAkB,EAClB,WAAsC;IAEtC,IAAK,4BAA0C,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACjE,OAAO,WAAW,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;IACnC,CAAC;IACD,MAAM,IAAI,KAAK,CACb,iDAAiD,MAAM,WAAW,CACnE,CAAC;AACJ,CAAC"}
@@ -1,3 +1,3 @@
1
- export * from './formatter';
2
- export { TupleParam, formatQueryParams } from './format_query_params';
3
- export { formatQuerySettings } from './format_query_settings';
1
+ export * from "./formatter";
2
+ export { TupleParam, formatQueryParams } from "./format_query_params";
3
+ export { formatQuerySettings } from "./format_query_settings";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/data_formatter/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,6DAAqE;AAA5D,iHAAA,UAAU,OAAA;AAAE,wHAAA,iBAAiB,OAAA;AACtC,iEAA6D;AAApD,4HAAA,mBAAmB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/data_formatter/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,6DAAsE;AAA7D,iHAAA,UAAU,OAAA;AAAE,wHAAA,iBAAiB,OAAA;AACtC,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA"}
@@ -4,7 +4,21 @@ exports.ClickHouseError = void 0;
4
4
  exports.parseError = parseError;
5
5
  exports.getCurrentStackTrace = getCurrentStackTrace;
6
6
  exports.enhanceStackTrace = enhanceStackTrace;
7
- const errorRe = /(Code|Error): (?<code>\d+).*Exception: (?<message>.+)\((?<type>(?=.+[A-Z]{3})[A-Z0-9_]+?)\)/s;
7
+ // In cluster mode, the server wraps the original exception, repeating the
8
+ // `Code`/`Exception`/`(TYPE)` markers, e.g.:
9
+ // Code: 57. DB::Exception: There was an error on [host:9000]: Code: 57. DB::Exception: <message>. (TABLE_ALREADY_EXISTS) (version ...). (TABLE_ALREADY_EXISTS) (version ...)
10
+ // The leading `.*Exception: ` is greedy so we anchor on the innermost (last)
11
+ // exception, while `(?<message>.+?)` is lazy so the message stops at the first
12
+ // `(TYPE)` marker rather than swallowing the repeated suffixes. The type
13
+ // lookahead requires at least three consecutive uppercase letters so that
14
+ // parenthesised groups like `(2)` or `(official build)` are not mistaken for it.
15
+ //
16
+ // NOTE: In normal usage, the string fed to `parseError` comes from ClickHouse,
17
+ // but it may still include user-controlled fragments (e.g. parts of a query) or
18
+ // even non-ClickHouse payloads (proxy/HTML errors) when parsing failed requests.
19
+ // Keep this regex simple to avoid excessive backtracking on large/unexpected input.
20
+ // (If this ever becomes a concern, consider a non-regex parser or input length limits.)
21
+ const errorRe = /(Code|Error): (?<code>\d+).*Exception: (?<message>.+?)\((?<type>(?=[A-Z0-9_]*[A-Z]{3})[A-Z0-9_]+)\)/s;
8
22
  /** An error that is thrown by the ClickHouse server. */
9
23
  class ClickHouseError extends Error {
10
24
  code;
@@ -36,20 +50,20 @@ function parseError(input) {
36
50
  function getCurrentStackTrace() {
37
51
  const stack = new Error().stack;
38
52
  if (!stack)
39
- return '';
53
+ return "";
40
54
  // Skip the first three lines of the stack trace, containing useless information
41
55
  // - Text `Error`
42
56
  // - Info about this function call
43
57
  // - Info about the originator of this function call, e.g., `request`
44
58
  // Additionally, the original stack trace is, in fact, reversed.
45
- return stack.split('\n').slice(3).reverse().join('\n');
59
+ return stack.split("\n").slice(3).reverse().join("\n");
46
60
  }
47
61
  /** Having the stack trace produced by the {@link getCurrentStackTrace} function,
48
62
  * add it to an arbitrary error stack trace. No-op if there is no additional stack trace to add.
49
63
  * It could happen if this feature was disabled due to its performance overhead. */
50
64
  function enhanceStackTrace(err, stackTrace) {
51
65
  if (err.stack && stackTrace) {
52
- const firstNewlineIndex = err.stack.indexOf('\n');
66
+ const firstNewlineIndex = err.stack.indexOf("\n");
53
67
  const firstLine = err.stack.substring(0, firstNewlineIndex);
54
68
  const errStack = err.stack.substring(firstNewlineIndex + 1);
55
69
  err.stack = `${firstLine}\n${stackTrace}\n${errStack}`;
@@ -1 +1 @@
1
- {"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/error/error.ts"],"names":[],"mappings":";;;AAwBA,gCAUC;AAID,oDAUC;AAKD,8CAWC;AAhED,MAAM,OAAO,GACX,8FAA8F,CAAA;AAQhG,wDAAwD;AACxD,MAAa,eAAgB,SAAQ,KAAK;IAC/B,IAAI,CAAQ;IACZ,IAAI,CAAoB;IACjC,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAyB;QAC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KAAK,QAAQ,EAAE,CAAC;IACzD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1 +1 @@
1
- export * from './error';
1
+ export * from "./error";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/error/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/error/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB"}
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /** Should be re-exported by the implementation */
2
2
  export { type BaseQueryParams, type QueryParams, type QueryResult, type ExecParams, type InsertParams,
3
3
  /** @deprecated Import `ClickHouseClient` from `@clickhouse/client` instead. In Web projects, use `import type { ClickHouseClient } from '@clickhouse/client-web'`. Importing it from `@clickhouse/client-common` is deprecated. */
4
- ClickHouseClient, type CommandParams, type CommandResult, type ExecResult, type InsertResult, type PingResult, type PingParams, type PingParamsWithSelectQuery, type PingParamsWithEndpoint, } from './client';
5
- export { type BaseClickHouseClientConfigOptions } from './config';
6
- export type { Row, RowOrProgress, BaseResultSet, ResultJSONType, RowJSONType, ResultStream, } from './result';
7
- export type { DataFormat, RawDataFormat, JSONDataFormat, StreamableDataFormat, StreamableJSONDataFormat, SingleDocumentJSONFormat, } from './data_formatter';
4
+ ClickHouseClient, type CommandParams, type CommandResult, type ExecResult, type InsertResult, type PingResult, type PingParams, type PingParamsWithSelectQuery, type PingParamsWithEndpoint, } from "./client";
5
+ export { type BaseClickHouseClientConfigOptions } from "./config";
6
+ export type { Row, RowOrProgress, BaseResultSet, ResultJSONType, RowJSONType, ResultStream, } from "./result";
7
+ export type { DataFormat, RawDataFormat, JSONDataFormat, StreamableDataFormat, StreamableJSONDataFormat, SingleDocumentJSONFormat, } from "./data_formatter";
8
8
  export {
9
9
  /** @deprecated Import `SupportedJSONFormats` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
10
10
  SupportedJSONFormats,
@@ -19,40 +19,41 @@ SingleDocumentJSONFormats,
19
19
  /** @deprecated Import `RecordsJSONFormats` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
20
20
  RecordsJSONFormats,
21
21
  /** @deprecated Import `TupleParam` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
22
- TupleParam, } from './data_formatter';
22
+ TupleParam, } from "./data_formatter";
23
23
  export {
24
24
  /** @deprecated Import `ClickHouseError` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
25
25
  ClickHouseError,
26
26
  /** @deprecated Import `parseError` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
27
- parseError, } from './error';
27
+ parseError, } from "./error";
28
28
  export {
29
29
  /** @deprecated Import `ClickHouseLogLevel` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
30
- ClickHouseLogLevel, type ErrorLogParams, type WarnLogParams, type Logger, type LogParams, } from './logger';
31
- export type { ClickHouseSummary, InputJSON, InputJSONObjectEachRow, ResponseJSON, ResponseHeaders, WithClickHouseSummary, WithResponseHeaders, ProgressRow, InsertValues, ClickHouseAuth, ClickHouseJWTAuth, ClickHouseCredentialsAuth, } from './clickhouse_types';
30
+ ClickHouseLogLevel, type ErrorLogParams, type WarnLogParams, type Logger, type LogParams, } from "./logger";
31
+ export type { ClickHouseSummary, InputJSON, InputJSONObjectEachRow, ResponseJSON, ResponseHeaders, WithClickHouseSummary, WithResponseHeaders, ProgressRow, InsertValues, ClickHouseAuth, ClickHouseJWTAuth, ClickHouseCredentialsAuth, } from "./clickhouse_types";
32
32
  export {
33
33
  /** @deprecated Import `isProgressRow` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
34
34
  isProgressRow,
35
35
  /** @deprecated Import `isRow` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
36
36
  isRow,
37
37
  /** @deprecated Import `isException` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
38
- isException, } from './clickhouse_types';
38
+ isException, } from "./clickhouse_types";
39
39
  export { type ClickHouseSettings, type MergeTreeSettings,
40
40
  /** @deprecated Import `SettingsMap` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
41
- SettingsMap, } from './settings';
42
- export type { SimpleColumnType, ParsedColumnSimple, ParsedColumnEnum, ParsedColumnFixedString, ParsedColumnNullable, ParsedColumnDecimal, ParsedColumnDateTime, ParsedColumnDateTime64, ParsedColumnArray, ParsedColumnTuple, ParsedColumnMap, ParsedColumnType, JSONHandling, } from './parse';
41
+ SettingsMap, } from "./settings";
42
+ export type { SimpleColumnType, ParsedColumnSimple, ParsedColumnEnum, ParsedColumnFixedString, ParsedColumnNullable, ParsedColumnDecimal, ParsedColumnDateTime, ParsedColumnDateTime64, ParsedColumnArray, ParsedColumnTuple, ParsedColumnMap, ParsedColumnType, JSONHandling, } from "./parse";
43
43
  export {
44
44
  /** @deprecated Import `SimpleColumnTypes` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
45
45
  SimpleColumnTypes,
46
46
  /** @deprecated Import `parseColumnType` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
47
47
  parseColumnType,
48
48
  /** @deprecated Import `defaultJSONHandling` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
49
- defaultJSONHandling, } from './parse';
49
+ defaultJSONHandling, } from "./parse";
50
+ export { type ClickHouseTracer, type ClickHouseSpan, type ClickHouseSpanOptions, type ClickHouseSpanAttributes, type ClickHouseSpanStatus, type ClickHouseSpanName, ClickHouseSpanStatusCode, ClickHouseSpanKind, ClickHouseSpanNames, recordSpanError, } from "./tracing";
50
51
  /** For implementation usage only - should not be re-exported */
51
- export { formatQuerySettings, formatQueryParams, encodeJSON, isSupportedRawFormat, isStreamableJSONFamily, isNotStreamableJSONFamily, validateStreamFormat, } from './data_formatter';
52
- export { type ValuesEncoder, type MakeResultSet, type MakeConnection, type HandleImplSpecificURLParams, type ImplementationDetails, booleanConfigURLValue, enumConfigURLValue, getConnectionParams, numberConfigURLValue, } from './config';
53
- export { EXCEPTION_TAG_HEADER_NAME, isSuccessfulResponse, sleep, toSearchParams, transformUrl, withCompressionHeaders, withHttpSettings, isCredentialsAuth, isJWTAuth, extractErrorAtTheEndOfChunk, CARET_RETURN, } from './utils';
54
- export { LogWriter, DefaultLogger, type LogWriterParams } from './logger';
55
- export { getCurrentStackTrace, enhanceStackTrace } from './error';
56
- export type { CompressionSettings, Connection, ConnectionParams, ConnInsertResult, ConnExecParams, ConnExecResult, ConnQueryResult, ConnBaseQueryParams, ConnBaseResult, ConnInsertParams, ConnPingResult, ConnCommandResult, ConnOperation, ConnPingParams, } from './connection';
57
- export type { QueryParamsWithFormat } from './client';
58
- export type { IsSame } from './ts_utils';
52
+ export { formatQuerySettings, formatQueryParams, encodeJSON, isSupportedRawFormat, isStreamableJSONFamily, isNotStreamableJSONFamily, validateStreamFormat, } from "./data_formatter";
53
+ export { type ValuesEncoder, type MakeResultSet, type MakeConnection, type HandleImplSpecificURLParams, type ImplementationDetails, booleanConfigURLValue, enumConfigURLValue, getConnectionParams, numberConfigURLValue, } from "./config";
54
+ export { EXCEPTION_TAG_HEADER_NAME, isSuccessfulResponse, sleep, buildMultipartBody, MAX_URL_BIND_PARAM_LENGTH, serializeQueryParamsForUrl, toSearchParams, transformUrl, withCompressionHeaders, withHttpSettings, isCredentialsAuth, isJWTAuth, extractErrorAtTheEndOfChunk, CARET_RETURN, } from "./utils";
55
+ export { LogWriter, DefaultLogger, type LogWriterParams } from "./logger";
56
+ export { getCurrentStackTrace, enhanceStackTrace } from "./error";
57
+ export type { CompressionSettings, Connection, ConnectionParams, ConnInsertResult, ConnExecParams, ConnExecResult, ConnQueryResult, ConnBaseQueryParams, ConnBaseResult, ConnInsertParams, ConnPingResult, ConnCommandResult, ConnOperation, ConnPingParams, } from "./connection";
58
+ export type { QueryParamsWithFormat } from "./client";
59
+ export type { IsSame } from "./ts_utils";
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.enhanceStackTrace = exports.getCurrentStackTrace = exports.DefaultLogger = exports.LogWriter = exports.CARET_RETURN = exports.extractErrorAtTheEndOfChunk = exports.isJWTAuth = exports.isCredentialsAuth = exports.withHttpSettings = exports.withCompressionHeaders = exports.transformUrl = exports.toSearchParams = exports.sleep = exports.isSuccessfulResponse = exports.EXCEPTION_TAG_HEADER_NAME = exports.numberConfigURLValue = exports.getConnectionParams = exports.enumConfigURLValue = exports.booleanConfigURLValue = exports.validateStreamFormat = exports.isNotStreamableJSONFamily = exports.isStreamableJSONFamily = exports.isSupportedRawFormat = exports.encodeJSON = exports.formatQueryParams = exports.formatQuerySettings = exports.defaultJSONHandling = exports.parseColumnType = exports.SimpleColumnTypes = exports.SettingsMap = exports.isException = exports.isRow = exports.isProgressRow = exports.ClickHouseLogLevel = exports.parseError = exports.ClickHouseError = exports.TupleParam = exports.RecordsJSONFormats = exports.SingleDocumentJSONFormats = exports.StreamableJSONFormats = exports.StreamableFormats = exports.SupportedRawFormats = exports.SupportedJSONFormats = exports.ClickHouseClient = void 0;
3
+ exports.getCurrentStackTrace = exports.DefaultLogger = exports.LogWriter = exports.CARET_RETURN = exports.extractErrorAtTheEndOfChunk = exports.isJWTAuth = exports.isCredentialsAuth = exports.withHttpSettings = exports.withCompressionHeaders = exports.transformUrl = exports.toSearchParams = exports.serializeQueryParamsForUrl = exports.MAX_URL_BIND_PARAM_LENGTH = exports.buildMultipartBody = exports.sleep = exports.isSuccessfulResponse = exports.EXCEPTION_TAG_HEADER_NAME = exports.numberConfigURLValue = exports.getConnectionParams = exports.enumConfigURLValue = exports.booleanConfigURLValue = exports.validateStreamFormat = exports.isNotStreamableJSONFamily = exports.isStreamableJSONFamily = exports.isSupportedRawFormat = exports.encodeJSON = exports.formatQueryParams = exports.formatQuerySettings = exports.recordSpanError = exports.ClickHouseSpanNames = exports.ClickHouseSpanKind = exports.ClickHouseSpanStatusCode = exports.defaultJSONHandling = exports.parseColumnType = exports.SimpleColumnTypes = exports.SettingsMap = exports.isException = exports.isRow = exports.isProgressRow = exports.ClickHouseLogLevel = exports.parseError = exports.ClickHouseError = exports.TupleParam = exports.RecordsJSONFormats = exports.SingleDocumentJSONFormats = exports.StreamableJSONFormats = exports.StreamableFormats = exports.SupportedRawFormats = exports.SupportedJSONFormats = exports.ClickHouseClient = void 0;
4
+ exports.enhanceStackTrace = void 0;
4
5
  /** Should be re-exported by the implementation */
5
6
  var client_1 = require("./client");
6
7
  /** @deprecated Import `ClickHouseClient` from `@clickhouse/client` instead. In Web projects, use `import type { ClickHouseClient } from '@clickhouse/client-web'`. Importing it from `@clickhouse/client-common` is deprecated. */
@@ -45,6 +46,11 @@ Object.defineProperty(exports, "SimpleColumnTypes", { enumerable: true, get: fun
45
46
  Object.defineProperty(exports, "parseColumnType", { enumerable: true, get: function () { return parse_1.parseColumnType; } });
46
47
  /** @deprecated Import `defaultJSONHandling` from `@clickhouse/client` (Node.js) or `@clickhouse/client-web` (Web) instead. Importing it from `@clickhouse/client-common` is deprecated. */
47
48
  Object.defineProperty(exports, "defaultJSONHandling", { enumerable: true, get: function () { return parse_1.defaultJSONHandling; } });
49
+ var tracing_1 = require("./tracing");
50
+ Object.defineProperty(exports, "ClickHouseSpanStatusCode", { enumerable: true, get: function () { return tracing_1.ClickHouseSpanStatusCode; } });
51
+ Object.defineProperty(exports, "ClickHouseSpanKind", { enumerable: true, get: function () { return tracing_1.ClickHouseSpanKind; } });
52
+ Object.defineProperty(exports, "ClickHouseSpanNames", { enumerable: true, get: function () { return tracing_1.ClickHouseSpanNames; } });
53
+ Object.defineProperty(exports, "recordSpanError", { enumerable: true, get: function () { return tracing_1.recordSpanError; } });
48
54
  /** For implementation usage only - should not be re-exported */
49
55
  var data_formatter_2 = require("./data_formatter");
50
56
  Object.defineProperty(exports, "formatQuerySettings", { enumerable: true, get: function () { return data_formatter_2.formatQuerySettings; } });
@@ -63,6 +69,9 @@ var utils_1 = require("./utils");
63
69
  Object.defineProperty(exports, "EXCEPTION_TAG_HEADER_NAME", { enumerable: true, get: function () { return utils_1.EXCEPTION_TAG_HEADER_NAME; } });
64
70
  Object.defineProperty(exports, "isSuccessfulResponse", { enumerable: true, get: function () { return utils_1.isSuccessfulResponse; } });
65
71
  Object.defineProperty(exports, "sleep", { enumerable: true, get: function () { return utils_1.sleep; } });
72
+ Object.defineProperty(exports, "buildMultipartBody", { enumerable: true, get: function () { return utils_1.buildMultipartBody; } });
73
+ Object.defineProperty(exports, "MAX_URL_BIND_PARAM_LENGTH", { enumerable: true, get: function () { return utils_1.MAX_URL_BIND_PARAM_LENGTH; } });
74
+ Object.defineProperty(exports, "serializeQueryParamsForUrl", { enumerable: true, get: function () { return utils_1.serializeQueryParamsForUrl; } });
66
75
  Object.defineProperty(exports, "toSearchParams", { enumerable: true, get: function () { return utils_1.toSearchParams; } });
67
76
  Object.defineProperty(exports, "transformUrl", { enumerable: true, get: function () { return utils_1.transformUrl; } });
68
77
  Object.defineProperty(exports, "withCompressionHeaders", { enumerable: true, get: function () { return utils_1.withCompressionHeaders; } });
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src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 module, message, args, err }: WarnLogParams): void;
24
24
  error({ module, message, args, err }: ErrorLogParams): void;
25
25
  }
26
- export type LogWriterParams<Method extends keyof Logger> = Omit<Parameters<Logger[Method]>[0], 'module'> & {
26
+ export type LogWriterParams<Method extends keyof Logger> = Omit<Parameters<Logger[Method]>[0], "module"> & {
27
27
  module?: string;
28
28
  };
29
29
  export declare class LogWriter {
@@ -31,35 +31,50 @@ export declare class LogWriter {
31
31
  private readonly module;
32
32
  private readonly logLevel;
33
33
  constructor(logger: Logger, module: string, logLevel: ClickHouseLogLevel);
34
- trace(params: LogWriterParams<'trace'>): void;
35
- debug(params: LogWriterParams<'debug'>): void;
36
- info(params: LogWriterParams<'info'>): void;
37
- warn(params: LogWriterParams<'warn'>): void;
38
- error(params: LogWriterParams<'error'>): void;
34
+ trace(params: LogWriterParams<"trace">): void;
35
+ debug(params: LogWriterParams<"debug">): void;
36
+ info(params: LogWriterParams<"info">): void;
37
+ warn(params: LogWriterParams<"warn">): void;
38
+ error(params: LogWriterParams<"error">): void;
39
39
  }
40
- export declare enum ClickHouseLogLevel {
40
+ /**
41
+ * Mimics the runtime shape of a numeric TypeScript `enum`: an object with both
42
+ * forward (`Name -> number`) and reverse (`number -> Name`) mappings. This
43
+ * preserves backwards compatibility with the previous `enum ClickHouseLogLevel`
44
+ * — both `ClickHouseLogLevel.TRACE` (returns `0`) and `ClickHouseLogLevel[0]`
45
+ * (returns `'TRACE'`) continue to work — while staying compatible with the
46
+ * `--erasableSyntaxOnly` TypeScript option (no TS `enum` declaration).
47
+ */
48
+ export declare const ClickHouseLogLevel: {
41
49
  /**
42
50
  * A fine-grained debugging event. Might produce a lot of logs, so use with caution.
43
51
  */
44
- TRACE = 0,
52
+ readonly TRACE: 0;
45
53
  /**
46
54
  * A debugging event. Useful for debugging, but generally not needed in production. Includes technical values that might require redacting.
47
55
  */
48
- DEBUG = 1,
56
+ readonly DEBUG: 1;
49
57
  /**
50
58
  * An informational event. Indicates that an event happened.
51
59
  */
52
- INFO = 2,
60
+ readonly INFO: 2;
53
61
  /**
54
62
  * A warning event. Not an error, but is likely more important than an informational event. Addressing should help prevent potential issues.
55
63
  */
56
- WARN = 3,
64
+ readonly WARN: 3;
57
65
  /**
58
66
  * An error event. Something went wrong.
59
67
  */
60
- ERROR = 4,
68
+ readonly ERROR: 4;
61
69
  /**
62
70
  * Logging is turned off.
63
71
  */
64
- OFF = 127
65
- }
72
+ readonly OFF: 127;
73
+ readonly 0: "TRACE";
74
+ readonly 1: "DEBUG";
75
+ readonly 2: "INFO";
76
+ readonly 3: "WARN";
77
+ readonly 4: "ERROR";
78
+ readonly 127: "OFF";
79
+ };
80
+ export type ClickHouseLogLevel = 0 | 1 | 2 | 3 | 4 | 127;
package/dist/logger.js CHANGED
@@ -4,51 +4,51 @@ exports.ClickHouseLogLevel = exports.LogWriter = exports.DefaultLogger = void 0;
4
4
  class DefaultLogger {
5
5
  trace({ module, message, args }) {
6
6
  const params = [
7
- formatMessage({ module, message, level: 'TRACE' }),
7
+ formatMessage({ module, message, level: "TRACE" }),
8
8
  ];
9
9
  if (args) {
10
- params.push('\nArguments:', args);
10
+ params.push("\nArguments:", args);
11
11
  }
12
12
  console.debug(...params);
13
13
  }
14
14
  debug({ module, message, args }) {
15
15
  const params = [
16
- formatMessage({ module, message, level: 'DEBUG' }),
16
+ formatMessage({ module, message, level: "DEBUG" }),
17
17
  ];
18
18
  if (args) {
19
- params.push('\nArguments:', args);
19
+ params.push("\nArguments:", args);
20
20
  }
21
21
  console.debug(...params);
22
22
  }
23
23
  info({ module, message, args }) {
24
24
  const params = [
25
- formatMessage({ module, message, level: 'INFO' }),
25
+ formatMessage({ module, message, level: "INFO" }),
26
26
  ];
27
27
  if (args) {
28
- params.push('\nArguments:', args);
28
+ params.push("\nArguments:", args);
29
29
  }
30
30
  console.info(...params);
31
31
  }
32
32
  warn({ module, message, args, err }) {
33
33
  const params = [
34
- formatMessage({ module, message, level: 'WARN' }),
34
+ formatMessage({ module, message, level: "WARN" }),
35
35
  ];
36
36
  if (args) {
37
- params.push('\nArguments:', args);
37
+ params.push("\nArguments:", args);
38
38
  }
39
39
  if (err) {
40
- params.push('\nCaused by:', err);
40
+ params.push("\nCaused by:", err);
41
41
  }
42
42
  console.warn(...params);
43
43
  }
44
44
  error({ module, message, args, err }) {
45
45
  const params = [
46
- formatMessage({ module, message, level: 'ERROR' }),
46
+ formatMessage({ module, message, level: "ERROR" }),
47
47
  ];
48
48
  if (args) {
49
- params.push('\nArguments:', args);
49
+ params.push("\nArguments:", args);
50
50
  }
51
- params.push('\nCaused by:', err);
51
+ params.push("\nCaused by:", err);
52
52
  console.error(...params);
53
53
  }
54
54
  }
@@ -62,11 +62,11 @@ class LogWriter {
62
62
  this.module = module;
63
63
  this.logLevel = logLevel;
64
64
  this.info({
65
- message: `Log level is set to ${ClickHouseLogLevel[this.logLevel]}`,
65
+ message: `Log level is set to ${exports.ClickHouseLogLevel[this.logLevel]}`,
66
66
  });
67
67
  }
68
68
  trace(params) {
69
- if (this.logLevel <= ClickHouseLogLevel.TRACE) {
69
+ if (this.logLevel <= exports.ClickHouseLogLevel.TRACE) {
70
70
  this.logger.trace({
71
71
  ...params,
72
72
  module: params.module ?? this.module,
@@ -74,7 +74,7 @@ class LogWriter {
74
74
  }
75
75
  }
76
76
  debug(params) {
77
- if (this.logLevel <= ClickHouseLogLevel.DEBUG) {
77
+ if (this.logLevel <= exports.ClickHouseLogLevel.DEBUG) {
78
78
  this.logger.debug({
79
79
  ...params,
80
80
  module: params.module ?? this.module,
@@ -82,7 +82,7 @@ class LogWriter {
82
82
  }
83
83
  }
84
84
  info(params) {
85
- if (this.logLevel <= ClickHouseLogLevel.INFO) {
85
+ if (this.logLevel <= exports.ClickHouseLogLevel.INFO) {
86
86
  this.logger.info({
87
87
  ...params,
88
88
  module: params.module ?? this.module,
@@ -90,7 +90,7 @@ class LogWriter {
90
90
  }
91
91
  }
92
92
  warn(params) {
93
- if (this.logLevel <= ClickHouseLogLevel.WARN) {
93
+ if (this.logLevel <= exports.ClickHouseLogLevel.WARN) {
94
94
  this.logger.warn({
95
95
  ...params,
96
96
  module: params.module ?? this.module,
@@ -98,7 +98,7 @@ class LogWriter {
98
98
  }
99
99
  }
100
100
  error(params) {
101
- if (this.logLevel <= ClickHouseLogLevel.ERROR) {
101
+ if (this.logLevel <= exports.ClickHouseLogLevel.ERROR) {
102
102
  this.logger.error({
103
103
  ...params,
104
104
  module: params.module ?? this.module,
@@ -107,33 +107,46 @@ class LogWriter {
107
107
  }
108
108
  }
109
109
  exports.LogWriter = LogWriter;
110
- var ClickHouseLogLevel;
111
- (function (ClickHouseLogLevel) {
110
+ /**
111
+ * Mimics the runtime shape of a numeric TypeScript `enum`: an object with both
112
+ * forward (`Name -> number`) and reverse (`number -> Name`) mappings. This
113
+ * preserves backwards compatibility with the previous `enum ClickHouseLogLevel`
114
+ * — both `ClickHouseLogLevel.TRACE` (returns `0`) and `ClickHouseLogLevel[0]`
115
+ * (returns `'TRACE'`) continue to work — while staying compatible with the
116
+ * `--erasableSyntaxOnly` TypeScript option (no TS `enum` declaration).
117
+ */
118
+ exports.ClickHouseLogLevel = {
112
119
  /**
113
120
  * A fine-grained debugging event. Might produce a lot of logs, so use with caution.
114
121
  */
115
- ClickHouseLogLevel[ClickHouseLogLevel["TRACE"] = 0] = "TRACE";
122
+ TRACE: 0,
116
123
  /**
117
124
  * A debugging event. Useful for debugging, but generally not needed in production. Includes technical values that might require redacting.
118
125
  */
119
- ClickHouseLogLevel[ClickHouseLogLevel["DEBUG"] = 1] = "DEBUG";
126
+ DEBUG: 1,
120
127
  /**
121
128
  * An informational event. Indicates that an event happened.
122
129
  */
123
- ClickHouseLogLevel[ClickHouseLogLevel["INFO"] = 2] = "INFO";
130
+ INFO: 2,
124
131
  /**
125
132
  * A warning event. Not an error, but is likely more important than an informational event. Addressing should help prevent potential issues.
126
133
  */
127
- ClickHouseLogLevel[ClickHouseLogLevel["WARN"] = 3] = "WARN";
134
+ WARN: 3,
128
135
  /**
129
136
  * An error event. Something went wrong.
130
137
  */
131
- ClickHouseLogLevel[ClickHouseLogLevel["ERROR"] = 4] = "ERROR";
138
+ ERROR: 4,
132
139
  /**
133
140
  * Logging is turned off.
134
141
  */
135
- ClickHouseLogLevel[ClickHouseLogLevel["OFF"] = 127] = "OFF";
136
- })(ClickHouseLogLevel || (exports.ClickHouseLogLevel = ClickHouseLogLevel = {}));
142
+ OFF: 127,
143
+ 0: "TRACE",
144
+ 1: "DEBUG",
145
+ 2: "INFO",
146
+ 3: "WARN",
147
+ 4: "ERROR",
148
+ 127: "OFF",
149
+ };
137
150
  function formatMessage({ level, module, message, }) {
138
151
  const ts = new Date().toISOString();
139
152
  return `[${ts}][${level}][@clickhouse/client][${module}] ${message}`;
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";;;AAgBA,MAAa,aAAa;IACxB,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAa;QACxC,MAAM,MAAM,GAAc;YACxB,aAAa,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;SACnD,CAAA;QACD,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;QACnC,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,CAAA;IAC1B,CAAC;IAED,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAa;QACxC,MAAM,MAAM,GAAc;YACxB,aAAa,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;SACnD,CAAA;QACD,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAA;QACnC,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,CAAA;I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