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

@liteflow/compiler

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@liteflow/compiler

Compiler

  • 5.0.0
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

@liteflow/compiler

This library let you compile your services and/or processes.

Contents

  • Installation
  • Service
  • Process

Installation

npm install @liteflow/compiler

Service

Warning: The service compilation doesn't produce a ready to publish result. At the end of the compilation you will still need to add the source attribute with the hash of the tarball of the sources of your service on IPFS.

const fs = require('fs')
const compiler = require('@liteflow/compiler')

const serviceFileBuffer = fs.readFileSync('./liteflow.yml')

compiler.service(
  serviceFileBuffer // Buffer of your service file `fs.readFileSync('./liteflow.yml')`
)
  .then(service => console.log(service))
  .catch(error => console.error("error during the compilation", error))

Process

const fs = require('fs')
const { decode } = require('@liteflow/api/lib/util/base58')
const compiler = require('@liteflow/compiler')

const processFile = fs.readFileSync('./my-process.yml')

compiler.process(
  processFileBuffer,                            // Buffer of your process file `fs.readFileSync('./my-process.yml')`
  async object => decode(object.instanceId),    // InstanceResolver, can be use to simply decode an instance id or do some check/deployment
  { "FOO": "BAR" }                              // Map of environment variable that will be replaced in your process
)
  .then(process => console.log(process))
  .catch(error => console.error("error during the compilation", error))

FAQs

Package last updated on 04 Dec 2020

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