@dbx-tools/cli 0.6.45 → 0.6.47

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
@@ -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
- `pnpm 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, pnpm
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 pnpm/projen into an empty or partially-set-up
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
- - Importable CLI/root/pnpm helpers for tests and thin wrapper commands.
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 pnpm/projen structure needed for
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
- pnpm run sync # one-shot full synth
39
- pnpm run sync --watch # projenrc + barrels + openapi watchers
40
- pnpm run barrels # rebuild every package-root index.ts barrel
41
- pnpm run openapi # generate the openapi packages from tsoa controllers
42
- pnpm run clean # remove generated (read-only) files; -y to skip the picker
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
- `pnpm run` form is the documented one for an established workspace.
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, pnpm } from "@dbx-tools/cli";
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
- pnpm.runProjen(["barrels"], workspaceRoot);
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
- - `pnpm` - pnpm/projen command resolution and delegation.
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).
File without changes
package/package.json CHANGED
@@ -6,8 +6,8 @@
6
6
  "directory": "packages/cli/dbx-tools"
7
7
  },
8
8
  "bin": {
9
- "dbx-tools": "./bin/dbx-tools.ts",
10
- "dbxt": "./bin/dbx-tools.ts"
9
+ "dbx-tools": "./lib/bin/dbx-tools.js",
10
+ "dbxt": "./lib/bin/dbx-tools.js"
11
11
  },
12
12
  "scripts": {
13
13
  "build": "projen build",
@@ -28,11 +28,11 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@clack/prompts": "^1.7.0",
31
- "@dbx-tools/core": "0.6.45",
32
- "@dbx-tools/shared-core": "0.6.45",
31
+ "@dbx-tools/core": "0.6.47",
32
+ "@dbx-tools/shared-core": "0.6.47",
33
33
  "commander": "^15.0.0"
34
34
  },
35
- "main": "index.ts",
35
+ "main": "./lib/index.js",
36
36
  "license": "UNLICENSED",
37
37
  "publishConfig": {
38
38
  "access": "public",
@@ -66,15 +66,30 @@
66
66
  "./package.json": "./package.json"
67
67
  }
68
68
  },
69
- "version": "0.6.45",
70
- "types": "index.ts",
69
+ "version": "0.6.47",
70
+ "types": "./lib/index.d.ts",
71
71
  "type": "module",
72
72
  "exports": {
73
- ".": "./index.ts",
74
- "./bootstrap": "./src/bootstrap.ts",
75
- "./bun": "./src/bun.ts",
76
- "./cli": "./src/cli.ts",
77
- "./root": "./src/root.ts",
73
+ ".": {
74
+ "types": "./lib/index.d.ts",
75
+ "default": "./lib/index.js"
76
+ },
77
+ "./bootstrap": {
78
+ "types": "./lib/src/bootstrap.d.ts",
79
+ "default": "./lib/src/bootstrap.js"
80
+ },
81
+ "./bun": {
82
+ "types": "./lib/src/bun.d.ts",
83
+ "default": "./lib/src/bun.js"
84
+ },
85
+ "./cli": {
86
+ "types": "./lib/src/cli.d.ts",
87
+ "default": "./lib/src/cli.js"
88
+ },
89
+ "./root": {
90
+ "types": "./lib/src/root.d.ts",
91
+ "default": "./lib/src/root.js"
92
+ },
78
93
  "./package.json": "./package.json"
79
94
  },
80
95
  "files": [