@dbx-tools/cli-appkit-env 0.9.38 → 0.9.40
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 +47 -48
- package/index.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,77 +1,76 @@
|
|
|
1
1
|
# @dbx-tools/cli-appkit-env
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Export the environment that AppKit resolves so another process can use the same
|
|
4
|
+
Lakebase connection and application configuration. Choose shell, JSON, or
|
|
5
|
+
Windows output without repeating AppKit discovery in your startup scripts.
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
AppKit environment that [`@dbx-tools/appkit`](../../node/appkit) would
|
|
7
|
-
resolve before `createApp()`.
|
|
7
|
+
## Configure A Shell
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- Runs the same AppKit auto-configuration path used by
|
|
12
|
-
[`@dbx-tools/appkit`](../../node/appkit).
|
|
13
|
-
- Emits only variables that changed during auto-configuration.
|
|
14
|
-
- Supports shell `export`, JSON, and Windows `set` output formats.
|
|
15
|
-
- Provides importable env snapshot/diff/format helpers for tests and wrapper
|
|
16
|
-
CLIs.
|
|
17
|
-
- Keeps local shell setup aligned with deployed AppKit startup behavior.
|
|
18
|
-
|
|
19
|
-
## Load Env Into A Shell
|
|
9
|
+
Install the [`dbx` CLI](../dbx-tools), then run this from your AppKit project:
|
|
20
10
|
|
|
21
11
|
```sh
|
|
22
12
|
eval "$(dbx appkit env --quiet)"
|
|
23
13
|
```
|
|
24
14
|
|
|
25
|
-
The command
|
|
26
|
-
|
|
27
|
-
`
|
|
28
|
-
|
|
29
|
-
This package ships no bin of its own. It contributes the `appkit` command group
|
|
30
|
-
to the single `dbx` CLI in [`@dbx-tools/cli`](../dbx-tools), which is what you
|
|
31
|
-
install:
|
|
32
|
-
|
|
33
|
-
```sh
|
|
34
|
-
npm install --global @dbx-tools/cli
|
|
35
|
-
dbx appkit env --quiet
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
`dbx` imports this package lazily, so AppKit loads only when an `appkit`
|
|
39
|
-
command actually runs.
|
|
15
|
+
The command runs AppKit auto-configuration and prints only variables that were
|
|
16
|
+
added or changed. The default format is POSIX `export KEY=value` statements.
|
|
17
|
+
`--quiet` keeps configuration logs out of the output you evaluate.
|
|
40
18
|
|
|
41
|
-
|
|
42
|
-
|
|
19
|
+
Use this before starting a process that needs resolved variables such as
|
|
20
|
+
`PGHOST`, `PGDATABASE`, or `PGUSER`.
|
|
43
21
|
|
|
44
|
-
## Inspect
|
|
22
|
+
## Inspect Configuration
|
|
45
23
|
|
|
46
24
|
```sh
|
|
47
25
|
dbx appkit env --format json
|
|
48
26
|
dbx appkit env --format windows
|
|
49
27
|
```
|
|
50
28
|
|
|
51
|
-
|
|
52
|
-
`set KEY=value`
|
|
29
|
+
JSON is useful for process managers and scripts. Windows format produces
|
|
30
|
+
`set KEY=value` statements for `cmd.exe`. Review output before sharing it:
|
|
31
|
+
resolved configuration may contain credentials.
|
|
53
32
|
|
|
54
|
-
## Format
|
|
33
|
+
## Format Environment Changes In Code
|
|
55
34
|
|
|
56
35
|
```ts
|
|
57
36
|
import { envExport } from "@dbx-tools/cli-appkit-env";
|
|
58
37
|
|
|
59
38
|
const before = envExport.snapshotEnv();
|
|
60
|
-
process.env.PGHOST = "ep-
|
|
61
|
-
const
|
|
39
|
+
process.env.PGHOST = "ep-example.database.cloud.databricks.com";
|
|
40
|
+
const changed = envExport.diffEnv(before);
|
|
41
|
+
console.log(envExport.formatEnvExport(changed, "export"));
|
|
42
|
+
```
|
|
62
43
|
|
|
63
|
-
|
|
44
|
+
Reuse these helpers when a custom CLI or test needs the same formats. For AppKit
|
|
45
|
+
application startup itself, use
|
|
46
|
+
[`@dbx-tools/appkit`](../../node/appkit) rather than invoking a shell command.
|
|
47
|
+
|
|
48
|
+
<!-- cli-reference:start -->
|
|
49
|
+
|
|
50
|
+
## Command Reference
|
|
51
|
+
|
|
52
|
+
### `dbx appkit`
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
Usage: dbx appkit [command]
|
|
56
|
+
|
|
57
|
+
AppKit helpers: resolve the environment an AppKit app would start with.
|
|
58
|
+
|
|
59
|
+
Commands:
|
|
60
|
+
env [options] Run AppKit auto-config and print new/changed env vars.
|
|
64
61
|
```
|
|
65
62
|
|
|
66
|
-
|
|
67
|
-
that want the same output formats without invoking the bin.
|
|
63
|
+
### `dbx appkit env`
|
|
68
64
|
|
|
69
|
-
|
|
65
|
+
```text
|
|
66
|
+
Usage: dbx appkit env [options]
|
|
70
67
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
Run AppKit auto-config and print new/changed env vars.
|
|
69
|
+
|
|
70
|
+
Options:
|
|
71
|
+
-f, --format <format> Output: export (POSIX shell), windows (cmd set), or json. Defaults by
|
|
72
|
+
platform.
|
|
73
|
+
-q, --quiet Suppress auto-config log output (LOG_LEVEL=error)
|
|
74
|
+
```
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
[`@dbx-tools/appkit`](../../node/appkit).
|
|
76
|
+
<!-- cli-reference:end -->
|
package/index.ts
CHANGED
|
@@ -3,7 +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/cli-appkit-env";
|
|
6
|
-
export const PACKAGE_VERSION = "0.9.
|
|
6
|
+
export const PACKAGE_VERSION = "0.9.40";
|
|
7
7
|
export * as cli from "./src/cli.ts";
|
|
8
8
|
export * as envExport from "./src/env-export.ts";
|
|
9
9
|
export { CommanderError } from "./src/cli.ts";
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const PACKAGE_IDENTIFIER = "@dbx-tools/cli-appkit-env";
|
|
2
|
-
export declare const PACKAGE_VERSION = "0.9.
|
|
2
|
+
export declare const PACKAGE_VERSION = "0.9.40";
|
|
3
3
|
export * as cli from "./src/cli.ts";
|
|
4
4
|
export * as envExport from "./src/env-export.ts";
|
|
5
5
|
export { CommanderError } from "./src/cli.ts";
|
package/lib/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Regenerated from the exporting modules in ./src.
|
|
3
3
|
// Hand edits are overwritten on the next watch; this file is read-only.
|
|
4
4
|
export const PACKAGE_IDENTIFIER = "@dbx-tools/cli-appkit-env";
|
|
5
|
-
export const PACKAGE_VERSION = "0.9.
|
|
5
|
+
export const PACKAGE_VERSION = "0.9.40";
|
|
6
6
|
export * as cli from "./src/cli.js";
|
|
7
7
|
export * as envExport from "./src/env-export.js";
|
|
8
8
|
export { CommanderError } from "./src/cli.js";
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSwyQ0FBMkM7QUFDM0MsbURBQW1EO0FBQ25ELHdFQUF3RTtBQUV4RSxNQUFNLENBQUMsTUFBTSxrQkFBa0IsR0FBRywyQkFBMkIsQ0FBQztBQUM5RCxNQUFNLENBQUMsTUFBTSxlQUFlLEdBQUcsUUFBUSxDQUFDO0FBQ3hDLE9BQU8sS0FBSyxHQUFHLE1BQU0sY0FBYyxDQUFDO0FBQ3BDLE9BQU8sS0FBSyxTQUFTLE1BQU0scUJBQXFCLENBQUM7QUFDakQsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8vIEdFTkVSQVRFRCBieSBwcm9qZW4gd2F0Y2ggLSBETyBOT1QgRURJVC5cbi8vIFJlZ2VuZXJhdGVkIGZyb20gdGhlIGV4cG9ydGluZyBtb2R1bGVzIGluIC4vc3JjLlxuLy8gSGFuZCBlZGl0cyBhcmUgb3ZlcndyaXR0ZW4gb24gdGhlIG5leHQgd2F0Y2g7IHRoaXMgZmlsZSBpcyByZWFkLW9ubHkuXG5cbmV4cG9ydCBjb25zdCBQQUNLQUdFX0lERU5USUZJRVIgPSBcIkBkYngtdG9vbHMvY2xpLWFwcGtpdC1lbnZcIjtcbmV4cG9ydCBjb25zdCBQQUNLQUdFX1ZFUlNJT04gPSBcIjAuOS40MFwiO1xuZXhwb3J0ICogYXMgY2xpIGZyb20gXCIuL3NyYy9jbGkudHNcIjtcbmV4cG9ydCAqIGFzIGVudkV4cG9ydCBmcm9tIFwiLi9zcmMvZW52LWV4cG9ydC50c1wiO1xuZXhwb3J0IHsgQ29tbWFuZGVyRXJyb3IgfSBmcm9tIFwiLi9zcmMvY2xpLnRzXCI7XG5leHBvcnQgdHlwZSB7IEVudkV4cG9ydEZvcm1hdCB9IGZyb20gXCIuL3NyYy9lbnYtZXhwb3J0LnRzXCI7XG4iXX0=
|
package/package.json
CHANGED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@databricks/appkit": "0.81.0",
|
|
27
|
-
"@dbx-tools/appkit": "^0.9.
|
|
28
|
-
"@dbx-tools/shared-core": "^0.9.
|
|
27
|
+
"@dbx-tools/appkit": "^0.9.40",
|
|
28
|
+
"@dbx-tools/shared-core": "^0.9.40",
|
|
29
29
|
"commander": "^15.0.0"
|
|
30
30
|
},
|
|
31
31
|
"main": "./lib/index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"./package.json": "./package.json"
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
|
-
"version": "0.9.
|
|
53
|
+
"version": "0.9.40",
|
|
54
54
|
"types": "./lib/index.d.ts",
|
|
55
55
|
"dbxToolsConfig": {
|
|
56
56
|
"tags": [
|