Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add zhi-rubick-core #398

Merged
merged 16 commits into from
Oct 26, 2023
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- [X] [zhi-picgo-core](https://github.com/terwer/zhi/tree/main/libs/zhi-picgo-core) ![zhi-picgo-core](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fterwer%2Fzhi%2Fmain%2Flibs%2Fzhi-picgo-core%2Fpackage.json&query=%24.version&label=release)
- [X] [zhi-siyuan-picgo](https://github.com/terwer/zhi/tree/main/libs/zhi-siyuan-picgo) ![zhi-siyuan-picgo](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fterwer%2Fzhi%2Fmain%2Flibs%2Fzhi-siyuan-picgo%2Fpackage.json&query=%24.version&label=release)
- [X] [zhi-chatgpt](https://github.com/terwer/zhi/tree/main/libs/zhi-chatgpt) ![zhi-chatgpt](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fterwer%2Fzhi%2Fmain%2Flibs%2Fzhi-chatgpt%2Fpackage.json&query=%24.version&label=release)
- [X] [zhi-rubick-core](https://github.com/terwer/zhi/tree/main/libs/zhi-rubick-core) ![zhi-rubick-core](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fterwer%2Fzhi%2Fmain%2Flibs%2Fzhi-rubick-core%2Fpackage.json&query=%24.version&label=release)

### scaffold && docs

Expand Down
1 change: 1 addition & 0 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
- [X] [zhi-picgo-core](https://github.com/terwer/zhi/tree/main/libs/zhi-picgo-core) ![zhi-picgo-core](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fterwer%2Fzhi%2Fmain%2Flibs%2Fzhi-picgo-core%2Fpackage.json&query=%24.version&label=release)
- [X] [zhi-siyuan-picgo](https://github.com/terwer/zhi/tree/main/libs/zhi-siyuan-picgo) ![zhi-siyuan-picgo](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fterwer%2Fzhi%2Fmain%2Flibs%2Fzhi-siyuan-picgo%2Fpackage.json&query=%24.version&label=release)
- [X] [zhi-chatgpt](https://github.com/terwer/zhi/tree/main/libs/zhi-chatgpt) ![zhi-chatgpt](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fterwer%2Fzhi%2Fmain%2Flibs%2Fzhi-chatgpt%2Fpackage.json&query=%24.version&label=release)
- [X] [zhi-rubick-core](https://github.com/terwer/zhi/tree/main/libs/zhi-rubick-core) ![zhi-rubick-core](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fraw.githubusercontent.com%2Fterwer%2Fzhi%2Fmain%2Flibs%2Fzhi-rubick-core%2Fpackage.json&query=%24.version&label=release)

### 脚手架 && 文档

Expand Down
12 changes: 12 additions & 0 deletions apps/zhi-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# zhi-cli

## 1.5.20

### Patch Changes

- zhi-log@1.14.20

## 1.5.19

### Patch Changes

- zhi-log@1.14.19

## 1.5.18

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/zhi-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zhi-cli",
"version": "1.5.18",
"version": "1.5.20",
"description": "a tool for generating zhi framework related projects",
"type": "module",
"bin": {
Expand Down
7 changes: 5 additions & 2 deletions apps/zhi-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"license": "MIT",
"type": "module",
"scripts": {
"dev": "vuepress dev src --clean-cache",
"build": "vuepress build src",
"apidev": "vuepress dev src --clean-cache",
"apibuild": "vuepress build src",
"update": "pnpm dlx vp-update"
},
"devDependencies": {
Expand All @@ -16,5 +16,8 @@
"vue": "^3.2.47",
"vuepress": "2.0.0-beta.61",
"vuepress-theme-hope": "2.0.0-beta.206"
},
"publishConfig": {
"access": "public"
}
}
102 changes: 102 additions & 0 deletions apps/zhi-infra/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,107 @@
# zhi-infra

## 0.19.0

### Minor Changes

- feat: add custom env

## 0.18.0

### Minor Changes

- feat: add cwd and env to cmd

## 0.17.0

### Minor Changes

- feat: add env to path

## 0.16.4

### Patch Changes

- fix: add qoute to cmd

## 0.16.3

### Patch Changes

- fix: remove path for node cmd

## 0.16.2

### Patch Changes

- feat: add exec log
- Updated dependencies
- zhi-cmd@0.6.3

## 0.16.1

### Patch Changes

- fix: add invoke log

## 0.16.0

### Minor Changes

- feat: add custom path to npmInstall

## 0.15.3

### Patch Changes

- Updated dependencies
- zhi-device@2.10.0
- zhi-cmd@0.6.2

## 0.15.2

### Patch Changes

- Updated dependencies
- zhi-device@2.9.0
- zhi-cmd@0.6.1

## 0.15.1

### Patch Changes

- fix: change npm cmd

## 0.15.0

### Minor Changes

- feat: npm use exec

## 0.14.1

### Patch Changes

- fix: switch npm to local with spawn

## 0.14.0

### Minor Changes

- feat: add more options for cmd

## 0.13.0

### Minor Changes

- feat: support space in node cmd

## 0.12.1

### Patch Changes

- feat: add cache to require install

## 0.12.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/zhi-infra/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zhi-infra",
"version": "0.12.0",
"version": "0.19.0",
"type": "module",
"description": "basic issues for zhi",
"main": "./dist/index.cjs",
Expand Down
18 changes: 9 additions & 9 deletions apps/zhi-infra/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,30 @@ const main: MainFunction = async (args?: any[]): Promise<void> => {
win.zhi.status = win.zhi.status ?? {}

// mountDevice
if (!win.zhi.status.deviceInited) {
if (win.zhi.status.deviceInited) {
logger.info("zhi device is already inited.skip")
} else {
win.zhi.device = SiyuanDevice
win.zhi.status.deviceInited = true
logger.info("zhi device inited")
} else {
logger.info("zhi device is already inited.skip")
}

// mountCmd
if (!win.zhi.status.cmdInited) {
if (win.zhi.status.cmdInited) {
logger.info("zhi cmd is already inited.skip")
} else {
const cmd = new CustomCmd()
win.zhi.cmd = cmd
win.zhi.status.cmdInited = true
logger.info("zhi cmd inited")
} else {
logger.info("zhi cmd is already inited.skip")
}

// mountNpmManager
const depsJsonPath: string = safeParseArgs(args, 0)
const isFixPath: boolean = safeParseArgs(args, 1)
if (!win.zhi.status.infraInited) {
if (win.zhi.status.infraInited) {
logger.info("zhi infra is already inited.skip")
} else {
const infra = new ZhiInfra(depsJsonPath)
if (isFixPath) {
infra.fixPathEnv()
Expand All @@ -50,8 +52,6 @@ const main: MainFunction = async (args?: any[]): Promise<void> => {
win.zhi.npm = infra.getNpmManager()
win.zhi.status.infraInited = true
logger.info("zhi infra inited")
} else {
logger.info("zhi infra is already inited.skip")
}
}

Expand Down
Loading