How to use parsedConfig method in stryker-parent

Best JavaScript code snippet using stryker-parent

index.js

Source:index.js Github

copy

Full Screen

1'use strict'2// External Modules3const async = require('async')4const debug = require('debug')('logdna:index')5const fs = require('fs')6const getos = require('getos')7const os = require('os')8const {Command} = require('commander')9const properties = require('properties')10const request = require('request')11// Internal Modules12const start = require('./lib/start.js')13const pkg = require('./package.json')14const utils = require('./lib/utils')15// Constants16const HOSTNAME_IP_REGEX = /[^0-9a-zA-Z\-.]/g17const HOSTNAME_PATH = '/etc/logdna-hostname'18// Variables19let config = require('./lib/config.js')20var processed21const commander = new Command()22process.title = 'logdna-agent'23commander._name = 'logdna-agent'24commander25 .version(pkg.version, '-v, --version')26 .description('This agent collect and ship logs for processing. Defaults to /var/log if run without parameters.')27 .option('-c, --config <file>', `uses alternate config file (default: ${config.DEFAULT_CONF_FILE})`)28 .option('-k, --key <key>', 'sets your LogDNA Ingestion Key in the config')29 .option('-d, --logdir <dir>', 'adds log directories to config, supports glob patterns', utils.appender(), [])30 .option('-f, --logfile <file>', 'adds log files to config', utils.appender(), [])31 .option('-e, --exclude <file>', 'exclude files from logdir', utils.appender(), [])32 .option('-r, --exclude-regex <pattern>', 'filter out lines matching pattern')33 .option('-n, --hostname <hostname>', `uses alternate hostname (default: ${os.hostname().replace('.ec2.internal', '')})`)34 .option('-t, --tags <tags>', 'add tags for this host, separate multiple tags by comma', utils.appender(), [])35 .option('-l, --list [params]', 'show the saved configuration (all unless params specified)', utils.appender(), false)36 .option('-u, --unset <params>', 'clear some saved configurations (use "all" to unset all except key)', utils.appender(), [])37 .option('-s, --set [key=value]', 'set config variables', utils.appender(), false)38 .on('--help', () => {39 console.log(' Examples:')40 console.log()41 console.log(' $ logdna-agent --key YOUR_INGESTION_KEY')42 console.log(' $ logdna-agent -d /home/ec2-user/logs')43 console.log(' $ logdna-agent -d /home/ec2-user/logs -d /path/to/another/log_dir # multiple logdirs in 1 go')44 console.log(' $ logdna-agent -d "/var/log/*.txt" # supports glob patterns')45 console.log(' $ logdna-agent -d "/var/log/**/myapp.log" # myapp.log in any subfolder')46 console.log(' $ logdna-agent -f /usr/local/nginx/logs/access.log')47 console.log(' $ logdna-agent -f /usr/local/nginx/logs/access.log -f /usr/local/nginx/logs/error.log')48 console.log(' $ logdna-agent -t production # tags')49 console.log(' $ logdna-agent -t staging,2ndtag')50 console.log(' $ logdna-agent -l tags,key,logdir # show specific config parameters')51 console.log(' $ logdna-agent -l # show all')52 console.log(' $ logdna-agent -u tags,logdir # unset specific entries from config')53 console.log(' $ logdna-agent -u all # unset all except LogDNA API Key')54 console.log()55 })56function loadConfig(program) {57 const conf_file = program.config || config.DEFAULT_CONF_FILE58 debug(`Path to Configuration File: ${conf_file}`)59 async.waterfall([60 (cb) => {61 fs.access(conf_file, (error) => {62 if (error) {63 return cb(null, {})64 }65 return properties.parse(conf_file, {66 path: true67 }, (error, parsedConfig) => {68 if (error) {69 utils.log(`error in parsing ${conf_file}: ${error}`, 'error')70 }71 return cb(null, error ? {} : parsedConfig)72 })73 })74 }75 , (parsedConfig, cb) => {76 parsedConfig = parsedConfig || {}77 // allow key to be passed via env78 if (process.env.LOGDNA_AGENT_KEY) {79 parsedConfig.key = process.env.LOGDNA_AGENT_KEY80 }81 if (!program.key && !parsedConfig.key) {82 console.error('LogDNA Ingestion Key not set! Use -k to set or use environment variable LOGDNA_AGENT_KEY.')83 return84 }85 if (process.env.LOGDNA_HOSTNAME) {86 parsedConfig.hostname = process.env.LOGDNA_HOSTNAME87 }88 if (!program.hostname && !parsedConfig.hostname) {89 if (fs.existsSync(HOSTNAME_PATH) && fs.statSync(HOSTNAME_PATH).isFile()) {90 parsedConfig.hostname = fs.readFileSync(HOSTNAME_PATH).toString().trim().replace(HOSTNAME_IP_REGEX, '')91 } else if (os.hostname()) {92 parsedConfig.hostname = os.hostname().replace('.ec2.internal', '')93 } else {94 console.error('Hostname information cannot be found! Use -n to set or use environment variable LOGDNA_HOSTNAME.')95 return96 }97 }98 // allow exclude to be passed via env99 if (process.env.LOGDNA_EXCLUDE) {100 parsedConfig.exclude = process.env.LOGDNA_EXCLUDE101 }102 if (process.env.USEJOURNALD) {103 parsedConfig.usejournald = process.env.USEJOURNALD104 }105 // sanitize106 if (!parsedConfig.logdir) {107 parsedConfig.logdir = [config.DEFAULT_LOG_PATH] // default entry108 } else if (!Array.isArray(parsedConfig.logdir)) {109 parsedConfig.logdir = parsedConfig.logdir.split(',') // force array110 }111 if (parsedConfig.exclude && !Array.isArray(parsedConfig.exclude)) {112 parsedConfig.exclude = parsedConfig.exclude.split(',')113 }114 var saveMessages = []115 if (program.key) {116 parsedConfig.key = program.key117 saveMessages.push('Your LogDNA Ingestion Key has been successfully saved!')118 }119 if (program.set && program.set.length > 0) {120 program.set.forEach((setOption) => {121 const kvPair = setOption.split('=')122 if (kvPair.length === 2) {123 parsedConfig[kvPair[0]] = kvPair[1]124 saveMessages.push(`Config variable: ${kvPair[0]} = ${kvPair[1]} has been saved to config.`)125 } else {126 saveMessages.push(`Unknown setting: ${setOption}. Usage: -s [key=value]`)127 }128 })129 }130 if (program.list) {131 if (typeof program.list === 'boolean') {132 program.list = ['all']133 }134 var conf = properties.parse(fs.readFileSync(conf_file).toString())135 const listResult = utils.pick2list(program.list, conf)136 if (listResult.valid) {137 var msg = utils.stringify(listResult.cfg)138 saveMessages.push(`${conf_file}:\n${msg}`)139 } else {140 saveMessages.push(listResult.msg)141 }142 }143 if (program.unset && program.unset.length > 0) {144 const unsetResult = utils.unsetConfig(program.unset, parsedConfig)145 parsedConfig = unsetResult.cfg146 saveMessages.push(unsetResult.msg)147 }148 if (program.logdir && program.logdir.length > 0) {149 processed = utils.processOption(program.logdir, parsedConfig.logdir)150 parsedConfig.logdir = processed.values151 saveMessages.push(`Log Directories: ${processed.diff} been saved to config.`)152 }153 if (program.logfile && program.logfile.length > 0) {154 processed = utils.processOption(program.logfile, parsedConfig.logdir)155 parsedConfig.logdir = processed.values156 saveMessages.push(`Log Files: ${processed.diff} been saved to config.`)157 }158 if (program.exclude && program.exclude.length > 0) {159 processed = utils.processOption(program.exclude, parsedConfig.exclude)160 parsedConfig.exclude = processed.values161 saveMessages.push(`Exclusions: ${processed.diff} been saved to config.`)162 }163 if (program.excludeRegex || process.env.LOGDNA_EXCLUDE_REGEX) {164 const re = program.excludeRegex || process.env.LOGDNA_EXCLUDE_REGEX165 // FIXME(darinspivey) - Error prone. Doesn't support modifiers or ending with166 // a slash. The user should be forced to provide open and closing slashes,167 // otherwise it's too hard to know what's part of the pattern text.168 parsedConfig.exclude_regex = re.replace(/^\//, '').replace(/\/$/, '')169 saveMessages.push(`Exclude pattern: /${parsedConfig.exclude_regex}/ been saved to config.`)170 }171 if (program.hostname) {172 parsedConfig.hostname = program.hostname173 saveMessages.push(`Hostname: ${parsedConfig.hostname} has been saved to config.`)174 }175 if (program.tags && program.tags.length > 0) {176 processed = utils.processOption(program.tags, parsedConfig.tags)177 parsedConfig.tags = processed.values178 saveMessages.push(`Tags: ${processed.diff} been saved to config.`)179 }180 if (saveMessages.length) {181 utils.saveConfig(parsedConfig, conf_file, (error, success) => {182 if (error) {183 return utils.log(`error while saving to: ${conf_file}: ${error}`, 'error')184 }185 saveMessages.forEach((message) => { console.log(message) })186 })187 return188 }189 // merge into single var after all potential saveConfigs finished190 config = {191 ...config192 , ...parsedConfig193 , tags: process.env.LOGDNA_TAGS || parsedConfig.tags194 , rescanTimer: null195 , sendUserAgent: program.sendUserAgent || process.env.LOGGER_SEND_USER_AGENT196 }197 if (config.exclude_regex) {198 config.exclude_regex = new RegExp(config.exclude_regex)199 }200 return getos(cb)201 }202 , (distro, cb) => {203 let distroName = `${(distro.dist || distro.os).replace(/Linux| /g, '')}`204 if (distro.release) {205 distroName += `/${distro.release}`206 }207 config.UserAgent = `${pkg.name}/${pkg.version} ${distroName}`208 if (process.env.LOGDNA_PLATFORM) {209 const platform = process.env.LOGDNA_PLATFORM210 config.tags = config.tags ? `${config.tags},${platform}` : platform211 config.UserAgent += `, ${platform}`212 }213 return request(config.AWS_INSTANCE_CHECK_URL, {214 timeout: 1000215 , json: true216 }, (error, response, body) => {217 return cb(error, body)218 })219 }220 ], (_, responseBody) => {221 if (responseBody) {222 config.awsid = responseBody.instanceId223 config.awsregion = responseBody.region224 config.awsaz = responseBody.availabilityZone225 config.awsami = responseBody.imageId226 config.awstype = responseBody.instanceType227 }228 const networkInterface = Object.values(os.networkInterfaces()).reduce((networkData, interfaces) => {229 interfaces.forEach(interfce => networkData.push(interfce))230 return networkData231 }, []).filter((interfce) => {232 return interfce.family && interfce.family === 'IPv4' && interfce.mac && interfce.address && (233 interfce.address.startsWith('10.')234 || interfce.address.startsWith('172.')235 || interfce.address.startsWith('192.168.'))236 })[0]237 if (networkInterface) {238 if (networkInterface.mac) { config.mac = networkInterface.mac }239 if (networkInterface.address) { config.ip = networkInterface.address }240 }241 utils.log(`${pkg.name}/${pkg.version} started on ${config.hostname} (${config.ip})`)242 if (config.userAgent) {243 config.DEFAULT_REQ_HEADERS['user-agent'] = config.userAgent244 config.DEFAULT_REQ_HEADERS_GZIP['user-agent'] = config.userAgent245 }246 debug('Configuration loaded. Starting log client and watching files.')247 start(config)248 debug('logdna agent successfully started')249 })250}251process.on('uncaughtException', err => utils.log(`uncaught error: ${(err.stack || '').split('\r\n')}`, 'error'))252if (require.main === module) {253 commander.parse(process.argv)254 const isAdmin = os.platform() === 'win32' ? require('is-administrator')() : process.getuid() === 0255 if (!isAdmin) {256 console.log('You must be an Administrator (root, sudo) to run this agent! See -h or --help for more info.')257 return258 }259 loadConfig(commander)260}261module.exports = {262 loadConfig263, commander...

