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

Add: Typedocs #1208

Merged
merged 118 commits into from
Nov 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
e95c8e7
feat: add typedoc + change tsconfig.base
few-sw Nov 2, 2023
439a28d
feat: add typedoc action
few-sw Nov 2, 2023
ffbeeae
feat: temporary disable release action
few-sw Nov 2, 2023
32b4c9f
Merge pull request #1 from few-sw/typedoc-configuration
few-sw Nov 2, 2023
596c49d
feat: update typedoc generator action
few-sw Nov 2, 2023
e0da8a6
Merge pull request #2 from few-sw/typedoc-configuration
few-sw Nov 2, 2023
38fab7a
feat: update typedoc generator action to support pnpm
few-sw Nov 5, 2023
4dc1ff4
feat: update action logic for testing purposes
few-sw Nov 5, 2023
4723bc0
feat: configure pnpm back to version 7
few-sw Nov 5, 2023
544c896
feat: update action configuration
few-sw Nov 5, 2023
2ac196b
feat: change action configuration
few-sw Nov 5, 2023
7fa30bf
feat: update build documentation action
few-sw Nov 5, 2023
ca92831
feat: minor changes
few-sw Nov 5, 2023
8cd41d3
feat: update tsconfig.base.json
few-sw Nov 6, 2023
efd6b4d
feat: update typedoc action
few-sw Nov 7, 2023
8b70319
feat: add readme option
few-sw Nov 7, 2023
24d98ec
feat: update entryPoints
few-sw Nov 7, 2023
2363c12
feat: update entryPoints
few-sw Nov 7, 2023
2b012e3
feat: change entryPoints to near-api-js
few-sw Nov 7, 2023
ba45b2b
feat: add package entrypointstrategy
few-sw Nov 9, 2023
30f45be
feat: fix adding modules content on typedoc generated documentation
few-sw Nov 10, 2023
1def07a
feat: update tsconfig.base.json
few-sw Nov 10, 2023
afccbf3
feat: update tsconfig
few-sw Nov 10, 2023
d5b1873
feat: update tsconfig files for each package
few-sw Nov 13, 2023
0fd56f0
feat: add custom-theme
few-sw Nov 14, 2023
8f071de
feat: add custom-theme
few-sw Nov 14, 2023
01af72c
feat: testing configuration
few-sw Nov 14, 2023
3c860c1
feat: add externalSymbolLinkMappings
few-sw Nov 14, 2023
50e1706
feat: add typedoc-theme
few-sw Nov 14, 2023
94290ab
feat: update readme files links
few-sw Nov 14, 2023
4452a21
feat: update typedoc options
few-sw Nov 14, 2023
58cc2cb
feat: update tsconfig
few-sw Nov 14, 2023
253d9d0
feat: update out folder
few-sw Nov 14, 2023
80899a0
feat: update typedoc-generator
few-sw Nov 15, 2023
79ff805
feat: add target-folder option to typedoc-generator action
few-sw Nov 15, 2023
ffff8ee
feat: update typedoc docs generator to allow linking README files to …
few-sw Nov 15, 2023
f566ae0
feat: minor changes
few-sw Nov 15, 2023
ef25522
feat: update typedoc action
few-sw Nov 15, 2023
90c6df7
feat: elete tsconfig.json
few-sw Nov 15, 2023
04bb156
feat: make changes to the step Update gh-pages Branch
few-sw Nov 15, 2023
6f5ce94
feat: update typedoc-generator steps
few-sw Nov 15, 2023
583ff30
feat: update action
few-sw Nov 15, 2023
92020fa
feat: add user/email
few-sw Nov 15, 2023
8bacdba
feat: add tsconfig.json.local
few-sw Nov 15, 2023
8b5a619
feat: add write permissions
few-sw Nov 15, 2023
135891d
feat: github action small change
few-sw Nov 15, 2023
668ba69
feat: fix divergent changes on action
few-sw Nov 15, 2023
45d0a18
feat: small changes
few-sw Nov 15, 2023
0a5ab1c
feat: add action that syncs branches
few-sw Nov 15, 2023
2f5dec0
feat: fix permission issues
few-sw Nov 15, 2023
7b5e4a7
feat: created generated-documentation folder
few-sw Nov 15, 2023
ab95ff9
feat: add folder
few-sw Nov 15, 2023
3957a04
feat: clean code
few-sw Nov 15, 2023
0317f92
feat: change action configuration
few-sw Nov 15, 2023
896e11f
feat: change out folder to build
few-sw Nov 15, 2023
a13666d
feat: enable target-folder
few-sw Nov 15, 2023
6549c26
feat: update build destination folder
few-sw Nov 16, 2023
83869d5
feat: change action logic
few-sw Nov 16, 2023
cdbbf38
feat: update action
few-sw Nov 16, 2023
5d88e75
feat: disable pull-request action
few-sw Nov 16, 2023
7f567ae
feat: clean docs folder
few-sw Nov 16, 2023
020df34
feat: remove lfs: true
few-sw Nov 16, 2023
178fb80
feat: update action
few-sw Nov 16, 2023
e292c89
feat: add concurrency handler
few-sw Nov 16, 2023
e38c0de
feat: remove clean option
few-sw Nov 16, 2023
64da29e
feat: revert to gh-pages root
few-sw Nov 16, 2023
85fba90
feat: enable pull-request.action
few-sw Nov 16, 2023
2a1c272
feat: add near-api-js package to docs job
few-sw Nov 16, 2023
9327416
feat: disable jekyll
few-sw Nov 16, 2023
624b2dd
feat: update links on README_TYPEDOC.md
few-sw Nov 16, 2023
b16fe0e
feat: migrate typedoc.json to javascript to handle github full path
few-sw Nov 16, 2023
7b4b1a2
feat: delete typedoc.json
few-sw Nov 16, 2023
3be1584
feat: fix @link on account.ts
few-sw Nov 16, 2023
4d5e87e
feat: update near-api-js tsconfig
few-sw Nov 16, 2023
49b0235
feat: tsconfig test for near-api-js
few-sw Nov 16, 2023
4904c5a
feat: add lib and text to exclude option
few-sw Nov 17, 2023
22facba
feat: remove @link tag on unresolved link RequestSignTransactionsOptions
few-sw Nov 17, 2023
ff96529
Merge branch 'typedoc-configuration' into theme-plugin
few-sw Nov 17, 2023
532aa9a
feat: add typedoc-plugin-merge-modules
few-sw Nov 17, 2023
22fbf88
feat: update tsconfig.base
few-sw Nov 17, 2023
fb228da
feat: update pnpm-lock
few-sw Nov 17, 2023
d2c9910
feat: delete tsconfig.json
few-sw Nov 17, 2023
309229a
feat: remove plugin typedoc-plugin-merge-modules
few-sw Nov 17, 2023
2031e25
feat: disable old docs-generator action
few-sw Nov 17, 2023
d2319c7
feat: update near-api-js tsconfig
few-sw Nov 17, 2023
f51d52b
feat: updtae tsconfig.base
few-sw Nov 17, 2023
d49d952
feat: update action
few-sw Nov 17, 2023
b0f3b26
feat: update action
few-sw Nov 17, 2023
4ebc1de
feat: fix failed to resolve link warning
few-sw Nov 17, 2023
ff7af85
feat: fix not included in the documentation warning
few-sw Nov 17, 2023
344148c
feat: delete typedoc.json file
few-sw Nov 17, 2023
9065f27
feat: typedoc update
few-sw Nov 17, 2023
37fdb88
feat: test @link tag
few-sw Nov 17, 2023
d272604
feat: @link wip
few-sw Nov 17, 2023
c220118
feat: @link change
few-sw Nov 17, 2023
b85c5f9
feat: fix @link near.ts
few-sw Nov 17, 2023
537c0fb
feat: near.ts @link
few-sw Nov 17, 2023
c1a7998
feat: change near.ts
few-sw Nov 17, 2023
278e912
feat: update @link
few-sw Nov 17, 2023
6cd2c9f
feat: update @link tag
few-sw Nov 17, 2023
d1e3af8
feat: readme.md file update
few-sw Nov 17, 2023
78a7a92
feat: enable release action
few-sw Nov 17, 2023
f4c9e61
feat: update githubpages option
few-sw Nov 17, 2023
8a448b1
refactor: update typedoc-generator
few-sw Nov 17, 2023
95fe151
Merge pull request #7 from few-sw/typedoc-configuration
few-sw Nov 17, 2023
f48ae86
Merge branch 'typedocs' into master
gagdiez Nov 22, 2023
f30c994
fix: fixed all links in docs
gagdiez Nov 22, 2023
5e547c3
Merge pull request #1 from gagdiez/typedocs
gagdiez Nov 22, 2023
22d9e21
fix: updated action
gagdiez Nov 23, 2023
5fd6b6d
Merge pull request #2 from gagdiez/typedocs
gagdiez Nov 23, 2023
475f394
fix: docs
gagdiez Nov 23, 2023
b9d4eec
Merge pull request #3 from gagdiez/typedocs
gagdiez Nov 23, 2023
8a16cc1
feat: added near-api-js to typedocs
gagdiez Nov 23, 2023
88de659
fix: output dir for typedocs
gagdiez Nov 23, 2023
6484c14
Merge pull request #4 from gagdiez/typedocs
gagdiez Nov 23, 2023
a0fd580
fix: non-overlapping name for action
gagdiez Nov 23, 2023
d873b8c
Merge pull request #5 from gagdiez/typedocs
gagdiez Nov 23, 2023
86acba1
Merge branch 'master' into master
gagdiez Nov 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: update @link
few-sw committed Nov 17, 2023
commit 278e912847d87767e13bd0bd203beab8a4952f42
4 changes: 2 additions & 2 deletions packages/accounts/src/account.ts
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ export interface SignAndSendTransactionOptions {

/**
* Options used to initiate a function call (especially a change function call)
* @see {@link account!Account#viewFunction | viewFunction} to initiate a view function call
* @see {@link Account#viewFunction | viewFunction} to initiate a view function call
*/
export interface FunctionCallOptions {
/** The NEAR account id where the contract is deployed */
@@ -266,7 +266,7 @@ export class Account {
accessKeyByPublicKeyCache: { [key: string]: AccessKeyView } = {};

/**
* Finds the {@link providers/provider!AccessKeyView | AccessKeyView} associated with the accounts {@link utils/key_pair!PublicKey | PublicKey} stored in the {@link key_stores/keystore!KeyStore | KeyStore}.
* Finds the {@link AccessKeyView} associated with the accounts {@link PublicKey} stored in the {@link key_stores/keystore!KeyStore}.
*
* @todo Find matching access key based on transaction (i.e. receiverId and actions)
*
4 changes: 2 additions & 2 deletions packages/accounts/src/contract.ts
Original file line number Diff line number Diff line change
@@ -84,14 +84,14 @@ export interface ContractMethods {
/**
* Methods that change state. These methods cost gas and require a signed transaction.
*
* @see {@link account!Account.functionCall}
* @see {@link Account#functionCall}
*/
changeMethods: string[];

/**
* View methods do not require a signed transaction.
*
* @see {@link account!Account#viewFunction}
* @see {@link Account#viewFunction}
*/
viewMethods: string[];

6 changes: 3 additions & 3 deletions packages/keystores/src/keystore.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { KeyPair } from '@near-js/crypto';

/**
* KeyStores are passed to {@link near!Near | Near} via {@link near!NearConfig | NearConfig}
* and are used by the {@link signer!InMemorySigner | InMemorySigner} to sign transactions.
* KeyStores are passed to {@link Near} via {@link NearConfig}
* and are used by the {@link InMemorySigner | InMemorySigner} to sign transactions.
*
* @see {@link near-api-js!connect | connect}
* @see {@link connect }
*/
export abstract class KeyStore {
abstract setKey(networkId: string, accountId: string, keyPair: KeyPair): Promise<void>;
6 changes: 3 additions & 3 deletions packages/near-api-js/src/browser-connect.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**
* Connect to NEAR using the provided configuration.
*
* {@link browserConnect!ConnectConfig.networkId | ConnectConfig.networkId} and {@link browserConnect!ConnectConfig.nodeUrl | ConnectConfig.nodeUrl} are required.
* {@link ConnectConfig#networkId} and {@link ConnectConfig#nodeUrl} are required.
*
* To sign transactions you can also pass: {@link browserConnect!ConnectConfig.keyStore | ConnectConfig.keyStore}
* To sign transactions you can also pass: {@link ConnectConfig#keyStore}
*
* Both are passed they are prioritize in that order.
*
* @see {@link browserConnect!ConnectConfig | ConnectConfig}
* @see {@link ConnectConfig}
* @example
* ```js
* async function initNear() {
12 changes: 6 additions & 6 deletions packages/near-api-js/src/connect.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/**
* Connect to NEAR using the provided configuration.
*
* {@link Connect!ConnectConfig.networkId | ConnectConfig.networkId} and {@link Connect!ConnectConfig.nodeUrl | ConnectConfig.nodeUrl} are required.
* {@link ConnectConfig#networkId} and {@link ConnectConfig#nodeUrl} are required.
*
* To sign transactions you can also pass:
* 1. {@link Connect!ConnectConfig.keyStore | ConnectConfig.keyStore}
* 2. {@link Connect!ConnectConfig.keyPath | ConnectConfig.keyPath}
* 3. {@link Connect!ConnectConfig.deps.keyStore | ConnectConfig.deps.keyStore} (deprecated, only for use in legacy applications)
* 1. {@link ConnectConfig#keyStore}
* 2. {@link ConnectConfig#keyPath}
* 3. {@link ConnectConfig#deps.keyStore} (deprecated, only for use in legacy applications)
*
* If all three are passed they are prioritize in that order.
*
* @see {@link Connect!ConnectConfig | ConnectConfig}
* @see {@link ConnectConfig}
* @example
* ```js
* async function initNear() {
@@ -29,7 +29,7 @@ import { logWarning } from './utils';

export interface ConnectConfig extends NearConfig {
/**
* Initialize an {@link key_stores/in_memory_key_store!InMemoryKeyStore | InMemoryKeyStore} by reading the file at keyPath.
* Initialize an {@link InMemoryKeyStore} by reading the file at keyPath.
*/
keyPath?: string;
}
6 changes: 3 additions & 3 deletions packages/providers/src/json-rpc-provider.ts
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
* @description
* This module contains the {@link JsonRpcProvider} client class
* which can be used to interact with the [NEAR RPC API](https://docs.near.org/api/rpc/introduction).
* @see {@link providers/provider!provider | provider} for a list of request and response types
* @see {@link provider} for a list of request and response types
*/
import {
baseEncode,
@@ -139,7 +139,7 @@ export class JsonRpcProvider extends Provider {
}

/**
* Query the RPC by passing an {@link providers/provider!RpcQueryRequest | RpcQueryRequest}
* Query the RPC by passing an {@link RpcQueryRequest}
* @see [https://docs.near.org/api/rpc/contracts](https://docs.near.org/api/rpc/contracts)
*
* @typeParam T the shape of the returned query response
@@ -167,7 +167,7 @@ export class JsonRpcProvider extends Provider {
* pass block_id OR finality as blockQuery, not both
* @see [https://docs.near.org/api/rpc/block-chunk](https://docs.near.org/api/rpc/block-chunk)
*
* @param blockQuery {@link providers/provider!BlockReference | BlockReference} (passing a {@link providers/provider!BlockId | BlockId} is deprecated)
* @param blockQuery {@link BlockReference} (passing a {@link BlockId} is deprecated)
*/
async block(blockQuery: BlockId | BlockReference): Promise<BlockResult> {
const { finality } = blockQuery as any;
12 changes: 6 additions & 6 deletions packages/wallet-account/src/near.ts
Original file line number Diff line number Diff line change
@@ -20,20 +20,20 @@ import { Signer } from '@near-js/signers';
import BN from 'bn.js';

export interface NearConfig {
/** Holds {@link utils/key_pair!KeyPair | KeyPair} for signing transactions */
/** Holds {@link utils/key_pair!KeyPair} for signing transactions */
keyStore?: KeyStore;

/** @hidden */
signer?: Signer;

/**
* [NEAR Contract Helper](https://github.com/near/near-contract-helper) url used to create accounts if no master account is provided
* @see {@link UrlAccountCreator | UrlAccountCreator}
* @see {@link UrlAccountCreator}
*/
helperUrl?: string;

/**
* The balance transferred from the {@link masterAccount} to a created account
* The balance transferred from the {@link NearConfig#masterAccount} to a created account
* @see {@link LocalAccountCreator}
*/
initialBalance?: string;
@@ -51,13 +51,13 @@ export interface NearConfig {

/**
* NEAR RPC API url. used to make JSON RPC calls to interact with NEAR.
* @see {@link providers/json-rpc-provider!JsonRpcProvider | JsonRpcProvider}
* @see {@link JsonRpcProvider}
*/
nodeUrl: string;

/**
* NEAR RPC API headers. Can be used to pass API KEY and other parameters.
* @see {@link providers/json-rpc-provider!JsonRpcProvider | JsonRpcProvider}
* @see {@link JsonRpcProvider}
*/
headers?: { [key: string]: string | number };

@@ -123,7 +123,7 @@ export class Near {
* Create an account using the {@link AccountCreator}. Either:
* * using a masterAccount with {@link LocalAccountCreator}
* * using the helperUrl with {@link UrlAccountCreator}
* @see {@link NearConfig#masterAccount | masterAccount} and {@link NearConfig#helperUrl | helperUrl}
* @see {@link NearConfig#masterAccount} and {@link NearConfig#helperUrl}
*
* @param accountId
* @param publicKey
8 changes: 4 additions & 4 deletions packages/wallet-account/src/wallet_account.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* The classes in this module are used in conjunction with the {@link key_stores/browser_local_storage_key_store!BrowserLocalStorageKeyStore | BrowserLocalStorageKeyStore}.
* The classes in this module are used in conjunction with the {@link BrowserLocalStorageKeyStore}.
* This module exposes two classes:
* * {@link WalletConnection} which redirects users to [NEAR Wallet](https://wallet.near.org/) for key management.
* * {@link ConnectedWalletAccount} is an {@link account!Account | Account} implementation that uses {@link WalletConnection} to get keys
@@ -48,7 +48,7 @@ interface RequestSignTransactionsOptions {
}

/**
* This class is used in conjunction with the {@link key_stores/browser_local_storage_key_store!BrowserLocalStorageKeyStore}.
* This class is used in conjunction with the {@link BrowserLocalStorageKeyStore}.
* It redirects users to [NEAR Wallet](https://wallet.near.org) for key management.
* This class is not intended for use outside the browser. Without `window` (i.e. in server contexts), it will instantiate but will throw a clear error when used.
*
@@ -288,7 +288,7 @@ export class WalletConnection {
}

/**
* {@link account!Account | Account} implementation which redirects to wallet using {@link WalletConnection} when no local key is available.
* {@link Account} implementation which redirects to wallet using {@link WalletConnection} when no local key is available.
*/
export class ConnectedWalletAccount extends Account {
walletConnection: WalletConnection;
@@ -302,7 +302,7 @@ export class ConnectedWalletAccount extends Account {

/**
* Sign a transaction by redirecting to the NEAR Wallet
* @see {@link WalletConnection.requestSignTransactions}
* @see {@link WalletConnection#requestSignTransactions}
*/
async signAndSendTransaction({ receiverId, actions, walletMeta, walletCallbackUrl = window.location.href }: SignAndSendTransactionOptions): Promise<FinalExecutionOutcome> {
const localKey = await this.connection.signer.getPublicKey(this.accountId, this.connection.networkId);