@saptools/bruno 0.2.5 โ 0.2.7
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 +8 -6
- package/dist/cli.js +347 -265
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +34 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ You just ran Bruno against a production-grade XSUAA-protected service **without
|
|
|
46
46
|
- ๐ฆ **Bundled Bruno CLI fallback** โ if `bru` is already on your `PATH`, `saptools-bruno` uses it. If not, it falls back to the bundled [`@usebruno/cli`](https://www.npmjs.com/package/@usebruno/cli).
|
|
47
47
|
- ๐ฏ **Default context** โ `saptools-bruno use <shorthand>` pins a target so subsequent `run` calls need zero arguments. Feels like `cf target` for Bruno.
|
|
48
48
|
- ๐งฉ **CLI & typed API** โ every command has a zero-config Node.js equivalent. Full TypeScript definitions shipped. Bring your own prompts for headless/CI use.
|
|
49
|
-
- ๐งช **Fully tested** โ
|
|
49
|
+
- ๐งช **Fully tested** โ 83 unit tests + 7 offline e2e tests (stub `bru` binary + fixture CF snapshot). No network required in CI.
|
|
50
50
|
- ๐ชถ **Small + boring** โ three runtime deps, no background daemons, no plugin system, no magic.
|
|
51
51
|
|
|
52
52
|
---
|
|
@@ -129,6 +129,7 @@ After `setup-app`, your workspace looks like this:
|
|
|
129
129
|
|
|
130
130
|
```text
|
|
131
131
|
.
|
|
132
|
+
โโโ bruno.json
|
|
132
133
|
โโโ region__ap10/
|
|
133
134
|
โโโ org__my-org/
|
|
134
135
|
โโโ space__dev/
|
|
@@ -159,7 +160,7 @@ Your `.bru` requests reference `{{accessToken}}` like any other Bruno variable
|
|
|
159
160
|
|
|
160
161
|
### ๐๏ธ `saptools-bruno setup-app`
|
|
161
162
|
|
|
162
|
-
Interactively scaffold a Bruno app folder inside the current Bruno collection directory. Walks you through **region โ org โ space โ app**, then lets you **pick which environments to create** and
|
|
163
|
+
Interactively scaffold a Bruno app folder inside the current Bruno collection directory. Walks you through **region โ org โ space โ app**, then lets you **pick which environments to create** and add custom names without leaving the environment picker.
|
|
163
164
|
|
|
164
165
|
```bash
|
|
165
166
|
saptools-bruno setup-app
|
|
@@ -171,12 +172,13 @@ saptools-bruno --collection ./collections setup-app
|
|
|
171
172
|
|
|
172
173
|
**What you get**
|
|
173
174
|
|
|
175
|
+
- A root-level `bruno.json` if the collection directory does not already have one
|
|
174
176
|
- Folder tree: `region__<key>/org__<org>/space__<space>/<app>/environments/`
|
|
175
177
|
- One `.bru` env file per selection, each seeded with `__cf_region`, `__cf_org`, `__cf_space`, `__cf_app`, `environment`, and an empty `baseUrl`
|
|
176
178
|
- Existing env files are preserved; only missing `__cf_*` vars are patched back in
|
|
177
179
|
|
|
178
180
|
> [!TIP]
|
|
179
|
-
> The env prompt shows the common names (`local`, `dev`, `staging`, `prod`) plus any envs already on disk. Pre-existing envs are **pre-checked**; common ones are **not** โ so you only create what you actually need. The custom
|
|
181
|
+
> The env prompt shows the common names (`local`, `dev`, `staging`, `prod`) plus any envs already on disk. Pre-existing envs are **pre-checked**; common ones are **not** โ so you only create what you actually need. The menu also includes **Add custom environment**, and once you enter a value like `qa-eu` or `uat.us`, it appears back in the same checklist already selected so you can review the full set before finishing.
|
|
180
182
|
|
|
181
183
|
### โถ๏ธ `saptools-bruno run`
|
|
182
184
|
|
|
@@ -241,8 +243,7 @@ const result = await setupApp({
|
|
|
241
243
|
selectSpace: async (choices) => choices[0]!.value,
|
|
242
244
|
selectApp: async (choices) => choices[0]!.value,
|
|
243
245
|
confirmCreate: async () => true,
|
|
244
|
-
selectEnvironments: async ({ common }) => [...common],
|
|
245
|
-
inputCustomEnvName: async () => null,
|
|
246
|
+
selectEnvironments: async ({ common }) => [...common, "qa-eu"],
|
|
246
247
|
},
|
|
247
248
|
});
|
|
248
249
|
console.log(`Created ${result.environments.length} env files at ${result.appPath}`);
|
|
@@ -305,6 +306,7 @@ All state lives under your home directory or your collection root:
|
|
|
305
306
|
~/.saptools/bruno-context.json # pinned region/org/space/app + updatedAt
|
|
306
307
|
|
|
307
308
|
<root>/
|
|
309
|
+
โโโ bruno.json
|
|
308
310
|
โโโ region__<key>/
|
|
309
311
|
โโโ org__<org>/
|
|
310
312
|
โโโ space__<space>/
|
|
@@ -388,7 +390,7 @@ Only when you add a new app folder. `setup-app` on an existing app is idempotent
|
|
|
388
390
|
<details>
|
|
389
391
|
<summary><b>How do I add an env that isn't <code>local</code> / <code>dev</code> / <code>staging</code> / <code>prod</code>?</b></summary>
|
|
390
392
|
|
|
391
|
-
|
|
393
|
+
Choose **Add custom environment** inside the checkbox list. After you type any `[A-Za-z0-9._-]+` name (for example `qa-eu` or `uat.us`), the prompt returns to the same checklist with that new environment already selected.
|
|
392
394
|
|
|
393
395
|
</details>
|
|
394
396
|
|