Full Screen

Full Screen

point_series.test.js

Source:point_series.test.js Github

copy

Full Screen

1/*2 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one3 * or more contributor license agreements. Licensed under the Elastic License4 * 2.0 and the Server Side Public License, v 1; you may not use this file except5 * in compliance with, at your election, the Elastic License 2.0 or the Server6 * Side Public License, v 1.7 */8import stackedSeries from '../../../fixtures/mock_data/date_histogram/_stacked_series';9import { vislibPointSeriesTypes } from './point_series';10import percentileTestdata from './testdata_linechart_percentile.json';11import percentileTestdataResult from './testdata_linechart_percentile_result.json';12import percentileTestdataFloatValue from './testdata_linechart_percentile_float_value.json';13import percentileTestdataFloatValueResult from './testdata_linechart_percentile_float_value_result.json';14const maxBucketData = {15 get: (prop) => {16 return maxBucketData[prop] || maxBucketData.data[prop] || null;17 },18 getLabels: () => [],19 data: {20 hits: 621,21 ordered: {22 date: true,23 interval: 30000,24 max: 1408734982458,25 min: 1408734082458,26 },27 series: [28 { label: 's1', values: [{ x: 1408734060000, y: 8 }] },29 { label: 's2', values: [{ x: 1408734060000, y: 8 }] },30 { label: 's3', values: [{ x: 1408734060000, y: 8 }] },31 { label: 's4', values: [{ x: 1408734060000, y: 8 }] },32 { label: 's5', values: [{ x: 1408734060000, y: 8 }] },33 { label: 's6', values: [{ x: 1408734060000, y: 8 }] },34 { label: 's7', values: [{ x: 1408734060000, y: 8 }] },35 { label: 's8', values: [{ x: 1408734060000, y: 8 }] },36 { label: 's9', values: [{ x: 1408734060000, y: 8 }] },37 { label: 's10', values: [{ x: 1408734060000, y: 8 }] },38 { label: 's11', values: [{ x: 1408734060000, y: 8 }] },39 { label: 's12', values: [{ x: 1408734060000, y: 8 }] },40 { label: 's13', values: [{ x: 1408734060000, y: 8 }] },41 { label: 's14', values: [{ x: 1408734060000, y: 8 }] },42 { label: 's15', values: [{ x: 1408734060000, y: 8 }] },43 { label: 's16', values: [{ x: 1408734060000, y: 8 }] },44 { label: 's17', values: [{ x: 1408734060000, y: 8 }] },45 { label: 's18', values: [{ x: 1408734060000, y: 8 }] },46 { label: 's19', values: [{ x: 1408734060000, y: 8 }] },47 { label: 's20', values: [{ x: 1408734060000, y: 8 }] },48 { label: 's21', values: [{ x: 1408734060000, y: 8 }] },49 { label: 's22', values: [{ x: 1408734060000, y: 8 }] },50 { label: 's23', values: [{ x: 1408734060000, y: 8 }] },51 { label: 's24', values: [{ x: 1408734060000, y: 8 }] },52 { label: 's25', values: [{ x: 1408734060000, y: 8 }] },53 { label: 's26', values: [{ x: 1408734060000, y: 8 }] },54 ],55 xAxisLabel: 'Date Histogram',56 yAxisLabel: 'series',57 yAxisFormatter: () => 'test',58 },59};60describe('vislibPointSeriesTypes', () => {61 const heatmapConfig = {62 type: 'heatmap',63 addLegend: true,64 addTooltip: true,65 colorsNumber: 4,66 colorSchema: 'Greens',67 setColorRange: false,68 percentageMode: true,69 invertColors: false,70 colorsRange: [],71 heatmapMaxBuckets: 20,72 };73 const stackedData = {74 get: (prop) => {75 return stackedSeries[prop] || null;76 },77 getLabels: () => [],78 data: stackedSeries,79 };80 describe('axis formatters', () => {81 it('should create a value axis config with the default y axis formatter', () => {82 const parsedConfig = vislibPointSeriesTypes.line({}, maxBucketData);83 expect(parsedConfig.valueAxes.length).toEqual(1);84 expect(parsedConfig.valueAxes[0].labels.axisFormatter).toBe(85 maxBucketData.data.yAxisFormatter86 );87 });88 it('should use the formatter of the first series matching the axis if there is a descriptor', () => {89 const axisFormatter1 = jest.fn();90 const axisFormatter2 = jest.fn();91 const axisFormatter3 = jest.fn();92 const parsedConfig = vislibPointSeriesTypes.line(93 {94 valueAxes: [95 {96 id: 'ValueAxis-1',97 labels: {},98 },99 {100 id: 'ValueAxis-2',101 labels: {},102 },103 ],104 seriesParams: [105 {106 valueAxis: 'ValueAxis-1',107 data: {108 id: '2',109 },110 },111 {112 valueAxis: 'ValueAxis-2',113 data: {114 id: '3',115 },116 },117 {118 valueAxis: 'ValueAxis-2',119 data: {120 id: '4',121 },122 },123 ],124 },125 {126 ...maxBucketData,127 data: {128 ...maxBucketData.data,129 series: [130 { id: '2.1', label: 's1', values: [], yAxisFormatter: axisFormatter1 },131 { id: '2.2', label: 's2', values: [], yAxisFormatter: axisFormatter1 },132 { id: '3.1', label: 's3', values: [], yAxisFormatter: axisFormatter2 },133 { id: '3.2', label: 's4', values: [], yAxisFormatter: axisFormatter2 },134 { id: '4.1', label: 's5', values: [], yAxisFormatter: axisFormatter3 },135 { id: '4.2', label: 's6', values: [], yAxisFormatter: axisFormatter3 },136 ],137 },138 }139 );140 expect(parsedConfig.valueAxes.length).toEqual(2);141 expect(parsedConfig.valueAxes[0].labels.axisFormatter).toBe(axisFormatter1);142 expect(parsedConfig.valueAxes[1].labels.axisFormatter).toBe(axisFormatter2);143 });144 });145 describe('heatmap()', () => {146 it('should return an error when more than 20 series are provided', () => {147 const parsedConfig = vislibPointSeriesTypes.heatmap(heatmapConfig, maxBucketData);148 expect(parsedConfig.error).toMatchInlineSnapshot(149 `"There are too many series defined (26). The configured maximum is 20."`150 );151 });152 it('should return valid config when less than 20 series are provided', () => {153 const parsedConfig = vislibPointSeriesTypes.heatmap(heatmapConfig, stackedData);154 expect(parsedConfig.error).toBeUndefined();155 expect(parsedConfig.valueAxes[0].show).toBeFalsy();156 expect(parsedConfig.categoryAxes.length).toBe(2);157 expect(parsedConfig.error).toBeUndefined();158 });159 });160});161describe('Point Series Config Type Class Test Suite', function () {162 let parsedConfig;163 const histogramConfig = {164 type: 'histogram',165 addLegend: true,166 tooltip: {167 show: true,168 },169 categoryAxes: [170 {171 id: 'CategoryAxis-1',172 type: 'category',173 title: {},174 },175 ],176 valueAxes: [177 {178 id: 'ValueAxis-1',179 type: 'value',180 labels: {},181 title: {},182 },183 ],184 };185 describe('histogram chart', function () {186 beforeEach(function () {187 parsedConfig = vislibPointSeriesTypes.column(histogramConfig, maxBucketData);188 });189 it('should not throw an error when more than 25 series are provided', function () {190 expect(parsedConfig.error).toBeUndefined();191 });192 it('should set axis title and formatter from data', () => {193 expect(parsedConfig.categoryAxes[0].title.text).toEqual(maxBucketData.data.xAxisLabel);194 expect(parsedConfig.valueAxes[0].labels.axisFormatter).toBeDefined();195 });196 });197 describe('line chart', function () {198 function prepareData({ cfg, data }) {199 const percentileDataObj = {200 get: (prop) => {201 return maxBucketData[prop] || maxBucketData.data[prop] || null;202 },203 getLabels: () => [],204 data: data,205 };206 const parsedConfig = vislibPointSeriesTypes.line(cfg, percentileDataObj);207 return parsedConfig;208 }209 it('should render a percentile line chart', function () {210 const parsedConfig = prepareData(percentileTestdata);211 expect(parsedConfig).toMatchObject(percentileTestdataResult);212 });213 it('should render a percentile line chart when value is float', function () {214 const parsedConfig = prepareData(percentileTestdataFloatValue);215 expect(parsedConfig).toMatchObject(percentileTestdataFloatValueResult);216 });217 });...

Full Screen

Full Screen

jwplayer.embed.config.js

Source:jwplayer.embed.config.js Github

copy

Full Screen

1/**2 * Configuration for the JW Player Embedder3 * @author Zach4 * @version 5.95 */6(function(jwplayer) {7 var _utils = jwplayer.utils;8 9 function _playerDefaults(flashplayer) {10 var modes = [{11 type: "flash",12 src: flashplayer ? flashplayer : "/jwplayer/player.swf"13 }, {14 type: 'html5'15 }, {16 type: 'download'17 }];18 if (_utils.isAndroid()) {19 // If Android, then swap html5 and flash modes - default should be HTML520 modes[0] = modes.splice(1, 1, modes[0])[0];21 }22 return modes;23 }24 25 var _aliases = {26 'players': 'modes',27 'autoplay': 'autostart'28 };29 30 function _isPosition(string) {31 var lower = string.toLowerCase();32 var positions = ["left", "right", "top", "bottom"];33 34 for (var position = 0; position < positions.length; position++) {35 if (lower == positions[position]) {36 return true;37 }38 }39 40 return false;41 }42 43 function _isPlaylist(property) {44 var result = false;45 // XML Playlists46 // (typeof property == "string" && !_isPosition(property)) ||47 // JSON Playlist48 result = (property instanceof Array) ||49 // Single playlist item as an Object50 (typeof property == "object" && !property.position && !property.size);51 return result;52 }53 54 function getSize(size) {55 if (typeof size == "string") {56 if (parseInt(size).toString() == size || size.toLowerCase().indexOf("px") > -1) {57 return parseInt(size);58 } 59 }60 return size;61 }62 63 var components = ["playlist", "dock", "controlbar", "logo", "display"];64 65 function getPluginNames(config) {66 var pluginNames = {};67 switch(_utils.typeOf(config.plugins)){68 case "object":69 for (var plugin in config.plugins) {70 pluginNames[_utils.getPluginName(plugin)] = plugin;71 }72 break;73 case "string":74 var pluginArray = config.plugins.split(",");75 for (var i=0; i < pluginArray.length; i++) {76 pluginNames[_utils.getPluginName(pluginArray[i])] = pluginArray[i]; 77 }78 break;79 }80 return pluginNames;81 }82 83 function addConfigParameter(config, componentType, componentName, componentParameter){84 if (_utils.typeOf(config[componentType]) != "object"){85 config[componentType] = {};86 }87 var componentConfig = config[componentType][componentName];88 if (_utils.typeOf(componentConfig) != "object") {89 config[componentType][componentName] = componentConfig = {};90 }91 if (componentParameter) {92 if (componentType == "plugins") {93 var pluginName = _utils.getPluginName(componentName);94 componentConfig[componentParameter] = config[pluginName+"."+componentParameter];95 delete config[pluginName+"."+componentParameter];96 } else {97 componentConfig[componentParameter] = config[componentName+"."+componentParameter];98 delete config[componentName+"."+componentParameter];99 }100 }101 }102 103 jwplayer.embed.deserialize = function(config){104 var pluginNames = getPluginNames(config);105 106 for (var pluginId in pluginNames) {107 addConfigParameter(config, "plugins", pluginNames[pluginId]);108 }109 110 for (var parameter in config) {111 if (parameter.indexOf(".") > -1) {112 var path = parameter.split(".");113 var prefix = path[0];114 var parameter = path[1];115 if (_utils.isInArray(components, prefix)) {116 addConfigParameter(config, "components", prefix, parameter);117 } else if (pluginNames[prefix]) {118 addConfigParameter(config, "plugins", pluginNames[prefix], parameter);119 }120 }121 }122 return config;123 }124 125 jwplayer.embed.config = function(config, embedder) {126 var parsedConfig = _utils.extend({}, config);127 128 var _tempPlaylist;129 130 if (_isPlaylist(parsedConfig.playlist)){131 _tempPlaylist = parsedConfig.playlist;132 delete parsedConfig.playlist;133 }134 135 parsedConfig = jwplayer.embed.deserialize(parsedConfig);136 137 parsedConfig.height = getSize(parsedConfig.height);138 parsedConfig.width = getSize(parsedConfig.width);139 140 if (typeof parsedConfig.plugins == "string") {141 var pluginArray = parsedConfig.plugins.split(",");142 if (typeof parsedConfig.plugins != "object") {143 parsedConfig.plugins = {};144 }145 for (var plugin = 0; plugin < pluginArray.length; plugin++) {146 var pluginName = _utils.getPluginName(pluginArray[plugin]);147 if (typeof parsedConfig[pluginName] == "object") {148 parsedConfig.plugins[pluginArray[plugin]] = parsedConfig[pluginName];149 delete parsedConfig[pluginName];150 } else {151 parsedConfig.plugins[pluginArray[plugin]] = {};152 }153 }154 }155 156 for (var component = 0; component < components.length; component++) {157 var comp = components[component];158 if (_utils.exists(parsedConfig[comp])) {159 if (typeof parsedConfig[comp] != "object") {160 if (!parsedConfig.components[comp]) {161 parsedConfig.components[comp] = {};162 }163 if (comp == "logo") {164 parsedConfig.components[comp].file = parsedConfig[comp];165 } else {166 parsedConfig.components[comp].position = parsedConfig[comp];167 }168 delete parsedConfig[comp];169 } else {170 if (!parsedConfig.components[comp]) {171 parsedConfig.components[comp] = {};172 }173 _utils.extend(parsedConfig.components[comp], parsedConfig[comp]);174 delete parsedConfig[comp];175 }176 } 177 178 if (typeof parsedConfig[comp+"size"] != "undefined") {179 if (!parsedConfig.components[comp]) {180 parsedConfig.components[comp] = {};181 }182 parsedConfig.components[comp].size = parsedConfig[comp+"size"];183 delete parsedConfig[comp+"size"];184 }185 }186 187 // Special handler for the display icons setting188 if (typeof parsedConfig.icons != "undefined"){189 if (!parsedConfig.components.display) {190 parsedConfig.components.display = {};191 }192 parsedConfig.components.display.icons = parsedConfig.icons;193 delete parsedConfig.icons;194 }195 196 for (var alias in _aliases)197 if (parsedConfig[alias]) {198 if (!parsedConfig[_aliases[alias]]) {199 parsedConfig[_aliases[alias]] = parsedConfig[alias];200 }201 delete parsedConfig[alias];202 }203 204 var _modes;205 if (parsedConfig.flashplayer && !parsedConfig.modes) {206 _modes = _playerDefaults(parsedConfig.flashplayer);207 delete parsedConfig.flashplayer;208 } else if (parsedConfig.modes) {209 if (typeof parsedConfig.modes == "string") {210 _modes = _playerDefaults(parsedConfig.modes);211 } else if (parsedConfig.modes instanceof Array) {212 _modes = parsedConfig.modes;213 } else if (typeof parsedConfig.modes == "object" && parsedConfig.modes.type) {214 _modes = [parsedConfig.modes];215 }216 delete parsedConfig.modes;217 } else {218 _modes = _playerDefaults();219 }220 parsedConfig.modes = _modes;221 222 if (_tempPlaylist) {223 parsedConfig.playlist = _tempPlaylist;224 }225 226 return parsedConfig;227 };228 ...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const parsedConfig = require('stryker-parent').parsedConfig;2const parsedConfig = require('stryker-child').parsedConfig;3module.exports = function (config) {4 config.set({5 });6};7const parsedConfig = require('stryker-parent').parsedConfig;8const parsedConfig = require('stryker-child').parsedConfig;9module.exports = function (config) {10 config.set({11 });12};13const parsedConfig = require('stryker-parent').parsedConfig;14const parsedConfig = require('stryker-child').parsedConfig;15module.exports = function (config) {16 config.set({17 });18};19const parsedConfig = require('stryker-parent').parsedConfig;20const parsedConfig = require('stryker-child').parsedConfig;21module.exports = function (config) {22 config.set({23 });24};25const parsedConfig = require('stryker-parent').parsedConfig;26const parsedConfig = require('stryker-child').parsedConfig;27module.exports = function (config) {28 config.set({29 });30};

Full Screen

Using AI Code Generation

copy

Full Screen

1module.exports = {2 parsedConfig: () => 'parsedConfig'3}4{5}6{7}8module.exports = {9 parsedConfig: () => 'parsedConfig'10}

Full Screen

Using AI Code Generation

copy

Full Screen

1const { parsedConfig } = require('stryker-parent');2parsedConfig('stryker.conf.js');3module.exports = function (strykerConfig) {4 return {5 };6};7const { stryker } = require('stryker-parent');8stryker('stryker.conf.js', '

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run stryker-parent automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful