@64mb/freelens-power 1.6.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -33
- package/THIRD_PARTY_LICENSES +74 -0
- package/out/main/_virtual/_rolldown/runtime.js +25 -0
- package/out/main/ai-answer-stream.js +96 -0
- package/out/main/ai-answer-stream.js.map +1 -0
- package/out/main/ai-api-key.js +95 -0
- package/out/main/ai-api-key.js.map +1 -0
- package/out/main/ai-codex-api.js +611 -0
- package/out/main/ai-codex-api.js.map +1 -0
- package/out/main/ai-ipc.js +42 -11
- package/out/main/ai-ipc.js.map +1 -1
- package/out/main/ai-logs.js +4 -3
- package/out/main/ai-logs.js.map +1 -1
- package/out/main/ai-models.js +23 -11
- package/out/main/ai-models.js.map +1 -1
- package/out/main/ai-pi-models.js +73 -0
- package/out/main/ai-pi-models.js.map +1 -0
- package/out/main/ai-pi.js +411 -0
- package/out/main/ai-pi.js.map +1 -0
- package/out/main/ai-references.js +1 -1
- package/out/main/ai-resources.js +166 -220
- package/out/main/ai-resources.js.map +1 -1
- package/out/main/ai.js +303 -142
- package/out/main/ai.js.map +1 -1
- package/out/main/cluster-icons-catalog.js +1 -1
- package/out/main/cluster-icons.js +4 -4
- package/out/main/dashboard-ai.js +29 -0
- package/out/main/dashboard-ai.js.map +1 -0
- package/out/main/dashboard-catalog.js +1 -1
- package/out/main/dashboard-picker.js +3 -3
- package/out/main/dashboard-views.js +102 -10
- package/out/main/dashboard-views.js.map +1 -1
- package/out/main/diagnostics-menu-order.js +1 -1
- package/out/main/dock-icon.js +1 -1
- package/out/main/extension-updates.js +151 -0
- package/out/main/extension-updates.js.map +1 -0
- package/out/main/helm-installed-chart.js +141 -0
- package/out/main/helm-installed-chart.js.map +1 -0
- package/out/main/helm-ipc.js +748 -0
- package/out/main/helm-ipc.js.map +1 -0
- package/out/main/helm-values.js +45 -0
- package/out/main/helm-values.js.map +1 -0
- package/out/main/helm.js +283 -0
- package/out/main/helm.js.map +1 -0
- package/out/main/index.js +20 -12
- package/out/main/index.js.map +1 -1
- package/out/main/monitoring-history.js +2 -2
- package/out/main/node-bulk.js +260 -0
- package/out/main/node-bulk.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js +99 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/buffer-util.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js +32 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/constants.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js +242 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/event-target.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js +154 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/extension.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js +60 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/limiter.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js +346 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/permessage-deflate.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js +479 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/receiver.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js +508 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/sender.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js +127 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js +50 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js +201 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js +401 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js +1007 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket.js.map +1 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/wrapper.js +23 -0
- package/out/main/node_modules/.pnpm/ws@8.21.0/node_modules/ws/wrapper.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-collection.js +69 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-collection.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-doc.js +56 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-doc.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-node.js +105 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-node.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-scalar.js +73 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/compose-scalar.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/composer.js +214 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/composer.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-map.js +100 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-map.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-scalar.js +187 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-scalar.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-seq.js +55 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-block-seq.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-end.js +47 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-end.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-collection.js +173 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-collection.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-scalar.js +218 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-flow-scalar.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-props.js +116 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/resolve-props.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-contains-newline.js +38 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-contains-newline.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-empty-scalar-position.js +36 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-empty-scalar-position.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-flow-indent-check.js +23 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-flow-indent-check.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-map-includes.js +23 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/compose/util-map-includes.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/Document.js +302 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/Document.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/anchors.js +79 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/anchors.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/applyReviver.js +49 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/applyReviver.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/createNode.js +76 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/createNode.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/directives.js +177 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/doc/directives.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/errors.js +62 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/errors.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/index.js +74 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/index.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/log.js +23 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/log.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Alias.js +111 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Alias.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Collection.js +134 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Collection.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Node.js +47 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Node.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Pair.js +47 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Pair.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Scalar.js +40 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/Scalar.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLMap.js +125 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLMap.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLSeq.js +122 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/YAMLSeq.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/addPairToJSMap.js +66 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/addPairToJSMap.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/identity.js +59 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/identity.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/toJS.js +48 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/nodes/toJS.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-scalar.js +281 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-scalar.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-stringify.js +60 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-stringify.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-visit.js +100 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst-visit.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst.js +92 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/cst.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/lexer.js +542 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/lexer.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/line-counter.js +56 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/line-counter.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/parser.js +875 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/parse/parser.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/public-api.js +104 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/public-api.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/Schema.js +43 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/Schema.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/map.js +29 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/map.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/null.js +26 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/null.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/seq.js +29 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/seq.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/string.js +26 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/common/string.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/bool.js +30 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/bool.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/float.js +53 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/float.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/int.js +52 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/int.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/schema.js +41 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/core/schema.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/json/schema.js +75 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/json/schema.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/tags.js +110 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/tags.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/binary.js +68 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/binary.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/bool.js +38 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/bool.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/float.js +56 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/float.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/int.js +86 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/int.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/merge.js +55 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/merge.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/omap.js +78 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/omap.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +74 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/pairs.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/schema.js +63 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/schema.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/set.js +81 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/set.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +94 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/foldFlowLines.js +125 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/foldFlowLines.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringify.js +122 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringify.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyCollection.js +131 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyCollection.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyComment.js +29 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyComment.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyDocument.js +74 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyDocument.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyNumber.js +30 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyNumber.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyPair.js +111 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyPair.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyString.js +236 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/stringify/stringifyString.js.map +1 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/visit.js +201 -0
- package/out/main/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/visit.js.map +1 -0
- package/out/main/package.js +6 -0
- package/out/main/package.js.map +1 -0
- package/out/main/power-logs-budget.js +1 -1
- package/out/main/power-logs-child.js +5 -4
- package/out/main/power-logs-child.js.map +1 -1
- package/out/main/power-logs-database.js +214 -8
- package/out/main/power-logs-database.js.map +1 -1
- package/out/main/power-logs-ipc.js +56 -7
- package/out/main/power-logs-ipc.js.map +1 -1
- package/out/main/power-logs-query-child.js +1 -1
- package/out/main/power-logs-query.js +6 -4
- package/out/main/power-logs-query.js.map +1 -1
- package/out/main/power-logs-worker.js +31 -9
- package/out/main/power-logs-worker.js.map +1 -1
- package/out/main/resource-search-database.js +9 -3
- package/out/main/resource-search-database.js.map +1 -1
- package/out/main/resource-search-worker.js +6 -2
- package/out/main/resource-search-worker.js.map +1 -1
- package/out/main/resource-search.js +4 -3
- package/out/main/resource-search.js.map +1 -1
- package/out/main/settings-export.js +3 -3
- package/out/main/settings-import.js +3 -3
- package/out/main/splash-accent.js +1 -1
- package/out/main/src/common/ai-attachments.js +36 -0
- package/out/main/src/common/ai-attachments.js.map +1 -0
- package/out/main/src/common/ai-extras.js.map +1 -0
- package/out/main/src/common/ai-models.js +81 -0
- package/out/main/src/common/ai-models.js.map +1 -0
- package/out/main/src/common/ai-prompts.js +46 -0
- package/out/main/src/common/ai-prompts.js.map +1 -0
- package/out/main/src/common/ai-resource-payload.js +308 -0
- package/out/main/src/common/ai-resource-payload.js.map +1 -0
- package/out/main/src/common/ai-shortcuts.js.map +1 -0
- package/out/main/src/common/ai-terminal-context.js +72 -0
- package/out/main/src/common/ai-terminal-context.js.map +1 -0
- package/out/main/{common → src/common}/ai.js +6 -0
- package/out/main/src/common/ai.js.map +1 -0
- package/out/main/src/common/cluster-icon-ipc.js.map +1 -0
- package/out/main/src/common/cluster-icons.js.map +1 -0
- package/out/main/src/common/dashboard-ai.js +64 -0
- package/out/main/src/common/dashboard-ai.js.map +1 -0
- package/out/main/src/common/dashboard-picker.js.map +1 -0
- package/out/main/src/common/dashboard-readiness.js.map +1 -0
- package/out/main/src/common/dashboard-selector.js.map +1 -0
- package/out/main/src/common/dashboard-views.js.map +1 -0
- package/out/main/src/common/dashboard.js.map +1 -0
- package/out/main/src/common/extension-info.js.map +1 -0
- package/out/main/src/common/extension-updates.js +13 -0
- package/out/main/src/common/extension-updates.js.map +1 -0
- package/out/main/src/common/helm-values-validation.js +56 -0
- package/out/main/src/common/helm-values-validation.js.map +1 -0
- package/out/main/src/common/helm.js +8 -0
- package/out/main/src/common/helm.js.map +1 -0
- package/out/main/src/common/monitoring-history.js.map +1 -0
- package/out/main/src/common/node-bulk.js +6 -0
- package/out/main/src/common/node-bulk.js.map +1 -0
- package/out/main/src/common/power-logs-limits.js.map +1 -0
- package/out/main/{common → src/common}/power-logs.js +6 -0
- package/out/main/src/common/power-logs.js.map +1 -0
- package/out/main/src/common/resource-search-kind-priority.js +23 -0
- package/out/main/src/common/resource-search-kind-priority.js.map +1 -0
- package/out/main/src/common/resource-search.js.map +1 -0
- package/out/main/src/common/settings-export.js.map +1 -0
- package/out/main/{common → src/common}/store/ai-preferences-store.js +50 -8
- package/out/main/src/common/store/ai-preferences-store.js.map +1 -0
- package/out/main/{common → src/common}/store/ai-shortcuts-store.js +2 -2
- package/out/main/src/common/store/ai-shortcuts-store.js.map +1 -0
- package/out/main/{common → src/common}/store/appearance-preferences-store.js +10 -5
- package/out/main/src/common/store/appearance-preferences-store.js.map +1 -0
- package/out/main/{common → src/common}/store/cluster-icons-store.js +2 -2
- package/out/main/src/common/store/cluster-icons-store.js.map +1 -0
- package/out/main/{common → src/common}/store/dashboard-preferences-store.js +2 -2
- package/out/main/src/common/store/dashboard-preferences-store.js.map +1 -0
- package/out/main/src/common/store/helm-preferences-store.js +26 -0
- package/out/main/src/common/store/helm-preferences-store.js.map +1 -0
- package/out/main/{common → src/common}/store/logs-preferences-store.js +7 -2
- package/out/main/src/common/store/logs-preferences-store.js.map +1 -0
- package/out/main/{common → src/common}/store/monitoring-preferences-store.js +2 -2
- package/out/main/src/common/store/monitoring-preferences-store.js.map +1 -0
- package/out/main/src/common/store/node-shell-preferences-store.js +44 -0
- package/out/main/src/common/store/node-shell-preferences-store.js.map +1 -0
- package/out/main/src/common/store/power-preferences-store.js +39 -0
- package/out/main/src/common/store/power-preferences-store.js.map +1 -0
- package/out/main/{common → src/common}/store/read-only-preferences-store.js +2 -2
- package/out/main/src/common/store/read-only-preferences-store.js.map +1 -0
- package/out/renderer/_virtual/_global-external_mobx.js +4 -2
- package/out/renderer/_virtual/_global-external_react-dom.js +4 -2
- package/out/renderer/_virtual/_global-external_react.js +4 -2
- package/out/renderer/ai-attachment-card.js +92 -0
- package/out/renderer/ai-attachment-card.js.map +1 -0
- package/out/renderer/ai-context-mutations.js +14 -0
- package/out/renderer/ai-context-mutations.js.map +1 -0
- package/out/renderer/ai-copy-answer.js +18 -15
- package/out/renderer/ai-copy-answer.js.map +1 -1
- package/out/renderer/ai-diagnostic-handoff.js +5 -2
- package/out/renderer/ai-diagnostic-handoff.js.map +1 -1
- package/out/renderer/ai-extras.js +95 -85
- package/out/renderer/ai-extras.js.map +1 -1
- package/out/renderer/ai-icon.js +26 -0
- package/out/renderer/ai-icon.js.map +1 -1
- package/out/renderer/ai-logs-sql.js +1 -0
- package/out/renderer/ai-logs-sql.js.map +1 -1
- package/out/renderer/ai-message.js +58 -41
- package/out/renderer/ai-message.js.map +1 -1
- package/out/renderer/ai-provider-icon.js +77 -32
- package/out/renderer/ai-provider-icon.js.map +1 -1
- package/out/renderer/ai-resize.js +40 -37
- package/out/renderer/ai-resize.js.map +1 -1
- package/out/renderer/ai-shortcuts.js +21 -17
- package/out/renderer/ai-shortcuts.js.map +1 -1
- package/out/renderer/ai-terminal-context.js +54 -81
- package/out/renderer/ai-terminal-context.js.map +1 -1
- package/out/renderer/ai.js +530 -172
- package/out/renderer/ai.js.map +1 -1
- package/out/renderer/appearance.js +59 -5
- package/out/renderer/appearance.js.map +1 -1
- package/out/renderer/assets/openai.js +6 -0
- package/out/renderer/assets/openai.js.map +1 -0
- package/out/renderer/assets/pi.js +6 -0
- package/out/renderer/assets/pi.js.map +1 -0
- package/out/renderer/button-styles.js +31 -2
- package/out/renderer/button-styles.js.map +1 -1
- package/out/renderer/cluster-icon-colors.js +10 -7
- package/out/renderer/cluster-icon-colors.js.map +1 -1
- package/out/renderer/cluster-icons.js +47 -40
- package/out/renderer/cluster-icons.js.map +1 -1
- package/out/renderer/dashboard.js +75 -14
- package/out/renderer/dashboard.js.map +1 -1
- package/out/renderer/details/resource-health-details.js +2 -2
- package/out/renderer/details/resource-health-details.js.map +1 -1
- package/out/renderer/details/service-diagnostics-details.js +25 -23
- package/out/renderer/details/service-diagnostics-details.js.map +1 -1
- package/out/renderer/diagnostic-explain-button.js +7 -4
- package/out/renderer/diagnostic-explain-button.js.map +1 -1
- package/out/renderer/diagnostics-screen-finding.js +52 -0
- package/out/renderer/diagnostics-screen-finding.js.map +1 -0
- package/out/renderer/diagnostics-state.js +37 -0
- package/out/renderer/diagnostics-state.js.map +1 -1
- package/out/renderer/diagnostics.css.js +17 -4
- package/out/renderer/diagnostics.css.js.map +1 -1
- package/out/renderer/diagnostics.js +457 -189
- package/out/renderer/diagnostics.js.map +1 -1
- package/out/renderer/extension-update-notifications.js +221 -0
- package/out/renderer/extension-update-notifications.js.map +1 -0
- package/out/renderer/extension-update.js +189 -0
- package/out/renderer/extension-update.js.map +1 -0
- package/out/renderer/floating-action-transitions.js +139 -0
- package/out/renderer/floating-action-transitions.js.map +1 -0
- package/out/renderer/helm-app-version.js +141 -0
- package/out/renderer/helm-app-version.js.map +1 -0
- package/out/renderer/helm-code-view.js +727 -0
- package/out/renderer/helm-code-view.js.map +1 -0
- package/out/renderer/helm-entrypoints.js +79 -0
- package/out/renderer/helm-entrypoints.js.map +1 -0
- package/out/renderer/helm-full-comparison.js +233 -0
- package/out/renderer/helm-full-comparison.js.map +1 -0
- package/out/renderer/helm-operations.js +541 -0
- package/out/renderer/helm-operations.js.map +1 -0
- package/out/renderer/helm-release-actions.js +296 -0
- package/out/renderer/helm-release-actions.js.map +1 -0
- package/out/renderer/helm-revision-delete.js +128 -0
- package/out/renderer/helm-revision-delete.js.map +1 -0
- package/out/renderer/helm-version-index.js +283 -0
- package/out/renderer/helm-version-index.js.map +1 -0
- package/out/renderer/helm.js +2383 -0
- package/out/renderer/helm.js.map +1 -0
- package/out/renderer/host-extensions.js +102 -0
- package/out/renderer/host-extensions.js.map +1 -0
- package/out/renderer/host-layout.js +59 -0
- package/out/renderer/host-layout.js.map +1 -0
- package/out/renderer/host-preferences.js +192 -0
- package/out/renderer/host-preferences.js.map +1 -0
- package/out/renderer/incident-copy-button.js +24 -21
- package/out/renderer/incident-copy-button.js.map +1 -1
- package/out/renderer/index.js +47 -5
- package/out/renderer/index.js.map +1 -1
- package/out/renderer/menus/secure-node-shell-menu.js +2 -1
- package/out/renderer/menus/secure-node-shell-menu.js.map +1 -1
- package/out/renderer/monitoring-collector.js +13 -8
- package/out/renderer/monitoring-collector.js.map +1 -1
- package/out/renderer/monitoring-history-view.js +1 -1
- package/out/renderer/monitoring-history-view.js.map +1 -1
- package/out/renderer/monitoring.js +130 -49
- package/out/renderer/monitoring.js.map +1 -1
- package/out/renderer/native-resource-removals.js +202 -0
- package/out/renderer/native-resource-removals.js.map +1 -0
- package/out/renderer/native-tooltip.js +22 -0
- package/out/renderer/native-tooltip.js.map +1 -0
- package/out/renderer/node-bulk-actions.js +527 -0
- package/out/renderer/node-bulk-actions.js.map +1 -0
- package/out/renderer/node-bulk-selection.js +203 -0
- package/out/renderer/node-bulk-selection.js.map +1 -0
- package/out/renderer/node-shell-entrypoints.js +65 -0
- package/out/renderer/node-shell-entrypoints.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-collection.js +52 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-collection.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-doc.js +41 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-doc.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-node.js +88 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-node.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-scalar.js +59 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/compose-scalar.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/composer.js +195 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/composer.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-map.js +84 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-map.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +176 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +42 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-block-seq.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-end.js +38 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-end.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +155 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +206 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-props.js +107 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/resolve-props.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-contains-newline.js +29 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-contains-newline.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +27 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +12 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-map-includes.js +12 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/compose/util-map-includes.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/Document.js +279 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/Document.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/anchors.js +67 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/anchors.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/applyReviver.js +40 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/applyReviver.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/createNode.js +63 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/createNode.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/directives.js +165 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/doc/directives.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/errors.js +53 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/errors.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/index.js +24 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/log.js +8 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/log.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Alias.js +96 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Alias.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Collection.js +121 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Collection.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Node.js +34 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Node.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Pair.js +32 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Pair.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Scalar.js +27 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/Scalar.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/YAMLMap.js +109 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/YAMLMap.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +106 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/YAMLSeq.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +51 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/identity.js +50 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/identity.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/nodes/toJS.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/cst-scalar.js +3 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/cst-visit.js +91 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/cst-visit.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/cst.js +42 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/cst.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/lexer.js +531 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/lexer.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/line-counter.js +47 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/line-counter.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/parser.js +861 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/parse/parser.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/public-api.js +56 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/public-api.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/Schema.js +29 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/Schema.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/map.js +18 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/map.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/null.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/seq.js +18 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/seq.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/string.js +16 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/common/string.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/bool.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/float.js +42 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/float.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/int.js +41 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/int.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/schema.js +25 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/core/schema.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/json/schema.js +63 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/json/schema.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/tags.js +84 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/tags.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +54 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +27 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +45 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +75 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +43 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +63 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +60 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +41 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +68 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +83 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +116 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/foldFlowLines.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringify.js +108 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringify.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +118 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyCollection.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyComment.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +61 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyDocument.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +21 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyNumber.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyPair.js +97 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyPair.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyString.js +224 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/stringify/stringifyString.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/visit.js +190 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/dist/visit.js.map +1 -0
- package/out/renderer/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/browser/index.js +24 -0
- package/out/renderer/package.js +6 -0
- package/out/renderer/package.js.map +1 -0
- package/out/renderer/pod-bulk-customization.js +51 -0
- package/out/renderer/pod-bulk-customization.js.map +1 -0
- package/out/renderer/pod-details-enhancements.js +107 -0
- package/out/renderer/pod-details-enhancements.js.map +1 -0
- package/out/renderer/pod-removal-confirmation.js +172 -0
- package/out/renderer/pod-removal-confirmation.js.map +1 -0
- package/out/renderer/power-log-column-widths.js +54 -0
- package/out/renderer/power-log-column-widths.js.map +1 -0
- package/out/renderer/power-log-columns.js +114 -0
- package/out/renderer/power-log-columns.js.map +1 -0
- package/out/renderer/power-log-json-cell.js +88 -0
- package/out/renderer/power-log-json-cell.js.map +1 -0
- package/out/renderer/power-log-json-fields.js +144 -0
- package/out/renderer/power-log-json-fields.js.map +1 -0
- package/out/renderer/power-log-json.js +252 -20
- package/out/renderer/power-log-json.js.map +1 -1
- package/out/renderer/power-log-message-tokens.js +60 -0
- package/out/renderer/power-log-message-tokens.js.map +1 -0
- package/out/renderer/power-log-message.js +26 -0
- package/out/renderer/power-log-message.js.map +1 -0
- package/out/renderer/power-log-sql-editor.js +120 -0
- package/out/renderer/power-log-sql-editor.js.map +1 -0
- package/out/renderer/power-logs-client.js +9 -0
- package/out/renderer/power-logs-client.js.map +1 -1
- package/out/renderer/power-logs-context.js +45 -0
- package/out/renderer/power-logs-context.js.map +1 -0
- package/out/renderer/power-logs-entrypoints.js +13 -36
- package/out/renderer/power-logs-entrypoints.js.map +1 -1
- package/out/renderer/power-logs-resource-stores.js +71 -0
- package/out/renderer/power-logs-resource-stores.js.map +1 -0
- package/out/renderer/power-logs-session.js +35 -0
- package/out/renderer/power-logs-session.js.map +1 -0
- package/out/renderer/power-logs-sql-drafts.js +76 -0
- package/out/renderer/power-logs-sql-drafts.js.map +1 -0
- package/out/renderer/power-logs-sql-row.js +5 -13
- package/out/renderer/power-logs-sql-row.js.map +1 -1
- package/out/renderer/power-logs-storage.js +11 -0
- package/out/renderer/power-logs-storage.js.map +1 -0
- package/out/renderer/power-logs.css.js +112 -13
- package/out/renderer/power-logs.css.js.map +1 -1
- package/out/renderer/power-logs.js +1120 -362
- package/out/renderer/power-logs.js.map +1 -1
- package/out/renderer/preferences/ai-preferences.js +264 -55
- package/out/renderer/preferences/ai-preferences.js.map +1 -1
- package/out/renderer/preferences/dashboard-preferences.js +42 -35
- package/out/renderer/preferences/dashboard-preferences.js.map +1 -1
- package/out/renderer/preferences/helm-preferences.js +22 -0
- package/out/renderer/preferences/helm-preferences.js.map +1 -0
- package/out/renderer/preferences/logs-preferences.js +287 -52
- package/out/renderer/preferences/logs-preferences.js.map +1 -1
- package/out/renderer/preferences/monitoring-preferences.js +21 -20
- package/out/renderer/preferences/monitoring-preferences.js.map +1 -1
- package/out/renderer/preferences/node-shell-preferences.js +10 -0
- package/out/renderer/preferences/node-shell-preferences.js.map +1 -1
- package/out/renderer/preferences/other-preferences.js +55 -0
- package/out/renderer/preferences/other-preferences.js.map +1 -0
- package/out/renderer/preferences/power-preferences.js +27 -10
- package/out/renderer/preferences/power-preferences.js.map +1 -1
- package/out/renderer/preferences/preferences.js +44 -13
- package/out/renderer/preferences/preferences.js.map +1 -1
- package/out/renderer/preferences/section-navigation.js +44 -0
- package/out/renderer/preferences/section-navigation.js.map +1 -0
- package/out/renderer/preferences/settings-icon-action.js +12 -11
- package/out/renderer/preferences/settings-icon-action.js.map +1 -1
- package/out/renderer/preferences/settings-modal.js +1 -1
- package/out/renderer/preferences/settings-modal.js.map +1 -1
- package/out/renderer/relationship-map-finding.js +54 -0
- package/out/renderer/relationship-map-finding.js.map +1 -0
- package/out/renderer/resource-relationships.css.js +11 -1
- package/out/renderer/resource-relationships.css.js.map +1 -1
- package/out/renderer/resource-relationships.js +104 -50
- package/out/renderer/resource-relationships.js.map +1 -1
- package/out/renderer/resource-search-client.js.map +1 -1
- package/out/renderer/resource-search-fields.js +2 -2
- package/out/renderer/resource-search-fields.js.map +1 -1
- package/out/renderer/resource-search-model.js +2 -1
- package/out/renderer/resource-search-model.js.map +1 -1
- package/out/renderer/resource-search-sync.js +1 -1
- package/out/renderer/resource-search-sync.js.map +1 -1
- package/out/renderer/resource-search.js +164 -108
- package/out/renderer/resource-search.js.map +1 -1
- package/out/renderer/secret-dialog-customization.js +142 -0
- package/out/renderer/secret-dialog-customization.js.map +1 -0
- package/out/renderer/src/common/ai-attachments.js +160 -0
- package/out/renderer/src/common/ai-attachments.js.map +1 -0
- package/out/renderer/src/common/ai-models.js +58 -0
- package/out/renderer/src/common/ai-models.js.map +1 -1
- package/out/renderer/src/common/ai-prompts.js +32 -2
- package/out/renderer/src/common/ai-prompts.js.map +1 -1
- package/out/renderer/src/common/ai-resource-payload.js +262 -0
- package/out/renderer/src/common/ai-resource-payload.js.map +1 -0
- package/out/renderer/src/common/ai-terminal-context.js +39 -18
- package/out/renderer/src/common/ai-terminal-context.js.map +1 -1
- package/out/renderer/src/common/ai.js +6 -0
- package/out/renderer/src/common/ai.js.map +1 -1
- package/out/renderer/src/common/dashboard-ai.js +22 -0
- package/out/renderer/src/common/dashboard-ai.js.map +1 -0
- package/out/renderer/src/common/extension-updates.js +33 -0
- package/out/renderer/src/common/extension-updates.js.map +1 -0
- package/out/renderer/src/common/gateway-relationships.js +8 -7
- package/out/renderer/src/common/gateway-relationships.js.map +1 -1
- package/out/renderer/src/common/helm-diff.js +312 -0
- package/out/renderer/src/common/helm-diff.js.map +1 -0
- package/out/renderer/src/common/helm-values-validation.js +59 -0
- package/out/renderer/src/common/helm-values-validation.js.map +1 -0
- package/out/renderer/src/common/helm.js +10 -0
- package/out/renderer/src/common/helm.js.map +1 -0
- package/out/renderer/src/common/node-bulk.js +6 -0
- package/out/renderer/src/common/node-bulk.js.map +1 -0
- package/out/renderer/src/common/power-log-field-filters.js +92 -0
- package/out/renderer/src/common/power-log-field-filters.js.map +1 -0
- package/out/renderer/src/common/power-log-json-filter-sql.js +118 -0
- package/out/renderer/src/common/power-log-json-filter-sql.js.map +1 -0
- package/out/renderer/src/common/power-log-json-preset.js +34 -0
- package/out/renderer/src/common/power-log-json-preset.js.map +1 -0
- package/out/renderer/src/common/power-log-level.js +172 -0
- package/out/renderer/src/common/power-log-level.js.map +1 -0
- package/out/renderer/src/common/power-log-parser.js +7 -29
- package/out/renderer/src/common/power-log-parser.js.map +1 -1
- package/out/renderer/src/common/power-log-sql-level.js +25 -0
- package/out/renderer/src/common/power-log-sql-level.js.map +1 -0
- package/out/renderer/src/common/power-logs-ai.js +11 -7
- package/out/renderer/src/common/power-logs-ai.js.map +1 -1
- package/out/renderer/src/common/power-logs.js +6 -0
- package/out/renderer/src/common/power-logs.js.map +1 -1
- package/out/renderer/src/common/resource-relationships.js +10 -8
- package/out/renderer/src/common/resource-relationships.js.map +1 -1
- package/out/renderer/src/common/resource-search-kind-priority.js +28 -0
- package/out/renderer/src/common/resource-search-kind-priority.js.map +1 -0
- package/out/renderer/src/common/resource-search.js.map +1 -1
- package/out/{main/common/ai-terminal-context.js → renderer/src/common/search-index-redaction.js} +4 -29
- package/out/renderer/src/common/search-index-redaction.js.map +1 -0
- package/out/renderer/src/common/store/ai-preferences-store.js +48 -6
- package/out/renderer/src/common/store/ai-preferences-store.js.map +1 -1
- package/out/renderer/src/common/store/appearance-preferences-store.js +8 -3
- package/out/renderer/src/common/store/appearance-preferences-store.js.map +1 -1
- package/out/renderer/src/common/store/helm-preferences-store.js +26 -0
- package/out/renderer/src/common/store/helm-preferences-store.js.map +1 -0
- package/out/renderer/src/common/store/logs-preferences-store.js +5 -0
- package/out/renderer/src/common/store/logs-preferences-store.js.map +1 -1
- package/out/renderer/src/common/store/node-shell-preferences-store.js +10 -6
- package/out/renderer/src/common/store/node-shell-preferences-store.js.map +1 -1
- package/out/renderer/src/common/store/power-preferences-store.js +19 -3
- package/out/renderer/src/common/store/power-preferences-store.js.map +1 -1
- package/out/renderer/welcome.js +29 -2
- package/out/renderer/welcome.js.map +1 -1
- package/package.json +5 -2
- package/out/main/_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorate.js +0 -9
- package/out/main/_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorateMetadata.js +0 -6
- package/out/main/common/ai-extras.js.map +0 -1
- package/out/main/common/ai-models.js +0 -6
- package/out/main/common/ai-models.js.map +0 -1
- package/out/main/common/ai-prompts.js +0 -16
- package/out/main/common/ai-prompts.js.map +0 -1
- package/out/main/common/ai-shortcuts.js.map +0 -1
- package/out/main/common/ai-terminal-context.js.map +0 -1
- package/out/main/common/ai.js.map +0 -1
- package/out/main/common/cluster-icon-ipc.js.map +0 -1
- package/out/main/common/cluster-icons.js.map +0 -1
- package/out/main/common/dashboard-picker.js.map +0 -1
- package/out/main/common/dashboard-readiness.js.map +0 -1
- package/out/main/common/dashboard-selector.js.map +0 -1
- package/out/main/common/dashboard-views.js.map +0 -1
- package/out/main/common/dashboard.js.map +0 -1
- package/out/main/common/extension-info.js.map +0 -1
- package/out/main/common/monitoring-history.js.map +0 -1
- package/out/main/common/power-logs-limits.js.map +0 -1
- package/out/main/common/power-logs.js.map +0 -1
- package/out/main/common/resource-search.js.map +0 -1
- package/out/main/common/settings-export.js.map +0 -1
- package/out/main/common/store/ai-preferences-store.js.map +0 -1
- package/out/main/common/store/ai-shortcuts-store.js.map +0 -1
- package/out/main/common/store/appearance-preferences-store.js.map +0 -1
- package/out/main/common/store/cluster-icons-store.js.map +0 -1
- package/out/main/common/store/dashboard-preferences-store.js.map +0 -1
- package/out/main/common/store/logs-preferences-store.js.map +0 -1
- package/out/main/common/store/monitoring-preferences-store.js.map +0 -1
- package/out/main/common/store/node-shell-preferences-store.js +0 -40
- package/out/main/common/store/node-shell-preferences-store.js.map +0 -1
- package/out/main/common/store/power-preferences-store.js +0 -23
- package/out/main/common/store/power-preferences-store.js.map +0 -1
- package/out/main/common/store/read-only-preferences-store.js.map +0 -1
- package/out/renderer/_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorate.js +0 -9
- package/out/renderer/_virtual/_@oxc-project_runtime@0.137.0/helpers/esm/decorateMetadata.js +0 -6
- /package/out/main/{common → src/common}/ai-extras.js +0 -0
- /package/out/main/{common → src/common}/ai-shortcuts.js +0 -0
- /package/out/main/{common → src/common}/cluster-icon-ipc.js +0 -0
- /package/out/main/{common → src/common}/cluster-icons.js +0 -0
- /package/out/main/{common → src/common}/dashboard-picker.js +0 -0
- /package/out/main/{common → src/common}/dashboard-readiness.js +0 -0
- /package/out/main/{common → src/common}/dashboard-selector.js +0 -0
- /package/out/main/{common → src/common}/dashboard-views.js +0 -0
- /package/out/main/{common → src/common}/dashboard.js +0 -0
- /package/out/main/{common → src/common}/extension-info.js +0 -0
- /package/out/main/{common → src/common}/monitoring-history.js +0 -0
- /package/out/main/{common → src/common}/power-logs-limits.js +0 -0
- /package/out/main/{common → src/common}/resource-search.js +0 -0
- /package/out/main/{common → src/common}/settings-export.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.js","names":[],"sources":["../../../../../../../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/stream.js"],"sourcesContent":["/* eslint no-unused-vars: [\"error\", { \"varsIgnorePattern\": \"^WebSocket$\" }] */\n'use strict';\n\nconst WebSocket = require('./websocket');\nconst { Duplex } = require('stream');\n\n/**\n * Emits the `'close'` event on a stream.\n *\n * @param {Duplex} stream The stream.\n * @private\n */\nfunction emitClose(stream) {\n stream.emit('close');\n}\n\n/**\n * The listener of the `'end'` event.\n *\n * @private\n */\nfunction duplexOnEnd() {\n if (!this.destroyed && this._writableState.finished) {\n this.destroy();\n }\n}\n\n/**\n * The listener of the `'error'` event.\n *\n * @param {Error} err The error\n * @private\n */\nfunction duplexOnError(err) {\n this.removeListener('error', duplexOnError);\n this.destroy();\n if (this.listenerCount('error') === 0) {\n // Do not suppress the throwing behavior.\n this.emit('error', err);\n }\n}\n\n/**\n * Wraps a `WebSocket` in a duplex stream.\n *\n * @param {WebSocket} ws The `WebSocket` to wrap\n * @param {Object} [options] The options for the `Duplex` constructor\n * @return {Duplex} The duplex stream\n * @public\n */\nfunction createWebSocketStream(ws, options) {\n let terminateOnDestroy = true;\n\n const duplex = new Duplex({\n ...options,\n autoDestroy: false,\n emitClose: false,\n objectMode: false,\n writableObjectMode: false\n });\n\n ws.on('message', function message(msg, isBinary) {\n const data =\n !isBinary && duplex._readableState.objectMode ? msg.toString() : msg;\n\n if (!duplex.push(data)) ws.pause();\n });\n\n ws.once('error', function error(err) {\n if (duplex.destroyed) return;\n\n // Prevent `ws.terminate()` from being called by `duplex._destroy()`.\n //\n // - If the `'error'` event is emitted before the `'open'` event, then\n // `ws.terminate()` is a noop as no socket is assigned.\n // - Otherwise, the error is re-emitted by the listener of the `'error'`\n // event of the `Receiver` object. The listener already closes the\n // connection by calling `ws.close()`. This allows a close frame to be\n // sent to the other peer. If `ws.terminate()` is called right after this,\n // then the close frame might not be sent.\n terminateOnDestroy = false;\n duplex.destroy(err);\n });\n\n ws.once('close', function close() {\n if (duplex.destroyed) return;\n\n duplex.push(null);\n });\n\n duplex._destroy = function (err, callback) {\n if (ws.readyState === ws.CLOSED) {\n callback(err);\n process.nextTick(emitClose, duplex);\n return;\n }\n\n let called = false;\n\n ws.once('error', function error(err) {\n called = true;\n callback(err);\n });\n\n ws.once('close', function close() {\n if (!called) callback(err);\n process.nextTick(emitClose, duplex);\n });\n\n if (terminateOnDestroy) ws.terminate();\n };\n\n duplex._final = function (callback) {\n if (ws.readyState === ws.CONNECTING) {\n ws.once('open', function open() {\n duplex._final(callback);\n });\n return;\n }\n\n // If the value of the `_socket` property is `null` it means that `ws` is a\n // client websocket and the handshake failed. In fact, when this happens, a\n // socket is never assigned to the websocket. Wait for the `'error'` event\n // that will be emitted by the websocket.\n if (ws._socket === null) return;\n\n if (ws._socket._writableState.finished) {\n callback();\n if (duplex._readableState.endEmitted) duplex.destroy();\n } else {\n ws._socket.once('finish', function finish() {\n // `duplex` is not destroyed here because the `'end'` event will be\n // emitted on `duplex` after this `'finish'` event. The EOF signaling\n // `null` chunk is, in fact, pushed when the websocket emits `'close'`.\n callback();\n });\n ws.close();\n }\n };\n\n duplex._read = function () {\n if (ws.isPaused) ws.resume();\n };\n\n duplex._write = function (chunk, encoding, callback) {\n if (ws.readyState === ws.CONNECTING) {\n ws.once('open', function open() {\n duplex._write(chunk, encoding, callback);\n });\n return;\n }\n\n ws.send(chunk, callback);\n };\n\n duplex.on('end', duplexOnEnd);\n duplex.on('error', duplexOnError);\n return duplex;\n}\n\nmodule.exports = createWebSocketStream;\n"],"x_google_ignoreList":[0],"mappings":";;;;;CAGkB,oBAAA;CAClB,IAAM,EAAE,WAAW,QAAQ,QAAQ;;;;;;;CAQnC,SAAS,UAAU,QAAQ;EACzB,OAAO,KAAK,OAAO;CACrB;;;;;;CAOA,SAAS,cAAc;EACrB,IAAI,CAAC,KAAK,aAAa,KAAK,eAAe,UACzC,KAAK,QAAQ;CAEjB;;;;;;;CAQA,SAAS,cAAc,KAAK;EAC1B,KAAK,eAAe,SAAS,aAAa;EAC1C,KAAK,QAAQ;EACb,IAAI,KAAK,cAAc,OAAO,MAAM,GAElC,KAAK,KAAK,SAAS,GAAG;CAE1B;;;;;;;;;CAUA,SAAS,sBAAsB,IAAI,SAAS;EAC1C,IAAI,qBAAqB;EAEzB,MAAM,SAAS,IAAI,OAAO;GACxB,GAAG;GACH,aAAa;GACb,WAAW;GACX,YAAY;GACZ,oBAAoB;EACtB,CAAC;EAED,GAAG,GAAG,WAAW,SAAS,QAAQ,KAAK,UAAU;GAC/C,MAAM,OACJ,CAAC,YAAY,OAAO,eAAe,aAAa,IAAI,SAAS,IAAI;GAEnE,IAAI,CAAC,OAAO,KAAK,IAAI,GAAG,GAAG,MAAM;EACnC,CAAC;EAED,GAAG,KAAK,SAAS,SAAS,MAAM,KAAK;GACnC,IAAI,OAAO,WAAW;GAWtB,qBAAqB;GACrB,OAAO,QAAQ,GAAG;EACpB,CAAC;EAED,GAAG,KAAK,SAAS,SAAS,QAAQ;GAChC,IAAI,OAAO,WAAW;GAEtB,OAAO,KAAK,IAAI;EAClB,CAAC;EAED,OAAO,WAAW,SAAU,KAAK,UAAU;GACzC,IAAI,GAAG,eAAe,GAAG,QAAQ;IAC/B,SAAS,GAAG;IACZ,QAAQ,SAAS,WAAW,MAAM;IAClC;GACF;GAEA,IAAI,SAAS;GAEb,GAAG,KAAK,SAAS,SAAS,MAAM,KAAK;IACnC,SAAS;IACT,SAAS,GAAG;GACd,CAAC;GAED,GAAG,KAAK,SAAS,SAAS,QAAQ;IAChC,IAAI,CAAC,QAAQ,SAAS,GAAG;IACzB,QAAQ,SAAS,WAAW,MAAM;GACpC,CAAC;GAED,IAAI,oBAAoB,GAAG,UAAU;EACvC;EAEA,OAAO,SAAS,SAAU,UAAU;GAClC,IAAI,GAAG,eAAe,GAAG,YAAY;IACnC,GAAG,KAAK,QAAQ,SAAS,OAAO;KAC9B,OAAO,OAAO,QAAQ;IACxB,CAAC;IACD;GACF;GAMA,IAAI,GAAG,YAAY,MAAM;GAEzB,IAAI,GAAG,QAAQ,eAAe,UAAU;IACtC,SAAS;IACT,IAAI,OAAO,eAAe,YAAY,OAAO,QAAQ;GACvD,OAAO;IACL,GAAG,QAAQ,KAAK,UAAU,SAAS,SAAS;KAI1C,SAAS;IACX,CAAC;IACD,GAAG,MAAM;GACX;EACF;EAEA,OAAO,QAAQ,WAAY;GACzB,IAAI,GAAG,UAAU,GAAG,OAAO;EAC7B;EAEA,OAAO,SAAS,SAAU,OAAO,UAAU,UAAU;GACnD,IAAI,GAAG,eAAe,GAAG,YAAY;IACnC,GAAG,KAAK,QAAQ,SAAS,OAAO;KAC9B,OAAO,OAAO,OAAO,UAAU,QAAQ;IACzC,CAAC;IACD;GACF;GAEA,GAAG,KAAK,OAAO,QAAQ;EACzB;EAEA,OAAO,GAAG,OAAO,WAAW;EAC5B,OAAO,GAAG,SAAS,aAAa;EAChC,OAAO;CACT;CAEA,OAAO,UAAU"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_validation$1 = require("./validation.js");
|
|
4
|
+
//#region node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js
|
|
5
|
+
var require_subprotocol = /* @__PURE__ */ require_runtime.__commonJSMin(((exports, module) => {
|
|
6
|
+
var { tokenChars } = require_validation$1.default;
|
|
7
|
+
/**
|
|
8
|
+
* Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names.
|
|
9
|
+
*
|
|
10
|
+
* @param {String} header The field value of the header
|
|
11
|
+
* @return {Set} The subprotocol names
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
function parse(header) {
|
|
15
|
+
const protocols = /* @__PURE__ */ new Set();
|
|
16
|
+
let start = -1;
|
|
17
|
+
let end = -1;
|
|
18
|
+
let i = 0;
|
|
19
|
+
for (; i < header.length; i++) {
|
|
20
|
+
const code = header.charCodeAt(i);
|
|
21
|
+
if (end === -1 && tokenChars[code] === 1) {
|
|
22
|
+
if (start === -1) start = i;
|
|
23
|
+
} else if (i !== 0 && (code === 32 || code === 9)) {
|
|
24
|
+
if (end === -1 && start !== -1) end = i;
|
|
25
|
+
} else if (code === 44) {
|
|
26
|
+
if (start === -1) throw new SyntaxError(`Unexpected character at index ${i}`);
|
|
27
|
+
if (end === -1) end = i;
|
|
28
|
+
const protocol = header.slice(start, end);
|
|
29
|
+
if (protocols.has(protocol)) throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
|
|
30
|
+
protocols.add(protocol);
|
|
31
|
+
start = end = -1;
|
|
32
|
+
} else throw new SyntaxError(`Unexpected character at index ${i}`);
|
|
33
|
+
}
|
|
34
|
+
if (start === -1 || end !== -1) throw new SyntaxError("Unexpected end of input");
|
|
35
|
+
const protocol = header.slice(start, i);
|
|
36
|
+
if (protocols.has(protocol)) throw new SyntaxError(`The "${protocol}" subprotocol is duplicated`);
|
|
37
|
+
protocols.add(protocol);
|
|
38
|
+
return protocols;
|
|
39
|
+
}
|
|
40
|
+
module.exports = { parse };
|
|
41
|
+
}));
|
|
42
|
+
//#endregion
|
|
43
|
+
Object.defineProperty(exports, "default", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function() {
|
|
46
|
+
return require_subprotocol();
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=subprotocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subprotocol.js","names":[],"sources":["../../../../../../../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/subprotocol.js"],"sourcesContent":["'use strict';\n\nconst { tokenChars } = require('./validation');\n\n/**\n * Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names.\n *\n * @param {String} header The field value of the header\n * @return {Set} The subprotocol names\n * @public\n */\nfunction parse(header) {\n const protocols = new Set();\n let start = -1;\n let end = -1;\n let i = 0;\n\n for (i; i < header.length; i++) {\n const code = header.charCodeAt(i);\n\n if (end === -1 && tokenChars[code] === 1) {\n if (start === -1) start = i;\n } else if (\n i !== 0 &&\n (code === 0x20 /* ' ' */ || code === 0x09) /* '\\t' */\n ) {\n if (end === -1 && start !== -1) end = i;\n } else if (code === 0x2c /* ',' */) {\n if (start === -1) {\n throw new SyntaxError(`Unexpected character at index ${i}`);\n }\n\n if (end === -1) end = i;\n\n const protocol = header.slice(start, end);\n\n if (protocols.has(protocol)) {\n throw new SyntaxError(`The \"${protocol}\" subprotocol is duplicated`);\n }\n\n protocols.add(protocol);\n start = end = -1;\n } else {\n throw new SyntaxError(`Unexpected character at index ${i}`);\n }\n }\n\n if (start === -1 || end !== -1) {\n throw new SyntaxError('Unexpected end of input');\n }\n\n const protocol = header.slice(start, i);\n\n if (protocols.has(protocol)) {\n throw new SyntaxError(`The \"${protocol}\" subprotocol is duplicated`);\n }\n\n protocols.add(protocol);\n return protocols;\n}\n\nmodule.exports = { parse };\n"],"x_google_ignoreList":[0],"mappings":";;;;;CAEA,IAAM,EAAE,eAAA,qBAAA;;;;;;;;CASR,SAAS,MAAM,QAAQ;EACrB,MAAM,4BAAY,IAAI,IAAI;EAC1B,IAAI,QAAQ;EACZ,IAAI,MAAM;EACV,IAAI,IAAI;EAER,OAAQ,IAAI,OAAO,QAAQ,KAAK;GAC9B,MAAM,OAAO,OAAO,WAAW,CAAC;GAEhC,IAAI,QAAQ,MAAM,WAAW,UAAU;QACjC,UAAU,IAAI,QAAQ;GAAA,OACrB,IACL,MAAM,MACL,SAAS,MAAkB,SAAS;QAEjC,QAAQ,MAAM,UAAU,IAAI,MAAM;GAAA,OACjC,IAAI,SAAS,IAAgB;IAClC,IAAI,UAAU,IACZ,MAAM,IAAI,YAAY,iCAAiC,GAAG;IAG5D,IAAI,QAAQ,IAAI,MAAM;IAEtB,MAAM,WAAW,OAAO,MAAM,OAAO,GAAG;IAExC,IAAI,UAAU,IAAI,QAAQ,GACxB,MAAM,IAAI,YAAY,QAAQ,SAAS,4BAA4B;IAGrE,UAAU,IAAI,QAAQ;IACtB,QAAQ,MAAM;GAChB,OACE,MAAM,IAAI,YAAY,iCAAiC,GAAG;EAE9D;EAEA,IAAI,UAAU,MAAM,QAAQ,IAC1B,MAAM,IAAI,YAAY,yBAAyB;EAGjD,MAAM,WAAW,OAAO,MAAM,OAAO,CAAC;EAEtC,IAAI,UAAU,IAAI,QAAQ,GACxB,MAAM,IAAI,YAAY,QAAQ,SAAS,4BAA4B;EAGrE,UAAU,IAAI,QAAQ;EACtB,OAAO;CACT;CAEA,OAAO,UAAU,EAAE,MAAM"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_constants$1 = require("./constants.js");
|
|
4
|
+
//#region node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js
|
|
5
|
+
var require_validation = /* @__PURE__ */ require_runtime.__commonJSMin(((exports, module) => {
|
|
6
|
+
var { isUtf8 } = require("buffer");
|
|
7
|
+
var { hasBlob } = require_constants$1.default;
|
|
8
|
+
var tokenChars = [
|
|
9
|
+
0,
|
|
10
|
+
0,
|
|
11
|
+
0,
|
|
12
|
+
0,
|
|
13
|
+
0,
|
|
14
|
+
0,
|
|
15
|
+
0,
|
|
16
|
+
0,
|
|
17
|
+
0,
|
|
18
|
+
0,
|
|
19
|
+
0,
|
|
20
|
+
0,
|
|
21
|
+
0,
|
|
22
|
+
0,
|
|
23
|
+
0,
|
|
24
|
+
0,
|
|
25
|
+
0,
|
|
26
|
+
0,
|
|
27
|
+
0,
|
|
28
|
+
0,
|
|
29
|
+
0,
|
|
30
|
+
0,
|
|
31
|
+
0,
|
|
32
|
+
0,
|
|
33
|
+
0,
|
|
34
|
+
0,
|
|
35
|
+
0,
|
|
36
|
+
0,
|
|
37
|
+
0,
|
|
38
|
+
0,
|
|
39
|
+
0,
|
|
40
|
+
0,
|
|
41
|
+
0,
|
|
42
|
+
1,
|
|
43
|
+
0,
|
|
44
|
+
1,
|
|
45
|
+
1,
|
|
46
|
+
1,
|
|
47
|
+
1,
|
|
48
|
+
1,
|
|
49
|
+
0,
|
|
50
|
+
0,
|
|
51
|
+
1,
|
|
52
|
+
1,
|
|
53
|
+
0,
|
|
54
|
+
1,
|
|
55
|
+
1,
|
|
56
|
+
0,
|
|
57
|
+
1,
|
|
58
|
+
1,
|
|
59
|
+
1,
|
|
60
|
+
1,
|
|
61
|
+
1,
|
|
62
|
+
1,
|
|
63
|
+
1,
|
|
64
|
+
1,
|
|
65
|
+
1,
|
|
66
|
+
1,
|
|
67
|
+
0,
|
|
68
|
+
0,
|
|
69
|
+
0,
|
|
70
|
+
0,
|
|
71
|
+
0,
|
|
72
|
+
0,
|
|
73
|
+
0,
|
|
74
|
+
1,
|
|
75
|
+
1,
|
|
76
|
+
1,
|
|
77
|
+
1,
|
|
78
|
+
1,
|
|
79
|
+
1,
|
|
80
|
+
1,
|
|
81
|
+
1,
|
|
82
|
+
1,
|
|
83
|
+
1,
|
|
84
|
+
1,
|
|
85
|
+
1,
|
|
86
|
+
1,
|
|
87
|
+
1,
|
|
88
|
+
1,
|
|
89
|
+
1,
|
|
90
|
+
1,
|
|
91
|
+
1,
|
|
92
|
+
1,
|
|
93
|
+
1,
|
|
94
|
+
1,
|
|
95
|
+
1,
|
|
96
|
+
1,
|
|
97
|
+
1,
|
|
98
|
+
1,
|
|
99
|
+
1,
|
|
100
|
+
0,
|
|
101
|
+
0,
|
|
102
|
+
0,
|
|
103
|
+
1,
|
|
104
|
+
1,
|
|
105
|
+
1,
|
|
106
|
+
1,
|
|
107
|
+
1,
|
|
108
|
+
1,
|
|
109
|
+
1,
|
|
110
|
+
1,
|
|
111
|
+
1,
|
|
112
|
+
1,
|
|
113
|
+
1,
|
|
114
|
+
1,
|
|
115
|
+
1,
|
|
116
|
+
1,
|
|
117
|
+
1,
|
|
118
|
+
1,
|
|
119
|
+
1,
|
|
120
|
+
1,
|
|
121
|
+
1,
|
|
122
|
+
1,
|
|
123
|
+
1,
|
|
124
|
+
1,
|
|
125
|
+
1,
|
|
126
|
+
1,
|
|
127
|
+
1,
|
|
128
|
+
1,
|
|
129
|
+
1,
|
|
130
|
+
1,
|
|
131
|
+
1,
|
|
132
|
+
0,
|
|
133
|
+
1,
|
|
134
|
+
0,
|
|
135
|
+
1,
|
|
136
|
+
0
|
|
137
|
+
];
|
|
138
|
+
/**
|
|
139
|
+
* Checks if a status code is allowed in a close frame.
|
|
140
|
+
*
|
|
141
|
+
* @param {Number} code The status code
|
|
142
|
+
* @return {Boolean} `true` if the status code is valid, else `false`
|
|
143
|
+
* @public
|
|
144
|
+
*/
|
|
145
|
+
function isValidStatusCode(code) {
|
|
146
|
+
return code >= 1e3 && code <= 1014 && code !== 1004 && code !== 1005 && code !== 1006 || code >= 3e3 && code <= 4999;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Checks if a given buffer contains only correct UTF-8.
|
|
150
|
+
* Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by
|
|
151
|
+
* Markus Kuhn.
|
|
152
|
+
*
|
|
153
|
+
* @param {Buffer} buf The buffer to check
|
|
154
|
+
* @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false`
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
function _isValidUTF8(buf) {
|
|
158
|
+
const len = buf.length;
|
|
159
|
+
let i = 0;
|
|
160
|
+
while (i < len) if ((buf[i] & 128) === 0) i++;
|
|
161
|
+
else if ((buf[i] & 224) === 192) {
|
|
162
|
+
if (i + 1 === len || (buf[i + 1] & 192) !== 128 || (buf[i] & 254) === 192) return false;
|
|
163
|
+
i += 2;
|
|
164
|
+
} else if ((buf[i] & 240) === 224) {
|
|
165
|
+
if (i + 2 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || buf[i] === 224 && (buf[i + 1] & 224) === 128 || buf[i] === 237 && (buf[i + 1] & 224) === 160) return false;
|
|
166
|
+
i += 3;
|
|
167
|
+
} else if ((buf[i] & 248) === 240) {
|
|
168
|
+
if (i + 3 >= len || (buf[i + 1] & 192) !== 128 || (buf[i + 2] & 192) !== 128 || (buf[i + 3] & 192) !== 128 || buf[i] === 240 && (buf[i + 1] & 240) === 128 || buf[i] === 244 && buf[i + 1] > 143 || buf[i] > 244) return false;
|
|
169
|
+
i += 4;
|
|
170
|
+
} else return false;
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Determines whether a value is a `Blob`.
|
|
175
|
+
*
|
|
176
|
+
* @param {*} value The value to be tested
|
|
177
|
+
* @return {Boolean} `true` if `value` is a `Blob`, else `false`
|
|
178
|
+
* @private
|
|
179
|
+
*/
|
|
180
|
+
function isBlob(value) {
|
|
181
|
+
return hasBlob && typeof value === "object" && typeof value.arrayBuffer === "function" && typeof value.type === "string" && typeof value.stream === "function" && (value[Symbol.toStringTag] === "Blob" || value[Symbol.toStringTag] === "File");
|
|
182
|
+
}
|
|
183
|
+
module.exports = {
|
|
184
|
+
isBlob,
|
|
185
|
+
isValidStatusCode,
|
|
186
|
+
isValidUTF8: _isValidUTF8,
|
|
187
|
+
tokenChars
|
|
188
|
+
};
|
|
189
|
+
if (isUtf8) module.exports.isValidUTF8 = function(buf) {
|
|
190
|
+
return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
|
|
191
|
+
};
|
|
192
|
+
}));
|
|
193
|
+
//#endregion
|
|
194
|
+
Object.defineProperty(exports, "default", {
|
|
195
|
+
enumerable: true,
|
|
196
|
+
get: function() {
|
|
197
|
+
return require_validation();
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","names":[],"sources":["../../../../../../../../node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/validation.js"],"sourcesContent":["'use strict';\n\nconst { isUtf8 } = require('buffer');\n\nconst { hasBlob } = require('./constants');\n\n//\n// Allowed token characters:\n//\n// '!', '#', '$', '%', '&', ''', '*', '+', '-',\n// '.', 0-9, A-Z, '^', '_', '`', a-z, '|', '~'\n//\n// tokenChars[32] === 0 // ' '\n// tokenChars[33] === 1 // '!'\n// tokenChars[34] === 0 // '\"'\n// ...\n//\n// prettier-ignore\nconst tokenChars = [\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0 - 15\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 16 - 31\n 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, // 32 - 47\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, // 48 - 63\n 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 64 - 79\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, // 80 - 95\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 96 - 111\n 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 // 112 - 127\n];\n\n/**\n * Checks if a status code is allowed in a close frame.\n *\n * @param {Number} code The status code\n * @return {Boolean} `true` if the status code is valid, else `false`\n * @public\n */\nfunction isValidStatusCode(code) {\n return (\n (code >= 1000 &&\n code <= 1014 &&\n code !== 1004 &&\n code !== 1005 &&\n code !== 1006) ||\n (code >= 3000 && code <= 4999)\n );\n}\n\n/**\n * Checks if a given buffer contains only correct UTF-8.\n * Ported from https://www.cl.cam.ac.uk/%7Emgk25/ucs/utf8_check.c by\n * Markus Kuhn.\n *\n * @param {Buffer} buf The buffer to check\n * @return {Boolean} `true` if `buf` contains only correct UTF-8, else `false`\n * @public\n */\nfunction _isValidUTF8(buf) {\n const len = buf.length;\n let i = 0;\n\n while (i < len) {\n if ((buf[i] & 0x80) === 0) {\n // 0xxxxxxx\n i++;\n } else if ((buf[i] & 0xe0) === 0xc0) {\n // 110xxxxx 10xxxxxx\n if (\n i + 1 === len ||\n (buf[i + 1] & 0xc0) !== 0x80 ||\n (buf[i] & 0xfe) === 0xc0 // Overlong\n ) {\n return false;\n }\n\n i += 2;\n } else if ((buf[i] & 0xf0) === 0xe0) {\n // 1110xxxx 10xxxxxx 10xxxxxx\n if (\n i + 2 >= len ||\n (buf[i + 1] & 0xc0) !== 0x80 ||\n (buf[i + 2] & 0xc0) !== 0x80 ||\n (buf[i] === 0xe0 && (buf[i + 1] & 0xe0) === 0x80) || // Overlong\n (buf[i] === 0xed && (buf[i + 1] & 0xe0) === 0xa0) // Surrogate (U+D800 - U+DFFF)\n ) {\n return false;\n }\n\n i += 3;\n } else if ((buf[i] & 0xf8) === 0xf0) {\n // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx\n if (\n i + 3 >= len ||\n (buf[i + 1] & 0xc0) !== 0x80 ||\n (buf[i + 2] & 0xc0) !== 0x80 ||\n (buf[i + 3] & 0xc0) !== 0x80 ||\n (buf[i] === 0xf0 && (buf[i + 1] & 0xf0) === 0x80) || // Overlong\n (buf[i] === 0xf4 && buf[i + 1] > 0x8f) ||\n buf[i] > 0xf4 // > U+10FFFF\n ) {\n return false;\n }\n\n i += 4;\n } else {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Determines whether a value is a `Blob`.\n *\n * @param {*} value The value to be tested\n * @return {Boolean} `true` if `value` is a `Blob`, else `false`\n * @private\n */\nfunction isBlob(value) {\n return (\n hasBlob &&\n typeof value === 'object' &&\n typeof value.arrayBuffer === 'function' &&\n typeof value.type === 'string' &&\n typeof value.stream === 'function' &&\n (value[Symbol.toStringTag] === 'Blob' ||\n value[Symbol.toStringTag] === 'File')\n );\n}\n\nmodule.exports = {\n isBlob,\n isValidStatusCode,\n isValidUTF8: _isValidUTF8,\n tokenChars\n};\n\nif (isUtf8) {\n module.exports.isValidUTF8 = function (buf) {\n return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);\n };\n} /* istanbul ignore else */ else if (!process.env.WS_NO_UTF_8_VALIDATE) {\n try {\n const isValidUTF8 = require('utf-8-validate');\n\n module.exports.isValidUTF8 = function (buf) {\n return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8(buf);\n };\n } catch (e) {\n // Continue regardless of the error.\n }\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;CAEA,IAAM,EAAE,WAAW,QAAQ,QAAQ;CAEnC,IAAM,EAAE,YAAA,oBAAA;CAcR,IAAM,aAAa;EACjB;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAC7C;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAC7C;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAC7C;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAC7C;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAC7C;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAC7C;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAC7C;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;EAAG;CAC/C;;;;;;;;CASA,SAAS,kBAAkB,MAAM;EAC/B,OACG,QAAQ,OACP,QAAQ,QACR,SAAS,QACT,SAAS,QACT,SAAS,QACV,QAAQ,OAAQ,QAAQ;CAE7B;;;;;;;;;;CAWA,SAAS,aAAa,KAAK;EACzB,MAAM,MAAM,IAAI;EAChB,IAAI,IAAI;EAER,OAAO,IAAI,KACT,KAAK,IAAI,KAAK,SAAU,GAEtB;OACK,KAAK,IAAI,KAAK,SAAU,KAAM;GAEnC,IACE,IAAI,MAAM,QACT,IAAI,IAAI,KAAK,SAAU,QACvB,IAAI,KAAK,SAAU,KAEpB,OAAO;GAGT,KAAK;EACP,OAAO,KAAK,IAAI,KAAK,SAAU,KAAM;GAEnC,IACE,IAAI,KAAK,QACR,IAAI,IAAI,KAAK,SAAU,QACvB,IAAI,IAAI,KAAK,SAAU,OACvB,IAAI,OAAO,QAAS,IAAI,IAAI,KAAK,SAAU,OAC3C,IAAI,OAAO,QAAS,IAAI,IAAI,KAAK,SAAU,KAE5C,OAAO;GAGT,KAAK;EACP,OAAO,KAAK,IAAI,KAAK,SAAU,KAAM;GAEnC,IACE,IAAI,KAAK,QACR,IAAI,IAAI,KAAK,SAAU,QACvB,IAAI,IAAI,KAAK,SAAU,QACvB,IAAI,IAAI,KAAK,SAAU,OACvB,IAAI,OAAO,QAAS,IAAI,IAAI,KAAK,SAAU,OAC3C,IAAI,OAAO,OAAQ,IAAI,IAAI,KAAK,OACjC,IAAI,KAAK,KAET,OAAO;GAGT,KAAK;EACP,OACE,OAAO;EAIX,OAAO;CACT;;;;;;;;CASA,SAAS,OAAO,OAAO;EACrB,OACE,WACA,OAAO,UAAU,YACjB,OAAO,MAAM,gBAAgB,cAC7B,OAAO,MAAM,SAAS,YACtB,OAAO,MAAM,WAAW,eACvB,MAAM,OAAO,iBAAiB,UAC7B,MAAM,OAAO,iBAAiB;CAEpC;CAEA,OAAO,UAAU;EACf;EACA;EACA,aAAa;EACb;CACF;CAEA,IAAI,QACF,OAAO,QAAQ,cAAc,SAAU,KAAK;EAC1C,OAAO,IAAI,SAAS,KAAK,aAAa,GAAG,IAAI,OAAO,GAAG;CACzD"}
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.js");
|
|
3
|
+
const require_constants$1 = require("./constants.js");
|
|
4
|
+
const require_permessage_deflate$1 = require("./permessage-deflate.js");
|
|
5
|
+
const require_extension$1 = require("./extension.js");
|
|
6
|
+
const require_websocket$1 = require("./websocket.js");
|
|
7
|
+
const require_subprotocol$1 = require("./subprotocol.js");
|
|
8
|
+
//#region node_modules/.pnpm/ws@8.21.0/node_modules/ws/lib/websocket-server.js
|
|
9
|
+
var require_websocket_server = /* @__PURE__ */ require_runtime.__commonJSMin(((exports, module) => {
|
|
10
|
+
var EventEmitter = require("events");
|
|
11
|
+
var http = require("http");
|
|
12
|
+
var { Duplex } = require("stream");
|
|
13
|
+
var { createHash } = require("crypto");
|
|
14
|
+
var extension = require_extension$1.default;
|
|
15
|
+
var PerMessageDeflate = require_permessage_deflate$1.default;
|
|
16
|
+
var subprotocol = require_subprotocol$1.default;
|
|
17
|
+
var WebSocket = require_websocket$1.default;
|
|
18
|
+
var { CLOSE_TIMEOUT, GUID, kWebSocket } = require_constants$1.default;
|
|
19
|
+
var keyRegex = /^[+/0-9A-Za-z]{22}==$/;
|
|
20
|
+
var RUNNING = 0;
|
|
21
|
+
var CLOSING = 1;
|
|
22
|
+
var CLOSED = 2;
|
|
23
|
+
/**
|
|
24
|
+
* Class representing a WebSocket server.
|
|
25
|
+
*
|
|
26
|
+
* @extends EventEmitter
|
|
27
|
+
*/
|
|
28
|
+
var WebSocketServer = class extends EventEmitter {
|
|
29
|
+
/**
|
|
30
|
+
* Create a `WebSocketServer` instance.
|
|
31
|
+
*
|
|
32
|
+
* @param {Object} options Configuration options
|
|
33
|
+
* @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
|
|
34
|
+
* any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
|
|
35
|
+
* multiple times in the same tick
|
|
36
|
+
* @param {Boolean} [options.autoPong=true] Specifies whether or not to
|
|
37
|
+
* automatically send a pong in response to a ping
|
|
38
|
+
* @param {Number} [options.backlog=511] The maximum length of the queue of
|
|
39
|
+
* pending connections
|
|
40
|
+
* @param {Boolean} [options.clientTracking=true] Specifies whether or not to
|
|
41
|
+
* track clients
|
|
42
|
+
* @param {Number} [options.closeTimeout=30000] Duration in milliseconds to
|
|
43
|
+
* wait for the closing handshake to finish after `websocket.close()` is
|
|
44
|
+
* called
|
|
45
|
+
* @param {Function} [options.handleProtocols] A hook to handle protocols
|
|
46
|
+
* @param {String} [options.host] The hostname where to bind the server
|
|
47
|
+
* @param {Number} [options.maxBufferedChunks=1048576] The maximum number of
|
|
48
|
+
* buffered data chunks
|
|
49
|
+
* @param {Number} [options.maxFragments=131072] The maximum number of message
|
|
50
|
+
* fragments
|
|
51
|
+
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
52
|
+
* size
|
|
53
|
+
* @param {Boolean} [options.noServer=false] Enable no server mode
|
|
54
|
+
* @param {String} [options.path] Accept only connections matching this path
|
|
55
|
+
* @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable
|
|
56
|
+
* permessage-deflate
|
|
57
|
+
* @param {Number} [options.port] The port where to bind the server
|
|
58
|
+
* @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S
|
|
59
|
+
* server to use
|
|
60
|
+
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
|
|
61
|
+
* not to skip UTF-8 validation for text and close messages
|
|
62
|
+
* @param {Function} [options.verifyClient] A hook to reject connections
|
|
63
|
+
* @param {Function} [options.WebSocket=WebSocket] Specifies the `WebSocket`
|
|
64
|
+
* class to use. It must be the `WebSocket` class or class that extends it
|
|
65
|
+
* @param {Function} [callback] A listener for the `listening` event
|
|
66
|
+
*/
|
|
67
|
+
constructor(options, callback) {
|
|
68
|
+
super();
|
|
69
|
+
options = {
|
|
70
|
+
allowSynchronousEvents: true,
|
|
71
|
+
autoPong: true,
|
|
72
|
+
maxBufferedChunks: 1024 * 1024,
|
|
73
|
+
maxFragments: 128 * 1024,
|
|
74
|
+
maxPayload: 100 * 1024 * 1024,
|
|
75
|
+
skipUTF8Validation: false,
|
|
76
|
+
perMessageDeflate: false,
|
|
77
|
+
handleProtocols: null,
|
|
78
|
+
clientTracking: true,
|
|
79
|
+
closeTimeout: CLOSE_TIMEOUT,
|
|
80
|
+
verifyClient: null,
|
|
81
|
+
noServer: false,
|
|
82
|
+
backlog: null,
|
|
83
|
+
server: null,
|
|
84
|
+
host: null,
|
|
85
|
+
path: null,
|
|
86
|
+
port: null,
|
|
87
|
+
WebSocket,
|
|
88
|
+
...options
|
|
89
|
+
};
|
|
90
|
+
if (options.port == null && !options.server && !options.noServer || options.port != null && (options.server || options.noServer) || options.server && options.noServer) throw new TypeError("One and only one of the \"port\", \"server\", or \"noServer\" options must be specified");
|
|
91
|
+
if (options.port != null) {
|
|
92
|
+
this._server = http.createServer((req, res) => {
|
|
93
|
+
const body = http.STATUS_CODES[426];
|
|
94
|
+
res.writeHead(426, {
|
|
95
|
+
"Content-Length": body.length,
|
|
96
|
+
"Content-Type": "text/plain"
|
|
97
|
+
});
|
|
98
|
+
res.end(body);
|
|
99
|
+
});
|
|
100
|
+
this._server.listen(options.port, options.host, options.backlog, callback);
|
|
101
|
+
} else if (options.server) this._server = options.server;
|
|
102
|
+
if (this._server) {
|
|
103
|
+
const emitConnection = this.emit.bind(this, "connection");
|
|
104
|
+
this._removeListeners = addListeners(this._server, {
|
|
105
|
+
listening: this.emit.bind(this, "listening"),
|
|
106
|
+
error: this.emit.bind(this, "error"),
|
|
107
|
+
upgrade: (req, socket, head) => {
|
|
108
|
+
this.handleUpgrade(req, socket, head, emitConnection);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
if (options.perMessageDeflate === true) options.perMessageDeflate = {};
|
|
113
|
+
if (options.clientTracking) {
|
|
114
|
+
this.clients = /* @__PURE__ */ new Set();
|
|
115
|
+
this._shouldEmitClose = false;
|
|
116
|
+
}
|
|
117
|
+
this.options = options;
|
|
118
|
+
this._state = RUNNING;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Returns the bound address, the address family name, and port of the server
|
|
122
|
+
* as reported by the operating system if listening on an IP socket.
|
|
123
|
+
* If the server is listening on a pipe or UNIX domain socket, the name is
|
|
124
|
+
* returned as a string.
|
|
125
|
+
*
|
|
126
|
+
* @return {(Object|String|null)} The address of the server
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
address() {
|
|
130
|
+
if (this.options.noServer) throw new Error("The server is operating in \"noServer\" mode");
|
|
131
|
+
if (!this._server) return null;
|
|
132
|
+
return this._server.address();
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Stop the server from accepting new connections and emit the `'close'` event
|
|
136
|
+
* when all existing connections are closed.
|
|
137
|
+
*
|
|
138
|
+
* @param {Function} [cb] A one-time listener for the `'close'` event
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
close(cb) {
|
|
142
|
+
if (this._state === CLOSED) {
|
|
143
|
+
if (cb) this.once("close", () => {
|
|
144
|
+
cb(/* @__PURE__ */ new Error("The server is not running"));
|
|
145
|
+
});
|
|
146
|
+
process.nextTick(emitClose, this);
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
if (cb) this.once("close", cb);
|
|
150
|
+
if (this._state === CLOSING) return;
|
|
151
|
+
this._state = CLOSING;
|
|
152
|
+
if (this.options.noServer || this.options.server) {
|
|
153
|
+
if (this._server) {
|
|
154
|
+
this._removeListeners();
|
|
155
|
+
this._removeListeners = this._server = null;
|
|
156
|
+
}
|
|
157
|
+
if (this.clients) if (!this.clients.size) process.nextTick(emitClose, this);
|
|
158
|
+
else this._shouldEmitClose = true;
|
|
159
|
+
else process.nextTick(emitClose, this);
|
|
160
|
+
} else {
|
|
161
|
+
const server = this._server;
|
|
162
|
+
this._removeListeners();
|
|
163
|
+
this._removeListeners = this._server = null;
|
|
164
|
+
server.close(() => {
|
|
165
|
+
emitClose(this);
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* See if a given request should be handled by this server instance.
|
|
171
|
+
*
|
|
172
|
+
* @param {http.IncomingMessage} req Request object to inspect
|
|
173
|
+
* @return {Boolean} `true` if the request is valid, else `false`
|
|
174
|
+
* @public
|
|
175
|
+
*/
|
|
176
|
+
shouldHandle(req) {
|
|
177
|
+
if (this.options.path) {
|
|
178
|
+
const index = req.url.indexOf("?");
|
|
179
|
+
if ((index !== -1 ? req.url.slice(0, index) : req.url) !== this.options.path) return false;
|
|
180
|
+
}
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Handle a HTTP Upgrade request.
|
|
185
|
+
*
|
|
186
|
+
* @param {http.IncomingMessage} req The request object
|
|
187
|
+
* @param {Duplex} socket The network socket between the server and client
|
|
188
|
+
* @param {Buffer} head The first packet of the upgraded stream
|
|
189
|
+
* @param {Function} cb Callback
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
handleUpgrade(req, socket, head, cb) {
|
|
193
|
+
socket.on("error", socketOnError);
|
|
194
|
+
const key = req.headers["sec-websocket-key"];
|
|
195
|
+
const upgrade = req.headers.upgrade;
|
|
196
|
+
const version = +req.headers["sec-websocket-version"];
|
|
197
|
+
if (req.method !== "GET") {
|
|
198
|
+
abortHandshakeOrEmitwsClientError(this, req, socket, 405, "Invalid HTTP method");
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
if (upgrade === void 0 || upgrade.toLowerCase() !== "websocket") {
|
|
202
|
+
abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid Upgrade header");
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
if (key === void 0 || !keyRegex.test(key)) {
|
|
206
|
+
abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Missing or invalid Sec-WebSocket-Key header");
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
if (version !== 13 && version !== 8) {
|
|
210
|
+
abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Missing or invalid Sec-WebSocket-Version header", { "Sec-WebSocket-Version": "13, 8" });
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
if (!this.shouldHandle(req)) {
|
|
214
|
+
abortHandshake(socket, 400);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
const secWebSocketProtocol = req.headers["sec-websocket-protocol"];
|
|
218
|
+
let protocols = /* @__PURE__ */ new Set();
|
|
219
|
+
if (secWebSocketProtocol !== void 0) try {
|
|
220
|
+
protocols = subprotocol.parse(secWebSocketProtocol);
|
|
221
|
+
} catch (err) {
|
|
222
|
+
abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid Sec-WebSocket-Protocol header");
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const secWebSocketExtensions = req.headers["sec-websocket-extensions"];
|
|
226
|
+
const extensions = {};
|
|
227
|
+
if (this.options.perMessageDeflate && secWebSocketExtensions !== void 0) {
|
|
228
|
+
const perMessageDeflate = new PerMessageDeflate({
|
|
229
|
+
...this.options.perMessageDeflate,
|
|
230
|
+
isServer: true,
|
|
231
|
+
maxPayload: this.options.maxPayload
|
|
232
|
+
});
|
|
233
|
+
try {
|
|
234
|
+
const offers = extension.parse(secWebSocketExtensions);
|
|
235
|
+
if (offers[PerMessageDeflate.extensionName]) {
|
|
236
|
+
perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]);
|
|
237
|
+
extensions[PerMessageDeflate.extensionName] = perMessageDeflate;
|
|
238
|
+
}
|
|
239
|
+
} catch (err) {
|
|
240
|
+
abortHandshakeOrEmitwsClientError(this, req, socket, 400, "Invalid or unacceptable Sec-WebSocket-Extensions header");
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
if (this.options.verifyClient) {
|
|
245
|
+
const info = {
|
|
246
|
+
origin: req.headers[`${version === 8 ? "sec-websocket-origin" : "origin"}`],
|
|
247
|
+
secure: !!(req.socket.authorized || req.socket.encrypted),
|
|
248
|
+
req
|
|
249
|
+
};
|
|
250
|
+
if (this.options.verifyClient.length === 2) {
|
|
251
|
+
this.options.verifyClient(info, (verified, code, message, headers) => {
|
|
252
|
+
if (!verified) return abortHandshake(socket, code || 401, message, headers);
|
|
253
|
+
this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
|
|
254
|
+
});
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
if (!this.options.verifyClient(info)) return abortHandshake(socket, 401);
|
|
258
|
+
}
|
|
259
|
+
this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Upgrade the connection to WebSocket.
|
|
263
|
+
*
|
|
264
|
+
* @param {Object} extensions The accepted extensions
|
|
265
|
+
* @param {String} key The value of the `Sec-WebSocket-Key` header
|
|
266
|
+
* @param {Set} protocols The subprotocols
|
|
267
|
+
* @param {http.IncomingMessage} req The request object
|
|
268
|
+
* @param {Duplex} socket The network socket between the server and client
|
|
269
|
+
* @param {Buffer} head The first packet of the upgraded stream
|
|
270
|
+
* @param {Function} cb Callback
|
|
271
|
+
* @throws {Error} If called more than once with the same socket
|
|
272
|
+
* @private
|
|
273
|
+
*/
|
|
274
|
+
completeUpgrade(extensions, key, protocols, req, socket, head, cb) {
|
|
275
|
+
if (!socket.readable || !socket.writable) return socket.destroy();
|
|
276
|
+
if (socket[kWebSocket]) throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");
|
|
277
|
+
if (this._state > RUNNING) return abortHandshake(socket, 503);
|
|
278
|
+
const headers = [
|
|
279
|
+
"HTTP/1.1 101 Switching Protocols",
|
|
280
|
+
"Upgrade: websocket",
|
|
281
|
+
"Connection: Upgrade",
|
|
282
|
+
`Sec-WebSocket-Accept: ${createHash("sha1").update(key + GUID).digest("base64")}`
|
|
283
|
+
];
|
|
284
|
+
const ws = new this.options.WebSocket(null, void 0, this.options);
|
|
285
|
+
if (protocols.size) {
|
|
286
|
+
const protocol = this.options.handleProtocols ? this.options.handleProtocols(protocols, req) : protocols.values().next().value;
|
|
287
|
+
if (protocol) {
|
|
288
|
+
headers.push(`Sec-WebSocket-Protocol: ${protocol}`);
|
|
289
|
+
ws._protocol = protocol;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
if (extensions[PerMessageDeflate.extensionName]) {
|
|
293
|
+
const params = extensions[PerMessageDeflate.extensionName].params;
|
|
294
|
+
const value = extension.format({ [PerMessageDeflate.extensionName]: [params] });
|
|
295
|
+
headers.push(`Sec-WebSocket-Extensions: ${value}`);
|
|
296
|
+
ws._extensions = extensions;
|
|
297
|
+
}
|
|
298
|
+
this.emit("headers", headers, req);
|
|
299
|
+
socket.write(headers.concat("\r\n").join("\r\n"));
|
|
300
|
+
socket.removeListener("error", socketOnError);
|
|
301
|
+
ws.setSocket(socket, head, {
|
|
302
|
+
allowSynchronousEvents: this.options.allowSynchronousEvents,
|
|
303
|
+
maxBufferedChunks: this.options.maxBufferedChunks,
|
|
304
|
+
maxFragments: this.options.maxFragments,
|
|
305
|
+
maxPayload: this.options.maxPayload,
|
|
306
|
+
skipUTF8Validation: this.options.skipUTF8Validation
|
|
307
|
+
});
|
|
308
|
+
if (this.clients) {
|
|
309
|
+
this.clients.add(ws);
|
|
310
|
+
ws.on("close", () => {
|
|
311
|
+
this.clients.delete(ws);
|
|
312
|
+
if (this._shouldEmitClose && !this.clients.size) process.nextTick(emitClose, this);
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
cb(ws, req);
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
module.exports = WebSocketServer;
|
|
319
|
+
/**
|
|
320
|
+
* Add event listeners on an `EventEmitter` using a map of <event, listener>
|
|
321
|
+
* pairs.
|
|
322
|
+
*
|
|
323
|
+
* @param {EventEmitter} server The event emitter
|
|
324
|
+
* @param {Object.<String, Function>} map The listeners to add
|
|
325
|
+
* @return {Function} A function that will remove the added listeners when
|
|
326
|
+
* called
|
|
327
|
+
* @private
|
|
328
|
+
*/
|
|
329
|
+
function addListeners(server, map) {
|
|
330
|
+
for (const event of Object.keys(map)) server.on(event, map[event]);
|
|
331
|
+
return function removeListeners() {
|
|
332
|
+
for (const event of Object.keys(map)) server.removeListener(event, map[event]);
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Emit a `'close'` event on an `EventEmitter`.
|
|
337
|
+
*
|
|
338
|
+
* @param {EventEmitter} server The event emitter
|
|
339
|
+
* @private
|
|
340
|
+
*/
|
|
341
|
+
function emitClose(server) {
|
|
342
|
+
server._state = CLOSED;
|
|
343
|
+
server.emit("close");
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Handle socket errors.
|
|
347
|
+
*
|
|
348
|
+
* @private
|
|
349
|
+
*/
|
|
350
|
+
function socketOnError() {
|
|
351
|
+
this.destroy();
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Close the connection when preconditions are not fulfilled.
|
|
355
|
+
*
|
|
356
|
+
* @param {Duplex} socket The socket of the upgrade request
|
|
357
|
+
* @param {Number} code The HTTP response status code
|
|
358
|
+
* @param {String} [message] The HTTP response body
|
|
359
|
+
* @param {Object} [headers] Additional HTTP response headers
|
|
360
|
+
* @private
|
|
361
|
+
*/
|
|
362
|
+
function abortHandshake(socket, code, message, headers) {
|
|
363
|
+
message = message || http.STATUS_CODES[code];
|
|
364
|
+
headers = {
|
|
365
|
+
Connection: "close",
|
|
366
|
+
"Content-Type": "text/html",
|
|
367
|
+
"Content-Length": Buffer.byteLength(message),
|
|
368
|
+
...headers
|
|
369
|
+
};
|
|
370
|
+
socket.once("finish", socket.destroy);
|
|
371
|
+
socket.end(`HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r\n` + Object.keys(headers).map((h) => `${h}: ${headers[h]}`).join("\r\n") + "\r\n\r\n" + message);
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least
|
|
375
|
+
* one listener for it, otherwise call `abortHandshake()`.
|
|
376
|
+
*
|
|
377
|
+
* @param {WebSocketServer} server The WebSocket server
|
|
378
|
+
* @param {http.IncomingMessage} req The request object
|
|
379
|
+
* @param {Duplex} socket The socket of the upgrade request
|
|
380
|
+
* @param {Number} code The HTTP response status code
|
|
381
|
+
* @param {String} message The HTTP response body
|
|
382
|
+
* @param {Object} [headers] The HTTP response headers
|
|
383
|
+
* @private
|
|
384
|
+
*/
|
|
385
|
+
function abortHandshakeOrEmitwsClientError(server, req, socket, code, message, headers) {
|
|
386
|
+
if (server.listenerCount("wsClientError")) {
|
|
387
|
+
const err = new Error(message);
|
|
388
|
+
Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);
|
|
389
|
+
server.emit("wsClientError", err, socket, req);
|
|
390
|
+
} else abortHandshake(socket, code, message, headers);
|
|
391
|
+
}
|
|
392
|
+
}));
|
|
393
|
+
//#endregion
|
|
394
|
+
Object.defineProperty(exports, "default", {
|
|
395
|
+
enumerable: true,
|
|
396
|
+
get: function() {
|
|
397
|
+
return require_websocket_server();
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
//# sourceMappingURL=websocket-server.js.map
|