Skip to content

Commit

Permalink
v2.0.5 (#44)
Browse files Browse the repository at this point in the history
This minor patch updates the node version and libraries to latest to resolve any security fixes. Various code smells have also been fixed. The owning company has also changed.

  - Bump Revision
  - Change base docker image from node:12-alpine to node:20-alpine
  - Change classes with single constructor to a function for maintainability
  - Change multiple inline if statements to one per line for readabilty
  - Change `var` to `const` or `let` where applicable
  - Refactor setInterval to reduce cognitive complexity
  - Update docker metadata
  - Update mqtt from 4.3.8 to 5.10.1
  - Update winston from 3.13.0 to 3.15.0
  - Update standard from 14.3.4 to 17.1.2
  - Update sonarqube-scanner 2.9.1 to 4.2.3
  - Update README

Co-authored-by: Tom Hollingworth <[email protected]>
  • Loading branch information
tomhollingworth and Tom Hollingworth authored Oct 10, 2024
1 parent 5e66ab1 commit 414388e
Show file tree
Hide file tree
Showing 20 changed files with 3,311 additions and 2,293 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: spruiktec/packml-simulator
name: libremfg/packml-simulator
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM node:12-alpine
FROM node:20-alpine

# Labels
LABEL maintainer="tom.hollingworth@spruiktec.com"
LABEL org.opencontainers.image.authors="tom.hollingworth@spruiktec.com"
LABEL org.opencontainers.image.source="https://github.com/Spruik/PackML-MQTT-Simulator"
LABEL org.opencontainers.image.url="https://spruiktec.com/"
LABEL org.opencontainers.image.vendor="Spruik Technologies LLC"
LABEL org.opencontainers.image.version="2.0.4"
LABEL maintainer="tom@rhize.com"
LABEL org.opencontainers.image.authors="tom@rhize.com"
LABEL org.opencontainers.image.source="https://github.com/libremfg/PackML-MQTT-Simulator"
LABEL org.opencontainers.image.url="https://www.libremfg.com/"
LABEL org.opencontainers.image.vendor="Libre Technologies Inc"
LABEL org.opencontainers.image.version="2.0.5"

WORKDIR /machine

Expand Down
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) 2020 Spruik Technologies
Copyright (c) 2024 Libre Technologies Inc

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
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Tom Hollingworth <tom.hollingworth@spruiktec.com>
Tom Hollingworth <tom@rhize.com>
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Start your container with environmental variables.
#### Basic MQTT Structure

```shell
$ docker run -it -e SITE=Site -e AREA=Area -e LINE=Line -e MQTT_URL=mqtt://broker.hivemq.com -m 30m spruiktec/packml-simulator
$ docker run -it -e SITE=Site -e AREA=Area -e LINE=Line -e MQTT_URL=mqtt://broker.hivemq.com -m 30m libremfg/packml-simulator
2020-06-22T03:13:49.301Z | info: Initializing
2020-06-22T03:13:49.817Z | info: Connected to mqtt://broker.hivemq.com:1883
2020-06-22T03:13:49.819Z | info: Site/Area/Line/Status/UnitModeCurrent : Production
Expand All @@ -33,7 +33,7 @@ Once up and running, use an MQTT client to publish to .../Command/Reset and .../
#### SparkPlugB

```shell
$ docker run -it -e CLIENT_TYPE=sparkplugb -e SITE=Site -e AREA=Area -e LINE=Line -e MQTT_URL=mqtt://broker.hivemq.com -m 30m spruiktec/packml-simulator
$ docker run -it -e CLIENT_TYPE=sparkplugb -e SITE=Site -e AREA=Area -e LINE=Line -e MQTT_URL=mqtt://broker.hivemq.com -m 30m libremfg/packml-simulator
2020-06-22T03:13:49.301Z | info: Initializing
2020-06-22T03:13:49.817Z | info: Connected to mqtt://broker.hivemq.com:1883
2020-06-22T03:13:49.819Z | info: Site/Area/Line/Status/UnitModeCurrent : Production
Expand Down Expand Up @@ -263,23 +263,23 @@ version: "2.4"

