@did-space/core 0.1.85 → 0.1.87-beta-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.
@@ -1,2 +1,3 @@
1
+ export * from './template';
1
2
  export * from './data';
2
3
  export * from './object';
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./template"), exports);
17
18
  __exportStar(require("./data"), exports);
18
19
  __exportStar(require("./object"), exports);
@@ -0,0 +1,22 @@
1
+ export declare const APP_BACKUP_TYPE = "app-backup";
2
+ export interface AppBackup {
3
+ /**
4
+ *
5
+ * @description uid
6
+ * @link https://www.npmjs.com/package/nanoid?activeTab=readme
7
+ * @type {string}
8
+ * @memberof AppBackup
9
+ */
10
+ id: string;
11
+ type: 'app-backup';
12
+ userDid: string;
13
+ /**
14
+ *
15
+ * @description 授权的时候用户当时在哪个网址?比如在 server 的 blocklet 的备份页面进行授权的,在blocklet 的授权页面进行授权的
16
+ * @type {string}
17
+ * @memberof AppBackup
18
+ */
19
+ referrer: string;
20
+ createAt?: string;
21
+ updateAt?: string;
22
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.APP_BACKUP_TYPE = void 0;
4
+ exports.APP_BACKUP_TYPE = 'app-backup';
@@ -0,0 +1,40 @@
1
+ export declare const APP_CONNECT_TYPE = "app-connected";
2
+ /**
3
+ *
4
+ * @description
5
+ * @export
6
+ * @interface AppConnected
7
+ */
8
+ export interface AppConnected {
9
+ /**
10
+ *
11
+ * @description uid
12
+ * @link https://www.npmjs.com/package/nanoid?activeTab=readme
13
+ * @type {string}
14
+ * @memberof AppConnected
15
+ */
16
+ id: string;
17
+ type: 'app-connected';
18
+ userDid: string;
19
+ spaceDid: string;
20
+ appDid: string;
21
+ appName: string;
22
+ appDescription: string;
23
+ scopes: string;
24
+ /**
25
+ *
26
+ * @description 注意,有了 appUrl,只要使用它的 __blocklet__.js?type=json api就能获取 blocklet的 logo,描述,等信息
27
+ * @type {string}
28
+ * @memberof AppConnected
29
+ */
30
+ appUrl: string;
31
+ /**
32
+ *
33
+ * @description 授权的时候用户当时在哪个网址?比如在 server 的 blocklet 的备份页面进行授权的,在blocklet 的授权页面进行授权的
34
+ * @type {string}
35
+ * @memberof AppConnected
36
+ */
37
+ referrer: string;
38
+ createAt?: string;
39
+ updateAt?: string;
40
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.APP_CONNECT_TYPE = void 0;
4
+ exports.APP_CONNECT_TYPE = 'app-connected';
@@ -0,0 +1,16 @@
1
+ export declare const APP_RESTORE_TYPE = "app-restore";
2
+ export interface AppRestore {
3
+ /**
4
+ *
5
+ * @description uid
6
+ * @link https://www.npmjs.com/package/nanoid?activeTab=readme
7
+ * @type {string}
8
+ * @memberof AppRestore
9
+ */
10
+ id: string;
11
+ type: 'app-restore';
12
+ userDid: string;
13
+ referrer: string;
14
+ createAt?: string;
15
+ updateAt?: string;
16
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.APP_RESTORE_TYPE = void 0;
4
+ exports.APP_RESTORE_TYPE = 'app-restore';
@@ -0,0 +1,27 @@
1
+ import { AppBackup } from './app-backup';
2
+ import { AppConnected } from './app-connected';
3
+ import { AppRestore } from './app-restore';
4
+ export declare const APP_TYPE = "app";
5
+ /**
6
+ *
7
+ * @description 此文件存储的位置在 ${spaceDid}/apps/${appDid}/.meta/config.yml
8
+ * @export
9
+ * @interface AppMeta
10
+ */
11
+ export interface App {
12
+ /**
13
+ *
14
+ * @description uid
15
+ * @link https://www.npmjs.com/package/nanoid?activeTab=readme
16
+ * @type {string}
17
+ * @memberof App
18
+ */
19
+ id: string;
20
+ type: 'app';
21
+ userDid: string;
22
+ connected: Array<AppConnected>;
23
+ backup: Array<AppBackup>;
24
+ restore: Array<AppRestore>;
25
+ createAt: string;
26
+ updateAt: string;
27
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.APP_TYPE = void 0;
4
+ exports.APP_TYPE = 'app';
@@ -0,0 +1,4 @@
1
+ export * from './app-backup';
2
+ export * from './app-connected';
3
+ export * from './app-restore';
4
+ export * from './app';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./app-backup"), exports);
18
+ __exportStar(require("./app-connected"), exports);
19
+ __exportStar(require("./app-restore"), exports);
20
+ __exportStar(require("./app"), exports);
@@ -106,7 +106,7 @@ class Space {
106
106
  getSpaceStatus() {
107
107
  var _a, _b;
108
108
  return __awaiter(this, void 0, void 0, function* () {
109
- // FIXME: 临时性解决方案,需要新增拓容功能,需要去除白名单功能
109
+ // FIXME: @yejianchao 临时性解决方案,需要新增拓容功能,需要去除白名单功能
110
110
  const [did, totalCapacity, usedCapacity] = yield Promise.all([
111
111
  this.driver.get('did'),
112
112
  this.driver.get('size'),
@@ -150,7 +150,7 @@ class Space {
150
150
  }
151
151
  write(options) {
152
152
  return __awaiter(this, void 0, void 0, function* () {
153
- // FIXME: 插入数据和编辑数据应该分离?
153
+ // FIXME: @yejianchao 插入数据和编辑数据应该分离?
154
154
  if (yield this.exists(options)) {
155
155
  return this.driver.write(options);
156
156
  }
@@ -193,7 +193,7 @@ class Space {
193
193
  }
194
194
  writeAsOwner(key, data) {
195
195
  return __awaiter(this, void 0, void 0, function* () {
196
- // FIXME: 插入数据和编辑数据应该分离
196
+ // FIXME: @yejianchao 插入数据和编辑数据应该分离
197
197
  if (yield this.existsAsOwner(key)) {
198
198
  return this.driver.writeAsOwner(key, data);
199
199
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@did-space/core",
3
- "version": "0.1.85",
3
+ "version": "0.1.87-beta-1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -32,18 +32,19 @@
32
32
  ]
33
33
  },
34
34
  "dependencies": {
35
- "@arcblock/did": "^1.18.54",
36
- "@arcblock/jwt": "^1.18.54",
37
- "@arcblock/validator": "^1.18.54",
35
+ "@arcblock/did": "^1.18.57",
36
+ "@arcblock/jwt": "^1.18.57",
37
+ "@arcblock/validator": "^1.18.57",
38
38
  "@aws-sdk/client-s3": "^3.45.0",
39
39
  "@aws-sdk/signature-v4-crt": "^3.45.0",
40
- "@blocklet/meta": "1.8.66-beta-b56e3b54",
41
- "@ocap/mcrypto": "^1.18.54",
42
- "@ocap/wallet": "^1.18.54",
40
+ "@blocklet/meta": "1.8.67",
41
+ "@ocap/mcrypto": "^1.18.57",
42
+ "@ocap/wallet": "^1.18.57",
43
43
  "fs-extra": "^10.0.0",
44
44
  "joi": "^17.5.0",
45
45
  "js-yaml": "^4.1.0",
46
46
  "lodash": "^4.17.21",
47
+ "react-confirm": "^0.2.3",
47
48
  "url-join": "^4.0.1",
48
49
  "xbytes": "^1.8.0"
49
50
  },
@@ -60,6 +61,5 @@
60
61
  "lint-staged": "^13.0.3",
61
62
  "ts-jest": "^28.0.6",
62
63
  "typescript": "^4.9.5"
63
- },
64
- "gitHead": "566eb62f18bf94e3a7e1c10074223777831e5959"
64
+ }
65
65
  }