Skip to content

Commit

Permalink
Merge pull request #308 from idexio/alpha
Browse files Browse the repository at this point in the history
Release alpha
  • Loading branch information
idex-bot committed Apr 27, 2024
2 parents a0d4271 + 5e402c1 commit ecac746
Show file tree
Hide file tree
Showing 255 changed files with 48,128 additions and 32,984 deletions.
18 changes: 18 additions & 0 deletions .config/patch.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type * as _typedoc from 'typedoc';

declare module 'typedoc' {
export interface TypeDocOptionMap {
/**
* Define the name of the module that internal symbols which are not exported should be placed into.
*
* @defaultValue "\<internal\>"
*/
internalModule?: string;
/**
* If set internal symbols will not be placed into an internals module, but directly into the module which references them.
*
* @defaultValue false
*/
placeInternalsInOwningModule?: boolean;
}
}
96 changes: 96 additions & 0 deletions .config/typedoc.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// @ts-check

// https://typedoc.org/guides/options/
/** @type {Partial<import('typedoc').TypeDocOptions>} */
const config = {
name: 'IDEX SDK Reference',
entryPoints: ['../src'],
githubPages: true,
out: '../docs',
includeVersion: false,
excludePrivate: true,
excludeProtected: true,
excludeInternal: true,
excludeExternals: true,
hideGenerator: false,
excludeNotDocumented: true,
hideParameterTypesInTitle: false,
// this would be ideal but it makes the behavior
// diverge from standard IDE handling of links.
preserveLinkText: false,
categorizeByGroup: false,
searchInComments: true,
useTsLinkResolution: true,
media: '../assets/',
customCss: '../dev/css-includes/docs.css',
entryPointStrategy: 'resolve',
navigation: {
includeCategories: true,
includeGroups: true,
includeFolders: true,
},
favicon: 'assets/favicon.ico',
customDescription: `IDEX v4's TypeScript/Javascript Developer SDK Reference, designed for low-latency and guaranteed execution in a secure trading environment. This documentation outlines a platform where control and transparency are paramount, offering gas-free settlements and Ethereum-backed security. Ensuring only you have the power to move funds, it exemplifies a commitment to security and efficiency for developers seeking robust integration solutions`,
footerLastModified: true,
sort: ['required-first', 'source-order'],
// navigationLinks: {},
sidebarLinks: {
'IDEX Home': 'https://idex.io',
'IDEX API Docs': 'https://api-docs-v4.idex.io',
'SDK GitHub': 'https://github.com/idexio/idex-sdk-js',
'Exchange Sandbox': 'https://exchange-sandbox.idex.io',
},
visibilityFilters: {
protected: false,
private: false,
inherited: true,
external: false,
'@deprecated': false,
},
// internalModule: 'unexported / internal',
// theme: 'default-modern',
// theme: 'navigation',
plugin: [
'typedoc-plugin-missing-exports',
'typedoc-plugin-mdn-links',
'typedoc-plugin-extras',
// 'typedoc-plugin-coverage',
// 'typedoc-plugin-markdown',
// '../dev/custom-plugins/plugin.mjs',
// 'typedoc-plugin-external-resolver',
// "typedoc-umlclass"
// 'typedoc-theme-category-nav',
// "typedoc-plugin-merge-modules"
],

// include base types and other last
categoryOrder: ['API Clients', '*', 'Signatures', 'Base Types', 'Other'],
includes: '../dev/doc-includes',
cacheBust: true,

searchCategoryBoosts: {
'API Clients': 1.5,
'Enums - Request Parameters': 1.4,
'Enums - Response Properties': 1.3,
'IDEX Interfaces': 1.2,
'WebSocket - Message Types': 1.2,
},

// sortEntryPoints: false,
externalSymbolLinkMappings: {
ethers: {
Provider: 'https://docs.ethers.org/v6/api/providers/#Provider',
JsonRpcProvider:
'https://docs.ethers.org/v6/api/providers/jsonrpc/#JsonRpcProvider',
JsonRpcSigner:
'https://docs.ethers.org/v6/api/providers/jsonrpc/#JsonRpcSigner',
Signer: 'https://docs.ethers.org/v6/api/providers/#Signer',
TypedDataDomain:
'https://docs.ethers.org/v6/api/hashing/#TypedDataDomain',
TypedDataField: 'https://docs.ethers.org/v6/api/hashing/#TypedDataField',
'*': 'https://docs.ethers.org/v6/api/',
},
},
};

