@getstrata/core 0.5.46 → 0.5.48
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/entries/auth/sessionGuard.js +0 -21
- package/dist/entries/database/baseRepository.js +1 -1388
- package/dist/entries/database/transaction.js +1 -129
- package/dist/entries/http/webErrorResponse.js +0 -21
- package/dist/entries/queue/createAppQueue.js +0 -21
- package/dist/entries/queue/failedJobRepository.js +0 -21
- package/dist/entries/queue/publicQueue.js +0 -21
- package/dist/entries/queue/queueMetrics.js +0 -21
- package/dist/entries/view.js +0 -21
- package/package.json +2 -2
|
@@ -1589,14 +1589,6 @@ class BaseRepository {
|
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
1591
|
var baseRepository_default = BaseRepository;
|
|
1592
|
-
// ../../src/core/database/connection.ts
|
|
1593
|
-
function createDatabaseConnection(source) {
|
|
1594
|
-
return {
|
|
1595
|
-
async unsafe(query, params = []) {
|
|
1596
|
-
return await source.unsafe(query, params);
|
|
1597
|
-
}
|
|
1598
|
-
};
|
|
1599
|
-
}
|
|
1600
1592
|
// ../../src/core/database/model.ts
|
|
1601
1593
|
var modelRepositories = new WeakMap;
|
|
1602
1594
|
var modelGlobalScopes = new WeakMap;
|
|
@@ -2537,19 +2529,6 @@ function createSchemaBuilder(db, driver) {
|
|
|
2537
2529
|
function defineTable(definition) {
|
|
2538
2530
|
return definition;
|
|
2539
2531
|
}
|
|
2540
|
-
// ../../src/core/database/transaction.ts
|
|
2541
|
-
function supportsTransactions(connection) {
|
|
2542
|
-
return typeof connection.begin === "function";
|
|
2543
|
-
}
|
|
2544
|
-
async function runInTransaction(operation) {
|
|
2545
|
-
const pool = resolveRepositoryConnection();
|
|
2546
|
-
if (!supportsTransactions(pool)) {
|
|
2547
|
-
throw new Error("Active database connection does not support transactions. Bind a client with begin() via bindDatabaseConnection.");
|
|
2548
|
-
}
|
|
2549
|
-
return await pool.begin(async (transaction) => {
|
|
2550
|
-
return await operation(createDatabaseConnection(transaction));
|
|
2551
|
-
});
|
|
2552
|
-
}
|
|
2553
2532
|
// ../../src/config/database.ts
|
|
2554
2533
|
function readInteger(name, fallback) {
|
|
2555
2534
|
const parsed = Number.parseInt(process.env[name] ?? String(fallback), 10);
|