From 76bddb3157d93745fe3cb324a17ce0de03feee2e Mon Sep 17 00:00:00 2001
From: Kuss <2360314753@qq.com>
Date: Fri, 3 Sep 2021 23:14:56 +0800
Subject: [PATCH 01/13] :bug: fix: cli -> handleServerCommand no matter what
input
---
packages/debug/src/mincud/cli.ts | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/packages/debug/src/mincud/cli.ts b/packages/debug/src/mincud/cli.ts
index ce48b54..0cbe010 100644
--- a/packages/debug/src/mincud/cli.ts
+++ b/packages/debug/src/mincud/cli.ts
@@ -102,6 +102,10 @@ export const startCli = () => {
const wss = startServer()
+ if (flags.serverCommand) {
+ handleServerCommand(wss)
+ }
+
if (input.length === 0) return
const { stderr, stdout } = execa.command(input[0], { env: { FORCE_COLOR: 'true' } })
@@ -119,8 +123,4 @@ export const startCli = () => {
stdout?.pipe(process.stdout)
stderr?.pipe(process.stderr)
-
- if (flags.serverCommand) {
- handleServerCommand(wss)
- }
}
\ No newline at end of file
From 466dec4beaf341f5cd4e5f23144574f0572304a2 Mon Sep 17 00:00:00 2001
From: Kuss <2360314753@qq.com>
Date: Sat, 4 Sep 2021 00:02:20 +0800
Subject: [PATCH 02/13] :memo: update: README.md
---
README.md | 161 +++++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 134 insertions(+), 27 deletions(-)
diff --git a/README.md b/README.md
index 8ebfc93..e66f4a4 100644
--- a/README.md
+++ b/README.md
@@ -40,20 +40,25 @@ iNCU 为其内嵌的 WEB 页面提供了丰富的 JS API,用来扩展内嵌页
### 安装依赖
-```
-npm install mincu
-```
-
-或者
+**React**
+```cmd
+$ npm install mincu-react
+# or
+$ yarn add mincu
```
-yarn add mincu
+
+**其他 (Vue、Vanilla)**
+```cmd
+$ npm install mincu-vanilla
+# or
+$ yarn add mincu-vanilla
```
### 引入
-```typescript
-import { useLogin } from 'mincu'
+```jsx
+import { useLogin } from 'mincu-react' // or mincu-hooks
const App = () => {
// 使用 App 端登录并获取是否初始化 Web 容器状态
@@ -61,8 +66,8 @@ const App = () => {
// 里面包含 useAppReady 和登录状态获取并存储的逻辑
const { isReady } = useLogin()
- if (isReady) {
- ;
Loading
+ if (!isReady) {
+ return Loading
}
return Thank you for using mincu
@@ -71,18 +76,16 @@ const App = () => {
### 接收 Native -> Web 通信方法
-```typescript
-import { useNativeState } from 'mincu'
+```jsx
+import { useNativeState } from 'mincu-react' // or mincu-hooks
const App = () => {
+ // 已初始化
+
// 使用 Native 对 Web 的通信实现颜色主题状态共享
// 接收 Native 端已注册的可共享状态的变化
const colorScheme = useNativeState('colorScheme')
- if (isReady) {
- ;Loading
- }
-
return Current Theme is {colorScheme}
}
```
@@ -91,30 +94,134 @@ const App = () => {
这种方法更加常用一些
-```typescript
-import { networkModule } from 'mincu'
+```jsx
+import { networkModule } from 'mincu-react' // or mincu-network
const App = () => {
+ // 已初始化
+
const refreshToken = async () => {
// 向 Native 通信,并获取 Native 端的返回值
const token = await networkModule.refreshToken()
alert(token)
}
- if (isReady) {
- ;Loading
+ return
+}
+```
+
+### 调试方法
+
+为了方便在移动端 WebView 中调试,我们提供了 `mincu-debug` 来,`mincu-debug` 采用了 Client/Server 模型,实现了各种在 WebView 中打 log,刷新页面,注入/取消注入 Devtool 等功能。(参考 react-native 的 HMRClient/Server)。
+
+- 安装 `mincu-debug`
+ ```cmd
+ $ npm i --save-dev mincu-debug # or yarn add -D mincu-debug
+ ```
+
+- 在前端代码中引入 Client,通过 applyConsole 方法来重写默认的 console 事件,实现打印事件的绑定。建议只在 dev 环境中动态引入,避免增大 bundle 体积。
+ ```js
+ // 如果你使用 vite,则通过 import.meta.env.DEV 判断 DEV 环境。
+ if (process.env.NODE_ENV === 'development') {
+ import('mincu-debug').then(({ default: debugModule }) => {
+ debugModule.applyConsole()
+ })
}
+ ```
+
+- 启动 `mincud` Server,监听来自 Client 的打印事件:
+ ```cmd
+ $ npx mincud
+ ```
+
+ 推荐将 `mincud` 与前端 dev server 同时启动,一方面是不需要额外开启另外一个终端,另一方面是将提供打开:
+ ```cmd
+ $ npx mincud 'npm run dev'
+ ```
+
+ ```json
+ // package.json
+ {
+ "scripts": {
+ "start": "mincud 'npm run dev'",
+ "dev": "vite --host",
+ "build": "tsc && vite build",
+ "serve": "vite preview"
+ }
+ }
+ ```
+
+- 执行命令 `npm run start` 后,将会启动 mincud,匹配到 dev host 页面后将会打开一个二维码页面,打开南大家园,然后扫描即可跳转到该页面进行开发。
+
+- mincud 启动将会捕获终端输入事件,按 `r` 会尝试刷新页面,按 `d` 则会尝试切换(注入/取消注入)Devtool([eruda](https://github.com/liriliri/eruda))
+ ```cmd
+ To reload the client page press "r"
+ To toggle the client devtool press "d"
+ ```
+
+完整的用法请看 [example/vanilla-ts](./example/vanilla-ts)
+
+## 其他说明
+
+### packages
+
+- mincu-core
+ 核心逻辑部分,包含了常用的用户数据,提供 web 和 native 的双向通信、调用来自 App 的接口等功能。
+- mincu-data
+ 数据部分,基本上来自于 core 里的 appData,不过加了一层初始化默认值处理。
+- mincu-debug
+ 调试部分,包含了 mincud 和 debugModule,以方便在 WebView 中进行远程调试。
+- mincu-event
+ 封装了一些原生操作函数,包括 openUrl, setShareConfig, showShare, login。
+- mincu-hooks
+ 封装了一些适用于 react 的 hooks,包括 useAppReady, useNativeState, useSafeArea。
+- mincu-lib
+ 共享库,包含了 constant 及 utils。
+- mincu-network
+ 基于 axios 封装的网络库,主要增加了请求拦截器,刷新 token 等功能。
+- mincu-ui
+ 封装了与原生界面显示有关的调用,包括 Toast, StatusBar Style, Header 标题栏, toScreen 跳转, exit 退出。
+
+### presets
+
+- mincu-vanilla
+ 依赖了 mincu-core, mincu-data, mincu-event, mincu-network, mincu-ui
+- mincu-react
+ 依赖了 mincu-vanilla, mincu-hooks
+
+它们都可以单独地引入到你的项目中使用。你可以根据你的需求引入所需要的依。
+
+## 贡献指南
+
+### 项目初始化
+
+```cmd
+$ git clone https://github.com/ncuhome/mincu # or clone your fork
+$ cd mincu
+$ yarn # or npm
+$ yarn lerna bootstrap # or npx lerna bootstrap
+$ yarn start # or npm run start
+# then start coding in packages/*
+```
- return
-}
+### 运行示例
+
+```cmd
+$ cd example/vanilla-ts
+$ yarn start
```
-## 记录遇到的错误及解决方案
+其他示例见 [example](./example),也可参考 [使用到的项目](#使用到的项目)
-### 无法引入外部 hooks
+### 添加依赖
+
+```cmd
+$ npx lerna add xxx packages/*
+```
-由于目前 mincu 主包和 next 样例引入的 react 是在不一样的 node_modules 里,所以会报错:
+更详细的用法见 [@lerna/add](https://github.com/lerna/lerna/tree/main/commands/add#readme)
-`hooks can only be called inside the body of a function component`
+## 使用到的项目
-解决方法:https://dev.to/yvonnickfrin/how-to-handle-peer-dependencies-when-developing-modules-18fa
+- 返校报到(学生端)- [ncuhome/back-home](https://github.com/ncuhome/back-home)
+- 家园工作室秋季新生招新页面 - [ncuhome/hr2019_fe_to_fresher](https://github.com/ncuhome/hr2019_fe_to_fresher/)
\ No newline at end of file
From 79d8d59bcb003e7b1b2d06e19e8b7ddbfef9e137 Mon Sep 17 00:00:00 2001
From: Kuss <2360314753@qq.com>
Date: Sat, 4 Sep 2021 00:03:24 +0800
Subject: [PATCH 03/13] :memo: update: packages/**/README.md
---
packages/core/README.md | 10 +++++++-
packages/data/README.md | 10 +++++++-
packages/debug/README.md | 51 +++++++++++++++++++++++++++++++++++++-
packages/event/README.md | 10 +++++++-
packages/hooks/README.md | 10 +++++++-
packages/lib/README.md | 10 +++++++-
packages/network/README.md | 10 +++++++-
packages/react/README.md | 10 +++++++-
packages/ui/README.md | 10 +++++++-
packages/vanilla/README.md | 10 +++++++-
10 files changed, 131 insertions(+), 10 deletions(-)
diff --git a/packages/core/README.md b/packages/core/README.md
index 02c656b..652df57 100644
--- a/packages/core/README.md
+++ b/packages/core/README.md
@@ -1,3 +1,11 @@
# mincu-core
-> [Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
\ No newline at end of file
+[Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
+
+## Install
+
+```cmd
+$ yarn add mincu-core
+# or
+$ npm install mincu-core
+```
\ No newline at end of file
diff --git a/packages/data/README.md b/packages/data/README.md
index f16b75a..44c595a 100644
--- a/packages/data/README.md
+++ b/packages/data/README.md
@@ -1,3 +1,11 @@
# mincu-data
-> [Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
\ No newline at end of file
+[Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
+
+## Install
+
+```cmd
+$ yarn add mincu-data
+# or
+$ npm install mincu-data
+```
\ No newline at end of file
diff --git a/packages/debug/README.md b/packages/debug/README.md
index 5455c63..cb0161c 100644
--- a/packages/debug/README.md
+++ b/packages/debug/README.md
@@ -1,3 +1,52 @@
# mincu-debug
-> [Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
\ No newline at end of file
+[Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
+
+# mincu-data
+
+[Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
+
+## Install
+
+```cmd
+$ yarn add -D mincu-debug
+# or
+$ npm install -save-dev mincu-debug
+```
+
+## Usage
+
+```cmd
+$ npx mincud
+
+ **** **** ** **** ** ****** ** **
+ /**/** **/**/**/**/** /** **////**/** /**
+ /**//** ** /**/**/**//** /** ** // /** /**
+ /** //*** /**/**/** //** /**/** /** /**
+ /** //* /**/**/** //**/**/** /** /**
+ /** / /**/**/** //****//** **/** /**
+ /** /**/**/** //*** //****** //*******
+ // // // // /// ////// ///////
+ Welcome to MINCU Damon!
+ !Fast - !Scalable - !Integrated
+
+ listening on ws://localhost:2333
+
+
+To reload the client page press "r"
+To toggle the client devtool press "d"
+```
+
+```cmd
+$ npx mincud -h
+
+ Usage
+ $ mincud [options]
+
+ Options
+ --no-qrcode, Disable qrcode generation
+ --no-server-command, Disable handling server command
+
+ Examples
+ $ mincud 'npm run dev'
+```
\ No newline at end of file
diff --git a/packages/event/README.md b/packages/event/README.md
index 523f1e1..1fe00a0 100644
--- a/packages/event/README.md
+++ b/packages/event/README.md
@@ -1,3 +1,11 @@
# mincu-event
-> [Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
\ No newline at end of file
+[Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
+
+## Install
+
+```cmd
+$ yarn add mincu-event
+# or
+$ npm install mincu-event
+```
\ No newline at end of file
diff --git a/packages/hooks/README.md b/packages/hooks/README.md
index 0d54c5b..ec4ea25 100644
--- a/packages/hooks/README.md
+++ b/packages/hooks/README.md
@@ -1,3 +1,11 @@
# mincu-hooks
-> [Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
\ No newline at end of file
+[Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
+
+## Install
+
+```cmd
+$ yarn add mincu-hooks
+# or
+$ npm install mincu-hooks
+```
\ No newline at end of file
diff --git a/packages/lib/README.md b/packages/lib/README.md
index d24ccc2..fb337bd 100644
--- a/packages/lib/README.md
+++ b/packages/lib/README.md
@@ -1,3 +1,11 @@
# mincu-lib
-> [Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
\ No newline at end of file
+[Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
+
+## Install
+
+```cmd
+$ yarn add mincu-lib
+# or
+$ npm install mincu-lib
+```
\ No newline at end of file
diff --git a/packages/network/README.md b/packages/network/README.md
index df529f7..88142f5 100644
--- a/packages/network/README.md
+++ b/packages/network/README.md
@@ -1,3 +1,11 @@
# mincu-network
-> [Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
\ No newline at end of file
+[Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
+
+## Install
+
+```cmd
+$ yarn add mincu-network
+# or
+$ npm install mincu-network
+```
\ No newline at end of file
diff --git a/packages/react/README.md b/packages/react/README.md
index f021849..5cd2a22 100644
--- a/packages/react/README.md
+++ b/packages/react/README.md
@@ -1,3 +1,11 @@
# mincu-react
-> [Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
\ No newline at end of file
+[Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
+
+## Install
+
+```cmd
+$ yarn add mincu-react
+# or
+$ npm install mincu-react
+```
\ No newline at end of file
diff --git a/packages/ui/README.md b/packages/ui/README.md
index 483e367..06991f7 100644
--- a/packages/ui/README.md
+++ b/packages/ui/README.md
@@ -1,3 +1,11 @@
# mincu-ui
-> [Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
\ No newline at end of file
+[Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
+
+## Install
+
+```cmd
+$ yarn add mincu-ui
+# or
+$ npm install mincu-ui
+```
\ No newline at end of file
diff --git a/packages/vanilla/README.md b/packages/vanilla/README.md
index caa8ac8..44c5ce8 100644
--- a/packages/vanilla/README.md
+++ b/packages/vanilla/README.md
@@ -1,3 +1,11 @@
# mincu-vanilla
-> [Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
\ No newline at end of file
+[Mincu - 南大家园 WEB JS API](https://github.com/ncuhome/mincu)
+
+## Install
+
+```cmd
+$ yarn add mincu-vanilla
+# or
+$ npm install mincu-vanilla
+```
\ No newline at end of file
From 372670fec45f89b93c7bc7a8c5a4a02edbad6416 Mon Sep 17 00:00:00 2001
From: Kuss <2360314753@qq.com>
Date: Sat, 4 Sep 2021 00:03:36 +0800
Subject: [PATCH 04/13] :memo: update: CHANGELOG.md
---
CHANGELOG.md | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f43d348..88c7a69 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
## Changelog
+### 2.0.0
+
+- **breaking** 迁移至 monorepo,原来的 `mincu` 包替换为 `mincu-react`, `mincu-vanilla` 等多个独立包
+- **feat** mincu-debug 包,提供调试功能
+
### 1.0.5
- **fix** 修复 isReady 错误初始值的问题
From 46fcb493100e8ffedc5df3c5064e2ea9ef874f7b Mon Sep 17 00:00:00 2001
From: Kuss <2360314753@qq.com>
Date: Sat, 4 Sep 2021 00:04:16 +0800
Subject: [PATCH 05/13] :green_heart: chore: publish.yml -> lerna version and
publish
---
.github/workflows/publish.yml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 75322e0..8dc954d 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -35,7 +35,13 @@ jobs:
- name: build
run: yarn build
- - name: publish package
- run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc && yarn publish
+ - name: init .npmrc
+ run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+
+ - name: bump
+ run: lerna version --yes
+
+ - name: publish
+ run: lerna publish from-git --yes
From 4233ca73d66b3c0d7e1c4bd6ad919c1cc53340bc Mon Sep 17 00:00:00 2001
From: Kuss <2360314753@qq.com>
Date: Sun, 12 Sep 2021 15:37:57 +0800
Subject: [PATCH 06/13] :sparkles: feat: applyConsole defaults handle error and
unhandledrejection
---
packages/debug/src/index.ts | 27 ++++++++++++++++++---------
packages/debug/src/mincud/client.ts | 3 ++-
2 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/packages/debug/src/index.ts b/packages/debug/src/index.ts
index 29b5767..2c9a769 100644
--- a/packages/debug/src/index.ts
+++ b/packages/debug/src/index.ts
@@ -17,17 +17,26 @@ class DebugModule {
* @abstract apply our console to window.console, not replacing but appending
* @note may causes memory leaks or maximum call stack size exceeded
*/
- applyConsole() {
- this.client.init()
- LEVELS.forEach(level => {
- const tmp = _window.console[level]
- if (tmp) {
- _window.console[level] = (...args: any[]) => {
- tmp(...args)
- this.client.log(level, ...args)
+ applyConsole(handleError: true) {
+ if (this.client.init()) {
+ LEVELS.forEach(level => {
+ const tmp = _window.console[level]
+ if (tmp) {
+ _window.console[level] = (...args: any[]) => {
+ tmp(...args)
+ this.client.log(level, ...args)
+ }
}
+ })
+ if (handleError) {
+ _window.addEventListener('error', e => {
+ this.client.log('error', e)
+ })
+ _window.addEventListener("unhandledrejection", e => {
+ this.client.log('error', e.reason)
+ });
}
- })
+ }
}
}
diff --git a/packages/debug/src/mincud/client.ts b/packages/debug/src/mincud/client.ts
index f3100b4..70c0b55 100644
--- a/packages/debug/src/mincud/client.ts
+++ b/packages/debug/src/mincud/client.ts
@@ -9,7 +9,7 @@ export class Client {
private opened: boolean = false
init() {
- if (this.client || this.opened) return
+ if (this.client || this.opened) return false
try {
this.client = new WebSocket(`ws://${DEBUG_HOST}:${DEBUG_PORT}`)
if (this.client) {
@@ -26,6 +26,7 @@ export class Client {
} catch (error) {
console.error(error)
}
+ return true
}
bindServerCommand = (event: MessageEvent) => {
From 924fa578ec5e2ba44668c46f21240963686e16b2 Mon Sep 17 00:00:00 2001
From: Kuss <2360314753@qq.com>
Date: Sun, 12 Sep 2021 15:58:49 +0800
Subject: [PATCH 07/13] :bug: chore: example -> unhandledException
---
example/vanilla-ts/src/main.ts | 13 +++++++++++++
packages/debug/src/index.ts | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/example/vanilla-ts/src/main.ts b/example/vanilla-ts/src/main.ts
index 3e89983..1e0782b 100644
--- a/example/vanilla-ts/src/main.ts
+++ b/example/vanilla-ts/src/main.ts
@@ -7,6 +7,19 @@ if (import.meta.env.DEV) {
})
}
+const fakePromise = () => new Promise((_, reject) => {
+ reject(new Error('fake error'))
+})
+
+const a = async () => {
+ const res = await fakePromise()
+ console.log(res)
+}
+
+setTimeout(() => {
+ a()
+}, 1000)
+
const app = document.querySelector('#app')!
app.innerHTML = `
diff --git a/packages/debug/src/index.ts b/packages/debug/src/index.ts
index 2c9a769..b630bc7 100644
--- a/packages/debug/src/index.ts
+++ b/packages/debug/src/index.ts
@@ -17,7 +17,7 @@ class DebugModule {
* @abstract apply our console to window.console, not replacing but appending
* @note may causes memory leaks or maximum call stack size exceeded
*/
- applyConsole(handleError: true) {
+ applyConsole(handleError = true) {
if (this.client.init()) {
LEVELS.forEach(level => {
const tmp = _window.console[level]
From c92098009531cf9abd1bcc88897a086fadd1d381 Mon Sep 17 00:00:00 2001
From: Kuss <2360314753@qq.com>
Date: Sun, 12 Sep 2021 15:59:51 +0800
Subject: [PATCH 08/13] :bookmark: release: publish v2.0.0-alpha.2
---
example/vanilla-ts/package.json | 2 +-
lerna.json | 2 +-
packages/core/package.json | 4 ++--
packages/data/package.json | 6 +++---
packages/debug/package.json | 4 ++--
packages/event/package.json | 4 ++--
packages/hooks/package.json | 6 +++---
packages/lib/package.json | 2 +-
packages/network/package.json | 6 +++---
packages/react/package.json | 6 +++---
packages/ui/package.json | 4 ++--
packages/vanilla/package.json | 12 ++++++------
12 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/example/vanilla-ts/package.json b/example/vanilla-ts/package.json
index 94ce035..4f4f400 100644
--- a/example/vanilla-ts/package.json
+++ b/example/vanilla-ts/package.json
@@ -1,7 +1,7 @@
{
"name": "debug-module",
"private": true,
- "version": "2.0.0-alpha.1",
+ "version": "2.0.0-alpha.2",
"scripts": {
"start": "mincud 'npm run dev'",
"dev": "vite --host",
diff --git a/lerna.json b/lerna.json
index 0d81983..47a30b6 100644
--- a/lerna.json
+++ b/lerna.json
@@ -16,5 +16,5 @@
},
"useWorkspaces": true,
"npmClient": "yarn",
- "version": "2.0.0-alpha.1"
+ "version": "2.0.0-alpha.2"
}
diff --git a/packages/core/package.json b/packages/core/package.json
index c4a3ab1..476ff94 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,6 +1,6 @@
{
"name": "mincu-core",
- "version": "2.0.0-alpha.1",
+ "version": "2.0.0-alpha.2",
"homepage": "https://github.com/ncuhome",
"license": "MIT",
"main": "dist/mincu-core.cjs.js",
@@ -17,7 +17,7 @@
],
"dependencies": {
"events": "^3.3.0",
- "mincu-lib": "^1.2.2"
+ "mincu-lib": "^2.0.0-alpha.2"
},
"devDependencies": {
"@types/react-native": "^0.64.12"
diff --git a/packages/data/package.json b/packages/data/package.json
index 20cf764..a4b20eb 100644
--- a/packages/data/package.json
+++ b/packages/data/package.json
@@ -1,6 +1,6 @@
{
"name": "mincu-data",
- "version": "2.0.0-alpha.1",
+ "version": "2.0.0-alpha.2",
"homepage": "https://github.com/ncuhome",
"license": "MIT",
"main": "dist/mincu-data.cjs.js",
@@ -13,8 +13,8 @@
"access": "public"
},
"dependencies": {
- "mincu-core": "^2.0.0-alpha.1",
- "mincu-lib": "^1.2.2"
+ "mincu-core": "^2.0.0-alpha.2",
+ "mincu-lib": "^2.0.0-alpha.2"
},
"files": [
"dist"
diff --git a/packages/debug/package.json b/packages/debug/package.json
index 948b741..ef5d257 100644
--- a/packages/debug/package.json
+++ b/packages/debug/package.json
@@ -1,6 +1,6 @@
{
"name": "mincu-debug",
- "version": "2.0.0-alpha.1",
+ "version": "2.0.0-alpha.2",
"homepage": "https://github.com/ncuhome",
"license": "MIT",
"main": "dist/mincu-debug.cjs.js",
@@ -26,7 +26,7 @@
"isomorphic-ws": "^4.0.1",
"lodash.debounce": "^4.0.8",
"meow": "9.0.0",
- "mincu-lib": "^1.2.2",
+ "mincu-lib": "^2.0.0-alpha.2",
"open": "^8.2.1",
"pretty-format": "^27.0.6",
"strip-ansi": "6.0.0",
diff --git a/packages/event/package.json b/packages/event/package.json
index a5ddcc7..a76b1bd 100644
--- a/packages/event/package.json
+++ b/packages/event/package.json
@@ -1,6 +1,6 @@
{
"name": "mincu-event",
- "version": "2.0.0-alpha.1",
+ "version": "2.0.0-alpha.2",
"homepage": "https://github.com/ncuhome",
"license": "MIT",
"main": "dist/mincu-event.cjs.js",
@@ -13,7 +13,7 @@
"access": "public"
},
"dependencies": {
- "mincu-core": "^2.0.0-alpha.1"
+ "mincu-core": "^2.0.0-alpha.2"
},
"files": [
"dist"
diff --git a/packages/hooks/package.json b/packages/hooks/package.json
index 34dbaf0..075fbc3 100644
--- a/packages/hooks/package.json
+++ b/packages/hooks/package.json
@@ -1,6 +1,6 @@
{
"name": "mincu-hooks",
- "version": "2.0.0-alpha.1",
+ "version": "2.0.0-alpha.2",
"homepage": "https://github.com/ncuhome",
"license": "MIT",
"main": "dist/mincu-hooks.cjs.js",
@@ -19,7 +19,7 @@
"react": "^17.0.2"
},
"dependencies": {
- "mincu-core": "^2.0.0-alpha.1",
- "mincu-data": "^2.0.0-alpha.1"
+ "mincu-core": "^2.0.0-alpha.2",
+ "mincu-data": "^2.0.0-alpha.2"
}
}
diff --git a/packages/lib/package.json b/packages/lib/package.json
index 95eac36..0628c66 100644
--- a/packages/lib/package.json
+++ b/packages/lib/package.json
@@ -1,6 +1,6 @@
{
"name": "mincu-lib",
- "version": "1.2.2",
+ "version": "2.0.0-alpha.2",
"homepage": "https://github.com/ncuhome",
"license": "MIT",
"main": "dist/mincu-lib.cjs.js",
diff --git a/packages/network/package.json b/packages/network/package.json
index 88c4b8b..60eaa71 100644
--- a/packages/network/package.json
+++ b/packages/network/package.json
@@ -1,6 +1,6 @@
{
"name": "mincu-network",
- "version": "2.0.0-alpha.1",
+ "version": "2.0.0-alpha.2",
"homepage": "https://github.com/ncuhome",
"license": "MIT",
"main": "dist/mincu-network.cjs.js",
@@ -17,7 +17,7 @@
],
"dependencies": {
"axios": "^0.21.1",
- "mincu-core": "^2.0.0-alpha.1",
- "mincu-data": "^2.0.0-alpha.1"
+ "mincu-core": "^2.0.0-alpha.2",
+ "mincu-data": "^2.0.0-alpha.2"
}
}
diff --git a/packages/react/package.json b/packages/react/package.json
index 2a99a10..f62191a 100644
--- a/packages/react/package.json
+++ b/packages/react/package.json
@@ -1,6 +1,6 @@
{
"name": "mincu-react",
- "version": "2.0.0-alpha.1",
+ "version": "2.0.0-alpha.2",
"homepage": "https://github.com/ncuhome",
"license": "MIT",
"main": "dist/mincu-react.cjs.js",
@@ -13,8 +13,8 @@
"access": "public"
},
"dependencies": {
- "mincu-hooks": "^2.0.0-alpha.1",
- "mincu-vanilla": "^2.0.0-alpha.1"
+ "mincu-hooks": "^2.0.0-alpha.2",
+ "mincu-vanilla": "^2.0.0-alpha.2"
},
"files": [
"dist"
diff --git a/packages/ui/package.json b/packages/ui/package.json
index 748296c..1ff2c59 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -1,6 +1,6 @@
{
"name": "mincu-ui",
- "version": "2.0.0-alpha.1",
+ "version": "2.0.0-alpha.2",
"homepage": "https://github.com/ncuhome",
"license": "MIT",
"main": "dist/mincu-ui.cjs.js",
@@ -13,7 +13,7 @@
"access": "public"
},
"dependencies": {
- "mincu-core": "^2.0.0-alpha.1"
+ "mincu-core": "^2.0.0-alpha.2"
},
"files": [
"dist"
diff --git a/packages/vanilla/package.json b/packages/vanilla/package.json
index 9b75f80..3ead47a 100644
--- a/packages/vanilla/package.json
+++ b/packages/vanilla/package.json
@@ -1,6 +1,6 @@
{
"name": "mincu-vanilla",
- "version": "2.0.0-alpha.1",
+ "version": "2.0.0-alpha.2",
"homepage": "https://github.com/ncuhome",
"license": "MIT",
"main": "dist/mincu-vanilla.cjs.js",
@@ -13,11 +13,11 @@
"access": "public"
},
"dependencies": {
- "mincu-core": "^2.0.0-alpha.1",
- "mincu-data": "^2.0.0-alpha.1",
- "mincu-event": "^2.0.0-alpha.1",
- "mincu-network": "^2.0.0-alpha.1",
- "mincu-ui": "^2.0.0-alpha.1"
+ "mincu-core": "^2.0.0-alpha.2",
+ "mincu-data": "^2.0.0-alpha.2",
+ "mincu-event": "^2.0.0-alpha.2",
+ "mincu-network": "^2.0.0-alpha.2",
+ "mincu-ui": "^2.0.0-alpha.2"
},
"files": [
"dist"
From 7258b0aafb122362a5f1de0c25d8ba898478572d Mon Sep 17 00:00:00 2001
From: Kuss <2360314753@qq.com>
Date: Sun, 12 Sep 2021 17:33:54 +0800
Subject: [PATCH 09/13] :recycle: refactor: use better Encode/Decode from
console-feed-node-transform
---
packages/debug/package.json | 2 +-
packages/debug/src/mincud/client.ts | 14 ++---------
packages/debug/src/mincud/server.ts | 3 ++-
yarn.lock | 38 ++++-------------------------
4 files changed, 10 insertions(+), 47 deletions(-)
diff --git a/packages/debug/package.json b/packages/debug/package.json
index ef5d257..2609676 100644
--- a/packages/debug/package.json
+++ b/packages/debug/package.json
@@ -21,6 +21,7 @@
],
"dependencies": {
"chalk": "^4.1.2",
+ "console-feed-node-transform": "^3.3.0",
"execa": "^5.1.1",
"internal-ip": "^6.2.0",
"isomorphic-ws": "^4.0.1",
@@ -28,7 +29,6 @@
"meow": "9.0.0",
"mincu-lib": "^2.0.0-alpha.2",
"open": "^8.2.1",
- "pretty-format": "^27.0.6",
"strip-ansi": "6.0.0",
"ws": "^8.0.0"
},
diff --git a/packages/debug/src/mincud/client.ts b/packages/debug/src/mincud/client.ts
index 70c0b55..4ec8cfd 100644
--- a/packages/debug/src/mincud/client.ts
+++ b/packages/debug/src/mincud/client.ts
@@ -1,4 +1,4 @@
-import prettyFormat, { plugins } from 'pretty-format'
+import { Encode } from 'console-feed-node-transform'
import WebSocket, { MessageEvent } from 'isomorphic-ws'
import { _window } from 'mincu-lib'
import { CMD_DEV_TOOL, CMD_RELOAD, DEBUG_HOST, DEBUG_PORT, LogLevel } from './shared'
@@ -85,17 +85,7 @@ export class Client {
JSON.stringify({
type: 'log',
level,
- data: args.map(item =>
- typeof item === 'string'
- ? item
- : prettyFormat(item, {
- escapeString: true,
- highlight: true,
- maxDepth: 3,
- min: true,
- plugins: [plugins.ReactElement],
- }),
- ),
+ data: Encode(args)
}),
);
} catch (err) {
diff --git a/packages/debug/src/mincud/server.ts b/packages/debug/src/mincud/server.ts
index e2467f0..5113076 100644
--- a/packages/debug/src/mincud/server.ts
+++ b/packages/debug/src/mincud/server.ts
@@ -2,6 +2,7 @@ import WebSocket, { Data } from 'ws';
import chalk from 'chalk'
import { DEBUG_PORT, LogLevel } from './shared'
import { logToConsole } from './logToConsole';
+import { Decode } from 'console-feed-node-transform';
type RecvType = 'log'
@@ -24,7 +25,7 @@ export const startServer = () => {
ws.on('message', message => {
const { type, level, data } = formatMessage(message)
if (type === 'log' && data.length > 0) {
- logToConsole(level, data)
+ logToConsole(level, Decode(data))
}
});
});
diff --git a/yarn.lock b/yarn.lock
index 9241160..c0e4d09 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1902,17 +1902,6 @@
"@types/yargs" "^15.0.0"
chalk "^4.0.0"
-"@jest/types@^27.0.6":
- version "27.0.6"
- resolved "https://registry.npmjs.org/@jest/types/-/types-27.0.6.tgz#9a992bc517e0c49f035938b8549719c2de40706b"
- integrity sha512-aSquT1qa9Pik26JK5/3rvnYb4bGtm1VFNesHKmNTwmPIgOrixvhL2ghIvFRNEpzy3gU+rUgjIF/KodbkFAl++g==
- dependencies:
- "@types/istanbul-lib-coverage" "^2.0.0"
- "@types/istanbul-reports" "^3.0.0"
- "@types/node" "*"
- "@types/yargs" "^16.0.0"
- chalk "^4.0.0"
-
"@jfonx/console-utils@^1.0.3":
version "1.0.3"
resolved "https://registry.npmjs.org/@jfonx/console-utils/-/console-utils-1.0.3.tgz#cbb7f911e4191a4a2fe1ba4807d29f100b5d099f"
@@ -3663,13 +3652,6 @@
dependencies:
"@types/yargs-parser" "*"
-"@types/yargs@^16.0.0":
- version "16.0.4"
- resolved "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz#26aad98dd2c2a38e421086ea9ad42b9e51642977"
- integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==
- dependencies:
- "@types/yargs-parser" "*"
-
"@typescript-eslint/eslint-plugin@^4.5.0":
version "4.29.1"
resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.1.tgz#808d206e2278e809292b5de752a91105da85860b"
@@ -4549,11 +4531,6 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0:
dependencies:
color-convert "^2.0.1"
-ansi-styles@^5.0.0:
- version "5.2.0"
- resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
- integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==
-
any-promise@^1.0.0:
version "1.3.0"
resolved "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
@@ -6432,6 +6409,11 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0:
resolved "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=
+console-feed-node-transform@^3.3.0:
+ version "3.3.0"
+ resolved "https://registry.npmjs.org/console-feed-node-transform/-/console-feed-node-transform-3.3.0.tgz#7e1a4278d6f1f57fe0ec01d92dcc35dbe3f9f38e"
+ integrity sha512-4P8KFfpNbGuL5XNptpeXWpIRIjLJEGuiZ1jNXu1Ww/JjLcnrNUxW3vjqz0gIxZzvPcgi3IVdoDxPL9YWkQvjHQ==
+
consolidate@^0.15.1:
version "0.15.1"
resolved "https://registry.npmjs.org/consolidate/-/consolidate-0.15.1.tgz#21ab043235c71a07d45d9aad98593b0dba56bab7"
@@ -15035,16 +15017,6 @@ pretty-format@^26.6.2:
ansi-styles "^4.0.0"
react-is "^17.0.1"
-pretty-format@^27.0.6:
- version "27.0.6"
- resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-27.0.6.tgz#ab770c47b2c6f893a21aefc57b75da63ef49a11f"
- integrity sha512-8tGD7gBIENgzqA+UBzObyWqQ5B778VIFZA/S66cclyd5YkFLYs2Js7gxDKf0MXtTc9zcS7t1xhdfcElJ3YIvkQ==
- dependencies:
- "@jest/types" "^27.0.6"
- ansi-regex "^5.0.0"
- ansi-styles "^5.0.0"
- react-is "^17.0.1"
-
pretty-quick@^3.1.1:
version "3.1.1"
resolved "https://registry.npmjs.org/pretty-quick/-/pretty-quick-3.1.1.tgz#93ca4e2dd38cc4e970e3f54a0ead317a25454688"
From 05c402e81545a9b9aac0fe662be28ad06c8be921 Mon Sep 17 00:00:00 2001
From: Kuss <2360314753@qq.com>
Date: Sun, 12 Sep 2021 17:34:22 +0800
Subject: [PATCH 10/13] :bookmark: release: publish v2.1.0-alpha.0
---
lerna.json | 2 +-
packages/debug/package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lerna.json b/lerna.json
index 47a30b6..7494708 100644
--- a/lerna.json
+++ b/lerna.json
@@ -16,5 +16,5 @@
},
"useWorkspaces": true,
"npmClient": "yarn",
- "version": "2.0.0-alpha.2"
+ "version": "2.1.0-alpha.0"
}
diff --git a/packages/debug/package.json b/packages/debug/package.json
index 2609676..784a6d8 100644
--- a/packages/debug/package.json
+++ b/packages/debug/package.json
@@ -1,6 +1,6 @@
{
"name": "mincu-debug",
- "version": "2.0.0-alpha.2",
+ "version": "2.1.0-alpha.0",
"homepage": "https://github.com/ncuhome",
"license": "MIT",
"main": "dist/mincu-debug.cjs.js",
From a6c1f2bd77cf15249a9f421e2d0ed571e21c74f4 Mon Sep 17 00:00:00 2001
From: Kuss <2360314753@qq.com>
Date: Mon, 20 Sep 2021 19:57:52 +0800
Subject: [PATCH 11/13] :bug: fix: ExecaChildProcess not terminate
---
packages/debug/package.json | 1 +
packages/debug/src/mincud/cli.ts | 12 +++-
yarn.lock | 109 ++++++++++++++++++++++++++++++-
3 files changed, 117 insertions(+), 5 deletions(-)
diff --git a/packages/debug/package.json b/packages/debug/package.json
index 784a6d8..70e18a2 100644
--- a/packages/debug/package.json
+++ b/packages/debug/package.json
@@ -30,6 +30,7 @@
"mincu-lib": "^2.0.0-alpha.2",
"open": "^8.2.1",
"strip-ansi": "6.0.0",
+ "terminate": "^2.2.2",
"ws": "^8.0.0"
},
"devDependencies": {
diff --git a/packages/debug/src/mincud/cli.ts b/packages/debug/src/mincud/cli.ts
index 0cbe010..4dd323e 100644
--- a/packages/debug/src/mincud/cli.ts
+++ b/packages/debug/src/mincud/cli.ts
@@ -6,11 +6,13 @@ import meow from 'meow'
import readline, { Key } from 'readline'
import type { Server } from 'ws'
import chalk from 'chalk'
+import terminate from 'terminate'
import { startServer } from './server'
import { StringMatcher } from './StringMatcher'
import { REGEXP_NETWORK_HOST, REGEXP_LOCAL_HOST, CMD_RELOAD, CMD_DEV_TOOL } from './shared'
const TAG = chalk.inverse.green.bold(' Server ')
+let childPid = -1
const initCli = () => {
return meow(`
@@ -64,7 +66,11 @@ const handleServerCommand = (wss: Server) => {
if (ctrl) {
switch (name) {
case 'c':
- exit()
+ // @ts-ignore
+ terminate(childPid, 'SIGINT', { timeout: 0 }, () => {
+ console.log(chalk.inverse.cyan.bold(' Mincud '), 'was shutdown')
+ exit()
+ });
case 'z':
break
}
@@ -108,7 +114,9 @@ export const startCli = () => {
if (input.length === 0) return
- const { stderr, stdout } = execa.command(input[0], { env: { FORCE_COLOR: 'true' } })
+ const { stderr, stdout, pid } = execa.command(input[0], { env: { FORCE_COLOR: 'true' } })
+
+ childPid = pid
if (flags.qrcode) {
const stringMatcher = new StringMatcher([REGEXP_NETWORK_HOST, REGEXP_LOCAL_HOST])
diff --git a/yarn.lock b/yarn.lock
index c0e4d09..8320d25 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4417,7 +4417,7 @@ agentkeepalive@^4.1.3:
depd "^1.1.2"
humanize-ms "^1.2.1"
-aggregate-error@^3.0.0:
+aggregate-error@^3.0.0, aggregate-error@^3.1.0:
version "3.1.0"
resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a"
integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==
@@ -7623,7 +7623,7 @@ driver-weex@^2.0.0:
dependencies:
style-unit "^3.0.0"
-duplexer@^0.1.1:
+duplexer@^0.1.1, duplexer@~0.1.1:
version "0.1.2"
resolved "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6"
integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==
@@ -8222,6 +8222,19 @@ event-pubsub@4.3.0:
resolved "https://registry.npmjs.org/event-pubsub/-/event-pubsub-4.3.0.tgz#f68d816bc29f1ec02c539dc58c8dd40ce72cb36e"
integrity sha512-z7IyloorXvKbFx9Bpie2+vMJKKx1fH1EN5yiTfp8CiLOTptSYy1g8H4yDpGlEdshL1PBiFtBHepF2cNsqeEeFQ==
+event-stream@=3.3.4:
+ version "3.3.4"
+ resolved "https://registry.nlark.com/event-stream/download/event-stream-3.3.4.tgz?cache=0&sync_timestamp=1629295047534&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fevent-stream%2Fdownload%2Fevent-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571"
+ integrity sha1-SrTJoPWlTbkzi0w02Gv86PSzVXE=
+ dependencies:
+ duplexer "~0.1.1"
+ from "~0"
+ map-stream "~0.1.0"
+ pause-stream "0.0.11"
+ split "0.3"
+ stream-combiner "~0.0.4"
+ through "~2.3.1"
+
eventemitter3@^4.0.0, eventemitter3@^4.0.4:
version "4.0.7"
resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
@@ -8732,6 +8745,19 @@ first-chunk-stream@^2.0.0:
dependencies:
readable-stream "^2.0.2"
+fkill@^7.2.1:
+ version "7.2.1"
+ resolved "https://registry.nlark.com/fkill/download/fkill-7.2.1.tgz#7036200cd2edd28a6bc40f0defc1e159d9e24e64"
+ integrity sha1-cDYgDNLt0oprxA8N78HhWdniTmQ=
+ dependencies:
+ aggregate-error "^3.1.0"
+ arrify "^2.0.1"
+ execa "^5.0.0"
+ pid-port "^0.1.0"
+ process-exists "^4.0.0"
+ ps-list "^7.2.0"
+ taskkill "^3.1.0"
+
flat-cache@^2.0.1:
version "2.0.1"
resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0"
@@ -8895,6 +8921,11 @@ from2@^2.1.0:
inherits "^2.0.1"
readable-stream "^2.0.0"
+from@~0:
+ version "0.1.7"
+ resolved "https://registry.npm.taobao.org/from/download/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe"
+ integrity sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=
+
fs-extra@^7.0.1:
version "7.0.1"
resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
@@ -12187,6 +12218,11 @@ map-obj@^4.0.0:
resolved "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz#e4ea399dbc979ae735c83c863dd31bdf364277b7"
integrity sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==
+map-stream@~0.1.0:
+ version "0.1.0"
+ resolved "https://registry.npm.taobao.org/map-stream/download/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194"
+ integrity sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=
+
map-visit@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f"
@@ -14075,6 +14111,13 @@ path-type@^4.0.0:
resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
+pause-stream@0.0.11:
+ version "0.0.11"
+ resolved "https://registry.npm.taobao.org/pause-stream/download/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445"
+ integrity sha1-/lo0sMvOErWqaitAPuLnO2AvFEU=
+ dependencies:
+ through "~2.3"
+
pbkdf2@^3.0.3:
version "3.1.2"
resolved "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075"
@@ -14096,6 +14139,13 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.2.3:
resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
+pid-port@^0.1.0:
+ version "0.1.1"
+ resolved "https://registry.nlark.com/pid-port/download/pid-port-0.1.1.tgz#2ac86fa8a0e97ef2e7eb9e7e9567cdc1eda78098"
+ integrity sha1-KshvqKDpfvLn655+lWfNwe2ngJg=
+ dependencies:
+ execa "^5.0.0"
+
pify@^2.0.0, pify@^2.3.0:
version "2.3.0"
resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
@@ -15034,6 +15084,13 @@ proc-log@^1.0.0:
resolved "https://registry.npmjs.org/proc-log/-/proc-log-1.0.0.tgz#0d927307401f69ed79341e83a0b2c9a13395eb77"
integrity sha512-aCk8AO51s+4JyuYGg3Q/a6gnrlDO09NpVWePtjp7xwphcoQ04x5WAfCyugcsbLooWcMJ87CLkD4+604IckEdhg==
+process-exists@^4.0.0:
+ version "4.1.0"
+ resolved "https://registry.nlark.com/process-exists/download/process-exists-4.1.0.tgz#4132c516324c1da72d65896851cdbd8bbdf5b9d8"
+ integrity sha1-QTLFFjJMHactZYloUc29i731udg=
+ dependencies:
+ ps-list "^6.3.0"
+
process-nextick-args@^2.0.0, process-nextick-args@~2.0.0:
version "2.0.1"
resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
@@ -15124,6 +15181,23 @@ prr@~1.0.1:
resolved "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY=
+ps-list@^6.3.0:
+ version "6.3.0"
+ resolved "https://registry.npm.taobao.org/ps-list/download/ps-list-6.3.0.tgz#a2b775c2db7d547a28fbaa3a05e4c281771259be"
+ integrity sha1-ord1wtt9VHoo+6o6BeTCgXcSWb4=
+
+ps-list@^7.2.0:
+ version "7.2.0"
+ resolved "https://registry.npm.taobao.org/ps-list/download/ps-list-7.2.0.tgz#3d110e1de8249a4b178c9b1cf2a215d1e4e42fc0"
+ integrity sha1-PREOHegkmksXjJsc8qIV0eTkL8A=
+
+ps-tree@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.npm.taobao.org/ps-tree/download/ps-tree-1.2.0.tgz#5e7425b89508736cdd4f2224d028f7bb3f722ebd"
+ integrity sha1-XnQluJUIc2zdTyIk0Cj3uz9yLr0=
+ dependencies:
+ event-stream "=3.3.4"
+
pseudomap@^1.0.2:
version "1.0.2"
resolved "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
@@ -16859,6 +16933,13 @@ split2@^3.0.0:
dependencies:
readable-stream "^3.0.0"
+split@0.3:
+ version "0.3.3"
+ resolved "https://registry.npm.taobao.org/split/download/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f"
+ integrity sha1-zQ7qXmOiEd//frDwkcQTPi0N0o8=
+ dependencies:
+ through "2"
+
split@^1.0.0:
version "1.0.1"
resolved "https://registry.npmjs.org/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9"
@@ -16997,6 +17078,13 @@ stream-browserify@^2.0.1:
inherits "~2.0.1"
readable-stream "^2.0.2"
+stream-combiner@~0.0.4:
+ version "0.0.4"
+ resolved "https://registry.npm.taobao.org/stream-combiner/download/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14"
+ integrity sha1-TV5DPBhSYd3mI8o/RMWGvPXErRQ=
+ dependencies:
+ duplexer "~0.1.1"
+
stream-each@^1.1.0:
version "1.2.3"
resolved "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae"
@@ -17541,6 +17629,14 @@ tar@^6.0.2, tar@^6.1.0:
mkdirp "^1.0.3"
yallist "^4.0.0"
+taskkill@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.nlark.com/taskkill/download/taskkill-3.1.0.tgz?cache=0&sync_timestamp=1628771385319&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ftaskkill%2Fdownload%2Ftaskkill-3.1.0.tgz#28001339feb23bfae3f447902c4b4abcdd057680"
+ integrity sha1-KAATOf6yO/rj9EeQLEtKvN0FdoA=
+ dependencies:
+ arrify "^2.0.1"
+ execa "^3.3.0"
+
temp-dir@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d"
@@ -17565,6 +17661,13 @@ terminal-link@^2.0.0:
ansi-escapes "^4.2.1"
supports-hyperlinks "^2.0.0"
+terminate@^2.2.2:
+ version "2.2.2"
+ resolved "https://registry.nlark.com/terminate/download/terminate-2.2.2.tgz#5d85f719f5007205b9a1ba70f239e5ef993e121d"
+ integrity sha1-XYX3GfUAcgW5obpw8jnl75k+Eh0=
+ dependencies:
+ ps-tree "^1.2.0"
+
terser-webpack-plugin@^1.4.3, terser-webpack-plugin@^1.4.4:
version "1.4.5"
resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz#a217aefaea330e734ffacb6120ec1fa312d6040b"
@@ -17720,7 +17823,7 @@ through2@^4.0.0:
dependencies:
readable-stream "3"
-through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6:
+through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@~2.3, through@~2.3.1:
version "2.3.8"
resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
From 5555e75f83d324afc3e7d309e6083cd1e9a894c8 Mon Sep 17 00:00:00 2001
From: Kuss <2360314753@qq.com>
Date: Mon, 20 Sep 2021 19:59:59 +0800
Subject: [PATCH 12/13] :bookmark: release: publish v2.1.0
---
lerna.json | 2 +-
packages/debug/package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lerna.json b/lerna.json
index 7494708..3d952c9 100644
--- a/lerna.json
+++ b/lerna.json
@@ -16,5 +16,5 @@
},
"useWorkspaces": true,
"npmClient": "yarn",
- "version": "2.1.0-alpha.0"
+ "version": "2.1.0"
}
diff --git a/packages/debug/package.json b/packages/debug/package.json
index 70e18a2..1bd6e4d 100644
--- a/packages/debug/package.json
+++ b/packages/debug/package.json
@@ -1,6 +1,6 @@
{
"name": "mincu-debug",
- "version": "2.1.0-alpha.0",
+ "version": "2.1.0",
"homepage": "https://github.com/ncuhome",
"license": "MIT",
"main": "dist/mincu-debug.cjs.js",
From 75bcb3f81f297c03b6930cd96cb97811ee0415f4 Mon Sep 17 00:00:00 2001
From: Kuss <2360314753@qq.com>
Date: Mon, 20 Sep 2021 20:00:48 +0800
Subject: [PATCH 13/13] :bookmark: bump: v2.1.0
---
package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package.json b/package.json
index 87017a3..147a7da 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "mincu",
- "version": "1.0.5",
+ "version": "2.1.0",
"license": "MIT",
"private": true,
"scripts": {