
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@particle/device-constants
Advanced tools
The static device identifiers and meta-data for Particle hardware.
This project contains the constants as well as very lightweight wrappers around the constants and enables publishing them as NPM modules and Ruby Gems. All languages' libraries follow the same versioning scheme.
Installation | Development | Releasing
node@16.x
and npm@8.x
are required]$ git clone git@github.com:particle-iot-inc/device-constants.git && cd ./device-constants
$ npm install
@particle
org (docs)$ npm run
$ npm test
The Device Constants repo contains static specs for official Particle platform devices and the tooling to support publishing a series of language-specific packages with that data. All essential commands are available via npm run <script name>
- e.g. npm run lint
. To view the available commands, run: npm run
To add a new Particle platform device, simply:
src/constants.json
file in your favorite code editor"example": {
"id": <integer - the unique identifier>,
"name": <string - the unique name used by Device OS' build system>,
"displayName": <string - human-facing platform name>,
"generation": <integer - e.g. `2` for photon, `3` for boron, `4` for p2>,
"features": <array of strings - the features supported e.g. `wifi`, `ble`>,
"billingConnectivity": <string for where data ops for this device type should be counted e.g. `wifi`, or `cellular``>,
"public": <boolean - whether or not the platform is available to end-users>
},
NOTE: See src/constants.schema.json
for latest field definitions
npm run validate
git add -p && git commit
Constants data must adhere to the JSON Schema (https://json-schema.org) specs in src/constants.schema.json
. In some cases, you may need to extend the current schema to support addition properies, etc. To do that:
src/constants.schema.json
file in your favorite code editornpm run validate
git add -p && git commit
See the src/ruby/README.md
file for more info on the Ruby Gem wrapper.
Packages are only released from the main
branch after peer review.
$ git checkout main
$ git pull
$ npm test
$ npm run release
$ git push origin main --follow-tags
FAQs
static device identifiers and meta-data for Particle hardware
The npm package @particle/device-constants receives a total of 1,235 weekly downloads. As such, @particle/device-constants popularity was classified as popular.
We found that @particle/device-constants demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 23 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.