-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #511 from MoralisWeb3/feat/apiutils
feat(apiUtils): apiUtil package without test
- Loading branch information
Showing
68 changed files
with
377 additions
and
1,336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@moralisweb3/core': major | ||
'@moralisweb3/evm-api': major | ||
--- | ||
|
||
Refactor evmApi package to use apiUtils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@moralisweb3/api': major | ||
--- | ||
|
||
Generic logic for api modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@moralisweb3/api': major | ||
--- | ||
|
||
rename package from apiUtils to api |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CHANGELOG.md | ||
|
||
# Output folders | ||
lib/**/* | ||
dist | ||
coverage/ | ||
lib.esm | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
...require('../../.prettierrc'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# @moralisweb3/api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
...require('../../jest.config'), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "@moralisweb3/api", | ||
"author": "Moralis", | ||
"version": "2.0.0-alpha.2", | ||
"license": "MIT", | ||
"private": false, | ||
"main": "./lib/index.js", | ||
"types": "./lib/index.d.ts", | ||
"sideEffects": false, | ||
"files": [ | ||
"lib/index.*", | ||
"lib/**/*.d.ts", | ||
"dist" | ||
], | ||
"scripts": { | ||
"format": "prettier . \"**/*.+(js|ts|json)\" --write", | ||
"lint": "eslint . --ext .js,.ts,.tsx,jsx", | ||
"format:check": "prettier . \"**/*.+(js|ts|json)\" --check", | ||
"clean": "rm -rf lib && rm -rf lib.esm && rm -rf tsconfig.tsbuildinfo", | ||
"build": "tsc", | ||
"dev": "tsc --watch" | ||
}, | ||
"devDependencies": { | ||
"prettier": "^2.5.1", | ||
"typescript": "^4.5.5" | ||
}, | ||
"dependencies": { | ||
"@moralisweb3/core": "^2.0.0-alpha.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import packageJson from './package.json'; | ||
import { commonJs, esm } from '../../rollup.config'; | ||
|
||
export default [commonJs(packageJson), esm(packageJson)]; |
14 changes: 7 additions & 7 deletions
14
...vmApi/src/EvmApiPaginatedResultAdapter.ts → ...ages/api/src/ApiPaginatedResultAdapter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { ApiModule, MoralisCore } from '@moralisweb3/core'; | ||
import { ApiConfigSetup } from './config/ApiConfigSetup'; | ||
|
||
export class MoralisApi extends ApiModule { | ||
public constructor(moduleName: string, core: MoralisCore, baseUrl: string) { | ||
super(moduleName, core, baseUrl); | ||
} | ||
|
||
public setup() { | ||
ApiConfigSetup.register(this.core.config); | ||
} | ||
|
||
public start(): void | Promise<void> { | ||
// Nothing... | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/evmApi/src/config/EvmApiConfig.ts → packages/api/src/config/ApiConfig.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.