@peers-app/peers-ui 0.33.24 → 0.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/command-palette/command-palette.js +4 -2
- package/dist/components/router.d.ts +1 -0
- package/dist/components/router.js +4 -1
- package/dist/host-shell/host-shell-consumer.js +8 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -1
- package/dist/isolated-screens/config.d.ts +51 -0
- package/dist/isolated-screens/config.js +73 -0
- package/dist/isolated-screens/frame-autostart.d.ts +1 -0
- package/dist/isolated-screens/frame-autostart.js +18 -0
- package/dist/isolated-screens/frame-bridge.d.ts +30 -0
- package/dist/isolated-screens/frame-bridge.js +113 -0
- package/dist/isolated-screens/frame-component.d.ts +6 -0
- package/dist/isolated-screens/frame-component.js +20 -0
- package/dist/isolated-screens/frame-document.d.ts +28 -0
- package/dist/isolated-screens/frame-document.js +77 -0
- package/dist/isolated-screens/frame-policy.d.ts +17 -0
- package/dist/isolated-screens/frame-policy.js +230 -0
- package/dist/isolated-screens/frame-protocol.d.ts +196 -0
- package/dist/isolated-screens/frame-protocol.js +150 -0
- package/dist/isolated-screens/frame-pvars.d.ts +33 -0
- package/dist/isolated-screens/frame-pvars.js +152 -0
- package/dist/isolated-screens/frame-realm.d.ts +12 -0
- package/dist/isolated-screens/frame-realm.js +31 -0
- package/dist/isolated-screens/frame-runtime.d.ts +5 -0
- package/dist/isolated-screens/frame-runtime.js +494 -0
- package/dist/isolated-screens/frame-storage.d.ts +43 -0
- package/dist/isolated-screens/frame-storage.js +85 -0
- package/dist/isolated-screens/index.d.ts +3 -0
- package/dist/isolated-screens/index.js +13 -0
- package/dist/isolated-screens/isolated-screen.d.ts +193 -0
- package/dist/isolated-screens/isolated-screen.js +695 -0
- package/dist/isolated-screens/piece-frames.d.ts +27 -0
- package/dist/isolated-screens/piece-frames.js +351 -0
- package/dist/isolated-screens/piece-reach.d.ts +11 -0
- package/dist/isolated-screens/piece-reach.js +56 -0
- package/dist/isolated-screens/port-channel.d.ts +47 -0
- package/dist/isolated-screens/port-channel.js +153 -0
- package/dist/isolated-screens/routes-sandbox.d.ts +8 -0
- package/dist/isolated-screens/routes-sandbox.js +130 -0
- package/dist/isolated-screens/screen-tab-context.d.ts +4 -0
- package/dist/isolated-screens/screen-tab-context.js +6 -0
- package/dist/isolated-screens/test-ports.d.ts +3 -0
- package/dist/isolated-screens/test-ports.js +21 -0
- package/dist/isolated-screens/wheel-relay.d.ts +48 -0
- package/dist/isolated-screens/wheel-relay.js +186 -0
- package/dist/mentions/mentions-client.js +9 -0
- package/dist/notifications/index.js +9 -5
- package/dist/operator-console/console-copy.d.ts +15 -0
- package/dist/operator-console/console-copy.js +97 -0
- package/dist/operator-console/console-header.d.ts +33 -0
- package/dist/operator-console/console-header.js +67 -0
- package/dist/operator-console/console-input.d.ts +20 -0
- package/dist/operator-console/console-input.js +313 -0
- package/dist/operator-console/console-repl.d.ts +7 -0
- package/dist/operator-console/console-repl.js +108 -0
- package/dist/operator-console/console-scope.d.ts +45 -0
- package/dist/operator-console/console-scope.js +174 -0
- package/dist/operator-console/console-screen.d.ts +8 -0
- package/dist/operator-console/console-screen.js +32 -0
- package/dist/operator-console/console-session.d.ts +106 -0
- package/dist/operator-console/console-session.js +567 -0
- package/dist/operator-console/console-test-host.d.ts +21 -0
- package/dist/operator-console/console-test-host.js +114 -0
- package/dist/operator-console/console-theme.d.ts +41 -0
- package/dist/operator-console/console-theme.js +55 -0
- package/dist/operator-console/console-value.d.ts +27 -0
- package/dist/operator-console/console-value.js +291 -0
- package/dist/operator-console/operator-console-state.js +3 -1
- package/dist/operator-console/operator-console.d.ts +8 -21
- package/dist/operator-console/operator-console.js +8 -61
- package/dist/root-layout/app-shell-height.d.ts +16 -3
- package/dist/root-layout/app-shell-height.js +17 -4
- package/dist/root-layout/host-app-menu.d.ts +17 -0
- package/dist/root-layout/host-app-menu.js +22 -0
- package/dist/root-layout/layouts/full-screen-layout.js +4 -2
- package/dist/system-apps/console.app.d.ts +15 -0
- package/dist/system-apps/console.app.js +25 -0
- package/dist/system-apps/index.d.ts +1 -0
- package/dist/system-apps/index.js +6 -1
- package/dist/tabs-layout/tabs-layout.js +12 -20
- package/dist/tabs-layout/tabs-state.js +39 -16
- package/dist/theme.css +32 -5
- package/dist/ui-contracts/piece-height.d.ts +18 -0
- package/dist/ui-contracts/piece-height.js +15 -0
- package/dist/ui-contracts/piece-host.d.ts +24 -1
- package/dist/ui-contracts/piece-host.js +53 -2
- package/dist/ui-contracts/piece-props.d.ts +16 -0
- package/dist/ui-contracts/piece-props.js +39 -0
- package/dist/ui-contracts/piece-resolution.d.ts +5 -0
- package/dist/ui-contracts/piece-resolution.js +38 -2
- package/dist/ui-contracts/piece.d.ts +2 -7
- package/dist/ui-contracts/piece.js +22 -37
- package/dist/ui-contracts/popover-surface.d.ts +14 -0
- package/dist/ui-contracts/popover-surface.js +32 -3
- package/dist/ui-inspection/dom-actions.d.ts +23 -0
- package/dist/ui-inspection/dom-actions.js +169 -0
- package/dist/ui-inspection/dom-inspector.d.ts +20 -0
- package/dist/ui-inspection/dom-inspector.js +184 -0
- package/dist/ui-inspection/index.d.ts +73 -0
- package/dist/ui-inspection/index.js +147 -0
- package/dist/ui-router/find-route.d.ts +6 -0
- package/dist/ui-router/find-route.js +22 -0
- package/dist/ui-router/routes-loader.js +23 -4
- package/dist/ui-router/runnable-version.js +3 -0
- package/dist/ui-router/ui-loader.d.ts +6 -1
- package/dist/ui-router/ui-loader.js +102 -26
- package/package.json +3 -3
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The Console's scope: the names code typed at the Console can use, and how that code runs.
|
|
4
|
+
*
|
|
5
|
+
* Code runs in the page, with the person's own authority, as the body of an async function
|
|
6
|
+
* inside `with` over a proxy. Through the proxy the code sees the contract globals, the
|
|
7
|
+
* helpers, the person's own variables and the standard JavaScript globals, and none of the
|
|
8
|
+
* page's: `window`, `document` and the app's globals aren't names here, and an assignment to a
|
|
9
|
+
* new name lands in the scope, not on the page. That keeps typed names apart from the app's.
|
|
10
|
+
* It isn't a security boundary, and doesn't need to be: the person already has the app's
|
|
11
|
+
* authority. Code a model writes runs in Operator's locked-down worker instead.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.ConsoleScope = exports.CONSOLE_GLOBAL_NAMES = void 0;
|
|
15
|
+
const repl_1 = require("@peers-app/peers-sdk/repl");
|
|
16
|
+
/**
|
|
17
|
+
* The globals code at the Console can use: the language's own, and the web's that a prompt
|
|
18
|
+
* needs (timers, `fetch`, `URL`, text encoding). Not `window`, `document` or `globalThis`.
|
|
19
|
+
*/
|
|
20
|
+
exports.CONSOLE_GLOBAL_NAMES = [
|
|
21
|
+
"undefined",
|
|
22
|
+
"NaN",
|
|
23
|
+
"Infinity",
|
|
24
|
+
"Object",
|
|
25
|
+
"Function",
|
|
26
|
+
"Array",
|
|
27
|
+
"Number",
|
|
28
|
+
"String",
|
|
29
|
+
"Boolean",
|
|
30
|
+
"Symbol",
|
|
31
|
+
"BigInt",
|
|
32
|
+
"Date",
|
|
33
|
+
"RegExp",
|
|
34
|
+
"Error",
|
|
35
|
+
"AggregateError",
|
|
36
|
+
"EvalError",
|
|
37
|
+
"RangeError",
|
|
38
|
+
"ReferenceError",
|
|
39
|
+
"SyntaxError",
|
|
40
|
+
"TypeError",
|
|
41
|
+
"URIError",
|
|
42
|
+
"Promise",
|
|
43
|
+
"Proxy",
|
|
44
|
+
"Reflect",
|
|
45
|
+
"JSON",
|
|
46
|
+
"Math",
|
|
47
|
+
"Intl",
|
|
48
|
+
"Map",
|
|
49
|
+
"Set",
|
|
50
|
+
"WeakMap",
|
|
51
|
+
"WeakSet",
|
|
52
|
+
"WeakRef",
|
|
53
|
+
"ArrayBuffer",
|
|
54
|
+
"DataView",
|
|
55
|
+
"Int8Array",
|
|
56
|
+
"Uint8Array",
|
|
57
|
+
"Uint8ClampedArray",
|
|
58
|
+
"Int16Array",
|
|
59
|
+
"Uint16Array",
|
|
60
|
+
"Int32Array",
|
|
61
|
+
"Uint32Array",
|
|
62
|
+
"Float32Array",
|
|
63
|
+
"Float64Array",
|
|
64
|
+
"BigInt64Array",
|
|
65
|
+
"BigUint64Array",
|
|
66
|
+
"parseInt",
|
|
67
|
+
"parseFloat",
|
|
68
|
+
"isNaN",
|
|
69
|
+
"isFinite",
|
|
70
|
+
"encodeURI",
|
|
71
|
+
"encodeURIComponent",
|
|
72
|
+
"decodeURI",
|
|
73
|
+
"decodeURIComponent",
|
|
74
|
+
"setTimeout",
|
|
75
|
+
"clearTimeout",
|
|
76
|
+
"setInterval",
|
|
77
|
+
"clearInterval",
|
|
78
|
+
"queueMicrotask",
|
|
79
|
+
"structuredClone",
|
|
80
|
+
"fetch",
|
|
81
|
+
"URL",
|
|
82
|
+
"URLSearchParams",
|
|
83
|
+
"TextEncoder",
|
|
84
|
+
"TextDecoder",
|
|
85
|
+
"AbortController",
|
|
86
|
+
"atob",
|
|
87
|
+
"btoa",
|
|
88
|
+
"crypto",
|
|
89
|
+
];
|
|
90
|
+
/** Web functions that must be called on the window, not as plain functions. */
|
|
91
|
+
const BOUND = new Set([
|
|
92
|
+
"setTimeout",
|
|
93
|
+
"clearTimeout",
|
|
94
|
+
"setInterval",
|
|
95
|
+
"clearInterval",
|
|
96
|
+
"queueMicrotask",
|
|
97
|
+
"structuredClone",
|
|
98
|
+
"fetch",
|
|
99
|
+
"atob",
|
|
100
|
+
"btoa",
|
|
101
|
+
]);
|
|
102
|
+
/**
|
|
103
|
+
* The names code at the Console sees, and the evaluator that runs it. Declarations and
|
|
104
|
+
* assignments persist from one entry to the next, and `$` is the last result that wasn't
|
|
105
|
+
* `undefined`.
|
|
106
|
+
*/
|
|
107
|
+
class ConsoleScope {
|
|
108
|
+
/** What the code sees beyond the globals: the helpers, the contract globals and its own names. */
|
|
109
|
+
values = Object.create(null);
|
|
110
|
+
#globals;
|
|
111
|
+
#proxy;
|
|
112
|
+
/** @param globalNames The globals the code may use. */
|
|
113
|
+
constructor(globalNames = exports.CONSOLE_GLOBAL_NAMES) {
|
|
114
|
+
const page = globalThis;
|
|
115
|
+
this.#globals = new Map(globalNames
|
|
116
|
+
.filter((name) => name in page)
|
|
117
|
+
.map((name) => {
|
|
118
|
+
const value = page[name];
|
|
119
|
+
return [
|
|
120
|
+
name,
|
|
121
|
+
BOUND.has(name) && typeof value === "function" ? value.bind(globalThis) : value,
|
|
122
|
+
];
|
|
123
|
+
}));
|
|
124
|
+
(0, repl_1.defineLastResult)(this.values);
|
|
125
|
+
this.#proxy = new Proxy(this.values, {
|
|
126
|
+
// Every name is the scope's, so an assignment to a new one lands here, not on the page.
|
|
127
|
+
has: (_target, key) => typeof key === "string",
|
|
128
|
+
get: (target, key) => {
|
|
129
|
+
// `with` reads Symbol.unscopables; no name is hidden from it.
|
|
130
|
+
if (typeof key === "symbol")
|
|
131
|
+
return undefined;
|
|
132
|
+
if (key in target)
|
|
133
|
+
return Reflect.get(target, key);
|
|
134
|
+
if (this.#globals.has(key))
|
|
135
|
+
return this.#globals.get(key);
|
|
136
|
+
throw new ReferenceError(`${key} is not defined`);
|
|
137
|
+
},
|
|
138
|
+
set: (target, key, value) => Reflect.set(target, key, value),
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/** Every name code can use at its top: its own, `$`, and the globals. */
|
|
142
|
+
names() {
|
|
143
|
+
return [...Object.keys(this.values), "$", ...this.#globals.keys()];
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* A name's value, without running anything: the scope's own, or a global's. A getter the
|
|
147
|
+
* person defined on the scope (through `this`) isn't called; `$` is the Console's own.
|
|
148
|
+
*/
|
|
149
|
+
get(name) {
|
|
150
|
+
// `this` at the top is the scope (see evaluate), so `this.` completes its names.
|
|
151
|
+
if (name === "this")
|
|
152
|
+
return this.values;
|
|
153
|
+
const own = Object.getOwnPropertyDescriptor(this.values, name);
|
|
154
|
+
if (!own)
|
|
155
|
+
return this.#globals.get(name);
|
|
156
|
+
return "value" in own || name === "$" ? this.values[name] : undefined;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Run code typed at the Console. Its calls are awaited, its declarations kept, and its last
|
|
160
|
+
* expression is its value.
|
|
161
|
+
*
|
|
162
|
+
* @param code What the person typed.
|
|
163
|
+
* @returns The value of its last expression, or `undefined`.
|
|
164
|
+
* @throws What the code throws, or a SyntaxError when it doesn't parse.
|
|
165
|
+
*/
|
|
166
|
+
async evaluate(code) {
|
|
167
|
+
const body = (0, repl_1.asyncBody)(code, { lastResult: true, keepDeclarations: true });
|
|
168
|
+
// Local bindings must resolve before the with proxy, including var in blocks and loops.
|
|
169
|
+
const run = new Function("__consoleScope", `with (__consoleScope) { return (async () => {\n${body}\n})(); }`);
|
|
170
|
+
// `this` at the top is the scope, as it's the REPL's global in Node, not the page's window.
|
|
171
|
+
return run.call(this.values, this.#proxy);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
exports.ConsoleScope = ConsoleScope;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Console app: the Console's prompt full screen, so it opens like any other app, whatever
|
|
3
|
+
* the layout. It shares its session with the Tabs + Console layout's panel: the same output,
|
|
4
|
+
* variables, group and draft.
|
|
5
|
+
*/
|
|
6
|
+
import type React from "react";
|
|
7
|
+
/** The Console as a screen: its header over its REPL, filling the tab. */
|
|
8
|
+
export declare const ConsoleScreen: React.FC;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConsoleScreen = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const console_app_1 = require("../system-apps/console.app");
|
|
6
|
+
const ui_loader_1 = require("../ui-router/ui-loader");
|
|
7
|
+
const console_header_1 = require("./console-header");
|
|
8
|
+
const console_repl_1 = require("./console-repl");
|
|
9
|
+
const console_theme_1 = require("./console-theme");
|
|
10
|
+
/** The Console as a screen: its header over its REPL, filling the tab. */
|
|
11
|
+
const ConsoleScreen = () => {
|
|
12
|
+
const theme = (0, console_theme_1.useConsoleTheme)();
|
|
13
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
14
|
+
height: "100%",
|
|
15
|
+
display: "flex",
|
|
16
|
+
flexDirection: "column",
|
|
17
|
+
backgroundColor: theme.bg,
|
|
18
|
+
color: theme.text,
|
|
19
|
+
overflow: "hidden",
|
|
20
|
+
}, children: [(0, jsx_runtime_1.jsx)(console_header_1.ConsoleHeader, {}), (0, jsx_runtime_1.jsx)("div", { style: { flex: "1 1 auto", minHeight: 0 }, children: (0, jsx_runtime_1.jsx)(console_repl_1.ConsoleRepl, {}) })] }));
|
|
21
|
+
};
|
|
22
|
+
exports.ConsoleScreen = ConsoleScreen;
|
|
23
|
+
(0, ui_loader_1.registerInternalPeersUI)({
|
|
24
|
+
component: exports.ConsoleScreen,
|
|
25
|
+
routes: [
|
|
26
|
+
{
|
|
27
|
+
isMatch: (_props, context) => context.path === console_app_1.CONSOLE_APP_PATH,
|
|
28
|
+
uiCategory: "screen",
|
|
29
|
+
priority: 0,
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
});
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Console's REPL session: the contracts of one data context as globals, the entries the
|
|
3
|
+
* person runs, and what they print. Module state, so collapsing the panel (which unmounts it)
|
|
4
|
+
* keeps the output, the variables and the group.
|
|
5
|
+
*
|
|
6
|
+
* Built on `@peers-app/peers-sdk/repl`, the module `peers repl` uses, so the Console and the CLI
|
|
7
|
+
* have the same names, helpers and hints. Shared by the Tabs + Console layout's panel and the
|
|
8
|
+
* Console app.
|
|
9
|
+
*/
|
|
10
|
+
import { ConsoleScope } from "./console-scope";
|
|
11
|
+
/** An error an entry threw, as the Console shows it. */
|
|
12
|
+
export interface IConsoleError {
|
|
13
|
+
/** `TypeError: …`, or just the message for a plain Error. */
|
|
14
|
+
message: string;
|
|
15
|
+
/** What a name that isn't defined might mean: `Did you mean Tasks?`. */
|
|
16
|
+
hint?: string;
|
|
17
|
+
/** Where it was thrown, without the Console's own frames. */
|
|
18
|
+
stack?: string;
|
|
19
|
+
}
|
|
20
|
+
/** Code the person ran, and what it gave. */
|
|
21
|
+
export interface IConsoleEntry {
|
|
22
|
+
id: string;
|
|
23
|
+
type: "entry";
|
|
24
|
+
code: string;
|
|
25
|
+
/** The data context's name when it ran: "personal", or a group's. */
|
|
26
|
+
context: string;
|
|
27
|
+
/** "stopped": let go with stop waiting; with `ms` once it had started, without if it never ran. */
|
|
28
|
+
status: "running" | "done" | "failed" | "stopped";
|
|
29
|
+
value?: unknown;
|
|
30
|
+
error?: IConsoleError;
|
|
31
|
+
/** How long it took, once it's finished. */
|
|
32
|
+
ms?: number;
|
|
33
|
+
/** What it printed while it ran, shown above its result. */
|
|
34
|
+
prints?: IConsolePrint[];
|
|
35
|
+
}
|
|
36
|
+
/** What `print`, `console.log` or a subscription with no handler printed. */
|
|
37
|
+
export interface IConsolePrint {
|
|
38
|
+
id: string;
|
|
39
|
+
type: "print";
|
|
40
|
+
values: unknown[];
|
|
41
|
+
level: "log" | "warn" | "error";
|
|
42
|
+
}
|
|
43
|
+
/** A line from the Console itself: where the session is, or why it couldn't start. */
|
|
44
|
+
export interface IConsoleInfo {
|
|
45
|
+
id: string;
|
|
46
|
+
type: "info";
|
|
47
|
+
text: string;
|
|
48
|
+
tone?: "error";
|
|
49
|
+
}
|
|
50
|
+
/** One block of the Console's output. */
|
|
51
|
+
export type ConsoleBlock = IConsoleEntry | IConsolePrint | IConsoleInfo;
|
|
52
|
+
/** The Console's output, oldest first. */
|
|
53
|
+
export declare const consoleBlocks: import("@peers-app/peers-sdk").Observable<ConsoleBlock[]>;
|
|
54
|
+
/** The data context the Console's calls run in, by name: "personal", or a group's. */
|
|
55
|
+
export declare const consoleContext: import("@peers-app/peers-sdk").Observable<string>;
|
|
56
|
+
/** What's typed in the Console's input and not yet run, kept while the panel is closed. */
|
|
57
|
+
export declare const consoleDraft: import("@peers-app/peers-sdk").Observable<string>;
|
|
58
|
+
/** Whether the session has its contracts yet. */
|
|
59
|
+
export declare const consoleReady: import("@peers-app/peers-sdk").Observable<boolean>;
|
|
60
|
+
/** What the person ran on this device, oldest first; empty until the Console has started. */
|
|
61
|
+
export declare function consoleHistory(): readonly string[];
|
|
62
|
+
/** The names code at the Console sees. */
|
|
63
|
+
export declare const consoleScope: ConsoleScope;
|
|
64
|
+
/** Print values in the Console's output. */
|
|
65
|
+
export declare function consolePrint(...values: unknown[]): void;
|
|
66
|
+
/**
|
|
67
|
+
* Empty the output, except entries still running or waiting to run, whose results would
|
|
68
|
+
* otherwise have nowhere to show.
|
|
69
|
+
*
|
|
70
|
+
* @param except An entry to remove even so: the `clear()` that's running.
|
|
71
|
+
*/
|
|
72
|
+
export declare function clearConsole(except?: string): void;
|
|
73
|
+
/**
|
|
74
|
+
* Reload the contracts when the session's group serves a different set than it loaded: one
|
|
75
|
+
* `listContracts` call, and a reload only on a difference, so a package restart that changes
|
|
76
|
+
* nothing keeps the person's handles and subscriptions. On a host without `listContracts`, it
|
|
77
|
+
* changes and shows nothing. It's let go after `waitMs`, and a reply that comes later changes
|
|
78
|
+
* nothing.
|
|
79
|
+
*
|
|
80
|
+
* @param waitMs How long to wait for the host before letting the look go.
|
|
81
|
+
* @returns When it's done or let go; a failure is shown in the output.
|
|
82
|
+
*/
|
|
83
|
+
export declare function refreshConsoleContracts(waitMs?: number): Promise<void>;
|
|
84
|
+
/**
|
|
85
|
+
* Start the Console's session, once: wait for the host, load personal's contracts, and reload
|
|
86
|
+
* them in the same group when the host connection is replaced.
|
|
87
|
+
*
|
|
88
|
+
* @returns When the contracts are loaded. A failure is shown in the output, and the next call
|
|
89
|
+
* tries again.
|
|
90
|
+
*/
|
|
91
|
+
export declare function startConsole(): Promise<void>;
|
|
92
|
+
/**
|
|
93
|
+
* Run code at the Console. Entries run one after another, as at Node's REPL; one that's waiting
|
|
94
|
+
* can be let go with {@link stopWaiting}.
|
|
95
|
+
*
|
|
96
|
+
* @param code What the person typed.
|
|
97
|
+
*/
|
|
98
|
+
export declare function runInConsole(code: string): void;
|
|
99
|
+
/**
|
|
100
|
+
* Stop waiting for an entry, so the next one can run. Its calls may still finish on the host.
|
|
101
|
+
*
|
|
102
|
+
* @param id The entry's id.
|
|
103
|
+
*/
|
|
104
|
+
export declare function stopWaiting(id: string): void;
|
|
105
|
+
/** End the session and forget everything: for tests. */
|
|
106
|
+
export declare function resetConsoleForTests(): void;
|