@sixb/pg 0.1.10 → 0.1.11
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.
- package/dist/index.js +11 -1
- package/dist/index.js.map +3 -3
- package/package.json +3 -3
- package/src/connector-connection-storage.ts +10 -0
package/dist/index.js
CHANGED
|
@@ -3530,6 +3530,16 @@ class PgConnectorConnectionPersistence {
|
|
|
3530
3530
|
throw error;
|
|
3531
3531
|
}
|
|
3532
3532
|
}
|
|
3533
|
+
async listPendingConnectionRuns() {
|
|
3534
|
+
if (!this.scope.connectorId)
|
|
3535
|
+
return [];
|
|
3536
|
+
const rows = await this.sql`
|
|
3537
|
+
SELECT * FROM connector_connection_runs
|
|
3538
|
+
WHERE project_id = ${this.scope.projectId} AND connector_id = ${this.scope.connectorId}
|
|
3539
|
+
AND (status = 'running' OR (status = 'waiting' AND waiting_for = 'account_selection'))
|
|
3540
|
+
`;
|
|
3541
|
+
return rows.map(connectionRunFromRow);
|
|
3542
|
+
}
|
|
3533
3543
|
async getConnectionRun(id) {
|
|
3534
3544
|
const rows = await this.runById(id);
|
|
3535
3545
|
return rows[0] ? connectionRunFromRow(rows[0]) : null;
|
|
@@ -18110,4 +18120,4 @@ export {
|
|
|
18110
18120
|
migratePostgresStorage
|
|
18111
18121
|
};
|
|
18112
18122
|
|
|
18113
|
-
//# debugId=
|
|
18123
|
+
//# debugId=0CAAAAC02FB5CFD864756E2164756E21
|