INNER CODE UNIT · TypeScript

handleInstall

lmstudio-ai/lms · src/subcommands/dev/index.ts:79

async function handleInstall(
  projectPath: string,
  manifest: PluginManifest,
  logger: SimpleLogger,
  client: LMStudioClient,
): Promise<number> {
  logger.info(`Installing the plugin ${manifest.owner}/${manifest.name}...`);
  await client.repository.installLocalPlugin({ path: projectPath });
  logger.info(`Successfully installed ${manifest.owner}/${manifest.name}.`);
  return 0;
}

async function ensureNpmDependencies(path: string, logger: SimpleLogger, client: LMStudioClient) {
  const packageJson = join(path, "package.json");
  if (!(await exists(packageJson))) {
    logger.error("No package.json found in the plugin folder.");
    process.exit(1);
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…