@nocobase/server 2.0.0-alpha.2 → 2.0.0-alpha.20

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.
@@ -109,6 +109,10 @@ const _AesEncryptor = class _AesEncryptor {
109
109
  return appKeyPath;
110
110
  }
111
111
  static async create(app) {
112
+ if (process.env.APP_AES_SECRET_KEY) {
113
+ const key2 = Buffer.from(process.env.APP_AES_SECRET_KEY, "hex");
114
+ return new _AesEncryptor(key2);
115
+ }
112
116
  const KEY_PATH = process.env.APP_AES_SECRET_KEY_PATH;
113
117
  const keyPath = KEY_PATH ? (0, import_path.resolve)(process.cwd(), KEY_PATH) : await this.getKeyPath(app.name);
114
118
  const key = await _AesEncryptor.getOrGenerateKey(keyPath);
@@ -126,12 +126,7 @@ const traverseJSON = /* @__PURE__ */ __name((data, options) => {
126
126
  include: subInclude
127
127
  });
128
128
  } else if (field.type === "belongsTo") {
129
- result[key] = traverseJSON(data[key], {
130
- collection: collection.db.getCollection(field.target),
131
- // exclude: [field.foreignKey],
132
- include: subInclude,
133
- excludePk: false
134
- });
129
+ result[key] = data[key];
135
130
  } else if (field.type === "belongsToMany") {
136
131
  result[key] = traverseBelongsToMany(data[key], {
137
132
  collection: collection.db.getCollection(field.target),
@@ -82,9 +82,7 @@ const _update_primary_keys_default = class _update_primary_keys_default extends
82
82
  } else {
83
83
  await queryInterface.changeColumn(tableName, "id", {
84
84
  type: import_sequelize.DataTypes.BIGINT,
85
- primaryKey: true,
86
- allowNull: false,
87
- autoIncrement: false
85
+ allowNull: false
88
86
  });
89
87
  }
90
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/server",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-alpha.20",
4
4
  "main": "lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "license": "AGPL-3.0",
@@ -10,20 +10,20 @@
10
10
  "@koa/cors": "^5.0.0",
11
11
  "@koa/multer": "^3.1.0",
12
12
  "@koa/router": "^13.1.0",
13
- "@nocobase/acl": "2.0.0-alpha.2",
14
- "@nocobase/actions": "2.0.0-alpha.2",
15
- "@nocobase/auth": "2.0.0-alpha.2",
16
- "@nocobase/cache": "2.0.0-alpha.2",
17
- "@nocobase/data-source-manager": "2.0.0-alpha.2",
18
- "@nocobase/database": "2.0.0-alpha.2",
19
- "@nocobase/evaluators": "2.0.0-alpha.2",
20
- "@nocobase/lock-manager": "2.0.0-alpha.2",
21
- "@nocobase/logger": "2.0.0-alpha.2",
22
- "@nocobase/resourcer": "2.0.0-alpha.2",
23
- "@nocobase/sdk": "2.0.0-alpha.2",
24
- "@nocobase/snowflake-id": "2.0.0-alpha.2",
25
- "@nocobase/telemetry": "2.0.0-alpha.2",
26
- "@nocobase/utils": "2.0.0-alpha.2",
13
+ "@nocobase/acl": "2.0.0-alpha.20",
14
+ "@nocobase/actions": "2.0.0-alpha.20",
15
+ "@nocobase/auth": "2.0.0-alpha.20",
16
+ "@nocobase/cache": "2.0.0-alpha.20",
17
+ "@nocobase/data-source-manager": "2.0.0-alpha.20",
18
+ "@nocobase/database": "2.0.0-alpha.20",
19
+ "@nocobase/evaluators": "2.0.0-alpha.20",
20
+ "@nocobase/lock-manager": "2.0.0-alpha.20",
21
+ "@nocobase/logger": "2.0.0-alpha.20",
22
+ "@nocobase/resourcer": "2.0.0-alpha.20",
23
+ "@nocobase/sdk": "2.0.0-alpha.20",
24
+ "@nocobase/snowflake-id": "2.0.0-alpha.20",
25
+ "@nocobase/telemetry": "2.0.0-alpha.20",
26
+ "@nocobase/utils": "2.0.0-alpha.20",
27
27
  "@types/decompress": "4.2.7",
28
28
  "@types/ini": "^1.3.31",
29
29
  "@types/koa-send": "^4.1.3",
@@ -59,5 +59,5 @@
59
59
  "@types/serve-handler": "^6.1.1",
60
60
  "@types/ws": "^8.5.5"
61
61
  },
62
- "gitHead": "1322f486b248bef53ed8c8f42f0a39dfd02125fd"
62
+ "gitHead": "af5ff4eaa490349420135405128da466d72ac74c"
63
63
  }