simplemdg-dev-cli 2.0.4 → 2.4.5
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 +62 -354
- package/USER_GUIDE.md +55 -376
- package/dist/commands/cds.command.js +69 -60
- package/dist/commands/cds.command.js.map +1 -1
- package/dist/commands/cf-db.command.d.ts +2 -0
- package/dist/commands/cf-db.command.js +606 -0
- package/dist/commands/cf-db.command.js.map +1 -0
- package/dist/commands/cf.command.js +291 -280
- package/dist/commands/cf.command.js.map +1 -1
- package/dist/commands/gitlab.command.d.ts +2 -0
- package/dist/commands/gitlab.command.js +351 -0
- package/dist/commands/gitlab.command.js.map +1 -0
- package/dist/commands/npmrc.command.js +50 -44
- package/dist/commands/npmrc.command.js.map +1 -1
- package/dist/core/cache.d.ts +1 -1
- package/dist/core/cache.js +58 -31
- package/dist/core/cache.js.map +1 -1
- package/dist/core/cds.js +32 -22
- package/dist/core/cds.js.map +1 -1
- package/dist/core/cf-env-parser.d.ts +1 -1
- package/dist/core/cf-env-parser.js +4 -1
- package/dist/core/cf-env-parser.js.map +1 -1
- package/dist/core/cf.d.ts +1 -1
- package/dist/core/cf.js +46 -31
- package/dist/core/cf.js.map +1 -1
- package/dist/core/db/db-btp.d.ts +48 -0
- package/dist/core/db/db-btp.js +162 -0
- package/dist/core/db/db-btp.js.map +1 -0
- package/dist/core/db/db-cache.d.ts +40 -0
- package/dist/core/db/db-cache.js +188 -0
- package/dist/core/db/db-cache.js.map +1 -0
- package/dist/core/db/db-connection.d.ts +22 -0
- package/dist/core/db/db-connection.js +73 -0
- package/dist/core/db/db-connection.js.map +1 -0
- package/dist/core/db/db-crypto.d.ts +3 -0
- package/dist/core/db/db-crypto.js +54 -0
- package/dist/core/db/db-crypto.js.map +1 -0
- package/dist/core/db/db-hana-adapter.d.ts +36 -0
- package/dist/core/db/db-hana-adapter.js +251 -0
- package/dist/core/db/db-hana-adapter.js.map +1 -0
- package/dist/core/db/db-metadata.d.ts +25 -0
- package/dist/core/db/db-metadata.js +150 -0
- package/dist/core/db/db-metadata.js.map +1 -0
- package/dist/core/db/db-postgres-adapter.d.ts +34 -0
- package/dist/core/db/db-postgres-adapter.js +259 -0
- package/dist/core/db/db-postgres-adapter.js.map +1 -0
- package/dist/core/db/db-query-files.d.ts +20 -0
- package/dist/core/db/db-query-files.js +106 -0
- package/dist/core/db/db-query-files.js.map +1 -0
- package/dist/core/db/db-query-history.d.ts +5 -0
- package/dist/core/db/db-query-history.js +49 -0
- package/dist/core/db/db-query-history.js.map +1 -0
- package/dist/core/db/db-row.d.ts +28 -0
- package/dist/core/db/db-row.js +123 -0
- package/dist/core/db/db-row.js.map +1 -0
- package/dist/core/db/db-studio-client.d.ts +1 -0
- package/dist/core/db/db-studio-client.js +401 -0
- package/dist/core/db/db-studio-client.js.map +1 -0
- package/dist/core/db/db-studio-html.d.ts +4 -0
- package/dist/core/db/db-studio-html.js +83 -0
- package/dist/core/db/db-studio-html.js.map +1 -0
- package/dist/core/db/db-studio-server.d.ts +11 -0
- package/dist/core/db/db-studio-server.js +528 -0
- package/dist/core/db/db-studio-server.js.map +1 -0
- package/dist/core/db/db-studio-styles.d.ts +1 -0
- package/dist/core/db/db-studio-styles.js +225 -0
- package/dist/core/db/db-studio-styles.js.map +1 -0
- package/dist/core/db/db-types.d.ts +214 -0
- package/dist/core/db/db-types.js +3 -0
- package/dist/core/db/db-types.js.map +1 -0
- package/dist/core/db/db-vcap-parser.d.ts +7 -0
- package/dist/core/db/db-vcap-parser.js +137 -0
- package/dist/core/db/db-vcap-parser.js.map +1 -0
- package/dist/core/doctor.d.ts +1 -1
- package/dist/core/doctor.js +14 -8
- package/dist/core/doctor.js.map +1 -1
- package/dist/core/guide.js +31 -26
- package/dist/core/guide.js.map +1 -1
- package/dist/core/install.d.ts +1 -1
- package/dist/core/install.js +17 -11
- package/dist/core/install.js.map +1 -1
- package/dist/core/navigator.d.ts +17 -0
- package/dist/core/navigator.js +140 -0
- package/dist/core/navigator.js.map +1 -0
- package/dist/core/npmrc.js +29 -16
- package/dist/core/npmrc.js.map +1 -1
- package/dist/core/process.js +11 -6
- package/dist/core/process.js.map +1 -1
- package/dist/core/prompts.js +16 -8
- package/dist/core/prompts.js.map +1 -1
- package/dist/core/repository.d.ts +1 -1
- package/dist/core/repository.js +16 -9
- package/dist/core/repository.js.map +1 -1
- package/dist/core/scanner.d.ts +1 -1
- package/dist/core/scanner.js +13 -7
- package/dist/core/scanner.js.map +1 -1
- package/dist/core/tooling.d.ts +28 -0
- package/dist/core/tooling.js +168 -0
- package/dist/core/tooling.js.map +1 -0
- package/dist/core/types.js +2 -1
- package/dist/core/version-conflict.d.ts +2 -2
- package/dist/core/version-conflict.js +11 -6
- package/dist/core/version-conflict.js.map +1 -1
- package/dist/index.js +65 -48
- package/dist/index.js.map +1 -1
- package/dist/types-local.js +2 -1
- package/package.json +12 -6
- package/src/commands/cds.command.ts +529 -0
- package/src/commands/cf-db.command.ts +636 -0
- package/src/commands/cf.command.ts +3345 -0
- package/src/commands/gitlab.command.ts +373 -0
- package/src/commands/npmrc.command.ts +581 -0
- package/src/core/cache.ts +332 -0
- package/src/core/cds.ts +278 -0
- package/src/core/cf-env-parser.ts +131 -0
- package/src/core/cf.ts +271 -0
- package/src/core/db/db-btp.ts +207 -0
- package/src/core/db/db-cache.ts +242 -0
- package/src/core/db/db-connection.ts +79 -0
- package/src/core/db/db-crypto.ts +53 -0
- package/src/core/db/db-hana-adapter.ts +306 -0
- package/src/core/db/db-metadata.ts +174 -0
- package/src/core/db/db-postgres-adapter.ts +293 -0
- package/src/core/db/db-query-files.ts +130 -0
- package/src/core/db/db-query-history.ts +53 -0
- package/src/core/db/db-row.ts +157 -0
- package/src/core/db/db-studio-client.ts +397 -0
- package/src/core/db/db-studio-html.ts +85 -0
- package/src/core/db/db-studio-server.ts +626 -0
- package/src/core/db/db-studio-styles.ts +221 -0
- package/src/core/db/db-types.ts +243 -0
- package/src/core/db/db-vcap-parser.ts +182 -0
- package/src/core/doctor.ts +70 -0
- package/src/core/guide.ts +261 -0
- package/src/core/install.ts +91 -0
- package/src/core/navigator.ts +164 -0
- package/src/core/npmrc.ts +171 -0
- package/src/core/process.ts +75 -0
- package/src/core/prompts.ts +225 -0
- package/src/core/repository.ts +36 -0
- package/src/core/scanner.ts +41 -0
- package/src/core/tooling.ts +207 -0
- package/src/core/types.ts +152 -0
- package/src/core/version-conflict.ts +46 -0
- package/src/index.ts +460 -0
- package/src/types/external.d.ts +3 -0
- package/src/types-local.ts +11 -0
- package/tsconfig.json +17 -0
package/README.md
CHANGED
|
@@ -1,396 +1,104 @@
|
|
|
1
|
-
# SimpleMDG Dev CLI
|
|
1
|
+
# SimpleMDG Dev CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
SimpleMDG local development helper for npm install workflows, SAP CAP, Cloud Foundry/BTP, request tracing, GitLab sync, and BTP database exploration.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Install local package
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
smdg
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Install:
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npm i -g simplemdg-dev-cli@latest
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Open this guide:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
smdg guide
|
|
7
|
+
```powershell
|
|
8
|
+
npm install -g .\simplemdg-dev-cli-2.4.0.tgz --force
|
|
9
|
+
smdg -V
|
|
23
10
|
```
|
|
24
11
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
# Select Usage
|
|
28
|
-
|
|
29
|
-
When the CLI shows a select list:
|
|
30
|
-
|
|
31
|
-
* Type a few characters to search.
|
|
32
|
-
* Use `↑` and `↓` to move.
|
|
33
|
-
* Press `Enter` to select.
|
|
34
|
-
* If no item matches, some prompts allow using the typed value.
|
|
12
|
+
## Prerequisites & auto-install
|
|
35
13
|
|
|
36
|
-
|
|
14
|
+
Some commands rely on external CLIs: `cf` (Cloud Foundry), `cds` (SAP CAP), and `git`. The CLI checks for these **before** running an interactive flow — so you are not asked for credentials only to fail at the end. If a tool is missing, it offers to install it via a detected package manager (`choco`/`brew` for `cf`, `winget`/`choco`/`scoop`/`brew`/`apt-get` for `git`, `npm -g` for `@sap/cds-dk`), or prints the official install link when no manager is available. After installing a tool, open a new terminal so PATH refreshes.
|
|
37
15
|
|
|
38
|
-
|
|
16
|
+
## Main commands
|
|
39
17
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## `smdg npmrc import`
|
|
43
|
-
|
|
44
|
-
Import SimpleMDG GitLab package IDs into local cache.
|
|
45
|
-
|
|
46
|
-
Use this after downloading the package ID import file from the team.
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
smdg npmrc import
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## `smdg npmrc create`
|
|
53
|
-
|
|
54
|
-
Create `.npmrc` for SimpleMDG private npm packages.
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
smdg npmrc create
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
The CLI helps select package name/package ID and token from cache.
|
|
61
|
-
|
|
62
|
-
## `smdg i`
|
|
63
|
-
|
|
64
|
-
Install dependencies for the current project.
|
|
65
|
-
|
|
66
|
-
```bash
|
|
18
|
+
```powershell
|
|
67
19
|
smdg i
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
It can scan variables such as `${SIMPLEMDG_BRANCH}` and ask for replacement values automatically.
|
|
71
|
-
|
|
72
|
-
## `smdg cf login`
|
|
73
|
-
|
|
74
|
-
Login to BTP Cloud Foundry.
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
20
|
smdg cf login
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
The CLI helps select API endpoint, org, and space. Choose to save the password on your own machine if you want automatic re-login for org switching, logs, app listing, and debugging.
|
|
81
|
-
|
|
82
|
-
It can save login information on your local machine so later commands can re-login automatically when the CF session expires.
|
|
83
|
-
|
|
84
|
-
## `smdg cf org`
|
|
85
|
-
|
|
86
|
-
Search, list, and switch Cloud Foundry orgs across regions.
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
smdg cf org
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
The CLI scans known and cached BTP region endpoints and shows orgs from different regions in one searchable list. If the CF session for a region is expired, the CLI automatically re-authenticates by using the username/password saved from `smdg cf login`.
|
|
93
|
-
|
|
94
|
-
The list includes region information, for example:
|
|
95
|
-
|
|
96
|
-
```txt
|
|
97
|
-
arthrex-dev-simplemdg eu10 · 1 space
|
|
98
|
-
alcon-dev-simplemdg br10 · 1 space
|
|
99
|
-
ait-dev-simplemdg us21 · 1 space
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Use this when you have many orgs across many BTP regions. Run `smdg cf login` once and choose to save the password on your machine so org switching, app listing, logs, and debug can re-login automatically when the CF session expires.
|
|
103
|
-
|
|
104
|
-
## `smdg cf target`
|
|
105
|
-
|
|
106
|
-
Show the current Cloud Foundry target.
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
|
-
smdg cf target
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
It shows API endpoint, user, org, and space.
|
|
113
|
-
|
|
114
|
-
## `smdg cf apps`
|
|
115
|
-
|
|
116
|
-
List BTP apps in the current org and space.
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
21
|
smdg cf apps
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
The CLI uses cache first for speed and refreshes in the background.
|
|
123
|
-
|
|
124
|
-
## `smdg cf bind`
|
|
125
|
-
|
|
126
|
-
Bind the local CAP project to a deployed BTP app service.
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
22
|
smdg cf bind
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
This helps run `cds bind --to-app-services` and update `.cdsrc-private.json`.
|
|
133
|
-
|
|
134
|
-
## `smdg cf env`
|
|
135
|
-
|
|
136
|
-
Export BTP app environment variables to a clean JSON file.
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
23
|
smdg cf env
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Useful for creating `default-env.json`.
|
|
143
|
-
|
|
144
|
-
## `smdg cds watch`
|
|
145
|
-
|
|
146
|
-
Run CAP locally.
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
smdg cds watch
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
The CLI helps select CAP profile and port.
|
|
153
|
-
|
|
154
|
-
## `smdg cf logs`
|
|
155
|
-
|
|
156
|
-
View BTP app logs.
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
24
|
smdg cf logs
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
It can be used for realtime log monitoring.
|
|
163
|
-
|
|
164
|
-
## `smdg cf debug`
|
|
165
|
-
|
|
166
|
-
Debug a deployed BTP Cloud Foundry Node.js app.
|
|
167
|
-
|
|
168
|
-
```bash
|
|
169
|
-
smdg cf debug
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
The CLI guides you through:
|
|
173
|
-
|
|
174
|
-
* selecting current target or searching orgs across regions
|
|
175
|
-
* selecting BTP app
|
|
176
|
-
* selecting debug mode
|
|
177
|
-
* selecting app instance
|
|
178
|
-
* preparing Node.js inspector
|
|
179
|
-
* creating VS Code attach config
|
|
180
|
-
* opening the CF SSH tunnel
|
|
181
|
-
|
|
182
|
-
Recommended mode:
|
|
183
|
-
|
|
184
|
-
```txt
|
|
185
|
-
VS Code guided debugging
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
Important VS Code note:
|
|
189
|
-
|
|
190
|
-
The debug toolbar buttons such as pause, step over, restart, and stop only appear after VS Code successfully attaches to the running Node.js inspector.
|
|
191
|
-
|
|
192
|
-
Normal flow:
|
|
193
|
-
|
|
194
|
-
1. Run `smdg cf debug`.
|
|
195
|
-
2. Select `VS Code guided debugging`.
|
|
196
|
-
3. First time for an app, select `Set NODE_OPTIONS and restart app`.
|
|
197
|
-
4. Keep the terminal open because it owns the CF SSH tunnel.
|
|
198
|
-
5. In VS Code, open Run and Debug with `Ctrl+Shift+D`.
|
|
199
|
-
6. Select `Attach BTP <app-name>`.
|
|
200
|
-
7. Press `F5` or the green Start Debugging button.
|
|
201
|
-
8. After attach succeeds, the debug toolbar appears.
|
|
202
|
-
|
|
203
|
-
Use this mainly in dev/test environments because enabling Node inspector restarts the BTP app.
|
|
204
|
-
|
|
205
|
-
## `smdg cds compline`
|
|
206
|
-
|
|
207
|
-
Generate metadata XML from CDS services.
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
smdg cds compline
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
The CLI scans CDS services, suggests output XML names, and writes XML using UTF-8 encoding.
|
|
214
|
-
|
|
215
|
-
---
|
|
216
|
-
|
|
217
|
-
# Recommended Daily Flow
|
|
218
|
-
|
|
219
|
-
```bash
|
|
220
|
-
smdg npmrc create
|
|
221
|
-
smdg i
|
|
222
|
-
smdg cf login
|
|
223
|
-
smdg cf apps
|
|
224
|
-
smdg cf bind
|
|
225
|
-
smdg cf env
|
|
226
|
-
smdg cds watch
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
For logs:
|
|
230
|
-
|
|
231
|
-
```bash
|
|
232
|
-
smdg cf logs
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
For BTP debugging:
|
|
236
|
-
|
|
237
|
-
```bash
|
|
238
|
-
smdg cf debug
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
For metadata XML:
|
|
242
|
-
|
|
243
|
-
```bash
|
|
244
|
-
smdg cds compline
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
---
|
|
248
|
-
|
|
249
|
-
# Key Features
|
|
250
|
-
|
|
251
|
-
## Private npm registry helper
|
|
252
|
-
|
|
253
|
-
Creates `.npmrc` for SimpleMDG GitLab npm packages and caches package IDs with readable names.
|
|
254
|
-
|
|
255
|
-
## Smart install helper
|
|
256
|
-
|
|
257
|
-
Scans project variables like `${SIMPLEMDG_BRANCH}` and asks for values automatically before install.
|
|
258
|
-
|
|
259
|
-
## Cloud Foundry helper
|
|
260
|
-
|
|
261
|
-
Helps with login, target checking, org switching, app list, binding, env export, logs, and debugging.
|
|
262
|
-
|
|
263
|
-
## Across-region org search
|
|
264
|
-
|
|
265
|
-
Scans known and cached BTP regions and shows orgs from many regions in one searchable list. The CLI now re-authenticates per region using the cached login profile, so switching orgs should not fail just because `cf api` changed to another region.
|
|
266
|
-
|
|
267
|
-
## CAP helper
|
|
268
|
-
|
|
269
|
-
Helps run `cds watch`, select profiles/ports, and generate CDS metadata XML.
|
|
270
|
-
|
|
271
|
-
## VS Code BTP debugging
|
|
272
|
-
|
|
273
|
-
Creates VS Code attach config and opens a CF SSH tunnel to debug BTP Node.js apps from local source code. For the first debug session of an app, use `Set NODE_OPTIONS and restart app`; later sessions can use `Inspector is already enabled`.
|
|
274
|
-
|
|
275
|
-
---
|
|
276
|
-
|
|
277
|
-
# Notes
|
|
278
|
-
|
|
279
|
-
Do not commit real secrets to Git.
|
|
280
|
-
|
|
281
|
-
Files like `.npmrc`, `default-env.json`, and cached passwords may contain sensitive data.
|
|
282
|
-
|
|
283
|
-
Use saved password only on your own machine.
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
## Request Trace
|
|
287
|
-
|
|
288
|
-
```bash
|
|
289
25
|
smdg cf request-trace
|
|
26
|
+
smdg gitlab login
|
|
27
|
+
smdg gitlab clone
|
|
28
|
+
smdg gitlab pull
|
|
29
|
+
smdg cf db studio
|
|
290
30
|
```
|
|
291
31
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
The CLI guides you to select one or more apps, choose trace depth, prepare Node Inspector, inject a temporary runtime trace, and stream request logs.
|
|
295
|
-
|
|
296
|
-
It can show method, path, headers, request body, response body, status, and duration. Authorization tokens are masked by default and should only be shown fully in dev/test environments.
|
|
32
|
+
## GitLab sync
|
|
297
33
|
|
|
298
|
-
|
|
34
|
+
`gitlab` commands are implemented in the same source-code style as the existing CLI: command registration stays in `src/commands`, reusable logic stays close to the command, and cache files are stored under `~/.simplemdg`.
|
|
299
35
|
|
|
300
|
-
```
|
|
301
|
-
smdg
|
|
36
|
+
```powershell
|
|
37
|
+
smdg gitlab login
|
|
38
|
+
smdg gitlab groups
|
|
39
|
+
smdg gitlab clone
|
|
302
40
|
```
|
|
303
41
|
|
|
304
|
-
|
|
42
|
+
The clone/pull flow separates:
|
|
305
43
|
|
|
306
|
-
-
|
|
307
|
-
-
|
|
308
|
-
- It does not change repository source code.
|
|
309
|
-
- The trace disappears after app restart.
|
|
310
|
-
- Avoid full token/body tracing in production.
|
|
44
|
+
- pull/clone a root group
|
|
45
|
+
- pull/clone a single repository
|
|
311
46
|
|
|
312
|
-
|
|
47
|
+
It uses GitLab API and native `git`, so `ghorg` is not required. Pulling can run multiple repositories in parallel and skips invalid branch refs such as `origin` and `origin/HEAD`.
|
|
313
48
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
```bash
|
|
317
|
-
smdg cf http-watch
|
|
318
|
-
```
|
|
49
|
+
## CF DB Studio
|
|
319
50
|
|
|
320
|
-
|
|
51
|
+
A local, browser-based database explorer (HANA / PostgreSQL) styled after SAP HANA Database Explorer and DBeaver, with deep BTP/Cloud Foundry integration.
|
|
321
52
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
smdg cf request-trace-doctor
|
|
53
|
+
```powershell
|
|
54
|
+
smdg cf login
|
|
55
|
+
smdg cf db studio
|
|
326
56
|
```
|
|
327
57
|
|
|
328
|
-
`
|
|
58
|
+
Studio starts a local web server bound to `127.0.0.1` only (auto-selects a free port) and opens your browser. It is a DBeaver / SAP HANA Database Explorer–style IDE:
|
|
329
59
|
|
|
330
|
-
|
|
60
|
+
- opens on a **Welcome page**; SQL / Data / Structure tabs open only on demand (closable, with dirty indicators)
|
|
61
|
+
- **DBeaver-style lazy object tree**: connection → Catalog → Schemas → schema → Tables/Views/Procedures/Functions/Synonyms, loaded only when expanded, with per-folder search and count badges
|
|
62
|
+
- **right-click context menus** on tables/views (Open Data, Open Structure, Generate SELECT/COUNT, Copy Full Name) and connections (Connect, Test, Edit, Favorite, Refresh from BTP, Duplicate, Remove)
|
|
63
|
+
- **connection cards** with custom name, color, environment tag (DEV/QAS/PROD/SANDBOX), favorite star, and a production-like warning
|
|
64
|
+
- import credentials from a BTP app's `cf env` via a **guided modal wizard** (target → app → service → save), or **add direct connections** (host/port/user/password) for non-CF databases like Neon
|
|
65
|
+
- passwords are **encrypted** locally and never sent to the browser (the UI only uses a connection id)
|
|
66
|
+
- inspect metadata (columns incl. comments, indexes, primary key, row count, generated DDL)
|
|
67
|
+
- data grid with pagination, quick `WHERE` filter, click-to-sort headers, and **inline editing with pending changes** — edited cells highlight yellow, inserts green, deletes red; review then **Save** (batch, per-row results) or **Revert**; conflicts/failures stay pending with error markers
|
|
68
|
+
- editing requires a detected **primary key** (read-only grid otherwise)
|
|
69
|
+
- run any SQL across multiple tabs, with row-limit, timing, CSV/JSON export, save to `.sql`, history
|
|
70
|
+
- **read-only** mode blocks all writes/DDL; dangerous SQL (DROP/TRUNCATE/ALTER/DELETE-or-UPDATE-without-WHERE) asks for confirmation
|
|
71
|
+
- clear loading states (skeletons, spinners, status bar) for every async action
|
|
331
72
|
|
|
332
|
-
|
|
73
|
+
### Commands
|
|
333
74
|
|
|
334
|
-
```
|
|
335
|
-
smdg cf
|
|
75
|
+
```powershell
|
|
76
|
+
smdg cf db studio # open the local browser studio
|
|
77
|
+
smdg cf db add # add a direct connection manually (host/port/user/password)
|
|
78
|
+
smdg cf db import # import a connection from a BTP app's cf env
|
|
79
|
+
smdg cf db connections # list/test/rename/duplicate/remove cached connections
|
|
80
|
+
smdg cf db query # run one SQL query against a cached connection
|
|
81
|
+
smdg cf db console # interactive terminal SQL console (/help for commands)
|
|
336
82
|
```
|
|
337
83
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
Recommended test flow:
|
|
84
|
+
In the Studio, click **+ New** in the Connections sidebar to add a direct connection without leaving the browser.
|
|
341
85
|
|
|
342
|
-
|
|
343
|
-
2. Select the target app.
|
|
344
|
-
3. Select **Deep Node Inspector trace**.
|
|
345
|
-
4. Select **Headers + body**.
|
|
346
|
-
5. Select **Mask token** first.
|
|
347
|
-
6. If the inspector is not reachable, choose the prepare mode that sets `NODE_OPTIONS` and restarts the app.
|
|
348
|
-
7. Send a new request after the CLI prints that the trace is installed.
|
|
86
|
+
`smdg cf db studio` options: `--port <port>` (preferred port), `--read-only`, `--timeout <ms>`.
|
|
349
87
|
|
|
350
|
-
|
|
88
|
+
### Local cache files
|
|
351
89
|
|
|
352
|
-
|
|
353
|
-
#
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
```bash
|
|
358
|
-
smdg cf request-trace
|
|
90
|
+
```text
|
|
91
|
+
~/.simplemdg/db-connections.json # connection profiles (passwords encrypted)
|
|
92
|
+
~/.simplemdg/db-query-history.json # query history
|
|
93
|
+
~/.simplemdg/db-queries/ # saved .sql query files
|
|
359
94
|
```
|
|
360
95
|
|
|
361
|
-
|
|
96
|
+
Passwords are encrypted with a key derived from the current machine + user, so a copied cache file cannot be decrypted elsewhere.
|
|
362
97
|
|
|
363
|
-
|
|
364
|
-
smdg cf network-trace
|
|
365
|
-
```
|
|
98
|
+
### Database drivers
|
|
366
99
|
|
|
367
|
-
|
|
100
|
+
HANA and PostgreSQL drivers are optional dependencies. If a driver is missing, the studio reports it clearly. Install:
|
|
368
101
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
* Authorization handling: masked, full, or omitted
|
|
372
|
-
* displayed headers: minimal, common, all, or custom
|
|
373
|
-
* whether to parse body as JSON/form data
|
|
374
|
-
* whether to export trace events to a JSONL file
|
|
375
|
-
|
|
376
|
-
While the trace is running, you can type commands directly in the same terminal:
|
|
377
|
-
|
|
378
|
-
```txt
|
|
379
|
-
/method POST
|
|
380
|
-
/path getBusinessRequest
|
|
381
|
-
/body CR0000135951
|
|
382
|
-
/status 500
|
|
383
|
-
/text single.npi
|
|
384
|
-
/headers authorization,content-type,x-correlationid,x-vcap-request-id
|
|
385
|
-
/headers all
|
|
386
|
-
/clear
|
|
387
|
-
/show
|
|
388
|
-
/replay
|
|
389
|
-
/pause
|
|
390
|
-
/resume
|
|
391
|
-
/help
|
|
102
|
+
```powershell
|
|
103
|
+
npm i -g pg @sap/hana-client
|
|
392
104
|
```
|
|
393
|
-
|
|
394
|
-
Exported files use JSONL format: one request event per line. This makes it easier to search later with editor tools or scripts.
|
|
395
|
-
|
|
396
|
-
Security note: full Authorization token output should only be used in dev/test and on a trusted machine. The recommended mode is masked token.
|