Skip to content

Commit

Permalink
Merge pull request #861 from MoralisWeb3/fix/next-readme
Browse files Browse the repository at this point in the history
@moralisweb3/next readme improvements
  • Loading branch information
ErnoW authored Nov 30, 2022
2 parents e70100b + a8ecced commit da0fa39
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ export class ReadmeGenerator {
let pattern: string;
switch (this.module) {
case 'evmApi':
pattern = '- [Evm Api Hooks](#-evm-api-hooks)';
pattern = '- [Evm Api Hooks](#evm-api-hooks)';
break;
case 'solApi':
pattern = '- [Solana Api Hooks](#-solana-api-hooks)';
pattern = '- [Solana Api Hooks](#solana-api-hooks)';
break;
default:
throw new Error(`No Pattern for the ${this.module}`);
Expand All @@ -62,7 +62,7 @@ export class ReadmeGenerator {
return this.operationFilesParser.parsedOperations.map((operation) => {
return {
type: 'append',
template: ' - [{{ hookName }}](#️-{{ hookName }})',
template: ' - [{{ hookName }}](#️{{ hookName }})',
path: path.join(paths.packages, 'next/README.md'),
pattern,
data: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<div align="center">

![npm](https://img.shields.io/npm/v/@moralisweb3/next)
![node-current](https://img.shields.io/node/v/@moralisweb3/next)
![GitHub last commit](https://img.shields.io/github/last-commit/MoralisWeb3/@moralisweb3/next)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/@moralisweb3/next)
![npm type definitions](https://img.shields.io/npm/types/@moralisweb3/next)

Expand All @@ -26,18 +24,18 @@ Please check the [official documentation of Moralis](https://docs.moralis.io/) f

### 1. Install Dependencies

Make sure to have `next`, `react`, `react-dom` and `moralis` installed as dependencies, then install `@moralisweb3/next`
Make sure to have `next`, `next-auth`, `react`, `react-dom` and `moralis` installed as dependencies, then install `@moralisweb3/next`

In short:

```sh
npm install moralis @moralisweb3/next next react react-dom
npm install moralis @moralisweb3/next next next-auth react react-dom
```

or

```sh
yarn add moralis @moralisweb3/next next react react-dom
yarn add moralis @moralisweb3/next next next-auth react react-dom
```

> Make sure to also `moralis` to the latest version, when you update `@moralisweb3/next`.
Expand Down Expand Up @@ -81,11 +79,11 @@ If you need help with setting up the boilerplate or have other questions - don't
- [🔐 Authentication and Session Management with NextAuth](#️-authentication-and-session-management-with-nextauth)
- [✨ Hook Usage Example](#️-hook-usage-example)
- [⚙️ Hook Advanced Config](#️-hook-advanced-config)
- [Authentication Api Hooks](#-authentication-api-hooks)
- [useAuthRequestChallengeSolana](#️-useAuthRequestChallengeSolana)
- [useAuthRequestChallengeEvm](#-useAuthRequestChallengeEvm)
- [Evm Api Hooks](#-evm-api-hooks)
- [Solana Api Hooks](#-solana-api-hooks)
- [Authentication Api Hooks](#authentication-api-hooks)
- [useAuthRequestChallengeSolana](#️useAuthRequestChallengeSolana)
- [useAuthRequestChallengeEvm](#useAuthRequestChallengeEvm)
- [Evm Api Hooks](#evm-api-hooks)
- [Solana Api Hooks](#solana-api-hooks)
- [🧙‍♂️ Community](#️-community)

# 🔐 Authentication and Session Management with NextAuth
Expand Down
102 changes: 50 additions & 52 deletions packages/next/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<div align="center">
<p align="center">
<img src="./.readme/MoralisLogo.png" alt="Moralis NextJS" />
<img src="https://raw.githubusercontent.com/MoralisWeb3/Moralis-JS-SDK/main/packages/next/.readme/MoralisLogo.png" alt="Moralis NextJS" />
</p>
</div>

<div align="center">

![npm](https://img.shields.io/npm/v/@moralisweb3/next)
![node-current](https://img.shields.io/node/v/@moralisweb3/next)
![GitHub last commit](https://img.shields.io/github/last-commit/MoralisWeb3/@moralisweb3/next)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/@moralisweb3/next)
![npm type definitions](https://img.shields.io/npm/types/@moralisweb3/next)

Expand All @@ -26,18 +24,18 @@ Please check the [official documentation of Moralis](https://docs.moralis.io/) f

### 1. Install Dependencies

Make sure to have `next`, `react`, `react-dom` and `moralis` installed as dependencies, then install `@moralisweb3/next`
Make sure to have `next`, `next-auth`, `react`, `react-dom` and `moralis` installed as dependencies, then install `@moralisweb3/next`

In short:

```sh
npm install moralis @moralisweb3/next next react react-dom
npm install moralis @moralisweb3/next next next-auth react react-dom
```

or

```sh
yarn add moralis @moralisweb3/next next react react-dom
yarn add moralis @moralisweb3/next next next-auth react react-dom
```

> Make sure to also `moralis` to the latest version, when you update `@moralisweb3/next`.
Expand Down Expand Up @@ -82,55 +80,55 @@ If you need help with setting up the boilerplate or have other questions - don't
- [✨ Hook Usage Example](#️-hook-usage-example)
- [⚙️ Hook Advanced Config](#️-hook-advanced-config)
- [Authentication Api Hooks](#-authentication-api-hooks)
- [useAuthRequestChallengeSolana](#️-useAuthRequestChallengeSolana)
- [useAuthRequestChallengeSolana](#️useAuthRequestChallengeSolana)
- [useAuthRequestChallengeEvm](#-useAuthRequestChallengeEvm)
- [Evm Api Hooks](#-evm-api-hooks)
- [useEvmWeb3ApiVersion](#️-useEvmWeb3ApiVersion)
- [useEvmRunContractFunction](#️-useEvmRunContractFunction)
- [useEvmEndpointWeights](#️-useEvmEndpointWeights)
- [useEvmWalletTransactions](#️-useEvmWalletTransactions)
- [useEvmTransaction](#️-useEvmTransaction)
- [useEvmWalletTokenTransfers](#️-useEvmWalletTokenTransfers)
- [useEvmWalletTokenBalances](#️-useEvmWalletTokenBalances)
- [useEvmTokenTransfers](#️-useEvmTokenTransfers)
- [useEvmTokenPrice](#️-useEvmTokenPrice)
- [useEvmTokenMetadata](#️-useEvmTokenMetadata)
- [useEvmTokenMetadataBySymbol](#️-useEvmTokenMetadataBySymbol)
- [useEvmTokenAllowance](#️-useEvmTokenAllowance)
- [useEvmResolveDomain](#️-useEvmResolveDomain)
- [useEvmResolveAddress](#️-useEvmResolveAddress)
- [useEvmSyncNFTContract](#️-useEvmSyncNFTContract)
- [useEvmSearchNFTs](#️-useEvmSearchNFTs)
- [useEvmReSyncMetadata](#️-useEvmReSyncMetadata)
- [useEvmWalletNFTTransfers](#️-useEvmWalletNFTTransfers)
- [useEvmWalletNFTs](#️-useEvmWalletNFTs)
- [useEvmWalletNFTCollections](#️-useEvmWalletNFTCollections)
- [useEvmNFTTransfers](#️-useEvmNFTTransfers)
- [useEvmNFTTransfersFromToBlock](#️-useEvmNFTTransfersFromToBlock)
- [useEvmNFTTransfersByBlock](#️-useEvmNFTTransfersByBlock)
- [useEvmNFTTrades](#️-useEvmNFTTrades)
- [useEvmNFTTokenIdOwners](#️-useEvmNFTTokenIdOwners)
- [useEvmNFTOwners](#️-useEvmNFTOwners)
- [useEvmNFTMetadata](#️-useEvmNFTMetadata)
- [useEvmNFTLowestPrice](#️-useEvmNFTLowestPrice)
- [useEvmNFTContractTransfers](#️-useEvmNFTContractTransfers)
- [useEvmNFTContractMetadata](#️-useEvmNFTContractMetadata)
- [useEvmContractNFTs](#️-useEvmContractNFTs)
- [useEvmUploadFolder](#️-useEvmUploadFolder)
- [useEvmContractLogs](#️-useEvmContractLogs)
- [useEvmContractEvents](#️-useEvmContractEvents)
- [useEvmPairReserves](#️-useEvmPairReserves)
- [useEvmPairAddress](#️-useEvmPairAddress)
- [useEvmDateToBlock](#️-useEvmDateToBlock)
- [useEvmBlock](#️-useEvmBlock)
- [useEvmNativeBalance](#️-useEvmNativeBalance)
- [useEvmWeb3ApiVersion](#️useEvmWeb3ApiVersion)
- [useEvmRunContractFunction](#️useEvmRunContractFunction)
- [useEvmEndpointWeights](#️useEvmEndpointWeights)
- [useEvmWalletTransactions](#️useEvmWalletTransactions)
- [useEvmTransaction](#️useEvmTransaction)
- [useEvmWalletTokenTransfers](#️useEvmWalletTokenTransfers)
- [useEvmWalletTokenBalances](#️useEvmWalletTokenBalances)
- [useEvmTokenTransfers](#️useEvmTokenTransfers)
- [useEvmTokenPrice](#️useEvmTokenPrice)
- [useEvmTokenMetadata](#️useEvmTokenMetadata)
- [useEvmTokenMetadataBySymbol](#️useEvmTokenMetadataBySymbol)
- [useEvmTokenAllowance](#️useEvmTokenAllowance)
- [useEvmResolveDomain](#️useEvmResolveDomain)
- [useEvmResolveAddress](#️useEvmResolveAddress)
- [useEvmSyncNFTContract](#️useEvmSyncNFTContract)
- [useEvmSearchNFTs](#️useEvmSearchNFTs)
- [useEvmReSyncMetadata](#️useEvmReSyncMetadata)
- [useEvmWalletNFTTransfers](#️useEvmWalletNFTTransfers)
- [useEvmWalletNFTs](#️useEvmWalletNFTs)
- [useEvmWalletNFTCollections](#️useEvmWalletNFTCollections)
- [useEvmNFTTransfers](#️useEvmNFTTransfers)
- [useEvmNFTTransfersFromToBlock](#️useEvmNFTTransfersFromToBlock)
- [useEvmNFTTransfersByBlock](#️useEvmNFTTransfersByBlock)
- [useEvmNFTTrades](#️useEvmNFTTrades)
- [useEvmNFTTokenIdOwners](#️useEvmNFTTokenIdOwners)
- [useEvmNFTOwners](#️useEvmNFTOwners)
- [useEvmNFTMetadata](#️useEvmNFTMetadata)
- [useEvmNFTLowestPrice](#️useEvmNFTLowestPrice)
- [useEvmNFTContractTransfers](#️useEvmNFTContractTransfers)
- [useEvmNFTContractMetadata](#️useEvmNFTContractMetadata)
- [useEvmContractNFTs](#️useEvmContractNFTs)
- [useEvmUploadFolder](#️useEvmUploadFolder)
- [useEvmContractLogs](#️useEvmContractLogs)
- [useEvmContractEvents](#️useEvmContractEvents)
- [useEvmPairReserves](#️useEvmPairReserves)
- [useEvmPairAddress](#️useEvmPairAddress)
- [useEvmDateToBlock](#️useEvmDateToBlock)
- [useEvmBlock](#️useEvmBlock)
- [useEvmNativeBalance](#️useEvmNativeBalance)
- [Solana Api Hooks](#-solana-api-hooks)
- [useSolTokenPrice](#️-useSolTokenPrice)
- [useSolNFTMetadata](#️-useSolNFTMetadata)
- [useSolSPL](#️-useSolSPL)
- [useSolPortfolio](#️-useSolPortfolio)
- [useSolNFTs](#️-useSolNFTs)
- [useSolBalance](#️-useSolBalance)
- [useSolTokenPrice](#️useSolTokenPrice)
- [useSolNFTMetadata](#️useSolNFTMetadata)
- [useSolSPL](#️useSolSPL)
- [useSolPortfolio](#️useSolPortfolio)
- [useSolNFTs](#️useSolNFTs)
- [useSolBalance](#️useSolBalance)
- [🧙‍♂️ Community](#️-community)

# 🔐 Authentication and Session Management with NextAuth
Expand Down
1 change: 1 addition & 0 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "@moralisweb3/next",
"description": "Moralis Evm and Solana Hooks for NextJS",
"author": "Moralis",
"version": "2.8.1",
"license": "MIT",
Expand Down

1 comment on commit da0fa39

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test coverage

Title Lines Statements Branches Functions
api-utils Coverage: 25%
26.34% (49/186) 19.14% (9/47) 22.85% (8/35)
auth Coverage: 90%
92.77% (77/83) 81.81% (18/22) 90% (18/20)
evm-api Coverage: 100%
100% (79/79) 66.66% (6/9) 100% (47/47)
common-evm-utils Coverage: 64%
65% (938/1443) 19.93% (123/617) 35.89% (201/560)
sol-api Coverage: 96%
96.66% (29/30) 66.66% (6/9) 91.66% (11/12)
common-sol-utils Coverage: 74%
73.77% (135/183) 60% (12/20) 65.67% (44/67)
common-streams-utils Coverage: 93%
93.13% (787/845) 85.96% (196/228) 84.14% (276/328)
streams Coverage: 87%
86.71% (398/459) 67.14% (47/70) 84.52% (71/84)

Please sign in to comment.