Skip to content

Commit

Permalink
Merge pull request #164 from ddnlink/father4
Browse files Browse the repository at this point in the history
Release 3.7.0
  • Loading branch information
imfly authored Aug 5, 2024
2 parents 6e269e1 + c45cb5b commit 69224ba
Show file tree
Hide file tree
Showing 506 changed files with 56,340 additions and 6,452 deletions.
7 changes: 7 additions & 0 deletions .fatherrc.base.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {defineConfig} from 'father'

export default defineConfig({
cjs: {
output: 'dist'
}
})
30 changes: 16 additions & 14 deletions .fatherrc.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
import { readdirSync } from 'fs';
import { join } from 'path';
import {readdirSync} from 'fs'
import {join} from 'path'

const headPkgs = ['utils', 'core', 'crypto'];
const tailPkgs = ['peer', 'test-utils', 'node-sdk', 'js-sdk'];
const headPkgs = ['utils', 'core', 'crypto']
const tailPkgs = ['peer', 'test-utils', 'node-sdk', 'js-sdk']
// 开源插件包
const otherPkgs = readdirSync(join(__dirname, 'packages')).filter(
(pkg) =>
pkg.charAt(0) !== '.' && !headPkgs.includes(pkg) && !tailPkgs.includes(pkg),
);
pkg => pkg.charAt(0) !== '.' && !headPkgs.includes(pkg) && !tailPkgs.includes(pkg)
)
// 企业插件包
const proPkgs = readdirSync(join(__dirname, 'pro-packages')).filter(
pkg => pkg.charAt(0) !== '.' && !headPkgs.includes(pkg) && !tailPkgs.includes(pkg)
)

export default {
target: 'node',
cjs: { type: 'babel', lazy: true, minify: true },
cjs: {type: 'babel', lazy: false, minify: true},
disableTypeCheck: false,
pkgs: [...headPkgs, ...otherPkgs, ...tailPkgs],
pkgs: [...headPkgs, ...otherPkgs, ...proPkgs, ...tailPkgs],
doc: {
themeConfig: { mode: 'light' },
themeConfig: {mode: 'light'},
base: '/doc'
},
extraBabelPlugins: [
['@babel/plugin-transform-classes'],
],
};
extraBabelPlugins: [['@babel/plugin-transform-classes']]
}
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ lerna-debug.log*

/coverage
.idea
yarn.lock
package-lock.json
*bak
.vscode

Expand All @@ -45,10 +43,11 @@ screenshot
/packages/*/dist
/packages/**/node_modules/.cache
/packages/**/.docz
/packages/**/package-lock\.json
/pro-packages

# settings
config/deploy
config/mainnet/*
**/**/config.mainnet.js
**/**/config.local.js
**/**/.ddnrc.local.js
Expand All @@ -59,4 +58,9 @@ config/deploy
**/**/*.hbl.js
**/**/*.custom.js
examples/peer*
# .ddnrc.js
# .ddnrc.js

.turbo
.pnpm-store
.husky
.github
15 changes: 15 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use-node-version=20.13.1
# Prevent jsx namespace conflicts, because Vue global types will auto install.
# In the future, Vue 3 will fix this issue
# See https://github.com/vuejs/core/blob/main/CHANGELOG.md#features-1
auto-install-peers=false

# 在安装本地时自动连接
# 或者 pnpm add web --filter docs --link-workspace-packages=true
link-workspace-packages = true

# 当安装时,使用workspace协议,默认是 true,版本号就会是这样 "@ddn/asset-aob": "workspace:^1.0.0"
# save-workspace-protocol = false
save-prefix = '^'

build-from-source = true
38 changes: 37 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,44 @@
## [3.6.3](https://github.com/ddnlink/ddn/compare/v3.6.0...v3.6.3) (2020-12-11)

# [3.7.0](https://github.com/ddnlink/ddn/compare/v2.4.3...v3.7.0) (2024-08-05)


### Bug Fixes

