@push.rocks/smartsamba 0.6.0 → 0.7.0
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/dist_rust/rustsamba_linux_amd64_musl +0 -0
- package/dist_rust/rustsamba_linux_amd64_musl.tsrust-build.json +4 -4
- package/dist_rust/rustsamba_linux_arm64_musl +0 -0
- package/dist_rust/rustsamba_linux_arm64_musl.tsrust-build.json +4 -4
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/package.json +1 -1
- package/readme.md +14 -0
- package/ts/00_commitinfo_data.ts +1 -1
|
Binary file
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "tsrust.build-provenance.v2",
|
|
3
|
-
"binarySha256": "
|
|
3
|
+
"binarySha256": "ae8f95271a5051f1ef7aae13b57ec83e3d15b020f0c032a0f7c1b8bd3b706a17",
|
|
4
4
|
"buildInfo": {
|
|
5
5
|
"projectName": "@push.rocks/smartsamba",
|
|
6
|
-
"projectVersion": "0.
|
|
7
|
-
"gitCommit": "
|
|
6
|
+
"projectVersion": "0.7.0",
|
|
7
|
+
"gitCommit": "087188db648980e0e4e304edb6275a28fc5b2299",
|
|
8
8
|
"gitDirty": false,
|
|
9
|
-
"builtAt": "2026-11-
|
|
9
|
+
"builtAt": "2026-11-21T06:52:19.996Z",
|
|
10
10
|
"tsrustVersion": "1.3.1",
|
|
11
11
|
"binary": "rustsamba",
|
|
12
12
|
"target": "linux_amd64_musl"
|
|
Binary file
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "tsrust.build-provenance.v2",
|
|
3
|
-
"binarySha256": "
|
|
3
|
+
"binarySha256": "a3c24c86151a2798556a4fae2eca87480cb7f5a4f4d0b5bcea50ae179aa8b40f",
|
|
4
4
|
"buildInfo": {
|
|
5
5
|
"projectName": "@push.rocks/smartsamba",
|
|
6
|
-
"projectVersion": "0.
|
|
7
|
-
"gitCommit": "
|
|
6
|
+
"projectVersion": "0.7.0",
|
|
7
|
+
"gitCommit": "087188db648980e0e4e304edb6275a28fc5b2299",
|
|
8
8
|
"gitDirty": false,
|
|
9
|
-
"builtAt": "2026-11-
|
|
9
|
+
"builtAt": "2026-11-21T06:53:17.076Z",
|
|
10
10
|
"tsrustVersion": "1.3.1",
|
|
11
11
|
"binary": "rustsamba",
|
|
12
12
|
"target": "linux_arm64_musl"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@push.rocks/smartsamba',
|
|
6
|
-
version: '0.
|
|
6
|
+
version: '0.7.0',
|
|
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
package/readme.md
CHANGED
|
@@ -126,6 +126,20 @@ Paths are passed separately from the share name. Use `client.readFile('share', '
|
|
|
126
126
|
|
|
127
127
|
Set `requireEncryption: true` when the share contains private data. The client then requires SMB 3.x payload encryption on every request after authentication and rejects a peer that cannot establish it. This setting applies to share operations and `listShares()`; the default keeps the previous interoperability behavior. The embedded `SambaServer` does not implement SMB payload encryption, so use an encryption-capable server for this setting.
|
|
128
128
|
|
|
129
|
+
### Rust share ownership and catalog generations
|
|
130
|
+
|
|
131
|
+
Rust consumers of `smartsamba-engine` can call `SmbClient::acquire_share_ownership(share)` to hold an encrypted SMB session and an exclusive byte-range lock on `.smartsamba-owner.lock`. `OwnedShare::check_alive()` checks that same session; any failed check invalidates the handle. `close()` releases it. A second owner must be refused while the first holds the lock.
|
|
132
|
+
|
|
133
|
+
`OwnedShare::prepare_catalog_generation(id, length)` reserves a `CatalogGenerationAttempt`; persist it before starting I/O. `publish_catalog_generation(&attempt, bytes)` accepts up to 64 MiB of catalog metadata. It writes a unique stage under `catalog/`, flushes and reads it back, renames it to `catalog/generation-<id>.bin` without replacement, then reads the final file back before returning a `CatalogGenerationReceipt`.
|
|
134
|
+
|
|
135
|
+
For encoded payload units, `prepare_payload_generation(id, exact_length, sha256)` reserves a `PayloadGenerationAttempt` for up to 16 GiB per generation. `publish_payload_generation(&attempt, reader)` streams bounded chunks from an `AsyncRead`, requires exactly the declared length and SHA-256, flushes, hashes the staged file, renames without replacement to `payload/unit-<id>.bin`, and hashes the final file before returning a `PayloadGenerationReceipt`. The `id` in either API is one component of ASCII letters, digits, `_` or `-`. The lock remains held through final readback. This is a per-generation bound, not a bucket or object size limit; a future direct S3 backend can map a larger object to multiple immutable generations.
|
|
136
|
+
|
|
137
|
+
An admitted failure or cancelled future invalidates the owner. A returned publication error carries the attempt; a cancelled future leaves the previously saved attempt available. Acquire a new owner explicitly, call `reconcile_catalog_generation(attempt, expected_bytes)` or `reconcile_payload_generation(attempt)` to inspect the final path, and call the matching `cleanup_*_stage(attempt)` for its abandoned stage. A collision never overwrites an existing generation. Reconciliation never repairs or replaces one automatically.
|
|
138
|
+
|
|
139
|
+
On a share that hides symlinks when following is disabled, reconciliation can report `Missing` for an inaccessible symlink as well as an absent file. Keep no-replace publication enabled and investigate the share namespace before reusing an identifier.
|
|
140
|
+
|
|
141
|
+
Provision a dedicated private share and real `catalog` and `payload` directories before using this API. The share account needs create, write, read, rename and delete access. Require SMB 3 encryption, enforce byte-range locks, and disable symbolic-link following and wide links on the server. On Samba, the relevant share settings are `follow symlinks = no` and `wide links = no`. An installer must qualify the **effective** server policy on disposable paths in the target share: hold ownership from one connection, confirm a second connection cannot acquire it, close and reacquire; confirm an encrypted session is negotiated; place final and parent symlinks through an administrative fixture and verify that no-follow opens cannot read or write through them. Refuse activation if the server cannot demonstrate those properties. The bundled SmartSamba host does not implement encryption or real byte locks and cannot qualify this storage mode.
|
|
142
|
+
|
|
129
143
|
## Server Usage
|
|
130
144
|
|
|
131
145
|
Expose one or more local folders as SMB shares:
|