@dbx-tools/appkit 0.3.28 → 0.3.29
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/package.json +3 -3
- package/src/config.ts +2 -2
- package/src/lakebase-resolver.ts +3 -4
package/package.json
CHANGED
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
"@databricks/sdk-experimental": "^0.17.0",
|
|
19
19
|
"yaml": "^2.9.0",
|
|
20
20
|
"zod": "^4.3.6",
|
|
21
|
-
"@dbx-tools/core": "0.3.
|
|
22
|
-
"@dbx-tools/
|
|
21
|
+
"@dbx-tools/shared-core": "0.3.29",
|
|
22
|
+
"@dbx-tools/core": "0.3.29"
|
|
23
23
|
},
|
|
24
24
|
"main": "index.ts",
|
|
25
25
|
"license": "UNLICENSED",
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
|
-
"version": "0.3.
|
|
29
|
+
"version": "0.3.29",
|
|
30
30
|
"types": "index.ts",
|
|
31
31
|
"type": "module",
|
|
32
32
|
"exports": {
|
package/src/config.ts
CHANGED
|
@@ -16,7 +16,7 @@ import { spawnSync } from "node:child_process";
|
|
|
16
16
|
import { readFile } from "node:fs/promises";
|
|
17
17
|
import { dirname, resolve } from "node:path";
|
|
18
18
|
import { file, project } from "@dbx-tools/core";
|
|
19
|
-
import { functionModule, object, log, string } from "@dbx-tools/shared-core";
|
|
19
|
+
import { functionModule, json, object, log, string } from "@dbx-tools/shared-core";
|
|
20
20
|
import { parse as parseYamlText } from "yaml";
|
|
21
21
|
import { z } from "zod";
|
|
22
22
|
|
|
@@ -293,7 +293,7 @@ function validateBundle(root: string): BundleValidateJson | undefined {
|
|
|
293
293
|
bundleValidateCache.set(key, undefined);
|
|
294
294
|
return undefined;
|
|
295
295
|
}
|
|
296
|
-
const data =
|
|
296
|
+
const data = json.parse<BundleValidateJson>(text);
|
|
297
297
|
bundleValidateCache.set(key, data);
|
|
298
298
|
return data;
|
|
299
299
|
} catch {
|
package/src/lakebase-resolver.ts
CHANGED
|
@@ -35,10 +35,9 @@
|
|
|
35
35
|
* @module
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
|
-
import { setTimeout as sleep } from "node:timers/promises";
|
|
39
38
|
import { getWorkspaceClient } from "@databricks/appkit";
|
|
40
39
|
import { project } from "@dbx-tools/core";
|
|
41
|
-
import { log, string } from "@dbx-tools/shared-core";
|
|
40
|
+
import { async, log, string } from "@dbx-tools/shared-core";
|
|
42
41
|
import { resolveConfigValue } from "./config";
|
|
43
42
|
|
|
44
43
|
import {
|
|
@@ -558,7 +557,7 @@ async function waitForOperation(
|
|
|
558
557
|
}
|
|
559
558
|
const start = Date.now();
|
|
560
559
|
while (Date.now() - start < OPERATION_TIMEOUT_MS) {
|
|
561
|
-
await sleep(OPERATION_POLL_MS);
|
|
560
|
+
await async.sleep(OPERATION_POLL_MS);
|
|
562
561
|
const current = await getJson<Operation>(ws, `${API_BASE}/${opName}`);
|
|
563
562
|
logger.debug("autopg: operation status", { op: opName, done: current.done });
|
|
564
563
|
if (current.done) {
|
|
@@ -599,7 +598,7 @@ async function waitEndpointReady(
|
|
|
599
598
|
return last;
|
|
600
599
|
}
|
|
601
600
|
logger.debug("autopg: waiting for endpoint", { endpointId, state });
|
|
602
|
-
await sleep(ENDPOINT_READY_POLL_MS);
|
|
601
|
+
await async.sleep(ENDPOINT_READY_POLL_MS);
|
|
603
602
|
}
|
|
604
603
|
throw new Error(
|
|
605
604
|
`autopg: endpoint '${endpointId}' under projects/${project}/branches/${branch} did not become ready within ${ENDPOINT_READY_TIMEOUT_MS}ms (last state: ${last?.status?.current_state ?? "unknown"})`,
|