UNPKG

tachometer

Version:
37 lines (36 loc) 1.69 kB
/** * @license * Copyright (c) 2019 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt The complete set of authors may be found * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by * Google as part of the polymer project is also subject to an additional IP * rights grant found at http://polymer.github.io/PATENTS.txt */ import { MountPoint } from './server'; import { BenchmarkSpec, NpmPackageJson, PackageVersion } from './types'; /** * Parse an array of strings of the form <package>@<version>. */ export declare function parsePackageVersions(flags: string[]): PackageVersion[]; export interface ServerPlan { /** The benchmarks this server will handle. */ specs: BenchmarkSpec[]; /** NPM installations needed for this server. */ npmInstalls: NpmInstall[]; /** URL to disk path mappings. */ mountPoints: MountPoint[]; } export interface NpmInstall { installDir: string; packageJson: NpmPackageJson; } export declare function makeServerPlans(benchmarkRoot: string, npmInstallRoot: string, specs: BenchmarkSpec[]): Promise<ServerPlan[]>; export declare function hashStrings(...strings: string[]): string; /** * Write the given package.json to the given directory and run "npm install" * in it. If the directory already exists and its package.json is identical, * don't install, just log instead. */ export declare function prepareVersionDirectory({ installDir, packageJson }: NpmInstall, forceCleanInstall: boolean): Promise<void>;