feat(core): Integrate Rolldown as optional bundler, migrate filesystem to smartfs, and update bundler/tooling

This commit is contained in:
2025-11-23 13:12:17 +00:00
parent 1bb05bfd2e
commit cd53bdb6f4
32 changed files with 3152 additions and 5142 deletions

View File

@@ -3,12 +3,11 @@ import * as interfaces from './interfaces/index.js';
import { logger } from './tsbundle.logging.js';
export class TsBundle {
public async build(
cwdArg: string,
fromArg: string = './ts_web/index.ts',
toArg: string = './dist_bundle/bundle.js',
argvArg: interfaces.ICliOptions
argvArg: interfaces.ICliOptions,
) {
const done = plugins.smartpromise.defer();
const getBundlerPath = () => {
@@ -21,20 +20,20 @@ export class TsBundle {
default:
return './mod_esbuild/index.child.js';
}
}
};
const transportOptions: interfaces.IEnvTransportOptions = {
cwd: cwdArg,
from: fromArg,
to: toArg,
mode: argvArg && argvArg.production ? 'production' : 'test',
argv: {
...argvArg
}
}
argv: {
...argvArg,
},
};
const threadsimple = new plugins.smartspawn.ThreadSimple(
plugins.path.join(
plugins.smartpath.get.dirnameFromImportMetaUrl(import.meta.url),
getBundlerPath()
getBundlerPath(),
),
[],
{
@@ -42,7 +41,7 @@ export class TsBundle {
...process.env,
transportOptions: JSON.stringify(transportOptions),
},
}
},
);
const childProcess = await threadsimple.start();
childProcess.on('exit', (status) => {