Skip to content

Commit c9b4134

Browse files
authored
Changed support NodeJS and Fixed some code (#139)
1 parent 80ab249 commit c9b4134

5 files changed

Lines changed: 20 additions & 32 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,18 @@ jobs:
5959
fail-fast: false
6060

6161
matrix:
62-
node-version: [20, 22, 24]
62+
node-version: [22, 24]
6363

6464
steps:
6565
#
6666
# Checks-out your repository under $GITHUB_WORKSPACE, so your
6767
# job can access it
6868
#
6969
- name: Checkout sources
70-
uses: actions/checkout@v4
70+
uses: actions/checkout@v6
7171

7272
- name: Use Node.js ${{ matrix.node-version }}
73-
uses: actions/setup-node@v4
73+
uses: actions/setup-node@v6
7474
with:
7575
node-version: ${{ matrix.node-version }}
7676

@@ -145,18 +145,18 @@ jobs:
145145
# <default tag flag>: If you want to use the created Docker image as the default image, specify "default".
146146
#
147147
imageinfo:
148-
- alpine:3.22,alpine:3.22,alpine,default
149-
- ubuntu:24.04,ubuntu:24.04,ubuntu
148+
- alpine:3.23,alpine:3.23,alpine,default
149+
- ubuntu:26.04,ubuntu:26.04,ubuntu
150150

151151
#
152152
# Run building and pushing helper
153153
#
154154
steps:
155155
- name: Checkout sources
156-
uses: actions/checkout@v4
156+
uses: actions/checkout@v6
157157

158158
- name: Set up Docker Buildx
159-
uses: docker/setup-buildx-action@v3
159+
uses: docker/setup-buildx-action@v4
160160

161161
#
162162
# Login to avoid the Docker Hub rate limit
@@ -170,7 +170,7 @@ jobs:
170170
#
171171
- name: Login to DockerHub
172172
if: ${{ github.event_name != 'pull_request' }}
173-
uses: docker/login-action@v3
173+
uses: docker/login-action@v4
174174
with:
175175
username: ${{ secrets.DOCKER_HUB_USERNAME }}
176176
password: ${{ secrets.DOCKER_HUB_ACCESSTOKEN }}

.github/workflows/imagetypevars.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ elif [ "${CI_DOCKER_IMAGE_OSTYPE}" = "ubuntu" ]; then
9393
PKG_INSTALL_CURL="curl"
9494
PKG_INSTALL_BASE="g++ make nodejs k2hdkc-dev dnsutils procps"
9595

96-
NODE_MAJOR=18
96+
NODE_MAJOR=24
9797
PKG_REPO_SETUP_NODEJS="
9898
${PKGMGR_NAME} install -y ca-certificates gnupg
9999
mkdir -p /etc/apt/keyrings

.github/workflows/nodejstypevars.sh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,6 @@ if [ -z "${CI_NODEJS_MAJOR_VERSION}" ]; then
7979
#
8080
:
8181

82-
elif [ "${CI_NODEJS_MAJOR_VERSION}" = "20" ]; then
83-
INSTALLER_BIN="apt-get"
84-
UPDATE_CMD="update"
85-
UPDATE_CMD_ARG=""
86-
INSTALL_CMD="install"
87-
INSTALL_CMD_ARG=""
88-
INSTALL_AUTO_ARG="-y"
89-
INSTALL_QUIET_ARG="-qq"
90-
INSTALL_PKG_LIST="git gcc g++ make k2hdkc-dev"
91-
92-
IS_NPM_PUBLISHER=0
93-
9482
elif [ "${CI_NODEJS_MAJOR_VERSION}" = "22" ]; then
9583
INSTALLER_BIN="apt-get"
9684
UPDATE_CMD="update"

config/k2hr3-init.sh.templ

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,9 +741,9 @@ if [ "${SCRIPTMODE}" = "r" ]; then
741741
RESOLVE_DOMAIN=$(grep -i '^domain' /etc/resolv.conf | awk '{print $NF}')
742742
fi
743743

744-
if [ -n "${RESOLVE_DOMAIN}" ]; then
744+
if [ -n "${RESOLVE_DOMAIN}" ] && [ -n "${LOCAL_HOSTNAME}" ]; then
745745
LOCAL_FULL_HOSTNAME="${LOCAL_HOSTNAME}.${RESOLVE_DOMAIN}"
746-
elif [ -n "${LOCAL_DOMAIN}" ]; then
746+
elif [ -n "${LOCAL_DOMAIN}" ] && [ -n "${LOCAL_HOSTNAME}" ]; then
747747
LOCAL_FULL_HOSTNAME="${LOCAL_HOSTNAME}.${LOCAL_DOMAIN}"
748748
else
749749
LOCAL_FULL_HOSTNAME=$(hostname -f)

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"dateformat": "^5.0.3",
1212
"debug": "~4.4.3",
1313
"express": "^5.2.1",
14-
"jose": "^6.2.1",
15-
"k2hdkc": "^2.0.3",
14+
"jose": "^6.2.2",
15+
"k2hdkc": "^2.0.4",
1616
"morgan": "~1.10.1",
1717
"rotating-file-stream": "^3.2.9"
1818
},
@@ -39,20 +39,20 @@
3939
"@eslint/js": "^10.0.1",
4040
"@types/body-parser": "^1.19.6",
4141
"@types/chai": "^5.2.3",
42-
"@types/config": "^3.3.5",
42+
"@types/config": "^4.4.0",
4343
"@types/cookie-parser": "^1.4.10",
4444
"@types/dateformat": "^5.0.3",
45-
"@types/debug": "^4.1.12",
45+
"@types/debug": "^4.1.13",
4646
"@types/express": "^5.0.6",
4747
"@types/mocha": "^10.0.10",
4848
"@types/morgan": "^1.9.10",
49-
"@types/node": "^25.4.0",
50-
"@typescript-eslint/eslint-plugin": "^8.57.0",
51-
"@typescript-eslint/parser": "^8.57.0",
49+
"@types/node": "^25.6.0",
50+
"@typescript-eslint/eslint-plugin": "^8.59.0",
51+
"@typescript-eslint/parser": "^8.59.0",
5252
"chai": "^6.2.2",
5353
"chai-http": "^5.1.2",
54-
"eslint": "^10.0.3",
55-
"globals": "^17.4.0",
54+
"eslint": "^10.2.1",
55+
"globals": "^17.5.0",
5656
"mocha": "^11.7.5",
5757
"nyc": "^18.0.0",
5858
"typescript": "^5.9.3"

0 commit comments

Comments
 (0)