@freestyle-sh/with-type-run-code 0.2.0 → 0.2.2
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/index.d.ts +9 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -8,13 +8,18 @@ type RunCodeResponse<Result extends JSONValue> = {
|
|
|
8
8
|
stderr?: string;
|
|
9
9
|
statusCode?: number;
|
|
10
10
|
};
|
|
11
|
+
type RunCodeOptions = {
|
|
12
|
+
code: string;
|
|
13
|
+
argv?: string[];
|
|
14
|
+
env?: Record<string, string>;
|
|
15
|
+
workdir?: string;
|
|
16
|
+
};
|
|
17
|
+
type RunCodeInput = string | RunCodeOptions;
|
|
11
18
|
type JSONValue = undefined | string | number | boolean | null | {
|
|
12
19
|
[x: string]: JSONValue;
|
|
13
20
|
} | Array<JSONValue>;
|
|
14
21
|
interface VmRunCodeInstance extends VmWithInstance {
|
|
15
|
-
runCode<Result extends JSONValue>(
|
|
16
|
-
code: string;
|
|
17
|
-
}): Promise<RunCodeResponse<Result>>;
|
|
22
|
+
runCode<Result extends JSONValue>(options: RunCodeInput): Promise<RunCodeResponse<Result>>;
|
|
18
23
|
}
|
|
19
24
|
|
|
20
|
-
export type { JSONValue, RunCodeResponse, VmRunCode, VmRunCodeInstance };
|
|
25
|
+
export type { JSONValue, RunCodeInput, RunCodeOptions, RunCodeResponse, VmRunCode, VmRunCodeInstance };
|
package/package.json
CHANGED