services:
greenville-packaging-line1:
image: spruiktec/packml-simulator
image: libremfg/packml-simulator
environment:
SITE: Greenville
AREA: Packaging
LINE: 'Line 1'
mem_limit: 30MB

greenville-packaging-line2:
image: spruiktec/packml-simulator
image: libremfg/packml-simulator
environment:
SITE: Greenville
AREA: Packaging
LINE: 'Line 2'
mem_limit: 30MB

greenville-cnc-line1:
image: spruiktec/packml-simulator
image: libremfg/packml-simulator
environment:
SITE: Greenville
AREA: CNC
Expand All @@ -293,12 +293,26 @@ services:

For any issue, there are fundamentally three ways an individual can contribute:

- By opening the issue for discussion: For instance, if you believe that you have uncovered a bug in, creating a new issue in the [GitHub issue tracker](https://github.com/Spruik/PackML-MQTT-Simulator/issues) is the way to report it.
- By opening the issue for discussion: For instance, if you believe that you have uncovered a bug in, creating a new issue in the [GitHub issue tracker](https://github.com/libremfg/PackML-MQTT-Simulator/issues) is the way to report it.
- By helping to triage the issue: This can be done either by providing supporting details (a test case that demonstrates a bug), or providing suggestions on how to address the issue.
- By helping to resolve the issue: Typically, this is done either in the form of demonstrating that the issue reported is not a problem after all, or more often, by opening a Pull Request that changes some bit of something in the simulator in a concrete and reviewable manner.

## Changelog

- 2.0.5
- Bump Revision
- Change base docker image from node:12-alpine to node:20-alpine
- Change classes with single constructor to a function for maintainability
- Change multiple inline if statements to one per line for readabilty
- Change `var` to `const` or `let` where applicable
- Refactor setInterval to reduce cognitive complexity
- Update docker metadata
- Update mqtt from 4.3.8 to 5.10.1
- Update winston from 3.13.0 to 3.15.0
- Update standard from 14.3.4 to 17.1.2
- Update sonarqube-scanner 2.9.1 to 4.2.3
- Update README

- 2.0.4
- Update README
- Update mqtt from 4.2.8 to 4.3.8
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ These versions are currently being supported with security updates.

## Reporting a Vulnerability

Minor vulnerabilities can be reported as [issues](https://github.com/Spruik/PackML-MQTT-Simulator/issues). For major or servere vulnerabilities either contact [tomhollingworth](mailto:tom.hollingworth@spuiktec.com) directly, or raise an [issue](https://github.com/Spruik/PackML-MQTT-Simulator/issues). Turn around time for accepted security fixes are up to 2 weeks, with most completed within 3 days of reporting.
Minor vulnerabilities can be reported as [issues](https://github.com/libremfg/PackML-MQTT-Simulator/issues). For major or servere vulnerabilities either contact [tomhollingworth](mailto:tom@rhize.com) directly, or raise an [issue](https://github.com/libremfg/PackML-MQTT-Simulator/issues). Turn around time for accepted security fixes are up to 2 weeks, with most completed within 3 days of reporting.
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name: packml-sim
description: PackML Machine Simulator
type: application
version: 0.0.2
appVersion: 2.0.4
appVersion: 2.0.5
2 changes: 1 addition & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
replicaCount: 3
image:
repository: spruiktec/packml-simulator
repository: libremfg/packml-simulator
pullPolicy: IfNotPresent

config:
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2.4"

services:
bathurst-packaging-line1:
image: spruiktec/packml-simulator
image: libremfg/packml-simulator
environment:
SITE: Bathurst
AREA: Packaging
Expand All @@ -13,7 +13,7 @@ services:
mem_limit: 30MB

bathurst-packaging-line2:
image: spruiktec/packml-simulator
image: libremfg/packml-simulator
environment:
SITE: Bathurst
AREA: Packaging
Expand All @@ -24,7 +24,7 @@ services:
mem_limit: 30MB

greenville-cnc-line1:
image: spruiktec/packml-simulator
image: libremfg/packml-simulator
environment:
SITE: Greenville
AREA: CNC
Expand Down
Loading

0 comments on commit 414388e

Please sign in to comment.