diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a9dc10..17a1e2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log (vs-deploy) +## 9.12.0 (May 31st, 2017; load settings from external files) + +* added `loadFrom` for [packages](https://github.com/mkloubert/vs-deploy/wiki#packages-) and [targets](https://github.com/mkloubert/vs-deploy/wiki#targets-), which can define a path to an external JSON file with data to use as base settings for the underlying objects + ## 9.11.0 (May 29th, 2017; dropbox, settings and placeholders) * added `alwaysShowPackageList` setting that indicates if package list is shown, even if there is only 1 entry diff --git a/package.json b/package.json index 08493ff..0b37839 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vs-deploy", "displayName": "Deploy", "description": "Commands for deploying files of your workspace to a destination.", - "version": "9.11.0", + "version": "9.12.0", "publisher": "mkloubert", "engines": { "vscode": "^1.6.0" @@ -917,6 +917,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "name": { "type": "string", "description": "The name of the package." @@ -1352,6 +1356,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -2774,6 +2782,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -4174,6 +4186,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -5541,6 +5557,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -6930,6 +6950,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -8332,6 +8356,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -9829,6 +9857,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -11241,6 +11273,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -12616,6 +12652,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -14051,6 +14091,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -15459,6 +15503,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -16836,6 +16884,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -18205,6 +18257,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -19603,6 +19659,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -21076,6 +21136,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -22620,6 +22684,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -23986,6 +24054,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -25381,6 +25453,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -26746,6 +26822,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { @@ -28125,6 +28205,10 @@ } ] }, + "loadFrom": { + "type": "string", + "description": "The path to the JSON file from where to import data." + }, "deployed": { "type": "array", "items": { diff --git a/src/config.ts b/src/config.ts index 9197569..9efa813 100644 --- a/src/config.ts +++ b/src/config.ts @@ -109,8 +109,8 @@ export function mergeConfig(cfg: deploy_contracts.DeployConfiguration): Promise< // isFor allImports = allImports.filter(imp => { let validHosts = deploy_helpers.asArray(imp.isFor) - .map(x => deploy_helpers.toStringSafe(x).toLowerCase().trim()) - .filter(x => x); + .map(x => deploy_helpers.normalizeString(x)) + .filter(x => '' !== x); if (validHosts.length < 1) { return true; diff --git a/src/contracts.ts b/src/contracts.ts index 8adf1f6..1993629 100644 --- a/src/contracts.ts +++ b/src/contracts.ts @@ -279,6 +279,16 @@ export interface BeforeDeployWaitOperation extends BeforeDeployOperation, Deploy export interface BeforeDeployWebDeployOperation extends BeforeDeployOperation, DeployWebDeployOperation { } +/** + * An object that can load (parts) of its data from a source. + */ +export interface CanLoadFrom { + /** + * The source from where to load the data from. + */ + loadFrom?: string; +} + /** * A value with a name that is generated by code. */ @@ -1085,7 +1095,7 @@ export enum DeployOperationKind { /** * A package. */ -export interface DeployPackage extends Applyable, ConditionalItem, Hideable, Inheritable, MachineItem, PlatformItem, Sortable { +export interface DeployPackage extends Applyable, CanLoadFrom, ConditionalItem, Hideable, Inheritable, MachineItem, PlatformItem, Sortable { /** * Settings for a "package button". */ @@ -1464,7 +1474,7 @@ export interface DeploySqlOperation extends DeployOperation { /** * A target. */ -export interface DeployTarget extends Applyable, ConditionalItem, Hideable, Inheritable, MachineItem, PlatformItem, Sortable { +export interface DeployTarget extends Applyable, CanLoadFrom, ConditionalItem, Hideable, Inheritable, MachineItem, PlatformItem, Sortable { /** * List of operations that should be invoked BEFORE * target is being deployed. diff --git a/src/deploy.ts b/src/deploy.ts index 0fb8486..09e1442 100644 --- a/src/deploy.ts +++ b/src/deploy.ts @@ -32,7 +32,9 @@ import * as deploy_helpers from './helpers'; import * as deploy_globals from './globals'; import * as deploy_objects from './objects'; import * as deploy_operations from './operations'; +import * as deploy_packages from './packages'; import * as deploy_plugins from './plugins'; +import * as deploy_targets from './targets'; import * as deploy_templates from './templates'; import * as deploy_urls from './urls'; import * as deploy_values from './values'; @@ -1626,14 +1628,14 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable { this.outputChannel.appendLine(i18.t('network.interfaces.list')); Object.keys(networkInterfaces).forEach((ifName) => { let ifaces = networkInterfaces[ifName].filter(x => { - let addr = deploy_helpers.toStringSafe(x.address) - .toLowerCase().trim(); + let addr = deploy_helpers.normalizeString(x.address); + if ('IPv4' === x.family) { return !/^(127\.[\d.]+|[0:]+1|localhost)$/.test(addr); } if ('IPv6' === x.family) { - return '::1' != addr; + return '::1' !== addr; } return true; @@ -1831,38 +1833,8 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable { * @returns {DeployPackage[]} The packages. */ public getPackages(): deploy_contracts.DeployPackage[] { - let me = this; - - let packages = this.config.packages || []; - - // inherit and merge - packages = deploy_helpers.mergeInheritables(packages); - - let myName = this.name; - packages = deploy_helpers.sortPackages(packages, () => myName); - - // isFor - packages = packages.filter(p => { - let validHosts = deploy_helpers.asArray(p.isFor) - .map(x => deploy_helpers.toStringSafe(x).toLowerCase().trim()) - .filter(x => x); - - if (validHosts.length < 1) { - return true; - } - - return validHosts.indexOf(myName) > -1; - }); - - // platforms - packages = deploy_helpers.filterPlatformItems(packages); - - // if - packages = me.filterConditionalItems(packages); - - return packages.map(p => { - return deploy_helpers.applyValues(p, me.getValues()); - }); + return deploy_packages.getPackages + .apply(this); } /** @@ -1871,38 +1843,8 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable { * @returns {DeployTarget[]} The targets. */ public getTargets(): deploy_contracts.DeployTarget[] { - let me = this; - - let targets = this.config.targets || []; - - // inherit and merge - targets = deploy_helpers.mergeInheritables(targets); - - let myName = this.name; - targets = deploy_helpers.sortTargets(targets, () => myName); - - // isFor - targets = targets.filter(t => { - let validHosts = deploy_helpers.asArray(t.isFor) - .map(x => deploy_helpers.toStringSafe(x).toLowerCase().trim()) - .filter(x => x); - - if (validHosts.length < 1) { - return true; - } - - return validHosts.indexOf(myName) > -1; - }); - - // platforms - targets = deploy_helpers.filterPlatformItems(targets); - - // if - targets = me.filterConditionalItems(targets); - - return targets.map(t => { - return deploy_helpers.applyValues(t, me.getValues()); - }); + return deploy_targets.getTargets + .apply(this); } /** @@ -3643,7 +3585,7 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable { let packageNames = deploy_helpers.asArray(cfg.button.packages) .map(x => normalizeString(x)) - .filter(x => x); + .filter(x => '' !== x); let knownPackages = this.getPackages(); @@ -3652,7 +3594,7 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable { for (let i = 0; i < knownPackages.length; i++) { let kp = knownPackages[i]; - if (normalizeString(kp.name) == pn) { + if (normalizeString(kp.name) === pn) { found = true; packagesToDeploy.push(kp); } @@ -3839,7 +3781,7 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable { // try find known target for (let i = 0; i < allKnownTargets.length; i++) { let kt = allKnownTargets[i]; - if (deploy_helpers.normalizeString(kt.name) == targetName) { + if (deploy_helpers.normalizeString(kt.name) === targetName) { t = kt; // found break; } @@ -4329,11 +4271,11 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable { // modules from plugin directory let moduleFiles = FS.readdirSync(pluginDir).filter(x => { try { - if ('.' != x && '..' != x) { + if ('.' !== x && '..' !== x) { let fullPath = Path.join(pluginDir, x); if (FS.lstatSync(fullPath).isFile()) { if (fullPath.length >= 3) { - return '.js' == fullPath.substring(fullPath.length - 3); + return '.js' === fullPath.substring(fullPath.length - 3); } } } @@ -4424,7 +4366,7 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable { if (newPlugin) { let pluginIndex = ++nextPluginIndex; ctx.plugins = function() { - return loadedPlugins.filter(x => x.plugin.__index != pluginIndex) + return loadedPlugins.filter(x => x.plugin.__index !== pluginIndex) .map(x => x.plugin); }; @@ -4466,7 +4408,7 @@ export class Deployer extends Events.EventEmitter implements vscode.Disposable { }); this.outputChannel.appendLine(''); - if (loadedPlugins.length != 1) { + if (loadedPlugins.length !== 1) { this.outputChannel.appendLine(i18.t('__plugins.reload.loaded.more', loadedPlugins.length)); } else { diff --git a/src/helpers.ts b/src/helpers.ts index b8ee563..56bb27c 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -36,6 +36,7 @@ import * as HTTP from 'http'; import * as HTTPs from 'https'; import * as i18 from './i18'; const IsBinaryFile = require("isbinaryfile"); +const MergeDeep = require('merge-deep'); const MIME = require('mime'); import * as Minimatch from 'minimatch'; import * as Moment from 'moment'; @@ -1024,6 +1025,52 @@ export function isNullUndefinedOrEmptyString(val: any): boolean { '' === toStringSafe(val); } +/** + * Loads base settings for object from files. + * + * @param {T|T[]} objs The objects. + * @param {deploy_values.ValueBase|deploy_values.ValueBase[]} values The values to use for the file path(s). + * @param {boolean} cloneObjects Clone objects or not. + * + * @return {T[]} The new list. + */ +export function loadBaseSettingsFromFiles(objs: T | T[], + values?: deploy_values.ValueBase | deploy_values.ValueBase[], + cloneObjects = true): T[] { + return asArray(objs).filter(x => x).map(x => { + let loadFrom: string; + try { + loadFrom = deploy_values.replaceWithValues(values, x.loadFrom); + if (!isEmptyString(x.loadFrom)) { + if (!Path.isAbsolute(loadFrom)) { + loadFrom = Path.join(vscode.workspace.rootPath, '.vscode', loadFrom); + } + + let basePackages: T[] = JSON.parse( FS.readFileSync(loadFrom).toString('utf8') ); + basePackages = loadBaseSettingsFromFiles(basePackages, values); + + let args = [ {}, x ].concat(basePackages); + + x = MergeDeep.apply(null, + [{}, x].concat(basePackages)); + } + + if (toBooleanSafe(cloneObjects)) { + x = cloneObject(x); + } + + delete x['loadFrom']; + } + catch (e) { + vscode.window.showErrorMessage(i18.t('load.from.failed', loadFrom, e)).then(() => {}, (err) => { + log(`[ERROR] helpers.loadBaseSettingsFromFiles(): ${e}`); + }); + } + + return x; + }); +} + /** * Loads a "data transformer" module. * @@ -2320,10 +2367,10 @@ export function toRelativeTargetPath(path: string, target: deploy_contracts.Depl let normalizedDir = toStringSafe(dir).trim(); normalizedDir = replaceAllStrings(normalizedDir, Path.sep, '/'); - if (normalizedDir.lastIndexOf('/') != (normalizedDir.length - 1)) { + if (normalizedDir.lastIndexOf('/') !== (normalizedDir.length - 1)) { normalizedDir += '/'; // append ending "/" char } - if (normalizedDir.indexOf('/') != 0) { + if (normalizedDir.indexOf('/') !== 0) { normalizedDir = '/' + normalizedDir; // append leading "/" char } diff --git a/src/host.ts b/src/host.ts index 89b5d75..dec65ac 100644 --- a/src/host.ts +++ b/src/host.ts @@ -367,7 +367,7 @@ export class DeployHost { let startReading = () => { try { deploy_helpers.readSocket(socket, 4).then((dlBuff) => { - if (4 != dlBuff.length) { // must have the size of 4 + if (4 !== dlBuff.length) { // must have the size of 4 me.log(i18.t('warnings.withCategory', 'DeployHost.start().createServer()', `Invalid data buffer length ${dlBuff.length}`)); @@ -387,7 +387,7 @@ export class DeployHost { deploy_helpers.readSocket(socket, dataLength).then((msgBuff) => { closeSocket(); - if (msgBuff.length != dataLength) { // non-exptected data length + if (msgBuff.length !== dataLength) { // non-exptected data length me.log(i18.t('warnings.withCategory', 'DeployHost.start().createServer()', `Invalid buffer length ${msgBuff.length}`)); @@ -464,7 +464,7 @@ export class DeployHost { if (!isNaN(totalCount)) { fileInfo += ` / ${totalCount}`; - if (0 != totalCount) { + if (0 !== totalCount) { let percentage = Math.floor(fileNr / totalCount * 10000.0) / 100.0; fileInfo += `; ${percentage}%`; diff --git a/src/i18.ts b/src/i18.ts index adfa91c..0e493b0 100644 --- a/src/i18.ts +++ b/src/i18.ts @@ -188,6 +188,11 @@ export interface Translation { file?: string; validItem?: string; }, + load?: { + from?: { + failed?: string; + } + }, network?: { hostname?: string; interfaces?: { @@ -457,7 +462,7 @@ export function init(lang?: string): Promise { continue; } - if ('.js' != fileName.substr(fileName.length - 3)) { + if ('.js' !== fileName.substr(fileName.length - 3)) { continue; // no JavaScript file } diff --git a/src/lang/de.ts b/src/lang/de.ts index 30bb6ff..90fd87f 100644 --- a/src/lang/de.ts +++ b/src/lang/de.ts @@ -180,6 +180,11 @@ export const translation: Translation = { file: "{0:trim,surround} ist keine Datei!", validItem: '{0:trim,surround} ist kein gültiges Element, das bereitgestellt werden kann!', }, + load: { + from: { + failed: "Das Laden der Daten aus {0:trim,surround} heraus schlug fehl: {1}", + } + }, network: { hostname: 'Name dieses Computers: {0:trim,surround}', interfaces: { diff --git a/src/lang/en.ts b/src/lang/en.ts index baed67d..3c9b28c 100644 --- a/src/lang/en.ts +++ b/src/lang/en.ts @@ -181,6 +181,11 @@ export const translation: Translation = { file: "{0:trim,surround} is no file!", validItem: '{0:trim,surround} is no valid item that can be deployed!', }, + load: { + from: { + failed: "Loading data from {0:trim,surround} failed: {1}", + } + }, network: { hostname: 'Your hostname: {0:trim,surround}', interfaces: { diff --git a/src/objects.ts b/src/objects.ts index b5064e6..b5a1f97 100644 --- a/src/objects.ts +++ b/src/objects.ts @@ -372,7 +372,7 @@ export abstract class DeployPluginBase implements deploy_contracts.DeployPlugin, } // prevent recurrence - targetNames = targetNames.filter(x => x != myTargetName); + targetNames = targetNames.filter(x => x !== myTargetName); let knownTargets = this.context.targets(); let knownPlugins = this.context.plugins(); diff --git a/src/packages.ts b/src/packages.ts new file mode 100644 index 0000000..beba65b --- /dev/null +++ b/src/packages.ts @@ -0,0 +1,76 @@ +/// + +// The MIT License (MIT) +// +// vs-deploy (https://github.com/mkloubert/vs-deploy) +// Copyright (c) Marcel Joachim Kloubert +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to +// deal in the Software without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + +import * as deploy_contracts from './contracts'; +import * as deploy_helpers from './helpers'; +import * as FS from 'fs'; +import * as i18 from './i18'; +const MergeDeep = require('merge-deep'); +import * as Path from 'path'; +import * as vs_deploy from './deploy'; +import * as vscode from 'vscode'; + + +/** + * Returns the list of packages. + * + * @returns {DeployPackage[]} The packages. + */ +export function getPackages(): deploy_contracts.DeployPackage[] { + let me: vs_deploy.Deployer = this; + + let packages = (me.config.packages || []).filter(x => x); + + // load from + packages = deploy_helpers.loadBaseSettingsFromFiles(packages, me.getValues()); + + // inherit and merge + packages = deploy_helpers.mergeInheritables(packages); + + let myName = me.name; + packages = deploy_helpers.sortPackages(packages, () => myName); + + // isFor + packages = packages.filter(p => { + let validHosts = deploy_helpers.asArray(p.isFor) + .map(x => deploy_helpers.normalizeString(x)) + .filter(x => '' !== x); + + if (validHosts.length < 1) { + return true; + } + + return validHosts.indexOf(myName) > -1; + }); + + // platforms + packages = deploy_helpers.filterPlatformItems(packages); + + // if + packages = me.filterConditionalItems(packages); + + return packages.map(p => { + return deploy_helpers.applyValues(p, me.getValues()); + }); +} diff --git a/src/plugins/dropbox.ts b/src/plugins/dropbox.ts index 4fc9e4c..75e8cc0 100644 --- a/src/plugins/dropbox.ts +++ b/src/plugins/dropbox.ts @@ -85,7 +85,7 @@ function toDropboxPath(path: string): string { result = result.substr(0, result.length - 1).trim(); } - if (0 != result.indexOf(PATH_SEP)) { + if (0 !== result.indexOf(PATH_SEP)) { result = PATH_SEP + result; } @@ -443,7 +443,7 @@ class DropboxPlugin extends deploy_objects.DeployPluginWithContextBase + +// The MIT License (MIT) +// +// vs-deploy (https://github.com/mkloubert/vs-deploy) +// Copyright (c) Marcel Joachim Kloubert +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to +// deal in the Software without restriction, including without limitation the +// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +// sell copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + +import * as deploy_contracts from './contracts'; +import * as deploy_helpers from './helpers'; +import * as FS from 'fs'; +import * as i18 from './i18'; +const MergeDeep = require('merge-deep'); +import * as Path from 'path'; +import * as vs_deploy from './deploy'; +import * as vscode from 'vscode'; + + +/** + * Returns the list of targets. + * + * @returns {DeployTarget[]} The targets. + */ +export function getTargets(): deploy_contracts.DeployTarget[] { + let me: vs_deploy.Deployer = this; + + let targets = (me.config.targets || []).filter(x => x); + + // load from + targets = deploy_helpers.loadBaseSettingsFromFiles(targets, me.getValues()); + + // inherit and merge + targets = deploy_helpers.mergeInheritables(targets); + + let myName = me.name; + targets = deploy_helpers.sortTargets(targets, () => myName); + + // isFor + targets = targets.filter(t => { + let validHosts = deploy_helpers.asArray(t.isFor) + .map(x => deploy_helpers.normalizeString(x)) + .filter(x => '' !== x); + + if (validHosts.length < 1) { + return true; + } + + return validHosts.indexOf(myName) > -1; + }); + + // platforms + targets = deploy_helpers.filterPlatformItems(targets); + + // if + targets = me.filterConditionalItems(targets); + + return targets.map(t => { + return deploy_helpers.applyValues(t, me.getValues()); + }); +}