@nocobase/cli-v1 2.1.0-beta.23 → 2.1.0-beta.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/cli-v1",
3
- "version": "2.1.0-beta.23",
3
+ "version": "2.1.0-beta.25",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./src/index.js",
@@ -8,9 +8,9 @@
8
8
  "nocobase-v1": "./bin/index.js"
9
9
  },
10
10
  "dependencies": {
11
- "@nocobase/cli": "2.1.0-beta.23",
11
+ "@nocobase/cli": "2.1.0-beta.25",
12
12
  "@nocobase/license-kit": "^0.3.8",
13
- "@nocobase/utils": "2.1.0-beta.23",
13
+ "@nocobase/utils": "2.1.0-beta.25",
14
14
  "@types/fs-extra": "^11.0.1",
15
15
  "@umijs/utils": "3.5.20",
16
16
  "chalk": "^4.1.1",
@@ -28,12 +28,12 @@
28
28
  "tsx": "^4.19.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@nocobase/devtools": "2.1.0-beta.23"
31
+ "@nocobase/devtools": "2.1.0-beta.25"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",
35
35
  "url": "git+https://github.com/nocobase/nocobase.git",
36
36
  "directory": "packages/core/cli"
37
37
  },
38
- "gitHead": "bb4c0d3551bf9eff505b63756dd24a0813231f16"
38
+ "gitHead": "824f8b8200e9fe086135768934d3ef427b212446"
39
39
  }
@@ -57,13 +57,13 @@ function createCdnClient() {
57
57
  * @param {string} timestampDir
58
58
  */
59
59
  const REWRITE_RULES = [
60
- // /en/ 下无后缀的页面路由,去掉 /en/ 前缀并补 .html(如 /en/vector-store → /{ts}/vector-store.html)
61
- { sourceUrl: '^/en/([^.]*[^/.])$', targetTemplate: (ts) => `/${ts}/$1.html`, flag: 'break' },
62
- // 其他语言(如 /cn/)无后缀的页面路由,补 .html(如 /cn/vector-store → /{ts}/cn/vector-store.html)
63
- { sourceUrl: '^/([^.]*[^/.])$', targetTemplate: (ts) => `/${ts}/$1.html`, flag: 'break' },
64
- // /en/ 下的静态资源和目录,去掉 /en/ 前缀(如 /en/style.css → /{ts}/style.css,/en/ → /{ts}/)
60
+ // /en/ 下无后缀的页面路由,去掉 /en/ 前缀并改写到目录式 index.html
61
+ { sourceUrl: '^/en/([^.]*[^/.])$', targetTemplate: (ts) => `/${ts}/$1/index.html`, flag: 'break' },
62
+ // 其他语言和默认语言的无后缀页面路由,统一改写到目录式 index.html
63
+ { sourceUrl: '^/([^.]*[^/.])$', targetTemplate: (ts) => `/${ts}/$1/index.html`, flag: 'break' },
64
+ // /en/ 下的静态资源和目录,继续去掉 /en/ 前缀
65
65
  { sourceUrl: '^/en/(.*)', targetTemplate: (ts) => `/${ts}/$1`, flag: 'break' },
66
- // 兜底:所有其他请求加时间戳前缀(如 /cn/style.css → /{ts}/cn/style.css,/ → /{ts}/)
66
+ // 兜底:所有其他请求继续只补时间戳前缀
67
67
  { sourceUrl: '^/(.*)', targetTemplate: (ts) => `/${ts}/$1`, flag: 'break' },
68
68
  ];
69
69
 
package/src/logger.js CHANGED
@@ -63,7 +63,7 @@ function createSystemLogger({ dirname, filename, defaultMeta = {} }) {
63
63
  }
64
64
 
65
65
  const getLoggerFilePath = (...paths) => {
66
- return path.resolve(process.env.LOGGER_BASE_PATH || storagePathJoin('logs'), ...paths);
66
+ return path.resolve(storagePathJoin('logs'), ...paths);
67
67
  };
68
68
 
69
69
  const logger = createSystemLogger({
package/src/util.js CHANGED
@@ -519,7 +519,6 @@ exports.initEnv = function initEnv() {
519
519
  LOCAL_STORAGE_DEST: storagePathJoin('uploads'),
520
520
  PLUGIN_STORAGE_PATH: storagePathJoin('plugins'),
521
521
  PLAYWRIGHT_AUTH_FILE: storagePathJoin('playwright', '.auth', 'admin.json'),
522
- LOGGER_BASE_PATH: storagePathJoin('logs'),
523
522
  WATCH_FILE: storagePathJoin('app.watch.ts'),
524
523
  });
525
524