• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mendersoftware / gui / 1315496247

03 Jun 2024 07:49AM UTC coverage: 83.437% (-16.5%) from 99.964%
1315496247

Pull #4434

gitlab-ci

mzedel
chore: aligned snapshots with updated mui version

Signed-off-by: Manuel Zedel <manuel.zedel@northern.tech>
Pull Request #4434: chore: Bump the mui group with 3 updates

4476 of 6391 branches covered (70.04%)

8488 of 10173 relevant lines covered (83.44%)

140.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.81
/src/js/helpers.js
1
// Copyright 2017 Northern.tech AS
2
//
3
//    Licensed under the Apache License, Version 2.0 (the "License");
4
//    you may not use this file except in compliance with the License.
5
//    You may obtain a copy of the License at
6
//
7
//        http://www.apache.org/licenses/LICENSE-2.0
8
//
9
//    Unless required by applicable law or agreed to in writing, software
10
//    distributed under the License is distributed on an "AS IS" BASIS,
11
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
//    See the License for the specific language governing permissions and
13
//    limitations under the License.
14
import React from 'react';
15

16
import pluralize from 'pluralize';
17
import Cookies from 'universal-cookie';
18

19
import { DARK_MODE } from './constants/appConstants';
20
import {
21
  DEPLOYMENT_STATES,
22
  defaultStats,
23
  deploymentDisplayStates,
24
  deploymentStatesToSubstates,
25
  deploymentStatesToSubstatesWithSkipped
26
} from './constants/deploymentConstants';
27
import { ATTRIBUTE_SCOPES, DEVICE_FILTERING_OPTIONS } from './constants/deviceConstants';
28
import { SSO_TYPES } from './constants/organizationConstants.js';
29

30
const isEncoded = uri => {
184✔
31
  uri = uri || '';
8✔
32
  return uri !== decodeURIComponent(uri);
8✔
33
};
34

35
export const fullyDecodeURI = uri => {
184✔
36
  while (isEncoded(uri)) {
6✔
37
    uri = decodeURIComponent(uri);
2✔
38
  }
39
  return uri;
6✔
40
};
41

42
export const groupDeploymentDevicesStats = deployment => {
184✔
43
  const deviceStatCollector = (deploymentStates, devices) =>
1✔
44
    Object.values(devices).reduce((accu, device) => (deploymentStates.includes(device.status) ? accu + 1 : accu), 0);
50✔
45

46
  const inprogress = deviceStatCollector(deploymentStatesToSubstates.inprogress, deployment.devices);
1✔
47
  const pending = deviceStatCollector(deploymentStatesToSubstates.pending, deployment.devices);
1✔
48
  const successes = deviceStatCollector(deploymentStatesToSubstates.successes, deployment.devices);
1✔
49
  const failures = deviceStatCollector(deploymentStatesToSubstates.failures, deployment.devices);
1✔
50
  const paused = deviceStatCollector(deploymentStatesToSubstates.paused, deployment.devices);
1✔
51
  return { inprogress, paused, pending, successes, failures };
1✔
52
};
53

54
export const statCollector = (items, statistics) => items.reduce((accu, property) => accu + Number(statistics[property] || 0), 0);
7,573✔
55
export const groupDeploymentStats = (deployment, withSkipped) => {
184✔
56
  const { statistics = {} } = deployment;
577✔
57
  const { status = {} } = statistics;
577✔
58
  const stats = { ...defaultStats, ...status };
577✔
59
  let groupStates = deploymentStatesToSubstates;
577✔
60
  let result = {};
577✔
61
  if (withSkipped) {
577✔
62
    groupStates = deploymentStatesToSubstatesWithSkipped;
252✔
63
    result.skipped = statCollector(groupStates.skipped, stats);
252✔
64
  }
65
  result = {
577✔
66
    ...result,
67
    // don't include 'pending' as inprogress, as all remaining devices will be pending - we don't discriminate based on phase membership
68
    inprogress: statCollector(groupStates.inprogress, stats),
69
    pending: (deployment.max_devices ? deployment.max_devices - deployment.device_count : 0) + statCollector(groupStates.pending, stats),
577✔
70
    successes: statCollector(groupStates.successes, stats),
71
    failures: statCollector(groupStates.failures, stats),
72
    paused: statCollector(groupStates.paused, stats)
73
  };
74
  return result;
577✔
75
};
76

