This PR adds support for publishing packages to database.dev using the CLI.
Before publishing a package, the user needs to login to database.dev. The complete flow is like this:
User creates & copies a new token as explained in this PR.
User issues dbdev login command and pastes the copied token.
User issues dbdev publish --path <path to extension folder> command to publish a package.
Behind the scenes, the dbdev login command saves the token in a file (more secure methods of storage to be added) in user's profile. When the user issues the dbdev publish command, the CLI uses the saved token to generate a short lived JWT token which it uses to authenticate when calling the APIs to publish the extension.
Tasks
[x] Credentials file should have read/write permissions only for the owner.
This PR adds support for publishing packages to database.dev using the CLI.
Before publishing a package, the user needs to login to database.dev. The complete flow is like this:
dbdev login
command and pastes the copied token.dbdev publish --path <path to extension folder>
command to publish a package.Behind the scenes, the
dbdev login
command saves the token in a file (more secure methods of storage to be added) in user's profile. When the user issues thedbdev publish
command, the CLI uses the saved token to generate a short lived JWT token which it uses to authenticate when calling the APIs to publish the extension.Tasks