module.exports = config;
47 changes: 0 additions & 47 deletions .eslintignore

This file was deleted.

56 changes: 0 additions & 56 deletions .eslintrc.js

This file was deleted.

5 changes: 5 additions & 0 deletions .githooks/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -e # Causes this script to terminate if any command returns an error

[[ -n $SKIP_HOOK_COMMIT_MSG ]] || [[ -n $CI ]] || yarn commitlint --edit "$1"
5 changes: 5 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -e # Causes this script to terminate if any command returns an error

[[ -n $CI ]] || yarn run on:commit
5 changes: 5 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -e # Causes this script to terminate if any command returns an error

[[ -n $CI ]] || yarn build
File renamed without changes.
63 changes: 39 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ on:
- alpha
env:
CI: true
HUSKY_SKIP_HOOKS: 1
HUSKY: 0
GITHUB_TOKEN: ${{ secrets.BOT_GIT_TOKEN }}
SKIP_HOOK_COMMIT_MSG: 1
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
GIT_AUTHOR_NAME: idex-bot
GIT_AUTHOR_EMAIL: support@idex.io
GIT_AUTHOR_EMAIL: monitor@idex.io
GIT_COMMITTER_NAME: idex-bot
GIT_COMMITTER_EMAIL: support@idex.io
GIT_COMMITTER_EMAIL: monitor@idex.io

jobs:
pr:
name: Create Release PR
Expand All @@ -23,13 +24,17 @@ jobs:
env:
REF: ${{ env.GITHUB_BASE_REF }}
BASE: main
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
run: |
BRANCH=${GITHUB_REF##*/}
[[ "$BRANCH" == "$BASE" ]] && exit 0;
if [[ "$BRANCH" == "alpha" ]]; then
BASE="beta"
fi
echo "Check If PR exists for $BRANCH --> $BASE"
echo "Check If PR exists for $GITHUB_REPOSITORY $BRANCH --> $BASE"
gh auth status
if [[ "$(gh pr list -R "$GITHUB_REPOSITORY" --base "$BASE" --state open --label "Release $BRANCH")" == "" ]]; then
echo "Creating PR $BRANCH --> $BASE"
RESULT=$(gh api repos/"${GITHUB_REPOSITORY}"/pulls -F head="$BRANCH" -F base="$BASE" -F title="Release $BRANCH" -F body="This PR was generated automatically. Merging it will transition $BRANCH into ${BASE}.")
Expand All @@ -39,35 +44,45 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 14
check-latest: true
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
node-version: "lts/*"
- name: Enable Corepack
run: corepack enable
# - name: Get yarn cache directory path
# id: yarn-cache-dir-path
# run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# - uses: actions/cache@v3
# id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
# with:
# path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
# key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn --frozen-lockfile --prefer-offline --non-interactive
run: yarn install
- name: Build Library
run: yarn build
# Build Documentation which will be commited by semantic-release
- name: Build Documentation
run: yarn generate:docs:commit
- name: Build TypeDoc
run: yarn typedoc:build
# Build Documentation which will be committed by semantic-release
# - name: Build Documentation
# run: yarn generate:docs:commit
- name: Semantic Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
run: yarn semantic-release
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,24 @@ node_modules/
yarn-error.log


src/tests/quick.ts
test/quick.ts
debug/quick.ts
# this will be built and updated by the release bot
# ./API.md
# ./API.md

# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.eslintcache
coverage/
debug/*
!debug/quick.example.ts
!debug/README.md
!debug/tsconfig.json
.cody/
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-push

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/prepare-commit-msg

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.4.0
v20.12.2
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/*
Loading

0 comments on commit ecac746

Please sign in to comment.