77
export const getDeploymentState = deployment => {
184✔
78
  const { status: deploymentStatus = DEPLOYMENT_STATES.pending } = deployment;
308✔
79
  const { inprogress: currentProgressCount, paused } = groupDeploymentStats(deployment);
308✔
80

81
  let status = deploymentDisplayStates[deploymentStatus];
308✔
82
  if (deploymentStatus === DEPLOYMENT_STATES.pending && currentProgressCount === 0) {
308✔
83
    status = 'queued';
148✔
84
  } else if (paused > 0) {
160!
85
    status = deploymentDisplayStates.paused;
×
86
  }
87
  return status;
308✔
88
};
89

90
export const isEmpty = obj => {
184✔
91
  for (const _ in obj) {
331✔
92
    return false;
158✔
93
  }
94
  return true;
173✔
95
};
96

97
export const extractErrorMessage = (err, fallback = '') =>
184✔
98
  err.response?.data?.error?.message || err.response?.data?.error || err.error || err.message || fallback;
8!
99

100
export const preformatWithRequestID = (res, failMsg) => {
184✔
101
  // ellipsis line
102
  if (failMsg.length > 100) failMsg = `${failMsg.substring(0, 220)}...`;
11✔
103

104
  try {
11✔
105
    if (res?.data && Object.keys(res.data).includes('request_id')) {
11✔
106
      let shortRequestUUID = res.data['request_id'].substring(0, 8);
2✔
107
      return `${failMsg} [Request ID: ${shortRequestUUID}]`;
2✔
108
    }
109
  } catch (e) {
110
    console.log('failed to extract request id:', e);
×
111
  }
112
  return failMsg;
9✔
113
};
114

115
export const versionCompare = (v1, v2) => {
184✔
116
  const partsV1 = `${v1}`.split('.');
19✔
117
  const partsV2 = `${v2}`.split('.');
19✔
118
  for (let index = 0; index < partsV1.length; index++) {
19✔
119
    const numberV1 = partsV1[index];
24✔
120
    const numberV2 = partsV2[index];
24✔
121
    if (numberV1 > numberV2) {
24✔
122
      return 1;
14✔
123
    }
124
    if (numberV2 > numberV1) {
10✔
125
      return -1;
4✔
126
    }
127
  }
128
  return 0;
1✔
129
};
130

131
/*
132
 *
133
 * Deep compare
134
 *
135
 */
