claude-flow-novice 2.0.3 → 2.0.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/dist/src/cli/commands/swarm.js +1 -1
- package/dist/src/cli/main.js +1 -1
- package/dist/src/coordination/byzantine-memory-channels.js +25 -1
- package/dist/src/index.js +384 -35
- package/dist/src/utils/error-handler.js +2 -36
- package/dist/src/web/api/apm-routes.js +353 -0
- package/dist/src/web/api/config/api-config.js +184 -0
- package/dist/src/web/api/middleware/auth.js +203 -0
- package/dist/src/web/api/middleware/cache.js +273 -0
- package/dist/src/web/api/middleware/error-handler.js +257 -0
- package/dist/src/web/api/middleware/request-logger.js +215 -0
- package/dist/src/web/api/middleware/validation.js +323 -0
- package/dist/src/web/api/routes/events.js +463 -0
- package/dist/src/web/api/routes/hierarchy.js +300 -0
- package/dist/src/web/api/routes/index.js +12 -0
- package/dist/src/web/api/routes/metrics.js +559 -0
- package/dist/src/web/api/routes/parallel-status.js +359 -0
- package/dist/src/web/api/routes/status.js +448 -0
- package/dist/src/web/api/server.js +462 -0
- package/dist/src/web/dashboard/hooks/useWebSocket.js +383 -0
- package/dist/src/web/dashboard/index.js +85 -0
- package/dist/src/web/dashboard/realtime/CustomSyncManager.js +439 -0
- package/dist/src/web/dashboard/realtime/NativeWebSocketManager.js +323 -0
- package/dist/src/web/dashboard/realtime/PerformanceBenchmark.js +527 -0
- package/dist/src/web/dashboard/realtime/RealtimeCommunicationManager.js +474 -0
- package/dist/src/web/dashboard/realtime/RealtimeServer.js +666 -0
- package/dist/src/web/dashboard/realtime/SSEManager.js +426 -0
- package/dist/src/web/dashboard/types.js +4 -0
- package/dist/src/web/messaging/agent-status-tracker.js +453 -0
- package/dist/src/web/messaging/human-intervention-system.js +305 -0
- package/dist/src/web/messaging/message-filter.js +302 -0
- package/dist/src/web/messaging/swarm-message-router.js +324 -0
- package/dist/src/web/messaging/transparency-logger.js +421 -0
- package/dist/src/web/portal-server.js +460 -0
- package/dist/src/web/server.js +322 -0
- package/dist/src/web/websocket/apm-websocket-handler.js +453 -0
- package/dist/src/web/websocket/websocket-manager.js +780 -0
- package/package.json +6 -4
- package/dist/src/cli/minimal-main.js +0 -22
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/documentSymbols/browser/documentSymbols.js +0 -23
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +0 -57
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +0 -401
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +0 -181
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution.js +0 -44
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +0 -157
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/edit.js +0 -71
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/editorState/browser/editorState.js +0 -112
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findController.js +0 -990
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findDecorations.js +0 -296
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findModel.js +0 -488
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findOptionsWidget.js +0 -138
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findState.js +0 -243
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findWidget.js +0 -1177
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/folding.js +0 -1093
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +0 -133
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingModel.js +0 -538
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingRanges.js +0 -351
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +0 -49
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/format.js +0 -360
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/formatActions.js +0 -263
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/formattingEdit.js +0 -54
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +0 -149
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/hover/browser/contentHover.js +0 -874
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/inlineCompletions/browser/commandIds.js +0 -7
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/inlineCompletions/browser/commands.js +0 -199
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/linesOperations/browser/copyLinesCommand.js +0 -70
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js +0 -26
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +0 -153
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +0 -33
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +0 -354
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/smartSelect/browser/bracketSelections.js +0 -146
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/suggest/browser/completionModel.js +0 -224
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +0 -119
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/edcore.main.js +0 -14
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.all.js +0 -63
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.api.js +0 -55
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.main.js +0 -7
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.worker.js +0 -25
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/standalone/browser/colorizer.js +0 -118
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/language/css/css.worker.js +0 -36869
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/language/css/cssMode.js +0 -2035
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/accessibility/browser/accessibilityService.js +0 -88
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/accessibility/common/accessibility.js +0 -9
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/action/common/action.js +0 -7
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/action/common/actionCommonCategories.js +0 -13
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/browser/actionList.js +0 -276
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/browser/actionWidget.js +0 -248
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/common/actionWidget.js +0 -5
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actions/common/actions.js +0 -409
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/audioCues/browser/audioCueService.js +0 -176
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/clipboard/browser/clipboardService.js +0 -141
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/clipboard/common/clipboardService.js +0 -6
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/commands/common/commands.js +0 -80
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configuration.js +0 -86
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurationModels.js +0 -554
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurationRegistry.js +0 -317
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurations.js +0 -41
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/browser/contextKeyService.js +0 -432
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/common/contextkey.js +0 -1547
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/common/contextkeys.js +0 -18
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextMenuHandler.js +0 -124
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextMenuService.js +0 -101
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextView.js +0 -7
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextViewService.js +0 -72
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/dialogs/common/dialogs.js +0 -2
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/dnd/browser/dnd.js +0 -36
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/editor/common/editor.js +0 -17
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/environment/common/environment.js +0 -2
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/extensions/common/extensions.js +0 -47
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/files/common/files.js +0 -9
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +0 -105
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/instantiation/common/descriptors.js +0 -11
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/instantiation/common/extensions.js +0 -15
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/keybinding/common/abstractKeybindingService.js +0 -277
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js +0 -53
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +0 -354
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/theme/browser/defaultStyles.js +0 -162
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/theme/common/colorRegistry.js +0 -482
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/abap/abap.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/apex/apex.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/azcli/azcli.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/bat/bat.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/bicep/bicep.js +0 -11
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cameligo/cameligo.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/clojure/clojure.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/coffee/coffee.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cpp/cpp.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/csharp/csharp.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/csp/csp.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/css/css.js +0 -12
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cypher/cypher.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/dart/dart.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/dockerfile/dockerfile.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/ecl/ecl.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/elixir/elixir.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/flow9/flow9.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.js +0 -745
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.de.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.es.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.fr.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.it.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ja.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ko.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ru.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.zh-cn.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.zh-tw.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/language/css/cssMode.js +0 -13
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/language/css/cssWorker.js +0 -81
- package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/cli.js +0 -64
- package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/example.js +0 -36
- package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/index.js +0 -205
- package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/test.js +0 -260
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.browser.js +0 -34
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.js +0 -35
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.native.js +0 -26
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/index.browser.js +0 -34
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/index.js +0 -45
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/nanoid.js +0 -1
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/non-secure/index.js +0 -21
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/url-alphabet/index.js +0 -3
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/bin/nodemon.js +0 -16
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/cli/index.js +0 -49
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/cli/parse.js +0 -230
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/command.js +0 -43
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/defaults.js +0 -34
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/exec.js +0 -234
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/index.js +0 -93
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/load.js +0 -225
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/help/index.js +0 -27
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/index.js +0 -1
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/index.js +0 -4
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/match.js +0 -287
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/run.js +0 -562
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/signals.js +0 -34
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/watch.js +0 -244
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/nodemon.js +0 -317
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/add.js +0 -89
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/index.js +0 -53
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/parse.js +0 -43
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/spawn.js +0 -74
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/bus.js +0 -44
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/clone.js +0 -40
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/colour.js +0 -26
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/index.js +0 -103
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/log.js +0 -82
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/merge.js +0 -47
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/version.js +0 -100
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/brace-expansion/index.js +0 -201
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/has-flag/index.js +0 -8
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/minimatch/minimatch.js +0 -947
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/supports-color/browser.js +0 -5
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/supports-color/index.js +0 -131
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/bin/pidtree.js +0 -128
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/index.js +0 -49
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/bin.js +0 -61
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/get.js +0 -45
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/pidtree.js +0 -104
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/ps.js +0 -47
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/wmic.js +0 -49
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/doc.js +0 -1270
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/acorn.js +0 -15
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/angular.js +0 -2
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/babel.js +0 -15
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/estree.js +0 -36
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/flow.js +0 -19
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/glimmer.js +0 -29
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/graphql.js +0 -29
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/html.js +0 -22
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/markdown.js +0 -63
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/meriyah.js +0 -4
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/postcss.js +0 -54
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/typescript.js +0 -20
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/yaml.js +0 -160
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/standalone.js +0 -34
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/bin/react-scripts.js +0 -58
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/env.js +0 -112
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/getHttpsConfig.js +0 -74
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/babelTransform.js +0 -37
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/cssTransform.js +0 -22
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/fileTransform.js +0 -40
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/modules.js +0 -142
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/paths.js +0 -153
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpack/persistentCache/createEnvironmentHash.js +0 -9
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpack.config.js +0 -796
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpackDevServer.config.js +0 -135
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/scripts/build.js +0 -225
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/scripts/eject.js +0 -340
package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/supports-color/index.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
const os = require('os');
|
|
3
|
-
const hasFlag = require('has-flag');
|
|
4
|
-
|
|
5
|
-
const env = process.env;
|
|
6
|
-
|
|
7
|
-
let forceColor;
|
|
8
|
-
if (hasFlag('no-color') ||
|
|
9
|
-
hasFlag('no-colors') ||
|
|
10
|
-
hasFlag('color=false')) {
|
|
11
|
-
forceColor = false;
|
|
12
|
-
} else if (hasFlag('color') ||
|
|
13
|
-
hasFlag('colors') ||
|
|
14
|
-
hasFlag('color=true') ||
|
|
15
|
-
hasFlag('color=always')) {
|
|
16
|
-
forceColor = true;
|
|
17
|
-
}
|
|
18
|
-
if ('FORCE_COLOR' in env) {
|
|
19
|
-
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function translateLevel(level) {
|
|
23
|
-
if (level === 0) {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return {
|
|
28
|
-
level,
|
|
29
|
-
hasBasic: true,
|
|
30
|
-
has256: level >= 2,
|
|
31
|
-
has16m: level >= 3
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function supportsColor(stream) {
|
|
36
|
-
if (forceColor === false) {
|
|
37
|
-
return 0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (hasFlag('color=16m') ||
|
|
41
|
-
hasFlag('color=full') ||
|
|
42
|
-
hasFlag('color=truecolor')) {
|
|
43
|
-
return 3;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (hasFlag('color=256')) {
|
|
47
|
-
return 2;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (stream && !stream.isTTY && forceColor !== true) {
|
|
51
|
-
return 0;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const min = forceColor ? 1 : 0;
|
|
55
|
-
|
|
56
|
-
if (process.platform === 'win32') {
|
|
57
|
-
// Node.js 7.5.0 is the first version of Node.js to include a patch to
|
|
58
|
-
// libuv that enables 256 color output on Windows. Anything earlier and it
|
|
59
|
-
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
60
|
-
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
61
|
-
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
62
|
-
// that supports 16m/TrueColor.
|
|
63
|
-
const osRelease = os.release().split('.');
|
|
64
|
-
if (
|
|
65
|
-
Number(process.versions.node.split('.')[0]) >= 8 &&
|
|
66
|
-
Number(osRelease[0]) >= 10 &&
|
|
67
|
-
Number(osRelease[2]) >= 10586
|
|
68
|
-
) {
|
|
69
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return 1;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
if ('CI' in env) {
|
|
76
|
-
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
77
|
-
return 1;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return min;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
if ('TEAMCITY_VERSION' in env) {
|
|
84
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (env.COLORTERM === 'truecolor') {
|
|
88
|
-
return 3;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
if ('TERM_PROGRAM' in env) {
|
|
92
|
-
const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
|
93
|
-
|
|
94
|
-
switch (env.TERM_PROGRAM) {
|
|
95
|
-
case 'iTerm.app':
|
|
96
|
-
return version >= 3 ? 3 : 2;
|
|
97
|
-
case 'Apple_Terminal':
|
|
98
|
-
return 2;
|
|
99
|
-
// No default
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
104
|
-
return 2;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
108
|
-
return 1;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
if ('COLORTERM' in env) {
|
|
112
|
-
return 1;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
if (env.TERM === 'dumb') {
|
|
116
|
-
return min;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return min;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function getSupportLevel(stream) {
|
|
123
|
-
const level = supportsColor(stream);
|
|
124
|
-
return translateLevel(level);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
module.exports = {
|
|
128
|
-
supportsColor: getSupportLevel,
|
|
129
|
-
stdout: getSupportLevel(process.stdout),
|
|
130
|
-
stderr: getSupportLevel(process.stderr)
|
|
131
|
-
};
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
'use strict';
|
|
4
|
-
|
|
5
|
-
var os = require('os');
|
|
6
|
-
var pidtree = require('..');
|
|
7
|
-
|
|
8
|
-
// The method startsWith is not defined on string objects in node 0.10
|
|
9
|
-
// eslint-disable-next-line no-extend-native
|
|
10
|
-
String.prototype.startsWith = function(suffix) {
|
|
11
|
-
return this.substring(0, suffix.length) === suffix;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
function help() {
|
|
15
|
-
var help =
|
|
16
|
-
' Usage\n' +
|
|
17
|
-
' $ pidtree <ppid>\n' +
|
|
18
|
-
'\n' +
|
|
19
|
-
'Options\n' +
|
|
20
|
-
' --list To print the pids as a list.\n' +
|
|
21
|
-
'\n' +
|
|
22
|
-
'Examples\n' +
|
|
23
|
-
' $ pidtree\n' +
|
|
24
|
-
' $ pidtree --list\n' +
|
|
25
|
-
' $ pidtree 1\n' +
|
|
26
|
-
' $ pidtree 1 --list\n';
|
|
27
|
-
console.log(help);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function list(ppid) {
|
|
31
|
-
pidtree(ppid === undefined ? -1 : ppid, function(err, list) {
|
|
32
|
-
if (err) {
|
|
33
|
-
console.error(err.message);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
console.log(list.join(os.EOL));
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function tree(ppid) {
|
|
42
|
-
pidtree(ppid, {advanced: true}, function(err, list) {
|
|
43
|
-
if (err) {
|
|
44
|
-
console.error(err.message);
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
var parents = {}; // Hash Map of parents
|
|
49
|
-
var tree = {}; // Adiacency Hash Map
|
|
50
|
-
while (list.length > 0) {
|
|
51
|
-
var element = list.pop();
|
|
52
|
-
if (tree[element.ppid]) {
|
|
53
|
-
tree[element.ppid].push(element.pid);
|
|
54
|
-
} else {
|
|
55
|
-
tree[element.ppid] = [element.pid];
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
if (ppid === -1) {
|
|
59
|
-
parents[element.pid] = element.ppid;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
var roots = [ppid];
|
|
64
|
-
if (ppid === -1) {
|
|
65
|
-
// Get all the roots
|
|
66
|
-
roots = Object.keys(tree).filter(function(node) {
|
|
67
|
-
return parents[node] === undefined;
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
roots.forEach(function(root) {
|
|
72
|
-
print(tree, root);
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
function print(tree, start) {
|
|
77
|
-
function printBranch(node, branch) {
|
|
78
|
-
var isGraphHead = branch.length === 0;
|
|
79
|
-
var children = tree[node] || [];
|
|
80
|
-
|
|
81
|
-
var branchHead = '';
|
|
82
|
-
if (!isGraphHead) {
|
|
83
|
-
branchHead = children.length > 0 ? '┬ ' : '─ ';
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
console.log(branch + branchHead + node);
|
|
87
|
-
|
|
88
|
-
var baseBranch = branch;
|
|
89
|
-
if (!isGraphHead) {
|
|
90
|
-
var isChildOfLastBranch = branch.slice(-2) === '└─';
|
|
91
|
-
baseBranch = branch.slice(0, -2) + (isChildOfLastBranch ? ' ' : '| ');
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
var nextBranch = baseBranch + '├─';
|
|
95
|
-
var lastBranch = baseBranch + '└─';
|
|
96
|
-
children.forEach(function(child, index) {
|
|
97
|
-
printBranch(
|
|
98
|
-
child,
|
|
99
|
-
children.length - 1 === index ? lastBranch : nextBranch
|
|
100
|
-
);
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
printBranch(start, '');
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function run() {
|
|
109
|
-
var flag;
|
|
110
|
-
var ppid;
|
|
111
|
-
for (var i = 2; i < process.argv.length; i++) {
|
|
112
|
-
if (process.argv[i].startsWith('--')) {
|
|
113
|
-
flag = process.argv[i];
|
|
114
|
-
} else {
|
|
115
|
-
ppid = process.argv[i];
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (ppid === undefined) {
|
|
120
|
-
ppid = -1;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
if (flag === '--list') list(ppid);
|
|
124
|
-
else if (flag === undefined) tree(ppid);
|
|
125
|
-
else help();
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
run();
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function pify(fn, arg1, arg2) {
|
|
4
|
-
return new Promise(function(resolve, reject) {
|
|
5
|
-
fn(arg1, arg2, function(err, data) {
|
|
6
|
-
if (err) return reject(err);
|
|
7
|
-
resolve(data);
|
|
8
|
-
});
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// Node versions prior to 4.0.0 do not define have `startsWith`.
|
|
13
|
-
/* istanbul ignore if */
|
|
14
|
-
if (!String.prototype.startsWith) {
|
|
15
|
-
// eslint-disable-next-line no-extend-native
|
|
16
|
-
String.prototype.startsWith = function(suffix) {
|
|
17
|
-
return this.substring(0, suffix.length) === suffix;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
var pidtree = require('./lib/pidtree');
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Get the list of children pids of the given pid.
|
|
25
|
-
* @public
|
|
26
|
-
* @param {Number|String} pid A PID. If -1 will return all the pids.
|
|
27
|
-
* @param {Object} [options] Optional options object.
|
|
28
|
-
* @param {Boolean} [options.root=false] Include the provided PID in the list.
|
|
29
|
-
* @param {Boolean} [options.advanced=false] Returns a list of objects in the
|
|
30
|
-
* format {pid: X, ppid: Y}.
|
|
31
|
-
* @param {Function} [callback=undefined] Called when the list is ready. If not
|
|
32
|
-
* provided a promise is returned instead.
|
|
33
|
-
* @returns {Promise.<Object[]>} Only when the callback is not provided.
|
|
34
|
-
*/
|
|
35
|
-
function list(pid, options, callback) {
|
|
36
|
-
if (typeof options === 'function') {
|
|
37
|
-
callback = options;
|
|
38
|
-
options = undefined;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (typeof callback === 'function') {
|
|
42
|
-
pidtree(pid, options, callback);
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return pify(pidtree, pid, options);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
module.exports = list;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var spawn = require('child_process').spawn;
|
|
4
|
-
|
|
5
|
-
function stripStderr(stderr) {
|
|
6
|
-
if (!stderr) return;
|
|
7
|
-
stderr = stderr.trim();
|
|
8
|
-
// Strip bogus screen size error.
|
|
9
|
-
// See https://github.com/microsoft/vscode/issues/98590
|
|
10
|
-
var regex = /your \d+x\d+ screen size is bogus\. expect trouble/gi;
|
|
11
|
-
stderr = stderr.replace(regex, '');
|
|
12
|
-
|
|
13
|
-
return stderr.trim();
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Spawn a binary and read its stdout.
|
|
18
|
-
* @param {String} cmd The name of the binary to spawn.
|
|
19
|
-
* @param {String[]} args The arguments for the binary.
|
|
20
|
-
* @param {Object} [options] Optional option for the spawn function.
|
|
21
|
-
* @param {Function} done(err, stdout)
|
|
22
|
-
*/
|
|
23
|
-
function run(cmd, args, options, done) {
|
|
24
|
-
if (typeof options === 'function') {
|
|
25
|
-
done = options;
|
|
26
|
-
options = undefined;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var executed = false;
|
|
30
|
-
var ch = spawn(cmd, args, options);
|
|
31
|
-
var stdout = '';
|
|
32
|
-
var stderr = '';
|
|
33
|
-
|
|
34
|
-
ch.stdout.on('data', function(d) {
|
|
35
|
-
stdout += d.toString();
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
ch.stderr.on('data', function(d) {
|
|
39
|
-
stderr += d.toString();
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
ch.on('error', function(err) {
|
|
43
|
-
if (executed) return;
|
|
44
|
-
executed = true;
|
|
45
|
-
done(new Error(err));
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
ch.on('close', function(code) {
|
|
49
|
-
if (executed) return;
|
|
50
|
-
executed = true;
|
|
51
|
-
|
|
52
|
-
stderr = stripStderr(stderr);
|
|
53
|
-
if (stderr) {
|
|
54
|
-
return done(new Error(stderr));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
done(null, stdout, code);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
module.exports = run;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var os = require('os');
|
|
4
|
-
|
|
5
|
-
var platformToMethod = {
|
|
6
|
-
darwin: 'ps',
|
|
7
|
-
sunos: 'ps',
|
|
8
|
-
freebsd: 'ps',
|
|
9
|
-
netbsd: 'ps',
|
|
10
|
-
win: 'wmic',
|
|
11
|
-
linux: 'ps',
|
|
12
|
-
aix: 'ps',
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
var methodToRequireFn = {
|
|
16
|
-
ps: () => require("./ps"),
|
|
17
|
-
wmic: () => require("./wmic")
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
var platform = os.platform();
|
|
21
|
-
if (platform.startsWith('win')) {
|
|
22
|
-
platform = 'win';
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var method = platformToMethod[platform];
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Gets the list of all the pids of the system.
|
|
29
|
-
* @param {Function} callback Called when the list is ready.
|
|
30
|
-
*/
|
|
31
|
-
function get(callback) {
|
|
32
|
-
if (method === undefined) {
|
|
33
|
-
callback(
|
|
34
|
-
new Error(
|
|
35
|
-
os.platform() +
|
|
36
|
-
' is not supported yet, please open an issue (https://github.com/simonepri/pidtree)'
|
|
37
|
-
)
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
var list = methodToRequireFn[method]();
|
|
42
|
-
list(callback);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
module.exports = get;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var getAll = require('./get');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Get the list of children and grandchildren pids of the given PID.
|
|
7
|
-
* @param {Number|String} PID A PID. If -1 will return all the pids.
|
|
8
|
-
* @param {Object} [options] Optional options object.
|
|
9
|
-
* @param {Boolean} [options.root=false] Include the provided PID in the list.
|
|
10
|
-
* @param {Boolean} [options.advanced=false] Returns a list of objects in the
|
|
11
|
-
* format {pid: X, ppid: Y}.
|
|
12
|
-
* @param {Function} callback(err, list) Called when the list is ready.
|
|
13
|
-
*/
|
|
14
|
-
function list(PID, options, callback) {
|
|
15
|
-
if (typeof options === 'function') {
|
|
16
|
-
callback = options;
|
|
17
|
-
options = {};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
if (typeof options !== 'object') {
|
|
21
|
-
options = {};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
PID = parseInt(PID, 10);
|
|
25
|
-
if (isNaN(PID) || PID < -1) {
|
|
26
|
-
callback(new TypeError('The pid provided is invalid'));
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
getAll(function(err, list) {
|
|
31
|
-
if (err) {
|
|
32
|
-
callback(err);
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// If the user wants the whole list just return it
|
|
37
|
-
if (PID === -1) {
|
|
38
|
-
for (var i = 0; i < list.length; i++) {
|
|
39
|
-
list[i] = options.advanced
|
|
40
|
-
? {ppid: list[i][0], pid: list[i][1]}
|
|
41
|
-
: (list[i] = list[i][1]);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
callback(null, list);
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
var root;
|
|
49
|
-
for (var l = 0; l < list.length; l++) {
|
|
50
|
-
if (list[l][1] === PID) {
|
|
51
|
-
root = options.advanced ? {ppid: list[l][0], pid: PID} : PID;
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (list[l][0] === PID) {
|
|
56
|
-
root = options.advanced ? {pid: PID} : PID; // Special pids like 0 on *nix
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (!root) {
|
|
61
|
-
callback(new Error('No matching pid found'));
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Build the adiacency Hash Map (pid -> [children of pid])
|
|
66
|
-
var tree = {};
|
|
67
|
-
while (list.length > 0) {
|
|
68
|
-
var element = list.pop();
|
|
69
|
-
if (tree[element[0]]) {
|
|
70
|
-
tree[element[0]].push(element[1]);
|
|
71
|
-
} else {
|
|
72
|
-
tree[element[0]] = [element[1]];
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// Starting by the PID provided by the user, traverse the tree using the
|
|
77
|
-
// adiacency Hash Map until the whole subtree is visited.
|
|
78
|
-
// Each pid encountered while visiting is added to the pids array.
|
|
79
|
-
var idx = 0;
|
|
80
|
-
var pids = [root];
|
|
81
|
-
while (idx < pids.length) {
|
|
82
|
-
var curpid = options.advanced ? pids[idx++].pid : pids[idx++];
|
|
83
|
-
if (!tree[curpid]) continue;
|
|
84
|
-
var length = tree[curpid].length;
|
|
85
|
-
for (var j = 0; j < length; j++) {
|
|
86
|
-
pids.push(
|
|
87
|
-
options.advanced
|
|
88
|
-
? {ppid: curpid, pid: tree[curpid][j]}
|
|
89
|
-
: tree[curpid][j]
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
delete tree[curpid];
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (!options.root) {
|
|
97
|
-
pids.shift(); // Remove root
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
callback(null, pids);
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
module.exports = list;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var os = require('os');
|
|
4
|
-
var bin = require('./bin');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Gets the list of all the pids of the system through the ps command.
|
|
8
|
-
* @param {Function} callback(err, list)
|
|
9
|
-
*/
|
|
10
|
-
function ps(callback) {
|
|
11
|
-
var args = ['-A', '-o', 'ppid,pid'];
|
|
12
|
-
|
|
13
|
-
bin('ps', args, function(err, stdout, code) {
|
|
14
|
-
if (err) return callback(err);
|
|
15
|
-
if (code !== 0) {
|
|
16
|
-
return callback(new Error('pidtree ps command exited with code ' + code));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Example of stdout
|
|
20
|
-
//
|
|
21
|
-
// PPID PID
|
|
22
|
-
// 1 430
|
|
23
|
-
// 430 432
|
|
24
|
-
// 1 727
|
|
25
|
-
// 1 7166
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
stdout = stdout.split(os.EOL);
|
|
29
|
-
|
|
30
|
-
var list = [];
|
|
31
|
-
for (var i = 1; i < stdout.length; i++) {
|
|
32
|
-
stdout[i] = stdout[i].trim();
|
|
33
|
-
if (!stdout[i]) continue;
|
|
34
|
-
stdout[i] = stdout[i].split(/\s+/);
|
|
35
|
-
stdout[i][0] = parseInt(stdout[i][0], 10); // PPID
|
|
36
|
-
stdout[i][1] = parseInt(stdout[i][1], 10); // PID
|
|
37
|
-
list.push(stdout[i]);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
callback(null, list);
|
|
41
|
-
} catch (error) {
|
|
42
|
-
callback(error);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
module.exports = ps;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var os = require('os');
|
|
4
|
-
var bin = require('./bin');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Gets the list of all the pids of the system through the wmic command.
|
|
8
|
-
* @param {Function} callback(err, list)
|
|
9
|
-
*/
|
|
10
|
-
function wmic(callback) {
|
|
11
|
-
var args = ['PROCESS', 'get', 'ParentProcessId,ProcessId'];
|
|
12
|
-
var options = {windowsHide: true, windowsVerbatimArguments: true};
|
|
13
|
-
bin('wmic', args, options, function(err, stdout, code) {
|
|
14
|
-
if (err) {
|
|
15
|
-
callback(err);
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
if (code !== 0) {
|
|
20
|
-
callback(new Error('pidtree wmic command exited with code ' + code));
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Example of stdout
|
|
25
|
-
//
|
|
26
|
-
// ParentProcessId ProcessId
|
|
27
|
-
// 0 777
|
|
28
|
-
|
|
29
|
-
try {
|
|
30
|
-
stdout = stdout.split(os.EOL);
|
|
31
|
-
|
|
32
|
-
var list = [];
|
|
33
|
-
for (var i = 1; i < stdout.length; i++) {
|
|
34
|
-
stdout[i] = stdout[i].trim();
|
|
35
|
-
if (!stdout[i]) continue;
|
|
36
|
-
stdout[i] = stdout[i].split(/\s+/);
|
|
37
|
-
stdout[i][0] = parseInt(stdout[i][0], 10); // PPID
|
|
38
|
-
stdout[i][1] = parseInt(stdout[i][1], 10); // PID
|
|
39
|
-
list.push(stdout[i]);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
callback(null, list);
|
|
43
|
-
} catch (error) {
|
|
44
|
-
callback(error);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
module.exports = wmic;
|