Skip to content

Commit d6d0cea

Browse files
committed
chore: Add paste() to eval utils
1 parent 30b4a05 commit d6d0cea

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/eval.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import _fsSync, { promises as _fs } from 'fs';
44
import _path from 'path';
5+
import { uploadToPastie } from 'ps-client/tools';
56
import { inspect } from 'util';
67

78
import * as _cache from '@/cache';
@@ -28,12 +29,13 @@ const Tools = _Tools;
2829
const $ = _$;
2930
const Sentinel = _Sentinel;
3031
const jsxToHTML = _jsxToHTML;
32+
const paste = uploadToPastie;
3133

3234
// Allow storing eval results
3335
const E: Record<string, unknown> = {};
3436

3537
// Storing in context for eval()
36-
const _evalContext = [cache, cachebust, fs, fsSync, fsPath, path, Tools, $, Sentinel, E, jsxToHTML];
38+
const _evalContext = [cache, cachebust, fs, fsSync, fsPath, path, Tools, $, Sentinel, E, jsxToHTML, paste];
3739

3840
export type EvalModes = 'COLOR_OUTPUT' | 'FULL_OUTPUT' | 'ABBR_OUTPUT' | 'NO_OUTPUT';
3941
export type EvalOutput = {

0 commit comments

Comments
 (0)