ai-hero-cli 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin.cjs +24 -0
- package/package.json +1 -1
package/bin.cjs
CHANGED
|
@@ -69185,6 +69185,7 @@ var lint = Command_exports2.make(
|
|
|
69185
69185
|
return exists4;
|
|
69186
69186
|
})
|
|
69187
69187
|
});
|
|
69188
|
+
const allReadmeContents = [];
|
|
69188
69189
|
const errorTracker = createErrorTracker();
|
|
69189
69190
|
const lessonParser = yield* LessonParserService;
|
|
69190
69191
|
const fs = yield* FileSystem_exports.FileSystem;
|
|
@@ -69225,6 +69226,7 @@ var lint = Command_exports2.make(
|
|
|
69225
69226
|
const readmeContent = yield* fs.readFileString(
|
|
69226
69227
|
readmePath
|
|
69227
69228
|
);
|
|
69229
|
+
allReadmeContents.push(readmeContent);
|
|
69228
69230
|
if (readmeContent.trim().length === 0) {
|
|
69229
69231
|
errorTracker.addError(
|
|
69230
69232
|
lesson,
|
|
@@ -69288,6 +69290,16 @@ var lint = Command_exports2.make(
|
|
|
69288
69290
|
lesson,
|
|
69289
69291
|
`main.ts file not found in the ${subfolder} folder.`
|
|
69290
69292
|
);
|
|
69293
|
+
} else {
|
|
69294
|
+
const mainFileContent = yield* fs.readFileString(
|
|
69295
|
+
mainFilePath
|
|
69296
|
+
);
|
|
69297
|
+
if (mainFileContent.trim().length === 0) {
|
|
69298
|
+
errorTracker.addError(
|
|
69299
|
+
lesson,
|
|
69300
|
+
`main.ts file is empty in the ${subfolder} folder.`
|
|
69301
|
+
);
|
|
69302
|
+
}
|
|
69291
69303
|
}
|
|
69292
69304
|
}
|
|
69293
69305
|
const files = yield* lesson.allFiles();
|
|
@@ -69298,6 +69310,18 @@ var lint = Command_exports2.make(
|
|
|
69298
69310
|
);
|
|
69299
69311
|
}
|
|
69300
69312
|
}
|
|
69313
|
+
const readmeContents = allReadmeContents.join("\n");
|
|
69314
|
+
const referenceLessons = lessons.filter(
|
|
69315
|
+
(lesson) => lesson.sectionName === "reference"
|
|
69316
|
+
);
|
|
69317
|
+
for (const referenceLesson of referenceLessons) {
|
|
69318
|
+
if (!readmeContents.includes(referenceLesson.path)) {
|
|
69319
|
+
errorTracker.addError(
|
|
69320
|
+
referenceLesson,
|
|
69321
|
+
`${referenceLesson.path} is not referenced in any other exercise.`
|
|
69322
|
+
);
|
|
69323
|
+
}
|
|
69324
|
+
}
|
|
69301
69325
|
yield* errorTracker.log;
|
|
69302
69326
|
},
|
|
69303
69327
|
Effect_exports.catchTags({
|