@adonisjs/auth 8.0.11 → 8.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -113,8 +113,8 @@ class TokenDatabaseProvider {
113
113
  created_at: luxon_1.DateTime.local().toFormat(client.dialect.dateTimeFormat),
114
114
  ...token.meta,
115
115
  };
116
- const [persistedToken] = await client.table(this.config.table).insert(payload).returning('id');
117
- return String(persistedToken);
116
+ const [row] = await client.table(this.config.table).insert(payload).returning('id');
117
+ return String(typeof row === 'number' ? row : row.id);
118
118
  }
119
119
  /**
120
120
  * Removes a given token
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonisjs/auth",
3
- "version": "8.0.11",
3
+ "version": "8.0.12",
4
4
  "description": "Offical authentication provider for Adonis framework",
5
5
  "types": "build/adonis-typings/index.d.ts",
6
6
  "main": "build/providers/AuthProvider.js",
@@ -16,8 +16,8 @@
16
16
  "scripts": {
17
17
  "mrm": "mrm --preset=@adonisjs/mrm-preset",
18
18
  "pretest": "npm run lint",
19
- "test": "node japaFile.js",
20
- "clean": "del build",
19
+ "test": "node -r @adonisjs/require-ts/build/register ./bin/test.ts",
20
+ "clean": "del-cli build",
21
21
  "copyfiles": "copyfiles \"templates/**/*.txt\" build",
22
22
  "compile": "npm run lint && npm run clean && tsc",
23
23
  "build": "npm run compile && npm run copyfiles",
@@ -55,6 +55,10 @@
55
55
  "@adonisjs/require-ts": "^2.0.10",
56
56
  "@adonisjs/session": "^6.1.4",
57
57
  "@adonisjs/sink": "^5.2.2",
58
+ "@japa/assert": "^1.2.3",
59
+ "@japa/run-failed-tests": "^1.0.3",
60
+ "@japa/runner": "^1.2.0",
61
+ "@japa/spec-reporter": "^1.1.7",
58
62
  "@poppinss/dev-utils": "^2.0.2",
59
63
  "@types/node": "^17.0.21",
60
64
  "@types/supertest": "^2.0.11",
@@ -67,7 +71,6 @@
67
71
  "eslint-plugin-prettier": "^4.0.0",
68
72
  "github-label-sync": "^2.0.2",
69
73
  "husky": "^7.0.4",
70
- "japa": "^4.0.0",
71
74
  "mrm": "^3.0.10",
72
75
  "np": "^7.6.0",
73
76
  "phc-bcrypt": "^1.0.7",