Skip to content

Commit

Permalink
chore(release): Publish v0.0.1-next.3
Browse files Browse the repository at this point in the history
  • Loading branch information
andredezzy committed Jul 4, 2021
2 parents bad58b0 + 2c6b9e7 commit 2ddebe5
Show file tree
Hide file tree
Showing 28 changed files with 1,350 additions and 1,346 deletions.
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

yarn commitlint --edit $1
npx --no-install commitlint --edit "$1"
3 changes: 2 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

yarn lint-staged
yarn git-branch-is -r "^((?!main|master).)*$"
npx lint-staged -c .lintstagedrc.json
8 changes: 6 additions & 2 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"packages/**/*.{js,ts}": [
"eslint --ext js,ts --fix"
"*.[tj]s?(x)": [
"eslint --fix",
"git add"
],
"*.(spec|test).[tj]s?(x)": [
"yarn test"
]
}
File renamed without changes.
5 changes: 4 additions & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
extends: ['@rocketseat/commitlint-config'],
extends: ['@commitlint/config-conventional'],
rules: {
'subject-case': [2, 'always', ['sentence-case']],
},
}
20 changes: 10 additions & 10 deletions examples/iqoption/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ This folder contains Hemes for IQ Option examples for different types of actions
them were tested and may work properly. You can also customize them for your
needs.

| Name | Link |
| ----------------------- | ----------------------------------------------------------------------------------------------- |
| Log in | [JavaScript](./logIn.js) - [TypeScript](./typescript/logIn.tsx) |
| Get initialization data | [JavaScript](./getInitializationData.js) - [TypeScript](./typescript/getInitializationData.tsx) |
| Get profile | [JavaScript](./getProfile.js) - [TypeScript](./typescript/getProfile.tsx) |
| Get underlying list | [JavaScript](./getUnderlyingList.js) - [TypeScript](./typescript/getUnderlyingList.tsx) |
| Get instruments | [JavaScript](./getInstruments.js) - [TypeScript](./typescript/getInstruments.tsx) |
| Place digital option | [JavaScript](./placeDigitalOption.js) - [TypeScript](./typescript/placeDigitalOption.tsx) |
| Open binary option | [JavaScript](./openBinaryOption.js) - [TypeScript](./typescript/openBinaryOption.tsx) |
| Get position | [JavaScript](./getPosition.js) - [TypeScript](./typescript/getPosition.tsx) |
| Name | Link |
| ----------------------- | ---------------------------------------------------- |
| Log in | [TypeScript](./typescript/logIn.tsx) |
| Get initialization data | [TypeScript](./typescript/getInitializationData.tsx) |
| Get profile | [TypeScript](./typescript/getProfile.tsx) |
| Get underlying list | [TypeScript](./typescript/getUnderlyingList.tsx) |
| Get instruments | [TypeScript](./typescript/getInstruments.tsx) |
| Place digital option | [TypeScript](./typescript/placeDigitalOption.tsx) |
| Open binary option | [TypeScript](./typescript/openBinaryOption.tsx) |
| Get position | [TypeScript](./typescript/getPosition.tsx) |

## Add an example

Expand Down
23 changes: 0 additions & 23 deletions examples/iqoption/getActiveProfit.js

This file was deleted.

26 changes: 0 additions & 26 deletions examples/iqoption/getPosition.js

This file was deleted.

19 changes: 0 additions & 19 deletions examples/iqoption/getProfile.js

This file was deleted.

23 changes: 0 additions & 23 deletions examples/iqoption/isActiveEnabled.js

This file was deleted.

15 changes: 0 additions & 15 deletions examples/iqoption/logIn.js

This file was deleted.

24 changes: 0 additions & 24 deletions examples/iqoption/openBinaryOption.js

This file was deleted.

24 changes: 0 additions & 24 deletions examples/iqoption/placeDigitalOption.js

This file was deleted.

23 changes: 0 additions & 23 deletions examples/iqoption/setBalanceMode.js

This file was deleted.

25 changes: 25 additions & 0 deletions examples/iqoption/typescript/getCandles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import '../../loadEnv'

import { Hemes } from '@hemes/core'
import { IQOptionProvider, BaseIQOptionProvider } from '@hemes/iqoption'

async function run() {
const hemes = new Hemes(IQOptionProvider).getProvider<BaseIQOptionProvider>()

const account = await hemes.logIn({
email: String(process.env.TEST_IQOPTION_ACCOUNT_EMAIL),
password: String(process.env.TEST_IQOPTION_ACCOUNT_PASSWORD),
})

const candles = await account.getCandles('EURUSD-OTC', 'm15', 2)

const fixedCandlesTime = candles.map(candle => ({
...candle,
open: Number(candle.open.toFixed(5)),
close: Number(candle.close.toFixed(5)),
}))

console.log('\n', 'Candles', fixedCandlesTime, '\n')
}

run()
3 changes: 2 additions & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"dependencies": {
"@hemes/core": "../packages/core",
"@hemes/iqoption": "../packages/iqoption",
"dotenv": "^8.2.0"
"dotenv": "^8.2.0",
"fs": "^0.0.1-security"
},
"devDependencies": {
"ts-node": "^9.1.1",
Expand Down
Loading

0 comments on commit 2ddebe5

Please sign in to comment.