Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta #13

Open
wants to merge 216 commits into
base: master
Choose a base branch
from
Open

Beta #13

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
216 commits
Select commit Hold shift + click to select a range
3b40694
Replaced FrontPoint nomenclature with Alarm.com variants
mkormendy Sep 2, 2018
513dde5
Updates readme and package.jsons
mkormendy Sep 2, 2018
df6be65
Release 1.1.0
mkormendy Sep 2, 2018
323bcf1
Alters package description and readme.
mkormendy Sep 2, 2018
66f5d97
Release 1.1.1
mkormendy Sep 2, 2018
b76c126
Fixes dot in the manufacturer name.
mkormendy Sep 2, 2018
506e31b
Release 1.1.2
mkormendy Sep 2, 2018
3275421
Reverses fix to dot in the manufacture name. Alters plugin name, upda…
mkormendy Sep 3, 2018
f3af276
Release 1.1.3
mkormendy Sep 3, 2018
4ca6c53
Fixes platform name issue in the readme.
mkormendy Sep 3, 2018
2c4fdb1
Release 1.1.4
mkormendy Sep 3, 2018
2111732
Corrected the install command in the readme.
mkormendy Sep 3, 2018
c08cd03
Release 1.1.5
mkormendy Sep 3, 2018
89b8f73
Updates README with details about the unavoidable lag in the Alarm.co…
mkormendy Sep 23, 2018
0984473
Release 1.1.6
mkormendy Sep 23, 2018
9e853b6
Update README.md (fixes json code highlighting)
mkormendy Sep 25, 2018
e830772
Update README.md to use markdown emoji instead of encoded characters.
mkormendy Sep 29, 2018
506f114
Adds ability to limit the log output. Adds ability to change authenti…
mkormendy Dec 24, 2018
cc1cca3
Merge branch 'master' of https://github.com/mkormendy/homebridge-fron…
mkormendy Dec 24, 2018
f4bf571
Readme cleanup.
mkormendy Dec 24, 2018
2b6da26
Release 1.1.7
mkormendy Dec 24, 2018
410fc5a
Fixes details flyout for error options
mkormendy Dec 24, 2018
639673d
Update README.md
mkormendy Dec 24, 2018
81352f7
Update README.md
mkormendy Dec 24, 2018
c759849
Release 1.1.8
mkormendy Dec 24, 2018
5793d79
Code reorganizing.
mkormendy Dec 26, 2018
5782c50
Release 1.1.9
mkormendy Dec 26, 2018
dd342b4
Adds stalebot to github repo.
mkormendy Jan 21, 2019
243c85b
Release 1.1.10
mkormendy Jan 21, 2019
4fa6af1
Adds meta badges to readme
mkormendy Jan 21, 2019
be2a8df
Added/Updated issue templates
mkormendy Jan 21, 2019
afc177d
Update issue templates
mkormendy Jan 21, 2019
cc87b77
Release 1.1.11
mkormendy Jan 21, 2019
4a14bfc
Adds ignore devices feature from issue #4 and #13.
mkormendy May 20, 2019
9a92579
Release 1.2.0
mkormendy May 20, 2019
bfc17f7
Add support for locks and partially lights
chase9 Oct 14, 2019
7d9be1a
Add support for lights
chase9 Oct 15, 2019
799b4de
Revert LOG_LEVEL to default of 3
chase9 Oct 23, 2019
122ee97
Check to see if lights are dimmers
chase9 Nov 16, 2019
9a37f78
Merge pull request #19 from chase9/master
mkormendy Nov 19, 2019
81d4b2d
Release 1.3.0
mkormendy Nov 19, 2019
4ba579e
Readme cleanup.
mkormendy Nov 19, 2019
5304dfc
Release 1.3.1
mkormendy Nov 19, 2019
f4f8a77
Updates dependency for latest changes to the node alarm dot com packa…
mkormendy Nov 19, 2019
37038db
Release 1.3.2
mkormendy Nov 19, 2019
79a947c
Fixes for #23 and adds a graceful warning approach to non-existing ac…
mkormendy Jan 13, 2020
ab57ab8
Release 1.4.0
mkormendy Jan 13, 2020
b3f34d0
Renamed method calls based on node-alarm-dot-com refactor.
mkormendy Jan 15, 2020
2fa9531
Updated node package files.
mkormendy Jan 15, 2020
3b658d5
Release 1.4.1
mkormendy Jan 15, 2020
3ac454f
Updates .gitignore
mkormendy Feb 24, 2020
15a7140
Updates .gitignore
mkormendy Feb 24, 2020
dcd1c35
Fixes API inconsistencies with device sections having incorrect devic…
mkormendy Feb 24, 2020
eb280a6
Updates dependencies to update/fix login issues reported on mkormendy…
mkormendy Mar 20, 2020
d543c79
Release 1.4.2
mkormendy Mar 20, 2020
1f7bc3b
Updates dependencies.
mkormendy Mar 20, 2020
15c9088
Release 1.4.3
mkormendy Mar 20, 2020
08ab7b2
Use proper light method params
chase9 Apr 22, 2020
3cc3313
Add comments to help keep code sane
chase9 Apr 22, 2020
b576d48
Use right variable name for refreshing lights
chase9 Apr 22, 2020
4067eea
Add semicolons and brackets to code
chase9 Apr 22, 2020
71d4e07
Add config.schema.json for UI-X settings support
cap10morgan May 5, 2020
512b2a1
Change pluginAlias to Alarmdotcom in config schema
cap10morgan May 5, 2020
c52cd91
Use Alarm.com in human-readable string in config schema
cap10morgan May 5, 2020
270c507
Merge pull request #36 from cap10morgan/feature/config-schema
mkormendy May 8, 2020
cf3207c
Removes semicolons.
mkormendy May 8, 2020
e2ac4e9
Cleans up logLevel references.
mkormendy May 8, 2020
5d80acd
Adds code comments for reference.
mkormendy May 8, 2020
a781e74
Update config.schema.json for options
DMBlakeley May 11, 2020
246d9ba
Fixes extraneous code fragment.
mkormendy May 11, 2020
3ba1eb2
Merge pull request #39 from DMBlakeley/patch-2
mkormendy May 11, 2020
0651afe
Update issue templates
mkormendy Jul 15, 2020
f43e435
Update README.md
mkormendy Jul 15, 2020
301799b
Updates README.md with details regarding the verbose log level setting.
mkormendy Jul 15, 2020
5d0258a
Update bug issue template
mkormendy Jul 15, 2020
9641cfe
Adds path and fs npm packages to repo.
mkormendy Jul 15, 2020
caad971
Adds logic to satisfy 'Verified' stipulations in Homebridge and the C…
mkormendy Jul 15, 2020
f85ac3f
Adds ability to export the Alarm.com response payload to a separate f…
mkormendy Jul 15, 2020
a80a51b
Code rearrangement and cleanup.
mkormendy Jul 15, 2020
8b271bd
Release 1.5.0
mkormendy Jul 15, 2020
b7f1447
Correction for [Security System] No lights found error
DMBlakeley Jul 15, 2020
7c89dca
Merge pull request #44 from DMBlakeley/patch-2
mkormendy Jul 15, 2020
dd6af7b
Release 1.5.1
mkormendy Jul 15, 2020
59a9549
Adds Verified by Homebridge Button to README.md
mkormendy Jul 18, 2020
b023824
Adding Garage Door Support (#45)
ngori Aug 1, 2020
588c862
Adjusts the repository url in the package.json
mkormendy Aug 1, 2020
215f1fd
Release 1.6.0
mkormendy Aug 1, 2020
e68bc21
Updates package-lock.json
mkormendy Aug 1, 2020
4932fed
Release 1.6.1
mkormendy Aug 1, 2020
cf1c15f
Fixes error with systems that don't have garage doors producing undef…
mkormendy Aug 1, 2020
01947b4
Release 1.6.2
mkormendy Aug 1, 2020
aa13152
Fixes dependency issues with package.json.
mkormendy Aug 1, 2020
d27e1a6
Release 1.6.3
mkormendy Aug 1, 2020
db293f6
Release 1.6.4
mkormendy Aug 1, 2020
d4a520f
Updating README.md with Garage control
mkormendy Aug 2, 2020
f3a6d83
Change links in README.md to the organization URL.
mkormendy Oct 24, 2020
11b04b6
Release 1.6.5
mkormendy Oct 24, 2020
15674cf
Switch to typescript and add some typings
chase9 Oct 25, 2020
7edd613
Remove strict flag
chase9 Oct 25, 2020
2b80356
Convert project to TypeScript
chase9 Oct 25, 2020
1387600
Rename interfaces for consistent capitalization
chase9 Nov 7, 2020
0931110
Remove depreciated accessory.reachable
chase9 Nov 8, 2020
053ceb4
Add nodemon to autoreload when debugging
chase9 Nov 21, 2020
d71c430
Add config to allow better debugging
chase9 Nov 21, 2020
bbc0398
Rewrite light methods to be more reliable
chase9 Nov 21, 2020
fa7eb22
Add github actions to push to NPM
chase9 Jan 12, 2021
1f798b5
Add eslint and change old urls
chase9 Jan 12, 2021
c4b038e
Depend on beta node-ADC, and import correct modules
chase9 Jan 16, 2021
a25926a
Re-add PLUGIN_ID to registerPlatform so UI-X doesn't break
chase9 Jan 18, 2021
f7fd8a0
Fix arm night
Jan 23, 2021
afa6444
Update package.json to prepare for release
chase9 Feb 6, 2021
756e535
Merge beta into master
chase9 Feb 6, 2021
1d15bd4
Fix node-alarm-dot-com imports
chase9 Feb 6, 2021
9f48059
Update nodejs.yml
chase9 Feb 6, 2021
8db428b
Merge branch 'Loomaanaatii-master'
chase9 Feb 6, 2021
8b0191a
Fix node-alarm-dot-com imports (again)
chase9 Feb 6, 2021
e893610
Fix homebridge-ui-x missing config schema
chase9 Feb 7, 2021
6c788f3
Update warning message about night arming
chase9 Feb 11, 2021
a1b2126
Fix nightArm and update UI schema.
chase9 Feb 11, 2021
5ffd32f
Bump beta version
chase9 Feb 11, 2021
1fb03d4
Add MFA to config.schema.json
chase9 Feb 19, 2021
a0a453b
Add MFA support to plugin
chase9 Feb 19, 2021
0e0b8f3
Beta 1.7.2-4
chase9 Feb 19, 2021
cea0455
Update packages
chase9 May 14, 2021
c13c496
Improve logging of unknown sensors
andrewheavin Mar 28, 2021
df5a6f3
Add missing methods to setup cached accessories
chase9 May 15, 2021
034d418
Fix ignored devices and cache restore
chase9 May 16, 2021
d65c23e
Fix beta versioning
chase9 May 16, 2021
b55ba66
Add randomness to refresh timer
chase9 May 16, 2021
74b6224
Make ordering in getCurrentState more consistent
chase9 May 16, 2021
f115d97
Update node-alarm-dot-com to 1.11.0-beta.4
chase9 May 18, 2021
c1f419e
Update node-alarm-dot-com to beta 6
chase9 May 18, 2021
cb6afed
Merge in changes from DMBlakeley/homebridge-node-alarm-dot-com
chase9 Jun 26, 2021
df9fb42
Update workflows for latest 3 node versions
chase9 Aug 11, 2021
f1f6ac7
Update packages
chase9 Aug 11, 2021
8d31b2e
Merge into master from DMBlakeley
chase9 Aug 11, 2021
ece22f5
Bump node-alarm-dot-com to beta.8
chase9 Aug 11, 2021
9c0bec4
Update packages
chase9 Aug 22, 2021
26e2b40
Fix homebridge-ui-x missing config schema
chase9 Feb 7, 2021
a674cbf
Update warning message about night arming
chase9 Feb 11, 2021
e66340c
Fix nightArm and update UI schema.
chase9 Feb 11, 2021
686a246
Bump beta version
chase9 Feb 11, 2021
dee673e
Add MFA to config.schema.json
chase9 Feb 19, 2021
bbea88f
Add MFA support to plugin
chase9 Feb 19, 2021
1a9720d
Beta 1.7.2-4
chase9 Feb 19, 2021
96cd3f8
Update packages
chase9 May 14, 2021
a122e2e
Improve logging of unknown sensors
andrewheavin Mar 28, 2021
c37c7b0
Add missing methods to setup cached accessories
chase9 May 15, 2021
7f8cb88
Fix ignored devices and cache restore
chase9 May 16, 2021
534046f
Fix beta versioning
chase9 May 16, 2021
a6c7351
Add randomness to refresh timer
chase9 May 16, 2021
60b6df9
Make ordering in getCurrentState more consistent
chase9 May 16, 2021
9ccb9ab
Update node-alarm-dot-com to 1.11.0-beta.4
chase9 May 18, 2021
70df751
Update node-alarm-dot-com to beta 6
chase9 May 18, 2021
30ad5cc
Merge in changes from DMBlakeley/homebridge-node-alarm-dot-com
chase9 Jun 26, 2021
ef9e311
Update workflows for latest 3 node versions
chase9 Aug 11, 2021
4dd879c
Update packages
chase9 Aug 11, 2021
6c9dda2
Merge into master from DMBlakeley
chase9 Aug 11, 2021
8c40b5c
Bump node-alarm-dot-com to beta.8
chase9 Aug 11, 2021
394c3de
Update packages
chase9 Aug 22, 2021
f58331b
Merge branch 'master' into beta
chase9 Feb 9, 2022
6c4afe5
Depend on more recent node engine
chase9 Feb 9, 2022
4e2fefe
Bump version and update packages
chase9 Feb 9, 2022
8eab462
Merge Fix for non-dimmable lights Issue #90 into beta
chase9 Feb 9, 2022
01676fd
Fix npm publish action
chase9 Feb 9, 2022
07d5f22
Remove dep on nodemon and fix debugging in WebStorm
chase9 May 14, 2022
c518c90
Add typings for contexts
chase9 Jun 30, 2022
73d89b1
Fix logging and buggy config init
chase9 Aug 21, 2022
139e4d2
Update package.json to latest beta node-alarm-dot-com
chase9 Aug 21, 2022
0012ee8
Update to latest beta of node-alarm-dot-com.
chase9 Sep 4, 2022
70a3a14
Upgrade existing sensors and begin refactor.
chase9 Dec 3, 2022
7a38718
Update packages
chase9 Jan 23, 2023
172a529
Fix for desiredLockState being unknown
chase9 Jan 23, 2023
9e15e89
Setup prettier and eslint for opinionated linting
chase9 Jan 23, 2023
10e5654
Do not send MFA token when useMFA === false
chase9 Jan 23, 2023
30b1e5a
Stop always logging when payload is written
chase9 Jan 23, 2023
302f880
Cleanup non-null assertions
chase9 Jan 23, 2023
87bdc03
Add VSCode launch profile
chase9 Jan 23, 2023
8a44bb6
HAP-NodeJS 0.11.0 compatibility
chase9 Jan 29, 2023
27371ee
Update actions and node-alarm-dot-com dep from beta
chase9 Jan 29, 2023
ca20066
Drop support for node 14
chase9 Jan 29, 2023
2c58f68
Fix linting issues in CustomLogger.ts
chase9 Jan 29, 2023
8905f84
Merge pull request #106 from node-alarm-dot-com/beta
chase9 Jan 29, 2023
79c0471
Version 1.9.0
chase9 Jan 29, 2023
2651617
Updated README.md logo, credits and updated config
chase9 Feb 26, 2023
c0f05bc
Fix linter errors in Contexts.ts
chase9 Feb 26, 2023
38fa38d
Add methods for checking Context type
chase9 Feb 28, 2023
999a4e4
Do not throw error if no partition received
chase9 Mar 17, 2023
820bca6
Merge branch 'beta' of github.com:node-alarm-dot-com/homebridge-node-…
chase9 Apr 1, 2023
8eb9ff6
Retrieve settings on startup
chase9 Apr 4, 2023
9539d18
Add thermostat support
pb30 Mar 7, 2023
5a0e287
Add humidity level support
pb30 Mar 17, 2023
4f5bf98
Add handling of alarm.com C/F setting
pb30 Apr 4, 2023
2413894
Use beta version of node-alarm-dot-com
chase9 Apr 8, 2023
ab2fb9b
Merge branch 'pb30-thermostats' into beta
chase9 Apr 8, 2023
8ca33a7
Beta 1.10.0
chase9 Apr 8, 2023
83b3501
Move some spammy logs to debug
chase9 Sep 3, 2023
0c84a9f
Update packages
chase9 Sep 3, 2023
77a01ee
Bump node-alarm-dot-com to 2.1.0
chase9 Oct 9, 2023
c7967a0
Version 1.10.0
chase9 Oct 9, 2023
2b618b2
Fix linting errors
chase9 Oct 9, 2023
6476a8b
Fix heat sensors state being inverted
chase9 Oct 15, 2023
3d7c957
Start Beta 1.10.1
chase9 Oct 15, 2023
83e8d44
Fix inverted glass break sensors
chase9 Oct 15, 2023
14066d0
Fix for night arming option
jdrahoz Oct 19, 2023
719cf81
Merge pull request #118 from jdrahoz/patch-1
chase9 Oct 19, 2023
b7736ea
Add error checking to getAccountSettings()
chase9 Oct 19, 2023
6e5373e
Update minimum Node versions.
chase9 Sep 21, 2024
81c54c0
Housekeeping
chase9 Sep 21, 2024
31133b4
Prep for v1.10.1
chase9 Sep 21, 2024
e9c3967
Switch glass breaks to use openClosedStatus
chase9 Nov 27, 2024
f1952dd
Support forceBypass under armingModes
DouweM Nov 29, 2024
d01f9fb
Restore extra whitespace in readme
DouweM Dec 8, 2024
a7773f0
Merge pull request #138 from DouweM/force-bypass
chase9 Dec 14, 2024
ca2d781
Declare Homebridge 2.0 compatibility
chase9 Dec 14, 2024
e4f0ede
Prep version 1.10.2
chase9 Dec 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
15 changes: 15 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"no-console": 1, // Means warning
"prettier/prettier": 2 // Means error
}
}
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Bug report
about: Create a report to help with improvements
title: ''
labels: bug
assignees: ''

---

<!-- You must use the issue template below when submitting a bug -->

**Describe the bug**
<!-- A clear and concise description of what the bug is. -->

**To Reproduce**
<!-- Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
-->

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

**Screenshots**
<!-- If applicable, add screenshots to help explain your problem. -->

**ADC-SystemStates.json**
<!-- Attach the `ADC-SystemStates.json` troubleshooting file. To create this file, set your Log Level to 4. The file can be found in the same folder as your Homebridge config.json file. The file path is also printed out in the logs every Device Poll Interval (default: 60 seconds). Make sure to comment out any existing sensitive information. -->

**Homebridge System (please complete the following information):**
* **Node.js Version**: <!-- node -v -->
* **NPM Version**: <!-- npm -v -->
* **Homebridge Version**: <!-- homebridge -V -->
* **Operating System**: Raspbian / Ubuntu / Debian / Windows / macOS / Docker
* **Process Supervisor**: Docker / Systemd / init.d / pm2 / launchctl / hb-service / other / none

**Additional context**
<!-- Add any other context about the problem here.

<!-- Click the "Preview" tab before you submit to ensure the formatting is correct. -->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
18 changes: 18 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
- enhancement
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: >
This issue has been automatically closed.
44 changes: 44 additions & 0 deletions .github/workflows/nodejs-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Node-CI Beta

