Upsun SDK for Node/JS on TypeScript.
This SDK maps the Upsun CLI commands. For more information, read the documentation.
Caution
This project is currently in Beta, meaning features and APIs may evolve over time.
Please report bugs or request new features by creating a GitHub issue.
To install the Upsun SDK, you can use npm. Run the following command in your terminal:
npm install upsun-sdk-nodeTo use the Upsun SDK, you need to initialize the Upsun class with your API key and connection URL. Here's an example:
import { UpsunClient, UpsunConfig } from "upsun-sdk-node";
const upsun = new UpsunClient({ apiKey: process.env.UPSUN_CLI_TOKEN || "" } as UpsunConfig);
const orgs = await upsun.organizations.list();
const prjs = await upsun.projects.list();
const result = await upsun.environments.redeploy("MyProjectId", "main");Clone repository:
git clone git@github.com:upsun/upsun-sdk-node.gitInstall Dep:
npm install
npm run spec:generate:installGenerate API Client (Low-level) base on OpenAPI spec.
npm run spec:generateBuild the stack:
npm run buildContributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.
This project is licensed under the Apache V2 License. See the LICENSE file for more details.