Adding rollback and streaming feature, Upgrade packages#166
Conversation
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
There was a problem hiding this comment.
Pull request overview
This PR adds a new launch:rollback command to instantly roll back an environment to a previous eligible deployment, introduces a --response-mode option (buffered vs streaming) during project creation flows, and updates package versions (notably qs) alongside associated tests.
Changes:
- Added
launch:rollbackcommand, GraphQL query/mutation support, and both Mocha + Jest test coverage for rollback flows. - Added
--response-modeflag and interactive prompt wiring to setisStreamingEnabledfor GitHub and File Upload project creation. - Upgraded package versions (including
qs) and updated lockfile and talisman checksums.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/commands/rollback.test.ts | Adds Mocha/sinon unit tests for rollback CLI behavior (flag/prompt paths). |
| src/types/launch.ts | Adjusts config typing to include parsed CLI flags and isStreamingEnabled. |
| src/graphql/queries.ts | Extends deployment/environment queries to include rollback-relevant fields with a skip flag. |
| src/graphql/mutation.ts | Adds rollbackDeployment GraphQL mutation definition/export. |
| src/config/index.ts | Adds responseModeOptions config used by the new CLI flag. |
| src/commands/launch/rollback.ts | New rollback command implementation (resolve env, select target, confirm, mutate). |
| src/commands/launch/rollback.test.ts | Adds Jest unit tests for rollback command logic (success/failure/confirm flows). |
| src/commands/launch/index.ts | Adds --response-mode flag and updates examples (currently has a syntax error). |
| src/adapters/github.ts | Wires response-mode/prompt to set isStreamingEnabled and sends it in project creation mutation. |
| src/adapters/github.test.ts | Adds Jest coverage for streaming prompt / flag behavior in GitHub adapter. |
| src/adapters/file-upload.ts | Wires response-mode/prompt to set isStreamingEnabled and sends it in project creation mutation. |
| src/adapters/file-upload.test.ts | Adds Jest coverage for streaming prompt / flag behavior in File Upload adapter. |
| package.json | Bumps package version and updates qs override. |
| package-lock.json | Lockfile updates for dependency upgrades. |
| .talismanrc | Updates talisman ignore checksums for new/changed files. |
Comments suppressed due to low confidence (1)
test/unit/commands/rollback.test.ts:196
- This test description says it "Should ask for organization with a warning when passed incorrect org uid", but the assertion expects the
cliux.inquirestub to NOT be called. Either rename the test to match what it validates, or adjust the stubbing so it exercises the incorrect-org flow and asserts the prompt/warning behavior.
it('Should ask for organization with a warning when passed incorrect org uid', async function () {
const args = ['--org', testFlags.invalidOrg.uid, '--project', projectUid, '-e', environmentName];
const mock = sinon.mock(Rollback);
const expectation = mock.expects('run');
expectation.exactly(1);
const orgStub = stub(cliux, 'inquire').resolves(orgUid);
await Rollback.run(args);
sinon.assert.notCalled(orgStub);
orgStub.restore();
mock.verify();
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
feat: add rollback command for instantly rolling back to previous deployments
test: add tests for Rollback command
feat: add streaming option during project creation
chore: upgrade qs package minor version
test: mock cli-utilities in rollback tests to avoid uuid ESM error