streamby-core 0.32.0 → 0.32.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.
@@ -13,11 +13,16 @@ const userIntegration_1 = require("./userIntegration");
13
13
  const encryption_1 = require("../utils/encryption");
14
14
  const storage_1 = require("../providers/storage");
15
15
  const s3_1 = require("../adapters/storage/s3");
16
+ // Matches by row id first; falls back to matching a builtin row by integrationId (the
17
+ // config id, e.g. 'mongo') for nodes/connections saved before TCORE-69 gave builtin rows
18
+ // their own generated id — same legacy-id class as connFilter in storage.ts.
16
19
  function findDbConnection(project, connId) {
17
- return project.dbConnections?.find((c) => c.id === connId);
20
+ return project.dbConnections?.find((c) => c.id === connId)
21
+ ?? project.dbConnections?.find((c) => c.source === 'builtin' && c.integrationId === connId);
18
22
  }
19
23
  function findStorageConnection(project, connId) {
20
- return project.storageConnections?.find((c) => c.id === connId);
24
+ return project.storageConnections?.find((c) => c.id === connId)
25
+ ?? project.storageConnections?.find((c) => c.source === 'builtin' && c.integrationId === connId);
21
26
  }
22
27
  // `connId` must be the `id` of a real row in project.dbConnections — never a bare
23
28
  // config id (config.databases[].id). Builtin rows reuse the shared pooled client keyed by
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "streamby-core",
3
- "version": "0.32.0",
3
+ "version": "0.32.1",
4
4
  "description": "StreamBy middleware framework for media storage management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",