@maiyunnet/kebab 7.1.0 → 7.1.2
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 +1 -1
- package/index.js +1 -1
- package/lib/kv.d.ts +6 -1
- package/lib/kv.js +5 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* --- 本文件用来定义每个目录实体地址的常量 ---
|
|
7
7
|
*/
|
|
8
8
|
/** --- 当前系统版本号 --- */
|
|
9
|
-
export const VER = '7.1.
|
|
9
|
+
export const VER = '7.1.2';
|
|
10
10
|
// --- 服务端用的路径 ---
|
|
11
11
|
const imu = decodeURIComponent(import.meta.url).replace('file://', '').replace(/^\/(\w:)/, '$1');
|
|
12
12
|
/** --- /xxx/xxx --- */
|
package/lib/kv.d.ts
CHANGED
|
@@ -280,8 +280,13 @@ export declare class Kv {
|
|
|
280
280
|
/**
|
|
281
281
|
* --- 获取 Kv 对象 ---
|
|
282
282
|
* @param ctrEtc 控制器或配置信息
|
|
283
|
+
* @param oetc 可用来覆盖 ctr 的一些选项,如 index
|
|
283
284
|
*/
|
|
284
|
-
export declare function get(ctrEtc: sCtr.Ctr | kebab.IConfigKv
|
|
285
|
+
export declare function get(ctrEtc: sCtr.Ctr | kebab.IConfigKv, oetc?: {
|
|
286
|
+
'index'?: number;
|
|
287
|
+
'user'?: string;
|
|
288
|
+
'pwd'?: string;
|
|
289
|
+
}): Kv;
|
|
285
290
|
/** --- 连接信息 --- */
|
|
286
291
|
export interface IConnectionInfo {
|
|
287
292
|
'host': string;
|
package/lib/kv.js
CHANGED
|
@@ -816,8 +816,12 @@ end`;
|
|
|
816
816
|
/**
|
|
817
817
|
* --- 获取 Kv 对象 ---
|
|
818
818
|
* @param ctrEtc 控制器或配置信息
|
|
819
|
+
* @param oetc 可用来覆盖 ctr 的一些选项,如 index
|
|
819
820
|
*/
|
|
820
|
-
export function get(ctrEtc) {
|
|
821
|
+
export function get(ctrEtc, oetc) {
|
|
821
822
|
const etc = ctrEtc instanceof sCtr.Ctr ? ctrEtc.getPrototype('_config').kv : ctrEtc;
|
|
823
|
+
if (oetc) {
|
|
824
|
+
Object.assign(etc, oetc);
|
|
825
|
+
}
|
|
822
826
|
return new Kv(etc);
|
|
823
827
|
}
|