@getstrata/core 2.2.54 → 2.2.56

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @getstrata/core changelog
2
2
 
3
+ ## 2.2.56
4
+
5
+ - Stop adding schema CREATE to PostgreSQL runtime roles; keep USAGE, existing object/default grants and both catalog/ACL concurrency protocols. Existing grants, PUBLIC privileges, memberships and ownership are not revoked automatically; restricted deployments can use the documented public schema-only migration runner.
6
+ - Require Bun >=1.4.4 and retain the native SQL timer regression matrix. Preserve ORM/transaction behavior while removing two redundant private guards; strengthen error, empty-data and adapter-metadata coverage without changing public or protected APIs.
7
+
8
+ ## 2.2.55
9
+
10
+ - Align the lockstep version with the starter startup-cleanup correction. Core runtime, ORM, lifecycle policy and public/protected APIs are unchanged.
11
+
3
12
  ## 2.2.54
4
13
 
5
14
  - Align the lockstep version with the bootstrap native parameter own-key correction; core runtime, ORM and public/protected contracts are unchanged.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @getstrata/core
2
2
 
3
- Runtime library for [Strata](https://github.com/EyK-26/strata) apps: HTTP, auth, database, queue, mail, and security. Requires Bun >=1.4.3 (tested on 1.4.3).
3
+ Runtime library for [Strata](https://github.com/EyK-26/strata) apps: HTTP, auth, database, queue, mail, and security. Requires Bun >=1.4.4 (tested on 1.4.4).
4
4
 
5
5
  Generate an app rather than wiring this by hand:
6
6
 
@@ -138,12 +138,7 @@ function requestTransactionRollback() {
138
138
  if (!state || index < 0) {
139
139
  return;
140
140
  }
141
- const flags = state.rollback;
142
- const current = flags[index];
143
- if (current === undefined) {
144
- return;
145
- }
146
- flags[index] = true;
141
+ state.rollback[index] = true;
147
142
  }
148
143
  function scopeRequestsRollback() {
149
144
  const state = transactionScopes.getStore();
@@ -195,12 +195,7 @@ function requestTransactionRollback() {
195
195
  if (!state || index < 0) {
196
196
  return;
197
197
  }
198
- const flags = state.rollback;
199
- const current = flags[index];
200
- if (current === undefined) {
201
- return;
202
- }
203
- flags[index] = true;
198
+ state.rollback[index] = true;
204
199
  }
205
200
  function scopeRequestsRollback() {
206
201
  const state = transactionScopes.getStore();
@@ -339,12 +339,7 @@ function requestTransactionRollback() {
339
339
  if (!state || index < 0) {
340
340
  return;
341
341
  }
342
- const flags = state.rollback;
343
- const current = flags[index];
344
- if (current === undefined) {
345
- return;
346
- }
347
- flags[index] = true;
342
+ state.rollback[index] = true;
348
343
  }
349
344
  function scopeRequestsRollback() {
350
345
  const state = transactionScopes.getStore();
@@ -339,12 +339,7 @@ function requestTransactionRollback() {
339
339
  if (!state || index < 0) {
340
340
  return;
341
341
  }
342
- const flags = state.rollback;
343
- const current = flags[index];
344
- if (current === undefined) {
345
- return;
346
- }
347
- flags[index] = true;
342
+ state.rollback[index] = true;
348
343
  }
349
344
  function scopeRequestsRollback() {
350
345
  const state = transactionScopes.getStore();
@@ -138,12 +138,7 @@ function requestTransactionRollback() {
138
138
  if (!state || index < 0) {
139
139
  return;
140
140
  }
141
- const flags = state.rollback;
142
- const current = flags[index];
143
- if (current === undefined) {
144
- return;
145
- }
146
- flags[index] = true;
141
+ state.rollback[index] = true;
147
142
  }
148
143
  function scopeRequestsRollback() {
149
144
  const state = transactionScopes.getStore();
@@ -61,12 +61,7 @@ function requestTransactionRollback() {
61
61
  if (!state || index < 0) {
62
62
  return;
63
63
  }
64
- const flags = state.rollback;
65
- const current = flags[index];
66
- if (current === undefined) {
67
- return;
68
- }
69
- flags[index] = true;
64
+ state.rollback[index] = true;
70
65
  }
71
66
  function scopeRequestsRollback() {
72
67
  const state = transactionScopes.getStore();
@@ -138,12 +138,7 @@ function requestTransactionRollback() {
138
138
  if (!state || index < 0) {
139
139
  return;
140
140
  }
141
- const flags = state.rollback;
142
- const current = flags[index];
143
- if (current === undefined) {
144
- return;
145
- }
146
- flags[index] = true;
141
+ state.rollback[index] = true;
147
142
  }
148
143
  function scopeRequestsRollback() {
149
144
  const state = transactionScopes.getStore();
@@ -448,12 +448,7 @@ function requestTransactionRollback() {
448
448
  if (!state || index < 0) {
449
449
  return;
450
450
  }
451
- const flags = state.rollback;
452
- const current = flags[index];
453
- if (current === undefined) {
454
- return;
455
- }
456
- flags[index] = true;
451
+ state.rollback[index] = true;
457
452
  }
458
453
  function scopeRequestsRollback() {
459
454
  const state = transactionScopes.getStore();
@@ -138,12 +138,7 @@ function requestTransactionRollback() {
138
138
  if (!state || index < 0) {
139
139
  return;
140
140
  }
141
- const flags = state.rollback;
142
- const current = flags[index];
143
- if (current === undefined) {
144
- return;
145
- }
146
- flags[index] = true;
141
+ state.rollback[index] = true;
147
142
  }
148
143
  function scopeRequestsRollback() {
149
144
  const state = transactionScopes.getStore();
@@ -196,7 +196,7 @@ function postgresAppRolePrivilegeSql(options) {
196
196
  const database = assertSafeSqlIdentifier(options.database, "database name");
197
197
  const role = assertSafeSqlIdentifier(options.role ?? POSTGRES_APP_ROLE, "role name");
198
198
  return `GRANT CONNECT ON DATABASE ${database} TO ${role};
199
- GRANT USAGE, CREATE ON SCHEMA public TO ${role};
199
+ GRANT USAGE ON SCHEMA public TO ${role};
200
200
  GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO ${role};
201
201
  GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO ${role};
202
202
  GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA public TO ${role};
@@ -61,12 +61,7 @@ function requestTransactionRollback() {
61
61
  if (!state || index < 0) {
62
62
  return;
63
63
  }
64
- const flags = state.rollback;
65
- const current = flags[index];
66
- if (current === undefined) {
67
- return;
68
- }
69
- flags[index] = true;
64
+ state.rollback[index] = true;
70
65
  }
71
66
  function scopeRequestsRollback() {
72
67
  const state = transactionScopes.getStore();
package/dist/index.js CHANGED
@@ -243,12 +243,7 @@ function requestTransactionRollback() {
243
243
  if (!state || index < 0) {
244
244
  return;
245
245
  }
246
- const flags = state.rollback;
247
- const current = flags[index];
248
- if (current === undefined) {
249
- return;
250
- }
251
- flags[index] = true;
246
+ state.rollback[index] = true;
252
247
  }
253
248
  function scopeRequestsRollback() {
254
249
  const state = transactionScopes.getStore();
@@ -8476,11 +8471,8 @@ async function eagerLoadOnModels(models, paths, knownAbsentMorphRoots = new Map)
8476
8471
  }
8477
8472
  await Promise.all([...grouped.entries()].map(async ([head, nested]) => {
8478
8473
  const unloaded = models.filter((model) => model.loaded(head) === undefined && !knownAbsentMorphRoots.get(model)?.has(head));
8479
- if (unloaded.length > 0) {
8480
- const first = unloaded[0];
8481
- if (!first) {
8482
- return;
8483
- }
8474
+ const first = unloaded[0];
8475
+ if (first) {
8484
8476
  const relationQuery = resolveModelRelation(first, head);
8485
8477
  const query = first.getRepository().query();
8486
8478
  relationQuery.applyEagerLoad(query, head);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getstrata/core",
3
- "version": "2.2.54",
3
+ "version": "2.2.56",
4
4
  "description": "Strata Bun framework public API",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -982,7 +982,7 @@
982
982
  }
983
983
  },
984
984
  "engines": {
985
- "bun": ">=1.4.3"
985
+ "bun": ">=1.4.4"
986
986
  },
987
987
  "dependencies": {
988
988
  "@opentelemetry/api": "1.9.1",