@agenticmail/enterprise 0.5.4 → 0.5.6
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-2AHKTK2N.js +819 -0
- package/dist/chunk-2ESYSVXG.js +48 -0
- package/dist/chunk-6CVIA5YL.js +808 -0
- package/dist/chunk-FVXEXRP2.js +12666 -0
- package/dist/chunk-OZZ65RAG.js +9040 -0
- package/dist/chunk-P2FILRUE.js +591 -0
- package/dist/chunk-Q3ZHFVGV.js +48 -0
- package/dist/chunk-TCIGK4HQ.js +1943 -0
- package/dist/chunk-WI62KTVK.js +3455 -0
- package/dist/cidr-O6T7HDUD.js +17 -0
- package/dist/cli-build-skill-AE7QC5C5.js +235 -0
- package/dist/cli-build-skill-MP6K4ZXO.js +235 -0
- package/dist/cli-recover-5M74V7V4.js +97 -0
- package/dist/cli-recover-5VWKSBTE.js +97 -0
- package/dist/cli-submit-skill-6AAQWZWW.js +162 -0
- package/dist/cli-submit-skill-LDFJGSKO.js +162 -0
- package/dist/cli-validate-DHESCL7V.js +148 -0
- package/dist/cli-validate-QTV6662P.js +148 -0
- package/dist/cli-verify-G27G44PM.js +98 -0
- package/dist/cli.js +13 -13
- package/dist/config-store-YW6BMVSU.js +58 -0
- package/dist/db-adapter-WPKXQDEY.js +7 -0
- package/dist/domain-lock-XXXJIX7D.js +7 -0
- package/dist/dynamodb-33B2BXRN.js +426 -0
- package/dist/esm-BZF7GNJD.js +5090 -0
- package/dist/factory-X6SKUEDX.js +9 -0
- package/dist/firewall-ZGR2AGAP.js +10 -0
- package/dist/index.js +35 -35
- package/dist/managed-J3QQMQQJ.js +16 -0
- package/dist/mongodb-KTICSLUI.js +319 -0
- package/dist/mysql-VIFJFM4A.js +574 -0
- package/dist/postgres-A67RQTZX.js +575 -0
- package/dist/registry/cli.js +1 -1
- package/dist/routes-F22OJNEY.js +5674 -0
- package/dist/runtime-TCAE7QSD.js +47 -0
- package/dist/server-B27VUUU6.js +11 -0
- package/dist/setup-HJ4PTUSA.js +20 -0
- package/dist/setup-UIQKEGIG.js +20 -0
- package/dist/skills-NJKTYIGZ.js +14 -0
- package/dist/sqlite-Y6GS6AE3.js +490 -0
- package/dist/turso-A7AO3JDH.js +495 -0
- package/package.json +1 -1
- package/src/cli.ts +13 -13
- package/src/domain-lock/cli-recover.ts +4 -4
- package/src/domain-lock/cli-verify.ts +3 -3
- package/src/engine/cli-build-skill.ts +2 -2
- package/src/engine/cli-submit-skill.ts +3 -3
- package/src/engine/cli-validate.ts +3 -3
- package/src/setup/index.ts +19 -3
- package/src/setup/registration.ts +4 -4
package/src/setup/index.ts
CHANGED
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { execSync } from 'child_process';
|
|
18
|
+
import { createRequire } from 'module';
|
|
19
|
+
import { fileURLToPath } from 'url';
|
|
20
|
+
import { dirname, join } from 'path';
|
|
18
21
|
import { promptCompanyInfo } from './company.js';
|
|
19
22
|
import { promptDatabase } from './database.js';
|
|
20
23
|
import { promptDeployment } from './deployment.js';
|
|
@@ -54,26 +57,39 @@ async function ensureDbDriver(dbType: string, ora: any, chalk: any): Promise<voi
|
|
|
54
57
|
const packages = DB_DRIVER_MAP[dbType];
|
|
55
58
|
if (!packages?.length) return;
|
|
56
59
|
|
|
60
|
+
// Resolve the enterprise package's own directory for installing drivers
|
|
61
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
62
|
+
const pkgDir = join(dirname(__filename), '..');
|
|
63
|
+
|
|
57
64
|
const missing: string[] = [];
|
|
58
65
|
for (const pkg of packages) {
|
|
59
66
|
try {
|
|
60
|
-
|
|
67
|
+
// Check if resolvable from the package directory
|
|
68
|
+
const require = createRequire(join(pkgDir, 'node_modules', '.package-lock.json'));
|
|
69
|
+
require.resolve(pkg);
|
|
61
70
|
} catch {
|
|
62
|
-
|
|
71
|
+
// Also try dynamic import as fallback
|
|
72
|
+
try {
|
|
73
|
+
await import(pkg);
|
|
74
|
+
} catch {
|
|
75
|
+
missing.push(pkg);
|
|
76
|
+
}
|
|
63
77
|
}
|
|
64
78
|
}
|
|
65
79
|
if (!missing.length) return;
|
|
66
80
|
|
|
67
81
|
const spinner = ora(`Installing database driver: ${missing.join(', ')}...`).start();
|
|
68
82
|
try {
|
|
83
|
+
// Install into the enterprise package's node_modules so dynamic imports find them
|
|
69
84
|
execSync(`npm install --no-save ${missing.join(' ')}`, {
|
|
70
85
|
stdio: 'pipe',
|
|
71
86
|
timeout: 120_000,
|
|
87
|
+
cwd: pkgDir,
|
|
72
88
|
});
|
|
73
89
|
spinner.succeed(`Database driver installed: ${missing.join(', ')}`);
|
|
74
90
|
} catch (err: any) {
|
|
75
91
|
spinner.fail(`Failed to install ${missing.join(', ')}`);
|
|
76
|
-
console.error(chalk.red(`\n Run manually: npm install ${missing.join(' ')}\n`));
|
|
92
|
+
console.error(chalk.red(`\n Run manually: cd ${pkgDir} && npm install ${missing.join(' ')}\n`));
|
|
77
93
|
process.exit(1);
|
|
78
94
|
}
|
|
79
95
|
}
|
|
@@ -94,7 +94,7 @@ export async function promptRegistration(
|
|
|
94
94
|
spinner.fail('Domain already registered');
|
|
95
95
|
console.log('');
|
|
96
96
|
console.log(chalk.yellow(' This domain is already registered and verified.'));
|
|
97
|
-
console.log(chalk.dim(' If this is your domain, use: agenticmail
|
|
97
|
+
console.log(chalk.dim(' If this is your domain, use: npx @agenticmail/enterprise recover'));
|
|
98
98
|
console.log('');
|
|
99
99
|
|
|
100
100
|
const { continueAnyway } = await inquirer.prompt([{
|
|
@@ -121,7 +121,7 @@ export async function promptRegistration(
|
|
|
121
121
|
spinner.warn('Registry unavailable');
|
|
122
122
|
console.log('');
|
|
123
123
|
console.log(chalk.yellow(` Could not reach registry: ${err.message}`));
|
|
124
|
-
console.log(chalk.dim(' You can register later with: agenticmail
|
|
124
|
+
console.log(chalk.dim(' You can register later with: npx @agenticmail/enterprise verify-domain'));
|
|
125
125
|
console.log('');
|
|
126
126
|
|
|
127
127
|
const { continueAnyway } = await inquirer.prompt([{
|
|
@@ -209,11 +209,11 @@ export async function promptRegistration(
|
|
|
209
209
|
await new Promise(r => setTimeout(r, 10_000));
|
|
210
210
|
} else {
|
|
211
211
|
spinner.info('DNS record not found yet');
|
|
212
|
-
console.log(chalk.dim(' Run later: agenticmail
|
|
212
|
+
console.log(chalk.dim(' Run later: npx @agenticmail/enterprise verify-domain'));
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
215
|
} else {
|
|
216
|
-
console.log(chalk.dim(' Run when ready: agenticmail
|
|
216
|
+
console.log(chalk.dim(' Run when ready: npx @agenticmail/enterprise verify-domain'));
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
console.log('');
|