mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 01:31:08 +00:00
build: type live media runner
This commit is contained in:
16
scripts/pnpm-runner.d.ts
vendored
16
scripts/pnpm-runner.d.ts
vendored
@@ -7,8 +7,24 @@ export type PnpmRunnerParams = {
|
||||
nodeExecPath?: string;
|
||||
platform?: NodeJS.Platform;
|
||||
comSpec?: string;
|
||||
cwd?: string;
|
||||
detached?: boolean;
|
||||
stdio?: SpawnOptions["stdio"];
|
||||
env?: NodeJS.ProcessEnv;
|
||||
};
|
||||
|
||||
export function resolvePnpmRunner(params?: PnpmRunnerParams): {
|
||||
command: string;
|
||||
args: string[];
|
||||
shell: boolean;
|
||||
windowsVerbatimArguments?: boolean;
|
||||
env?: NodeJS.ProcessEnv;
|
||||
};
|
||||
|
||||
export function createPnpmRunnerSpawnSpec(params?: PnpmRunnerParams): {
|
||||
command: string;
|
||||
args: string[];
|
||||
options: SpawnOptions;
|
||||
};
|
||||
|
||||
export function spawnPnpmRunner(params?: PnpmRunnerParams): ChildProcess;
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
#!/usr/bin/env -S node --import tsx
|
||||
|
||||
import { spawn, type ChildProcess } from "node:child_process";
|
||||
import { createRequire } from "node:module";
|
||||
import { pathToFileURL } from "node:url";
|
||||
import { collectProviderApiKeys } from "../src/agents/live-auth-keys.js";
|
||||
import { loadShellEnvFallback } from "../src/infra/shell-env.js";
|
||||
import { getProviderEnvVars } from "../src/secrets/provider-env-vars.js";
|
||||
type SpawnPnpmRunner = (params: {
|
||||
pnpmArgs: string[];
|
||||
stdio: "inherit";
|
||||
env: NodeJS.ProcessEnv;
|
||||
}) => ChildProcess;
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
const { spawnPnpmRunner: _spawnPnpmRunner } = require("./pnpm-runner.mjs") as {
|
||||
spawnPnpmRunner: SpawnPnpmRunner;
|
||||
};
|
||||
|
||||
export type MediaSuiteId = "image" | "music" | "video";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user