@proteinjs/user 1.0.11 → 1.0.13

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.
package/.eslintrc.js ADDED
@@ -0,0 +1,20 @@
1
+ module.exports = {
2
+ extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', 'prettier'],
3
+ parser: '@typescript-eslint/parser',
4
+ plugins: ['@typescript-eslint', 'prettier'],
5
+ root: true,
6
+ ignorePatterns: ['**/dist/*', '**/node_modules/*'],
7
+
8
+ rules: {
9
+ 'prettier/prettier': ['warn'],
10
+ curly: ['warn'],
11
+ 'eol-last': ['warn', 'always'],
12
+ 'keyword-spacing': ['warn', { before: true }],
13
+ 'no-undef': 'off',
14
+ '@typescript-eslint/no-unused-vars': 'off',
15
+ '@typescript-eslint/no-var-requires': 'off',
16
+ '@typescript-eslint/no-explicit-any': 'off',
17
+ '@typescript-eslint/prefer-as-const': 'off',
18
+ '@typescript-eslint/ban-types': 'off',
19
+ },
20
+ };
@@ -0,0 +1,3 @@
1
+ node_modules/
2
+ dist/
3
+ .DS_Store
package/.prettierrc ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "trailingComma": "es5",
3
+ "tabWidth": 2,
4
+ "semi": true,
5
+ "singleQuote": true,
6
+ "jsxSingleQuote": true,
7
+ "printWidth": 120
8
+ }
package/CHANGELOG.md CHANGED
@@ -3,16 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [1.0.11](https://github.com/proteinjs/user/compare/@proteinjs/user@1.0.10...@proteinjs/user@1.0.11) (2024-05-09)
6
+ ## [1.0.13](https://github.com/proteinjs/user/compare/@proteinjs/user@1.0.12...@proteinjs/user@1.0.13) (2024-05-10)
7
7
 
8
8
 
9
9
  ### Bug Fixes
10
10
 
11
- * do not name a column the same name as a table ([1442a9f](https://github.com/proteinjs/user/commit/1442a9f665f88feafa8ccb83631ef2fb7d741f20))
11
+ * add linting and lint all files ([71defcd](https://github.com/proteinjs/user/commit/71defcd78dc479d2eef1f624c746c879f4e31daa))
12
+
13
+
12
14
 
13
15
 
14
16
 
17
+ ## [1.0.11](https://github.com/proteinjs/user/compare/@proteinjs/user@1.0.10...@proteinjs/user@1.0.11) (2024-05-09)
18
+
19
+ ### Bug Fixes
15
20
 
21
+ - do not name a column the same name as a table ([1442a9f](https://github.com/proteinjs/user/commit/1442a9f665f88feafa8ccb83631ef2fb7d741f20))
16
22
 
17
23
  ## 1.0.1 (2024-04-19)
18
24
 
@@ -22,7 +22,7 @@ require("@proteinjs/service");
22
22
  require("@proteinjs/user-auth");
23
23
  require("moment");
24
24
  /** Generate Source Graph */
25
- var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/user/ScopedRecord\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"ScopedRecord\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/ScopedRecord.ts\",\"qualifiedName\":\"@proteinjs/user/ScopedRecord\",\"properties\":[{\"name\":\"scope\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/db/Record\"},{\"v\":\"@proteinjs/user/UserRepo\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserRepo\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/UserRepo.ts\",\"qualifiedName\":\"@proteinjs/user/UserRepo\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"getUser\",\"returnType\":{\"packageName\":\"\",\"name\":\"Omit<User, 'roles'> & AuthenticatedUser\",\"filePath\":null,\"qualifiedName\":\"/Omit<User, 'roles'> & AuthenticatedUser\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"setUser\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"user\",\"type\":{\"packageName\":\"@proteinjs/user\",\"name\":\"User\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/User\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user-auth\",\"name\":\"AuthenticatedUserRepo\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user-auth/AuthenticatedUserRepo\"},{\"v\":\"@proteinjs/user/Session\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"Session\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/tables/SessionTable.ts\",\"qualifiedName\":\"@proteinjs/user/Session\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n sessionId: string,\\n session: string,\\n expires: Date,\\n userEmail: string\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n sessionId: string,\\n session: string,\\n expires: Date,\\n userEmail: string\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/SessionTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"SessionTable\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/tables/SessionTable.ts\",\"qualifiedName\":\"@proteinjs/user/SessionTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/Session\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/db/Table\"},{\"v\":\"@proteinjs/user/User\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"User\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/tables/UserTable.ts\",\"qualifiedName\":\"@proteinjs/user/User\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n name: string,\\n email: string,\\n password: string,\\n emailVerified: boolean,\\n roles: string\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n name: string,\\n email: string,\\n password: string,\\n emailVerified: boolean,\\n roles: string\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/UserTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserTable\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/tables/UserTable.ts\",\"qualifiedName\":\"@proteinjs/user/UserTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/User\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}}],\"edges\":[{\"v\":\"@proteinjs/user/ScopedRecord\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/UserRepo\",\"w\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user/Session\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/SessionTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user/User\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/UserTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"}]}";
25
+ var sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/user/ScopedRecord\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"ScopedRecord\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/ScopedRecord.ts\",\"qualifiedName\":\"@proteinjs/user/ScopedRecord\",\"properties\":[{\"name\":\"scope\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/db/Record\"},{\"v\":\"@proteinjs/user/UserRepo\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserRepo\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/UserRepo.ts\",\"qualifiedName\":\"@proteinjs/user/UserRepo\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"getUser\",\"returnType\":{\"packageName\":\"\",\"name\":\"Omit<User, 'roles'> & AuthenticatedUser\",\"filePath\":null,\"qualifiedName\":\"/Omit<User, 'roles'> & AuthenticatedUser\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"setUser\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"user\",\"type\":{\"packageName\":\"@proteinjs/user\",\"name\":\"User\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/User\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user-auth\",\"name\":\"AuthenticatedUserRepo\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user-auth/AuthenticatedUserRepo\"},{\"v\":\"@proteinjs/user/Session\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"Session\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/tables/SessionTable.ts\",\"qualifiedName\":\"@proteinjs/user/Session\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n sessionId: string;\\n session: string;\\n expires: Date;\\n userEmail: string;\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n sessionId: string;\\n session: string;\\n expires: Date;\\n userEmail: string;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/SessionTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"SessionTable\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/tables/SessionTable.ts\",\"qualifiedName\":\"@proteinjs/user/SessionTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/Session\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/db/Table\"},{\"v\":\"@proteinjs/user/User\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"User\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/tables/UserTable.ts\",\"qualifiedName\":\"@proteinjs/user/User\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n name: string;\\n email: string;\\n password: string;\\n emailVerified: boolean;\\n roles: string;\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n name: string;\\n email: string;\\n password: string;\\n emailVerified: boolean;\\n roles: string;\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/UserTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserTable\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/tables/UserTable.ts\",\"qualifiedName\":\"@proteinjs/user/UserTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/User\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}}],\"edges\":[{\"v\":\"@proteinjs/user/ScopedRecord\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/UserRepo\",\"w\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user/Session\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/SessionTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user/User\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/UserTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"}]}";
26
26
  /** Generate Source Links */
27
27
  var UserRepo_1 = require("../src/UserRepo");
28
28
  var SessionTable_1 = require("../src/tables/SessionTable");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,iCAA+B;AAC/B,iCAA+B;AAC/B,8BAA4B;AAC5B,gCAA8B;AAC9B,kBAAgB;AAGhB,4BAA4B;AAE5B,IAAM,WAAW,GAAG,u/MAAu/M,CAAC;AAG5gN,4BAA4B;AAE5B,4CAA2C;AAC3C,2DAA0D;AAC1D,qDAAoD;AAEpD,IAAM,WAAW,GAAG;IACnB,0BAA0B,EAAE,mBAAQ;IACpC,8BAA8B,EAAE,2BAAY;IAC5C,2BAA2B,EAAE,qBAAS;CACtC,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../generated/index.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;;;;;AAEpC,yBAAuB;AACvB,iCAA+B;AAC/B,iCAA+B;AAC/B,8BAA4B;AAC5B,gCAA8B;AAC9B,kBAAgB;AAGhB,4BAA4B;AAE5B,IAAM,WAAW,GAAG,u9MAAu9M,CAAC;AAG5+M,4BAA4B;AAE5B,4CAA2C;AAC3C,2DAA0D;AAC1D,qDAAoD;AAEpD,IAAM,WAAW,GAAG;IACnB,0BAA0B,EAAE,mBAAQ;IACpC,8BAA8B,EAAE,2BAAY;IAC5C,2BAA2B,EAAE,qBAAS;CACtC,CAAC;AAGF,kCAAkC;AAElC,oDAAyD;AACzD,6BAAgB,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AAGjD,2CAAyB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScopedRecord.d.ts","sourceRoot":"","sources":["../../src/ScopedRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAgB,MAAM,EAA4B,KAAK,EAA8B,MAAM,eAAe,CAAC;AAG3H,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,WAAW,gDAAsB,CAAC;AAgB/C,wBAAgB,eAAe,0BAE9B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,WAG9C;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,YAAY,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC,CAAC,CAE3K"}
1
+ {"version":3,"file":"ScopedRecord.d.ts","sourceRoot":"","sources":["../../src/ScopedRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,MAAM,EAGN,KAAK,EAGN,MAAM,eAAe,CAAC;AAGvB,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,WAAW,gDAAsB,CAAC;AAgB/C,wBAAgB,eAAe,0BAE9B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,WAG9C;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,YAAY,EAC5D,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC,CAAC,GAC5C,OAAO,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,YAAY,CAAC,CAAC,CAE9D"}
@@ -50,7 +50,7 @@ var scopedRecordColumns = {
50
50
  qb.condition({
51
51
  field: 'scope',
52
52
  operator: 'IN',
53
- value: [new UserRepo_1.UserRepo().getUser().id]
53
+ value: [new UserRepo_1.UserRepo().getUser().id],
54
54
  });
55
55
  return [2 /*return*/];
56
56
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ScopedRecord.js","sourceRoot":"","sources":["../../src/ScopedRecord.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAA2H;AAC3H,uCAAsC;AAMzB,QAAA,WAAW,GAAG,CAAA,UAAmB,CAAA,CAAC;AAE/C,IAAM,mBAAmB,GAAG;IAC1B,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,EAAE;QAC/B,YAAY,EAAE;YAAa,sBAAA,IAAI,mBAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,EAAA;iBAAA;QACtD,UAAU,EAAE,UAAO,EAAE;;gBACnB,EAAE,CAAC,SAAS,CAAC;oBACX,KAAK,EAAE,OAAO;oBACd,QAAQ,EAAE,IAAI;oBACd,KAAK,EAAE,CAAC,IAAI,mBAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;iBACrC,CAAC,CAAC;;;aACJ;QACD,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;KACrB,CAAC;CACH,CAAA;AAED,SAAgB,eAAe;IAC7B,OAAO,IAAA,cAAS,GAAgB,CAAC,MAAM,CAAC,UAAA,KAAK,IAAI,OAAA,aAAa,CAAC,KAAK,CAAC,EAApB,CAAoB,CAAC,CAAC;AACzE,CAAC;AAFD,0CAEC;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CAAC;AAFD,0CAEC;AAED,SAAgB,aAAa,CAAC,KAAiB;IAC7C,IAAM,WAAW,GAAG,IAAA,oBAAe,EAAC,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3E,OAAO,CAAC,CAAC,WAAW,CAAC;AACvB,CAAC;AAHD,sCAGC;AAED;;;;;;;GAOG;AACH,SAAgB,uBAAuB,CACrC,OAA6C;IAE7C,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,mBAAmB,CAAC,EAAE,IAAA,sBAAiB,EAAS,OAAO,CAAQ,CAAC,CAAC;AAC1G,CAAC;AAJD,0DAIC"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserRepo.d.ts","sourceRoot":"","sources":["../../src/UserRepo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG1C,qBAAa,QAAS,YAAW,qBAAqB;IAClD,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,iBAAiB;IAMlD,OAAO,CAAC,IAAI,EAAE,IAAI;CAGrB"}
1
+ {"version":3,"file":"UserRepo.d.ts","sourceRoot":"","sources":["../../src/UserRepo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAG1C,qBAAa,QAAS,YAAW,qBAAqB;IACpD,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,iBAAiB;IAMlD,OAAO,CAAC,IAAI,EAAE,IAAI;CAGnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserRepo.js","sourceRoot":"","sources":["../../src/UserRepo.ts"],"names":[],"mappings":";;;AAAA,oDAA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
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,EAAE;IAAC,CAAC,IAAI,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,KAAK,GAAC,MAAM,GAAC,KAAK,GAAC,OAAO,GAAC,QAAQ,CAAA;KAAE,CAAA;CAIlG,CAAA"}
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/routes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAA;KAAE,CAAA;CAI3G,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/routes.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAoF;IACrG,UAAU,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE;IACpD,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE;IAC9C,MAAM,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE;CAChD,CAAA"}
1
+ {"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/routes.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAA8F;IAC/G,UAAU,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE;IACpD,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE;IAC9C,MAAM,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE;CAChD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SessionTable.d.ts","sourceRoot":"","sources":["../../../src/tables/SessionTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,EAAE,MAAM,EAAqB,MAAM,eAAe,CAAC;AAE3F,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,qBAAa,YAAa,SAAQ,KAAK,CAAC,OAAO,CAAC;IAC5C,IAAI,SAAa;IACjB,OAAO;;;;;;;;;WAKJ;CACN"}
1
+ {"version":3,"file":"SessionTable.d.ts","sourceRoot":"","sources":["../../../src/tables/SessionTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,EAAE,MAAM,EAAqB,MAAM,eAAe,CAAC;AAE3F,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,qBAAa,YAAa,SAAQ,KAAK,CAAC,OAAO,CAAC;IAC9C,IAAI,SAAa;IACjB,OAAO;;;;;;;;;WAKJ;CACJ"}
@@ -33,5 +33,4 @@ var SessionTable = /** @class */ (function (_super) {
33
33
  return SessionTable;
34
34
  }(db_1.Table));
35
35
  exports.SessionTable = SessionTable;
36
- ;
37
36
  //# sourceMappingURL=SessionTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SessionTable.js","sourceRoot":"","sources":["../../../src/tables/SessionTable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oCAA2F;AAS3F;IAAkC,gCAAc;IAAhD;QAAA,qEAQC;QAPG,UAAI,GAAG,SAAS,CAAC;QACjB,aAAO,GAAG,IAAA,sBAAiB,EAAU;YACjC,SAAS,EAAE,IAAI,iBAAY,CAAC,YAAY,CAAC;YACzC,OAAO,EAAE,IAAI,iBAAY,CAAC,oBAAoB,EAAE,EAAE,EAAE,IAAI,CAAC;YACzD,OAAO,EAAE,IAAI,eAAU,CAAC,SAAS,CAAC;YAClC,SAAS,EAAE,IAAI,iBAAY,CAAC,YAAY,CAAC;SAC5C,CAAC,CAAC;;IACP,CAAC;IAAD,mBAAC;AAAD,CAAC,AARD,CAAkC,UAAK,GAQtC;AARY,oCAAY;AAQxB,CAAC"}
1
+ {"version":3,"file":"SessionTable.js","sourceRoot":"","sources":["../../../src/tables/SessionTable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oCAA2F;AAS3F;IAAkC,gCAAc;IAAhD;QAAA,qEAQC;QAPC,UAAI,GAAG,SAAS,CAAC;QACjB,aAAO,GAAG,IAAA,sBAAiB,EAAU;YACnC,SAAS,EAAE,IAAI,iBAAY,CAAC,YAAY,CAAC;YACzC,OAAO,EAAE,IAAI,iBAAY,CAAC,oBAAoB,EAAE,EAAE,EAAE,IAAI,CAAC;YACzD,OAAO,EAAE,IAAI,eAAU,CAAC,SAAS,CAAC;YAClC,SAAS,EAAE,IAAI,iBAAY,CAAC,YAAY,CAAC;SAC1C,CAAC,CAAC;;IACL,CAAC;IAAD,mBAAC;AAAD,CAAC,AARD,CAAkC,UAAK,GAQtC;AARY,oCAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"UserTable.d.ts","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,EAAE,MAAM,EAAqB,MAAM,eAAe,CAAC;AAE9G,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,qBAAa,SAAU,SAAQ,KAAK,CAAC,IAAI,CAAC;IACtC,IAAI,SAAU;IACd,OAAO;;;;;;;;;;WAMJ;CACN"}
1
+ {"version":3,"file":"UserTable.d.ts","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,EAAE,MAAM,EAAqB,MAAM,eAAe,CAAC;AAE9G,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,qBAAa,SAAU,SAAQ,KAAK,CAAC,IAAI,CAAC;IACxC,IAAI,SAAU;IACd,OAAO;;;;;;;;;;WAMJ;CACJ"}
@@ -34,5 +34,4 @@ var UserTable = /** @class */ (function (_super) {
34
34
  return UserTable;
35
35
  }(db_1.Table));
36
36
  exports.UserTable = UserTable;
37
- ;
38
37
  //# sourceMappingURL=UserTable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserTable.js","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oCAA8G;AAU9G;IAA+B,6BAAW;IAA1C;QAAA,qEASC;QARG,UAAI,GAAG,MAAM,CAAC;QACd,aAAO,GAAG,IAAA,sBAAiB,EAAO;YAC9B,IAAI,EAAE,IAAI,iBAAY,CAAC,MAAM,CAAC;YAC9B,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC;YACzC,QAAQ,EAAE,IAAI,mBAAc,CAAC,UAAU,CAAC;YACxC,aAAa,EAAE,IAAI,kBAAa,CAAC,gBAAgB,CAAC;YAClD,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,CAAC;SACnC,CAAC,CAAC;;IACP,CAAC;IAAD,gBAAC;AAAD,CAAC,AATD,CAA+B,UAAK,GASnC;AATY,8BAAS;AASrB,CAAC"}
1
+ {"version":3,"file":"UserTable.js","sourceRoot":"","sources":["../../../src/tables/UserTable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,oCAA8G;AAU9G;IAA+B,6BAAW;IAA1C;QAAA,qEASC;QARC,UAAI,GAAG,MAAM,CAAC;QACd,aAAO,GAAG,IAAA,sBAAiB,EAAO;YAChC,IAAI,EAAE,IAAI,iBAAY,CAAC,MAAM,CAAC;YAC9B,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC;YACzC,QAAQ,EAAE,IAAI,mBAAc,CAAC,UAAU,CAAC;YACxC,aAAa,EAAE,IAAI,kBAAa,CAAC,gBAAgB,CAAC;YAClD,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,CAAC;SACjC,CAAC,CAAC;;IACL,CAAC;IAAD,gBAAC;AAAD,CAAC,AATD,CAA+B,UAAK,GASnC;AATY,8BAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../src/tables/tables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAgB,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,eAAO,MAAM,MAAM;;;CAGlB,CAAA"}
1
+ {"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../src/tables/tables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,IAAI,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAgB,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,eAAO,MAAM,MAAM;;;CAGlB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tables.js","sourceRoot":"","sources":["../../../src/tables/tables.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAC9C,+CAAuD;AAG1C,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,IAAI,qBAAS,EAAiB;IACpC,OAAO,EAAE,IAAI,2BAAY,EAAoB;CAC9C,CAAA"}
1
+ {"version":3,"file":"tables.js","sourceRoot":"","sources":["../../../src/tables/tables.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAC9C,+CAAuD;AAG1C,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,IAAI,qBAAS,EAAiB;IACpC,OAAO,EAAE,IAAI,2BAAY,EAAoB;CAC9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScopedRecord.test.d.ts","sourceRoot":"","sources":["../../test/ScopedRecord.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,EAAE,MAAM,EAAqB,MAAM,eAAe,CAAA;AAGlF,MAAM,WAAW,QAAS,SAAQ,MAAM;IACvC,IAAI,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD,qBAAa,aAAc,SAAQ,KAAK,CAAC,QAAQ,CAAC;IACjD,IAAI,SAAoB;IACxB,OAAO;;;;;;;WAYJ;CACH"}
1
+ {"version":3,"file":"ScopedRecord.test.d.ts","sourceRoot":"","sources":["../../test/ScopedRecord.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,EAAE,MAAM,EAAqB,MAAM,eAAe,CAAC;AAGnF,MAAM,WAAW,QAAS,SAAQ,MAAM;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD,qBAAa,aAAc,SAAQ,KAAK,CAAC,QAAQ,CAAC;IAChD,IAAI,SAAoB;IACxB,OAAO;;;;;;;WAaJ;CACJ"}
@@ -74,7 +74,7 @@ var FavoriteTable = /** @class */ (function (_super) {
74
74
  qb.condition({
75
75
  field: 'scope',
76
76
  operator: 'IN',
77
- value: [veronicaScope]
77
+ value: [veronicaScope],
78
78
  });
79
79
  return [2 /*return*/];
80
80
  });
@@ -108,8 +108,9 @@ var dropTable = function (table) { return __awaiter(void 0, void 0, void 0, func
108
108
  }); };
109
109
  var getTable = function (tableName) {
110
110
  var userTable = new FavoriteTable();
111
- if (userTable.name == tableName)
111
+ if (userTable.name == tableName) {
112
112
  return userTable;
113
+ }
113
114
  throw new Error('Cannot find test table');
114
115
  };
115
116
  var db = new db_1.Db(dbDriver, getTable);
@@ -1 +1 @@
1
- {"version":3,"file":"ScopedRecord.test.js","sourceRoot":"","sources":["../../test/ScopedRecord.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAAkF;AAClF,4DAAsD;AAOtD,IAAM,YAAY,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC;AACpE,IAAM,SAAS,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;AAC3D,IAAM,aAAa,GAAG,aAAa,CAAC;AACpC,IAAM,UAAU,GAAG,SAAS,CAAC;AAC7B;IAAmC,iCAAe;IAAlD;QAAA,qEAeC;QAdA,UAAI,GAAG,gBAAgB,CAAC;QACxB,aAAO,GAAG,IAAA,sBAAiB,EAAW;YACrC,IAAI,EAAE,IAAI,iBAAY,CAAC,MAAM,CAAC;YAC5B,KAAK,EAAE,IAAI,iBAAY,CAAC,OAAO,EAAE;gBAC/B,YAAY,EAAE,UAAO,QAAkB;oBAAM,sBAAA,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,EAAA;yBAAA;gBACrH,UAAU,EAAE,UAAO,EAAE;;wBACnB,EAAE,CAAC,SAAS,CAAC;4BACX,KAAK,EAAE,OAAO;4BACd,QA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 'moment';
9
9
 
10
-
11
10
  /** Generate Source Graph */
12
11
 
13
- const sourceGraph = "{\"options\":{\"directed\":true,\"multigraph\":false,\"compound\":false},\"nodes\":[{\"v\":\"@proteinjs/user/ScopedRecord\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"ScopedRecord\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/ScopedRecord.ts\",\"qualifiedName\":\"@proteinjs/user/ScopedRecord\",\"properties\":[{\"name\":\"scope\",\"type\":{\"packageName\":\"\",\"name\":\"string\",\"filePath\":null,\"qualifiedName\":\"/string\",\"typeParameters\":null,\"directParents\":null},\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"sourceType\":3}},{\"v\":\"@proteinjs/db/Record\"},{\"v\":\"@proteinjs/user/UserRepo\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserRepo\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/UserRepo.ts\",\"qualifiedName\":\"@proteinjs/user/UserRepo\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[{\"name\":\"getUser\",\"returnType\":{\"packageName\":\"\",\"name\":\"Omit<User, 'roles'> & AuthenticatedUser\",\"filePath\":null,\"qualifiedName\":\"/Omit<User, 'roles'> & AuthenticatedUser\",\"typeParameters\":null,\"directParents\":null},\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[]},{\"name\":\"setUser\",\"returnType\":null,\"isAsync\":false,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"parameters\":[{\"name\":\"user\",\"type\":{\"packageName\":\"@proteinjs/user\",\"name\":\"User\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/User\",\"typeParameters\":null,\"directParents\":null}}]}],\"typeParameters\":[],\"directParentInterfaces\":[{\"packageName\":\"@proteinjs/user-auth\",\"name\":\"AuthenticatedUserRepo\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"properties\":[],\"methods\":[],\"typeParameters\":[],\"directParents\":[]}],\"directParentClasses\":[],\"sourceType\":2}},{\"v\":\"@proteinjs/user-auth/AuthenticatedUserRepo\"},{\"v\":\"@proteinjs/user/Session\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"Session\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/tables/SessionTable.ts\",\"qualifiedName\":\"@proteinjs/user/Session\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n sessionId: string,\\n session: string,\\n expires: Date,\\n userEmail: string\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n sessionId: string,\\n session: string,\\n expires: Date,\\n userEmail: string\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/SessionTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"SessionTable\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/tables/SessionTable.ts\",\"qualifiedName\":\"@proteinjs/user/SessionTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/Session\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}},{\"v\":\"@proteinjs/db/Table\"},{\"v\":\"@proteinjs/user/User\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"User\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/tables/UserTable.ts\",\"qualifiedName\":\"@proteinjs/user/User\",\"typeParameters\":[],\"directParents\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Record\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Record\",\"typeParameters\":[],\"directParents\":null},{\"packageName\":\"@proteinjs/user\",\"name\":\"{\\n name: string,\\n email: string,\\n password: string,\\n emailVerified: boolean,\\n roles: string\\n}\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/user/{\\n name: string,\\n email: string,\\n password: string,\\n emailVerified: boolean,\\n roles: string\\n}\",\"typeParameters\":[],\"directParents\":null}],\"sourceType\":1}},{\"v\":\"@proteinjs/user/UserTable\",\"value\":{\"packageName\":\"@proteinjs/user\",\"name\":\"UserTable\",\"filePath\":\"/home/runner/work/user/user/packages/user/src/tables/UserTable.ts\",\"qualifiedName\":\"@proteinjs/user/UserTable\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[{\"name\":\"name\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"},{\"name\":\"columns\",\"type\":null,\"isOptional\":false,\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\"}],\"methods\":[],\"typeParameters\":[],\"directParentInterfaces\":[],\"directParentClasses\":[{\"packageName\":\"@proteinjs/db\",\"name\":\"Table\",\"filePath\":null,\"qualifiedName\":\"@proteinjs/db/Table\",\"isAbstract\":false,\"isStatic\":false,\"visibility\":\"public\",\"properties\":[],\"methods\":[],\"typeParameters\":[\"@proteinjs/user/User\"],\"directParentInterfaces\":[],\"directParentClasses\":[]}],\"sourceType\":2}}],\"edges\":[{\"v\":\"@proteinjs/user/ScopedRecord\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends interface\"},{\"v\":\"@proteinjs/user/UserRepo\",\"w\":\"@proteinjs/user-auth/AuthenticatedUserRepo\",\"value\":\"implements interface\"},{\"v\":\"@proteinjs/user/Session\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/SessionTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"},{\"v\":\"@proteinjs/user/User\",\"w\":\"@proteinjs/db/Record\",\"value\":\"extends type\"},{\"v\":\"@proteinjs/user/UserTable\",\"w\":\"@proteinjs/db/Table\",\"value\":\"extends class\"}]}";
14
-
12
+ const sourceGraph =
13
+ '{"options":{"directed":true,"multigraph":false,"compound":false},"nodes":[{"v":"@proteinjs/user/ScopedRecord","value":{"packageName":"@proteinjs/user","name":"ScopedRecord","filePath":"/home/runner/work/user/user/packages/user/src/ScopedRecord.ts","qualifiedName":"@proteinjs/user/ScopedRecord","properties":[{"name":"scope","type":{"packageName":"","name":"string","filePath":null,"qualifiedName":"/string","typeParameters":null,"directParents":null},"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParents":[{"packageName":"@proteinjs/db","name":"Record","filePath":null,"qualifiedName":"@proteinjs/db/Record","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"sourceType":3}},{"v":"@proteinjs/db/Record"},{"v":"@proteinjs/user/UserRepo","value":{"packageName":"@proteinjs/user","name":"UserRepo","filePath":"/home/runner/work/user/user/packages/user/src/UserRepo.ts","qualifiedName":"@proteinjs/user/UserRepo","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[{"name":"getUser","returnType":{"packageName":"","name":"Omit<User, \'roles\'> & AuthenticatedUser","filePath":null,"qualifiedName":"/Omit<User, \'roles\'> & AuthenticatedUser","typeParameters":null,"directParents":null},"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[]},{"name":"setUser","returnType":null,"isAsync":false,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public","parameters":[{"name":"user","type":{"packageName":"@proteinjs/user","name":"User","filePath":null,"qualifiedName":"@proteinjs/user/User","typeParameters":null,"directParents":null}}]}],"typeParameters":[],"directParentInterfaces":[{"packageName":"@proteinjs/user-auth","name":"AuthenticatedUserRepo","filePath":null,"qualifiedName":"@proteinjs/user-auth/AuthenticatedUserRepo","properties":[],"methods":[],"typeParameters":[],"directParents":[]}],"directParentClasses":[],"sourceType":2}},{"v":"@proteinjs/user-auth/AuthenticatedUserRepo"},{"v":"@proteinjs/user/Session","value":{"packageName":"@proteinjs/user","name":"Session","filePath":"/home/runner/work/user/user/packages/user/src/tables/SessionTable.ts","qualifiedName":"@proteinjs/user/Session","typeParameters":[],"directParents":[{"packageName":"@proteinjs/db","name":"Record","filePath":null,"qualifiedName":"@proteinjs/db/Record","typeParameters":[],"directParents":null},{"packageName":"@proteinjs/user","name":"{\\n sessionId: string;\\n session: string;\\n expires: Date;\\n userEmail: string;\\n}","filePath":null,"qualifiedName":"@proteinjs/user/{\\n sessionId: string;\\n session: string;\\n expires: Date;\\n userEmail: string;\\n}","typeParameters":[],"directParents":null}],"sourceType":1}},{"v":"@proteinjs/user/SessionTable","value":{"packageName":"@proteinjs/user","name":"SessionTable","filePath":"/home/runner/work/user/user/packages/user/src/tables/SessionTable.ts","qualifiedName":"@proteinjs/user/SessionTable","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"name","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"columns","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParentInterfaces":[],"directParentClasses":[{"packageName":"@proteinjs/db","name":"Table","filePath":null,"qualifiedName":"@proteinjs/db/Table","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[],"typeParameters":["@proteinjs/user/Session"],"directParentInterfaces":[],"directParentClasses":[]}],"sourceType":2}},{"v":"@proteinjs/db/Table"},{"v":"@proteinjs/user/User","value":{"packageName":"@proteinjs/user","name":"User","filePath":"/home/runner/work/user/user/packages/user/src/tables/UserTable.ts","qualifiedName":"@proteinjs/user/User","typeParameters":[],"directParents":[{"packageName":"@proteinjs/db","name":"Record","filePath":null,"qualifiedName":"@proteinjs/db/Record","typeParameters":[],"directParents":null},{"packageName":"@proteinjs/user","name":"{\\n name: string;\\n email: string;\\n password: string;\\n emailVerified: boolean;\\n roles: string;\\n}","filePath":null,"qualifiedName":"@proteinjs/user/{\\n name: string;\\n email: string;\\n password: string;\\n emailVerified: boolean;\\n roles: string;\\n}","typeParameters":[],"directParents":null}],"sourceType":1}},{"v":"@proteinjs/user/UserTable","value":{"packageName":"@proteinjs/user","name":"UserTable","filePath":"/home/runner/work/user/user/packages/user/src/tables/UserTable.ts","qualifiedName":"@proteinjs/user/UserTable","isAbstract":false,"isStatic":false,"visibility":"public","properties":[{"name":"name","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"},{"name":"columns","type":null,"isOptional":false,"isAbstract":false,"isStatic":false,"visibility":"public"}],"methods":[],"typeParameters":[],"directParentInterfaces":[],"directParentClasses":[{"packageName":"@proteinjs/db","name":"Table","filePath":null,"qualifiedName":"@proteinjs/db/Table","isAbstract":false,"isStatic":false,"visibility":"public","properties":[],"methods":[],"typeParameters":["@proteinjs/user/User"],"directParentInterfaces":[],"directParentClasses":[]}],"sourceType":2}}],"edges":[{"v":"@proteinjs/user/ScopedRecord","w":"@proteinjs/db/Record","value":"extends interface"},{"v":"@proteinjs/user/UserRepo","w":"@proteinjs/user-auth/AuthenticatedUserRepo","value":"implements interface"},{"v":"@proteinjs/user/Session","w":"@proteinjs/db/Record","value":"extends type"},{"v":"@proteinjs/user/SessionTable","w":"@proteinjs/db/Table","value":"extends class"},{"v":"@proteinjs/user/User","w":"@proteinjs/db/Record","value":"extends type"},{"v":"@proteinjs/user/UserTable","w":"@proteinjs/db/Table","value":"extends class"}]}';
15
14
 
16
15
  /** Generate Source Links */
17
16
 
@@ -20,16 +19,14 @@ import { SessionTable } from '../src/tables/SessionTable';
20
19
  import { UserTable } from '../src/tables/UserTable';
21
20
 
22
21
  const sourceLinks = {
23
- '@proteinjs/user/UserRepo': UserRepo,
24
- '@proteinjs/user/SessionTable': SessionTable,
25
- '@proteinjs/user/UserTable': UserTable,
22
+ '@proteinjs/user/UserRepo': UserRepo,
23
+ '@proteinjs/user/SessionTable': SessionTable,
24
+ '@proteinjs/user/UserTable': UserTable,
26
25
  };
27
26
 
28
-
29
27
  /** Load Source Graph and Links */
30
28
 
31
29
  import { SourceRepository } from '@proteinjs/reflection';
32
30
  SourceRepository.merge(sourceGraph, sourceLinks);
33
31
 
34
-
35
- export * from '../index';
32
+ export * from '../index';
package/index.ts CHANGED
@@ -6,4 +6,4 @@ export * from './src/cacheKeys';
6
6
  export * from './src/UserRepo';
7
7
  export * from './src/ScopedRecord';
8
8
 
9
- export * from '@proteinjs/user-auth';
9
+ export * from '@proteinjs/user-auth';
package/jest.config.js CHANGED
@@ -1,18 +1,9 @@
1
1
  module.exports = {
2
- "roots": [
3
- "<rootDir>/test"
4
- ],
5
- "transform": {
6
- "^.+\\.tsx?$": "ts-jest"
7
- },
8
- "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
9
- "moduleFileExtensions": [
10
- "ts",
11
- "tsx",
12
- "js",
13
- "jsx",
14
- "json",
15
- "node"
16
- ],
17
- "testEnvironment": "node"
18
- }
2
+ roots: ['<rootDir>/test'],
3
+ transform: {
4
+ '^.+\\.tsx?$': 'ts-jest',
5
+ },
6
+ testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
7
+ moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
8
+ testEnvironment: 'node',
9
+ };
package/package.json CHANGED
@@ -1,44 +1,49 @@
1
1
  {
2
- "name": "@proteinjs/user",
3
- "version": "1.0.11",
4
- "description": "User management",
5
- "publishConfig": {
6
- "access": "public"
7
- },
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/proteinjs/user.git"
11
- },
12
- "bugs": {
13
- "url": "https://github.com/proteinjs/user/issues"
14
- },
15
- "homepage": "https://github.com/proteinjs/user#readme",
16
- "author": "Brent Bahry",
17
- "license": "MIT",
18
- "scripts": {
19
- "clean": "rm -rf dist/ generated/ node_modules/",
20
- "build": "reflection-build && tsc",
21
- "watch": "reflection-watch",
22
- "test": "jest"
23
- },
24
- "dependencies": {
25
- "@proteinjs/db": "1.0.14",
26
- "@proteinjs/reflection": "1.1.1",
27
- "@proteinjs/server-api": "1.1.1",
28
- "@proteinjs/service": "1.0.9",
29
- "@proteinjs/user-auth": "1.0.7",
30
- "moment": "2.29.4"
31
- },
32
- "devDependencies": {
33
- "@proteinjs/db-driver-knex": "1.0.13",
34
- "@proteinjs/reflection-build": "1.0.16",
35
- "@types/jest": "29.5.5",
36
- "@types/node": "14.0.13",
37
- "jest": "29.7.0",
38
- "ts-jest": "29.1.1",
39
- "typescript": "5.2.2"
40
- },
41
- "main": "./dist/generated/index.js",
42
- "types": "./dist/generated/index.d.ts",
43
- "gitHead": "bbd5f6349a82d7d5fa7b5c9261ba6495ebcf5749"
2
+ "name": "@proteinjs/user",
3
+ "version": "1.0.13",
4
+ "description": "User management",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/proteinjs/user.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/proteinjs/user/issues"
14
+ },
15
+ "homepage": "https://github.com/proteinjs/user#readme",
16
+ "author": "Brent Bahry",
17
+ "license": "MIT",
18
+ "scripts": {
19
+ "clean": "rm -rf dist/ generated/ node_modules/",
20
+ "build": "reflection-build && tsc",
21
+ "watch": "reflection-watch",
22
+ "test": "jest"
23
+ },
24
+ "dependencies": {
25
+ "@proteinjs/db": "1.0.15",
26
+ "@proteinjs/reflection": "1.1.1",
27
+ "@proteinjs/server-api": "1.1.1",
28
+ "@proteinjs/service": "1.0.9",
29
+ "@proteinjs/user-auth": "^1.0.8",
30
+ "moment": "2.29.4"
31
+ },
32
+ "devDependencies": {
33
+ "@proteinjs/db-driver-knex": "1.0.14",
34
+ "@proteinjs/reflection-build": "1.0.16",
35
+ "@types/jest": "29.5.5",
36
+ "@types/node": "14.0.13",
37
+ "@typescript-eslint/eslint-plugin": "7.8.0",
38
+ "@typescript-eslint/parser": "7.8.0",
39
+ "eslint": "8.57.0",
40
+ "eslint-config-prettier": "9.1.0",
41
+ "eslint-plugin-prettier": "5.1.3",
42
+ "jest": "29.7.0",
43
+ "ts-jest": "29.1.1",
44
+ "typescript": "5.2.2"
45
+ },
46
+ "main": "./dist/generated/index.js",
47
+ "types": "./dist/generated/index.d.ts",
48
+ "gitHead": "2fd5a5ee7f68e33bf8b6ba045fd5bbd043b36e3b"
44
49
  }
@@ -1,4 +1,13 @@
1
- import { Columns, StringColumn, Record, withRecordColumns, getDb, Table, getColumnByName, getTables } from '@proteinjs/db';
1
+ import {
2
+ Columns,
3
+ StringColumn,
4
+ Record,
5
+ withRecordColumns,
6
+ getDb,
7
+ Table,
8
+ getColumnByName,
9
+ getTables,
10
+ } from '@proteinjs/db';
2
11
  import { UserRepo } from './UserRepo';
3
12
 
4
13
  export interface ScopedRecord extends Record {
@@ -8,21 +17,21 @@ export interface ScopedRecord extends Record {
8
17
  export const getScopedDb = getDb<ScopedRecord>;
9
18
 
10
19
  const scopedRecordColumns = {
11
- scope: new StringColumn('scope', {
12
- defaultValue: async () => new UserRepo().getUser().id,
13
- addToQuery: async (qb) => {
14
- qb.condition({
15
- field: 'scope',
16
- operator: 'IN',
17
- value: [new UserRepo().getUser().id]
20
+ scope: new StringColumn('scope', {
21
+ defaultValue: async () => new UserRepo().getUser().id,
22
+ addToQuery: async (qb) => {
23
+ qb.condition({
24
+ field: 'scope',
25
+ operator: 'IN',
26
+ value: [new UserRepo().getUser().id],
18
27
  });
19
28
  },
20
29
  ui: { hidden: true },
21
30
  }),
22
- }
31
+ };
23
32
 
24
33
  export function getScopedTables() {
25
- return getTables<ScopedRecord>().filter(table => isScopedTable(table));
34
+ return getTables<ScopedRecord>().filter((table) => isScopedTable(table));
26
35
  }
27
36
 
28
37
  export function isScopedTable(table: Table<any>) {
@@ -32,12 +41,14 @@ export function isScopedTable(table: Table<any>) {
32
41
 
33
42
  /**
34
43
  * Wrapper function to add default ScopedRecord columns to your table's columns.
35
- *
44
+ *
36
45
  * Note: using this requires an explicit dependency on moment@2.29.4 in your package (since transient dependencies are brittle by typescript's standards)
37
- *
46
+ *
38
47
  * @param columns your columns
39
48
  * @returns recordColumns & sourceRecordColumns & your columns
40
49
  */
41
- export function withScopedRecordColumns<T extends ScopedRecord>(columns: Columns<Omit<T, keyof ScopedRecord>>): Columns<ScopedRecord> & Columns<Omit<T, keyof ScopedRecord>> {
50
+ export function withScopedRecordColumns<T extends ScopedRecord>(
51
+ columns: Columns<Omit<T, keyof ScopedRecord>>
52
+ ): Columns<ScopedRecord> & Columns<Omit<T, keyof ScopedRecord>> {
42
53
  return Object.assign(Object.assign({}, scopedRecordColumns), withRecordColumns<Record>(columns) as any);
43
- }
54
+ }
package/src/UserRepo.ts CHANGED
@@ -4,13 +4,13 @@ import { User } from './tables/UserTable';
4
4
  import { USER_SESSION_CACHE_KEY } from './cacheKeys';
5
5
 
6
6
  export class UserRepo implements AuthenticatedUserRepo {
7
- getUser(): Omit<User, 'roles'> & AuthenticatedUser {
8
- const user = Object.assign({}, Session.getDataByKey<User>(USER_SESSION_CACHE_KEY));
9
- const roles = user.roles ? user.roles.split(',') : [];
10
- return Object.assign(user, { roles });
11
- }
7
+ getUser(): Omit<User, 'roles'> & AuthenticatedUser {
8
+ const user = Object.assign({}, Session.getDataByKey<User>(USER_SESSION_CACHE_KEY));
9
+ const roles = user.roles ? user.roles.split(',') : [];
10
+ return Object.assign(user, { roles });
11
+ }
12
12
 
13
- setUser(user: User) {
14
- Session.setDataByKey(USER_SESSION_CACHE_KEY, user);
15
- }
16
- }
13
+ setUser(user: User) {
14
+ Session.setDataByKey(USER_SESSION_CACHE_KEY, user);
15
+ }
16
+ }
package/src/cacheKeys.ts CHANGED
@@ -1 +1 @@
1
- export const USER_SESSION_CACHE_KEY = '@proteinjs/user/userCache';
1
+ export const USER_SESSION_CACHE_KEY = '@proteinjs/user/userCache';
package/src/routes.ts CHANGED
@@ -1,5 +1,5 @@
1
- export const routes: {[name: string]: { path: string, method: 'get'|'post'|'put'|'patch'|'delete' }} = {
1
+ export const routes: { [name: string]: { path: string; method: 'get' | 'post' | 'put' | 'patch' | 'delete' } } = {
2
2
  createUser: { path: '/user/create', method: 'post' },
3
3
  login: { path: '/user/login', method: 'post' },
4
4
  logout: { path: '/user/logout', method: 'get' },
5
- }
5
+ };
@@ -1,18 +1,18 @@
1
1
  import { DateColumn, StringColumn, Table, Record, withRecordColumns } from '@proteinjs/db';
2
2
 
3
3
  export type Session = Record & {
4
- sessionId: string,
5
- session: string,
6
- expires: Date,
7
- userEmail: string
8
- }
4
+ sessionId: string;
5
+ session: string;
6
+ expires: Date;
7
+ userEmail: string;
8
+ };
9
9
 
10
10
  export class SessionTable extends Table<Session> {
11
- name = 'session';
12
- columns = withRecordColumns<Session>({
13
- sessionId: new StringColumn('session_id'),
14
- session: new StringColumn('serialized_session', {}, 4000),
15
- expires: new DateColumn('expires'),
16
- userEmail: new StringColumn('user_email'),
17
- });
18
- };
11
+ name = 'session';
12
+ columns = withRecordColumns<Session>({
13
+ sessionId: new StringColumn('session_id'),
14
+ session: new StringColumn('serialized_session', {}, 4000),
15
+ expires: new DateColumn('expires'),
16
+ userEmail: new StringColumn('user_email'),
17
+ });
18
+ }
@@ -1,20 +1,20 @@
1
1
  import { BooleanColumn, StringColumn, PasswordColumn, Table, Record, withRecordColumns } from '@proteinjs/db';
2
2
 
3
3
  export type User = Record & {
4
- name: string,
5
- email: string,
6
- password: string,
7
- emailVerified: boolean,
8
- roles: string
9
- }
4
+ name: string;
5
+ email: string;
6
+ password: string;
7
+ emailVerified: boolean;
8
+ roles: string;
9
+ };
10
10
 
11
11
  export class UserTable extends Table<User> {
12
- name = 'user';
13
- columns = withRecordColumns<User>({
14
- name: new StringColumn('name'),
15
- email: new StringColumn('email', {}, 250),
16
- password: new PasswordColumn('password'),
17
- emailVerified: new BooleanColumn('email_verified'),
18
- roles: new StringColumn('roles'),
19
- });
20
- };
12
+ name = 'user';
13
+ columns = withRecordColumns<User>({
14
+ name: new StringColumn('name'),
15
+ email: new StringColumn('email', {}, 250),
16
+ password: new PasswordColumn('password'),
17
+ emailVerified: new BooleanColumn('email_verified'),
18
+ roles: new StringColumn('roles'),
19
+ });
20
+ }
@@ -5,4 +5,4 @@ import { Table } from '@proteinjs/db';
5
5
  export const tables = {
6
6
  User: new UserTable() as Table<User>,
7
7
  Session: new SessionTable() as Table<Session>,
8
- }
8
+ };
@@ -1,8 +1,8 @@
1
- import { Db, StringColumn, Table, Record, withRecordColumns } from '@proteinjs/db'
2
- import { KnexDriver } from '@proteinjs/db-driver-knex'
1
+ import { Db, StringColumn, Table, Record, withRecordColumns } from '@proteinjs/db';
2
+ import { KnexDriver } from '@proteinjs/db-driver-knex';
3
3
 
4
4
  export interface Favorite extends Record {
5
- name: string;
5
+ name: string;
6
6
  scope?: string;
7
7
  }
8
8
 
@@ -11,36 +11,39 @@ const kevinUser = { name: 'Kevin', email: 'kev@tron.com' };
11
11
  const veronicaScope = 'vvvveronica';
12
12
  const kevinScope = 'kevinnn';
13
13
  export class FavoriteTable extends Table<Favorite> {
14
- name = 'user_test_user';
15
- columns = withRecordColumns<Favorite>({
16
- name: new StringColumn('name'),
17
- scope: new StringColumn('scope', {
18
- defaultValue: async (favorite: Favorite) => favorite.name.startsWith(veronicaUser.name) ? veronicaScope : kevinScope,
19
- addToQuery: async (qb) => {
20
- qb.condition({
21
- field: 'scope',
22
- operator: 'IN',
23
- value: [veronicaScope]
14
+ name = 'user_test_user';
15
+ columns = withRecordColumns<Favorite>({
16
+ name: new StringColumn('name'),
17
+ scope: new StringColumn('scope', {
18
+ defaultValue: async (favorite: Favorite) =>
19
+ favorite.name.startsWith(veronicaUser.name) ? veronicaScope : kevinScope,
20
+ addToQuery: async (qb) => {
21
+ qb.condition({
22
+ field: 'scope',
23
+ operator: 'IN',
24
+ value: [veronicaScope],
24
25
  });
25
26
  },
26
27
  }),
27
- });
28
+ });
28
29
  }
29
30
 
30
31
  const dbDriver = new KnexDriver({
31
- host: 'localhost',
32
- user: 'root',
33
- password: '',
34
- dbName: 'test',
32
+ host: 'localhost',
33
+ user: 'root',
34
+ password: '',
35
+ dbName: 'test',
35
36
  });
36
37
  const dropTable = async (table: Table<any>) => {
37
- if (await dbDriver.getKnex().schema.withSchema(dbDriver.getDbName()).hasTable(table.name))
38
- await dbDriver.getKnex().schema.withSchema(dbDriver.getDbName()).dropTable(table.name);
39
- }
38
+ if (await dbDriver.getKnex().schema.withSchema(dbDriver.getDbName()).hasTable(table.name)) {
39
+ await dbDriver.getKnex().schema.withSchema(dbDriver.getDbName()).dropTable(table.name);
40
+ }
41
+ };
40
42
  const getTable = (tableName: string) => {
41
43
  const userTable = new FavoriteTable();
42
- if (userTable.name == tableName)
44
+ if (userTable.name == tableName) {
43
45
  return userTable;
46
+ }
44
47
 
45
48
  throw new Error('Cannot find test table');
46
49
  };
@@ -48,17 +51,19 @@ const db = new Db(dbDriver, getTable);
48
51
 
49
52
  describe('Scoped Record', () => {
50
53
  beforeAll(async () => {
51
- if (dbDriver.start)
54
+ if (dbDriver.start) {
52
55
  await dbDriver.start();
56
+ }
53
57
 
54
58
  await dbDriver.getTableManager().loadTable(new FavoriteTable());
55
- })
56
-
59
+ });
60
+
57
61
  afterAll(async () => {
58
62
  await dropTable(new FavoriteTable());
59
-
60
- if (dbDriver.stop)
63
+
64
+ if (dbDriver.stop) {
61
65
  await dbDriver.stop();
66
+ }
62
67
  });
63
68
 
64
69
  test('Query scoped records', async () => {
@@ -71,4 +76,4 @@ describe('Scoped Record', () => {
71
76
  const favorites = await db.query(favoriteTable, {});
72
77
  expect(favorites.length).toBe(3);
73
78
  });
74
- });
79
+ });
package/tsconfig.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
- "compilerOptions": {
3
- "rootDir": "./",
4
- "target": "es5",
5
- "module": "commonjs",
6
- "declaration": true,
7
- "declarationMap": true,
8
- "sourceMap": true,
9
- "outDir": "./dist/",
10
- "strict": true,
11
- "noImplicitAny": true,
12
- "esModuleInterop": true,
13
- "skipLibCheck": true,
14
- "forceConsistentCasingInFileNames": true,
15
- "resolveJsonModule": true,
16
- "jsx": "react"
17
- }
18
- }
2
+ "compilerOptions": {
3
+ "rootDir": "./",
4
+ "target": "es5",
5
+ "module": "commonjs",
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "sourceMap": true,
9
+ "outDir": "./dist/",
10
+ "strict": true,
11
+ "noImplicitAny": true,
12
+ "esModuleInterop": true,
13
+ "skipLibCheck": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "resolveJsonModule": true,
16
+ "jsx": "react"
17
+ }
18
+ }