Upgrades plugin in a repo without Hardhat/Truffle

My team has been using hardhat + OpenZeppelin Upgrades for deploying our projects for roughly a year, and everything has been great. We also use OpenZeppelin Relay in our API endpoints with ease.

We are in the process of opening up more of our services to clients as a API endpoint, so users can deploy their own contracts via a fee. At this time, a developers time is used to run the commands locally whenever we need a deployment. This is a NestJs API endpoint is to save on our developer time and is separate from our hardhat repo.

I want to leverage the OpenZeppelin upgrades for this endpoint, however it does not have hardhat/truffle and I do not really want to add that for just deploying. Ethers + OpenDefender relay has been enough up until this point, and now I just want to pull in the deployProxy and upgradeProxy commands as well.

I understand that the reason it's a plugin is for full integration into the development environment. However, this is not a development environment, tests are in a separate repo, this is strictly for deploying.

Is there any way I can access the safety of OpenZeppelin's Upgrades without integrating the entire hardhat or truffle stack into our endpoint?

Hi @Carson_Roscoe, the Upgrades plugins currently rely on the Hardhat and Truffle environments to handle a number of details such as how contracts are deployed. There is an issue open to refactor the logic into abstractions that can be instantiated in other ways, but that would still require implementing code to make use of those abstractions.

However, one of the main benefits of using the Upgrades plugins is validating upgrade safety and storage layout.
Note that this is possible without specifically requiring Hardhat or Truffle by using the Upgrades Core API which is available in the package @openzeppelin/upgrades-core. See this test case for some examples on how to use it.

For your scenario, you can consider using the above Core API to perform validations, and then perform your own deploy or upgrade only if the validations pass without any errors.