How to use the backfill-config.createConfig function in backfill-config

To help you get started, we’ve selected a few backfill-config examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / backfill / packages / backfill / src / index.ts View on Github external
export async function main(): Promise {
  try {
    const config = createConfig();
    const {
      cacheStorageConfig,
      clearOutputFolder,
      hashGlobs,
      internalCacheFolder,
      logFolder,
      logLevel,
      outputFolder,
      packageRoot
    } = config;

    if (logLevel) {
      setLogLevel(logLevel);
    }

    const helpString = "Backfills unchanged packages.";
github microsoft / backfill / packages / hasher / src / hashOfFiles.ts View on Github external
export async function generateHashOfFiles(
  packageRoot: string,
  glob?: string[]
): Promise {
  if (!glob) {
    glob = createConfig(packageRoot).hashGlobs;
  }

  const files = await fg(glob, {
    cwd: packageRoot,
    onlyFiles: false,
    objectMode: true
  });

  files.sort((a, b) => a.path.localeCompare(b.path));

  const hashes = await Promise.all(
    files.map(async file => {
      const hasher = crypto.createHash("sha1");
      hasher.update(file.path);

      if (!file.dirent.isDirectory()) {

backfill-config

Backfill Config

MIT
Latest version published 1 year ago

Package Health Score

60 / 100
Full package analysis

Similar packages