@did-space/core 0.5.19 → 0.5.21
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/space/object-space.js +12 -5
- package/package.json +2 -2
|
@@ -362,7 +362,10 @@ class ObjectSpace extends events_1.default {
|
|
|
362
362
|
throw err;
|
|
363
363
|
}
|
|
364
364
|
finally {
|
|
365
|
-
this.emit('space.writeAsOwner.after', {
|
|
365
|
+
this.emit('space.writeAsOwner.after', {
|
|
366
|
+
spaceDid: this.options.spaceDid,
|
|
367
|
+
key,
|
|
368
|
+
});
|
|
366
369
|
debug('writeAsOwner.after', JSON.stringify({ key, options: (0, omit_1.default)(options, 'data') }));
|
|
367
370
|
}
|
|
368
371
|
});
|
|
@@ -463,8 +466,7 @@ class ObjectSpace extends events_1.default {
|
|
|
463
466
|
debug('updateMetadata.before', JSON.stringify({ key, options: (0, omit_1.default)(options, 'data'), where }));
|
|
464
467
|
const oldTree = yield this.options.treeRepository.findOne({
|
|
465
468
|
where,
|
|
466
|
-
attributes: ['meta'],
|
|
467
|
-
raw: true,
|
|
469
|
+
attributes: ['id', 'meta'],
|
|
468
470
|
});
|
|
469
471
|
debug('updateMetadata.$oldTree', JSON.stringify(oldTree));
|
|
470
472
|
if (!(0, isEmpty_1.default)(options.metadata)) {
|
|
@@ -531,7 +533,10 @@ class ObjectSpace extends events_1.default {
|
|
|
531
533
|
throw err;
|
|
532
534
|
}
|
|
533
535
|
finally {
|
|
534
|
-
this.emit('space.deleteAsOwner.after', {
|
|
536
|
+
this.emit('space.deleteAsOwner.after', {
|
|
537
|
+
spaceDid: this.options.spaceDid,
|
|
538
|
+
key,
|
|
539
|
+
});
|
|
535
540
|
}
|
|
536
541
|
});
|
|
537
542
|
}
|
|
@@ -551,7 +556,9 @@ class ObjectSpace extends events_1.default {
|
|
|
551
556
|
if (!tree) {
|
|
552
557
|
throw new Error(`Object(${key}) not exists`);
|
|
553
558
|
}
|
|
554
|
-
return this.driver.readAsOwner((0, utils_1.getHashPath)(tree.objectId), {
|
|
559
|
+
return this.driver.readAsOwner((0, utils_1.getHashPath)(tree.objectId), {
|
|
560
|
+
useGlobal: true,
|
|
561
|
+
});
|
|
555
562
|
});
|
|
556
563
|
}
|
|
557
564
|
existsAsOwner(key) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@did-space/core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.21",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"ts-jest": "^28.0.8",
|
|
54
54
|
"typescript": "^4.9.5"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "7e926ccc08e83b5e9c282e021733e5e034c0bdfd"
|
|
57
57
|
}
|