Skip to content

feat: real-time output streaming, npm publish pipeline, v0.9.0#15

Merged
dev-dami merged 2 commits intomasterfrom
copilot/add-ci-cd-feature
Mar 29, 2026
Merged

feat: real-time output streaming, npm publish pipeline, v0.9.0#15
dev-dami merged 2 commits intomasterfrom
copilot/add-ci-cd-feature

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 29, 2026

Adds live container output streaming as a differentiating capability, wires up automated npm publishing on release, and bumps all packages to 0.9.0.

Streaming execution output

Previously all container stdout/stderr was buffered until exit. ExecuteOptions now accepts onStdout/onStderr callbacks that fire per-chunk as the container runs — no change to the buffered metrics.stdout/metrics.stderr return values.

await executeService(service, {
  onStdout: (chunk) => process.stdout.write(chunk),
  onStderr: (chunk) => process.stderr.write(chunk),
});

CLI gains a --stream flag that wires those callbacks to the terminal:

ignite run ./my-service --stream

Affected files: runtime.types.ts, docker-runtime.ts, execute.ts, commands/run.ts, cli/src/index.ts

CI/CD

  • Docker test step is now conditional — probes docker version first and skips the full test suite gracefully when Docker isn't available in the runner.
  • New publish-npm job — runs after release on v* tag pushes; publishes @ignite/shared@ignite/core@ignite/http@ignite/cli in dependency order using NPM_TOKEN. Each package gains "publishConfig": { "access": "public" } for scoped public publishing.

Version bump

All packages (shared, core, http, cli, runtime-bun, root) and the CLI .version() string moved from 0.8.00.9.0.

Original prompt

Lets add a feature that out this ahead of other tools and also lets update run the ci/cd and version and piblish


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

@dev-dami dev-dami marked this pull request as ready for review March 29, 2026 20:34
@dev-dami dev-dami requested a review from Copilot March 29, 2026 20:34
Copilot AI changed the title [WIP] Add CI/CD feature to improve tool deployment feat: real-time output streaming, npm publish pipeline, v0.9.0 Mar 29, 2026
Copilot AI requested a review from dev-dami March 29, 2026 20:34
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds real-time streaming of Docker container output through the core execution pipeline, exposes it via the CLI (ignite run --stream), and updates release/publish automation and package metadata for the 0.9.0 release.

Changes:

  • Add onStdout/onStderr streaming callbacks to core Docker runtime + execution options and wire them through to docker run.
  • Expose streaming via CLI --stream for ignite run, with unit/integration tests covering the new behavior.
  • Update CI to conditionally run Docker tests and add an npm publish job for tag-based releases; bump versions and add publishConfig.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/core/src/runtime/runtime.types.ts Adds streaming callback fields to DockerRunOptions.
packages/core/src/runtime/docker-runtime.ts Implements streaming by forwarding stdout/stderr chunks to callbacks.
packages/core/src/execution/execute.ts Propagates streaming callbacks from ExecuteOptions into dockerRun.
packages/cli/src/index.ts Adds --stream flag and bumps CLI version string.
packages/cli/src/commands/run.ts Wires --stream to stdout/stderr callbacks in executeService.
packages/core/src/tests/docker-runtime.test.ts Adds unit coverage ensuring args are unaffected by streaming options.
packages/core/src/tests/docker-execution.test.ts Adds Docker integration test asserting stdout streaming matches collected stdout.
.github/workflows/ci.yml Makes Docker tests conditional and adds tag-triggered npm publish job.
package.json Bumps repo version to 0.9.0.
packages/*/package.json Bumps package versions and adds publishConfig.access=public for published packages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

skipBuild: true,
audit: options.audit,
policy,
onStdout: options.stream ? (chunk) => process.stdout.write(chunk) : undefined,
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--stream currently writes container output directly to stdout/stderr while --json later prints a JSON payload to stdout. If a user passes both flags, the streamed output will corrupt the JSON output (invalid JSON). Consider making --stream mutually exclusive with --json (validation in the CLI) or streaming to stderr when --json is enabled.

Suggested change
onStdout: options.stream ? (chunk) => process.stdout.write(chunk) : undefined,
onStdout: options.stream
? (chunk) => {
if (options.json) {
// When JSON output is requested, send streamed stdout to stderr
// so that stdout remains valid JSON.
process.stderr.write(chunk);
} else {
process.stdout.write(chunk);
}
}
: undefined,

Copilot uses AI. Check for mistakes.
Comment on lines +60 to +63
policy,
onStdout: options.stream ? (chunk) => process.stdout.write(chunk) : undefined,
onStderr: options.stream ? (chunk) => process.stderr.write(chunk) : undefined,
});
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With --stream enabled, stdout/stderr is printed in real time via the callbacks, but the subsequent human-readable report output (via formatReportAsText) includes a STDOUT: section that prints the captured stdout again. This will duplicate potentially large outputs and make the CLI output hard to read. Consider omitting stdout from the text report when streaming is enabled (e.g., add an option to the formatter, or clear/replace the displayed stdout while still keeping the raw stdout for audit parsing/JSON output).

Copilot uses AI. Check for mistakes.
Comment on lines 204 to 214
proc.stdout.on('data', (data: Buffer) => {
stdout += data.toString();
const chunk = data.toString();
stdout += chunk;
onStdout?.(chunk);
});

proc.stderr.on('data', (data: Buffer) => {
stderr += data.toString();
const chunk = data.toString();
stderr += chunk;
onStderr?.(chunk);
});
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onStdout/onStderr are user-provided callbacks invoked from the data event handlers. If a callback throws, it will raise an unhandled exception from the event emitter and can crash the process (or cause the Promise to never resolve). Wrap callback invocations in a try/catch (and optionally log) so streaming cannot destabilize execution.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci.yml
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: read
id-token: write
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The publish-npm job grants id-token: write, but the workflow uses NODE_AUTH_TOKEN and does not appear to use OIDC/provenance publishing. Consider removing id-token: write to follow least-privilege, or switch to provenance/OIDC publishing so the permission is justified.

Suggested change
id-token: write

Copilot uses AI. Check for mistakes.
@dev-dami dev-dami merged commit f23b76d into master Mar 29, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants