mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:20:44 +00:00
14 lines
536 B
JavaScript
14 lines
536 B
JavaScript
import fs from "node:fs";
|
|
|
|
for (const packageJsonPath of process.argv.slice(2)) {
|
|
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
pkg.exports = pkg.exports && typeof pkg.exports === "object" ? pkg.exports : {};
|
|
if (!pkg.exports["./plugin-sdk/gateway-runtime"]) {
|
|
pkg.exports["./plugin-sdk/gateway-runtime"] = {
|
|
types: "./dist/plugin-sdk/gateway-runtime.d.ts",
|
|
default: "./dist/plugin-sdk/gateway-runtime.js",
|
|
};
|
|
}
|
|
fs.writeFileSync(packageJsonPath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
}
|