* DDN release ([68a53ed](https://github.com/ddnlink/ddn/commit/68a53ed12f798b36150d3549728f625b551a24cc))
* set corepack disable to use pnpm ([ddbd1d0](https://github.com/ddnlink/ddn/commit/ddbd1d03e12f9c485c0a40c3ccde2ea73ea6eb2d))
* update .fatherrc.js ([3f89b46](https://github.com/ddnlink/ddn/commit/3f89b46d47ea44f563781fcc5224efca81f5a7e4))
* update @ddn/peer to write ddn.pid when isDaemonMode is true ([efd372a](https://github.com/ddnlink/ddn/commit/efd372add4bf4e6b9aab0fc1155407fe0caef5a4))
* update ddn-cli ([4c73dfd](https://github.com/ddnlink/ddn/commit/4c73dfd3a297fd31ce06f736bfb35d329225baa3))
* update require ([7c2d5ca](https://github.com/ddnlink/ddn/commit/7c2d5ca7b6d4313b2bec10572ccff233a5adcbe4))


### Features

* add access constans.*.js method to @ddn/core ([8c4c7bd](https://github.com/ddnlink/ddn/commit/8c4c7bd60dfa79aa8525455301ce1ef7f6a8fe36))
* add jest to root, delete @ddn/test and update @ddn/core to add getConstants methods ([1ee95a3](https://github.com/ddnlink/ddn/commit/1ee95a3e3b39eddf6de05e7d2f7ee6781b4a69f1))
* release @ddn/core 2.4.7 ([adf2ede](https://github.com/ddnlink/ddn/commit/adf2ede2a9a2ed965c6fbd61a45ba2b7794d425a))
* release 2.4.4 ([fccdd34](https://github.com/ddnlink/ddn/commit/fccdd34039a437d24b3e104a7dea49af15b28e1c))
* update @ddn/node-sdk for ddnrc.default.js erroo and jest config for pro-packages ([46eb734](https://github.com/ddnlink/ddn/commit/46eb73414712511bc330576c1bb0f2d5c149a04d))
* update asset* from .ddnrc.js to config, and Update to father4 + turbo + pnpm all right ([0ed2838](https://github.com/ddnlink/ddn/commit/0ed283880ab8b3a1f7976534661f84d31313012a))
* update docker, and crypto/crypto-base ([6ada849](https://github.com/ddnlink/ddn/commit/6ada849bede2f9838b66c20360fd6777992a0539))
* update father, jest to lastest and pnpm, packing all packages to dist by esbuild ([f798e26](https://github.com/ddnlink/ddn/commit/f798e266f6fa1e616f914407a49b0c00b3367a20))
* update to pack contract all right ([ec82cdd](https://github.com/ddnlink/ddn/commit/ec82cddc36de71f9e83d0db00b71ce321ed44694))


## [3.6.4](https://github.com/ddnlink/ddn/compare/v2.2.0...v3.6.4) (2022-08-06)


### Features

* modify the command-line tool nethash generation error ([3fb2dd1](https://github.com/ddnlink/ddn/commit/3fb2dd1722ef9263375c033f63b28a0f9232cf12))



## [3.6.3](https://github.com/ddnlink/ddn/compare/v3.6.0...v3.6.3) (2020-12-11)


### Bug

* 🐛 Add locales to @ddn/ddn ([83a4ad6](https://github.com/ddnlink/ddn/commit/83a4ad650b3c4b0dc2b4bade44f67e2c930d1dae)), closes [#91](https://github.com/ddnlink/ddn/issues/91)
* 🐛 dapp test bugs ([3c64b87](https://github.com/ddnlink/ddn/commit/3c64b87fa5054bfa242fa5fca566b6c03beeb3e0))
* 🐛 Delete config.settings from .ddnrc.js ([2a3b656](https://github.com/ddnlink/ddn/commit/2a3b656398607038460c46339b627381899bc679))
Expand Down
14 changes: 9 additions & 5 deletions License.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
The MIT License (MIT)
The AGPL 3.0 License (AGPL 3.0)

Copyright (c) 2016-2020 DDN FOUNDATION</br>
Copyright (c) 2016-2024 DDN FOUNDATION</br>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the website https://www.gnu.org/licenses/agpl-3.0.html
32 changes: 17 additions & 15 deletions README-zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
<a href="https://ddn.link"><img src="https://avatars3.githubusercontent.com/u/34602359?s=200&v=4" alt="DDN Blockchain" width="200"></a>
<a href="https://ddn.net"><img src="https://avatars3.githubusercontent.com/u/34602359?s=200&v=4" alt="DDN Blockchain" width="200"></a>
<br>
数据分发网络
<br>
Expand All @@ -8,27 +8,27 @@
</h1>

<p align="center">
<a href="https://github.com/ddnlink/ddn/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="GitHub license"></a>
<a href="https://github.com/ddnlink/ddn/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-AGPL 3.0-blue.svg" alt="GitHub license"></a>
<a href="https://www.npmjs.com/package/ddn"><img src="https://img.shields.io/npm/v/ddn.svg?style=flat" alt="npm version"></a>
<a href="https://www.npmjs.com/package/ddn"><img src="https://img.shields.io/npm/dm/ddn.svg?style=flat" alt="Downloads"></a>
<a href="https://github.com/ddnlink/ddn/actions"><img src="https://github.com/ddnlink/ddn/workflows/Node.js%20CI/badge.svg" alt="Build Status"></a>
<a href="http://docs.ddn.link/#/community/greenpaper"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
<a href="http://docs.ddn.net/#/community/greenpaper"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
</p>

<p align="center">
<a href="/README.md">English</a> •
<a href="/README-zh-CN.md">简体中文 (Simplified Chinese)</a> •
</p>

<!-- **基于当前版本的测试链**: <http://testnet.ddn.link> -->
<!-- **基于当前版本的测试链**: <http://testnet.ddn.net> -->

DDN, 是一个成熟的企业级区块链系统,已经服务于版权存证、检验检测、电子医疗等10多个领域。

更多信息,请查看 [官网](https://www.ddn.link) , [docs](http://docs.ddn.link).
更多信息,请查看 [官网](http://www.ddn.net) , [docs](http://docs.ddn.net).

**配套书籍和视频**: [《Nodejs区块链开发2》](https://github.com/imfly/blockchain-on-nodejs), [旧版电子书](https://github.com/imfly/bitcoin-on-nodejs), [旧版纸质书籍](https://item.jd.com/12206128.html), [旧版代码](https://github.com/ebookcoin/ebookcoin)

测试网络:<http://testnet.ddn.link>
测试网络:<http://testnet.ddn.net>

> 特别注意:> 3.* 的版本并未兼容当前主网,切记不要使用主网测试你的Dapp应用。
Expand All @@ -43,7 +43,9 @@ DDN, 是一个成熟的企业级区块链系统,已经服务于版权存证、
- [x] **多功能**, 支付转账、数据存证、链上资产(AoB)、去中心化应用(DAPP)等强大功能;
- [x] **多行业**, 当前已经覆盖版权保护、电子医疗、食品安全、防伪溯源等众多领域;
- [x] **可视化**, 你可以通过点点鼠标定制自己的区块链并部署到节点服务器上去,欢迎访问:<http://ui.ddn.net>;
- [ ] **Docker化**, 支持docker、云部署等更多主流部署方式;
- [x] **Docker化**, 支持docker、云部署等更多主流部署方式;
- [x] **全新教程**, 基于最新版本,推出区块链开发的全新教程;
- [x] **更多案例**, 请访问官网,<https://ddn.net>
- [ ] 更多功能,持续开发中...

## 架构
Expand All @@ -56,11 +58,11 @@ DDN, 是一个成熟的企业级区块链系统,已经服务于版权存证、

## 案例

- [DDN 官网](https://ddn.link)
- [DDN 主网](http://mainnet.ddn.link)
- [DDN 测试网](http://testnet.ddn.link)
- [DDN 钱包](http://wallet.ddn.link)
- [DDN手机钱包](https://www.ddn.link/product/wallet)
- [DDN 官网](https://ddn.net)
- [DDN 主网](http://mainnet.ddn.net)
- [DDN 测试网](http://testnet.ddn.net)
- [DDN 钱包](http://wallet.ddn.net)
- [DDN手机钱包](http://www.ddn.net/product/wallet)

## 社区

Expand All @@ -76,14 +78,14 @@ DDN, 是一个成熟的企业级区块链系统,已经服务于版权存证、

## 捐赠

你可以通过[DDN钱包](http://wallet.ddn.link)或者[DDN手机钱包](https://www.ddn.link/product/wallet)向下面的地址捐赠`DDN`,这些DDN将被用于奖励本项目的贡献者.
你可以通过[DDN钱包](http://wallet.ddn.net)或者[DDN手机钱包](http://www.ddn.net/product/wallet)向下面的地址捐赠`DDN`,这些DDN将被用于奖励本项目的贡献者.

| DDN基金会钱包转账地址 | DDN手机钱包扫码转账 |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| DLjrrVwnmMXstcAYVjcrpwyYb3kY1ehABU | ![](./docs/images/foundation.png)|

## 协议

The MIT License (MIT)
The AGPL 3.0 License (AGPL 3.0)

版权 (c) 2016-2020 DDN基金会。权限受保护。请查看授权文件License.txt获取更多授权信息。
版权 (c) 2016-2024 DDN基金会。权限受保护。请查看授权文件License.txt获取更多授权信息。
30 changes: 16 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
<a href="https://ddn.link"><img src="https://avatars3.githubusercontent.com/u/34602359?s=200&v=4" alt="DDN Blockchain" width="200"></a>
<a href="http://ddn.net"><img src="https://avatars3.githubusercontent.com/u/34602359?s=200&v=4" alt="DDN Blockchain" width="200"></a>
<br>
Data Delivery Network
<br>
Expand All @@ -12,7 +12,7 @@
<a href="https://www.npmjs.com/package/ddn"><img src="https://img.shields.io/npm/v/ddn.svg?style=flat" alt="npm version"></a>
<a href="https://www.npmjs.com/package/ddn"><img src="https://img.shields.io/npm/dm/ddn.svg?style=flat" alt="Downloads"></a>
<a href="https://github.com/ddnlink/ddn/actions"><img src="https://github.com/ddnlink/ddn/workflows/Node.js%20CI/badge.svg" alt="Build Status"></a>
<a href="http://docs.ddn.link/#/community/greenpaper"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
<a href="http://docs.ddn.net/#/community/greenpaper"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
</p>

<p align="center">
Expand All @@ -21,13 +21,13 @@
</p>


<!-- **Testnet Powered by Current version**: <http://testnet.ddn.link> -->
<!-- **Testnet Powered by Current version**: <http://testnet.ddn.net> -->

More infomation please visit our [official website](https://www.ddn.link) , [docs](http://docs.ddn.link).
More infomation please visit our [official website](http://www.ddn.net) , [docs](http://docs.ddn.net).

**Professional books and videos**[nodejs on blockchain 2](https://github.com/imfly/blockchain-on-nodejs), and [The old book](https://github.com/imfly/bitcoin-on-nodejs), [The old paper book](https://item.jd.com/12206128.html), [The old code](https://github.com/ebookcoin/ebookcoin)

> **Special note**: The 3.* versions are not compatible with the [mainnet](http://mainnet.ddn.link). Do not use the mainnet to test your Dapps.
> **Special note**: The 3.* versions are not compatible with the [mainnet](http://mainnet.ddn.net). Do not use the mainnet to test your Dapps.
## Features

Expand All @@ -40,7 +40,9 @@ More infomation please visit our [official website](https://www.ddn.link) , [doc
- [x] **Multi function**, payment, certificate storage, AOB, DAPP, etc;
- [x] **Multi industry**, currently covering copyright protection, electronic medicine, food safety, anti-counterfeiting traceability and other fields
- [x] **Visual deployment**, you can customize your own blockchain by clicking the mouse and publish it to the peer server, please access <http://ui.ddn.net>;
- [ ] **Docker**, tod support mainstream deployment methods such as docker;
- [x] **Docker**, tod support mainstream deployment methods such as docker;
- [x] **Tutorial**, based on the latest version, a new tutorial for blockchain development is launched;
- [x] **More cases**, please visit the official website,<https://ddn.net>
- [ ] More...

## Architect
Expand All @@ -53,11 +55,11 @@ More infomation please visit our [official website](https://www.ddn.link) , [doc

## Examples

- [DDN Site](https://ddn.link)
- [DDN Mainnet](http://mainnet.ddn.link)
- [DDN Testnet](http://mainnet.ddn.link)
- [DDN Wallet](http://wallet.ddn.link)
- [DDN Mobile Wallet](https://www.ddn.link/product/wallet)
- [DDN Site](http://ddn.net)
- [DDN Mainnet](http://mainnet.ddn.net)
- [DDN Testnet](http://mainnet.ddn.net)
- [DDN Wallet](http://wallet.ddn.net)
- [DDN Mobile Wallet](http://www.ddn.net/product/wallet)

## Community

Expand All @@ -69,7 +71,7 @@ More infomation please visit our [official website](https://www.ddn.link) , [doc
## Donation

You can donate DDN to the follow address with [DDN Wallet](http://wallet.ddn.link), or [DDN Mobile Wallet](https://www.ddn.link/product/wallet), and these DDN will be paid to those who contribute to this project.
You can donate DDN to the follow address with [DDN Wallet](http://wallet.ddn.net), or [DDN Mobile Wallet](http://www.ddn.net/product/wallet), and these DDN will be paid to those who contribute to this project.

| DDN FOUNDATION Wallet Address | DDN Mobile Wallet QRCode |
| ------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
Expand All @@ -81,6 +83,6 @@ Please visit [CONTRIBUTING](./docs/guide/contributing.md)

## License

The MIT License (MIT)
The AGPL 3.0 License (AGPL 3.0)

Copyright (c) 2016-2020 DDN FOUNDATION. All rights reserved. See License.txt in the project root for license information.
Copyright (c) 2016-2024 DDN FOUNDATION. All rights reserved. See License.txt in the project root for license information.
8 changes: 4 additions & 4 deletions config/config.docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module.exports = {
title: 'DDN',
mode: 'site',
hash: true,
favicon: 'http://testnet.ddn.link/static/ddnlogo.b8ab60d5.png',
logo: 'http://testnet.ddn.link/static/ddnlogo.b8ab60d5.png',
favicon: 'http://testnet.ddn.net/static/ddnlogo.b8ab60d5.png',
logo: 'http://testnet.ddn.net/static/ddnlogo.b8ab60d5.png',
navs: {
'en-US': [
null,
Expand Down Expand Up @@ -38,7 +38,7 @@ module.exports = {
},
{
title: 'Frame extension',
children: ['guide/crypto', 'guide/cryptoDevelop', 'guide/asset', 'guide/app/dapp']
children: ['guide/crypto', 'guide/cryptoDevelop', 'guide/asset', 'guide/contract']
},
{
title: 'Core development',
Expand Down Expand Up @@ -70,7 +70,7 @@ module.exports = {
},
{
title: '框架扩展',
children: ['guide/crypto', 'guide/asset', 'guide/app/dapp']
children: ['guide/crypto', 'guide/asset', 'guide/contract']
},
{
title: '底层开发',
Expand Down
2 changes: 1 addition & 1 deletion config/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const ddn = require('./config.ddn')
const ddn = require('./config.testnet')

// 默认是输出 ddn-docs
let config = ddn
Expand Down
11 changes: 3 additions & 8 deletions config/config.ddn.js → config/config.testnet.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
* Created by Imfly on Sun Dec 29 2019 15:57:56
*
* Copyright (c) 2019 DDN FOUNDATION. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the AGPL 3.0 License. See License.txt in the project root for license information.
*-------------------------------------------------------------------------------------------- */
const Sequelize = require('sequelize')
const Op = Sequelize.Op

module.exports = {
/**
* About Peer
*/
*/
port: 8001,
address: '0.0.0.0',
publicIp: '',
Expand Down Expand Up @@ -217,10 +217,5 @@ module.exports = {
* "@ddn/asset-aob"
* ]
*/
assets: [
'@ddn/asset-evidence',
'@ddn/asset-aob',
'@ddn/asset-dapp',
'@ddn/asset-dao'
]
assets: ['@ddn/asset-evidence', '@ddn/asset-aob', '@ddn/asset-dapp', '@ddn/asset-dao']
}
Loading

0 comments on commit 69224ba

Please sign in to comment.