2024-01-01 14:58:21 -05:00
|
|
|
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
2023-02-14 11:38:45 -05:00
|
|
|
// Copyright Joyent and Node contributors. All rights reserved. MIT license.
|
|
|
|
|
2024-09-11 20:25:46 -04:00
|
|
|
import { primordials } from "ext:core/mod.js";
|
2023-03-08 06:44:54 -05:00
|
|
|
import { notImplemented } from "ext:deno_node/_utils.ts";
|
2024-09-11 20:25:46 -04:00
|
|
|
const { Symbol } = primordials;
|
|
|
|
|
|
|
|
export const REPL_MODE_SLOPPY = Symbol("repl-sloppy");
|
|
|
|
export const REPL_MODE_STRICT = Symbol("repl-strict");
|
2023-02-14 11:38:45 -05:00
|
|
|
|
|
|
|
export class REPLServer {
|
|
|
|
constructor() {
|
|
|
|
notImplemented("REPLServer.prototype.constructor");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
export const builtinModules = [
|
|
|
|
"assert",
|
|
|
|
"async_hooks",
|
|
|
|
"buffer",
|
|
|
|
"child_process",
|
|
|
|
"cluster",
|
|
|
|
"console",
|
|
|
|
"constants",
|
|
|
|
"crypto",
|
|
|
|
"dgram",
|
|
|
|
"diagnostics_channel",
|
|
|
|
"dns",
|
|
|
|
"domain",
|
|
|
|
"events",
|
|
|
|
"fs",
|
|
|
|
"http",
|
|
|
|
"http2",
|
|
|
|
"https",
|
|
|
|
"inspector",
|
|
|
|
"module",
|
|
|
|
"net",
|
|
|
|
"os",
|
|
|
|
"path",
|
|
|
|
"perf_hooks",
|
|
|
|
"process",
|
|
|
|
"punycode",
|
|
|
|
"querystring",
|
|
|
|
"readline",
|
|
|
|
"repl",
|
|
|
|
"stream",
|
|
|
|
"string_decoder",
|
|
|
|
"sys",
|
|
|
|
"timers",
|
|
|
|
"tls",
|
|
|
|
"trace_events",
|
|
|
|
"tty",
|
|
|
|
"url",
|
|
|
|
"util",
|
|
|
|
"v8",
|
|
|
|
"vm",
|
|
|
|
"wasi",
|
|
|
|
"worker_threads",
|
|
|
|
"zlib",
|
|
|
|
];
|
2023-08-04 08:30:48 -04:00
|
|
|
export const _builtinLibs = builtinModules;
|
2023-02-14 11:38:45 -05:00
|
|
|
export function start() {
|
|
|
|
notImplemented("repl.start");
|
|
|
|
}
|
|
|
|
export default {
|
|
|
|
REPLServer,
|
|
|
|
builtinModules,
|
2023-08-04 08:30:48 -04:00
|
|
|
_builtinLibs,
|
2023-02-14 11:38:45 -05:00
|
|
|
start,
|
2024-09-11 20:25:46 -04:00
|
|
|
REPL_MODE_SLOPPY,
|
|
|
|
REPL_MODE_STRICT,
|
2023-02-14 11:38:45 -05:00
|
|
|
};
|