136
// eslint-disable-next-line sonarjs/cognitive-complexity
137
export function deepCompare() {
138
  var i, l, leftChain, rightChain;
139

140
  // eslint-disable-next-line sonarjs/cognitive-complexity
141
  function compare2Objects(x, y) {
142
    var p;
143

144
    // remember that NaN === NaN returns false
145
    // and isNaN(undefined) returns true
146
    if (isNaN(x) && isNaN(y) && typeof x === 'number' && typeof y === 'number') {
387!
147
      return true;
×
148
    }
149

150
    // Compare primitives and functions.
151
    // Check if both arguments link to the same object.
152
    // Especially useful on the step where we compare prototypes
153
    if (x === y) {
387✔
154
      return true;
178✔
155
    }
156

157
    // Works in case when functions are created in constructor.
158
    // Comparing dates is a common scenario. Another built-ins?
159
    // We can even handle functions passed across iframes
160
    if (
209✔
161
      (typeof x === 'function' && typeof y === 'function') ||
1,043!
162
      (x instanceof Date && y instanceof Date) ||
163
      (x instanceof RegExp && y instanceof RegExp) ||
164
      (x instanceof String && y instanceof String) ||
165
      (x instanceof Number && y instanceof Number)
166
    ) {
167
      return x.toString() === y.toString();
1✔
168
    }
169

170
    // At last checking prototypes as good as we can
171
    if (!(x instanceof Object && y instanceof Object)) {
208✔
172
      return false;
12✔
173
    }
174

175
    if (x.isPrototypeOf(y) || y.isPrototypeOf(x)) {
196!
176
      return false;
×
177
    }
178

179
    if (x.constructor !== y.constructor) {
196!
180
      return false;
×
181
    }
182

183
    if (x.prototype !== y.prototype) {
196!
184
      return false;
×
185
    }
186

187
    // Check for infinitive linking loops
188
    if (leftChain.indexOf(x) > -1 || rightChain.indexOf(y) > -1) {
196!
189
      return false;
×
190
    }
191

192
    // Quick checking of one object being a subset of another.
193
    // todo: cache the structure of arguments[0] for performance
194
    for (p in y) {
196✔
195
      if (y.hasOwnProperty(p) !== x.hasOwnProperty(p) || typeof y[p] !== typeof x[p]) {
928✔
196
        return false;
48✔
197
      }
198
    }
199

200
    for (p in x) {
148✔
201
      if (y.hasOwnProperty(p) !== x.hasOwnProperty(p) || typeof y[p] !== typeof x[p]) {
556✔
202
        return false;
8✔
203
      }
204

205
      switch (typeof x[p]) {
548✔
206
        case 'object':
207
        case 'function':
208
          leftChain.push(x);
233✔
209
          rightChain.push(y);
233✔
210

211
          if (!compare2Objects(x[p], y[p])) {
233✔
212
            return false;
6✔
213
          }
214

215
          leftChain.pop();
227✔
216
          rightChain.pop();
227✔
217
          break;
227✔
218

219
        default:
220
          if (x[p] !== y[p]) {
315✔
221
            return false;
8✔
222
          }
223
          break;
307✔
224
      }
225
    }
226

227
    return true;
126✔
228
  }
229

230
  if (arguments.length < 1) {
152!
231
    return true; //Die silently? Don't know how to handle such case, please help...
×
232
    // throw "Need two or more arguments to compare";
233
  }
234

235
  for (i = 1, l = arguments.length; i < l; i++) {
152✔
236
    leftChain = []; //Todo: this can be cached
154✔
237
    rightChain = [];
154✔
238

239
    if (!compare2Objects(arguments[0], arguments[i])) {
154✔
240
      return false;
76✔
241
    }
242
  }
243

244
  return true;
76✔
245
}
246

247
export const stringToBoolean = content => {
184✔
248
  if (!content) {
198✔
249
    return false;
176✔
250
  }
251
  const string = content + '';
22✔
252
  switch (string.trim().toLowerCase()) {
22✔
253
    case 'true':
254
    case 'yes':
255
    case '1':
256
      return true;
18✔
257
    case 'false':
258
    case 'no':
259
    case '0':
260
    case null:
261
      return false;
3✔
262
    default:
263
      return Boolean(string);
1✔
264
  }
265
};
266

267
export const toggle = current => !current;
184✔
268

269
export const formatTime = date => {
184✔
270
  if (date && Object.prototype.toString.call(date) === '[object Date]' && !isNaN(date)) {
57✔
271
    return date.toISOString().slice(0, -1);
1✔
272
  } else if (date) {
56✔
273
    return date.replace(' ', 'T').replace(/ /g, '').replace('UTC', '');
46✔
274
  }
275
};
276

277
export const customSort = (direction, field) => (a, b) => {
1,000✔
278
  if (typeof a[field] === 'string') {
213,482✔
279
    const result = a[field].localeCompare(b[field], { sensitivity: 'case' });
213,409✔
280
    return direction ? result * -1 : result;
213,409✔
281
  }
282
  if (a[field] > b[field]) return direction ? -1 : 1;
73!
283
  if (a[field] < b[field]) return direction ? 1 : -1;
63!
284
  return 0;
26✔
285
};
286

287
export const duplicateFilter = (item, index, array) => array.indexOf(item) == index;
3,763✔
288

289
export const attributeDuplicateFilter = (filterableArray, attributeName = 'key') =>
184!
290
  filterableArray.filter(
5✔
291
    (item, index, array) => array.findIndex(filter => filter[attributeName] === item[attributeName] && filter.scope === item.scope) == index
266✔
292
  );
293

294
export const unionizeStrings = (someStrings, someOtherStrings) => {
184✔
295
  const startingPoint = new Set(someStrings.filter(item => item.length));
24✔
296
  const uniqueStrings = someOtherStrings.length
24✔
297
    ? someOtherStrings.reduce((accu, item) => {
298
        if (item.trim().length) {
33✔
299
          accu.add(item.trim());
14✔
300
        }
301
        return accu;
33✔
302
      }, startingPoint)
303
    : startingPoint;
304
  return [...uniqueStrings];
24✔
305
};
306

