UNPKG

@platform/react.ssr

Version:

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

33 lines (28 loc) 839 B
import { Config } from '../config'; import { Manifest } from '../manifest'; import { t, log } from './common'; /** * Pull latest manifest. */ export async function run(args: { cli: t.ICmdApp }) { const { cli } = args; const config = await Config.create(); let manifest: Manifest | undefined; // Pull data from cloud. log.info(); await cli .task('pull manifest', async (e) => { manifest = await config.manifest.local.ensureLatest({ minimal: true }); }) .run({ concurrent: true }); log.info(); if (!manifest) { log.error('\nManifest could not be found.'); log.info.gray(config.manifest.s3.url); return cli.exit(1); } // Ensure the local manifest is up-to-date. log.info.gray(` url: ${manifest.baseUrl}`); log.info.gray(` local: ${config.manifest.local.path}`); log.info(); }