34 Commits
Author SHA1 Message Date
Ben West 273182971b ignore attached_assets 2026-01-19 13:53:03 -08:00
bewestandBen West 4feeb015fe Update documentation and tooling for identifying and running flaky tests
Updates flaky test documentation with observed flakiness rates and corrects npm script syntax for isolating tests. Introduces a generic isolate runner and clarifies harness behavior regarding database state, removing the claim of automatic resets and noting reliance on Mocha hooks for cleanup.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 3be0ef95-aa69-441e-a33e-a8bd64e908de
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: b7dbc77f-8b96-4ac3-8453-8976ddb7ee24
Replit-Helium-Checkpoint-Created: true
2026-01-19 13:14:46 -08:00
Ben West a2c1bb1533 .replit should be ignored 2026-01-19 13:09:42 -08:00
Lennart GoedhartandGitHub 562364ae09 Add docker-compose support (#6903)
* Create docker-compose.yml file for easy deployment

* Restore invalid password, to force change
2021-03-11 18:38:52 +11:00
Sulka HaroandGitHub d7e011d8f5 Refactoring organisation, bundling and security improvements (#6765)
* * Simplified bundling to just one bundle
* Removed cache invalidation token from bundling
* Generate strong persistent random string on deploy to use for JWT signing
* WIP: moving api-secret and JWT signing to a separate centralized security component
* Moved some server components away from project root
* Fix issues reported by linter

* Ignore detect-object-injection everywhere but the client

* Make admin message button red

* Remove alarms for some security alerts on code

* api_secret is now fully contained in the enclave
2021-02-02 19:53:30 +02:00
Sulka HaroandGitHub 914ba78f36 Security improvement batch (#6622)
* Adds a new method for the server to push notifies to the client, which require administration privileges from the user. If there are messages in queue but user is not privileged, she is notified of pending messages

* Fix unit tests

* Increase timeouts on tests

* Add translations

* * Aggregate admin messages
* Send admin message on auth fail
* Sending messages over bus
* XSS filtering of objects sent over the REST API

* Warn users if their instance is world readable

* Fix adminnotifies init()

* Fix couple issues from Codacy
2021-01-07 22:46:55 +02:00
Sulka HaroandGitHub 5bc6799e48 GitHub actions build (#5168)
* Run tests using GitHub Actions

* Node 10

* Test CI fails

* Use npm to run tests

* Fix package json to run tests

* Enable v3 TEST api for both development env and CI

* Run CI on both Node 10 and 12

* Allow downgrading Mongo
2019-11-10 21:57:49 +00:00
Petr OndrusekandSulka Haro 2dd576a629 API V3 (#4250)
* extended .gitignore for Visual Studio 2017

* creating a lib for api3 and exposing it's swagger file

* adding pilot test (for /swagger.yaml)

* implementing public GET /version

* setting api version to 3.0.0-alpha

* creating authorization skeleton + fetching some API env variables

* reusing authorization library

* implementing security

* forcing HTTPS and removing x-powered-by from response

* moving messages to constants, creating https instance fixture

* testing HTTPS requiring

* testing Date header

* testing permission check

* testing allowed operation

* refactoring + storage stub

* create architecture for generic operations

* beginning of READ operation

* tidying the code up

* basic READ part

* going further with READ operation

* DELETE operation

* handling fields parameter

* refactoring to classes

* going further with SEARCH operation

* refactoring file structure

* filtering for SEARCH operation

* preparations for fallback deduplication

* CREATE operation

* UPDATE operation

* PATCH operation

* HISTORY operation

* creating more precise variant of HISTORY operation

* autopruning

* long for timestamps in swagger

* bug fix (when search fields=srvCreated)

* creating skeleton for generic collection API test

* specific HISTORY skeleton

* distinguish between collection logical and storage name

* renaming operation to LAST MODIFIED and getting it to work

* fallback for LAST MODIFIED operation

* tidying a bit

* LAST MODIFIED documentation

* bugfix + emitting data-received

* adding some validations

* bugfix - remove 'token' parameter from filtering

* testing and debugging generic workflow

* test fix for empty db

* fixing security test fixture

* trying to fix Travis CI testing DB problem

* multiple auth callback bugfix + adding user field on authed create/update

* messages for Travis CI debugging

* messages for Travis CI debugging

* messages for Travis CI debugging

* test fix (to be prepared for future dates in db)

* test fix

* adding fallback created_at filling on each create/update

* STATUS operation with API permissions

* querying srvDate from storage + include storage version info

* bugfix of missing apiConst require

* getting mongo version with read-only user rights

* getting mongo current date with read-only user rights

* trying to diagnose travis CI timeout

* refactoring storage version caching (due to some environments problems)

* making VERSION work on empty database

* more fixes

* skipping API HTTPS test for node 8

* making code more readable using ES6 (Promises, async + await)

* extending treatments collection docs by inspecting the careportal code

* tidying existing API3 tests up to allow further grow

* tidying the authorization code up to increase readability and performance a bit

* more refactoring to ES6 and making APIv3 files structure more extendable

* normalizing incoming dates to UTC and storing utcOffset

* fixing srvDate to be of node.js server, not the mongo DB

* preparing test fixtures for permissions testing + skeleton for CREATE operation test

* intensive CREATE operation testing + minor bug fixes

* correcting the deduplication test

* more deduplication testing of CREATE operation

* adding test skeletons for other generic operations

* added variability in filtering by date, created_at, srvModified, srvCreated fields

* fixing test accordingly to previous commit

* adding new collection settings for centralized apps' settings storage

* trying to solve travis CI testing problem - adding default collections names

* another attempt to travis CI test fix

* adding some tests for READ operation

* adding custom error handler (overriding bodyparser's errors)

* securing settings collection more and updating swagger accordingly

* making HISTORY timestamp parameter more flexible + updating swagger documentation

* more testing and bug fixing

* sending only HTTP status with empty body, when there is no message + minor bug fixing

* more refactoring and testing (especially of UPDATE operation)

* PATCH testing + adding userModified field for troubleshooting purposes

* basic SEARCH operation testing

* more SEARCH operation testing

* adding alternative 'now' query parameter to 'Date' header to make GET easier

* adding 'now' to reserved query parameters for SEARCH operation

* more testing

* renaming field user to subject (and modifiedBy)

* bugfix - fixing RFC 2822 constant for moment parsing

* storageSocket: creating skeleton for new Socket.IO namespace

* storageSocket: authentication by accessToken

* storageSocket: authorizing to subscribe rooms

* storageSocket: emitting create, update and delete events

* APIv3: adding support for swagger UI at /api/v3/swagger-ui-dist

* solving some problems detected by eslint

* solving some problems detected by eslint

* APIv3: testing and debugging Socket.IO

* APIv3: testing and debugging Socket.IO

* APIv3: Socket.IO documentation

* APIv3: making the sample real

* APIv3: starting to create a simple tutorial MD file

* APIv3: small corrections

* APIv3: minor corrections after dev merge

* APIv3: adding CREATE and READ operations to the tutorial.md

* APIv3: adding SEARCH, LAST MODIFIED, UPDATE operations to the tutorial.md

* APIv3: finishing the tutorial.md

* APIv3: minor bugfix (bad location after upsert)

* APIv3: refactoring SEARCH complexity

* APIv3: refactoring mongoCollection complexity

* APIv3: refactoring complexity

* APIv3: tidying up a bit

* APIv3: refactoring security (start)

* APIv3: refactoring lastModified

* APIv3: refactoring create (start)

* APIv3: refactoring create (finish)

* APIv3: refactoring delete

* APIv3: refactoring history

* APIv3: refactoring update

* APIv3: refactoring patch

* APIv3: refactoring read

* APIv3: refactoring search + removing deprecated authorizationBuilder

* APIv3: adding best practise for identifier constructing

* APIv3: refactoring and enhancing the validation (immutable fields)

* APIv3: adding security.md documentation file

* APIv3: refactoring - splitting index.js into multiple files

* APIv3: calculating identifier on server side + deduplicating

* APIv3: refactoring cosmetics

* APIv3: updating the documentation

* APIv3: making basic and security tests more readable using async/await

* APIv3: making the rest of tests more readable using async/await

* APIv3: adapting test of previous API

* APIv3: adapting test of previous API
2019-10-09 22:53:55 +03:00
Lukas HerzogandGitHub 29d437a1ea Update .gitignore 2018-07-20 17:01:32 +02:00
Lukas fe329a78fa Update GER Teil 2 2018-07-20 16:48:41 +02:00
PieterGit 4a0c508688 Revert "add package-lock.json to .gitignore to avoid merge conflicts"
This reverts commit ec25130845.
We now use  npm-shrinkwrap.json
2017-10-27 16:34:27 +02:00
PieterGit 55c0a38f2b Update to node 8.8.1. Merge branch 'dev' of https://github.com/nightscout/cgm-remote-monitor into 201710_pieterg_zt 2017-10-27 15:47:39 +02:00
Christopher Fredregill 68af094c77 Adding some test coverage for /lib/client/renderer.js 2017-10-15 15:48:39 -07:00
Scott ec25130845 add package-lock.json to .gitignore to avoid merge conflicts 2017-10-15 14:03:29 -07:00
Sulka Haro 76988d6281 Bower is gone 2017-08-16 17:55:04 +03:00
Jason Calabrese e7734ad3bf add initial heap dump endpoint if enabled 2017-03-28 16:57:33 -07:00
Jason Calabrese 508d58240b Merge branch 'dev' into wip/enable-iob 2015-03-06 00:25:09 -08:00
Douglas Eichelberger bccc5e1598 ignore npm-debug.log 2015-03-01 12:20:47 -08:00
Jason Calabrese 7f550b8cf5 start getting browserify-express hooked up to expose a shared IOB module 2015-03-01 10:56:40 -08:00
Douglas Eichelberger 034bcefc0f add coverage report to travis script
resolves #268
2015-01-22 19:23:34 -08:00
Scott Hanselman 2acba2aa33 Forcing SSL for Azure
Forcing SSL for Azure
Node Debugging Support for Azure
Correct Git Attributes
Node web.config for Azure, and removed it from gitignore
2014-10-31 11:46:31 -07:00
Jason Calabrese 0404905e53 Revert "Revert to c1b2988eb0 (Merge branch 'hotfix/0.3.5')"
This reverts commit 1cc9c6127c.
2014-08-31 00:04:11 -07:00
Jason Calabrese 1cc9c6127c Revert to c1b2988eb0 (Merge branch 'hotfix/0.3.5') 2014-08-24 22:22:55 -07:00
Jason Calabrese 7c69da4d7a merged develop into care-portal and fixed conflict in .gitignore 2014-08-16 13:07:03 -07:00
Jason Calabrese ba4f3416f6 ignore .DS_Store files 2014-08-16 09:59:18 -07:00
John Costik 95d45bd624 Updates for a treatment specific drawer 2014-08-09 21:41:16 -04:00
John Costik 8563bb8df6 Learning, testing Nightscout code tweaks in prep for treatment data form 2014-08-09 21:23:10 -04:00
Ollie Glass c484650ef0 Merge branch 'master' of https://github.com/nightscout/cgm-remote-monitor into vagrant
* 'master' of https://github.com/nightscout/cgm-remote-monitor: (52 commits)
  travis.yml: removed unused gitter.im hook
  Removing audio.load() per bewest's request
  get sign in bg delta correct
  actually show bgdelta
  Removing unnecessary packages
  Removing unused library
  README: Build & Dependancies
  manually bust cache
  client.js change test successful
  test 2
  alert test1
  fix now-line placement
  HTML App Cache: removed .css and .js files.
  removed test alert
  alert test2
  test alert1
  tweak whitespace
  Added alarm silence for 120 minutes
  Ensure that audio loops once it starts
  re-work audio handling
  ...

Conflicts:
	.gitignore
2014-07-05 22:06:33 +01:00
Ollie Glass 3cb7f99128 add .vagrant to .gitignore 2014-07-01 12:58:06 +01:00
Ben West 59b7bca95b put everything in a static directory
Tested by deleting everything, running npm install from scratch.
This helps ensure that only the files in the static subdirectory can be served.
Should eliminate serving config files via http.
2014-06-25 14:15:36 -07:00
Brian Hanifin 8cb346a8ee gzip compression is working 2014-06-20 16:53:59 -07:00
Brian Hanifin 5fc3a02537 test 2014-06-20 15:10:00 -07:00
Brian Hanifin d3c0f4a6ae Exploring caching and gzip techniques 2014-06-20 13:53:41 -07:00
Jason Calabrese 6d53b3ef69 pulled js and css out of index.html; created main.css by combining css from index.html with buttons.css and fonts.css for a single round trip; use bower to manage client side dependencies 2014-03-21 23:19:28 -07:00