@getstrata/core 2.2.36 → 2.2.38
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/CHANGELOG.md +8 -0
- package/dist/core/auth/saml/samlServiceProvider.d.ts +23 -7
- package/dist/core/database/baseRepository.d.ts +4 -0
- package/dist/core/database/index.d.ts +1 -1
- package/dist/core/database/transaction.d.ts +5 -1
- package/dist/entries/audit/exportAuditLogs.js +22 -5
- package/dist/entries/auth/basicAuthGuard.js +22 -5
- package/dist/entries/auth/oauth/samlProvider.js +725 -79
- package/dist/entries/auth/saml/samlServiceProvider.js +725 -79
- package/dist/entries/auth/scimAuthMiddleware.js +121 -8
- package/dist/entries/jobs/exportAuditLogsJob.js +22 -5
- package/dist/entries/queue/queueMetrics.js +22 -5
- package/dist/entries/tenant/databaseTenantContext.js +22 -5
- package/dist/entries/tenant/tenantDatabaseScope.js +22 -5
- package/dist/framework/public-api.d.ts +1 -1
- package/dist/index.js +168 -14
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -853,6 +853,17 @@ var init_repositoryConnection = __esm(() => {
|
|
|
853
853
|
|
|
854
854
|
// ../../src/core/database/transaction.ts
|
|
855
855
|
import { AsyncLocalStorage as AsyncLocalStorage3 } from "async_hooks";
|
|
856
|
+
function scopedConnection(source) {
|
|
857
|
+
const connection = createDatabaseConnection(source);
|
|
858
|
+
transactionAliases.set(connection, source);
|
|
859
|
+
return connection;
|
|
860
|
+
}
|
|
861
|
+
function isActiveTransactionConnection(connection) {
|
|
862
|
+
if (!hasActiveTransaction() || !hasActiveDatabaseConnection())
|
|
863
|
+
return false;
|
|
864
|
+
const active = getActiveDatabaseConnection(connection);
|
|
865
|
+
return connection === active || transactionAliases.get(connection) === active;
|
|
866
|
+
}
|
|
856
867
|
async function runInSavepoint(connection, operation) {
|
|
857
868
|
const inherited = transactionFrame.getStore();
|
|
858
869
|
let parent = inherited?.connection === connection ? inherited : outerFrames.get(connection);
|
|
@@ -869,7 +880,7 @@ async function runInSavepoint(connection, operation) {
|
|
|
869
880
|
return await settleTransaction(() => runWithDeferredModelEvents(async () => {
|
|
870
881
|
await connection.unsafe(`SAVEPOINT ${name}`);
|
|
871
882
|
try {
|
|
872
|
-
const result = await transactionFrame.run({ connection, childActive: false }, () => runWithTransactionScope(async () => commitOrRollbackScope(await operation(
|
|
883
|
+
const result = await transactionFrame.run({ connection, childActive: false }, () => runWithTransactionScope(async () => commitOrRollbackScope(await operation(scopedConnection(connection)))));
|
|
873
884
|
await connection.unsafe(`RELEASE SAVEPOINT ${name}`);
|
|
874
885
|
return result;
|
|
875
886
|
} catch (error) {
|
|
@@ -892,9 +903,12 @@ async function runInTransaction(operation, options = {}) {
|
|
|
892
903
|
signal?.throwIfAborted();
|
|
893
904
|
return operation(connection);
|
|
894
905
|
};
|
|
895
|
-
const pool = resolveRepositoryConnection();
|
|
906
|
+
const pool = options.connection ?? resolveRepositoryConnection();
|
|
896
907
|
if (hasActiveDatabaseConnection()) {
|
|
897
|
-
|
|
908
|
+
const active = getActiveDatabaseConnection(pool);
|
|
909
|
+
if (options.connection && options.connection !== active && options.connection !== transactionRoots.get(active) && transactionAliases.get(options.connection) !== active)
|
|
910
|
+
throw new Error("Cannot switch database connections within an active transaction.");
|
|
911
|
+
return await runInSavepoint(active, admittedOperation);
|
|
898
912
|
}
|
|
899
913
|
if (!supportsTransactions(pool)) {
|
|
900
914
|
throw new Error("Active database connection does not support transactions. Bind a client with begin() via bindDatabaseConnection.");
|
|
@@ -913,14 +927,15 @@ async function runInTransaction(operation, options = {}) {
|
|
|
913
927
|
if (!supportsTransactions(connection))
|
|
914
928
|
throw new Error("Reserved database connection does not support transactions.");
|
|
915
929
|
return await connection.begin(AsyncLocalStorage3.bind(async (transaction) => {
|
|
916
|
-
|
|
930
|
+
transactionRoots.set(transaction, pool);
|
|
931
|
+
return await runWithDatabaseConnection(transaction, () => transactionFrame.run({ connection: transaction, childActive: false }, () => runWithTransactionScope(async () => commitOrRollbackScope(await admittedOperation(scopedConnection(transaction))))));
|
|
917
932
|
}));
|
|
918
933
|
} finally {
|
|
919
934
|
await reserved?.release();
|
|
920
935
|
}
|
|
921
936
|
}));
|
|
922
937
|
}
|
|
923
|
-
var transactionFrame, outerFrames;
|
|
938
|
+
var transactionFrame, outerFrames, transactionRoots, transactionAliases;
|
|
924
939
|
var init_transaction = __esm(() => {
|
|
925
940
|
init_deferredModelEvents();
|
|
926
941
|
init_asyncContextStore();
|
|
@@ -932,6 +947,8 @@ var init_transaction = __esm(() => {
|
|
|
932
947
|
init_acquisitionMetrics();
|
|
933
948
|
transactionFrame = createAsyncContextStore("@getstrata/transactionFrame");
|
|
934
949
|
outerFrames = new WeakMap;
|
|
950
|
+
transactionRoots = new WeakMap;
|
|
951
|
+
transactionAliases = new WeakMap;
|
|
935
952
|
});
|
|
936
953
|
|
|
937
954
|
// ../../src/core/tenant/databaseTenantContext.ts
|
|
@@ -3287,8 +3304,6 @@ function missingOptionalPeer(packageName, reason, error) {
|
|
|
3287
3304
|
}
|
|
3288
3305
|
|
|
3289
3306
|
// ../../src/core/auth/saml/samlAssertionReplay.ts
|
|
3290
|
-
init_boundConnection();
|
|
3291
|
-
init_defaultConnection();
|
|
3292
3307
|
init_dialect();
|
|
3293
3308
|
|
|
3294
3309
|
// ../../src/core/database/errors.ts
|
|
@@ -3404,6 +3419,7 @@ function isUniqueConstraintError(error) {
|
|
|
3404
3419
|
}
|
|
3405
3420
|
|
|
3406
3421
|
// ../../src/core/auth/saml/samlAssertionReplay.ts
|
|
3422
|
+
init_transaction();
|
|
3407
3423
|
var REPLAY_RETENTION_MS = 60 * 60 * 1000;
|
|
3408
3424
|
|
|
3409
3425
|
class InMemorySamlAssertionReplayStore {
|
|
@@ -3431,17 +3447,18 @@ class InMemorySamlAssertionReplayStore {
|
|
|
3431
3447
|
|
|
3432
3448
|
class SqlSamlAssertionReplayStore {
|
|
3433
3449
|
async consume(assertionId) {
|
|
3434
|
-
const sql = getBoundDatabaseConnection() ?? getDefaultDatabasePool();
|
|
3435
3450
|
const dialect = currentSqlDialect();
|
|
3436
3451
|
try {
|
|
3437
|
-
await
|
|
3452
|
+
await runInTransaction(async (connection) => {
|
|
3453
|
+
await connection.unsafe(`INSERT INTO auth_saml_assertions (assertion_id, consumed_at) VALUES (${dialect.placeholder(1)}, ${dialect.placeholder(2)})`, [assertionId, dialect.timestampValue(new Date)]);
|
|
3454
|
+
await connection.unsafe(`DELETE FROM auth_saml_assertions WHERE consumed_at < ${dialect.placeholder(1)}`, [dialect.timestampValue(new Date(Date.now() - REPLAY_RETENTION_MS))]);
|
|
3455
|
+
});
|
|
3438
3456
|
} catch (error) {
|
|
3439
3457
|
if (isUniqueConstraintError(error)) {
|
|
3440
3458
|
throw new Error("SAML assertion replay detected.");
|
|
3441
3459
|
}
|
|
3442
3460
|
throw error;
|
|
3443
3461
|
}
|
|
3444
|
-
await sql.unsafe(`DELETE FROM auth_saml_assertions WHERE consumed_at < ${dialect.placeholder(1)}`, [new Date(Date.now() - REPLAY_RETENTION_MS).toISOString()]);
|
|
3445
3462
|
}
|
|
3446
3463
|
}
|
|
3447
3464
|
var sqlReplayStore = new SqlSamlAssertionReplayStore;
|
|
@@ -3464,6 +3481,7 @@ async function consumeSamlAssertion(assertionId) {
|
|
|
3464
3481
|
}
|
|
3465
3482
|
|
|
3466
3483
|
// ../../src/core/auth/saml/samlServiceProvider.ts
|
|
3484
|
+
var CLOCK_SKEW_MS = 5000;
|
|
3467
3485
|
function readAssertionId(profile) {
|
|
3468
3486
|
if (typeof profile.ID === "string" && profile.ID.trim()) {
|
|
3469
3487
|
return profile.ID.trim();
|
|
@@ -3472,6 +3490,43 @@ function readAssertionId(profile) {
|
|
|
3472
3490
|
const assertionId = parsed?.Assertion?.$?.ID;
|
|
3473
3491
|
return typeof assertionId === "string" ? assertionId.trim() : "";
|
|
3474
3492
|
}
|
|
3493
|
+
function assertBearerRecipient(profile, acsUrl) {
|
|
3494
|
+
const subjects = profile.getAssertion?.()?.Assertion?.Subject;
|
|
3495
|
+
const confirmations = Array.isArray(subjects) && subjects.length === 1 ? subjects[0]?.SubjectConfirmation : undefined;
|
|
3496
|
+
const now = Date.now();
|
|
3497
|
+
const matches = Array.isArray(confirmations) && confirmations.some((confirmation) => {
|
|
3498
|
+
if (confirmation?.$?.Method !== "urn:oasis:names:tc:SAML:2.0:cm:bearer")
|
|
3499
|
+
return false;
|
|
3500
|
+
const data = confirmation.SubjectConfirmationData;
|
|
3501
|
+
if (!Array.isArray(data) || data.length !== 1)
|
|
3502
|
+
return false;
|
|
3503
|
+
const attributes = data[0]?.$;
|
|
3504
|
+
if (attributes?.Recipient !== acsUrl || attributes.NotBefore !== undefined)
|
|
3505
|
+
return false;
|
|
3506
|
+
if (typeof attributes.NotOnOrAfter !== "string")
|
|
3507
|
+
return false;
|
|
3508
|
+
const expires = Date.parse(attributes.NotOnOrAfter);
|
|
3509
|
+
return Number.isFinite(expires) && now < expires + CLOCK_SKEW_MS;
|
|
3510
|
+
});
|
|
3511
|
+
if (!matches)
|
|
3512
|
+
throw new Error("SAML assertion bearer recipient is invalid.");
|
|
3513
|
+
}
|
|
3514
|
+
async function assertResponseDestination(profile, acsUrl) {
|
|
3515
|
+
const xml = profile.getSamlResponseXml?.();
|
|
3516
|
+
const invalid = () => new Error("SAML response destination is invalid.");
|
|
3517
|
+
if (typeof xml !== "string" || !xml.trim())
|
|
3518
|
+
throw invalid();
|
|
3519
|
+
const parserModule = "@xmldom/xmldom";
|
|
3520
|
+
const { DOMParser } = await import(parserModule);
|
|
3521
|
+
const document = new DOMParser({
|
|
3522
|
+
errorHandler: () => {
|
|
3523
|
+
throw invalid();
|
|
3524
|
+
}
|
|
3525
|
+
}).parseFromString(xml, "application/xml");
|
|
3526
|
+
const response = document.documentElement;
|
|
3527
|
+
if (document.doctype || response?.localName !== "Response" || response.namespaceURI !== "urn:oasis:names:tc:SAML:2.0:protocol" || response.getAttribute("Destination") !== acsUrl)
|
|
3528
|
+
throw invalid();
|
|
3529
|
+
}
|
|
3475
3530
|
function requireSamlOption(value, name) {
|
|
3476
3531
|
const trimmed = value?.trim() ?? "";
|
|
3477
3532
|
if (!trimmed) {
|
|
@@ -3536,7 +3591,7 @@ class SamlServiceProvider {
|
|
|
3536
3591
|
idpCert: this.options.idpCert,
|
|
3537
3592
|
audience: this.options.spEntityId,
|
|
3538
3593
|
idpIssuer: this.options.idpIssuer,
|
|
3539
|
-
acceptedClockSkewMs:
|
|
3594
|
+
acceptedClockSkewMs: CLOCK_SKEW_MS,
|
|
3540
3595
|
wantAssertionsSigned: this.options.wantAssertionsSigned ?? true,
|
|
3541
3596
|
wantAuthnResponseSigned: this.options.wantAuthnResponseSigned ?? true,
|
|
3542
3597
|
disableRequestedAuthnContext: this.options.disableRequestedAuthnContext ?? false
|
|
@@ -3567,6 +3622,8 @@ class SamlServiceProvider {
|
|
|
3567
3622
|
if (!assertionId) {
|
|
3568
3623
|
throw new Error("SAML assertion did not include an ID.");
|
|
3569
3624
|
}
|
|
3625
|
+
assertBearerRecipient(profile, this.options.acsUrl);
|
|
3626
|
+
await assertResponseDestination(profile, this.options.acsUrl);
|
|
3570
3627
|
await consumeSamlAssertion(assertionId);
|
|
3571
3628
|
const email = profile.email || (typeof profile["urn:oid:0.9.2342.19200300.100.1.3"] === "string" ? profile["urn:oid:0.9.2342.19200300.100.1.3"] : "") || "";
|
|
3572
3629
|
if (!email) {
|
|
@@ -3743,7 +3800,6 @@ function buildPaginationMeta(input) {
|
|
|
3743
3800
|
}
|
|
3744
3801
|
|
|
3745
3802
|
// ../../src/core/database/baseRepository.ts
|
|
3746
|
-
init_connectionContext();
|
|
3747
3803
|
init_dialect();
|
|
3748
3804
|
|
|
3749
3805
|
// ../../src/core/database/keyset.ts
|
|
@@ -5171,7 +5227,7 @@ class BaseRepository {
|
|
|
5171
5227
|
assertTransactionalEvent(action) {
|
|
5172
5228
|
if (!eventBus.hasTransactionalListeners(modelEventName(this.table.name, action)))
|
|
5173
5229
|
return;
|
|
5174
|
-
if (!hasActiveTransaction() || this.connection !== repositoryConnection && this.connection
|
|
5230
|
+
if (!hasActiveTransaction() || this.connection !== repositoryConnection && !isActiveTransactionConnection(this.connection))
|
|
5175
5231
|
throw new Error("Transactional model listeners require runInTransaction and the framework-bound repository connection before writing.");
|
|
5176
5232
|
}
|
|
5177
5233
|
async runModelMutation(action, operation) {
|
|
@@ -5179,6 +5235,32 @@ class BaseRepository {
|
|
|
5179
5235
|
return operation();
|
|
5180
5236
|
return runInTransaction(operation);
|
|
5181
5237
|
}
|
|
5238
|
+
mysqlMutation(operation) {
|
|
5239
|
+
return runInTransaction((db) => operation(this.withConnection(db)), this.connection === repositoryConnection ? {} : { connection: this.connection });
|
|
5240
|
+
}
|
|
5241
|
+
mysqlRow(id, onlyTrashed = false) {
|
|
5242
|
+
if (id === undefined || id === null)
|
|
5243
|
+
throw new Error(`MySQL write to ${this.table.name} did not identify its persisted primary key.`);
|
|
5244
|
+
return this.firstOrNull({ [this.table.primaryKey]: id }, {
|
|
5245
|
+
withTrashed: true,
|
|
5246
|
+
...onlyTrashed ? { onlyTrashed: true } : {}
|
|
5247
|
+
});
|
|
5248
|
+
}
|
|
5249
|
+
mysqlAffected(row) {
|
|
5250
|
+
const count = row?.affectedRows;
|
|
5251
|
+
if (count === undefined || !Number.isSafeInteger(count) || count < 0)
|
|
5252
|
+
throw new Error("MySQL mutations require affectedRows metadata from the framework adapter.");
|
|
5253
|
+
return count;
|
|
5254
|
+
}
|
|
5255
|
+
async mysqlWriteById(query, id, onlyTrashed = false, allowUnchanged = false) {
|
|
5256
|
+
const [row] = await this.connection.unsafe(query.text, query.params);
|
|
5257
|
+
if (!this.mysqlAffected(row)) {
|
|
5258
|
+
if (!allowUnchanged)
|
|
5259
|
+
return null;
|
|
5260
|
+
return this.findById(id);
|
|
5261
|
+
}
|
|
5262
|
+
return this.mysqlRow(id, onlyTrashed);
|
|
5263
|
+
}
|
|
5182
5264
|
async count(options = {}) {
|
|
5183
5265
|
if (options.lock)
|
|
5184
5266
|
throw new Error("Row locks require a row selection, not count().");
|
|
@@ -5187,7 +5269,7 @@ class BaseRepository {
|
|
|
5187
5269
|
}
|
|
5188
5270
|
async findAll(options = {}) {
|
|
5189
5271
|
return await withDatabaseErrorHandling(async () => {
|
|
5190
|
-
if (options.lock && (!hasActiveTransaction() || this.connection !== repositoryConnection && this.connection
|
|
5272
|
+
if (options.lock && (!hasActiveTransaction() || this.connection !== repositoryConnection && !isActiveTransactionConnection(this.connection))) {
|
|
5191
5273
|
throw new Error("Row locks require the framework active transaction connection.");
|
|
5192
5274
|
}
|
|
5193
5275
|
const { whereNodes, ...queryOptions } = options;
|
|
@@ -5399,6 +5481,32 @@ class BaseRepository {
|
|
|
5399
5481
|
return record ?? null;
|
|
5400
5482
|
}
|
|
5401
5483
|
async upsert(values, conflictColumns, updateColumns) {
|
|
5484
|
+
if (currentSqlDialect().driver === "mysql")
|
|
5485
|
+
return this.mysqlMutation((repository) => withDatabaseErrorHandling(async () => {
|
|
5486
|
+
const where = {};
|
|
5487
|
+
for (const column of conflictColumns) {
|
|
5488
|
+
if (!this.table.columns.includes(column) || values[column] === undefined || values[column] === null)
|
|
5489
|
+
throw new Error("MySQL upsert requires non-null supplied conflict-column values.");
|
|
5490
|
+
where[column] = values[column];
|
|
5491
|
+
}
|
|
5492
|
+
const query = buildUpsertQuery(this.table, values, conflictColumns, updateColumns);
|
|
5493
|
+
const supplied = this.table.columns.filter((column) => values[column] !== undefined);
|
|
5494
|
+
const updates = updateColumns ?? supplied.filter((column) => !conflictColumns.includes(column));
|
|
5495
|
+
const doNothing = !updates.some((column) => supplied.includes(column));
|
|
5496
|
+
const existing = doNothing ? await repository.firstOrNull(where, {
|
|
5497
|
+
withTrashed: true,
|
|
5498
|
+
lock: { mode: "update" }
|
|
5499
|
+
}) : null;
|
|
5500
|
+
const [result] = await repository.connection.unsafe(query.text, query.params);
|
|
5501
|
+
repository.mysqlAffected(result);
|
|
5502
|
+
if (doNothing && existing)
|
|
5503
|
+
return null;
|
|
5504
|
+
const generated = result?.insertId;
|
|
5505
|
+
const row = generated !== undefined && String(generated) !== "0" ? await repository.mysqlRow(generated) : await repository.firstOrNull(where, { withTrashed: true });
|
|
5506
|
+
if (!row)
|
|
5507
|
+
throw new Error("MySQL upsert could not resolve the persisted row; transaction rolled back.");
|
|
5508
|
+
return row;
|
|
5509
|
+
}));
|
|
5402
5510
|
return await withDatabaseErrorHandling(async () => {
|
|
5403
5511
|
const { text, params } = buildUpsertQuery(this.table, values, conflictColumns, updateColumns);
|
|
5404
5512
|
const [record] = await this.connection.unsafe(text, params);
|
|
@@ -5406,6 +5514,8 @@ class BaseRepository {
|
|
|
5406
5514
|
});
|
|
5407
5515
|
}
|
|
5408
5516
|
async incrementById(id, column, amount = 1, extra = {}) {
|
|
5517
|
+
if (currentSqlDialect().driver === "mysql")
|
|
5518
|
+
return this.mysqlMutation((repository) => withDatabaseErrorHandling(() => repository.mysqlWriteById(buildIncrementQuery(this.table, id, column, amount, extra), id, false, true)));
|
|
5409
5519
|
return await withDatabaseErrorHandling(async () => {
|
|
5410
5520
|
const { text, params } = buildIncrementQuery(this.table, id, column, amount, extra);
|
|
5411
5521
|
const [record] = await this.connection.unsafe(text, params);
|
|
@@ -5417,6 +5527,18 @@ class BaseRepository {
|
|
|
5417
5527
|
}
|
|
5418
5528
|
async create(values) {
|
|
5419
5529
|
this.assertTransactionalEvent("created");
|
|
5530
|
+
if (currentSqlDialect().driver === "mysql")
|
|
5531
|
+
return this.mysqlMutation((repository) => withDatabaseErrorHandling(async () => {
|
|
5532
|
+
const query = buildInsertQuery(this.table, values);
|
|
5533
|
+
const [result] = await repository.connection.unsafe(query.text, query.params);
|
|
5534
|
+
repository.mysqlAffected(result);
|
|
5535
|
+
const key = String(result?.insertId ?? "0") !== "0" ? result?.insertId : values[this.table.primaryKey];
|
|
5536
|
+
const row = await repository.mysqlRow(key);
|
|
5537
|
+
if (!row)
|
|
5538
|
+
throw new Error(`Insert into ${this.table.name} did not return a record.`);
|
|
5539
|
+
await dispatchModelEvent(modelEventName(this.table.name, "created"), row);
|
|
5540
|
+
return row;
|
|
5541
|
+
}));
|
|
5420
5542
|
return await this.runModelMutation("created", () => withDatabaseErrorHandling(async () => {
|
|
5421
5543
|
const { text, params } = buildInsertQuery(this.table, values);
|
|
5422
5544
|
const [record] = await this.connection.unsafe(text, params);
|
|
@@ -5452,6 +5574,13 @@ class BaseRepository {
|
|
|
5452
5574
|
}
|
|
5453
5575
|
async updateById(id, changes) {
|
|
5454
5576
|
this.assertTransactionalEvent("updated");
|
|
5577
|
+
if (currentSqlDialect().driver === "mysql")
|
|
5578
|
+
return this.mysqlMutation((repository) => withDatabaseErrorHandling(async () => {
|
|
5579
|
+
const row = await repository.mysqlWriteById(buildUpdateQuery(this.table, id, changes), id, false, true);
|
|
5580
|
+
if (row)
|
|
5581
|
+
await dispatchModelEvent(modelEventName(this.table.name, "updated"), row);
|
|
5582
|
+
return row;
|
|
5583
|
+
}));
|
|
5455
5584
|
return await this.runModelMutation("updated", () => withDatabaseErrorHandling(async () => {
|
|
5456
5585
|
const { text, params } = buildUpdateQuery(this.table, id, changes);
|
|
5457
5586
|
const [record] = await this.connection.unsafe(text, params);
|
|
@@ -5477,6 +5606,14 @@ class BaseRepository {
|
|
|
5477
5606
|
}
|
|
5478
5607
|
async softDeleteById(id) {
|
|
5479
5608
|
this.assertTransactionalEvent("deleted");
|
|
5609
|
+
if (currentSqlDialect().driver === "mysql")
|
|
5610
|
+
return this.mysqlMutation((repository) => withDatabaseErrorHandling(async () => {
|
|
5611
|
+
const row = await repository.mysqlWriteById(buildSoftDeleteByIdQuery(this.table, id, new Date), id, true);
|
|
5612
|
+
if (!row)
|
|
5613
|
+
return false;
|
|
5614
|
+
await dispatchModelEvent(modelEventName(this.table.name, "deleted"), row);
|
|
5615
|
+
return true;
|
|
5616
|
+
}));
|
|
5480
5617
|
return await this.runModelMutation("deleted", () => withDatabaseErrorHandling(async () => {
|
|
5481
5618
|
const { text, params } = buildSoftDeleteByIdQuery(this.table, id, new Date);
|
|
5482
5619
|
const [record] = await this.connection.unsafe(text, params);
|
|
@@ -5489,6 +5626,15 @@ class BaseRepository {
|
|
|
5489
5626
|
}
|
|
5490
5627
|
async forceDeleteById(id) {
|
|
5491
5628
|
this.assertTransactionalEvent("force-deleted");
|
|
5629
|
+
if (currentSqlDialect().driver === "mysql")
|
|
5630
|
+
return this.mysqlMutation((repository) => withDatabaseErrorHandling(async () => {
|
|
5631
|
+
const query = buildDeleteByIdQuery(this.table, id);
|
|
5632
|
+
const [result] = await repository.connection.unsafe(query.text, query.params);
|
|
5633
|
+
if (!repository.mysqlAffected(result))
|
|
5634
|
+
return false;
|
|
5635
|
+
await dispatchModelEvent(modelEventName(this.table.name, "force-deleted"), { id });
|
|
5636
|
+
return true;
|
|
5637
|
+
}));
|
|
5492
5638
|
return await this.runModelMutation("force-deleted", () => withDatabaseErrorHandling(async () => {
|
|
5493
5639
|
const { text, params } = buildDeleteByIdQuery(this.table, id);
|
|
5494
5640
|
const [row] = await this.connection.unsafe(text, params);
|
|
@@ -5503,6 +5649,13 @@ class BaseRepository {
|
|
|
5503
5649
|
}
|
|
5504
5650
|
async restoreById(id) {
|
|
5505
5651
|
this.assertTransactionalEvent("restored");
|
|
5652
|
+
if (currentSqlDialect().driver === "mysql")
|
|
5653
|
+
return this.mysqlMutation((repository) => withDatabaseErrorHandling(async () => {
|
|
5654
|
+
const row = await repository.mysqlWriteById(buildRestoreByIdQuery(this.table, id), id);
|
|
5655
|
+
if (row)
|
|
5656
|
+
await dispatchModelEvent(modelEventName(this.table.name, "restored"), row);
|
|
5657
|
+
return row;
|
|
5658
|
+
}));
|
|
5506
5659
|
return await this.runModelMutation("restored", () => withDatabaseErrorHandling(async () => {
|
|
5507
5660
|
const { text, params } = buildRestoreByIdQuery(this.table, id);
|
|
5508
5661
|
const [record] = await this.connection.unsafe(text, params);
|
|
@@ -17204,6 +17357,7 @@ export {
|
|
|
17204
17357
|
indexMorphToRelation,
|
|
17205
17358
|
inferReferencedTable,
|
|
17206
17359
|
installGracefulShutdownSignals,
|
|
17360
|
+
isActiveTransactionConnection,
|
|
17207
17361
|
isBlockedHostname,
|
|
17208
17362
|
isBlockedIpAddress,
|
|
17209
17363
|
isDefaultDatabaseConnection,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getstrata/core",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.38",
|
|
4
4
|
"description": "Strata Bun framework public API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -955,10 +955,10 @@
|
|
|
955
955
|
],
|
|
956
956
|
"scripts": {
|
|
957
957
|
"build": "rm -rf dist && bun run build:bundle && bun run build:shims && bun run build:subpaths && bun run build:types",
|
|
958
|
-
"build:bundle": "bun build index.ts --outdir dist --target bun --external bun --external '@opentelemetry/*' --external eta --external mysql2 --external @node-saml/node-saml",
|
|
958
|
+
"build:bundle": "bun build index.ts --outdir dist --target bun --external bun --external '@opentelemetry/*' --external eta --external mysql2 --external @node-saml/node-saml --external @xmldom/xmldom",
|
|
959
959
|
"build:types": "tsc -p tsconfig.types.json",
|
|
960
960
|
"prepublishOnly": "bun run build && bun ../../scripts/prepare-core-package-publish.ts",
|
|
961
|
-
"build:subpaths": "bun build entries/auth/accountState.ts entries/auth/accountStateMigration.ts entries/auth/accessControl.ts entries/auth/abilityChecker.ts entries/auth/emailVerification.ts entries/auth/jwt.ts entries/auth/jwtGuard.ts entries/auth/basicAuthGuard.ts entries/auth/tokenAbilityChecker.ts entries/auth/membershipMiddleware.ts entries/auth/membershipScope.ts entries/auth/membershipService.ts entries/auth/oauth/oidcProvider.ts entries/auth/oauth/providers.ts entries/auth/oauth/samlProvider.ts entries/auth/oauth/types.ts entries/auth/saml/samlServiceProvider.ts entries/auth/password.ts entries/auth/passwordLogin.ts entries/auth/pendingMfaCookie.ts entries/auth/oneTimeToken.ts entries/auth/intendedUrlCookie.ts entries/auth/passwordConfirmCookie.ts entries/auth/policy.ts entries/auth/scimAuthMiddleware.ts entries/auth/sessionCookie.ts entries/auth/sessionGuard.ts entries/auth/tokenHash.ts entries/audit/exportAuditLogs.ts entries/audit/siemFormatter.ts entries/admin/formatValue.ts entries/admin/registry.ts entries/admin/types.ts entries/cache/tags.ts entries/cache/createCacheStore.ts entries/cache/repository.ts entries/cache/simpleCache.ts entries/cache/simpleCacheStore.ts entries/config/envSchema.ts entries/contracts/serviceTokens.ts entries/contracts/authUserDirectory.ts entries/contracts/container.ts entries/contracts/di.ts entries/crypto/fieldEncryption.ts entries/crypto/mfaSecret.ts entries/database/errors.ts entries/database/factory.ts entries/database/migrations.ts entries/database/migrations/types.ts entries/database/query.ts entries/database/relationships.ts entries/database/repositoryQuery.ts entries/database/seeders.ts entries/database/seeders/types.ts entries/database/schema.ts entries/database/sqliteConnection.ts entries/database/table.ts entries/database/types.ts entries/database/whereBuilder.ts entries/facades.ts entries/http/authMiddleware.ts entries/http/authorizeMiddleware.ts entries/http/bodySizeLimitMiddleware.ts entries/http/clientIp.ts entries/http/cookies.ts entries/http/contentNegotiation.ts entries/http/conditionalResponse.ts entries/http/corsMiddleware.ts entries/http/csrfMiddleware.ts entries/http/csrfProtection.ts entries/http/csrfToken.ts entries/http/etag.ts entries/http/flashSession.ts entries/http/flashMiddleware.ts entries/http/formRequest.ts entries/http/metricsMiddleware.ts entries/http/memoryThrottleMiddleware.ts entries/http/pagination.ts entries/http/parseFormBody.ts entries/http/parseMultipartUpload.ts entries/http/requireAbilityMiddleware.ts entries/http/requireAuthMiddleware.ts entries/http/requireGlobalAdminMiddleware.ts entries/http/requireWebAuthMiddleware.ts entries/http/requireVerifiedMiddleware.ts entries/http/requirePasswordConfirmMiddleware.ts entries/http/resources.ts entries/http/response.ts entries/http/route.ts entries/http/routeMiddleware.ts entries/http/routeModelBinding.ts entries/http/safeInternalPath.ts entries/http/signedUrl.ts entries/http/statelessAuth.ts entries/http/scimThrottleMiddleware.ts entries/http/securityHeadersMiddleware.ts entries/http/securedRouteModelBinding.ts entries/http/webFormRequest.ts entries/http/throttleMiddleware.ts entries/http/uploads.ts entries/http/validation.ts entries/jobs/exportAuditLogsJob.ts entries/jobs/invalidateCacheTagsJob.ts entries/logging/logger.ts entries/logging/requestLoggingMiddleware.ts entries/mail/mailer.ts entries/mail/markdownMail.ts entries/mail/markdownMailable.ts entries/mail/sanitizeMailHtml.ts entries/media/imageTransform.ts entries/metrics/prometheus.ts entries/openapi/generator.ts entries/openapi/registeredRoute.ts entries/openapi/validate.ts entries/pagination.ts entries/queue.ts entries/queue/createAppQueue.ts entries/queue/failedJobRepository.ts entries/queue/failedJobService.ts entries/queue/jobRunner.ts entries/queue/queueMetrics.ts entries/queue/publicQueue.ts entries/queue/redisQueue.ts entries/queue/types.ts entries/runtime/appEnv.ts entries/runtime/frontendMode.ts entries/runtime/asyncContextStore.ts entries/scheduler/osCron.ts entries/security/oauthState.ts entries/security/publicReads.ts entries/security/recoveryCodes.ts entries/security/safeFetch.ts entries/security/safePath.ts entries/security/scimTenantTokens.ts entries/security/stripeWebhook.ts entries/security/webhookSignature.ts entries/security/timingSafeCompare.ts entries/security/tokenExpiry.ts entries/security/totp.ts entries/storage/storage.ts entries/tenant/tenancyConfig.ts entries/tenant/tenantDatabaseScope.ts entries/tenant/databaseTenantContext.ts entries/tenant/enableTenantRls.ts entries/terminal/runShell.ts entries/tracing/tracingMiddleware.ts entries/validation/rules.ts --outdir dist --root . --target bun --external bun --external '@opentelemetry/*' --external eta --external mysql2 --external @node-saml/node-saml --external @getstrata/core --external @getstrata/core/auth/accountState --external @getstrata/core/auth/accountStateMigration --external @getstrata/core/auth/accessControl --external @getstrata/core/auth/abilityChecker --external @getstrata/core/auth/authContext --external @getstrata/core/auth/emailVerification --external @getstrata/core/auth/guard --external @getstrata/core/auth/jwt --external @getstrata/core/auth/jwtGuard --external @getstrata/core/auth/basicAuthGuard --external @getstrata/core/auth/tokenAbilityChecker --external @getstrata/core/auth/membershipContext --external @getstrata/core/auth/membershipMiddleware --external @getstrata/core/auth/membershipScope --external @getstrata/core/auth/membershipService --external @getstrata/core/auth/oauth/oidcProvider --external @getstrata/core/auth/oauth/providers --external @getstrata/core/auth/oauth/samlProvider --external @getstrata/core/auth/oauth/types --external @getstrata/core/auth/saml/samlServiceProvider --external @getstrata/core/auth/password --external @getstrata/core/auth/passwordLogin --external @getstrata/core/auth/pendingMfaCookie --external @getstrata/core/auth/oneTimeToken --external @getstrata/core/auth/intendedUrlCookie --external @getstrata/core/auth/passwordConfirmCookie --external @getstrata/core/auth/policy --external @getstrata/core/auth/scimAuthMiddleware --external @getstrata/core/auth/sessionCookie --external @getstrata/core/auth/sessionGuard --external @getstrata/core/auth/tokenHash --external @getstrata/core/audit/exportAuditLogs --external @getstrata/core/audit/siemFormatter --external @getstrata/core/admin/formatValue --external @getstrata/core/admin/registry --external @getstrata/core/admin/types --external @getstrata/core/cache/tags --external @getstrata/core/cache/createCacheStore --external @getstrata/core/cache/repository --external @getstrata/core/cache/simpleCache --external @getstrata/core/cache/simpleCacheStore --external @getstrata/core/config/envSchema --external @getstrata/core/contracts/serviceTokens --external @getstrata/core/contracts/authUserDirectory --external @getstrata/core/contracts/container --external @getstrata/core/contracts/di --external @getstrata/core/crypto/fieldEncryption --external @getstrata/core/crypto/fieldEncryptionRotation --external @getstrata/core/crypto/mfaSecret --external @getstrata/core/database --external @getstrata/core/database/baseRepository --external @getstrata/core/database/bindConnection --external @getstrata/core/database/boundConnection --external @getstrata/core/database/bunSql --external @getstrata/core/database/connection --external @getstrata/core/database/connectionContext --external @getstrata/core/database/defaultConnection --external @getstrata/core/database/dialect --external @getstrata/core/database/mysqlConnection --external @getstrata/core/database/namedConnections --external @getstrata/core/database/errors --external @getstrata/core/database/factory --external @getstrata/core/database/migrations --external @getstrata/core/database/migrations/types --external @getstrata/core/database/model --external @getstrata/core/database/query --external @getstrata/core/database/relationships --external @getstrata/core/database/repositoryConnection --external @getstrata/core/database/repositoryQuery --external @getstrata/core/database/seeders --external @getstrata/core/database/seeders/types --external @getstrata/core/database/schema --external @getstrata/core/database/sqliteConnection --external @getstrata/core/database/table --external @getstrata/core/database/transaction --external @getstrata/core/database/types --external @getstrata/core/database/whereBuilder --external @getstrata/core/errors/http --external @getstrata/core/events --external @getstrata/core/events/outbox --external @getstrata/core/facades --external @getstrata/core/http --external @getstrata/core/http/authMiddleware --external @getstrata/core/http/authorizeMiddleware --external @getstrata/core/http/bodySizeLimitMiddleware --external @getstrata/core/http/clientIp --external @getstrata/core/http/cookies --external @getstrata/core/http/contentNegotiation --external @getstrata/core/http/contentSecurityPolicy --external @getstrata/core/http/conditionalResponse --external @getstrata/core/http/corsMiddleware --external @getstrata/core/http/csrfMiddleware --external @getstrata/core/http/csrfProtection --external @getstrata/core/http/csrfToken --external @getstrata/core/http/etag --external @getstrata/core/http/flashSession --external @getstrata/core/http/flashMiddleware --external @getstrata/core/http/formRequest --external @getstrata/core/http/middleware --external @getstrata/core/http/metricsMiddleware --external @getstrata/core/http/loginThrottleMiddleware --external @getstrata/core/http/memoryThrottleMiddleware --external @getstrata/core/http/pagination --external @getstrata/core/http/parseFormBody --external @getstrata/core/http/parseMultipartUpload --external @getstrata/core/http/requireAbilityMiddleware --external @getstrata/core/http/requireAuthMiddleware --external @getstrata/core/http/requireGlobalAdminMiddleware --external @getstrata/core/http/requireWebAuthMiddleware --external @getstrata/core/http/requireVerifiedMiddleware --external @getstrata/core/http/requirePasswordConfirmMiddleware --external @getstrata/core/http/resources --external @getstrata/core/http/response --external @getstrata/core/http/route --external @getstrata/core/http/routeMiddleware --external @getstrata/core/http/routeModelBinding --external @getstrata/core/http/safeInternalPath --external @getstrata/core/http/signedUrl --external @getstrata/core/http/statelessAuth --external @getstrata/core/http/scimThrottleMiddleware --external @getstrata/core/http/securityHeadersMiddleware --external @getstrata/core/http/securedRouteModelBinding --external @getstrata/core/http/requestMetaContext --external @getstrata/core/http/webErrorResponse --external @getstrata/core/http/webFormRequest --external @getstrata/core/http/throttleMiddleware --external @getstrata/core/http/uploads --external @getstrata/core/http/validation --external @getstrata/core/jobs/exportAuditLogsJob --external @getstrata/core/jobs/invalidateCacheTagsJob --external @getstrata/core/lifecycle/gracefulShutdown --external @getstrata/core/logging/logger --external @getstrata/core/logging/requestLoggingMiddleware --external @getstrata/core/mail/mailer --external @getstrata/core/mail/markdownMail --external @getstrata/core/mail/markdownMailable --external @getstrata/core/mail/sanitizeMailHtml --external @getstrata/core/media/imageTransform --external @getstrata/core/metrics/prometheus --external @getstrata/core/notifications --external @getstrata/core/openapi/generator --external @getstrata/core/openapi/registeredRoute --external @getstrata/core/openapi/validate --external @getstrata/core/pagination --external @getstrata/core/queue --external @getstrata/core/queue/createAppQueue --external @getstrata/core/queue/failedJobRepository --external @getstrata/core/queue/failedJobService --external @getstrata/core/queue/jobRegistry --external @getstrata/core/queue/jobRunner --external @getstrata/core/queue/queueMetrics --external @getstrata/core/queue/publicQueue --external @getstrata/core/queue/redisQueue --external @getstrata/core/queue/types --external @getstrata/core/runtime/appEnv --external @getstrata/core/runtime/appKeyPrefix --external @getstrata/core/runtime/frontendMode --external @getstrata/core/runtime/applicationRegistry --external @getstrata/core/runtime/asyncContextStore --external @getstrata/core/scheduler/schedule --external @getstrata/core/scheduler/osCron --external @getstrata/core/security/oauthState --external @getstrata/core/security/publicReads --external @getstrata/core/security/recoveryCodes --external @getstrata/core/security/safeFetch --external @getstrata/core/security/safePath --external @getstrata/core/security/safeUrl --external @getstrata/core/security/scimTenantTokens --external @getstrata/core/security/securityEvents --external @getstrata/core/security/stripeWebhook --external @getstrata/core/security/webhookSignature --external @getstrata/core/security/timingSafeCompare --external @getstrata/core/security/tokenExpiry --external @getstrata/core/security/totp --external @getstrata/core/storage/storage --external @getstrata/core/tenant/tenancyConfig --external @getstrata/core/tenant/tenantContext --external @getstrata/core/tenant/tenantDatabaseScope --external @getstrata/core/tenant/databaseTenantContext --external @getstrata/core/tenant/tenantMiddleware --external @getstrata/core/tenant/enableTenantRls --external @getstrata/core/terminal/runShell --external @getstrata/core/tracing/traceContext --external @getstrata/core/tracing/tracingMiddleware --external @getstrata/core/validation/rules --external @getstrata/core/view",
|
|
961
|
+
"build:subpaths": "bun build entries/auth/accountState.ts entries/auth/accountStateMigration.ts entries/auth/accessControl.ts entries/auth/abilityChecker.ts entries/auth/emailVerification.ts entries/auth/jwt.ts entries/auth/jwtGuard.ts entries/auth/basicAuthGuard.ts entries/auth/tokenAbilityChecker.ts entries/auth/membershipMiddleware.ts entries/auth/membershipScope.ts entries/auth/membershipService.ts entries/auth/oauth/oidcProvider.ts entries/auth/oauth/providers.ts entries/auth/oauth/samlProvider.ts entries/auth/oauth/types.ts entries/auth/saml/samlServiceProvider.ts entries/auth/password.ts entries/auth/passwordLogin.ts entries/auth/pendingMfaCookie.ts entries/auth/oneTimeToken.ts entries/auth/intendedUrlCookie.ts entries/auth/passwordConfirmCookie.ts entries/auth/policy.ts entries/auth/scimAuthMiddleware.ts entries/auth/sessionCookie.ts entries/auth/sessionGuard.ts entries/auth/tokenHash.ts entries/audit/exportAuditLogs.ts entries/audit/siemFormatter.ts entries/admin/formatValue.ts entries/admin/registry.ts entries/admin/types.ts entries/cache/tags.ts entries/cache/createCacheStore.ts entries/cache/repository.ts entries/cache/simpleCache.ts entries/cache/simpleCacheStore.ts entries/config/envSchema.ts entries/contracts/serviceTokens.ts entries/contracts/authUserDirectory.ts entries/contracts/container.ts entries/contracts/di.ts entries/crypto/fieldEncryption.ts entries/crypto/mfaSecret.ts entries/database/errors.ts entries/database/factory.ts entries/database/migrations.ts entries/database/migrations/types.ts entries/database/query.ts entries/database/relationships.ts entries/database/repositoryQuery.ts entries/database/seeders.ts entries/database/seeders/types.ts entries/database/schema.ts entries/database/sqliteConnection.ts entries/database/table.ts entries/database/types.ts entries/database/whereBuilder.ts entries/facades.ts entries/http/authMiddleware.ts entries/http/authorizeMiddleware.ts entries/http/bodySizeLimitMiddleware.ts entries/http/clientIp.ts entries/http/cookies.ts entries/http/contentNegotiation.ts entries/http/conditionalResponse.ts entries/http/corsMiddleware.ts entries/http/csrfMiddleware.ts entries/http/csrfProtection.ts entries/http/csrfToken.ts entries/http/etag.ts entries/http/flashSession.ts entries/http/flashMiddleware.ts entries/http/formRequest.ts entries/http/metricsMiddleware.ts entries/http/memoryThrottleMiddleware.ts entries/http/pagination.ts entries/http/parseFormBody.ts entries/http/parseMultipartUpload.ts entries/http/requireAbilityMiddleware.ts entries/http/requireAuthMiddleware.ts entries/http/requireGlobalAdminMiddleware.ts entries/http/requireWebAuthMiddleware.ts entries/http/requireVerifiedMiddleware.ts entries/http/requirePasswordConfirmMiddleware.ts entries/http/resources.ts entries/http/response.ts entries/http/route.ts entries/http/routeMiddleware.ts entries/http/routeModelBinding.ts entries/http/safeInternalPath.ts entries/http/signedUrl.ts entries/http/statelessAuth.ts entries/http/scimThrottleMiddleware.ts entries/http/securityHeadersMiddleware.ts entries/http/securedRouteModelBinding.ts entries/http/webFormRequest.ts entries/http/throttleMiddleware.ts entries/http/uploads.ts entries/http/validation.ts entries/jobs/exportAuditLogsJob.ts entries/jobs/invalidateCacheTagsJob.ts entries/logging/logger.ts entries/logging/requestLoggingMiddleware.ts entries/mail/mailer.ts entries/mail/markdownMail.ts entries/mail/markdownMailable.ts entries/mail/sanitizeMailHtml.ts entries/media/imageTransform.ts entries/metrics/prometheus.ts entries/openapi/generator.ts entries/openapi/registeredRoute.ts entries/openapi/validate.ts entries/pagination.ts entries/queue.ts entries/queue/createAppQueue.ts entries/queue/failedJobRepository.ts entries/queue/failedJobService.ts entries/queue/jobRunner.ts entries/queue/queueMetrics.ts entries/queue/publicQueue.ts entries/queue/redisQueue.ts entries/queue/types.ts entries/runtime/appEnv.ts entries/runtime/frontendMode.ts entries/runtime/asyncContextStore.ts entries/scheduler/osCron.ts entries/security/oauthState.ts entries/security/publicReads.ts entries/security/recoveryCodes.ts entries/security/safeFetch.ts entries/security/safePath.ts entries/security/scimTenantTokens.ts entries/security/stripeWebhook.ts entries/security/webhookSignature.ts entries/security/timingSafeCompare.ts entries/security/tokenExpiry.ts entries/security/totp.ts entries/storage/storage.ts entries/tenant/tenancyConfig.ts entries/tenant/tenantDatabaseScope.ts entries/tenant/databaseTenantContext.ts entries/tenant/enableTenantRls.ts entries/terminal/runShell.ts entries/tracing/tracingMiddleware.ts entries/validation/rules.ts --outdir dist --root . --target bun --external bun --external '@opentelemetry/*' --external eta --external mysql2 --external @node-saml/node-saml --external @xmldom/xmldom --external @getstrata/core --external @getstrata/core/auth/accountState --external @getstrata/core/auth/accountStateMigration --external @getstrata/core/auth/accessControl --external @getstrata/core/auth/abilityChecker --external @getstrata/core/auth/authContext --external @getstrata/core/auth/emailVerification --external @getstrata/core/auth/guard --external @getstrata/core/auth/jwt --external @getstrata/core/auth/jwtGuard --external @getstrata/core/auth/basicAuthGuard --external @getstrata/core/auth/tokenAbilityChecker --external @getstrata/core/auth/membershipContext --external @getstrata/core/auth/membershipMiddleware --external @getstrata/core/auth/membershipScope --external @getstrata/core/auth/membershipService --external @getstrata/core/auth/oauth/oidcProvider --external @getstrata/core/auth/oauth/providers --external @getstrata/core/auth/oauth/samlProvider --external @getstrata/core/auth/oauth/types --external @getstrata/core/auth/saml/samlServiceProvider --external @getstrata/core/auth/password --external @getstrata/core/auth/passwordLogin --external @getstrata/core/auth/pendingMfaCookie --external @getstrata/core/auth/oneTimeToken --external @getstrata/core/auth/intendedUrlCookie --external @getstrata/core/auth/passwordConfirmCookie --external @getstrata/core/auth/policy --external @getstrata/core/auth/scimAuthMiddleware --external @getstrata/core/auth/sessionCookie --external @getstrata/core/auth/sessionGuard --external @getstrata/core/auth/tokenHash --external @getstrata/core/audit/exportAuditLogs --external @getstrata/core/audit/siemFormatter --external @getstrata/core/admin/formatValue --external @getstrata/core/admin/registry --external @getstrata/core/admin/types --external @getstrata/core/cache/tags --external @getstrata/core/cache/createCacheStore --external @getstrata/core/cache/repository --external @getstrata/core/cache/simpleCache --external @getstrata/core/cache/simpleCacheStore --external @getstrata/core/config/envSchema --external @getstrata/core/contracts/serviceTokens --external @getstrata/core/contracts/authUserDirectory --external @getstrata/core/contracts/container --external @getstrata/core/contracts/di --external @getstrata/core/crypto/fieldEncryption --external @getstrata/core/crypto/fieldEncryptionRotation --external @getstrata/core/crypto/mfaSecret --external @getstrata/core/database --external @getstrata/core/database/baseRepository --external @getstrata/core/database/bindConnection --external @getstrata/core/database/boundConnection --external @getstrata/core/database/bunSql --external @getstrata/core/database/connection --external @getstrata/core/database/connectionContext --external @getstrata/core/database/defaultConnection --external @getstrata/core/database/dialect --external @getstrata/core/database/mysqlConnection --external @getstrata/core/database/namedConnections --external @getstrata/core/database/errors --external @getstrata/core/database/factory --external @getstrata/core/database/migrations --external @getstrata/core/database/migrations/types --external @getstrata/core/database/model --external @getstrata/core/database/query --external @getstrata/core/database/relationships --external @getstrata/core/database/repositoryConnection --external @getstrata/core/database/repositoryQuery --external @getstrata/core/database/seeders --external @getstrata/core/database/seeders/types --external @getstrata/core/database/schema --external @getstrata/core/database/sqliteConnection --external @getstrata/core/database/table --external @getstrata/core/database/transaction --external @getstrata/core/database/types --external @getstrata/core/database/whereBuilder --external @getstrata/core/errors/http --external @getstrata/core/events --external @getstrata/core/events/outbox --external @getstrata/core/facades --external @getstrata/core/http --external @getstrata/core/http/authMiddleware --external @getstrata/core/http/authorizeMiddleware --external @getstrata/core/http/bodySizeLimitMiddleware --external @getstrata/core/http/clientIp --external @getstrata/core/http/cookies --external @getstrata/core/http/contentNegotiation --external @getstrata/core/http/contentSecurityPolicy --external @getstrata/core/http/conditionalResponse --external @getstrata/core/http/corsMiddleware --external @getstrata/core/http/csrfMiddleware --external @getstrata/core/http/csrfProtection --external @getstrata/core/http/csrfToken --external @getstrata/core/http/etag --external @getstrata/core/http/flashSession --external @getstrata/core/http/flashMiddleware --external @getstrata/core/http/formRequest --external @getstrata/core/http/middleware --external @getstrata/core/http/metricsMiddleware --external @getstrata/core/http/loginThrottleMiddleware --external @getstrata/core/http/memoryThrottleMiddleware --external @getstrata/core/http/pagination --external @getstrata/core/http/parseFormBody --external @getstrata/core/http/parseMultipartUpload --external @getstrata/core/http/requireAbilityMiddleware --external @getstrata/core/http/requireAuthMiddleware --external @getstrata/core/http/requireGlobalAdminMiddleware --external @getstrata/core/http/requireWebAuthMiddleware --external @getstrata/core/http/requireVerifiedMiddleware --external @getstrata/core/http/requirePasswordConfirmMiddleware --external @getstrata/core/http/resources --external @getstrata/core/http/response --external @getstrata/core/http/route --external @getstrata/core/http/routeMiddleware --external @getstrata/core/http/routeModelBinding --external @getstrata/core/http/safeInternalPath --external @getstrata/core/http/signedUrl --external @getstrata/core/http/statelessAuth --external @getstrata/core/http/scimThrottleMiddleware --external @getstrata/core/http/securityHeadersMiddleware --external @getstrata/core/http/securedRouteModelBinding --external @getstrata/core/http/requestMetaContext --external @getstrata/core/http/webErrorResponse --external @getstrata/core/http/webFormRequest --external @getstrata/core/http/throttleMiddleware --external @getstrata/core/http/uploads --external @getstrata/core/http/validation --external @getstrata/core/jobs/exportAuditLogsJob --external @getstrata/core/jobs/invalidateCacheTagsJob --external @getstrata/core/lifecycle/gracefulShutdown --external @getstrata/core/logging/logger --external @getstrata/core/logging/requestLoggingMiddleware --external @getstrata/core/mail/mailer --external @getstrata/core/mail/markdownMail --external @getstrata/core/mail/markdownMailable --external @getstrata/core/mail/sanitizeMailHtml --external @getstrata/core/media/imageTransform --external @getstrata/core/metrics/prometheus --external @getstrata/core/notifications --external @getstrata/core/openapi/generator --external @getstrata/core/openapi/registeredRoute --external @getstrata/core/openapi/validate --external @getstrata/core/pagination --external @getstrata/core/queue --external @getstrata/core/queue/createAppQueue --external @getstrata/core/queue/failedJobRepository --external @getstrata/core/queue/failedJobService --external @getstrata/core/queue/jobRegistry --external @getstrata/core/queue/jobRunner --external @getstrata/core/queue/queueMetrics --external @getstrata/core/queue/publicQueue --external @getstrata/core/queue/redisQueue --external @getstrata/core/queue/types --external @getstrata/core/runtime/appEnv --external @getstrata/core/runtime/appKeyPrefix --external @getstrata/core/runtime/frontendMode --external @getstrata/core/runtime/applicationRegistry --external @getstrata/core/runtime/asyncContextStore --external @getstrata/core/scheduler/schedule --external @getstrata/core/scheduler/osCron --external @getstrata/core/security/oauthState --external @getstrata/core/security/publicReads --external @getstrata/core/security/recoveryCodes --external @getstrata/core/security/safeFetch --external @getstrata/core/security/safePath --external @getstrata/core/security/safeUrl --external @getstrata/core/security/scimTenantTokens --external @getstrata/core/security/securityEvents --external @getstrata/core/security/stripeWebhook --external @getstrata/core/security/webhookSignature --external @getstrata/core/security/timingSafeCompare --external @getstrata/core/security/tokenExpiry --external @getstrata/core/security/totp --external @getstrata/core/storage/storage --external @getstrata/core/tenant/tenancyConfig --external @getstrata/core/tenant/tenantContext --external @getstrata/core/tenant/tenantDatabaseScope --external @getstrata/core/tenant/databaseTenantContext --external @getstrata/core/tenant/tenantMiddleware --external @getstrata/core/tenant/enableTenantRls --external @getstrata/core/terminal/runShell --external @getstrata/core/tracing/traceContext --external @getstrata/core/tracing/tracingMiddleware --external @getstrata/core/validation/rules --external @getstrata/core/view",
|
|
962
962
|
"build:shims": "bun ../../scripts/write-core-shared-shims.ts"
|
|
963
963
|
},
|
|
964
964
|
"publishConfig": {
|
|
@@ -992,6 +992,7 @@
|
|
|
992
992
|
"@opentelemetry/resources": "2.12.0",
|
|
993
993
|
"@opentelemetry/sdk-trace": "2.12.0",
|
|
994
994
|
"@opentelemetry/sdk-trace-base": "2.12.0",
|
|
995
|
-
"@opentelemetry/sdk-trace-node": "2.12.0"
|
|
995
|
+
"@opentelemetry/sdk-trace-node": "2.12.0",
|
|
996
|
+
"@xmldom/xmldom": "^0.8.15"
|
|
996
997
|
}
|
|
997
998
|
}
|