Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 216c1f4

Browse files
committed
Move startREPL() to Miniflare to match startServer()
1 parent 31044c3 commit 216c1f4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/miniflare/src/api.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { Log, NoOpLog } from "@miniflare/shared";
3232
import { SitesPlugin } from "@miniflare/sites";
3333
import { WebSocketPlugin } from "@miniflare/web-sockets";
3434
import sourceMap from "source-map-support";
35+
import { startREPL } from "./repl";
3536
import { VariedStorageFactory } from "./storage";
3637

3738
// MiniflareCore will ensure CorePlugin is first and BindingsPlugin is last,
@@ -141,6 +142,10 @@ export class Miniflare extends MiniflareCore<Plugins> {
141142
return startScheduler(this);
142143
}
143144

145+
startREPL(): Promise<void> {
146+
return startREPL(this);
147+
}
148+
144149
async getOpenURL(): Promise<string | undefined> {
145150
const {
146151
open,

packages/miniflare/src/cli.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type { Options } from "@miniflare/shared";
55
import { red } from "kleur/colors";
66
import type { MiniflareOptions } from "miniflare";
77
import open from "open";
8-
import { startREPL } from "./repl";
98
import { updateCheck } from "./updater";
109

1110
function suppressWarnings() {
@@ -105,7 +104,7 @@ async function main() {
105104
try {
106105
if (mfOptions.repl) {
107106
// Start Miniflare REPL
108-
await startREPL(mf);
107+
await mf.startREPL();
109108
} else {
110109
// Start Miniflare development server
111110
await mf.startServer();

0 commit comments

Comments
 (0)