fix(build): migrate project config to .smartconfig.json and replace smartfile usage with native fs

This commit is contained in:
2026-04-07 15:58:41 +00:00
parent d2f38be0af
commit 54caa7ae8c
15 changed files with 2050 additions and 3311 deletions

View File

@@ -1,4 +1,4 @@
import * as plugins from './smartfile-destination-file.plugins.js';
import * as plugins from './plugins.js';
export class SmartlogDestinationFile implements plugins.smartlogInterfaces.ILogDestination {
public fileWriteStream: plugins.fs.WriteStream;
@@ -12,7 +12,10 @@ export class SmartlogDestinationFile implements plugins.smartlogInterfaces.ILogD
if (!plugins.path.isAbsolute(filePathArg)) {
throw new Error(`filePath needs to be absolute but is not: "${filePathArg}"`);
}
plugins.smartfile.fs.ensureFileSync(filePathArg, `# Smartlogfile. Created at ${extendedDate.toISOString()}\n`);
if (!plugins.fs.existsSync(filePathArg)) {
plugins.fs.mkdirSync(plugins.path.dirname(filePathArg), { recursive: true });
plugins.fs.writeFileSync(filePathArg, `# Smartlogfile. Created at ${extendedDate.toISOString()}\n`);
}
this.fileWriteStream = plugins.fs.createWriteStream(
filePathArg,
{