@maiyunnet/kebab 2.0.12 → 2.0.14

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/index.d.ts CHANGED
@@ -8,7 +8,7 @@
8
8
  * ------------------------
9
9
  */
10
10
  /** --- 当前系统版本号 --- */
11
- export declare const VER = "2.0.12";
11
+ export declare const VER = "2.0.14";
12
12
  /** --- 框架根目录,以 / 结尾 --- */
13
13
  export declare const ROOT_PATH: string;
14
14
  export declare const LIB_PATH: string;
package/index.js CHANGED
@@ -11,7 +11,7 @@
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.MOD_CWD = exports.FTMP_CWD = exports.IND_CWD = exports.WWW_CWD = exports.LOG_CWD = exports.LIB_CWD = exports.VHOST_CWD = exports.CERT_CWD = exports.CONF_CWD = exports.ROOT_CWD = exports.SYS_PATH = exports.LIB_PATH = exports.ROOT_PATH = exports.VER = void 0;
13
13
  /** --- 当前系统版本号 --- */
14
- exports.VER = '2.0.12';
14
+ exports.VER = '2.0.14';
15
15
  // --- 服务端用的路径 ---
16
16
  /** --- /xxx/xxx --- */
17
17
  const dirname = __dirname.replace(/\\/g, '/');
package/lib/kv.js CHANGED
@@ -1354,9 +1354,7 @@ exports.Connection = Connection;
1354
1354
  * @param etc 配置信息可留空
1355
1355
  */
1356
1356
  function get(ctr, etc) {
1357
- if (!etc) {
1358
- etc = ctr.getPrototype('_config').kv;
1359
- }
1357
+ etc ??= ctr.getPrototype('_config').kv;
1360
1358
  return new Pool(ctr, etc);
1361
1359
  }
1362
1360
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maiyunnet/kebab",
3
- "version": "2.0.12",
3
+ "version": "2.0.14",
4
4
  "description": "Simple, easy-to-use, and fully-featured Node.js framework that is ready-to-use out of the box.",
5
5
  "keywords": [
6
6
  "kebab",
package/sys/ctr.js CHANGED
@@ -235,7 +235,7 @@ class Ctr {
235
235
  data.l = (key, data) => {
236
236
  return this._l(key, data);
237
237
  };
238
- return lCore.purify(ejs.render(content, data));
238
+ return lCore.purify(ejs.render(content, data, {}));
239
239
  }
240
240
  /**
241
241
  * --- 检测提交的数据类型 ---
@@ -249,7 +249,8 @@ class default_1 extends sCtr.Ctr {
249
249
  }
250
250
  view() {
251
251
  return this._loadView('test', {
252
- 'test': 'ok'
252
+ 'test': 'ok',
253
+ 'debug': true,
253
254
  });
254
255
  }
255
256
  json() {
@@ -4,6 +4,7 @@
4
4
  </head>
5
5
  <body>
6
6
  Data: <%= test %><br>
7
+ debug: <%= debug ? 'true' : 'false' %><br>
7
8
  _urlBase: <%= _urlBase %><br>
8
9
  _staticVer: <%= _staticVer %><br>
9
10
  _staticPath: <%= _staticPath %>