function callback(error, response) {
    var e_1, _a, e_2, _b;
    return __awaiter(this, void 0, void 0, function* () {
        // await the completion of the progess status
        yield progressStatus(true);
        const desSrc = './public/';
        if (error) {
            console.log(error.name, error.stack, error.message); // Error description e.g. "An unknown error has occurred"
            return;
        }
        try {
            // loop through the images metadata and write files to the appropriate location
            for (var _c = __asyncValues(response.images), _d; _d = yield _c.next(), !_d.done;) {
                const image = _d.value;
                fs_1.default.writeFile(desSrc + image.name, image.contents, (err) => {
                    if (err instanceof Error) {
                        console.error(err);
                    }
                });
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c);
            }
            finally { if (e_1) throw e_1.error; }
        }
        try {
            // loop through the files metadata and write files to the appropriate location
            for (var _e = __asyncValues(response.files), _f; _f = yield _e.next(), !_f.done;) {
                const file = _f.value;
                if (file.name === 'manifest.json') {
                    jsonManifestParser(desSrc, file.name, file.contents);
                }
                else if (file.name === 'manifest.webapp') {
                    jsonWebAppParser(desSrc, file.name, file.contents);
                }
                else {
                    fs_1.default.writeFile(desSrc + file.name, file.contents, (err) => {
                        if (err instanceof Error) {
                            console.error(err);
                        }
                    });
                }
            }
        }
        catch (e_2_1) { e_2 = { error: e_2_1 }; }
        finally {
            try {
                if (_f && !_f.done && (_b = _e.return)) yield _b.call(_e);
            }
            finally { if (e_2) throw e_2.error; }
        }
        // pass the html metadata as a response to the HTMLParser function
        htmlParser(response.html.toString('utf8'), desSrc);
        console.log('All icons have been generated', log_symbols_1.default.success);
    });
}
/**
 * Description: callback method for the favicons function
 * @param error - errors
 * @param response - property holding the metadata of all the generated files
 */
callback method for the favicons function
@param error - errors
@param response - property holding the metadata of all the generated files
callback method for the favicons function @param error - errors @param response - property holding the metadata of all the generated files
function callback(error, response) {
    var e_1, _a, e_2, _b;
    return __awaiter(this, void 0, void 0, function* () {
        yield progressStatus(true);
        const desSrc = './public/';
        if (error) {
            console.log(error.name, error.stack, error.message); 
            return;
        }
        try {
            for (var _c = __asyncValues(response.images), _d; _d = yield _c.next(), !_d.done;) {
                const image = _d.value;
                fs_1.default.writeFile(desSrc + image.name, image.contents, (err) => {
                    if (err instanceof Error) {
                        console.error(err);
                    }
                });
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c);
            }
            finally { if (e_1) throw e_1.error; }
        }
        try {
            for (var _e = __asyncValues(response.files), _f; _f = yield _e.next(), !_f.done;) {
                const file = _f.value;
                if (file.name === 'manifest.json') {
                    jsonManifestParser(desSrc, file.name, file.contents);
                }
                else if (file.name === 'manifest.webapp') {
                    jsonWebAppParser(desSrc, file.name, file.contents);
                }
                else {
                    fs_1.default.writeFile(desSrc + file.name, file.contents, (err) => {
                        if (err instanceof Error) {
                            console.error(err);
                        }
                    });
                }
            }
        }
        catch (e_2_1) { e_2 = { error: e_2_1 }; }
        finally {
            try {
                if (_f && !_f.done && (_b = _e.return)) yield _b.call(_e);
            }
            finally { if (e_2) throw e_2.error; }
        }
        htmlParser(response.html.toString('utf8'), desSrc);
        console.log('All icons have been generated', log_symbols_1.default.success);
    });
}
function callback ( error , response ) { var e_1 , _a , e_2 , _b ; return __awaiter ( this , void 0 , void 0 , function * ( ) { yield progressStatus ( true ) ; const desSrc = './public/' ; if ( error ) { console . log ( error . name , error . stack , error . message ) ; return ; } try { for ( var _c = __asyncValues ( response . images ) , _d ; _d = yield _c . next ( ) , ! _d . done ; ) { const image = _d . value ; fs_1 . default . writeFile ( desSrc + image . name , image . contents , ( err ) => { if ( err instanceof Error ) { console . error ( err ) ; } } ) ; } } catch ( e_1_1 ) { e_1 = { error : e_1_1 } ; } finally { try { if ( _d && ! _d . done && ( _a = _c . return ) ) yield _a . call ( _c ) ; } finally { if ( e_1 ) throw e_1 . error ; } } try { for ( var _e = __asyncValues ( response . files ) , _f ; _f = yield _e . next ( ) , ! _f . done ; ) { const file = _f . value ; if ( file . name === 'manifest.json' ) { jsonManifestParser ( desSrc , file . name , file . contents ) ; } else if ( file . name === 'manifest.webapp' ) { jsonWebAppParser ( desSrc , file . name , file . contents ) ; } else { fs_1 . default . writeFile ( desSrc + file . name , file . contents , ( err ) => { if ( err instanceof Error ) { console . error ( err ) ; } } ) ; } } } catch ( e_2_1 ) { e_2 = { error : e_2_1 } ; } finally { try { if ( _f && ! _f . done && ( _b = _e . return ) ) yield _b . call ( _e ) ; } finally { if ( e_2 ) throw e_2 . error ; } } htmlParser ( response . html . toString ( 'utf8' ) , desSrc ) ; console . log ( 'All icons have been generated' , log_symbols_1 . default . success ) ; } ) ; }
Description: callback method for the favicons function
 @param error - errors
 @param response - property holding the metadata of all the generated files
Description : callback method for the favicons function @param error - errors @param response - property holding the metadata of all the generated files
// await the completion of the progess status // Error description e.g. "An unknown error has occurred" // loop through the images metadata and write files to the appropriate location // loop through the files metadata and write files to the appropriate location // pass the html metadata as a response to the HTMLParser function