]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/server/plugins-command.ts
chore(refactor): remove shared folder dependencies to the server
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / server / plugins-command.ts
index 98049ce193bdfe6f2ffa579d04039f8846d81688..1c44711da8a969259e48b80146bd459a32385039 100644 (file)
@@ -2,9 +2,9 @@
 
 import { readJSON, writeJSON } from 'fs-extra'
 import { join } from 'path'
-import { root } from '@server/helpers/core-utils'
-import { HttpStatusCode } from '@shared/core-utils'
+import { root } from '@shared/core-utils'
 import {
+  HttpStatusCode,
   PeerTubePlugin,
   PeerTubePluginIndex,
   PeertubePluginIndexList,
@@ -158,15 +158,16 @@ export class PluginsCommand extends AbstractCommand {
   install (options: OverrideCommandOptions & {
     path?: string
     npmName?: string
+    pluginVersion?: string
   }) {
-    const { npmName, path } = options
+    const { npmName, path, pluginVersion } = options
     const apiPath = '/api/v1/plugins/install'
 
     return this.postBodyRequest({
       ...options,
 
       path: apiPath,
-      fields: { npmName, path },
+      fields: { npmName, path, pluginVersion },
       implicitToken: true,
       defaultExpectedStatus: HttpStatusCode.OK_200
     })