Repository navigation
Conversation
Composer's family gains `dev logs [address]` (composer ADR-0056): what the services of the app `prisma dev` runs from this directory write to stdout and stderr, with `--tail` (default 100) and `--follow` like `service logs`. Mount it beside `dev url` and `dev stop`, mention it in the `dev` group brief, and document the two new codes (DEV.NO_LOGS, DEV.LOGS_UNSUPPORTED) in the error reference. Like `dev url`, it touches only local emulators, so it goes in the e2e EXCLUSIONS with LOCAL_EMULATOR_REASON; Composer's local-dev-detach integration test runs it against real emulators. Needs the @prisma/composer-cli release that ships `dev logs`: until the product-published bump lands, `composerCommandFamily.commands["dev logs"]` is undefined and the mount tests fail. Verified locally against the composer workspace build: cli tests, typecheck and lint pass.
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
4 tasks done
Contributor
Author
|
Closing without merging for now, alongside prisma/composer#378. We'll come back to it later. The branch |
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.
Companion to prisma/composer#378, which adds
prisma dev logsto Composer's command family (composer ADR-0056).What this does
dev logsinpackages/cli/src/cli.tsbesidedev urlanddev stop, and adds "read its logs" to thedevgroup brief.dev logsto the e2eEXCLUSIONSwithLOCAL_EMULATOR_REASON, asdev url,dev stopandemulator listalready are. It only touches local emulators, so there's no management API for an e2e test to call. Composer'slocal-dev-detachintegration test runs it against real emulators.tests/composer-mount.test.tschecks the mount, the labelled and bare stdout lines, anddev --helplisting it.mount-coverage.test.tsadds the path.docs/product/command-principles.md:dev logsis the local counterpart ofservice logs, with the same--tail(default 100) and--follow.docs/product/output-conventions.md: log lines go to stdout, prefixed[address]without an address;--jsongives output frames withdata: { service, line }.docs/reference/error-reference.md: addsDEV.NO_LOGSandDEV.LOGS_UNSUPPORTED, and addsdev logsto the existing DEV codes it raises.What the user sees
Verification
I checked this locally against the composer workspace build by temporarily swapping it in for the published
@prisma/composer-cli. With that build:pnpm --filter @prisma/cli testpasses: 1040 tests, 1 skipped.pnpm typecheckandpnpm lintpass.create-prismaNext app, a route handler'sconsole.logshows up inprisma dev logs app --tail 20.Against the published pin, the mount tests fail as expected.