@dbx-tools/cli 0.6.46 → 0.6.48
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 +25 -15
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -5,18 +5,20 @@ Bootstrap CLI for the dbx-tools projen workspace engine.
|
|
|
5
5
|
Run the `dbx-tools` command (aliased `dbxt`) to turn a folder that has no
|
|
6
6
|
`.projenrc.ts` or toolchain yet into a working dbx-tools workspace. Once that
|
|
7
7
|
workspace exists, everything else is a projen task you run with
|
|
8
|
-
`
|
|
9
|
-
the package modules when custom tooling needs the same root detection,
|
|
8
|
+
`bun run <task>` - the CLI only forwards to projen from that point on. Import
|
|
9
|
+
the package modules when custom tooling needs the same root detection, bun
|
|
10
10
|
delegation, or CLI program behavior.
|
|
11
11
|
|
|
12
12
|
Key features:
|
|
13
13
|
|
|
14
|
-
- Bootstrap path that scaffolds
|
|
14
|
+
- Bootstrap path that scaffolds bun/projen into an empty or partially-set-up
|
|
15
15
|
folder, including the initial install and synth.
|
|
16
16
|
- Toolchain repair for a cloned repo whose generated files and `node_modules`
|
|
17
17
|
are gitignored.
|
|
18
18
|
- Transparent forwarding to projen for any task once the workspace is ready.
|
|
19
|
-
-
|
|
19
|
+
- Custom-registry forcing that survives bun's own resolution rules, applied only
|
|
20
|
+
when the effective registry is not npmjs.
|
|
21
|
+
- Importable CLI/root/bun helpers for tests and thin wrapper commands.
|
|
20
22
|
|
|
21
23
|
## Bootstrap A Workspace
|
|
22
24
|
|
|
@@ -24,35 +26,43 @@ Key features:
|
|
|
24
26
|
dbx-tools sync
|
|
25
27
|
```
|
|
26
28
|
|
|
27
|
-
In an empty folder this creates the minimum
|
|
29
|
+
In an empty folder this creates the minimum bun/projen structure needed for
|
|
28
30
|
`@dbx-tools/projen`, installs the toolchain, and runs the first synth. In a
|
|
29
31
|
freshly cloned repo it seeds the missing toolchain and synthesizes. This is the
|
|
30
32
|
case projen cannot handle on its own, because there are no tasks to run yet.
|
|
31
33
|
|
|
34
|
+
The three cases the bin dispatches on, in order:
|
|
35
|
+
|
|
36
|
+
| Workspace state | What happens |
|
|
37
|
+
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
38
|
+
| No `.projenrc.ts` | Full bootstrap: scaffold, install, initial synth. |
|
|
39
|
+
| `.projenrc.ts` but no installed toolchain | Seed the toolchain, run the initial synth, then install. Task args are not forwarded, because the tasks they name do not exist until the first synth. |
|
|
40
|
+
| Established workspace | Ensure deps, bring the engine up to this CLI's version, forward the args to projen. |
|
|
41
|
+
|
|
32
42
|
## After Bootstrap, Use The Projen Tasks
|
|
33
43
|
|
|
34
44
|
The engine registers its commands as projen tasks on the workspace root, so run
|
|
35
45
|
them directly instead of going through this CLI:
|
|
36
46
|
|
|
37
47
|
```sh
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
48
|
+
bun run sync # one-shot full synth
|
|
49
|
+
bun run sync -- --watch # projenrc + barrels + openapi watchers
|
|
50
|
+
bun run barrels # rebuild every package-root index.ts barrel
|
|
51
|
+
bun run openapi # generate the openapi packages from tsoa controllers
|
|
52
|
+
bun run clean # remove generated (read-only) files; -y to skip the picker
|
|
43
53
|
```
|
|
44
54
|
|
|
45
55
|
`dbx-tools <task>` still works and forwards to the same projen task, but the
|
|
46
|
-
`
|
|
56
|
+
`bun run` form is the documented one for an established workspace.
|
|
47
57
|
|
|
48
58
|
## Use The CLI Internals
|
|
49
59
|
|
|
50
60
|
```ts
|
|
51
|
-
import { cli, root,
|
|
61
|
+
import { cli, root, bun } from "@dbx-tools/cli";
|
|
52
62
|
|
|
53
63
|
await cli.runCli(["sync"]);
|
|
54
64
|
const workspaceRoot = await root.findWorkspaceRoot();
|
|
55
|
-
|
|
65
|
+
bun.runProjen(["barrels"], workspaceRoot);
|
|
56
66
|
```
|
|
57
67
|
|
|
58
68
|
Importing internals is mainly useful for tests or wrapper scripts; most users
|
|
@@ -61,9 +71,9 @@ should run the `dbx-tools` bin.
|
|
|
61
71
|
## Modules
|
|
62
72
|
|
|
63
73
|
- `cli` - Commander entrypoint and `runCli()`.
|
|
64
|
-
- `bootstrap` - empty-workspace bootstrap.
|
|
74
|
+
- `bootstrap` - empty-workspace bootstrap, toolchain seeding, and the initial synth.
|
|
65
75
|
- `root` - workspace-root detection and bootstrap/install checks.
|
|
66
|
-
- `
|
|
76
|
+
- `bun` - bun discovery, workspace install, registry forcing, and projen delegation.
|
|
67
77
|
|
|
68
78
|
The reusable project classes and generators live in
|
|
69
79
|
[`@dbx-tools/projen`](../../../projen).
|
package/package.json
CHANGED
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@clack/prompts": "^1.7.0",
|
|
31
|
-
"@dbx-tools/core": "0.6.
|
|
32
|
-
"@dbx-tools/shared-core": "0.6.
|
|
31
|
+
"@dbx-tools/core": "0.6.48",
|
|
32
|
+
"@dbx-tools/shared-core": "0.6.48",
|
|
33
33
|
"commander": "^15.0.0"
|
|
34
34
|
},
|
|
35
35
|
"main": "./lib/index.js",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"./package.json": "./package.json"
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
-
"version": "0.6.
|
|
69
|
+
"version": "0.6.48",
|
|
70
70
|
"types": "./lib/index.d.ts",
|
|
71
71
|
"type": "module",
|
|
72
72
|
"exports": {
|