ai-hero-cli 0.0.21 → 0.0.22
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 +23 -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,
|
|
@@ -69289,6 +69291,15 @@ var lint = Command_exports2.make(
|
|
|
69289
69291
|
`main.ts file not found in the ${subfolder} folder.`
|
|
69290
69292
|
);
|
|
69291
69293
|
}
|
|
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
|
+
}
|
|
69292
69303
|
}
|
|
69293
69304
|
const files = yield* lesson.allFiles();
|
|
69294
69305
|
if (files.some((file6) => file6.includes(".gitkeep"))) {
|
|
@@ -69298,6 +69309,18 @@ var lint = Command_exports2.make(
|
|
|
69298
69309
|
);
|
|
69299
69310
|
}
|
|
69300
69311
|
}
|
|
69312
|
+
const readmeContents = allReadmeContents.join("\n");
|
|
69313
|
+
const referenceLessons = lessons.filter(
|
|
69314
|
+
(lesson) => lesson.sectionName === "reference"
|
|
69315
|
+
);
|
|
69316
|
+
for (const referenceLesson of referenceLessons) {
|
|
69317
|
+
if (!readmeContents.includes(referenceLesson.path)) {
|
|
69318
|
+
errorTracker.addError(
|
|
69319
|
+
referenceLesson,
|
|
69320
|
+
`${referenceLesson.path} is not referenced in any other exercise.`
|
|
69321
|
+
);
|
|
69322
|
+
}
|
|
69323
|
+
}
|
|
69301
69324
|
yield* errorTracker.log;
|
|
69302
69325
|
},
|
|
69303
69326
|
Effect_exports.catchTags({
|