This is an example of an extension for Azot.
This project uses TypeScript to provide type checking and documentation. The repo depends on the latest extension API in TypeScript Definition format, which contains TSDoc comments describing what it does.
This extension example demonstrates some of the basic functionality the extension API can do. Bitmovin is used as an example of a service from which metadata is extracted for downloading.
- Declares supported URL patterns in
manifest.json. - Uses
getEntriesto parse media entries from a page URL. - Returns an entry with
source, so Azot can create the downloadable resource automatically.
Quick starting guide for new extension devs:
- Check if someone already developed an extension for what you want! There might be an existing extension similar enough that you can partner up with.
- Make a copy of this repo as a template with the "Use this template" button (login to GitHub if you don't see it).
- Clone your repo to a local development folder.
- Install Node.js, then run
npm iin the command line under your repo folder. - Run
npm run devto compile your extension frommain.tstodist/main.cjs. - Make changes to
main.ts(or create new.tsfiles). Those changes should be automatically compiled intodist/main.cjs. - Reload Azot to load the new version of your extension.
- For updates to the Azot API run
npm i azot@alphain the command line under your repo folder. - For testing we use
vitestby default. Runnpm testto run the test suite inmain.test.ts.
-
Update your
package.jsonwith your newversionnumber, such as1.0.1, andengines.azotwith the minimum Azot version required for your latest release.You can simplify the version bump process by running
npm version patch,npm version minorornpm version major. -
Push all commits and tags to GitHub.
-
GitHub Actions workflow will handle the rest when new tags are pushed to GitHub.
Adding your extension to the community extension list
- Publish an initial version.
- Make sure you have a
README.mdfile in the root of your repo. - Make a pull request at https://github.com/azot-labs/extensions to add your extension.
- Clone this repo.
- Make sure your Node.js is at least v24 (
node --version). npm ito install dependencies.npm run devto start compilation in watch mode.
You can include funding URLs where people who use your extension can financially support it.
The simple way is to set the funding field to your link in your package.json file:
{
"funding": {
"type": "patreon",
"url": "https://www.patreon.com/"
}
}If you have multiple URLs, you can also do:
{
"funding": [
{
"type": "individual",
"url": "https://boosty.to/"
},
{
"type": "patreon",
"url": "https://www.patreon.com/"
}
]
}