@bitrise/yml-helper

1.0.2 • Public • Published

yml-helper

NPM package for parsing Bitrise apps' bitrise.yml

Example code

import { StepSourceService, App } from 'yml-helper';

const bitriseYml = `
format_version: '6'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: other
trigger_map: []
workflows:
  workflow-test:
    steps:
    - script@1.1.5: {}
    - script@1.1.4: {}
  workflow-test-old:
    steps:
    - script@1.1.3: {}
    - script@1.1.2: {}
`;

const stepSourceService = new StepSourceService();
stepSourceService.loadDefaultLibrary().then(() => {
  const app = new App(bitriseYml, stepSourceService);

  app.workflows.forEach(workflow => {
    workflow.steps.forEach(step => {
      console.log(stepSourceService.isStepAtLeastOnVersion(step, '1.1.4'));
    });
  });
});

Readme

Keywords

none

Package Sidebar

Install

npm i @bitrise/yml-helper

Weekly Downloads

2

Version

1.0.2

License

none

Unpacked Size

417 kB

Total Files

13

Last publish

Collaborators

  • nyikoszoltan
  • gaborszakacs
  • erosdome
  • norbertkovach
  • simonmarton
  • daniel.serleg
  • matenadasdi