npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

yaml-scene

v1.1.25

Published

Platform to do everything with only yaml scenario files

Downloads

106

Readme

YAML Scene

It's a platform to do everything with only yaml scenario files.
Because it's a platform, so you can easy to create extensions by yourself or use extensions which is shared by others.

Features

  1. Split a huge scenario file to many small files which make easy to run in a big project
  2. Flexible to use, easy to extends, customize for specific project
  3. Easy to install and reuse extensions via npm registry or create a extension by yourself
  4. Easy to customize or create new extensions and share them to everybody or reused in projects
  5. Support encrypt a scenario file and run the encrypted scenario file
  6. Provide docker image to run it without installation
  7. Support run a scenario file, load extensions from both local files and remote files (http(s)
  8. Auto generate a json schema for suggestion and validation

Installation

Install via npm or yarn

  npm install -g yaml-scene   # yarn global add yaml-scene

How to run

  1. Create a scenario file with the below content
# Make a http request to http://localhost:8000/index.html
- yas-http/Get:
    baseURL: http://localhost:8000
    url: /index.html
    var: responseContent

# Print response content to console
- Echo: ${responseContent}
  1. Run the scenario
  yas $YAML_SCENE_FILE $PASSWORD
  • $YAML_SCENE_FILE: Path to scenario file
  • $PASSWORD: Password to run encrypted scenario file which contains property "password" in scenario file content.

Docker image

docker pull doanthuanthanh88/yaml-scene:latest

Run via docker

  docker run --rm -it doanthuanthanh88/yaml-scene $YAML_SCENE_FILE $PASSWORD

Extensions

  1. yas-http: Manage http(s) request, mocking api server, create testcases, generate to document...
  2. yas-grpc: Manage gRPC request, mocking gRPC server, create testcases, generate to document...
  3. yas-sequence-diagram: Generate to sequence diagram, flow diagram base on comment in code
  4. yas-redis: A redis client

You can build a extension by yourself

Guideline document

Sharing

How to create a yaml scene file

Please follow wiki pages to create a scene file for your self.

Examples

Please go to here to see examples

Create a new extension

Please clone Extension template project which includes examples, commands to unit test, build, document...

Or you can write a simple extension js file

CLI

  1. Run a scenario my_scenario.yas.yaml
  • From local file
      yas my_scenario.yas.yaml
  • From remote file
      yas http://localhost/my_scenario.yas.yaml

    Note: Pass headers via querystring to pass authentication, authorization.
    Ex: http://localhost/my_scenario.yas.yaml?headers={"Authorization":"..."}

  1. Install new extensions
  yas add yas-http yas-grpc
  1. Upgrade extensions
  yas up yas-http yas-grpc
  1. Uninstall extensions
  yas rm yas-http yas-grpc
  1. Show version
  yas -v
  1. Show help content
  yas -h

More information

Goodluck and fun :)