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

@appland/appmap-validate

Package Overview
Dependencies
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appland/appmap-validate

  • 2.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

appmap-validate

Check whether an appmap adheres to the specification.

Install

npm i @appland/validate

CLI

npx appmap-validate path/to/file.appmap.json

API

const {validate} = require("appmap-validate");
// Returns undefined if the appmap is valid
// Throws an InputError if there was a problem with the input options
// Throws an InvalidAppmapError if the provided appmap is invalid
// Any other thrown error should be considered as a bug
validate(
  data,
  {
    version, // appmap specification version
    "schema-depth": 0 // depth of the schema to display
    "instance-depth": 0 // depth of the instance to display
  }
);

Design Decisions

  • Every object is extensible Appmap producers are free to include additional properties. This can be useful to experiment with novel extensions which are not yet part of the spec. Also it can be useful to include additional data for debugging purpose.
  • Every optional property is nullable When a property is is not required, appmap producers have two options. Either they do not include the property in the object. Or they set its value to null which is easier/faster to do when using literal object notation. For instance, in js:
    // Missing optional property:
    {
      required: 'foo',
      ...(test ? { optional: 'bar' } : {}),
    };
    // null optional property:
    {
      required: 'foo',
      optional: test ? 'bar' : null,
    };
    

FAQs

Package last updated on 07 Aug 2023

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