UNPKG

@platform/react.ssr

Version:

A lightweight SSR (server-side-rendering) system for react apps bundled with ParcelJS and hosted on S3.

48 lines (47 loc) 2.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.run = void 0; var tslib_1 = require("tslib"); var config_1 = require("../config"); var common_1 = require("./common"); function run(args) { return tslib_1.__awaiter(this, void 0, void 0, function () { var cli, config, manifest; var _this = this; return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: cli = args.cli; return [4, config_1.Config.create()]; case 1: config = _a.sent(); common_1.log.info(); return [4, cli .task('pull manifest', function (e) { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) { switch (_a.label) { case 0: return [4, config.manifest.local.ensureLatest({ minimal: true })]; case 1: manifest = _a.sent(); return [2]; } }); }); }) .run({ concurrent: true })]; case 2: _a.sent(); common_1.log.info(); if (!manifest) { common_1.log.error('\nManifest could not be found.'); common_1.log.info.gray(config.manifest.s3.url); return [2, cli.exit(1)]; } common_1.log.info.gray(" url: " + manifest.baseUrl); common_1.log.info.gray(" local: " + config.manifest.local.path); common_1.log.info(); return [2]; } }); }); } exports.run = run;