@x-9lab/xlab 1.0.11 → 1.0.13

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
@@ -14,6 +14,10 @@ X-9lab 通用服务端
14
14
  }
15
15
  }
16
16
  ```
17
+ - 支持传入 `APP_NAME` 参数,可用于解决诸如同个服务器上有多个实例运行时的识别问题
18
+ ```bash
19
+ xlab --APP_NAME=nice
20
+ ```
17
21
  - 配置文件 `xlab.config.js`
18
22
  模块会自动检测执行根目录中是否存在 `xlab.config.js` 文件。如存在该文件则会使用该文件为模块的启动配置文件。支持的配置项:
19
23
  1. `watch` 是否开启 watch 模式
package/dist/bin/xlab CHANGED
@@ -5,9 +5,11 @@ const { merge, isString } = require("@x-drive/utils");
5
5
  const XConfig = require("../default-x-config").default;
6
6
  const Liftoff = require("liftoff");
7
7
 
8
+ const { APP_NAME } = argv;
9
+
8
10
  const cli = new Liftoff({
9
11
  "name": "x-lab"
10
- , "processTitle": "X Lab"
12
+ , "processTitle": APP_NAME ? `${APP_NAME}@XLab` : "XLab"
11
13
  , "moduleName": "xlab"
12
14
  , "configName": "xlab.config"
13
15
  , "extensions": {
@@ -55,7 +55,7 @@ Object.keys(returnCode).forEach(function(key) {
55
55
  }
56
56
  processorData[key] = dat;
57
57
  });
58
- return (0, _utils.labelReplace)(html, processorData);
58
+ return (0, _utils.labelReplace)(html, processorData, true);
59
59
  }
60
60
  return html;
61
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-9lab/xlab",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "description": "9lab 服务端模块",
5
5
  "versionDesc": "originHost 现在所有请求都会带上",
6
6
  "scripts": {