Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lage-run/scheduler

Package Overview
Dependencies
Maintainers
1
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lage-run/scheduler

Scheduler for Lage

  • 0.4.13
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
602
increased by114.23%
Maintainers
1
Weekly downloads
 
Created
Source

@lage-run/scheduler

This package provides:

  1. Scheduler interface
  2. `
  3. a default cache provider that uses backfill

Usage

import { Logger } from "@lage-run/logger";
import { RemoteFallbackCacheProvider, TargetHasher } from "@lage-run/cache";
import { SimpleScheduler } from "@lage-run/scheduler";
import { TargetGraph } from "@lage-run/target-graph";

const root = "/root-of-repo";
const logger = new Logger();
const cacheProvider = new RemoteFallbackCacheProvider({ root, logger, ... });
const hasher = new TargetHasher({ root, ... });

const runner = new NpmScriptRunner({
  logger,
  ...
})

const runnerPicker = new TargetRunnerPicker({
  runners: {
    npmScript: runner
  }
})

const scheduler = new SimpleScheduler({
  logger,
  concurrency,
  cacheProvider,
  hasher,
  continueOnError: true,
  shouldCache: true,
  shouldResetCache: false,
  runner
});

const targetGraphBuilder = new TargetGraphBuilder();
const packageInfos = getPackageInfos(rootDir);

const builder = new TargetGraphBuilder(rootDir, packageInfos);

// these would normally come from the CLI
const tasks = ["build", "test"];
const packages = ["package-a", "package-b"];

const targetGraph = builder.buildTargetGraph(tasks, packages);

await scheduler.run(root, targetGraph);

// If an error happened...
scheduler.abort();

FAQs

Package last updated on 23 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc