chore: promote CLI to production for 5.6.0 - #196
Merged
Merged
Conversation
#187) feat(device): add the iPhone 17/18 Pro/Air and M5 iPads, drop two phantom slugs Mirrors the API enum after iOS 27 went GA. Also removes iphone-14-pro and iphone-15-pro, which this file has listed since it was written but which have never existed in the API — they only ever produced help text offering a value the backend rejects. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Bumps the minor-and-patch group with 6 updates: | Package | From | To | | --- | --- | --- | | [@clack/prompts](https://github.com/bombshell-dev/clack/tree/HEAD/packages/prompts) | `1.8.0` | `1.8.1` | | [js-yaml](https://github.com/nodeca/js-yaml) | `5.4.1` | `5.4.2` | | [zod](https://github.com/colinhacks/zod) | `4.6.2` | `4.6.5` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.5.1` | `26.6.1` | | [mocha](https://github.com/mochajs/mocha) | `12.0.1` | `12.0.2` | | [prettier](https://github.com/prettier/prettier) | `3.9.6` | `3.9.8` | Updates `@clack/prompts` from 1.8.0 to 1.8.1 - [Release notes](https://github.com/bombshell-dev/clack/releases) - [Changelog](https://github.com/bombshell-dev/clack/blob/main/packages/prompts/CHANGELOG.md) - [Commits](https://github.com/bombshell-dev/clack/commits/@clack/prompts@1.8.1/packages/prompts) Updates `js-yaml` from 5.4.1 to 5.4.2 - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](nodeca/js-yaml@5.4.1...5.4.2) Updates `zod` from 4.6.2 to 4.6.5 - [Release notes](https://github.com/colinhacks/zod/releases) - [Commits](colinhacks/zod@v4.6.2...v4.6.5) Updates `@types/node` from 26.5.1 to 26.6.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `mocha` from 12.0.1 to 12.0.2 - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md) - [Commits](mochajs/mocha@v12.0.1...v12.0.2) Updates `prettier` from 3.9.6 to 3.9.8 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@3.9.6...3.9.8) --- updated-dependencies: - dependency-name: "@clack/prompts" dependency-version: 1.8.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: js-yaml dependency-version: 5.4.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: zod dependency-version: 4.6.5 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: "@types/node" dependency-version: 26.6.1 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: mocha dependency-version: 12.0.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: prettier dependency-version: 3.9.8 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 74.0.0 to 76.0.0. - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](sindresorhus/eslint-plugin-unicorn@v74.0.0...v76.0.0) --- updated-dependencies: - dependency-name: eslint-plugin-unicorn dependency-version: 75.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dcd upload passed Boolean(args.encrypt) to the binary upload, so without --encrypt it sent an explicit false, and an explicit value beats the environment in isEncryptionEnabled. DCD_ENCRYPT=1 (and the legacy DCD_ENCRYPT_BINARIES=1) was therefore ignored and the binary went up in plaintext, although --encrypt's help says the variable enables it. It now uses the same rule as dcd cloud: --encrypt turns encryption on, and otherwise the environment decides.
…lp (#193) The html and html-detailed reports download as a ZIP (report.html plus its screenshots and assets), but without --html-path they were saved as ./report.html, a file no browser can open. They now default to ./report.zip in dcd cloud, dcd artifacts and the MCP download tool. An explicit --html-path is used exactly as given, and the Allure and JUnit defaults are unchanged. config.yaml's platform.ios / platform.android disableAnimations was picked by guessing the platform from --ios-device / --ios-version, so an iOS run without them read the android block. The app binary now decides when the CLI has it (.apk is Android; .app, .zip and Expo .tar.gz are iOS), with the old guess kept for --app-binary-id. The flag was also combined as flag || config, so it could only ever turn animations off: it now has no default, and an explicit --disable-animations or --no-disable-animations wins over config.yaml. Help text: --android-no-snapshot cold-boots automatically from API 34, not 35, and --cancel-previous needs repo plus branch or PR metadata rather than "CI"; without it nothing is superseded.
…ns (#192) A dcd login session's access token lasts about an hour, and resolveAuth only refreshes it when a command starts. The MCP server resolved auth once for its whole lifetime, so with a stored session every tool call failed an hour after the server started, until it was restarted. dcd cloud likewise polled, and then downloaded reports, with the headers it started with, so a run that outlasted the token kept failing polls until it gave up. AuthContext now carries the session's expiry. The MCP context re-resolves once the cached session is near expiry, and a failed attempt isn't cached, so the next tool call retries (including after a fresh dcd login). The poll loop, the downloads after it, and dcd_run_cloud_test's wait loop call the new refreshAuth, which re-reads the stored session and refreshes it under the existing lock, so a token another dcd process already rotated is picked up rather than raced for. It keeps the org the command started with, and the realtime socket is handed the new token so it isn't dropped at expiry. A network blip during refresh is retried like any failed poll; a refused refresh token stops the poll at once with a reconnect hint instead of spending the 30-attempt retry budget on it. API-key auth is unchanged.
…190) dcd cloud rejected any --ios-device, --ios-version, --android-device or --android-api-level value missing from the CLI's hard-coded enums before the API was consulted, so a device the API already runs could not be used until a CLI release listed it (5.5.0 refuses the iPhone 17, iPhone Air, iPhone 18 Pro and M5 iPads). Those values are now checked only against the compatibility data the API returns, which DeviceValidationService already used for the device/version pair; the enums remain as help text. An unknown device still fails before anything is uploaded, and now lists the devices the API offers: Play requests list the Play devices, and a device that exists but has no Play image says so. A lone device or version is still checked against the API's global defaults (iPhone 14 on iOS 17, Pixel 7 on API 34), because the API fills in the same defaults and rejects an incompatible pair; the error now says which default was checked and which flag to pass. If the API stops offering the device the CLI assumes is its default, a version-only request is left to the API instead of being refused against the stale assumption. The MCP run tool gets the same messages, naming its own parameters.
* fix(whoami): say when an API key overrides the stored session whoami and switch-org show and change only the stored dcd login session, but every other command authenticates with --api-key or DEVICE_CLOUD_API_KEY first. With a key exported, whoami reported a user and org that the next dcd cloud would not run as, and switch-org appeared to move commands to an org they never used. whoami now accepts --api-key, and when a key is present from either source it says that other commands use that key and its org rather than the session; logged out, it says the key will be used instead of only suggesting dcd login. switch-org warns the same way when DEVICE_CLOUD_API_KEY is exported. The precedence check lives beside resolveAuth so the two cannot drift. * refactor(whoami): reuse the shared api-key flag Spread apiFlags['api-key'] and override only the description, per the flag-composition rule, instead of redefining type and alias inline.
* fix(mcp): correct the npx setup command The README told MCP clients to run `npx -y @devicecloud.dev/dcd dcd-mcp`. npx runs a package's default bin, which here is `dcd`, so that command ran `dcd dcd-mcp` and printed the CLI's usage instead of starting the server. The server is the package's second bin and has to be named with `npx -y --package=@devicecloud.dev/dcd dcd-mcp`. server.json had the same problem in registry form: clients assemble `npx <runtimeArguments> <identifier>@<version> <packageArguments>`, so a `dcd-mcp` package argument reached the `dcd` bin too. The manifest now puts `-y`, `--package <pkg>@<version>` and `dcd-mcp` in runtimeArguments; the identifier a client appends after them is an extra argument that dcd-mcp ignores. Its version was still the 5.0.0-beta.0 it was written with and nothing kept it current, so it now carries the last stable release and release-please rewrites all three pins on each stable release. It also moves to the current registry schema (the old schema URL no longer resolves), which caps the description at 100 characters. The dcd_list_devices tool description also had its mapping inverted: each platform maps a device to the OS versions it runs, not the other way round. * fix(mcp): let registry clients supply the --package version release-please's json updater replaces the whole matched value, so the extra-files entry pointing at the --package argument would have rewritten '@devicecloud.dev/dcd@5.5.0' to a bare '5.6.0' on the next release and broken the command again. server.json now ends runtimeArguments with a bare --package, so the '<identifier>@<version>' a registry client appends becomes its value, and dcd-mcp moves to packageArguments. The pin lives only in packages[].version, which release-please already rewrites, so that extra-files entry is dropped. The assembled 'npx -y --package @devicecloud.dev/dcd@5.5.0 dcd-mcp' was checked to start the server. The unit test now guards that no argument embeds a version and that release-please only targets bare version fields.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Type of change
fix— bug fixfeat— new featureperf— performance improvementrefactor— code change that's neither a fix nor a featuredocs— documentation onlychore/ci/build/test— tooling, no user-facing change!or PR notes aBREAKING CHANGE:)Checklist
pnpm lintpassespnpm typecheckpassespnpm buildpassesCHANGELOG.md(release-please handles this)README.md/STYLE_GUIDE.mdupdated if behaviour or output changedHow to test