@dbx-tools/databricks 0.6.186 → 0.6.191

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,20 +1,14 @@
1
1
  # @dbx-tools/databricks
2
2
 
3
- Databricks authentication, runtime, workspace, filesystem, cloud, and network
4
- utilities.
3
+ Databricks workspace, filesystem, cloud, and network utilities.
5
4
 
6
5
  Import this package when backend code needs workspace URL/id discovery, cloud
7
- provider/region lookup, App runtime detection, DNS resolution, or public-IP
8
- discovery without requiring an AppKit plugin runtime.
6
+ provider/region lookup, DNS resolution, or public-IP discovery.
9
7
 
10
8
  Key features:
11
9
 
12
10
  - Workspace URL and numeric workspace id resolution from AppKit context,
13
11
  Databricks SDK config, env, and config files.
14
- - U2M browser OAuth, M2M client credentials, PAT, `app_obo`, and `app_sp`
15
- authentication.
16
- - Rust-backed App detection, CLI token access, file locks, and file-backed
17
- caches.
18
12
  - `DatabricksFileSystem` (`FileSystem` over workspace files, UC volumes, and DBFS)
19
13
  with intelligent roots: `/Workspace/...`, `/Volumes/...` (also `/Volume/...` and
20
14
  `catalog.schema.volume`), `~` → `/Workspace/Users/<userName>`, and `/dbfs/...`.
@@ -26,39 +20,12 @@ Key features:
26
20
  - DNS A/AAAA lookup helpers for Databricks and adjacent service hosts.
27
21
  - Memoized outbound public-IP discovery for setup and diagnostics.
28
22
 
29
- ## Authenticate
30
-
31
- ```ts
32
- import {
33
- createPersistentAuth,
34
- createPersistentAuthForRequest,
35
- DatabricksAuthOptions,
36
- } from "@dbx-tools/databricks";
37
-
38
- const auth = await createPersistentAuth(DatabricksAuthOptions.create({}));
39
- const token = await auth.token();
40
- ```
41
-
42
- Inside a Databricks App, request-scoped auth prefers OBO, then falls back to the
43
- ambient service principal:
44
-
45
- ```ts
46
- const requestHeaders = new Map<string, string>();
47
- const forwardedToken = req.header("x-forwarded-access-token");
48
- if (forwardedToken) requestHeaders.set("x-forwarded-access-token", forwardedToken);
49
- const auth = await createPersistentAuthForRequest(DatabricksAuthOptions.create({}), requestHeaders);
50
- ```
51
-
52
- OBO tokens are forwarded directly without caching. `app_sp` shares the complete
53
- M2M client-credentials implementation. Set `authType` or `profile` explicitly
54
- to override automatic App resolution.
55
-
56
23
  ## Relationship To Native AppKit
57
24
 
58
25
  Use native AppKit for its standard workspace client and plugin integrations.
59
26
  Use this package when code needs Databricks filesystem root normalization,
60
27
  cloud region discovery, network helpers, or workspace identity fallbacks
61
- outside an AppKit request, or when direct Rust-backed authentication is needed.
28
+ outside an AppKit request.
62
29
 
63
30
  ## Databricks filesystem
64
31
 
package/index.ts CHANGED
@@ -3,8 +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/databricks";
6
- export const PACKAGE_VERSION = "0.6.186";
7
- export * from "./src/bindings.ts";
6
+ export const PACKAGE_VERSION = "0.6.191";
8
7
  export * as cloud from "./src/cloud.ts";
9
8
  export * as databricksFS from "./src/databricks-fs.ts";
10
9
  export * as databricksPath from "./src/databricks-path.ts";
package/lib/index.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ export declare const PACKAGE_IDENTIFIER = "@dbx-tools/databricks";
2
+ export declare const PACKAGE_VERSION = "0.6.191";
3
+ export * as cloud from "./src/cloud.ts";
4
+ export * as databricksFS from "./src/databricks-fs.ts";
5
+ export * as databricksPath from "./src/databricks-path.ts";
6
+ export * as net from "./src/net.ts";
7
+ export * as workspace from "./src/workspace.ts";
8
+ export { RANGE_CACHE_TTL_MS, CloudProvider } from "./src/cloud.ts";
9
+ export type { CloudLocation } from "./src/cloud.ts";
10
+ export { DatabricksFileSystem } from "./src/databricks-fs.ts";
11
+ export type { DatabricksFileSystemOptions } from "./src/databricks-fs.ts";
12
+ export { isHomeRelativePath } from "./src/databricks-path.ts";
13
+ export type { DatabricksFilesBackend, NormalizeDatabricksRootOptions, ResolveDatabricksRootOptions } from "./src/databricks-path.ts";
14
+ export { getPublicIp } from "./src/net.ts";
15
+ export type { WorkspaceClient } from "./src/workspace.ts";