@nice-code/action 0.5.5 → 0.6.0
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 +35 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -215,6 +215,41 @@ function RenameUser() {
|
|
|
215
215
|
|
|
216
216
|
---
|
|
217
217
|
|
|
218
|
+
## Devtools
|
|
219
|
+
|
|
220
|
+
### Browser panel — `@nice-code/action/devtools/browser`
|
|
221
|
+
|
|
222
|
+
A dockable in-app panel showing every action run: status, timing, input/output, routing, errors, and call stacks. Renders only when `NODE_ENV === "development"` (or with `forceEnable`).
|
|
223
|
+
|
|
224
|
+
```tsx
|
|
225
|
+
import { ActionDevtoolsCore, NiceActionDevtools } from "@nice-code/action/devtools/browser";
|
|
226
|
+
|
|
227
|
+
const devtoolsCore = new ActionDevtoolsCore();
|
|
228
|
+
devtoolsCore.attachToDomain(appRoot);
|
|
229
|
+
|
|
230
|
+
function App() {
|
|
231
|
+
return (
|
|
232
|
+
<>
|
|
233
|
+
<MyApp />
|
|
234
|
+
<NiceActionDevtools core={devtoolsCore} position="dock-bottom" />
|
|
235
|
+
</>
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### Server logger — `@nice-code/action/devtools/server`
|
|
241
|
+
|
|
242
|
+
Logs action lifecycle (started / progress / success / error) with timings — pretty lines or newline-delimited JSON.
|
|
243
|
+
|
|
244
|
+
```ts
|
|
245
|
+
import { ActionServerDevtools } from "@nice-code/action/devtools/server";
|
|
246
|
+
|
|
247
|
+
const devtools = new ActionServerDevtools({ format: "json", logPayloads: false });
|
|
248
|
+
devtools.attachToDomain(appRoot);
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
218
253
|
## WebSocket transport
|
|
219
254
|
|
|
220
255
|
```ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice-code/action",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"build-types": "tsc --project tsconfig.build.json"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@nice-code/common-errors": "0.
|
|
48
|
-
"@nice-code/error": "0.
|
|
49
|
-
"@nice-code/util": "0.
|
|
47
|
+
"@nice-code/common-errors": "0.6.0",
|
|
48
|
+
"@nice-code/error": "0.6.0",
|
|
49
|
+
"@nice-code/util": "0.6.0",
|
|
50
50
|
"@standard-schema/spec": "^1.1.0",
|
|
51
51
|
"@tanstack/react-virtual": "^3.13.26",
|
|
52
52
|
"http-status-codes": "^2.3.0",
|