tego 1.3.46 → 1.3.48
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/lib/utils.js +3 -0
- package/package.json +15 -15
- package/presets/.env.example +7 -0
- package/src/utils.ts +8 -0
package/lib/utils.js
CHANGED
|
@@ -99,6 +99,9 @@ function parseEnvironment() {
|
|
|
99
99
|
(0, import_dotenv.config)({
|
|
100
100
|
path: (0, import_node_path.resolve)(process.cwd(), process.env.APP_ENV_PATH || ".env")
|
|
101
101
|
});
|
|
102
|
+
if (!process.env.TEGO_RUNTIME_HOME && !process.env.TEGO_RUNTIME_NAME && import_node_fs.default.existsSync((0, import_node_path.resolve)(process.cwd(), "storage"))) {
|
|
103
|
+
process.env.TEGO_RUNTIME_HOME = (0, import_node_path.resolve)(process.cwd(), "storage");
|
|
104
|
+
}
|
|
102
105
|
for (const key in env) {
|
|
103
106
|
if (!process.env[key]) {
|
|
104
107
|
process.env[key] = env[key];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tego",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.48",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tego",
|
|
@@ -49,20 +49,20 @@
|
|
|
49
49
|
"umzug": "3.8.2",
|
|
50
50
|
"winston": "3.17.0",
|
|
51
51
|
"winston-daily-rotate-file": "^5.0.0",
|
|
52
|
-
"@tachybase/acl": "1.3.
|
|
53
|
-
"@tachybase/
|
|
54
|
-
"@tachybase/
|
|
55
|
-
"@tachybase/
|
|
56
|
-
"@tachybase/
|
|
57
|
-
"@tachybase/
|
|
58
|
-
"@tachybase/
|
|
59
|
-
"@tachybase/
|
|
60
|
-
"@tachybase/loader": "1.3.
|
|
61
|
-
"@tachybase/logger": "1.3.
|
|
62
|
-
"@tachybase/resourcer": "1.3.
|
|
63
|
-
"@tachybase/
|
|
64
|
-
"@tachybase/
|
|
65
|
-
"@tego/core": "1.3.
|
|
52
|
+
"@tachybase/acl": "1.3.48",
|
|
53
|
+
"@tachybase/actions": "1.3.48",
|
|
54
|
+
"@tachybase/auth": "1.3.48",
|
|
55
|
+
"@tachybase/data-source": "1.3.48",
|
|
56
|
+
"@tachybase/cache": "1.3.48",
|
|
57
|
+
"@tachybase/database": "1.3.48",
|
|
58
|
+
"@tachybase/evaluators": "1.3.48",
|
|
59
|
+
"@tachybase/globals": "1.3.48",
|
|
60
|
+
"@tachybase/loader": "1.3.48",
|
|
61
|
+
"@tachybase/logger": "1.3.48",
|
|
62
|
+
"@tachybase/resourcer": "1.3.48",
|
|
63
|
+
"@tachybase/utils": "1.3.48",
|
|
64
|
+
"@tachybase/schema": "1.3.48",
|
|
65
|
+
"@tego/core": "1.3.48"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/lodash": "4.17.20",
|
package/presets/.env.example
CHANGED
|
@@ -3,6 +3,13 @@ APP_ENV=development
|
|
|
3
3
|
APP_PORT=3000
|
|
4
4
|
APP_KEY=test-key
|
|
5
5
|
|
|
6
|
+
# 默认为 ~/.tego
|
|
7
|
+
TEGO_HOME=
|
|
8
|
+
# 默认为 current
|
|
9
|
+
TEGO_RUNTIME_NAME=
|
|
10
|
+
# 默认为 ~/.tego/current,设置后会覆盖 TEGO_RUNTIME_NAME
|
|
11
|
+
TEGO_RUNTIME_HOME=
|
|
12
|
+
|
|
6
13
|
# experimental support
|
|
7
14
|
EXTENSION_UI_BASE_PATH=/adapters/
|
|
8
15
|
|
package/src/utils.ts
CHANGED
|
@@ -73,6 +73,14 @@ export function parseEnvironment() {
|
|
|
73
73
|
path: resolve(process.cwd(), process.env.APP_ENV_PATH || '.env'),
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
+
if (
|
|
77
|
+
!process.env.TEGO_RUNTIME_HOME &&
|
|
78
|
+
!process.env.TEGO_RUNTIME_NAME &&
|
|
79
|
+
fs.existsSync(resolve(process.cwd(), 'storage'))
|
|
80
|
+
) {
|
|
81
|
+
process.env.TEGO_RUNTIME_HOME = resolve(process.cwd(), 'storage');
|
|
82
|
+
}
|
|
83
|
+
|
|
76
84
|
for (const key in env) {
|
|
77
85
|
if (!process.env[key]) {
|
|
78
86
|
process.env[key] = env[key];
|