Plain repos
Minion has no plain repos or git remotes. Package source lives in saved versions: edit it with repo sessions or packages.save.
Minion doesn't have plain repos. There's no git repository behind a package, no git remote to clone or push to, and no way to turn a repo into a package. Package source lives in saved package versions, and you edit it through repo sessions.
Where package source lives
Each package is a list of numbered versions. A version is a stored set of UTF-8 files rooted at package.json: the manifest, README.md and your source files.
- See the files. Open
/app/packages/<name>in the app. The files panel lists every file in a version and shows its contents. Add?v=<number>to look at an older version. - Read the metadata.
minion.packages.get({ name })returns the description, README, exports, jobs and the current published version. It doesn't return the other source files. - Change a few files. Open a repo session with
minion.repo.openSession({ package }), edit files, run the checks and publish. See Editing package source . - Replace the whole set. Send the complete file set to
minion.packages.save. Any file you leave out isn't in the new version. - Make it run. A saved version doesn't run until it's published. An owner or admin publishes with
minion.packages.publish({ name, version }), or saves withpublish: true. Publishing runs the checks first.
await minion.packages.save({
name: 'daily-digest',
files: {
'package.json': pkgJson,
'README.md': readme,
'src/index.ts': updatedSource,
},
}) Every save is a new version, so the old one is still there if a change goes wrong. A package can have up to 200 files, 256 KB per file and 2 MB in total.
What isn't available
- Git remotes. Repo sessions are file-level edits and patches on a package version. There is nothing to clone or push.
- Plain repos. Storing source that isn't a package isn't supported. Keep that code somewhere else, such as GitHub.
- Repo events. There are no
repo.pushed,repo.createdorrepo.deletedevents for package subscriptions to listen to.
If you keep package source in your own git repository, copy the files into a packages.save call when you want a new version in Minion.