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

@lionweb/cli

v0.6.11

Published

LionWeb CLI for {Java|Type}Script

Downloads

229

Readme

The cli package

license CI npm

This package exposes an executable for use with a CLI. It can be used as follows:

$ npx @lionweb/cli <command> <arguments>

Just running

$ npx @lionweb/cli

produces information about which commands are available.

This CLI utility does not perform any explicit validation apart from the file at the given path existing and being valid JSON. It does some implicit validation as it can error out on incorrect serializations.

Sorting a serialization chunk

Run the following command to sort a serialization chunk (e.g.):

npx @lionweb/cli sort ../artifacts/chunks/languages/lioncore.json

Sorting a serialization chunk means the following:

  • All nodes sorted by ID.
  • For all nodes, their properties, containments, and references sorted by key (from the meta-pointer),
  • All containments and references sorted by ID.

The sorting produces a serialization chunk that's also aligned on JSON-level with the specification. That means that key-value pairs appear in precisely the same order as they do in the specification, and that missing key-value pairs are put in and get their default values.

Changelog

0.6.10

  • (Depend on @lionweb/core and @lionweb/utilities version 0.6.9.)
  • Use the AggregatingSimplisticHandler to report on language deserialization problems.

0.6.9

  • (Depend on @lionweb/core and @lionweb/utilities version 0.6.8.)

0.6.8

  • (Depend on @lionweb/core and @lionweb/utilities version 0.6.7.)

0.6.7

  • (Depend on @lionweb/core and @lionweb/utilities version 0.6.6.)

0.6.6

  • TS types generator now generates 1 file per language. The output directory will be <languages serialization chunk's file name>_gen/.
  • The infer-language command has been renamed to infer-languages (without deprecated alias).

0.6.5

  • Extend metrics functionality.

0.6.4

  • Add a command infer-language that infers a language from the given serialization chunk.

0.6.3

  • Add a command measure that computes metrics.

0.6.2

  • Expose diffing functionality from @lionweb/validation

0.6.1

  • Fix that @lionweb/validation was not specified as a (non-dev) dependency.

0.6.0

  • Change the diagram command to output PlantUML and Mermaid diagram files per language.
  • Add a validation commmand to validate JSON files as serialization chunks.
  • Remove the shortening functionality from extract.
  • Rename the extract command → sort, and remove the textualization for chunks that are the serialization of languages.
  • Textualizing a serialization chunk of languages will use the LionCore/M3-specific syntax unless the flag --languagesAsRegular is an argument.
  • Add a repair command.
  • Add a textualize command – that's optionally language-aware – to render a JSON serialization chunk as pure text.

0.5.0

This is the first version corresponding to a release of LionWeb (version: 2023.1) as a whole.

  • Make language-related functionality "multi-lingual", i.e. a serialization chunk can contain multiple Languages.
    • (Languages will be sorted by name.)
  • Improve extraction functionality: only catch JSON-parsing exceptions.
  • Configure single entrypoint named lionweb-cli.

No changelog has been kept for previous versions, regardless of whether these were published or not.

Development

Build the executable from source as follows:

$ npm run build