-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(runtime): delete some cli apis
- Loading branch information
Showing
4 changed files
with
143 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
import { format } from './logger' | ||
import { EdgeRuntime } from '../edge-runtime' | ||
|
||
export const inlineEval = async (scripts: string[]) => { | ||
const results = [] | ||
|
||
for (const script of scripts) { | ||
const runtime = new EdgeRuntime() | ||
const result = await runtime.evaluate(script) | ||
results.push(format(result)) | ||
} | ||
|
||
return results | ||
export const inlineEval = async (script: string) => { | ||
const runtime = new EdgeRuntime() | ||
const result = await runtime.evaluate(script) | ||
return result | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters