Socket
Book a DemoInstallSign in
Socket

opent2t-translator-com-nest-thermostat

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opent2t-translator-com-nest-thermostat

Nest Thermostat

1.4.0
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created
Source

Introduction

Repository for Open Translators to Things. Grouped by translators written for specific schemas. The schema names are uniquely namespaced. The translator name is a unique string identifying a Thing.

This README will help get you started developing in this repo.

Install Tools

Get your dev environment set up (PC or Mac):

  • Install Git
  • Install Node
  • Choose your favorite IDE, e.g. Visual Studio Code.

Get the Source

Next, clone this repo to your local machine to get started. Navigate to the directory where you want to clone the repo to locally, then run:

git clone https://github.com/openT2T/translators.git

Create a New Translator

Follow our getting started guide at http://www.opentranslatorstothings.org. Note that we have some required naming rules for translator node packages:

  • The npm package names must always have "opent2t-translator-" prefix. We are not currently using npm namespacing.
  • After the prefix, we will kebab-case the reverse-URI that is translator name, so e.g. "com.wink.lightbulb" becomes "opent2t-translator-com-wink-lightbulb".

Here is some background reading for those who are curious:

Run Integration Tests

  • Install gulp globally.
npm install -g gulp
  • Install dependencies.
npm install verifiers
  • Run integration tests.
gulp ci-checks

Notes:

  • Other gulp tasks can be run as well, see gulpfile.js for available tasks.
  • By default all files under the translators repo will be tested.
  • Use the --cwd option to only test files under a specified directory:
gulp --cwd .\org.opent2t.sample.windowshade.superpopular\ ci-checks

Create a Pull Request

Made any changes we should consider? Send us a pull request! Check out this article on how to get started.

Publish a Translator Package to NPM

A translator package includes one thing translator along with all the schemas it references. Because those are not organized in the way npm publish expects, the process of publishing a translator package uses a script from the CLI repo.

  • Update the version property in the package.json file in the translator directory. (Of cource any other metadata may be updated also, but a version bump is required when publishing to npm, since you may not re-publish over an existing version.)

  • Clone the CLI repo (or sync it as needed), and install its dependencies:

cd ..
git clone https://github.com/opent2t-cli
npm install
cd ../translators
  • Use the script to generate a package.json for the translator to be published. Note the last parameter is a simple name of a translator, not a directory path, which would include a schema name.
node ../opent2t-cli/pack-translator.js com.wink.thermostat
npm login
Username: opent2t
Password: *********
  • Publish the package to NPM:
npm publish

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

FAQs

Package last updated on 12 Sep 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.