core-3nweb-client-lib 0.27.0 → 0.27.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.
|
@@ -160,13 +160,12 @@ class UploadTask {
|
|
|
160
160
|
}
|
|
161
161
|
(0, assert_1.assert)(!!segs && (segs.length === segsToUpload));
|
|
162
162
|
const ver = this.info.uploadVersion;
|
|
163
|
-
const create = (upload.createObj ? true : undefined);
|
|
164
163
|
if (segsToUpload === upload.segsLeft) {
|
|
165
|
-
await this.remoteStorage.saveNewObjVersion(this.objId, { ver,
|
|
164
|
+
await this.remoteStorage.saveNewObjVersion(this.objId, { ver, last: true }, undefined, { header, segs });
|
|
166
165
|
this.info.needUpload = undefined;
|
|
167
166
|
}
|
|
168
167
|
else {
|
|
169
|
-
upload.transactionId = await this.remoteStorage.saveNewObjVersion(this.objId, { ver
|
|
168
|
+
upload.transactionId = await this.remoteStorage.saveNewObjVersion(this.objId, { ver }, undefined, { header, segs });
|
|
170
169
|
if (!upload.transactionId) {
|
|
171
170
|
// XXX should this be runtime exception saying that remote acts badly ?
|
|
172
171
|
throw new Error(`Server didn't start obj saving transaction`);
|
|
@@ -199,9 +199,9 @@ class StorageOwner extends user_with_mid_session_1.ServiceUser {
|
|
|
199
199
|
let appPath;
|
|
200
200
|
if (fstReq) {
|
|
201
201
|
(0, assert_1.assert)(!!header);
|
|
202
|
-
const {
|
|
202
|
+
const { ver, last } = fstReq;
|
|
203
203
|
const reqOpts = {
|
|
204
|
-
|
|
204
|
+
ver, last,
|
|
205
205
|
header: header.length,
|
|
206
206
|
diff: (diff ? diff.length : undefined)
|
|
207
207
|
};
|
|
@@ -66,10 +66,6 @@ export interface GetObjQueryOpts {
|
|
|
66
66
|
ver?: number;
|
|
67
67
|
}
|
|
68
68
|
export interface PutObjFirstQueryOpts {
|
|
69
|
-
/**
|
|
70
|
-
* This is a flag to indicate that new object should be created.
|
|
71
|
-
*/
|
|
72
|
-
create?: boolean;
|
|
73
69
|
/**
|
|
74
70
|
* This parameter is object's new version.
|
|
75
71
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "core-3nweb-client-lib",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.1",
|
|
4
4
|
"description": "3NWeb client core library, embeddable into different environments",
|
|
5
5
|
"main": "build/lib-index.js",
|
|
6
6
|
"types": "build/lib-index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@types/node": "^16.11.7",
|
|
40
40
|
"@types/ws": "^7.4.7",
|
|
41
41
|
"jasmine": "^3.9.0",
|
|
42
|
-
"spec-3nweb-server": "^1.6.
|
|
42
|
+
"spec-3nweb-server": "^1.6.2",
|
|
43
43
|
"typescript": "^4.7.4"
|
|
44
44
|
}
|
|
45
45
|
}
|