@constructive-io/express-context 0.10.0 → 0.11.0

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.
@@ -11,8 +11,15 @@
11
11
  */
12
12
  import { createModuleLoader } from './create-loader';
13
13
  // ─── SQL ────────────────────────────────────────────────────────────────────
14
+ // The column was renamed auth_settings_table -> auth_settings_table_name
15
+ // (Graphile inflection collision with auth_settings_table_id); read whichever
16
+ // exists so the server works against both old and new metaschema versions.
14
17
  const AUTH_SETTINGS_DISCOVERY_SQL = `
15
- SELECT s.schema_name, sm.auth_settings_table AS table_name
18
+ SELECT s.schema_name,
19
+ coalesce(
20
+ to_jsonb(sm) ->> 'auth_settings_table_name',
21
+ to_jsonb(sm) ->> 'auth_settings_table'
22
+ ) AS table_name
16
23
  FROM metaschema_modules_public.sessions_module sm
17
24
  JOIN metaschema_public.schema s ON s.id = sm.schema_id
18
25
  LIMIT 1
@@ -14,8 +14,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.authSettingsLoader = void 0;
15
15
  const create_loader_1 = require("./create-loader");
16
16
  // ─── SQL ────────────────────────────────────────────────────────────────────
17
+ // The column was renamed auth_settings_table -> auth_settings_table_name
18
+ // (Graphile inflection collision with auth_settings_table_id); read whichever
19
+ // exists so the server works against both old and new metaschema versions.
17
20
  const AUTH_SETTINGS_DISCOVERY_SQL = `
18
- SELECT s.schema_name, sm.auth_settings_table AS table_name
21
+ SELECT s.schema_name,
22
+ coalesce(
23
+ to_jsonb(sm) ->> 'auth_settings_table_name',
24
+ to_jsonb(sm) ->> 'auth_settings_table'
25
+ ) AS table_name
19
26
  FROM metaschema_modules_public.sessions_module sm
20
27
  JOIN metaschema_public.schema s ON s.id = sm.schema_id
21
28
  LIMIT 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructive-io/express-context",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Extractable Express middleware for Constructive tenant context — domain resolution, JWT auth, pgSettings, and withPgClient",
5
5
  "author": "Constructive <developers@constructive.io>",
6
6
  "homepage": "https://github.com/constructive-io/constructive",
@@ -59,5 +59,5 @@
59
59
  "jwt",
60
60
  "pgSettings"
61
61
  ],
62
- "gitHead": "cd21f62bb64bdc7f4f40f6cef6af73f8f1c8f8dc"
62
+ "gitHead": "ec85fab7970e1dc55e1446a211414e45dfaa0a68"
63
63
  }