@dbx-tools/core 0.6.81 → 0.6.85

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
@@ -16,6 +16,8 @@ Key features:
16
16
  - Workspace/project root discovery from package-manager files, git metadata, and
17
17
  the current working directory.
18
18
  - Safe filesystem stat and project naming helpers for CLIs and projen synth.
19
+ - Layered config from process env, environment-specific `.env` files, and
20
+ Databricks bundle App config or variables.
19
21
  - YAML/JSON brand-context discovery and loading with shared Zod validation.
20
22
  - Idempotent executable downloads with zip/tar extraction and atomic installs.
21
23
  - Keyed mutual exclusion across the main thread and its worker threads.
@@ -73,6 +75,26 @@ files. Missing files return the complete dbx tools default context; malformed
73
75
  files fail validation. Use `loadBrandContextFile(path)` for an explicit file and
74
76
  `resolveBrandAssetPath(path, asset)` for relative asset references.
75
77
 
78
+ ## Resolve Configuration
79
+
80
+ ```ts
81
+ import { config } from "@dbx-tools/core";
82
+
83
+ const publicDomain = config.string(undefined, "PUBLIC_DOMAIN", {
84
+ prefix: "TUNNEL",
85
+ });
86
+ const timeoutMs = config.positiveInt(undefined, "TIMEOUT_MS", 30_000, {
87
+ prefix: "SEARCH",
88
+ });
89
+ ```
90
+
91
+ Resolution is lazy and follows process env, `.env`, then Databricks bundle
92
+ configuration. The default `DBX_TOOLS` scope and an optional capability prefix
93
+ produce names such as `DBX_TOOLS_TUNNEL_PUBLIC_DOMAIN`, then
94
+ `TUNNEL_PUBLIC_DOMAIN`, then `PUBLIC_DOMAIN`. `.env.production` and `.env.prod`
95
+ are checked before `.env` when `NODE_ENV=production`; development uses
96
+ `.env.development` and `.env.dev`.
97
+
76
98
  ## Run Commands
77
99
 
