(
packageName: string,
tag: string,
options = {
canBeGlobal: true,
canBeDev: true,
},
)
| 49 | } |
| 50 | |
| 51 | function makeInstallCommand( |
| 52 | packageName: string, |
| 53 | tag: string, |
| 54 | options = { |
| 55 | canBeGlobal: true, |
| 56 | canBeDev: true, |
| 57 | }, |
| 58 | ): string { |
| 59 | let command = '' |
| 60 | if (isPrismaInstalledGlobally === 'npm' && options.canBeGlobal) { |
| 61 | command = `npm i -g ${packageName}` |
| 62 | } else if (options.canBeDev) { |
| 63 | command = `npm i --save-dev ${packageName}` |
| 64 | } else { |
| 65 | command = `npm i ${packageName}` |
| 66 | } |
| 67 | |
| 68 | // always output tag (so major upgrades work) |
| 69 | // see https://www.npmjs.com/package/prisma?activeTab=versions |
| 70 | // (can only be latest or dev via checkpoint-server) |
| 71 | command += `@${tag}` |
| 72 | |
| 73 | return command |
| 74 | } |
no outgoing calls
no test coverage detected