fix: 修复TypeScript配置错误并更新项目文档
详细说明: - 修复了@n8n/config包的TypeScript配置错误 - 移除了不存在的jest-expect-message类型引用 - 清理了所有TypeScript构建缓存 - 更新了可行性分析文档,添加了技术实施方案 - 更新了Agent prompt文档 - 添加了会展策划工作流文档 - 包含了n8n-chinese-translation子项目 - 添加了exhibition-demo展示系统框架
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
let referencedMethods;
|
||||
let definedMethods;
|
||||
|
||||
try {
|
||||
referencedMethods = require('../dist/methods/referenced.json');
|
||||
definedMethods = require('../dist/methods/defined.json');
|
||||
} catch (error) {
|
||||
console.error(
|
||||
'Failed to find methods to validate. Please run `npm run n8n-generate-metadata` first.',
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const compareMethods = (base, other) => {
|
||||
const result = [];
|
||||
|
||||
for (const [nodeName, methods] of Object.entries(base)) {
|
||||
if (nodeName in other) {
|
||||
const found = methods.filter((item) => !other[nodeName].includes(item));
|
||||
|
||||
if (found.length > 0) result.push({ [nodeName]: found });
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
const referencedButUndefined = compareMethods(referencedMethods, definedMethods);
|
||||
|
||||
if (referencedButUndefined.length > 0) {
|
||||
console.error('ERROR: The following load options methods are referenced but undefined.');
|
||||
console.error('Please fix or remove the references or define the methods.');
|
||||
console.error(referencedButUndefined);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const definedButUnused = compareMethods(definedMethods, referencedMethods);
|
||||
|
||||
if (definedButUnused.length > 0) {
|
||||
console.warn('Warning: The following load options methods are defined but unused.');
|
||||
console.warn('Please consider using or removing the methods.');
|
||||
console.warn(definedButUnused);
|
||||
}
|
||||
Reference in New Issue
Block a user