diff --git a/CHANGELOG.md b/CHANGELOG.md index 05864cc..321b6b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ # CHANGES -## Unreleased +### Unreleased +### 3.0.0-alpha.3 + +- [3.0.0-alpha.3]: https://github.com/NicTool/api/releases/tag/3.0.0-alpha.3 diff --git a/conf.d/http.yml b/conf.d/http.yml index c16f85f..acd4d46 100644 --- a/conf.d/http.yml +++ b/conf.d/http.yml @@ -1,4 +1,3 @@ - default: host: localhost port: 3000 @@ -6,7 +5,7 @@ default: # https://hapi.dev/module/cookie/api/?v=12.0.1 name: sid-nictool password: af1b926a5e21f535c4f5b6c42941c4cf - ttl: 3600000 # 1 hour + ttl: 3600000 # 1 hour # domain: path: / clearInvalid: true diff --git a/conf.d/mysql.yml b/conf.d/mysql.yml index ba5e7ac..ff73d87 100644 --- a/conf.d/mysql.yml +++ b/conf.d/mysql.yml @@ -13,7 +13,7 @@ default: # settings below this line override default settings production: host: mysql - password: "********" + password: '********' # used for CI testing (GitHub Actions workflows) test: diff --git a/lib/permission.test.js b/lib/permission.test.js index 9cdc163..d30bffd 100644 --- a/lib/permission.test.js +++ b/lib/permission.test.js @@ -1,12 +1,16 @@ import assert from 'node:assert/strict' import { describe, it, after, before } from 'node:test' -import Permission from './permission.js' +import Group from './group.js' import User from './user.js' -import permTestCase from './test/permission.json' with { type: 'json' } +import Permission from './permission.js' + +import groupTestCase from './test/group.json' with { type: 'json' } import userTestCase from './test/user.json' with { type: 'json' } +import permTestCase from './test/permission.json' with { type: 'json' } before(async () => { + await Group.create(groupTestCase) await User.create(userTestCase) }) diff --git a/package.json b/package.json index 624105f..69c6f95 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "format": "npm run lint:fix && npm run prettier:fix", "lint": "npx eslint *.js **/*.js", "lint:fix": "npm run lint -- --fix", - "prettier": "npx prettier *.js lib routes test html --check", - "prettier:fix": "npm run prettier -- --write", + "prettier": "npx prettier *.js conf.d lib routes html --check", + "prettier:fix": "npx prettier *.js conf.d lib routes html --write", "start": "NODE_ENV=production node ./server", "develop": "NODE_ENV=development node ./server", "test": "./test.sh",