@dbx-tools/lakebase 0.9.131 → 0.9.132
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/README.md +19 -8
- package/index.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Resolve a Databricks Lakebase target into the host, database, and user a
|
|
4
4
|
PostgreSQL client needs, then request a short-lived database credential. The
|
|
5
|
-
package gives Node and Bun applications
|
|
5
|
+
package gives Node and Bun applications a profile-aware path from a project
|
|
6
6
|
name or resource URL to connection-ready values. When the target is a Lakebase
|
|
7
7
|
path or URL without a chosen database, discovery picks the branch default
|
|
8
8
|
(`status.default`, then Lakebase's provisioned `databricks_postgres`) instead of
|
|
9
9
|
PostgreSQL's generic `postgres` database.
|
|
10
10
|
|
|
11
|
-
## Quick
|
|
11
|
+
## Quick start
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
14
|
import { LakebaseClient, parseAddress } from "@dbx-tools/lakebase";
|
|
@@ -32,7 +32,18 @@ Request a credential when opening an upstream connection. The client reuses the
|
|
|
32
32
|
token until two minutes before the API's `expire_time`, coalesces concurrent
|
|
33
33
|
refreshes, and never persists database passwords.
|
|
34
34
|
|
|
35
|
-
## Choose
|
|
35
|
+
## Choose a Lakebase integration
|
|
36
|
+
|
|
37
|
+
- Use native AppKit `lakebase()` for request-aware pools inside a Databricks
|
|
38
|
+
App.
|
|
39
|
+
- Use [@dbx-tools/appkit](../appkit) when Lakebase environment values must be
|
|
40
|
+
resolved before AppKit plugins initialize.
|
|
41
|
+
- Use this package for profile-aware discovery and credentials in standalone
|
|
42
|
+
Node or Bun code.
|
|
43
|
+
- Use [dbx lakebase-proxy](../../cli/dbx-tools) when an external PostgreSQL
|
|
44
|
+
client needs a local loopback URL.
|
|
45
|
+
|
|
46
|
+
## Choose a target
|
|
36
47
|
|
|
37
48
|
`parseAddress()` accepts project IDs, canonical project and branch resources,
|
|
38
49
|
endpoint or database resources, endpoint hostnames, and PostgreSQL URLs:
|
|
@@ -48,7 +59,7 @@ Use `requireAddress()` when invalid input should fail immediately. Use
|
|
|
48
59
|
`parseResourcePath()` when the caller must provide a canonical Lakebase resource
|
|
49
60
|
path rather than any supported address form.
|
|
50
61
|
|
|
51
|
-
## Select
|
|
62
|
+
## Select authentication
|
|
52
63
|
|
|
53
64
|
Pass a Databricks profile to `LakebaseClient` when a local application must use
|
|
54
65
|
a specific workspace:
|
|
@@ -59,13 +70,13 @@ const lakebase = new LakebaseClient({ profile: "PROFILE" });
|
|
|
59
70
|
|
|
60
71
|
In a Databricks App, ambient app authentication remains available. A startup
|
|
61
72
|
user supplied to `resolve()` or `generateDatabaseCredential()` is treated as a
|
|
62
|
-
profile only when it exactly matches a configured local profile
|
|
73
|
+
profile only when it exactly matches a configured local profile. An explicit
|
|
63
74
|
client profile always wins.
|
|
64
75
|
|
|
65
|
-
## Build
|
|
76
|
+
## Build a proxy URL
|
|
66
77
|
|
|
67
78
|
`connectionUrl()` formats the local URL expected by
|
|
68
|
-
[
|
|
79
|
+
[@dbx-tools/cli/lakebase-proxy](../../cli/dbx-tools):
|
|
69
80
|
|
|
70
81
|
```ts
|
|
71
82
|
import { connectionUrl } from "@dbx-tools/lakebase";
|
|
@@ -74,7 +85,7 @@ connectionUrl("projects/my-project", "localhost", 5432);
|
|
|
74
85
|
// postgresql://localhost:5432/projects/my-project?sslmode=disable
|
|
75
86
|
```
|
|
76
87
|
|
|
77
|
-
## API
|
|
88
|
+
## API reference
|
|
78
89
|
|
|
79
90
|
- `address` parses supported targets and formats local proxy URLs.
|
|
80
91
|
- `client` discovers Lakebase resources and creates database credentials.
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// Hand edits are overwritten on the next watch; this file is read-only.
|
|
4
4
|
|
|
5
5
|
export const PACKAGE_IDENTIFIER = "@dbx-tools/lakebase";
|
|
6
|
-
export const PACKAGE_VERSION = "0.9.
|
|
6
|
+
export const PACKAGE_VERSION = "0.9.132";
|
|
7
7
|
export * as address from "./src/address.ts";
|
|
8
8
|
export * as bindings from "./src/bindings.ts";
|
|
9
9
|
export * as client from "./src/client.ts";
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const PACKAGE_IDENTIFIER = "@dbx-tools/lakebase";
|
|
2
|
-
export declare const PACKAGE_VERSION = "0.9.
|
|
2
|
+
export declare const PACKAGE_VERSION = "0.9.132";
|
|
3
3
|
export * as address from "./src/address.ts";
|
|
4
4
|
export * as bindings from "./src/bindings.ts";
|
|
5
5
|
export * as client from "./src/client.ts";
|
package/lib/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// Regenerated from the exporting modules in ./src.
|
|
3
3
|
// Hand edits are overwritten on the next watch; this file is read-only.
|
|
4
4
|
export const PACKAGE_IDENTIFIER = "@dbx-tools/lakebase";
|
|
5
|
-
export const PACKAGE_VERSION = "0.9.
|
|
5
|
+
export const PACKAGE_VERSION = "0.9.132";
|
|
6
6
|
export * as address from "./src/address.js";
|
|
7
7
|
export * as bindings from "./src/bindings.js";
|
|
8
8
|
export * as client from "./src/client.js";
|
|
9
9
|
export { SSL_MODES } from "./src/address.js";
|
|
10
10
|
export { DatabaseCredentialSchema, LakebaseClient } from "./src/client.js";
|
|
11
11
|
export * from "./exports.js";
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
12
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSwyQ0FBMkM7QUFDM0MsbURBQW1EO0FBQ25ELHdFQUF3RTtBQUV4RSxNQUFNLENBQUMsTUFBTSxrQkFBa0IsR0FBRyx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eyBTc2xNb2RlLCBMYWtlYmFzZUNvbm5lY3Rpb25JbnB1dHMsIFBhcnNlZEFkZHJlc3MgfSBmcm9tIFwiLi9zcmMvYWRkcmVzcy50c1wiO1xuZXhwb3J0IHsgRGF0YWJhc2VDcmVkZW50aWFsU2NoZW1hLCBMYWtlYmFzZUNsaWVudCB9IGZyb20gXCIuL3NyYy9jbGllbnQudHNcIjtcbmV4cG9ydCB0eXBlIHsgRGF0YWJhc2VDcmVkZW50aWFsLCBSZXNvbHZlZExha2ViYXNlLCBMYWtlYmFzZUFwaUNsaWVudCwgTGFrZWJhc2VSZXF1ZXN0T3B0aW9ucywgTGFrZWJhc2VDbGllbnREZXBlbmRlbmNpZXMgfSBmcm9tIFwiLi9zcmMvY2xpZW50LnRzXCI7XG5leHBvcnQgKiBmcm9tIFwiLi9leHBvcnRzLnRzXCI7XG4iXX0=
|
package/package.json
CHANGED
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"typescript": "^5.9.3"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@dbx-tools/auth": "^0.9.
|
|
27
|
-
"@dbx-tools/shared-auth": "^0.9.
|
|
28
|
-
"@dbx-tools/shared-core": "^0.9.
|
|
26
|
+
"@dbx-tools/auth": "^0.9.132",
|
|
27
|
+
"@dbx-tools/shared-auth": "^0.9.132",
|
|
28
|
+
"@dbx-tools/shared-core": "^0.9.132",
|
|
29
29
|
"zod": "4.3.6"
|
|
30
30
|
},
|
|
31
31
|
"main": "./lib/index.js",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"./package.json": "./package.json"
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
|
-
"version": "0.9.
|
|
61
|
+
"version": "0.9.132",
|
|
62
62
|
"types": "./lib/index.d.ts",
|
|
63
63
|
"dbxToolsConfig": {
|
|
64
64
|
"tags": [
|