tego 1.3.46 → 1.3.47

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 CHANGED
@@ -106,6 +106,9 @@ function parseEnvironment() {
106
106
  }
107
107
  if (!process.env.TEGO_RUNTIME_HOME) {
108
108
  process.env.TEGO_RUNTIME_HOME = (0, import_node_path.join)(process.env.TEGO_HOME, process.env.TEGO_RUNTIME_NAME);
109
+ if (!process.env.TEGO_RUNTIME_NAME && import_node_fs.default.existsSync((0, import_node_path.resolve)(process.cwd(), "storage"))) {
110
+ process.env.TEGO_RUNTIME_HOME = (0, import_node_path.resolve)(process.cwd(), "storage");
111
+ }
109
112
  }
110
113
  if (!process.env.__env_modified__ && process.env.APP_PUBLIC_PATH) {
111
114
  const publicPath = process.env.APP_PUBLIC_PATH.replace(/\/$/g, "");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tego",
3
- "version": "1.3.46",
3
+ "version": "1.3.47",
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.46",
53
- "@tachybase/auth": "1.3.46",
54
- "@tachybase/cache": "1.3.46",
55
- "@tachybase/database": "1.3.46",
56
- "@tachybase/data-source": "1.3.46",
57
- "@tachybase/evaluators": "1.3.46",
58
- "@tachybase/globals": "1.3.46",
59
- "@tachybase/actions": "1.3.46",
60
- "@tachybase/loader": "1.3.46",
61
- "@tachybase/logger": "1.3.46",
62
- "@tachybase/resourcer": "1.3.46",
63
- "@tachybase/schema": "1.3.46",
64
- "@tachybase/utils": "1.3.46",
65
- "@tego/core": "1.3.46"
52
+ "@tachybase/acl": "1.3.47",
53
+ "@tachybase/actions": "1.3.47",
54
+ "@tachybase/auth": "1.3.47",
55
+ "@tachybase/cache": "1.3.47",
56
+ "@tachybase/data-source": "1.3.47",
57
+ "@tachybase/evaluators": "1.3.47",
58
+ "@tachybase/globals": "1.3.47",
59
+ "@tachybase/loader": "1.3.47",
60
+ "@tachybase/logger": "1.3.47",
61
+ "@tachybase/resourcer": "1.3.47",
62
+ "@tachybase/schema": "1.3.47",
63
+ "@tachybase/utils": "1.3.47",
64
+ "@tachybase/database": "1.3.47",
65
+ "@tego/core": "1.3.47"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/lodash": "4.17.20",
@@ -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
@@ -81,6 +81,10 @@ export function parseEnvironment() {
81
81
 
82
82
  if (!process.env.TEGO_RUNTIME_HOME) {
83
83
  process.env.TEGO_RUNTIME_HOME = join(process.env.TEGO_HOME!, process.env.TEGO_RUNTIME_NAME!);
84
+ // 兼容旧版本过的用户
85
+ if (!process.env.TEGO_RUNTIME_NAME && fs.existsSync(resolve(process.cwd(), 'storage'))) {
86
+ process.env.TEGO_RUNTIME_HOME = resolve(process.cwd(), 'storage');
87
+ }
84
88
  }
85
89
 
86
90
  if (!process.env.__env_modified__ && process.env.APP_PUBLIC_PATH) {