@blocklet/sdk 1.16.16 → 1.16.17-beta-7ec31a60
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/lib/component/index.d.ts +9 -0
- package/lib/component/index.js +16 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +13 -13
package/lib/component/index.d.ts
CHANGED
|
@@ -20,10 +20,15 @@ type CallComponent = {
|
|
|
20
20
|
declare const call: CallComponent;
|
|
21
21
|
declare const getComponentMountPoint: (keyword: string) => string;
|
|
22
22
|
declare const getUrl: (...parts: string[]) => string;
|
|
23
|
+
declare const getResourceExportDir: ({ projectId, releaseId }?: {
|
|
24
|
+
projectId: string;
|
|
25
|
+
releaseId?: string;
|
|
26
|
+
}) => string;
|
|
23
27
|
export { call };
|
|
24
28
|
export { getUrl };
|
|
25
29
|
export { getComponentMountPoint };
|
|
26
30
|
export { getComponentWebEndpoint };
|
|
31
|
+
export { getResourceExportDir };
|
|
27
32
|
export { getChildWebEndpoint };
|
|
28
33
|
export { getParentWebEndpoint };
|
|
29
34
|
declare const _default: {
|
|
@@ -31,6 +36,10 @@ declare const _default: {
|
|
|
31
36
|
getUrl: (...parts: string[]) => string;
|
|
32
37
|
getComponentMountPoint: (keyword: string) => string;
|
|
33
38
|
getComponentWebEndpoint: (keyword: string) => string;
|
|
39
|
+
getResourceExportDir: ({ projectId, releaseId }?: {
|
|
40
|
+
projectId: string;
|
|
41
|
+
releaseId?: string;
|
|
42
|
+
}) => string;
|
|
34
43
|
getChildWebEndpoint: (name: string) => string;
|
|
35
44
|
getParentWebEndpoint: () => string;
|
|
36
45
|
};
|
package/lib/component/index.js
CHANGED
|
@@ -3,7 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getParentWebEndpoint = exports.getChildWebEndpoint = exports.getComponentWebEndpoint = exports.getComponentMountPoint = exports.getUrl = exports.call = void 0;
|
|
6
|
+
exports.getParentWebEndpoint = exports.getChildWebEndpoint = exports.getResourceExportDir = exports.getComponentWebEndpoint = exports.getComponentMountPoint = exports.getUrl = exports.call = void 0;
|
|
7
|
+
const path_1 = require("path");
|
|
7
8
|
const util_1 = require("@blocklet/meta/lib/util");
|
|
8
9
|
const axios_1 = __importDefault(require("axios"));
|
|
9
10
|
const get_1 = __importDefault(require("lodash/get"));
|
|
@@ -99,11 +100,25 @@ const getUrl = (...parts) => {
|
|
|
99
100
|
return (0, url_join_1.default)(BLOCKLET_APP_URL, mountPoint === '/' ? '' : mountPoint, ...parts);
|
|
100
101
|
};
|
|
101
102
|
exports.getUrl = getUrl;
|
|
103
|
+
const getResourceExportDir = ({ projectId, releaseId } = { projectId: '' }) => {
|
|
104
|
+
if (!projectId) {
|
|
105
|
+
throw new Error('projectId is required');
|
|
106
|
+
}
|
|
107
|
+
const dirArr = [process.env.BLOCKLET_APP_DATA_DIR, constant_1.PROJECT.DIR, projectId || '/'];
|
|
108
|
+
if (releaseId) {
|
|
109
|
+
dirArr.push(constant_1.PROJECT.RELEASE_DIR, releaseId || '/');
|
|
110
|
+
}
|
|
111
|
+
dirArr.push(constant_1.PROJECT.RESOURCE_DIR);
|
|
112
|
+
const dir = (0, path_1.join)(...dirArr);
|
|
113
|
+
return dir;
|
|
114
|
+
};
|
|
115
|
+
exports.getResourceExportDir = getResourceExportDir;
|
|
102
116
|
exports.default = {
|
|
103
117
|
call,
|
|
104
118
|
getUrl,
|
|
105
119
|
getComponentMountPoint,
|
|
106
120
|
getComponentWebEndpoint,
|
|
121
|
+
getResourceExportDir,
|
|
107
122
|
getChildWebEndpoint,
|
|
108
123
|
getParentWebEndpoint, // deprecated
|
|
109
124
|
};
|
package/lib/version.d.ts
CHANGED
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.
|
|
6
|
+
"version": "1.16.17-beta-7ec31a60",
|
|
7
7
|
"description": "graphql client to read/write data on abt node",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"typings": "lib/index.d.ts",
|
|
@@ -26,20 +26,20 @@
|
|
|
26
26
|
"author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@abtnode/client": "1.16.
|
|
30
|
-
"@abtnode/constant": "1.16.
|
|
31
|
-
"@arcblock/did": "1.18.
|
|
32
|
-
"@arcblock/did-auth": "1.18.
|
|
33
|
-
"@arcblock/jwt": "1.18.
|
|
34
|
-
"@arcblock/ws": "1.18.
|
|
35
|
-
"@blocklet/constant": "1.16.
|
|
36
|
-
"@blocklet/env": "1.16.
|
|
37
|
-
"@blocklet/meta": "1.16.
|
|
29
|
+
"@abtnode/client": "1.16.17-beta-7ec31a60",
|
|
30
|
+
"@abtnode/constant": "1.16.17-beta-7ec31a60",
|
|
31
|
+
"@arcblock/did": "1.18.91",
|
|
32
|
+
"@arcblock/did-auth": "1.18.91",
|
|
33
|
+
"@arcblock/jwt": "1.18.91",
|
|
34
|
+
"@arcblock/ws": "1.18.91",
|
|
35
|
+
"@blocklet/constant": "1.16.17-beta-7ec31a60",
|
|
36
|
+
"@blocklet/env": "1.16.17-beta-7ec31a60",
|
|
37
|
+
"@blocklet/meta": "1.16.17-beta-7ec31a60",
|
|
38
38
|
"@did-connect/authenticator": "^2.2.0",
|
|
39
39
|
"@did-connect/handler": "^2.2.0",
|
|
40
40
|
"@nedb/core": "^2.1.5",
|
|
41
|
-
"@ocap/mcrypto": "1.18.
|
|
42
|
-
"@ocap/wallet": "1.18.
|
|
41
|
+
"@ocap/mcrypto": "1.18.91",
|
|
42
|
+
"@ocap/wallet": "1.18.91",
|
|
43
43
|
"axios": "^0.27.2",
|
|
44
44
|
"cheerio": "^1.0.0-rc.12",
|
|
45
45
|
"fs-extra": "^10.1.0",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"ts-node": "^10.9.1",
|
|
75
75
|
"typescript": "^5.0.4"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "622bb131130d28c3fc554dcb5dc9d72b7da3fba2"
|
|
78
78
|
}
|