on:
push:
branches: [beta]

jobs:
build:
strategy:
matrix:
node-version: [18.x, 20.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build # and test
run: |
npm ci
npm run build
# We don't yet have any tests setup
# npm test
env:
CI: true

publish-npm:
if: github.repository == 'node-alarm-dot-com/homebridge-node-alarm-dot-com'
needs: build # only run if build succeeds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16 # use the minimum required version
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: node .github/workflows/prerelease.js
- run: npm --no-git-tag-version version pre --preid=beta
- run: npm publish --tag=beta
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
46 changes: 46 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Node-CI

on:
push:
branches: [master]
pull_request:
release:
types: [released]

jobs:
build:
strategy:
matrix:
node-version: [18.x, 20.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build # and test
run: |
npm ci
npm run build
# We don't have tests (yet?)
# npm test
env:
CI: true

publish-npm:
# publish only if we are on our own repo
if: github.repository == 'node-alarm-dot-com/homebridge-node-alarm-dot-com' && github.event_name == 'release'
needs: build # only run if build succeeds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16 # use the minimum required version
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
35 changes: 35 additions & 0 deletions .github/workflows/prerelease.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/env node

const fs = require("fs");
const semver = require("semver");
const child_process = require("child_process");

const packageJSON = JSON.parse(fs.readFileSync("package.json", "utf8"));

function getTagVersionFromNpm(tag) {
try {
return child_process.execSync(`npm info ${packageJSON.name} version --tag="${tag}"`).toString("utf8").trim();
} catch (e) {
throw e;
}
}

// betaVersion is a custom property we put into the package.json to indicate which release we want to tag
const projectBetaVersion = packageJSON.betaVersion;
if (!projectBetaVersion) {
throw new Error("Unable to calculate the next prerelease version. 'betaVersion' was not set in the package.json")
}

const latestReleaseBeta = getTagVersionFromNpm("beta"); // like 0.7.0-beta.12
const betaAsRelease = semver.inc(latestReleaseBeta, "patch"); // will produce 0.7.0 (needed for the equality check below)

let publishTag;
if (semver.eq(projectBetaVersion, betaAsRelease)) { // check if we are releasing another version for the latest beta
publishTag = latestReleaseBeta; // set the current latest beta to be incremented
} else {
publishTag = projectBetaVersion; // start of with a new beta version
}

// save the package.json
packageJSON.version = publishTag;
fs.writeFileSync("package.json", JSON.stringify(packageJSON, null, 2));
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,15 @@ typings/
.env

# Visual Studio cache/options directory
.vs/
.vs/

# Jetbrains user settings
.idea/

# VSCode user settings
.code-workspace
*.code-workspace

dist/
P/
.DS_Store
5 changes: 5 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"esversion": 6,
"asi": true,
"-W014": true
}
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
tsconfig.json
src/
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": true,
"trailingComma": "none",
"singleQuote": true,
"printWidth": 120
}
5 changes: 5 additions & 0 deletions .run/Debug.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Attach Debugger" type="ChromiumRemoteDebugType" factoryName="Chromium Remote" port="4444" restartOnDisconnect="true">
<method v="2" />
</configuration>
</component>
29 changes: 29 additions & 0 deletions .run/watch.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Serve" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/../homebridge-node-alarm-dot-com/package.json" />
<command value="run" />
<scripts>
<script value="start-dev" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2">
<option name="NpmBeforeRunTask" enabled="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="link" />
<arguments value="node-alarm-dot-com" />
<node-interpreter value="project" />
<envs />
</option>
<option name="NpmBeforeRunTask" enabled="true">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="build" />
</scripts>
<node-interpreter value="project" />
<envs />
</option>
</method>
</configuration>
</component>
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch NPM Watch",
"runtimeExecutable": "npm",
"runtimeArgs": ["run-script", "watch"],
"enableContentValidation": true,
"killBehavior": "polite",
"smartStep": true
}
]
}
Binary file added Assets/homebridge_alarm_combined.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/homebridge_alarm_combined.pxd
Binary file not shown.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 John Hurliman
Copyright (c) 2018 Mike Kormendy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading