@push.rocks/smartsamba 0.2.0 → 0.3.1

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/.smartconfig.json CHANGED
@@ -1,4 +1,11 @@
1
1
  {
2
+ "@git.zone/tsrust": {
3
+ "targets": [
4
+ "linux_amd64",
5
+ "linux_arm64"
6
+ ],
7
+ "static": true
8
+ },
2
9
  "@git.zone/cli": {
3
10
  "projectType": "npm",
4
11
  "module": {
@@ -22,11 +29,15 @@
22
29
  ]
23
30
  },
24
31
  "release": {
25
- "registries": [
26
- "https://verdaccio.lossless.digital",
27
- "https://registry.npmjs.org"
28
- ],
29
- "accessLevel": "public"
32
+ "targets": {
33
+ "npm": {
34
+ "registries": [
35
+ "https://verdaccio.lossless.digital",
36
+ "https://registry.npmjs.org"
37
+ ],
38
+ "accessLevel": "public"
39
+ }
40
+ }
30
41
  }
31
42
  }
32
43
  }
Binary file
Binary file
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@push.rocks/smartsamba',
6
- version: '0.2.0',
6
+ version: '0.3.1',
7
7
  description: 'A TypeScript Samba/SMB client and server module backed by an embedded Rust SMB engine.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHdGQUF3RjtDQUN0RyxDQUFBIn0=
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@push.rocks/smartsamba",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "private": false,
5
5
  "description": "A TypeScript Samba/SMB client and server module backed by an embedded Rust SMB engine.",
6
6
  "exports": {
@@ -15,14 +15,15 @@
15
15
  "test:before": "tsrust",
16
16
  "pretest": "tsrust",
17
17
  "test": "tstest test/ --verbose --timeout 60 --logfile",
18
+ "test:rust": "cd rust && cargo test && cargo test --manifest-path vendor/smb-server/Cargo.toml handlers::session_setup::tests",
18
19
  "build": "tsbuild tsfolders && tsrust",
19
20
  "buildDocs": "tsdoc"
20
21
  },
21
22
  "devDependencies": {
22
- "@git.zone/tsbuild": "^4.4.0",
23
- "@git.zone/tsrust": "^1.3.3",
24
- "@git.zone/tstest": "^3.6.3",
25
- "@types/node": "^25.6.0",
23
+ "@git.zone/tsbuild": "^4.4.2",
24
+ "@git.zone/tsrust": "^1.4.1",
25
+ "@git.zone/tstest": "^3.6.6",
26
+ "@types/node": "^25.9.1",
26
27
  "typescript": "^6.0.3"
27
28
  },
28
29
  "dependencies": {
@@ -0,0 +1,9 @@
1
+ # smartsamba hints
2
+
3
+ ## Static Rust Binaries
4
+
5
+ - The Rust binaries in `dist_rust/` are statically linked (static-pie) via `"static": true` in the `@git.zone/tsrust` block of `.smartconfig.json` (tsrust >= 1.4.1). They run on both glibc (Debian/Ubuntu) and musl (Alpine) systems.
6
+ - Since adopting the standard `linux_amd64`/`linux_arm64` targets, output binaries are suffixed (`rustsamba_linux_amd64`, `rustsamba_linux_arm64`) instead of the former native-only unsuffixed `rustsamba`; the TS loader resolves suffixed names first with an unsuffixed fallback (ts/index.ts).
7
+ - tsrust injects `RUSTFLAGS="-C target-feature=+crt-static"` only into its own per-target cargo invocations and verifies the result (no `PT_INTERP` ELF header). Keep `rust/.cargo/config.toml` free of `rustflags` entries: the injected env variable would replace them, and a repo-wide `rustflags` would also break plain `cargo test`/`cargo check` (proc-macros cannot build with `+crt-static` on linux-gnu without an explicit `--target`).
8
+ - `pnpm run test:rust` runs the Rust unit tests; plain `cargo test` in `rust/` works as well.
9
+ - Verify linkage manually with `ldd dist_rust/<binary>_linux_amd64` → "statically linked".
package/readme.md CHANGED
@@ -11,6 +11,7 @@ For reporting bugs, issues, or security vulnerabilities, please visit [community
11
11
  `smartsamba` is for code that needs SMB/CIFS behavior directly from TypeScript:
12
12
 
13
13
  - Start an embedded SMB server that exposes local folders as shares.
14
+ - Accept signed SMB 2.0.2, SMB 2.1, SMB 3.0, SMB 3.0.2, and SMB 3.1.1 sessions.
14
15
  - Connect to existing SMB servers with username, password, and optional domain credentials.
15
16
  - List shares and directories.
16
17
  - Read and write files as `Buffer` or string data.
@@ -325,6 +326,7 @@ pnpm run build
325
326
  ## Operational Notes
326
327
 
327
328
  - Binding to port `445` may require elevated privileges on some systems. Use `port: 0` or a high port for development and tests.
329
+ - The server uses the SMB 2.x session key directly for message signing and derives SMB 3.x signing keys according to the negotiated dialect. This keeps signed SMB 2.1 clients such as network scanners compatible.
328
330
  - `SambaServer` manages one embedded server per instance.
329
331
  - Call `stop()` in `finally` blocks to cleanly shut down bridge processes.
330
332
  - `rust/target/`, `node_modules/`, `dist_ts/`, and `dist_rust/` are build artifacts or generated outputs and are not source history.
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@push.rocks/smartsamba',
6
- version: '0.2.0',
6
+ version: '0.3.1',
7
7
  description: 'A TypeScript Samba/SMB client and server module backed by an embedded Rust SMB engine.'
8
8
  }
Binary file