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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sofie-blueprint-tools

v1.1.0

Published

When making blueprints for Sofie, they need to be packaged and uploaded in a certain way. This includes steps such as transforming the json-schema used for the configuration, and extracting strings to be translated.

Readme

Sofie: The Modern TV News Studio Automation System

When making blueprints for Sofie, they need to be packaged and uploaded in a certain way.
This includes steps such as transforming the json-schema used for the configuration, and extracting strings to be translated.

This library is a collection of tooling needed by all blueprints to prepare them into the format that Sofie expects.

You can see a reference blueprint implementation which utilises this tooling at https://github.com/SuperFlyTV/sofie-demo-blueprints
If wanting to make your own blueprints, we recommend starting from that repository instead of building from scratch.

Available scripts

All of these scripts need to know the names and paths of the blueprints in your project. This is done with the blueprint-map.mjs file provided to each command.

A simple example of this file is:

// This is each blueprint that you have
export const BlueprintEntrypoints = {
	demoshowstyle: './src/main/showstyle/index.ts',
	demostudio: './src/main/studio/index.ts',
	system: './src/system/index.ts',
}

// You can optionally define bundles, so that you can easily produce a smaller bundle containing a subset of the blueprints in the project
export const BlueprintBundles = {
	show: ['demoshowstyle', 'demostudio', 'system'],
}

blueprint-build

This is the core build script. It will consume your typescript source code, and prepare a self contained js file for each blueprint. Optionally, it can auto-upload the built code to your sofie installation (very useful for development)

	Tool to build blueprints into a Sofie compatible bundle

	Usage
		$ blueprint-build <config-file> <dist-dir>

	Options
		--server       Server to upload to
		--development  Development mode
		--watch, -w    Watch for changes and rebuild
		--bundle       Bundle to build, or "all" for all bundles (default: "all")

	Examples
		$ blueprint-build ./blueprint-map.mjs ./dist
		$ blueprint-build ./blueprint-map.mjs ./dist --watch --development
		$ blueprint-build ./blueprint-map.mjs ./dist --bundle=core

blueprint-bundle

This is a helper build script to combine the built blueprints into a single json bundle. This allows them to be uploaded to sofie with a single POST to http://localhost:3000/api/private/blueprints/restore.

	Tool to bundle built blueprints into a json bundle for easier bulk uploading

	Usage
		$ blueprint-bundle <config-file> <dist-dir>

	Options
		--bundle           Bundle name to process, or "all" for all bundles (default: "all")

	Examples
		$ blueprint-bundle ./blueprint-map.mjs ./dist/
		$ blueprint-bundle ./blueprint-map.mjs ./dist/ -b core

blueprint-schema-types

Sofie expects your available blueprint configuration fields to be defined with JSON schema. This tool will convert the same schema into typescript interfaces and enums which you can use in your code.

	Tool to generate typescript types from blueprint config schemas

	Usage
		$ blueprint-schema-types <search-path> <output-path>

	Examples
		$ blueprint-schema-types ./src/$schemas/generated ./src/generated/types

blueprint-extract-translations

If you need to provide translations for various text from your blueprints into multiple languages, you can utilise this to generate po files for the strings that need translating.

	Tool to extract translations from the TypeScript sourcecode, and associated json schemas

	Usage
		$ blueprint-extract-versions <config-file>

	Examples
		$ blueprint-extract-versions ./blueprint-map.mjs

Contributing

Any contributions to this are welcome. We hope that the tools here can be utilised for all Sofie blueprints no matter how complex. There are likely bits of configuration that have not been exposed, and are happy to expose more as needed.