@agenticmail/enterprise 0.5.45 → 0.5.46

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/cli.js CHANGED
@@ -48,7 +48,7 @@ Skill Development:
48
48
  break;
49
49
  case "setup":
50
50
  default:
51
- import("./setup-OVPCTGDL.js").then((m) => m.runSetupWizard()).catch(fatal);
51
+ import("./setup-N3RQCS32.js").then((m) => m.runSetupWizard()).catch(fatal);
52
52
  break;
53
53
  }
54
54
  function fatal(err) {
@@ -0,0 +1,7 @@
1
+ import {
2
+ EngineDatabase
3
+ } from "./chunk-5DDNXWPN.js";
4
+ import "./chunk-KFQGP6VL.js";
5
+ export {
6
+ EngineDatabase
7
+ };
package/dist/index.js CHANGED
@@ -50,11 +50,11 @@ import {
50
50
  requireRole,
51
51
  securityHeaders,
52
52
  validate
53
- } from "./chunk-AOASAMLE.js";
53
+ } from "./chunk-VOMXULTW.js";
54
54
  import {
55
55
  provision,
56
56
  runSetupWizard
57
- } from "./chunk-M3WTJ5YO.js";
57
+ } from "./chunk-HKBAC2CE.js";
58
58
  import {
59
59
  ENGINE_TABLES,
60
60
  ENGINE_TABLES_POSTGRES,
@@ -64,7 +64,7 @@ import {
64
64
  MIGRATIONS_TABLE_POSTGRES,
65
65
  sqliteToMySQL,
66
66
  sqliteToPostgres
67
- } from "./chunk-XTGZRTVI.js";
67
+ } from "./chunk-5DDNXWPN.js";
68
68
  import {
69
69
  deployToCloud,
70
70
  generateDockerCompose,
@@ -0,0 +1,12 @@
1
+ import {
2
+ createServer
3
+ } from "./chunk-VOMXULTW.js";
4
+ import "./chunk-3SMTCIR4.js";
5
+ import "./chunk-JLSQOQ5L.js";
6
+ import "./chunk-RO537U6H.js";
7
+ import "./chunk-DRXMYYKN.js";
8
+ import "./chunk-67KZYSLU.js";
9
+ import "./chunk-KFQGP6VL.js";
10
+ export {
11
+ createServer
12
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-HKBAC2CE.js";
10
+ import "./chunk-M4PRT53C.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/enterprise",
3
- "version": "0.5.45",
3
+ "version": "0.5.46",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -104,6 +104,25 @@ export class EngineDatabase {
104
104
  count++;
105
105
  }
106
106
 
107
+ // Post-migration: fix version columns that were incorrectly created as BOOLEAN on Postgres
108
+ if (this.dialect === 'postgres') {
109
+ try {
110
+ const boolVersionCols = await this.db.all<any>(
111
+ `SELECT table_name FROM information_schema.columns WHERE column_name = 'version' AND data_type = 'boolean' AND table_schema = 'public'`
112
+ );
113
+ for (const row of boolVersionCols) {
114
+ try {
115
+ await this.db.run(`ALTER TABLE ${row.table_name} ALTER COLUMN version DROP DEFAULT`);
116
+ await this.db.run(`ALTER TABLE ${row.table_name} ALTER COLUMN version TYPE INTEGER USING CASE WHEN version THEN 1 ELSE 0 END`);
117
+ await this.db.run(`ALTER TABLE ${row.table_name} ALTER COLUMN version SET DEFAULT 1`);
118
+ console.log(`[engine] Fixed version column type on ${row.table_name}: BOOLEAN → INTEGER`);
119
+ } catch (e: any) {
120
+ console.error(`[engine] Failed to fix version column on ${row.table_name}:`, e.message);
121
+ }
122
+ }
123
+ } catch { /* ignore */ }
124
+ }
125
+
107
126
  return { applied: count, total: MIGRATIONS.length };
108
127
  }
109
128
 
@@ -1237,15 +1237,7 @@ CREATE INDEX idx_agent_followups_agent ON agent_followups(agent_id);
1237
1237
  version: 17,
1238
1238
  name: 'fix_version_column_type',
1239
1239
  sql: `SELECT 1;`, // SQLite already uses INTEGER, no fix needed
1240
- postgres: `
1241
- DO $$ BEGIN
1242
- IF EXISTS (SELECT 1 FROM information_schema.columns WHERE table_name='managed_agents' AND column_name='version' AND data_type='boolean') THEN
1243
- ALTER TABLE managed_agents ALTER COLUMN version DROP DEFAULT;
1244
- ALTER TABLE managed_agents ALTER COLUMN version TYPE INTEGER USING CASE WHEN version THEN 1 ELSE 0 END;
1245
- ALTER TABLE managed_agents ALTER COLUMN version SET DEFAULT 1;
1246
- END IF;
1247
- END $$;
1248
- `,
1240
+ postgres: `SELECT 1`,
1249
1241
  mysql: `SELECT 1;`,
1250
1242
  nosql: async () => {},
1251
1243
  },