diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 12c9a67..2c1ceb6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,28 +8,21 @@ jobs: strategy: matrix: - # the Node.js versions to build on node-version: [20.16.x, 22.5.x] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - name: Install dependencies run: npm install - env: - CI: true - name: Lint the project run: npm run lint - env: - CI: true - name: Build the project run: npm run build - env: - CI: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 83dbb6b..4f125bd 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,11 +8,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Setup .npmrc file to publish to npm - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v3 with: - node-version: "16.x" + node-version: "20.16.x" registry-url: "https://registry.npmjs.org" - run: npm ci - run: npm publish diff --git a/package.json b/package.json index abdf3da..2286742 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "main": "dist/index.js", "license": "ISC", "scripts": { + "lint": "eslint src/**/*.ts --max-warnings=0", "watch": "npm run build && npm link && nodemon", "build": "rimraf ./dist && tsc", "prepublishOnly": "npm run lint && npm run build" diff --git a/src/tapoCamera.test.ts b/src/tapoCamera.test.ts index 119938e..2c07cf0 100644 --- a/src/tapoCamera.test.ts +++ b/src/tapoCamera.test.ts @@ -20,7 +20,7 @@ async function main() { const status = await tapoCamera.getStatus(); console.log("status :>> ", status); - const streamUrl = await tapoCamera.getAuthenticatedStreamUrl(); + const streamUrl = tapoCamera.getAuthenticatedStreamUrl(); console.log("streamUrl :>> ", streamUrl); await tapoCamera.setStatus("eyes", false);