@databricks/appkit-ui 0.60.0 → 0.61.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/NOTICE.md +11 -10
- package/dist/cli/commands/doctor/bundle.js +3 -11
- package/dist/cli/commands/doctor/bundle.js.map +1 -1
- package/dist/cli/commands/doctor/databricks-client.js +18 -22
- package/dist/cli/commands/doctor/databricks-client.js.map +1 -1
- package/dist/cli/commands/registry/add.js +410 -0
- package/dist/cli/commands/registry/add.js.map +1 -0
- package/dist/cli/commands/registry/client.js +94 -0
- package/dist/cli/commands/registry/client.js.map +1 -0
- package/dist/cli/commands/registry/config-plan.js +110 -0
- package/dist/cli/commands/registry/config-plan.js.map +1 -0
- package/dist/cli/commands/registry/config-writer.js +176 -0
- package/dist/cli/commands/registry/config-writer.js.map +1 -0
- package/dist/cli/commands/registry/constants.js +62 -0
- package/dist/cli/commands/registry/constants.js.map +1 -0
- package/dist/cli/commands/registry/env-reconcile.js +116 -0
- package/dist/cli/commands/registry/env-reconcile.js.map +1 -0
- package/dist/cli/commands/registry/env-writer.js +198 -0
- package/dist/cli/commands/registry/env-writer.js.map +1 -0
- package/dist/cli/commands/registry/index.js +25 -0
- package/dist/cli/commands/registry/index.js.map +1 -0
- package/dist/cli/commands/registry/info.js +45 -0
- package/dist/cli/commands/registry/info.js.map +1 -0
- package/dist/cli/commands/registry/list.js +130 -0
- package/dist/cli/commands/registry/list.js.map +1 -0
- package/dist/cli/commands/registry/requirements.js +92 -0
- package/dist/cli/commands/registry/requirements.js.map +1 -0
- package/dist/cli/commands/registry/server-register.js +124 -0
- package/dist/cli/commands/registry/server-register.js.map +1 -0
- package/dist/cli/commands/registry/workspace-picker.js +353 -0
- package/dist/cli/commands/registry/workspace-picker.js.map +1 -0
- package/dist/cli/deploy-config.js +36 -0
- package/dist/cli/deploy-config.js.map +1 -0
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/schemas/manifest.js +4 -4
- package/dist/schemas/manifest.js.map +1 -1
- package/dist/shared/src/index.d.ts +2 -1
- package/dist/shared/src/workspace-client/errors.d.ts +1 -0
- package/dist/shared/src/workspace-client/factory.d.ts +2 -0
- package/dist/shared/src/workspace-client/index.d.ts +4 -0
- package/dist/shared/src/workspace-client/legacy.d.ts +3 -0
- package/dist/shared/src/workspace-client/types.d.ts +2 -0
- package/dist/workspace-client/client.js +57 -0
- package/dist/workspace-client/client.js.map +1 -0
- package/dist/workspace-client/errors.d.ts +2 -0
- package/dist/workspace-client/errors.js +3 -0
- package/dist/workspace-client/factory.d.ts +19 -0
- package/dist/workspace-client/factory.d.ts.map +1 -0
- package/dist/workspace-client/factory.js +24 -0
- package/dist/workspace-client/factory.js.map +1 -0
- package/dist/workspace-client/index.d.ts +5 -0
- package/dist/workspace-client/index.js +5 -0
- package/dist/workspace-client/legacy.d.ts +34 -0
- package/dist/workspace-client/legacy.d.ts.map +1 -0
- package/dist/workspace-client/legacy.js +23 -0
- package/dist/workspace-client/legacy.js.map +1 -0
- package/dist/workspace-client/types.d.ts +49 -0
- package/dist/workspace-client/types.d.ts.map +1 -0
- package/docs/api/appkit/Function.createWorkspaceClient.md +4 -4
- package/docs/api/appkit/Interface.WorkspaceClientOptions.md +11 -0
- package/package.json +4 -2
- package/sbom.cdx.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as SDK from "@databricks/sdk-experimental";
|
|
2
|
+
|
|
3
|
+
//#region src/workspace-client/legacy.ts
|
|
4
|
+
const { WorkspaceClient: SdkWorkspaceClientCtor } = SDK;
|
|
5
|
+
/**
|
|
6
|
+
* Construct a legacy `WorkspaceClient` from wrapper options.
|
|
7
|
+
*
|
|
8
|
+
* Centralised so the wrapper facade, the `.toLegacyWorkspaceClient()` escape
|
|
9
|
+
* hatch, and any per-request OBO client all build it the same way.
|
|
10
|
+
*/
|
|
11
|
+
function buildLegacyWorkspaceClient(opts) {
|
|
12
|
+
return new SdkWorkspaceClientCtor(opts.token !== void 0 ? {
|
|
13
|
+
host: opts.host,
|
|
14
|
+
token: opts.token,
|
|
15
|
+
authType: opts.authType ?? "pat"
|
|
16
|
+
} : opts.host ? { host: opts.host } : opts.profile ? { profile: opts.profile } : {}, opts.clientOptions);
|
|
17
|
+
}
|
|
18
|
+
const { ConfigError, Context, TimeUnits, loadConfigFile } = SDK;
|
|
19
|
+
const Time = SDK.Time ?? SDK.default.Time;
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { ConfigError, Context, Time, TimeUnits, buildLegacyWorkspaceClient, loadConfigFile };
|
|
23
|
+
//# sourceMappingURL=legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legacy.js","names":[],"sources":["../../src/workspace-client/legacy.ts"],"sourcesContent":["/**\n * The single module in AppKit allowed to import `@databricks/sdk-experimental`\n * directly (enforced by the Biome `noRestrictedImports` boundary rule). Every\n * other AppKit module reaches the SDK through the wrapper's re-exports and the\n * {@link WorkspaceClient} facade.\n *\n * Isolating the SDK here is what makes the incremental migration to the modular\n * Databricks SDK a localized change: to migrate a service, swap its getter in\n * `client.ts` from the legacy delegate to the modular client — nothing else in\n * the codebase imports the SDK, so the blast radius is one connector + its test.\n */\n\nimport type {\n ClientOptions,\n WorkspaceClient as SdkWorkspaceClient,\n} from \"@databricks/sdk-experimental\";\nimport * as SDK from \"@databricks/sdk-experimental\";\n\nconst { WorkspaceClient: SdkWorkspaceClientCtor } = SDK;\n\n/** The concrete legacy SDK client type. */\nexport type LegacyWorkspaceClient = SdkWorkspaceClient;\n\n/**\n * Options used to construct the wrapper. Mirrors the subset of the old SDK's\n * `Config` + `ClientOptions` that AppKit relies on today; we deliberately do\n * NOT re-expose every old-SDK config knob.\n */\nexport interface WorkspaceClientOptions {\n /** Databricks host, e.g. https://my-workspace.cloud.databricks.com. Defaults to DATABRICKS_HOST / profile resolution. */\n host?: string;\n /** `~/.databrickscfg` profile name. Used when no host/token is provided. */\n profile?: string;\n /** Bearer token. When set, `authType` defaults to \"pat\". */\n token?: string;\n /** Authentication strategy passed to the legacy client. */\n authType?: \"pat\";\n /**\n * SDK client options (product / productVersion / userAgentExtra) used to\n * stamp the outbound User-Agent. Produced by `getClientOptions()`; omitted\n * by build-time callers that don't stamp a User-Agent.\n */\n clientOptions?: ClientOptions;\n}\n\n/**\n * Construct a legacy `WorkspaceClient` from wrapper options.\n *\n * Centralised so the wrapper facade, the `.toLegacyWorkspaceClient()` escape\n * hatch, and any per-request OBO client all build it the same way.\n */\nexport function buildLegacyWorkspaceClient(\n opts: WorkspaceClientOptions,\n): LegacyWorkspaceClient {\n // Check `token !== undefined`, NOT truthiness: an explicitly-passed token\n // must stick to the PAT path even when it's an empty string. Falling through\n // to the default-auth branch on an empty OBO token would silently\n // authenticate as the service principal instead of failing — a privilege\n // escalation in the OBO path. An invalid/empty token should blow up loudly.\n const cfg =\n opts.token !== undefined\n ? { host: opts.host, token: opts.token, authType: opts.authType ?? \"pat\" }\n : opts.host\n ? { host: opts.host }\n : opts.profile\n ? { profile: opts.profile }\n : {};\n return new SdkWorkspaceClientCtor(cfg, opts.clientOptions);\n}\n\n// ── SDK type re-exports ──────────────────────────────────────────────\nexport type {\n CancellationToken,\n ClientOptions,\n} from \"@databricks/sdk-experimental\";\n// ── SDK value re-exports ─────────────────────────────────────────────\n//\n// AppKit modules import these from the wrapper instead of the SDK so the\n// boundary rule holds. `Context` bridges AbortSignal → CancellationToken\n// (serving/jobs/sql-warehouse); `Time`/`TimeUnits` drive genie polling;\n// `ConfigError` is matched in service-context's auth-failure handling.\n//\n// These are sourced off the namespace import rather than `export { ... } from`\n// because the SDK is CommonJS: its `Time` export is emitted as a getter that\n// calls `__importDefault(...)`, which defeats Node's static named-export\n// detection — a direct `export { Time }` throws \"does not provide an export\n// named 'Time'\" at ESM link time. `Time` is only reachable via the module\n// object, so we fall back to `SDK.default.Time` (matching the original genie\n// connector's `SDK.Time ?? SDK.default.Time` guard).\nexport const { ConfigError, Context, TimeUnits, loadConfigFile } = SDK;\nexport const Time =\n SDK.Time ?? (SDK as unknown as { default: typeof SDK }).default.Time;\n\n// Deep-import types used by the genie connector's waiter idiom. Not exposed\n// on the SDK's top-level index, so re-exported here to keep the genie\n// connector off a direct `@databricks/sdk-experimental/dist/**` import.\nexport type { GenieMessage } from \"@databricks/sdk-experimental/dist/apis/dashboards\";\nexport type { Waiter } from \"@databricks/sdk-experimental/dist/wait\";\n"],"mappings":";;;AAkBA,MAAM,EAAE,iBAAiB,2BAA2B;;;;;;;AAiCpD,SAAgB,2BACd,MACuB;AAcvB,QAAO,IAAI,uBAPT,KAAK,UAAU,SACX;EAAE,MAAM,KAAK;EAAM,OAAO,KAAK;EAAO,UAAU,KAAK,YAAY;EAAO,GACxE,KAAK,OACH,EAAE,MAAM,KAAK,MAAM,GACnB,KAAK,UACH,EAAE,SAAS,KAAK,SAAS,GACzB,EAAE,EAC2B,KAAK,cAAc;;AAsB5D,MAAa,EAAE,aAAa,SAAS,WAAW,mBAAmB;AACnE,MAAa,OACX,IAAI,QAAS,IAA2C,QAAQ"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { LegacyWorkspaceClient } from "./legacy.js";
|
|
2
|
+
import { files, jobs, serving, sql } from "@databricks/sdk-experimental";
|
|
3
|
+
|
|
4
|
+
//#region src/workspace-client/types.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* AppKit's workspace client facade. Mirrors the multi-client shape of the
|
|
7
|
+
* modular Databricks SDK: each service is its own accessor, so services can be
|
|
8
|
+
* migrated one at a time behind this stable interface.
|
|
9
|
+
*
|
|
10
|
+
* Accessors are legacy-typed for now (delegated to the underlying legacy SDK
|
|
11
|
+
* client); see the module docblock.
|
|
12
|
+
*/
|
|
13
|
+
interface WorkspaceClient$1 {
|
|
14
|
+
/** UC Volumes / Files API. */
|
|
15
|
+
readonly files: LegacyWorkspaceClient["files"];
|
|
16
|
+
/** SQL Warehouses. */
|
|
17
|
+
readonly warehouses: LegacyWorkspaceClient["warehouses"];
|
|
18
|
+
/** Genie / dashboards. */
|
|
19
|
+
readonly genie: LegacyWorkspaceClient["genie"];
|
|
20
|
+
/** Jobs. */
|
|
21
|
+
readonly jobs: LegacyWorkspaceClient["jobs"];
|
|
22
|
+
/** Statement Execution. */
|
|
23
|
+
readonly statementExecution: LegacyWorkspaceClient["statementExecution"];
|
|
24
|
+
/** Serving Endpoints. */
|
|
25
|
+
readonly servingEndpoints: LegacyWorkspaceClient["servingEndpoints"];
|
|
26
|
+
/** Current user. */
|
|
27
|
+
readonly currentUser: LegacyWorkspaceClient["currentUser"];
|
|
28
|
+
/**
|
|
29
|
+
* SDK `Config` — exposes `host` and `authenticate(headers)`. Used by the
|
|
30
|
+
* files-upload path and agents auth-header stamping, which bypass the typed
|
|
31
|
+
* services.
|
|
32
|
+
*/
|
|
33
|
+
readonly config: LegacyWorkspaceClient["config"];
|
|
34
|
+
/**
|
|
35
|
+
* Low-level HTTP transport (`apiClient.request(...)`). Used for endpoints
|
|
36
|
+
* without a typed service method: SCIM header probe, warehouse listing,
|
|
37
|
+
* serving SSE streaming, vector search, internal telemetry.
|
|
38
|
+
*/
|
|
39
|
+
readonly apiClient: LegacyWorkspaceClient["apiClient"];
|
|
40
|
+
/**
|
|
41
|
+
* Returns the underlying legacy `@databricks/sdk-experimental`
|
|
42
|
+
* `WorkspaceClient`, for handoff to code still typed against the old SDK
|
|
43
|
+
* (`@databricks/lakebase`). Transitional.
|
|
44
|
+
*/
|
|
45
|
+
toLegacyWorkspaceClient(): LegacyWorkspaceClient;
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { WorkspaceClient$1 as WorkspaceClient, type files, type jobs, type serving, type sql };
|
|
49
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/workspace-client/types.ts"],"mappings":";;;;;;;;;;;;UAkCiB,iBAAA;EAWA;EAAA,SATN,KAAA,EAAO,qBAAA;EAYa;EAAA,SATpB,UAAA,EAAY,qBAAA;EAYM;EAAA,SATlB,KAAA,EAAO,qBAAA;EAYM;EAAA,SATb,IAAA,EAAM,qBAAA;EAgBE;EAAA,SAbR,kBAAA,EAAoB,qBAAA;EAoBT;EAAA,SAjBX,gBAAA,EAAkB,qBAAA;EAwBA;EAAA,SArBlB,WAAA,EAAa,qBAAA;EAqB0B;;;;;EAAA,SAdvC,MAAA,EAAQ,qBAAA;;;;;;WAOR,SAAA,EAAW,qBAAA;;;;;;EAOpB,uBAAA,IAA2B,qBAAA;AAAA"}
|
|
@@ -19,10 +19,10 @@ Host resolution:
|
|
|
19
19
|
|
|
20
20
|
## Parameters[](#parameters "Direct link to Parameters")
|
|
21
21
|
|
|
22
|
-
| Parameter | Type
|
|
23
|
-
| --------- |
|
|
24
|
-
| `opts` |
|
|
22
|
+
| Parameter | Type |
|
|
23
|
+
| --------- | ------------------------ |
|
|
24
|
+
| `opts` | `WorkspaceClientOptions` |
|
|
25
25
|
|
|
26
26
|
## Returns[](#returns "Direct link to Returns")
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
`WorkspaceClient`
|
|
@@ -37,6 +37,17 @@ Databricks host, e.g. <https://my-workspace.cloud.databricks.com>. Defaults to D
|
|
|
37
37
|
|
|
38
38
|
***
|
|
39
39
|
|
|
40
|
+
### profile?[](#profile "Direct link to profile?")
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
optional profile: string;
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`~/.databrickscfg` profile name. Used when no host/token is provided.
|
|
48
|
+
|
|
49
|
+
***
|
|
50
|
+
|
|
40
51
|
### token?[](#token "Direct link to token?")
|
|
41
52
|
|
|
42
53
|
```ts
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@databricks/appkit-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.61.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.css"
|
|
@@ -91,12 +91,14 @@
|
|
|
91
91
|
"tailwind-merge": "3.4.0",
|
|
92
92
|
"vaul": "1.1.2",
|
|
93
93
|
"@ast-grep/napi": "0.37.0",
|
|
94
|
-
"@standard-schema/spec": "1.1.0",
|
|
95
94
|
"@clack/prompts": "1.0.1",
|
|
95
|
+
"@databricks/sdk-experimental": "0.17.0",
|
|
96
|
+
"@standard-schema/spec": "1.1.0",
|
|
96
97
|
"commander": "12.1.0",
|
|
97
98
|
"dotenv": "16.6.1",
|
|
98
99
|
"js-yaml": "4.2.0",
|
|
99
100
|
"picocolors": "1.1.1",
|
|
101
|
+
"yaml": "2.8.2",
|
|
100
102
|
"zod": "4.3.6"
|
|
101
103
|
},
|
|
102
104
|
"peerDependencies": {
|