78
100
  ```ts
package/index.ts CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  export * as bin from "./src/bin.ts";
6
6
  export * as brand from "./src/brand.ts";
7
+ export * as config from "./src/config.ts";
7
8
  export * as exec from "./src/exec.ts";
8
9
  export * as file from "./src/file.ts";
9
10
  export * as fileLock from "./src/file-lock.ts";
@@ -12,6 +13,8 @@ export * as project from "./src/project.ts";
12
13
  export type { BinContext, BinSelectionContext, BinSelector, BinVersionOutput, BinVersionParser, BinOptions, BinUrl } from "./src/bin.ts";
13
14
  export { BrandContextSchema, defaultBrandContext, parseBrandContext, brandContextJsonSchema, brandContextPrompt } from "./src/brand.ts";
14
15
  export type { BrandContext, BrandContextInput } from "./src/brand.ts";
16
+ export { MAX_TCP_PORT, ENV_ONLY, bundleValue, bundleResourceSchema, bundleEnvEntrySchema, bundleAppSchema } from "./src/config.ts";
17
+ export type { ConfigFile } from "./src/config.ts";
15
18
  export { COMMAND_NOT_FOUND_EXIT_CODE } from "./src/exec.ts";
16
19
  export type { ExecStdio, LineHandler, StdioOption, ExecResult, ChildProcessResult, ExecOptions, SyncExecStdio, SyncExecOptions, SpawnArgs } from "./src/exec.ts";
17
20
  export type { FileLockBackend, FileLockAcquisition, FileLockOptions } from "./src/file-lock.ts";
package/lib/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * as bin from "./src/bin.ts";
2
2
  export * as brand from "./src/brand.ts";
3
+ export * as config from "./src/config.ts";
3
4
  export * as exec from "./src/exec.ts";
4
5
  export * as file from "./src/file.ts";
5
6
  export * as fileLock from "./src/file-lock.ts";
@@ -8,6 +9,8 @@ export * as project from "./src/project.ts";
8
9
  export type { BinContext, BinSelectionContext, BinSelector, BinVersionOutput, BinVersionParser, BinOptions, BinUrl } from "./src/bin.ts";
9
10
  export { BrandContextSchema, defaultBrandContext, parseBrandContext, brandContextJsonSchema, brandContextPrompt } from "./src/brand.ts";
10
11
  export type { BrandContext, BrandContextInput } from "./src/brand.ts";
12
+ export { MAX_TCP_PORT, ENV_ONLY, bundleValue, bundleResourceSchema, bundleEnvEntrySchema, bundleAppSchema } from "./src/config.ts";
13
+ export type { ConfigFile } from "./src/config.ts";
11
14
  export { COMMAND_NOT_FOUND_EXIT_CODE } from "./src/exec.ts";
12
15
  export type { ExecStdio, LineHandler, StdioOption, ExecResult, ChildProcessResult, ExecOptions, SyncExecStdio, SyncExecOptions, SpawnArgs } from "./src/exec.ts";
13
16
  export type { FileLockBackend, FileLockAcquisition, FileLockOptions } from "./src/file-lock.ts";
package/lib/index.js CHANGED
@@ -3,11 +3,13 @@
3
3
  // Hand edits are overwritten on the next watch; this file is read-only.
4
4
  export * as bin from "./src/bin.js";
5
5
  export * as brand from "./src/brand.js";
6
+ export * as config from "./src/config.js";
6
7
  export * as exec from "./src/exec.js";
7
8
  export * as file from "./src/file.js";
8
9
  export * as fileLock from "./src/file-lock.js";
9
10
  export * as processLock from "./src/process-lock.js";
10
11
  export * as project from "./src/project.js";
11
12
  export { BrandContextSchema, defaultBrandContext, parseBrandContext, brandContextJsonSchema, brandContextPrompt } from "./src/brand.js";
13
+ export { MAX_TCP_PORT, ENV_ONLY, bundleValue, bundleResourceSchema, bundleEnvEntrySchema, bundleAppSchema } from "./src/config.js";
12
14
  export { COMMAND_NOT_FOUND_EXIT_CODE } from "./src/exec.js";
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSwyQ0FBMkM7QUFDM0MsbURBQW1EO0FBQ25ELHdFQUF3RTtBQUV4RSxPQUFPLEtBQUssR0FBRyxNQUFNLGNBQWMsQ0FBQztBQUNwQyxPQUFPLEtBQUssS0FBSyxNQUFNLGdCQUFnQixDQUFDO0FBQ3hDLE9BQU8sS0FBSyxJQUFJLE1BQU0sZUFBZSxDQUFDO0FBQ3RDLE9BQU8sS0FBSyxJQUFJLE1BQU0sZUFBZSxDQUFDO0FBQ3RDLE9BQU8sS0FBSyxRQUFRLE1BQU0sb0JBQW9CLENBQUM7QUFDL0MsT0FBTyxLQUFLLFdBQVcsTUFBTSx1QkFBdUIsQ0FBQzt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maWdGaWxlIH0gZnJvbSBcIi4vc3JjL2NvbmZpZy50c1wiO1xuZXhwb3J0IHsgQ09NTUFORF9OT1RfRk9VTkRfRVhJVF9DT0RFIH0gZnJvbSBcIi4vc3JjL2V4ZWMudHNcIjtcbmV4cG9ydCB0eXBlIHsgRXhlY1N0ZGlvLCBMaW5lSGFuZGxlciwgU3RkaW9PcHRpb24sIEV4ZWNSZXN1bHQsIENoaWxkUHJvY2Vzc1Jlc3VsdCwgRXhlY09wdGlvbnMsIFN5bmNFeGVjU3RkaW8sIFN5bmNFeGVjT3B0aW9ucywgU3Bhd25BcmdzIH0gZnJvbSBcIi4vc3JjL2V4ZWMudHNcIjtcbmV4cG9ydCB0eXBlIHsgRmlsZUxvY2tCYWNrZW5kLCBGaWxlTG9ja0FjcXVpc2l0aW9uLCBGaWxlTG9ja09wdGlvbnMgfSBmcm9tIFwiLi9zcmMvZmlsZS1sb2NrLnRzXCI7XG5leHBvcnQgdHlwZSB7IFByb2plY3RDb250ZXh0IH0gZnJvbSBcIi4vc3JjL3Byb2plY3QudHNcIjtcbiJdfQ==
@@ -0,0 +1,147 @@
1
+ /**
2
+ * Layered configuration lookup: environment, `.env`, Databricks bundle.
3
+ *
4
+ * Every package resolves settings the same way: take the caller's value, else
5
+ * an environment variable, else a default. Local development adds two fallback
6
+ * locations: `.env` files and `resources.apps.<app>.config.env` or root
7
+ * `variables` in `databricks.yml`.
8
+ *
9
+ * Two things make it cheap to call from a hot path:
10
+ *
11
+ * - {@link values} is LAZY (an `object.Sequence`), so `databricks bundle
12
+ * validate` is only spawned when the environment and `.env` both missed.
13
+ * - the parsed `.env` and bundle are cached through {@link context.cached}, so
14
+ * the spawn happens once per working directory and a `cwd` change misses
15
+ * rather than returning another project's config.
16
+ *
17
+ * Inside a deployed Databricks App both file sources are skipped outright
18
+ * ({@link isDatabricksAppEnv}): the platform has already turned them into real
19
+ * environment variables, there is no bundle to validate, and the `databricks`
20
+ * CLI is not on the image.
21
+ *
22
+ * Node-only (`child_process`, `fs`, `process`).
23
+ *
24
+ * @module
25
+ */
26
+ import { z } from "zod";
27
+ type ConfigKey = string | readonly string[];
28
+ /** Where a value may come from, consulted in the order given. */
29
+ type ConfigSource = "env" | "dotenv" | "bundle";
30
+ interface ConfigOptions {
31
+ /**
32
+ * Outermost namespaces tried before each key. Defaults to `DBX_TOOLS`.
33
+ */
34
+ scope?: string | readonly string[];
35
+ /** Capability namespaces inserted after the scope and before each key. */
36
+ prefix?: string | readonly string[];
37
+ /** Directory to resolve `.env` and the bundle from. Default: `process.cwd()`. */
38
+ cwd?: string;
39
+ /** Sources in precedence order. Default: `env`, `dotenv`, `bundle`. */
40
+ sources?: ConfigSource | readonly ConfigSource[];
41
+ }
42
+ /** A config file found on disk, with its parsed contents. */
43
+ export interface ConfigFile {
44
+ path: string;
45
+ data: Record<string, unknown>;
46
+ }
47
+ /** Highest valid TCP port number. */
48
+ export declare const MAX_TCP_PORT = 65535;
49
+ /** Exact process-environment lookup for callers that do not read local config files. */
50
+ export declare const ENV_ONLY: {
51
+ scope: readonly [];
52
+ sources: "env";
53
+ };
54
+ export declare const bundleValue: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
55
+ /**
56
+ * The GENERIC shape of a bundle resource: a name, and whatever else the resource
57
+ * type carries. Deliberately unopinionated and `passthrough()` - the concrete
58
+ * resource kinds (`sql_warehouse`, `genie_space`, `postgres`, ...) are
59
+ * Databricks-App concepts that belong to the package that resolves them, so
60
+ * node-appkit `.extend()`s this rather than this module knowing about them.
61
+ */
62
+ export declare const bundleResourceSchema: z.ZodObject<{
63
+ name: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
64
+ }, z.core.$loose>;
65
+ export declare const bundleEnvEntrySchema: z.ZodObject<{
66
+ name: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
67
+ value: z.ZodOptional<z.ZodString>;
68
+ value_from: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
69
+ }, z.core.$strip>;
70
+ export declare const bundleAppSchema: z.ZodObject<{
71
+ name: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
72
+ source_code_path: z.ZodOptional<z.ZodString>;
73
+ config: z.ZodOptional<z.ZodObject<{
74
+ env: z.ZodOptional<z.ZodArray<z.ZodObject<{
75
+ name: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
76
+ value: z.ZodOptional<z.ZodString>;
77
+ value_from: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
78
+ }, z.core.$strip>>>;
79
+ }, z.core.$strip>>;
80
+ resources: z.ZodOptional<z.ZodArray<z.ZodObject<{
81
+ name: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
82
+ }, z.core.$loose>>>;
83
+ }, z.core.$strip>;
84
+ /**
85
+ * Detect a Databricks App runtime from its required name, host, and port.
86
+ */
87
+ export declare function isDatabricksAppEnv(source?: Record<string, string | undefined>): boolean;
88
+ /**
89
+ * The first value that resolves for `input`, or `undefined`.
90
+ *
91
+ * @example
92
+ * const domain = config.text(["TUNNEL_PUBLIC_DOMAIN", "PUBLIC_DOMAIN"]);
93
+ */
94
+ export declare function text(input: ConfigKey, options?: ConfigOptions): string | undefined;
95
+ /**
96
+ * The PRIMARY (fully-scoped) name for `input` - what to print in a log line or an
97
+ * error, so the message names the variable a reader should set. Do not index
98
+ * `keys(...)[0]` for this if `input` may be a bare string.
99
+ *
100
+ * @example
101
+ * logger.warn(`${config.name(JWT_SECRET_ENV)} is not set`);
102
+ */
103
+ export declare function name(input: ConfigKey, options?: Pick<ConfigOptions, "scope" | "prefix">): string;
104
+ /**
105
+ * Resolve a string: `configured` when non-empty, else {@link text}, else `undefined`.
106
+ *
107
+ * The coercion rules are deliberately loose (`on` / `yes` / `1` are all
108
+ * `true`) because values may come from a file a human typed.
109
+ *
110
+ * @example
111
+ * config.string(options.host, "SMTP_HOST");
112
+ */
113
+ export declare function string(configured: unknown, input: ConfigKey, options?: ConfigOptions): string | undefined;
114
+ /**
115
+ * Resolve a boolean through `object.toBoolean`. `undefined` when neither source
116
+ * is interpretable, so the caller picks a default with `??`.
117
+ */
118
+ export declare function boolean(configured: unknown, input: ConfigKey, options?: ConfigOptions): boolean | undefined;
119
+ /**
120
+ * Resolve a positive number that may be fractional (a score threshold, a ratio).
121
+ * Use {@link positiveInt} for a count, port, or timeout.
122
+ */
123
+ export declare function positiveNumber(configured: unknown, input: ConfigKey, fallback: number, options?: ConfigOptions): number;
124
+ /**
125
+ * Resolve a positive integer (a port, a timeout, a page size), floored. A
126
+ * non-numeric or non-positive value is treated as ABSENT rather than fatal -
127
+ * these are ceilings where a sane default beats a boot failure.
128
+ */
129
+ export declare function positiveInt(configured: unknown, input: ConfigKey, fallback: number, options?: ConfigOptions): number;
130
+ /**
131
+ * Resolve a list through `string.parseList`, so an array from typed config and a
132
+ * `"a, b c"` string normalize identically. `[]` when neither source has entries.
133
+ */
134
+ export declare function list(configured: string | readonly string[] | undefined | null, input: ConfigKey, transform?: (entry: string) => string, options?: ConfigOptions): string[];
135
+ /**
136
+ * The Databricks bundle output for `cwd` - `databricks bundle validate --output
137
+ * json` run from the directory holding `databricks.yml`, with the config file's
138
+ * path. A non-zero validation may still return partial JSON with usable
139
+ * variables. `undefined` when there is no bundle, the CLI produces no JSON, or
140
+ * this process is a deployed Databricks App.
141
+ *
142
+ * Cached per working directory and `DATABRICKS_CONFIG_PROFILE` through
143
+ * {@link context.cached}, so changing either cannot return another context's
144
+ * bundle. A lookup for some other directory is not cached at all.
145
+ */
146
+ export declare function bundleFile(cwd?: string | null): ConfigFile | undefined;
147
+ export {};