307
export const generateDeploymentGroupDetails = (filter, groupName) =>
184✔
308
  filter && filter.terms?.length
3✔
309
    ? `${groupName} (${filter.terms
310
        .map(filter => `${filter.attribute || filter.key} ${DEVICE_FILTERING_OPTIONS[filter.type || filter.operator].shortform} ${filter.value}`)
4✔
311
        .join(', ')})`
312
    : groupName;
313

314
export const mapDeviceAttributes = (attributes = []) =>
184✔
315
  attributes.reduce(
173✔
316
    (accu, attribute) => {
317
      if (!(attribute.value && attribute.name) && attribute.scope === ATTRIBUTE_SCOPES.inventory) {
2,194!
318
        return accu;
×
319
      }
320
      accu[attribute.scope || ATTRIBUTE_SCOPES.inventory] = {
2,194✔
321
        ...accu[attribute.scope || ATTRIBUTE_SCOPES.inventory],
2,200✔
322
        [attribute.name]: attribute.value
323
      };
324
      if (attribute.name === 'device_type' && attribute.scope === ATTRIBUTE_SCOPES.inventory) {
2,194✔
325
        accu.inventory.device_type = [].concat(attribute.value);
106✔
326
      }
327
      return accu;
2,194✔
328
    },
329
    { inventory: { device_type: [], artifact_name: '' }, identity: {}, monitor: {}, system: {}, tags: {} }
330
  );
331

332
export const getFormattedSize = bytes => {
184✔
333
  const suffixes = ['Bytes', 'KB', 'MB', 'GB'];
85✔
334
  const i = Math.floor(Math.log(bytes) / Math.log(1024));
85✔
335
  if (!bytes) {
85✔
336
    return '0 Bytes';
13✔
337
  }
338
  return `${(bytes / Math.pow(1024, i)).toFixed(2)} ${suffixes[i]}`;
72✔
339
};
340

341
export const FileSize = React.forwardRef(({ fileSize, style }, ref) => (
184✔
342
  <div ref={ref} style={style}>
76✔
343
    {getFormattedSize(fileSize)}
344
  </div>
345
));
346
FileSize.displayName = 'FileSize';
184✔
347

348
const collectAddressesFrom = devices =>
184✔
349
  devices.reduce((collector, { attributes = {} }) => {
21!
350
    const ips = Object.entries(attributes).reduce((accu, [name, value]) => {
59✔
351
      if (name.startsWith('ipv4')) {
243✔
352
        if (Array.isArray(value)) {
40!
353
          const texts = value.map(text => text.slice(0, text.indexOf('/')));
×
354
          accu.push(...texts);
×
355
        } else {
356
          const text = value.slice(0, value.indexOf('/'));
40✔
357
          accu.push(text);
40✔
358
        }
359
      }
360
      return accu;
243✔
361
    }, []);
362
    collector.push(...ips);
59✔
363
    return collector;
59✔
364
  }, []);
365

366
export const getDemoDeviceAddress = (devices, onboardingApproach) => {
184✔
367
  const defaultVitualizedIp = '10.0.2.15';
21✔
368
  const addresses = collectAddressesFrom(devices);
21✔
369
  const address = addresses.reduce((accu, item) => {
21✔
370
    if (accu && item === defaultVitualizedIp) {
40!
371
      return accu;
×
372
    }
373
    return item;
40✔
374
  }, null);
375
  if (!address || (onboardingApproach === 'virtual' && (navigator.appVersion.indexOf('Win') != -1 || navigator.appVersion.indexOf('Mac') != -1))) {
21✔
376
    return 'localhost';
1✔
377
  }
378
  return address;
20✔
379
};
380

381
export const detectOsIdentifier = () => {
184✔
382
  if (navigator.appVersion.indexOf('Win') != -1) return 'Windows';
3!
383
  if (navigator.appVersion.indexOf('Mac') != -1) return 'MacOs';
3✔
384
  if (navigator.appVersion.indexOf('X11') != -1) return 'Unix';
2!
385
  return 'Linux';
2✔
386
};
387

