wasm-idle 0.2.4 → 0.2.5
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.
|
@@ -103,19 +103,19 @@
|
|
|
103
103
|
first = true;
|
|
104
104
|
await new Promise((r) => setTimeout(r, 100));
|
|
105
105
|
},
|
|
106
|
-
async prepare(language: string, code: string, log = true, prog) {
|
|
106
|
+
async prepare(language: string, code: string, log = true, prog, args) {
|
|
107
107
|
await Promise.all([
|
|
108
108
|
initSandbox(language).then(() => sandbox.load(path, code, log)),
|
|
109
109
|
initTerm(false)
|
|
110
110
|
]);
|
|
111
|
-
return await runSandbox(sandbox.run(code, true, log, prog));
|
|
111
|
+
return await runSandbox(sandbox.run(code, true, log, prog, args));
|
|
112
112
|
},
|
|
113
|
-
async run(language: string, code: string, log = true, prog) {
|
|
113
|
+
async run(language: string, code: string, log = true, prog, args) {
|
|
114
114
|
await Promise.all([
|
|
115
115
|
initSandbox(language).then(() => sandbox.load(path, code, log)),
|
|
116
116
|
initTerm()
|
|
117
117
|
]);
|
|
118
|
-
return await runSandbox(sandbox.run(code, false, log, prog));
|
|
118
|
+
return await runSandbox(sandbox.run(code, false, log, prog, args));
|
|
119
119
|
},
|
|
120
120
|
async destroy() {
|
|
121
121
|
await wait();
|
|
@@ -8,8 +8,8 @@ declare const Terminal: import("svelte").Component<{
|
|
|
8
8
|
onkey?: (e: KeyboardEvent) => void;
|
|
9
9
|
terminal?: {
|
|
10
10
|
clear(): Promise<void>;
|
|
11
|
-
prepare(language: string, code: string, log: boolean | undefined, prog: any): Promise<boolean>;
|
|
12
|
-
run(language: string, code: string, log: boolean | undefined, prog: any): Promise<boolean>;
|
|
11
|
+
prepare(language: string, code: string, log: boolean | undefined, prog: any, args: any): Promise<boolean>;
|
|
12
|
+
run(language: string, code: string, log: boolean | undefined, prog: any, args: any): Promise<boolean>;
|
|
13
13
|
destroy(): Promise<void>;
|
|
14
14
|
write(input: string): Promise<void>;
|
|
15
15
|
};
|