Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6cdc619cd0 | |||
| c3d4c4abb5 | |||
| 08c5145d20 | |||
| 0515d2ae46 |
15
changelog.md
15
changelog.md
@@ -1,5 +1,20 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-02-11 - 5.2.1 - fix(rust-bridge)
|
||||||
|
map Node.js platform/arch to tsrust-style suffix and add platform-specific and dev localPaths for RustBridge
|
||||||
|
|
||||||
|
- Add getPlatformSuffix() to map process.platform/process.arch to tsrust-style suffixes (e.g. linux_amd64)
|
||||||
|
- Include dist_rust/mailer-bin_{suffix} when available to prefer cross-compiled binaries
|
||||||
|
- Consolidate localPaths and add local dev build paths (rust/target/release and rust/target/debug)
|
||||||
|
- Pass the computed localPaths array into plugins.smartrust.RustBridge (searchSystemPath remains disabled)
|
||||||
|
|
||||||
|
## 2026-02-11 - 5.2.0 - feat(packaging)
|
||||||
|
add package exports entry, include ts/dist_ts in package files, and add TS barrel index re-exports
|
||||||
|
|
||||||
|
- package.json: add "exports" mapping "." -> "./dist_ts/index.js" to provide a module entry point
|
||||||
|
- package.json: add "ts/**/*" and "dist_ts/**/*" to "files" so TypeScript sources and built output are published
|
||||||
|
- ts/index.ts: new barrel that re-exports './00_commitinfo_data.js', './mail/index.js', and './security/index.js'
|
||||||
|
|
||||||
## 2026-02-11 - 5.1.3 - fix(docs)
|
## 2026-02-11 - 5.1.3 - fix(docs)
|
||||||
clarify sendEmail default behavior and document automatic MX discovery and delivery modes
|
clarify sendEmail default behavior and document automatic MX discovery and delivery modes
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@push.rocks/smartmta",
|
"name": "@push.rocks/smartmta",
|
||||||
"version": "5.1.3",
|
"version": "5.2.1",
|
||||||
"description": "A high-performance, enterprise-grade Mail Transfer Agent (MTA) built from scratch in TypeScript with Rust acceleration.",
|
"description": "A high-performance, enterprise-grade Mail Transfer Agent (MTA) built from scratch in TypeScript with Rust acceleration.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"mta",
|
"mta",
|
||||||
@@ -27,6 +27,9 @@
|
|||||||
"author": "Task Venture Capital GmbH",
|
"author": "Task Venture Capital GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"exports": {
|
||||||
|
".": "./dist_ts/index.js"
|
||||||
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"mailer": "./bin/mailer-wrapper.js"
|
"mailer": "./bin/mailer-wrapper.js"
|
||||||
},
|
},
|
||||||
@@ -56,6 +59,8 @@
|
|||||||
"uuid": "^13.0.0"
|
"uuid": "^13.0.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
"ts/**/*",
|
||||||
|
"dist_ts/**/*",
|
||||||
"bin/",
|
"bin/",
|
||||||
"scripts/install-binary.js",
|
"scripts/install-binary.js",
|
||||||
"dist_rust/**/*",
|
"dist_rust/**/*",
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@push.rocks/smartmta',
|
name: '@push.rocks/smartmta',
|
||||||
version: '5.1.3',
|
version: '5.2.1',
|
||||||
description: 'A high-performance, enterprise-grade Mail Transfer Agent (MTA) built from scratch in TypeScript with Rust acceleration.'
|
description: 'A high-performance, enterprise-grade Mail Transfer Agent (MTA) built from scratch in TypeScript with Rust acceleration.'
|
||||||
}
|
}
|
||||||
|
|||||||
3
ts/index.ts
Normal file
3
ts/index.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export * from './00_commitinfo_data.js';
|
||||||
|
export * from './mail/index.js';
|
||||||
|
export * from './security/index.js';
|
||||||
@@ -375,18 +375,39 @@ export class RustSecurityBridge extends EventEmitter {
|
|||||||
private _deliberateStop = false;
|
private _deliberateStop = false;
|
||||||
private _smtpServerConfig: ISmtpServerConfig | null = null;
|
private _smtpServerConfig: ISmtpServerConfig | null = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Map Node.js process.platform / process.arch to the tsrust-style suffix
|
||||||
|
* used for cross-compiled binaries, e.g. mailer-bin_linux_amd64.
|
||||||
|
*/
|
||||||
|
private static getPlatformSuffix(): string | null {
|
||||||
|
const archMap: Record<string, string> = { x64: 'amd64', arm64: 'arm64' };
|
||||||
|
const os = process.platform; // 'linux', 'darwin', 'win32', …
|
||||||
|
const arch = archMap[process.arch];
|
||||||
|
if (!arch) return null;
|
||||||
|
return `${os}_${arch}`;
|
||||||
|
}
|
||||||
|
|
||||||
private constructor() {
|
private constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
|
const suffix = RustSecurityBridge.getPlatformSuffix();
|
||||||
|
const localPaths: string[] = [];
|
||||||
|
|
||||||
|
// dist_rust/ candidates (tsrust cross-compiled output)
|
||||||
|
if (suffix) {
|
||||||
|
localPaths.push(plugins.path.join(paths.packageDir, 'dist_rust', `mailer-bin_${suffix}`));
|
||||||
|
}
|
||||||
|
localPaths.push(plugins.path.join(paths.packageDir, 'dist_rust', 'mailer-bin'));
|
||||||
|
// Local dev build paths
|
||||||
|
localPaths.push(plugins.path.join(paths.packageDir, 'rust', 'target', 'release', 'mailer-bin'));
|
||||||
|
localPaths.push(plugins.path.join(paths.packageDir, 'rust', 'target', 'debug', 'mailer-bin'));
|
||||||
|
|
||||||
this.bridge = new plugins.smartrust.RustBridge<TMailerCommands>({
|
this.bridge = new plugins.smartrust.RustBridge<TMailerCommands>({
|
||||||
binaryName: 'mailer-bin',
|
binaryName: 'mailer-bin',
|
||||||
cliArgs: ['--management'],
|
cliArgs: ['--management'],
|
||||||
requestTimeoutMs: 30_000,
|
requestTimeoutMs: 30_000,
|
||||||
readyTimeoutMs: 10_000,
|
readyTimeoutMs: 10_000,
|
||||||
localPaths: [
|
localPaths,
|
||||||
plugins.path.join(paths.packageDir, 'dist_rust', 'mailer-bin'),
|
|
||||||
plugins.path.join(paths.packageDir, 'rust', 'target', 'release', 'mailer-bin'),
|
|
||||||
plugins.path.join(paths.packageDir, 'rust', 'target', 'debug', 'mailer-bin'),
|
|
||||||
],
|
|
||||||
searchSystemPath: false,
|
searchSystemPath: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user