All files / src/platformTools/apple provisionParser.js

68.18% Statements 15/22
100% Branches 0/0
0% Functions 0/2
66.67% Lines 12/18

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 442x 2x 2x 2x 2x                                     2x 2x 2x 2x 2x     2x                       2x  
import path from 'path';
import fs from 'fs';
import chalk from 'chalk';
import { provision, cert } from 'ios-mobileprovision-finder';
import {
    logTask,
    logError,
    logWarning,
    getAppFolder,
    isPlatformActive,
    logDebug,
    getAppVersion,
    getAppTitle,
    getEntryFile,
    writeCleanFile,
    getAppTemplateFolder,
    getAppId,
    getConfigProp,
    getIP,
    getBuildFilePath,
    logSuccess,
    getBuildsFolder,
} from '../../common';
import { copyBuildsFolder } from '../../projectTools/projectParser';
import { IOS, TVOS } from '../../constants';
import { getMergedPlugin, parsePlugins } from '../../pluginTools';
import { getAppFolderName } from './index';
import { copyFolderContentsRecursiveSync, copyFileSync, mkdirSync, readObjectSync, mergeObjects } from '../../systemTools/fileutils';
 
 
export const parseProvisioningProfiles = c => new Promise((resolve, reject) => {
    // PROJECT
    const teamID = getConfigProp(c, c.platform, 'teamID');
    const id = getConfigProp(c, c.platform, 'id');
    const certificates = cert.read();
    const provisionProfiles = provision.read();
    const result = provision.select(provisionProfiles, {
        AppId: id,
        TeamIdentifier: teamID,
        Certificates: certificates.valid
    });
    resolve(result);
});