diff --git a/src/datastore/AppsDataStore.ts b/src/datastore/AppsDataStore.ts index 48349c1..a5f9de9 100644 --- a/src/datastore/AppsDataStore.ts +++ b/src/datastore/AppsDataStore.ts @@ -181,15 +181,13 @@ class AppsDataStore { const appToSave: IAppDefSaved = app if (passwordToBeEncrypted) { - appToSave.appPushWebhook!.repoInfo!.passwordEncrypted = self.encryptor.encrypt( - passwordToBeEncrypted - ) + appToSave.appPushWebhook!.repoInfo!.passwordEncrypted = + self.encryptor.encrypt(passwordToBeEncrypted) } if (sshKeyToBeEncrypted) { - appToSave.appPushWebhook!.repoInfo!.sshKeyEncrypted = self.encryptor.encrypt( - sshKeyToBeEncrypted - ) + appToSave.appPushWebhook!.repoInfo!.sshKeyEncrypted = + self.encryptor.encrypt(sshKeyToBeEncrypted) } return appToSave @@ -716,9 +714,8 @@ class AppsDataStore { appObj.appDeployTokenConfig.appDeployToken = undefined } else if (!appObj.appDeployTokenConfig.appDeployToken) { // App is supposed to have a token, but it doesn't have one yet. The first time use case. - appObj.appDeployTokenConfig.appDeployToken = Utils.generateRandomString( - 32 - ) + appObj.appDeployTokenConfig.appDeployToken = + Utils.generateRandomString(32) } if (httpAuth && httpAuth.user) { diff --git a/src/docker/DockerApi.ts b/src/docker/DockerApi.ts index 9e5c440..e7e20ab 100644 --- a/src/docker/DockerApi.ts +++ b/src/docker/DockerApi.ts @@ -16,9 +16,7 @@ const dockerodeUtils = require('dockerode/lib/util') const Base64 = Base64Provider.Base64 -function safeParseChunk( - chunk: string -): { +function safeParseChunk(chunk: string): { stream?: string error?: any errorDetail?: any @@ -159,7 +157,7 @@ class DockerApi { return self.dockerode.listServices() }) .then(function (services) { - return ((services || []) as unknown) as DockerService[] + return (services || []) as unknown as DockerService[] }) } @@ -1275,7 +1273,8 @@ class DockerApi { } } newConstraints.push(`node.id == ${nodeId}`) - updatedData.TaskTemplate.Placement.Constraints = newConstraints + updatedData.TaskTemplate.Placement.Constraints = + newConstraints } if (arrayOfEnvKeyAndValue) { @@ -1437,7 +1436,8 @@ class DockerApi { // to restart once. Once rebooted, all changes start showing up. updatedData.TaskTemplate.ContainerSpec.Labels = updatedData.TaskTemplate.ContainerSpec.Labels || {} - updatedData.TaskTemplate.ContainerSpec.Labels.randomLabelForceUpdate = uuid() + updatedData.TaskTemplate.ContainerSpec.Labels.randomLabelForceUpdate = + uuid() updatedData.authconfig = authObject @@ -1546,8 +1546,9 @@ class DockerApi { .logs({ tail: tailCount, follow: false, - timestamps: !!CaptainConstants.configs - .enableDockerLogsTimestamp, + timestamps: + !!CaptainConstants.configs + .enableDockerLogsTimestamp, stdout: true, stderr: true, }) diff --git a/src/routes/login/LoginRouter.ts b/src/routes/login/LoginRouter.ts index d7c2009..7cf4e2f 100644 --- a/src/routes/login/LoginRouter.ts +++ b/src/routes/login/LoginRouter.ts @@ -25,8 +25,8 @@ router.post('/', function (req, res, next) { let authToken: string - const namespace = InjectionExtractor.extractGlobalsFromInjected(res) - .namespace + const namespace = + InjectionExtractor.extractGlobalsFromInjected(res).namespace let loadedHashedPassword = '' diff --git a/src/routes/user/UserRouter.ts b/src/routes/user/UserRouter.ts index 8cedbae..68aec7f 100644 --- a/src/routes/user/UserRouter.ts +++ b/src/routes/user/UserRouter.ts @@ -96,10 +96,10 @@ router.use(function (req, res, next) { }) router.post('/changepassword/', function (req, res, next) { - const namespace = InjectionExtractor.extractUserFromInjected(res).user - .namespace - const dataStore = InjectionExtractor.extractUserFromInjected(res).user - .dataStore + const namespace = + InjectionExtractor.extractUserFromInjected(res).user.namespace + const dataStore = + InjectionExtractor.extractUserFromInjected(res).user.dataStore Promise.resolve() // .then(function (data) { diff --git a/src/routes/user/apps/appdata/AppDataRouter.ts b/src/routes/user/apps/appdata/AppDataRouter.ts index bfa9d56..f13c48d 100644 --- a/src/routes/user/apps/appdata/AppDataRouter.ts +++ b/src/routes/user/apps/appdata/AppDataRouter.ts @@ -13,8 +13,8 @@ const upload = multer({ router.get('/:appName/logs', function (req, res, next) { let appName = req.params.appName - const serviceManager = InjectionExtractor.extractUserFromInjected(res).user - .serviceManager + const serviceManager = + InjectionExtractor.extractUserFromInjected(res).user.serviceManager return Promise.resolve() .then(function () { @@ -37,8 +37,8 @@ router.get('/:appName/logs', function (req, res, next) { router.get('/:appName/', function (req, res, next) { let appName = req.params.appName - const serviceManager = InjectionExtractor.extractUserFromInjected(res).user - .serviceManager + const serviceManager = + InjectionExtractor.extractUserFromInjected(res).user.serviceManager return Promise.resolve() .then(function () { @@ -56,8 +56,8 @@ router.get('/:appName/', function (req, res, next) { }) router.post('/:appName/', function (req, res, next) { - const dataStore = InjectionExtractor.extractUserFromInjected(res).user - .dataStore + const dataStore = + InjectionExtractor.extractUserFromInjected(res).user.dataStore let appName = req.params.appName dataStore @@ -74,8 +74,8 @@ router.post( '/:appName/', upload.single('sourceFile'), function (req, res, next) { - const serviceManager = InjectionExtractor.extractUserFromInjected(res) - .user.serviceManager + const serviceManager = + InjectionExtractor.extractUserFromInjected(res).user.serviceManager const appName = req.params.appName const isDetachedBuild = !!req.query.detached @@ -95,9 +95,8 @@ router.post( } Promise.resolve().then(function () { - const promiseToDeployNewVer = serviceManager.scheduleDeployNewVersion( - appName, - { + const promiseToDeployNewVer = + serviceManager.scheduleDeployNewVersion(appName, { uploadedTarPathSource: !!tarballSourceFilePath ? { uploadedTarPath: tarballSourceFilePath, @@ -110,8 +109,7 @@ router.post( gitHash, } : undefined, - } - ) + }) if (isDetachedBuild) { res.send( diff --git a/src/routes/user/apps/appdefinition/AppDefinitionRouter.ts b/src/routes/user/apps/appdefinition/AppDefinitionRouter.ts index 980698f..98a2ac5 100644 --- a/src/routes/user/apps/appdefinition/AppDefinitionRouter.ts +++ b/src/routes/user/apps/appdefinition/AppDefinitionRouter.ts @@ -18,8 +18,8 @@ const DEFAULT_APP_CAPTAIN_DEFINITION = JSON.stringify({ // unused images router.get('/unusedImages', function (req, res, next) { - const serviceManager = InjectionExtractor.extractUserFromInjected(res).user - .serviceManager + const serviceManager = + InjectionExtractor.extractUserFromInjected(res).user.serviceManager Promise.resolve() .then(function () { @@ -41,8 +41,8 @@ router.get('/unusedImages', function (req, res, next) { // delete images router.post('/deleteImages', function (req, res, next) { - const serviceManager = InjectionExtractor.extractUserFromInjected(res).user - .serviceManager + const serviceManager = + InjectionExtractor.extractUserFromInjected(res).user.serviceManager let imageIds = req.body.imageIds || [] Promise.resolve() @@ -61,10 +61,10 @@ router.post('/deleteImages', function (req, res, next) { // Get All App Definitions router.get('/', function (req, res, next) { - const dataStore = InjectionExtractor.extractUserFromInjected(res).user - .dataStore - const serviceManager = InjectionExtractor.extractUserFromInjected(res).user - .serviceManager + const dataStore = + InjectionExtractor.extractUserFromInjected(res).user.dataStore + const serviceManager = + InjectionExtractor.extractUserFromInjected(res).user.serviceManager let appsArray: IAppDef[] = [] dataStore @@ -103,8 +103,8 @@ router.get('/', function (req, res, next) { }) router.post('/enablebasedomainssl/', function (req, res, next) { - const serviceManager = InjectionExtractor.extractUserFromInjected(res).user - .serviceManager + const serviceManager = + InjectionExtractor.extractUserFromInjected(res).user.serviceManager const appName = req.body.appName @@ -121,8 +121,8 @@ router.post('/enablebasedomainssl/', function (req, res, next) { }) router.post('/customdomain/', function (req, res, next) { - const serviceManager = InjectionExtractor.extractUserFromInjected(res).user - .serviceManager + const serviceManager = + InjectionExtractor.extractUserFromInjected(res).user.serviceManager let appName = req.body.appName let customDomain = (req.body.customDomain || '').toLowerCase() @@ -143,8 +143,8 @@ router.post('/customdomain/', function (req, res, next) { }) router.post('/removecustomdomain/', function (req, res, next) { - const serviceManager = InjectionExtractor.extractUserFromInjected(res).user - .serviceManager + const serviceManager = + InjectionExtractor.extractUserFromInjected(res).user.serviceManager let appName = req.body.appName let customDomain = (req.body.customDomain || '').toLowerCase() @@ -162,8 +162,8 @@ router.post('/removecustomdomain/', function (req, res, next) { }) router.post('/enablecustomdomainssl/', function (req, res, next) { - const serviceManager = InjectionExtractor.extractUserFromInjected(res).user - .serviceManager + const serviceManager = + InjectionExtractor.extractUserFromInjected(res).user.serviceManager let appName = req.body.appName let customDomain = (req.body.customDomain || '').toLowerCase() @@ -184,10 +184,10 @@ router.post('/enablecustomdomainssl/', function (req, res, next) { }) router.post('/register/', function (req, res, next) { - const dataStore = InjectionExtractor.extractUserFromInjected(res).user - .dataStore - const serviceManager = InjectionExtractor.extractUserFromInjected(res).user - .serviceManager + const dataStore = + InjectionExtractor.extractUserFromInjected(res).user.dataStore + const serviceManager = + InjectionExtractor.extractUserFromInjected(res).user.serviceManager const appName = req.body.appName as string const hasPersistentData = !!req.body.hasPersistentData @@ -208,7 +208,8 @@ router.post('/register/', function (req, res, next) { appName, { captainDefinitionContentSource: { - captainDefinitionContent: DEFAULT_APP_CAPTAIN_DEFINITION, + captainDefinitionContent: + DEFAULT_APP_CAPTAIN_DEFINITION, gitHash: '', }, } @@ -244,8 +245,8 @@ router.post('/register/', function (req, res, next) { }) router.post('/delete/', function (req, res, next) { - const serviceManager = InjectionExtractor.extractUserFromInjected(res).user - .serviceManager + const serviceManager = + InjectionExtractor.extractUserFromInjected(res).user.serviceManager let appName = req.body.appName let volumes = req.body.volumes || [] @@ -284,8 +285,8 @@ router.post('/delete/', function (req, res, next) { }) router.post('/rename/', function (req, res, next) { - const serviceManager = InjectionExtractor.extractUserFromInjected(res).user - .serviceManager + const serviceManager = + InjectionExtractor.extractUserFromInjected(res).user.serviceManager let oldAppName = req.body.oldAppName + '' let newAppName = req.body.newAppName + '' @@ -306,8 +307,8 @@ router.post('/rename/', function (req, res, next) { }) router.post('/update/', function (req, res, next) { - const serviceManager = InjectionExtractor.extractUserFromInjected(res).user - .serviceManager + const serviceManager = + InjectionExtractor.extractUserFromInjected(res).user.serviceManager let appName = req.body.appName let nodeId = req.body.nodeId diff --git a/src/routes/user/apps/webhooks/WebhooksRouter.ts b/src/routes/user/apps/webhooks/WebhooksRouter.ts index 7112239..853e881 100644 --- a/src/routes/user/apps/webhooks/WebhooksRouter.ts +++ b/src/routes/user/apps/webhooks/WebhooksRouter.ts @@ -45,9 +45,8 @@ function getPushedBranches(req: express.Request) { router.post('/triggerbuild', urlencodedParser, function (req, res, next) { return Promise.resolve() .then(function () { - const extracted = InjectionExtractor.extractAppAndUserForWebhook( - res - ) + const extracted = + InjectionExtractor.extractAppAndUserForWebhook(res) const { serviceManager, namespace } = extracted.user const { appName, app } = extracted diff --git a/src/routes/user/oneclick/OneClickAppRouter.ts b/src/routes/user/oneclick/OneClickAppRouter.ts index 3b3df16..799223e 100644 --- a/src/routes/user/oneclick/OneClickAppRouter.ts +++ b/src/routes/user/oneclick/OneClickAppRouter.ts @@ -20,8 +20,8 @@ interface IOneClickAppIdentifier { } router.post('/repositories/insert', function (req, res, next) { - const dataStore = InjectionExtractor.extractUserFromInjected(res).user - .dataStore + const dataStore = + InjectionExtractor.extractUserFromInjected(res).user.dataStore let apiBaseUrl = `${req.body.repositoryUrl || ''}` if (apiBaseUrl.endsWith('/')) { apiBaseUrl = apiBaseUrl.substring(0, apiBaseUrl.length - 1) @@ -71,8 +71,8 @@ router.post('/repositories/insert', function (req, res, next) { }) router.post('/repositories/delete', function (req, res, next) { - const dataStore = InjectionExtractor.extractUserFromInjected(res).user - .dataStore + const dataStore = + InjectionExtractor.extractUserFromInjected(res).user.dataStore let apiBaseUrl = `${req.body.repositoryUrl || ''}` if (apiBaseUrl.endsWith('/')) { apiBaseUrl = apiBaseUrl.substring(0, apiBaseUrl.length - 1) @@ -103,8 +103,8 @@ router.post('/repositories/delete', function (req, res, next) { }) router.get('/repositories/', function (req, res, next) { - const dataStore = InjectionExtractor.extractUserFromInjected(res).user - .dataStore + const dataStore = + InjectionExtractor.extractUserFromInjected(res).user.dataStore return Promise.resolve() // .then(function () { @@ -123,8 +123,8 @@ router.get('/repositories/', function (req, res, next) { }) router.get('/template/list', function (req, res, next) { - const dataStore = InjectionExtractor.extractUserFromInjected(res).user - .dataStore + const dataStore = + InjectionExtractor.extractUserFromInjected(res).user.dataStore return Promise.resolve() // .then(function () { @@ -192,8 +192,8 @@ router.get('/template/list', function (req, res, next) { router.get('/template/app', function (req, res, next) { const baseDomain = req.query.baseDomain as string const appName = req.query.appName as string - const dataStore = InjectionExtractor.extractUserFromInjected(res).user - .dataStore + const dataStore = + InjectionExtractor.extractUserFromInjected(res).user.dataStore return Promise.resolve() // .then(function () { diff --git a/src/routes/user/registeries/RegistriesRouter.ts b/src/routes/user/registeries/RegistriesRouter.ts index ed0c86d..f23fd58 100644 --- a/src/routes/user/registeries/RegistriesRouter.ts +++ b/src/routes/user/registeries/RegistriesRouter.ts @@ -8,9 +8,10 @@ import Logger from '../../../utils/Logger' const router = express.Router() router.get('/', function (req, res, next) { - const registryHelper = InjectionExtractor.extractUserFromInjected( - res - ).user.serviceManager.getRegistryHelper() + const registryHelper = + InjectionExtractor.extractUserFromInjected( + res + ).user.serviceManager.getRegistryHelper() let registries: IRegistryInfo[] = [] return Promise.resolve() @@ -40,9 +41,10 @@ router.post('/insert/', function (req, res, next) { let registryDomain = req.body.registryDomain + '' let registryImagePrefix = req.body.registryImagePrefix + '' - const registryHelper = InjectionExtractor.extractUserFromInjected( - res - ).user.serviceManager.getRegistryHelper() + const registryHelper = + InjectionExtractor.extractUserFromInjected( + res + ).user.serviceManager.getRegistryHelper() return Promise.resolve() .then(function () { @@ -70,9 +72,10 @@ router.post('/update/', function (req, res, next) { let registryDomain = req.body.registryDomain + '' let registryImagePrefix = req.body.registryImagePrefix + '' - const registryHelper = InjectionExtractor.extractUserFromInjected( - res - ).user.serviceManager.getRegistryHelper() + const registryHelper = + InjectionExtractor.extractUserFromInjected( + res + ).user.serviceManager.getRegistryHelper() return Promise.resolve() .then(function () { @@ -95,9 +98,10 @@ router.post('/update/', function (req, res, next) { // ERRORS if default push is this OR if it's local router.post('/delete/', function (req, res, next) { let registryId = req.body.registryId + '' - const registryHelper = InjectionExtractor.extractUserFromInjected( - res - ).user.serviceManager.getRegistryHelper() + const registryHelper = + InjectionExtractor.extractUserFromInjected( + res + ).user.serviceManager.getRegistryHelper() return Promise.resolve() .then(function () { @@ -115,9 +119,10 @@ router.post('/delete/', function (req, res, next) { router.post('/setpush/', function (req, res, next) { let registryId = req.body.registryId + '' - const registryHelper = InjectionExtractor.extractUserFromInjected( - res - ).user.serviceManager.getRegistryHelper() + const registryHelper = + InjectionExtractor.extractUserFromInjected( + res + ).user.serviceManager.getRegistryHelper() return Promise.resolve() .then(function () { diff --git a/src/routes/user/system/SystemRouter.ts b/src/routes/user/system/SystemRouter.ts index 688ce33..1a4aec4 100644 --- a/src/routes/user/system/SystemRouter.ts +++ b/src/routes/user/system/SystemRouter.ts @@ -119,8 +119,8 @@ router.post('/forcessl/', function (req, res, next) { }) router.get('/info/', function (req, res, next) { - const dataStore = InjectionExtractor.extractUserFromInjected(res).user - .dataStore + const dataStore = + InjectionExtractor.extractUserFromInjected(res).user.dataStore return Promise.resolve() .then(function () { @@ -196,8 +196,8 @@ router.post('/versionInfo/', function (req, res, next) { }) router.get('/netdata/', function (req, res, next) { - const dataStore = InjectionExtractor.extractUserFromInjected(res).user - .dataStore + const dataStore = + InjectionExtractor.extractUserFromInjected(res).user.dataStore return Promise.resolve() .then(function () { @@ -294,9 +294,10 @@ router.get('/nodes/', function (req, res, next) { router.post('/nodes/', function (req, res, next) { const MANAGER = 'manager' const WORKER = 'worker' - const registryHelper = InjectionExtractor.extractUserFromInjected( - res - ).user.serviceManager.getRegistryHelper() + const registryHelper = + InjectionExtractor.extractUserFromInjected( + res + ).user.serviceManager.getRegistryHelper() let isManager: boolean diff --git a/src/routes/user/system/selfhostregistry/SystemRouteSelfHostRegistry.ts b/src/routes/user/system/selfhostregistry/SystemRouteSelfHostRegistry.ts index cec1ed5..10a61d2 100644 --- a/src/routes/user/system/selfhostregistry/SystemRouteSelfHostRegistry.ts +++ b/src/routes/user/system/selfhostregistry/SystemRouteSelfHostRegistry.ts @@ -14,9 +14,10 @@ const router = express.Router() router.post('/enableregistry/', function (req, res, next) { const captainManager = CaptainManager.get() const password = uuid() - const registryHelper = InjectionExtractor.extractUserFromInjected( - res - ).user.serviceManager.getRegistryHelper() + const registryHelper = + InjectionExtractor.extractUserFromInjected( + res + ).user.serviceManager.getRegistryHelper() return Promise.resolve() .then(function () { @@ -64,9 +65,10 @@ router.post('/enableregistry/', function (req, res, next) { // ERRORS if default push is this router.post('/disableregistry/', function (req, res, next) { const captainManager = CaptainManager.get() - const registryHelper = InjectionExtractor.extractUserFromInjected( - res - ).user.serviceManager.getRegistryHelper() + const registryHelper = + InjectionExtractor.extractUserFromInjected( + res + ).user.serviceManager.getRegistryHelper() return Promise.resolve() .then(function () { diff --git a/src/user/DockerRegistryHelper.ts b/src/user/DockerRegistryHelper.ts index db197fb..2514f15 100644 --- a/src/user/DockerRegistryHelper.ts +++ b/src/user/DockerRegistryHelper.ts @@ -272,13 +272,14 @@ class DockerRegistryHelper { return self.registriesDataStore.getAllRegistries() }) .then(function (allRegs) { - let promiseToAddRegistry = self.registriesDataStore.addRegistryToDb( - registryUser, - registryPassword, - registryDomain, - registryImagePrefix, - registryType - ) + let promiseToAddRegistry = + self.registriesDataStore.addRegistryToDb( + registryUser, + registryPassword, + registryDomain, + registryImagePrefix, + registryType + ) // Product decision. We want to make the first added registry the default one, // this way, it's easier for new users to grasp the concept of default push registry. diff --git a/src/user/ImageMaker.ts b/src/user/ImageMaker.ts index 1c3049d..0a5be5b 100644 --- a/src/user/ImageMaker.ts +++ b/src/user/ImageMaker.ts @@ -501,10 +501,11 @@ export default class ImageMaker { .then(function (dockerfileExists) { if (!dockerfileExists) return false - const captainDefinitionDefault: ICaptainDefinition = { - schemaVersion: 2, - dockerfilePath: `./${DOCKER_FILE}`, - } + const captainDefinitionDefault: ICaptainDefinition = + { + schemaVersion: 2, + dockerfilePath: `./${DOCKER_FILE}`, + } return fs .outputFile( diff --git a/src/user/ServiceManager.ts b/src/user/ServiceManager.ts index 3752ad1..acee7dc 100644 --- a/src/user/ServiceManager.ts +++ b/src/user/ServiceManager.ts @@ -822,8 +822,8 @@ class ServiceManager { return { isAppBuilding: self.isAppBuilding(appName), logs: self.buildLogsManager.getAppBuildLogs(appName).getLogs(), - isBuildFailed: self.buildLogsManager.getAppBuildLogs(appName) - .isBuildFailed, + isBuildFailed: + self.buildLogsManager.getAppBuildLogs(appName).isBuildFailed, } } diff --git a/src/user/system/LoadBalancerManager.ts b/src/user/system/LoadBalancerManager.ts index aabb7e6..68acd99 100644 --- a/src/user/system/LoadBalancerManager.ts +++ b/src/user/system/LoadBalancerManager.ts @@ -281,7 +281,8 @@ class LoadBalancerManager { serverWithSubDomain.websocketSupport = websocketSupport const httpPort = webApp.containerHttpPort || 80 serverWithSubDomain.containerHttpPort = httpPort - serverWithSubDomain.nginxConfigTemplate = nginxConfigTemplate + serverWithSubDomain.nginxConfigTemplate = + nginxConfigTemplate serverWithSubDomain.httpBasicAuth = httpBasicAuth servers.push(serverWithSubDomain) diff --git a/src/utils/GitHelper.ts b/src/utils/GitHelper.ts index 0887f36..5becb96 100644 --- a/src/utils/GitHelper.ts +++ b/src/utils/GitHelper.ts @@ -37,9 +37,8 @@ export default class GitHelper { const REPO_GIT_PATH = sanitized.repoPath const SSH_PORT = sanitized.port - const DOMAIN = GitHelper.getDomainFromSanitizedSshRepoPath( - REPO_GIT_PATH - ) + const DOMAIN = + GitHelper.getDomainFromSanitizedSshRepoPath(REPO_GIT_PATH) Logger.d(`Cloning SSH ${REPO_GIT_PATH}`) diff --git a/src/utils/MigrateCaptainDuckDuck.ts b/src/utils/MigrateCaptainDuckDuck.ts index bc94395..23997a0 100644 --- a/src/utils/MigrateCaptainDuckDuck.ts +++ b/src/utils/MigrateCaptainDuckDuck.ts @@ -250,7 +250,8 @@ export default class MigrateCaptainDuckDuck { return Promise.resolve() .then(function () { const customDomains = app.customDomain || [] - const hasDefaultSubDomainSsl = !!app.hasDefaultSubDomainSsl + const hasDefaultSubDomainSsl = + !!app.hasDefaultSubDomainSsl return appStore.addCustomDomainForAppForMigration( appName, hasDefaultSubDomainSsl, @@ -260,7 +261,8 @@ export default class MigrateCaptainDuckDuck { .then(function () { const oldVers: any[] = app.versions || [] const newVers: IAppVersion[] = [] - const newVersOnlyDeployVersion: IAppVersion[] = [] + const newVersOnlyDeployVersion: IAppVersion[] = + [] const deployedVersion = Number( app.deployedVersion ) @@ -273,9 +275,10 @@ export default class MigrateCaptainDuckDuck { let deployedImageName = `img-captain--${appName}:${thisVersion}` if (thisVersion === deployedVersion) { - deployedImageName = findCurrentlyInUseImageForApp( - appName - ) + deployedImageName = + findCurrentlyInUseImageForApp( + appName + ) // Only add the currently deployed version. Revert won't work for other versions as // it's impossible to guess their image name correct 100% due to the fact that