@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 CHANGED
@@ -1,15 +1,17 @@
1
1
  # @dbx-tools/databricks
2
2
 
3
- Generic Node-side Databricks workspace and cloud infrastructure helpers.
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 discovery without requiring
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";