Skip to content

Commit

Permalink
Merge pull request #49 from ricardo93borges/develop
Browse files Browse the repository at this point in the history
fix(ts paths): remove typescript paths
  • Loading branch information
ricardo93borges authored Dec 30, 2023
2 parents 45bcdb8 + d542805 commit ab06c88
Show file tree
Hide file tree
Showing 26 changed files with 54 additions and 169 deletions.
124 changes: 3 additions & 121 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,121 +1,3 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test
.env.production

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

**.d.ts**
**.js.map**
*.js
.github
.vscode
test
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alphavantage-wrapper-ts",
"version": "3.0.0",
"version": "3.0.9",
"description": "Alpha Vantage API wrapper",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -73,9 +73,6 @@
"module-alias": "^2.2.3",
"ts-node": "^10.9.1"
},
"_moduleAliases": {
"@": "dist"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
Expand Down
6 changes: 3 additions & 3 deletions src/cryptocurrency/Cryptocurrency.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Category } from '@/Category'
import { Function, DataType } from '@/enum'
import { AlphaVantageRequestError, ParseResponseError } from '@/errors'
import { Category } from '../Category'
import { Function, DataType } from '../enum'
import { AlphaVantageRequestError, ParseResponseError } from '../errors'
import {
DailyResponse,
DailyDTO,
Expand Down
2 changes: 1 addition & 1 deletion src/cryptocurrency/dto/daily.dto.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DataType } from '@/enum'
import { DataType } from '../../enum'

export type DailyDTO = {
symbol: string
Expand Down
2 changes: 1 addition & 1 deletion src/cryptocurrency/dto/intraday.dto.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DataType, Interval, OutputSize } from '@/enum'
import { DataType, Interval, OutputSize } from '../../enum'

export type IntradayDTO = {
symbol: string
Expand Down
2 changes: 1 addition & 1 deletion src/cryptocurrency/dto/monthly.dto.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DataType } from '@/enum'
import { DataType } from '../../enum'

export type MonthlyDTO = {
symbol: string
Expand Down
2 changes: 1 addition & 1 deletion src/cryptocurrency/dto/weekly.dto.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DataType } from '@/enum'
import { DataType } from '../../enum'

export type WeeklyDTO = {
symbol: string
Expand Down
2 changes: 1 addition & 1 deletion src/cryptocurrency/utils/parse-response-maps.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Interval } from '@/enum'
import { Interval } from '../../enum'

