@abtnode/core 1.16.29-beta-8671c2cf → 1.16.29-beta-a3a3b40e
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.
|
@@ -2,6 +2,7 @@ const path = require('path');
|
|
|
2
2
|
const { PROJECT } = require('@blocklet/constant');
|
|
3
3
|
const { upload } = require('@blocklet/store');
|
|
4
4
|
const { getDisplayName } = require('@blocklet/meta/lib/util');
|
|
5
|
+
const fs = require('fs/promises');
|
|
5
6
|
|
|
6
7
|
function ensureArray(value) {
|
|
7
8
|
if (!value) {
|
|
@@ -42,6 +43,7 @@ const publishToStore = async ({ did, projectId, releaseId, type, storeId, manage
|
|
|
42
43
|
if (!store) {
|
|
43
44
|
throw new Error('no find connected store');
|
|
44
45
|
}
|
|
46
|
+
|
|
45
47
|
const { storeUrl } = store;
|
|
46
48
|
const { accessToken, developerDid } = store;
|
|
47
49
|
|
|
@@ -50,7 +52,12 @@ const publishToStore = async ({ did, projectId, releaseId, type, storeId, manage
|
|
|
50
52
|
throw new Error('blocklet not found');
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
const
|
|
55
|
+
const project = await projectState.findOne({ id: projectId });
|
|
56
|
+
let releaseDir = getReleaseDir(blocklet, projectId, releaseId);
|
|
57
|
+
if (project.possibleSameStore) {
|
|
58
|
+
await fs.cp(releaseDir, `${releaseDir}-${storeId}`, { recursive: true });
|
|
59
|
+
releaseDir = `${releaseDir}-${storeId}`;
|
|
60
|
+
}
|
|
54
61
|
const metaFile = path.join(releaseDir, '.blocklet', 'release', 'blocklet.json');
|
|
55
62
|
|
|
56
63
|
const response = await upload({
|
|
@@ -58,6 +65,7 @@ const publishToStore = async ({ did, projectId, releaseId, type, storeId, manage
|
|
|
58
65
|
storeUrl,
|
|
59
66
|
accessToken,
|
|
60
67
|
developerDid,
|
|
68
|
+
possibleSameStore: project.possibleSameStore,
|
|
61
69
|
source: `Blocklet Studio (${getDisplayName(blocklet)})`,
|
|
62
70
|
});
|
|
63
71
|
|
package/lib/states/project.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.29-beta-
|
|
6
|
+
"version": "1.16.29-beta-a3a3b40e",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/analytics": "1.16.29-beta-
|
|
23
|
-
"@abtnode/auth": "1.16.29-beta-
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.29-beta-
|
|
25
|
-
"@abtnode/constant": "1.16.29-beta-
|
|
26
|
-
"@abtnode/cron": "1.16.29-beta-
|
|
27
|
-
"@abtnode/logger": "1.16.29-beta-
|
|
28
|
-
"@abtnode/models": "1.16.29-beta-
|
|
29
|
-
"@abtnode/queue": "1.16.29-beta-
|
|
30
|
-
"@abtnode/rbac": "1.16.29-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.16.29-beta-
|
|
32
|
-
"@abtnode/static-server": "1.16.29-beta-
|
|
33
|
-
"@abtnode/timemachine": "1.16.29-beta-
|
|
34
|
-
"@abtnode/util": "1.16.29-beta-
|
|
22
|
+
"@abtnode/analytics": "1.16.29-beta-a3a3b40e",
|
|
23
|
+
"@abtnode/auth": "1.16.29-beta-a3a3b40e",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.29-beta-a3a3b40e",
|
|
25
|
+
"@abtnode/constant": "1.16.29-beta-a3a3b40e",
|
|
26
|
+
"@abtnode/cron": "1.16.29-beta-a3a3b40e",
|
|
27
|
+
"@abtnode/logger": "1.16.29-beta-a3a3b40e",
|
|
28
|
+
"@abtnode/models": "1.16.29-beta-a3a3b40e",
|
|
29
|
+
"@abtnode/queue": "1.16.29-beta-a3a3b40e",
|
|
30
|
+
"@abtnode/rbac": "1.16.29-beta-a3a3b40e",
|
|
31
|
+
"@abtnode/router-provider": "1.16.29-beta-a3a3b40e",
|
|
32
|
+
"@abtnode/static-server": "1.16.29-beta-a3a3b40e",
|
|
33
|
+
"@abtnode/timemachine": "1.16.29-beta-a3a3b40e",
|
|
34
|
+
"@abtnode/util": "1.16.29-beta-a3a3b40e",
|
|
35
35
|
"@arcblock/did": "1.18.126",
|
|
36
36
|
"@arcblock/did-auth": "1.18.126",
|
|
37
37
|
"@arcblock/did-ext": "^1.18.126",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"@arcblock/pm2-events": "^0.0.5",
|
|
43
43
|
"@arcblock/validator": "^1.18.126",
|
|
44
44
|
"@arcblock/vc": "1.18.126",
|
|
45
|
-
"@blocklet/constant": "1.16.29-beta-
|
|
46
|
-
"@blocklet/env": "1.16.29-beta-
|
|
47
|
-
"@blocklet/meta": "1.16.29-beta-
|
|
48
|
-
"@blocklet/resolver": "1.16.29-beta-
|
|
49
|
-
"@blocklet/sdk": "1.16.29-beta-
|
|
50
|
-
"@blocklet/store": "1.16.29-beta-
|
|
45
|
+
"@blocklet/constant": "1.16.29-beta-a3a3b40e",
|
|
46
|
+
"@blocklet/env": "1.16.29-beta-a3a3b40e",
|
|
47
|
+
"@blocklet/meta": "1.16.29-beta-a3a3b40e",
|
|
48
|
+
"@blocklet/resolver": "1.16.29-beta-a3a3b40e",
|
|
49
|
+
"@blocklet/sdk": "1.16.29-beta-a3a3b40e",
|
|
50
|
+
"@blocklet/store": "1.16.29-beta-a3a3b40e",
|
|
51
51
|
"@did-space/client": "^0.5.8",
|
|
52
52
|
"@fidm/x509": "^1.2.1",
|
|
53
53
|
"@ocap/mcrypto": "1.18.126",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"jest": "^29.7.0",
|
|
104
104
|
"unzipper": "^0.10.11"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "283c32d9bc91067b15b673a9c438802a6f916fc2"
|
|
107
107
|
}
|