groove-dev 0.8.0 → 0.8.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.
- package/node_modules/@groove-dev/cli/bin/groove.js +98 -0
- package/node_modules/@groove-dev/cli/package.json +15 -0
- package/node_modules/@groove-dev/cli/src/client.js +25 -0
- package/node_modules/@groove-dev/cli/src/commands/agents.js +38 -0
- package/node_modules/@groove-dev/cli/src/commands/approve.js +50 -0
- package/node_modules/@groove-dev/cli/src/commands/config.js +35 -0
- package/node_modules/@groove-dev/cli/src/commands/kill.js +15 -0
- package/node_modules/@groove-dev/cli/src/commands/nuke.js +19 -0
- package/node_modules/@groove-dev/cli/src/commands/providers.js +40 -0
- package/node_modules/@groove-dev/cli/src/commands/rotate.js +16 -0
- package/node_modules/@groove-dev/cli/src/commands/spawn.js +91 -0
- package/node_modules/@groove-dev/cli/src/commands/start.js +31 -0
- package/node_modules/@groove-dev/cli/src/commands/status.js +38 -0
- package/node_modules/@groove-dev/cli/src/commands/stop.js +15 -0
- package/node_modules/@groove-dev/cli/src/commands/team.js +77 -0
- package/node_modules/@groove-dev/daemon/package.json +18 -0
- package/node_modules/@groove-dev/daemon/src/adaptive.js +237 -0
- package/node_modules/@groove-dev/daemon/src/api.js +533 -0
- package/node_modules/@groove-dev/daemon/src/classifier.js +126 -0
- package/node_modules/@groove-dev/daemon/src/credentials.js +121 -0
- package/node_modules/@groove-dev/daemon/src/firstrun.js +93 -0
- package/node_modules/@groove-dev/daemon/src/index.js +227 -0
- package/node_modules/@groove-dev/daemon/src/introducer.js +238 -0
- package/node_modules/@groove-dev/daemon/src/journalist.js +600 -0
- package/node_modules/@groove-dev/daemon/src/lockmanager.js +58 -0
- package/node_modules/@groove-dev/daemon/src/pm.js +108 -0
- package/node_modules/@groove-dev/daemon/src/process.js +361 -0
- package/node_modules/@groove-dev/daemon/src/providers/aider.js +72 -0
- package/node_modules/@groove-dev/daemon/src/providers/base.js +38 -0
- package/node_modules/@groove-dev/daemon/src/providers/claude-code.js +167 -0
- package/node_modules/@groove-dev/daemon/src/providers/codex.js +68 -0
- package/node_modules/@groove-dev/daemon/src/providers/gemini.js +62 -0
- package/node_modules/@groove-dev/daemon/src/providers/index.js +38 -0
- package/node_modules/@groove-dev/daemon/src/providers/ollama.js +94 -0
- package/node_modules/@groove-dev/daemon/src/registry.js +89 -0
- package/node_modules/@groove-dev/daemon/src/rotator.js +185 -0
- package/node_modules/@groove-dev/daemon/src/router.js +132 -0
- package/node_modules/@groove-dev/daemon/src/state.js +34 -0
- package/node_modules/@groove-dev/daemon/src/supervisor.js +178 -0
- package/node_modules/@groove-dev/daemon/src/teams.js +203 -0
- package/node_modules/@groove-dev/daemon/src/terminal/base.js +27 -0
- package/node_modules/@groove-dev/daemon/src/terminal/generic.js +27 -0
- package/node_modules/@groove-dev/daemon/src/terminal/tmux.js +64 -0
- package/node_modules/@groove-dev/daemon/src/tokentracker.js +124 -0
- package/node_modules/@groove-dev/daemon/src/validate.js +122 -0
- package/node_modules/@groove-dev/daemon/templates/api-builder.json +18 -0
- package/node_modules/@groove-dev/daemon/templates/fullstack.json +18 -0
- package/node_modules/@groove-dev/daemon/templates/monorepo.json +24 -0
- package/node_modules/@groove-dev/daemon/test/adaptive.test.js +162 -0
- package/node_modules/@groove-dev/daemon/test/classifier.test.js +99 -0
- package/node_modules/@groove-dev/daemon/test/credentials.test.js +80 -0
- package/node_modules/@groove-dev/daemon/test/daemon.test.js +149 -0
- package/node_modules/@groove-dev/daemon/test/introducer.test.js +150 -0
- package/node_modules/@groove-dev/daemon/test/journalist.test.js +221 -0
- package/node_modules/@groove-dev/daemon/test/lockmanager.test.js +86 -0
- package/node_modules/@groove-dev/daemon/test/registry.test.js +133 -0
- package/node_modules/@groove-dev/daemon/test/rotator.test.js +165 -0
- package/node_modules/@groove-dev/daemon/test/router.test.js +96 -0
- package/node_modules/@groove-dev/daemon/test/state.test.js +63 -0
- package/node_modules/@groove-dev/daemon/test/supervisor.test.js +176 -0
- package/node_modules/@groove-dev/daemon/test/teams.test.js +197 -0
- package/node_modules/@groove-dev/daemon/test/tokentracker.test.js +112 -0
- package/{packages/gui/dist/assets/index-BO95Rm1F.js → node_modules/@groove-dev/gui/dist/assets/index-B5E3l1CX.js} +10 -10
- package/node_modules/@groove-dev/gui/dist/assets/index-CPzm9ZE9.css +1 -0
- package/node_modules/@groove-dev/gui/dist/favicon.png +0 -0
- package/node_modules/@groove-dev/gui/dist/groove-logo-short.png +0 -0
- package/node_modules/@groove-dev/gui/dist/groove-logo.png +0 -0
- package/node_modules/@groove-dev/gui/dist/index.html +13 -0
- package/node_modules/@groove-dev/gui/index.html +12 -0
- package/node_modules/@groove-dev/gui/package.json +22 -0
- package/node_modules/@groove-dev/gui/public/favicon.png +0 -0
- package/node_modules/@groove-dev/gui/public/groove-logo-short.png +0 -0
- package/node_modules/@groove-dev/gui/public/groove-logo.png +0 -0
- package/node_modules/@groove-dev/gui/src/App.jsx +215 -0
- package/node_modules/@groove-dev/gui/src/components/AgentActions.jsx +349 -0
- package/node_modules/@groove-dev/gui/src/components/AgentChat.jsx +479 -0
- package/node_modules/@groove-dev/gui/src/components/AgentNode.jsx +117 -0
- package/node_modules/@groove-dev/gui/src/components/AgentPanel.jsx +115 -0
- package/node_modules/@groove-dev/gui/src/components/AgentStats.jsx +333 -0
- package/node_modules/@groove-dev/gui/src/components/ApprovalQueue.jsx +156 -0
- package/node_modules/@groove-dev/gui/src/components/EmptyState.jsx +100 -0
- package/node_modules/@groove-dev/gui/src/components/SpawnPanel.jsx +515 -0
- package/node_modules/@groove-dev/gui/src/components/TeamSelector.jsx +162 -0
- package/node_modules/@groove-dev/gui/src/main.jsx +9 -0
- package/node_modules/@groove-dev/gui/src/stores/groove.js +247 -0
- package/node_modules/@groove-dev/gui/src/theme.css +67 -0
- package/node_modules/@groove-dev/gui/src/views/AgentTree.jsx +148 -0
- package/node_modules/@groove-dev/gui/src/views/CommandCenter.jsx +620 -0
- package/node_modules/@groove-dev/gui/src/views/JournalistFeed.jsx +149 -0
- package/node_modules/@groove-dev/gui/vite.config.js +19 -0
- package/node_modules/@types/d3-color/LICENSE +21 -0
- package/node_modules/@types/d3-color/README.md +15 -0
- package/node_modules/@types/d3-color/index.d.ts +669 -0
- package/node_modules/@types/d3-color/package.json +55 -0
- package/node_modules/@types/d3-drag/LICENSE +21 -0
- package/node_modules/@types/d3-drag/README.md +15 -0
- package/node_modules/@types/d3-drag/index.d.ts +395 -0
- package/node_modules/@types/d3-drag/package.json +42 -0
- package/node_modules/@types/d3-interpolate/LICENSE +21 -0
- package/node_modules/@types/d3-interpolate/README.md +15 -0
- package/node_modules/@types/d3-interpolate/index.d.ts +387 -0
- package/node_modules/@types/d3-interpolate/package.json +47 -0
- package/node_modules/@types/d3-selection/LICENSE +21 -0
- package/node_modules/@types/d3-selection/README.md +15 -0
- package/node_modules/@types/d3-selection/index.d.ts +1173 -0
- package/node_modules/@types/d3-selection/package.json +50 -0
- package/node_modules/@types/d3-transition/LICENSE +21 -0
- package/node_modules/@types/d3-transition/README.md +15 -0
- package/node_modules/@types/d3-transition/index.d.ts +664 -0
- package/node_modules/@types/d3-transition/package.json +47 -0
- package/node_modules/@types/d3-zoom/LICENSE +21 -0
- package/node_modules/@types/d3-zoom/README.md +15 -0
- package/node_modules/@types/d3-zoom/index.d.ts +611 -0
- package/node_modules/@types/d3-zoom/package.json +48 -0
- package/node_modules/@xyflow/react/LICENSE +21 -0
- package/node_modules/@xyflow/react/README.md +135 -0
- package/node_modules/@xyflow/react/dist/base.css +504 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Background/Background.d.ts +61 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Background/Background.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Background/Patterns.d.ts +15 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Background/Patterns.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Background/index.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Background/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Background/types.d.ts +59 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Background/types.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/ControlButton.d.ts +26 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/ControlButton.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/Controls.d.ts +29 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/Controls.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/Icons/FitView.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/Icons/FitView.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/Icons/Lock.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/Icons/Lock.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/Icons/Minus.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/Icons/Minus.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/Icons/Plus.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/Icons/Plus.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/Icons/Unlock.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/Icons/Unlock.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/index.d.ts +4 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/types.d.ts +66 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/Controls/types.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/EdgeToolbar/EdgeToolbar.d.ts +26 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/EdgeToolbar/EdgeToolbar.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/EdgeToolbar/index.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/EdgeToolbar/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/EdgeToolbar/types.d.ts +13 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/EdgeToolbar/types.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/MiniMap/MiniMap.d.ts +29 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/MiniMap/MiniMap.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/MiniMap/MiniMapNode.d.ts +5 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/MiniMap/MiniMapNode.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/MiniMap/MiniMapNodes.d.ts +6 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/MiniMap/MiniMapNodes.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/MiniMap/index.d.ts +4 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/MiniMap/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/MiniMap/types.d.ts +123 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/MiniMap/types.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeResizer/NodeResizeControl.d.ts +11 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeResizer/NodeResizeControl.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeResizer/NodeResizer.d.ts +27 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeResizer/NodeResizer.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeResizer/index.d.ts +4 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeResizer/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeResizer/types.d.ts +97 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeResizer/types.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeToolbar/NodeToolbar.d.ts +38 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeToolbar/NodeToolbar.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeToolbar/NodeToolbarPortal.d.ts +5 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeToolbar/NodeToolbarPortal.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeToolbar/index.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeToolbar/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeToolbar/types.d.ts +32 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/NodeToolbar/types.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/index.d.ts +7 -0
- package/node_modules/@xyflow/react/dist/esm/additional-components/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/A11yDescriptions/index.d.ts +8 -0
- package/node_modules/@xyflow/react/dist/esm/components/A11yDescriptions/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Attribution/index.d.ts +8 -0
- package/node_modules/@xyflow/react/dist/esm/components/Attribution/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/BatchProvider/index.d.ts +17 -0
- package/node_modules/@xyflow/react/dist/esm/components/BatchProvider/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/BatchProvider/types.d.ts +7 -0
- package/node_modules/@xyflow/react/dist/esm/components/BatchProvider/types.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/BatchProvider/useQueue.d.ts +11 -0
- package/node_modules/@xyflow/react/dist/esm/components/BatchProvider/useQueue.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/ConnectionLine/index.d.ts +12 -0
- package/node_modules/@xyflow/react/dist/esm/components/ConnectionLine/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/EdgeLabelRenderer/index.d.ts +47 -0
- package/node_modules/@xyflow/react/dist/esm/components/EdgeLabelRenderer/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/EdgeWrapper/EdgeUpdateAnchors.d.ts +15 -0
- package/node_modules/@xyflow/react/dist/esm/components/EdgeWrapper/EdgeUpdateAnchors.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/EdgeWrapper/index.d.ts +6 -0
- package/node_modules/@xyflow/react/dist/esm/components/EdgeWrapper/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/EdgeWrapper/utils.d.ts +11 -0
- package/node_modules/@xyflow/react/dist/esm/components/EdgeWrapper/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/BaseEdge.d.ts +30 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/BaseEdge.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/BezierEdge.d.ts +31 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/BezierEdge.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/EdgeAnchor.d.ts +17 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/EdgeAnchor.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/EdgeText.d.ts +34 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/EdgeText.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/SimpleBezierEdge.d.ts +30 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/SimpleBezierEdge.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/SmoothStepEdge.d.ts +31 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/SmoothStepEdge.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/StepEdge.d.ts +31 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/StepEdge.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/StraightEdge.d.ts +29 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/StraightEdge.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/index.d.ts +6 -0
- package/node_modules/@xyflow/react/dist/esm/components/Edges/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Handle/index.d.ts +39 -0
- package/node_modules/@xyflow/react/dist/esm/components/Handle/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/NodeWrapper/index.d.ts +5 -0
- package/node_modules/@xyflow/react/dist/esm/components/NodeWrapper/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/NodeWrapper/useNodeObserver.d.ts +14 -0
- package/node_modules/@xyflow/react/dist/esm/components/NodeWrapper/useNodeObserver.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/NodeWrapper/utils.d.ts +9 -0
- package/node_modules/@xyflow/react/dist/esm/components/NodeWrapper/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Nodes/DefaultNode.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/esm/components/Nodes/DefaultNode.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Nodes/GroupNode.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/esm/components/Nodes/GroupNode.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Nodes/InputNode.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/esm/components/Nodes/InputNode.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Nodes/OutputNode.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/esm/components/Nodes/OutputNode.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Nodes/utils.d.ts +13 -0
- package/node_modules/@xyflow/react/dist/esm/components/Nodes/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/NodesSelection/index.d.ts +13 -0
- package/node_modules/@xyflow/react/dist/esm/components/NodesSelection/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/Panel/index.d.ts +45 -0
- package/node_modules/@xyflow/react/dist/esm/components/Panel/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/ReactFlowProvider/index.d.ts +83 -0
- package/node_modules/@xyflow/react/dist/esm/components/ReactFlowProvider/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/SelectionListener/index.d.ts +7 -0
- package/node_modules/@xyflow/react/dist/esm/components/SelectionListener/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/StoreUpdater/index.d.ts +9 -0
- package/node_modules/@xyflow/react/dist/esm/components/StoreUpdater/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/UserSelection/index.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/esm/components/UserSelection/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/components/ViewportPortal/index.d.ts +30 -0
- package/node_modules/@xyflow/react/dist/esm/components/ViewportPortal/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/EdgeRenderer/MarkerDefinitions.d.ts +10 -0
- package/node_modules/@xyflow/react/dist/esm/container/EdgeRenderer/MarkerDefinitions.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/EdgeRenderer/MarkerSymbols.d.ts +9 -0
- package/node_modules/@xyflow/react/dist/esm/container/EdgeRenderer/MarkerSymbols.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/EdgeRenderer/index.d.ts +13 -0
- package/node_modules/@xyflow/react/dist/esm/container/EdgeRenderer/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/FlowRenderer/index.d.ts +14 -0
- package/node_modules/@xyflow/react/dist/esm/container/FlowRenderer/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/GraphView/index.d.ts +11 -0
- package/node_modules/@xyflow/react/dist/esm/container/GraphView/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/GraphView/useNodeOrEdgeTypesWarning.d.ts +10 -0
- package/node_modules/@xyflow/react/dist/esm/container/GraphView/useNodeOrEdgeTypesWarning.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/GraphView/useStylesLoadedWarning.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/esm/container/GraphView/useStylesLoadedWarning.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/NodeRenderer/index.d.ts +10 -0
- package/node_modules/@xyflow/react/dist/esm/container/NodeRenderer/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/NodeRenderer/useResizeObserver.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/esm/container/NodeRenderer/useResizeObserver.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/Pane/index.d.ts +11 -0
- package/node_modules/@xyflow/react/dist/esm/container/Pane/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/ReactFlow/Wrapper.d.ts +20 -0
- package/node_modules/@xyflow/react/dist/esm/container/ReactFlow/Wrapper.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/ReactFlow/index.d.ts +24 -0
- package/node_modules/@xyflow/react/dist/esm/container/ReactFlow/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/ReactFlow/init-values.d.ts +4 -0
- package/node_modules/@xyflow/react/dist/esm/container/ReactFlow/init-values.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/Viewport/index.d.ts +7 -0
- package/node_modules/@xyflow/react/dist/esm/container/Viewport/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/container/ZoomPane/index.d.ts +7 -0
- package/node_modules/@xyflow/react/dist/esm/container/ZoomPane/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/contexts/NodeIdContext.d.ts +34 -0
- package/node_modules/@xyflow/react/dist/esm/contexts/NodeIdContext.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/contexts/StoreContext.d.ts +4 -0
- package/node_modules/@xyflow/react/dist/esm/contexts/StoreContext.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useColorModeClass.d.ts +9 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useColorModeClass.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useConnection.d.ts +33 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useConnection.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useDrag.d.ts +18 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useDrag.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useEdges.d.ts +21 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useEdges.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useGlobalKeyHandler.d.ts +11 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useGlobalKeyHandler.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useHandleConnections.d.ts +23 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useHandleConnections.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useInternalNode.d.ts +30 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useInternalNode.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useKeyPress.d.ts +53 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useKeyPress.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useMoveSelectedNodes.d.ts +12 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useMoveSelectedNodes.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useNodeConnections.d.ts +38 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useNodeConnections.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useNodes.d.ts +22 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useNodes.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useNodesData.d.ts +27 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useNodesData.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useNodesEdgesState.d.ts +105 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useNodesEdgesState.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useNodesInitialized.d.ts +39 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useNodesInitialized.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useOnEdgesChangeMiddleware.d.ts +10 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useOnEdgesChangeMiddleware.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useOnInitHandler.d.ts +8 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useOnInitHandler.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useOnNodesChangeMiddleware.d.ts +10 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useOnNodesChangeMiddleware.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useOnSelectionChange.d.ts +43 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useOnSelectionChange.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useOnViewportChange.d.ts +33 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useOnViewportChange.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useReactFlow.d.ts +30 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useReactFlow.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useResizeHandler.d.ts +8 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useResizeHandler.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useStore.d.ts +45 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useStore.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useUpdateNodeInternals.d.ts +48 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useUpdateNodeInternals.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useViewport.d.ts +32 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useViewport.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useViewportHelper.d.ts +10 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useViewportHelper.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useViewportSync.d.ts +9 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useViewportSync.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useVisibleEdgeIds.d.ts +9 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useVisibleEdgeIds.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useVisibleNodeIds.d.ts +9 -0
- package/node_modules/@xyflow/react/dist/esm/hooks/useVisibleNodeIds.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/index.d.ts +41 -0
- package/node_modules/@xyflow/react/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/index.js +4987 -0
- package/node_modules/@xyflow/react/dist/esm/index.mjs +4987 -0
- package/node_modules/@xyflow/react/dist/esm/store/index.d.ts +19 -0
- package/node_modules/@xyflow/react/dist/esm/store/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/store/initialState.d.ts +19 -0
- package/node_modules/@xyflow/react/dist/esm/store/initialState.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/styles/utils.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/esm/styles/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/types/component-props.d.ts +649 -0
- package/node_modules/@xyflow/react/dist/esm/types/component-props.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/types/edges.d.ts +217 -0
- package/node_modules/@xyflow/react/dist/esm/types/edges.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/types/general.d.ts +179 -0
- package/node_modules/@xyflow/react/dist/esm/types/general.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/types/index.d.ts +7 -0
- package/node_modules/@xyflow/react/dist/esm/types/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/types/instance.d.ts +242 -0
- package/node_modules/@xyflow/react/dist/esm/types/instance.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/types/nodes.d.ts +101 -0
- package/node_modules/@xyflow/react/dist/esm/types/nodes.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/types/store.d.ts +115 -0
- package/node_modules/@xyflow/react/dist/esm/types/store.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/utils/changes.d.ts +87 -0
- package/node_modules/@xyflow/react/dist/esm/utils/changes.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/utils/general.d.ts +48 -0
- package/node_modules/@xyflow/react/dist/esm/utils/general.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/esm/utils/index.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/esm/utils/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/style.css +624 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Background/Background.d.ts +61 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Background/Background.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Background/Patterns.d.ts +15 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Background/Patterns.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Background/index.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Background/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Background/types.d.ts +59 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Background/types.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/ControlButton.d.ts +26 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/ControlButton.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/Controls.d.ts +29 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/Controls.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/Icons/FitView.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/Icons/FitView.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/Icons/Lock.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/Icons/Lock.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/Icons/Minus.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/Icons/Minus.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/Icons/Plus.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/Icons/Plus.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/Icons/Unlock.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/Icons/Unlock.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/index.d.ts +4 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/types.d.ts +66 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/Controls/types.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/EdgeToolbar/EdgeToolbar.d.ts +26 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/EdgeToolbar/EdgeToolbar.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/EdgeToolbar/index.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/EdgeToolbar/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/EdgeToolbar/types.d.ts +13 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/EdgeToolbar/types.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/MiniMap/MiniMap.d.ts +29 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/MiniMap/MiniMap.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/MiniMap/MiniMapNode.d.ts +5 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/MiniMap/MiniMapNode.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/MiniMap/MiniMapNodes.d.ts +6 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/MiniMap/MiniMapNodes.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/MiniMap/index.d.ts +4 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/MiniMap/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/MiniMap/types.d.ts +123 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/MiniMap/types.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeResizer/NodeResizeControl.d.ts +11 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeResizer/NodeResizeControl.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeResizer/NodeResizer.d.ts +27 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeResizer/NodeResizer.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeResizer/index.d.ts +4 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeResizer/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeResizer/types.d.ts +97 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeResizer/types.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeToolbar/NodeToolbar.d.ts +38 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeToolbar/NodeToolbar.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeToolbar/NodeToolbarPortal.d.ts +5 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeToolbar/NodeToolbarPortal.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeToolbar/index.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeToolbar/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeToolbar/types.d.ts +32 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/NodeToolbar/types.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/index.d.ts +7 -0
- package/node_modules/@xyflow/react/dist/umd/additional-components/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/A11yDescriptions/index.d.ts +8 -0
- package/node_modules/@xyflow/react/dist/umd/components/A11yDescriptions/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Attribution/index.d.ts +8 -0
- package/node_modules/@xyflow/react/dist/umd/components/Attribution/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/BatchProvider/index.d.ts +17 -0
- package/node_modules/@xyflow/react/dist/umd/components/BatchProvider/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/BatchProvider/types.d.ts +7 -0
- package/node_modules/@xyflow/react/dist/umd/components/BatchProvider/types.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/BatchProvider/useQueue.d.ts +11 -0
- package/node_modules/@xyflow/react/dist/umd/components/BatchProvider/useQueue.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/ConnectionLine/index.d.ts +12 -0
- package/node_modules/@xyflow/react/dist/umd/components/ConnectionLine/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/EdgeLabelRenderer/index.d.ts +47 -0
- package/node_modules/@xyflow/react/dist/umd/components/EdgeLabelRenderer/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/EdgeWrapper/EdgeUpdateAnchors.d.ts +15 -0
- package/node_modules/@xyflow/react/dist/umd/components/EdgeWrapper/EdgeUpdateAnchors.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/EdgeWrapper/index.d.ts +6 -0
- package/node_modules/@xyflow/react/dist/umd/components/EdgeWrapper/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/EdgeWrapper/utils.d.ts +11 -0
- package/node_modules/@xyflow/react/dist/umd/components/EdgeWrapper/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/BaseEdge.d.ts +30 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/BaseEdge.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/BezierEdge.d.ts +31 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/BezierEdge.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/EdgeAnchor.d.ts +17 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/EdgeAnchor.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/EdgeText.d.ts +34 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/EdgeText.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/SimpleBezierEdge.d.ts +30 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/SimpleBezierEdge.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/SmoothStepEdge.d.ts +31 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/SmoothStepEdge.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/StepEdge.d.ts +31 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/StepEdge.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/StraightEdge.d.ts +29 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/StraightEdge.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/index.d.ts +6 -0
- package/node_modules/@xyflow/react/dist/umd/components/Edges/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Handle/index.d.ts +39 -0
- package/node_modules/@xyflow/react/dist/umd/components/Handle/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/NodeWrapper/index.d.ts +5 -0
- package/node_modules/@xyflow/react/dist/umd/components/NodeWrapper/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/NodeWrapper/useNodeObserver.d.ts +14 -0
- package/node_modules/@xyflow/react/dist/umd/components/NodeWrapper/useNodeObserver.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/NodeWrapper/utils.d.ts +9 -0
- package/node_modules/@xyflow/react/dist/umd/components/NodeWrapper/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Nodes/DefaultNode.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/umd/components/Nodes/DefaultNode.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Nodes/GroupNode.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/umd/components/Nodes/GroupNode.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Nodes/InputNode.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/umd/components/Nodes/InputNode.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Nodes/OutputNode.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/umd/components/Nodes/OutputNode.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Nodes/utils.d.ts +13 -0
- package/node_modules/@xyflow/react/dist/umd/components/Nodes/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/NodesSelection/index.d.ts +13 -0
- package/node_modules/@xyflow/react/dist/umd/components/NodesSelection/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/Panel/index.d.ts +45 -0
- package/node_modules/@xyflow/react/dist/umd/components/Panel/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/ReactFlowProvider/index.d.ts +83 -0
- package/node_modules/@xyflow/react/dist/umd/components/ReactFlowProvider/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/SelectionListener/index.d.ts +7 -0
- package/node_modules/@xyflow/react/dist/umd/components/SelectionListener/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/StoreUpdater/index.d.ts +9 -0
- package/node_modules/@xyflow/react/dist/umd/components/StoreUpdater/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/UserSelection/index.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/umd/components/UserSelection/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/components/ViewportPortal/index.d.ts +30 -0
- package/node_modules/@xyflow/react/dist/umd/components/ViewportPortal/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/EdgeRenderer/MarkerDefinitions.d.ts +10 -0
- package/node_modules/@xyflow/react/dist/umd/container/EdgeRenderer/MarkerDefinitions.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/EdgeRenderer/MarkerSymbols.d.ts +9 -0
- package/node_modules/@xyflow/react/dist/umd/container/EdgeRenderer/MarkerSymbols.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/EdgeRenderer/index.d.ts +13 -0
- package/node_modules/@xyflow/react/dist/umd/container/EdgeRenderer/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/FlowRenderer/index.d.ts +14 -0
- package/node_modules/@xyflow/react/dist/umd/container/FlowRenderer/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/GraphView/index.d.ts +11 -0
- package/node_modules/@xyflow/react/dist/umd/container/GraphView/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/GraphView/useNodeOrEdgeTypesWarning.d.ts +10 -0
- package/node_modules/@xyflow/react/dist/umd/container/GraphView/useNodeOrEdgeTypesWarning.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/GraphView/useStylesLoadedWarning.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/umd/container/GraphView/useStylesLoadedWarning.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/NodeRenderer/index.d.ts +10 -0
- package/node_modules/@xyflow/react/dist/umd/container/NodeRenderer/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/NodeRenderer/useResizeObserver.d.ts +2 -0
- package/node_modules/@xyflow/react/dist/umd/container/NodeRenderer/useResizeObserver.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/Pane/index.d.ts +11 -0
- package/node_modules/@xyflow/react/dist/umd/container/Pane/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/ReactFlow/Wrapper.d.ts +20 -0
- package/node_modules/@xyflow/react/dist/umd/container/ReactFlow/Wrapper.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/ReactFlow/index.d.ts +24 -0
- package/node_modules/@xyflow/react/dist/umd/container/ReactFlow/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/ReactFlow/init-values.d.ts +4 -0
- package/node_modules/@xyflow/react/dist/umd/container/ReactFlow/init-values.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/Viewport/index.d.ts +7 -0
- package/node_modules/@xyflow/react/dist/umd/container/Viewport/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/container/ZoomPane/index.d.ts +7 -0
- package/node_modules/@xyflow/react/dist/umd/container/ZoomPane/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/contexts/NodeIdContext.d.ts +34 -0
- package/node_modules/@xyflow/react/dist/umd/contexts/NodeIdContext.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/contexts/StoreContext.d.ts +4 -0
- package/node_modules/@xyflow/react/dist/umd/contexts/StoreContext.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useColorModeClass.d.ts +9 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useColorModeClass.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useConnection.d.ts +33 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useConnection.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useDrag.d.ts +18 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useDrag.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useEdges.d.ts +21 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useEdges.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useGlobalKeyHandler.d.ts +11 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useGlobalKeyHandler.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useHandleConnections.d.ts +23 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useHandleConnections.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useInternalNode.d.ts +30 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useInternalNode.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useIsomorphicLayoutEffect.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useKeyPress.d.ts +53 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useKeyPress.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useMoveSelectedNodes.d.ts +12 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useMoveSelectedNodes.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useNodeConnections.d.ts +38 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useNodeConnections.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useNodes.d.ts +22 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useNodes.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useNodesData.d.ts +27 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useNodesData.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useNodesEdgesState.d.ts +105 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useNodesEdgesState.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useNodesInitialized.d.ts +39 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useNodesInitialized.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useOnEdgesChangeMiddleware.d.ts +10 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useOnEdgesChangeMiddleware.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useOnInitHandler.d.ts +8 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useOnInitHandler.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useOnNodesChangeMiddleware.d.ts +10 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useOnNodesChangeMiddleware.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useOnSelectionChange.d.ts +43 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useOnSelectionChange.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useOnViewportChange.d.ts +33 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useOnViewportChange.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useReactFlow.d.ts +30 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useReactFlow.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useResizeHandler.d.ts +8 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useResizeHandler.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useStore.d.ts +45 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useStore.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useUpdateNodeInternals.d.ts +48 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useUpdateNodeInternals.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useViewport.d.ts +32 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useViewport.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useViewportHelper.d.ts +10 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useViewportHelper.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useViewportSync.d.ts +9 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useViewportSync.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useVisibleEdgeIds.d.ts +9 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useVisibleEdgeIds.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useVisibleNodeIds.d.ts +9 -0
- package/node_modules/@xyflow/react/dist/umd/hooks/useVisibleNodeIds.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/index.d.ts +41 -0
- package/node_modules/@xyflow/react/dist/umd/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/index.js +10 -0
- package/node_modules/@xyflow/react/dist/umd/store/index.d.ts +19 -0
- package/node_modules/@xyflow/react/dist/umd/store/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/store/initialState.d.ts +19 -0
- package/node_modules/@xyflow/react/dist/umd/store/initialState.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/styles/utils.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/umd/styles/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/types/component-props.d.ts +649 -0
- package/node_modules/@xyflow/react/dist/umd/types/component-props.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/types/edges.d.ts +217 -0
- package/node_modules/@xyflow/react/dist/umd/types/edges.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/types/general.d.ts +179 -0
- package/node_modules/@xyflow/react/dist/umd/types/general.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/types/index.d.ts +7 -0
- package/node_modules/@xyflow/react/dist/umd/types/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/types/instance.d.ts +242 -0
- package/node_modules/@xyflow/react/dist/umd/types/instance.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/types/nodes.d.ts +101 -0
- package/node_modules/@xyflow/react/dist/umd/types/nodes.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/types/store.d.ts +115 -0
- package/node_modules/@xyflow/react/dist/umd/types/store.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/utils/changes.d.ts +87 -0
- package/node_modules/@xyflow/react/dist/umd/utils/changes.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/utils/general.d.ts +48 -0
- package/node_modules/@xyflow/react/dist/umd/utils/general.d.ts.map +1 -0
- package/node_modules/@xyflow/react/dist/umd/utils/index.d.ts +3 -0
- package/node_modules/@xyflow/react/dist/umd/utils/index.d.ts.map +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/LICENSE +21 -0
- package/node_modules/@xyflow/react/node_modules/zustand/context.d.ts +25 -0
- package/node_modules/@xyflow/react/node_modules/zustand/context.js +60 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/context.d.mts +25 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/context.d.ts +25 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/context.js +61 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/context.mjs +61 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/index.d.mts +3 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/index.d.ts +3 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/index.js +48 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/index.mjs +48 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware/combine.d.mts +5 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware/combine.d.ts +5 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware/devtools.d.mts +49 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware/devtools.d.ts +49 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware/immer.d.mts +25 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware/immer.d.ts +25 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware/immer.js +12 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware/immer.mjs +12 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware/persist.d.mts +119 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware/persist.d.ts +119 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware/redux.d.mts +21 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware/redux.d.ts +21 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware/subscribeWithSelector.d.mts +25 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware/subscribeWithSelector.d.ts +25 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware.d.mts +5 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware.d.ts +5 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware.js +583 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/middleware.mjs +583 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/react/shallow.d.mts +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/react/shallow.d.ts +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/react/shallow.js +49 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/react/shallow.mjs +49 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/react.d.mts +38 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/react.d.ts +38 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/shallow.d.mts +7 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/shallow.d.ts +7 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/shallow.js +47 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/shallow.mjs +47 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/traditional.d.mts +21 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/traditional.d.ts +21 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/traditional.js +27 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/traditional.mjs +27 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/vanilla/shallow.d.mts +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/vanilla/shallow.d.ts +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/vanilla/shallow.js +38 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/vanilla/shallow.mjs +38 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/vanilla.d.mts +81 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/vanilla.d.ts +81 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/vanilla.js +40 -0
- package/node_modules/@xyflow/react/node_modules/zustand/esm/vanilla.mjs +40 -0
- package/node_modules/@xyflow/react/node_modules/zustand/index.d.ts +3 -0
- package/node_modules/@xyflow/react/node_modules/zustand/index.js +60 -0
- package/node_modules/@xyflow/react/node_modules/zustand/middleware/combine.d.ts +5 -0
- package/node_modules/@xyflow/react/node_modules/zustand/middleware/devtools.d.ts +49 -0
- package/node_modules/@xyflow/react/node_modules/zustand/middleware/immer.d.ts +25 -0
- package/node_modules/@xyflow/react/node_modules/zustand/middleware/immer.js +19 -0
- package/node_modules/@xyflow/react/node_modules/zustand/middleware/persist.d.ts +119 -0
- package/node_modules/@xyflow/react/node_modules/zustand/middleware/redux.d.ts +21 -0
- package/node_modules/@xyflow/react/node_modules/zustand/middleware/subscribeWithSelector.d.ts +25 -0
- package/node_modules/@xyflow/react/node_modules/zustand/middleware.d.ts +5 -0
- package/node_modules/@xyflow/react/node_modules/zustand/middleware.js +609 -0
- package/node_modules/@xyflow/react/node_modules/zustand/package.json +232 -0
- package/node_modules/@xyflow/react/node_modules/zustand/react/shallow.d.ts +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/react/shallow.js +86 -0
- package/node_modules/@xyflow/react/node_modules/zustand/react.d.ts +38 -0
- package/node_modules/@xyflow/react/node_modules/zustand/readme.md +505 -0
- package/node_modules/@xyflow/react/node_modules/zustand/shallow.d.ts +7 -0
- package/node_modules/@xyflow/react/node_modules/zustand/shallow.js +87 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/context.development.js +73 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/context.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/index.development.js +71 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/index.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/middleware/immer.development.js +21 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/middleware/immer.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/middleware.development.js +592 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/middleware.production.js +5 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/react/shallow.development.js +60 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/react/shallow.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/shallow.development.js +56 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/shallow.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/traditional.development.js +40 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/traditional.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/vanilla/shallow.development.js +47 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/vanilla/shallow.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/vanilla.development.js +47 -0
- package/node_modules/@xyflow/react/node_modules/zustand/system/vanilla.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/traditional.d.ts +21 -0
- package/node_modules/@xyflow/react/node_modules/zustand/traditional.js +36 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/context.d.ts +25 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/context.d.ts +25 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/index.d.ts +3 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/middleware/combine.d.ts +13 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/middleware/devtools.d.ts +102 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/middleware/immer.d.ts +60 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/middleware/persist.d.ts +139 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/middleware/redux.d.ts +30 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/middleware/subscribeWithSelector.d.ts +42 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/middleware.d.ts +5 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/react/shallow.d.ts +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/react.d.ts +48 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/shallow.d.ts +7 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/traditional.d.ts +31 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/vanilla/shallow.d.ts +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/esm/vanilla.d.ts +106 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/index.d.ts +3 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/middleware/combine.d.ts +13 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/middleware/devtools.d.ts +102 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/middleware/immer.d.ts +60 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/middleware/persist.d.ts +139 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/middleware/redux.d.ts +30 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/middleware/subscribeWithSelector.d.ts +42 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/middleware.d.ts +5 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/react/shallow.d.ts +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/react.d.ts +48 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/shallow.d.ts +7 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/traditional.d.ts +31 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/vanilla/shallow.d.ts +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/ts3.4/vanilla.d.ts +106 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/context.development.js +63 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/context.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/index.development.js +58 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/index.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/middleware/immer.development.js +23 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/middleware/immer.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/middleware.development.js +615 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/middleware.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/react/shallow.development.js +90 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/react/shallow.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/shallow.development.js +91 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/shallow.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/traditional.development.js +38 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/traditional.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/vanilla/shallow.development.js +81 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/vanilla/shallow.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/vanilla.development.js +63 -0
- package/node_modules/@xyflow/react/node_modules/zustand/umd/vanilla.production.js +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/vanilla/shallow.d.ts +1 -0
- package/node_modules/@xyflow/react/node_modules/zustand/vanilla/shallow.js +75 -0
- package/node_modules/@xyflow/react/node_modules/zustand/vanilla.d.ts +81 -0
- package/node_modules/@xyflow/react/node_modules/zustand/vanilla.js +59 -0
- package/node_modules/@xyflow/react/package.json +98 -0
- package/node_modules/@xyflow/system/LICENSE +21 -0
- package/node_modules/@xyflow/system/README.md +62 -0
- package/node_modules/@xyflow/system/dist/esm/constants.d.ts +43 -0
- package/node_modules/@xyflow/system/dist/esm/constants.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/index.d.ts +9 -0
- package/node_modules/@xyflow/system/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/index.js +3514 -0
- package/node_modules/@xyflow/system/dist/esm/index.mjs +3514 -0
- package/node_modules/@xyflow/system/dist/esm/types/changes.d.ts +64 -0
- package/node_modules/@xyflow/system/dist/esm/types/changes.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/types/edges.d.ts +140 -0
- package/node_modules/@xyflow/system/dist/esm/types/edges.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/types/general.d.ts +296 -0
- package/node_modules/@xyflow/system/dist/esm/types/general.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/types/handles.d.ts +58 -0
- package/node_modules/@xyflow/system/dist/esm/types/handles.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/types/index.d.ts +8 -0
- package/node_modules/@xyflow/system/dist/esm/types/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/types/nodes.d.ts +157 -0
- package/node_modules/@xyflow/system/dist/esm/types/nodes.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/types/panzoom.d.ts +55 -0
- package/node_modules/@xyflow/system/dist/esm/types/panzoom.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/types/utils.d.ts +61 -0
- package/node_modules/@xyflow/system/dist/esm/types/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/connections.d.ts +13 -0
- package/node_modules/@xyflow/system/dist/esm/utils/connections.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/dom.d.ts +21 -0
- package/node_modules/@xyflow/system/dist/esm/utils/dom.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/edge-toolbar.d.ts +2 -0
- package/node_modules/@xyflow/system/dist/esm/utils/edge-toolbar.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/edges/bezier-edge.d.ts +77 -0
- package/node_modules/@xyflow/system/dist/esm/utils/edges/bezier-edge.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/edges/general.d.ts +91 -0
- package/node_modules/@xyflow/system/dist/esm/utils/edges/general.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/edges/index.d.ts +6 -0
- package/node_modules/@xyflow/system/dist/esm/utils/edges/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/edges/positions.d.ts +17 -0
- package/node_modules/@xyflow/system/dist/esm/utils/edges/positions.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/edges/smoothstep-edge.d.ts +66 -0
- package/node_modules/@xyflow/system/dist/esm/utils/edges/smoothstep-edge.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/edges/straight-edge.d.ts +41 -0
- package/node_modules/@xyflow/system/dist/esm/utils/edges/straight-edge.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/general.d.ts +85 -0
- package/node_modules/@xyflow/system/dist/esm/utils/general.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/graph.d.ts +191 -0
- package/node_modules/@xyflow/system/dist/esm/utils/graph.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/index.d.ts +12 -0
- package/node_modules/@xyflow/system/dist/esm/utils/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/marker.d.ts +9 -0
- package/node_modules/@xyflow/system/dist/esm/utils/marker.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/node-toolbar.d.ts +3 -0
- package/node_modules/@xyflow/system/dist/esm/utils/node-toolbar.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/shallow-node-data.d.ts +5 -0
- package/node_modules/@xyflow/system/dist/esm/utils/shallow-node-data.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/store.d.ts +34 -0
- package/node_modules/@xyflow/system/dist/esm/utils/store.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/utils/types.d.ts +8 -0
- package/node_modules/@xyflow/system/dist/esm/utils/types.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xydrag/XYDrag.d.ts +55 -0
- package/node_modules/@xyflow/system/dist/esm/xydrag/XYDrag.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xydrag/index.d.ts +2 -0
- package/node_modules/@xyflow/system/dist/esm/xydrag/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xydrag/utils.d.ts +24 -0
- package/node_modules/@xyflow/system/dist/esm/xydrag/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xyhandle/XYHandle.d.ts +3 -0
- package/node_modules/@xyflow/system/dist/esm/xyhandle/XYHandle.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xyhandle/index.d.ts +2 -0
- package/node_modules/@xyflow/system/dist/esm/xyhandle/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xyhandle/types.d.ts +50 -0
- package/node_modules/@xyflow/system/dist/esm/xyhandle/types.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xyhandle/utils.d.ts +10 -0
- package/node_modules/@xyflow/system/dist/esm/xyhandle/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xyminimap/index.d.ts +28 -0
- package/node_modules/@xyflow/system/dist/esm/xyminimap/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xypanzoom/XYPanZoom.d.ts +12 -0
- package/node_modules/@xyflow/system/dist/esm/xypanzoom/XYPanZoom.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xypanzoom/eventhandler.d.ts +46 -0
- package/node_modules/@xyflow/system/dist/esm/xypanzoom/eventhandler.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xypanzoom/filter.d.ts +15 -0
- package/node_modules/@xyflow/system/dist/esm/xypanzoom/filter.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xypanzoom/index.d.ts +2 -0
- package/node_modules/@xyflow/system/dist/esm/xypanzoom/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xypanzoom/utils.d.ts +9 -0
- package/node_modules/@xyflow/system/dist/esm/xypanzoom/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xyresizer/XYResizer.d.ts +49 -0
- package/node_modules/@xyflow/system/dist/esm/xyresizer/XYResizer.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xyresizer/index.d.ts +3 -0
- package/node_modules/@xyflow/system/dist/esm/xyresizer/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xyresizer/types.d.ts +59 -0
- package/node_modules/@xyflow/system/dist/esm/xyresizer/types.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/esm/xyresizer/utils.d.ts +76 -0
- package/node_modules/@xyflow/system/dist/esm/xyresizer/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/constants.d.ts +43 -0
- package/node_modules/@xyflow/system/dist/umd/constants.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/index.d.ts +9 -0
- package/node_modules/@xyflow/system/dist/umd/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/index.js +1 -0
- package/node_modules/@xyflow/system/dist/umd/types/changes.d.ts +64 -0
- package/node_modules/@xyflow/system/dist/umd/types/changes.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/types/edges.d.ts +140 -0
- package/node_modules/@xyflow/system/dist/umd/types/edges.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/types/general.d.ts +296 -0
- package/node_modules/@xyflow/system/dist/umd/types/general.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/types/handles.d.ts +58 -0
- package/node_modules/@xyflow/system/dist/umd/types/handles.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/types/index.d.ts +8 -0
- package/node_modules/@xyflow/system/dist/umd/types/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/types/nodes.d.ts +157 -0
- package/node_modules/@xyflow/system/dist/umd/types/nodes.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/types/panzoom.d.ts +55 -0
- package/node_modules/@xyflow/system/dist/umd/types/panzoom.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/types/utils.d.ts +61 -0
- package/node_modules/@xyflow/system/dist/umd/types/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/connections.d.ts +13 -0
- package/node_modules/@xyflow/system/dist/umd/utils/connections.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/dom.d.ts +21 -0
- package/node_modules/@xyflow/system/dist/umd/utils/dom.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/edge-toolbar.d.ts +2 -0
- package/node_modules/@xyflow/system/dist/umd/utils/edge-toolbar.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/edges/bezier-edge.d.ts +77 -0
- package/node_modules/@xyflow/system/dist/umd/utils/edges/bezier-edge.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/edges/general.d.ts +91 -0
- package/node_modules/@xyflow/system/dist/umd/utils/edges/general.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/edges/index.d.ts +6 -0
- package/node_modules/@xyflow/system/dist/umd/utils/edges/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/edges/positions.d.ts +17 -0
- package/node_modules/@xyflow/system/dist/umd/utils/edges/positions.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/edges/smoothstep-edge.d.ts +66 -0
- package/node_modules/@xyflow/system/dist/umd/utils/edges/smoothstep-edge.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/edges/straight-edge.d.ts +41 -0
- package/node_modules/@xyflow/system/dist/umd/utils/edges/straight-edge.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/general.d.ts +85 -0
- package/node_modules/@xyflow/system/dist/umd/utils/general.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/graph.d.ts +191 -0
- package/node_modules/@xyflow/system/dist/umd/utils/graph.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/index.d.ts +12 -0
- package/node_modules/@xyflow/system/dist/umd/utils/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/marker.d.ts +9 -0
- package/node_modules/@xyflow/system/dist/umd/utils/marker.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/node-toolbar.d.ts +3 -0
- package/node_modules/@xyflow/system/dist/umd/utils/node-toolbar.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/shallow-node-data.d.ts +5 -0
- package/node_modules/@xyflow/system/dist/umd/utils/shallow-node-data.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/store.d.ts +34 -0
- package/node_modules/@xyflow/system/dist/umd/utils/store.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/utils/types.d.ts +8 -0
- package/node_modules/@xyflow/system/dist/umd/utils/types.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xydrag/XYDrag.d.ts +55 -0
- package/node_modules/@xyflow/system/dist/umd/xydrag/XYDrag.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xydrag/index.d.ts +2 -0
- package/node_modules/@xyflow/system/dist/umd/xydrag/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xydrag/utils.d.ts +24 -0
- package/node_modules/@xyflow/system/dist/umd/xydrag/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xyhandle/XYHandle.d.ts +3 -0
- package/node_modules/@xyflow/system/dist/umd/xyhandle/XYHandle.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xyhandle/index.d.ts +2 -0
- package/node_modules/@xyflow/system/dist/umd/xyhandle/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xyhandle/types.d.ts +50 -0
- package/node_modules/@xyflow/system/dist/umd/xyhandle/types.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xyhandle/utils.d.ts +10 -0
- package/node_modules/@xyflow/system/dist/umd/xyhandle/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xyminimap/index.d.ts +28 -0
- package/node_modules/@xyflow/system/dist/umd/xyminimap/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xypanzoom/XYPanZoom.d.ts +12 -0
- package/node_modules/@xyflow/system/dist/umd/xypanzoom/XYPanZoom.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xypanzoom/eventhandler.d.ts +46 -0
- package/node_modules/@xyflow/system/dist/umd/xypanzoom/eventhandler.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xypanzoom/filter.d.ts +15 -0
- package/node_modules/@xyflow/system/dist/umd/xypanzoom/filter.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xypanzoom/index.d.ts +2 -0
- package/node_modules/@xyflow/system/dist/umd/xypanzoom/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xypanzoom/utils.d.ts +9 -0
- package/node_modules/@xyflow/system/dist/umd/xypanzoom/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xyresizer/XYResizer.d.ts +49 -0
- package/node_modules/@xyflow/system/dist/umd/xyresizer/XYResizer.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xyresizer/index.d.ts +3 -0
- package/node_modules/@xyflow/system/dist/umd/xyresizer/index.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xyresizer/types.d.ts +59 -0
- package/node_modules/@xyflow/system/dist/umd/xyresizer/types.d.ts.map +1 -0
- package/node_modules/@xyflow/system/dist/umd/xyresizer/utils.d.ts +76 -0
- package/node_modules/@xyflow/system/dist/umd/xyresizer/utils.d.ts.map +1 -0
- package/node_modules/@xyflow/system/package.json +79 -0
- package/node_modules/accepts/HISTORY.md +243 -0
- package/node_modules/accepts/LICENSE +23 -0
- package/node_modules/accepts/README.md +140 -0
- package/node_modules/accepts/index.js +238 -0
- package/node_modules/accepts/package.json +47 -0
- package/node_modules/array-flatten/LICENSE +21 -0
- package/node_modules/array-flatten/README.md +43 -0
- package/node_modules/array-flatten/array-flatten.js +64 -0
- package/node_modules/array-flatten/package.json +39 -0
- package/node_modules/balanced-match/LICENSE.md +23 -0
- package/node_modules/balanced-match/README.md +57 -0
- package/node_modules/balanced-match/dist/commonjs/index.d.ts +9 -0
- package/node_modules/balanced-match/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/balanced-match/dist/commonjs/index.js +59 -0
- package/node_modules/balanced-match/dist/commonjs/index.js.map +1 -0
- package/node_modules/balanced-match/dist/commonjs/package.json +3 -0
- package/node_modules/balanced-match/dist/esm/index.d.ts +9 -0
- package/node_modules/balanced-match/dist/esm/index.d.ts.map +1 -0
- package/node_modules/balanced-match/dist/esm/index.js +54 -0
- package/node_modules/balanced-match/dist/esm/index.js.map +1 -0
- package/node_modules/balanced-match/dist/esm/package.json +3 -0
- package/node_modules/balanced-match/package.json +68 -0
- package/node_modules/body-parser/HISTORY.md +680 -0
- package/node_modules/body-parser/LICENSE +23 -0
- package/node_modules/body-parser/README.md +476 -0
- package/node_modules/body-parser/index.js +156 -0
- package/node_modules/body-parser/lib/read.js +205 -0
- package/node_modules/body-parser/lib/types/json.js +247 -0
- package/node_modules/body-parser/lib/types/raw.js +101 -0
- package/node_modules/body-parser/lib/types/text.js +121 -0
- package/node_modules/body-parser/lib/types/urlencoded.js +300 -0
- package/node_modules/body-parser/node_modules/debug/.coveralls.yml +1 -0
- package/node_modules/body-parser/node_modules/debug/.eslintrc +11 -0
- package/node_modules/body-parser/node_modules/debug/.npmignore +9 -0
- package/node_modules/body-parser/node_modules/debug/.travis.yml +14 -0
- package/node_modules/body-parser/node_modules/debug/CHANGELOG.md +362 -0
- package/node_modules/body-parser/node_modules/debug/LICENSE +19 -0
- package/node_modules/body-parser/node_modules/debug/Makefile +50 -0
- package/node_modules/body-parser/node_modules/debug/README.md +312 -0
- package/node_modules/body-parser/node_modules/debug/component.json +19 -0
- package/node_modules/body-parser/node_modules/debug/karma.conf.js +70 -0
- package/node_modules/body-parser/node_modules/debug/node.js +1 -0
- package/node_modules/body-parser/node_modules/debug/package.json +49 -0
- package/node_modules/body-parser/node_modules/debug/src/browser.js +185 -0
- package/node_modules/body-parser/node_modules/debug/src/debug.js +202 -0
- package/node_modules/body-parser/node_modules/debug/src/index.js +10 -0
- package/node_modules/body-parser/node_modules/debug/src/inspector-log.js +15 -0
- package/node_modules/body-parser/node_modules/debug/src/node.js +248 -0
- package/node_modules/body-parser/node_modules/ms/index.js +152 -0
- package/node_modules/body-parser/node_modules/ms/license.md +21 -0
- package/node_modules/body-parser/node_modules/ms/package.json +37 -0
- package/node_modules/body-parser/node_modules/ms/readme.md +51 -0
- package/node_modules/body-parser/package.json +55 -0
- package/node_modules/brace-expansion/LICENSE +23 -0
- package/node_modules/brace-expansion/README.md +94 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts +6 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js +201 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -0
- package/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
- package/node_modules/brace-expansion/dist/esm/index.d.ts +6 -0
- package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -0
- package/node_modules/brace-expansion/dist/esm/index.js +197 -0
- package/node_modules/brace-expansion/dist/esm/index.js.map +1 -0
- package/node_modules/brace-expansion/dist/esm/package.json +3 -0
- package/node_modules/brace-expansion/package.json +64 -0
- package/node_modules/bytes/History.md +97 -0
- package/node_modules/bytes/LICENSE +23 -0
- package/node_modules/bytes/Readme.md +152 -0
- package/node_modules/bytes/index.js +170 -0
- package/node_modules/bytes/package.json +42 -0
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/call-bound/.eslintrc +13 -0
- package/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/node_modules/call-bound/.nycrc +9 -0
- package/node_modules/call-bound/CHANGELOG.md +42 -0
- package/node_modules/call-bound/LICENSE +21 -0
- package/node_modules/call-bound/README.md +53 -0
- package/node_modules/call-bound/index.d.ts +94 -0
- package/node_modules/call-bound/index.js +19 -0
- package/node_modules/call-bound/package.json +99 -0
- package/node_modules/call-bound/test/index.js +61 -0
- package/node_modules/call-bound/tsconfig.json +10 -0
- package/node_modules/chalk/license +9 -0
- package/node_modules/chalk/package.json +83 -0
- package/node_modules/chalk/readme.md +297 -0
- package/node_modules/chalk/source/index.d.ts +325 -0
- package/node_modules/chalk/source/index.js +225 -0
- package/node_modules/chalk/source/utilities.js +33 -0
- package/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
- package/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
- package/node_modules/classcat/LICENSE.md +7 -0
- package/node_modules/classcat/README.md +88 -0
- package/node_modules/classcat/index.cjs +19 -0
- package/node_modules/classcat/index.d.ts +15 -0
- package/node_modules/classcat/index.js +19 -0
- package/node_modules/classcat/package.json +38 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/Readme.md +1157 -0
- package/node_modules/commander/esm.mjs +16 -0
- package/node_modules/commander/index.js +24 -0
- package/node_modules/commander/lib/argument.js +149 -0
- package/node_modules/commander/lib/command.js +2509 -0
- package/node_modules/commander/lib/error.js +39 -0
- package/node_modules/commander/lib/help.js +520 -0
- package/node_modules/commander/lib/option.js +330 -0
- package/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/node_modules/commander/package-support.json +16 -0
- package/node_modules/commander/package.json +84 -0
- package/node_modules/commander/typings/esm.d.mts +3 -0
- package/node_modules/commander/typings/index.d.ts +969 -0
- package/node_modules/content-disposition/HISTORY.md +60 -0
- package/node_modules/content-disposition/LICENSE +22 -0
- package/node_modules/content-disposition/README.md +142 -0
- package/node_modules/content-disposition/index.js +458 -0
- package/node_modules/content-disposition/package.json +44 -0
- package/node_modules/content-type/HISTORY.md +29 -0
- package/node_modules/content-type/LICENSE +22 -0
- package/node_modules/content-type/README.md +94 -0
- package/node_modules/content-type/index.js +225 -0
- package/node_modules/content-type/package.json +42 -0
- package/node_modules/cookie/LICENSE +24 -0
- package/node_modules/cookie/README.md +317 -0
- package/node_modules/cookie/SECURITY.md +25 -0
- package/node_modules/cookie/index.js +335 -0
- package/node_modules/cookie/package.json +44 -0
- package/node_modules/cookie-signature/History.md +42 -0
- package/node_modules/cookie-signature/Readme.md +42 -0
- package/node_modules/cookie-signature/index.js +51 -0
- package/node_modules/cookie-signature/package.json +18 -0
- package/node_modules/d3-color/LICENSE +13 -0
- package/node_modules/d3-color/README.md +203 -0
- package/node_modules/d3-color/dist/d3-color.js +606 -0
- package/node_modules/d3-color/dist/d3-color.min.js +2 -0
- package/node_modules/d3-color/package.json +54 -0
- package/node_modules/d3-color/src/color.js +396 -0
- package/node_modules/d3-color/src/cubehelix.js +61 -0
- package/node_modules/d3-color/src/define.js +10 -0
- package/node_modules/d3-color/src/index.js +3 -0
- package/node_modules/d3-color/src/lab.js +123 -0
- package/node_modules/d3-color/src/math.js +2 -0
- package/node_modules/d3-dispatch/LICENSE +13 -0
- package/node_modules/d3-dispatch/README.md +94 -0
- package/node_modules/d3-dispatch/dist/d3-dispatch.js +95 -0
- package/node_modules/d3-dispatch/dist/d3-dispatch.min.js +2 -0
- package/node_modules/d3-dispatch/package.json +50 -0
- package/node_modules/d3-dispatch/src/dispatch.js +84 -0
- package/node_modules/d3-dispatch/src/index.js +1 -0
- package/node_modules/d3-drag/LICENSE +13 -0
- package/node_modules/d3-drag/README.md +248 -0
- package/node_modules/d3-drag/dist/d3-drag.js +273 -0
- package/node_modules/d3-drag/dist/d3-drag.min.js +2 -0
- package/node_modules/d3-drag/package.json +54 -0
- package/node_modules/d3-drag/src/constant.js +1 -0
- package/node_modules/d3-drag/src/drag.js +194 -0
- package/node_modules/d3-drag/src/event.js +28 -0
- package/node_modules/d3-drag/src/index.js +2 -0
- package/node_modules/d3-drag/src/nodrag.js +28 -0
- package/node_modules/d3-drag/src/noevent.js +13 -0
- package/node_modules/d3-ease/LICENSE +28 -0
- package/node_modules/d3-ease/README.md +253 -0
- package/node_modules/d3-ease/dist/d3-ease.js +262 -0
- package/node_modules/d3-ease/dist/d3-ease.min.js +2 -0
- package/node_modules/d3-ease/package.json +51 -0
- package/node_modules/d3-ease/src/back.js +37 -0
- package/node_modules/d3-ease/src/bounce.js +22 -0
- package/node_modules/d3-ease/src/circle.js +11 -0
- package/node_modules/d3-ease/src/cubic.js +11 -0
- package/node_modules/d3-ease/src/elastic.js +46 -0
- package/node_modules/d3-ease/src/exp.js +13 -0
- package/node_modules/d3-ease/src/index.js +66 -0
- package/node_modules/d3-ease/src/linear.js +1 -0
- package/node_modules/d3-ease/src/math.js +4 -0
- package/node_modules/d3-ease/src/poly.js +37 -0
- package/node_modules/d3-ease/src/quad.js +11 -0
- package/node_modules/d3-ease/src/sin.js +14 -0
- package/node_modules/d3-interpolate/LICENSE +13 -0
- package/node_modules/d3-interpolate/README.md +268 -0
- package/node_modules/d3-interpolate/dist/d3-interpolate.js +590 -0
- package/node_modules/d3-interpolate/dist/d3-interpolate.min.js +2 -0
- package/node_modules/d3-interpolate/package.json +53 -0
- package/node_modules/d3-interpolate/src/array.js +22 -0
- package/node_modules/d3-interpolate/src/basis.js +19 -0
- package/node_modules/d3-interpolate/src/basisClosed.js +13 -0
- package/node_modules/d3-interpolate/src/color.js +29 -0
- package/node_modules/d3-interpolate/src/constant.js +1 -0
- package/node_modules/d3-interpolate/src/cubehelix.js +29 -0
- package/node_modules/d3-interpolate/src/date.js +6 -0
- package/node_modules/d3-interpolate/src/discrete.js +6 -0
- package/node_modules/d3-interpolate/src/hcl.js +21 -0
- package/node_modules/d3-interpolate/src/hsl.js +21 -0
- package/node_modules/d3-interpolate/src/hue.js +9 -0
- package/node_modules/d3-interpolate/src/index.js +21 -0
- package/node_modules/d3-interpolate/src/lab.js +16 -0
- package/node_modules/d3-interpolate/src/number.js +5 -0
- package/node_modules/d3-interpolate/src/numberArray.js +14 -0
- package/node_modules/d3-interpolate/src/object.js +23 -0
- package/node_modules/d3-interpolate/src/piecewise.js +11 -0
- package/node_modules/d3-interpolate/src/quantize.js +5 -0
- package/node_modules/d3-interpolate/src/rgb.js +55 -0
- package/node_modules/d3-interpolate/src/round.js +5 -0
- package/node_modules/d3-interpolate/src/string.js +64 -0
- package/node_modules/d3-interpolate/src/transform/decompose.js +26 -0
- package/node_modules/d3-interpolate/src/transform/index.js +63 -0
- package/node_modules/d3-interpolate/src/transform/parse.js +18 -0
- package/node_modules/d3-interpolate/src/value.js +22 -0
- package/node_modules/d3-interpolate/src/zoom.js +71 -0
- package/node_modules/d3-selection/LICENSE +13 -0
- package/node_modules/d3-selection/README.md +863 -0
- package/node_modules/d3-selection/dist/d3-selection.js +1022 -0
- package/node_modules/d3-selection/dist/d3-selection.min.js +2 -0
- package/node_modules/d3-selection/package.json +51 -0
- package/node_modules/d3-selection/src/array.js +9 -0
- package/node_modules/d3-selection/src/constant.js +5 -0
- package/node_modules/d3-selection/src/create.js +6 -0
- package/node_modules/d3-selection/src/creator.js +25 -0
- package/node_modules/d3-selection/src/identity.js +3 -0
- package/node_modules/d3-selection/src/index.js +15 -0
- package/node_modules/d3-selection/src/local.js +27 -0
- package/node_modules/d3-selection/src/matcher.js +12 -0
- package/node_modules/d3-selection/src/namespace.js +7 -0
- package/node_modules/d3-selection/src/namespaces.js +9 -0
- package/node_modules/d3-selection/src/pointer.js +20 -0
- package/node_modules/d3-selection/src/pointers.js +11 -0
- package/node_modules/d3-selection/src/select.js +7 -0
- package/node_modules/d3-selection/src/selectAll.js +8 -0
- package/node_modules/d3-selection/src/selection/append.js +8 -0
- package/node_modules/d3-selection/src/selection/attr.js +57 -0
- package/node_modules/d3-selection/src/selection/call.js +6 -0
- package/node_modules/d3-selection/src/selection/classed.js +75 -0
- package/node_modules/d3-selection/src/selection/clone.js +13 -0
- package/node_modules/d3-selection/src/selection/data.js +128 -0
- package/node_modules/d3-selection/src/selection/datum.js +5 -0
- package/node_modules/d3-selection/src/selection/dispatch.js +34 -0
- package/node_modules/d3-selection/src/selection/each.js +10 -0
- package/node_modules/d3-selection/src/selection/empty.js +3 -0
- package/node_modules/d3-selection/src/selection/enter.js +22 -0
- package/node_modules/d3-selection/src/selection/exit.js +6 -0
- package/node_modules/d3-selection/src/selection/filter.js +16 -0
- package/node_modules/d3-selection/src/selection/html.js +25 -0
- package/node_modules/d3-selection/src/selection/index.js +90 -0
- package/node_modules/d3-selection/src/selection/insert.js +14 -0
- package/node_modules/d3-selection/src/selection/iterator.js +7 -0
- package/node_modules/d3-selection/src/selection/join.js +15 -0
- package/node_modules/d3-selection/src/selection/lower.js +7 -0
- package/node_modules/d3-selection/src/selection/merge.js +19 -0
- package/node_modules/d3-selection/src/selection/node.js +11 -0
- package/node_modules/d3-selection/src/selection/nodes.js +3 -0
- package/node_modules/d3-selection/src/selection/on.js +67 -0
- package/node_modules/d3-selection/src/selection/order.js +13 -0
- package/node_modules/d3-selection/src/selection/property.js +28 -0
- package/node_modules/d3-selection/src/selection/raise.js +7 -0
- package/node_modules/d3-selection/src/selection/remove.js +8 -0
- package/node_modules/d3-selection/src/selection/select.js +17 -0
- package/node_modules/d3-selection/src/selection/selectAll.js +25 -0
- package/node_modules/d3-selection/src/selection/selectChild.js +18 -0
- package/node_modules/d3-selection/src/selection/selectChildren.js +18 -0
- package/node_modules/d3-selection/src/selection/size.js +5 -0
- package/node_modules/d3-selection/src/selection/sort.js +24 -0
- package/node_modules/d3-selection/src/selection/sparse.js +3 -0
- package/node_modules/d3-selection/src/selection/style.js +35 -0
- package/node_modules/d3-selection/src/selection/text.js +25 -0
- package/node_modules/d3-selection/src/selector.js +7 -0
- package/node_modules/d3-selection/src/selectorAll.js +9 -0
- package/node_modules/d3-selection/src/sourceEvent.js +5 -0
- package/node_modules/d3-selection/src/window.js +5 -0
- package/node_modules/d3-timer/LICENSE +13 -0
- package/node_modules/d3-timer/README.md +87 -0
- package/node_modules/d3-timer/dist/d3-timer.js +153 -0
- package/node_modules/d3-timer/dist/d3-timer.min.js +2 -0
- package/node_modules/d3-timer/package.json +53 -0
- package/node_modules/d3-timer/src/index.js +13 -0
- package/node_modules/d3-timer/src/interval.js +17 -0
- package/node_modules/d3-timer/src/timeout.js +11 -0
- package/node_modules/d3-timer/src/timer.js +110 -0
- package/node_modules/d3-transition/LICENSE +13 -0
- package/node_modules/d3-transition/README.md +490 -0
- package/node_modules/d3-transition/dist/d3-transition.js +900 -0
- package/node_modules/d3-transition/dist/d3-transition.min.js +2 -0
- package/node_modules/d3-transition/package.json +65 -0
- package/node_modules/d3-transition/src/active.js +21 -0
- package/node_modules/d3-transition/src/index.js +4 -0
- package/node_modules/d3-transition/src/interrupt.js +24 -0
- package/node_modules/d3-transition/src/selection/index.js +6 -0
- package/node_modules/d3-transition/src/selection/interrupt.js +7 -0
- package/node_modules/d3-transition/src/selection/transition.js +42 -0
- package/node_modules/d3-transition/src/transition/attr.js +78 -0
- package/node_modules/d3-transition/src/transition/attrTween.js +44 -0
- package/node_modules/d3-transition/src/transition/delay.js +23 -0
- package/node_modules/d3-transition/src/transition/duration.js +23 -0
- package/node_modules/d3-transition/src/transition/ease.js +16 -0
- package/node_modules/d3-transition/src/transition/easeVarying.js +14 -0
- package/node_modules/d3-transition/src/transition/end.js +29 -0
- package/node_modules/d3-transition/src/transition/filter.js +16 -0
- package/node_modules/d3-transition/src/transition/index.js +73 -0
- package/node_modules/d3-transition/src/transition/interpolate.js +10 -0
- package/node_modules/d3-transition/src/transition/merge.js +19 -0
- package/node_modules/d3-transition/src/transition/on.js +32 -0
- package/node_modules/d3-transition/src/transition/remove.js +11 -0
- package/node_modules/d3-transition/src/transition/schedule.js +153 -0
- package/node_modules/d3-transition/src/transition/select.js +22 -0
- package/node_modules/d3-transition/src/transition/selectAll.js +26 -0
- package/node_modules/d3-transition/src/transition/selection.js +7 -0
- package/node_modules/d3-transition/src/transition/style.js +80 -0
- package/node_modules/d3-transition/src/transition/styleTween.js +24 -0
- package/node_modules/d3-transition/src/transition/text.js +20 -0
- package/node_modules/d3-transition/src/transition/textTween.js +24 -0
- package/node_modules/d3-transition/src/transition/transition.js +24 -0
- package/node_modules/d3-transition/src/transition/tween.js +81 -0
- package/node_modules/d3-zoom/LICENSE +13 -0
- package/node_modules/d3-zoom/README.md +414 -0
- package/node_modules/d3-zoom/dist/d3-zoom.js +531 -0
- package/node_modules/d3-zoom/dist/d3-zoom.min.js +2 -0
- package/node_modules/d3-zoom/package.json +57 -0
- package/node_modules/d3-zoom/src/constant.js +1 -0
- package/node_modules/d3-zoom/src/event.js +14 -0
- package/node_modules/d3-zoom/src/index.js +2 -0
- package/node_modules/d3-zoom/src/noevent.js +8 -0
- package/node_modules/d3-zoom/src/transform.js +51 -0
- package/node_modules/d3-zoom/src/zoom.js +447 -0
- package/node_modules/depd/History.md +103 -0
- package/node_modules/depd/LICENSE +22 -0
- package/node_modules/depd/Readme.md +280 -0
- package/node_modules/depd/index.js +538 -0
- package/node_modules/depd/lib/browser/index.js +77 -0
- package/node_modules/depd/package.json +45 -0
- package/node_modules/destroy/LICENSE +23 -0
- package/node_modules/destroy/README.md +63 -0
- package/node_modules/destroy/index.js +209 -0
- package/node_modules/destroy/package.json +48 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/ee-first/LICENSE +22 -0
- package/node_modules/ee-first/README.md +80 -0
- package/node_modules/ee-first/index.js +95 -0
- package/node_modules/ee-first/package.json +29 -0
- package/node_modules/encodeurl/LICENSE +22 -0
- package/node_modules/encodeurl/README.md +109 -0
- package/node_modules/encodeurl/index.js +60 -0
- package/node_modules/encodeurl/package.json +40 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +80 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/escape-html/LICENSE +24 -0
- package/node_modules/escape-html/Readme.md +43 -0
- package/node_modules/escape-html/index.js +78 -0
- package/node_modules/escape-html/package.json +24 -0
- package/node_modules/etag/HISTORY.md +83 -0
- package/node_modules/etag/LICENSE +22 -0
- package/node_modules/etag/README.md +159 -0
- package/node_modules/etag/index.js +131 -0
- package/node_modules/etag/package.json +47 -0
- package/node_modules/express/History.md +3667 -0
- package/node_modules/express/LICENSE +24 -0
- package/node_modules/express/Readme.md +260 -0
- package/node_modules/express/index.js +11 -0
- package/node_modules/express/lib/application.js +661 -0
- package/node_modules/express/lib/express.js +116 -0
- package/node_modules/express/lib/middleware/init.js +43 -0
- package/node_modules/express/lib/middleware/query.js +47 -0
- package/node_modules/express/lib/request.js +525 -0
- package/node_modules/express/lib/response.js +1179 -0
- package/node_modules/express/lib/router/index.js +673 -0
- package/node_modules/express/lib/router/layer.js +181 -0
- package/node_modules/express/lib/router/route.js +230 -0
- package/node_modules/express/lib/utils.js +303 -0
- package/node_modules/express/lib/view.js +182 -0
- package/node_modules/express/node_modules/debug/.coveralls.yml +1 -0
- package/node_modules/express/node_modules/debug/.eslintrc +11 -0
- package/node_modules/express/node_modules/debug/.npmignore +9 -0
- package/node_modules/express/node_modules/debug/.travis.yml +14 -0
- package/node_modules/express/node_modules/debug/CHANGELOG.md +362 -0
- package/node_modules/express/node_modules/debug/LICENSE +19 -0
- package/node_modules/express/node_modules/debug/Makefile +50 -0
- package/node_modules/express/node_modules/debug/README.md +312 -0
- package/node_modules/express/node_modules/debug/component.json +19 -0
- package/node_modules/express/node_modules/debug/karma.conf.js +70 -0
- package/node_modules/express/node_modules/debug/node.js +1 -0
- package/node_modules/express/node_modules/debug/package.json +49 -0
- package/node_modules/express/node_modules/debug/src/browser.js +185 -0
- package/node_modules/express/node_modules/debug/src/debug.js +202 -0
- package/node_modules/express/node_modules/debug/src/index.js +10 -0
- package/node_modules/express/node_modules/debug/src/inspector-log.js +15 -0
- package/node_modules/express/node_modules/debug/src/node.js +248 -0
- package/node_modules/express/node_modules/ms/index.js +152 -0
- package/node_modules/express/node_modules/ms/license.md +21 -0
- package/node_modules/express/node_modules/ms/package.json +37 -0
- package/node_modules/express/node_modules/ms/readme.md +51 -0
- package/node_modules/express/package.json +102 -0
- package/node_modules/finalhandler/HISTORY.md +216 -0
- package/node_modules/finalhandler/LICENSE +22 -0
- package/node_modules/finalhandler/README.md +147 -0
- package/node_modules/finalhandler/SECURITY.md +25 -0
- package/node_modules/finalhandler/index.js +341 -0
- package/node_modules/finalhandler/node_modules/debug/.coveralls.yml +1 -0
- package/node_modules/finalhandler/node_modules/debug/.eslintrc +11 -0
- package/node_modules/finalhandler/node_modules/debug/.npmignore +9 -0
- package/node_modules/finalhandler/node_modules/debug/.travis.yml +14 -0
- package/node_modules/finalhandler/node_modules/debug/CHANGELOG.md +362 -0
- package/node_modules/finalhandler/node_modules/debug/LICENSE +19 -0
- package/node_modules/finalhandler/node_modules/debug/Makefile +50 -0
- package/node_modules/finalhandler/node_modules/debug/README.md +312 -0
- package/node_modules/finalhandler/node_modules/debug/component.json +19 -0
- package/node_modules/finalhandler/node_modules/debug/karma.conf.js +70 -0
- package/node_modules/finalhandler/node_modules/debug/node.js +1 -0
- package/node_modules/finalhandler/node_modules/debug/package.json +49 -0
- package/node_modules/finalhandler/node_modules/debug/src/browser.js +185 -0
- package/node_modules/finalhandler/node_modules/debug/src/debug.js +202 -0
- package/node_modules/finalhandler/node_modules/debug/src/index.js +10 -0
- package/node_modules/finalhandler/node_modules/debug/src/inspector-log.js +15 -0
- package/node_modules/finalhandler/node_modules/debug/src/node.js +248 -0
- package/node_modules/finalhandler/node_modules/ms/index.js +152 -0
- package/node_modules/finalhandler/node_modules/ms/license.md +21 -0
- package/node_modules/finalhandler/node_modules/ms/package.json +37 -0
- package/node_modules/finalhandler/node_modules/ms/readme.md +51 -0
- package/node_modules/finalhandler/package.json +47 -0
- package/node_modules/forwarded/HISTORY.md +21 -0
- package/node_modules/forwarded/LICENSE +22 -0
- package/node_modules/forwarded/README.md +57 -0
- package/node_modules/forwarded/index.js +90 -0
- package/node_modules/forwarded/package.json +45 -0
- package/node_modules/fresh/HISTORY.md +70 -0
- package/node_modules/fresh/LICENSE +23 -0
- package/node_modules/fresh/README.md +119 -0
- package/node_modules/fresh/index.js +137 -0
- package/node_modules/fresh/package.json +46 -0
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +378 -0
- package/node_modules/get-intrinsic/package.json +97 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/hasown/.eslintrc +5 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +40 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +92 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/http-errors/HISTORY.md +186 -0
- package/node_modules/http-errors/LICENSE +23 -0
- package/node_modules/http-errors/README.md +169 -0
- package/node_modules/http-errors/index.js +290 -0
- package/node_modules/http-errors/package.json +54 -0
- package/node_modules/iconv-lite/Changelog.md +162 -0
- package/node_modules/iconv-lite/LICENSE +21 -0
- package/node_modules/iconv-lite/README.md +156 -0
- package/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
- package/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- package/node_modules/iconv-lite/encodings/index.js +22 -0
- package/node_modules/iconv-lite/encodings/internal.js +188 -0
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/node_modules/iconv-lite/encodings/sbcs-data.js +174 -0
- package/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- package/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/node_modules/iconv-lite/encodings/utf16.js +177 -0
- package/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/node_modules/iconv-lite/lib/extend-node.js +217 -0
- package/node_modules/iconv-lite/lib/index.d.ts +24 -0
- package/node_modules/iconv-lite/lib/index.js +153 -0
- package/node_modules/iconv-lite/lib/streams.js +121 -0
- package/node_modules/iconv-lite/package.json +46 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/ipaddr.js/LICENSE +19 -0
- package/node_modules/ipaddr.js/README.md +233 -0
- package/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
- package/node_modules/ipaddr.js/package.json +35 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/media-typer/HISTORY.md +22 -0
- package/node_modules/media-typer/LICENSE +22 -0
- package/node_modules/media-typer/README.md +81 -0
- package/node_modules/media-typer/index.js +270 -0
- package/node_modules/media-typer/package.json +26 -0
- package/node_modules/merge-descriptors/HISTORY.md +21 -0
- package/node_modules/merge-descriptors/LICENSE +23 -0
- package/node_modules/merge-descriptors/README.md +49 -0
- package/node_modules/merge-descriptors/index.js +60 -0
- package/node_modules/merge-descriptors/package.json +39 -0
- package/node_modules/methods/HISTORY.md +29 -0
- package/node_modules/methods/LICENSE +24 -0
- package/node_modules/methods/README.md +51 -0
- package/node_modules/methods/index.js +69 -0
- package/node_modules/methods/package.json +36 -0
- package/node_modules/mime/.npmignore +0 -0
- package/node_modules/mime/CHANGELOG.md +164 -0
- package/node_modules/mime/LICENSE +21 -0
- package/node_modules/mime/README.md +90 -0
- package/node_modules/mime/cli.js +8 -0
- package/node_modules/mime/mime.js +108 -0
- package/node_modules/mime/package.json +44 -0
- package/node_modules/mime/src/build.js +53 -0
- package/node_modules/mime/src/test.js +60 -0
- package/node_modules/mime/types.json +1 -0
- package/node_modules/mime-db/HISTORY.md +507 -0
- package/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/mime-db/README.md +100 -0
- package/node_modules/mime-db/db.json +8519 -0
- package/node_modules/mime-db/index.js +12 -0
- package/node_modules/mime-db/package.json +60 -0
- package/node_modules/mime-types/HISTORY.md +397 -0
- package/node_modules/mime-types/LICENSE +23 -0
- package/node_modules/mime-types/README.md +113 -0
- package/node_modules/mime-types/index.js +188 -0
- package/node_modules/mime-types/package.json +44 -0
- package/node_modules/minimatch/LICENSE.md +55 -0
- package/node_modules/minimatch/README.md +528 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/ast.d.ts +22 -0
- package/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/ast.js +845 -0
- package/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js +150 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/escape.d.ts +15 -0
- package/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/escape.js +30 -0
- package/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/index.d.ts +174 -0
- package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/index.js +1127 -0
- package/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/node_modules/minimatch/dist/commonjs/unescape.d.ts +22 -0
- package/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
- package/node_modules/minimatch/dist/esm/ast.d.ts +22 -0
- package/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/ast.js +841 -0
- package/node_modules/minimatch/dist/esm/ast.js.map +1 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js +146 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
- package/node_modules/minimatch/dist/esm/escape.d.ts +15 -0
- package/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/escape.js +26 -0
- package/node_modules/minimatch/dist/esm/escape.js.map +1 -0
- package/node_modules/minimatch/dist/esm/index.d.ts +174 -0
- package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/index.js +1114 -0
- package/node_modules/minimatch/dist/esm/index.js.map +1 -0
- package/node_modules/minimatch/dist/esm/package.json +3 -0
- package/node_modules/minimatch/dist/esm/unescape.d.ts +22 -0
- package/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/unescape.js +34 -0
- package/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
- package/node_modules/minimatch/package.json +73 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/negotiator/HISTORY.md +108 -0
- package/node_modules/negotiator/LICENSE +24 -0
- package/node_modules/negotiator/README.md +203 -0
- package/node_modules/negotiator/index.js +82 -0
- package/node_modules/negotiator/lib/charset.js +169 -0
- package/node_modules/negotiator/lib/encoding.js +184 -0
- package/node_modules/negotiator/lib/language.js +179 -0
- package/node_modules/negotiator/lib/mediaType.js +294 -0
- package/node_modules/negotiator/package.json +42 -0
- package/node_modules/object-inspect/.eslintrc +53 -0
- package/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/node_modules/object-inspect/.nycrc +13 -0
- package/node_modules/object-inspect/CHANGELOG.md +424 -0
- package/node_modules/object-inspect/LICENSE +21 -0
- package/node_modules/object-inspect/example/all.js +23 -0
- package/node_modules/object-inspect/example/circular.js +6 -0
- package/node_modules/object-inspect/example/fn.js +5 -0
- package/node_modules/object-inspect/example/inspect.js +10 -0
- package/node_modules/object-inspect/index.js +544 -0
- package/node_modules/object-inspect/package-support.json +20 -0
- package/node_modules/object-inspect/package.json +105 -0
- package/node_modules/object-inspect/readme.markdown +84 -0
- package/node_modules/object-inspect/test/bigint.js +58 -0
- package/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/node_modules/object-inspect/test/circular.js +16 -0
- package/node_modules/object-inspect/test/deep.js +12 -0
- package/node_modules/object-inspect/test/element.js +53 -0
- package/node_modules/object-inspect/test/err.js +48 -0
- package/node_modules/object-inspect/test/fakes.js +29 -0
- package/node_modules/object-inspect/test/fn.js +76 -0
- package/node_modules/object-inspect/test/global.js +17 -0
- package/node_modules/object-inspect/test/has.js +15 -0
- package/node_modules/object-inspect/test/holes.js +15 -0
- package/node_modules/object-inspect/test/indent-option.js +271 -0
- package/node_modules/object-inspect/test/inspect.js +139 -0
- package/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/node_modules/object-inspect/test/number.js +58 -0
- package/node_modules/object-inspect/test/quoteStyle.js +26 -0
- package/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/node_modules/object-inspect/test/undef.js +12 -0
- package/node_modules/object-inspect/test/values.js +261 -0
- package/node_modules/object-inspect/test-core-js.js +26 -0
- package/node_modules/object-inspect/util.inspect.js +1 -0
- package/node_modules/on-finished/HISTORY.md +98 -0
- package/node_modules/on-finished/LICENSE +23 -0
- package/node_modules/on-finished/README.md +162 -0
- package/node_modules/on-finished/index.js +234 -0
- package/node_modules/on-finished/package.json +39 -0
- package/node_modules/parseurl/HISTORY.md +58 -0
- package/node_modules/parseurl/LICENSE +24 -0
- package/node_modules/parseurl/README.md +133 -0
- package/node_modules/parseurl/index.js +158 -0
- package/node_modules/parseurl/package.json +40 -0
- package/node_modules/path-to-regexp/LICENSE +21 -0
- package/node_modules/path-to-regexp/Readme.md +35 -0
- package/node_modules/path-to-regexp/index.js +158 -0
- package/node_modules/path-to-regexp/package.json +30 -0
- package/node_modules/proxy-addr/HISTORY.md +161 -0
- package/node_modules/proxy-addr/LICENSE +22 -0
- package/node_modules/proxy-addr/README.md +139 -0
- package/node_modules/proxy-addr/index.js +327 -0
- package/node_modules/proxy-addr/package.json +47 -0
- package/node_modules/qs/.editorconfig +46 -0
- package/node_modules/qs/.github/FUNDING.yml +12 -0
- package/node_modules/qs/.github/SECURITY.md +11 -0
- package/node_modules/qs/.github/THREAT_MODEL.md +78 -0
- package/node_modules/qs/.nycrc +13 -0
- package/node_modules/qs/CHANGELOG.md +644 -0
- package/node_modules/qs/LICENSE.md +29 -0
- package/node_modules/qs/README.md +740 -0
- package/node_modules/qs/dist/qs.js +141 -0
- package/node_modules/qs/eslint.config.mjs +56 -0
- package/node_modules/qs/lib/formats.js +23 -0
- package/node_modules/qs/lib/index.js +11 -0
- package/node_modules/qs/lib/parse.js +371 -0
- package/node_modules/qs/lib/stringify.js +356 -0
- package/node_modules/qs/lib/utils.js +340 -0
- package/node_modules/qs/package.json +94 -0
- package/node_modules/qs/test/empty-keys-cases.js +267 -0
- package/node_modules/qs/test/parse.js +1512 -0
- package/node_modules/qs/test/stringify.js +1310 -0
- package/node_modules/qs/test/utils.js +397 -0
- package/node_modules/range-parser/HISTORY.md +56 -0
- package/node_modules/range-parser/LICENSE +23 -0
- package/node_modules/range-parser/README.md +84 -0
- package/node_modules/range-parser/index.js +162 -0
- package/node_modules/range-parser/package.json +44 -0
- package/node_modules/raw-body/LICENSE +22 -0
- package/node_modules/raw-body/README.md +223 -0
- package/node_modules/raw-body/index.d.ts +87 -0
- package/node_modules/raw-body/index.js +336 -0
- package/node_modules/raw-body/package.json +47 -0
- package/node_modules/react/LICENSE +21 -0
- package/node_modules/react/README.md +37 -0
- package/node_modules/react/cjs/react-compiler-runtime.development.js +24 -0
- package/node_modules/react/cjs/react-compiler-runtime.production.js +16 -0
- package/node_modules/react/cjs/react-compiler-runtime.profiling.js +16 -0
- package/node_modules/react/cjs/react-jsx-dev-runtime.development.js +338 -0
- package/node_modules/react/cjs/react-jsx-dev-runtime.production.js +14 -0
- package/node_modules/react/cjs/react-jsx-dev-runtime.profiling.js +14 -0
- package/node_modules/react/cjs/react-jsx-dev-runtime.react-server.development.js +370 -0
- package/node_modules/react/cjs/react-jsx-dev-runtime.react-server.production.js +40 -0
- package/node_modules/react/cjs/react-jsx-runtime.development.js +352 -0
- package/node_modules/react/cjs/react-jsx-runtime.production.js +34 -0
- package/node_modules/react/cjs/react-jsx-runtime.profiling.js +34 -0
- package/node_modules/react/cjs/react-jsx-runtime.react-server.development.js +370 -0
- package/node_modules/react/cjs/react-jsx-runtime.react-server.production.js +40 -0
- package/node_modules/react/cjs/react.development.js +1284 -0
- package/node_modules/react/cjs/react.production.js +542 -0
- package/node_modules/react/cjs/react.react-server.development.js +848 -0
- package/node_modules/react/cjs/react.react-server.production.js +423 -0
- package/node_modules/react/compiler-runtime.js +14 -0
- package/node_modules/react/index.js +7 -0
- package/node_modules/react/jsx-dev-runtime.js +7 -0
- package/node_modules/react/jsx-dev-runtime.react-server.js +7 -0
- package/node_modules/react/jsx-runtime.js +7 -0
- package/node_modules/react/jsx-runtime.react-server.js +7 -0
- package/node_modules/react/package.json +51 -0
- package/node_modules/react/react.react-server.js +7 -0
- package/node_modules/react-dom/LICENSE +21 -0
- package/node_modules/react-dom/README.md +60 -0
- package/node_modules/react-dom/cjs/react-dom-client.development.js +28121 -0
- package/node_modules/react-dom/cjs/react-dom-client.production.js +16049 -0
- package/node_modules/react-dom/cjs/react-dom-profiling.development.js +28503 -0
- package/node_modules/react-dom/cjs/react-dom-profiling.profiling.js +18068 -0
- package/node_modules/react-dom/cjs/react-dom-server-legacy.browser.development.js +9877 -0
- package/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +6603 -0
- package/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.js +9877 -0
- package/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +6692 -0
- package/node_modules/react-dom/cjs/react-dom-server.browser.development.js +10601 -0
- package/node_modules/react-dom/cjs/react-dom-server.browser.production.js +7410 -0
- package/node_modules/react-dom/cjs/react-dom-server.bun.development.js +9605 -0
- package/node_modules/react-dom/cjs/react-dom-server.bun.production.js +6745 -0
- package/node_modules/react-dom/cjs/react-dom-server.edge.development.js +10620 -0
- package/node_modules/react-dom/cjs/react-dom-server.edge.production.js +7512 -0
- package/node_modules/react-dom/cjs/react-dom-server.node.development.js +10802 -0
- package/node_modules/react-dom/cjs/react-dom-server.node.production.js +7707 -0
- package/node_modules/react-dom/cjs/react-dom-test-utils.development.js +24 -0
- package/node_modules/react-dom/cjs/react-dom-test-utils.production.js +21 -0
- package/node_modules/react-dom/cjs/react-dom.development.js +424 -0
- package/node_modules/react-dom/cjs/react-dom.production.js +210 -0
- package/node_modules/react-dom/cjs/react-dom.react-server.development.js +340 -0
- package/node_modules/react-dom/cjs/react-dom.react-server.production.js +152 -0
- package/node_modules/react-dom/client.js +38 -0
- package/node_modules/react-dom/client.react-server.js +5 -0
- package/node_modules/react-dom/index.js +38 -0
- package/node_modules/react-dom/package.json +117 -0
- package/node_modules/react-dom/profiling.js +38 -0
- package/node_modules/react-dom/profiling.react-server.js +5 -0
- package/node_modules/react-dom/react-dom.react-server.js +7 -0
- package/node_modules/react-dom/server.browser.js +16 -0
- package/node_modules/react-dom/server.bun.js +17 -0
- package/node_modules/react-dom/server.edge.js +17 -0
- package/node_modules/react-dom/server.js +3 -0
- package/node_modules/react-dom/server.node.js +18 -0
- package/node_modules/react-dom/server.react-server.js +5 -0
- package/node_modules/react-dom/static.browser.js +12 -0
- package/node_modules/react-dom/static.edge.js +12 -0
- package/node_modules/react-dom/static.js +3 -0
- package/node_modules/react-dom/static.node.js +14 -0
- package/node_modules/react-dom/static.react-server.js +5 -0
- package/node_modules/react-dom/test-utils.js +7 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/safe-buffer/package.json +51 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/Readme.md +156 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/scheduler/LICENSE +21 -0
- package/node_modules/scheduler/README.md +9 -0
- package/node_modules/scheduler/cjs/scheduler-unstable_mock.development.js +414 -0
- package/node_modules/scheduler/cjs/scheduler-unstable_mock.production.js +406 -0
- package/node_modules/scheduler/cjs/scheduler-unstable_post_task.development.js +150 -0
- package/node_modules/scheduler/cjs/scheduler-unstable_post_task.production.js +140 -0
- package/node_modules/scheduler/cjs/scheduler.development.js +364 -0
- package/node_modules/scheduler/cjs/scheduler.native.development.js +350 -0
- package/node_modules/scheduler/cjs/scheduler.native.production.js +330 -0
- package/node_modules/scheduler/cjs/scheduler.production.js +340 -0
- package/node_modules/scheduler/index.js +7 -0
- package/node_modules/scheduler/index.native.js +7 -0
- package/node_modules/scheduler/package.json +27 -0
- package/node_modules/scheduler/unstable_mock.js +7 -0
- package/node_modules/scheduler/unstable_post_task.js +7 -0
- package/node_modules/send/HISTORY.md +538 -0
- package/node_modules/send/LICENSE +23 -0
- package/node_modules/send/README.md +327 -0
- package/node_modules/send/SECURITY.md +24 -0
- package/node_modules/send/index.js +1142 -0
- package/node_modules/send/node_modules/debug/.coveralls.yml +1 -0
- package/node_modules/send/node_modules/debug/.eslintrc +11 -0
- package/node_modules/send/node_modules/debug/.npmignore +9 -0
- package/node_modules/send/node_modules/debug/.travis.yml +14 -0
- package/node_modules/send/node_modules/debug/CHANGELOG.md +362 -0
- package/node_modules/send/node_modules/debug/LICENSE +19 -0
- package/node_modules/send/node_modules/debug/Makefile +50 -0
- package/node_modules/send/node_modules/debug/README.md +312 -0
- package/node_modules/send/node_modules/debug/component.json +19 -0
- package/node_modules/send/node_modules/debug/karma.conf.js +70 -0
- package/node_modules/send/node_modules/debug/node.js +1 -0
- package/node_modules/send/node_modules/debug/node_modules/ms/index.js +152 -0
- package/node_modules/send/node_modules/debug/node_modules/ms/license.md +21 -0
- package/node_modules/send/node_modules/debug/node_modules/ms/package.json +37 -0
- package/node_modules/send/node_modules/debug/node_modules/ms/readme.md +51 -0
- package/node_modules/send/node_modules/debug/package.json +49 -0
- package/node_modules/send/node_modules/debug/src/browser.js +185 -0
- package/node_modules/send/node_modules/debug/src/debug.js +202 -0
- package/node_modules/send/node_modules/debug/src/index.js +10 -0
- package/node_modules/send/node_modules/debug/src/inspector-log.js +15 -0
- package/node_modules/send/node_modules/debug/src/node.js +248 -0
- package/node_modules/send/package.json +62 -0
- package/node_modules/serve-static/HISTORY.md +493 -0
- package/node_modules/serve-static/LICENSE +25 -0
- package/node_modules/serve-static/README.md +257 -0
- package/node_modules/serve-static/index.js +209 -0
- package/node_modules/serve-static/package.json +42 -0
- package/node_modules/setprototypeof/LICENSE +13 -0
- package/node_modules/setprototypeof/README.md +31 -0
- package/node_modules/setprototypeof/index.d.ts +2 -0
- package/node_modules/setprototypeof/index.js +17 -0
- package/node_modules/setprototypeof/package.json +38 -0
- package/node_modules/setprototypeof/test/index.js +24 -0
- package/node_modules/side-channel/.editorconfig +9 -0
- package/node_modules/side-channel/.eslintrc +12 -0
- package/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel/.nycrc +13 -0
- package/node_modules/side-channel/CHANGELOG.md +110 -0
- package/node_modules/side-channel/LICENSE +21 -0
- package/node_modules/side-channel/README.md +61 -0
- package/node_modules/side-channel/index.d.ts +14 -0
- package/node_modules/side-channel/index.js +43 -0
- package/node_modules/side-channel/package.json +85 -0
- package/node_modules/side-channel/test/index.js +104 -0
- package/node_modules/side-channel/tsconfig.json +9 -0
- package/node_modules/side-channel-list/.editorconfig +9 -0
- package/node_modules/side-channel-list/.eslintrc +11 -0
- package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-list/.nycrc +13 -0
- package/node_modules/side-channel-list/CHANGELOG.md +15 -0
- package/node_modules/side-channel-list/LICENSE +21 -0
- package/node_modules/side-channel-list/README.md +62 -0
- package/node_modules/side-channel-list/index.d.ts +13 -0
- package/node_modules/side-channel-list/index.js +113 -0
- package/node_modules/side-channel-list/list.d.ts +14 -0
- package/node_modules/side-channel-list/package.json +77 -0
- package/node_modules/side-channel-list/test/index.js +104 -0
- package/node_modules/side-channel-list/tsconfig.json +9 -0
- package/node_modules/side-channel-map/.editorconfig +9 -0
- package/node_modules/side-channel-map/.eslintrc +11 -0
- package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-map/.nycrc +13 -0
- package/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/node_modules/side-channel-map/LICENSE +21 -0
- package/node_modules/side-channel-map/README.md +62 -0
- package/node_modules/side-channel-map/index.d.ts +15 -0
- package/node_modules/side-channel-map/index.js +68 -0
- package/node_modules/side-channel-map/package.json +80 -0
- package/node_modules/side-channel-map/test/index.js +114 -0
- package/node_modules/side-channel-map/tsconfig.json +9 -0
- package/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/node_modules/side-channel-weakmap/README.md +62 -0
- package/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/node_modules/side-channel-weakmap/index.js +84 -0
- package/node_modules/side-channel-weakmap/package.json +87 -0
- package/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/node_modules/statuses/HISTORY.md +87 -0
- package/node_modules/statuses/LICENSE +23 -0
- package/node_modules/statuses/README.md +139 -0
- package/node_modules/statuses/codes.json +65 -0
- package/node_modules/statuses/index.js +146 -0
- package/node_modules/statuses/package.json +49 -0
- package/node_modules/toidentifier/HISTORY.md +9 -0
- package/node_modules/toidentifier/LICENSE +21 -0
- package/node_modules/toidentifier/README.md +61 -0
- package/node_modules/toidentifier/index.js +32 -0
- package/node_modules/toidentifier/package.json +38 -0
- package/node_modules/type-is/HISTORY.md +259 -0
- package/node_modules/type-is/LICENSE +23 -0
- package/node_modules/type-is/README.md +170 -0
- package/node_modules/type-is/index.js +266 -0
- package/node_modules/type-is/package.json +45 -0
- package/node_modules/unpipe/HISTORY.md +4 -0
- package/node_modules/unpipe/LICENSE +22 -0
- package/node_modules/unpipe/README.md +43 -0
- package/node_modules/unpipe/index.js +69 -0
- package/node_modules/unpipe/package.json +27 -0
- package/node_modules/use-sync-external-store/LICENSE +21 -0
- package/node_modules/use-sync-external-store/README.md +5 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +97 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +85 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +95 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js +88 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.js +59 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +66 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +96 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +84 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store.development.js +27 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store.production.js +13 -0
- package/node_modules/use-sync-external-store/index.js +7 -0
- package/node_modules/use-sync-external-store/package.json +43 -0
- package/node_modules/use-sync-external-store/shim/index.js +7 -0
- package/node_modules/use-sync-external-store/shim/index.native.js +7 -0
- package/node_modules/use-sync-external-store/shim/with-selector.js +7 -0
- package/node_modules/use-sync-external-store/with-selector.js +7 -0
- package/node_modules/utils-merge/.npmignore +9 -0
- package/node_modules/utils-merge/LICENSE +20 -0
- package/node_modules/utils-merge/README.md +34 -0
- package/node_modules/utils-merge/index.js +23 -0
- package/node_modules/utils-merge/package.json +40 -0
- package/node_modules/vary/HISTORY.md +39 -0
- package/node_modules/vary/LICENSE +22 -0
- package/node_modules/vary/README.md +101 -0
- package/node_modules/vary/index.js +149 -0
- package/node_modules/vary/package.json +43 -0
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +22 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +19 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/node_modules/ws/lib/receiver.js +706 -0
- package/node_modules/ws/lib/sender.js +602 -0
- package/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +554 -0
- package/node_modules/ws/lib/websocket.js +1393 -0
- package/node_modules/ws/package.json +70 -0
- package/node_modules/ws/wrapper.mjs +21 -0
- package/node_modules/zustand/LICENSE +21 -0
- package/node_modules/zustand/README.md +512 -0
- package/node_modules/zustand/esm/index.d.mts +2 -0
- package/node_modules/zustand/esm/index.mjs +2 -0
- package/node_modules/zustand/esm/middleware/combine.d.mts +4 -0
- package/node_modules/zustand/esm/middleware/devtools.d.mts +58 -0
- package/node_modules/zustand/esm/middleware/immer.d.mts +29 -0
- package/node_modules/zustand/esm/middleware/immer.mjs +12 -0
- package/node_modules/zustand/esm/middleware/persist.d.mts +99 -0
- package/node_modules/zustand/esm/middleware/redux.d.mts +21 -0
- package/node_modules/zustand/esm/middleware/ssrSafe.d.mts +2 -0
- package/node_modules/zustand/esm/middleware/subscribeWithSelector.d.mts +25 -0
- package/node_modules/zustand/esm/middleware.d.mts +6 -0
- package/node_modules/zustand/esm/middleware.mjs +487 -0
- package/node_modules/zustand/esm/react/shallow.d.mts +1 -0
- package/node_modules/zustand/esm/react/shallow.mjs +12 -0
- package/node_modules/zustand/esm/react.d.mts +14 -0
- package/node_modules/zustand/esm/react.mjs +22 -0
- package/node_modules/zustand/esm/shallow.d.mts +2 -0
- package/node_modules/zustand/esm/shallow.mjs +2 -0
- package/node_modules/zustand/esm/traditional.d.mts +14 -0
- package/node_modules/zustand/esm/traditional.mjs +26 -0
- package/node_modules/zustand/esm/vanilla/shallow.d.mts +1 -0
- package/node_modules/zustand/esm/vanilla/shallow.mjs +55 -0
- package/node_modules/zustand/esm/vanilla.d.mts +31 -0
- package/node_modules/zustand/esm/vanilla.mjs +24 -0
- package/node_modules/zustand/index.d.ts +2 -0
- package/node_modules/zustand/index.js +19 -0
- package/node_modules/zustand/middleware/combine.d.ts +4 -0
- package/node_modules/zustand/middleware/devtools.d.ts +58 -0
- package/node_modules/zustand/middleware/immer.d.ts +29 -0
- package/node_modules/zustand/middleware/immer.js +14 -0
- package/node_modules/zustand/middleware/persist.d.ts +99 -0
- package/node_modules/zustand/middleware/redux.d.ts +21 -0
- package/node_modules/zustand/middleware/ssrSafe.d.ts +2 -0
- package/node_modules/zustand/middleware/subscribeWithSelector.d.ts +25 -0
- package/node_modules/zustand/middleware.d.ts +6 -0
- package/node_modules/zustand/middleware.js +495 -0
- package/node_modules/zustand/package.json +108 -0
- package/node_modules/zustand/react/shallow.d.ts +1 -0
- package/node_modules/zustand/react/shallow.js +14 -0
- package/node_modules/zustand/react.d.ts +14 -0
- package/node_modules/zustand/react.js +25 -0
- package/node_modules/zustand/shallow.d.ts +2 -0
- package/node_modules/zustand/shallow.js +15 -0
- package/node_modules/zustand/traditional.d.ts +14 -0
- package/node_modules/zustand/traditional.js +29 -0
- package/node_modules/zustand/ts_version_4.5_and_above_is_required.d.ts +0 -0
- package/node_modules/zustand/vanilla/shallow.d.ts +1 -0
- package/node_modules/zustand/vanilla/shallow.js +57 -0
- package/node_modules/zustand/vanilla.d.ts +31 -0
- package/node_modules/zustand/vanilla.js +26 -0
- package/package.json +1 -1
- package/packages/cli/package.json +1 -1
- package/packages/daemon/package.json +1 -1
- package/packages/daemon/src/index.js +26 -7
- package/packages/gui/dist/assets/index-B5E3l1CX.js +73 -0
- package/packages/gui/dist/index.html +1 -1
- package/packages/gui/package.json +1 -1
- package/packages/gui/src/components/AgentActions.jsx +4 -2
|
@@ -0,0 +1,2509 @@
|
|
|
1
|
+
const EventEmitter = require('node:events').EventEmitter;
|
|
2
|
+
const childProcess = require('node:child_process');
|
|
3
|
+
const path = require('node:path');
|
|
4
|
+
const fs = require('node:fs');
|
|
5
|
+
const process = require('node:process');
|
|
6
|
+
|
|
7
|
+
const { Argument, humanReadableArgName } = require('./argument.js');
|
|
8
|
+
const { CommanderError } = require('./error.js');
|
|
9
|
+
const { Help } = require('./help.js');
|
|
10
|
+
const { Option, DualOptions } = require('./option.js');
|
|
11
|
+
const { suggestSimilar } = require('./suggestSimilar');
|
|
12
|
+
|
|
13
|
+
class Command extends EventEmitter {
|
|
14
|
+
/**
|
|
15
|
+
* Initialize a new `Command`.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} [name]
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
constructor(name) {
|
|
21
|
+
super();
|
|
22
|
+
/** @type {Command[]} */
|
|
23
|
+
this.commands = [];
|
|
24
|
+
/** @type {Option[]} */
|
|
25
|
+
this.options = [];
|
|
26
|
+
this.parent = null;
|
|
27
|
+
this._allowUnknownOption = false;
|
|
28
|
+
this._allowExcessArguments = true;
|
|
29
|
+
/** @type {Argument[]} */
|
|
30
|
+
this.registeredArguments = [];
|
|
31
|
+
this._args = this.registeredArguments; // deprecated old name
|
|
32
|
+
/** @type {string[]} */
|
|
33
|
+
this.args = []; // cli args with options removed
|
|
34
|
+
this.rawArgs = [];
|
|
35
|
+
this.processedArgs = []; // like .args but after custom processing and collecting variadic
|
|
36
|
+
this._scriptPath = null;
|
|
37
|
+
this._name = name || '';
|
|
38
|
+
this._optionValues = {};
|
|
39
|
+
this._optionValueSources = {}; // default, env, cli etc
|
|
40
|
+
this._storeOptionsAsProperties = false;
|
|
41
|
+
this._actionHandler = null;
|
|
42
|
+
this._executableHandler = false;
|
|
43
|
+
this._executableFile = null; // custom name for executable
|
|
44
|
+
this._executableDir = null; // custom search directory for subcommands
|
|
45
|
+
this._defaultCommandName = null;
|
|
46
|
+
this._exitCallback = null;
|
|
47
|
+
this._aliases = [];
|
|
48
|
+
this._combineFlagAndOptionalValue = true;
|
|
49
|
+
this._description = '';
|
|
50
|
+
this._summary = '';
|
|
51
|
+
this._argsDescription = undefined; // legacy
|
|
52
|
+
this._enablePositionalOptions = false;
|
|
53
|
+
this._passThroughOptions = false;
|
|
54
|
+
this._lifeCycleHooks = {}; // a hash of arrays
|
|
55
|
+
/** @type {(boolean | string)} */
|
|
56
|
+
this._showHelpAfterError = false;
|
|
57
|
+
this._showSuggestionAfterError = true;
|
|
58
|
+
|
|
59
|
+
// see .configureOutput() for docs
|
|
60
|
+
this._outputConfiguration = {
|
|
61
|
+
writeOut: (str) => process.stdout.write(str),
|
|
62
|
+
writeErr: (str) => process.stderr.write(str),
|
|
63
|
+
getOutHelpWidth: () =>
|
|
64
|
+
process.stdout.isTTY ? process.stdout.columns : undefined,
|
|
65
|
+
getErrHelpWidth: () =>
|
|
66
|
+
process.stderr.isTTY ? process.stderr.columns : undefined,
|
|
67
|
+
outputError: (str, write) => write(str),
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
this._hidden = false;
|
|
71
|
+
/** @type {(Option | null | undefined)} */
|
|
72
|
+
this._helpOption = undefined; // Lazy created on demand. May be null if help option is disabled.
|
|
73
|
+
this._addImplicitHelpCommand = undefined; // undecided whether true or false yet, not inherited
|
|
74
|
+
/** @type {Command} */
|
|
75
|
+
this._helpCommand = undefined; // lazy initialised, inherited
|
|
76
|
+
this._helpConfiguration = {};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Copy settings that are useful to have in common across root command and subcommands.
|
|
81
|
+
*
|
|
82
|
+
* (Used internally when adding a command using `.command()` so subcommands inherit parent settings.)
|
|
83
|
+
*
|
|
84
|
+
* @param {Command} sourceCommand
|
|
85
|
+
* @return {Command} `this` command for chaining
|
|
86
|
+
*/
|
|
87
|
+
copyInheritedSettings(sourceCommand) {
|
|
88
|
+
this._outputConfiguration = sourceCommand._outputConfiguration;
|
|
89
|
+
this._helpOption = sourceCommand._helpOption;
|
|
90
|
+
this._helpCommand = sourceCommand._helpCommand;
|
|
91
|
+
this._helpConfiguration = sourceCommand._helpConfiguration;
|
|
92
|
+
this._exitCallback = sourceCommand._exitCallback;
|
|
93
|
+
this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties;
|
|
94
|
+
this._combineFlagAndOptionalValue =
|
|
95
|
+
sourceCommand._combineFlagAndOptionalValue;
|
|
96
|
+
this._allowExcessArguments = sourceCommand._allowExcessArguments;
|
|
97
|
+
this._enablePositionalOptions = sourceCommand._enablePositionalOptions;
|
|
98
|
+
this._showHelpAfterError = sourceCommand._showHelpAfterError;
|
|
99
|
+
this._showSuggestionAfterError = sourceCommand._showSuggestionAfterError;
|
|
100
|
+
|
|
101
|
+
return this;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @returns {Command[]}
|
|
106
|
+
* @private
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
_getCommandAndAncestors() {
|
|
110
|
+
const result = [];
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
112
|
+
for (let command = this; command; command = command.parent) {
|
|
113
|
+
result.push(command);
|
|
114
|
+
}
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Define a command.
|
|
120
|
+
*
|
|
121
|
+
* There are two styles of command: pay attention to where to put the description.
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* // Command implemented using action handler (description is supplied separately to `.command`)
|
|
125
|
+
* program
|
|
126
|
+
* .command('clone <source> [destination]')
|
|
127
|
+
* .description('clone a repository into a newly created directory')
|
|
128
|
+
* .action((source, destination) => {
|
|
129
|
+
* console.log('clone command called');
|
|
130
|
+
* });
|
|
131
|
+
*
|
|
132
|
+
* // Command implemented using separate executable file (description is second parameter to `.command`)
|
|
133
|
+
* program
|
|
134
|
+
* .command('start <service>', 'start named service')
|
|
135
|
+
* .command('stop [service]', 'stop named service, or all if no name supplied');
|
|
136
|
+
*
|
|
137
|
+
* @param {string} nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
|
|
138
|
+
* @param {(object | string)} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable)
|
|
139
|
+
* @param {object} [execOpts] - configuration options (for executable)
|
|
140
|
+
* @return {Command} returns new command for action handler, or `this` for executable command
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
command(nameAndArgs, actionOptsOrExecDesc, execOpts) {
|
|
144
|
+
let desc = actionOptsOrExecDesc;
|
|
145
|
+
let opts = execOpts;
|
|
146
|
+
if (typeof desc === 'object' && desc !== null) {
|
|
147
|
+
opts = desc;
|
|
148
|
+
desc = null;
|
|
149
|
+
}
|
|
150
|
+
opts = opts || {};
|
|
151
|
+
const [, name, args] = nameAndArgs.match(/([^ ]+) *(.*)/);
|
|
152
|
+
|
|
153
|
+
const cmd = this.createCommand(name);
|
|
154
|
+
if (desc) {
|
|
155
|
+
cmd.description(desc);
|
|
156
|
+
cmd._executableHandler = true;
|
|
157
|
+
}
|
|
158
|
+
if (opts.isDefault) this._defaultCommandName = cmd._name;
|
|
159
|
+
cmd._hidden = !!(opts.noHelp || opts.hidden); // noHelp is deprecated old name for hidden
|
|
160
|
+
cmd._executableFile = opts.executableFile || null; // Custom name for executable file, set missing to null to match constructor
|
|
161
|
+
if (args) cmd.arguments(args);
|
|
162
|
+
this._registerCommand(cmd);
|
|
163
|
+
cmd.parent = this;
|
|
164
|
+
cmd.copyInheritedSettings(this);
|
|
165
|
+
|
|
166
|
+
if (desc) return this;
|
|
167
|
+
return cmd;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Factory routine to create a new unattached command.
|
|
172
|
+
*
|
|
173
|
+
* See .command() for creating an attached subcommand, which uses this routine to
|
|
174
|
+
* create the command. You can override createCommand to customise subcommands.
|
|
175
|
+
*
|
|
176
|
+
* @param {string} [name]
|
|
177
|
+
* @return {Command} new command
|
|
178
|
+
*/
|
|
179
|
+
|
|
180
|
+
createCommand(name) {
|
|
181
|
+
return new Command(name);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* You can customise the help with a subclass of Help by overriding createHelp,
|
|
186
|
+
* or by overriding Help properties using configureHelp().
|
|
187
|
+
*
|
|
188
|
+
* @return {Help}
|
|
189
|
+
*/
|
|
190
|
+
|
|
191
|
+
createHelp() {
|
|
192
|
+
return Object.assign(new Help(), this.configureHelp());
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* You can customise the help by overriding Help properties using configureHelp(),
|
|
197
|
+
* or with a subclass of Help by overriding createHelp().
|
|
198
|
+
*
|
|
199
|
+
* @param {object} [configuration] - configuration options
|
|
200
|
+
* @return {(Command | object)} `this` command for chaining, or stored configuration
|
|
201
|
+
*/
|
|
202
|
+
|
|
203
|
+
configureHelp(configuration) {
|
|
204
|
+
if (configuration === undefined) return this._helpConfiguration;
|
|
205
|
+
|
|
206
|
+
this._helpConfiguration = configuration;
|
|
207
|
+
return this;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* The default output goes to stdout and stderr. You can customise this for special
|
|
212
|
+
* applications. You can also customise the display of errors by overriding outputError.
|
|
213
|
+
*
|
|
214
|
+
* The configuration properties are all functions:
|
|
215
|
+
*
|
|
216
|
+
* // functions to change where being written, stdout and stderr
|
|
217
|
+
* writeOut(str)
|
|
218
|
+
* writeErr(str)
|
|
219
|
+
* // matching functions to specify width for wrapping help
|
|
220
|
+
* getOutHelpWidth()
|
|
221
|
+
* getErrHelpWidth()
|
|
222
|
+
* // functions based on what is being written out
|
|
223
|
+
* outputError(str, write) // used for displaying errors, and not used for displaying help
|
|
224
|
+
*
|
|
225
|
+
* @param {object} [configuration] - configuration options
|
|
226
|
+
* @return {(Command | object)} `this` command for chaining, or stored configuration
|
|
227
|
+
*/
|
|
228
|
+
|
|
229
|
+
configureOutput(configuration) {
|
|
230
|
+
if (configuration === undefined) return this._outputConfiguration;
|
|
231
|
+
|
|
232
|
+
Object.assign(this._outputConfiguration, configuration);
|
|
233
|
+
return this;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Display the help or a custom message after an error occurs.
|
|
238
|
+
*
|
|
239
|
+
* @param {(boolean|string)} [displayHelp]
|
|
240
|
+
* @return {Command} `this` command for chaining
|
|
241
|
+
*/
|
|
242
|
+
showHelpAfterError(displayHelp = true) {
|
|
243
|
+
if (typeof displayHelp !== 'string') displayHelp = !!displayHelp;
|
|
244
|
+
this._showHelpAfterError = displayHelp;
|
|
245
|
+
return this;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Display suggestion of similar commands for unknown commands, or options for unknown options.
|
|
250
|
+
*
|
|
251
|
+
* @param {boolean} [displaySuggestion]
|
|
252
|
+
* @return {Command} `this` command for chaining
|
|
253
|
+
*/
|
|
254
|
+
showSuggestionAfterError(displaySuggestion = true) {
|
|
255
|
+
this._showSuggestionAfterError = !!displaySuggestion;
|
|
256
|
+
return this;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Add a prepared subcommand.
|
|
261
|
+
*
|
|
262
|
+
* See .command() for creating an attached subcommand which inherits settings from its parent.
|
|
263
|
+
*
|
|
264
|
+
* @param {Command} cmd - new subcommand
|
|
265
|
+
* @param {object} [opts] - configuration options
|
|
266
|
+
* @return {Command} `this` command for chaining
|
|
267
|
+
*/
|
|
268
|
+
|
|
269
|
+
addCommand(cmd, opts) {
|
|
270
|
+
if (!cmd._name) {
|
|
271
|
+
throw new Error(`Command passed to .addCommand() must have a name
|
|
272
|
+
- specify the name in Command constructor or using .name()`);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
opts = opts || {};
|
|
276
|
+
if (opts.isDefault) this._defaultCommandName = cmd._name;
|
|
277
|
+
if (opts.noHelp || opts.hidden) cmd._hidden = true; // modifying passed command due to existing implementation
|
|
278
|
+
|
|
279
|
+
this._registerCommand(cmd);
|
|
280
|
+
cmd.parent = this;
|
|
281
|
+
cmd._checkForBrokenPassThrough();
|
|
282
|
+
|
|
283
|
+
return this;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Factory routine to create a new unattached argument.
|
|
288
|
+
*
|
|
289
|
+
* See .argument() for creating an attached argument, which uses this routine to
|
|
290
|
+
* create the argument. You can override createArgument to return a custom argument.
|
|
291
|
+
*
|
|
292
|
+
* @param {string} name
|
|
293
|
+
* @param {string} [description]
|
|
294
|
+
* @return {Argument} new argument
|
|
295
|
+
*/
|
|
296
|
+
|
|
297
|
+
createArgument(name, description) {
|
|
298
|
+
return new Argument(name, description);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Define argument syntax for command.
|
|
303
|
+
*
|
|
304
|
+
* The default is that the argument is required, and you can explicitly
|
|
305
|
+
* indicate this with <> around the name. Put [] around the name for an optional argument.
|
|
306
|
+
*
|
|
307
|
+
* @example
|
|
308
|
+
* program.argument('<input-file>');
|
|
309
|
+
* program.argument('[output-file]');
|
|
310
|
+
*
|
|
311
|
+
* @param {string} name
|
|
312
|
+
* @param {string} [description]
|
|
313
|
+
* @param {(Function|*)} [fn] - custom argument processing function
|
|
314
|
+
* @param {*} [defaultValue]
|
|
315
|
+
* @return {Command} `this` command for chaining
|
|
316
|
+
*/
|
|
317
|
+
argument(name, description, fn, defaultValue) {
|
|
318
|
+
const argument = this.createArgument(name, description);
|
|
319
|
+
if (typeof fn === 'function') {
|
|
320
|
+
argument.default(defaultValue).argParser(fn);
|
|
321
|
+
} else {
|
|
322
|
+
argument.default(fn);
|
|
323
|
+
}
|
|
324
|
+
this.addArgument(argument);
|
|
325
|
+
return this;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Define argument syntax for command, adding multiple at once (without descriptions).
|
|
330
|
+
*
|
|
331
|
+
* See also .argument().
|
|
332
|
+
*
|
|
333
|
+
* @example
|
|
334
|
+
* program.arguments('<cmd> [env]');
|
|
335
|
+
*
|
|
336
|
+
* @param {string} names
|
|
337
|
+
* @return {Command} `this` command for chaining
|
|
338
|
+
*/
|
|
339
|
+
|
|
340
|
+
arguments(names) {
|
|
341
|
+
names
|
|
342
|
+
.trim()
|
|
343
|
+
.split(/ +/)
|
|
344
|
+
.forEach((detail) => {
|
|
345
|
+
this.argument(detail);
|
|
346
|
+
});
|
|
347
|
+
return this;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Define argument syntax for command, adding a prepared argument.
|
|
352
|
+
*
|
|
353
|
+
* @param {Argument} argument
|
|
354
|
+
* @return {Command} `this` command for chaining
|
|
355
|
+
*/
|
|
356
|
+
addArgument(argument) {
|
|
357
|
+
const previousArgument = this.registeredArguments.slice(-1)[0];
|
|
358
|
+
if (previousArgument && previousArgument.variadic) {
|
|
359
|
+
throw new Error(
|
|
360
|
+
`only the last argument can be variadic '${previousArgument.name()}'`,
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
if (
|
|
364
|
+
argument.required &&
|
|
365
|
+
argument.defaultValue !== undefined &&
|
|
366
|
+
argument.parseArg === undefined
|
|
367
|
+
) {
|
|
368
|
+
throw new Error(
|
|
369
|
+
`a default value for a required argument is never used: '${argument.name()}'`,
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
this.registeredArguments.push(argument);
|
|
373
|
+
return this;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Customise or override default help command. By default a help command is automatically added if your command has subcommands.
|
|
378
|
+
*
|
|
379
|
+
* @example
|
|
380
|
+
* program.helpCommand('help [cmd]');
|
|
381
|
+
* program.helpCommand('help [cmd]', 'show help');
|
|
382
|
+
* program.helpCommand(false); // suppress default help command
|
|
383
|
+
* program.helpCommand(true); // add help command even if no subcommands
|
|
384
|
+
*
|
|
385
|
+
* @param {string|boolean} enableOrNameAndArgs - enable with custom name and/or arguments, or boolean to override whether added
|
|
386
|
+
* @param {string} [description] - custom description
|
|
387
|
+
* @return {Command} `this` command for chaining
|
|
388
|
+
*/
|
|
389
|
+
|
|
390
|
+
helpCommand(enableOrNameAndArgs, description) {
|
|
391
|
+
if (typeof enableOrNameAndArgs === 'boolean') {
|
|
392
|
+
this._addImplicitHelpCommand = enableOrNameAndArgs;
|
|
393
|
+
return this;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
enableOrNameAndArgs = enableOrNameAndArgs ?? 'help [command]';
|
|
397
|
+
const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/);
|
|
398
|
+
const helpDescription = description ?? 'display help for command';
|
|
399
|
+
|
|
400
|
+
const helpCommand = this.createCommand(helpName);
|
|
401
|
+
helpCommand.helpOption(false);
|
|
402
|
+
if (helpArgs) helpCommand.arguments(helpArgs);
|
|
403
|
+
if (helpDescription) helpCommand.description(helpDescription);
|
|
404
|
+
|
|
405
|
+
this._addImplicitHelpCommand = true;
|
|
406
|
+
this._helpCommand = helpCommand;
|
|
407
|
+
|
|
408
|
+
return this;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Add prepared custom help command.
|
|
413
|
+
*
|
|
414
|
+
* @param {(Command|string|boolean)} helpCommand - custom help command, or deprecated enableOrNameAndArgs as for `.helpCommand()`
|
|
415
|
+
* @param {string} [deprecatedDescription] - deprecated custom description used with custom name only
|
|
416
|
+
* @return {Command} `this` command for chaining
|
|
417
|
+
*/
|
|
418
|
+
addHelpCommand(helpCommand, deprecatedDescription) {
|
|
419
|
+
// If not passed an object, call through to helpCommand for backwards compatibility,
|
|
420
|
+
// as addHelpCommand was originally used like helpCommand is now.
|
|
421
|
+
if (typeof helpCommand !== 'object') {
|
|
422
|
+
this.helpCommand(helpCommand, deprecatedDescription);
|
|
423
|
+
return this;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
this._addImplicitHelpCommand = true;
|
|
427
|
+
this._helpCommand = helpCommand;
|
|
428
|
+
return this;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Lazy create help command.
|
|
433
|
+
*
|
|
434
|
+
* @return {(Command|null)}
|
|
435
|
+
* @package
|
|
436
|
+
*/
|
|
437
|
+
_getHelpCommand() {
|
|
438
|
+
const hasImplicitHelpCommand =
|
|
439
|
+
this._addImplicitHelpCommand ??
|
|
440
|
+
(this.commands.length &&
|
|
441
|
+
!this._actionHandler &&
|
|
442
|
+
!this._findCommand('help'));
|
|
443
|
+
|
|
444
|
+
if (hasImplicitHelpCommand) {
|
|
445
|
+
if (this._helpCommand === undefined) {
|
|
446
|
+
this.helpCommand(undefined, undefined); // use default name and description
|
|
447
|
+
}
|
|
448
|
+
return this._helpCommand;
|
|
449
|
+
}
|
|
450
|
+
return null;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Add hook for life cycle event.
|
|
455
|
+
*
|
|
456
|
+
* @param {string} event
|
|
457
|
+
* @param {Function} listener
|
|
458
|
+
* @return {Command} `this` command for chaining
|
|
459
|
+
*/
|
|
460
|
+
|
|
461
|
+
hook(event, listener) {
|
|
462
|
+
const allowedValues = ['preSubcommand', 'preAction', 'postAction'];
|
|
463
|
+
if (!allowedValues.includes(event)) {
|
|
464
|
+
throw new Error(`Unexpected value for event passed to hook : '${event}'.
|
|
465
|
+
Expecting one of '${allowedValues.join("', '")}'`);
|
|
466
|
+
}
|
|
467
|
+
if (this._lifeCycleHooks[event]) {
|
|
468
|
+
this._lifeCycleHooks[event].push(listener);
|
|
469
|
+
} else {
|
|
470
|
+
this._lifeCycleHooks[event] = [listener];
|
|
471
|
+
}
|
|
472
|
+
return this;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Register callback to use as replacement for calling process.exit.
|
|
477
|
+
*
|
|
478
|
+
* @param {Function} [fn] optional callback which will be passed a CommanderError, defaults to throwing
|
|
479
|
+
* @return {Command} `this` command for chaining
|
|
480
|
+
*/
|
|
481
|
+
|
|
482
|
+
exitOverride(fn) {
|
|
483
|
+
if (fn) {
|
|
484
|
+
this._exitCallback = fn;
|
|
485
|
+
} else {
|
|
486
|
+
this._exitCallback = (err) => {
|
|
487
|
+
if (err.code !== 'commander.executeSubCommandAsync') {
|
|
488
|
+
throw err;
|
|
489
|
+
} else {
|
|
490
|
+
// Async callback from spawn events, not useful to throw.
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
return this;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Call process.exit, and _exitCallback if defined.
|
|
499
|
+
*
|
|
500
|
+
* @param {number} exitCode exit code for using with process.exit
|
|
501
|
+
* @param {string} code an id string representing the error
|
|
502
|
+
* @param {string} message human-readable description of the error
|
|
503
|
+
* @return never
|
|
504
|
+
* @private
|
|
505
|
+
*/
|
|
506
|
+
|
|
507
|
+
_exit(exitCode, code, message) {
|
|
508
|
+
if (this._exitCallback) {
|
|
509
|
+
this._exitCallback(new CommanderError(exitCode, code, message));
|
|
510
|
+
// Expecting this line is not reached.
|
|
511
|
+
}
|
|
512
|
+
process.exit(exitCode);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Register callback `fn` for the command.
|
|
517
|
+
*
|
|
518
|
+
* @example
|
|
519
|
+
* program
|
|
520
|
+
* .command('serve')
|
|
521
|
+
* .description('start service')
|
|
522
|
+
* .action(function() {
|
|
523
|
+
* // do work here
|
|
524
|
+
* });
|
|
525
|
+
*
|
|
526
|
+
* @param {Function} fn
|
|
527
|
+
* @return {Command} `this` command for chaining
|
|
528
|
+
*/
|
|
529
|
+
|
|
530
|
+
action(fn) {
|
|
531
|
+
const listener = (args) => {
|
|
532
|
+
// The .action callback takes an extra parameter which is the command or options.
|
|
533
|
+
const expectedArgsCount = this.registeredArguments.length;
|
|
534
|
+
const actionArgs = args.slice(0, expectedArgsCount);
|
|
535
|
+
if (this._storeOptionsAsProperties) {
|
|
536
|
+
actionArgs[expectedArgsCount] = this; // backwards compatible "options"
|
|
537
|
+
} else {
|
|
538
|
+
actionArgs[expectedArgsCount] = this.opts();
|
|
539
|
+
}
|
|
540
|
+
actionArgs.push(this);
|
|
541
|
+
|
|
542
|
+
return fn.apply(this, actionArgs);
|
|
543
|
+
};
|
|
544
|
+
this._actionHandler = listener;
|
|
545
|
+
return this;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Factory routine to create a new unattached option.
|
|
550
|
+
*
|
|
551
|
+
* See .option() for creating an attached option, which uses this routine to
|
|
552
|
+
* create the option. You can override createOption to return a custom option.
|
|
553
|
+
*
|
|
554
|
+
* @param {string} flags
|
|
555
|
+
* @param {string} [description]
|
|
556
|
+
* @return {Option} new option
|
|
557
|
+
*/
|
|
558
|
+
|
|
559
|
+
createOption(flags, description) {
|
|
560
|
+
return new Option(flags, description);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Wrap parseArgs to catch 'commander.invalidArgument'.
|
|
565
|
+
*
|
|
566
|
+
* @param {(Option | Argument)} target
|
|
567
|
+
* @param {string} value
|
|
568
|
+
* @param {*} previous
|
|
569
|
+
* @param {string} invalidArgumentMessage
|
|
570
|
+
* @private
|
|
571
|
+
*/
|
|
572
|
+
|
|
573
|
+
_callParseArg(target, value, previous, invalidArgumentMessage) {
|
|
574
|
+
try {
|
|
575
|
+
return target.parseArg(value, previous);
|
|
576
|
+
} catch (err) {
|
|
577
|
+
if (err.code === 'commander.invalidArgument') {
|
|
578
|
+
const message = `${invalidArgumentMessage} ${err.message}`;
|
|
579
|
+
this.error(message, { exitCode: err.exitCode, code: err.code });
|
|
580
|
+
}
|
|
581
|
+
throw err;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* Check for option flag conflicts.
|
|
587
|
+
* Register option if no conflicts found, or throw on conflict.
|
|
588
|
+
*
|
|
589
|
+
* @param {Option} option
|
|
590
|
+
* @private
|
|
591
|
+
*/
|
|
592
|
+
|
|
593
|
+
_registerOption(option) {
|
|
594
|
+
const matchingOption =
|
|
595
|
+
(option.short && this._findOption(option.short)) ||
|
|
596
|
+
(option.long && this._findOption(option.long));
|
|
597
|
+
if (matchingOption) {
|
|
598
|
+
const matchingFlag =
|
|
599
|
+
option.long && this._findOption(option.long)
|
|
600
|
+
? option.long
|
|
601
|
+
: option.short;
|
|
602
|
+
throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'
|
|
603
|
+
- already used by option '${matchingOption.flags}'`);
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
this.options.push(option);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Check for command name and alias conflicts with existing commands.
|
|
611
|
+
* Register command if no conflicts found, or throw on conflict.
|
|
612
|
+
*
|
|
613
|
+
* @param {Command} command
|
|
614
|
+
* @private
|
|
615
|
+
*/
|
|
616
|
+
|
|
617
|
+
_registerCommand(command) {
|
|
618
|
+
const knownBy = (cmd) => {
|
|
619
|
+
return [cmd.name()].concat(cmd.aliases());
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
const alreadyUsed = knownBy(command).find((name) =>
|
|
623
|
+
this._findCommand(name),
|
|
624
|
+
);
|
|
625
|
+
if (alreadyUsed) {
|
|
626
|
+
const existingCmd = knownBy(this._findCommand(alreadyUsed)).join('|');
|
|
627
|
+
const newCmd = knownBy(command).join('|');
|
|
628
|
+
throw new Error(
|
|
629
|
+
`cannot add command '${newCmd}' as already have command '${existingCmd}'`,
|
|
630
|
+
);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
this.commands.push(command);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Add an option.
|
|
638
|
+
*
|
|
639
|
+
* @param {Option} option
|
|
640
|
+
* @return {Command} `this` command for chaining
|
|
641
|
+
*/
|
|
642
|
+
addOption(option) {
|
|
643
|
+
this._registerOption(option);
|
|
644
|
+
|
|
645
|
+
const oname = option.name();
|
|
646
|
+
const name = option.attributeName();
|
|
647
|
+
|
|
648
|
+
// store default value
|
|
649
|
+
if (option.negate) {
|
|
650
|
+
// --no-foo is special and defaults foo to true, unless a --foo option is already defined
|
|
651
|
+
const positiveLongFlag = option.long.replace(/^--no-/, '--');
|
|
652
|
+
if (!this._findOption(positiveLongFlag)) {
|
|
653
|
+
this.setOptionValueWithSource(
|
|
654
|
+
name,
|
|
655
|
+
option.defaultValue === undefined ? true : option.defaultValue,
|
|
656
|
+
'default',
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
} else if (option.defaultValue !== undefined) {
|
|
660
|
+
this.setOptionValueWithSource(name, option.defaultValue, 'default');
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
// handler for cli and env supplied values
|
|
664
|
+
const handleOptionValue = (val, invalidValueMessage, valueSource) => {
|
|
665
|
+
// val is null for optional option used without an optional-argument.
|
|
666
|
+
// val is undefined for boolean and negated option.
|
|
667
|
+
if (val == null && option.presetArg !== undefined) {
|
|
668
|
+
val = option.presetArg;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
// custom processing
|
|
672
|
+
const oldValue = this.getOptionValue(name);
|
|
673
|
+
if (val !== null && option.parseArg) {
|
|
674
|
+
val = this._callParseArg(option, val, oldValue, invalidValueMessage);
|
|
675
|
+
} else if (val !== null && option.variadic) {
|
|
676
|
+
val = option._concatValue(val, oldValue);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
// Fill-in appropriate missing values. Long winded but easy to follow.
|
|
680
|
+
if (val == null) {
|
|
681
|
+
if (option.negate) {
|
|
682
|
+
val = false;
|
|
683
|
+
} else if (option.isBoolean() || option.optional) {
|
|
684
|
+
val = true;
|
|
685
|
+
} else {
|
|
686
|
+
val = ''; // not normal, parseArg might have failed or be a mock function for testing
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
this.setOptionValueWithSource(name, val, valueSource);
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
this.on('option:' + oname, (val) => {
|
|
693
|
+
const invalidValueMessage = `error: option '${option.flags}' argument '${val}' is invalid.`;
|
|
694
|
+
handleOptionValue(val, invalidValueMessage, 'cli');
|
|
695
|
+
});
|
|
696
|
+
|
|
697
|
+
if (option.envVar) {
|
|
698
|
+
this.on('optionEnv:' + oname, (val) => {
|
|
699
|
+
const invalidValueMessage = `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`;
|
|
700
|
+
handleOptionValue(val, invalidValueMessage, 'env');
|
|
701
|
+
});
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
return this;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* Internal implementation shared by .option() and .requiredOption()
|
|
709
|
+
*
|
|
710
|
+
* @return {Command} `this` command for chaining
|
|
711
|
+
* @private
|
|
712
|
+
*/
|
|
713
|
+
_optionEx(config, flags, description, fn, defaultValue) {
|
|
714
|
+
if (typeof flags === 'object' && flags instanceof Option) {
|
|
715
|
+
throw new Error(
|
|
716
|
+
'To add an Option object use addOption() instead of option() or requiredOption()',
|
|
717
|
+
);
|
|
718
|
+
}
|
|
719
|
+
const option = this.createOption(flags, description);
|
|
720
|
+
option.makeOptionMandatory(!!config.mandatory);
|
|
721
|
+
if (typeof fn === 'function') {
|
|
722
|
+
option.default(defaultValue).argParser(fn);
|
|
723
|
+
} else if (fn instanceof RegExp) {
|
|
724
|
+
// deprecated
|
|
725
|
+
const regex = fn;
|
|
726
|
+
fn = (val, def) => {
|
|
727
|
+
const m = regex.exec(val);
|
|
728
|
+
return m ? m[0] : def;
|
|
729
|
+
};
|
|
730
|
+
option.default(defaultValue).argParser(fn);
|
|
731
|
+
} else {
|
|
732
|
+
option.default(fn);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
return this.addOption(option);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Define option with `flags`, `description`, and optional argument parsing function or `defaultValue` or both.
|
|
740
|
+
*
|
|
741
|
+
* The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. A required
|
|
742
|
+
* option-argument is indicated by `<>` and an optional option-argument by `[]`.
|
|
743
|
+
*
|
|
744
|
+
* See the README for more details, and see also addOption() and requiredOption().
|
|
745
|
+
*
|
|
746
|
+
* @example
|
|
747
|
+
* program
|
|
748
|
+
* .option('-p, --pepper', 'add pepper')
|
|
749
|
+
* .option('-p, --pizza-type <TYPE>', 'type of pizza') // required option-argument
|
|
750
|
+
* .option('-c, --cheese [CHEESE]', 'add extra cheese', 'mozzarella') // optional option-argument with default
|
|
751
|
+
* .option('-t, --tip <VALUE>', 'add tip to purchase cost', parseFloat) // custom parse function
|
|
752
|
+
*
|
|
753
|
+
* @param {string} flags
|
|
754
|
+
* @param {string} [description]
|
|
755
|
+
* @param {(Function|*)} [parseArg] - custom option processing function or default value
|
|
756
|
+
* @param {*} [defaultValue]
|
|
757
|
+
* @return {Command} `this` command for chaining
|
|
758
|
+
*/
|
|
759
|
+
|
|
760
|
+
option(flags, description, parseArg, defaultValue) {
|
|
761
|
+
return this._optionEx({}, flags, description, parseArg, defaultValue);
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Add a required option which must have a value after parsing. This usually means
|
|
766
|
+
* the option must be specified on the command line. (Otherwise the same as .option().)
|
|
767
|
+
*
|
|
768
|
+
* The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.
|
|
769
|
+
*
|
|
770
|
+
* @param {string} flags
|
|
771
|
+
* @param {string} [description]
|
|
772
|
+
* @param {(Function|*)} [parseArg] - custom option processing function or default value
|
|
773
|
+
* @param {*} [defaultValue]
|
|
774
|
+
* @return {Command} `this` command for chaining
|
|
775
|
+
*/
|
|
776
|
+
|
|
777
|
+
requiredOption(flags, description, parseArg, defaultValue) {
|
|
778
|
+
return this._optionEx(
|
|
779
|
+
{ mandatory: true },
|
|
780
|
+
flags,
|
|
781
|
+
description,
|
|
782
|
+
parseArg,
|
|
783
|
+
defaultValue,
|
|
784
|
+
);
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
/**
|
|
788
|
+
* Alter parsing of short flags with optional values.
|
|
789
|
+
*
|
|
790
|
+
* @example
|
|
791
|
+
* // for `.option('-f,--flag [value]'):
|
|
792
|
+
* program.combineFlagAndOptionalValue(true); // `-f80` is treated like `--flag=80`, this is the default behaviour
|
|
793
|
+
* program.combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`
|
|
794
|
+
*
|
|
795
|
+
* @param {boolean} [combine] - if `true` or omitted, an optional value can be specified directly after the flag.
|
|
796
|
+
* @return {Command} `this` command for chaining
|
|
797
|
+
*/
|
|
798
|
+
combineFlagAndOptionalValue(combine = true) {
|
|
799
|
+
this._combineFlagAndOptionalValue = !!combine;
|
|
800
|
+
return this;
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* Allow unknown options on the command line.
|
|
805
|
+
*
|
|
806
|
+
* @param {boolean} [allowUnknown] - if `true` or omitted, no error will be thrown for unknown options.
|
|
807
|
+
* @return {Command} `this` command for chaining
|
|
808
|
+
*/
|
|
809
|
+
allowUnknownOption(allowUnknown = true) {
|
|
810
|
+
this._allowUnknownOption = !!allowUnknown;
|
|
811
|
+
return this;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
/**
|
|
815
|
+
* Allow excess command-arguments on the command line. Pass false to make excess arguments an error.
|
|
816
|
+
*
|
|
817
|
+
* @param {boolean} [allowExcess] - if `true` or omitted, no error will be thrown for excess arguments.
|
|
818
|
+
* @return {Command} `this` command for chaining
|
|
819
|
+
*/
|
|
820
|
+
allowExcessArguments(allowExcess = true) {
|
|
821
|
+
this._allowExcessArguments = !!allowExcess;
|
|
822
|
+
return this;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* Enable positional options. Positional means global options are specified before subcommands which lets
|
|
827
|
+
* subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.
|
|
828
|
+
* The default behaviour is non-positional and global options may appear anywhere on the command line.
|
|
829
|
+
*
|
|
830
|
+
* @param {boolean} [positional]
|
|
831
|
+
* @return {Command} `this` command for chaining
|
|
832
|
+
*/
|
|
833
|
+
enablePositionalOptions(positional = true) {
|
|
834
|
+
this._enablePositionalOptions = !!positional;
|
|
835
|
+
return this;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* Pass through options that come after command-arguments rather than treat them as command-options,
|
|
840
|
+
* so actual command-options come before command-arguments. Turning this on for a subcommand requires
|
|
841
|
+
* positional options to have been enabled on the program (parent commands).
|
|
842
|
+
* The default behaviour is non-positional and options may appear before or after command-arguments.
|
|
843
|
+
*
|
|
844
|
+
* @param {boolean} [passThrough] for unknown options.
|
|
845
|
+
* @return {Command} `this` command for chaining
|
|
846
|
+
*/
|
|
847
|
+
passThroughOptions(passThrough = true) {
|
|
848
|
+
this._passThroughOptions = !!passThrough;
|
|
849
|
+
this._checkForBrokenPassThrough();
|
|
850
|
+
return this;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* @private
|
|
855
|
+
*/
|
|
856
|
+
|
|
857
|
+
_checkForBrokenPassThrough() {
|
|
858
|
+
if (
|
|
859
|
+
this.parent &&
|
|
860
|
+
this._passThroughOptions &&
|
|
861
|
+
!this.parent._enablePositionalOptions
|
|
862
|
+
) {
|
|
863
|
+
throw new Error(
|
|
864
|
+
`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`,
|
|
865
|
+
);
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* Whether to store option values as properties on command object,
|
|
871
|
+
* or store separately (specify false). In both cases the option values can be accessed using .opts().
|
|
872
|
+
*
|
|
873
|
+
* @param {boolean} [storeAsProperties=true]
|
|
874
|
+
* @return {Command} `this` command for chaining
|
|
875
|
+
*/
|
|
876
|
+
|
|
877
|
+
storeOptionsAsProperties(storeAsProperties = true) {
|
|
878
|
+
if (this.options.length) {
|
|
879
|
+
throw new Error('call .storeOptionsAsProperties() before adding options');
|
|
880
|
+
}
|
|
881
|
+
if (Object.keys(this._optionValues).length) {
|
|
882
|
+
throw new Error(
|
|
883
|
+
'call .storeOptionsAsProperties() before setting option values',
|
|
884
|
+
);
|
|
885
|
+
}
|
|
886
|
+
this._storeOptionsAsProperties = !!storeAsProperties;
|
|
887
|
+
return this;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
/**
|
|
891
|
+
* Retrieve option value.
|
|
892
|
+
*
|
|
893
|
+
* @param {string} key
|
|
894
|
+
* @return {object} value
|
|
895
|
+
*/
|
|
896
|
+
|
|
897
|
+
getOptionValue(key) {
|
|
898
|
+
if (this._storeOptionsAsProperties) {
|
|
899
|
+
return this[key];
|
|
900
|
+
}
|
|
901
|
+
return this._optionValues[key];
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* Store option value.
|
|
906
|
+
*
|
|
907
|
+
* @param {string} key
|
|
908
|
+
* @param {object} value
|
|
909
|
+
* @return {Command} `this` command for chaining
|
|
910
|
+
*/
|
|
911
|
+
|
|
912
|
+
setOptionValue(key, value) {
|
|
913
|
+
return this.setOptionValueWithSource(key, value, undefined);
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* Store option value and where the value came from.
|
|
918
|
+
*
|
|
919
|
+
* @param {string} key
|
|
920
|
+
* @param {object} value
|
|
921
|
+
* @param {string} source - expected values are default/config/env/cli/implied
|
|
922
|
+
* @return {Command} `this` command for chaining
|
|
923
|
+
*/
|
|
924
|
+
|
|
925
|
+
setOptionValueWithSource(key, value, source) {
|
|
926
|
+
if (this._storeOptionsAsProperties) {
|
|
927
|
+
this[key] = value;
|
|
928
|
+
} else {
|
|
929
|
+
this._optionValues[key] = value;
|
|
930
|
+
}
|
|
931
|
+
this._optionValueSources[key] = source;
|
|
932
|
+
return this;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Get source of option value.
|
|
937
|
+
* Expected values are default | config | env | cli | implied
|
|
938
|
+
*
|
|
939
|
+
* @param {string} key
|
|
940
|
+
* @return {string}
|
|
941
|
+
*/
|
|
942
|
+
|
|
943
|
+
getOptionValueSource(key) {
|
|
944
|
+
return this._optionValueSources[key];
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Get source of option value. See also .optsWithGlobals().
|
|
949
|
+
* Expected values are default | config | env | cli | implied
|
|
950
|
+
*
|
|
951
|
+
* @param {string} key
|
|
952
|
+
* @return {string}
|
|
953
|
+
*/
|
|
954
|
+
|
|
955
|
+
getOptionValueSourceWithGlobals(key) {
|
|
956
|
+
// global overwrites local, like optsWithGlobals
|
|
957
|
+
let source;
|
|
958
|
+
this._getCommandAndAncestors().forEach((cmd) => {
|
|
959
|
+
if (cmd.getOptionValueSource(key) !== undefined) {
|
|
960
|
+
source = cmd.getOptionValueSource(key);
|
|
961
|
+
}
|
|
962
|
+
});
|
|
963
|
+
return source;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* Get user arguments from implied or explicit arguments.
|
|
968
|
+
* Side-effects: set _scriptPath if args included script. Used for default program name, and subcommand searches.
|
|
969
|
+
*
|
|
970
|
+
* @private
|
|
971
|
+
*/
|
|
972
|
+
|
|
973
|
+
_prepareUserArgs(argv, parseOptions) {
|
|
974
|
+
if (argv !== undefined && !Array.isArray(argv)) {
|
|
975
|
+
throw new Error('first parameter to parse must be array or undefined');
|
|
976
|
+
}
|
|
977
|
+
parseOptions = parseOptions || {};
|
|
978
|
+
|
|
979
|
+
// auto-detect argument conventions if nothing supplied
|
|
980
|
+
if (argv === undefined && parseOptions.from === undefined) {
|
|
981
|
+
if (process.versions?.electron) {
|
|
982
|
+
parseOptions.from = 'electron';
|
|
983
|
+
}
|
|
984
|
+
// check node specific options for scenarios where user CLI args follow executable without scriptname
|
|
985
|
+
const execArgv = process.execArgv ?? [];
|
|
986
|
+
if (
|
|
987
|
+
execArgv.includes('-e') ||
|
|
988
|
+
execArgv.includes('--eval') ||
|
|
989
|
+
execArgv.includes('-p') ||
|
|
990
|
+
execArgv.includes('--print')
|
|
991
|
+
) {
|
|
992
|
+
parseOptions.from = 'eval'; // internal usage, not documented
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
// default to using process.argv
|
|
997
|
+
if (argv === undefined) {
|
|
998
|
+
argv = process.argv;
|
|
999
|
+
}
|
|
1000
|
+
this.rawArgs = argv.slice();
|
|
1001
|
+
|
|
1002
|
+
// extract the user args and scriptPath
|
|
1003
|
+
let userArgs;
|
|
1004
|
+
switch (parseOptions.from) {
|
|
1005
|
+
case undefined:
|
|
1006
|
+
case 'node':
|
|
1007
|
+
this._scriptPath = argv[1];
|
|
1008
|
+
userArgs = argv.slice(2);
|
|
1009
|
+
break;
|
|
1010
|
+
case 'electron':
|
|
1011
|
+
// @ts-ignore: because defaultApp is an unknown property
|
|
1012
|
+
if (process.defaultApp) {
|
|
1013
|
+
this._scriptPath = argv[1];
|
|
1014
|
+
userArgs = argv.slice(2);
|
|
1015
|
+
} else {
|
|
1016
|
+
userArgs = argv.slice(1);
|
|
1017
|
+
}
|
|
1018
|
+
break;
|
|
1019
|
+
case 'user':
|
|
1020
|
+
userArgs = argv.slice(0);
|
|
1021
|
+
break;
|
|
1022
|
+
case 'eval':
|
|
1023
|
+
userArgs = argv.slice(1);
|
|
1024
|
+
break;
|
|
1025
|
+
default:
|
|
1026
|
+
throw new Error(
|
|
1027
|
+
`unexpected parse option { from: '${parseOptions.from}' }`,
|
|
1028
|
+
);
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
// Find default name for program from arguments.
|
|
1032
|
+
if (!this._name && this._scriptPath)
|
|
1033
|
+
this.nameFromFilename(this._scriptPath);
|
|
1034
|
+
this._name = this._name || 'program';
|
|
1035
|
+
|
|
1036
|
+
return userArgs;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
/**
|
|
1040
|
+
* Parse `argv`, setting options and invoking commands when defined.
|
|
1041
|
+
*
|
|
1042
|
+
* Use parseAsync instead of parse if any of your action handlers are async.
|
|
1043
|
+
*
|
|
1044
|
+
* Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!
|
|
1045
|
+
*
|
|
1046
|
+
* Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:
|
|
1047
|
+
* - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that
|
|
1048
|
+
* - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged
|
|
1049
|
+
* - `'user'`: just user arguments
|
|
1050
|
+
*
|
|
1051
|
+
* @example
|
|
1052
|
+
* program.parse(); // parse process.argv and auto-detect electron and special node flags
|
|
1053
|
+
* program.parse(process.argv); // assume argv[0] is app and argv[1] is script
|
|
1054
|
+
* program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
|
|
1055
|
+
*
|
|
1056
|
+
* @param {string[]} [argv] - optional, defaults to process.argv
|
|
1057
|
+
* @param {object} [parseOptions] - optionally specify style of options with from: node/user/electron
|
|
1058
|
+
* @param {string} [parseOptions.from] - where the args are from: 'node', 'user', 'electron'
|
|
1059
|
+
* @return {Command} `this` command for chaining
|
|
1060
|
+
*/
|
|
1061
|
+
|
|
1062
|
+
parse(argv, parseOptions) {
|
|
1063
|
+
const userArgs = this._prepareUserArgs(argv, parseOptions);
|
|
1064
|
+
this._parseCommand([], userArgs);
|
|
1065
|
+
|
|
1066
|
+
return this;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
/**
|
|
1070
|
+
* Parse `argv`, setting options and invoking commands when defined.
|
|
1071
|
+
*
|
|
1072
|
+
* Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!
|
|
1073
|
+
*
|
|
1074
|
+
* Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:
|
|
1075
|
+
* - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that
|
|
1076
|
+
* - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged
|
|
1077
|
+
* - `'user'`: just user arguments
|
|
1078
|
+
*
|
|
1079
|
+
* @example
|
|
1080
|
+
* await program.parseAsync(); // parse process.argv and auto-detect electron and special node flags
|
|
1081
|
+
* await program.parseAsync(process.argv); // assume argv[0] is app and argv[1] is script
|
|
1082
|
+
* await program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
|
|
1083
|
+
*
|
|
1084
|
+
* @param {string[]} [argv]
|
|
1085
|
+
* @param {object} [parseOptions]
|
|
1086
|
+
* @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron'
|
|
1087
|
+
* @return {Promise}
|
|
1088
|
+
*/
|
|
1089
|
+
|
|
1090
|
+
async parseAsync(argv, parseOptions) {
|
|
1091
|
+
const userArgs = this._prepareUserArgs(argv, parseOptions);
|
|
1092
|
+
await this._parseCommand([], userArgs);
|
|
1093
|
+
|
|
1094
|
+
return this;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* Execute a sub-command executable.
|
|
1099
|
+
*
|
|
1100
|
+
* @private
|
|
1101
|
+
*/
|
|
1102
|
+
|
|
1103
|
+
_executeSubCommand(subcommand, args) {
|
|
1104
|
+
args = args.slice();
|
|
1105
|
+
let launchWithNode = false; // Use node for source targets so do not need to get permissions correct, and on Windows.
|
|
1106
|
+
const sourceExt = ['.js', '.ts', '.tsx', '.mjs', '.cjs'];
|
|
1107
|
+
|
|
1108
|
+
function findFile(baseDir, baseName) {
|
|
1109
|
+
// Look for specified file
|
|
1110
|
+
const localBin = path.resolve(baseDir, baseName);
|
|
1111
|
+
if (fs.existsSync(localBin)) return localBin;
|
|
1112
|
+
|
|
1113
|
+
// Stop looking if candidate already has an expected extension.
|
|
1114
|
+
if (sourceExt.includes(path.extname(baseName))) return undefined;
|
|
1115
|
+
|
|
1116
|
+
// Try all the extensions.
|
|
1117
|
+
const foundExt = sourceExt.find((ext) =>
|
|
1118
|
+
fs.existsSync(`${localBin}${ext}`),
|
|
1119
|
+
);
|
|
1120
|
+
if (foundExt) return `${localBin}${foundExt}`;
|
|
1121
|
+
|
|
1122
|
+
return undefined;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
// Not checking for help first. Unlikely to have mandatory and executable, and can't robustly test for help flags in external command.
|
|
1126
|
+
this._checkForMissingMandatoryOptions();
|
|
1127
|
+
this._checkForConflictingOptions();
|
|
1128
|
+
|
|
1129
|
+
// executableFile and executableDir might be full path, or just a name
|
|
1130
|
+
let executableFile =
|
|
1131
|
+
subcommand._executableFile || `${this._name}-${subcommand._name}`;
|
|
1132
|
+
let executableDir = this._executableDir || '';
|
|
1133
|
+
if (this._scriptPath) {
|
|
1134
|
+
let resolvedScriptPath; // resolve possible symlink for installed npm binary
|
|
1135
|
+
try {
|
|
1136
|
+
resolvedScriptPath = fs.realpathSync(this._scriptPath);
|
|
1137
|
+
} catch (err) {
|
|
1138
|
+
resolvedScriptPath = this._scriptPath;
|
|
1139
|
+
}
|
|
1140
|
+
executableDir = path.resolve(
|
|
1141
|
+
path.dirname(resolvedScriptPath),
|
|
1142
|
+
executableDir,
|
|
1143
|
+
);
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
// Look for a local file in preference to a command in PATH.
|
|
1147
|
+
if (executableDir) {
|
|
1148
|
+
let localFile = findFile(executableDir, executableFile);
|
|
1149
|
+
|
|
1150
|
+
// Legacy search using prefix of script name instead of command name
|
|
1151
|
+
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
1152
|
+
const legacyName = path.basename(
|
|
1153
|
+
this._scriptPath,
|
|
1154
|
+
path.extname(this._scriptPath),
|
|
1155
|
+
);
|
|
1156
|
+
if (legacyName !== this._name) {
|
|
1157
|
+
localFile = findFile(
|
|
1158
|
+
executableDir,
|
|
1159
|
+
`${legacyName}-${subcommand._name}`,
|
|
1160
|
+
);
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
executableFile = localFile || executableFile;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
launchWithNode = sourceExt.includes(path.extname(executableFile));
|
|
1167
|
+
|
|
1168
|
+
let proc;
|
|
1169
|
+
if (process.platform !== 'win32') {
|
|
1170
|
+
if (launchWithNode) {
|
|
1171
|
+
args.unshift(executableFile);
|
|
1172
|
+
// add executable arguments to spawn
|
|
1173
|
+
args = incrementNodeInspectorPort(process.execArgv).concat(args);
|
|
1174
|
+
|
|
1175
|
+
proc = childProcess.spawn(process.argv[0], args, { stdio: 'inherit' });
|
|
1176
|
+
} else {
|
|
1177
|
+
proc = childProcess.spawn(executableFile, args, { stdio: 'inherit' });
|
|
1178
|
+
}
|
|
1179
|
+
} else {
|
|
1180
|
+
args.unshift(executableFile);
|
|
1181
|
+
// add executable arguments to spawn
|
|
1182
|
+
args = incrementNodeInspectorPort(process.execArgv).concat(args);
|
|
1183
|
+
proc = childProcess.spawn(process.execPath, args, { stdio: 'inherit' });
|
|
1184
|
+
}
|
|
1185
|
+
|
|
1186
|
+
if (!proc.killed) {
|
|
1187
|
+
// testing mainly to avoid leak warnings during unit tests with mocked spawn
|
|
1188
|
+
const signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP'];
|
|
1189
|
+
signals.forEach((signal) => {
|
|
1190
|
+
process.on(signal, () => {
|
|
1191
|
+
if (proc.killed === false && proc.exitCode === null) {
|
|
1192
|
+
// @ts-ignore because signals not typed to known strings
|
|
1193
|
+
proc.kill(signal);
|
|
1194
|
+
}
|
|
1195
|
+
});
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
// By default terminate process when spawned process terminates.
|
|
1200
|
+
const exitCallback = this._exitCallback;
|
|
1201
|
+
proc.on('close', (code) => {
|
|
1202
|
+
code = code ?? 1; // code is null if spawned process terminated due to a signal
|
|
1203
|
+
if (!exitCallback) {
|
|
1204
|
+
process.exit(code);
|
|
1205
|
+
} else {
|
|
1206
|
+
exitCallback(
|
|
1207
|
+
new CommanderError(
|
|
1208
|
+
code,
|
|
1209
|
+
'commander.executeSubCommandAsync',
|
|
1210
|
+
'(close)',
|
|
1211
|
+
),
|
|
1212
|
+
);
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
proc.on('error', (err) => {
|
|
1216
|
+
// @ts-ignore: because err.code is an unknown property
|
|
1217
|
+
if (err.code === 'ENOENT') {
|
|
1218
|
+
const executableDirMessage = executableDir
|
|
1219
|
+
? `searched for local subcommand relative to directory '${executableDir}'`
|
|
1220
|
+
: 'no directory for search for local subcommand, use .executableDir() to supply a custom directory';
|
|
1221
|
+
const executableMissing = `'${executableFile}' does not exist
|
|
1222
|
+
- if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
1223
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
1224
|
+
- ${executableDirMessage}`;
|
|
1225
|
+
throw new Error(executableMissing);
|
|
1226
|
+
// @ts-ignore: because err.code is an unknown property
|
|
1227
|
+
} else if (err.code === 'EACCES') {
|
|
1228
|
+
throw new Error(`'${executableFile}' not executable`);
|
|
1229
|
+
}
|
|
1230
|
+
if (!exitCallback) {
|
|
1231
|
+
process.exit(1);
|
|
1232
|
+
} else {
|
|
1233
|
+
const wrappedError = new CommanderError(
|
|
1234
|
+
1,
|
|
1235
|
+
'commander.executeSubCommandAsync',
|
|
1236
|
+
'(error)',
|
|
1237
|
+
);
|
|
1238
|
+
wrappedError.nestedError = err;
|
|
1239
|
+
exitCallback(wrappedError);
|
|
1240
|
+
}
|
|
1241
|
+
});
|
|
1242
|
+
|
|
1243
|
+
// Store the reference to the child process
|
|
1244
|
+
this.runningCommand = proc;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* @private
|
|
1249
|
+
*/
|
|
1250
|
+
|
|
1251
|
+
_dispatchSubcommand(commandName, operands, unknown) {
|
|
1252
|
+
const subCommand = this._findCommand(commandName);
|
|
1253
|
+
if (!subCommand) this.help({ error: true });
|
|
1254
|
+
|
|
1255
|
+
let promiseChain;
|
|
1256
|
+
promiseChain = this._chainOrCallSubCommandHook(
|
|
1257
|
+
promiseChain,
|
|
1258
|
+
subCommand,
|
|
1259
|
+
'preSubcommand',
|
|
1260
|
+
);
|
|
1261
|
+
promiseChain = this._chainOrCall(promiseChain, () => {
|
|
1262
|
+
if (subCommand._executableHandler) {
|
|
1263
|
+
this._executeSubCommand(subCommand, operands.concat(unknown));
|
|
1264
|
+
} else {
|
|
1265
|
+
return subCommand._parseCommand(operands, unknown);
|
|
1266
|
+
}
|
|
1267
|
+
});
|
|
1268
|
+
return promiseChain;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* Invoke help directly if possible, or dispatch if necessary.
|
|
1273
|
+
* e.g. help foo
|
|
1274
|
+
*
|
|
1275
|
+
* @private
|
|
1276
|
+
*/
|
|
1277
|
+
|
|
1278
|
+
_dispatchHelpCommand(subcommandName) {
|
|
1279
|
+
if (!subcommandName) {
|
|
1280
|
+
this.help();
|
|
1281
|
+
}
|
|
1282
|
+
const subCommand = this._findCommand(subcommandName);
|
|
1283
|
+
if (subCommand && !subCommand._executableHandler) {
|
|
1284
|
+
subCommand.help();
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
// Fallback to parsing the help flag to invoke the help.
|
|
1288
|
+
return this._dispatchSubcommand(
|
|
1289
|
+
subcommandName,
|
|
1290
|
+
[],
|
|
1291
|
+
[this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? '--help'],
|
|
1292
|
+
);
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* Check this.args against expected this.registeredArguments.
|
|
1297
|
+
*
|
|
1298
|
+
* @private
|
|
1299
|
+
*/
|
|
1300
|
+
|
|
1301
|
+
_checkNumberOfArguments() {
|
|
1302
|
+
// too few
|
|
1303
|
+
this.registeredArguments.forEach((arg, i) => {
|
|
1304
|
+
if (arg.required && this.args[i] == null) {
|
|
1305
|
+
this.missingArgument(arg.name());
|
|
1306
|
+
}
|
|
1307
|
+
});
|
|
1308
|
+
// too many
|
|
1309
|
+
if (
|
|
1310
|
+
this.registeredArguments.length > 0 &&
|
|
1311
|
+
this.registeredArguments[this.registeredArguments.length - 1].variadic
|
|
1312
|
+
) {
|
|
1313
|
+
return;
|
|
1314
|
+
}
|
|
1315
|
+
if (this.args.length > this.registeredArguments.length) {
|
|
1316
|
+
this._excessArguments(this.args);
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* Process this.args using this.registeredArguments and save as this.processedArgs!
|
|
1322
|
+
*
|
|
1323
|
+
* @private
|
|
1324
|
+
*/
|
|
1325
|
+
|
|
1326
|
+
_processArguments() {
|
|
1327
|
+
const myParseArg = (argument, value, previous) => {
|
|
1328
|
+
// Extra processing for nice error message on parsing failure.
|
|
1329
|
+
let parsedValue = value;
|
|
1330
|
+
if (value !== null && argument.parseArg) {
|
|
1331
|
+
const invalidValueMessage = `error: command-argument value '${value}' is invalid for argument '${argument.name()}'.`;
|
|
1332
|
+
parsedValue = this._callParseArg(
|
|
1333
|
+
argument,
|
|
1334
|
+
value,
|
|
1335
|
+
previous,
|
|
1336
|
+
invalidValueMessage,
|
|
1337
|
+
);
|
|
1338
|
+
}
|
|
1339
|
+
return parsedValue;
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
this._checkNumberOfArguments();
|
|
1343
|
+
|
|
1344
|
+
const processedArgs = [];
|
|
1345
|
+
this.registeredArguments.forEach((declaredArg, index) => {
|
|
1346
|
+
let value = declaredArg.defaultValue;
|
|
1347
|
+
if (declaredArg.variadic) {
|
|
1348
|
+
// Collect together remaining arguments for passing together as an array.
|
|
1349
|
+
if (index < this.args.length) {
|
|
1350
|
+
value = this.args.slice(index);
|
|
1351
|
+
if (declaredArg.parseArg) {
|
|
1352
|
+
value = value.reduce((processed, v) => {
|
|
1353
|
+
return myParseArg(declaredArg, v, processed);
|
|
1354
|
+
}, declaredArg.defaultValue);
|
|
1355
|
+
}
|
|
1356
|
+
} else if (value === undefined) {
|
|
1357
|
+
value = [];
|
|
1358
|
+
}
|
|
1359
|
+
} else if (index < this.args.length) {
|
|
1360
|
+
value = this.args[index];
|
|
1361
|
+
if (declaredArg.parseArg) {
|
|
1362
|
+
value = myParseArg(declaredArg, value, declaredArg.defaultValue);
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
processedArgs[index] = value;
|
|
1366
|
+
});
|
|
1367
|
+
this.processedArgs = processedArgs;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* Once we have a promise we chain, but call synchronously until then.
|
|
1372
|
+
*
|
|
1373
|
+
* @param {(Promise|undefined)} promise
|
|
1374
|
+
* @param {Function} fn
|
|
1375
|
+
* @return {(Promise|undefined)}
|
|
1376
|
+
* @private
|
|
1377
|
+
*/
|
|
1378
|
+
|
|
1379
|
+
_chainOrCall(promise, fn) {
|
|
1380
|
+
// thenable
|
|
1381
|
+
if (promise && promise.then && typeof promise.then === 'function') {
|
|
1382
|
+
// already have a promise, chain callback
|
|
1383
|
+
return promise.then(() => fn());
|
|
1384
|
+
}
|
|
1385
|
+
// callback might return a promise
|
|
1386
|
+
return fn();
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
/**
|
|
1390
|
+
*
|
|
1391
|
+
* @param {(Promise|undefined)} promise
|
|
1392
|
+
* @param {string} event
|
|
1393
|
+
* @return {(Promise|undefined)}
|
|
1394
|
+
* @private
|
|
1395
|
+
*/
|
|
1396
|
+
|
|
1397
|
+
_chainOrCallHooks(promise, event) {
|
|
1398
|
+
let result = promise;
|
|
1399
|
+
const hooks = [];
|
|
1400
|
+
this._getCommandAndAncestors()
|
|
1401
|
+
.reverse()
|
|
1402
|
+
.filter((cmd) => cmd._lifeCycleHooks[event] !== undefined)
|
|
1403
|
+
.forEach((hookedCommand) => {
|
|
1404
|
+
hookedCommand._lifeCycleHooks[event].forEach((callback) => {
|
|
1405
|
+
hooks.push({ hookedCommand, callback });
|
|
1406
|
+
});
|
|
1407
|
+
});
|
|
1408
|
+
if (event === 'postAction') {
|
|
1409
|
+
hooks.reverse();
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
hooks.forEach((hookDetail) => {
|
|
1413
|
+
result = this._chainOrCall(result, () => {
|
|
1414
|
+
return hookDetail.callback(hookDetail.hookedCommand, this);
|
|
1415
|
+
});
|
|
1416
|
+
});
|
|
1417
|
+
return result;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
*
|
|
1422
|
+
* @param {(Promise|undefined)} promise
|
|
1423
|
+
* @param {Command} subCommand
|
|
1424
|
+
* @param {string} event
|
|
1425
|
+
* @return {(Promise|undefined)}
|
|
1426
|
+
* @private
|
|
1427
|
+
*/
|
|
1428
|
+
|
|
1429
|
+
_chainOrCallSubCommandHook(promise, subCommand, event) {
|
|
1430
|
+
let result = promise;
|
|
1431
|
+
if (this._lifeCycleHooks[event] !== undefined) {
|
|
1432
|
+
this._lifeCycleHooks[event].forEach((hook) => {
|
|
1433
|
+
result = this._chainOrCall(result, () => {
|
|
1434
|
+
return hook(this, subCommand);
|
|
1435
|
+
});
|
|
1436
|
+
});
|
|
1437
|
+
}
|
|
1438
|
+
return result;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
/**
|
|
1442
|
+
* Process arguments in context of this command.
|
|
1443
|
+
* Returns action result, in case it is a promise.
|
|
1444
|
+
*
|
|
1445
|
+
* @private
|
|
1446
|
+
*/
|
|
1447
|
+
|
|
1448
|
+
_parseCommand(operands, unknown) {
|
|
1449
|
+
const parsed = this.parseOptions(unknown);
|
|
1450
|
+
this._parseOptionsEnv(); // after cli, so parseArg not called on both cli and env
|
|
1451
|
+
this._parseOptionsImplied();
|
|
1452
|
+
operands = operands.concat(parsed.operands);
|
|
1453
|
+
unknown = parsed.unknown;
|
|
1454
|
+
this.args = operands.concat(unknown);
|
|
1455
|
+
|
|
1456
|
+
if (operands && this._findCommand(operands[0])) {
|
|
1457
|
+
return this._dispatchSubcommand(operands[0], operands.slice(1), unknown);
|
|
1458
|
+
}
|
|
1459
|
+
if (
|
|
1460
|
+
this._getHelpCommand() &&
|
|
1461
|
+
operands[0] === this._getHelpCommand().name()
|
|
1462
|
+
) {
|
|
1463
|
+
return this._dispatchHelpCommand(operands[1]);
|
|
1464
|
+
}
|
|
1465
|
+
if (this._defaultCommandName) {
|
|
1466
|
+
this._outputHelpIfRequested(unknown); // Run the help for default command from parent rather than passing to default command
|
|
1467
|
+
return this._dispatchSubcommand(
|
|
1468
|
+
this._defaultCommandName,
|
|
1469
|
+
operands,
|
|
1470
|
+
unknown,
|
|
1471
|
+
);
|
|
1472
|
+
}
|
|
1473
|
+
if (
|
|
1474
|
+
this.commands.length &&
|
|
1475
|
+
this.args.length === 0 &&
|
|
1476
|
+
!this._actionHandler &&
|
|
1477
|
+
!this._defaultCommandName
|
|
1478
|
+
) {
|
|
1479
|
+
// probably missing subcommand and no handler, user needs help (and exit)
|
|
1480
|
+
this.help({ error: true });
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
this._outputHelpIfRequested(parsed.unknown);
|
|
1484
|
+
this._checkForMissingMandatoryOptions();
|
|
1485
|
+
this._checkForConflictingOptions();
|
|
1486
|
+
|
|
1487
|
+
// We do not always call this check to avoid masking a "better" error, like unknown command.
|
|
1488
|
+
const checkForUnknownOptions = () => {
|
|
1489
|
+
if (parsed.unknown.length > 0) {
|
|
1490
|
+
this.unknownOption(parsed.unknown[0]);
|
|
1491
|
+
}
|
|
1492
|
+
};
|
|
1493
|
+
|
|
1494
|
+
const commandEvent = `command:${this.name()}`;
|
|
1495
|
+
if (this._actionHandler) {
|
|
1496
|
+
checkForUnknownOptions();
|
|
1497
|
+
this._processArguments();
|
|
1498
|
+
|
|
1499
|
+
let promiseChain;
|
|
1500
|
+
promiseChain = this._chainOrCallHooks(promiseChain, 'preAction');
|
|
1501
|
+
promiseChain = this._chainOrCall(promiseChain, () =>
|
|
1502
|
+
this._actionHandler(this.processedArgs),
|
|
1503
|
+
);
|
|
1504
|
+
if (this.parent) {
|
|
1505
|
+
promiseChain = this._chainOrCall(promiseChain, () => {
|
|
1506
|
+
this.parent.emit(commandEvent, operands, unknown); // legacy
|
|
1507
|
+
});
|
|
1508
|
+
}
|
|
1509
|
+
promiseChain = this._chainOrCallHooks(promiseChain, 'postAction');
|
|
1510
|
+
return promiseChain;
|
|
1511
|
+
}
|
|
1512
|
+
if (this.parent && this.parent.listenerCount(commandEvent)) {
|
|
1513
|
+
checkForUnknownOptions();
|
|
1514
|
+
this._processArguments();
|
|
1515
|
+
this.parent.emit(commandEvent, operands, unknown); // legacy
|
|
1516
|
+
} else if (operands.length) {
|
|
1517
|
+
if (this._findCommand('*')) {
|
|
1518
|
+
// legacy default command
|
|
1519
|
+
return this._dispatchSubcommand('*', operands, unknown);
|
|
1520
|
+
}
|
|
1521
|
+
if (this.listenerCount('command:*')) {
|
|
1522
|
+
// skip option check, emit event for possible misspelling suggestion
|
|
1523
|
+
this.emit('command:*', operands, unknown);
|
|
1524
|
+
} else if (this.commands.length) {
|
|
1525
|
+
this.unknownCommand();
|
|
1526
|
+
} else {
|
|
1527
|
+
checkForUnknownOptions();
|
|
1528
|
+
this._processArguments();
|
|
1529
|
+
}
|
|
1530
|
+
} else if (this.commands.length) {
|
|
1531
|
+
checkForUnknownOptions();
|
|
1532
|
+
// This command has subcommands and nothing hooked up at this level, so display help (and exit).
|
|
1533
|
+
this.help({ error: true });
|
|
1534
|
+
} else {
|
|
1535
|
+
checkForUnknownOptions();
|
|
1536
|
+
this._processArguments();
|
|
1537
|
+
// fall through for caller to handle after calling .parse()
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
/**
|
|
1542
|
+
* Find matching command.
|
|
1543
|
+
*
|
|
1544
|
+
* @private
|
|
1545
|
+
* @return {Command | undefined}
|
|
1546
|
+
*/
|
|
1547
|
+
_findCommand(name) {
|
|
1548
|
+
if (!name) return undefined;
|
|
1549
|
+
return this.commands.find(
|
|
1550
|
+
(cmd) => cmd._name === name || cmd._aliases.includes(name),
|
|
1551
|
+
);
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
/**
|
|
1555
|
+
* Return an option matching `arg` if any.
|
|
1556
|
+
*
|
|
1557
|
+
* @param {string} arg
|
|
1558
|
+
* @return {Option}
|
|
1559
|
+
* @package
|
|
1560
|
+
*/
|
|
1561
|
+
|
|
1562
|
+
_findOption(arg) {
|
|
1563
|
+
return this.options.find((option) => option.is(arg));
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
/**
|
|
1567
|
+
* Display an error message if a mandatory option does not have a value.
|
|
1568
|
+
* Called after checking for help flags in leaf subcommand.
|
|
1569
|
+
*
|
|
1570
|
+
* @private
|
|
1571
|
+
*/
|
|
1572
|
+
|
|
1573
|
+
_checkForMissingMandatoryOptions() {
|
|
1574
|
+
// Walk up hierarchy so can call in subcommand after checking for displaying help.
|
|
1575
|
+
this._getCommandAndAncestors().forEach((cmd) => {
|
|
1576
|
+
cmd.options.forEach((anOption) => {
|
|
1577
|
+
if (
|
|
1578
|
+
anOption.mandatory &&
|
|
1579
|
+
cmd.getOptionValue(anOption.attributeName()) === undefined
|
|
1580
|
+
) {
|
|
1581
|
+
cmd.missingMandatoryOptionValue(anOption);
|
|
1582
|
+
}
|
|
1583
|
+
});
|
|
1584
|
+
});
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
/**
|
|
1588
|
+
* Display an error message if conflicting options are used together in this.
|
|
1589
|
+
*
|
|
1590
|
+
* @private
|
|
1591
|
+
*/
|
|
1592
|
+
_checkForConflictingLocalOptions() {
|
|
1593
|
+
const definedNonDefaultOptions = this.options.filter((option) => {
|
|
1594
|
+
const optionKey = option.attributeName();
|
|
1595
|
+
if (this.getOptionValue(optionKey) === undefined) {
|
|
1596
|
+
return false;
|
|
1597
|
+
}
|
|
1598
|
+
return this.getOptionValueSource(optionKey) !== 'default';
|
|
1599
|
+
});
|
|
1600
|
+
|
|
1601
|
+
const optionsWithConflicting = definedNonDefaultOptions.filter(
|
|
1602
|
+
(option) => option.conflictsWith.length > 0,
|
|
1603
|
+
);
|
|
1604
|
+
|
|
1605
|
+
optionsWithConflicting.forEach((option) => {
|
|
1606
|
+
const conflictingAndDefined = definedNonDefaultOptions.find((defined) =>
|
|
1607
|
+
option.conflictsWith.includes(defined.attributeName()),
|
|
1608
|
+
);
|
|
1609
|
+
if (conflictingAndDefined) {
|
|
1610
|
+
this._conflictingOption(option, conflictingAndDefined);
|
|
1611
|
+
}
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
/**
|
|
1616
|
+
* Display an error message if conflicting options are used together.
|
|
1617
|
+
* Called after checking for help flags in leaf subcommand.
|
|
1618
|
+
*
|
|
1619
|
+
* @private
|
|
1620
|
+
*/
|
|
1621
|
+
_checkForConflictingOptions() {
|
|
1622
|
+
// Walk up hierarchy so can call in subcommand after checking for displaying help.
|
|
1623
|
+
this._getCommandAndAncestors().forEach((cmd) => {
|
|
1624
|
+
cmd._checkForConflictingLocalOptions();
|
|
1625
|
+
});
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
/**
|
|
1629
|
+
* Parse options from `argv` removing known options,
|
|
1630
|
+
* and return argv split into operands and unknown arguments.
|
|
1631
|
+
*
|
|
1632
|
+
* Examples:
|
|
1633
|
+
*
|
|
1634
|
+
* argv => operands, unknown
|
|
1635
|
+
* --known kkk op => [op], []
|
|
1636
|
+
* op --known kkk => [op], []
|
|
1637
|
+
* sub --unknown uuu op => [sub], [--unknown uuu op]
|
|
1638
|
+
* sub -- --unknown uuu op => [sub --unknown uuu op], []
|
|
1639
|
+
*
|
|
1640
|
+
* @param {string[]} argv
|
|
1641
|
+
* @return {{operands: string[], unknown: string[]}}
|
|
1642
|
+
*/
|
|
1643
|
+
|
|
1644
|
+
parseOptions(argv) {
|
|
1645
|
+
const operands = []; // operands, not options or values
|
|
1646
|
+
const unknown = []; // first unknown option and remaining unknown args
|
|
1647
|
+
let dest = operands;
|
|
1648
|
+
const args = argv.slice();
|
|
1649
|
+
|
|
1650
|
+
function maybeOption(arg) {
|
|
1651
|
+
return arg.length > 1 && arg[0] === '-';
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
// parse options
|
|
1655
|
+
let activeVariadicOption = null;
|
|
1656
|
+
while (args.length) {
|
|
1657
|
+
const arg = args.shift();
|
|
1658
|
+
|
|
1659
|
+
// literal
|
|
1660
|
+
if (arg === '--') {
|
|
1661
|
+
if (dest === unknown) dest.push(arg);
|
|
1662
|
+
dest.push(...args);
|
|
1663
|
+
break;
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
if (activeVariadicOption && !maybeOption(arg)) {
|
|
1667
|
+
this.emit(`option:${activeVariadicOption.name()}`, arg);
|
|
1668
|
+
continue;
|
|
1669
|
+
}
|
|
1670
|
+
activeVariadicOption = null;
|
|
1671
|
+
|
|
1672
|
+
if (maybeOption(arg)) {
|
|
1673
|
+
const option = this._findOption(arg);
|
|
1674
|
+
// recognised option, call listener to assign value with possible custom processing
|
|
1675
|
+
if (option) {
|
|
1676
|
+
if (option.required) {
|
|
1677
|
+
const value = args.shift();
|
|
1678
|
+
if (value === undefined) this.optionMissingArgument(option);
|
|
1679
|
+
this.emit(`option:${option.name()}`, value);
|
|
1680
|
+
} else if (option.optional) {
|
|
1681
|
+
let value = null;
|
|
1682
|
+
// historical behaviour is optional value is following arg unless an option
|
|
1683
|
+
if (args.length > 0 && !maybeOption(args[0])) {
|
|
1684
|
+
value = args.shift();
|
|
1685
|
+
}
|
|
1686
|
+
this.emit(`option:${option.name()}`, value);
|
|
1687
|
+
} else {
|
|
1688
|
+
// boolean flag
|
|
1689
|
+
this.emit(`option:${option.name()}`);
|
|
1690
|
+
}
|
|
1691
|
+
activeVariadicOption = option.variadic ? option : null;
|
|
1692
|
+
continue;
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
// Look for combo options following single dash, eat first one if known.
|
|
1697
|
+
if (arg.length > 2 && arg[0] === '-' && arg[1] !== '-') {
|
|
1698
|
+
const option = this._findOption(`-${arg[1]}`);
|
|
1699
|
+
if (option) {
|
|
1700
|
+
if (
|
|
1701
|
+
option.required ||
|
|
1702
|
+
(option.optional && this._combineFlagAndOptionalValue)
|
|
1703
|
+
) {
|
|
1704
|
+
// option with value following in same argument
|
|
1705
|
+
this.emit(`option:${option.name()}`, arg.slice(2));
|
|
1706
|
+
} else {
|
|
1707
|
+
// boolean option, emit and put back remainder of arg for further processing
|
|
1708
|
+
this.emit(`option:${option.name()}`);
|
|
1709
|
+
args.unshift(`-${arg.slice(2)}`);
|
|
1710
|
+
}
|
|
1711
|
+
continue;
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
// Look for known long flag with value, like --foo=bar
|
|
1716
|
+
if (/^--[^=]+=/.test(arg)) {
|
|
1717
|
+
const index = arg.indexOf('=');
|
|
1718
|
+
const option = this._findOption(arg.slice(0, index));
|
|
1719
|
+
if (option && (option.required || option.optional)) {
|
|
1720
|
+
this.emit(`option:${option.name()}`, arg.slice(index + 1));
|
|
1721
|
+
continue;
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1725
|
+
// Not a recognised option by this command.
|
|
1726
|
+
// Might be a command-argument, or subcommand option, or unknown option, or help command or option.
|
|
1727
|
+
|
|
1728
|
+
// An unknown option means further arguments also classified as unknown so can be reprocessed by subcommands.
|
|
1729
|
+
if (maybeOption(arg)) {
|
|
1730
|
+
dest = unknown;
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
// If using positionalOptions, stop processing our options at subcommand.
|
|
1734
|
+
if (
|
|
1735
|
+
(this._enablePositionalOptions || this._passThroughOptions) &&
|
|
1736
|
+
operands.length === 0 &&
|
|
1737
|
+
unknown.length === 0
|
|
1738
|
+
) {
|
|
1739
|
+
if (this._findCommand(arg)) {
|
|
1740
|
+
operands.push(arg);
|
|
1741
|
+
if (args.length > 0) unknown.push(...args);
|
|
1742
|
+
break;
|
|
1743
|
+
} else if (
|
|
1744
|
+
this._getHelpCommand() &&
|
|
1745
|
+
arg === this._getHelpCommand().name()
|
|
1746
|
+
) {
|
|
1747
|
+
operands.push(arg);
|
|
1748
|
+
if (args.length > 0) operands.push(...args);
|
|
1749
|
+
break;
|
|
1750
|
+
} else if (this._defaultCommandName) {
|
|
1751
|
+
unknown.push(arg);
|
|
1752
|
+
if (args.length > 0) unknown.push(...args);
|
|
1753
|
+
break;
|
|
1754
|
+
}
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
// If using passThroughOptions, stop processing options at first command-argument.
|
|
1758
|
+
if (this._passThroughOptions) {
|
|
1759
|
+
dest.push(arg);
|
|
1760
|
+
if (args.length > 0) dest.push(...args);
|
|
1761
|
+
break;
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
// add arg
|
|
1765
|
+
dest.push(arg);
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
return { operands, unknown };
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
/**
|
|
1772
|
+
* Return an object containing local option values as key-value pairs.
|
|
1773
|
+
*
|
|
1774
|
+
* @return {object}
|
|
1775
|
+
*/
|
|
1776
|
+
opts() {
|
|
1777
|
+
if (this._storeOptionsAsProperties) {
|
|
1778
|
+
// Preserve original behaviour so backwards compatible when still using properties
|
|
1779
|
+
const result = {};
|
|
1780
|
+
const len = this.options.length;
|
|
1781
|
+
|
|
1782
|
+
for (let i = 0; i < len; i++) {
|
|
1783
|
+
const key = this.options[i].attributeName();
|
|
1784
|
+
result[key] =
|
|
1785
|
+
key === this._versionOptionName ? this._version : this[key];
|
|
1786
|
+
}
|
|
1787
|
+
return result;
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
return this._optionValues;
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
/**
|
|
1794
|
+
* Return an object containing merged local and global option values as key-value pairs.
|
|
1795
|
+
*
|
|
1796
|
+
* @return {object}
|
|
1797
|
+
*/
|
|
1798
|
+
optsWithGlobals() {
|
|
1799
|
+
// globals overwrite locals
|
|
1800
|
+
return this._getCommandAndAncestors().reduce(
|
|
1801
|
+
(combinedOptions, cmd) => Object.assign(combinedOptions, cmd.opts()),
|
|
1802
|
+
{},
|
|
1803
|
+
);
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
/**
|
|
1807
|
+
* Display error message and exit (or call exitOverride).
|
|
1808
|
+
*
|
|
1809
|
+
* @param {string} message
|
|
1810
|
+
* @param {object} [errorOptions]
|
|
1811
|
+
* @param {string} [errorOptions.code] - an id string representing the error
|
|
1812
|
+
* @param {number} [errorOptions.exitCode] - used with process.exit
|
|
1813
|
+
*/
|
|
1814
|
+
error(message, errorOptions) {
|
|
1815
|
+
// output handling
|
|
1816
|
+
this._outputConfiguration.outputError(
|
|
1817
|
+
`${message}\n`,
|
|
1818
|
+
this._outputConfiguration.writeErr,
|
|
1819
|
+
);
|
|
1820
|
+
if (typeof this._showHelpAfterError === 'string') {
|
|
1821
|
+
this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`);
|
|
1822
|
+
} else if (this._showHelpAfterError) {
|
|
1823
|
+
this._outputConfiguration.writeErr('\n');
|
|
1824
|
+
this.outputHelp({ error: true });
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
// exit handling
|
|
1828
|
+
const config = errorOptions || {};
|
|
1829
|
+
const exitCode = config.exitCode || 1;
|
|
1830
|
+
const code = config.code || 'commander.error';
|
|
1831
|
+
this._exit(exitCode, code, message);
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
/**
|
|
1835
|
+
* Apply any option related environment variables, if option does
|
|
1836
|
+
* not have a value from cli or client code.
|
|
1837
|
+
*
|
|
1838
|
+
* @private
|
|
1839
|
+
*/
|
|
1840
|
+
_parseOptionsEnv() {
|
|
1841
|
+
this.options.forEach((option) => {
|
|
1842
|
+
if (option.envVar && option.envVar in process.env) {
|
|
1843
|
+
const optionKey = option.attributeName();
|
|
1844
|
+
// Priority check. Do not overwrite cli or options from unknown source (client-code).
|
|
1845
|
+
if (
|
|
1846
|
+
this.getOptionValue(optionKey) === undefined ||
|
|
1847
|
+
['default', 'config', 'env'].includes(
|
|
1848
|
+
this.getOptionValueSource(optionKey),
|
|
1849
|
+
)
|
|
1850
|
+
) {
|
|
1851
|
+
if (option.required || option.optional) {
|
|
1852
|
+
// option can take a value
|
|
1853
|
+
// keep very simple, optional always takes value
|
|
1854
|
+
this.emit(`optionEnv:${option.name()}`, process.env[option.envVar]);
|
|
1855
|
+
} else {
|
|
1856
|
+
// boolean
|
|
1857
|
+
// keep very simple, only care that envVar defined and not the value
|
|
1858
|
+
this.emit(`optionEnv:${option.name()}`);
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
});
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
/**
|
|
1866
|
+
* Apply any implied option values, if option is undefined or default value.
|
|
1867
|
+
*
|
|
1868
|
+
* @private
|
|
1869
|
+
*/
|
|
1870
|
+
_parseOptionsImplied() {
|
|
1871
|
+
const dualHelper = new DualOptions(this.options);
|
|
1872
|
+
const hasCustomOptionValue = (optionKey) => {
|
|
1873
|
+
return (
|
|
1874
|
+
this.getOptionValue(optionKey) !== undefined &&
|
|
1875
|
+
!['default', 'implied'].includes(this.getOptionValueSource(optionKey))
|
|
1876
|
+
);
|
|
1877
|
+
};
|
|
1878
|
+
this.options
|
|
1879
|
+
.filter(
|
|
1880
|
+
(option) =>
|
|
1881
|
+
option.implied !== undefined &&
|
|
1882
|
+
hasCustomOptionValue(option.attributeName()) &&
|
|
1883
|
+
dualHelper.valueFromOption(
|
|
1884
|
+
this.getOptionValue(option.attributeName()),
|
|
1885
|
+
option,
|
|
1886
|
+
),
|
|
1887
|
+
)
|
|
1888
|
+
.forEach((option) => {
|
|
1889
|
+
Object.keys(option.implied)
|
|
1890
|
+
.filter((impliedKey) => !hasCustomOptionValue(impliedKey))
|
|
1891
|
+
.forEach((impliedKey) => {
|
|
1892
|
+
this.setOptionValueWithSource(
|
|
1893
|
+
impliedKey,
|
|
1894
|
+
option.implied[impliedKey],
|
|
1895
|
+
'implied',
|
|
1896
|
+
);
|
|
1897
|
+
});
|
|
1898
|
+
});
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
/**
|
|
1902
|
+
* Argument `name` is missing.
|
|
1903
|
+
*
|
|
1904
|
+
* @param {string} name
|
|
1905
|
+
* @private
|
|
1906
|
+
*/
|
|
1907
|
+
|
|
1908
|
+
missingArgument(name) {
|
|
1909
|
+
const message = `error: missing required argument '${name}'`;
|
|
1910
|
+
this.error(message, { code: 'commander.missingArgument' });
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
/**
|
|
1914
|
+
* `Option` is missing an argument.
|
|
1915
|
+
*
|
|
1916
|
+
* @param {Option} option
|
|
1917
|
+
* @private
|
|
1918
|
+
*/
|
|
1919
|
+
|
|
1920
|
+
optionMissingArgument(option) {
|
|
1921
|
+
const message = `error: option '${option.flags}' argument missing`;
|
|
1922
|
+
this.error(message, { code: 'commander.optionMissingArgument' });
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1925
|
+
/**
|
|
1926
|
+
* `Option` does not have a value, and is a mandatory option.
|
|
1927
|
+
*
|
|
1928
|
+
* @param {Option} option
|
|
1929
|
+
* @private
|
|
1930
|
+
*/
|
|
1931
|
+
|
|
1932
|
+
missingMandatoryOptionValue(option) {
|
|
1933
|
+
const message = `error: required option '${option.flags}' not specified`;
|
|
1934
|
+
this.error(message, { code: 'commander.missingMandatoryOptionValue' });
|
|
1935
|
+
}
|
|
1936
|
+
|
|
1937
|
+
/**
|
|
1938
|
+
* `Option` conflicts with another option.
|
|
1939
|
+
*
|
|
1940
|
+
* @param {Option} option
|
|
1941
|
+
* @param {Option} conflictingOption
|
|
1942
|
+
* @private
|
|
1943
|
+
*/
|
|
1944
|
+
_conflictingOption(option, conflictingOption) {
|
|
1945
|
+
// The calling code does not know whether a negated option is the source of the
|
|
1946
|
+
// value, so do some work to take an educated guess.
|
|
1947
|
+
const findBestOptionFromValue = (option) => {
|
|
1948
|
+
const optionKey = option.attributeName();
|
|
1949
|
+
const optionValue = this.getOptionValue(optionKey);
|
|
1950
|
+
const negativeOption = this.options.find(
|
|
1951
|
+
(target) => target.negate && optionKey === target.attributeName(),
|
|
1952
|
+
);
|
|
1953
|
+
const positiveOption = this.options.find(
|
|
1954
|
+
(target) => !target.negate && optionKey === target.attributeName(),
|
|
1955
|
+
);
|
|
1956
|
+
if (
|
|
1957
|
+
negativeOption &&
|
|
1958
|
+
((negativeOption.presetArg === undefined && optionValue === false) ||
|
|
1959
|
+
(negativeOption.presetArg !== undefined &&
|
|
1960
|
+
optionValue === negativeOption.presetArg))
|
|
1961
|
+
) {
|
|
1962
|
+
return negativeOption;
|
|
1963
|
+
}
|
|
1964
|
+
return positiveOption || option;
|
|
1965
|
+
};
|
|
1966
|
+
|
|
1967
|
+
const getErrorMessage = (option) => {
|
|
1968
|
+
const bestOption = findBestOptionFromValue(option);
|
|
1969
|
+
const optionKey = bestOption.attributeName();
|
|
1970
|
+
const source = this.getOptionValueSource(optionKey);
|
|
1971
|
+
if (source === 'env') {
|
|
1972
|
+
return `environment variable '${bestOption.envVar}'`;
|
|
1973
|
+
}
|
|
1974
|
+
return `option '${bestOption.flags}'`;
|
|
1975
|
+
};
|
|
1976
|
+
|
|
1977
|
+
const message = `error: ${getErrorMessage(option)} cannot be used with ${getErrorMessage(conflictingOption)}`;
|
|
1978
|
+
this.error(message, { code: 'commander.conflictingOption' });
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
/**
|
|
1982
|
+
* Unknown option `flag`.
|
|
1983
|
+
*
|
|
1984
|
+
* @param {string} flag
|
|
1985
|
+
* @private
|
|
1986
|
+
*/
|
|
1987
|
+
|
|
1988
|
+
unknownOption(flag) {
|
|
1989
|
+
if (this._allowUnknownOption) return;
|
|
1990
|
+
let suggestion = '';
|
|
1991
|
+
|
|
1992
|
+
if (flag.startsWith('--') && this._showSuggestionAfterError) {
|
|
1993
|
+
// Looping to pick up the global options too
|
|
1994
|
+
let candidateFlags = [];
|
|
1995
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
1996
|
+
let command = this;
|
|
1997
|
+
do {
|
|
1998
|
+
const moreFlags = command
|
|
1999
|
+
.createHelp()
|
|
2000
|
+
.visibleOptions(command)
|
|
2001
|
+
.filter((option) => option.long)
|
|
2002
|
+
.map((option) => option.long);
|
|
2003
|
+
candidateFlags = candidateFlags.concat(moreFlags);
|
|
2004
|
+
command = command.parent;
|
|
2005
|
+
} while (command && !command._enablePositionalOptions);
|
|
2006
|
+
suggestion = suggestSimilar(flag, candidateFlags);
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
const message = `error: unknown option '${flag}'${suggestion}`;
|
|
2010
|
+
this.error(message, { code: 'commander.unknownOption' });
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
/**
|
|
2014
|
+
* Excess arguments, more than expected.
|
|
2015
|
+
*
|
|
2016
|
+
* @param {string[]} receivedArgs
|
|
2017
|
+
* @private
|
|
2018
|
+
*/
|
|
2019
|
+
|
|
2020
|
+
_excessArguments(receivedArgs) {
|
|
2021
|
+
if (this._allowExcessArguments) return;
|
|
2022
|
+
|
|
2023
|
+
const expected = this.registeredArguments.length;
|
|
2024
|
+
const s = expected === 1 ? '' : 's';
|
|
2025
|
+
const forSubcommand = this.parent ? ` for '${this.name()}'` : '';
|
|
2026
|
+
const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`;
|
|
2027
|
+
this.error(message, { code: 'commander.excessArguments' });
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
/**
|
|
2031
|
+
* Unknown command.
|
|
2032
|
+
*
|
|
2033
|
+
* @private
|
|
2034
|
+
*/
|
|
2035
|
+
|
|
2036
|
+
unknownCommand() {
|
|
2037
|
+
const unknownName = this.args[0];
|
|
2038
|
+
let suggestion = '';
|
|
2039
|
+
|
|
2040
|
+
if (this._showSuggestionAfterError) {
|
|
2041
|
+
const candidateNames = [];
|
|
2042
|
+
this.createHelp()
|
|
2043
|
+
.visibleCommands(this)
|
|
2044
|
+
.forEach((command) => {
|
|
2045
|
+
candidateNames.push(command.name());
|
|
2046
|
+
// just visible alias
|
|
2047
|
+
if (command.alias()) candidateNames.push(command.alias());
|
|
2048
|
+
});
|
|
2049
|
+
suggestion = suggestSimilar(unknownName, candidateNames);
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
const message = `error: unknown command '${unknownName}'${suggestion}`;
|
|
2053
|
+
this.error(message, { code: 'commander.unknownCommand' });
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
/**
|
|
2057
|
+
* Get or set the program version.
|
|
2058
|
+
*
|
|
2059
|
+
* This method auto-registers the "-V, --version" option which will print the version number.
|
|
2060
|
+
*
|
|
2061
|
+
* You can optionally supply the flags and description to override the defaults.
|
|
2062
|
+
*
|
|
2063
|
+
* @param {string} [str]
|
|
2064
|
+
* @param {string} [flags]
|
|
2065
|
+
* @param {string} [description]
|
|
2066
|
+
* @return {(this | string | undefined)} `this` command for chaining, or version string if no arguments
|
|
2067
|
+
*/
|
|
2068
|
+
|
|
2069
|
+
version(str, flags, description) {
|
|
2070
|
+
if (str === undefined) return this._version;
|
|
2071
|
+
this._version = str;
|
|
2072
|
+
flags = flags || '-V, --version';
|
|
2073
|
+
description = description || 'output the version number';
|
|
2074
|
+
const versionOption = this.createOption(flags, description);
|
|
2075
|
+
this._versionOptionName = versionOption.attributeName();
|
|
2076
|
+
this._registerOption(versionOption);
|
|
2077
|
+
|
|
2078
|
+
this.on('option:' + versionOption.name(), () => {
|
|
2079
|
+
this._outputConfiguration.writeOut(`${str}\n`);
|
|
2080
|
+
this._exit(0, 'commander.version', str);
|
|
2081
|
+
});
|
|
2082
|
+
return this;
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
/**
|
|
2086
|
+
* Set the description.
|
|
2087
|
+
*
|
|
2088
|
+
* @param {string} [str]
|
|
2089
|
+
* @param {object} [argsDescription]
|
|
2090
|
+
* @return {(string|Command)}
|
|
2091
|
+
*/
|
|
2092
|
+
description(str, argsDescription) {
|
|
2093
|
+
if (str === undefined && argsDescription === undefined)
|
|
2094
|
+
return this._description;
|
|
2095
|
+
this._description = str;
|
|
2096
|
+
if (argsDescription) {
|
|
2097
|
+
this._argsDescription = argsDescription;
|
|
2098
|
+
}
|
|
2099
|
+
return this;
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
/**
|
|
2103
|
+
* Set the summary. Used when listed as subcommand of parent.
|
|
2104
|
+
*
|
|
2105
|
+
* @param {string} [str]
|
|
2106
|
+
* @return {(string|Command)}
|
|
2107
|
+
*/
|
|
2108
|
+
summary(str) {
|
|
2109
|
+
if (str === undefined) return this._summary;
|
|
2110
|
+
this._summary = str;
|
|
2111
|
+
return this;
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
/**
|
|
2115
|
+
* Set an alias for the command.
|
|
2116
|
+
*
|
|
2117
|
+
* You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.
|
|
2118
|
+
*
|
|
2119
|
+
* @param {string} [alias]
|
|
2120
|
+
* @return {(string|Command)}
|
|
2121
|
+
*/
|
|
2122
|
+
|
|
2123
|
+
alias(alias) {
|
|
2124
|
+
if (alias === undefined) return this._aliases[0]; // just return first, for backwards compatibility
|
|
2125
|
+
|
|
2126
|
+
/** @type {Command} */
|
|
2127
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
2128
|
+
let command = this;
|
|
2129
|
+
if (
|
|
2130
|
+
this.commands.length !== 0 &&
|
|
2131
|
+
this.commands[this.commands.length - 1]._executableHandler
|
|
2132
|
+
) {
|
|
2133
|
+
// assume adding alias for last added executable subcommand, rather than this
|
|
2134
|
+
command = this.commands[this.commands.length - 1];
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
if (alias === command._name)
|
|
2138
|
+
throw new Error("Command alias can't be the same as its name");
|
|
2139
|
+
const matchingCommand = this.parent?._findCommand(alias);
|
|
2140
|
+
if (matchingCommand) {
|
|
2141
|
+
// c.f. _registerCommand
|
|
2142
|
+
const existingCmd = [matchingCommand.name()]
|
|
2143
|
+
.concat(matchingCommand.aliases())
|
|
2144
|
+
.join('|');
|
|
2145
|
+
throw new Error(
|
|
2146
|
+
`cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`,
|
|
2147
|
+
);
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
command._aliases.push(alias);
|
|
2151
|
+
return this;
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2154
|
+
/**
|
|
2155
|
+
* Set aliases for the command.
|
|
2156
|
+
*
|
|
2157
|
+
* Only the first alias is shown in the auto-generated help.
|
|
2158
|
+
*
|
|
2159
|
+
* @param {string[]} [aliases]
|
|
2160
|
+
* @return {(string[]|Command)}
|
|
2161
|
+
*/
|
|
2162
|
+
|
|
2163
|
+
aliases(aliases) {
|
|
2164
|
+
// Getter for the array of aliases is the main reason for having aliases() in addition to alias().
|
|
2165
|
+
if (aliases === undefined) return this._aliases;
|
|
2166
|
+
|
|
2167
|
+
aliases.forEach((alias) => this.alias(alias));
|
|
2168
|
+
return this;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
/**
|
|
2172
|
+
* Set / get the command usage `str`.
|
|
2173
|
+
*
|
|
2174
|
+
* @param {string} [str]
|
|
2175
|
+
* @return {(string|Command)}
|
|
2176
|
+
*/
|
|
2177
|
+
|
|
2178
|
+
usage(str) {
|
|
2179
|
+
if (str === undefined) {
|
|
2180
|
+
if (this._usage) return this._usage;
|
|
2181
|
+
|
|
2182
|
+
const args = this.registeredArguments.map((arg) => {
|
|
2183
|
+
return humanReadableArgName(arg);
|
|
2184
|
+
});
|
|
2185
|
+
return []
|
|
2186
|
+
.concat(
|
|
2187
|
+
this.options.length || this._helpOption !== null ? '[options]' : [],
|
|
2188
|
+
this.commands.length ? '[command]' : [],
|
|
2189
|
+
this.registeredArguments.length ? args : [],
|
|
2190
|
+
)
|
|
2191
|
+
.join(' ');
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
this._usage = str;
|
|
2195
|
+
return this;
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
/**
|
|
2199
|
+
* Get or set the name of the command.
|
|
2200
|
+
*
|
|
2201
|
+
* @param {string} [str]
|
|
2202
|
+
* @return {(string|Command)}
|
|
2203
|
+
*/
|
|
2204
|
+
|
|
2205
|
+
name(str) {
|
|
2206
|
+
if (str === undefined) return this._name;
|
|
2207
|
+
this._name = str;
|
|
2208
|
+
return this;
|
|
2209
|
+
}
|
|
2210
|
+
|
|
2211
|
+
/**
|
|
2212
|
+
* Set the name of the command from script filename, such as process.argv[1],
|
|
2213
|
+
* or require.main.filename, or __filename.
|
|
2214
|
+
*
|
|
2215
|
+
* (Used internally and public although not documented in README.)
|
|
2216
|
+
*
|
|
2217
|
+
* @example
|
|
2218
|
+
* program.nameFromFilename(require.main.filename);
|
|
2219
|
+
*
|
|
2220
|
+
* @param {string} filename
|
|
2221
|
+
* @return {Command}
|
|
2222
|
+
*/
|
|
2223
|
+
|
|
2224
|
+
nameFromFilename(filename) {
|
|
2225
|
+
this._name = path.basename(filename, path.extname(filename));
|
|
2226
|
+
|
|
2227
|
+
return this;
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
/**
|
|
2231
|
+
* Get or set the directory for searching for executable subcommands of this command.
|
|
2232
|
+
*
|
|
2233
|
+
* @example
|
|
2234
|
+
* program.executableDir(__dirname);
|
|
2235
|
+
* // or
|
|
2236
|
+
* program.executableDir('subcommands');
|
|
2237
|
+
*
|
|
2238
|
+
* @param {string} [path]
|
|
2239
|
+
* @return {(string|null|Command)}
|
|
2240
|
+
*/
|
|
2241
|
+
|
|
2242
|
+
executableDir(path) {
|
|
2243
|
+
if (path === undefined) return this._executableDir;
|
|
2244
|
+
this._executableDir = path;
|
|
2245
|
+
return this;
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
/**
|
|
2249
|
+
* Return program help documentation.
|
|
2250
|
+
*
|
|
2251
|
+
* @param {{ error: boolean }} [contextOptions] - pass {error:true} to wrap for stderr instead of stdout
|
|
2252
|
+
* @return {string}
|
|
2253
|
+
*/
|
|
2254
|
+
|
|
2255
|
+
helpInformation(contextOptions) {
|
|
2256
|
+
const helper = this.createHelp();
|
|
2257
|
+
if (helper.helpWidth === undefined) {
|
|
2258
|
+
helper.helpWidth =
|
|
2259
|
+
contextOptions && contextOptions.error
|
|
2260
|
+
? this._outputConfiguration.getErrHelpWidth()
|
|
2261
|
+
: this._outputConfiguration.getOutHelpWidth();
|
|
2262
|
+
}
|
|
2263
|
+
return helper.formatHelp(this, helper);
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
/**
|
|
2267
|
+
* @private
|
|
2268
|
+
*/
|
|
2269
|
+
|
|
2270
|
+
_getHelpContext(contextOptions) {
|
|
2271
|
+
contextOptions = contextOptions || {};
|
|
2272
|
+
const context = { error: !!contextOptions.error };
|
|
2273
|
+
let write;
|
|
2274
|
+
if (context.error) {
|
|
2275
|
+
write = (arg) => this._outputConfiguration.writeErr(arg);
|
|
2276
|
+
} else {
|
|
2277
|
+
write = (arg) => this._outputConfiguration.writeOut(arg);
|
|
2278
|
+
}
|
|
2279
|
+
context.write = contextOptions.write || write;
|
|
2280
|
+
context.command = this;
|
|
2281
|
+
return context;
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
/**
|
|
2285
|
+
* Output help information for this command.
|
|
2286
|
+
*
|
|
2287
|
+
* Outputs built-in help, and custom text added using `.addHelpText()`.
|
|
2288
|
+
*
|
|
2289
|
+
* @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout
|
|
2290
|
+
*/
|
|
2291
|
+
|
|
2292
|
+
outputHelp(contextOptions) {
|
|
2293
|
+
let deprecatedCallback;
|
|
2294
|
+
if (typeof contextOptions === 'function') {
|
|
2295
|
+
deprecatedCallback = contextOptions;
|
|
2296
|
+
contextOptions = undefined;
|
|
2297
|
+
}
|
|
2298
|
+
const context = this._getHelpContext(contextOptions);
|
|
2299
|
+
|
|
2300
|
+
this._getCommandAndAncestors()
|
|
2301
|
+
.reverse()
|
|
2302
|
+
.forEach((command) => command.emit('beforeAllHelp', context));
|
|
2303
|
+
this.emit('beforeHelp', context);
|
|
2304
|
+
|
|
2305
|
+
let helpInformation = this.helpInformation(context);
|
|
2306
|
+
if (deprecatedCallback) {
|
|
2307
|
+
helpInformation = deprecatedCallback(helpInformation);
|
|
2308
|
+
if (
|
|
2309
|
+
typeof helpInformation !== 'string' &&
|
|
2310
|
+
!Buffer.isBuffer(helpInformation)
|
|
2311
|
+
) {
|
|
2312
|
+
throw new Error('outputHelp callback must return a string or a Buffer');
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
context.write(helpInformation);
|
|
2316
|
+
|
|
2317
|
+
if (this._getHelpOption()?.long) {
|
|
2318
|
+
this.emit(this._getHelpOption().long); // deprecated
|
|
2319
|
+
}
|
|
2320
|
+
this.emit('afterHelp', context);
|
|
2321
|
+
this._getCommandAndAncestors().forEach((command) =>
|
|
2322
|
+
command.emit('afterAllHelp', context),
|
|
2323
|
+
);
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2326
|
+
/**
|
|
2327
|
+
* You can pass in flags and a description to customise the built-in help option.
|
|
2328
|
+
* Pass in false to disable the built-in help option.
|
|
2329
|
+
*
|
|
2330
|
+
* @example
|
|
2331
|
+
* program.helpOption('-?, --help' 'show help'); // customise
|
|
2332
|
+
* program.helpOption(false); // disable
|
|
2333
|
+
*
|
|
2334
|
+
* @param {(string | boolean)} flags
|
|
2335
|
+
* @param {string} [description]
|
|
2336
|
+
* @return {Command} `this` command for chaining
|
|
2337
|
+
*/
|
|
2338
|
+
|
|
2339
|
+
helpOption(flags, description) {
|
|
2340
|
+
// Support disabling built-in help option.
|
|
2341
|
+
if (typeof flags === 'boolean') {
|
|
2342
|
+
if (flags) {
|
|
2343
|
+
this._helpOption = this._helpOption ?? undefined; // preserve existing option
|
|
2344
|
+
} else {
|
|
2345
|
+
this._helpOption = null; // disable
|
|
2346
|
+
}
|
|
2347
|
+
return this;
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
// Customise flags and description.
|
|
2351
|
+
flags = flags ?? '-h, --help';
|
|
2352
|
+
description = description ?? 'display help for command';
|
|
2353
|
+
this._helpOption = this.createOption(flags, description);
|
|
2354
|
+
|
|
2355
|
+
return this;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
/**
|
|
2359
|
+
* Lazy create help option.
|
|
2360
|
+
* Returns null if has been disabled with .helpOption(false).
|
|
2361
|
+
*
|
|
2362
|
+
* @returns {(Option | null)} the help option
|
|
2363
|
+
* @package
|
|
2364
|
+
*/
|
|
2365
|
+
_getHelpOption() {
|
|
2366
|
+
// Lazy create help option on demand.
|
|
2367
|
+
if (this._helpOption === undefined) {
|
|
2368
|
+
this.helpOption(undefined, undefined);
|
|
2369
|
+
}
|
|
2370
|
+
return this._helpOption;
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
/**
|
|
2374
|
+
* Supply your own option to use for the built-in help option.
|
|
2375
|
+
* This is an alternative to using helpOption() to customise the flags and description etc.
|
|
2376
|
+
*
|
|
2377
|
+
* @param {Option} option
|
|
2378
|
+
* @return {Command} `this` command for chaining
|
|
2379
|
+
*/
|
|
2380
|
+
addHelpOption(option) {
|
|
2381
|
+
this._helpOption = option;
|
|
2382
|
+
return this;
|
|
2383
|
+
}
|
|
2384
|
+
|
|
2385
|
+
/**
|
|
2386
|
+
* Output help information and exit.
|
|
2387
|
+
*
|
|
2388
|
+
* Outputs built-in help, and custom text added using `.addHelpText()`.
|
|
2389
|
+
*
|
|
2390
|
+
* @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout
|
|
2391
|
+
*/
|
|
2392
|
+
|
|
2393
|
+
help(contextOptions) {
|
|
2394
|
+
this.outputHelp(contextOptions);
|
|
2395
|
+
let exitCode = process.exitCode || 0;
|
|
2396
|
+
if (
|
|
2397
|
+
exitCode === 0 &&
|
|
2398
|
+
contextOptions &&
|
|
2399
|
+
typeof contextOptions !== 'function' &&
|
|
2400
|
+
contextOptions.error
|
|
2401
|
+
) {
|
|
2402
|
+
exitCode = 1;
|
|
2403
|
+
}
|
|
2404
|
+
// message: do not have all displayed text available so only passing placeholder.
|
|
2405
|
+
this._exit(exitCode, 'commander.help', '(outputHelp)');
|
|
2406
|
+
}
|
|
2407
|
+
|
|
2408
|
+
/**
|
|
2409
|
+
* Add additional text to be displayed with the built-in help.
|
|
2410
|
+
*
|
|
2411
|
+
* Position is 'before' or 'after' to affect just this command,
|
|
2412
|
+
* and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.
|
|
2413
|
+
*
|
|
2414
|
+
* @param {string} position - before or after built-in help
|
|
2415
|
+
* @param {(string | Function)} text - string to add, or a function returning a string
|
|
2416
|
+
* @return {Command} `this` command for chaining
|
|
2417
|
+
*/
|
|
2418
|
+
addHelpText(position, text) {
|
|
2419
|
+
const allowedValues = ['beforeAll', 'before', 'after', 'afterAll'];
|
|
2420
|
+
if (!allowedValues.includes(position)) {
|
|
2421
|
+
throw new Error(`Unexpected value for position to addHelpText.
|
|
2422
|
+
Expecting one of '${allowedValues.join("', '")}'`);
|
|
2423
|
+
}
|
|
2424
|
+
const helpEvent = `${position}Help`;
|
|
2425
|
+
this.on(helpEvent, (context) => {
|
|
2426
|
+
let helpStr;
|
|
2427
|
+
if (typeof text === 'function') {
|
|
2428
|
+
helpStr = text({ error: context.error, command: context.command });
|
|
2429
|
+
} else {
|
|
2430
|
+
helpStr = text;
|
|
2431
|
+
}
|
|
2432
|
+
// Ignore falsy value when nothing to output.
|
|
2433
|
+
if (helpStr) {
|
|
2434
|
+
context.write(`${helpStr}\n`);
|
|
2435
|
+
}
|
|
2436
|
+
});
|
|
2437
|
+
return this;
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
/**
|
|
2441
|
+
* Output help information if help flags specified
|
|
2442
|
+
*
|
|
2443
|
+
* @param {Array} args - array of options to search for help flags
|
|
2444
|
+
* @private
|
|
2445
|
+
*/
|
|
2446
|
+
|
|
2447
|
+
_outputHelpIfRequested(args) {
|
|
2448
|
+
const helpOption = this._getHelpOption();
|
|
2449
|
+
const helpRequested = helpOption && args.find((arg) => helpOption.is(arg));
|
|
2450
|
+
if (helpRequested) {
|
|
2451
|
+
this.outputHelp();
|
|
2452
|
+
// (Do not have all displayed text available so only passing placeholder.)
|
|
2453
|
+
this._exit(0, 'commander.helpDisplayed', '(outputHelp)');
|
|
2454
|
+
}
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2458
|
+
/**
|
|
2459
|
+
* Scan arguments and increment port number for inspect calls (to avoid conflicts when spawning new command).
|
|
2460
|
+
*
|
|
2461
|
+
* @param {string[]} args - array of arguments from node.execArgv
|
|
2462
|
+
* @returns {string[]}
|
|
2463
|
+
* @private
|
|
2464
|
+
*/
|
|
2465
|
+
|
|
2466
|
+
function incrementNodeInspectorPort(args) {
|
|
2467
|
+
// Testing for these options:
|
|
2468
|
+
// --inspect[=[host:]port]
|
|
2469
|
+
// --inspect-brk[=[host:]port]
|
|
2470
|
+
// --inspect-port=[host:]port
|
|
2471
|
+
return args.map((arg) => {
|
|
2472
|
+
if (!arg.startsWith('--inspect')) {
|
|
2473
|
+
return arg;
|
|
2474
|
+
}
|
|
2475
|
+
let debugOption;
|
|
2476
|
+
let debugHost = '127.0.0.1';
|
|
2477
|
+
let debugPort = '9229';
|
|
2478
|
+
let match;
|
|
2479
|
+
if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {
|
|
2480
|
+
// e.g. --inspect
|
|
2481
|
+
debugOption = match[1];
|
|
2482
|
+
} else if (
|
|
2483
|
+
(match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null
|
|
2484
|
+
) {
|
|
2485
|
+
debugOption = match[1];
|
|
2486
|
+
if (/^\d+$/.test(match[3])) {
|
|
2487
|
+
// e.g. --inspect=1234
|
|
2488
|
+
debugPort = match[3];
|
|
2489
|
+
} else {
|
|
2490
|
+
// e.g. --inspect=localhost
|
|
2491
|
+
debugHost = match[3];
|
|
2492
|
+
}
|
|
2493
|
+
} else if (
|
|
2494
|
+
(match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null
|
|
2495
|
+
) {
|
|
2496
|
+
// e.g. --inspect=localhost:1234
|
|
2497
|
+
debugOption = match[1];
|
|
2498
|
+
debugHost = match[3];
|
|
2499
|
+
debugPort = match[4];
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2502
|
+
if (debugOption && debugPort !== '0') {
|
|
2503
|
+
return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;
|
|
2504
|
+
}
|
|
2505
|
+
return arg;
|
|
2506
|
+
});
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
exports.Command = Command;
|