Merge branch 'master' into feature/plugin-install

This commit is contained in:
Cooldude2606 authored and GitHub committed 2026-09-12 22:10:52 +01:00
commit 512f62c22b
277 files changed
+2557 -2079

No files matched your search

+14 -8
View File
@@ -6,12 +6,13 @@ import fs from "fs/promises";
import path from "path";
import { spawn } from "child_process";
import * as libConfig from "./config";
import * as libFileOps from "./file_ops";
import { logger } from "./logging";
import * as libHelpers from "./helpers";
import { LockFile } from "./LockFile";
import { loadPluginList } from "./load_plugin_list";
import { loadPluginList } from "./load_plugin_list.js";
import * as libConfig from "./config/index.js";
import * as libFileOps from "./file_ops.js";
import { logger } from "./logging.js";
import * as libHelpers from "./helpers.js";
import { LockFile } from "./LockFile.js";
import { pathToFileURL } from "url";
function print(...content: any[]) {
@@ -171,8 +172,13 @@ export async function handlePluginCommand(
let pluginInfo: { name: string };
try {
pluginInfo = require(pluginPath).plugin;
const pluginPackage = (await import(
pathToFileURL(path.posix.join(pluginPath, "package.json")).href,
{ with: { type: "json" }},
)).default;
pluginInfo = (await import(
pathToFileURL(path.posix.join(pluginPath, pluginPackage.main ?? "index.js")).href
)).plugin;
} catch (err: any) {
logger.error(`Unable to import plugin info from ${args.path}:\n${err.stack}`);
process.exitCode = 1;