@agenticmail/enterprise 0.5.61 → 0.5.63
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/chunk-37J6FA4B.js +898 -0
- package/dist/chunk-AE3DOUD4.js +2133 -0
- package/dist/chunk-M5BY3ZSI.js +898 -0
- package/dist/chunk-VMRMCEL7.js +2133 -0
- package/dist/chunk-WP76IB36.js +48 -0
- package/dist/cli-recover-C72I57LB.js +97 -0
- package/dist/cli-verify-HKS5O6Q2.js +98 -0
- package/dist/cli.js +3 -3
- package/dist/factory-Q67CKNKV.js +9 -0
- package/dist/index.js +3 -3
- package/dist/postgres-QGWJ3CTZ.js +597 -0
- package/dist/server-ILNFKSZ4.js +12 -0
- package/dist/server-M3UEVK4U.js +12 -0
- package/dist/setup-DOGWCA3F.js +20 -0
- package/dist/setup-SPKFGFRP.js +20 -0
- package/package.json +1 -1
- package/src/db/postgres.ts +1 -1
- package/src/server.ts +14 -11
package/src/server.ts
CHANGED
|
@@ -319,18 +319,21 @@ export function createServer(config: ServerConfig): ServerInstance {
|
|
|
319
319
|
|
|
320
320
|
async function serveDashboard(c: any) {
|
|
321
321
|
let html = getDashboardHtml();
|
|
322
|
-
// Inject version
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
html = html.replace('</head>', `<script>window.__ENTERPRISE_VERSION__="${pkg.version}";</script></head>`);
|
|
327
|
-
} catch {
|
|
328
|
-
// try from dist root
|
|
322
|
+
// Inject version — try multiple paths
|
|
323
|
+
let _version = '';
|
|
324
|
+
for (const rel of ['../package.json', './package.json', '../../package.json']) {
|
|
325
|
+
if (_version) break;
|
|
329
326
|
try {
|
|
330
|
-
const
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
327
|
+
const p = join(dirname(fileURLToPath(import.meta.url)), rel);
|
|
328
|
+
_version = JSON.parse(readFileSync(p, 'utf-8')).version;
|
|
329
|
+
} catch { /* try next */ }
|
|
330
|
+
}
|
|
331
|
+
if (!_version) {
|
|
332
|
+
// Fallback: search from cwd
|
|
333
|
+
try { _version = JSON.parse(readFileSync(join(process.cwd(), 'node_modules', '@agenticmail', 'enterprise', 'package.json'), 'utf-8')).version; } catch { /* noop */ }
|
|
334
|
+
}
|
|
335
|
+
if (_version) {
|
|
336
|
+
html = html.replace('</head>', `<script>window.__ENTERPRISE_VERSION__="${_version}";</script></head>`);
|
|
334
337
|
}
|
|
335
338
|
|
|
336
339
|
if (!_setupComplete) {
|