diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 0000000..3186f3f --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/lib/dao/create.ts b/lib/dao/create.ts index f27b26c..e58d4f0 100644 --- a/lib/dao/create.ts +++ b/lib/dao/create.ts @@ -1,4 +1,4 @@ -import { DatabaseError } from '@mifi/services-common/domain/errors/DatabaseError'; +import { DatabaseError } from '@mifi/services-common/lib/domain/errors/DatabaseError'; import { Auth, Log, Strategy, Token } from '..'; import { Auth as AuthProps } from '../schema/auth'; diff --git a/lib/schema/log.ts b/lib/schema/log.ts index 731da9a..f799631 100644 --- a/lib/schema/log.ts +++ b/lib/schema/log.ts @@ -1,6 +1,6 @@ import { InferSchemaType, Model, Schema, StringSchemaDefinition, Types } from 'mongoose'; -import { Payload } from '@mifi/services-common/types/Payload'; +import { Payload } from '@mifi/services-common/lib/types/Payload'; import { Action } from '../constants/action'; diff --git a/lib/schema/strategy.ts b/lib/schema/strategy.ts index d2d32ba..f811554 100644 --- a/lib/schema/strategy.ts +++ b/lib/schema/strategy.ts @@ -53,11 +53,11 @@ export const StrategySchema = new Schema( }, ); -StrategySchema.methods.getPopulatedStrategy = async function (this: StrategyModel) { +StrategySchema.methods.getPopulatedStrategy = async function (this: StrategyDocument) { return this.populate('parent'); }; -StrategySchema.methods.getAuthRecord = async function (this: StrategyModel) { +StrategySchema.methods.getAuthRecord = async function (this: StrategyDocument) { return (await this.getPopulatedStrategy()).parent; }; diff --git a/package.json b/package.json index 385bd54..1324cb1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mifi/auth-db", - "version": "1.0.0", + "version": "1.0.1", "author": "mifi (Mike Fitzpatrick)", "license": "MIT", "scripts": { @@ -18,6 +18,7 @@ "@babel/preset-env": "^7.21.5", "@babel/preset-typescript": "^7.21.5", "@tsconfig/node16": "^1.0.3", + "@types/jsonwebtoken": "^9.0.2", "@types/node": "^18.14.0", "@typescript-eslint/eslint-plugin": "^5.59.2", "@typescript-eslint/parser": "^5.59.2", diff --git a/yarn.lock b/yarn.lock index 227b5b2..d8eb561 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2629,7 +2629,10 @@ __metadata: "@babel/core": ^7.21.8 "@babel/preset-env": ^7.21.5 "@babel/preset-typescript": ^7.21.5 + "@mifi/services-common": 1.0.0 "@tsconfig/node16": ^1.0.3 + "@types/jsonwebtoken": ^9.0.2 + "@types/node": ^18.14.0 "@typescript-eslint/eslint-plugin": ^5.59.2 "@typescript-eslint/parser": ^5.59.2 babel-jest: ^29.5.0 @@ -2652,6 +2655,13 @@ __metadata: languageName: unknown linkType: soft +"@mifi/services-common@npm:1.0.0": + version: 1.0.0 + resolution: "@mifi/services-common@npm:1.0.0::__archiveUrl=https%3A%2F%2Fgit.mifi.dev%2Fapi%2Fpackages%2Fmifi%2Fnpm%2F%2540mifi%252Fservices-common%2F-%2F1.0.0%2Fservices-common-1.0.0.tgz" + checksum: 1ab1c697e603df26363a3b6ae77fc35ac19c34a4c43d874ec0fc113a87b2ae62a8ddc64c7d40fb7e38f69c42b0eb9a93df40905eb7fecc92c3665ef18f245bc0 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -2899,6 +2909,15 @@ __metadata: languageName: node linkType: hard +"@types/jsonwebtoken@npm:^9.0.2": + version: 9.0.2 + resolution: "@types/jsonwebtoken@npm:9.0.2" + dependencies: + "@types/node": "*" + checksum: 3bb8d40e78d7eb53e427db6e9f0f22e0890cfee80965dcf741d08341814913afb211306de6e9847c6d241cc8e36f8a59090cbfdcc510ab7c81af9d650c5afe0e + languageName: node + linkType: hard + "@types/node@npm:*": version: 20.2.3 resolution: "@types/node@npm:20.2.3" @@ -2906,6 +2925,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^18.14.0": + version: 18.16.14 + resolution: "@types/node@npm:18.16.14" + checksum: c11cb3c787236414efe58240ae71854971592554d82ff9d201876ce7cafd51c37aaa001c63602d002e8238614d7331bd6d48ac4c1c0caa826799980b6846fb08 + languageName: node + linkType: hard + "@types/prettier@npm:^2.1.5, @types/prettier@npm:^2.6.0": version: 2.7.2 resolution: "@types/prettier@npm:2.7.2"