@dbx-tools/databricks 0.6.168 → 0.6.175
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 +29 -3
- package/index.ts +2 -0
- package/lib/index.js +1033 -14
- package/package.json +21 -38
- package/src/_bindings-ffi.ts +396 -0
- package/src/_bindings.ts +102 -0
- package/src/bindings.ts +11 -0
- package/lib/index.d.ts +0 -14
- package/lib/src/cloud.d.ts +0 -80
- package/lib/src/cloud.js +0 -240
- package/lib/src/databricks-fs.d.ts +0 -93
- package/lib/src/databricks-fs.js +0 -327
- package/lib/src/databricks-path.d.ts +0 -67
- package/lib/src/databricks-path.js +0 -113
- package/lib/src/net.d.ts +0 -29
- package/lib/src/net.js +0 -68
- package/lib/src/workspace.d.ts +0 -43
- package/lib/src/workspace.js +0 -110
- package/lib/tsconfig.tsbuildinfo +0 -1
package/README.md
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
# @dbx-tools/databricks
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Databricks runtime, workspace, filesystem, cloud, and network utilities.
|
|
4
4
|
|
|
5
5
|
Import this package when backend code needs workspace URL/id discovery, cloud
|
|
6
|
-
provider/region lookup, DNS resolution, or public-IP
|
|
7
|
-
an AppKit plugin runtime.
|
|
6
|
+
provider/region lookup, App runtime detection, DNS resolution, or public-IP
|
|
7
|
+
discovery without requiring an AppKit plugin runtime.
|
|
8
8
|
|
|
9
9
|
Key features:
|
|
10
10
|
|
|
11
11
|
- Workspace URL and numeric workspace id resolution from AppKit context,
|
|
12
12
|
Databricks SDK config, env, and config files.
|
|
13
|
+
- Rust-backed Databricks App detection shared with authentication providers.
|
|
14
|
+
- Cached detection of whether the Databricks CLI auth surface is available.
|
|
13
15
|
- `DatabricksFileSystem` (`FileSystem` over workspace files, UC volumes, and DBFS)
|
|
14
16
|
with intelligent roots: `/Workspace/...`, `/Volumes/...` (also `/Volume/...` and
|
|
15
17
|
`catalog.schema.volume`), `~` → `/Workspace/Users/<userName>`, and `/dbfs/...`.
|
|
@@ -21,6 +23,28 @@ Key features:
|
|
|
21
23
|
- DNS A/AAAA lookup helpers for Databricks and adjacent service hosts.
|
|
22
24
|
- Memoized outbound public-IP discovery for setup and diagnostics.
|
|
23
25
|
|
|
26
|
+
## Detect The Runtime
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { databricksCliAvailable, isDatabricksApp } from "@dbx-tools/databricks";
|
|
30
|
+
|
|
31
|
+
const inApp = isDatabricksApp();
|
|
32
|
+
const hasDatabricksAuth = databricksCliAvailable();
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`isDatabricksApp()` honors `DBX_TOOLS_DATABRICKS_APP_ENV`, then requires a
|
|
36
|
+
valid `DATABRICKS_APP_NAME`, HTTP(S) `DATABRICKS_HOST`, and
|
|
37
|
+
`DATABRICKS_APP_PORT`. `databricksCliAvailable()` caches whether
|
|
38
|
+
`databricks auth --help` succeeds for the process. The generated bindings and
|
|
39
|
+
the package's direct TypeScript modules share this package root.
|
|
40
|
+
|
|
41
|
+
## Relationship To Native AppKit
|
|
42
|
+
|
|
43
|
+
Use native AppKit for its standard workspace client and plugin integrations.
|
|
44
|
+
Use this package when code also needs App detection shared with Rust,
|
|
45
|
+
Databricks filesystem root normalization, cloud region discovery, network
|
|
46
|
+
helpers, or workspace identity fallbacks outside an AppKit request.
|
|
47
|
+
|
|
24
48
|
## Databricks filesystem
|
|
25
49
|
|
|
26
50
|
```ts
|
|
@@ -103,6 +127,8 @@ short-lived reuse.
|
|
|
103
127
|
- `workspace` - workspace URL/id, `tryGetWorkspaceClient` / `getWorkspaceClient`, and current username.
|
|
104
128
|
- `cloud` - provider/region detection from public cloud IP ranges.
|
|
105
129
|
- `net` - DNS A/AAAA resolution and outbound public-IP discovery.
|
|
130
|
+
- package root - Rust-backed `isDatabricksApp` and
|
|
131
|
+
`databricksCliAvailable`.
|
|
106
132
|
|
|
107
133
|
Zerobus endpoint construction builds on these helpers in
|
|
108
134
|
[`@dbx-tools/databricks-zerobus`](../databricks-zerobus).
|
package/index.ts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
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/databricks";
|
|
6
|
+
export const PACKAGE_VERSION = "0.6.175";
|
|
7
|
+
export * from "./src/bindings.ts";
|
|
6
8
|
export * as cloud from "./src/cloud.ts";
|
|
7
9
|
export * as databricksFS from "./src/databricks-fs.ts";
|
|
8
10
|
export * as databricksPath from "./src/databricks-path.ts";
|