BREAKING CHANGE(core): Migrate filesystem to smartfs (async) and add Elasticsearch service support; refactor format/commit/meta modules

This commit is contained in:
2025-11-27 21:32:34 +00:00
parent 2f3d67f9e3
commit e1d28bc10a
30 changed files with 2217 additions and 995 deletions

View File

@@ -6,25 +6,22 @@ export const run = async () => {
const readmeHintsPath = plugins.path.join(paths.cwd, 'readme.hints.md');
// Check and initialize readme.md if it doesn't exist
const readmeExists = await plugins.smartfile.fs.fileExists(readmePath);
const readmeExists = await plugins.smartfs.file(readmePath).exists();
if (!readmeExists) {
await plugins.smartfile.fs.toFs(
'# Project Readme\n\nThis is the initial readme file.',
readmePath,
);
await plugins.smartfs.file(readmePath)
.encoding('utf8')
.write('# Project Readme\n\nThis is the initial readme file.');
console.log('Initialized readme.md');
} else {
console.log('readme.md already exists');
}
// Check and initialize readme.hints.md if it doesn't exist
const readmeHintsExists =
await plugins.smartfile.fs.fileExists(readmeHintsPath);
const readmeHintsExists = await plugins.smartfs.file(readmeHintsPath).exists();
if (!readmeHintsExists) {
await plugins.smartfile.fs.toFs(
'# Project Readme Hints\n\nThis is the initial readme hints file.',
readmeHintsPath,
);
await plugins.smartfs.file(readmeHintsPath)
.encoding('utf8')
.write('# Project Readme Hints\n\nThis is the initial readme hints file.');
console.log('Initialized readme.hints.md');
} else {
console.log('readme.hints.md already exists');