@did-space/core 0.2.125 → 0.2.127

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.
@@ -6,3 +6,7 @@ export declare enum APP_BACKUP_STATUS {
6
6
  SUCCEEDED = "SUCCEEDED",
7
7
  FAILED = "FAILED"
8
8
  }
9
+ export declare const HEADERS: {
10
+ X_HASH: string;
11
+ X_SIGNATURE_VERSION: string;
12
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.APP_BACKUP_STATUS = exports.DID_OBJECTS = exports.APPS = void 0;
3
+ exports.HEADERS = exports.APP_BACKUP_STATUS = exports.DID_OBJECTS = exports.APPS = void 0;
4
4
  exports.APPS = 'apps';
5
5
  exports.DID_OBJECTS = '.did-objects';
6
6
  // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -11,3 +11,10 @@ var APP_BACKUP_STATUS;
11
11
  APP_BACKUP_STATUS["SUCCEEDED"] = "SUCCEEDED";
12
12
  APP_BACKUP_STATUS["FAILED"] = "FAILED";
13
13
  })(APP_BACKUP_STATUS = exports.APP_BACKUP_STATUS || (exports.APP_BACKUP_STATUS = {}));
14
+ exports.HEADERS = {
15
+ X_HASH: 'x-hash',
16
+ // 取值范围 undefined | "2"
17
+ // (默认)取值为 undefined,表示 url 未使用任何编码方式。
18
+ // 取值为 2,表示 url 使用了 base64url 编码的方式
19
+ X_SIGNATURE_VERSION: 'x-signature-version',
20
+ };
@@ -34,7 +34,16 @@ class Space {
34
34
  return this.driver.createAppSpace(options);
35
35
  }
36
36
  destroyAppSpace(options) {
37
- return this.driver.destroyAppSpace(options);
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ const permissionOptions = {
39
+ fromAppDid: options.appDid,
40
+ toAppDid: options.appDid,
41
+ };
42
+ yield this.driver.setListable(permissionOptions, false);
43
+ yield this.driver.setReadable(permissionOptions, false);
44
+ yield this.driver.setWritable(permissionOptions, false);
45
+ return this.driver.destroyAppSpace(options);
46
+ });
38
47
  }
39
48
  getAppSpacePath(options) {
40
49
  return this.driver.getAppSpacePath(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@did-space/core",
3
- "version": "0.2.125",
3
+ "version": "0.2.127",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -47,5 +47,5 @@
47
47
  "ts-jest": "^28.0.6",
48
48
  "typescript": "^4.9.5"
49
49
  },
50
- "gitHead": "bcb981cbcc100da6016eed308b9764c95991fa8f"
50
+ "gitHead": "ea1fcac4052a63df7f70a4f15a2910703e261170"
51
51
  }