@hexabot-ai/cli 3.4.2 → 3.5.0-beta.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.
- package/dist/commands/check.js +2 -7
- package/dist/commands/create.js +3 -5
- package/package.json +1 -1
- package/src/commands/check.ts +3 -12
- package/src/commands/create.ts +4 -6
package/dist/commands/check.js
CHANGED
|
@@ -14,17 +14,12 @@ export const registerCheckCommand = (program) => {
|
|
|
14
14
|
.description('Run diagnostic checks')
|
|
15
15
|
.option('--docker-only', 'Only run Docker checks')
|
|
16
16
|
.option('--no-docker', 'Skip Docker checks')
|
|
17
|
-
.action(
|
|
18
|
-
runDiagnostics({
|
|
19
|
-
dockerOnly: options.dockerOnly,
|
|
20
|
-
noDocker: options.noDocker ?? options.docker === false,
|
|
21
|
-
});
|
|
22
|
-
});
|
|
17
|
+
.action(runDiagnostics);
|
|
23
18
|
};
|
|
24
19
|
const runDiagnostics = (options) => {
|
|
25
20
|
const projectRoot = process.cwd();
|
|
26
21
|
const onlyDocker = options.dockerOnly;
|
|
27
|
-
const skipDocker = options.
|
|
22
|
+
const skipDocker = !options.docker;
|
|
28
23
|
const results = [];
|
|
29
24
|
if (!onlyDocker) {
|
|
30
25
|
const nodeResult = checkNodeVersion({ fatal: false, silent: true });
|
package/dist/commands/create.js
CHANGED
|
@@ -24,9 +24,7 @@ export const registerCreateCommand = (program) => {
|
|
|
24
24
|
.option('--dev', 'Run hexabot dev after creation (local SQLite by default)')
|
|
25
25
|
.option('--docker', 'Show Docker/Postgres next steps and use Docker mode with --dev')
|
|
26
26
|
.option('--force', 'Allow scaffolding into a non-empty directory')
|
|
27
|
-
.action(
|
|
28
|
-
await createProject(projectName, options);
|
|
29
|
-
});
|
|
27
|
+
.action(createProject);
|
|
30
28
|
};
|
|
31
29
|
const createProject = async (projectName, options) => {
|
|
32
30
|
if (!validateProjectName(projectName)) {
|
|
@@ -52,7 +50,7 @@ const createProject = async (projectName, options) => {
|
|
|
52
50
|
const dockerEnvBootstrapped = bootstrapCreateEnvFiles(projectPath, config);
|
|
53
51
|
const adminCredentials = await promptSeedAdminCredentials();
|
|
54
52
|
persistAdminSeedCredentials(projectPath, config, adminCredentials, dockerEnvBootstrapped, projectName);
|
|
55
|
-
if (options.
|
|
53
|
+
if (!options.install) {
|
|
56
54
|
console.log(chalk.yellow('Skipping dependency installation (--no-install).'));
|
|
57
55
|
}
|
|
58
56
|
else {
|
|
@@ -61,7 +59,7 @@ const createProject = async (projectName, options) => {
|
|
|
61
59
|
}
|
|
62
60
|
logSuccessMessage(projectName, { docker: options.docker });
|
|
63
61
|
if (options.dev) {
|
|
64
|
-
if (options.
|
|
62
|
+
if (!options.install) {
|
|
65
63
|
console.log(chalk.yellow('Dependencies were not installed. Run `npm install` before `--dev`.'));
|
|
66
64
|
}
|
|
67
65
|
else {
|
package/package.json
CHANGED
package/src/commands/check.ts
CHANGED
|
@@ -19,7 +19,6 @@ import { isHexabotProject } from '../core/project.js';
|
|
|
19
19
|
interface CheckCommandOptions {
|
|
20
20
|
dockerOnly?: boolean;
|
|
21
21
|
docker?: boolean;
|
|
22
|
-
noDocker?: boolean;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
export const registerCheckCommand = (program: Command) => {
|
|
@@ -28,21 +27,13 @@ export const registerCheckCommand = (program: Command) => {
|
|
|
28
27
|
.description('Run diagnostic checks')
|
|
29
28
|
.option('--docker-only', 'Only run Docker checks')
|
|
30
29
|
.option('--no-docker', 'Skip Docker checks')
|
|
31
|
-
.action(
|
|
32
|
-
runDiagnostics({
|
|
33
|
-
dockerOnly: options.dockerOnly,
|
|
34
|
-
noDocker: options.noDocker ?? options.docker === false,
|
|
35
|
-
});
|
|
36
|
-
});
|
|
30
|
+
.action(runDiagnostics);
|
|
37
31
|
};
|
|
38
32
|
|
|
39
|
-
const runDiagnostics = (options: {
|
|
40
|
-
dockerOnly?: boolean;
|
|
41
|
-
noDocker?: boolean;
|
|
42
|
-
}) => {
|
|
33
|
+
const runDiagnostics = (options: CheckCommandOptions) => {
|
|
43
34
|
const projectRoot = process.cwd();
|
|
44
35
|
const onlyDocker = options.dockerOnly;
|
|
45
|
-
const skipDocker = options.
|
|
36
|
+
const skipDocker = !options.docker;
|
|
46
37
|
const results: DiagnosticResult[] = [];
|
|
47
38
|
|
|
48
39
|
if (!onlyDocker) {
|
package/src/commands/create.ts
CHANGED
|
@@ -28,7 +28,7 @@ const DEFAULT_TEMPLATE_REPO = 'hexastack/hexabot-template-starter';
|
|
|
28
28
|
interface CreateCommandOptions {
|
|
29
29
|
template?: string;
|
|
30
30
|
pm?: string;
|
|
31
|
-
|
|
31
|
+
install?: boolean;
|
|
32
32
|
dev?: boolean;
|
|
33
33
|
docker?: boolean;
|
|
34
34
|
force?: boolean;
|
|
@@ -57,9 +57,7 @@ export const registerCreateCommand = (program: Command) => {
|
|
|
57
57
|
'Show Docker/Postgres next steps and use Docker mode with --dev',
|
|
58
58
|
)
|
|
59
59
|
.option('--force', 'Allow scaffolding into a non-empty directory')
|
|
60
|
-
.action(
|
|
61
|
-
await createProject(projectName, options);
|
|
62
|
-
});
|
|
60
|
+
.action(createProject);
|
|
63
61
|
};
|
|
64
62
|
|
|
65
63
|
const createProject = async (
|
|
@@ -105,7 +103,7 @@ const createProject = async (
|
|
|
105
103
|
projectName,
|
|
106
104
|
);
|
|
107
105
|
|
|
108
|
-
if (options.
|
|
106
|
+
if (!options.install) {
|
|
109
107
|
console.log(
|
|
110
108
|
chalk.yellow('Skipping dependency installation (--no-install).'),
|
|
111
109
|
);
|
|
@@ -119,7 +117,7 @@ const createProject = async (
|
|
|
119
117
|
logSuccessMessage(projectName, { docker: options.docker });
|
|
120
118
|
|
|
121
119
|
if (options.dev) {
|
|
122
|
-
if (options.
|
|
120
|
+
if (!options.install) {
|
|
123
121
|
console.log(
|
|
124
122
|
chalk.yellow(
|
|
125
123
|
'Dependencies were not installed. Run `npm install` before `--dev`.',
|