for (const statement of sourceFile.statements) { if (
ts.isExportDeclaration(statement) &&
statement.exportClause &&
ts.isNamedExports(statement.exportClause)
) { for (const element of statement.exportClause.elements) { if (!element.isTypeOnly) {
names.add(element.name.text);
}
} continue;
}
if (ts.isVariableStatement(statement)) { for (const declaration of statement.declarationList.declarations) { if (ts.isIdentifier(declaration.name)) {
names.add(declaration.name.text);
}
} continue;
}
if (
ts.isFunctionDeclaration(statement) ||
ts.isClassDeclaration(statement) ||
ts.isEnumDeclaration(statement)
) { if (statement.name) {
names.add(statement.name.text);
}
}
}
return Array.from(names).toSorted();
}
function collectRuntimeApiPreExports(runtimeApiPath: string): string[] { const runtimeApiSource = readFileSync(runtimeApiPath, "utf8"); const runtimeApiFile = ts.createSourceFile(
runtimeApiPath,
runtimeApiSource,
ts.ScriptTarget.Latest, true,
); const preExports = new Set<string>();
let pluginSdkLineRuntimeSeen = false;
for (const statement of runtimeApiFile.statements) { if (!ts.isExportDeclaration(statement)) { continue;
} const moduleSpecifier =
statement.moduleSpecifier && ts.isStringLiteral(statement.moduleSpecifier)
? statement.moduleSpecifier.text
: undefined; if (!moduleSpecifier) { continue;
} if (moduleSpecifier === "openclaw/plugin-sdk/line-runtime") {
pluginSdkLineRuntimeSeen = true; break;
} const normalized = normalizeModuleSpecifier(moduleSpecifier); if (!normalized) { continue;
}
if (!statement.exportClause) { for (const name of collectModuleExportNames(
path.join(process.cwd(), "extensions", "line", normalized),
)) {
preExports.add(name);
} continue;
}
if (!ts.isNamedExports(statement.exportClause)) { continue;
}
for (const element of statement.exportClause.elements) { if (!element.isTypeOnly) {
preExports.add(element.name.text);
}
}
}
if (!pluginSdkLineRuntimeSeen) { return [];
}
return Array.from(preExports).toSorted();
}
describe("line setup wizard", () => {
it("configures token and secret for the default account", async () => { const prompter = createTestWizardPrompter({
text: vi.fn(async ({ message }: { message: string }) => { if (message === "Enter LINE channel access token") { return"line-token";
} if (message === "Enter LINE channel secret") { return"line-secret";
} thrownew Error(`Unexpected prompt: ${message}`);
}) as WizardPrompter["text"],
});
const result = await runSetupWizardConfigure({
configure: lineConfigure,
cfg: {} as OpenClawConfig,
prompter,
options: {},
});
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.14Bemerkung:
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.