Publish your package to npm. List it in your own registry. Then instance admins can add your registry and install the package.
You publish under your own name. A community package is not an official @zerodot/* package. You can ask for a review to get the Verified badge. See Get a package verified.
Start from the template in Create a node package.
Package name rules
- The name without the scope must start with
zerodot-, then a letter or a digit. Example:zerodot-slack. - You can use your own scope. Example:
@acme/zerodot-slack. - Names that start with
@zerodot/are not allowed. Zerodot drops them from a registry. - Zerodot does not show other names from a registry.
Publish a version
Publish each new or changed package to npm:
pnpm --filter zerodot-example publishWrite
registry.json:pnpm run registryCommit
registry.json.Put the file on an https address. For example, use a raw GitHub URL:
https://raw.githubusercontent.com/<you>/<repo>/main/registry.jsonSend the address to the admins who use your packages.
Publish the version to npm before you run pnpm run registry. The script reads the npm checksum (integrity) of each version. It stops if the version is not on npm.
The script builds all packages in packages/*. It skips a package that is private or has no zerodot.sdk. For the file format, see Node packages.
Run pnpm run registry again after each new version. Commit the new registry.json.
Registry rules
| Rule | Value |
|---|---|
| Address | https only. No user name or password in it. |
| File size | 1 MB at most. |
| Redirects | Not followed. The address must answer with the file. |
| Timeout | 10 seconds. |
| Refresh | Zerodot reads the file again after 10 minutes. |
| Registries per instance | 20 at most. |
| Name clash | The first registry in the list wins. An official package wins over any registry. |
Zerodot drops a package entry that has no checksum.
Zerodot installs a package only when npm has the same checksum as registry.json. Zerodot installs the version that registry.json lists.
Next steps
- An admin adds your registry. See Add a community registry.
- Check the limits of a community package: Community package limits.