388
export const getRemainderPercent = phases => {
184✔
389
  // remove final phase size if set
390
  phases[phases.length - 1].batch_size = null;
55✔
391
  // use this to get remaining percent of final phase so we don't set a hard number
392
  return phases.reduce((accu, phase) => (phase.batch_size ? accu - phase.batch_size : accu), 100);
143✔
393
};
394

395
export const validatePhases = (phases, deploymentDeviceCount, hasFilter) => {
184✔
396
  if (!phases?.length) {
36✔
397
    return true;
11✔
398
  }
399
  const remainder = getRemainderPercent(phases);
25✔
400
  return phases.reduce((accu, phase) => {
25✔
401
    if (!accu) {
66✔
402
      return accu;
5✔
403
    }
404
    const deviceCount = Math.floor((deploymentDeviceCount / 100) * (phase.batch_size || remainder));
61✔
405
    return deviceCount >= 1 || hasFilter;
61✔
406
  }, true);
407
};
408

409
export const getPhaseDeviceCount = (numberDevices = 1, batchSize, remainder, isLastPhase) =>
184✔
410
  isLastPhase ? Math.ceil((numberDevices / 100) * (batchSize || remainder)) : Math.floor((numberDevices / 100) * (batchSize || remainder));
69✔
411

412
export const startTimeSort = (a, b) => (b.created > a.created) - (b.created < a.created);
379✔
413

414
export const standardizePhases = phases =>
184✔
415
  phases.map((phase, index) => {
3✔
416
    let standardizedPhase = { batch_size: phase.batch_size, start_ts: index };
8✔
417
    if (phase.delay) {
8✔
418
      standardizedPhase.delay = phase.delay;
5✔
419
      standardizedPhase.delayUnit = phase.delayUnit || 'hours';
5✔
420
    }
421
    if (index === 0) {
8✔
422
      // delete the start timestamp from a deployment pattern, to default to starting without delay
423
      delete standardizedPhase.start_ts;
3✔
424
    }
425
    return standardizedPhase;
8✔
426
  });
427

428
const getInstallScriptArgs = ({ isHosted, isPreRelease }) => {
184✔
429
  let installScriptArgs = '--demo';
11✔
430
  installScriptArgs = isPreRelease ? `${installScriptArgs} -c experimental` : installScriptArgs;
11✔
431
  installScriptArgs = isHosted ? `${installScriptArgs} --commercial --jwt-token $JWT_TOKEN` : installScriptArgs;
11✔
432
  return installScriptArgs;
11✔
433
};
434

435
const getSetupArgs = ({ deviceType = 'generic-armv6', ipAddress, isDemoMode, tenantToken, isOnboarding }) => {
184✔
436
  let menderSetupArgs = `--quiet --device-type "${deviceType}"`;
11✔
437
  menderSetupArgs = tenantToken ? `${menderSetupArgs} --tenant-token $TENANT_TOKEN` : menderSetupArgs;
11✔
438
  // in production we use polling intervals from the client examples: https://github.com/mendersoftware/mender/blob/master/examples/mender.conf.production
439
  menderSetupArgs = isDemoMode || isOnboarding ? `${menderSetupArgs} --demo` : `${menderSetupArgs} --retry-poll 300 --update-poll 1800 --inventory-poll 28800`;
11✔
440
  if (isDemoMode) {
11✔
441
    // Demo installation, either OS os Enterprise. Install demo cert and add IP to /etc/hosts
442
    menderSetupArgs = `${menderSetupArgs}${ipAddress ? ` --server-ip ${ipAddress}` : ''}`;
6!
443
  } else {
444
    // Production installation, either OS, HM, or Enterprise
445
    menderSetupArgs = `${menderSetupArgs} --server-url https://${window.location.hostname} --server-cert=""`;
5✔
446
  }
447
  return menderSetupArgs;
11✔
448
};
449

450
const installComponents = '--force-mender-client4';
184✔
451

452
export const getDebConfigurationCode = props => {
184✔
453
  const { tenantToken, token, isPreRelease } = props;
11✔
454
  const envVars = tenantToken ? `JWT_TOKEN="${token}"\nTENANT_TOKEN="${tenantToken}"\n` : '';
11✔
455
  const installScriptArgs = getInstallScriptArgs(props);
11✔
456
  const scriptUrl = isPreRelease ? 'https://get.mender.io/staging' : 'https://get.mender.io';
11✔
457
  const menderSetupArgs = getSetupArgs(props);
11✔
458
  return `${envVars}wget -O- ${scriptUrl} | sudo bash -s -- ${installScriptArgs} ${installComponents} -- ${menderSetupArgs}`;
11✔
459
};
460

