@getstrata/core 0.5.9 → 0.5.10
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/guard.js +8 -1
- package/dist/entries/database.js +8 -1
- package/dist/entries/http/webErrorResponse.js +8 -1
- package/dist/entries/http.js +8 -1
- package/dist/entries/queue/createAppQueue.js +8 -1
- package/dist/entries/queue/publicQueue.js +8 -1
- package/dist/entries/queue/queueMetrics.js +8 -1
- package/dist/entries/view.js +8 -1
- package/dist/index.js +8 -1
- package/package.json +1 -1
|
@@ -2356,8 +2356,15 @@ function defineTable(definition) {
|
|
|
2356
2356
|
return definition;
|
|
2357
2357
|
}
|
|
2358
2358
|
// ../../src/core/database/transaction.ts
|
|
2359
|
+
function supportsTransactions(connection) {
|
|
2360
|
+
return typeof connection.begin === "function";
|
|
2361
|
+
}
|
|
2359
2362
|
async function runInTransaction(operation) {
|
|
2360
|
-
|
|
2363
|
+
const pool = resolveRepositoryConnection();
|
|
2364
|
+
if (!supportsTransactions(pool)) {
|
|
2365
|
+
throw new Error("Active database connection does not support transactions. Bind a client with begin() via bindDatabaseConnection.");
|
|
2366
|
+
}
|
|
2367
|
+
return await pool.begin(async (transaction) => {
|
|
2361
2368
|
return await operation(createDatabaseConnection2(transaction));
|
|
2362
2369
|
});
|
|
2363
2370
|
}
|
package/dist/entries/database.js
CHANGED
|
@@ -2154,8 +2154,15 @@ function defineTable(definition) {
|
|
|
2154
2154
|
return definition;
|
|
2155
2155
|
}
|
|
2156
2156
|
// ../../src/core/database/transaction.ts
|
|
2157
|
+
function supportsTransactions(connection) {
|
|
2158
|
+
return typeof connection.begin === "function";
|
|
2159
|
+
}
|
|
2157
2160
|
async function runInTransaction(operation) {
|
|
2158
|
-
|
|
2161
|
+
const pool = resolveRepositoryConnection();
|
|
2162
|
+
if (!supportsTransactions(pool)) {
|
|
2163
|
+
throw new Error("Active database connection does not support transactions. Bind a client with begin() via bindDatabaseConnection.");
|
|
2164
|
+
}
|
|
2165
|
+
return await pool.begin(async (transaction) => {
|
|
2159
2166
|
return await operation(createDatabaseConnection2(transaction));
|
|
2160
2167
|
});
|
|
2161
2168
|
}
|
|
@@ -2378,8 +2378,15 @@ function defineTable(definition) {
|
|
|
2378
2378
|
return definition;
|
|
2379
2379
|
}
|
|
2380
2380
|
// ../../src/core/database/transaction.ts
|
|
2381
|
+
function supportsTransactions(connection) {
|
|
2382
|
+
return typeof connection.begin === "function";
|
|
2383
|
+
}
|
|
2381
2384
|
async function runInTransaction(operation) {
|
|
2382
|
-
|
|
2385
|
+
const pool = resolveRepositoryConnection();
|
|
2386
|
+
if (!supportsTransactions(pool)) {
|
|
2387
|
+
throw new Error("Active database connection does not support transactions. Bind a client with begin() via bindDatabaseConnection.");
|
|
2388
|
+
}
|
|
2389
|
+
return await pool.begin(async (transaction) => {
|
|
2383
2390
|
return await operation(createDatabaseConnection2(transaction));
|
|
2384
2391
|
});
|
|
2385
2392
|
}
|
package/dist/entries/http.js
CHANGED
|
@@ -2378,8 +2378,15 @@ function defineTable(definition) {
|
|
|
2378
2378
|
return definition;
|
|
2379
2379
|
}
|
|
2380
2380
|
// ../../src/core/database/transaction.ts
|
|
2381
|
+
function supportsTransactions(connection) {
|
|
2382
|
+
return typeof connection.begin === "function";
|
|
2383
|
+
}
|
|
2381
2384
|
async function runInTransaction(operation) {
|
|
2382
|
-
|
|
2385
|
+
const pool = resolveRepositoryConnection();
|
|
2386
|
+
if (!supportsTransactions(pool)) {
|
|
2387
|
+
throw new Error("Active database connection does not support transactions. Bind a client with begin() via bindDatabaseConnection.");
|
|
2388
|
+
}
|
|
2389
|
+
return await pool.begin(async (transaction) => {
|
|
2383
2390
|
return await operation(createDatabaseConnection2(transaction));
|
|
2384
2391
|
});
|
|
2385
2392
|
}
|
|
@@ -2552,8 +2552,15 @@ function defineTable(definition) {
|
|
|
2552
2552
|
return definition;
|
|
2553
2553
|
}
|
|
2554
2554
|
// ../../src/core/database/transaction.ts
|
|
2555
|
+
function supportsTransactions(connection) {
|
|
2556
|
+
return typeof connection.begin === "function";
|
|
2557
|
+
}
|
|
2555
2558
|
async function runInTransaction(operation) {
|
|
2556
|
-
|
|
2559
|
+
const pool = resolveRepositoryConnection();
|
|
2560
|
+
if (!supportsTransactions(pool)) {
|
|
2561
|
+
throw new Error("Active database connection does not support transactions. Bind a client with begin() via bindDatabaseConnection.");
|
|
2562
|
+
}
|
|
2563
|
+
return await pool.begin(async (transaction) => {
|
|
2557
2564
|
return await operation(createDatabaseConnection2(transaction));
|
|
2558
2565
|
});
|
|
2559
2566
|
}
|
|
@@ -2154,8 +2154,15 @@ function defineTable(definition) {
|
|
|
2154
2154
|
return definition;
|
|
2155
2155
|
}
|
|
2156
2156
|
// ../../src/core/database/transaction.ts
|
|
2157
|
+
function supportsTransactions(connection) {
|
|
2158
|
+
return typeof connection.begin === "function";
|
|
2159
|
+
}
|
|
2157
2160
|
async function runInTransaction(operation) {
|
|
2158
|
-
|
|
2161
|
+
const pool = resolveRepositoryConnection();
|
|
2162
|
+
if (!supportsTransactions(pool)) {
|
|
2163
|
+
throw new Error("Active database connection does not support transactions. Bind a client with begin() via bindDatabaseConnection.");
|
|
2164
|
+
}
|
|
2165
|
+
return await pool.begin(async (transaction) => {
|
|
2159
2166
|
return await operation(createDatabaseConnection2(transaction));
|
|
2160
2167
|
});
|
|
2161
2168
|
}
|
|
@@ -2562,8 +2562,15 @@ function defineTable(definition) {
|
|
|
2562
2562
|
return definition;
|
|
2563
2563
|
}
|
|
2564
2564
|
// ../../src/core/database/transaction.ts
|
|
2565
|
+
function supportsTransactions(connection) {
|
|
2566
|
+
return typeof connection.begin === "function";
|
|
2567
|
+
}
|
|
2565
2568
|
async function runInTransaction(operation) {
|
|
2566
|
-
|
|
2569
|
+
const pool = resolveRepositoryConnection();
|
|
2570
|
+
if (!supportsTransactions(pool)) {
|
|
2571
|
+
throw new Error("Active database connection does not support transactions. Bind a client with begin() via bindDatabaseConnection.");
|
|
2572
|
+
}
|
|
2573
|
+
return await pool.begin(async (transaction) => {
|
|
2567
2574
|
return await operation(createDatabaseConnection2(transaction));
|
|
2568
2575
|
});
|
|
2569
2576
|
}
|
package/dist/entries/view.js
CHANGED
|
@@ -2363,8 +2363,15 @@ function defineTable(definition) {
|
|
|
2363
2363
|
return definition;
|
|
2364
2364
|
}
|
|
2365
2365
|
// ../../src/core/database/transaction.ts
|
|
2366
|
+
function supportsTransactions(connection) {
|
|
2367
|
+
return typeof connection.begin === "function";
|
|
2368
|
+
}
|
|
2366
2369
|
async function runInTransaction(operation) {
|
|
2367
|
-
|
|
2370
|
+
const pool = resolveRepositoryConnection();
|
|
2371
|
+
if (!supportsTransactions(pool)) {
|
|
2372
|
+
throw new Error("Active database connection does not support transactions. Bind a client with begin() via bindDatabaseConnection.");
|
|
2373
|
+
}
|
|
2374
|
+
return await pool.begin(async (transaction) => {
|
|
2368
2375
|
return await operation(createDatabaseConnection2(transaction));
|
|
2369
2376
|
});
|
|
2370
2377
|
}
|
package/dist/index.js
CHANGED
|
@@ -2573,8 +2573,15 @@ function defineTable(definition) {
|
|
|
2573
2573
|
return definition;
|
|
2574
2574
|
}
|
|
2575
2575
|
// ../../src/core/database/transaction.ts
|
|
2576
|
+
function supportsTransactions(connection) {
|
|
2577
|
+
return typeof connection.begin === "function";
|
|
2578
|
+
}
|
|
2576
2579
|
async function runInTransaction(operation) {
|
|
2577
|
-
|
|
2580
|
+
const pool = resolveRepositoryConnection();
|
|
2581
|
+
if (!supportsTransactions(pool)) {
|
|
2582
|
+
throw new Error("Active database connection does not support transactions. Bind a client with begin() via bindDatabaseConnection.");
|
|
2583
|
+
}
|
|
2584
|
+
return await pool.begin(async (transaction) => {
|
|
2578
2585
|
return await operation(createDatabaseConnection2(transaction));
|
|
2579
2586
|
});
|
|
2580
2587
|
}
|