@samet-it/be-base-common 1.0.5 → 1.0.9
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
CHANGED
|
@@ -28,12 +28,22 @@ npm i @samet-it/be-base-common
|
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
## Environments
|
|
31
|
-
- [
|
|
31
|
+
- [BaseCommon](./src/config/base-common.config.ts)
|
|
32
32
|
|
|
33
|
-
| Name | Type | Default
|
|
34
|
-
|
|
35
|
-
| `NODE_ENV` | enum |
|
|
36
|
-
| `LOG_LEVEL` | enum |
|
|
33
|
+
| Name | Type | Default | Required | Secret | Description |
|
|
34
|
+
|-------------|------|---------------|----------|--------|---------------------|
|
|
35
|
+
| `NODE_ENV` | enum | _development_ | | | Environment |
|
|
36
|
+
| `LOG_LEVEL` | enum | _info_ | | | Log Level, severity |
|
|
37
|
+
|
|
38
|
+
### System Values
|
|
39
|
+
|
|
40
|
+
| Name | Type | Description |
|
|
41
|
+
|---------------------------|--------|-----------------|
|
|
42
|
+
| `npm_package_name` | string | Package name |
|
|
43
|
+
| `npm_package_version` | string | Package version |
|
|
44
|
+
| `npm_config_npm_version` | string | NPM version |
|
|
45
|
+
| `npm_config_node_version` | string | Node version |
|
|
46
|
+
| `PWD` | string | Project path |
|
|
37
47
|
|
|
38
48
|
## Contents
|
|
39
49
|
- [errorHandler](./src/error/error.handler.ts)
|
|
@@ -57,7 +67,6 @@ git clone https://github.com/samet-digital/be-base-common.git -b development
|
|
|
57
67
|
- `@leyyo/*`: leyyo utilities
|
|
58
68
|
- `stacktrace-parser`: error stack trace parser
|
|
59
69
|
|
|
60
|
-
|
|
61
70
|
## Commands
|
|
62
71
|
- [Component Commands](https://github.com/samet-digital/help/blob/main/commands-component.MD)
|
|
63
72
|
|
|
@@ -79,4 +88,4 @@ git clone https://github.com/samet-digital/be-base-common.git -b development
|
|
|
79
88
|
| 2025-04-27 | Mustafa Yelmer | _Created_ | ~~[none](./)~~ |
|
|
80
89
|
| 2025-08-12 | Mustafa Yelmer | _Refactored_ | ~~[none](./)~~ |
|
|
81
90
|
| 2025-08-14 | Mustafa Yelmer | _Documented_ | ~~[none](./)~~ |
|
|
82
|
-
| 2026-01-08 | Mustafa Yelmer |
|
|
91
|
+
| 2026-01-08 | Mustafa Yelmer | _Refactored_ | ~~[none](./)~~ |
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { BaseCommonConf } from "./index.types";
|
|
2
|
-
export declare const baseCommonConfig: import("@leyyo/env").
|
|
2
|
+
export declare const baseCommonConfig: import("@leyyo/env").EnvScopeRuntime<BaseCommonConf>;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.baseCommonConfig = void 0;
|
|
4
5
|
const env_1 = require("@leyyo/env");
|
|
5
6
|
const common_1 = require("@leyyo/common");
|
|
6
7
|
// noinspection JSUnusedGlobalSymbols
|
|
7
|
-
exports.baseCommonConfig = env_1.envCore.
|
|
8
|
-
.
|
|
9
|
-
.
|
|
8
|
+
exports.baseCommonConfig = env_1.envCore.configure
|
|
9
|
+
.scope('BaseCommon')
|
|
10
|
+
.begin
|
|
11
|
+
.field('NODE_ENV').literal(common_1.EnvironmentItems).required().def('development').end
|
|
12
|
+
.field('LOG_LEVEL').literal(common_1.LogLevelItems).required().def('info').end
|
|
13
|
+
.field('npm_config_node_version').string().def((_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node).end
|
|
14
|
+
.field('npm_package_name').string().end
|
|
15
|
+
.field('npm_package_version').string().end
|
|
16
|
+
.field('npm_config_npm_version').string().end
|
|
17
|
+
.field('PWD').string().end
|
|
18
|
+
.end;
|
|
@@ -5,8 +5,32 @@ export declare namespace NodeJS {
|
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
export interface BaseCommonConf extends EnvBase {
|
|
8
|
+
/**
|
|
9
|
+
* Environment
|
|
10
|
+
* */
|
|
8
11
|
readonly NODE_ENV: Environment;
|
|
12
|
+
/**
|
|
13
|
+
* Log Level, severity
|
|
14
|
+
* */
|
|
9
15
|
readonly LOG_LEVEL: LogLevel;
|
|
16
|
+
/**
|
|
17
|
+
* Package name
|
|
18
|
+
* */
|
|
10
19
|
readonly npm_package_name: string;
|
|
20
|
+
/**
|
|
21
|
+
* Package version
|
|
22
|
+
* */
|
|
11
23
|
readonly npm_package_version: string;
|
|
24
|
+
/**
|
|
25
|
+
* NPM version
|
|
26
|
+
* */
|
|
27
|
+
readonly npm_config_npm_version: string;
|
|
28
|
+
/**
|
|
29
|
+
* Node version
|
|
30
|
+
* */
|
|
31
|
+
readonly npm_config_node_version: string;
|
|
32
|
+
/**
|
|
33
|
+
* Project folder
|
|
34
|
+
* */
|
|
35
|
+
readonly PWD: string;
|
|
12
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@samet-it/be-base-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Backend Base Common",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@leyyo/common": "^1.0.13",
|
|
67
|
-
"@leyyo/env": "^1.0.
|
|
67
|
+
"@leyyo/env": "^1.0.13",
|
|
68
68
|
"stacktrace-parser": "^0.1.11"
|
|
69
69
|
}
|
|
70
70
|
}
|