From d3ada345c860ce2bab9933ceadc725345b4d099f Mon Sep 17 00:00:00 2001 From: kidneyweak <35759909+kidneyweakx@users.noreply.github.com> Date: Wed, 27 Sep 2023 13:44:58 +0800 Subject: [PATCH] doc: 2.0.4 documents (#83) * feat: 2.0.4 document * feat: add notice in README.md * docs: add new issue template * feat: edit new README.md * docs: update pr template --- .github/COMMIT_CONVENTION.md | 57 ++++++++++++++ CONTRIBUTING.md => .github/CONTRIBUTING.md | 0 .github/ISSUE_TEMPLATE.md | 50 ------------ .github/ISSUE_TEMPLATE/1.bug-report.yml | 81 ++++++++++++++++++++ .github/ISSUE_TEMPLATE/2.docs-error.yml | 34 ++++++++ .github/ISSUE_TEMPLATE/3.feature-request.yml | 29 +++++++ .github/ISSUE_TEMPLATE/4.question.yml | 16 ++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/PULL_REQUEST_TEMPLATE.md | 20 +++-- CHANGELOG.md | 23 ++++++ README.md | 22 +++++- package-lock.json | 4 +- package.json | 4 +- 13 files changed, 277 insertions(+), 64 deletions(-) create mode 100644 .github/COMMIT_CONVENTION.md rename CONTRIBUTING.md => .github/CONTRIBUTING.md (100%) delete mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/1.bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/2.docs-error.yml create mode 100644 .github/ISSUE_TEMPLATE/3.feature-request.yml create mode 100644 .github/ISSUE_TEMPLATE/4.question.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/COMMIT_CONVENTION.md b/.github/COMMIT_CONVENTION.md new file mode 100644 index 00000000..d80abd49 --- /dev/null +++ b/.github/COMMIT_CONVENTION.md @@ -0,0 +1,57 @@ +### Git Commit Rule + +> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular). + +Git commits should adhere to the following rule to automatically generate changelogs: + +``` +# Follow the Angular commit conventional format +/^(revert: )?(feat|fix|docs|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?: .{1,50}/ +``` + +We utilize three tags to simplify the rules: + +- `feat:` for new features +- `fix:` for bug fixes +- `doc:` for documentation changes. + +### Git Flow (Branch Rule) + +```mermaid +%%{init: { 'logLevel': 'debug', 'theme': 'base', 'gitGraph': {'showBranches': true, 'showCommitLabel':true,'mainBranchName': "main" }} }%% +gitGraph + commit + commit tag: "v1.0.0" + branch "develop(gitlab)" + checkout "develop(gitlab)" + branch version + checkout version + branch feat/featureExample + checkout feat/featureExample + commit + commit + checkout version + merge feat/featureExample + branch fix/fixExample + checkout fix/fixExample + commit + commit + checkout version + merge fix/fixExample + branch docs/docsExample + checkout docs/docsExample + commit + commit + checkout version + merge docs/docsExample + checkout "main" + merge version tag: "v1.0.1" + commit +``` + +- `feat/` :develop new feature +- `fix/`:edit old feature +- `docs/` :add docs or example +- `` : the version before release ex. 2.0.0 +- `develop` :only for gitlab branch, for rebase github master branch. Not exist in github develop flow +- `master` :github main branch, only update by merge request \ No newline at end of file diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 3f61536c..00000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,50 +0,0 @@ -# ISSUE - -## 說明 (Description) - -請簡單說明此 issue。 - -Please include a summary of the issue. - -## 種類 (Issue Type) -[ ] Feature Request -[ ] Report Bug -[ ] Other - ---- -## 新功能 (Feature Request) -**希望新增此功能的原因 (Reason for this Feature)** - -... - -**可能的解法 (Proposed Solution)** - -... - ---- -## 通報問題 (Report Bug) -**重現步驟 (Steps to Reproduce)** -1. ... -2. ... - -**測試環境 (Environment)**: -* OS: -* NodeJS Version: -* NPM Version: -* Docker Version: - -**應呈現結果 (Expected Behavior)** - -請詳細說明應呈現的畫面/結果。 - -Please describe the bahavior expected. - -**實際呈現結果 (Resulted Behavior)** - -請詳細說明實際執行呈現的畫面/結果。 - -Please describe the behavior that actually occurred. - ---- - -## 其他說明 (Additional Context) \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/1.bug-report.yml b/.github/ISSUE_TEMPLATE/1.bug-report.yml new file mode 100644 index 00000000..96d48d3a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1.bug-report.yml @@ -0,0 +1,81 @@ +name: 🐛 Bug Report +description: Report a bug in bdk +labels: ['type:bug', 'priority:high'] +assignees: 'kidneyweakx' + +body: + - type: markdown + attributes: + value: | + This template is for the unexpected errors or bugs in bdk. If you have a question, please ask in questions section in issues. + + - type: dropdown + attributes: + label: 影響範圍 Which area(s) are affected? (Select all that apply) + multiple: true + options: + - 'Not sure' + - 'Fabric' + - 'Fabric-CA' + - 'Fabric-Chaincode' + - 'Fabric-Explorer' + - 'Quorum' + - 'Quorum-Remote' + - 'Quorum-Explorer' + - 'Docker' + - 'Dockerode' + - 'Node.js' + - 'Workflows(CI/CD)' + + - type: textarea + attributes: + label: 測試環境 Provide environment information + description: Please list your operating system, Node.js version, npm version, + render: bash + placeholder: | + BDK: + Version: 2.0.4 + Operating System: + Platform: macOS + Arch: arm64 + Version: Darwin Kernel Version 22.5.0 + Binaries: + Node: 16.13.2 + npm: 9.5.1 + Docker: + client: 24.0.5 + compose: 2.20.2-desktop.1 + validations: + required: true + + - type: textarea + attributes: + label: 重現步驟 To Reproduce + description: A step-by-step description of how to reproduce the issue, based on the linked reproduction. Screenshots can be provided in the issue body below. If using code blocks, make sure that [syntax highlighting is correct](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting) and double check that the rendered preview is not broken. + placeholder: | + 1. Start quorum node + 2. Start quorum explorer + validations: + required: true + + - type: textarea + attributes: + label: 應呈現結果 Expected Behavior + description: Please describe the behavior expected. + placeholder: | + Should open a explorer in browser + + - type: textarea + attributes: + label: 實際呈現結果 Resulted Behavior + description: Please describe the behavior that actually occurred. + placeholder: | + explorer not open in browser + + - type: checkboxes + attributes: + label: 驗證版本 Verify bdk release + description: 'Please run `bdk --version` besure you are using the latest version.' + options: + - label: I verified that my version is the stable release or 1.0.4 + required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/2.docs-error.yml b/.github/ISSUE_TEMPLATE/2.docs-error.yml new file mode 100644 index 00000000..5926f8e9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2.docs-error.yml @@ -0,0 +1,34 @@ +name: 📃 Docs Improvement +description: Docs error in bdk +labels: ['type:docs', 'priority:low'] + +body: + - type: markdown + attributes: + value: | + This template is for the docs/example error in bdk. If you have a question, please ask in questions section in issues. + + - type: markdown + attributes: + value: Thank you for helping us improve the docs! + + - type: textarea + attributes: + label: What is the improvement or update you wish to see? + description: 'Example: I would like to see more examples of how to use quorum node.' + validations: + required: true + + - type: textarea + attributes: + label: Is there more context that might help us understand? + description: A clear description about the suggestion. + validations: + required: true + + - type: input + attributes: + label: Does the docs page already exist? Please link to it. + description: 'Example: https://github.com/cathayddt/bdk/wiki/link' + validations: + required: false \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/3.feature-request.yml b/.github/ISSUE_TEMPLATE/3.feature-request.yml new file mode 100644 index 00000000..54a553c2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3.feature-request.yml @@ -0,0 +1,29 @@ +name: 🛠️ Feature Request +description: Request a feature in bdk +labels: ['type:feature', 'priority:medium'] + +body: + - type: markdown + attributes: + value: | + This template is for feature requests in bdk. If you have a question, please ask in questions section in issues. + + - type: textarea + attributes: + label: What is the problem that you are trying to solve? + description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + validations: + required: true + + - type: textarea + attributes: + label: 新功能 Feature Request + description: Reason for this Feature + validations: + required: true + + - type: textarea + attributes: + label: 可能的解法 Proposed Solution + validations: + required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/4.question.yml b/.github/ISSUE_TEMPLATE/4.question.yml new file mode 100644 index 00000000..da139831 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/4.question.yml @@ -0,0 +1,16 @@ +name: ❓ Question +description: Ask a question in bdk +labels: ['type:question', 'priority:low'] + +body: + - type: markdown + attributes: + value: | + This template is for questions in bdk. Feel free to ask any questions about bdk. + + - type: textarea + attributes: + label: What is the question? + description: A clear and concise description of what the question is. + validations: + required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..3ba13e0c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ddf1a369..a8f010d8 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,15 +1,23 @@ # PULL REQUEST +## Before + +- [ ] 遵守 Commit 規範 (follow [commit convention](https://github.com/cathayddt/bdk/blob/master/.github/COMMIT_CONVENTION.md)) +- [ ] 遵守 Contributing 規範 (follow [contributing](https://github.com/cathayddt/bdk/blob/master/.github/CONTRIBUTING.md)) + ## 說明 (Description) + -請簡單說明此PR的更動、被修復的問題以及相關的原因,並請列出這個更動所需要的任何相依模組/套件。 + ## 相關問題 (Linked Issues) -- #(issue1) -- #(issue2) -- #(issue3) + ## 貢獻種類 (Type of change) @@ -19,7 +27,7 @@ Please include a summary of the change and which issue is fixed. Please also inc - [ ] Doc change (需要更新文件 this change requires a documentation update) **測試環境 (Test Configuration)**: -* OS: +* OS: * NodeJS Version: * NPM Version: * Docker Version: diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c7d497e..139510e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,29 @@ 這份文件將記錄 BDK 專案的變更日誌 All notable changes to BDK project will be documented here. +## [2.0.4](https://github.com/cathayddt/bdk/releases/tag/2.0.4) - 2023-09-27 + +### Features + +* Add notice in README.md +* 2.0.4 document +* Add bdk wallet create function [#81](https://github.com/cathayddt/bdk/issues/81) +* Genesis.json model [#80](https://github.com/cathayddt/bdk/issues/80) +* Select and excute command [#77](https://github.com/cathayddt/bdk/issues/77) +* Handle select input and change terminal display [#76](https://github.com/cathayddt/bdk/issues/76) +* Ink ui template with commands [#74](https://github.com/cathayddt/bdk/issues/74) + +### Fixes + +* Upgrade action [#84](https://github.com/cathayddt/bdk/issues/84) +* Explorer indexer error [#82](https://github.com/cathayddt/bdk/issues/82) +* Add export type in index.ts [#52](https://github.com/cathayddt/bdk/issues/52) +* Approve and update don't use arrow function [#45](https://github.com/cathayddt/bdk/issues/45) + +### Documentation + +* Add new issue template + ## [2.0.3](https://github.com/cathayddt/bdk/releases/tag/2.0.3) - 2023-06-27 ### Features diff --git a/README.md b/README.md index 0de85314..accd4d48 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,17 @@ -# Blockchain Deployment Kit +
+

Blockchain Development Kit

+
+            ::::::::    :::::::     :::    :::
+         :+:   :+:   :+:   :+:   :+:   :+:
+      +:+    +:+  +:+    +:+  +:+  +:+
+   +#++:++#+   +#+    +:+  +#++:++
+  +#+    +#+  +#+    +#+  +#+  +#+
+ #+#   #+#   #+#   #+#   #+#   #+#
+########    ########    ###    ###
+
+ +[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](./LICENSE) [![codeql-analysis](https://github.com/cathayddt/bdk/actions/workflows/codeql.yml/badge.svg)](https://github.com/cathayddt/bdk/actions/workflows/codeql.yml) [![test-report](https://github.com/cathayddt/bdk/actions/workflows/test-report.yml/badge.svg)](https://github.com/cathayddt/bdk/actions/workflows/test-report.yml) [![unit-test](https://github.com/cathayddt/bdk/actions/workflows/unit-test.yml/badge.svg)](https://github.com/cathayddt/bdk/actions/workflows/unit-test.yml) +
提供指令快速建立、管理、監控 blockchain,最大的特色是可以使用互動式的問答,讓使用者可以依續性的問答來完成指令所需要的指令,在每個 BDK 指令的後面,加入 `-i` 或是 `--interactive` 的參數,來使用互動式問答 @@ -21,9 +34,9 @@ bdk fabric network create -i | Latest | Stable | | ---------------- | ---------------- | -| [v2.0.3][v2.0.3] | [v2.0.3][v2.0.3] | +| [v2.0.4][v2.0.4] | [v2.0.4][v2.0.4] | -[v2.0.3]: https://github.com/cathayddt/bdk/releases/tag/v2.0.3 +[v2.0.4]: https://github.com/cathayddt/bdk/releases/tag/v2.0.4 [更新內容 (Changelog)](CHANGELOG.md) @@ -32,7 +45,7 @@ bdk fabric network create -i - 指令文件 CLI Documentation (Work in Progress) - [Fabric 使用範例 (Examples)](docs/fabric/EXAMPLE.md) - [Quorum 使用範例 (Examples)](docs/quorum/EXAMPLE.md) -- [開發指南 (Contributing)](CONTRIBUTING.md) +- [開發指南 (Contributing)](.github/CONTRIBUTING.md) - [資安通報 (Security Issues)](SECURITY.md) ## 安裝流程 (Getting Started) @@ -42,6 +55,7 @@ bdk fabric network create -i - [npm + nodejs](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) node v16, npm v8 - [docker](https://docs.docker.com/engine/install) - [docker-compose](https://docs.docker.com/compose/install) >= 1.27 +- [docker-desktop(MacOS)](https://www.docker.com/products/docker-desktop/) Need Allow Docker Sockers in Advanced Options - eslint (vscode plugin, dev-only) ### 主程式安裝 (Installation) diff --git a/package-lock.json b/package-lock.json index da554288..d5972c3e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cathayddt/bdk", - "version": "2.0.3", + "version": "2.0.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@cathayddt/bdk", - "version": "2.0.3", + "version": "2.0.4", "license": "Apache-2.0", "dependencies": { "deep-object-diff": "^1.1.0", diff --git a/package.json b/package.json index dff69514..d78e3bde 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cathayddt/bdk", - "version": "2.0.3", + "version": "2.0.4", "description": "Blockchain Deploy Kit", "homepage": "https://github.com/cathayddt/bdk#readme", "bugs": { @@ -42,7 +42,7 @@ "test:fabric": "nyc npm run test -- --grep Fabric", "test:coverage": "nyc npm run test", "test:json": "NODE_ENV=testing BDK_PATH=$(pwd)/test/bdk BDK_DOCKER_HOST_PATH=$(pwd)/test/bdk mocha --reporter json --require ts-node/register ./test/**/*.test.ts --exit > test-results.json", - "git:changelog": "git-cliff --unreleased --tag 2.0.3 --prepend CHANGELOG.md", + "git:changelog": "git-cliff --unreleased --tag 2.0.4 --prepend CHANGELOG.md", "doc:create": "npx typedoc --readme none --out ./api-docs --packages ." }, "dependencies": {