fix(inspector): avoid placeholder hook scans
This commit is contained in:
parent
860f46b1c1
commit
6dc166f898
@ -12,7 +12,7 @@ const manifest = JSON.parse(read("openclaw.plugin.json"));
|
||||
const errors = [];
|
||||
|
||||
for (const hook of surface.hooks) {
|
||||
if (!hooksSource.includes(`api.on("${hook}"`)) {
|
||||
if (!hooksSource.includes(`api.on(${JSON.stringify(hook)}`)) {
|
||||
errors.push(`missing hook coverage: ${hook}`);
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ console.log(
|
||||
function renderHooks({ hooks, packageVersion }) {
|
||||
return `${header(packageVersion)}
|
||||
export function registerAllHooks(api) {
|
||||
${hooks.map((hook) => ` api.on("${hook}", kitchenSinkHook("${hook}"));`).join("\n")}
|
||||
${hooks.map((hook) => ` api.on(${JSON.stringify(hook)}, kitchenSinkHook(${JSON.stringify(hook)}));`).join("\n")}
|
||||
}
|
||||
|
||||
function kitchenSinkHook(name) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user