@nice-code/action 0.5.0 → 0.5.2

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.
@@ -1,28 +1,9 @@
1
- // src/ActionDefinition/Action/RunningAction.types.ts
2
- var ERunningActionState;
3
- ((ERunningActionState2) => {
4
- ERunningActionState2["running"] = "running";
5
- ERunningActionState2["completed"] = "completed";
6
- })(ERunningActionState ||= {});
7
- var ERunningActionUpdateType;
8
- ((ERunningActionUpdateType2) => {
9
- ERunningActionUpdateType2["started"] = "started";
10
- ERunningActionUpdateType2["progress"] = "progress";
11
- ERunningActionUpdateType2["finished"] = "finished";
12
- })(ERunningActionUpdateType ||= {});
13
- var ERunningActionFinishedType;
14
- ((ERunningActionFinishedType2) => {
15
- ERunningActionFinishedType2["aborted"] = "aborted";
16
- ERunningActionFinishedType2["failed"] = "failed";
17
- ERunningActionFinishedType2["success"] = "success";
18
- })(ERunningActionFinishedType ||= {});
19
-
20
1
  // src/devtools/server/NiceActionServerDevtools.ts
21
2
  class ActionServerDevtools {
22
3
  _options;
23
4
  _inFlight = new Map;
24
5
  constructor(options = {}) {
25
- const defaultEnabled = typeof process !== "undefined" ? false : true;
6
+ const defaultEnabled = typeof process !== "undefined" ? true : true;
26
7
  this._options = {
27
8
  logger: options.logger ?? defaultConsoleLogger,
28
9
  format: options.format ?? "pretty",
@@ -4,9 +4,11 @@ export interface INiceActionDevtoolsProps {
4
4
  core: ActionDevtoolsCore;
5
5
  position?: TDevtoolsPosition;
6
6
  initialOpen?: boolean;
7
+ /** Show the panel even when NODE_ENV is not "development". */
8
+ forceEnable?: boolean;
7
9
  }
8
10
  export interface IEntryGroup {
9
11
  representative: IDevtoolsActionEntry;
10
12
  rest: IDevtoolsActionEntry[];
11
13
  }
12
- export declare function NiceActionDevtools(props: INiceActionDevtoolsProps): import("react/jsx-runtime").JSX.Element | null;
14
+ export declare function NiceActionDevtools({ forceEnable, ...props }: INiceActionDevtoolsProps): import("react/jsx-runtime").JSX.Element | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-code/action",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
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.5.0",
48
- "@nice-code/error": "0.5.0",
49
- "@nice-code/util": "0.5.0",
47
+ "@nice-code/common-errors": "0.5.2",
48
+ "@nice-code/error": "0.5.2",
49
+ "@nice-code/util": "0.5.2",
50
50
  "@standard-schema/spec": "^1.1.0",
51
51
  "@tanstack/react-virtual": "^3.13.26",
52
52
  "http-status-codes": "^2.3.0",