Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CLI/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
import { loadIdeaIndex } from '../core/pipeline.js';
import { listRecentRuns } from '../core/paths.js';

export function createBuildCommand(): Command {

Check warning on line 23 in CLI/src/commands/build.ts

View workflow job for this annotation

GitHub Actions / Lint

Function 'createBuildCommand' has too many lines (130). Maximum allowed is 100
const command = new Command('build')
.description('Build a selected idea through Stages 02-10')
.argument('[idea]', 'Idea ID, name, or slug to build')
.option('-m, --model <model>', 'Claude model to use')
.option('--json', 'Output results as JSON')
.option('-y, --yes', 'Skip confirmation prompts')
.action(async (ideaArg, options) => {

Check warning on line 30 in CLI/src/commands/build.ts

View workflow job for this annotation

GitHub Actions / Lint

Async arrow function has a complexity of 20. Maximum allowed is 15

Check warning on line 30 in CLI/src/commands/build.ts

View workflow job for this annotation

GitHub Actions / Lint

Async arrow function has too many lines (121). Maximum allowed is 100
const startTime = Date.now();

if (!options.json) {
Expand Down Expand Up @@ -123,7 +123,7 @@
JSON.stringify({ success: false, error: result.error }, null, 2)
);
} else {
printFailureBanner('build', result.error || 'Unknown error');
printFailureBanner('build', result.error ?? 'Unknown error');
}
process.exit(2);
}
Expand All @@ -149,7 +149,7 @@
console.log(
formatKeyValue([
{ key: 'App Name', value: found.idea.name },
{ key: 'Build Path', value: result.buildPath || 'N/A' },
{ key: 'Build Path', value: result.buildPath ?? 'N/A' },
])
);
console.log();
Expand Down
4 changes: 2 additions & 2 deletions CLI/src/commands/dream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
import { formatKeyValue, formatNextSteps } from '../ui/format.js';
import { confirm, promptDreamIdea } from '../ui/prompts.js';

export function createDreamCommand(): Command {

Check warning on line 21 in CLI/src/commands/dream.ts

View workflow job for this annotation

GitHub Actions / Lint

Function 'createDreamCommand' has too many lines (140). Maximum allowed is 100
const command = new Command('dream')
.description('Transform a raw app idea into a complete store-ready app')
.argument('[idea]', 'Your app idea description')
.option('-m, --model <model>', 'Claude model to use')
.option('--json', 'Output results as JSON')
.option('-y, --yes', 'Skip confirmation prompts')
.action(async (ideaArg, options) => {

Check warning on line 28 in CLI/src/commands/dream.ts

View workflow job for this annotation

GitHub Actions / Lint

Async arrow function has a complexity of 18. Maximum allowed is 15

Check warning on line 28 in CLI/src/commands/dream.ts

View workflow job for this annotation

GitHub Actions / Lint

Async arrow function has too many lines (131). Maximum allowed is 100
const startTime = Date.now();

if (!options.json) {
Expand All @@ -36,7 +36,7 @@
// Get idea description
let ideaPrompt = ideaArg;

if (!ideaPrompt) {

Check warning on line 39 in CLI/src/commands/dream.ts

View workflow job for this annotation

GitHub Actions / Lint

Prefer using nullish coalescing operator (`??=`) instead of an assignment expression, as it is simpler to read
ideaPrompt = await promptDreamIdea();
}

Expand Down Expand Up @@ -124,7 +124,7 @@
JSON.stringify({ success: false, error: result.error }, null, 2)
);
} else {
printFailureBanner('dream', result.error || 'Unknown error');
printFailureBanner('dream', result.error ?? 'Unknown error');
}
process.exit(2);
}
Expand All @@ -151,7 +151,7 @@
console.log(
formatKeyValue([
{ key: 'Run Path', value: result.runPath },
{ key: 'Build Path', value: result.buildPath || 'N/A' },
{ key: 'Build Path', value: result.buildPath ?? 'N/A' },
])
);
console.log();
Expand Down
2 changes: 1 addition & 1 deletion CLI/src/commands/resume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export function createResumeCommand(): Command {
JSON.stringify({ success: false, error: result.error }, null, 2)
);
} else {
printFailureBanner('resume', result.error || 'Unknown error');
printFailureBanner('resume', result.error ?? 'Unknown error');
}
process.exit(2);
}
Expand Down
2 changes: 1 addition & 1 deletion CLI/src/commands/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function createRunCommand(): Command {
JSON.stringify({ success: false, error: result.error }, null, 2)
);
} else {
printFailureBanner('run', result.error || 'Unknown error');
printFailureBanner('run', result.error ?? 'Unknown error');
}
process.exit(2);
}
Expand Down
2 changes: 1 addition & 1 deletion CLI/src/core/stages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import path from 'path';
import Ajv from 'ajv';

Check failure on line 8 in CLI/src/core/stages.ts

View workflow job for this annotation

GitHub Actions / Test

src/core/stages.test.ts

Error: Cannot find package 'ajv' imported from /home/runner/work/AppFactory/AppFactory/CLI/src/core/stages.ts ❯ src/core/stages.ts:8:1 ❯ src/core/stages.test.ts:10:1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Serialized Error: { code: 'ERR_MODULE_NOT_FOUND' }
import { readFile, readJson, writeFile, writeJson, fileExists } from './io.js';
import { getTemplatePath, getSchemaPath, getStandardsPath } from './paths.js';
import { extractJson, callClaude } from './anthropic.js';
Expand Down Expand Up @@ -228,7 +228,7 @@
}

// Schema validation
const ajv = new Ajv.default({ allErrors: true, strict: false });
const ajv = new Ajv({ allErrors: true });

export function validateAgainstSchema(
data: unknown,
Expand Down
Loading
Loading