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

@philipcatterall99/dataverse-gen

v1.0.2

Published

Early bound types generator for dataverse-ify. This is an early test version which is a fork of Scott Durow's dataverse-gen. It is a work in progress aimed at adding Business Process Flow Metadata and a typings file for attributes. Ultimate goal is to typ

Downloads

1

Readme

dataverse-gen

Creates early bound TypeScript interfaces to work with dataverse-ify. For more information see the dataverse-ify project

Usage

  1. Add authentication for your Microsoft Dataverse Environment:
    ~$ npx dataverse-auth [environment]
    E.g.
    ~$ npx dataverse-auth contosoorg.crm.dynamics.com

  2. Initialise dataverse-ify to create .dataverse-gen.json config file:
    ~$ npx dataverse-gen init

  3. At any time, you can re-generate the early bound types using:
    ~$ npx dataverse-gen

.dataverse-gen.json

The configuration for dataverse-gen is stored in the .dataverse-gen.json file. You can edit this manually if you want rather than use npx dataverse-gen init. This is the only file that is needed to run npx dataverse-gen.

The standard templates use references to the dataverse-ify types, and so unless you edit the templates (see below) you will need to install these types using:

npm install --save dataverse-ify

Custom Templates

If you wanted to just generate Attribute enum constants and stop there, you can easily customise the scripts to suit your needs by using:

npx dataverse-gen eject

This will create a step of templates ready to customise in the _templates folder. Once you have made your updates, just run npx dataverse-gen again. The templates use the awesome ejs project. E.g.

// Attribute constants
export const enum <%- locals.SchemaName %>Attributes {
<%locals.Properties && locals.Properties.forEach(function(property){ _%>
 <%- property.SchemaName %> = "<%- property.Name %>",
<%})_%>
}

If you wanted to revert back to the standard templates, just delete the _templates folder

Installing Globally

If you would rather install dataverse-gen globally you can use:
~$ npm install -g dataverse-gen dataverse-auth

This will then allow you to simply use:
~$ dataverse-auth
~$ dataverse-gen

For more information see the dataverse-ify project

Notes:

  1. Files differ by case only. If you get an error from the imports in the generated types, it is likely that your file names have the wrong case. dataverse-gen will remember re-use the file name if it exsts when generating - even if the casing is different. The solution is to completely remove all your generated files and regenerated them to get the correct casing.