node-karin 0.10.2 → 0.10.3

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/cli/init.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { KarinInit } from '../utils/core/init.js'
2
+ import { KarinCfgInit } from '../core/init/config.js'
3
3
  /**
4
4
  * 休眠函数
5
5
  * @param ms 毫秒
@@ -11,7 +11,7 @@ async function main () {
11
11
  /** 捕获错误 打印日志 */
12
12
  process.on('uncaughtException', err => console.error(err))
13
13
  process.on('unhandledRejection', err => console.error(err))
14
- const init = new KarinInit()
14
+ const init = new KarinCfgInit()
15
15
  init.init()
16
16
  await sleep(1000)
17
17
  const pkg = init.getRegistry()
package/lib/cli/karin.js CHANGED
@@ -6,7 +6,7 @@ import axios from 'axios'
6
6
  import { fileURLToPath } from 'url'
7
7
  import { program } from 'commander'
8
8
  import { exec as execCmd, spawn } from 'child_process'
9
- import { KarinInit } from '../utils/core/init.js'
9
+ import { KarinCfgInit } from '../core/init/config.js'
10
10
  class KarinCli {
11
11
  child
12
12
  filename
@@ -194,7 +194,7 @@ class KarinCli {
194
194
  let cmd = ''
195
195
  const list = Object.keys(this.pkg(false).dependencies).filter(key => !pkgdependencies.includes(key))
196
196
  /** 获取包管理器 */
197
- const pkg = new KarinInit().getRegistry()
197
+ const pkg = new KarinCfgInit().getRegistry()
198
198
  switch (pkg) {
199
199
  case 'pnpm': {
200
200
  cmd = 'pnpm update'
@@ -1,4 +1,4 @@
1
- export declare class KarinInit {
1
+ export declare class KarinCfgInit {
2
2
  /**
3
3
  * 基础目录
4
4
  */
@@ -1,8 +1,9 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
3
  import { exec } from 'child_process';
4
- import { karinDir } from '../../core/index.js';
5
- export class KarinInit {
4
+ /** 必须详细指向根文件 否则会导致模块乱导入 */
5
+ import { karinDir } from '../../core/init/dir.js';
6
+ export class KarinCfgInit {
6
7
  /**
7
8
  * 基础目录
8
9
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-karin",
3
- "version": "0.10.2",
3
+ "version": "0.10.3",
4
4
  "private": false,
5
5
  "description": "基于 Kritor 进行开发的nodejs机器人框架",
6
6
  "homepage": "https://github.com/KarinJS/Karin",