@tomei/sso 0.51.5 → 0.51.8
Sign up to get free protection for your applications and to get access to all the features.
- package/.husky/commit-msg +0 -0
- package/.husky/pre-commit +0 -0
- package/dist/src/components/login-user/user.js +2 -0
- package/dist/src/components/login-user/user.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/eslint.config.mjs +20 -11
- package/migrations/20240314080602-create-user-table.js +1 -1
- package/migrations/20240527064925-create-system-table.js +1 -1
- package/migrations/20240527065342-create-group-table.js +1 -1
- package/migrations/20240527065633-create-group-reporting-user-table.js +1 -1
- package/migrations/20240528011551-create-group-system-access-table.js +1 -1
- package/migrations/20240528023018-user-system-access-table.js +1 -1
- package/migrations/20240528032229-user-privilege-table.js +1 -1
- package/migrations/20240528063003-create-group-privilege-table.js +1 -1
- package/migrations/20240528063051-create-group-object-privilege-table.js +1 -1
- package/migrations/20240528063107-create-user-object-privilege-table.js +1 -1
- package/migrations/20240528063108-create-api-key-table.js +1 -1
- package/migrations/20241104104802-create-building-table.js +1 -1
- package/package.json +5 -5
- package/src/components/login-user/user.ts +5 -0
- package/tsconfig.json +1 -0
- package/.eslintignore +0 -1
- package/.eslintrc +0 -16
- package/.eslintrc.js +0 -35
package/eslint.config.mjs
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
import eslintPlugin from "@typescript-eslint/eslint-plugin";
|
2
2
|
import parser from "@typescript-eslint/parser";
|
3
3
|
import importPlugin from 'eslint-plugin-import'
|
4
|
+
import path from 'path';
|
5
|
+
import { fileURLToPath } from 'url';
|
6
|
+
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
8
|
+
const __dirname = path.dirname(__filename);
|
4
9
|
|
5
10
|
export default [
|
6
11
|
{
|
@@ -8,6 +13,10 @@ export default [
|
|
8
13
|
parser: parser,
|
9
14
|
ecmaVersion: "latest", // Allows modern ECMAScript features
|
10
15
|
sourceType: "module", // Allows for the use of imports
|
16
|
+
parserOptions: {
|
17
|
+
tsconfigRootDir: __dirname,
|
18
|
+
project: './tsconfig.json'
|
19
|
+
},
|
11
20
|
},
|
12
21
|
plugins: {
|
13
22
|
"@typescript-eslint": eslintPlugin,
|
@@ -33,17 +42,17 @@ export default [
|
|
33
42
|
"@typescript-eslint/no-unsafe-return": "off",
|
34
43
|
"@typescript-eslint/restrict-template-expressions": "off",
|
35
44
|
"no-useless-escape": "off",
|
36
|
-
//
|
37
|
-
"import/no-absolute-path": "error",
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
}
|
45
|
-
|
45
|
+
"import/no-relative-parent-imports": "error", // Enforce relative imports only
|
46
|
+
"import/no-absolute-path": "error", // Block absolute imports outside aliases
|
47
|
+
"import/no-unresolved": ["error", { commonjs: true }],
|
48
|
+
},
|
49
|
+
settings: {
|
50
|
+
"import/resolver": {
|
51
|
+
typescript: {
|
52
|
+
alwaysTryTypes: true,
|
53
|
+
}
|
54
|
+
}
|
46
55
|
},
|
47
|
-
ignores: ["node_modules", "dist"],
|
56
|
+
ignores: ["node_modules", "dist/**/*", "eslint.config.mjs"],
|
48
57
|
},
|
49
58
|
];
|
@@ -85,7 +85,7 @@ module.exports = {
|
|
85
85
|
});
|
86
86
|
},
|
87
87
|
|
88
|
-
down: async (queryInterface
|
88
|
+
down: async (queryInterface) => {
|
89
89
|
// Drop the trigger before dropping the table
|
90
90
|
await queryInterface.sequelize.query(
|
91
91
|
`DROP TRIGGER IF EXISTS update_GroupCode_ObjectId`,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tomei/sso",
|
3
|
-
"version": "0.51.
|
3
|
+
"version": "0.51.8",
|
4
4
|
"description": "Tomei SSO Package",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"scripts": {
|
@@ -63,10 +63,10 @@
|
|
63
63
|
"access": "public"
|
64
64
|
},
|
65
65
|
"peerDependencies": {
|
66
|
-
"@tomei/activity-history": "^0.2.
|
67
|
-
"@tomei/config": "^0.3.
|
68
|
-
"@tomei/general": "^0.21.
|
69
|
-
"@tomei/mailer": "^0.5.
|
66
|
+
"@tomei/activity-history": "^0.2.23",
|
67
|
+
"@tomei/config": "^0.3.21",
|
68
|
+
"@tomei/general": "^0.21.3",
|
69
|
+
"@tomei/mailer": "^0.5.21",
|
70
70
|
"argon2": "^0.41.1",
|
71
71
|
"redis": "^4.7.0",
|
72
72
|
"reflect-metadata": "^0.2.2",
|
@@ -574,7 +574,12 @@ export class User extends UserBase {
|
|
574
574
|
const sessionId: string = randomUUID();
|
575
575
|
|
576
576
|
if (systemLogin) {
|
577
|
+
const privileges = await this.getPrivileges(
|
578
|
+
system.SystemCode,
|
579
|
+
dbTransaction,
|
580
|
+
);
|
577
581
|
systemLogin.sessionId = sessionId;
|
582
|
+
systemLogin.privileges = privileges;
|
578
583
|
userSession.systemLogins.map((system) =>
|
579
584
|
system.code === systemCode ? systemLogin : system,
|
580
585
|
);
|
package/tsconfig.json
CHANGED
package/.eslintignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
dist
|
package/.eslintrc
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"parser": "@typescript-eslint/parser",
|
3
|
-
"parserOptions": {
|
4
|
-
"ecmaVersion": "latest",
|
5
|
-
"sourceType": "module" // Allows for the use of imports
|
6
|
-
},
|
7
|
-
"extends": ["plugin:@typescript-eslint/recommended"],
|
8
|
-
"env": {
|
9
|
-
"node": true // Enable Node.js global variables
|
10
|
-
},
|
11
|
-
"rules": {
|
12
|
-
"no-console": "off",
|
13
|
-
"import/prefer-default-export": "off",
|
14
|
-
"@typescript-eslint/no-unused-vars": "warn"
|
15
|
-
}
|
16
|
-
}
|
package/.eslintrc.js
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
module.exports = {
|
2
|
-
parser: "@typescript-eslint/parser",
|
3
|
-
plugins: ["@typescript-eslint"],
|
4
|
-
|
5
|
-
parserOptions: {
|
6
|
-
ecmaVersion: "latest", // Allows the use of modern ECMAScript features
|
7
|
-
sourceType: "module", // Allows for the use of imports
|
8
|
-
},
|
9
|
-
|
10
|
-
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
|
11
|
-
env: {
|
12
|
-
node: true, // Enable Node.js global variables
|
13
|
-
},
|
14
|
-
rules: {
|
15
|
-
"no-console": "off",
|
16
|
-
"@typescript-eslint/no-explicit-any": "off",
|
17
|
-
"@typescript-eslint/no-var-requires": "off",
|
18
|
-
"@typescript-eslint/explicit-module-boundary-types": "off",
|
19
|
-
"import/prefer-default-export": "off",
|
20
|
-
"@typescript-eslint/no-unused-vars": "warn",
|
21
|
-
"no-useless-catch": "off",
|
22
|
-
"@typescript-eslint/no-non-null-assertion": "off",
|
23
|
-
"@typescript-eslint/no-empty-function": "off",
|
24
|
-
"@typescript-eslint/no-empty-interface": "off",
|
25
|
-
"@typescript-eslint/no-inferrable-types": "off",
|
26
|
-
"@typescript-eslint/no-namespace": "off",
|
27
|
-
"@typescript-eslint/no-use-before-define": "off",
|
28
|
-
"@typescript-eslint/no-unsafe-assignment": "off",
|
29
|
-
"@typescript-eslint/no-unsafe-call": "off",
|
30
|
-
"@typescript-eslint/no-unsafe-member-access": "off",
|
31
|
-
"@typescript-eslint/no-unsafe-return": "off",
|
32
|
-
"@typescript-eslint/restrict-template-expressions": "off",
|
33
|
-
"no-useless-escape": "off",
|
34
|
-
},
|
35
|
-
};
|