summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/inspector.ts
diff options
context:
space:
mode:
authorhaturau <135221985+haturatu@users.noreply.github.com>2024-11-20 01:20:47 +0900
committerGitHub <noreply@github.com>2024-11-20 01:20:47 +0900
commit85719a67e59c7aa45bead26e4942d7df8b1b42d4 (patch)
treeface0aecaac53e93ce2f23b53c48859bcf1a36ec /ext/node/polyfills/inspector.ts
parent67697bc2e4a62a9670699fd18ad0dd8efc5bd955 (diff)
parent186b52731c6bb326c4d32905c5e732d082e83465 (diff)
Merge branch 'denoland:main' into main
Diffstat (limited to 'ext/node/polyfills/inspector.ts')
-rw-r--r--ext/node/polyfills/inspector.ts82
1 files changed, 0 insertions, 82 deletions
diff --git a/ext/node/polyfills/inspector.ts b/ext/node/polyfills/inspector.ts
deleted file mode 100644
index 9de86ab14..000000000
--- a/ext/node/polyfills/inspector.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-// Copyright Joyent and Node contributors. All rights reserved. MIT license.
-
-import { EventEmitter } from "node:events";
-import { notImplemented } from "ext:deno_node/_utils.ts";
-import { primordials } from "ext:core/mod.js";
-
-const {
- SafeMap,
-} = primordials;
-
-class Session extends EventEmitter {
- #connection = null;
- #nextId = 1;
- #messageCallbacks = new SafeMap();
-
- /** Connects the session to the inspector back-end. */
- connect() {
- notImplemented("inspector.Session.prototype.connect");
- }
-
- /** Connects the session to the main thread
- * inspector back-end. */
- connectToMainThread() {
- notImplemented("inspector.Session.prototype.connectToMainThread");
- }
-
- /** Posts a message to the inspector back-end. */
- post(
- _method: string,
- _params?: Record<string, unknown>,
- _callback?: (...args: unknown[]) => void,
- ) {
- notImplemented("inspector.Session.prototype.post");
- }
-
- /** Immediately closes the session, all pending
- * message callbacks will be called with an
- * error.
- */
- disconnect() {
- notImplemented("inspector.Session.prototype.disconnect");
- }
-}
-
-/** Activates inspector on host and port.
- * See https://nodejs.org/api/inspector.html#inspectoropenport-host-wait */
-function open(_port?: number, _host?: string, _wait?: boolean) {
- notImplemented("inspector.Session.prototype.open");
-}
-
-/** Deactivate the inspector. Blocks until there are no active connections.
- * See https://nodejs.org/api/inspector.html#inspectorclose */
-function close() {
- notImplemented("inspector.Session.prototype.close");
-}
-
-/** Return the URL of the active inspector, or undefined if there is none.
- * See https://nodejs.org/api/inspector.html#inspectorurl */
-function url() {
- // TODO(kt3k): returns undefined for now, which means the inspector is not activated.
- return undefined;
-}
-
-/** Blocks until a client (existing or connected later) has sent Runtime.runIfWaitingForDebugger command.
- * See https://nodejs.org/api/inspector.html#inspectorwaitfordebugger */
-function waitForDebugger() {
- notImplemented("inspector.wairForDebugger");
-}
-
-const console = globalThis.console;
-
-export { close, console, open, Session, url, waitForDebugger };
-
-export default {
- close,
- console,
- open,
- Session,
- url,
- waitForDebugger,
-};