-
Notifications
You must be signed in to change notification settings - Fork 50
refactor: return 410 GONE for deprecated endpoints and restrict old CLI to only codemod run
#1565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
commit: |
.changeset/three-bats-glow.md
Outdated
"@codemod-com/backend": major | ||
"codemod": major |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make this a minor
or patch
version upgrade. We also don't need to bump backend.
"@codemod-com/backend": major | |
"codemod": major | |
"codemod": patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mohebifar done
Reply: ApiResponse<CreateAPIKeyResponse>; | ||
}> = async (request: UserDataPopulatedRequest, reply) => { | ||
return reply.code(410).send({ | ||
errorText: | ||
"This endpoint is no longer supported. Please use the new CLI instead.", | ||
error: GONE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to block any of the API key endpoints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mohebifar fixed
apps/backend/src/publishHandler.ts
Outdated
return reply.code(410).send({ | ||
errorText: | ||
"This endpoint is no longer supported. Please use the new CLI instead.", | ||
error: GONE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect. We need to prevent publishing "new codemods". But releasing a new version for the "existing codemods" should be allowed.
This is preventing any publish command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mohebifar done
apps/backend/src/unpublishHandler.ts
Outdated
return reply.code(410).send({ | ||
error: | ||
"This endpoint is no longer supported. Please use the new CLI instead.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Un-publishing should be allowed even encouraged 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mohebifar done
apps/cli/src/main.ts
Outdated
import { handleLoginCliCommand } from "#commands/login.js"; | ||
import { handleLogoutCliCommand } from "#commands/logout.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need login, logout, publish, unpublish, whoami, list.
For the publish endpoint, when the endpoints returns GONE
code, we'll need to show the deprecation warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mohebifar done
8b10dc0
to
a6e1c29
Compare
…nd and send feedback
a6e1c29
to
4ac01c4
Compare
📚 Description
This PR introduces a breaking change by:
410 GONE
HTTP error.codemod run
.These changes aim to clean up legacy functionality, reduce confusion for users, and encourage the use of supported interfaces only.
🧪 Test Plan
410 GONE
response with the correct message.codemod run
is allowed.