|
1 | 1 | import { Installation, ProductionInstallation } from "../installation"; |
2 | 2 | import * as inquirer from "inquirer"; |
3 | 3 | import { getHighestPatchVersion, getMinorVersions, NpmPackage } from "../npm"; |
4 | | -import { corePackage, dashboardPackage, developmentVersion } from "../fsUtils"; |
5 | 4 | import * as semver from "semver"; |
6 | 5 | import { logger } from "../log"; |
7 | | - |
8 | | -const corePackages = [corePackage, dashboardPackage]; |
9 | | - |
10 | | -// To add a new release to this cli do the following (packages need to be already published on npm): |
11 | | -// 1. add a new array under here which has all the services of the release in it (you can use the spread operator with the previous release). |
12 | | -// 2. update getServicesForVersion to return the array for the new version. |
13 | | -// 3. update supportedNodeCGIORange to include your new nodecg-io version. |
14 | | - |
15 | | -// prettier-ignore |
16 | | -const version01Services = [ |
17 | | - "ahk", "android", "curseforge", "discord", "intellij", "irc", "midi-input", "midi-output", "nanoleaf", "obs", |
18 | | - "philipshue", "rcon", "reddit", "sacn-receiver", "sacn-sender", "serial", "slack", "spotify", "streamdeck", |
19 | | - "streamelements", "telegram", "tiane", "twitch-addons", "twitch-api", "twitch-chat", "twitch-pubsub", |
20 | | - "twitter", "websocket-client", "websocket-server", "xdotool", "youtube", |
21 | | -]; |
22 | | - |
23 | | -const supportedNodeCGIORange = new semver.Range("<=0.1"); |
| 6 | +import { |
| 7 | + corePackage, |
| 8 | + corePackages, |
| 9 | + dashboardPackage, |
| 10 | + developmentVersion, |
| 11 | + getServicesForVersion, |
| 12 | + supportedNodeCGIORange, |
| 13 | +} from "./nodecgIOVersions"; |
24 | 14 |
|
25 | 15 | interface PromptVersionInput { |
26 | 16 | version: string; |
@@ -115,20 +105,6 @@ async function buildPackageList(version: string, services: string[]): Promise<Np |
115 | 105 | return await Promise.all(promises); |
116 | 106 | } |
117 | 107 |
|
118 | | -/** |
119 | | - * Returns you a list of services that are available for the passed nodecg-io version. |
120 | | - * @param version the major.minor nodecg-io version |
121 | | - * @returns all services of the passed version |
122 | | - */ |
123 | | -function getServicesForVersion(version: string): string[] { |
124 | | - switch (version) { |
125 | | - case "0.1": |
126 | | - return version01Services; |
127 | | - default: |
128 | | - throw new Error(`Don't have any service list for version ${version}. Something might be wrong here.`); |
129 | | - } |
130 | | -} |
131 | | - |
132 | 108 | /** |
133 | 109 | * Returns the list of installed services of a production installation. |
134 | 110 | * @param install the installation info for which you want the list of installed services. |
|
0 commit comments