function _scheduleBuilds(options, context) {
        return __awaiter(this, void 0, void 0, function* () {
            const browserTarget = architect_1.targetFromTargetString(options.browserTarget);
            const serverTarget = architect_1.targetFromTargetString(options.serverTarget);
            const browserTargetRun = yield context.scheduleTarget(browserTarget, {
                watch: false,
                serviceWorker: false,
                // todo: handle service worker augmentation
            });
            const serverTargetRun = yield context.scheduleTarget(serverTarget, {
                watch: false,
            });
            try {
                const [browserResult, serverResult] = yield Promise.all([
                    browserTargetRun.result,
                    serverTargetRun.result,
                ]);
                const success = browserResult.success && serverResult.success && browserResult.baseOutputPath !== undefined;
                const error = browserResult.error || serverResult.error;
                return { success, error, browserResult, serverResult };
            }
            catch (e) {
                return { success: false, error: e.message };
            }
            finally {
                yield Promise.all([browserTargetRun.stop(), serverTargetRun.stop()]);
            }
        });
    }
/**
     * Schedules the server and browser builds and returns their results if both builds are successful.
     */
Schedules the server and browser builds and returns their results if both builds are successful.
Schedules the server and browser builds and returns their results if both builds are successful .
function _scheduleBuilds(options, context) {
        return __awaiter(this, void 0, void 0, function* () {
            const browserTarget = architect_1.targetFromTargetString(options.browserTarget);
            const serverTarget = architect_1.targetFromTargetString(options.serverTarget);
            const browserTargetRun = yield context.scheduleTarget(browserTarget, {
                watch: false,
                serviceWorker: false,
            });
            const serverTargetRun = yield context.scheduleTarget(serverTarget, {
                watch: false,
            });
            try {
                const [browserResult, serverResult] = yield Promise.all([
                    browserTargetRun.result,
                    serverTargetRun.result,
                ]);
                const success = browserResult.success && serverResult.success && browserResult.baseOutputPath !== undefined;
                const error = browserResult.error || serverResult.error;
                return { success, error, browserResult, serverResult };
            }
            catch (e) {
                return { success: false, error: e.message };
            }
            finally {
                yield Promise.all([browserTargetRun.stop(), serverTargetRun.stop()]);
            }
        });
    }
function _scheduleBuilds ( options , context ) { return __awaiter ( this , void 0 , void 0 , function * ( ) { const browserTarget = architect_1 . targetFromTargetString ( options . browserTarget ) ; const serverTarget = architect_1 . targetFromTargetString ( options . serverTarget ) ; const browserTargetRun = yield context . scheduleTarget ( browserTarget , { watch : false , serviceWorker : false , } ) ; const serverTargetRun = yield context . scheduleTarget ( serverTarget , { watch : false , } ) ; try { const [ browserResult , serverResult ] = yield Promise . all ( [ browserTargetRun . result , serverTargetRun . result , ] ) ; const success = browserResult . success && serverResult . success && browserResult . baseOutputPath !== undefined ; const error = browserResult . error || serverResult . error ; return { success , error , browserResult , serverResult } ; } catch ( e ) { return { success : false , error : e . message } ; } finally { yield Promise . all ( [ browserTargetRun . stop ( ) , serverTargetRun . stop ( ) ] ) ; } } ) ; }
Schedules the server and browser builds and returns their results if both builds are successful.
Schedules the server and browser builds and returns their results if both builds are successful .
// todo: handle service worker augmentation