@decaf-ts/core 0.30.0 → 0.30.2
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/README.md +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +1 -1
- package/dist/core.js.map +1 -1
- package/lib/cjs/auth/decorators.cjs +9 -1
- package/lib/cjs/auth/decorators.cjs.map +1 -1
- package/lib/cjs/index.cjs +3 -3
- package/lib/cjs/persistence/constants.cjs +6 -0
- package/lib/cjs/persistence/constants.cjs.map +1 -1
- package/lib/cjs/services/ModelService.cjs +122 -30
- package/lib/cjs/services/ModelService.cjs.map +1 -1
- package/lib/cjs/tasks/TaskEngine.cjs +5 -0
- package/lib/cjs/tasks/TaskEngine.cjs.map +1 -1
- package/lib/cjs/tasks/logging.cjs +3 -0
- package/lib/cjs/tasks/logging.cjs.map +1 -1
- package/lib/esm/auth/decorators.js +9 -1
- package/lib/esm/auth/decorators.js.map +1 -1
- package/lib/esm/index.js +3 -3
- package/lib/esm/persistence/constants.js +6 -0
- package/lib/esm/persistence/constants.js.map +1 -1
- package/lib/esm/services/ModelService.js +122 -30
- package/lib/esm/services/ModelService.js.map +1 -1
- package/lib/esm/tasks/TaskEngine.js +5 -0
- package/lib/esm/tasks/TaskEngine.js.map +1 -1
- package/lib/esm/tasks/logging.js +3 -0
- package/lib/esm/tasks/logging.js.map +1 -1
- package/lib/types/index.d.cts +3 -3
- package/lib/types/index.d.mts +3 -3
- package/lib/types/persistence/constants.d.cts +6 -0
- package/lib/types/persistence/constants.d.mts +6 -0
- package/lib/types/tasks/logging.d.cts +15 -0
- package/lib/types/tasks/logging.d.mts +15 -0
- package/package.json +2 -1
package/lib/types/index.d.cts
CHANGED
|
@@ -24,21 +24,21 @@ export * from "./persistence/index.d.cts";
|
|
|
24
24
|
* @const VERSION
|
|
25
25
|
* @memberOf module:core
|
|
26
26
|
*/
|
|
27
|
-
export declare const VERSION = "0.
|
|
27
|
+
export declare const VERSION = "0.30.1";
|
|
28
28
|
/**
|
|
29
29
|
* @description Represents the current commit hash of the module build.
|
|
30
30
|
* @summary Stores the current git commit hash for the package. The build replaces
|
|
31
31
|
* the placeholder with the actual commit hash at publish time.
|
|
32
32
|
* @const COMMIT
|
|
33
33
|
*/
|
|
34
|
-
export declare const COMMIT = "
|
|
34
|
+
export declare const COMMIT = "5b0ad63";
|
|
35
35
|
/**
|
|
36
36
|
* @description Represents the full version string of the module.
|
|
37
37
|
* @summary Stores the semver version and commit hash for the package.
|
|
38
38
|
* The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
|
|
39
39
|
* @const FULL_VERSION
|
|
40
40
|
*/
|
|
41
|
-
export declare const FULL_VERSION = "0.
|
|
41
|
+
export declare const FULL_VERSION = "0.30.1-5b0ad63";
|
|
42
42
|
/**
|
|
43
43
|
* @description Stores the current package version
|
|
44
44
|
* @summary A constant representing the version of the core package
|
package/lib/types/index.d.mts
CHANGED
|
@@ -24,21 +24,21 @@ export * from "./persistence/index.d.mts";
|
|
|
24
24
|
* @const VERSION
|
|
25
25
|
* @memberOf module:core
|
|
26
26
|
*/
|
|
27
|
-
export declare const VERSION = "0.
|
|
27
|
+
export declare const VERSION = "0.30.1";
|
|
28
28
|
/**
|
|
29
29
|
* @description Represents the current commit hash of the module build.
|
|
30
30
|
* @summary Stores the current git commit hash for the package. The build replaces
|
|
31
31
|
* the placeholder with the actual commit hash at publish time.
|
|
32
32
|
* @const COMMIT
|
|
33
33
|
*/
|
|
34
|
-
export declare const COMMIT = "
|
|
34
|
+
export declare const COMMIT = "5b0ad63";
|
|
35
35
|
/**
|
|
36
36
|
* @description Represents the full version string of the module.
|
|
37
37
|
* @summary Stores the semver version and commit hash for the package.
|
|
38
38
|
* The build replaces the placeholder with the actual `<version>-<commit>` value at publish time.
|
|
39
39
|
* @const FULL_VERSION
|
|
40
40
|
*/
|
|
41
|
-
export declare const FULL_VERSION = "0.
|
|
41
|
+
export declare const FULL_VERSION = "0.30.1-5b0ad63";
|
|
42
42
|
/**
|
|
43
43
|
* @description Stores the current package version
|
|
44
44
|
* @summary A constant representing the version of the core package
|
|
@@ -60,12 +60,18 @@ export declare enum PersistenceKeys {
|
|
|
60
60
|
MIGRATION = "migration",
|
|
61
61
|
STATEMENT = "statement",
|
|
62
62
|
QUERY = "query",
|
|
63
|
+
/** @description Action log grouping for value-based scans over a model's records (findOneBy/findBy/findByPaginate) */
|
|
64
|
+
TABLE_SCAN = "table-scan",
|
|
65
|
+
/** @description Action log grouping for dynamic dispatch to `@prepared()`/`@query()`-decorated repository methods */
|
|
66
|
+
PREPARED_STATEMENT = "prepared-statement",
|
|
63
67
|
UUID = "uuid",
|
|
64
68
|
TAG_FOR_DELETION = "tag_for_deletion",
|
|
65
69
|
INITIALIZATION = "initialization",
|
|
66
70
|
SHUTDOWN = "shutdown",
|
|
67
71
|
BY_KEY = "by-key",
|
|
68
72
|
AUTH = "auth",
|
|
73
|
+
/** @description Action log key for authorization/authentication failures - the inverse of {@link PersistenceKeys.AUTH} */
|
|
74
|
+
FORBIDDEN = "forbidden",
|
|
69
75
|
AUTH_ROLE = "auth-role",
|
|
70
76
|
DECAF_ROUTE = "DecafRoute",
|
|
71
77
|
THROTTLE = "throttle",
|
|
@@ -60,12 +60,18 @@ export declare enum PersistenceKeys {
|
|
|
60
60
|
MIGRATION = "migration",
|
|
61
61
|
STATEMENT = "statement",
|
|
62
62
|
QUERY = "query",
|
|
63
|
+
/** @description Action log grouping for value-based scans over a model's records (findOneBy/findBy/findByPaginate) */
|
|
64
|
+
TABLE_SCAN = "table-scan",
|
|
65
|
+
/** @description Action log grouping for dynamic dispatch to `@prepared()`/`@query()`-decorated repository methods */
|
|
66
|
+
PREPARED_STATEMENT = "prepared-statement",
|
|
63
67
|
UUID = "uuid",
|
|
64
68
|
TAG_FOR_DELETION = "tag_for_deletion",
|
|
65
69
|
INITIALIZATION = "initialization",
|
|
66
70
|
SHUTDOWN = "shutdown",
|
|
67
71
|
BY_KEY = "by-key",
|
|
68
72
|
AUTH = "auth",
|
|
73
|
+
/** @description Action log key for authorization/authentication failures - the inverse of {@link PersistenceKeys.AUTH} */
|
|
74
|
+
FORBIDDEN = "forbidden",
|
|
69
75
|
AUTH_ROLE = "auth-role",
|
|
70
76
|
DECAF_ROUTE = "DecafRoute",
|
|
71
77
|
THROTTLE = "throttle",
|
|
@@ -11,6 +11,21 @@ export declare class TaskLogger<LOG extends Logger> implements Logger {
|
|
|
11
11
|
flush<PIPE extends LogPipe>(pipe?: PIPE): PIPE extends LogPipe ? Promise<[LogLevel, string, any][]> : [LogLevel, string, any][];
|
|
12
12
|
readonly root: string[];
|
|
13
13
|
benchmark(msg: StringLike): void;
|
|
14
|
+
/**
|
|
15
|
+
* @description Logs a named action event (delegated to the wrapped logger).
|
|
16
|
+
* @summary {@link TaskLogger} does not track `action()` events in its
|
|
17
|
+
* in-memory history — the call is forwarded verbatim to the underlying
|
|
18
|
+
* {@link Logger.action} implementation, which owns action-level handling.
|
|
19
|
+
* Because only the single wrapped call is proxied, the entire received
|
|
20
|
+
* argument set including the optional status code is passed through.
|
|
21
|
+
* @param {string} action The name of the action being recorded.
|
|
22
|
+
* @param {number} [code] Optional integer code annotating the action outcome.
|
|
23
|
+
* @param {LogMeta} [meta] Optional structured metadata for the action.
|
|
24
|
+
* @memberOf module:tasks.TaskLogger
|
|
25
|
+
* @method action
|
|
26
|
+
*/
|
|
27
|
+
action(action: string, meta?: LogMeta): void;
|
|
28
|
+
action(action: string, code: number, meta?: LogMeta): void;
|
|
14
29
|
clear(): this;
|
|
15
30
|
debug(msg: StringLike, meta?: LogMeta): void;
|
|
16
31
|
error(msg: StringLike | Error, e?: Error | LogMeta, meta?: LogMeta): void;
|
|
@@ -11,6 +11,21 @@ export declare class TaskLogger<LOG extends Logger> implements Logger {
|
|
|
11
11
|
flush<PIPE extends LogPipe>(pipe?: PIPE): PIPE extends LogPipe ? Promise<[LogLevel, string, any][]> : [LogLevel, string, any][];
|
|
12
12
|
readonly root: string[];
|
|
13
13
|
benchmark(msg: StringLike): void;
|
|
14
|
+
/**
|
|
15
|
+
* @description Logs a named action event (delegated to the wrapped logger).
|
|
16
|
+
* @summary {@link TaskLogger} does not track `action()` events in its
|
|
17
|
+
* in-memory history — the call is forwarded verbatim to the underlying
|
|
18
|
+
* {@link Logger.action} implementation, which owns action-level handling.
|
|
19
|
+
* Because only the single wrapped call is proxied, the entire received
|
|
20
|
+
* argument set including the optional status code is passed through.
|
|
21
|
+
* @param {string} action The name of the action being recorded.
|
|
22
|
+
* @param {number} [code] Optional integer code annotating the action outcome.
|
|
23
|
+
* @param {LogMeta} [meta] Optional structured metadata for the action.
|
|
24
|
+
* @memberOf module:tasks.TaskLogger
|
|
25
|
+
* @method action
|
|
26
|
+
*/
|
|
27
|
+
action(action: string, meta?: LogMeta): void;
|
|
28
|
+
action(action: string, code: number, meta?: LogMeta): void;
|
|
14
29
|
clear(): this;
|
|
15
30
|
debug(msg: StringLike, meta?: LogMeta): void;
|
|
16
31
|
error(msg: StringLike | Error, e?: Error | LogMeta, meta?: LogMeta): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decaf-ts/core",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.2",
|
|
4
4
|
"description": "Core persistence module for the decaf framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
"repo:setup": "codex exec \"$(cat ./.codex/prompts/repo-setup.md)\nbase_path is ./\"",
|
|
115
115
|
"repo:doc": "codex exec \"$(cat ./.codex/prompts/doc.md) $(cat ./.codex/prompts/bulk-docs.md)\nbase_path is ./\"",
|
|
116
116
|
"repo:tests": "codex exec \"$(cat ./.codex/prompts/bulk-tests.md)\nbase_path is ./ and coverage is 95%\" -s workspace-write",
|
|
117
|
+
"prepare-it-tests": "echo \"prepare-it-tests: no infra to boot\"",
|
|
117
118
|
"repo:readme": "codex exec \"$(cat ./.codex/prompts/update-readme.md)\nbase_path is ./\"",
|
|
118
119
|
"repo:pr": "npm run repo:doc && npm run repo:tests && npm run repo:readme",
|
|
119
120
|
"sync-codex": "./bin/sync-codex.sh"
|