Skip to content
Merged
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
1 change: 1 addition & 0 deletions bin/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jammin build auth-service --config ./custom.build.yml
- Build logs are automatically saved to a `logs/` directory in your project root.
- The command uses Docker to build services based on their SDK configuration.
- Output `.jam` files are detected and listed after each successful build.
- Automatically generates `config/jammin.test.config.ts` with type-safe service ID mappings for testing.
- If any service fails to build, the command will exit with an error code.

### `test`
Expand Down
20 changes: 19 additions & 1 deletion bin/cli/src/commands/build-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ import { mkdir } from "node:fs/promises";
import { join, relative, resolve } from "node:path";
import * as p from "@clack/prompts";
import type { ServiceConfig } from "@fluffylabs/jammin-sdk";
import { copyJamToDist, getJamFiles, getServiceConfigs, SDK_CONFIGS } from "@fluffylabs/jammin-sdk";
import {
copyJamToDist,
generateTestConfigInProjectDir,
getJamFiles,
getServiceConfigs,
loadServices,
SDK_CONFIGS,
} from "@fluffylabs/jammin-sdk";
import { Command } from "commander";

/**
Expand Down Expand Up @@ -107,6 +114,17 @@ Examples:

p.log.info("--------------------------------");

try {
s.start("Generating test configuration...");
const services = await loadServices(projectRoot);
await generateTestConfigInProjectDir(services, projectRoot);
s.stop("✅ Test configuration generated");
p.log.message("📝 Generated: config/jammin.test.config.ts");
} catch (_error) {
s.stop("⚠️ Could not generate test configuration");
p.log.warn("Test configuration generation failed (this is optional)");
}

if (buildFailed) {
p.outro("❌ Build failed. See the output above and check the logs for more details.");
process.exit(1);
Expand Down
16 changes: 13 additions & 3 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- [Requirements](requirements.md)
- [Getting Started](getting-started.md)
- [Service SDK examples](service-examples.md)
- [Testing JAM Services](testing.md)
- [Contributing](contributing.md)
- [Bootstrap](bootstrap/jammin-suite.md)
- [Proposed API](bootstrap/jammin-examples.md)
Expand Down
Loading
Loading