@agents-at-scale/ark 0.1.35-rc.1 ā 0.1.35-rc1
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/arkServices.d.ts +4 -12
- package/dist/arkServices.js +19 -34
- package/dist/arkServices.spec.d.ts +1 -0
- package/dist/arkServices.spec.js +24 -0
- package/dist/commands/agents/index.d.ts +2 -1
- package/dist/commands/agents/index.js +2 -7
- package/dist/commands/agents/index.spec.d.ts +1 -0
- package/dist/commands/agents/index.spec.js +67 -0
- package/dist/commands/chat/index.d.ts +2 -1
- package/dist/commands/chat/index.js +5 -21
- package/dist/commands/cluster/get.spec.d.ts +1 -0
- package/dist/commands/cluster/get.spec.js +92 -0
- package/dist/commands/cluster/index.d.ts +2 -1
- package/dist/commands/cluster/index.js +1 -1
- package/dist/commands/cluster/index.spec.d.ts +1 -0
- package/dist/commands/cluster/index.spec.js +24 -0
- package/dist/commands/completion/index.d.ts +2 -1
- package/dist/commands/completion/index.js +1 -1
- package/dist/commands/completion/index.spec.d.ts +1 -0
- package/dist/commands/completion/index.spec.js +34 -0
- package/dist/commands/config/index.d.ts +2 -1
- package/dist/commands/config/index.js +2 -2
- package/dist/commands/config/index.spec.d.ts +1 -0
- package/dist/commands/config/index.spec.js +78 -0
- package/dist/commands/dashboard/index.d.ts +2 -1
- package/dist/commands/dashboard/index.js +1 -1
- package/dist/commands/dev/index.d.ts +2 -1
- package/dist/commands/dev/index.js +1 -1
- package/dist/commands/dev/tool-generate.spec.d.ts +1 -0
- package/dist/commands/dev/tool-generate.spec.js +163 -0
- package/dist/commands/dev/tool.spec.d.ts +1 -0
- package/dist/commands/dev/tool.spec.js +48 -0
- package/dist/commands/generate/generators/project.js +22 -41
- package/dist/commands/generate/index.d.ts +2 -1
- package/dist/commands/generate/index.js +1 -1
- package/dist/commands/install/index.d.ts +4 -2
- package/dist/commands/install/index.js +215 -78
- package/dist/commands/install/index.spec.d.ts +1 -0
- package/dist/commands/install/index.spec.js +135 -0
- package/dist/commands/models/create.spec.d.ts +1 -0
- package/dist/commands/models/create.spec.js +125 -0
- package/dist/commands/models/index.d.ts +2 -1
- package/dist/commands/models/index.js +2 -7
- package/dist/commands/models/index.spec.d.ts +1 -0
- package/dist/commands/models/index.spec.js +76 -0
- package/dist/commands/routes/index.d.ts +2 -1
- package/dist/commands/routes/index.js +1 -9
- package/dist/commands/status/index.d.ts +3 -2
- package/dist/commands/status/index.js +210 -11
- package/dist/commands/targets/index.d.ts +2 -1
- package/dist/commands/targets/index.js +1 -1
- package/dist/commands/targets/index.spec.d.ts +1 -0
- package/dist/commands/targets/index.spec.js +105 -0
- package/dist/commands/teams/index.d.ts +2 -1
- package/dist/commands/teams/index.js +2 -7
- package/dist/commands/teams/index.spec.d.ts +1 -0
- package/dist/commands/teams/index.spec.js +70 -0
- package/dist/commands/tools/index.d.ts +2 -1
- package/dist/commands/tools/index.js +2 -7
- package/dist/commands/tools/index.spec.d.ts +1 -0
- package/dist/commands/tools/index.spec.js +70 -0
- package/dist/commands/uninstall/index.d.ts +2 -1
- package/dist/commands/uninstall/index.js +61 -38
- package/dist/commands/uninstall/index.spec.d.ts +1 -0
- package/dist/commands/uninstall/index.spec.js +117 -0
- package/dist/components/ChatUI.js +4 -4
- package/dist/components/statusChecker.d.ts +5 -12
- package/dist/components/statusChecker.js +172 -89
- package/dist/config.d.ts +3 -22
- package/dist/config.js +7 -151
- package/dist/index.js +22 -19
- package/dist/lib/arkServiceProxy.js +4 -2
- package/dist/lib/arkStatus.d.ts +5 -0
- package/dist/lib/arkStatus.js +61 -2
- package/dist/lib/arkStatus.spec.d.ts +1 -0
- package/dist/lib/arkStatus.spec.js +49 -0
- package/dist/lib/chatClient.js +1 -3
- package/dist/lib/cluster.js +11 -14
- package/dist/lib/cluster.spec.d.ts +1 -0
- package/dist/lib/cluster.spec.js +338 -0
- package/dist/lib/commandUtils.js +7 -7
- package/dist/lib/commands.d.ts +16 -0
- package/dist/lib/commands.js +29 -0
- package/dist/lib/commands.spec.d.ts +1 -0
- package/dist/lib/commands.spec.js +146 -0
- package/dist/lib/config.d.ts +2 -0
- package/dist/lib/config.js +6 -4
- package/dist/lib/config.spec.d.ts +1 -0
- package/dist/lib/config.spec.js +99 -0
- package/dist/lib/consts.d.ts +0 -1
- package/dist/lib/consts.js +0 -2
- package/dist/lib/consts.spec.d.ts +1 -0
- package/dist/lib/consts.spec.js +15 -0
- package/dist/lib/errors.js +1 -1
- package/dist/lib/errors.spec.d.ts +1 -0
- package/dist/lib/errors.spec.js +221 -0
- package/dist/lib/exec.d.ts +0 -4
- package/dist/lib/exec.js +0 -11
- package/dist/lib/output.spec.d.ts +1 -0
- package/dist/lib/output.spec.js +123 -0
- package/dist/lib/portUtils.d.ts +8 -0
- package/dist/lib/portUtils.js +39 -0
- package/dist/lib/startup.d.ts +5 -0
- package/dist/lib/startup.js +73 -0
- package/dist/lib/startup.spec.d.ts +1 -0
- package/dist/lib/startup.spec.js +168 -0
- package/dist/lib/types.d.ts +2 -0
- package/dist/ui/AgentSelector.d.ts +8 -0
- package/dist/ui/AgentSelector.js +53 -0
- package/dist/ui/MainMenu.d.ts +5 -1
- package/dist/ui/MainMenu.js +117 -54
- package/dist/ui/ModelSelector.d.ts +8 -0
- package/dist/ui/ModelSelector.js +53 -0
- package/dist/ui/TeamSelector.d.ts +8 -0
- package/dist/ui/TeamSelector.js +55 -0
- package/dist/ui/ToolSelector.d.ts +8 -0
- package/dist/ui/ToolSelector.js +53 -0
- package/dist/ui/statusFormatter.d.ts +22 -10
- package/dist/ui/statusFormatter.js +37 -109
- package/dist/ui/statusFormatter.spec.d.ts +1 -0
- package/dist/ui/statusFormatter.spec.js +58 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach, afterEach } from '@jest/globals';
|
|
2
|
+
import { execSync } from 'child_process';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import fs from 'fs';
|
|
6
|
+
import os from 'os';
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
|
+
describe('ark dev tool generate', () => {
|
|
10
|
+
let tempDir;
|
|
11
|
+
const cliPath = path.join(__dirname, '../../../dist/index.js');
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
// Create a temp directory for testing
|
|
14
|
+
tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'ark-test-'));
|
|
15
|
+
});
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
// Clean up temp directory
|
|
18
|
+
if (tempDir && fs.existsSync(tempDir)) {
|
|
19
|
+
fs.rmSync(tempDir, { recursive: true, force: true });
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
describe('Dockerfile generation', () => {
|
|
23
|
+
it('should generate correct Dockerfile for pyproject type', () => {
|
|
24
|
+
// Create a test .ark.yaml
|
|
25
|
+
const arkYaml = `version: "1.0"
|
|
26
|
+
project:
|
|
27
|
+
path: ${tempDir}
|
|
28
|
+
platform: python3
|
|
29
|
+
type: pyproject
|
|
30
|
+
name: test-tool
|
|
31
|
+
version: 0.2.0
|
|
32
|
+
framework: fastmcp
|
|
33
|
+
frameworkVersion: 0.5.0
|
|
34
|
+
`;
|
|
35
|
+
fs.writeFileSync(path.join(tempDir, '.ark.yaml'), arkYaml);
|
|
36
|
+
// Run the generate command
|
|
37
|
+
execSync(`node ${cliPath} dev tool generate ${tempDir}`, {
|
|
38
|
+
encoding: 'utf8',
|
|
39
|
+
});
|
|
40
|
+
// Check Dockerfile was generated
|
|
41
|
+
const dockerfilePath = path.join(tempDir, 'Dockerfile');
|
|
42
|
+
expect(fs.existsSync(dockerfilePath)).toBe(true);
|
|
43
|
+
// Check Dockerfile content
|
|
44
|
+
const dockerfileContent = fs.readFileSync(dockerfilePath, 'utf-8');
|
|
45
|
+
// Should have uv commands for pyproject
|
|
46
|
+
expect(dockerfileContent).toContain('RUN pip install uv');
|
|
47
|
+
expect(dockerfileContent).toContain('COPY pyproject.toml ./');
|
|
48
|
+
expect(dockerfileContent).toContain('COPY uv.lock* ./');
|
|
49
|
+
expect(dockerfileContent).toContain('RUN uv sync --frozen');
|
|
50
|
+
expect(dockerfileContent).toContain('CMD ["uv", "run", "python", "-m", "test_tool"]');
|
|
51
|
+
// Should NOT have requirements.txt commands
|
|
52
|
+
expect(dockerfileContent).not.toContain('requirements.txt');
|
|
53
|
+
expect(dockerfileContent).not.toContain('pip install --no-cache-dir');
|
|
54
|
+
});
|
|
55
|
+
it('should generate correct Dockerfile for requirements type', () => {
|
|
56
|
+
// Create a test .ark.yaml with requirements type
|
|
57
|
+
const arkYaml = `version: "1.0"
|
|
58
|
+
project:
|
|
59
|
+
path: ${tempDir}
|
|
60
|
+
platform: python3
|
|
61
|
+
type: requirements
|
|
62
|
+
name: test-req-tool
|
|
63
|
+
version: 0.1.0
|
|
64
|
+
`;
|
|
65
|
+
fs.writeFileSync(path.join(tempDir, '.ark.yaml'), arkYaml);
|
|
66
|
+
// Run the generate command
|
|
67
|
+
execSync(`node ${cliPath} dev tool generate ${tempDir}`, {
|
|
68
|
+
encoding: 'utf8',
|
|
69
|
+
});
|
|
70
|
+
// Check Dockerfile was generated
|
|
71
|
+
const dockerfilePath = path.join(tempDir, 'Dockerfile');
|
|
72
|
+
expect(fs.existsSync(dockerfilePath)).toBe(true);
|
|
73
|
+
// Check Dockerfile content
|
|
74
|
+
const dockerfileContent = fs.readFileSync(dockerfilePath, 'utf-8');
|
|
75
|
+
// Should have pip commands for requirements.txt
|
|
76
|
+
expect(dockerfileContent).toContain('COPY requirements.txt ./');
|
|
77
|
+
expect(dockerfileContent).toContain('RUN pip install --no-cache-dir -r requirements.txt');
|
|
78
|
+
expect(dockerfileContent).toContain('CMD ["python", "-m", "test_req_tool"]');
|
|
79
|
+
// Should NOT have uv commands
|
|
80
|
+
expect(dockerfileContent).not.toContain('RUN pip install uv');
|
|
81
|
+
expect(dockerfileContent).not.toContain('pyproject.toml');
|
|
82
|
+
expect(dockerfileContent).not.toContain('uv.lock');
|
|
83
|
+
expect(dockerfileContent).not.toContain('uv sync');
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
describe('.dockerignore generation', () => {
|
|
87
|
+
it('should generate comprehensive .dockerignore file', () => {
|
|
88
|
+
// Create a test .ark.yaml
|
|
89
|
+
const arkYaml = `version: "1.0"
|
|
90
|
+
project:
|
|
91
|
+
platform: python3
|
|
92
|
+
type: pyproject
|
|
93
|
+
name: test-tool
|
|
94
|
+
`;
|
|
95
|
+
fs.writeFileSync(path.join(tempDir, '.ark.yaml'), arkYaml);
|
|
96
|
+
// Run the generate command
|
|
97
|
+
execSync(`node ${cliPath} dev tool generate ${tempDir}`, {
|
|
98
|
+
encoding: 'utf8',
|
|
99
|
+
});
|
|
100
|
+
// Check .dockerignore was generated
|
|
101
|
+
const dockerignorePath = path.join(tempDir, '.dockerignore');
|
|
102
|
+
expect(fs.existsSync(dockerignorePath)).toBe(true);
|
|
103
|
+
// Check .dockerignore content
|
|
104
|
+
const dockerignoreContent = fs.readFileSync(dockerignorePath, 'utf-8');
|
|
105
|
+
// Should include Python patterns
|
|
106
|
+
expect(dockerignoreContent).toContain('__pycache__/');
|
|
107
|
+
expect(dockerignoreContent).toContain('*.py[cod]');
|
|
108
|
+
expect(dockerignoreContent).toContain('*.egg-info/');
|
|
109
|
+
// Should include UV patterns
|
|
110
|
+
expect(dockerignoreContent).toContain('.venv/');
|
|
111
|
+
// Should include testing patterns
|
|
112
|
+
expect(dockerignoreContent).toContain('.pytest_cache/');
|
|
113
|
+
expect(dockerignoreContent).toContain('.coverage');
|
|
114
|
+
// Should include IDE patterns
|
|
115
|
+
expect(dockerignoreContent).toContain('.vscode/');
|
|
116
|
+
expect(dockerignoreContent).toContain('.idea/');
|
|
117
|
+
// Should include ARK specific patterns
|
|
118
|
+
expect(dockerignoreContent).toContain('.ark.yaml');
|
|
119
|
+
expect(dockerignoreContent).toContain('devspace.yaml');
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
describe('file skip behavior', () => {
|
|
123
|
+
it('should skip existing files without overwriting', () => {
|
|
124
|
+
// Create a test .ark.yaml
|
|
125
|
+
const arkYaml = `version: "1.0"
|
|
126
|
+
project:
|
|
127
|
+
platform: python3
|
|
128
|
+
type: pyproject
|
|
129
|
+
name: test-tool
|
|
130
|
+
`;
|
|
131
|
+
fs.writeFileSync(path.join(tempDir, '.ark.yaml'), arkYaml);
|
|
132
|
+
// Create an existing Dockerfile with custom content
|
|
133
|
+
const customDockerfile = '# My custom Dockerfile\nFROM alpine\n';
|
|
134
|
+
fs.writeFileSync(path.join(tempDir, 'Dockerfile'), customDockerfile);
|
|
135
|
+
// Run the generate command
|
|
136
|
+
const output = execSync(`node ${cliPath} dev tool generate ${tempDir}`, {
|
|
137
|
+
encoding: 'utf8',
|
|
138
|
+
});
|
|
139
|
+
// Check that existing file was not overwritten
|
|
140
|
+
const dockerfileContent = fs.readFileSync(path.join(tempDir, 'Dockerfile'), 'utf-8');
|
|
141
|
+
expect(dockerfileContent).toBe(customDockerfile);
|
|
142
|
+
// Check that output mentions skipping the existing file
|
|
143
|
+
expect(output).toContain('Skipping Dockerfile (already exists)');
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
describe('error handling', () => {
|
|
147
|
+
it('should fail when .ark.yaml is missing', () => {
|
|
148
|
+
// Try to run generate without .ark.yaml
|
|
149
|
+
let error = null;
|
|
150
|
+
try {
|
|
151
|
+
execSync(`node ${cliPath} dev tool generate ${tempDir}`, {
|
|
152
|
+
encoding: 'utf8',
|
|
153
|
+
stdio: 'pipe',
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
catch (e) {
|
|
157
|
+
error = e;
|
|
158
|
+
}
|
|
159
|
+
expect(error).not.toBeNull();
|
|
160
|
+
expect(error.message).toContain('.ark.yaml not found');
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { describe, it, expect } from '@jest/globals';
|
|
2
|
+
import { execSync } from 'child_process';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = path.dirname(__filename);
|
|
7
|
+
describe('sample-projects', () => {
|
|
8
|
+
describe('reverse-tool', () => {
|
|
9
|
+
it('should output correct MCP tool format in JSON', () => {
|
|
10
|
+
const projectPath = path.join(__dirname, '../../../samples/reverse_tool');
|
|
11
|
+
const cliPath = path.join(__dirname, '../../../dist/index.js');
|
|
12
|
+
// Run the command and capture output
|
|
13
|
+
const output = execSync(`node ${cliPath} dev tool check ${projectPath} --output json`, { encoding: 'utf8' });
|
|
14
|
+
// Parse the JSON output
|
|
15
|
+
const result = JSON.parse(output);
|
|
16
|
+
// Assert the structure
|
|
17
|
+
expect(result).toHaveProperty('path');
|
|
18
|
+
expect(result).toHaveProperty('projectRoot');
|
|
19
|
+
expect(result.projectRoot).toContain('reverse_tool');
|
|
20
|
+
expect(result).toHaveProperty('platform', 'python3');
|
|
21
|
+
expect(result).toHaveProperty('projectType', 'pyproject');
|
|
22
|
+
expect(result).toHaveProperty('projectName', 'reverse-tool');
|
|
23
|
+
expect(result).toHaveProperty('projectVersion', '0.1.0');
|
|
24
|
+
expect(result).toHaveProperty('hasFastmcp', true);
|
|
25
|
+
expect(result).toHaveProperty('fastmcpVersion', '0.5.0');
|
|
26
|
+
expect(result).toHaveProperty('tools');
|
|
27
|
+
// Assert tools array contains MCP-formatted tool
|
|
28
|
+
expect(result.tools).toHaveLength(1);
|
|
29
|
+
const tool = result.tools[0];
|
|
30
|
+
// Check MCP tool structure
|
|
31
|
+
expect(tool).toHaveProperty('name', 'reverse_message');
|
|
32
|
+
expect(tool).toHaveProperty('title', 'Reverse Message');
|
|
33
|
+
expect(tool).toHaveProperty('description', 'Reverses the text of a message');
|
|
34
|
+
expect(tool).toHaveProperty('inputSchema');
|
|
35
|
+
// Check inputSchema structure
|
|
36
|
+
expect(tool.inputSchema).toEqual({
|
|
37
|
+
type: 'object',
|
|
38
|
+
properties: {
|
|
39
|
+
message: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'Parameter message',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: ['message'],
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -8,7 +8,7 @@ import { TemplateDiscovery } from '../templateDiscovery.js';
|
|
|
8
8
|
import { toKebabCase, validateNameStrict, isValidKubernetesName, } from '../utils/nameUtils.js';
|
|
9
9
|
import { getInquirerProjectTypeChoices, GENERATOR_DEFAULTS, CLI_CONFIG, } from '../config.js';
|
|
10
10
|
import { SecurityUtils } from '../../../lib/security.js';
|
|
11
|
-
import
|
|
11
|
+
import ora from 'ora';
|
|
12
12
|
export function createProjectGenerator() {
|
|
13
13
|
return {
|
|
14
14
|
name: 'project',
|
|
@@ -38,61 +38,40 @@ class ProjectGenerator {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
async generate(name, destination, options) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
progress.addStep('prerequisites', 'Checking prerequisites');
|
|
44
|
-
progress.addStep('configuration', 'Gathering project configuration');
|
|
45
|
-
if (!options.skipModels) {
|
|
46
|
-
progress.addStep('models', 'Configuring model providers');
|
|
47
|
-
}
|
|
48
|
-
if (!options.skipGit) {
|
|
49
|
-
progress.addStep('git', 'Setting up git repository');
|
|
50
|
-
}
|
|
51
|
-
progress.addStep('generation', 'Generating project files');
|
|
52
|
-
progress.addStep('completion', 'Finalizing project setup');
|
|
41
|
+
console.log(chalk.blue(`\nš ARK Agent Project Generator\n`));
|
|
42
|
+
const spinner = ora('Checking prerequisites').start();
|
|
53
43
|
try {
|
|
54
44
|
// Check prerequisites
|
|
55
|
-
progress.startStep('prerequisites');
|
|
56
45
|
await this.checkPrerequisites();
|
|
57
|
-
|
|
46
|
+
spinner.succeed('Prerequisites validated');
|
|
58
47
|
// Get project configuration
|
|
59
|
-
|
|
48
|
+
spinner.start('Gathering project configuration');
|
|
60
49
|
const config = await this.getProjectConfig(name, destination, options);
|
|
61
|
-
|
|
50
|
+
spinner.succeed(`Project "${config.name}" configured`);
|
|
62
51
|
// Discover and configure models (only if not skipped)
|
|
63
52
|
if (config.configureModels) {
|
|
64
|
-
|
|
53
|
+
spinner.start('Configuring model providers');
|
|
65
54
|
await this.configureModels(config);
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
progress.skipStep('models', 'Model configuration skipped');
|
|
55
|
+
spinner.succeed(`Model provider: ${config.selectedModels || 'none'}`);
|
|
70
56
|
}
|
|
71
57
|
// Configure git if requested (only if not skipped)
|
|
72
58
|
if (config.initGit) {
|
|
73
|
-
|
|
59
|
+
spinner.start('Setting up git repository');
|
|
74
60
|
await this.configureGit(config);
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
progress.skipStep('git', 'Git setup skipped');
|
|
61
|
+
spinner.succeed('Git repository configured');
|
|
79
62
|
}
|
|
80
63
|
// Generate the project
|
|
81
|
-
|
|
64
|
+
spinner.start('Generating project files');
|
|
82
65
|
await this.generateProject(config);
|
|
83
|
-
|
|
66
|
+
spinner.succeed('Project files created');
|
|
84
67
|
// Finalize
|
|
85
|
-
|
|
68
|
+
spinner.start('Finalizing project setup');
|
|
86
69
|
this.showNextSteps(config);
|
|
87
|
-
|
|
88
|
-
|
|
70
|
+
spinner.succeed('Project ready');
|
|
71
|
+
console.log(chalk.green(`\nā
Project generation completed\n`));
|
|
89
72
|
}
|
|
90
73
|
catch (error) {
|
|
91
|
-
|
|
92
|
-
const currentStep = progress['steps'].find((s) => s.status === 'running');
|
|
93
|
-
if (currentStep) {
|
|
94
|
-
progress.failStep(currentStep.name, `Failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
95
|
-
}
|
|
74
|
+
spinner.fail(`Failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
96
75
|
throw error;
|
|
97
76
|
}
|
|
98
77
|
}
|
|
@@ -105,7 +84,7 @@ class ProjectGenerator {
|
|
|
105
84
|
}
|
|
106
85
|
catch {
|
|
107
86
|
requirements.push({ tool: 'git', available: false, required: false });
|
|
108
|
-
|
|
87
|
+
console.log(chalk.yellow('ā ļø Warning: Git not found - git features will be disabled'));
|
|
109
88
|
}
|
|
110
89
|
// Check for deployment tools (optional for project generation)
|
|
111
90
|
const deploymentTools = ['kubectl', 'helm'];
|
|
@@ -121,12 +100,14 @@ class ProjectGenerator {
|
|
|
121
100
|
}
|
|
122
101
|
}
|
|
123
102
|
if (missingDeploymentTools.length > 0) {
|
|
124
|
-
|
|
125
|
-
|
|
103
|
+
console.log(chalk.blue(`ā¹ļø Optional tools not found: ${missingDeploymentTools.join(', ')}`));
|
|
104
|
+
console.log(chalk.cyan('š” Tip: Install kubectl and helm later to deploy your project to a cluster'));
|
|
126
105
|
}
|
|
127
106
|
}
|
|
128
107
|
async getProjectConfig(name, destination, options) {
|
|
129
|
-
|
|
108
|
+
console.log(chalk.gray(`\n${'ā'.repeat(50)}`));
|
|
109
|
+
console.log(chalk.cyan('Project Configuration'));
|
|
110
|
+
console.log(chalk.gray(`${'ā'.repeat(50)}\n`));
|
|
130
111
|
// Use command line options if provided, otherwise prompt
|
|
131
112
|
let projectType = options.projectType;
|
|
132
113
|
let parentDir = destination;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
+
import type { ArkConfig } from '../../lib/config.js';
|
|
2
3
|
export interface GeneratorOptions {
|
|
3
4
|
name?: string;
|
|
4
5
|
destination?: string;
|
|
@@ -21,4 +22,4 @@ export interface Generator {
|
|
|
21
22
|
templatePath: string;
|
|
22
23
|
generate(name: string, destination: string, options: GeneratorOptions): Promise<void>;
|
|
23
24
|
}
|
|
24
|
-
export declare function createGenerateCommand(): Command;
|
|
25
|
+
export declare function createGenerateCommand(_: ArkConfig): Command;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
|
-
|
|
2
|
+
import type { ArkConfig } from '../../lib/config.js';
|
|
3
|
+
export declare function installArk(serviceName?: string, options?: {
|
|
3
4
|
yes?: boolean;
|
|
4
5
|
waitForReady?: string;
|
|
6
|
+
verbose?: boolean;
|
|
5
7
|
}): Promise<void>;
|
|
6
|
-
export declare function createInstallCommand(): Command;
|
|
8
|
+
export declare function createInstallCommand(_: ArkConfig): Command;
|