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

@nori-dot-com/project

v1.6.2

Published

Nori supplier project specification and utilities

Downloads

16

Readme

@nori-dot-com/project

Schema and utilities for nori supplier projects

Installation

via yarn

yarn add @nori-dot-com/project

or via npm

npm i @nori-dot-com/project

Docs

  • Nori Croplands Project Specification v4 - Nori "v4" croplands project data import specification documentation

  • Nori Croplands Project specification v3 - Nori "v3" project data specification documentation lives here

  • validation - documentation on how to use the validation module to validate Nori project data (i.e. data that was exported from a data platform to conform with the latest project data specification)

  • convertFromV3ToV4 - Basic conversion logic to transform v3 files to v4. Not thorougly tested yet.

  • convertFromV2ToV1 - documentation on how to use the script to convert "v2" project data files into "v1" project data files (neither version are what is specified in the specification files as that is referred to as "v3")


Validation CLI

There is a very simple CLI entrypoint to the V4 project schema validation that's used as follows:

yarn validate < myV4Import.json > myOutput.json

Developers

Summary

This module consists of three primary artifacts (a TypeScript specification, a JSON schema, and validation functions), all of which depend on one another.

The TypeScript specification

This is the most important file in the module. This file accomplishes a few things:

TypeScript interface declarations

These interfaces are exported for use in TS/JS applications

Inline documentation, examples, and validation parameter definitions
  • This module makes use of TypeDoc to define documentation and examples.

  • It then makes use of typedoc-plugin-markdown to auto-generate documentation (i.e., those found in the docs folder)

Documentation for the spec such as why certain fields are optional, when they're optional. Such documentation is auto-generated from the specification's inline JSDoc style comments so as to prevent the documentation from becoming out of sync with the specification itself.

The JSON schema

This module makes use of typescript-json-schema to parse the typescript interfaces (and associated comments) into JSON schema format. This is eventually and primarily consumed by the validation functions

Validation functions

These functions contain a validation functions that makes use of AJV to create extremely robust validation functions.

The validation functions allow partners and data managers to start creating import files prior to us having the full import flow finished and integrated in the app. This way, once the new specification is supported in the app, partners and data managers can be confident that importing their files won't result in an error.

The validation functions can be used to validate project data in a given file. If the data is valid, the validation functions will say such. If the data is invalid, the functions will not only say that the data is invalid, but it will give detailed information as to why the data is invalid.

Development

Generate docs

yarn make:docs

Generate JSON schema

yarn make:schema

Run tests

From the root of the nori-dot-com monorepo

yarn run test