How to use the @pnpm/core-loggers.importingLogger.debug function in @pnpm/core-loggers

To help you get started, we’ve selected a few @pnpm/core-loggers 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 pnpm / pnpm / packages / package-store / src / storeController / createImportPackage.ts View on Github external
async function clonePkg (
  from: string,
  to: string,
  opts: {
    filesResponse: PackageFilesResponse,
    force: boolean,
  },
) {
  const pkgJsonPath = path.join(to, 'package.json')

  if (!opts.filesResponse.fromStore || opts.force || !await exists(pkgJsonPath)) {
    importingLogger.debug({ from, to, method: 'clone' })
    await importIndexedDir(cloneFile, from, to, opts.filesResponse.filenames)
  }
}
github pnpm / pnpm / packages / package-store / src / storeController / createImportPackage.ts View on Github external
async function hardlinkPkg (
  from: string,
  to: string,
  opts: {
    filesResponse: PackageFilesResponse,
    force: boolean,
  },
) {
  const pkgJsonPath = path.join(to, 'package.json')

  if (!opts.filesResponse.fromStore || opts.force || !await exists(pkgJsonPath) || !await pkgLinkedToStore(pkgJsonPath, from, to)) {
    importingLogger.debug({ from, to, method: 'hardlink' })
    await importIndexedDir(fs.link, from, to, opts.filesResponse.filenames)
  }
}
github pnpm / pnpm / packages / package-store / src / storeController / createImportPackage.ts View on Github external
export async function copyPkg (
  from: string,
  to: string,
  opts: {
    filesResponse: PackageFilesResponse,
    force: boolean,
  },
) {
  const pkgJsonPath = path.join(to, 'package.json')
  if (!opts.filesResponse.fromStore || opts.force || !await exists(pkgJsonPath)) {
    importingLogger.debug({ from, to, method: 'copy' })
    const staging = pathTemp(path.dirname(to))
    await makeDir(staging)
    await ncp(from + '/.', staging)
    await renameOverwrite(staging, to)
  }
}