streamby-core 0.29.12 → 0.32.0

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.
@@ -1,13 +1,28 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sanitizeConnection = sanitizeConnection;
4
+ exports.sanitizeConnections = sanitizeConnections;
3
5
  exports.sanitizeProject = sanitizeProject;
4
6
  exports.sanitizeUserIntegration = sanitizeUserIntegration;
7
+ function sanitizeConnection(conn) {
8
+ const { encryptedCredential, ...rest } = conn;
9
+ return { ...rest, hasCredential: !!encryptedCredential };
10
+ }
11
+ function sanitizeConnections(conns) {
12
+ return (conns ?? []).map(sanitizeConnection);
13
+ }
5
14
  function sanitizeProject(project) {
6
15
  if (!project)
7
16
  return project;
8
17
  return {
9
18
  ...project,
10
- credentials: project.credentials?.map(({ id, key }) => ({ id, key })) ?? [],
19
+ credentials: undefined,
20
+ connections: sanitizeConnections(project.connections),
21
+ storageConnections: sanitizeConnections(project.storageConnections),
22
+ dbConnections: sanitizeConnections(project.dbConnections),
23
+ distributionConnections: sanitizeConnections(project.distributionConnections),
24
+ renderFarmConnections: sanitizeConnections(project.renderFarmConnections),
25
+ exports: project.exports?.map((e) => e && 'encryptedCredential' in e ? sanitizeConnection(e) : e),
11
26
  };
12
27
  }
13
28
  function sanitizeUserIntegration(integration) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "streamby-core",
3
- "version": "0.29.12",
3
+ "version": "0.32.0",
4
4
  "description": "StreamBy middleware framework for media storage management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",