Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@bluecadet/launchpad
Advanced tools
Launchpad is a suite of configuration-driven tools to manage media installations that can:
LaunchpadContent default values
LaunchpadContent
instance config
(passed via constructor)ContentSource
instance config
(passed via constructor)launchpad.json
config file. See #Configurationnpm i -g @bluecadet/launchpad
(or npm i -g bluecadet/launchpad
from GitHub)npm i @bluecadet/launchpad
(or npm i bluecadet/launchpad
from GitHub)launchpad
npx launchpad
In all the following examples, we'll use launchpad
, but you can always replace it with npx launchpad
for local dependencies.
launchpad.json
or config.json
at the cwd (where you ran launchpad ...
from)--config=<YOUR_FILE_PATH>
(e.g. launchpad --config=../settings/my-config.json
)--foo=bar
(e.g. --logging.level=debug
)The following commands are available when running launchpad <command>
or npx launchpad <command>
.
launchpad
: Same as launchpad start
.launchpad start
: Starts launchpad by updating content and starting apps. (default)launchpad stop
: Stops and kills any existing PM2 instance.launchpad content
: Only download content. Parses your config as config.content || config
.launchpad monitor
: Only start apps. Parses your config as config.monitor || config
.launchpad scaffold
: Configures the current PC for exhibit environments (with admin prompt).Type launchpad --help
for more info.
Most Launchpad configuration is individual to each module, with only a few global settings for commands
and logging
.
The general structure for your launchpad.json
should be:
{
"content": {},
"monitor": {},
"logging": {}
}
Each module has sensible defaults and is optional, so you could only define content settings if you only want to download content, or only define monitor settings if you only want to launch and monitor apps.
See the following classes for a full list of all available options:
LaunchpadOptions
: All options for launchpad combined into a single object
monitor
(MonitorOptions
): Configures which apps to runcontent
(ContentOptions
): Configures which content to download
sources
: An array containing any amount of the following content source options:
AirtableOptions
: Download content from AirtableContentfulOptions
: Download content from ContentfulJsonOptions
: Download content from JSON endpointsStrapiOptions
: Download content from Strapilogging
(LogOptions
): Configures how logs are routed to the console and to filesThe following launchpad.json
will launch two apps. The first app window will be foregrounded after launch, the second app will be minimized. If any of the apps exit, PM2 will relaunch them.
{
"monitor": {
"apps": [
{
"pm2": {
"name": "main-app",
"script": "my-main-app.exe",
"cwd": "../apps/"
},
"windows": {
"foreground": true
}
},
{
"pm2": {
"name": "side-app",
"script": "my-side-app.exe",
"cwd": "../apps/",
"args": "--custom-arg=true"
},
"windows": {
"minimize": true
}
}
]
}
}
The following launchpad.json
would download content from the Flickr API. Content would be downloaded into .downloads/spaceships
(based on the default .downloads/
directory and the id
field of the content source).
{
"content": {
"sources": [
{
"id": "spaceships",
"files": {
"spaceships.json": "https://api.flickr.com/services/feeds/photos_public.gne?format=json&nojsoncallback=1&tags=spaceship",
"rockets.json": "https://api.flickr.com/services/feeds/photos_public.gne?format=json&nojsoncallback=1&tags=rocket"
}
}
]
}
}
Each API request will be stored as an individual json
:
.downloads/spaceships/spaceships.json
.downloads/spaceships/rockets.json
All images contained in these json files will be downloaded while retaining the remote directory structure. So https://live.staticflickr.com/65535/51886202435_e49e7ef884_m.jpg
would be downloaded to .downloads/65535/51886202435_e49e7ef884_m.jpg
.
Some content sources require credentials to access their APIs.
These can all be stored in a local .credentials.json
file which maps content-source IDs to their credentials.
Below is an example for Airtable, Contentful and Strapi sources:
{
"exampleAirtableSource": {
"apiKey": "<YOUR_AIRTABLE_API_KEY>"
},
"exampleContentfulSource": {
"previewToken": "<YOUR_CONTENTFUL_PREVIEW_TOKEN>",
"deliveryToken": "<YOUR_CONTENTFUL_DELIVERY_TOKEN>",
"usePreviewApi": false
},
"exampleStrapiSource": {
"identifier": "<YOUR_API_USER>",
"password": "<YOUR_API_PASS>"
}
}
The @bluecadet/launchpad-scaffold
package is a collection of PS1 scripts to configure PCs for exhibit environments.
To run the scaffold scripts, you can call launchpad scaffold
, or manually run packages/scaffold/setup.bat
as administrator.
ConfirmAllScripts
to $false
packages/scaffold/config/user.ps1
to other PCs to apply the same settingsMost scripts and settings are based on examples and precedents from various existing resources. Besides StackOverflow, the following two repositories have been crucial references:
This repo is a monorepo that includes the following packages:
@bluecadet/launchpad
@bluecadet/launchpad-content
@bluecadet/launchpad-dashboard
@bluecadet/launchpad-monitor
@bluecadet/launchpad-scaffold
@bluecadet/launchpad-utils
Each of these packages can be launched independently (except for utils), so if you only need app-monitoring or content updates, you can install only @bluecadet/launchpad-monitor
or @bluecadet/launchpad-content
.
Launchpad requires Node 16+, but Node 17.5.0+ is recommended for better Windows API integration and workspaces support.
We recommend installing Node via nvm-windows:
nvm install 17.5.0
nvm use 17.5.0
If you run into issues installing subpackages, try upgrading npm
to version 8.5.1
or above.
npm i -g npm@8.5.1
FAQs
Suite of tools to manage media installations
The npm package @bluecadet/launchpad receives a total of 15 weekly downloads. As such, @bluecadet/launchpad popularity was classified as not popular.
We found that @bluecadet/launchpad demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.