export type CryptoResponseMap = {
metadata: {
Expand Down
2 changes: 1 addition & 1 deletion src/cryptocurrency/utils/parse-response.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ParseResponseError } from '@/errors'
import { ParseResponseError } from '../../errors'
import { CryptoResponseMap } from './parse-response-maps'

export type ParsedResponseMetadata = {
Expand Down
6 changes: 3 additions & 3 deletions src/fundamental-data/FundamentalData.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Category } from '@/Category'
import { Function } from '@/enum'
import { AlphaVantageRequestError, ParseResponseError } from '@/errors'
import { Category } from '../Category'
import { Function } from '../enum'
import { AlphaVantageRequestError, ParseResponseError } from '../errors'
import {
CompanyOverviewResponse,
CompanyOverviewDTO,
Expand Down
2 changes: 1 addition & 1 deletion src/fundamental-data/dto/listing-status.dto.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ListingState } from '@/enum'
import { ListingState } from '../../enum'

export type ListingStatusDTO = {
date?: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ParseResponseError } from '@/errors'
import { ParseResponseError } from '../../errors'
import { CompanyOverviewResponse } from '../dto/'

export type CompanyOverviewAPIResponseDTO = {
Expand Down
2 changes: 1 addition & 1 deletion src/fundamental-data/utils/parse-earnings-response.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ParseResponseError } from '@/errors'
import { ParseResponseError } from '../../errors'
import { AnnualEarnings, EarningsResponse, QuarterlyEarnings } from '../dto'

export type EarningsAPIResponseDTO = {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'module-alias/register'
import { AlphaVantage, Config } from './alphavantage'

export * from '@/enum'
export * from './enum'
export * as StockTimeSeries from './stock-time-series/index'
export * as Cryptocurrency from './cryptocurrency/index'
export * as FundamentalData from './fundamental-data/index'
Expand Down
6 changes: 3 additions & 3 deletions src/stock-time-series/StockTimeSeries.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DataType, Function } from '@/enum'
import { Category } from '@/Category'
import { DataType, Function } from '../enum'
import { Category } from '../Category'

import { AlphaVantageRequestError, ParseResponseError } from '@/errors'
import { AlphaVantageRequestError, ParseResponseError } from '../errors'
import {
MonthlyAdjustedResponse,
MonthlyAdjustedDTO,
Expand Down
2 changes: 1 addition & 1 deletion src/stock-time-series/utils/parse-quote-response.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ParseResponseError } from '@/errors'
import { ParseResponseError } from '../../errors'
import { QuoteResponse } from '../dto/'

type QuoteResponseData = {
Expand Down
2 changes: 1 addition & 1 deletion src/stock-time-series/utils/parse-response-maps.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Interval } from '@/enum'
import { Interval } from '../../enum'

export type StockTimeSeriesResponseMap = {
metadata: {
Expand Down
2 changes: 1 addition & 1 deletion src/stock-time-series/utils/parse-response.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ParseResponseError } from '@/errors'
import { ParseResponseError } from '../../errors'
import { StockTimeSeriesResponseMap } from './parse-response-maps'

export type ParsedResponseMetadata = {
Expand Down
2 changes: 1 addition & 1 deletion src/stock-time-series/utils/parse-search-response.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ParseResponseError } from '@/errors'
import { ParseResponseError } from '../../errors'
import { SearchAPIResponse, SearchResponse } from '../dto/'

export function parseSearchResponse(data: SearchAPIResponse): SearchResponse[] {
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/cryptocurrency/cryptocurrency.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from 'axios'
import { API_URL } from '@/config'
import { Cryptocurrency } from '@/cryptocurrency/Cryptocurrency'
import { Interval } from '@/enum/'
import { API_URL } from '../../../src/config'
import { Cryptocurrency } from '../../../src/cryptocurrency/Cryptocurrency'
import { Interval } from '../../../src/enum/'
import { getApiKey } from '../../utils'

describe('Cryptocurrency', () => {
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/fundamental-data/fundamental-data.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import { API_URL } from '@/config'
import { FundamentalData } from '@/fundamental-data/FundamentalData'
import { API_URL } from '../../../src/config'
import { FundamentalData } from '../../../src/fundamental-data/FundamentalData'
import { getApiKey } from '../../utils'

describe('FundamentalData', () => {
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/stock-time-series/stock-time-series.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from 'axios'
import { API_URL } from '@/config'
import { Interval } from '@/enum'
import { StockTimeSeries } from '@/stock-time-series/StockTimeSeries'
import { API_URL } from '../../../src/config'
import { Interval } from '../../../src/enum'
import { StockTimeSeries } from '../../../src/stock-time-series/StockTimeSeries'
import { getApiKey } from '../../utils'

describe('StockTimeSeries', () => {
Expand Down
9 changes: 6 additions & 3 deletions test/unit/cryptocurrency/cryptocurrency.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import axios, { AxiosInstance } from 'axios'
import { Cryptocurrency } from '@/cryptocurrency/Cryptocurrency'
import { DataType, Function, Interval, OutputSize } from '@/enum'
import { AlphaVantageRequestError, ParseResponseError } from '@/errors'
import { Cryptocurrency } from '../../../src/cryptocurrency/Cryptocurrency'
import { DataType, Function, Interval, OutputSize } from '../../../src/enum'
import {
AlphaVantageRequestError,
ParseResponseError
} from '../../../src/errors'
import {
givenDailyResponse,
givenIntradayResponse,
Expand Down
9 changes: 6 additions & 3 deletions test/unit/fundamental-data/fundamental-data.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import axios, { AxiosInstance } from 'axios'
import { Function, ListingState } from '@/enum'
import { AlphaVantageRequestError, ParseResponseError } from '@/errors'
import { FundamentalData } from '@/fundamental-data/FundamentalData'
import { Function, ListingState } from '../../../src/enum'
import {
AlphaVantageRequestError,
ParseResponseError
} from '../../../src/errors'
import { FundamentalData } from '../../../src/fundamental-data/FundamentalData'
import {
givenCompanyOverviewResponse,
givenEarningsResponse
Expand Down
9 changes: 6 additions & 3 deletions test/unit/stock-time-series/stock-time-series.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import axios, { AxiosInstance } from 'axios'
import { OutputSize, DataType, Function, Interval } from '@/enum/'
import { AlphaVantageRequestError, ParseResponseError } from '@/errors'
import { StockTimeSeries } from '@/stock-time-series/StockTimeSeries'
import { OutputSize, DataType, Function, Interval } from '../../../src/enum/'
import {
AlphaVantageRequestError,
ParseResponseError
} from '../../../src/errors'
import { StockTimeSeries } from '../../../src/stock-time-series/StockTimeSeries'
import {
givenDailyAdjustedResponse,
givenDailyResponse,
Expand Down
5 changes: 1 addition & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
"rootDir": "src",
"sourceMap": true,
"declarationMap": true,
"baseUrl": "./src",
"paths": {
"@/*": ["*"]
}
"baseUrl": "./src"
},
"exclude": ["node_modules", "dist"]
}

0 comments on commit ab06c88

Please sign in to comment.