461
export const getSnackbarMessage = (skipped, done) => {
184✔
462
  pluralize.addIrregularRule('its', 'their');
1✔
463
  const skipText = skipped
1!
464
    ? `${skipped} ${pluralize('devices', skipped)} ${pluralize('have', skipped)} more than one pending authset. Expand ${pluralize(
465
        'this',
466
        skipped
467
      )} ${pluralize('device', skipped)} to individually adjust ${pluralize('their', skipped)} authorization status. `
468
    : '';
469
  const doneText = done ? `${done} ${pluralize('device', done)} ${pluralize('was', done)} updated successfully. ` : '';
1!
470
  return `${doneText}${skipText}`;
1✔
471
};
472

473
export const extractSoftware = (attributes = {}) => {
184✔
474
  const softwareKeys = Object.keys(attributes).reduce((accu, item) => {
39✔
475
    if (item.endsWith('.version')) {
99✔
476
      accu.push(item.substring(0, item.lastIndexOf('.')));
50✔
477
    }
478
    return accu;
99✔
479
  }, []);
480
  return Object.entries(attributes).reduce(
39✔
481
    (accu, item) => {
482
      if (softwareKeys.some(key => item[0].startsWith(key))) {
209✔
483
        accu.software.push(item);
65✔
484
      } else {
485
        accu.nonSoftware.push(item);
34✔
486
      }
487
      return accu;
99✔
488
    },
489
    { software: [], nonSoftware: [] }
490
  );
491
};
492

493
export const extractSoftwareItem = (artifactProvides = {}) => {
184✔
494
  const { software } = extractSoftware(artifactProvides);
12✔
495
  return (
12✔
496
    software
497
      .reduce((accu, item) => {
498
        const infoItems = item[0].split('.');
10✔
499
        if (infoItems[infoItems.length - 1] !== 'version') {
10!
500
          return accu;
×
501
        }
502
        accu.push({ key: infoItems[0], name: infoItems.slice(1, infoItems.length - 1).join('.'), version: item[1], nestingLevel: infoItems.length });
10✔
503
        return accu;
10✔
504
      }, [])
505
      // we assume the smaller the nesting level in the software name, the closer the software is to the rootfs/ the higher the chances we show the rootfs
506
      // sort based on this assumption & then only return the first item (can't use index access, since there might not be any software item at all)
507
      .sort((a, b) => a.nestingLevel - b.nestingLevel)
×
508
      .reduce((accu, item) => accu ?? item, undefined)
10✔
509
  );
510
};
511

512
const cookies = new Cookies();
184✔
513

514
export const createDownload = (target, filename, token) => {
184✔
515
  let link = document.createElement('a');
1✔
516
  link.setAttribute('href', target);
1✔
517
  link.setAttribute('download', filename);
1✔
518
  link.style.display = 'none';
1✔
519
  document.body.appendChild(link);
1✔
520
  cookies.set('JWT', token, { path: '/', secure: true, sameSite: 'strict', maxAge: 5 });
1✔
521
  link.click();
1✔
522
  document.body.removeChild(link);
1✔
523
};
524

525
export const createFileDownload = (content, filename, token) => createDownload('data:text/plain;charset=utf-8,' + encodeURIComponent(content), filename, token);
184✔
526

527
export const getISOStringBoundaries = currentDate => {
184✔
528
  const date = [currentDate.getUTCFullYear(), `0${currentDate.getUTCMonth() + 1}`.slice(-2), `0${currentDate.getUTCDate()}`.slice(-2)].join('-');
213✔
529
  return { start: `${date}T00:00:00.000`, end: `${date}T23:59:59.999` };
213✔
530
};
531

532
export const isDarkMode = mode => mode === DARK_MODE;
184✔
533

534
export const getSsoByType = type => SSO_TYPES.find(item => item.id === type);
184✔
535
export const getSsoByContentType = contentType => SSO_TYPES.find(item => item.contentType === contentType);
184✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc