tego 1.3.47 → 1.3.49

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
@@ -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 = process.cwd();
104
+ }
102
105
  for (const key in env) {
103
106
  if (!process.env[key]) {
104
107
  process.env[key] = env[key];
@@ -106,9 +109,6 @@ function parseEnvironment() {
106
109
  }
107
110
  if (!process.env.TEGO_RUNTIME_HOME) {
108
111
  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
- }
112
112
  }
113
113
  if (!process.env.__env_modified__ && process.env.APP_PUBLIC_PATH) {
114
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.47",
3
+ "version": "1.3.49",
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.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"
52
+ "@tachybase/acl": "1.3.49",
53
+ "@tachybase/cache": "1.3.49",
54
+ "@tachybase/data-source": "1.3.49",
55
+ "@tachybase/actions": "1.3.49",
56
+ "@tachybase/auth": "1.3.49",
57
+ "@tachybase/database": "1.3.49",
58
+ "@tachybase/globals": "1.3.49",
59
+ "@tachybase/evaluators": "1.3.49",
60
+ "@tachybase/loader": "1.3.49",
61
+ "@tachybase/logger": "1.3.49",
62
+ "@tachybase/schema": "1.3.49",
63
+ "@tego/core": "1.3.49",
64
+ "@tachybase/resourcer": "1.3.49",
65
+ "@tachybase/utils": "1.3.49"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/lodash": "4.17.20",
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 = process.cwd();
82
+ }
83
+
76
84
  for (const key in env) {
77
85
  if (!process.env[key]) {
78
86
  process.env[key] = env[key];
@@ -81,10 +89,6 @@ export function parseEnvironment() {
81
89
 
82
90
  if (!process.env.TEGO_RUNTIME_HOME) {
83
91
  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
- }
88
92
  }
89
93
 
90
94
  if (!process.env.__env_modified__ && process.env.APP_PUBLIC_PATH) {