feat(cli): Add plugin:publish and plugin:add commands support (#10938)

RESOLVES FRMW-2864
RESOLVES FRMW-2868

**What**
Add support for the following cli commands:
- `plugin:publish`
- `plugin:add`
This commit is contained in:
Adrien de Peretti authored and GitHub committed 2025-01-13 14:24:49 +00:00
1 parent c895ed8013
commit b7a3759824
4 files changed
+69

No files matched your search

@@ -0,0 +1,17 @@
import * as yalc from "yalc"
/**
* Add the specified plugins to the project from the local packages registry
*/
export default async function localAddPlugin({
directory,
plugin_names,
}: {
directory: string
plugin_names: string[]
}) {
await yalc.addPackages(plugin_names, {
workingDir: directory,
replace: true,
})
}
@@ -0,0 +1,17 @@
import * as yalc from "yalc"
/**
* Publish the plugin to the local packages registry
*/
export default async function localPublishPlugin({
directory,
}: {
directory: string
}) {
await yalc.publishPackage({
push: true,
workingDir: directory,
changed: true,
replace: true,
})
}