@fjall/clickhouse 16.0.1 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.build-source-hash +5 -5
- package/dist/.minified +1 -1
- package/dist/createClient.d.ts +21 -1
- package/dist/createClient.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/.build-source-hash
CHANGED
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
"package.json",
|
|
10
10
|
"tsconfig.json"
|
|
11
11
|
],
|
|
12
|
-
"hash": "
|
|
12
|
+
"hash": "9c73d8e830e4b668a48ef86cee88f0b38bdeb163fce2c773f75f51974ebd958c",
|
|
13
13
|
"files": {
|
|
14
14
|
"src/connectWithRetry.ts": "eb4d131ea8e81922",
|
|
15
15
|
"src/constants.ts": "00b236fd35f098cb",
|
|
16
|
-
"src/createClient.ts": "
|
|
17
|
-
"src/index.ts": "
|
|
16
|
+
"src/createClient.ts": "83f093bfd7765a9f",
|
|
17
|
+
"src/index.ts": "2ab0816e1d411108",
|
|
18
18
|
"src/logger.ts": "659d04c534247903",
|
|
19
19
|
"src/provisionUsers.ts": "3e88d53b5eb1ccf5",
|
|
20
20
|
"src/runSqlMigrations.ts": "d187aa5de9e4316e",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"src/sleepAbortable.ts": "0286a0719bef3a38",
|
|
23
23
|
"src/verifyExpectedClickHouseSchemaVersion.ts": "84f5463cd47e4a30",
|
|
24
24
|
"../scripts/minify-dist.mjs": "6b2e4b0df8aec601",
|
|
25
|
-
"package.json": "
|
|
25
|
+
"package.json": "04839b296e7c3d94",
|
|
26
26
|
"tsconfig.json": "db759831ad95f396"
|
|
27
27
|
},
|
|
28
|
-
"outputHash": "
|
|
28
|
+
"outputHash": "3a47884a7d84ebd1d6ce8dca964dc9572214d5be64156f785355f12ac0a867db",
|
|
29
29
|
"outputFileCount": 21
|
|
30
30
|
}
|
package/dist/.minified
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
10 files minified at 2026-08-
|
|
1
|
+
10 files minified at 2026-08-23T02:03:05.878Z
|
package/dist/createClient.d.ts
CHANGED
|
@@ -22,13 +22,33 @@ export interface CreateFjallClickHouseClientOptions {
|
|
|
22
22
|
readonly password?: string;
|
|
23
23
|
/** Optional database name override. */
|
|
24
24
|
readonly database?: string;
|
|
25
|
-
/**
|
|
25
|
+
/** Merged over {@link WIRE_FORMAT_CLICKHOUSE_SETTINGS}; caller keys win. */
|
|
26
26
|
readonly clickhouse_settings?: ClickHouseClientConfigOptions["clickhouse_settings"];
|
|
27
27
|
readonly compression?: ClickHouseClientConfigOptions["compression"];
|
|
28
28
|
readonly request_timeout?: number;
|
|
29
29
|
readonly max_open_connections?: number;
|
|
30
30
|
readonly keep_alive?: ClickHouseClientConfigOptions["keep_alive"];
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* The Fjall wire-format contract, applied to every client this factory
|
|
34
|
+
* builds: DateTime/DateTime64 columns serialise as RFC3339 instants with a
|
|
35
|
+
* timezone designator (`2026-08-23T01:23:45.678Z`), so consumers may
|
|
36
|
+
* `new Date(value)` any timestamp the server returns — no bespoke parser.
|
|
37
|
+
* Inputs stay tolerant (`best_effort` accepts both the ISO shape and the
|
|
38
|
+
* legacy `YYYY-MM-DD hh:mm:ss` form).
|
|
39
|
+
*
|
|
40
|
+
* Asymmetry to know: typed query PARAMETERS (`{x:DateTime64(3)}`) are bound
|
|
41
|
+
* by a separate parser that rejects a trailing `Z` regardless of
|
|
42
|
+
* `date_time_input_format` — keep formatting bind parameters without the
|
|
43
|
+
* designator (ClickHouse 26.3, verified).
|
|
44
|
+
*
|
|
45
|
+
* Caller-supplied `clickhouse_settings` spread AFTER these, so a caller can
|
|
46
|
+
* override either setting deliberately.
|
|
47
|
+
*/
|
|
48
|
+
export declare const WIRE_FORMAT_CLICKHOUSE_SETTINGS: {
|
|
49
|
+
readonly date_time_output_format: "iso";
|
|
50
|
+
readonly date_time_input_format: "best_effort";
|
|
51
|
+
};
|
|
32
52
|
/**
|
|
33
53
|
* Sync factory wrapping `@clickhouse/client`'s `createClient`. No AWS SDK
|
|
34
54
|
* call, no `await`, no module-level cache — the CA PEM is already on
|
package/dist/createClient.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var a=Object.defineProperty;var d=(e,n)=>a(e,"name",{value:n,configurable:!0});import{createClient as
|
|
1
|
+
var a=Object.defineProperty;var d=(e,n)=>a(e,"name",{value:n,configurable:!0});import{createClient as t}from"@clickhouse/client";const c={date_time_output_format:"iso",date_time_input_format:"best_effort"};function o(e={}){const n=process.env.CLICKHOUSE_URL,i=e.url!==void 0&&e.url!==""?e.url:n!==void 0&&n!==""?n:void 0;if(i===void 0)throw new Error("createFjallClickHouseClient: CLICKHOUSE_URL must be set (env or opts.url)");const r=process.env.CLICKHOUSE_CA_CERT,u=e.caCert!==void 0&&e.caCert!==""?e.caCert:r!==void 0&&r!==""?r:void 0;return t({url:i,...e.username!==void 0&&{username:e.username},...e.password!==void 0&&{password:e.password},...e.database!==void 0&&{database:e.database},clickhouse_settings:{...c,...e.clickhouse_settings},...e.compression!==void 0&&{compression:e.compression},...e.request_timeout!==void 0&&{request_timeout:e.request_timeout},...e.max_open_connections!==void 0&&{max_open_connections:e.max_open_connections},...e.keep_alive!==void 0&&{keep_alive:e.keep_alive},...u!==void 0&&{tls:{ca_cert:Buffer.from(u,"utf8")}}})}d(o,"createFjallClickHouseClient");export{c as WIRE_FORMAT_CLICKHOUSE_SETTINGS,o as createFjallClickHouseClient};
|
package/dist/index.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ export { type ConnectWithRetryOpts, connectWithRetry, } from "./connectWithRetry
|
|
|
5
5
|
export { type ProvisionUsersFromEnvOpts, type ProvisionUsersFromEnvResult, provisionUsersFromEnv, } from "./provisionUsers.js";
|
|
6
6
|
export { type RunSqlMigrationsOpts, type RunSqlMigrationsResult, runSqlMigrations, } from "./runSqlMigrations.js";
|
|
7
7
|
export { type VerifyExpectedClickHouseSchemaVersionOpts, type VerifyExpectedClickHouseSchemaVersionResult, verifyExpectedClickHouseSchemaVersion, } from "./verifyExpectedClickHouseSchemaVersion.js";
|
|
8
|
-
export { type CreateFjallClickHouseClientOptions, createFjallClickHouseClient, } from "./createClient.js";
|
|
8
|
+
export { type CreateFjallClickHouseClientOptions, createFjallClickHouseClient, WIRE_FORMAT_CLICKHOUSE_SETTINGS, } from "./createClient.js";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CLICKHOUSE_MANAGED_USERS_ENV as o,userPasswordEnvName as t}from"./constants.js";import{ManagedUserNameSchema as m,ManagedUserNamesSchema as s}from"./schemas.js";import{createConsoleMigrationLogger as i}from"./logger.js";import{connectWithRetry as p}from"./connectWithRetry.js";import{provisionUsersFromEnv as
|
|
1
|
+
import{CLICKHOUSE_MANAGED_USERS_ENV as o,userPasswordEnvName as t}from"./constants.js";import{ManagedUserNameSchema as m,ManagedUserNamesSchema as s}from"./schemas.js";import{createConsoleMigrationLogger as i}from"./logger.js";import{connectWithRetry as p}from"./connectWithRetry.js";import{provisionUsersFromEnv as S}from"./provisionUsers.js";import{runSqlMigrations as x}from"./runSqlMigrations.js";import{verifyExpectedClickHouseSchemaVersion as l}from"./verifyExpectedClickHouseSchemaVersion.js";import{createFjallClickHouseClient as M,WIRE_FORMAT_CLICKHOUSE_SETTINGS as N}from"./createClient.js";export{o as CLICKHOUSE_MANAGED_USERS_ENV,m as ManagedUserNameSchema,s as ManagedUserNamesSchema,N as WIRE_FORMAT_CLICKHOUSE_SETTINGS,p as connectWithRetry,i as createConsoleMigrationLogger,M as createFjallClickHouseClient,S as provisionUsersFromEnv,x as runSqlMigrations,t as userPasswordEnvName,l as verifyExpectedClickHouseSchemaVersion};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjall/clickhouse",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "17.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/fjall-tech/fjall.git",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@clickhouse/client": "^1.18.0"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@fjall/util": "^
|
|
53
|
+
"@fjall/util": "^17.0.0",
|
|
54
54
|
"zod": "^4.4.3"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|