@devopsplaybook.io/common-utils 1.4.0-beta.13.4edad2b → 1.4.0
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/AGENTS.md +7 -5
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/src/{Auth.js → users/Auth.js} +1 -1
- package/dist/src/{UsersData.js → users/UsersData.js} +1 -1
- package/index.ts +6 -6
- package/package.json +1 -1
- package/src/{Auth.ts → users/Auth.ts} +1 -1
- package/src/{UsersData.ts → users/UsersData.ts} +1 -1
- /package/dist/src/{Auth.d.ts → users/Auth.d.ts} +0 -0
- /package/dist/src/{User.d.ts → users/User.d.ts} +0 -0
- /package/dist/src/{User.js → users/User.js} +0 -0
- /package/dist/src/{UserPassword.d.ts → users/UserPassword.d.ts} +0 -0
- /package/dist/src/{UserPassword.js → users/UserPassword.js} +0 -0
- /package/dist/src/{UserSession.d.ts → users/UserSession.d.ts} +0 -0
- /package/dist/src/{UserSession.js → users/UserSession.js} +0 -0
- /package/dist/src/{UsersData.d.ts → users/UsersData.d.ts} +0 -0
- /package/dist/src/{UsersRoutes.d.ts → users/UsersRoutes.d.ts} +0 -0
- /package/dist/src/{UsersRoutes.js → users/UsersRoutes.js} +0 -0
- /package/src/{User.ts → users/User.ts} +0 -0
- /package/src/{UserPassword.spec.ts → users/UserPassword.spec.ts} +0 -0
- /package/src/{UserPassword.ts → users/UserPassword.ts} +0 -0
- /package/src/{UserSession.ts → users/UserSession.ts} +0 -0
- /package/src/{UsersRoutes.ts → users/UsersRoutes.ts} +0 -0
package/AGENTS.md
CHANGED
|
@@ -20,11 +20,13 @@ src/
|
|
|
20
20
|
PostgresDbUtils.ts # PostgreSQL operations (pg.Pool, async/Promise)
|
|
21
21
|
DbUtils.ts # Unified facade dispatching to Sql or Postgres
|
|
22
22
|
DbUtilsNoTelemetry.ts # Same DB ops without OTel span overhead
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
users/ # Auth & user management module set
|
|
24
|
+
User.ts # User model, roles and application-defined scopes
|
|
25
|
+
UserSession.ts # Decoded JWT session
|
|
26
|
+
Auth.ts # JWT auth (key init, guards, session decode)
|
|
27
|
+
UserPassword.ts # bcrypt password hashing/verification
|
|
28
|
+
UsersData.ts # Users table CRUD (SQLite/Postgres)
|
|
29
|
+
UsersRoutes.ts # Standard fastify user management routes
|
|
28
30
|
SystemCommand.ts # Promise wrapper around child_process.exec
|
|
29
31
|
Timeout.ts # Promise wrapper around setTimeout
|
|
30
32
|
*.spec.ts # Co-located test files
|
package/dist/index.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ export * from "./src/PostgresDbUtils";
|
|
|
7
7
|
export * from "./src/Notifications";
|
|
8
8
|
export * from "./src/SystemCommand";
|
|
9
9
|
export * from "./src/Timeout";
|
|
10
|
-
export * from "./src/User";
|
|
11
|
-
export * from "./src/UserSession";
|
|
12
|
-
export * from "./src/Auth";
|
|
13
|
-
export * from "./src/UserPassword";
|
|
14
|
-
export * from "./src/UsersData";
|
|
15
|
-
export * from "./src/UsersRoutes";
|
|
10
|
+
export * from "./src/users/User";
|
|
11
|
+
export * from "./src/users/UserSession";
|
|
12
|
+
export * from "./src/users/Auth";
|
|
13
|
+
export * from "./src/users/UserPassword";
|
|
14
|
+
export * from "./src/users/UsersData";
|
|
15
|
+
export * from "./src/users/UsersRoutes";
|
package/dist/index.js
CHANGED
|
@@ -23,9 +23,9 @@ __exportStar(require("./src/PostgresDbUtils"), exports);
|
|
|
23
23
|
__exportStar(require("./src/Notifications"), exports);
|
|
24
24
|
__exportStar(require("./src/SystemCommand"), exports);
|
|
25
25
|
__exportStar(require("./src/Timeout"), exports);
|
|
26
|
-
__exportStar(require("./src/User"), exports);
|
|
27
|
-
__exportStar(require("./src/UserSession"), exports);
|
|
28
|
-
__exportStar(require("./src/Auth"), exports);
|
|
29
|
-
__exportStar(require("./src/UserPassword"), exports);
|
|
30
|
-
__exportStar(require("./src/UsersData"), exports);
|
|
31
|
-
__exportStar(require("./src/UsersRoutes"), exports);
|
|
26
|
+
__exportStar(require("./src/users/User"), exports);
|
|
27
|
+
__exportStar(require("./src/users/UserSession"), exports);
|
|
28
|
+
__exportStar(require("./src/users/Auth"), exports);
|
|
29
|
+
__exportStar(require("./src/users/UserPassword"), exports);
|
|
30
|
+
__exportStar(require("./src/users/UsersData"), exports);
|
|
31
|
+
__exportStar(require("./src/users/UsersRoutes"), exports);
|
|
@@ -42,7 +42,7 @@ exports.AuthHasScope = AuthHasScope;
|
|
|
42
42
|
exports.AuthGetUserSession = AuthGetUserSession;
|
|
43
43
|
const jwt = __importStar(require("jsonwebtoken"));
|
|
44
44
|
const uuid_1 = require("uuid");
|
|
45
|
-
const DbUtils_1 = require("
|
|
45
|
+
const DbUtils_1 = require("../DbUtils");
|
|
46
46
|
const User_1 = require("./User");
|
|
47
47
|
let tracer;
|
|
48
48
|
let config;
|
|
@@ -8,7 +8,7 @@ exports.UsersDataAdd = UsersDataAdd;
|
|
|
8
8
|
exports.UsersDataUpdatePassword = UsersDataUpdatePassword;
|
|
9
9
|
exports.UsersDataUpdateUser = UsersDataUpdateUser;
|
|
10
10
|
exports.UsersDataDelete = UsersDataDelete;
|
|
11
|
-
const DbUtils_1 = require("
|
|
11
|
+
const DbUtils_1 = require("../DbUtils");
|
|
12
12
|
const User_1 = require("./User");
|
|
13
13
|
let tracer;
|
|
14
14
|
/**
|
package/index.ts
CHANGED
|
@@ -7,9 +7,9 @@ export * from "./src/PostgresDbUtils";
|
|
|
7
7
|
export * from "./src/Notifications";
|
|
8
8
|
export * from "./src/SystemCommand";
|
|
9
9
|
export * from "./src/Timeout";
|
|
10
|
-
export * from "./src/User";
|
|
11
|
-
export * from "./src/UserSession";
|
|
12
|
-
export * from "./src/Auth";
|
|
13
|
-
export * from "./src/UserPassword";
|
|
14
|
-
export * from "./src/UsersData";
|
|
15
|
-
export * from "./src/UsersRoutes";
|
|
10
|
+
export * from "./src/users/User";
|
|
11
|
+
export * from "./src/users/UserSession";
|
|
12
|
+
export * from "./src/users/Auth";
|
|
13
|
+
export * from "./src/users/UserPassword";
|
|
14
|
+
export * from "./src/users/UsersData";
|
|
15
|
+
export * from "./src/users/UsersRoutes";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devopsplaybook.io/common-utils",
|
|
3
|
-
"version": "1.4.0
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Shared utility modules for devopsplaybook.io projects (DB, Config, OTel context, auth/users, notifications, system helpers)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Open Telemetry",
|
|
@@ -2,7 +2,7 @@ import { StandardTracer } from "@devopsplaybook.io/otel-utils";
|
|
|
2
2
|
import { Span } from "@opentelemetry/sdk-trace-base";
|
|
3
3
|
import * as jwt from "jsonwebtoken";
|
|
4
4
|
import { v4 as uuidv4 } from "uuid";
|
|
5
|
-
import { DbUtilsQuerySQL } from "
|
|
5
|
+
import { DbUtilsQuerySQL } from "../DbUtils";
|
|
6
6
|
import { User, UserScope } from "./User";
|
|
7
7
|
import { UserSession } from "./UserSession";
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StandardTracer } from "@devopsplaybook.io/otel-utils";
|
|
2
2
|
import { Span } from "@opentelemetry/sdk-trace-base";
|
|
3
|
-
import { DbUtilsExecSQL, DbUtilsQuerySQL } from "
|
|
3
|
+
import { DbUtilsExecSQL, DbUtilsQuerySQL } from "../DbUtils";
|
|
4
4
|
import { User } from "./User";
|
|
5
5
|
|
|
6
6
|
let tracer: StandardTracer;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|