@nice-code/action 0.6.3 → 0.8.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/build/devtools/browser/index.js +590 -1246
- package/build/devtools/server/index.js +7 -1
- package/build/index.js +1257 -972
- package/build/types/ActionRuntime/ActionRuntime.d.ts +23 -1
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/Transport.types.d.ts +6 -0
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/WebSocketConnection.d.ts +2 -1
- package/build/types/ActionRuntime/Handler/ExternalClient/Transport/WebSocket/secureWsChannel.d.ts +63 -0
- package/build/types/ActionRuntime/Handler/Server/ActionServerHandler.d.ts +64 -1
- package/build/types/ActionRuntime/Handler/Server/WsConnectionStateStore.d.ts +61 -0
- package/build/types/ActionRuntime/Handler/Server/createActionFetchHandler.d.ts +40 -0
- package/build/types/ActionRuntime/Handler/Server/createSecureActionServer.d.ts +71 -0
- package/build/types/devtools/browser/NiceActionDevtools.d.ts +1 -1
- package/build/types/devtools/browser/components/ActionErrorDisplay.d.ts +1 -1
- package/build/types/devtools/browser/components/CallStackSection.d.ts +1 -1
- package/build/types/devtools/browser/components/ChildDispatchChips.d.ts +1 -1
- package/build/types/devtools/browser/components/Chip.d.ts +1 -1
- package/build/types/devtools/browser/components/DetailSection.d.ts +1 -1
- package/build/types/devtools/browser/components/DomainChip.d.ts +1 -1
- package/build/types/devtools/browser/components/HandlerChips.d.ts +1 -1
- package/build/types/devtools/browser/components/Icon.d.ts +1 -1
- package/build/types/devtools/browser/components/MetaSection.d.ts +1 -1
- package/build/types/devtools/browser/components/NiceErrorDisplay.d.ts +2 -2
- package/build/types/devtools/browser/components/OriginChip.d.ts +1 -1
- package/build/types/devtools/browser/components/RoutingSection.d.ts +1 -1
- package/build/types/devtools/browser/components/RunningTimer.d.ts +2 -2
- package/build/types/devtools/browser/components/SectionLabel.d.ts +1 -4
- package/build/types/devtools/browser/components/StackTraceSection.d.ts +1 -1
- package/build/types/devtools/browser/components/Tooltip.d.ts +1 -24
- package/build/types/devtools/browser/components/action_detail/ActionDetailPanel.d.ts +1 -1
- package/build/types/devtools/browser/components/action_list/ActionEntryRow.d.ts +1 -1
- package/build/types/devtools/browser/components/action_list/ActionInputAndOutputChip.d.ts +1 -1
- package/build/types/devtools/browser/components/action_list/ActionList.d.ts +1 -1
- package/build/types/devtools/browser/components/action_list/IoTooltipContent.d.ts +1 -4
- package/build/types/devtools/browser/components/utils.d.ts +1 -3
- package/build/types/devtools/core/ActionDevtools.types.d.ts +1 -1
- package/build/types/devtools/core/ActionDevtoolsCore.d.ts +4 -1
- package/build/types/devtools/core/devtools_colors.d.ts +1 -26
- package/build/types/index.d.ts +5 -1
- package/package.json +33 -29
- package/build/types/devtools/browser/components/PanelChrome.d.ts +0 -41
- package/build/types/devtools/browser/devtools_dock.d.ts +0 -54
|
@@ -43,7 +43,10 @@ function extractMeta(context) {
|
|
|
43
43
|
class ActionDevtoolsCore {
|
|
44
44
|
_entries = [];
|
|
45
45
|
_listeners = new Set;
|
|
46
|
-
|
|
46
|
+
_maxEntries;
|
|
47
|
+
constructor(options = {}) {
|
|
48
|
+
this._maxEntries = options.maxEntries ?? 500;
|
|
49
|
+
}
|
|
47
50
|
attachToDomain(domain) {
|
|
48
51
|
return domain.addActionListener((update) => {
|
|
49
52
|
const { runningAction, type, time } = update;
|
|
@@ -63,6 +66,9 @@ class ActionDevtoolsCore {
|
|
|
63
66
|
callSite: runningAction.callSite
|
|
64
67
|
};
|
|
65
68
|
this._entries = [entry, ...this._entries];
|
|
69
|
+
if (this._entries.length > this._maxEntries) {
|
|
70
|
+
this._entries.length = this._maxEntries;
|
|
71
|
+
}
|
|
66
72
|
this._notify();
|
|
67
73
|
} else if (type === "progress" /* progress */) {
|
|
68
74
|
this._updateEntry(runningAction.cuid, (e) => ({
|