Skip to content

Commit

Permalink
feat: update to 9.6.2
Browse files Browse the repository at this point in the history
Signed-off-by: wilmardo <[email protected]>
  • Loading branch information
wilmardo committed Dec 22, 2023
1 parent 5f47627 commit d36587f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 27 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ FROM lansible/nexe:4.0.0-rc.2 as builder
# https://github.com/docker/buildx#building-multi-platform-images
ARG TARGETPLATFORM
# https://github.com/zwave-js/zwave-js-ui/releases
ENV VERSION=v9.3.1
ENV VERSION=v9.6.2

# Add unprivileged user
RUN echo "zwave-js-ui:x:1000:1000:zwave-js-ui:/:" > /etc_passwd
# Add to dailout as secondary group (20)
RUN echo "dailout:x:20:zwave-js-ui" > /etc_group

# eudev: needed for udevadm binary
# jq: used in yarn command of zwavejs
RUN apk --no-cache add \
eudev
eudev \
jq

# Setup zwave-js-ui
RUN git clone --depth 1 --single-branch --branch ${VERSION} https://github.com/zwave-js/zwave-js-ui.git /zwave-js-ui
Expand Down Expand Up @@ -45,9 +47,6 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \

WORKDIR /zwave-js-ui/server

# See: https://github.com/nexe/nexe/issues/441#issuecomment-359654690
RUN sed -i "2s/^/require('ejs');\n/" bin/www.js

# Package the binary
RUN nexe --build \
--resource hass/ \
Expand Down
39 changes: 17 additions & 22 deletions stateless.patch
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
diff --git a/config/app.ts b/config/app.ts
index ffa2c22..7da939c 100644
--- a/config/app.ts
+++ b/config/app.ts
@@ -9,11 +9,15 @@ export const storeDir: string = process.env.STORE_DIR || joinPath(true, 'store')
export const logsDir: string = joinPath(storeDir, 'logs')
export const snippetsDir: string = joinPath(storeDir, 'snippets')

-export const tmpDir: string = joinPath(storeDir, '.tmp')
+export const tmpDir: string = process.env.TMPDIR || joinPath(storeDir, '.tmp')
export const backupsDir: string = process.env.BACKUPS_DIR || joinPath(storeDir, 'backups')
diff --git a/api/config/app.ts b/api/config/app.ts
index 30727220..a40c8882 100644
--- a/api/config/app.ts
+++ b/api/config/app.ts
@@ -16,6 +16,11 @@ export const backupsDir: string =
export const nvmBackupsDir: string = joinPath(backupsDir, 'nvm')
export const storeBackupsDir: string = joinPath(backupsDir, 'store')

+export const settingsFile: string = process.env.SETTINGS_FILE || joinPath(storeDir, 'settings.json')
+export const scenesFile: string = process.env.SCENES_FILE || joinPath(storeDir, 'scenes.json')
+export const nodesFile: string = process.env.NODES_FILE || joinPath(storeDir, 'nodes.json')
+export const usersFile: string = process.env.USERS_FILE || joinPath(storeDir, 'users.json')

export const defaultUser: string = 'admin'
export const defaultPsw: string = 'zwave'
diff --git a/config/store.ts b/config/store.ts
index eb6ae24..b90cee4 100644
--- a/config/store.ts
+++ b/config/store.ts
+
export const defaultUser: string = 'admin'
export const defaultPsw: string = 'zwave'
// lgtm [js/hardcoded-credentials]
diff --git a/api/config/store.ts b/api/config/store.ts
index eb6ae249..b90cee4d 100644
--- a/api/config/store.ts
+++ b/api/config/store.ts
@@ -1,5 +1,6 @@
// config/store.js

Expand Down Expand Up @@ -52,10 +47,10 @@ index eb6ae24..b90cee4 100644
}

export default store
diff --git a/lib/jsonStore.ts b/lib/jsonStore.ts
index 7e16d00..ce45cdc 100644
--- a/lib/jsonStore.ts
+++ b/lib/jsonStore.ts
diff --git a/api/lib/jsonStore.ts b/api/lib/jsonStore.ts
index 92100a55..266ffefd 100644
--- a/api/lib/jsonStore.ts
+++ b/api/lib/jsonStore.ts
@@ -94,7 +94,7 @@ export class StorageHelper {
let err: { code: string } | undefined
let data: any
Expand Down

0 comments on commit d36587f

Please sign in to comment.