@abtnode/core 1.16.47-beta-20250718-075003-940d2e2a → 1.16.47-beta-20250721-025348-9ccb2d62

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.
@@ -29,14 +29,18 @@ async function _ensureBun() {
29
29
  const binDir = path.join(installDir, 'bin');
30
30
  const bunExec = path.join(binDir, IS_WINDOWS ? 'bun.exe' : 'bun');
31
31
 
32
- const whichBun = shelljs.which('bun');
33
- // 如果有 bun 且版本大于等于 BUN_VERSION, 则直接使用现有的 bun
34
- if (whichBun) {
35
- // 检查 bun 版本
36
- const bunVersion = shelljs.exec(`${whichBun} --version`).stdout.trim();
37
- // 判断 bun 版本是否大于等于 BUN_VERSION, 应该用版本对比库
38
- if (semver.gte(bunVersion, BUN_VERSION)) {
39
- return whichBun.toString();
32
+ const ignoreWhichBun = process.env.ABT_NODE_IGNORE_WHICH_BUN === 'true';
33
+
34
+ if (!ignoreWhichBun) {
35
+ const whichBun = shelljs.which('bun');
36
+ // 如果有 bun 且版本大于等于 BUN_VERSION, 则直接使用现有的 bun
37
+ if (whichBun) {
38
+ // 检查 bun 版本
39
+ const bunVersion = shelljs.exec(`${whichBun} --version`).stdout.trim();
40
+ // 判断 bun 版本是否大于等于 BUN_VERSION, 应该用版本对比库
41
+ if (semver.gte(bunVersion, BUN_VERSION)) {
42
+ return whichBun.toString();
43
+ }
40
44
  }
41
45
  }
42
46
 
@@ -127,7 +127,6 @@ async function migrateAllTablesNoModels(dbPath) {
127
127
  VALUES (${placeholders});
128
128
  `;
129
129
  }
130
-
131
130
  // Batch‐migrate rows
132
131
  const batchSize = 1000;
133
132
  let offset = 0;
@@ -245,6 +244,27 @@ async function migrateAllTablesNoModels(dbPath) {
245
244
  console.log(' ❌ Ignore error for enum_webhook_attempts_status');
246
245
  continue;
247
246
  }
247
+ if (err.message.includes('connected_accounts_userDid_fkey')) {
248
+ const violationFilePath = dbPath.replace('.db', '.connected_accounts_violation.json');
249
+ console.log(
250
+ ' ❌ Ignore error for connected_accounts_userDid_fkey',
251
+ err.message,
252
+ 'save to:',
253
+ violationFilePath,
254
+ 'count: '
255
+ );
256
+ try {
257
+ await fsp.appendFile(
258
+ violationFilePath,
259
+ // eslint-disable-next-line prefer-template
260
+ JSON.stringify({ table: tableName, row, error: 'connected_accounts_userDid_fkey' }) + '\n',
261
+ 'utf8'
262
+ );
263
+ } catch (writeErr) {
264
+ console.warn(' ⚠️ Failed to write violation record:', writeErr);
265
+ }
266
+ continue;
267
+ }
248
268
  throw err;
249
269
  }
250
270
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.47-beta-20250718-075003-940d2e2a",
6
+ "version": "1.16.47-beta-20250721-025348-9ccb2d62",
7
7
  "description": "",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -19,22 +19,22 @@
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.47-beta-20250718-075003-940d2e2a",
23
- "@abtnode/auth": "1.16.47-beta-20250718-075003-940d2e2a",
24
- "@abtnode/certificate-manager": "1.16.47-beta-20250718-075003-940d2e2a",
25
- "@abtnode/client": "1.16.47-beta-20250718-075003-940d2e2a",
26
- "@abtnode/constant": "1.16.47-beta-20250718-075003-940d2e2a",
27
- "@abtnode/cron": "1.16.47-beta-20250718-075003-940d2e2a",
28
- "@abtnode/db-cache": "1.16.47-beta-20250718-075003-940d2e2a",
29
- "@abtnode/docker-utils": "1.16.47-beta-20250718-075003-940d2e2a",
30
- "@abtnode/logger": "1.16.47-beta-20250718-075003-940d2e2a",
31
- "@abtnode/models": "1.16.47-beta-20250718-075003-940d2e2a",
32
- "@abtnode/queue": "1.16.47-beta-20250718-075003-940d2e2a",
33
- "@abtnode/rbac": "1.16.47-beta-20250718-075003-940d2e2a",
34
- "@abtnode/router-provider": "1.16.47-beta-20250718-075003-940d2e2a",
35
- "@abtnode/static-server": "1.16.47-beta-20250718-075003-940d2e2a",
36
- "@abtnode/timemachine": "1.16.47-beta-20250718-075003-940d2e2a",
37
- "@abtnode/util": "1.16.47-beta-20250718-075003-940d2e2a",
22
+ "@abtnode/analytics": "1.16.47-beta-20250721-025348-9ccb2d62",
23
+ "@abtnode/auth": "1.16.47-beta-20250721-025348-9ccb2d62",
24
+ "@abtnode/certificate-manager": "1.16.47-beta-20250721-025348-9ccb2d62",
25
+ "@abtnode/client": "1.16.47-beta-20250721-025348-9ccb2d62",
26
+ "@abtnode/constant": "1.16.47-beta-20250721-025348-9ccb2d62",
27
+ "@abtnode/cron": "1.16.47-beta-20250721-025348-9ccb2d62",
28
+ "@abtnode/db-cache": "1.16.47-beta-20250721-025348-9ccb2d62",
29
+ "@abtnode/docker-utils": "1.16.47-beta-20250721-025348-9ccb2d62",
30
+ "@abtnode/logger": "1.16.47-beta-20250721-025348-9ccb2d62",
31
+ "@abtnode/models": "1.16.47-beta-20250721-025348-9ccb2d62",
32
+ "@abtnode/queue": "1.16.47-beta-20250721-025348-9ccb2d62",
33
+ "@abtnode/rbac": "1.16.47-beta-20250721-025348-9ccb2d62",
34
+ "@abtnode/router-provider": "1.16.47-beta-20250721-025348-9ccb2d62",
35
+ "@abtnode/static-server": "1.16.47-beta-20250721-025348-9ccb2d62",
36
+ "@abtnode/timemachine": "1.16.47-beta-20250721-025348-9ccb2d62",
37
+ "@abtnode/util": "1.16.47-beta-20250721-025348-9ccb2d62",
38
38
  "@arcblock/did": "1.20.16",
39
39
  "@arcblock/did-auth": "1.20.16",
40
40
  "@arcblock/did-ext": "1.20.16",
@@ -45,14 +45,14 @@
45
45
  "@arcblock/pm2-events": "^0.0.5",
46
46
  "@arcblock/validator": "1.20.16",
47
47
  "@arcblock/vc": "1.20.16",
48
- "@blocklet/constant": "1.16.47-beta-20250718-075003-940d2e2a",
48
+ "@blocklet/constant": "1.16.47-beta-20250721-025348-9ccb2d62",
49
49
  "@blocklet/did-space-js": "^1.1.7",
50
- "@blocklet/env": "1.16.47-beta-20250718-075003-940d2e2a",
50
+ "@blocklet/env": "1.16.47-beta-20250721-025348-9ccb2d62",
51
51
  "@blocklet/error": "^0.2.5",
52
- "@blocklet/meta": "1.16.47-beta-20250718-075003-940d2e2a",
53
- "@blocklet/resolver": "1.16.47-beta-20250718-075003-940d2e2a",
54
- "@blocklet/sdk": "1.16.47-beta-20250718-075003-940d2e2a",
55
- "@blocklet/store": "1.16.47-beta-20250718-075003-940d2e2a",
52
+ "@blocklet/meta": "1.16.47-beta-20250721-025348-9ccb2d62",
53
+ "@blocklet/resolver": "1.16.47-beta-20250721-025348-9ccb2d62",
54
+ "@blocklet/sdk": "1.16.47-beta-20250721-025348-9ccb2d62",
55
+ "@blocklet/store": "1.16.47-beta-20250721-025348-9ccb2d62",
56
56
  "@blocklet/theme": "^3.0.26",
57
57
  "@fidm/x509": "^1.2.1",
58
58
  "@ocap/mcrypto": "1.20.16",
@@ -116,5 +116,5 @@
116
116
  "jest": "^29.7.0",
117
117
  "unzipper": "^0.10.11"
118
118
  },
119
- "gitHead": "740ffa603c1de73ccf1bd4d0be497c9a9c7ce936"
119
+ "gitHead": "e51fdc32b26511dd1d2297659e9aa5fa83768c40"
120
120
  }